]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/AliFlowTools/glauberMC/AliGlauberMC.h
cleanup of structure
[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 class TNamed;
19 class TObjArray;
20 class TNtuple;
21
22 class AliGlauberMC : public TNamed {
23 private:
24    AliGlauberNucleus fANucleus;       //Nucleus A
25    AliGlauberNucleus fBNucleus;       //Nucleus B
26    Double_t     fXSect;          //Nucleon-nucleon cross section
27    TObjArray*   fNucleonsA;      //Array of nucleons in nucleus A
28    TObjArray*   fNucleonsB;      //Array of nucleons in nucleus B
29    Int_t        fAN;             //Number of nucleons in nucleus A
30    Int_t        fBN;             //Number of nucleons in nucleus B
31    TNtuple*     fnt;             //Ntuple for results (created, but not deleted)
32    Double_t     fMeanX2;         //<x^2> of wounded nucleons
33    Double_t     fMeanY2;         //<y^2> of wounded nucleons
34    Double_t     fMeanXY;         //<xy> of wounded nucleons
35    Double_t     fMeanXParts;     //<x> of wounded nucleons
36    Double_t     fMeanYParts;     //<x> of wounded nucleons
37    Double_t     fMeanXSystem;    //<x> of all nucleons
38    Double_t     fMeanYSystem;    //<x> of all nucleons  
39    Double_t     fMeanX_A;        //<x> of nucleons in nucleus A
40    Double_t     fMeanY_A;        //<x> of nucleons in nucleus A
41    Double_t     fMeanX_B;        //<x> of nucleons in nucleus B
42    Double_t     fMeanY_B;        //<x> of nucleons in nucleus B
43    Double_t     fB_MC;           //Impact parameter (b)
44    Int_t        fEvents;         //Number of events with at least one collision
45    Int_t        fTotalEvents;    //All events within selected impact parameter range
46    Double_t     fBMin;           //Minimum impact parameter to be generated
47    Double_t     fBMax;           //Maximum impact parameter to be generated
48    Int_t        fMaxNpartFound;  //Largest value of Npart obtained
49    Int_t        fNpart;          //Number of wounded (participating) nucleons in current event
50    Int_t        fNcoll;          //Number of binary collisions in current event
51    Double_t     fSx2;            //Variance of x of wounded nucleons
52    Double_t     fSy2;            //Variance of y of wounded nucleons
53    Double_t     fSxy;            //Covariance of x and y of wounded nucleons
54    Double_t     fX;              //hard particle production fraction
55    Double_t     fNpp;            //Multiplicity normalization
56
57    Bool_t       CalcResults(Double_t bgen);
58    Bool_t       CalcEvent(Double_t bgen);
59
60 public:
61    AliGlauberMC(Option_t* NA = "Pb", Option_t* NB = "Pb", Double_t xsect = 72);
62    virtual     ~AliGlauberMC() {Reset();}
63
64    void         Draw(Option_t* option);
65    Double_t     GetdNdEta( const Double_t npp=8.0, const Double_t x=0.13 ) const;
66    Double_t     GetdNdEtaGBW( const Double_t delta=0.79,
67                               const Double_t lambda=0.288,
68                               const Double_t snn=30.25 ) const;
69    Double_t     GetEccentricity()    const;
70    Double_t     GetEccentricityPart()const;
71    Double_t     GetB()               const {return fB_MC;}
72    Double_t     GetBMin()            const {return fBMin;}
73    Double_t     GetBMax()            const {return fBMax;}
74    Int_t        GetNcoll()           const {return fNcoll;}
75    Int_t        GetNpart()           const {return fNpart;}
76    Int_t        GetNpartFound()      const {return fMaxNpartFound;}
77    TNtuple*     GetNtuple()          const {return fnt;}
78    TObjArray   *GetNucleons();
79    Double_t     GetTotXSect()        const;
80    Double_t     GetTotXSectErr()     const;
81    Bool_t       NextEvent(Double_t bgen=-1);
82    void         Reset()                    {delete fnt; fnt=0; }
83    void         Run(Int_t nevents);
84    void         SetBmin(Double_t bmin)      {fBMin = bmin;}
85    void         SetBmax(Double_t bmax)      {fBMax = bmax;}
86    void         SetMinDistance(Double_t d)  {fANucleus.SetMinDist(d); fBNucleus.SetMinDist(d);}
87
88    static void       PrintVersion()         {cout << "AliGlauberMC " << Version() << endl;}
89    static const char *Version()             {return "v1.1";}
90    static void       runAndSaveNucleons( Int_t n,                    
91                                          Option_t *sysA="Au",           
92                                          Option_t *sysB="Au",           
93                                          Double_t signn=42,           
94                                          Double_t mind=0.4,
95                                          Bool_t verbose=0,
96                                          const char *fname="glau_auau_nucleons.root" );
97    static void       runAndSaveNtuple( Int_t n,
98                                        Option_t *sysA="Au",
99                                        Option_t *sysB="Au",
100                                        Double_t signn=42,
101                                        Double_t mind=0.4,
102                                        const char *fname="glau_auau_ntuple.root");
103
104    ClassDef(AliGlauberMC,1)
105 };
106
107 #endif