7 #include "Pythia8Plugins/EvtGen.h"
9 using namespace Pythia8;
51 fMasterGen->readString(
"ProcessLevel:all = off");
52 fMasterGen->readString(
"ProcessLevel::resonanceDecays=on");
56 fDecayer->readString(
"ProcessLevel:all = off");
57 fDecayer->readString(
"ProcessLevel::resonanceDecays=on");
61 edm::LogInfo(
"Pythia8Interface") <<
"Creating and initializing pythia8 EvtGen plugin";
67 evtgenDecays->readDecayFile(evtgenUserFile.fullPath().c_str());
80 int NPartsBeforeDecays = pythiaEvent->size()-1;
84 int NPartsAfterDecays =
event().get()->particles_size();
86 if(NPartsAfterDecays == NPartsBeforeDecays)
return true;
90 for (
int ipart=NPartsAfterDecays; ipart>NPartsBeforeDecays; ipart-- )
95 if ( part->status() == 1 && (
fDecayer->particleData).canDecay(part->pdg_id()) )
98 Particle py8part( part->pdg_id(), 93, 0, 0, 0, 0, 0, 0,
100 part->momentum().y(),
101 part->momentum().z(),
102 part->momentum().t(),
103 part->generated_mass() );
104 HepMC::GenVertex* ProdVtx = part->production_vertex();
105 py8part.vProd( ProdVtx->position().x(), ProdVtx->position().y(),
106 ProdVtx->position().z(), ProdVtx->position().t() );
107 py8part.tau( (
fDecayer->particleData).tau0( part->pdg_id() ) );
109 int nentries =
fDecayer->event.size();
110 if ( !
fDecayer->event[nentries-1].mayDecay() )
continue;
112 int nentries1 =
fDecayer->event.size();
113 if ( nentries1 <= nentries )
continue;
146 <<
"----------------------" << std::endl;
152 <<
"----------------------" << 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)
HepMC::IO_AsciiParticles * ascii_io
bool pythiaHepMCVerbosityParticles
bool initializeForInternalPartons()
void setInternalXSec(const XSec &xsec)
virtual bool residualDecay()
std::vector< std::string > evtgenUserFiles
EvtGenDecays * evtgenDecays
static const std::vector< std::string > p8SharedResources
unsigned int pythiaPylistVerbosity
std::vector< int > fPartIDs
std::auto_ptr< HepMC::GenEvent > & event()
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
void setExternalXSecNLO(const XSec &xsec)
GenRunInfoProduct & runInfo()
void setExternalXSecLO(const XSec &xsec)