CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
gen::HydjetHadronizer Class Reference

#include <HydjetHadronizer.h>

Inheritance diagram for gen::HydjetHadronizer:
gen::BaseHadronizer

Public Member Functions

const char * classname () const
 
bool decay ()
 
bool declareSpecialSettings (const std::vector< std::string > &)
 
bool declareStableParticles (const std::vector< int > &)
 
void finalizeEvent ()
 
bool generatePartonsAndHadronize ()
 
bool hadronize ()
 
 HydjetHadronizer (const edm::ParameterSet &)
 
bool initializeForExternalPartons ()
 
bool initializeForInternalPartons ()
 
bool readSettings (int)
 
bool residualDecay ()
 
void statistics ()
 
 ~HydjetHadronizer () override
 
- Public Member Functions inherited from gen::BaseHadronizer
 BaseHadronizer (edm::ParameterSet const &ps)
 
void cleanLHE ()
 
void generateLHE (edm::LuminosityBlock const &lumi, CLHEP::HepRandomEngine *rengine, unsigned int ncpu)
 
edm::EventgetEDMEvent () const
 
std::unique_ptr< HepMC::GenEventgetGenEvent ()
 
std::unique_ptr< GenEventInfoProductgetGenEventInfo ()
 
virtual std::unique_ptr< GenLumiInfoHeadergetGenLumiInfoHeader () const
 
GenRunInfoProductgetGenRunInfo ()
 
std::unique_ptr< lhef::LHEEventgetLHEEvent ()
 
const std::shared_ptr< lhef::LHERunInfo > & getLHERunInfo () const
 
const std::string & gridpackPath () const
 
int randomIndex () const
 
const std::string & randomInitConfigDescription () const
 
void randomizeIndex (edm::LuminosityBlock const &lumi, CLHEP::HepRandomEngine *rengine)
 
void resetEvent (std::unique_ptr< HepMC::GenEvent > event)
 
void resetEventInfo (std::unique_ptr< GenEventInfoProduct > eventInfo)
 
virtual bool select (HepMC::GenEvent *) const
 
void setEDMEvent (edm::Event &event)
 
void setLHEEvent (std::unique_ptr< lhef::LHEEvent > event)
 
void setLHERunInfo (std::unique_ptr< lhef::LHERunInfo > runInfo)
 
void setRandomEngine (CLHEP::HepRandomEngine *v)
 
std::vector< std::string > const & sharedResources () const
 
virtual ~BaseHadronizer () noexcept(false)
 

Private Member Functions

void add_heavy_ion_rec (HepMC::GenEvent *evt)
 
HepMC::GenParticle * build_hyjet (int index, int barcode)
 
HepMC::GenVertex * build_hyjet_vertex (int i, int id)
 
bool call_hyinit (double energy, double a, int ifb, double bmin, double bmax, double bfix, int nh)
 
void doSetRandomEngine (CLHEP::HepRandomEngine *v) override
 
std::vector< std::string > const & doSharedResources () const override
 
bool get_particles (HepMC::GenEvent *evt)
 
bool hydjet_init (const edm::ParameterSet &pset)
 
double nuclear_radius () const
 
void rotateEvtPlane ()
 

Private Attributes

double abeamtarget_
 
int angularspecselector_
 
double bfixed_
 
double bmax_
 
double bmin_
 
int cflag_
 
double comenergy
 
double cosphi0_
 
bool docollisionalenloss_
 DEFAULT = true. More...
 
bool doradiativeenloss_
 
bool embedding_
 
HepMC::GenEventevt
 
double fracsoftmult_
 DEFAULT = true. More...
 
double hadfreeztemp_
 
std::string hymode_
 
unsigned int maxEventsToPrint_
 
double maxlongy_
 
double maxtrany_
 
int nhard_
 
int nmultiplicity_
 
unsigned int nquarkflavor_
 
int nsoft_
 
int nsub_
 
double phi0_
 
edm::ParameterSet pset_
 
Pythia6Servicepythia6Service_
 
unsigned int pythiaPylistVerbosity_
 
double qgpt0_
 
double qgptau0_
 
bool rotate_
 
unsigned int shadowingswitch_
 
double signn_
 
double sinphi0_
 
edm::InputTag src_
 

Static Private Attributes

static const std::vector< std::string > theSharedResources
 

Additional Inherited Members

- Protected Member Functions inherited from gen::BaseHadronizer
std::unique_ptr< HepMC::GenEvent > & event ()
 
std::unique_ptr< GenEventInfoProduct > & eventInfo ()
 
lhef::LHEEventlheEvent ()
 
lhef::LHERunInfolheRunInfo ()
 
GenRunInfoProductrunInfo ()
 
- Protected Attributes inherited from gen::BaseHadronizer
std::string lheFile_
 
int randomIndex_
 

Detailed Description

Definition at line 35 of file HydjetHadronizer.h.

Constructor & Destructor Documentation

◆ HydjetHadronizer()

HydjetHadronizer::HydjetHadronizer ( const edm::ParameterSet pset)

Definition at line 64 of file HydjetHadronizer.cc.

