3 #include "Tauola/Tauola.h"
4 #include "Tauola/TauolaHepMCEvent.h"
7 #ifdef PYTHIA8180_OR_LATER
8 #include "Pythia8/Pythia.h"
9 #include "Pythia8/Pythia8ToHepMC.h"
12 #include "HepMCInterface.h"
15 #include "tauola_print_parameters.h"
17 using namespace Pythia8;
18 using namespace Tauolapp;
31 double px=0.0,py=0.0,pz=0.0,e=0.0;
36 if( (*p)->status() == 1 )
47 cout.setf(ios_base::floatfield);
48 cout<<endl<<
"Vector Sum: "<<px<<
" "<<py<<
" "<<pz<<
" "<<e<<endl;
59 double p1=tau->
getPx();
60 double p2=tau->
getPy();
61 double p3=tau->
getPz();
62 double E =tau->
getE();
71 double pb=betx*target->
getPx()+bety*target->
getPy()+betz*target->
getPz();
84 Event&
event = pythia.event;
87 #ifdef PYTHIA8180_OR_LATER
93 pythia.readString(
"WeakSingleBoson:ffbar2gmZ = on");
94 pythia.readString(
"23:onMode = off");
95 pythia.readString(
"23:onIfAny = 15");
101 pythia.readString(
"15:mayDecay = off");
103 pythia.init( 11, -11, 92.);
105 Tauola::setSameParticleDecayMode(3);
106 Tauola::setOppositeParticleDecayMode(3);
107 Tauola::initialize();
109 tauola_print_parameters();
111 ofstream s(
"out.txt");
113 int events_processed = 0;
117 if(!pythia.next())
return -1;
121 HepMCEvt->
use_units(HepMC::Units::GEV,HepMC::Units::MM);
123 ToHepMC.fill_next_event(event, HepMCEvt);
128 cout<<
"Momentum conservation chceck BEFORE/AFTER Tauola"<<endl;
129 checkMomentumConservationInEvent(HepMCEvt);
137 if((*p)->pdg_id()==15)
139 if((*p)->status()!=1)
continue;
157 Tauola::decayOne(htau);
168 checkMomentumConservationInEvent(HepMCEvt);
182 cout.setf(ios::fixed);
183 cout<<y/events_processed<<endl;
particle_const_iterator particles_begin() const
begin particle iteration
double e() const
return E
virtual void setPz(double pz)=0
double px() const
return px
The GenEvent class is the core of HepMC.
virtual void setPx(double px)=0
double pz() const
return pz
virtual void setE(double e)=0
particle_const_iterator particles_end() const
end particle iteration
virtual void setPy(double py)=0
FourVector is a simple representation of a physics 4 vector.
double py() const
return py
void use_units(Units::MomentumUnit, Units::LengthUnit)
std::vector< TauolaParticle * > getDaughters()
The GenParticle class contains information about generated particles.