3 using namespace Pythia8;
44 fMasterGen->readString(
"ProcessLevel:all = off");
45 fMasterGen->readString(
"Standalone:allowResDec=on");
50 fDecayer->readString(
"ProcessLevel:all = off");
51 fDecayer->readString(
"Standalone:allowResDec=on");
64 int NPartsBeforeDecays = pythiaEvent->size()-1;
68 int NPartsAfterDecays =
event().get()->particles_size();
69 int NewBarcode = NPartsAfterDecays;
71 for (
int ipart=NPartsAfterDecays; ipart>NPartsBeforeDecays; ipart-- )
76 if ( part->status() == 1 )
79 Particle py8part( part->pdg_id(), 93, 0, 0, 0, 0, 0, 0,
84 part->generated_mass() );
85 HepMC::GenVertex* ProdVtx = part->production_vertex();
86 py8part.vProd( ProdVtx->position().x(), ProdVtx->position().y(),
87 ProdVtx->position().z(), ProdVtx->position().t() );
88 py8part.tau( (
fDecayer->particleData).tau0( part->pdg_id() ) );
90 int nentries =
fDecayer->event.size();
91 if ( !
fDecayer->event[nentries-1].mayDecay() )
continue;
93 int nentries1 =
fDecayer->event.size();
94 if ( nentries1 <= nentries )
continue;
98 Particle& py8daughter =
fDecayer->event[nentries];
99 HepMC::GenVertex* DecVtx =
new HepMC::GenVertex( HepMC::FourVector(py8daughter.xProd(),
102 py8daughter.tProd()) );
104 DecVtx->add_particle_in( part );
107 HepMC::FourVector pmom( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
113 daughter->suggest_barcode( NewBarcode );
114 DecVtx->add_particle_out( daughter );
116 for (
int ipart1=nentries+1; ipart1<nentries1; ipart1++ )
118 py8daughter =
fDecayer->event[ipart1];
119 HepMC::FourVector pmomN( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
123 daughterN->suggest_barcode( NewBarcode );
124 DecVtx->add_particle_out( daughterN );
127 event().get()->add_vertex( DecVtx );
158 <<
"----------------------" << 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)