1 #ifndef ALIFASTGLAUBER_H
2 #define ALIFASTGLAUBER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 // Utility class to make simple Glauber type calculations for collision geometries:
9 // Impact parameter, production points, reaction plane dependence
11 // Author: andreas.morsch@cern.ch
18 class AliFastGlauber : public TObject {
21 virtual ~AliFastGlauber(){;}
22 void SetWoodSaxonParameters(Double_t r0, Double_t d, Double_t w, Double_t n)
23 {fWSr0 = r0; fWSd = d; fWSw = w; fWSn = n;}
24 void SetMaxImpact(Float_t bmax = 20.) {fgBMax = bmax;};
25 void SetHardCrossSection(Float_t xs = 6.6) {fSigmaHard = xs;}
27 static Double_t WSb (Double_t *xx, Double_t *par);
28 static Double_t WSbz (Double_t *xx, Double_t *par);
29 static Double_t WSz (Double_t *xx, Double_t *par);
30 static Double_t WSta (Double_t *xx, Double_t *par);
31 static Double_t WStarfi (Double_t *xx, Double_t *par);
32 static Double_t WKParticipants (Double_t *xx, Double_t *par);
33 static Double_t WParticipants (Double_t *xx, Double_t *par);
34 static Double_t WStaa (Double_t *xx, Double_t *par);
35 static Double_t WSgeo (Double_t *xx, Double_t *par);
36 static Double_t WSbinary (Double_t *xx, Double_t *par);
37 static Double_t WSN (Double_t *xx, Double_t *par);
38 static Double_t WAlmond (Double_t *xx, Double_t *par);
39 static Double_t WPathLength0 (Double_t *xx, Double_t *par);
40 static Double_t WPathLength (Double_t *xx, Double_t *par);
41 static Double_t WIntRadius (Double_t *xx, Double_t *par);
42 static Double_t WEnergyDensity (Double_t *xx, Double_t *par);
44 void Init(Int_t mode = 0);
48 void DrawParticipants();
52 void DrawKernel(Double_t b = 0.);
53 void DrawAlmond(Double_t b = 0.);
54 void DrawPathLength0(Double_t b = 0., Int_t iopt = 0);
55 void DrawPathLength(Double_t b, Int_t ni = 1000, Int_t iopt = 0);
56 void DrawIntRadius(Double_t b = 0.);
57 void DrawEnergyDensity();
59 Double_t CrossSection(Double_t b1, Double_t b2);
60 Double_t FractionOfHardCrossSection(Double_t b1, Double_t b2);
61 Double_t Binaries(Double_t b);
62 TF2* Kernel() {return fgWStarfi;}
63 TF1* Overlap() {return fgWStaa;}
64 void SimulateTrigger(Int_t n);
65 void GetRandom(Float_t& b, Float_t& p, Float_t& mult);
66 void GetRandom(Int_t& bin, Bool_t& hard);
67 Float_t GetRandomImpactParameter(Float_t bmin, Float_t bmax);
68 Float_t GetNumberOfParticipants(Float_t b);
69 void SetLengthDefinition(Int_t def=1) { fEllDef=def; }
70 void SetCentralityClass(Double_t xsecFrLow=0.0,Double_t xsecFrUp=0.1);
72 void GetRandomBHard(Double_t& b);
73 void GetRandomXY(Double_t& x,Double_t& y);
74 void GetRandomPhi(Double_t& phi);
75 Double_t CalculateLength(Double_t b=0.,Double_t x0=0.,Double_t y0=0.,
77 void GetLength(Double_t& ell,Double_t b=-1.);
78 void GetLengthsBackToBack(Double_t& ell1,Double_t& ell2,Double_t b=-1.);
79 void GetLengthsForPythia(Int_t n,Double_t* phi,Double_t* ell,
81 void PlotBDistr(Int_t n=1000);
82 void PlotLengthDistr(Int_t n=1000,Bool_t save=kFALSE,
83 Char_t *fname="length.root");
84 void PlotLengthB2BDistr(Int_t n=1000,Bool_t save=kFALSE,
85 Char_t *fname="lengthB2B.root");
89 static TF1* fgWSb; // Wood-Saxon Function (b)
90 static TF2* fgWSbz; // Wood-Saxon Function (b, z)
91 static TF1* fgWSz; // Wood-Saxon Function (b = b0, z)
92 static TF1* fgWSta; // Thickness Function
93 static TF2* fgWStarfi; // Kernel for Overlap Function
94 static TF2* fgWKParticipants; // Kernel for number of participants
95 static TF1* fgWParticipants; // Number of participants
96 static TF1* fgWStaa; // Overlap Function
97 static TF2* fgWAlmond; // Interaction Almond
98 static TF1* fgWPathLength0; // Path Length as a function of phi
99 static TF1* fgWPathLength; // Path Length as a function of phi
100 static TF1* fgWIntRadius; // Interaction Radius
101 static TF1* fgWSgeo; // dSigma/db geometric
102 static TF1* fgWSbinary; // dSigma/db binary
103 static TF1* fgWSN; // dN/db binary
104 static TF1* fgWEnergyDensity; // Energy density as a function of impact parameter
105 TF2 fWAlmondFixedB[40]; // Interaction Almonds read from file
106 TF2* fWAlmondCurrent; // Interaction Almond used for length
108 Float_t fWSr0; // Wood-Saxon Parameter r0
109 Float_t fWSd; // Wood-Saxon Parameter d
110 Float_t fWSw; // Wood-Saxon Parameter w
111 Float_t fWSn; // Wood-Saxon Parameter n
112 Float_t fSigmaHard; // Hard Cross Section
113 static Float_t fgBMax; // Maximum Impact Parameter
115 Int_t fEllDef; // definition of length (see CalculateLength())
117 ClassDef(AliFastGlauber,1) // Event geometry simulation in the Glauber Model