5 using namespace Pythia8;
46 fMasterGen->readString(
"ProcessLevel:all = off");
47 fMasterGen->readString(
"Standalone:allowResDec=on");
52 fDecayer->readString(
"ProcessLevel:all = off");
53 fDecayer->readString(
"Standalone:allowResDec=on");
66 int NPartsBeforeDecays = pythiaEvent->size()-1;
70 int NPartsAfterDecays =
event().get()->particles_size();
71 int NewBarcode = NPartsAfterDecays;
73 for (
int ipart=NPartsAfterDecays; ipart>NPartsBeforeDecays; ipart-- )
78 if ( part->status() == 1 )
81 Particle py8part( part->pdg_id(), 93, 0, 0, 0, 0, 0, 0,
86 part->generated_mass() );
87 HepMC::GenVertex* ProdVtx = part->production_vertex();
88 py8part.vProd( ProdVtx->position().x(), ProdVtx->position().y(),
89 ProdVtx->position().z(), ProdVtx->position().t() );
90 py8part.tau( (
fDecayer->particleData).tau0( part->pdg_id() ) );
92 int nentries =
fDecayer->event.size();
93 if ( !
fDecayer->event[nentries-1].mayDecay() )
continue;
95 int nentries1 =
fDecayer->event.size();
96 if ( nentries1 <= nentries )
continue;
100 Particle& py8daughter =
fDecayer->event[nentries];
101 HepMC::GenVertex* DecVtx =
new HepMC::GenVertex( HepMC::FourVector(py8daughter.xProd(),
104 py8daughter.tProd()) );
106 DecVtx->add_particle_in( part );
109 HepMC::FourVector pmom( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
115 daughter->suggest_barcode( NewBarcode );
116 DecVtx->add_particle_out( daughter );
118 for ( ipart=nentries+1; ipart<nentries1; ipart++ )
120 py8daughter =
fDecayer->event[ipart];
121 HepMC::FourVector pmomN( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
125 daughterN->suggest_barcode( NewBarcode );
126 DecVtx->add_particle_out( daughterN );
129 event().get()->add_vertex( DecVtx );
160 <<
"----------------------" << 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)