10 #include "CLHEP/Random/RandomEngine.h" 12 #include <HepMC/GenCrossSection.h> 13 #include <HepMC/GenEvent.h> 14 #include <HepMC/GenVertex.h> 15 #include <HepMC/GenParticle.h> 16 #include <HepMC/HeavyIon.h> 17 #include <HepMC/PdfInfo.h> 18 #include <HepMC/Units.h> 61 ReggeGribovPartonMCHadronizer::ReggeGribovPartonMCHadronizer(
const ParameterSet &
pset) :
64 m_BeamMomentum(pset.getParameter<double>(
"beammomentum")),
65 m_TargetMomentum(pset.getParameter<double>(
"targetmomentum")),
66 m_BeamID(pset.getParameter<
int>(
"beamid")),
67 m_TargetID(pset.getParameter<
int>(
"targetid")),
68 m_HEModel(pset.getParameter<
int>(
"model")),
69 m_bMin(pset.getParameter<double>(
"bmin")),
70 m_bMax(pset.getParameter<double>(
"bmax")),
71 m_ParamFileName(pset.getUntrackedParameter<
string>(
"paramFileName")),
72 m_SkipNuclFrag(pset.getParameter<bool>(
"skipNuclFrag")),
75 m_ImpactParameter(0.),
76 m_IsInitialized(
false)
82 char dummyName[] =
"dummy";
117 LogDebug(
"ReggeGribovPartonMCInterface") <<
"event generated" << endl;
126 HepMC::GenEvent* evt = conv.read_next_event();
130 switch (
int(
c2evt_.typevt))
133 case 1: sig_id = 101;
break;
134 case -1: sig_id = 101;
break;
135 case 2: sig_id = 105;
break;
136 case -2: sig_id = 105;
break;
137 case 3: sig_id = 102;
break;
138 case -3: sig_id = 102;
break;
139 case 4: sig_id = 103;
break;
140 case -4: sig_id = 104;
break;
141 default:
LogDebug(
"ReggeGribovPartonMCInterface") <<
"Signal ID not recognised for setting HEPEVT" << endl;
143 evt->set_signal_process_id(sig_id);
145 #ifdef HEPMC_HAS_CROSS_SECTION 147 HepMC::GenCrossSection theCrossSection;
148 theCrossSection.set_cross_section(
double(
hadr5_.sigineaa)*1e9);
149 evt->set_cross_section(theCrossSection);
154 HepMC::HeavyIon ion(
cevt_.kohevt,
167 evt->set_heavy_ion(ion);
204 return "gen::ReggeGribovPartonMCHadronizer";
225 string path_fnii(
FileInPath(
"GeneratorInterface/ReggeGribovPartonMCInterface/data/epos.initl").fullPath());
226 string path_fnie(
FileInPath(
"GeneratorInterface/ReggeGribovPartonMCInterface/data/epos.iniev").fullPath());
227 string path_fnrj(
FileInPath(
"GeneratorInterface/ReggeGribovPartonMCInterface/data/epos.inirj").fullPath());
228 string path_fncs(
FileInPath(
"GeneratorInterface/ReggeGribovPartonMCInterface/data/epos.inics").fullPath());
230 if (path_fnii.length() >= 500)
LogError(
"ReggeGribovPartonMCInterface") <<
"table path too long" << endl;
231 else nfname_.nfnii = path_fnii.length();
232 if (path_fnie.length() >= 500)
LogError(
"ReggeGribovPartonMCInterface") <<
"table path too long" << endl;
233 else nfname_.nfnie = path_fnie.length();
234 if (path_fnrj.length() >= 500)
LogError(
"ReggeGribovPartonMCInterface") <<
"table path too long" << endl;
235 else nfname_.nfnrj = path_fnrj.length();
236 if (path_fncs.length() >= 500)
LogError(
"ReggeGribovPartonMCInterface") <<
"table path too long" << endl;
237 else nfname_.nfncs = path_fncs.length();
239 strcpy(
fname_.fnii, path_fnii.c_str());
240 strcpy(
fname_.fnie, path_fnie.c_str());
241 strcpy(
fname_.fnrj, path_fnrj.c_str());
242 strcpy(
fname_.fncs, path_fncs.c_str());
245 string path_fndat(
FileInPath(
"GeneratorInterface/ReggeGribovPartonMCInterface/data/qgsjet.dat").fullPath());
246 string path_fnncs(
FileInPath(
"GeneratorInterface/ReggeGribovPartonMCInterface/data/qgsjet.ncs").fullPath());
248 if (path_fndat.length() >= 500)
LogError(
"ReggeGribovPartonMCInterface") <<
"table path too long" << endl;
250 if (path_fnncs.length() >= 500)
LogError(
"ReggeGribovPartonMCInterface") <<
"table path too long" << endl;
253 strcpy(
qgsfname_.fndat, path_fndat.c_str());
254 strcpy(
qgsfname_.fnncs, path_fnncs.c_str());
260 string path_fniidat(
FileInPath(
"GeneratorInterface/ReggeGribovPartonMCInterface/data/qgsdat-II-04.lzma").fullPath());
261 string path_fniincs(
FileInPath(
"GeneratorInterface/ReggeGribovPartonMCInterface/data/sectnu-II-04").fullPath());
263 if (path_fniidat.length() >= 500)
LogError(
"ReggeGribovPartonMCInterface") <<
"table path too long" << endl;
265 if (path_fniincs.length() >= 500)
LogError(
"ReggeGribovPartonMCInterface") <<
"table path too long" << endl;
void set_skip_nuclear_fragments(bool b=true)
!!MODIFICATION
const char * classname() const
edm::FileInPath m_ParamFileName
virtual ~ReggeGribovPartonMCHadronizer()
double m_PartEnergy[99990]
void crmc_f_(int &, int &, int &, double &, int &, double &, double &, double &, double &, double &, int &)
std::auto_ptr< HepMC::GenEvent > & event()
bool declareStableParticles(const std::vector< int > &)
bool initializeForInternalPartons()
bool generatePartonsAndHadronize()
void set_trust_beam_particles(bool b=true)
virtual void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
static CLHEP::HepRandomEngine * reggeGribovRandomEngine
std::string fullPath() const
void crmc_set_f_(int &, int &, double &, double &, int &, int &, int &, int &, int &, const char *, const char *)
bool initializeTablePaths()