7 #include "Pythia8Plugins/EvtGen.h" 37 fMasterGen->readString(
"ProcessLevel:all = off");
38 fMasterGen->readString(
"ProcessLevel::resonanceDecays=on");
42 fDecayer->readString(
"ProcessLevel:all = off");
43 fDecayer->readString(
"ProcessLevel::resonanceDecays=on");
47 edm::LogInfo(
"Pythia8Interface") <<
"Creating and initializing pythia8 EvtGen plugin";
59 int NPartsBeforeDecays = pythiaEvent->size() - 1;
63 int NPartsAfterDecays =
event().get()->particles_size();
65 if (NPartsAfterDecays == NPartsBeforeDecays)
70 for (
int ipart = NPartsAfterDecays; ipart > NPartsBeforeDecays; ipart--) {
73 if (
part->status() == 1 && (
fDecayer->particleData).canDecay(
part->pdg_id())) {
87 part->generated_mass());
88 HepMC::GenVertex* ProdVtx =
part->production_vertex();
90 ProdVtx->position().x(), ProdVtx->position().y(), ProdVtx->position().z(), ProdVtx->position().t());
91 py8part.tau((
fDecayer->particleData).tau0(
part->pdg_id()));
93 int nentries =
fDecayer->event.size();
94 if (!
fDecayer->event[nentries - 1].mayDecay())
97 int nentries1 =
fDecayer->event.size();
98 if (nentries1 <= nentries)
122 <<
"----------------------" << std::endl;
127 <<
"----------------------" << std::endl;
void finalizeEvent() override
T getParameter(std::string const &) const
std::shared_ptr< Pythia8::EvtGenDecays > evtgenDecays
std::unique_ptr< Pythia8::Pythia > fDecayer
HepMC::IO_AsciiParticles * ascii_io
bool initializeForInternalPartons() override
void statistics() override
bool pythiaHepMCVerbosityParticles
void setInternalXSec(const XSec &xsec)
virtual bool residualDecay()
std::vector< std::string > evtgenUserFiles
GenRunInfoProduct & runInfo()
static const std::vector< std::string > p8SharedResources
unsigned int pythiaPylistVerbosity
std::unique_ptr< HepMC::GenEvent > & event()
std::vector< int > fPartIDs
Log< level::Info, false > LogInfo
std::string evtgenPdlFile
unsigned int maxEventsToPrint
bool pythiaHepMCVerbosity
std::string evtgenDecFile
HepMC::Pythia8ToHepMC toHepMC
std::unique_ptr< Pythia8::Pythia > fMasterGen
static const std::string kPythia8