66  evt(nullptr),
67  pset_(pset),
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")),
84  nsub_(0),
85  nhard_(0),
86  nmultiplicity_(pset.getParameter<int>("nMultiplicity")),
87  nsoft_(0),
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")),
92  phi0_(0.),
93  sinphi0_(0.),
94  cosphi0_(1.),
95  rotate_(pset.getParameter<bool>("rotateEventPlane")),
96  shadowingswitch_(pset.getParameter<int>("shadowingSwitch")),
97  signn_(pset.getParameter<double>("sigmaInelNN")),
99  // Default constructor
100 
101  // PYLIST Verbosity Level
102  // Valid PYLIST arguments are: 1, 2, 3, 5, 7, 11, 12, 13
103  pythiaPylistVerbosity_ = pset.getUntrackedParameter<int>("pythiaPylistVerbosity", 0);
104  LogDebug("PYLISTverbosity") << "Pythia PYLIST verbosity level = " << pythiaPylistVerbosity_;
105 
106  //Max number of events printed on verbosity level
107  maxEventsToPrint_ = pset.getUntrackedParameter<int>("maxEventsToPrint", 0);
108  LogDebug("Events2Print") << "Number of events to be printed = " << maxEventsToPrint_;
109 
110  if (embedding_)
111  src_ = pset.getParameter<edm::InputTag>("backgroundLabel");
112 }

References embedding_, LogDebug, maxEventsToPrint_, muonDTDigis_cfi::pset, pythiaPylistVerbosity_, and src_.

◆ ~HydjetHadronizer()

HydjetHadronizer::~HydjetHadronizer ( )
override

Definition at line 115 of file HydjetHadronizer.cc.

115  {
116  // destructor
117  call_pystat(1);
118  delete pythia6Service_;
119 }

References pythia6Service_.

Member Function Documentation

◆ add_heavy_ion_rec()

void HydjetHadronizer::add_heavy_ion_rec ( HepMC::GenEvent evt)
private

Definition at line 125 of file HydjetHadronizer.cc.

125  {
126  // heavy ion record in the final CMSSW Event
127  double npart = hyfpar.npart;
128  int nproj = static_cast<int>(npart / 2);
129  int ntarg = static_cast<int>(npart - nproj);
130 
131  HepMC::HeavyIon* hi = new HepMC::HeavyIon(nsub_, // Ncoll_hard/N of SubEvents
132  nproj, // Npart_proj
133  ntarg, // Npart_targ
134  static_cast<int>(hyfpar.nbcol), // Ncoll
135  0, // spectator_neutrons
136  0, // spectator_protons
137  0, // N_Nwounded_collisions
138  0, // Nwounded_N_collisions
139  0, // Nwounded_Nwounded_collisions
140  hyfpar.bgen * nuclear_radius(), // impact_parameter in [fm]
141  phi0_, // event_plane_angle
142  0, //hypsi3.psi3, // eccentricity
143  hyjpar.sigin // sigma_inel_NN
144  );
145 
146  evt->set_heavy_ion(*hi);
147  delete hi;
148 }

References evt, hyfpar, hyjpar, npart, nsub_, nuclear_radius(), and phi0_.

Referenced by generatePartonsAndHadronize().

◆ build_hyjet()

HepMC::GenParticle * HydjetHadronizer::build_hyjet ( int  index,
int  barcode 
)
private

Definition at line 151 of file HydjetHadronizer.cc.

151  {
152  // Build particle object corresponding to index in hyjets (soft+hard)
153 
154  double x0 = hyjets.phj[0][index];
155  double y0 = hyjets.phj[1][index];
156 
157  double x = x0 * cosphi0_ - y0 * sinphi0_;
158  double y = y0 * cosphi0_ + x0 * sinphi0_;
159 
160  HepMC::GenParticle* p = new HepMC::GenParticle(HepMC::FourVector(x, // px
161  y, // py
162  hyjets.phj[2][index], // pz
163  hyjets.phj[3][index]), // E
164  hyjets.khj[1][index], // id
165  convertStatus(hyjets.khj[0][index] // status
166  ));
167 
168  p->suggest_barcode(barcode);
169  return p;
170 }

References cosphi0_, GenParticle::GenParticle, hyjets, gen::p, and sinphi0_.

Referenced by get_particles().

◆ build_hyjet_vertex()

HepMC::GenVertex * HydjetHadronizer::build_hyjet_vertex ( int  i,
int  id 
)
private

Definition at line 173 of file HydjetHadronizer.cc.

173  {
174  // build verteces for the hyjets stored events
175 
176  double x0 = hyjets.vhj[0][i];
177  double y0 = hyjets.vhj[1][i];
178  double x = x0 * cosphi0_ - y0 * sinphi0_;
179  double y = y0 * cosphi0_ + x0 * sinphi0_;
180  double z = hyjets.vhj[2][i];
181  double t = hyjets.vhj[4][i];
182 
183  HepMC::GenVertex* vertex = new HepMC::GenVertex(HepMC::FourVector(x, y, z, t), id);
184  return vertex;
185 }

References cosphi0_, hyjets, mps_fire::i, sinphi0_, OrderedSet::t, and bphysicsOniaDQM_cfi::vertex.

Referenced by get_particles().

