CMS 3D CMS Logo

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