7 using namespace Pythia8;
50 fMasterGen->readString(
"ProcessLevel:all = off");
51 fMasterGen->readString(
"Standalone:allowResDec=on");
56 fDecayer->readString(
"ProcessLevel:all = off");
57 fDecayer->readString(
"Standalone:allowResDec=on");
70 int NPartsBeforeDecays = pythiaEvent->size()-1;
74 int NPartsAfterDecays =
event().get()->particles_size();
75 int NewBarcode = NPartsAfterDecays;
77 for (
int ipart=NPartsAfterDecays; ipart>NPartsBeforeDecays; ipart-- )
82 if ( part->status() == 1 )
85 Particle py8part( part->pdg_id(), 93, 0, 0, 0, 0, 0, 0,
90 part->generated_mass() );
91 HepMC::GenVertex* ProdVtx = part->production_vertex();
92 py8part.vProd( ProdVtx->position().x(), ProdVtx->position().y(),
93 ProdVtx->position().z(), ProdVtx->position().t() );
94 py8part.tau( (
fDecayer->particleData).tau0( part->pdg_id() ) );
96 int nentries =
fDecayer->event.size();
97 if ( !
fDecayer->event[nentries-1].mayDecay() )
continue;
99 int nentries1 =
fDecayer->event.size();
100 if ( nentries1 <= nentries )
continue;
104 Particle& py8daughter =
fDecayer->event[nentries];
105 HepMC::GenVertex* DecVtx =
new HepMC::GenVertex( HepMC::FourVector(py8daughter.xProd(),
108 py8daughter.tProd()) );
110 DecVtx->add_particle_in( part );
113 HepMC::FourVector pmom( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
119 daughter->suggest_barcode( NewBarcode );
120 DecVtx->add_particle_out( daughter );
122 for ( ipart=nentries+1; ipart<nentries1; ipart++ )
124 py8daughter =
fDecayer->event[ipart];
125 HepMC::FourVector pmomN( py8daughter.px(), py8daughter.py(), py8daughter.pz(), py8daughter.e() );
129 daughterN->suggest_barcode( NewBarcode );
130 DecVtx->add_particle_out( daughterN );
133 event().get()->add_vertex( DecVtx );
164 <<
"----------------------" << 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)