◆ call_hyinit()

bool HydjetHadronizer::call_hyinit ( double  energy,
double  a,
int  ifb,
double  bmin,
double  bmax,
double  bfix,
int  nh 
)
private

Definition at line 343 of file HydjetHadronizer.cc.

343  {
344  // initialize hydjet
345 
346  pydatr.mrpy[2] = 1;
347  HYINIT(energy, a, ifb, bmin, bmax, bfix, nh);
348  return true;
349 }

References a, ReggeGribovPartonMC_AdvancedParameters_cfi::bmax, ReggeGribovPartonMC_AdvancedParameters_cfi::bmin, HCALHighEnergyHPDFilter_cfi::energy, HYINIT, and cms::cuda::nh.

Referenced by initializeForInternalPartons().

◆ classname()

const char * HydjetHadronizer::classname ( ) const

Definition at line 484 of file HydjetHadronizer.cc.

484 { return "gen::HydjetHadronizer"; }

◆ decay()

bool HydjetHadronizer::decay ( )

Definition at line 476 of file HydjetHadronizer.cc.

476 { return true; }

◆ declareSpecialSettings()

bool gen::HydjetHadronizer::declareSpecialSettings ( const std::vector< std::string > &  )
inline

Definition at line 48 of file HydjetHadronizer.h.

48 { return true; }

◆ declareStableParticles()

bool HydjetHadronizer::declareStableParticles ( const std::vector< int > &  _pdg)

Definition at line 453 of file HydjetHadronizer.cc.

453  {
454  std::vector<int> pdg = _pdg;
455  for (size_t i = 0; i < pdg.size(); i++) {
456  int pyCode = pycomp_(pdg[i]);
457  std::ostringstream pyCard;
458  pyCard << "MDCY(" << pyCode << ",1)=0";
459  std::cout << pyCard.str() << std::endl;
460  call_pygive(pyCard.str());
461  }
462  return true;
463 }

References gen::call_pygive(), gather_cfg::cout, mps_fire::i, and gen::pycomp_().

◆ doSetRandomEngine()

void HydjetHadronizer::doSetRandomEngine ( CLHEP::HepRandomEngine *  v)
overrideprivatevirtual

Reimplemented from gen::BaseHadronizer.

Definition at line 122 of file HydjetHadronizer.cc.

References pythia6Service_, gen::Pythia6Service::setRandomEngine(), and gen::v.

◆ doSharedResources()

std::vector<std::string> const& gen::HydjetHadronizer::doSharedResources ( ) const
inlineoverrideprivatevirtual

Reimplemented from gen::BaseHadronizer.

Definition at line 56 of file HydjetHadronizer.h.

56 { return theSharedResources; }

References theSharedResources.

◆ finalizeEvent()

void HydjetHadronizer::finalizeEvent ( )

Definition at line 480 of file HydjetHadronizer.cc.

480 {}

◆ generatePartonsAndHadronize()

bool HydjetHadronizer::generatePartonsAndHadronize ( )

Definition at line 189 of file HydjetHadronizer.cc.

189  {
190  Pythia6Service::InstanceWrapper guard(pythia6Service_);
191 
192  // generate single event
193  if (embedding_) {
194  cflag_ = 0;
195  const edm::Event& e = getEDMEvent();
197  e.getByLabel(src_, input);
198  const HepMC::GenEvent* inev = input->GetEvent();
199  const HepMC::HeavyIon* hi = inev->heavy_ion();
200  if (hi) {
201  bfixed_ = hi->impact_parameter();
202  phi0_ = hi->event_plane_angle();
203  sinphi0_ = sin(phi0_);
204  cosphi0_ = cos(phi0_);
205  } else {
206  LogWarning("EventEmbedding") << "Background event does not have heavy ion record!";
207  }
208  } else if (rotate_)
209  rotateEvtPlane();
210 
211  nsoft_ = 0;
212  nhard_ = 0;
213 
214  edm::LogInfo("HYDJETmode") << "##### HYDJET nhsel = " << hyjpar.nhsel;
215  edm::LogInfo("HYDJETfpart") << "##### HYDJET fpart = " << hyflow.fpart;
216  edm::LogInfo("HYDJETtf") << "##### HYDJET hadron freez-out temp, Tf = " << hyflow.Tf;
217  edm::LogInfo("HYDJETinTemp") << "##### HYDJET: QGP init temperature, T0 =" << pyqpar.T0u;
218  edm::LogInfo("HYDJETinTau") << "##### HYDJET: QGP formation time,tau0 =" << pyqpar.tau0u;
219 
220  // generate a HYDJET event
221  int ntry = 0;
222  while (nsoft_ == 0 && nhard_ == 0) {
223  if (ntry > 100) {
224  edm::LogError("HydjetEmptyEvent") << "##### HYDJET: No Particles generated, Number of tries =" << ntry;
225 
226  // Throw an exception. Use the EventCorruption exception since it maps onto SkipEvent
227  // which is what we want to do here.
228 
229  std::ostringstream sstr;
230  sstr << "HydjetHadronizerProducer: No particles generated after " << ntry << " tries.\n";
231  edm::Exception except(edm::errors::EventCorruption, sstr.str());
232  throw except;
233  } else {
234  HYEVNT();
235  nsoft_ = hyfpar.nhyd;
236  nsub_ = hyjpar.njet;
237  nhard_ = hyfpar.npyt;
238  ++ntry;
239  }
240  }
241 
242  if (hyjpar.nhsel < 3)
243  nsub_++;
244 
245  // event information
247 
248  if (nhard_ > 0 || nsoft_ > 0)
250 
251  evt->set_signal_process_id(pypars.msti[0]); // type of the process
252  evt->set_event_scale(pypars.pari[16]); // Q^2
254 
255  event().reset(evt);
256  return true;
257 }

