16 #include "boost/lexical_cast.hpp"
31 #include "HepMC/PythiaWrapper6_4.h"
32 #include "HepMC/GenEvent.h"
33 #include "HepMC/HeavyIon.h"
34 #include "HepMC/SimpleVector.h"
46 int convertStatus(
int st) {
68 abeamtarget_(
pset.getParameter<double>(
"aBeamTarget")),
69 angularspecselector_(
pset.getParameter<
int>(
"angularSpectrumSelector")),
70 bfixed_(
pset.getParameter<double>(
"bFixed")),
71 bmax_(
pset.getParameter<double>(
"bMax")),
72 bmin_(
pset.getParameter<double>(
"bMin")),
73 cflag_(
pset.getParameter<
int>(
"cFlag")),
74 embedding_(
pset.getParameter<
bool>(
"embeddingMode")),
75 comenergy(
pset.getParameter<double>(
"comEnergy")),
76 doradiativeenloss_(
pset.getParameter<
bool>(
"doRadiativeEnLoss")),
77 docollisionalenloss_(
pset.getParameter<
bool>(
"doCollisionalEnLoss")),
78 fracsoftmult_(
pset.getParameter<double>(
"fracSoftMultiplicity")),
79 hadfreeztemp_(
pset.getParameter<double>(
"hadronFreezoutTemperature")),
80 hymode_(
pset.getParameter<
string>(
"hydjetMode")),
81 maxEventsToPrint_(
pset.getUntrackedParameter<
int>(
"maxEventsToPrint", 1)),
82 maxlongy_(
pset.getParameter<double>(
"maxLongitudinalRapidity")),
83 maxtrany_(
pset.getParameter<double>(
"maxTransverseRapidity")),
86 nmultiplicity_(
pset.getParameter<
int>(
"nMultiplicity")),
88 nquarkflavor_(
pset.getParameter<
int>(
"qgpNumQuarkFlavor")),
89 pythiaPylistVerbosity_(
pset.getUntrackedParameter<
int>(
"pythiaPylistVerbosity", 0)),
90 qgpt0_(
pset.getParameter<double>(
"qgpInitialTemperature")),
91 qgptau0_(
pset.getParameter<double>(
"qgpProperTimeFormation")),
95 rotate_(
pset.getParameter<
bool>(
"rotateEventPlane")),
96 shadowingswitch_(
pset.getParameter<
int>(
"shadowingSwitch")),
97 signn_(
pset.getParameter<double>(
"sigmaInelNN")),
128 int nproj = static_cast<int>(
npart / 2);
129 int ntarg = static_cast<int>(
npart - nproj);
131 HepMC::HeavyIon*
hi =
new HepMC::HeavyIon(
nsub_,
134 static_cast<int>(
hyfpar.nbcol),
146 evt->set_heavy_ion(*
hi);
168 p->suggest_barcode(barcode);
183 HepMC::GenVertex*
vertex =
new HepMC::GenVertex(HepMC::FourVector(x, y, z,
t),
id);
199 const HepMC::HeavyIon*
hi = inev->heavy_ion();
202 phi0_ =
hi->event_plane_angle();
206 LogWarning(
"EventEmbedding") <<
"Background event does not have heavy ion record!";
217 edm::LogInfo(
"HYDJETinTemp") <<
"##### HYDJET: QGP init temperature, T0 =" <<
pyqpar.T0u;
218 edm::LogInfo(
"HYDJETinTau") <<
"##### HYDJET: QGP formation time,tau0 =" <<
pyqpar.tau0u;
224 edm::LogError(
"HydjetEmptyEvent") <<
"##### HYDJET: No Particles generated, Number of tries =" << ntry;
229 std::ostringstream sstr;
230 sstr <<
"HydjetHadronizerProducer: No particles generated after " << ntry <<
" tries.\n";
251 evt->set_signal_process_id(
pypars.msti[0]);
274 vector<HepMC::GenVertex*> sub_vertices(
nsub_);
277 for (
int isub = 0; isub <
nsub_; isub++) {
278 LogDebug(
"SubEvent") <<
"Sub Event ID : " << isub;
280 int sub_up = (isub + 1) * 50000;
282 vector<int> mother_ids;
283 vector<HepMC::GenVertex*> prods;
285 sub_vertices[isub] =
new HepMC::GenVertex(HepMC::FourVector(0, 0, 0, 0), isub);
286 evt->add_vertex(sub_vertices[isub]);
287 if (!
evt->signal_process_vertex())
288 evt->set_signal_process_vertex(sub_vertices[isub]);
293 mother_ids.push_back(
hyjets.khj[2][ihy]);
294 LogDebug(
"DecayChain") <<
"Mother index : " <<
hyjets.khj[2][ihy];
309 int mid = mother_ids[
i] - isub * 50000 - 1;
310 LogDebug(
"DecayChain") <<
"Particle " <<
i;
311 LogDebug(
"DecayChain") <<
"Mother's ID " << mid;
312 LogDebug(
"DecayChain") <<
"Particle's PDG ID " <<
part->pdg_id();
315 sub_vertices[isub]->add_particle_out(
part);
321 LogDebug(
"DecayChain") <<
"Mother's PDG ID " << mother->pdg_id();
323 HepMC::GenVertex* prod_vertex = mother->end_vertex();
325 prod_vertex = prods[
i];
326 prod_vertex->add_particle_in(mother);
327 evt->add_vertex(prod_vertex);
330 prod_vertex->add_particle_out(
part);
334 for (
unsigned int i = 0;
i < prods.size();
i++) {
364 else if (
hymode_ ==
"kHydroJets")
366 else if (
hymode_ ==
"kHydroQJets")
368 else if (
hymode_ ==
"kJetsOnly")
370 else if (
hymode_ ==
"kQJetsOnly")
407 edm::LogInfo(
"HydjetEnLoss") <<
"##### Radiative AND Collisional partonic energy loss ON ####";
410 edm::LogInfo(
"HydjetenLoss") <<
"##### Only RADIATIVE partonic energy loss ON ####";
413 edm::LogInfo(
"HydjetEnLoss") <<
"##### Only COLLISIONAL partonic energy loss ON ####";
416 edm::LogInfo(
"HydjetEnLoss") <<
"##### Radiative AND Collisional partonic energy loss ON ####";
439 LogInfo(
"RAScaling") <<
"Nuclear radius(RA) = " << ra;
454 std::vector<int>
pdg = _pdg;
455 for (
size_t i = 0;
i <
pdg.size();
i++) {
457 std::ostringstream pyCard;
458 pyCard <<
"MDCY(" << pyCode <<
",1)=0";
467 const double pi = 3.14159265358979;