3 using namespace Pythia8;
44 fMasterGen->readString(
"ProcessLevel:all = off");
45 fMasterGen->readString(
"ProcessLevel::resonanceDecays=on");
49 fDecayer->readString(
"ProcessLevel:all = off");
50 fDecayer->readString(
"ProcessLevel::resonanceDecays=on");
62 int NPartsBeforeDecays = pythiaEvent->size()-1;
66 int NPartsAfterDecays =
event().get()->particles_size();
67 int NewBarcode = NPartsAfterDecays;
69 for (
int ipart=NPartsAfterDecays; ipart>NPartsBeforeDecays; ipart-- )
74 if ( part->status() == 1 )
77 Particle py8part( part->pdg_id(), 93, 0, 0, 0, 0, 0, 0,
82 part->generated_mass() );
83 HepMC::GenVertex* ProdVtx = part->production_vertex();
84 py8part.vProd( ProdVtx->position().x(), ProdVtx->position().y(),
85 ProdVtx->position().z(), ProdVtx->position().t() );
86 py8part.tau( (
fDecayer->particleData).tau0( part->pdg_id() ) );
88 int nentries =
fDecayer->event.size();
89 if ( !
fDecayer->event[nentries-1].mayDecay() )
continue;
91 int nentries1 =
fDecayer->event.size();
92 if ( nentries1 <= nentries )
continue;
96 Particle& py8daughter =
fDecayer->event[nentries];
97 HepMC::GenVertex* DecVtx =
new HepMC::GenVertex( HepMC::FourVector(py8daughter.xProd(),
100 py8daughter.tProd()) );
102 DecVtx->add_particle_in( part );
105 HepMC::FourVector pmom( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
111 daughter->suggest_barcode( NewBarcode );
112 DecVtx->add_particle_out( daughter );
114 for (
int ipart1=nentries+1; ipart1<nentries1; ipart1++ )
116 py8daughter =
fDecayer->event[ipart1];
117 HepMC::FourVector pmomN( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
121 daughterN->suggest_barcode( NewBarcode );
122 DecVtx->add_particle_out( daughterN );
125 event().get()->add_vertex( DecVtx );
156 <<
"----------------------" << std::endl;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::auto_ptr< Pythia8::Pythia > fMasterGen
void setFilterEfficiency(double effic)
bool initializeForInternalPartons()
void setInternalXSec(const XSec &xsec)
virtual bool residualDecay()
unsigned int pythiaPylistVerbosity
std::vector< int > fPartIDs
std::auto_ptr< HepMC::GenEvent > & event()
unsigned int maxEventsToPrint
std::auto_ptr< Pythia8::Pythia > fDecayer
bool pythiaHepMCVerbosity
void setExternalXSecNLO(const XSec &xsec)
GenRunInfoProduct & runInfo()
void setExternalXSecLO(const XSec &xsec)