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";
76 int NPartsBeforeDecays = pythiaEvent->size()-1;
80 int NPartsAfterDecays =
event().get()->particles_size();
82 if(NPartsAfterDecays == NPartsBeforeDecays)
return true;
86 for (
int ipart=NPartsAfterDecays; ipart>NPartsBeforeDecays; ipart-- )
91 if ( part->status() == 1 && (
fDecayer->particleData).canDecay(part->pdg_id()) )
94 Particle py8part( part->pdg_id(), 93, 0, 0, 0, 0, 0, 0,
99 part->generated_mass() );
100 HepMC::GenVertex* ProdVtx = part->production_vertex();
101 py8part.vProd( ProdVtx->position().x(), ProdVtx->position().y(),
102 ProdVtx->position().z(), ProdVtx->position().t() );
103 py8part.tau( (
fDecayer->particleData).tau0( part->pdg_id() ) );
105 int nentries =
fDecayer->event.size();
106 if ( !
fDecayer->event[nentries-1].mayDecay() )
continue;
108 int nentries1 =
fDecayer->event.size();
109 if ( nentries1 <= nentries )
continue;
142 <<
"----------------------" << std::endl;
148 <<
"----------------------" << 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()
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)