]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowTools/glauberMC/AliGlauberMC.h
remove compiler warnings
[u/mrichter/AliRoot.git] / PWG2 / FLOW / AliFlowTools / glauberMC / AliGlauberMC.h
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
13 //
14 ////////////////////////////////////////////////////////////////////////////////
15
16 #include "AliGlauberNucleus.h"
17
18 #include <Riostream.h>
19 class TNamed;
20 class TObjArray;
21 class TNtuple;
22 class TArray;
23
24 class AliGlauberMC : public TNamed {
25 private:
26    AliGlauberNucleus fANucleus;       //Nucleus A
27    AliGlauberNucleus fBNucleus;       //Nucleus B
28    Double_t     fXSect;          //Nucleon-nucleon cross section
29    TObjArray*   fNucleonsA;      //Array of nucleons in nucleus A
30    TObjArray*   fNucleonsB;      //Array of nucleons in nucleus B
31    Int_t        fAN;             //Number of nucleons in nucleus A
32    Int_t        fBN;             //Number of nucleons in nucleus B
33    TNtuple*     fnt;             //Ntuple for results (created, but not deleted)
34    Double_t     fMeanX2;         //<x^2> of wounded nucleons
35    Double_t     fMeanY2;         //<y^2> of wounded nucleons
36    Double_t     fMeanXY;         //<xy> of wounded nucleons
37    Double_t     fMeanXParts;     //<x> of wounded nucleons
38    Double_t     fMeanYParts;     //<y> of wounded nucleons
39    Double_t     fMeanXColl;      //<x> of binary collisions
40    Double_t     fMeanYColl;      //<y> of binary collisions
41    Double_t     fMeanX2Coll;     //<x^2> of binary collisions
42    Double_t     fMeanY2Coll;     //<y^2> of binary collisions
43    Double_t     fMeanXYColl;     //<xy> of binary collisions
44    Double_t     fMeanXSystem;    //<x> of all nucleons
45    Double_t     fMeanYSystem;    //<x> of all nucleons  
46    Double_t     fMeanX_A;        //<x> of nucleons in nucleus A
47    Double_t     fMeanY_A;        //<x> of nucleons in nucleus A
48    Double_t     fMeanX_B;        //<x> of nucleons in nucleus B
49    Double_t     fMeanY_B;        //<x> of nucleons in nucleus B
50    Double_t     fB_MC;           //Impact parameter (b)
51    Int_t        fEvents;         //Number of events with at least one collision
52    Int_t        fTotalEvents;    //All events within selected impact parameter range
53    Double_t     fBMin;           //Minimum impact parameter to be generated
54    Double_t     fBMax;           //Maximum impact parameter to be generated
55    Double_t         fdNdEtaParam[2];       //Parameters: nnp, x
56    Double_t     fdNdEtaGBWParam[3];  //Parameters: delta, lambda, snn
57    Double_t     fdNdEtaNBDParam[3];       //Parameters:  k, nmean, beta
58    Double_t     fdNdEtaTwoNBDParam[6];    //Parameters: k1, nmean1, k2, nmean2, alpha, beta
59    Int_t        fMaxNpartFound;  //Largest value of Npart obtained
60    Int_t        fNpart;          //Number of wounded (participating) nucleons in current event
61    Int_t        fNcoll;          //Number of binary collisions in current event
62    Double_t     fSx2;            //Variance of x of wounded nucleons
63    Double_t     fSy2;            //Variance of y of wounded nucleons
64    Double_t     fSxy;            //Covariance of x and y of wounded nucleons
65    Double_t     fSx2Coll;            //Variance of x of binaruy collisions
66    Double_t     fSy2Coll;            //Variance of y of binaruy collisions
67    Double_t     fSxyColl;            //Covariance of x and y of binaruy collisions
68    Double_t     fX;              //hard particle production fraction
69    Double_t     fNpp;            //Multiplicity normalization
70    Bool_t       CalcResults(Double_t bgen);
71
72 public:
73    AliGlauberMC(Option_t* NA = "Pb", Option_t* NB = "Pb", Double_t xsect = 72);
74    virtual     ~AliGlauberMC();
75    AliGlauberMC(const AliGlauberMC& in);
76    AliGlauberMC& operator=(const AliGlauberMC& in);
77    void         Draw(Option_t* option);
78
79    void         Run(Int_t nevents);
80    Bool_t       NextEvent(Double_t bgen=-1);
81    Bool_t       CalcEvent(Double_t bgen);
82
83    //various ways to calculate multiplicity
84    Double_t     GetdNdEta(    Double_t nnp=8.0,
85                               Double_t x=0.13 );
86    Double_t     GetdNdEtaGBW( Double_t delta=0.79,
87                               Double_t lambda=0.288,
88                               Double_t snn=30.25 );
89    Double_t     GetdNdEtaNBD(     Int_t k=3,
90                               Double_t nmean = 4,
91                               Double_t beta = 0.13 );
92    Double_t     GetdNdEtaTwoNBD(  Int_t k1=3,
93                               Double_t nmean1=4,
94                               Int_t k2=2,
95                               Double_t nmean2=11,
96                               Double_t alpha=0.4,
97                               Double_t beta=0.13 );  
98
99    Double_t     GetEccentricity()    const;
100    Double_t     GetEccentricityColl()      const;
101    Double_t     GetEccentricityPart()      const;
102    Double_t     GetEccentricityPartColl()  const;
103    Double_t     GetB()               const {return fB_MC;}
104    Double_t     GetBMin()            const {return fBMin;}
105    Double_t     GetBMax()            const {return fBMax;}
106    Int_t        GetNcoll()           const {return fNcoll;}
107    Int_t        GetNpart()           const {return fNpart;}
108    Int_t        GetNpartFound()      const {return fMaxNpartFound;}
109    TNtuple*     GetNtuple()          const {return fnt;}
110    TObjArray   *GetNucleons();
111    Double_t     GetTotXSect()        const;
112    Double_t     GetTotXSectErr()     const;
113    void         Reset();
114    static Double_t      NegativeBinomialDistribution(Int_t x, Int_t k, Double_t nmean);
115    Int_t NegativeBinomialRandom(Int_t k, Double_t nmean);
116    Int_t DoubleNegativeBinomialRandom(Int_t k1, Double_t nmean1, Int_t k2, Double_t nmean2, Double_t alpha);
117    void   SetBmin(Double_t bmin)      {fBMin = bmin;}
118    void   SetBmax(Double_t bmax)      {fBMax = bmax;}
119    void   SetdNdEtaParam( Double_t nnp = 8., Double_t x = 0.13);
120    void   SetdNdEtaGBWParam( Double_t delta = 0.79, Double_t lambda = 0.288, Double_t snn = 30.25);
121    void   SetdNdEtaNBDParam(Double_t k=3, Double_t nmean=4, Double_t beta=0.13);
122    void   SetdNdEtaTwoNBDParam(Double_t alpha = 0.4, Double_t k1 = 3, Double_t nmean1 = 4., Double_t k2 = 2., Double_t nmean2 = 11., Double_t beta=0.13);
123    void   SetMinDistance(Double_t d)  {fANucleus.SetMinDist(d); fBNucleus.SetMinDist(d);}
124    static void       PrintVersion()         {cout << "AliGlauberMC " << Version() << endl;}
125    static const char *Version()             {return "v1.2";}
126    static void       runAndSaveNtuple( Int_t n,
127                                        Option_t *sysA="Au",
128                                        Option_t *sysB="Au",
129                                        Double_t signn=42,
130                                        Double_t mind=0.4,
131                                        const char *fname="glau_auau_ntuple.root");
132    void runAndSaveNucleons( Int_t n,
133                             Option_t *sysA,
134                             Option_t *sysB,
135                             Double_t signn,
136                             Double_t mind,
137                             Bool_t verbose,
138                             const char *fname);
139    
140    ClassDef(AliGlauberMC,3)
141 };
142
143 #endif