]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/Glauber/AliGlauberMC.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWG / Glauber / AliGlauberMC.h
CommitLineData
ec852657 1#ifndef ALIGLAUBERMC_H
2#define ALIGLAUBERMC_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7////////////////////////////////////////////////////////////////////////////////
8//
9// Glauber MC
10//
11// origin: PHOBOS experiment
12// alification: Mikolaj Krzewicki, Nikhef, mikolaj.krzewicki@cern.ch
106d1ca1 13// update: You Zhou, Nikhef, yzhou@nikhef.nl :)
ec852657 14////////////////////////////////////////////////////////////////////////////////
15
16#include "AliGlauberNucleus.h"
19f030d3 17#include <Riostream.h>
7288f660 18#include <TNamed.h>
19
ec852657 20class TObjArray;
21class TNtuple;
22
3a7af7bd 23using std::cout;
24using std::endl;
25
ec852657 26class AliGlauberMC : public TNamed {
ec852657 27public:
7288f660 28 enum EdNdEtaType { kSimple,
29 kNBD,
30 kNBDSV,
31 kTwoNBD,
32 kGBW,
33 kNone };
34
4d264dfa 35 AliGlauberMC(Option_t* NA = "Pb", Option_t* NB = "Pb", Double_t xsect = 64);
566fc3d0 36 virtual ~AliGlauberMC();
37 AliGlauberMC(const AliGlauberMC& in);
38 AliGlauberMC& operator=(const AliGlauberMC& in);
ec852657 39 void Draw(Option_t* option);
bb442091 40
41 void Run(Int_t nevents);
42 Bool_t NextEvent(Double_t bgen=-1);
43 Bool_t CalcEvent(Double_t bgen);
44
45 //various ways to calculate multiplicity
26f16011 46 Double_t GetdNdEta() const;
47 Double_t GetdNdEtaSimple( const Double_t* param ) const;
48 Double_t GetdNdEtaGBW( const Double_t* param ) const;
7288f660 49 Double_t GetdNdEtaNBD( const Double_t* param ) const;
50 Double_t GetdNdEtaNBDSV( const Double_t* param ) const;
51 Double_t GetdNdEtaTwoNBD( const Double_t* param ) const;
1b4934d5 52 Double_t GetEccentricity() const;
2c0ff1e6 53 Double_t GetStoa() const;
bb442091 54 Double_t GetEccentricityColl() const;
4d264dfa 55 Double_t GetEccentricityCom() const;
bb442091 56 Double_t GetEccentricityPart() const;
106d1ca1 57 Double_t GetEpsilon2Part() const;
58 Double_t GetEpsilon3Part() const;
59 Double_t GetEpsilon4Part() const;
60 Double_t GetEpsilon5Part() const;
9a5780fa 61 Double_t GetEpsilon2Coll() const;
62 Double_t GetEpsilon3Coll() const;
63 Double_t GetEpsilon4Coll() const;
64 Double_t GetEpsilon5Coll() const;
4d264dfa 65 Double_t GetEpsilon2Com() const;
66 Double_t GetEpsilon3Com() const;
67 Double_t GetEpsilon4Com() const;
68 Double_t GetEpsilon5Com() const;
8f9ee6e7 69 Double_t GetPsi2() const;
70 Double_t GetPsi3() const;
71 Double_t GetPsi4() const;
72 Double_t GetPsi5() const;
bb442091 73 Double_t GetEccentricityPartColl() const;
4d264dfa 74 Double_t GetEccentricityPartCom() const;
43215add 75 Double_t GetB() const {return fBMC;}
ec852657 76 Double_t GetBMin() const {return fBMin;}
77 Double_t GetBMax() const {return fBMax;}
78 Int_t GetNcoll() const {return fNcoll;}
79 Int_t GetNpart() const {return fNpart;}
80 Int_t GetNpartFound() const {return fMaxNpartFound;}
81 TNtuple* GetNtuple() const {return fnt;}
82 TObjArray *GetNucleons();
83 Double_t GetTotXSect() const;
84 Double_t GetTotXSectErr() const;
566fc3d0 85 void Reset();
26f16011 86 AliGlauberNucleus &GetNucA() {return fANucleus;}
87 AliGlauberNucleus &GetNucB() {return fBNucleus;}
88
bb442091 89 static Double_t NegativeBinomialDistribution(Int_t x, Int_t k, Double_t nmean);
fee95d0f 90 Int_t NegativeBinomialRandom(Int_t k, Double_t nmean) const;
7288f660 91 Int_t NegativeBinomialRandomSV(Double_t nbar, Double_t k) const;
fee95d0f 92 Int_t DoubleNegativeBinomialRandom(Int_t k1, Double_t nmean1, Int_t k2, Double_t nmean2, Double_t alpha) const;
7288f660 93 Double_t* GetdNdEtaParam() {return fdNdEtaParam;}
94 void SetdNdEtaType(EdNdEtaType method) {fMultType=method;}
bb442091 95 void SetBmin(Double_t bmin) {fBMin = bmin;}
96 void SetBmax(Double_t bmax) {fBMax = bmax;}
bb442091 97 void SetMinDistance(Double_t d) {fANucleus.SetMinDist(d); fBNucleus.SetMinDist(d);}
14244e14 98 void SetDoPartProduction(Bool_t b) { fDoPartProd = b; }
99 void Setr(Double_t r) {fANucleus.SetR(r); fBNucleus.SetR(r);}
100 void Seta(Double_t a) {fANucleus.SetA(a); fBNucleus.SetA(a);}
22e47719 101 void SetDoFluc(Double_t omega, Double_t sig0, Double_t lam, Bool_t on=kTRUE)
102 {fDoFluc=on;fOmega=omega;fSig0=sig0;fLambda=lam;}
ec852657 103 static void PrintVersion() {cout << "AliGlauberMC " << Version() << endl;}
bb442091 104 static const char *Version() {return "v1.2";}
43215add 105 static void RunAndSaveNtuple( Int_t n,
106 const Option_t *sysA="Pb",
107 const Option_t *sysB="Pb",
4d264dfa 108 Double_t signn=64,
ec852657 109 Double_t mind=0.4,
14244e14 110 Double_t r=6.62,
111 Double_t a=0.546,
112 const char *fname="glau_pbpb_ntuple.root");
43215add 113 void RunAndSaveNucleons( Int_t n,
114 const Option_t *sysA,
115 const Option_t *sysB,
bb442091 116 Double_t signn,
117 Double_t mind,
118 Bool_t verbose,
119 const char *fname);
120
43215add 121private:
122 AliGlauberNucleus fANucleus; //Nucleus A
123 AliGlauberNucleus fBNucleus; //Nucleus B
124 Double_t fXSect; //Nucleon-nucleon cross section
125 TObjArray* fNucleonsA; //Array of nucleons in nucleus A
126 TObjArray* fNucleonsB; //Array of nucleons in nucleus B
127 Int_t fAN; //Number of nucleons in nucleus A
998de9b9 128 Int_t fQAN; //Number of nucleons in nucleus A
43215add 129 Int_t fBN; //Number of nucleons in nucleus B
998de9b9 130 Int_t fQBN; //Number of nucleons in nucleus B
43215add 131 TNtuple* fnt; //Ntuple for results (created, but not deleted)
132 Double_t fMeanX2; //<x^2> of wounded nucleons
133 Double_t fMeanY2; //<y^2> of wounded nucleons
134 Double_t fMeanXY; //<xy> of wounded nucleons
2c0ff1e6 135 Double_t fMeanX2Parts; //<x^2> of wounded nucleons
136 Double_t fMeanY2Parts; //<y^2> of wounded nucleons
137 Double_t fMeanXYParts; //<xy> of wounded nucleons
138 Double_t fMeanXParts; //<x> of wounded nucleons
43215add 139 Double_t fMeanYParts; //<y> of wounded nucleons
2c0ff1e6 140 Double_t fMeanOXParts; //<x> of wounded nucleons
141 Double_t fMeanOYParts; //<y> of wounded nucleons
43215add 142 Double_t fMeanXColl; //<x> of binary collisions
143 Double_t fMeanYColl; //<y> of binary collisions
2c0ff1e6 144 Double_t fMeanOXColl; //<x> of binary collisions
145 Double_t fMeanOYColl; //<y> of binary collisions
43215add 146 Double_t fMeanX2Coll; //<x^2> of binary collisions
147 Double_t fMeanY2Coll; //<y^2> of binary collisions
148 Double_t fMeanXYColl; //<xy> of binary collisions
4d264dfa 149 Double_t fMeanXCom; //<x> of combine
150 Double_t fMeanYCom; //<y> of
151 Double_t fMeanOXCom; //<x> of
152 Double_t fMeanOYCom; //<y> of
153 Double_t fMeanX2Com; //<x^2> of
154 Double_t fMeanY2Com; //<y^2> of
155 Double_t fMeanXYCom; //<xy> of
43215add 156 Double_t fMeanXSystem; //<x> of all nucleons
157 Double_t fMeanYSystem; //<x> of all nucleons
158 Double_t fMeanXA; //<x> of nucleons in nucleus A
159 Double_t fMeanYA; //<x> of nucleons in nucleus A
160 Double_t fMeanXB; //<x> of nucleons in nucleus B
9a5780fa 161 Double_t fMeanYB; //<x> of nucleons in nucleus B
2c0ff1e6 162 Double_t fMeanOXA; //<x> of nucleons in nucleus A
163 Double_t fMeanOYA; //<x> of nucleons in nucleus A
164 Double_t fMeanOXB; //<x> of nucleons in nucleus B
165 Double_t fMeanOYB; //<x> of nucleons in nucleus B
43215add 166 Double_t fBMC; //Impact parameter (b)
167 Int_t fEvents; //Number of events with at least one collision
168 Int_t fTotalEvents; //All events within selected impact parameter range
169 Double_t fBMin; //Minimum impact parameter to be generated
170 Double_t fBMax; //Maximum impact parameter to be generated
2c0ff1e6 171 Double_t fdNdEtaParam[10];//Parameters for multiplicity calculation: meaning depends on method selection
7288f660 172 EdNdEtaType fMultType;//mutliplicity method selection
43215add 173 Int_t fMaxNpartFound; //Largest value of Npart obtained
2c0ff1e6 174 Int_t fONpart;
175 Int_t fONcoll;
4d264dfa 176 Double_t fONcom;
2c0ff1e6 177 Int_t fNpart; //Number of wounded (participating) nucleons in current event
43215add 178 Int_t fNcoll; //Number of binary collisions in current event
95916d44 179 Int_t fNcollw; //Number of binary collisions in current event
4d264dfa 180 Double_t fNcom;
106d1ca1 181 Double_t fMeanr2; //----------<r^2> of wounded nucleons
182 Double_t fMeanr3; //----------<r^3> of wounded nucleons
183 Double_t fMeanr4; //----------<r^4> of wounded nucleons
184 Double_t fMeanr5; //----------<r^5> of wounded nucleons
185 Double_t fMeanr2Cos2Phi; //------<r^2*cos2phi> of wounded nucleons
186 Double_t fMeanr2Sin2Phi; //------<r^2*sin2phi> of wounded nucleons
187 Double_t fMeanr2Cos3Phi; //------<r^2*cos3phi> of wounded nucleons
188 Double_t fMeanr2Sin3Phi; //------<r^2*sin3phi> of wounded nucleons
189 Double_t fMeanr2Cos4Phi; //------<r^2*cos4phi> of wounded nucleons
190 Double_t fMeanr2Sin4Phi; //------<r^2*sin4phi> of wounded nucleons
191 Double_t fMeanr2Cos5Phi; //------<r^2*cos5phi> of wounded nucleons
192 Double_t fMeanr2Sin5Phi; //------<r^2*sin5phi> of wounded nucleons
193 Double_t fMeanr3Cos3Phi; //------<r^3*cos3phi> of wounded nucleons
194 Double_t fMeanr3Sin3Phi; //------<r^3*sin3phi> of wounded nucleons
195 Double_t fMeanr4Cos4Phi; //------<r^4*cos4phi> of wounded nucleons
196 Double_t fMeanr4Sin4Phi; //------<r^4*sin4phi> of wounded nucleons
197 Double_t fMeanr5Cos5Phi; //------<r^5*cos5phi> of wounded nucleons
198 Double_t fMeanr5Sin5Phi; //------<r^5*sin5phi> of wounded nucleons
9a5780fa 199 Double_t fMeanr2Coll; //----------<r^2> of wounded nucleons
200 Double_t fMeanr3Coll; //----------<r^3> of wounded nucleons
201 Double_t fMeanr4Coll; //----------<r^4> of wounded nucleons
202 Double_t fMeanr5Coll; //----------<r^5> of wounded nucleons
203 Double_t fMeanr2Cos2PhiColl; //------<r^2*cos2phi>
204 Double_t fMeanr2Sin2PhiColl; //------<r^2*sin2phi>
205 Double_t fMeanr2Cos3PhiColl; //------<r^2*cos3phi>
206 Double_t fMeanr2Sin3PhiColl; //------<r^2*sin3phi>
207 Double_t fMeanr2Cos4PhiColl; //------<r^2*cos4phi>
208 Double_t fMeanr2Sin4PhiColl; //------<r^2*sin4phi>
209 Double_t fMeanr2Cos5PhiColl; //------<r^2*cos5phi>
210 Double_t fMeanr2Sin5PhiColl; //------<r^2*sin5phi>
211 Double_t fMeanr3Cos3PhiColl; //------<r^3*cos3phi>
212 Double_t fMeanr3Sin3PhiColl; //------<r^3*sin3phi>
213 Double_t fMeanr4Cos4PhiColl; //------<r^4*cos4phi>
214 Double_t fMeanr4Sin4PhiColl; //------<r^4*sin4phi>
215 Double_t fMeanr5Cos5PhiColl; //------<r^5*cos5phi>
216 Double_t fMeanr5Sin5PhiColl; //------<r^5*sin5phi>
4d264dfa 217 Double_t fMeanr2Com; //----------<r^2> of wounded nucleons
218 Double_t fMeanr3Com; //----------<r^3> of wounded nucleons
219 Double_t fMeanr4Com; //----------<r^4> of wounded nucleons
220 Double_t fMeanr5Com; //----------<r^5> of wounded nucleons
221 Double_t fMeanr2Cos2PhiCom; //------<r^2*cos2phi>
222 Double_t fMeanr2Sin2PhiCom; //------<r^2*sin2phi>
223 Double_t fMeanr2Cos3PhiCom; //------<r^2*cos3phi>
224 Double_t fMeanr2Sin3PhiCom; //------<r^2*sin3phi>
225 Double_t fMeanr2Cos4PhiCom; //------<r^2*cos4phi>
226 Double_t fMeanr2Sin4PhiCom; //------<r^2*sin4phi>
227 Double_t fMeanr2Cos5PhiCom; //------<r^2*cos5phi>
228 Double_t fMeanr2Sin5PhiCom; //------<r^2*sin5phi>
229 Double_t fMeanr3Cos3PhiCom; //------<r^3*cos3phi>
230 Double_t fMeanr3Sin3PhiCom; //------<r^3*sin3phi>
231 Double_t fMeanr4Cos4PhiCom; //------<r^4*cos4phi>
232 Double_t fMeanr4Sin4PhiCom; //------<r^4*sin4phi>
233 Double_t fMeanr5Cos5PhiCom; //------<r^5*cos5phi>
234 Double_t fMeanr5Sin5PhiCom; //------<r^5*sin5phi>
106d1ca1 235 //Double_t fPsi2;
2c0ff1e6 236 Double_t fSx2Parts; //Variance of x of wounded nucleons
237 Double_t fSy2Parts; //Variance of y of wounded nucleons
238 Double_t fSxyParts; //Covariance of x and y of wounded nucleons
43215add 239 Double_t fSx2Coll; //Variance of x of binaruy collisions
240 Double_t fSy2Coll; //Variance of y of binaruy collisions
241 Double_t fSxyColl; //Covariance of x and y of binaruy collisions
4d264dfa 242 Double_t fSx2Com; //Variance of x of binaruy collisions
243 Double_t fSy2Com; //Variance of y of binaruy collisions
244 Double_t fSxyCom; //Covariance of x and y of binaruy collisions
43215add 245 Double_t fX; //hard particle production fraction
246 Double_t fNpp; //Multiplicity normalization
247 Bool_t fDoPartProd; //=1 then particle production on
22e47719 248 Double_t fBNN; //average NN impact parameter
249 Bool_t fDoFluc; //=kTRUE then fluc sigma (only useful for pPb)
250 Double_t fOmega; //fluctuation parameter
251 Double_t fSig0; //regularization parameter
252 Double_t fLambda; //lambda parameter
253 TF1 *fSigFluc; //!parameterization for fluctuating sigNN
43215add 254 Bool_t CalcResults(Double_t bgen);
255
22e47719 256 ClassDef(AliGlauberMC,4)
ec852657 257};
258
259#endif