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