11 #include "HepMCInterface.h"
15 #include "HepMCEvent.H"
24 #include "Tauola/Tauola.h"
25 #include "Tauola/TauolaHepMCEvent.h"
43 double px=0.0,py=0.0,
pz=0.0,e=0.0;
45 for ( HepMC::GenEvent::particle_const_iterator
p = evt->particles_begin();
46 p != evt->particles_end(); ++
p )
48 if( (*p)->status() == 1 )
50 HepMC::FourVector
m = (*p)->momentum();
59 cout.setf(ios_base::floatfield);
60 cout<<endl<<
"Vector Sum: "<<px<<
" "<<py<<
" "<<
pz<<
" "<<e<<endl;
63 int main(
int argc,
char **argv)
65 HepMC::I_Pythia8 ToHepMC;
69 Event&
event = pythia.event;
71 pythia.readString(
"PartonLevel:ISR = off");
72 pythia.readString(
"PartonLevel:FSR = off");
74 pythia.readString(
"WeakSingleBoson:ffbar2gmZ = on");
75 pythia.readString(
"23:onMode = off");
76 pythia.readString(
"23:onIfAny = 15");
77 pythia.particleData.readString(
"15:mayDecay = off");
80 pythia.init( 11, -11, 91.187);
86 Photos::setInfraredCutOff(0.01/91.187);
91 cout.setf(ios::fixed);
126 if(iEvent%1000==0) Log::Info()<<
"Event: "<<iEvent<<
"\t("<<iEvent*(100./
NumberOfEvents)<<
"%)"<<endl;
127 if(!pythia.next())
continue;
130 HepMC::GenEvent * HepMCEvt =
new HepMC::GenEvent();
131 ToHepMC.fill_next_event(event, HepMCEvt);
134 TauolaHepMCEvent * t_event =
new TauolaHepMCEvent(HepMCEvt);
138 t_event->decayTaus();
146 cout<<
"Momentum conservation chceck BEFORE/AFTER Photos"<<endl;
160 HepMCEvent temp_event(*HepMCEvt,
false);
161 MC_Analyze(&temp_event);
164 if(iEvent>=NumberOfEvents-5)
166 Log::RedirectOutput(Log::Info());
176 Log::RedirectOutput(Log::Info());
unsigned int EventsToCheck
int main(int argc, char **argv)
void checkMomentumConservationInEvent(HepMC::GenEvent *evt)
unsigned long NumberOfEvents