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";
59 evtgenDecays->readDecayFile(evtgenUserFile.fullPath().c_str());
72 int NPartsBeforeDecays = pythiaEvent->size()-1;
76 int NPartsAfterDecays =
event().get()->particles_size();
78 if(NPartsAfterDecays == NPartsBeforeDecays)
return true;
82 for (
int ipart=NPartsAfterDecays; ipart>NPartsBeforeDecays; ipart-- )
87 if ( part->status() == 1 && (
fDecayer->particleData).canDecay(part->pdg_id()) )
90 Particle py8part( part->pdg_id(), 93, 0, 0, 0, 0, 0, 0,
95 part->generated_mass() );
96 HepMC::GenVertex* ProdVtx = part->production_vertex();
97 py8part.vProd( ProdVtx->position().x(), ProdVtx->position().y(),
98 ProdVtx->position().z(), ProdVtx->position().t() );
99 py8part.tau( (
fDecayer->particleData).tau0( part->pdg_id() ) );
101 int nentries =
fDecayer->event.size();
102 if ( !
fDecayer->event[nentries-1].mayDecay() )
continue;
104 int nentries1 =
fDecayer->event.size();
105 if ( nentries1 <= nentries )
continue;
138 <<
"----------------------" << std::endl;
144 <<
"----------------------" << std::endl;
T getParameter(std::string const &) const
std::auto_ptr< Pythia8::Pythia > fMasterGen
std::auto_ptr< EvtGenDecays > evtgenDecays
HepMC::IO_AsciiParticles * ascii_io
bool pythiaHepMCVerbosityParticles
bool initializeForInternalPartons()
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