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);
39 Pythia8::Particle py8part( pid , 93, 0, 0, 0, 0, 0, 0,
45 py8part.vProd( particle.
X(), particle.
Y(),
46 particle.
Z(), particle.
T() );
47 decayer->event.append( py8part );
49 int nentries_before =
decayer->event.size();
50 decayer->particleData.mayDecay(pid,
true);
52 decayer->particleData.mayDecay(pid,
false);
53 int nentries_after =
decayer->event.size();
54 if ( nentries_after <= nentries_before )
return theList;
59 for (
int ipart=nentries_before; ipart<nentries_after; ipart++ )
61 Pythia8::Particle& py8daughter =
decayer->event[ipart];
62 theList[ipart-nentries_before].SetXYZT( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
63 theList[ipart-nentries_before].setVertex( py8daughter.xProd(),
66 py8daughter.tProd() );
67 theList[ipart-nentries_before].setID( py8daughter.id() );
68 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