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