CMS 3D CMS Logo

Hydjet2Hadronizer.cc
Go to the documentation of this file.
1 /*
2 
3 ##########################
4 # Hydjet2 #
5 # version: 2.2.0 patch1 #
6 ##########################
7 
8  Interface to the HYDJET++ generator, produces HepMC events
9 
10  Author: Andrey Belyaev (Andrey.Belyaev@cern.ch)
11 
12  Hydjet2Hadronizer is the modified InitialStateHydjet
13 
14  HYDJET++
15  version 2.2:
16  InitialStateHydjet is the modified InitialStateBjorken
17  The high-pt part related with PYTHIA-PYQUEN is included
18  InitialStateBjorken (FASTMC) was used.
19 
20 
21  InitialStateBjorken
22  version 2.0:
23  Ludmila Malinina malinina@lav01.sinp.msu.ru, SINP MSU/Moscow and JINR/Dubna
24  Ionut Arsene i.c.arsene@fys.uio.no, Oslo University
25  June 2007
26 
27  version 1.0:
28  Nikolai Amelin, Ludmila Malinina, Timur Pocheptsov (C) JINR/Dubna
29  amelin@sunhe.jinr.ru, malinina@sunhe.jinr.ru, pocheptsov@sunhe.jinr.ru
30  November. 2, 2005
31 */
32 
33 //expanding localy equilibated fireball with volume hadron radiation
34 //thermal part: Blast wave model, Bjorken-like parametrization
35 //high-pt: PYTHIA + jet quenching model PYQUEN
36 
37 #include <TLorentzVector.h>
38 #include <TVector3.h>
39 #include <TMath.h>
40 
51 
52 #include <iostream>
53 #include <fstream>
54 #include <cmath>
55 #include "boost/lexical_cast.hpp"
56 
63 
66 
67 #include "HepMC/PythiaWrapper6_4.h"
68 #include "HepMC/GenEvent.h"
69 #include "HepMC/HeavyIon.h"
70 #include "HepMC/SimpleVector.h"
71 
76 
78 
79 CLHEP::HepRandomEngine* hjRandomEngine;
80 
81 extern "C" void hyevnt_();
82 extern "C" void myini_();
83 
84 extern HYIPARCommon HYIPAR;
85 extern HYFPARCommon HYFPAR;
86 extern HYJPARCommon HYJPAR;
87 extern HYPARTCommon HYPART;
88 
89 using namespace edm;
90 using namespace std;
91 using namespace gen;
92 
94 
95 // definition of the static member fLastIndex
97 bool ev = false;
98 namespace {
99  int convertStatusForComponents(int sta, int typ) {
100  if (sta == 1 && typ == 0)
101  return 6;
102  if (sta == 1 && typ == 1)
103  return 7;
104  if (sta == 2 && typ == 0)
105  return 16;
106  if (sta == 2 && typ == 1)
107  return 17;
108 
109  else
110  return sta;
111  }
112 
113  int convertStatus(int st) {
114  if (st <= 0)
115  return 0;
116  if (st <= 10)
117  return 1;
118  if (st <= 20)
119  return 2;
120  if (st <= 30)
121  return 3;
122 
123  else
124  return st;
125  }
126 } // namespace
127 
128 const std::vector<std::string> Hydjet2Hadronizer::theSharedResources = {edm::SharedResourceNames::kPythia6,
130 
131 //____________________________________________________________________________________________
132 Hydjet2Hadronizer::Hydjet2Hadronizer(const edm::ParameterSet& pset)
133  : BaseHadronizer(pset),
134  fSqrtS(pset.getParameter<double>("fSqrtS")), // C.m.s. energy per nucleon pair
135  fAw(pset.getParameter<double>("fAw")), // Atomic weigth of nuclei, fAw
136  fIfb(pset.getParameter<int>(
137  "fIfb")), // Flag of type of centrality generation, fBfix (=0 is fixed by fBfix, >0 distributed [fBfmin, fBmax])
138  fBmin(pset.getParameter<double>("fBmin")), // Minimum impact parameter in units of nuclear radius, fBmin
139  fBmax(pset.getParameter<double>("fBmax")), // Maximum impact parameter in units of nuclear radius, fBmax
140  fBfix(pset.getParameter<double>("fBfix")), // Fixed impact parameter in units of nuclear radius, fBfix
141  fT(pset.getParameter<double>("fT")), // Temperature at chemical freeze-out, fT [GeV]
142  fMuB(pset.getParameter<double>("fMuB")), // Chemical baryon potential per unit charge, fMuB [GeV]
143  fMuS(pset.getParameter<double>("fMuS")), // Chemical strangeness potential per unit charge, fMuS [GeV]
144  fMuC(pset.getParameter<double>(
145  "fMuC")), // Chemical charm potential per unit charge, fMuC [GeV] (used if charm production is turned on)
146  fMuI3(pset.getParameter<double>("fMuI3")), // Chemical isospin potential per unit charge, fMuI3 [GeV]
147  fThFO(pset.getParameter<double>("fThFO")), // Temperature at thermal freeze-out, fThFO [GeV]
148  fMu_th_pip(pset.getParameter<double>(
149  "fMu_th_pip")), // Chemical potential of pi+ at thermal freeze-out, fMu_th_pip [GeV]
150  fTau(pset.getParameter<double>(
151  "fTau")), // Proper time proper at thermal freeze-out for central collisions, fTau [fm/c]
152  fSigmaTau(pset.getParameter<double>(
153  "fSigmaTau")), // Duration of emission at thermal freeze-out for central collisions, fSigmaTau [fm/c]
154  fR(pset.getParameter<double>(
155  "fR")), // Maximal transverse radius at thermal freeze-out for central collisions, fR [fm]
156  fYlmax(pset.getParameter<double>("fYlmax")), // Maximal longitudinal flow rapidity at thermal freeze-out, fYlmax
157  fUmax(pset.getParameter<double>(
158  "fUmax")), // Maximal transverse flow rapidity at thermal freeze-out for central collisions, fUmax
159  fDelta(pset.getParameter<double>(
160  "fDelta")), // Momentum azimuthal anizotropy parameter at thermal freeze-out, fDelta
161  fEpsilon(pset.getParameter<double>(
162  "fEpsilon")), // Spatial azimuthal anisotropy parameter at thermal freeze-out, fEpsilon
163  fIfDeltaEpsilon(pset.getParameter<double>(
164  "fIfDeltaEpsilon")), // Flag to specify fDelta and fEpsilon values, fIfDeltaEpsilon (=0 user's ones, >=1 calculated)
165  fDecay(pset.getParameter<int>(
166  "fDecay")), // Flag to switch on/off hadron decays, fDecay (=0 decays off, >=1 decays on)
167  fWeakDecay(pset.getParameter<double>(
168  "fWeakDecay")), // Low decay width threshold fWeakDecay[GeV]: width<fWeakDecay decay off, width>=fDecayWidth decay on; can be used to switch off weak decays
169  fEtaType(pset.getParameter<double>(
170  "fEtaType")), // Flag to choose longitudinal flow rapidity distribution, fEtaType (=0 uniform, >0 Gaussian with the dispersion Ylmax)
171  fTMuType(pset.getParameter<double>(
172  "fTMuType")), // Flag to use calculated T_ch, mu_B and mu_S as a function of fSqrtS, fTMuType (=0 user's ones, >0 calculated)
173  fCorrS(pset.getParameter<double>(
174  "fCorrS")), // Strangeness supression factor gamma_s with fCorrS value (0<fCorrS <=1, if fCorrS <= 0 then it is calculated)
175  fCharmProd(pset.getParameter<int>(
176  "fCharmProd")), // Flag to include thermal charm production, fCharmProd (=0 no charm production, >=1 charm production)
177  fCorrC(pset.getParameter<double>(
178  "fCorrC")), // Charmness enhancement factor gamma_c with fCorrC value (fCorrC >0, if fCorrC<0 then it is calculated)
179  fNhsel(pset.getParameter<int>(
180  "fNhsel")), //Flag to include jet (J)/jet quenching (JQ) and hydro (H) state production, fNhsel (0 H on & J off, 1 H/J on & JQ off, 2 H/J/HQ on, 3 J on & H/JQ off, 4 H off & J/JQ on)
181  fPyhist(pset.getParameter<int>(
182  "fPyhist")), // Flag to suppress the output of particle history from PYTHIA, fPyhist (=1 only final state particles; =0 full particle history from PYTHIA)
183  fIshad(pset.getParameter<int>(
184  "fIshad")), // Flag to switch on/off nuclear shadowing, fIshad (0 shadowing off, 1 shadowing on)
185  fPtmin(pset.getParameter<double>(
186  "fPtmin")), // Minimal pt of parton-parton scattering in PYTHIA event, fPtmin [GeV/c]
187  fT0(pset.getParameter<double>(
188  "fT0")), // Initial QGP temperature for central Pb+Pb collisions in mid-rapidity, fT0 [GeV]
189  fTau0(pset.getParameter<double>("fTau0")), // Proper QGP formation time in fm/c, fTau0 (0.01<fTau0<10)
190  fNf(pset.getParameter<int>("fNf")), // Number of active quark flavours in QGP, fNf (0, 1, 2 or 3)
191  fIenglu(pset.getParameter<int>(
192  "fIenglu")), // Flag to fix type of partonic energy loss, fIenglu (0 radiative and collisional loss, 1 radiative loss only, 2 collisional loss only)
193  fIanglu(pset.getParameter<int>(
194  "fIanglu")), // Flag to fix type of angular distribution of in-medium emitted gluons, fIanglu (0 small-angular, 1 wide-angular, 2 collinear).
195 
196  embedding_(pset.getParameter<bool>("embeddingMode")),
197  rotate_(pset.getParameter<bool>("rotateEventPlane")),
198  evt(nullptr),
199  nsub_(0),
200  nhard_(0),
201  nsoft_(0),
202  phi0_(0.),
203  sinphi0_(0.),
204  cosphi0_(1.),
205  pythia6Service_(new Pythia6Service(pset))
206 
207 {
208  // constructor
209  // PYLIST Verbosity Level
210  // Valid PYLIST arguments are: 1, 2, 3, 5, 7, 11, 12, 13
211  pythiaPylistVerbosity_ = pset.getUntrackedParameter<int>("pythiaPylistVerbosity", 0);
212  LogDebug("PYLISTverbosity") << "Pythia PYLIST verbosity level = " << pythiaPylistVerbosity_;
213  //Max number of events printed on verbosity level
214  maxEventsToPrint_ = pset.getUntrackedParameter<int>("maxEventsToPrint", 0);
215  LogDebug("Events2Print") << "Number of events to be printed = " << maxEventsToPrint_;
216  if (embedding_)
217  src_ = pset.getParameter<edm::InputTag>("backgroundLabel");
218 }
219 
220 //__________________________________________________________________________________________
222  // destructor
223  call_pystat(1);
224  delete pythia6Service_;
225 }
226 
227 //_____________________________________________________________________
228 void Hydjet2Hadronizer::doSetRandomEngine(CLHEP::HepRandomEngine* v) {
230  hjRandomEngine = v;
231 }
232 
233 //______________________________________________________________________________________________________
237 
238  SERVICE.iseed_fromC = hjRandomEngine->CLHEP::HepRandomEngine::getSeed();
239  LogInfo("Hydjet2Hadronizer|GenSeed") << "Seed for random number generation: "
240  << hjRandomEngine->CLHEP::HepRandomEngine::getSeed();
241 
242  fNPartTypes = 0; //counter of hadron species
243 
244  return kTRUE;
245 }
246 
247 //______________________________________________________________________________________________________
250 
251  // the input impact parameter (bxx_) is in [fm]; transform in [fm/RA] for hydjet usage
252  const float ra = nuclear_radius();
253  LogInfo("Hydjet2Hadronizer|RAScaling") << "Nuclear radius(RA) = " << ra;
254  fBmin /= ra;
255  fBmax /= ra;
256  fBfix /= ra;
257 
258  //check and redefine input parameters
259  if (fTMuType > 0 && fSqrtS > 2.24) {
260  if (fSqrtS < 2.24) {
261  LogError("Hydjet2Hadronizer|sqrtS") << "SqrtS<2.24 not allowed with fTMuType>0";
262  return false;
263  }
264 
265  //sqrt(s) = 2.24 ==> T_kin = 0.8 GeV
266  //see J. Cleymans, H. Oeschler, K. Redlich,S. Wheaton, Phys Rev. C73 034905 (2006)
267  fMuB = 1.308 / (1. + fSqrtS * 0.273);
268  fT = 0.166 - 0.139 * fMuB * fMuB - 0.053 * fMuB * fMuB * fMuB * fMuB;
269  fMuI3 = 0.;
270  fMuS = 0.;
271 
272  //create strange potential object and set strangeness density 0
274  psp->SetBaryonPotential(fMuB);
275  psp->SetTemperature(fT);
276 
277  //compute strangeness potential
278  if (fMuB > 0.01)
280  LogInfo("Hydjet2Hadronizer|Strange") << "fMuS = " << fMuS;
281 
282  //if user choose fYlmax larger then allowed by kinematics at the specified beam energy sqrt(s)
283  if (fYlmax > TMath::Log(fSqrtS / 0.94)) {
284  LogError("Hydjet2Hadronizer|Ylmax") << "fYlmax more then TMath::Log(fSqrtS vs 0.94)!!! ";
285  return false;
286  }
287 
288  if (fCorrS <= 0.) {
289  //see F. Becattini, J. Mannien, M. Gazdzicki, Phys Rev. C73 044905 (2006)
290  fCorrS = 1. - 0.386 * TMath::Exp(-1.23 * fT / fMuB);
291  LogInfo("Hydjet2Hadronizer|Strange")
292  << "The phenomenological f-la F. Becattini et al. PRC73 044905 (2006) for CorrS was used." << endl
293  << "Strangeness suppression parameter = " << fCorrS;
294  }
295  LogInfo("Hydjet2Hadronizer|Strange")
296  << "The phenomenological f-la J. Cleymans et al. PRC73 034905 (2006) for Tch mu_B was used." << endl
297  << "The simulation will be done with the calculated parameters:" << endl
298  << "Baryon chemical potential = " << fMuB << " [GeV]" << endl
299  << "Strangeness chemical potential = " << fMuS << " [GeV]" << endl
300  << "Isospin chemical potential = " << fMuI3 << " [GeV]" << endl
301  << "Strangeness suppression parameter = " << fCorrS << endl
302  << "Eta_max = " << fYlmax;
303  }
304 
305  LogInfo("Hydjet2Hadronizer|Param") << "Used eta_max = " << fYlmax << endl
306  << "maximal allowed eta_max TMath::Log(fSqrtS/0.94)= "
307  << TMath::Log(fSqrtS / 0.94);
308 
309  //initialisation of high-pt part
310  HYJPAR.nhsel = fNhsel;
311  HYJPAR.ptmin = fPtmin;
312  HYJPAR.ishad = fIshad;
313  HYJPAR.iPyhist = fPyhist;
314  HYIPAR.bminh = fBmin;
315  HYIPAR.bmaxh = fBmax;
316  HYIPAR.AW = fAw;
317 
318  HYPYIN.ifb = fIfb;
319  HYPYIN.bfix = fBfix;
320  HYPYIN.ene = fSqrtS;
321 
322  PYQPAR.T0 = fT0;
323  PYQPAR.tau0 = fTau0;
324  PYQPAR.nf = fNf;
325  PYQPAR.ienglu = fIenglu;
326  PYQPAR.ianglu = fIanglu;
327  myini_();
328 
329  // calculation of multiplicities of different particle species
330  // according to the grand canonical approach
331  GrandCanonical gc(15, fT, fMuB, fMuS, fMuI3, fMuC);
332  GrandCanonical gc_ch(15, fT, fMuB, fMuS, fMuI3, fMuC);
333  GrandCanonical gc_pi_th(15, fThFO, 0., 0., fMu_th_pip, fMuC);
334  GrandCanonical gc_th_0(15, fThFO, 0., 0., 0., 0.);
335 
336  // std::ofstream outMult("densities.txt");
337  // outMult<<"encoding particle density chemical potential "<<std::endl;
338 
339  double Nocth = 0; //open charm
340  double NJPsith = 0; //JPsi
341 
342  //effective volume for central
343  double dYl = 2 * fYlmax; //uniform distr. [-Ylmax; Ylmax]
344  if (fEtaType > 0)
345  dYl = TMath::Sqrt(2 * TMath::Pi()) * fYlmax; //Gaussian distr.
346  fVolEff = 2 * TMath::Pi() * fTau * dYl * (fR * fR) / TMath::Power((fUmax), 2) *
347  ((fUmax)*TMath::SinH((fUmax)) - TMath::CosH((fUmax)) + 1);
348  LogInfo("Hydjet2Hadronizer|Param") << "central Effective volume = " << fVolEff << " [fm^3]";
349 
350  double particleDensity_pi_ch = 0;
351  double particleDensity_pi_th = 0;
352  // double particleDensity_th_0=0;
353 
354  if (fThFO != fT && fThFO > 0) {
355  GrandCanonical gc_ch(15, fT, fMuB, fMuS, fMuI3, fMuC);
356  GrandCanonical gc_pi_th(15, fThFO, 0., 0., fMu_th_pip, fMuC);
357  GrandCanonical gc_th_0(15, fThFO, 0., 0., 0., 0.);
358  particleDensity_pi_ch = gc_ch.ParticleNumberDensity(fDatabase->GetPDGParticle(211));
359  particleDensity_pi_th = gc_pi_th.ParticleNumberDensity(fDatabase->GetPDGParticle(211));
360  }
361 
362  for (int particleIndex = 0; particleIndex < fDatabase->GetNParticles(); particleIndex++) {
363  ParticlePDG* currParticle = fDatabase->GetPDGParticleByIndex(particleIndex);
364  int encoding = currParticle->GetPDG();
365 
366  //strangeness supression
367  double gammaS = 1;
368  int S = int(currParticle->GetStrangeness());
369  if (encoding == 333)
370  S = 2;
371  if (fCorrS < 1. && S != 0)
372  gammaS = TMath::Power(fCorrS, -TMath::Abs(S));
373 
374  //average densities
375  double particleDensity = gc.ParticleNumberDensity(currParticle) / gammaS;
376 
377  //compute chemical potential for single f.o. mu==mu_ch
378  double mu = fMuB * int(currParticle->GetBaryonNumber()) + fMuS * int(currParticle->GetStrangeness()) +
379  fMuI3 * int(currParticle->GetElectricCharge()) + fMuC * int(currParticle->GetCharmness());
380 
381  //thermal f.o.
382  if (fThFO != fT && fThFO > 0) {
383  double particleDensity_ch = gc_ch.ParticleNumberDensity(currParticle);
384  double particleDensity_th_0 = gc_th_0.ParticleNumberDensity(currParticle);
385  double numb_dens_bolt = particleDensity_pi_th * particleDensity_ch / particleDensity_pi_ch;
386  mu = fThFO * TMath::Log(numb_dens_bolt / particleDensity_th_0);
387  if (abs(encoding) == 211 || encoding == 111)
388  mu = fMu_th_pip;
389  particleDensity = numb_dens_bolt;
390  }
391 
392  // set particle densities to zero for some particle codes
393  // pythia quark codes
394  if (abs(encoding) <= 9) {
395  particleDensity = 0;
396  }
397  // leptons
398  if (abs(encoding) > 10 && abs(encoding) < 19) {
399  particleDensity = 0;
400  }
401  // exchange bosons
402  if (abs(encoding) > 20 && abs(encoding) < 30) {
403  particleDensity = 0;
404  }
405  // pythia special codes (e.g. strings, clusters ...)
406  if (abs(encoding) > 80 && abs(encoding) < 100) {
407  particleDensity = 0;
408  }
409  // pythia di-quark codes
410  // Note: in PYTHIA all diquark codes have the tens digits equal to zero
411  if (abs(encoding) > 1000 && abs(encoding) < 6000) {
412  int tens = ((abs(encoding) - (abs(encoding) % 10)) / 10) % 10;
413  if (tens == 0) { // its a diquark;
414  particleDensity = 0;
415  }
416  }
417  // K0S and K0L
418  if (abs(encoding) == 130 || abs(encoding) == 310) {
419  particleDensity = 0;
420  }
421  // charmed particles
422 
423  if (encoding == 443)
424  NJPsith = particleDensity * fVolEff / dYl;
425 
426  // We generate thermo-statistically only J/psi(443), D_+(411), D_-(-411), D_0(421),
427  //Dbar_0(-421), D1_+(413), D1_-(-413), D1_0(423), D1bar_0(-423)
428  //Dcs(431) Lambdac(4122)
429  if (currParticle->GetCharmQNumber() != 0 || currParticle->GetCharmAQNumber() != 0) {
430  //ml if(abs(encoding)!=443 &&
431  //ml abs(encoding)!=411 && abs(encoding)!=421 &&
432  //ml abs(encoding)!=413 && abs(encoding)!=423 && abs(encoding)!=4122 && abs(encoding)!=431) {
433  //ml particleDensity=0; }
434 
435  if (abs(encoding) == 441 || abs(encoding) == 10441 || abs(encoding) == 10443 || abs(encoding) == 20443 ||
436  abs(encoding) == 445 || abs(encoding) == 4232 || abs(encoding) == 4322 || abs(encoding) == 4132 ||
437  abs(encoding) == 4312 || abs(encoding) == 4324 || abs(encoding) == 4314 || abs(encoding) == 4332 ||
438  abs(encoding) == 4334) {
439  particleDensity = 0;
440  } else {
441  if (abs(encoding) != 443) { //only open charm
442  Nocth = Nocth + particleDensity * fVolEff / dYl;
443  LogInfo("Hydjet2Hadronizer|Charam") << encoding << " Nochth " << Nocth;
444  // particleDensity=particleDensity*fCorrC;
445  // if(abs(encoding)==443)particleDensity=particleDensity*fCorrC;
446  }
447  }
448  }
449 
450  // bottom mesons
451  if ((abs(encoding) > 500 && abs(encoding) < 600) || (abs(encoding) > 10500 && abs(encoding) < 10600) ||
452  (abs(encoding) > 20500 && abs(encoding) < 20600) || (abs(encoding) > 100500 && abs(encoding) < 100600)) {
453  particleDensity = 0;
454  }
455  // bottom baryons
456  if (abs(encoding) > 5000 && abs(encoding) < 6000) {
457  particleDensity = 0;
458  }
460 
461  if (particleDensity > 0.) {
462  fPartEnc[fNPartTypes] = encoding;
463  fPartMult[2 * fNPartTypes] = particleDensity;
464  fPartMu[2 * fNPartTypes] = mu;
465  ++fNPartTypes;
466  if (fNPartTypes > 1000)
467  LogError("Hydjet2Hadronizer") << "fNPartTypes is too large" << fNPartTypes;
468 
469  //outMult<<encoding<<" "<<particleDensity*fVolEff/dYl <<" "<<mu<<std::endl;
470  }
471  }
472 
473  //put open charm number and cc number in Params
474  fNocth = Nocth;
475  fNccth = NJPsith;
476 
477  return kTRUE;
478 }
479 
480 //__________________________________________________________________________________________
483 
484  // Initialize the static "last index variable"
486 
487  //----- high-pt part------------------------------
488  TLorentzVector partJMom, partJPos, zeroVec;
489 
490  // generate single event
491  if (embedding_) {
492  fIfb = 0;
493  const edm::Event& e = getEDMEvent();
495  e.getByLabel(src_, input);
496  const HepMC::GenEvent* inev = input->GetEvent();
497  const HepMC::HeavyIon* hi = inev->heavy_ion();
498  if (hi) {
499  fBfix = hi->impact_parameter();
500  phi0_ = hi->event_plane_angle();
501  sinphi0_ = sin(phi0_);
502  cosphi0_ = cos(phi0_);
503  } else {
504  LogWarning("EventEmbedding") << "Background event does not have heavy ion record!";
505  }
506  } else if (rotate_)
507  rotateEvtPlane();
508 
509  nsoft_ = 0;
510  nhard_ = 0;
511  /*
512  edm::LogInfo("HYDJET2mode") << "##### HYDJET2 fNhsel = " << fNhsel;
513  edm::LogInfo("HYDJET2fpart") << "##### HYDJET2 fpart = " << hyflow.fpart;??
514  edm::LogInfo("HYDJET2tf") << "##### HYDJET2 hadron freez-out temp, Tf = " << hyflow.Tf;??
515  edm::LogInfo("HYDJET2tf") << "##### HYDJET2 hadron freez-out temp, Tf = " << hyflow.Tf;??
516  edm::LogInfo("HYDJET2inTemp") << "##### HYDJET2: QGP init temperature, fT0 ="<<fT0;
517  edm::LogInfo("HYDJET2inTau") << "##### HYDJET2: QGP formation time, fTau0 ="<<fTau0;
518  */
519  // generate a HYDJET event
520  int ntry = 0;
521  while (nsoft_ == 0 && nhard_ == 0) {
522  if (ntry > 100) {
523  LogError("Hydjet2EmptyEvent") << "##### HYDJET2: No Particles generated, Number of tries =" << ntry;
524  // Throw an exception. Use the EventCorruption exception since it maps onto SkipEvent
525  // which is what we want to do here.
526  std::ostringstream sstr;
527  sstr << "Hydjet2HadronizerProducer: No particles generated after " << ntry << " tries.\n";
528  edm::Exception except(edm::errors::EventCorruption, sstr.str());
529  throw except;
530  } else {
531  //generate non-equilibrated part event
532  hyevnt_();
533 
535  if (fNhsel != 0) {
536  //get number of particles in jets
537  int numbJetPart = HYPART.njp;
538 
539  for (int i = 0; i < numbJetPart; ++i) {
540  int pythiaStatus = int(HYPART.ppart[i][0]); // PYTHIA status code
541  int pdg = int(HYPART.ppart[i][1]); // PYTHIA species code
542  double px = HYPART.ppart[i][2]; // px
543  double py = HYPART.ppart[i][3]; // py
544  double pz = HYPART.ppart[i][4]; // pz
545  double e = HYPART.ppart[i][5]; // E
546  double vx = HYPART.ppart[i][6]; // x
547  double vy = HYPART.ppart[i][7]; // y
548  double vz = HYPART.ppart[i][8]; // z
549  double vt = HYPART.ppart[i][9]; // t
550  // particle line number in pythia are 1 based while we use a 0 based numbering
551  int mother_index = int(HYPART.ppart[i][10]) - 1; //line number of parent particle
552  int daughter_index1 = int(HYPART.ppart[i][11]) - 1; //line number of first daughter
553  int daughter_index2 = int(HYPART.ppart[i][12]) - 1; //line number of last daughter
554 
555  // For status codes 3, 13, 14 the first and last daughter indexes have a different meaning
556  // used for color flow in PYTHIA. So these indexes will be reset to zero.
557  if (TMath::Abs(daughter_index1) > numbJetPart || TMath::Abs(daughter_index2) > numbJetPart ||
558  TMath::Abs(daughter_index1) > TMath::Abs(daughter_index2)) {
559  daughter_index1 = -1;
560  daughter_index2 = -1;
561  }
562 
564 
565  int type = 1; //from jet
566  if (partDef) {
567  int motherPdg = int(HYPART.ppart[mother_index][1]);
568  if (motherPdg == 0)
569  motherPdg = -1;
570  partJMom.SetXYZT(px, py, pz, e);
571  partJPos.SetXYZT(vx, vy, vz, vt);
572  Particle particle(partDef, partJPos, partJMom, 0, 0, type, motherPdg, zeroVec, zeroVec);
573  int index = particle.SetIndex();
574  if (index != i) {
575  // LogWarning("Hydjet2Hadronizer") << " Allocated Hydjet2 index is not synchronized with the PYTHIA index !" << endl
576  // << " Collision history information is destroyed! It happens when a PYTHIA code is not" << endl
577  // << " implemented in Hydjet2 particle list particles.data! Check it out!";
578  }
579  particle.SetPythiaStatusCode(pythiaStatus);
580  particle.SetMother(mother_index);
581  particle.SetFirstDaughterIndex(daughter_index1);
582  particle.SetLastDaughterIndex(daughter_index2);
583  if (pythiaStatus != 1)
584  particle.SetDecayed();
585  allocator.AddParticle(particle, source);
586  } else {
587  LogWarning("Hydjet2Hadronizer")
588  << " PYTHIA particle of specie " << pdg << " is not in Hydjet2 particle list" << endl
589  << " Please define it in particles.data, otherwise the history information will be de-synchronized and "
590  "lost!";
591  }
592  }
593  } //nhsel !=0 not only hydro!
594 
595  //----------HYDRO part--------------------------------------
596 
597  // get impact parameter
598  double impactParameter = HYFPAR.bgen;
599 
600  // Sergey psiforv3
601  psiforv3 = 0.; //AS-ML Nov2012 epsilon3 //
602  double e3 = (0.2 / 5.5) * TMath::Power(impactParameter, 1. / 3.);
603  psiforv3 = TMath::TwoPi() * (-0.5 + CLHEP::RandFlat::shoot(hjRandomEngine)) / 3.;
604  SERVICEEV.psiv3 = -psiforv3;
605 
606  if (fNhsel < 3) {
607  const double weightMax = 2 * TMath::CosH(fUmax);
608  const int nBins = 100;
609  double probList[nBins];
610  RandArrayFunction arrayFunctDistE(nBins);
611  RandArrayFunction arrayFunctDistR(nBins);
612  TLorentzVector partPos, partMom, n1, p0;
613  TVector3 vec3;
614  const TLorentzVector zeroVec;
615  //set maximal hadron energy
616  const double eMax = 5.;
617  //-------------------------------------
618  // get impact parameter
619 
620  double Delta = fDelta;
621  double Epsilon = fEpsilon;
622 
623  if (fIfDeltaEpsilon > 0) {
624  double Epsilon0 = 0.5 * impactParameter; //e0=b/2Ra
625  double coeff = (HYIPAR.RA / fR) / 12.; //phenomenological coefficient
626  Epsilon = Epsilon0 * coeff;
627  double C = 5.6;
628  double A = C * Epsilon * (1 - Epsilon * Epsilon);
629  if (TMath::Abs(Epsilon) < 0.0001 || TMath::Abs(A) < 0.0001)
630  Delta = 0.0;
631  if (TMath::Abs(Epsilon) > 0.0001 && TMath::Abs(A) > 0.0001)
632  Delta = 0.5 * (TMath::Sqrt(1 + 4 * A * (Epsilon + A)) - 1) / A;
633  }
634 
635  //effective volume for central
636  double dYl = 2 * fYlmax; //uniform distr. [-Ylmax; Ylmax]
637  if (fEtaType > 0)
638  dYl = TMath::Sqrt(2 * TMath::Pi()) * fYlmax; //Gaussian distr.
639 
640  double VolEffcent = 2 * TMath::Pi() * fTau * dYl * (fR * fR) / TMath::Power((fUmax), 2) *
641  ((fUmax)*TMath::SinH((fUmax)) - TMath::CosH((fUmax)) + 1);
642 
643  //effective volume for non-central Simpson2
644  double VolEffnoncent = fTau * dYl * SimpsonIntegrator2(0., 2. * TMath::Pi(), Epsilon, Delta);
645 
646  fVolEff = VolEffcent * HYFPAR.npart / HYFPAR.npart0;
647 
648  double coeff_RB = TMath::Sqrt(VolEffcent * HYFPAR.npart / HYFPAR.npart0 / VolEffnoncent);
649  double coeff_R1 = HYFPAR.npart / HYFPAR.npart0;
650  coeff_R1 = TMath::Power(coeff_R1, 0.333333);
651 
652  double Veff = fVolEff;
653  //------------------------------------
654  //cycle on particles types
655 
656  double Nbcol = HYFPAR.nbcol;
657  double NccNN = SERVICE.charm;
658  double Ncc = Nbcol * NccNN / dYl;
659  double Nocth = fNocth;
660  double NJPsith = fNccth;
661 
662  double gammaC = 1.0;
663  if (fCorrC <= 0) {
664  gammaC = CharmEnhancementFactor(Ncc, Nocth, NJPsith, 0.001);
665  } else {
666  gammaC = fCorrC;
667  }
668 
669  LogInfo("Hydjet2Hadronizer|Param") << " gammaC = " << gammaC;
670 
671  for (int i = 0; i < fNPartTypes; ++i) {
672  double Mparam = fPartMult[2 * i] * Veff;
673  const int encoding = fPartEnc[i];
674 
675  //ml if(abs(encoding)==443)Mparam = Mparam * gammaC * gammaC;
676  //ml if(abs(encoding)==411 || abs(encoding)==421 ||abs(encoding)==413 || abs(encoding)==423
677  //ml || abs(encoding)==4122 || abs(encoding)==431)
678 
679  ParticlePDG* partDef0 = fDatabase->GetPDGParticle(encoding);
680 
681  if (partDef0->GetCharmQNumber() != 0 || partDef0->GetCharmAQNumber() != 0)
682  Mparam = Mparam * gammaC;
683  if (abs(encoding) == 443)
684  Mparam = Mparam * gammaC;
685 
686  LogInfo("Hydjet2Hadronizer|Param") << encoding << " " << Mparam / dYl;
687 
688  int multiplicity = CLHEP::RandPoisson::shoot(hjRandomEngine, Mparam);
689 
690  LogInfo("Hydjet2Hadronizer|Param")
691  << "specie: " << encoding << "; average mult: = " << Mparam << "; multiplicity = " << multiplicity;
692 
693  if (multiplicity > 0) {
694  ParticlePDG* partDef = fDatabase->GetPDGParticle(encoding);
695  if (!partDef) {
696  LogError("Hydjet2Hadronizer") << "No particle with encoding " << encoding;
697  continue;
698  }
699 
700  if (fCharmProd <= 0 && (partDef->GetCharmQNumber() != 0 || partDef->GetCharmAQNumber() != 0)) {
701  LogInfo("Hydjet2Hadronizer|Param") << "statistical charmed particle not allowed ! " << encoding;
702  continue;
703  }
704  if (partDef->GetCharmQNumber() != 0 || partDef->GetCharmAQNumber() != 0)
705  LogInfo("Hydjet2Hadronizer|Param") << " charm pdg generated " << encoding;
706 
707  //compute chemical potential for single f.o. mu==mu_ch
708  //compute chemical potential for thermal f.o.
709  double mu = fPartMu[2 * i];
710 
711  //choose Bose-Einstein or Fermi-Dirac statistics
712  const double d = !(int(2 * partDef->GetSpin()) & 1) ? -1 : 1;
713  const double mass = partDef->GetMass();
714 
715  //prepare histogram to sample hadron energy:
716  double h = (eMax - mass) / nBins;
717  double x = mass + 0.5 * h;
718  int i;
719  for (i = 0; i < nBins; ++i) {
720  if (x >= mu && fThFO > 0)
721  probList[i] = x * TMath::Sqrt(x * x - mass * mass) / (TMath::Exp((x - mu) / (fThFO)) + d);
722  if (x >= mu && fThFO <= 0)
723  probList[i] = x * TMath::Sqrt(x * x - mass * mass) / (TMath::Exp((x - mu) / (fT)) + d);
724  if (x < mu)
725  probList[i] = 0.;
726  x += h;
727  }
728  arrayFunctDistE.PrepareTable(probList);
729 
730  //prepare histogram to sample hadron transverse radius:
731  h = (fR) / nBins;
732  x = 0.5 * h;
733  double param = (fUmax) / (fR);
734  for (i = 0; i < nBins; ++i) {
735  probList[i] = x * TMath::CosH(param * x);
736  x += h;
737  }
738  arrayFunctDistR.PrepareTable(probList);
739 
740  //loop over hadrons, assign hadron coordinates and momenta
741  double weight = 0., yy = 0., px0 = 0., py0 = 0., pz0 = 0.;
742  double e = 0., x0 = 0., y0 = 0., z0 = 0., t0 = 0., etaF = 0.;
743  double r, RB, phiF;
744 
745  RB = fR * coeff_RB * coeff_R1 * TMath::Sqrt((1 + e3) / (1 - e3));
746 
747  for (int j = 0; j < multiplicity; ++j) {
748  do {
749  fEtaType <= 0 ? etaF = fYlmax * (2. * CLHEP::RandFlat::shoot(hjRandomEngine) - 1.)
750  : etaF = (fYlmax) * (CLHEP::RandGauss::shoot(hjRandomEngine));
751  n1.SetXYZT(0., 0., TMath::SinH(etaF), TMath::CosH(etaF));
752 
753  if (TMath::Abs(etaF) > 5.)
754  continue;
755 
756  //old
757  //double RBold = fR * TMath::Sqrt(1-fEpsilon);
758 
759  //RB = fR * coeff_RB * coeff_R1;
760 
761  //double impactParameter =HYFPAR.bgen;
762  //double e0 = 0.5*impactParameter;
763  //double RBold1 = fR * TMath::Sqrt(1-e0);
764 
765  double rho = TMath::Sqrt(CLHEP::RandFlat::shoot(hjRandomEngine));
766  double phi = TMath::TwoPi() * CLHEP::RandFlat::shoot(hjRandomEngine);
767  double Rx = TMath::Sqrt(1 - Epsilon) * RB;
768  double Ry = TMath::Sqrt(1 + Epsilon) * RB;
769 
770  x0 = Rx * rho * TMath::Cos(phi);
771  y0 = Ry * rho * TMath::Sin(phi);
772  r = TMath::Sqrt(x0 * x0 + y0 * y0);
773  phiF = TMath::Abs(TMath::ATan(y0 / x0));
774 
775  if (x0 < 0 && y0 > 0)
776  phiF = TMath::Pi() - phiF;
777  if (x0 < 0 && y0 < 0)
778  phiF = TMath::Pi() + phiF;
779  if (x0 > 0 && y0 < 0)
780  phiF = 2. * TMath::Pi() - phiF;
781 
782  //new Nov2012 AS-ML
783  if (r > RB * (1 + e3 * TMath::Cos(3 * (phiF + psiforv3))) / (1 + e3))
784  continue;
785 
786  //proper time with emission duration
787  double tau =
788  coeff_R1 * fTau + sqrt(2.) * fSigmaTau * coeff_R1 * (CLHEP::RandGauss::shoot(hjRandomEngine));
789  z0 = tau * TMath::SinH(etaF);
790  t0 = tau * TMath::CosH(etaF);
791  double rhou = fUmax * r / RB;
792  double rhou3 = 0.063 * TMath::Sqrt((0.5 * impactParameter) / 0.67);
793  double rhou4 = 0.023 * ((0.5 * impactParameter) / 0.67);
794  double rrcoeff = 1. / TMath::Sqrt(1. + Delta * TMath::Cos(2 * phiF));
795  //AS-ML Nov.2012
796  rhou3 = 0.; //rhou4=0.;
797  rhou = rhou * (1 + rrcoeff * rhou3 * TMath::Cos(3 * (phiF + psiforv3)) +
798  rrcoeff * rhou4 * TMath::Cos(4 * phiF)); //ML new suggestion of AS mar2012
799  double delta1 = 0.;
800  Delta = Delta * (1.0 + delta1 * TMath::Cos(phiF) - delta1 * TMath::Cos(3 * phiF));
801 
802  double uxf = TMath::SinH(rhou) * TMath::Sqrt(1 + Delta) * TMath::Cos(phiF);
803  double uyf = TMath::SinH(rhou) * TMath::Sqrt(1 - Delta) * TMath::Sin(phiF);
804  double utf = TMath::CosH(etaF) * TMath::CosH(rhou) *
805  TMath::Sqrt(1 + Delta * TMath::Cos(2 * phiF) * TMath::TanH(rhou) * TMath::TanH(rhou));
806  double uzf = TMath::SinH(etaF) * TMath::CosH(rhou) *
807  TMath::Sqrt(1 + Delta * TMath::Cos(2 * phiF) * TMath::TanH(rhou) * TMath::TanH(rhou));
808 
809  vec3.SetXYZ(uxf / utf, uyf / utf, uzf / utf);
810  n1.Boost(-vec3);
811 
812  yy = weightMax * CLHEP::RandFlat::shoot(hjRandomEngine);
813 
814  double php0 = TMath::TwoPi() * CLHEP::RandFlat::shoot(hjRandomEngine);
815  double ctp0 = 2. * CLHEP::RandFlat::shoot(hjRandomEngine) - 1.;
816  double stp0 = TMath::Sqrt(1. - ctp0 * ctp0);
817  e = mass + (eMax - mass) * arrayFunctDistE();
818  double pp0 = TMath::Sqrt(e * e - mass * mass);
819  px0 = pp0 * stp0 * TMath::Sin(php0);
820  py0 = pp0 * stp0 * TMath::Cos(php0);
821  pz0 = pp0 * ctp0;
822  p0.SetXYZT(px0, py0, pz0, e);
823 
824  //weight for rdr
825  weight = (n1 * p0) / e; // weight for rdr gammar: weight = (n1 * p0) / n1[3] / e;
826 
827  } while (yy >= weight);
828 
829  if (abs(z0) > 1000 || abs(x0) > 1000)
830  LogInfo("Hydjet2Hadronizer|Param") << " etaF = " << etaF << std::endl;
831 
832  partMom.SetXYZT(px0, py0, pz0, e);
833  partPos.SetXYZT(x0, y0, z0, t0);
834  partMom.Boost(vec3);
835 
836  int type = 0; //hydro
837  Particle particle(partDef, partPos, partMom, 0., 0, type, -1, zeroVec, zeroVec);
838  particle.SetIndex();
839  allocator.AddParticle(particle, source);
840  } //nhsel==4 , no hydro part
841  }
842  }
843  }
844 
846 
847  Npart = (int)HYFPAR.npart;
848  Bgen = HYFPAR.bgen;
849  Njet = (int)HYJPAR.njet;
850  Nbcol = (int)HYFPAR.nbcol;
851 
852  //if(source.empty()) {
853  // LogError("Hydjet2Hadronizer") << "Source is not initialized!! Trying again...";
854  //return ;
855  //}
856  //Run the decays
857  if (RunDecays())
859 
860  LPIT_t it;
861  LPIT_t e;
862 
863  //Fill the decayed arrays
864  Ntot = 0;
865  Nhyd = 0;
866  Npyt = 0;
867  for (it = source.begin(), e = source.end(); it != e; ++it) {
868  TVector3 pos(it->Pos().Vect());
869  TVector3 mom(it->Mom().Vect());
870  float m1 = it->TableMass();
871  pdg[Ntot] = it->Encoding();
872  Mpdg[Ntot] = it->GetLastMotherPdg();
873  Px[Ntot] = mom[0];
874  Py[Ntot] = mom[1];
875  Pz[Ntot] = mom[2];
876  E[Ntot] = TMath::Sqrt(mom.Mag2() + m1 * m1);
877  X[Ntot] = pos[0];
878  Y[Ntot] = pos[1];
879  Z[Ntot] = pos[2];
880  T[Ntot] = it->T();
881  type[Ntot] = it->GetType();
882  pythiaStatus[Ntot] = convertStatus(it->GetPythiaStatusCode());
883  Index[Ntot] = it->GetIndex();
884  MotherIndex[Ntot] = it->GetMother();
885  NDaughters[Ntot] = it->GetNDaughters();
886  FirstDaughterIndex[Ntot] = -1;
887  LastDaughterIndex[Ntot] = -1;
888  //index of first daughter
889  FirstDaughterIndex[Ntot] = it->GetFirstDaughterIndex();
890  //index of last daughter
891  LastDaughterIndex[Ntot] = it->GetLastDaughterIndex();
892  if (type[Ntot] == 1) { // jets
893  if (pythiaStatus[Ntot] == 1 && NDaughters[Ntot] == 0) { // code for final state particle in pythia
894  final[Ntot] = 1;
895  } else {
896  final[Ntot] = pythiaStatus[Ntot];
897  }
898  }
899  if (type[Ntot] == 0) { // hydro
900  if (NDaughters[Ntot] == 0)
901  final[Ntot] = 1;
902  else
903  final[Ntot] = 2;
904  }
905 
906  if (type[Ntot] == 0)
907  Nhyd++;
908  if (type[Ntot] == 1)
909  Npyt++;
910 
911  Ntot++;
912  if (Ntot > kMax)
913  LogError("Hydjet2Hadronizer") << "Ntot is too large" << Ntot;
914  }
915 
916  nsoft_ = Nhyd;
917  nsub_ = Njet;
918  nhard_ = Npyt;
919 
920  //100 trys
921 
922  ++ntry;
923  }
924  }
925 
926  if (ev == 0) {
927  Sigin = HYJPAR.sigin;
928  Sigjet = HYJPAR.sigjet;
929  }
930  ev = 1;
931 
932  if (fNhsel < 3)
933  nsub_++;
934 
935  // event information
937  if (nhard_ > 0 || nsoft_ > 0)
939 
940  evt->set_signal_process_id(pypars.msti[0]); // type of the process
941  evt->set_event_scale(pypars.pari[16]); // Q^2
943 
944  event().reset(evt);
945 
947 
948  return kTRUE;
949 }
950 
951 //________________________________________________________________
952 bool Hydjet2Hadronizer::declareStableParticles(const std::vector<int>& _pdg) {
953  std::vector<int> pdg = _pdg;
954  for (size_t i = 0; i < pdg.size(); i++) {
955  int pyCode = pycomp_(pdg[i]);
956  std::ostringstream pyCard;
957  pyCard << "MDCY(" << pyCode << ",1)=0";
958  std::cout << pyCard.str() << std::endl;
959  call_pygive(pyCard.str());
960  }
961  return true;
962 }
963 //________________________________________________________________
964 bool Hydjet2Hadronizer::hadronize() { return false; }
965 bool Hydjet2Hadronizer::decay() { return true; }
966 bool Hydjet2Hadronizer::residualDecay() { return true; }
969 const char* Hydjet2Hadronizer::classname() const { return "gen::Hydjet2Hadronizer"; }
970 
971 //----------------------------------------------------------------------------------------------
972 
973 //______________________________________________________________________________________________
974 //f2=f(phi,r)
975 double Hydjet2Hadronizer::f2(double x, double y, double Delta) {
976  LogDebug("f2") << "in f2: "
977  << "delta" << Delta;
978  double RsB = fR; //test: podstavit' *coefff_RB
979  double rhou = fUmax * y / RsB;
980  double ff =
981  y * TMath::CosH(rhou) * TMath::Sqrt(1 + Delta * TMath::Cos(2 * x) * TMath::TanH(rhou) * TMath::TanH(rhou));
982  //n_mu u^mu f-la 20
983  return ff;
984 }
985 
986 //____________________________________________________________________________________________
987 double Hydjet2Hadronizer::SimpsonIntegrator(double a, double b, double phi, double Delta) {
988  LogDebug("SimpsonIntegrator") << "in SimpsonIntegrator"
989  << "delta - " << Delta;
990  int nsubIntervals = 100;
991  double h = (b - a) / nsubIntervals;
992  double s = f2(phi, a + 0.5 * h, Delta);
993  double t = 0.5 * (f2(phi, a, Delta) + f2(phi, b, Delta));
994  double x = a;
995  double y = a + 0.5 * h;
996  for (int i = 1; i < nsubIntervals; i++) {
997  x += h;
998  y += h;
999  s += f2(phi, y, Delta);
1000  t += f2(phi, x, Delta);
1001  }
1002  t += 2.0 * s;
1003  return t * h / 3.0;
1004 }
1005 
1006 //______________________________________________________________________________________________
1007 double Hydjet2Hadronizer::SimpsonIntegrator2(double a, double b, double Epsilon, double Delta) {
1008  LogInfo("SimpsonIntegrator2") << "in SimpsonIntegrator2: epsilon - " << Epsilon << " delta - " << Delta;
1009  int nsubIntervals = 10000;
1010  double h = (b - a) / nsubIntervals; //-1-pi, phi
1011  double s = 0;
1012  // double h2 = (fR)/nsubIntervals; //0-R maximal RB ?
1013 
1014  double x = 0; //phi
1015  for (int j = 1; j < nsubIntervals; j++) {
1016  x += h; // phi
1017  double e = Epsilon;
1018  double RsB = fR; //test: podstavit' *coefff_RB
1019  double RB = RsB * (TMath::Sqrt(1 - e * e) / TMath::Sqrt(1 + e * TMath::Cos(2 * x))); //f-la7 RB
1020  double sr = SimpsonIntegrator(0, RB, x, Delta);
1021  s += sr;
1022  }
1023  return s * h;
1024 }
1025 
1026 //___________________________________________________________________________________________________
1027 double Hydjet2Hadronizer::MidpointIntegrator2(double a, double b, double Delta, double Epsilon) {
1028  int nsubIntervals = 2000;
1029  int nsubIntervals2 = 1;
1030  double h = (b - a) / nsubIntervals; //0-pi , phi
1031  double h2 = (fR) / nsubIntervals; //0-R maximal RB ?
1032 
1033  double x = a + 0.5 * h;
1034  double y = 0;
1035 
1036  double t = f2(x, y, Delta);
1037 
1038  double e = Epsilon;
1039 
1040  for (int j = 1; j < nsubIntervals; j++) {
1041  x += h; // integr phi
1042 
1043  double RsB = fR; //test: podstavit' *coefff_RB
1044  double RB = RsB * (TMath::Sqrt(1 - e * e) / TMath::Sqrt(1 + e * TMath::Cos(2 * x))); //f-la7 RB
1045 
1046  nsubIntervals2 = int(RB / h2) + 1;
1047  // integr R
1048  y = 0;
1049  for (int i = 1; i < nsubIntervals2; i++)
1050  t += f2(x, (y += h2), Delta);
1051  }
1052  return t * h * h2;
1053 }
1054 
1055 //__________________________________________________________________________________________________________
1056 double Hydjet2Hadronizer::CharmEnhancementFactor(double Ncc, double Ndth, double NJPsith, double Epsilon) {
1057  double gammaC = 100.;
1058  double x1 = gammaC * Ndth;
1059  double var1 = Ncc - 0.5 * gammaC * Ndth * TMath::BesselI1(x1) / TMath::BesselI0(x1) - gammaC * gammaC * NJPsith;
1060  LogInfo("Charam") << "gammaC 20"
1061  << " var " << var1 << endl;
1062  gammaC = 1.;
1063  double x0 = gammaC * Ndth;
1064  double var0 = Ncc - 0.5 * gammaC * Ndth * TMath::BesselI1(x0) / TMath::BesselI0(x0) - gammaC * gammaC * NJPsith;
1065  LogInfo("Charam") << "gammaC 1"
1066  << " var " << var0;
1067 
1068  for (int i = 1; i < 1000; i++) {
1069  if (var1 * var0 < 0) {
1070  gammaC = gammaC + 0.01 * i;
1071  double x = gammaC * Ndth;
1072  var0 = Ncc - 0.5 * gammaC * Ndth * TMath::BesselI1(x) / TMath::BesselI0(x) - gammaC * gammaC * NJPsith;
1073  } else {
1074  LogInfo("Charam") << "gammaC " << gammaC << " var0 " << var0;
1075  return gammaC;
1076  }
1077  }
1078  LogInfo("Charam") << "gammaC not found ? " << gammaC << " var0 " << var0;
1079  return -100;
1080 }
1081 //----------------------------------------------------------------------------------------------
1082 
1083 //_____________________________________________________________________
1084 
1085 //________________________________________________________________
1087  const double pi = 3.14159265358979;
1088  phi0_ = 2. * pi * gen::pyr_(nullptr) - pi;
1089  sinphi0_ = sin(phi0_);
1090  cosphi0_ = cos(phi0_);
1091 }
1092 
1093 //_____________________________________________________________________
1095  // Hard particles. The first nhard_ lines from hyjets array.
1096  // Pythia/Pyquen sub-events (sub-collisions) for a given event
1097  // Return T/F if success/failure
1098  // Create particles from lujet entries, assign them into vertices and
1099  // put the vertices in the GenEvent, for each SubEvent
1100  // The SubEvent information is kept by storing indeces of main vertices
1101  // of subevents as a vector in GenHIEvent.
1102  LogDebug("SubEvent") << "Number of sub events " << nsub_;
1103  LogDebug("Hydjet2") << "Number of hard events " << Njet;
1104  LogDebug("Hydjet2") << "Number of hard particles " << nhard_;
1105  LogDebug("Hydjet2") << "Number of soft particles " << nsoft_;
1106 
1107  vector<HepMC::GenVertex*> sub_vertices(nsub_);
1108 
1109  int ihy = 0;
1110  for (int isub = 0; isub < nsub_; isub++) {
1111  LogDebug("SubEvent") << "Sub Event ID : " << isub;
1112 
1113  int sub_up = (isub + 1) * 150000; // Upper limit in mother index, determining the range of Sub-Event
1114  vector<HepMC::GenParticle*> particles;
1115  vector<int> mother_ids;
1116  vector<HepMC::GenVertex*> prods;
1117 
1118  sub_vertices[isub] = new HepMC::GenVertex(HepMC::FourVector(0, 0, 0, 0), isub);
1119  evt->add_vertex(sub_vertices[isub]);
1120 
1121  if (!evt->signal_process_vertex())
1122  evt->set_signal_process_vertex(sub_vertices[isub]);
1123 
1124  while (ihy < nhard_ + nsoft_ && (MotherIndex[ihy] < sub_up || ihy > nhard_)) {
1125  particles.push_back(build_hyjet2(ihy, ihy + 1));
1126  prods.push_back(build_hyjet2_vertex(ihy, isub));
1127  mother_ids.push_back(MotherIndex[ihy]);
1128  LogDebug("DecayChain") << "Mother index : " << MotherIndex[ihy];
1129  ihy++;
1130  }
1131  //Produce Vertices and add them to the GenEvent. Remember that GenParticles are adopted by
1132  //GenVertex and GenVertex is adopted by GenEvent.
1133  LogDebug("Hydjet2") << "Number of particles in vector " << particles.size();
1134 
1135  for (unsigned int i = 0; i < particles.size(); i++) {
1137  //The Fortran code is modified to preserve mother id info, by seperating the beginning
1138  //mother indices of successive subevents by 5000
1139  int mid = mother_ids[i] - isub * 150000 - 1;
1140  LogDebug("DecayChain") << "Particle " << i;
1141  LogDebug("DecayChain") << "Mother's ID " << mid;
1142  LogDebug("DecayChain") << "Particle's PDG ID " << part->pdg_id();
1143 
1144  if (mid <= 0) {
1145  sub_vertices[isub]->add_particle_out(part);
1146  continue;
1147  }
1148 
1149  if (mid > 0) {
1150  HepMC::GenParticle* mother = particles[mid];
1151  LogDebug("DecayChain") << "Mother's PDG ID " << mother->pdg_id();
1152  HepMC::GenVertex* prod_vertex = mother->end_vertex();
1153  if (!prod_vertex) {
1154  prod_vertex = prods[i];
1155  prod_vertex->add_particle_in(mother);
1156  evt->add_vertex(prod_vertex);
1157  prods[i] = nullptr; // mark to protect deletion
1158  }
1159 
1160  prod_vertex->add_particle_out(part);
1161  }
1162  }
1163 
1164  // cleanup vertices not assigned to evt
1165  for (unsigned int i = 0; i < prods.size(); i++) {
1166  if (prods[i])
1167  delete prods[i];
1168  }
1169  }
1170 
1171  return kTRUE;
1172 }
1173 
1174 //___________________________________________________________________
1176  // Build particle object corresponding to index in hyjets (soft+hard)
1177 
1178  double px0 = Px[index];
1179  double py0 = Py[index];
1180 
1181  double px = px0 * cosphi0_ - py0 * sinphi0_;
1182  double py = py0 * cosphi0_ + px0 * sinphi0_;
1183  // cout<< "status: "<<convertStatus(final[index], type[index])<<endl;
1184  HepMC::GenParticle* p = new HepMC::GenParticle(HepMC::FourVector(px, // px
1185  py, // py
1186  Pz[index], // pz
1187  E[index]), // E
1188  pdg[index], // id
1189  convertStatusForComponents(final[index], type[index]) // status
1190 
1191  );
1192 
1193  p->suggest_barcode(barcode);
1194  return p;
1195 }
1196 
1197 //___________________________________________________________________
1198 HepMC::GenVertex* Hydjet2Hadronizer::build_hyjet2_vertex(int i, int id) {
1199  // build verteces for the hyjets stored events
1200 
1201  double x0 = X[i];
1202  double y0 = Y[i];
1203  double x = x0 * cosphi0_ - y0 * sinphi0_;
1204  double y = y0 * cosphi0_ + x0 * sinphi0_;
1205  double z = Z[i];
1206  double t = T[i];
1207 
1208  HepMC::GenVertex* vertex = new HepMC::GenVertex(HepMC::FourVector(x, y, z, t), id);
1209  return vertex;
1210 }
1211 
1212 //_____________________________________________________________________
1214  // heavy ion record in the final CMSSW Event
1215  double npart = Npart;
1216  int nproj = static_cast<int>(npart / 2);
1217  int ntarg = static_cast<int>(npart - nproj);
1218 
1219  HepMC::HeavyIon* hi = new HepMC::HeavyIon(nsub_, // Ncoll_hard/N of SubEvents
1220  nproj, // Npart_proj
1221  ntarg, // Npart_targ
1222  Nbcol, // Ncoll
1223  0, // spectator_neutrons
1224  0, // spectator_protons
1225  0, // N_Nwounded_collisions
1226  0, // Nwounded_N_collisions
1227  0, // Nwounded_Nwounded_collisions
1228  Bgen * nuclear_radius(), // impact_parameter in [fm]
1229  phi0_, // event_plane_angle
1230  0, // eccentricity
1231  Sigin // sigma_inel_NN
1232  );
1233 
1234  evt->set_heavy_ion(*hi);
1235  delete hi;
1236 }
gen::Hydjet2Hadronizer::fPtmin
double fPtmin
Definition: Hydjet2Hadronizer.h:171
hydjet2DefaultParameters_cff.fPyhist
fPyhist
Definition: hydjet2DefaultParameters_cff.py:70
gen::Hydjet2Hadronizer::fTau
double fTau
Definition: Hydjet2Hadronizer.h:136
hydjet2DefaultParameters_cff.fMuC
fMuC
Definition: hydjet2DefaultParameters_cff.py:40
HYPARTCommon
Definition: HYJET_COMMONS.h:103
Particle::fLastIndex
static int fLastIndex
Definition: Particle.h:38
gen::Hydjet2Hadronizer::Y
float Y[500000]
Definition: Hydjet2Hadronizer.h:225
GrandCanonical
Definition: GrandCanonical.h:14
electrons_cff.bool
bool
Definition: electrons_cff.py:366
gen::Hydjet2Hadronizer::Bgen
float Bgen
Definition: Hydjet2Hadronizer.h:219
mps_fire.i
i
Definition: mps_fire.py:428
HYJPARCommon
Definition: HYJET_COMMONS.h:58
gen::Hydjet2Hadronizer::build_hyjet2_vertex
HepMC::GenVertex * build_hyjet2_vertex(int i, int id)
Definition: Hydjet2Hadronizer.cc:1198
input
static const std::string input
Definition: EdmProvDump.cc:48
MessageLogger.h
vec3
std::vector< vec2 > vec3
Definition: HCALResponse.h:17
TwoPi
const double TwoPi
Definition: CosmicMuonParameters.h:19
gen::Hydjet2Hadronizer::nsub_
int nsub_
Definition: Hydjet2Hadronizer.h:191
RandArrayFunction
Definition: RandArrayFunction.h:73
HYJPAR
#define HYJPAR
Definition: HYJET_COMMONS.h:69
gen::Hydjet2Hadronizer::ev
int ev
Definition: Hydjet2Hadronizer.h:217
gen::Hydjet2Hadronizer::fTau0
double fTau0
Definition: Hydjet2Hadronizer.h:180
gen::Hydjet2Hadronizer::MotherIndex
int MotherIndex[500000]
Definition: Hydjet2Hadronizer.h:233
ParticlePDG.h
gen::Hydjet2Hadronizer::fEpsilon
double fEpsilon
Definition: Hydjet2Hadronizer.h:142
metsig::tau
Definition: SignAlgoResolutions.h:49
gen::Hydjet2Hadronizer::Px
float Px[500000]
Definition: Hydjet2Hadronizer.h:220
gen::pycomp_
int pycomp_(int &)
gen::Hydjet2Hadronizer::readSettings
bool readSettings(int)
Definition: Hydjet2Hadronizer.cc:234
gen::Hydjet2Hadronizer::fUmax
double fUmax
Definition: Hydjet2Hadronizer.h:140
amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
gen::Hydjet2Hadronizer::fSqrtS
double fSqrtS
Definition: Hydjet2Hadronizer.h:119
HYPART
#define HYPART
Definition: HYJET_COMMONS.h:111
gen::Hydjet2Hadronizer::get_particles
bool get_particles(HepMC::GenEvent *evt)
Definition: Hydjet2Hadronizer.cc:1094
hydjet2DefaultParameters_cff.fAw
fAw
Definition: hydjet2DefaultParameters_cff.py:6
gen::Hydjet2Hadronizer::Index
int Index[500000]
Definition: Hydjet2Hadronizer.h:232
HYIPARCommon
Definition: HYJET_COMMONS.h:11
gen::Hydjet2Hadronizer::sinphi0_
double sinphi0_
Definition: Hydjet2Hadronizer.h:195
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
edm
HLT enums.
Definition: AlignableModifier.h:19
kMax
#define kMax
Definition: Hydjet2Hadronizer.h:46
gen::Hydjet2Hadronizer::SimpsonIntegrator
double SimpsonIntegrator(double, double, double, double)
Definition: Hydjet2Hadronizer.cc:987
gen::Hydjet2Hadronizer::initializeForInternalPartons
bool initializeForInternalPartons()
Definition: Hydjet2Hadronizer.cc:248
gen::pyr_
double pyr_(int *idummy)
Definition: Pythia6Service.cc:59
gen::Hydjet2Hadronizer::fT
double fT
Definition: Hydjet2Hadronizer.h:128
gather_cfg.cout
cout
Definition: gather_cfg.py:144
pos
Definition: PixelAliasList.h:18
edm::errors::EventCorruption
Definition: EDMException.h:43
pypars
#define pypars
Definition: ExhumeHadronizer.cc:45
gen::FortranInstance::kFortranInstance
static const std::string kFortranInstance
Definition: FortranInstance.h:88
hydjet2DefaultParameters_cff.fCorrS
fCorrS
Strangeness suppression factor ###.
Definition: hydjet2DefaultParameters_cff.py:51
Hydjet2Hadronizer.h
hydjet2Default_cfi.fBfix
fBfix
Definition: hydjet2Default_cfi.py:35
if
if(0==first)
Definition: CAHitNtupletGeneratorKernelsImpl.h:58
Pythia6Declarations.h
gen::Hydjet2Hadronizer::psiforv3
double psiforv3
Definition: Hydjet2Hadronizer.h:218
gen::Hydjet2Hadronizer::evt
HepMC::GenEvent * evt
Definition: Hydjet2Hadronizer.h:190
hydjet2DefaultParameters_cff.fR
fR
Definition: hydjet2DefaultParameters_cff.py:14
gen::Hydjet2Hadronizer::fIanglu
int fIanglu
Definition: Hydjet2Hadronizer.h:185
hydjet2DefaultParameters_cff.fMuS
fMuS
Definition: hydjet2DefaultParameters_cff.py:39
gen::Hydjet2Hadronizer::classname
const char * classname() const
Definition: Hydjet2Hadronizer.cc:969
gen::Hydjet2Hadronizer::fPartMult
double fPartMult[2000]
Definition: Hydjet2Hadronizer.h:206
gen::Hydjet2Hadronizer::Py
float Py[500000]
Definition: Hydjet2Hadronizer.h:221
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
hydjet2DefaultParameters_cff.fIfDeltaEpsilon
fIfDeltaEpsilon
Anizotropy parameter at thermal freeze-out ###.
Definition: hydjet2DefaultParameters_cff.py:57
DatabasePDG::GetNParticles
int GetNParticles(bool all=kFALSE)
Definition: DatabasePDG.cc:582
gen::Hydjet2Hadronizer::fBmax
double fBmax
Definition: Hydjet2Hadronizer.h:125
gen::Hydjet2Hadronizer::src_
edm::InputTag src_
Definition: Hydjet2Hadronizer.h:202
gen::Pythia6Service::setRandomEngine
void setRandomEngine(CLHEP::HepRandomEngine *v)
Definition: Pythia6Service.h:46
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
gen::Hydjet2Hadronizer::rotateEvtPlane
void rotateEvtPlane()
Definition: Hydjet2Hadronizer.cc:1086
gen::Hydjet2Hadronizer::add_heavy_ion_rec
void add_heavy_ion_rec(HepMC::GenEvent *evt)
Definition: Hydjet2Hadronizer.cc:1213
gen::Hydjet2Hadronizer::fIenglu
int fIenglu
Definition: Hydjet2Hadronizer.h:182
hydjet2Default_cfi.fBmax
fBmax
Definition: hydjet2Default_cfi.py:34
h
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
gen::Hydjet2Hadronizer::LastDaughterIndex
int LastDaughterIndex[500000]
Definition: Hydjet2Hadronizer.h:236
edm::Handle
Definition: AssociativeIterator.h:50
myini_
void myini_()
gen::Hydjet2Hadronizer::Sigjet
float Sigjet
Definition: Hydjet2Hadronizer.h:219
gen::Hydjet2Hadronizer::fSigmaTau
double fSigmaTau
Definition: Hydjet2Hadronizer.h:137
SERVICE
#define SERVICE
Definition: HYJET_COMMONS.h:38
gen::BaseHadronizer
Definition: BaseHadronizer.h:46
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
GenRunInfoProduct.h
ecalTrigSettings_cff.particles
particles
Definition: ecalTrigSettings_cff.py:11
gen::Hydjet2Hadronizer::fBfix
double fBfix
Definition: Hydjet2Hadronizer.h:126
gen::Hydjet2Hadronizer::fMuI3
double fMuI3
Definition: Hydjet2Hadronizer.h:132
npart
double npart
Definition: HydjetWrapper.h:46
gen::Hydjet2Hadronizer::fBmin
double fBmin
Definition: Hydjet2Hadronizer.h:124
gen::Pythia6Service::setGeneralParams
void setGeneralParams()
Definition: Pythia6Service.cc:156
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
BesselI1
double BesselI1(double x)
Definition: HankelFunction.cc:101
hydjet2DefaultParameters_cff.fMu_th_pip
fMu_th_pip
Definition: hydjet2DefaultParameters_cff.py:45
hydjet2DefaultParameters_cff.fDelta
fDelta
Definition: hydjet2DefaultParameters_cff.py:58
gen::Hydjet2Hadronizer::nuclear_radius
double nuclear_radius() const
Definition: Hydjet2Hadronizer.h:242
edm::Exception
Definition: EDMException.h:77
HYPYIN
#define HYPYIN
Definition: HYJET_COMMONS.h:84
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
EDMException.h
gen::Hydjet2Hadronizer::RunDecays
bool RunDecays() override
Definition: Hydjet2Hadronizer.h:88
gen::Hydjet2Hadronizer::rotate_
bool rotate_
Definition: Hydjet2Hadronizer.h:189
DatabasePDG::GetPDGParticleByIndex
ParticlePDG * GetPDGParticleByIndex(int index)
Definition: DatabasePDG.cc:198
gen::Hydjet2Hadronizer::maxEventsToPrint_
unsigned int maxEventsToPrint_
Definition: Hydjet2Hadronizer.h:200
EquationSolver.h
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
alignCSCRings.s
s
Definition: alignCSCRings.py:92
part
part
Definition: HCALResponse.h:20
HYJET_COMMONS.h
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
h
gen::Hydjet2Hadronizer::Njet
int Njet
Definition: Hydjet2Hadronizer.h:217
gen::Hydjet2Hadronizer::fR
double fR
Definition: Hydjet2Hadronizer.h:138
Abs
T Abs(T a)
Definition: MathUtil.h:49
gen::Hydjet2Hadronizer::phi0_
double phi0_
Definition: Hydjet2Hadronizer.h:194
gen::Hydjet2Hadronizer::fT0
double fT0
Definition: Hydjet2Hadronizer.h:176
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:149
gen::Hydjet2Hadronizer::fVolEff
double fVolEff
Definition: Hydjet2Hadronizer.h:114
gen::Hydjet2Hadronizer::fCharmProd
int fCharmProd
Definition: Hydjet2Hadronizer.h:158
UKUtility.h
gen::Hydjet2Hadronizer::fCorrS
double fCorrS
Definition: Hydjet2Hadronizer.h:157
alignCSCRings.ff
ff
Definition: alignCSCRings.py:148
gen::p
double p[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:76
hydjet2DefaultParameters_cff.fWeakDecay
fWeakDecay
Definition: hydjet2DefaultParameters_cff.py:63
gen::Hydjet2Hadronizer::cosphi0_
double cosphi0_
Definition: Hydjet2Hadronizer.h:196
hydjet2DefaultParameters_cff.fSqrtS
fSqrtS
beam/target atomic number
Definition: hydjet2DefaultParameters_cff.py:7
gen::Hydjet2Hadronizer::pythiaStatus
int pythiaStatus[500000]
Definition: Hydjet2Hadronizer.h:231
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
hydjet2Default_cfi.fIfb
fIfb
Definition: hydjet2Default_cfi.py:32
Run.h
gen::Hydjet2Hadronizer::pythiaPylistVerbosity_
unsigned int pythiaPylistVerbosity_
Definition: Hydjet2Hadronizer.h:199
gen::FortranInstance::InstanceWrapper
Definition: FortranInstance.h:54
gen::BaseHadronizer::getEDMEvent
edm::Event & getEDMEvent() const
Definition: BaseHadronizer.h:69
hydjet2DefaultParameters_cff.fIanglu
fIanglu
Definition: hydjet2DefaultParameters_cff.py:72
gen::Hydjet2Hadronizer::fIfb
int fIfb
Definition: Hydjet2Hadronizer.h:121
gen::Hydjet2Hadronizer::build_hyjet2
HepMC::GenParticle * build_hyjet2(int index, int barcode)
Definition: Hydjet2Hadronizer.cc:1175
NAStrangePotential
Definition: StrangePotential.h:19
ParticlePDG::GetStrangeness
double GetStrangeness()
Definition: ParticlePDG.h:87
seedmultiplicitymonitor_newtracking_cfi.nBins
nBins
Definition: seedmultiplicitymonitor_newtracking_cfi.py:8
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
SharedResourceNames.h
ParticlePDG
Definition: ParticlePDG.h:24
gen
Definition: PythiaDecays.h:13
b
double b
Definition: hdecay.h:118
ParticlePDG::GetCharmAQNumber
double GetCharmAQNumber()
Definition: ParticlePDG.h:81
gen::Hydjet2Hadronizer::fMu_th_pip
double fMu_th_pip
Definition: Hydjet2Hadronizer.h:134
Particle.h
FortranInstance.h
gen::Hydjet2Hadronizer::statistics
void statistics()
Definition: Hydjet2Hadronizer.cc:968
HadronDecayer.h
gen::Hydjet2Hadronizer::SimpsonIntegrator2
double SimpsonIntegrator2(double, double, double, double)
Definition: Hydjet2Hadronizer.cc:1007
gen::Hydjet2Hadronizer::fMuB
double fMuB
Definition: Hydjet2Hadronizer.h:129
gen::Hydjet2Hadronizer::source
List_t source
Definition: Hydjet2Hadronizer.h:240
GrandCanonical.h
hydjet2DefaultParameters_cff.fMuB
fMuB
Definition: hydjet2DefaultParameters_cff.py:38
gen::Hydjet2Hadronizer::residualDecay
bool residualDecay()
Definition: Hydjet2Hadronizer.cc:966
hydjet2DefaultParameters_cff.fMuI3
fMuI3
Definition: hydjet2DefaultParameters_cff.py:41
gen::Hydjet2Hadronizer::fCorrC
double fCorrC
Definition: Hydjet2Hadronizer.h:159
gen::Hydjet2Hadronizer::~Hydjet2Hadronizer
~Hydjet2Hadronizer() override
Definition: Hydjet2Hadronizer.cc:221
GrandCanonical::ParticleNumberDensity
double ParticleNumberDensity(ParticlePDG *particle)
Definition: GrandCanonical.cc:109
gen::Hydjet2Hadronizer::allocator
ParticleAllocator allocator
Definition: Hydjet2Hadronizer.h:239
gen::Hydjet2Hadronizer::generatePartonsAndHadronize
bool generatePartonsAndHadronize()
Definition: Hydjet2Hadronizer.cc:481
gen::Hydjet2Hadronizer::pset
edm::ParameterSet pset
Definition: Hydjet2Hadronizer.h:214
hydjet2DefaultParameters_cff.fTau0
fTau0
Definition: hydjet2DefaultParameters_cff.py:30
hydjet2DefaultParameters_cff.fNf
fNf
Definition: hydjet2DefaultParameters_cff.py:31
RandArrayFunction::PrepareTable
void PrepareTable(const double *aProbFunc)
Definition: RandArrayFunction.cc:19
gen::Hydjet2Hadronizer::fPartEnc
int fPartEnc[1000]
Definition: Hydjet2Hadronizer.h:205
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
ParticlePDG::GetCharmQNumber
double GetCharmQNumber()
Definition: ParticlePDG.h:80
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
NAStrangePotential::SetBaryonPotential
void SetBaryonPotential(double value)
Definition: StrangePotential.h:53
gen::Hydjet2Hadronizer::Sigin
float Sigin
Definition: Hydjet2Hadronizer.h:219
a
double a
Definition: hdecay.h:119
gen::Hydjet2Hadronizer::MidpointIntegrator2
double MidpointIntegrator2(double, double, double, double)
Definition: Hydjet2Hadronizer.cc:1027
GenEventInfoProduct.h
Event.h
geometryCSVtoXML.yy
yy
Definition: geometryCSVtoXML.py:19
gen::Hydjet2Hadronizer::Nbcol
int Nbcol
Definition: Hydjet2Hadronizer.h:217
gen::Hydjet2Hadronizer::nsoft_
int nsoft_
Definition: Hydjet2Hadronizer.h:193
hydjet2DefaultParameters_cff.fUmax
fUmax
Definition: hydjet2DefaultParameters_cff.py:8
hydjet2DefaultParameters_cff.fYlmax
fYlmax
Maximal longitudinal flow rapidity at thermal freeze-out ###.
Definition: hydjet2DefaultParameters_cff.py:54
gen::Hydjet2Hadronizer::fEtaType
int fEtaType
Definition: Hydjet2Hadronizer.h:150
cosmicPhotonAnalyzer_cfi.eMax
eMax
Definition: cosmicPhotonAnalyzer_cfi.py:10
ParticlePDG::GetCharmness
double GetCharmness()
Definition: ParticlePDG.h:88
hydjet2DefaultParameters_cff.fT0
fT0
Definition: hydjet2DefaultParameters_cff.py:10
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
gen::Hydjet2Hadronizer::nhard_
int nhard_
Definition: Hydjet2Hadronizer.h:192
InitialState::fDatabase
DatabasePDG * fDatabase
Definition: InitialState.h:16
gen::Hydjet2Hadronizer::fMuC
double fMuC
Definition: Hydjet2Hadronizer.h:131
gen::v
double v[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:76
HYFPAR
#define HYFPAR
Definition: HYJET_COMMONS.h:99
gen::Hydjet2Hadronizer::FirstDaughterIndex
int FirstDaughterIndex[500000]
Definition: Hydjet2Hadronizer.h:235
gen::Hydjet2Hadronizer::doSetRandomEngine
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
Definition: Hydjet2Hadronizer.cc:228
gen::Hydjet2Hadronizer::fPyhist
int fPyhist
Definition: Hydjet2Hadronizer.h:166
hydjet2DefaultParameters_cff.fCorrC
fCorrC
Definition: hydjet2DefaultParameters_cff.py:67
createfilelist.int
int
Definition: createfilelist.py:10
gen::Hydjet2Hadronizer::fNf
int fNf
Definition: Hydjet2Hadronizer.h:181
gen::Hydjet2Hadronizer::fDelta
double fDelta
Definition: Hydjet2Hadronizer.h:141
gen::Hydjet2Hadronizer::decay
bool decay()
Definition: Hydjet2Hadronizer.cc:965
gen::Hydjet2Hadronizer::fNPartTypes
int fNPartTypes
Definition: Hydjet2Hadronizer.h:204
ParticlePDG::GetSpin
double GetSpin()
Definition: ParticlePDG.h:73
hydjet2Default_cfi.fBmin
fBmin
Definition: hydjet2Default_cfi.py:33
hydjet2DefaultParameters_cff.fTau
fTau
Volume parameters at thermal freeze-out ###.
Definition: hydjet2DefaultParameters_cff.py:13
RandArrayFunction.h
gen::Hydjet2Hadronizer::fNocth
double fNocth
Definition: Hydjet2Hadronizer.h:211
ParticlePDG::GetMass
double GetMass()
Definition: ParticlePDG.h:70
gen::Hydjet2Hadronizer::Mpdg
int Mpdg[500000]
Definition: Hydjet2Hadronizer.h:229
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
RunInputHYDJETstr
TString RunInputHYDJETstr
Definition: Hydjet2Hadronizer.cc:93
hydjet2DefaultParameters_cff.fPtmin
fPtmin
Definition: hydjet2DefaultParameters_cff.py:9
gen::Hydjet2Hadronizer::hadronize
bool hadronize()
Definition: Hydjet2Hadronizer.cc:964
ParticleAllocator::FreeList
void FreeList(List_t &list)
Definition: Particle.cc:118
BesselI0
double BesselI0(double x)
Definition: HankelFunction.cc:64
gen::Hydjet2Hadronizer::Z
float Z[500000]
Definition: Hydjet2Hadronizer.h:226
alignCSCRings.r
r
Definition: alignCSCRings.py:93
ParticlePDG::GetElectricCharge
double GetElectricCharge()
Definition: ParticlePDG.h:89
SERVICEEV
#define SERVICEEV
Definition: HYJET_COMMONS.h:52
InitialState::Evolve
virtual void Evolve(List_t &secondaries, ParticleAllocator &allocator, double weakDecayLimit)
Definition: InitialState.cc:13
SiPixelPhase1Clusters_cfi.e3
e3
Definition: SiPixelPhase1Clusters_cfi.py:9
hydjet2Default_cfi.fNhsel
fNhsel
Definition: hydjet2Default_cfi.py:11
hi
Definition: EPCuts.h:4
gen::Hydjet2Hadronizer::fNccth
double fNccth
Definition: Hydjet2Hadronizer.h:212
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
hydjet2DefaultParameters_cff.fSigmaTau
fSigmaTau
Volume parameters at thermal freeze-out ###.
Definition: hydjet2DefaultParameters_cff.py:48
gen::Hydjet2Hadronizer::declareStableParticles
bool declareStableParticles(const std::vector< int > &)
Definition: Hydjet2Hadronizer.cc:952
gen::Hydjet2Hadronizer::fMuS
double fMuS
Definition: Hydjet2Hadronizer.h:130
gen::Hydjet2Hadronizer::f2
double f2(double, double, double)
Definition: Hydjet2Hadronizer.cc:975
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
PYQPAR
#define PYQPAR
Definition: HYJET_COMMONS.h:126
std
Definition: JetResolutionObject.h:76
gen::Hydjet2Hadronizer::pythia6Service_
Pythia6Service * pythia6Service_
Definition: Hydjet2Hadronizer.h:197
gen::BaseHadronizer::event
std::unique_ptr< HepMC::GenEvent > & event()
Definition: BaseHadronizer.h:86
gen::Hydjet2Hadronizer::CharmEnhancementFactor
double CharmEnhancementFactor(double, double, double, double)
Definition: Hydjet2Hadronizer.cc:1056
gen::C
C
Definition: PomwigHadronizer.cc:78
hydjet2DefaultParameters_cff.fT
fT
Definition: hydjet2DefaultParameters_cff.py:37
T
long double T
Definition: Basic3DVectorLD.h:48
hydjet2DefaultParameters_cff.fCharmProd
fCharmProd
Charm ###.
Definition: hydjet2DefaultParameters_cff.py:66
hydjet2DefaultParameters_cff.fEpsilon
fEpsilon
Definition: hydjet2DefaultParameters_cff.py:59
GenHIEvent.h
edm::SharedResourceNames::kPythia6
static const std::string kPythia6
Definition: SharedResourceNames.h:26
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
NAStrangePotential::SetTemperature
void SetTemperature(double value)
Definition: StrangePotential.h:52
Particle::InitIndexing
static void InitIndexing()
Definition: Particle.h:140
gen::Hydjet2Hadronizer::fAw
double fAw
Definition: Hydjet2Hadronizer.h:120
gen::Hydjet2Hadronizer::Npyt
int Npyt
Definition: Hydjet2Hadronizer.h:217
HYIPAR
#define HYIPAR
Definition: HYJET_COMMONS.h:26
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
gen::Hydjet2Hadronizer::fIfDeltaEpsilon
int fIfDeltaEpsilon
Definition: Hydjet2Hadronizer.h:143
gen::Hydjet2Hadronizer::embedding_
bool embedding_
Definition: Hydjet2Hadronizer.h:188
gen::Hydjet2Hadronizer::fTMuType
int fTMuType
Definition: Hydjet2Hadronizer.h:154
Pythia6Service.h
hydjet2DefaultParameters_cff.fDecay
fDecay
Decays ###.
Definition: hydjet2DefaultParameters_cff.py:62
ParticlePDG::GetBaryonNumber
double GetBaryonNumber()
Definition: ParticlePDG.h:82
Particle
Definition: Particle.py:1
gen::Hydjet2Hadronizer::Pz
float Pz[500000]
Definition: Hydjet2Hadronizer.h:222
pdg
Definition: pdg_functions.h:28
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
LPIT_t
std::list< Particle >::iterator LPIT_t
Definition: Particle.h:175
gen::Hydjet2Hadronizer::fThFO
double fThFO
Definition: Hydjet2Hadronizer.h:133
S
Definition: CSCDBL1TPParametersExtended.h:16
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
gen::Hydjet2Hadronizer::Ntot
int Ntot
Definition: Hydjet2Hadronizer.h:217
gen::Hydjet2Hadronizer::Npart
int Npart
Definition: Hydjet2Hadronizer.h:217
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
gen::Hydjet2Hadronizer::finalizeEvent
void finalizeEvent()
Definition: Hydjet2Hadronizer.cc:967
gen::Hydjet2Hadronizer::Nhyd
int Nhyd
Definition: Hydjet2Hadronizer.h:217
hydjet2DefaultParameters_cff.fIenglu
fIenglu
Definition: hydjet2DefaultParameters_cff.py:71
ztail.d
d
Definition: ztail.py:151
pi
const Double_t pi
Definition: trackSplitPlot.h:36
hjRandomEngine
CLHEP::HepRandomEngine * hjRandomEngine
Definition: Hydjet2Hadronizer.cc:79
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ParticlePDG::GetPDG
int GetPDG()
Definition: ParticlePDG.h:69
gen::Pythia6Service
Definition: Pythia6Service.h:24
ParameterSet.h
HepMCProduct.h
hyevnt_
void hyevnt_()
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
DatabasePDG::GetPDGParticle
ParticlePDG * GetPDGParticle(int pdg)
Definition: DatabasePDG.cc:218
gen::Hydjet2Hadronizer::fYlmax
double fYlmax
Definition: Hydjet2Hadronizer.h:139
StrangePotential.h
edm::Event
Definition: Event.h:73
gen::Hydjet2Hadronizer::fPartMu
double fPartMu[2000]
Definition: Hydjet2Hadronizer.h:207
gen::Hydjet2Hadronizer::GetWeakDecayLimit
double GetWeakDecayLimit() override
Definition: Hydjet2Hadronizer.h:89
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
gen::Hydjet2Hadronizer::fIshad
int fIshad
Definition: Hydjet2Hadronizer.h:167
gen::Hydjet2Hadronizer::NDaughters
int NDaughters[500000]
Definition: Hydjet2Hadronizer.h:234
A
hydjet2DefaultParameters_cff.fEtaType
fEtaType
Definition: hydjet2DefaultParameters_cff.py:68
gen::call_pygive
bool call_pygive(const std::string &line)
Definition: ExhumeHadronizer.cc:64
gen::Hydjet2Hadronizer::X
float X[500000]
Definition: Hydjet2Hadronizer.h:224
hydjet2DefaultParameters_cff.fThFO
fThFO
Thermodinamic parameters at thermal freez-out ###.
Definition: hydjet2DefaultParameters_cff.py:44
edm::InputTag
Definition: InputTag.h:15
HYFPARCommon
Definition: HYJET_COMMONS.h:89
NAStrangePotential::CalculateStrangePotential
double CalculateStrangePotential()
Definition: StrangePotential.cc:11
weight
Definition: weight.py:1
hydjet2DefaultParameters_cff.fIshad
fIshad
Definition: hydjet2DefaultParameters_cff.py:69
gen::Hydjet2Hadronizer::E
float E[500000]
Definition: Hydjet2Hadronizer.h:223
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
ParticleAllocator::AddParticle
void AddParticle(const Particle &particle, List_t &list)
Definition: Particle.cc:107
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
gen::Hydjet2Hadronizer::fNhsel
int fNhsel
Definition: Hydjet2Hadronizer.h:161
HLT_FULL_cff.Epsilon
Epsilon
Definition: HLT_FULL_cff.py:7729
hydjet2DefaultParameters_cff.fTMuType
fTMuType
Thermodinamic parameters at chemical freez-out ###.
Definition: hydjet2DefaultParameters_cff.py:36