Correct handling of seeds for MC on the fly trains
[u/mrichter/AliRoot.git] / TUHKMgen / TUHKMgen.h
CommitLineData
7b7936e9 1// This class provides an interface between the HYDJET++ Monte-Carlo model
2// and ROOT (by inheriting from the TGenerator class).
b1c2e580 3// Please look into the FASTMC articles for more documentation on the
4// needed parameters.
5
7b7936e9 6#ifndef TUHKMGEN_H
7#define TUHKMGEN_H
b1c2e580 8
9#ifndef ROOT_TGenerator
10#include "TGenerator.h"
11#endif
12
3fa37a65 13#ifndef INITIALSTATEHYDJET_H
7b7936e9 14#include "UHKM/InitialStateHydjet.h"
b1c2e580 15#endif
16
17#ifndef DATABASE_PDG
7b7936e9 18#include "UHKM/DatabasePDG.h"
b1c2e580 19#endif
20
21#include <string>
22using namespace std;
23
7b7936e9 24//class DatabasePDG;
25
b1c2e580 26class TUHKMgen : public TGenerator {
03896fc4 27
b1c2e580 28 public:
29 TUHKMgen();
30 virtual ~TUHKMgen();
31 virtual void Initialize();
32 virtual void GenerateEvent();
7b7936e9 33 virtual Int_t ImportParticles(TClonesArray *particles, const Option_t* option="prim");
34 virtual TObjArray* ImportParticles(const Option_t* option="prim");
b1c2e580 35 // this function makes available the PDG info in our database
36 virtual DatabasePDG* PDGInfo() const {return fInitialState->PDGInfo();}
77b9c3bb 37 virtual void GetCentrality(Double_t& b, Double_t & npart, Double_t & nbin)
38 {fInitialState->GetCentrality(b, npart, nbin);}
b1c2e580 39 // Setters
40 // set reasonable default parameters suited for central Au+Au collisions at RHIC(200GeV)
41 void SetAllParametersRHIC();
42 // set reasonable default parameters suited for central Pb+Pb collisions at LHC(5.5TeV)
43 void SetAllParametersLHC();
44
45 void SetEcms(Double_t value) {fHydjetParams.fSqrtS = value;} // CMS energy per nucleon [GeV] (<2.24 given temperature and ch pot are used)
46 void SetAw(Double_t value) {fHydjetParams.fAw = value;} // nuclei mass number
47 void SetIfb(Int_t value) {fHydjetParams.fIfb = value;} //b-simulation: 0-fix,1-distributed
48 void SetBfix(Double_t value) {fHydjetParams.fBfix = value;} // fix impact parameter
49 void SetBmin(Double_t value) {fHydjetParams.fBmin = value;} // Minimum impact parameter
50 void SetBmax(Double_t value) {fHydjetParams.fBmax = value;} // Maximum impact parameter
51 void SetChFrzTemperature(Double_t value) {fHydjetParams.fT = value;} // Temperature for the chemical freezeout [GeV]
52 void SetMuB(Double_t value) {fHydjetParams.fMuB = value;} // Baryonic chemical potential [GeV]
53 void SetMuS(Double_t value) {fHydjetParams.fMuS = value;} // Strangeness chemical potential [GeV]
54 void SetMuQ(Double_t value) {fHydjetParams.fMuI3 = value;} // Isospin chemical potential [GeV]
55 void SetThFrzTemperature(Double_t value) {fHydjetParams.fThFO = value;} // Temperature for the thermal freezeout [GeV]
56 void SetMuPionThermal(Double_t value) {fHydjetParams.fMu_th_pip = value;} // Chemical potential for pi+ at thermal freezeout [GeV]
57
58
59 void SetSeed(Int_t value) {fHydjetParams.fSeed = value;} //parameter to set the random nuber seed (=0 the current time is used
60 //to set the random generator seed, !=0 the value fSeed is
61 //used to set the random generator seed and then the state of random
62 //number generator in PYTHIA MRPY(1)=fSeed
63
64
65
66 void SetTauB(Double_t value) {fHydjetParams.fTau = value;} // Proper time for the freeze-out hypersurface [fm/c]
67 void SetSigmaTau(Double_t value) {fHydjetParams.fSigmaTau = value;} // Standard deviation for the proper time (emission duration) [fm/c]
68 void SetRmaxB(Double_t value) {fHydjetParams.fR = value;} // Maximal transverse radius [fm]
69 void SetYlMax(Double_t value) {fHydjetParams.fYlmax = value;} // Maximal fireball longitudinal rapidity
70 void SetEtaRMax(Double_t value) {fHydjetParams.fUmax = value;} // Maximal transverse velocity
71 void SetMomAsymmPar(Double_t value) {fHydjetParams.fDelta = value;} // Momentum asymmetry parameter
72 void SetCoordAsymmPar(Double_t value) {fHydjetParams.fEpsilon = value;} // Coordinate asymmetry parameter
73
74
7b7936e9 75 void SetFlagWeakDecay(Double_t value) {fHydjetParams.fWeakDecay = value;} //flag to switch on/off weak hadron decays <0: decays off, >0: decays on, (default: 0)
b1c2e580 76
77
78 void SetEtaType(Int_t value) {fHydjetParams.fEtaType = value;} // flag to choose rapidity distribution, if fEtaType<=0,
79 //then uniform rapidity distribution in [-fYlmax,fYlmax] if fEtaType>0,
80 //then Gaussian with dispertion = fYlmax
81
82
83 void SetGammaS(Double_t value) {fHydjetParams.fCorrS = value;} // Strangeness suppression parameter (if gamma_s<=0 then it will be calculated)
84 //not needed now void SetHdec(Double_t value) {fHydjetParams.fTime = value;} // Enable/disable hadronic decays (<0 no decays, >=0 decays)
85
86//PYQUEN parameters
87 void SetPyquenNhsel(Int_t value) {fHydjetParams.fNhsel = value;} // Flag to choose the type of event to be generated
88
89 void SetPyquenShad(Int_t value) {fHydjetParams.fIshad = value;} //flag to switch on/off impact parameter dependent nuclear
90 // shadowing for gluons and light sea quarks (u,d,s) (0: shadowing off,
91 // 1: shadowing on for fAw=207, 197, 110, 40, default: 1
92
93 void SetPyquenPtmin(Double_t value) {fHydjetParams.fPtmin = value;} // Pyquen input parameter for minimum Pt of parton-parton scattering (5GeV<pt<500GeV)
94 // fNhsel = 0 --> UHKM fireball, no jets
95 // fNhsel = 1 --> UHKM fireball, jets with no quenching
96 // fNhsel = 2 --> UHKM fireball, jets with quenching
97 // fNhsel = 3 --> no UHKM fireball, jets with no quenching
98 // fNhsel = 4 --> no UHKM fireball, jets with quenching
99
100 void SetPyquenT0(Double_t value) {fHydjetParams.fT0 = value;} //proper QGP formation tempereture
101 void SetPyquenTau0(Double_t value) {fHydjetParams.fTau0 = value;} //proper QGP formation time in fm/c (0.01<fTau0<10)
102 void SetPyquenNf(Int_t value) {fHydjetParams.fNf = value;} //number of active quark flavours N_f in QGP fNf=0, 1,2 or 3
103 void SetPyquenIenglu(Int_t value) {fHydjetParams.fIenglu = value;} // flag to fix type of in-medium partonic energy loss
104 //(0: radiative and collisional loss, 1: radiative loss only, 2:
105 //collisional loss only) (default: 0);
106 void SetPyquenIanglu(Int_t value) {fHydjetParams.fIanglu = value;} //flag to fix type of angular distribution of in-medium emitted
107 // gluons (0: small-angular, 1: wide-angular, 2:collinear) (default: 0).
108
109
f17399a2 110 void SetPDGParticleFile(const Char_t *name) {strncpy(fParticleFilename, name, 255);} // Set the filename containing the particle PDG info
111 void SetPDGDecayFile(const Char_t *name) {strncpy(fDecayFilename, name, 255);} // Set the filename containing the PDG decay channels info
b1c2e580 112 void SetPDGParticleStable(Int_t pdg, Bool_t value) { // Turn on/off the decay flag for a PDG particle
113 fStableFlagPDG[fStableFlagged] = pdg;
114 fStableFlagStatus[fStableFlagged++] = value;
115 }
7b7936e9 116 // void SetUseCharmParticles(Bool_t flag) {fUseCharmParticles = flag;}
117 // void SetMinimumWidth(Double_t value) {fMinWidth = value;}
118 // void SetMaximumWidth(Double_t value) {fMaxWidth = value;}
119 // void SetMinimumMass(Double_t value) {fMinMass = value;}
120 // void SetMaximumMass(Double_t value) {fMaxMass = value;}
b1c2e580 121
122 //Getters
123
7b7936e9 124 Double_t GetEcms() const {return fHydjetParams.fSqrtS;}
125 Double_t GetAw() const {return fHydjetParams.fAw;}
126 Double_t GetIfb() const {return fHydjetParams.fIfb;}
127 Double_t GetBfix() const {return fHydjetParams.fBfix;}
128 Double_t GetBmin() const {return fHydjetParams.fBmin;}
129 Double_t GetBmax() const {return fHydjetParams.fBmax;}
130 Double_t GetChFrzTemperature() const {return fHydjetParams.fT;}
131 Double_t GetMuB() const {return fHydjetParams.fMuB;}
132 Double_t GetMuS() const {return fHydjetParams.fMuS;}
133 Double_t GetMuQ() const {return fHydjetParams.fMuI3;}
134 Double_t GetThFrzTemperature() const {return fHydjetParams.fThFO;}
135 Double_t GetMuPionThermal() const {return fHydjetParams.fMu_th_pip;}
136 Int_t GetSeed() const {return fHydjetParams.fSeed;}
137 Double_t GetTauB() const {return fHydjetParams.fTau;}
138 Double_t GetSigmaTau() const {return fHydjetParams.fSigmaTau;}
139 Double_t GetRmaxB() const {return fHydjetParams.fR;}
140 Double_t GetYlMax() const {return fHydjetParams.fYlmax;}
141 Double_t GetEtaRMax() const {return fHydjetParams.fUmax;}
142 Double_t GetMomAsymmPar() const {return fHydjetParams.fDelta;}
143 Double_t GetCoordAsymmPar() const {return fHydjetParams.fEpsilon;}
144 Double_t GetFlagWeakDecay() const {return fHydjetParams.fWeakDecay;}
145 Int_t GetEtaType() const {return fHydjetParams.fEtaType;}
146 Double_t GetGammaS() const {return fHydjetParams.fCorrS;}
147 Int_t GetPyquenNhsel() const {return fHydjetParams.fNhsel;}
148 Int_t GetPyquenShad() const {return fHydjetParams.fIshad;}
149 Double_t GetPyquenPtmin() const {return fHydjetParams.fPtmin;}
150 Double_t GetPyquenT0() const {return fHydjetParams.fT0;}
151 Double_t GetPyquenTau0() const {return fHydjetParams.fTau0;}
152 Double_t GetPyquenNf() const {return fHydjetParams.fNf;}
153 Double_t GetPyquenIenglu() const {return fHydjetParams.fIenglu;}
154 Double_t GetPyquenIanglu() const {return fHydjetParams.fIanglu;}
b1c2e580 155
7b7936e9 156 const Char_t* GetPDGParticleFile() const {return fParticleFilename;}
157 const Char_t* GetPDGDecayFile() const {return fDecayFilename;}
158 // Bool_t GetUseCharmParticles(){return fUseCharmParticles;}
159 // Double_t GetMinimumWidth() {return fMinWidth;}
160 // Double_t GetMaximumWidth() {return fMaxWidth;}
161 // Double_t GetMinimumMass() {return fMinMass;}
162 // Double_t GetMaximumMass() {return fMaxMass;}
b1c2e580 163
786056a2 164 void Print(const Option_t* opt="") const;
165
03896fc4 166 protected:
167 InitialStateHydjet *fInitialState; // HYDJET++ main class which handles the entire Monte-Carlo simulation
168 ParticleAllocator fAllocator; // object which allocates/deallocates memory for the lists of particles
169 List_t fSecondariesList; // list holding the initial particles and the final state particles generated in resonance decays
170 Int_t fNPprim; // number of primary particles
171 Int_t fNPsec; // secondary particles
172 InitialParamsHydjet_t fHydjetParams; // struct holding the list of parameters for the initial state
173 // details for the PDG database
174 Char_t fParticleFilename[256]; // particle list filename
175 Char_t fDecayFilename[256]; // decay table filename
176 Int_t fStableFlagPDG[500]; // array of PDG codes flagged to be stable
177 Bool_t fStableFlagStatus[500]; // array of decay flag status
178 Int_t fStableFlagged; // number of toggled decay flags
179 // Bool_t fUseCharmParticles; // flag to turn on/off the use of charm particles
180 // Double_t fMinWidth; // minimum decay width for the particles to be used from the PDG database
181 // Double_t fMaxWidth; // maximum ----
182 // Double_t fMinMass; // minimum mass for the particles to be used from the PDG database
183 // Double_t fMaxMass; // maximum ----
184
185 void SetAllParameters();
186
187 private:
188 TUHKMgen(const TUHKMgen&);
189 TUHKMgen& operator=(const TUHKMgen&);
190
b1c2e580 191 ClassDef(TUHKMgen, 3) //Interface to FASTMC Event Generator
192};
193#endif
194
195
196
197
198
199
200