References add_heavy_ion_rec(), bfixed_, cflag_, funct::cos(), cosphi0_, MillePedeFileConverter_cfg::e, embedding_, gen::BaseHadronizer::event(), edm::errors::EventCorruption, evt, get_particles(), gen::BaseHadronizer::getEDMEvent(), HYEVNT, hyflow, hyfpar, hyjpar, input, nhard_, nsoft_, nsub_, phi0_, pypars, pyqpar, pythia6Service_, rotate_, rotateEvtPlane(), funct::sin(), sinphi0_, and src_.

◆ get_particles()

bool HydjetHadronizer::get_particles ( HepMC::GenEvent evt)
private

Definition at line 260 of file HydjetHadronizer.cc.

260  {
261  // Hard particles. The first nhard_ lines from hyjets array.
262  // Pythia/Pyquen sub-events (sub-collisions) for a given event
263  // Return T/F if success/failure
264  // Create particles from lujet entries, assign them into vertices and
265  // put the vertices in the GenEvent, for each SubEvent
266  // The SubEvent information is kept by storing indeces of main vertices
267  // of subevents as a vector in GenHIEvent.
268 
269  LogDebug("SubEvent") << "Number of sub events " << nsub_;
270  LogDebug("Hydjet") << "Number of hard events " << hyjpar.njet;
271  LogDebug("Hydjet") << "Number of hard particles " << nhard_;
272  LogDebug("Hydjet") << "Number of soft particles " << nsoft_;
273 
274  vector<HepMC::GenVertex*> sub_vertices(nsub_);
275 
276  int ihy = 0;
277  for (int isub = 0; isub < nsub_; isub++) {
278  LogDebug("SubEvent") << "Sub Event ID : " << isub;
279 
280  int sub_up = (isub + 1) * 50000; // Upper limit in mother index, determining the range of Sub-Event
281  vector<HepMC::GenParticle*> particles;
282  vector<int> mother_ids;
283  vector<HepMC::GenVertex*> prods;
284 
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]);
289 
290  while (ihy < nhard_ + nsoft_ && (hyjets.khj[2][ihy] < sub_up || ihy > nhard_)) {
291  particles.push_back(build_hyjet(ihy, ihy + 1));
292  prods.push_back(build_hyjet_vertex(ihy, isub));
293  mother_ids.push_back(hyjets.khj[2][ihy]);
294  LogDebug("DecayChain") << "Mother index : " << hyjets.khj[2][ihy];
295 
296  ihy++;
297  }
298 
299  //Produce Vertices and add them to the GenEvent. Remember that GenParticles are adopted by
300  //GenVertex and GenVertex is adopted by GenEvent.
301 
302  LogDebug("Hydjet") << "Number of particles in vector " << particles.size();
303 
304  for (unsigned int i = 0; i < particles.size(); i++) {
306 
307  //The Fortran code is modified to preserve mother id info, by seperating the beginning
308  //mother indices of successive subevents by 5000
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();
313 
314  if (mid <= 0) {
315  sub_vertices[isub]->add_particle_out(part);
316  continue;
317  }
318 
319  if (mid > 0) {
320  HepMC::GenParticle* mother = particles[mid];
321  LogDebug("DecayChain") << "Mother's PDG ID " << mother->pdg_id();
322 
323  HepMC::GenVertex* prod_vertex = mother->end_vertex();
324  if (!prod_vertex) {
325  prod_vertex = prods[i];
326  prod_vertex->add_particle_in(mother);
327  evt->add_vertex(prod_vertex);
328  prods[i] = nullptr; // mark to protect deletion
329  }
330  prod_vertex->add_particle_out(part);
331  }
332  }
333  // cleanup vertices not assigned to evt
334  for (unsigned int i = 0; i < prods.size(); i++) {
335  if (prods[i])
336  delete prods[i];
337  }
338  }
339  return true;
340 }

References build_hyjet(), build_hyjet_vertex(), evt, GenParticle::GenParticle, hyjets, hyjpar, mps_fire::i, LogDebug, nhard_, nsoft_, nsub_, and ecalTrigSettings_cff::particles.

Referenced by generatePartonsAndHadronize().

◆ hadronize()

bool HydjetHadronizer::hadronize ( )

Definition at line 474 of file HydjetHadronizer.cc.

474 { return false; }

◆ hydjet_init()

bool HydjetHadronizer::hydjet_init ( const edm::ParameterSet pset)
private

Definition at line 352 of file HydjetHadronizer.cc.

