4 using namespace Pythia8;
47 fMasterGen->readString(
"ProcessLevel:all = off");
48 fMasterGen->readString(
"ProcessLevel::resonanceDecays=on");
52 fDecayer->readString(
"ProcessLevel:all = off");
53 fDecayer->readString(
"ProcessLevel::resonanceDecays=on");
65 int NPartsBeforeDecays = pythiaEvent->size()-1;
69 int NPartsAfterDecays =
event().get()->particles_size();
70 int NewBarcode = NPartsAfterDecays;
72 for (
int ipart=NPartsAfterDecays; ipart>NPartsBeforeDecays; ipart-- )
77 if ( part->status() == 1 )
80 Particle py8part( part->pdg_id(), 93, 0, 0, 0, 0, 0, 0,
85 part->generated_mass() );
86 HepMC::GenVertex* ProdVtx = part->production_vertex();
87 py8part.vProd( ProdVtx->position().x(), ProdVtx->position().y(),
88 ProdVtx->position().z(), ProdVtx->position().t() );
89 py8part.tau( (
fDecayer->particleData).tau0( part->pdg_id() ) );
91 int nentries =
fDecayer->event.size();
92 if ( !
fDecayer->event[nentries-1].mayDecay() )
continue;
94 int nentries1 =
fDecayer->event.size();
95 if ( nentries1 <= nentries )
continue;
99 Particle& py8daughter =
fDecayer->event[nentries];
100 HepMC::GenVertex* DecVtx =
new HepMC::GenVertex( HepMC::FourVector(py8daughter.xProd(),
103 py8daughter.tProd()) );
105 DecVtx->add_particle_in( part );
108 HepMC::FourVector pmom( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
114 daughter->suggest_barcode( NewBarcode );
115 DecVtx->add_particle_out( daughter );
117 for (
int ipart1=nentries+1; ipart1<nentries1; ipart1++ )
119 py8daughter =
fDecayer->event[ipart1];
120 HepMC::FourVector pmomN( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
124 daughterN->suggest_barcode( NewBarcode );
125 DecVtx->add_particle_out( daughterN );
128 event().get()->add_vertex( DecVtx );
159 <<
"----------------------" << 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()
static const std::vector< std::string > p8SharedResources
unsigned int pythiaPylistVerbosity
std::vector< int > fPartIDs
std::auto_ptr< HepMC::GenEvent > & event()
unsigned int maxEventsToPrint
std::auto_ptr< Pythia8::Pythia > fDecayer
bool pythiaHepMCVerbosity
static const std::string kPythia8
void setExternalXSecNLO(const XSec &xsec)
GenRunInfoProduct & runInfo()
void setExternalXSecLO(const XSec &xsec)