10 #include "HepMC/GenEvent.h"
11 #include "HepMC/IO_HEPEVT.h"
12 #include "HepMC/HEPEVT_Wrapper.h"
16 namespace TauolaInterfaceVar {
30 for(
int i = 0;
i < *lenv;
i++)
68 : fIsInitialized(
false)
105 fPDGs.push_back( 15 ) ;
108 cout <<
"----------------------------------------------" << endl;
109 cout <<
"Initializing Tauola" << endl;
112 cout <<
"Tauola: Polarization disabled" << endl;
116 cout <<
"Tauola: Polarization enabled" << endl;
150 HepMC::IO_HEPEVT
conv;
173 int numPartBeforeTauola = HepMC::HEPEVT_Wrapper::number_entries();
180 int numPartAfterTauola = HepMC::HEPEVT_Wrapper::number_entries();
191 bool foundTau =
false;
192 for (
int ip=1; ip<=numPartAfterTauola; ip++ )
207 return conv.read_next_event();
210 std::vector<int> PrntIndx;
212 for (
int ip=numPartAfterTauola; ip>numPartBeforeTauola; ip-- )
218 int Prnt = HepMC::HEPEVT_Wrapper::first_parent(ip);
219 ip -= (HepMC::HEPEVT_Wrapper::number_children(Prnt)-1);
220 PrntIndx.push_back( Prnt );
223 int Prnt1 = HepMC::HEPEVT_Wrapper::first_parent( Prnt );
226 PrntIndx.insert( PrntIndx.begin(), Prnt );
227 ip -= HepMC::HEPEVT_Wrapper::number_children(Prnt);
229 for (
size_t iprt=0; iprt<PrntIndx.size(); iprt++ )
231 int Indx = PrntIndx[iprt];
241 double lifetime = PData->lifetime().value();
246 double ct = -lifetime *
std::log(prob);
249 double px = HepMC::HEPEVT_Wrapper::px( Indx );
250 double py = HepMC::HEPEVT_Wrapper::py( Indx );
251 double pz = HepMC::HEPEVT_Wrapper::pz( Indx );
259 VxDec += ct * (px/
mass);
261 VyDec += ct * (py/
mass);
263 VzDec += ct * (pz/
mass);
265 VtDec += ct * (ee/
mass);
266 for (
int idau=HepMC::HEPEVT_Wrapper::first_child( Indx );
267 idau<=HepMC::HEPEVT_Wrapper::last_child( Indx ); idau++ )
269 HepMC::HEPEVT_Wrapper::set_position( idau, VxDec, VyDec, VzDec, VtDec );
273 return conv.read_next_event();
T getParameter(std::string const &) const
CLHEP::HepRandomEngine * decayRandomEngine
HepMC::GenEvent * decay(HepMC::GenEvent *)
static HepMC::IO_HEPEVT conv
double phoran_(int *idummy)
TauolaInterface(const edm::ParameterSet &)
void rmarin_(int *, int *, int *)
void SetDecayRandomEngine(CLHEP::HepRandomEngine *decayRandomEngine)
void getData(T &iHolder) const
void tauola_srs_(int *, int *)
edm::ESHandle< HepPDT::ParticleDataTable > fPDGTable
void ranmar_(float *rvec, int *lenv)
HepPDT::ParticleData ParticleData
CLHEP::HepRandomEngine * decayRandomEngine
Pythia6Service * fPy6Service
void init(const edm::EventSetup &)