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" 38 #define pydat1 pydat1_ 46 #define pypars pypars_ 52 #define pyint1 pyint1_ 60 #define pylist pylist_ 61 #define pycomp pycomp_ 62 #define pygive pygive_ 67 int numWarn =
pydat1.mstu[26];
68 int numErr =
pydat1.mstu[22];
70 pygive(line.c_str(), line.length());
72 return (
pydat1.mstu[26] == numWarn)&&(
pydat1.mstu[22] == numErr);
82 comEnergy_(pset.getParameter<double>(
"comEnergy")),
84 hepMCVerbosity_(pset.getUntrackedParameter<
bool>(
"pythiaHepMCVerbosity",
false)),
85 maxEventsToPrint_(pset.getUntrackedParameter<
int>(
"maxEventsToPrint", 0)),
86 pythiaListVerbosity_(pset.getUntrackedParameter<
int>(
"pythiaPylistVerbosity", 0)),
91 if ( pset.
exists(
"doPDGConvert" ) )
123 pdf.set_id1(
pyint1.mint[14] == 21 ? 0 :
pyint1.mint[14] );
124 pdf.set_id2(
pyint1.mint[15] == 21 ? 0 :
pyint1.mint[15] );
125 pdf.set_x1(
pyint1.vint[40] );
126 pdf.set_x2(
pyint1.vint[41] );
129 pdf.set_scalePDF(
pyint1.vint[50] );
131 event()->set_pdf_info( pdf ) ;
137 for ( HepMC::GenEvent::particle_iterator
part =
event()->particles_begin();
139 (*part)->set_pdg_id(HepPID::translatePythiatoPDT((*part)->pdg_id()));
152 <<
"----------------------" << std::endl;
217 if(processType ==
"Higgs"){
219 int higgsDecay = processPSet.
getParameter<
int>(
"HiggsDecay");
221 sigID = 100 + higgsDecay;
222 }
else if(processType ==
"QQ"){
224 int quarkType = processPSet.
getParameter<
int>(
"QuarkType");
225 double thetaMin = processPSet.
getParameter<
double>(
"ThetaMin");
228 sigID = 200 + quarkType;
229 }
else if(processType ==
"GG"){
231 double thetaMin = processPSet.
getParameter<
double>(
"ThetaMin");
234 }
else if(processType ==
"DiPhoton"){
236 double thetaMin = processPSet.
getParameter<
double>(
"ThetaMin");
247 double massRangeLow = processPSet.
getParameter<
double>(
"MassRangeLow");
248 double massRangeHigh = processPSet.
getParameter<
double>(
"MassRangeHigh");
257 std::vector<int> pdg = _pdg;
260 for (
size_t i=0;
i < pdg.size();
i++ )
263 std::ostringstream pyCard ;
264 pyCard <<
"MDCY(" << pyCode <<
",1)=0";
280 std::ostringstream footer_str;
286 footer_str <<
"\n" <<
" You have just been ExHuMEd." <<
"\n" <<
"\n";
287 footer_str <<
" The cross section for process " << name
288 <<
" is " << cs <<
" fb" <<
"\n" <<
"\n";
289 footer_str <<
" The efficiency of event generation was " << eff <<
"%" <<
"\n" <<
"\n";
293 if ( !
runInfo().internalXSec() )
303 return "gen::ExhumeHadronizer";
bool initializeForExternalPartons()
T getParameter(std::string const &) const
bool generatePartonsAndHadronize()
auto_ptr< ClusterSequence > cs
Exhume::Event * exhumeEvent_
double CrossSectionCalculation()
ExhumeHadronizer(edm::ParameterSet const &ps)
bool call_pygive(const std::string &line)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
bool initializeForInternalPartons()
void setInternalXSec(const XSec &xsec)
void pygive_(const char *, int)
std::auto_ptr< HepMC::GenEvent > & event()
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)
Pythia6Service * pythia6Service_
const char * classname() const
static const std::string kFortranInstance
static FortranCallback * getInstance()
edm::ParameterSet myPSet_
bool declareStableParticles(const std::vector< int > &)
virtual void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
void setRandomEngine(CLHEP::HepRandomEngine *v)
void resetIterationsPerEvent()
Exhume::CrossSection * exhumeProcess_
CLHEP::HepRandomEngine * randomEngine_
bool declareSpecialSettings(const std::vector< std::string > &)