352  {
353  // set hydjet options
354 
355  // hydjet running mode mode
356  // kHydroOnly --- nhsel=0 jet production off (pure HYDRO event), nhsel=0
357  // kHydroJets --- nhsle=1 jet production on, jet quenching off (HYDRO+njet*PYTHIA events)
358  // kHydroQJet --- nhsel=2 jet production & jet quenching on (HYDRO+njet*PYQUEN events)
359  // kJetsOnly --- nhsel=3 jet production on, jet quenching off, HYDRO off (njet*PYTHIA events)
360  // kQJetsOnly --- nhsel=4 jet production & jet quenching on, HYDRO off (njet*PYQUEN events)
361 
362  if (hymode_ == "kHydroOnly")
363  hyjpar.nhsel = 0;
364  else if (hymode_ == "kHydroJets")
365  hyjpar.nhsel = 1;
366  else if (hymode_ == "kHydroQJets")
367  hyjpar.nhsel = 2;
368  else if (hymode_ == "kJetsOnly")
369  hyjpar.nhsel = 3;
370  else if (hymode_ == "kQJetsOnly")
371  hyjpar.nhsel = 4;
372  else
373  hyjpar.nhsel = 2;
374 
375  // fraction of soft hydro induced multiplicity
376  hyflow.fpart = fracsoftmult_;
377 
378  // hadron freez-out temperature
379  hyflow.Tf = hadfreeztemp_;
380 
381  // maximum longitudinal collective rapidity
382  hyflow.ylfl = maxlongy_;
383 
384  // maximum transverse collective rapidity
385  hyflow.ytfl = maxtrany_;
386 
387  // shadowing on=1, off=0
388  hyjpar.ishad = shadowingswitch_;
389 
390  // set inelastic nucleon-nucleon cross section
391  hyjpar.sigin = signn_;
392 
393  // angular emitted gluon spectrum selection
394  pyqpar.ianglu = angularspecselector_;
395 
396  // number of active quark flavors in qgp
397  pyqpar.nfu = nquarkflavor_;
398 
399  // initial temperature of QGP
400  pyqpar.T0u = qgpt0_;
401 
402  // proper time of QGP formation
403  pyqpar.tau0u = qgptau0_;
404 
405  // type of medium induced partonic energy loss
407  edm::LogInfo("HydjetEnLoss") << "##### Radiative AND Collisional partonic energy loss ON ####";
408  pyqpar.ienglu = 0;
409  } else if (doradiativeenloss_) {
410  edm::LogInfo("HydjetenLoss") << "##### Only RADIATIVE partonic energy loss ON ####";
411  pyqpar.ienglu = 1;
412  } else if (docollisionalenloss_) {
413  edm::LogInfo("HydjetEnLoss") << "##### Only COLLISIONAL partonic energy loss ON ####";
414  pyqpar.ienglu = 2;
415  } else {
416  edm::LogInfo("HydjetEnLoss") << "##### Radiative AND Collisional partonic energy loss ON ####";
417  pyqpar.ienglu = 0;
418  }
419  return true;
420 }

References angularspecselector_, docollisionalenloss_, doradiativeenloss_, fracsoftmult_, hadfreeztemp_, hyflow, hyjpar, hymode_, maxlongy_, maxtrany_, nquarkflavor_, pyqpar, qgpt0_, qgptau0_, shadowingswitch_, and signn_.

Referenced by initializeForInternalPartons().

◆ initializeForExternalPartons()

bool gen::HydjetHadronizer::initializeForExternalPartons ( )

◆ initializeForInternalPartons()

bool HydjetHadronizer::initializeForInternalPartons ( )

Definition at line 433 of file HydjetHadronizer.cc.

433  {
434  Pythia6Service::InstanceWrapper guard(pythia6Service_);
435  // pythia6Service_->setGeneralParams();
436 
437  // the input impact parameter (bxx_) is in [fm]; transform in [fm/RA] for hydjet usage
438  const float ra = nuclear_radius();
439  LogInfo("RAScaling") << "Nuclear radius(RA) = " << ra;
440  bmin_ /= ra;
441  bmax_ /= ra;
442  bfixed_ /= ra;
443 
444  // hydjet running options
446  // initialize hydjet
447  LogInfo("HYDJETinAction") << "##### Calling HYINIT(" << comenergy << "," << abeamtarget_ << "," << cflag_ << ","
448  << bmin_ << "," << bmax_ << "," << bfixed_ << "," << nmultiplicity_ << ") ####";
450  return true;
451 }

References abeamtarget_, bfixed_, bmax_, bmin_, call_hyinit(), cflag_, comenergy, hydjet_init(), nmultiplicity_, nuclear_radius(), pset_, and pythia6Service_.

◆ nuclear_radius()

double HydjetHadronizer::nuclear_radius ( ) const
inlineprivate

Definition at line 128 of file HydjetHadronizer.h.

128  {
129  // Return the nuclear radius derived from the
130  // beam/target atomic mass number.
131 
132  return 1.15 * pow((double)abeamtarget_, 1. / 3.);
133  }

References abeamtarget_, and funct::pow().

Referenced by add_heavy_ion_rec(), and initializeForInternalPartons().

◆ readSettings()

