BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
GeneratorModule/include/GeneratorModule/GenModule.h
Go to the documentation of this file.
1// --------------------------------------------------
2//
3// File: GeneratorModule/GenModule.h
4// Description:
5// This class is the base class used to specify the behavior of all
6// event generator module and is meant to capture the common behavior
7// of these modules. GenModule inherits the Algorithm interface.
8//
9// The common behavior currently consists of:
10// - Providing a facility for generating multiple generator events
11// within a single physics event (to mimic multiple interactions).
12// - Providing the access to the HepMC ParticleProperties Table
13// - Creating the McEvent and if necessary the McEventCollection
14// In the future, this module will also provide the common interface to
15// special purpose decay packages such as QQ (for B decays) and Tauola
16// (for tau decays)
17//
18// The following virtual methods should be overloaded from the child class:
19// StatusCode genInitialize()
20// StatusCode callGenerator()
21// StatusCode genFinalize()
22// StatusCode fillEvt(GeneratorEvent* evt)
23//
24
25#ifndef GENERATORMODULEGENMODULE_H
26#define GENERATORMODULEGENMODULE_H
27
28#include "GaudiKernel/Algorithm.h"
29#include "HepPDT/ParticleDataTable.hh"
30// #include "BesHepMC/GenEvent.h"
31#include "CLHEP/Random/RandPoisson.h"
32#include "CLHEP/Random/RandomEngine.h"
33#include "HepMC/GenEvent.h"
34
35// The following line should replace the
36// above one when using CLHEP/HepMC
37// #include "CLHEP/HepMC/GenEvent.h"
38
39using HepMC::GenEvent;
40
41class GenModule : public Algorithm {
42public:
43 GenModule( const std::string& name, ISvcLocator* pSvcLocator );
44 virtual ~GenModule();
45 StatusCode initialize();
46 StatusCode execute();
47 StatusCode finalize();
48
49 virtual StatusCode genInitialize();
50 virtual StatusCode genuserInitialize();
51 virtual StatusCode callGenerator();
52 virtual StatusCode genFinalize();
53 virtual StatusCode fillEvt( GenEvent* evt );
54
55protected:
56 // Here are setable properties:-
60 std::vector<int> m_AllPartons;
61 std::vector<int> m_StripVector;
63 void StripPartonsInit( void );
64 void StripPartons( GenEvent* evt );
65
66 // Here are local class data members:-
67 CLHEP::HepRandomEngine* m_pRandomEngine;
68 CLHEP::RandPoisson* m_pPoissonGenerator;
69
70 // The following is temporary. The particle properties should come
71 // from the ParticlePropertiesService, but that means replacing the
72 // Gaudi one with the BES one
73 HepPDT::ParticleDataTable* m_particleTable;
74};
75#endif
void StripPartons(GenEvent *evt)
virtual StatusCode callGenerator()
StatusCode finalize()
HepPDT::ParticleDataTable * m_particleTable
virtual StatusCode genuserInitialize()
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Definition GenModule.cxx:37
StatusCode initialize()
Definition GenModule.cxx:60
virtual StatusCode genFinalize()
StatusCode execute()
void StripPartonsInit(void)
virtual StatusCode genInitialize()
virtual ~GenModule()
Definition GenModule.cxx:51
virtual StatusCode fillEvt(GenEvent *evt)