6 #include <Pythia8/Pythia.h> 10 #include "Pythia8Plugins/HepMC2.h" 14 decayer = std::make_unique<Pythia8::Pythia>();
17 decayer->settings.flag(
"ProcessLevel:all",
false);
18 decayer->settings.flag(
"PartonLevel:FSRinResonances",
false);
19 decayer->settings.flag(
"ProcessLevel:resonanceDecays",
false);
26 while (pdt.nextId(pid) > pid) {
27 pid = pdt.nextId(pid);
28 pdt.mayDecay(pid,
false);
35 CLHEP::HepRandomEngine* engine) {
43 Pythia8::Particle py8part(pid,
59 int nentries_before =
decayer->event.size();
60 decayer->particleData.mayDecay(pid,
63 decayer->particleData.mayDecay(pid,
false);
64 int nentries_after =
decayer->event.size();
65 if (nentries_after <= nentries_before)
68 theList.reserve(nentries_after - nentries_before);
70 for (
int ipart = nentries_before; ipart < nentries_after; ipart++) {
71 Pythia8::Particle& py8daughter =
decayer->event[ipart];
76 XYZTLorentzVector(py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e()),
77 XYZTLorentzVector(py8daughter.xProd(), py8daughter.yProd(), py8daughter.zProd(), py8daughter.tProd())))
78 .setMass(py8daughter.m());
int pid() const
get the HEP particle ID number
double Z() const
z of vertex
const DaughterParticleList & particleDaughters(ParticlePropagator &particle, CLHEP::HepRandomEngine *)
const XYZTLorentzVector & momentum() const
the momentum fourvector
const HepPDT::ParticleDataTable * particleDataTable() const
DaughterParticleList theList
RawParticle makeParticle(HepPDT::ParticleDataTable const *, int id, const math::XYZTLorentzVector &p)
RawParticle const & particle() const
The particle being propagated.
HepPDT::ParticleData ParticleData
double T() const
vertex time
std::unique_ptr< Pythia8::Pythia > decayer
double mass() const
get the MEASURED mass
std::unique_ptr< gen::P8RndmEngine > p8RndmEngine
double Y() const
y of vertex
double X() const
x of vertex
math::XYZTLorentzVector XYZTLorentzVector
std::vector< RawParticle > DaughterParticleList