bool HydjetHadronizer::readSettings ( int  )

Definition at line 424 of file HydjetHadronizer.cc.

424  {
425  Pythia6Service::InstanceWrapper guard(pythia6Service_);
427 
428  return true;
429 }

References pythia6Service_, and gen::Pythia6Service::setGeneralParams().

◆ residualDecay()

bool HydjetHadronizer::residualDecay ( )

Definition at line 478 of file HydjetHadronizer.cc.

478 { return true; }

◆ rotateEvtPlane()

void HydjetHadronizer::rotateEvtPlane ( )
private

Definition at line 466 of file HydjetHadronizer.cc.

466  {
467  const double pi = 3.14159265358979;
468  phi0_ = 2. * pi * gen::pyr_(nullptr) - pi;
469  sinphi0_ = sin(phi0_);
470  cosphi0_ = cos(phi0_);
471 }

References funct::cos(), cosphi0_, phi0_, pi, gen::pyr_(), funct::sin(), and sinphi0_.

Referenced by generatePartonsAndHadronize().

◆ statistics()

void HydjetHadronizer::statistics ( )

Definition at line 482 of file HydjetHadronizer.cc.

482 {}

Member Data Documentation

◆ abeamtarget_

double gen::HydjetHadronizer::abeamtarget_
private

Definition at line 71 of file HydjetHadronizer.h.

Referenced by initializeForInternalPartons(), and nuclear_radius().

◆ angularspecselector_

int gen::HydjetHadronizer::angularspecselector_
private

Definition at line 72 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ bfixed_

double gen::HydjetHadronizer::bfixed_
private

Definition at line 73 of file HydjetHadronizer.h.

Referenced by generatePartonsAndHadronize(), and initializeForInternalPartons().

◆ bmax_

double gen::HydjetHadronizer::bmax_
private

Definition at line 74 of file HydjetHadronizer.h.

Referenced by initializeForInternalPartons().

◆ bmin_

double gen::HydjetHadronizer::bmin_
private

Definition at line 76 of file HydjetHadronizer.h.

Referenced by initializeForInternalPartons().

◆ cflag_

int gen::HydjetHadronizer::cflag_
private

Definition at line 78 of file HydjetHadronizer.h.

Referenced by generatePartonsAndHadronize(), and initializeForInternalPartons().

◆ comenergy

double gen::HydjetHadronizer::comenergy
private

Definition at line 82 of file HydjetHadronizer.h.

Referenced by initializeForInternalPartons().

◆ cosphi0_

double gen::HydjetHadronizer::cosphi0_
private

◆ docollisionalenloss_

bool gen::HydjetHadronizer::docollisionalenloss_
private

DEFAULT = true.

Definition at line 84 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ doradiativeenloss_

bool gen::HydjetHadronizer::doradiativeenloss_
private

Definition at line 83 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ embedding_

bool gen::HydjetHadronizer::embedding_
private

Definition at line 81 of file HydjetHadronizer.h.

Referenced by generatePartonsAndHadronize(), and HydjetHadronizer().

◆ evt

HepMC::GenEvent* gen::HydjetHadronizer::evt
private

◆ fracsoftmult_

double gen::HydjetHadronizer::fracsoftmult_
private

DEFAULT = true.

Definition at line 85 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ hadfreeztemp_

double gen::HydjetHadronizer::hadfreeztemp_
private

Definition at line 91 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ hymode_

std::string gen::HydjetHadronizer::hymode_
private

Definition at line 93 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ maxEventsToPrint_

unsigned int gen::HydjetHadronizer::maxEventsToPrint_
private

Definition at line 94 of file HydjetHadronizer.h.

Referenced by HydjetHadronizer().

◆ maxlongy_

double gen::HydjetHadronizer::maxlongy_
private

Definition at line 95 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ maxtrany_

double gen::HydjetHadronizer::maxtrany_
private

Definition at line 98 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ nhard_

int gen::HydjetHadronizer::nhard_
private

Definition at line 102 of file HydjetHadronizer.h.

Referenced by generatePartonsAndHadronize(), and get_particles().

◆ nmultiplicity_

int gen::HydjetHadronizer::nmultiplicity_
private

Definition at line 103 of file HydjetHadronizer.h.

Referenced by initializeForInternalPartons().

◆ nquarkflavor_

unsigned int gen::HydjetHadronizer::nquarkflavor_
private

Definition at line 106 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ nsoft_

int gen::HydjetHadronizer::nsoft_
private

Definition at line 105 of file HydjetHadronizer.h.

Referenced by generatePartonsAndHadronize(), and get_particles().

◆ nsub_

int gen::HydjetHadronizer::nsub_
private

◆ phi0_

double gen::HydjetHadronizer::phi0_
private

◆ pset_

edm::ParameterSet gen::HydjetHadronizer::pset_
private

Definition at line 70 of file HydjetHadronizer.h.

Referenced by initializeForInternalPartons().

◆ pythia6Service_

Pythia6Service* gen::HydjetHadronizer::pythia6Service_
private

◆ pythiaPylistVerbosity_

unsigned int gen::HydjetHadronizer::pythiaPylistVerbosity_
private

