7 #include <Pythia8/Pythia.h> 8 #include "Pythia8Plugins/HepMC2.h" 17 pythia_->settings.flag(
"ProcessLevel:all",
false);
18 pythia_->settings.flag(
"PartonLevel:FSRinResonances",
false);
19 pythia_->settings.flag(
"ProcessLevel:resonanceDecays",
false);
26 while(pdt.nextId(pid) >
pid)
28 pid = pdt.nextId(pid);
29 pdt.mayDecay(pid,
false);
50 Pythia8::Particle pythiaParticle( pid , 93, 0, 0, 0, 0, 0, 0,
57 pythia_->event.append(pythiaParticle);
60 int nentries_before =
pythia_->event.size();
62 pythia_->particleData.mayDecay(pid,
true);
66 pythia_->particleData.mayDecay(pid,
false);
67 int nentries_after =
pythia_->event.size();
69 if(nentries_after <= nentries_before)
return;
72 for(
int ipart=nentries_before; ipart<nentries_after; ipart++)
74 Pythia8::Particle& daughter =
pythia_->event[ipart];
82 secondaries.back()->setMotherDeltaR(particle.
momentum());
84 secondaries.back()->setMotherSimTrackIndex(particle.
simTrackIndex());
std::unique_ptr< gen::P8RndmEngine > pythiaRandomEngine_
Instance of pythia Random Engine.
const math::XYZTLorentzVector & position() const
Return position of the particle.
int getMotherPdgId() const
Get pdgIdto mother particle (only makes sense if mother and daughter charged).
int pdgId() const
Return pdgId of the particle.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
~Decayer()
Default destructor.
bool isExotic(int pdgid_)
Abs< T >::type abs(const T &t)
HepPDT::ParticleData ParticleData
void decay(const Particle &particle, std::vector< std::unique_ptr< Particle > > &secondaries, CLHEP::HepRandomEngine &engine) const
Decay particle using pythia.
int simTrackIndex() const
Return index of the SimTrack.
double getMotherDeltaR() const
Get delta R to mother particle (only makes sense if mother and daughter charged). ...
double charge() const
Return charge of the particle.
Decayer()
Default Constructor.
const math::XYZTLorentzVector & momentum() const
Return momentum of the particle.
Definition of a generic FastSim Particle which can be propagated through the detector (formerly Parti...
std::unique_ptr< Pythia8::Pythia > pythia_
Instance of pythia.