BOSS 6.6.4.p01
BESIII Offline Software System
Loading...
Searching...
No Matches
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 "HepMC/GenEvent.h"
32#include "CLHEP/Random/RandomEngine.h"
33#include "CLHEP/Random/RandPoisson.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
76
void StripPartons(GenEvent *evt)
Definition: GenModule.cxx:274
bool m_StripPartonSwitch
Definition: GenModule.h:62
CLHEP::RandPoisson * m_pPoissonGenerator
Definition: GenModule.h:68
std::vector< int > m_StripVector
Definition: GenModule.h:61
virtual StatusCode callGenerator()
Definition: GenModule.cxx:218
StatusCode finalize()
Definition: GenModule.cxx:197
virtual StatusCode genuserInitialize()
Definition: GenModule.cxx:212
CLHEP::HepRandomEngine * m_pRandomEngine
Definition: GenModule.h:67
StatusCode initialize()
Definition: GenModule.cxx:63
double m_meanInteractions
Definition: GenModule.h:58
virtual StatusCode genFinalize()
Definition: GenModule.cxx:224
StatusCode execute()
Definition: GenModule.cxx:125
int m_randomSeed
Definition: GenModule.h:59
void StripPartonsInit(void)
Definition: GenModule.cxx:236
bool m_fixedMode
Definition: GenModule.h:57
std::vector< int > m_AllPartons
Definition: GenModule.h:60
virtual StatusCode genInitialize()
Definition: GenModule.cxx:206
HepPDT::ParticleDataTable * m_particleTable
Definition: GenModule.h:73
virtual ~GenModule()
Definition: GenModule.cxx:53
virtual StatusCode fillEvt(GenEvent *evt)
Definition: GenModule.cxx:230