10 #include "Tauola/Log.h"
11 #include "Tauola/Tauola.h"
12 #include "Tauola/TauolaHepMCEvent.h"
15 #ifdef PYTHIA8180_OR_LATER
16 #include "Pythia8/Pythia.h"
17 #include "Pythia8/Pythia8ToHepMC.h"
20 #include "HepMCInterface.h"
25 #include "HepMCEvent.H"
28 #include "tauola_print_parameters.h"
30 using namespace Pythia8;
31 using namespace Tauolapp;
33 int NumberOfEvents = 10000;
44 double px=0.0,py=0.0,pz=0.0,e=0.0;
49 if( (*p)->status() == 1 )
60 cout.setf(ios_base::floatfield);
61 cout<<endl<<
"Vector Sum: "<<px<<
" "<<py<<
" "<<pz<<
" "<<e<<endl;
98 int main(
int argc,
char **argv){
100 Log::SummaryAtExit();
104 Event&
event = pythia.event;
107 #ifdef PYTHIA8180_OR_LATER
114 pythia.readString(
"HadronLevel:Hadronize = off");
115 pythia.readString(
"SpaceShower:QEDshowerByL = off");
116 pythia.readString(
"SpaceShower:QEDshowerByQ = off");
117 pythia.readString(
"PartonLevel:ISR = off");
118 pythia.readString(
"PartonLevel:FSR = off");
124 pythia.readString(
"WeakSingleBoson:ffbar2gmZ = on");
125 pythia.readString(
"23:onMode = off");
126 pythia.readString(
"23:onIfAny = 15");
129 pythia.init( 11, -11, 92.);
141 Tauola::initialize();
143 tauola_print_parameters();
164 for (
int iEvent = 0; iEvent < NumberOfEvents; ++iEvent){
166 if(iEvent%1000==0) Log::Info()<<
"Event: "<<iEvent<<endl;
167 if (!pythia.next())
continue;
174 HepMCEvt->
use_units(HepMC::Units::GEV,HepMC::Units::MM);
176 ToHepMC.fill_next_event(event, HepMCEvt);
178 if(iEvent<EventsToCheck)
181 cout<<
"Momentum conservation chceck BEFORE/AFTER Tauola"<<endl;
182 checkMomentumConservationInEvent(HepMCEvt);
193 if(iEvent<EventsToCheck)
195 checkMomentumConservationInEvent(HepMCEvt);
198 Log::Debug(5)<<
"helicites = "<<Tauola::getHelPlus()<<
" "<<Tauola::getHelMinus()
199 <<
" electroweak wt= "<<Tauola::getEWwt()<<endl;
202 HepMCEvent temp_event(*HepMCEvt,
false);
203 MC_Analyze(&temp_event);
206 if(iEvent>=NumberOfEvents-5){
particle_const_iterator particles_begin() const
begin particle iteration
double e() const
return E
double px() const
return px
The GenEvent class is the core of HepMC.
double pz() const
return pz
void print(std::ostream &ostr=std::cout) const
dumps to ostr
particle_const_iterator particles_end() const
end particle iteration
FourVector is a simple representation of a physics 4 vector.
double py() const
return py
void use_units(Units::MomentumUnit, Units::LengthUnit)