5 #include "EvtGen/EvtGen.hh"
7 #include "EvtGenBase/EvtParticle.hh"
8 #include "EvtGenBase/EvtParticleFactory.hh"
9 #include "EvtGenBase/EvtPatches.hh"
10 #include "EvtGenBase/EvtPDL.hh"
11 #include "EvtGenBase/EvtRandom.hh"
12 #include "EvtGenBase/EvtReport.hh"
13 #include "EvtGenBase/EvtHepMCEvent.hh"
14 #include "EvtGenBase/EvtSimpleRandomEngine.hh"
15 #include "EvtGenBase/EvtMTRandomEngine.hh"
16 #include "EvtGenBase/EvtAbsRadCorr.hh"
17 #include "EvtGenBase/EvtDecayBase.hh"
19 #ifdef EVTGEN_EXTERNAL
20 #include "EvtGenExternal/EvtExternalGenList.hh"
27 int main(
int argc,
char** argv) {
36 eng =
new EvtMTRandomEngine();
41 EvtRandom::setRandomEngine(eng);
44 std::list<EvtDecayBase*> extraModels;
46 #ifdef EVTGEN_EXTERNAL
48 radCorrEngine = genList.getPhotosModel();
49 extraModels = genList.getListOfModels();
53 EvtGen myGenerator(
"../DECAY_2010.DEC",
"../evt.pdl", eng,
54 radCorrEngine, &extraModels);
59 static EvtId UPS4 = EvtPDL::getId(std::string(
"Upsilon(4S)"));
65 for (i = 0; i < nEvents; i++) {
67 std::cout<<
"Event number "<<i<<std::endl;
70 EvtVector4R pInit(EvtPDL::getMass(UPS4), 0.0, 0.0, 0.0);
71 parent = EvtParticleFactory::particleFactory(UPS4, pInit);
72 parent->setVectorSpinDensity();
75 myGenerator.generateDecay(parent);
79 theEvent.constructEvent(parent);
81 genEvent->
print(std::cout);
The GenEvent class is the core of HepMC.
void print(std::ostream &ostr=std::cout) const
dumps to ostr