10 #include "Tauola/Tauola.h"
11 #include "Tauola/TauolaHepMCEvent.h"
14 #include "HepMC/GenEvent.h"
15 #include "HepMC/GenParticle.h"
17 #include "tauola_print_parameters.h"
25 using namespace Tauolapp;
35 double ele_mass_sqr = parmas_.amell*parmas_.amell;
39 momentum_e1.setPz(-2);
40 momentum_e2.setPz(3.5);
42 momentum_e1.setE(sqrt(momentum_e1.pz()*momentum_e1.pz()+ele_mass_sqr));
43 momentum_e2.setE(sqrt(momentum_e2.pz()*momentum_e2.pz()+ele_mass_sqr));
46 double tau_mass = parmas_.amtau;
71 event->add_vertex(vertex);
75 momentum_e1.e()+momentum_e2.e());
85 double tau_energy = 0.5*sqrt(cms.e()*cms.e() - (cms.px()*cms.px()
86 + cms.py()*cms.py()+cms.pz()*cms.pz()));
88 first_tau.setE(tau_energy);
89 first_tau.setPx((1.0/sqrt(2.0))*sqrt(tau_energy*tau_energy-tau_mass*tau_mass));
90 first_tau.setPy((1.0/sqrt(2.0))*sqrt(tau_energy*tau_energy-tau_mass*tau_mass));
92 second_tau.setE(tau_energy);
93 second_tau.setPx(-1*(1.0/sqrt(2.0))*sqrt(tau_energy*tau_energy-tau_mass*tau_mass));
94 second_tau.setPy(-1*(1.0/sqrt(2.0))*sqrt(tau_energy*tau_energy-tau_mass*tau_mass));
96 first_tau.boostFromRestFrame(cms_boost);
97 second_tau.boostFromRestFrame(cms_boost);
109 int NumberOfEvents = 10;
112 Tauola::setDecayingParticle(15);
113 Tauola::setSameParticleDecayMode(0);
114 Tauola::setOppositeParticleDecayMode(0);
121 Tauola::initialize();
123 tauola_print_parameters();
126 for (
int iEvent = 0; iEvent < NumberOfEvents; ++iEvent) {
132 cout <<
"BEFORE:"<<endl;
137 cout <<
"AFTER:"<<endl;
void set_generated_mass(const double &m)
define the actual generated mass
void add_particle_in(GenParticle *inparticle)
add incoming particle
GenVertex contains information about decay vertices.
The GenEvent class is the core of HepMC.
void add_particle_out(GenParticle *outparticle)
add outgoing particle
FourVector is a simple representation of a physics 4 vector.
The GenParticle class contains information about generated particles.