7 #include "Pythia8Plugins/EvtGen.h" 43 fMasterGen->readString(
"ProcessLevel:all = off");
44 fMasterGen->readString(
"ProcessLevel::resonanceDecays=on");
48 fDecayer->readString(
"ProcessLevel:all = off");
49 fDecayer->readString(
"ProcessLevel::resonanceDecays=on");
53 edm::LogInfo(
"Pythia8Interface") <<
"Creating and initializing pythia8 EvtGen plugin";
67 int NPartsBeforeDecays = pythiaEvent->size()-1;
71 int NPartsAfterDecays =
event().get()->particles_size();
73 if(NPartsAfterDecays == NPartsBeforeDecays)
return true;
77 for (
int ipart=NPartsAfterDecays; ipart>NPartsBeforeDecays; ipart-- )
82 if ( part->status() == 1 && (
fDecayer->particleData).canDecay(part->pdg_id()) )
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;
133 <<
"----------------------" << std::endl;
139 <<
"----------------------" << std::endl;
void finalizeEvent() override
T getParameter(std::string const &) const
std::auto_ptr< Pythia8::Pythia > fMasterGen
std::auto_ptr< EvtGenDecays > evtgenDecays
HepMC::IO_AsciiParticles * ascii_io
bool initializeForInternalPartons() override
void statistics() override
bool pythiaHepMCVerbosityParticles
void setInternalXSec(const XSec &xsec)
virtual bool residualDecay()
std::auto_ptr< HepMC::GenEvent > & event()
std::vector< std::string > evtgenUserFiles
GenRunInfoProduct & runInfo()
static const std::vector< std::string > p8SharedResources
unsigned int pythiaPylistVerbosity
std::vector< int > fPartIDs
std::string evtgenPdlFile
unsigned int maxEventsToPrint
std::auto_ptr< Pythia8::Pythia > fDecayer
bool pythiaHepMCVerbosity
std::string evtgenDecFile
HepMC::Pythia8ToHepMC toHepMC
static const std::string kPythia8