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