CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Hydjet2Hadronizer.h
Go to the documentation of this file.
1 /*
2  Based on class InitalStateHydjet:
3  Nikolai Amelin, Ludmila Malinina, Timur Pocheptsov (C) JINR/Dubna
4  amelin@sunhe.jinr.ru, malinina@sunhe.jinr.ru, pocheptsov@sunhe.jinr.ru
5  November. 2, 2005
6 
7 */
8 
9 #ifndef Hydjet2Hadronizer_h
10 #define Hydjet2Hadronizer_h
11 
20 #include "DatabasePDG.h"
21 #include "Particle.h"
22 #include "InitialState.h"
23 
24 #define PYCOMP pycomp_
25 
28 
29 #include "CLHEP/Random/RandomEngine.h"
30 #include "CLHEP/Random/RandFlat.h"
31 #include "CLHEP/Random/RandPoisson.h"
32 #include "CLHEP/Random/RandGauss.h"
33 
34 #include <map>
35 #include <string>
36 #include <vector>
37 #include <cmath>
38 
39 #include "HYJET_COMMONS.h"
40 extern HYIPARCommon HYIPAR;
41 extern HYFPARCommon HYFPAR;
42 extern HYJPARCommon HYJPAR;
43 extern HYPARTCommon HYPART;
44 extern SERVICECommon SERVICE;
45 
46 #define kMax 500000
47 
48 namespace CLHEP {
49  class HepRandomEngine;
50  class RandFlat;
51  class RandPoisson;
52  class RandGauss;
53 } // namespace CLHEP
54 
55 extern CLHEP::HepRandomEngine* hjRandomEngine;
56 
57 namespace HepMC {
58  class GenEvent;
59  class GenParticle;
60  class GenVertex;
61 } // namespace HepMC
62 
63 namespace gen {
64  class Pythia6Service;
66  public:
68  ~Hydjet2Hadronizer() override;
69 
70  bool readSettings(int);
71  bool declareSpecialSettings(const std::vector<std::string>&) { return true; }
75  bool declareStableParticles(const std::vector<int>&);
76 
77  bool hadronize(); //0
78  bool decay(); //0
79  bool residualDecay();
80  void finalizeEvent();
81  void statistics();
82  const char* classname() const;
83 
84  //________________________________________
85 
86  void SetVolEff(double value) { fVolEff = value; }
87  double GetVolEff() { return fVolEff; }
88  bool RunDecays() override { return (fDecay > 0 ? kTRUE : kFALSE); }
89  double GetWeakDecayLimit() override { return fWeakDecay; }
90 
92 
93  double f(double);
94  double f2(double, double, double);
95 
96  double SimpsonIntegrator(double, double, double, double);
97  double SimpsonIntegrator2(double, double, double, double);
98  double MidpointIntegrator2(double, double, double, double);
99  double CharmEnhancementFactor(double, double, double, double);
100 
101  private:
102  void doSetRandomEngine(CLHEP::HepRandomEngine* v) override;
103  void rotateEvtPlane();
105  HepMC::GenParticle* build_hyjet2(int index, int barcode);
106  HepMC::GenVertex* build_hyjet2_vertex(int i, int id);
108 
109  std::vector<std::string> const& doSharedResources() const override { return theSharedResources; }
110  static const std::vector<std::string> theSharedResources;
111 
112  inline double nuclear_radius() const;
113 
114  double fVolEff; // the effective volume
115 
116  // the list of initial state parameters
117 
118  //int fNevnt; // number of events
119  double fSqrtS; // cms energy per nucleon
120  double fAw; // atomic number of colliding nuclei
121  int fIfb; // flag of type of centrality generation (=0 is fixed by fBfix, not 0
122  // impact parameter is generated in each event between fBfmin
123  // and fBmax according with Glauber model (f-la 30)
124  double fBmin; // minimum impact parameter in units of nuclear radius RA
125  double fBmax; // maximum impact parameter in units of nuclear radius RA
126  double fBfix; // fix impact parameter in units of nuclear radius RA
127 
128  double fT; // chemical freeze-out temperature in GeV
129  double fMuB; // baryon potential
130  double fMuS; // strangeness potential
131  double fMuC; // charm potential
132  double fMuI3; // isospin potential
133  double fThFO; // thermal freeze-out temperature T^th in GeV
134  double fMu_th_pip; // effective chemical potential of positivly charged pions at thermal in GeV
135 
136  double fTau; // proper time value
137  double fSigmaTau; // its standart deviation (emission duration)
138  double fR; // maximal transverse radius
139  double fYlmax; // maximal longitudinal rapidity
140  double fUmax; // maximal transverse velocity multiplaed on \gamma_r
141  double fDelta; // momentum asymmetry parameter
142  double fEpsilon; // coordinate asymmetry parameter
143  int fIfDeltaEpsilon; // flag to specify fDelta and fEpsilon values(=0 user's ones, >=1 parametrized)
144 
145  int fDecay; // flag to switch on/off hadron decays (=0 decays off, >=1 decays on), (default: 1)
146  double fWeakDecay; // flag to switch on/off weak hadron decays <0: decays off, >0: decays on, (default: 0)
147  int fPythDecay; // Flag to choose how to decay resonances in high-pt part, fPythDecay: 0 by PYTHIA decayer,
148  // 1 by FASTMC decayer(mstj(21)=0)
149 
150  int fEtaType; // flag to choose rapidity distribution, if fEtaType<=0,
151  // then uniform rapidity distribution in [-fYlmax,fYlmax] if fEtaType>0,
152  // then Gaussian with dispertion = fYlmax
153 
154  int fTMuType; // flag to use calculated chemical freeze-out temperature,
155  // baryon potential and strangeness potential as a function of fSqrtS
156 
157  double fCorrS; // flag and value to include strangeness supression factor
158  int fCharmProd; // flag to include statistical charm production
159  double fCorrC; // flag and value to include charmness supression factor
160 
161  int fNhsel; // flag to switch on/off jet and hydro-state production (0: jet
162  // production off and hydro on, 1: jet production on and jet quenching
163  // off and hydro on, 2: jet production on and jet quenching on and
164  // hydro on, 3: jet production on and jet quenching off and hydro
165  // off, 4: jet production on and jet quenching on and hydro off
166  int fPyhist; // Suppress PYTHIA particle history (=1 only final state particles from hard part; =0 include full particle history)
167  int fIshad; // flag to switch on/off impact parameter dependent nuclear
168  // shadowing for gluons and light sea quarks (u,d,s) (0: shadowing off,
169  // 1: shadowing on for fAw=207, 197, 110, 40, default: 1
170 
171  double fPtmin; // minimal transverse momentum transfer p_T of hard
172  // parton-parton scatterings in GeV (the PYTHIA parameter ckin(3)=fPtmin)
173 
174  // PYQUEN energy loss model parameters:
175 
176  double fT0; // initial temperature (in GeV) of QGP for
177  // central Pb+Pb collisions at mid-rapidity (initial temperature for other
178  // centralities and atomic numbers will be calculated automatically) (allowed range is 0.2<fT0<2)
179 
180  double fTau0; // proper QGP formation time in fm/c (0.01<fTau0<10)
181  int fNf; // number of active quark flavours N_f in QGP fNf=0, 1,2 or 3
182  int fIenglu; // flag to fix type of in-medium partonic energy loss
183  // (0: radiative and collisional loss, 1: radiative loss only, 2:
184  // collisional loss only) (default: 0);
185  int fIanglu; // flag to fix type of angular distribution of in-medium emitted
186  // gluons (0: small-angular, 1: wide-angular, 2:collinear) (default: 0).
187 
188  bool embedding_; // Switch for embedding mode
189  bool rotate_; // Switch to rotate event plane
191  int nsub_; // number of sub-events
192  int nhard_; // multiplicity of PYTHIA(+PYQUEN)-induced particles in event
193  int nsoft_; // multiplicity of HYDRO-induced particles in event
194  double phi0_; // Event plane angle
195  double sinphi0_;
196  double cosphi0_;
198 
199  unsigned int pythiaPylistVerbosity_; // pythia verbosity; def=1
200  unsigned int maxEventsToPrint_; // Events to print if verbosity
201 
203 
204  int fNPartTypes; //counter of hadron species
205  int fPartEnc[1000]; //Hadron encodings. Maximal number of hadron species is 1000!!!
206  double fPartMult[2000]; //Multiplicities of hadron species
207  double fPartMu[2000]; //Chemical potentials of hadron species
208  double fMuTh[1000]; //Chemical potentials at thermal freezeout of hadron species
209 
210  //open charm
211  double fNocth;
212  double fNccth;
213 
216 
218  double psiforv3;
219  float Bgen, Sigin, Sigjet;
220  float Px[kMax];
221  float Py[kMax];
222  float Pz[kMax];
223  float E[kMax];
224  float X[kMax];
225  float Y[kMax];
226  float Z[kMax];
227  float T[kMax];
228  int pdg[kMax];
229  int Mpdg[kMax];
230  int type[kMax];
232  int Index[kMax];
237  int final[kMax];
238 
241  };
243  // Return the nuclear radius derived from the
244  // beam/target atomic mass number.
245  return 1.15 * pow((double)fAw, 1. / 3.);
246  }
247 } // namespace gen
248 #endif
void SetVolEff(double value)
bool declareStableParticles(const std::vector< int > &)
edm::ParameterSet pset
ParticleAllocator allocator
#define HYJPAR
Definition: HYJET_COMMONS.h:69
Hydjet2Hadronizer(const edm::ParameterSet &)
void add_heavy_ion_rec(HepMC::GenEvent *evt)
#define HYPART
unsigned int pythiaPylistVerbosity_
double SimpsonIntegrator2(double, double, double, double)
double MidpointIntegrator2(double, double, double, double)
double SimpsonIntegrator(double, double, double, double)
static const std::vector< std::string > theSharedResources
double f2(double, double, double)
double v[5][pyjets_maxn]
std::list< Particle > List_t
Definition: Particle.h:174
double nuclear_radius() const
#define HYFPAR
Definition: HYJET_COMMONS.h:99
HepMC::GenVertex * build_hyjet2_vertex(int i, int id)
Pythia6Service * pythia6Service_
edm::Service< TFileService > fs
std::vector< std::string > const & doSharedResources() const override
bool get_particles(HepMC::GenEvent *evt)
double CharmEnhancementFactor(double, double, double, double)
void doSetRandomEngine(CLHEP::HepRandomEngine *v) override
CLHEP::HepRandomEngine * hjRandomEngine
#define HYIPAR
Definition: HYJET_COMMONS.h:26
#define SERVICE
Definition: HYJET_COMMONS.h:38
const char * classname() const
bool declareSpecialSettings(const std::vector< std::string > &)
HepMC::GenParticle * build_hyjet2(int index, int barcode)
bool initializeForExternalPartons()
bool RunDecays() override
double GetWeakDecayLimit() override
#define kMax
long double T
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29