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