5 #include <Pythia8/Pythia.h> 6 #include "Pythia8Plugins/HepMC2.h" 11 decayer.reset(
new Pythia8::Pythia);
14 decayer->settings.flag(
"ProcessLevel:all",
false);
15 decayer->settings.flag(
"PartonLevel:FSRinResonances",
false);
16 decayer->settings.flag(
"ProcessLevel:resonanceDecays",
false);
23 while(pdt.nextId(pid) >
pid){
24 pid = pdt.nextId(pid);
25 pdt.mayDecay(pid,
false);
43 Pythia8::Particle py8part( pid , 93, 0, 0, 0, 0, 0, 0,
49 py8part.vProd( particle.
X(), particle.
Y(),
50 particle.
Z(), particle.
T() );
51 decayer->event.append( py8part );
53 int nentries_before =
decayer->event.size();
54 decayer->particleData.mayDecay(pid,
true);
56 decayer->particleData.mayDecay(pid,
false);
57 int nentries_after =
decayer->event.size();
58 if ( nentries_after <= nentries_before )
return theList;
63 for (
int ipart=nentries_before; ipart<nentries_after; ipart++ )
65 Pythia8::Particle& py8daughter =
decayer->event[ipart];
66 theList[ipart-nentries_before].SetXYZT( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
67 theList[ipart-nentries_before].setVertex( py8daughter.xProd(),
70 py8daughter.tProd() );
71 theList[ipart-nentries_before].setID( py8daughter.id() );
72 theList[ipart-nentries_before].setMass( py8daughter.m() );
const DaughterParticleList & particleDaughters(ParticlePropagator &particle, CLHEP::HepRandomEngine *)
int pid() const
get the HEP particle ID number
double mass() const
get the MEASURED mass
DaughterParticleList theList
const XYZTLorentzVector & momentum() const
the momentum fourvector
double Y() const
y of vertex
double Z() const
z of vertex
std::auto_ptr< Pythia8::Pythia > decayer
HepPDT::ParticleData ParticleData
std::unique_ptr< gen::P8RndmEngine > p8RndmEngine
double X() const
x of vertex
double T() const
vertex time
std::vector< RawParticle > DaughterParticleList