10 #include "HepPID/ParticleIDTranslations.hh" 12 #include "HepMC/GenEvent.h" 13 #include "HepMC/PdfInfo.h" 14 #include "HepMC/HEPEVT_Wrapper.h" 15 #include "HepMC/IO_HEPEVT.h" 37 #define pydat1 pydat1_ 45 #define pypars pypars_ 51 #define pyint1 pyint1_ 59 #define pylist pylist_ 60 #define pycomp pycomp_ 61 #define pygive pygive_ 65 int numWarn =
pydat1.mstu[26];
66 int numErr =
pydat1.mstu[22];
70 return (
pydat1.mstu[26] == numWarn) && (
pydat1.mstu[22] == numErr);
79 randomEngine_(nullptr),
80 comEnergy_(
pset.getParameter<double>(
"comEnergy")),
82 hepMCVerbosity_(
pset.getUntrackedParameter<
bool>(
"pythiaHepMCVerbosity",
false)),
83 maxEventsToPrint_(
pset.getUntrackedParameter<
int>(
"maxEventsToPrint", 0)),
84 pythiaListVerbosity_(
pset.getUntrackedParameter<
int>(
"pythiaPylistVerbosity", 0)),
85 exhumeEvent_(nullptr) {
87 if (
pset.exists(
"doPDGConvert")) {
116 pdf.set_id1(
pyint1.mint[14] == 21 ? 0 :
pyint1.mint[14]);
117 pdf.set_id2(
pyint1.mint[15] == 21 ? 0 :
pyint1.mint[15]);
118 pdf.set_x1(
pyint1.vint[40]);
119 pdf.set_x2(
pyint1.vint[41]);
122 pdf.set_scalePDF(
pyint1.vint[50]);
124 event()->set_pdf_info(pdf);
130 for (HepMC::GenEvent::particle_iterator
part =
event()->particles_begin();
part !=
event()->particles_end();
132 (*part)->set_pdg_id(HepPID::translatePythiatoPDT((*part)->pdg_id()));
143 std::cout <<
"Event process = " <<
pypars.msti[0] << std::endl <<
"----------------------" << std::endl;
191 if (processType ==
"Higgs") {
193 int higgsDecay = processPSet.
getParameter<
int>(
"HiggsDecay");
195 sigID = 100 + higgsDecay;
196 }
else if (processType ==
"QQ") {
198 int quarkType = processPSet.
getParameter<
int>(
"QuarkType");
202 sigID = 200 + quarkType;
203 }
else if (processType ==
"GG") {
208 }
else if (processType ==
"DiPhoton") {
221 double massRangeLow = processPSet.
getParameter<
double>(
"MassRangeLow");
222 double massRangeHigh = processPSet.
getParameter<
double>(
"MassRangeHigh");
230 std::vector<int>
pdg = _pdg;
233 for (
size_t i = 0;
i <
pdg.size();
i++) {
235 std::ostringstream pyCard;
236 pyCard <<
"MDCY(" << pyCode <<
",1)=0";
247 std::ostringstream footer_str;
254 <<
" You have just been ExHuMEd." 257 footer_str <<
" The cross section for process " <<
name <<
" is " <<
cs <<
" fb" 260 footer_str <<
" The efficiency of event generation was " << eff <<
"%" 266 if (!
runInfo().internalXSec()) {
bool initializeForExternalPartons()
T getParameter(std::string const &) const
HepMC::IO_HEPEVT exhume_conv
bool generatePartonsAndHadronize()
Exhume::Event * exhumeEvent_
double CrossSectionCalculation()
ExhumeHadronizer(edm::ParameterSet const &ps)
bool call_pygive(const std::string &line)
bool initializeForInternalPartons()
void setInternalXSec(const XSec &xsec)
void pygive_(const char *, int)
unsigned int maxEventsToPrint_
static const std::vector< std::string > theSharedResources
static const std::string kPythia6
GenRunInfoProduct & runInfo()
void call_pylist(int mode)
void SetMassRange(const double &Min_, const double &Max_)
unsigned int pythiaListVerbosity_
void SetRandomEngine(CLHEP::HepRandomEngine *engine)
std::unique_ptr< HepMC::GenEvent > & event()
~ExhumeHadronizer() override
Pythia6Service * pythia6Service_
Log< level::Info, false > LogInfo
static const std::string kFortranInstance
static FortranCallback * getInstance()
edm::ParameterSet myPSet_
bool declareStableParticles(const std::vector< int > &)
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
void setRandomEngine(CLHEP::HepRandomEngine *v)
void resetIterationsPerEvent()
Exhume::CrossSection * exhumeProcess_
CLHEP::HepRandomEngine * randomEngine_
const char * classname() const
bool declareSpecialSettings(const std::vector< std::string > &)