number of active quark flavors in qgp DEFAULT=0; allowed values: 0,1,2,3.

Definition at line 108 of file HydjetHadronizer.h.

Referenced by HydjetHadronizer().

◆ qgpt0_

double gen::HydjetHadronizer::qgpt0_
private

Definition at line 109 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ qgptau0_

double gen::HydjetHadronizer::qgptau0_
private

Definition at line 111 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ rotate_

bool gen::HydjetHadronizer::rotate_
private

Definition at line 117 of file HydjetHadronizer.h.

Referenced by generatePartonsAndHadronize().

◆ shadowingswitch_

unsigned int gen::HydjetHadronizer::shadowingswitch_
private

Definition at line 119 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ signn_

double gen::HydjetHadronizer::signn_
private

Definition at line 121 of file HydjetHadronizer.h.

Referenced by hydjet_init().

◆ sinphi0_

double gen::HydjetHadronizer::sinphi0_
private

◆ src_

edm::InputTag gen::HydjetHadronizer::src_
private

Definition at line 125 of file HydjetHadronizer.h.

Referenced by generatePartonsAndHadronize(), and HydjetHadronizer().

◆ theSharedResources

const std::vector< std::string > HydjetHadronizer::theSharedResources
staticprivate
gen::HydjetHadronizer::get_particles
bool get_particles(HepMC::GenEvent *evt)
Definition: HydjetHadronizer.cc:260
DDAxes::y
gen::HydjetHadronizer::cflag_
int cflag_
Definition: HydjetHadronizer.h:78
mps_fire.i
i
Definition: mps_fire.py:355
input
static const std::string input
Definition: EdmProvDump.cc:48
gen::HydjetHadronizer::add_heavy_ion_rec
void add_heavy_ion_rec(HepMC::GenEvent *evt)
Definition: HydjetHadronizer.cc:125
ReggeGribovPartonMC_AdvancedParameters_cfi.bmin
bmin
Definition: ReggeGribovPartonMC_AdvancedParameters_cfi.py:4
gen::HydjetHadronizer::hadfreeztemp_
double hadfreeztemp_
Definition: HydjetHadronizer.h:91
gen::HydjetHadronizer::rotate_
bool rotate_
Definition: HydjetHadronizer.h:117
gen::HydjetHadronizer::evt
HepMC::GenEvent * evt
Definition: HydjetHadronizer.h:69
gen::HydjetHadronizer::bmin_
double bmin_
Definition: HydjetHadronizer.h:76
gen::pycomp_
int pycomp_(int &)
gen::pyr_
double pyr_(int *idummy)
Definition: Pythia6Service.cc:60
gather_cfg.cout
cout
Definition: gather_cfg.py:144
hyfpar
#define hyfpar
Definition: HydjetWrapper.h:51
gen::HydjetHadronizer::src_
edm::InputTag src_
Definition: HydjetHadronizer.h:125
edm::errors::EventCorruption
Definition: EDMException.h:43
edm::LogInfo
Definition: MessageLogger.h:254
pypars
#define pypars
Definition: ExhumeHadronizer.cc:45
gen::FortranInstance::kFortranInstance
static const std::string kFortranInstance
Definition: FortranInstance.h:88
gen::HydjetHadronizer::qgpt0_
double qgpt0_
Definition: HydjetHadronizer.h:109
HYINIT
#define HYINIT
Definition: HydjetWrapper.h:18
DDAxes::x
gen::Pythia6Service::setRandomEngine
void setRandomEngine(CLHEP::HepRandomEngine *v)
Definition: Pythia6Service.h:46
edm::Handle
Definition: AssociativeIterator.h:50
ecalTrigSettings_cff.particles
particles
Definition: ecalTrigSettings_cff.py:11
npart
double npart
Definition: HydjetWrapper.h:46
gen::Pythia6Service::setGeneralParams
void setGeneralParams()
Definition: Pythia6Service.cc:157
gen::HydjetHadronizer::sinphi0_
double sinphi0_
Definition: HydjetHadronizer.h:115
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
gen::HydjetHadronizer::nuclear_radius
double nuclear_radius() const
Definition: HydjetHadronizer.h:128
edm::Exception
Definition: EDMException.h:77
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
gen::HydjetHadronizer::nsoft_
int nsoft_
Definition: HydjetHadronizer.h:105
gen::HydjetHadronizer::comenergy
double comenergy
Definition: HydjetHadronizer.h:82
gen::HydjetHadronizer::hydjet_init
bool hydjet_init(const edm::ParameterSet &pset)
Definition: HydjetHadronizer.cc:352
gen::HydjetHadronizer::embedding_
bool embedding_
Definition: HydjetHadronizer.h:81
part
part
Definition: HCALResponse.h:20
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
gen::p
double p[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:74
gen::HydjetHadronizer::maxEventsToPrint_
unsigned int maxEventsToPrint_
Definition: HydjetHadronizer.h:94
cms::cuda::nh
uint32_t nh
Definition: HistoContainer.h:23
DDAxes::z
gen::HydjetHadronizer::build_hyjet
HepMC::GenParticle * build_hyjet(int index, int barcode)
Definition: HydjetHadronizer.cc:151
gen::BaseHadronizer::getEDMEvent
edm::Event & getEDMEvent() const
Definition: BaseHadronizer.h:69
gen::HydjetHadronizer::qgptau0_
double qgptau0_
Definition: HydjetHadronizer.h:111
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
OrderedSet.t
t
Definition: OrderedSet.py:90
edm::LogWarning
Definition: MessageLogger.h:141
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::LogError
Definition: MessageLogger.h:183
a
double a
Definition: hdecay.h:119
gen::HydjetHadronizer::pythia6Service_
Pythia6Service * pythia6Service_
Definition: HydjetHadronizer.h:124
hyjets
#define hyjets
Definition: HydjetWrapper.h:80
gen::HydjetHadronizer::bmax_
double bmax_
Definition: HydjetHadronizer.h:74
gen::HydjetHadronizer::call_hyinit
bool call_hyinit(double energy, double a, int ifb, double bmin, double bmax, double bfix, int nh)
Definition: HydjetHadronizer.cc:343
ReggeGribovPartonMC_AdvancedParameters_cfi.bmax
bmax
Definition: ReggeGribovPartonMC_AdvancedParameters_cfi.py:5
gen::HydjetHadronizer::pythiaPylistVerbosity_
unsigned int pythiaPylistVerbosity_
Definition: HydjetHadronizer.h:108
gen::HydjetHadronizer::signn_
double signn_
Definition: HydjetHadronizer.h:121
gen::HydjetHadronizer::cosphi0_
double cosphi0_
Definition: HydjetHadronizer.h:116
gen::HydjetHadronizer::fracsoftmult_
double fracsoftmult_
DEFAULT = true.
Definition: HydjetHadronizer.h:85
gen::v
double v[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:74
gen::HydjetHadronizer::hymode_
std::string hymode_
Definition: HydjetHadronizer.h:93
hyflow
#define hyflow
Definition: HydjetWrapper.h:40
gen::HydjetHadronizer::doradiativeenloss_
bool doradiativeenloss_
Definition: HydjetHadronizer.h:83
hi
Definition: HiEvtPlaneList.h:38
gen::HydjetHadronizer::build_hyjet_vertex
HepMC::GenVertex * build_hyjet_vertex(int i, int id)
Definition: HydjetHadronizer.cc:173
gen::HydjetHadronizer::maxtrany_
double maxtrany_
Definition: HydjetHadronizer.h:98
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
gen::BaseHadronizer::event
std::unique_ptr< HepMC::GenEvent > & event()
Definition: BaseHadronizer.h:86
gen::HydjetHadronizer::nsub_
int nsub_
Definition: HydjetHadronizer.h:101
hyjpar
#define hyjpar
Definition: HydjetWrapper.h:93
gen::HydjetHadronizer::pset_
edm::ParameterSet pset_
Definition: HydjetHadronizer.h:70
gen::BaseHadronizer::BaseHadronizer
BaseHadronizer(edm::ParameterSet const &ps)
Definition: BaseHadronizer.cc:12
gen::HydjetHadronizer::nhard_
int nhard_
Definition: HydjetHadronizer.h:102
gen::HydjetHadronizer::rotateEvtPlane
void rotateEvtPlane()
Definition: HydjetHadronizer.cc:466
gen::HydjetHadronizer::theSharedResources
static const std::vector< std::string > theSharedResources
Definition: HydjetHadronizer.h:58
edm::SharedResourceNames::kPythia6
static const std::string kPythia6
Definition: SharedResourceNames.h:26
gen::HydjetHadronizer::phi0_
double phi0_
Definition: HydjetHadronizer.h:114
gen::HydjetHadronizer::maxlongy_
double maxlongy_
Definition: HydjetHadronizer.h:95
pyqpar
#define pyqpar
Definition: HydjetWrapper.h:112
pdg
Definition: pdg_functions.h:28
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
HYEVNT
#define HYEVNT
Definition: HydjetWrapper.h:25
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
pi
const Double_t pi
Definition: trackSplitPlot.h:36
gen::Pythia6Service
Definition: Pythia6Service.h:24
gen::HydjetHadronizer::nquarkflavor_
unsigned int nquarkflavor_
Definition: HydjetHadronizer.h:106
gen::HydjetHadronizer::abeamtarget_
double abeamtarget_
Definition: HydjetHadronizer.h:71
gen::HydjetHadronizer::docollisionalenloss_
bool docollisionalenloss_
DEFAULT = true.
Definition: HydjetHadronizer.h:84
edm::Event
Definition: Event.h:73
gen::HydjetHadronizer::angularspecselector_
int angularspecselector_
Definition: HydjetHadronizer.h:72
gen::HydjetHadronizer::nmultiplicity_
int nmultiplicity_
Definition: HydjetHadronizer.h:103
gen::call_pygive
bool call_pygive(const std::string &line)
Definition: ExhumeHadronizer.cc:64
edm::InputTag
Definition: InputTag.h:15
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
gen::HydjetHadronizer::bfixed_
double bfixed_
Definition: HydjetHadronizer.h:73
gen::HydjetHadronizer::shadowingswitch_
unsigned int shadowingswitch_
Definition: HydjetHadronizer.h:119
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37