|
|
Go to the documentation of this file.
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");
194 (static_cast<Exhume::Higgs*>(
exhumeProcess_))->SetHiggsDecay(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 declareSpecialSettings(const std::vector< std::string > &)
Exhume::Event * exhumeEvent_
bool initializeForExternalPartons()
ExhumeHadronizer(edm::ParameterSet const &ps)
bool generatePartonsAndHadronize()
unique_ptr< ClusterSequence > cs
static const std::string kFortranInstance
bool initializeForInternalPartons()
void setInternalXSec(const XSec &xsec)
void setRandomEngine(CLHEP::HepRandomEngine *v)
Log< level::Info, false > LogInfo
static const std::vector< std::string > theSharedResources
static FortranCallback * getInstance()
void SetMassRange(const double &Min_, const double &Max_)
unsigned int maxEventsToPrint_
void resetIterationsPerEvent()
Pythia6Service * pythia6Service_
unsigned int pythiaListVerbosity_
void call_pylist(int mode)
~ExhumeHadronizer() override
double CrossSectionCalculation()
void SetRandomEngine(CLHEP::HepRandomEngine *engine)
Exhume::CrossSection * exhumeProcess_
edm::ParameterSet myPSet_
std::unique_ptr< HepMC::GenEvent > & event()
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
static const std::string kPythia6
bool declareStableParticles(const std::vector< int > &)
T getParameter(std::string const &) const
CLHEP::HepRandomEngine * randomEngine_
GenRunInfoProduct & runInfo()
const char * classname() const
void pygive_(const char *, int)
bool call_pygive(const std::string &line)