]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FASTSIM/AliFastGlauber.h
Default arguments removed from method definitions.
[u/mrichter/AliRoot.git] / FASTSIM / AliFastGlauber.h
CommitLineData
5b3a5a5d 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 */
5
6/* $Id$ */
041f7f97 7//
8// Utility class to make simple Glauber type calculations for collision geometries:
9// Impact parameter, production points, reaction plane dependence
10//
11// Author: andreas.morsch@cern.ch
5b3a5a5d 12
13#include <TObject.h>
a2f2f511 14#include <TF2.h>
5b3a5a5d 15class TF1;
16class TF2;
17
18class AliFastGlauber : public TObject {
19 public:
20 AliFastGlauber();
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;}
041f7f97 24 void SetMaxImpact(Float_t bmax = 20.) {fgBMax = bmax;};
5b3a5a5d 25 void SetHardCrossSection(Float_t xs = 6.6) {fSigmaHard = xs;}
a2f2f511 26
2a103154 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 WStaa (Double_t *xx, Double_t *par);
33 static Double_t WSgeo (Double_t *xx, Double_t *par);
34 static Double_t WSbinary (Double_t *xx, Double_t *par);
35 static Double_t WSN (Double_t *xx, Double_t *par);
36 static Double_t WAlmond (Double_t *xx, Double_t *par);
37 static Double_t WPathLength0 (Double_t *xx, Double_t *par);
38 static Double_t WPathLength (Double_t *xx, Double_t *par);
39 static Double_t WIntRadius (Double_t *xx, Double_t *par);
40 static Double_t WEnergyDensity (Double_t *xx, Double_t *par);
f3a04204 41
5b3a5a5d 42 void Init(Int_t mode = 0);
43 void DrawWSb();
44 void DrawThickness();
45 void DrawOverlap();
46 void DrawGeo();
47 void DrawBinary();
48 void DrawN();
2a103154 49 void DrawKernel(Double_t b = 0.);
50 void DrawAlmond(Double_t b = 0.);
8de7e046 51 void DrawPathLength0(Double_t b = 0., Int_t iopt = 0);
52 void DrawPathLength(Double_t b, Int_t ni = 1000, Int_t iopt = 0);
2a103154 53 void DrawIntRadius(Double_t b = 0.);
54 void DrawEnergyDensity();
f3a04204 55
5b3a5a5d 56 Double_t CrossSection(Double_t b1, Double_t b2);
57 Double_t FractionOfHardCrossSection(Double_t b1, Double_t b2);
58 Double_t Binaries(Double_t b);
041f7f97 59 TF2* Kernel() {return fgWStarfi;}
60 TF1* Overlap() {return fgWStaa;}
5b3a5a5d 61 void SimulateTrigger(Int_t n);
62 void GetRandom(Float_t& b, Float_t& p, Float_t& mult);
c2140715 63 void GetRandom(Int_t& bin, Bool_t& hard);
5b3a5a5d 64 Float_t GetRandomImpactParameter(Float_t bmin, Float_t bmax);
a2f2f511 65
66
67 void SetLengthDefinition(Int_t def=1) { fEllDef=def; }
68 void SetCentralityClass(Double_t xsecFrLow=0.0,Double_t xsecFrUp=0.1);
69 void StoreAlmonds();
70 void GetRandomBHard(Double_t& b);
71 void GetRandomXY(Double_t& x,Double_t& y);
72 void GetRandomPhi(Double_t& phi);
73 Double_t CalculateLength(Double_t b=0.,Double_t x0=0.,Double_t y0=0.,
74 Double_t phi0=0.);
75 void GetLength(Double_t& ell,Double_t b=-1.);
76 void GetLengthsBackToBack(Double_t& ell1,Double_t& ell2,Double_t b=-1.);
77 void GetLengthsForPythia(Int_t n,Double_t* phi,Double_t* ell,
78 Double_t b=-1.);
79 void PlotBDistr(Int_t n=1000);
80 void PlotLengthDistr(Int_t n=1000,Bool_t save=kFALSE,
81 Char_t *fname="length.root");
82 void PlotLengthB2BDistr(Int_t n=1000,Bool_t save=kFALSE,
83 Char_t *fname="lengthB2B.root");
84 void PlotAlmonds();
85
5b3a5a5d 86 protected:
041f7f97 87 static TF1* fgWSb; // Wood-Saxon Function (b)
88 static TF2* fgWSbz; // Wood-Saxon Function (b, z)
89 static TF1* fgWSz; // Wood-Saxon Function (b = b0, z)
90 static TF1* fgWSta; // Thickness Function
91 static TF2* fgWStarfi; // Kernel for Overlap Function
92 static TF1* fgWStaa; // Overlap Function
93 static TF2* fgWAlmond; // Interaction Almond
94 static TF1* fgWPathLength0; // Path Length as a function of phi
95 static TF1* fgWPathLength; // Path Length as a function of phi
96 static TF1* fgWIntRadius; // Interaction Radius
97 static TF1* fgWSgeo; // dSigma/db geometric
98 static TF1* fgWSbinary; // dSigma/db binary
99 static TF1* fgWSN; // dN/db binary
100 static TF1* fgWEnergyDensity; // Energy density as a function of impact parameter
a2f2f511 101 TF2 fWAlmondFixedB[40]; // Interaction Almonds read from file
102 TF2* fWAlmondCurrent; // Interaction Almond used for length
5b3a5a5d 103
2a103154 104 Float_t fWSr0; // Wood-Saxon Parameter r0
105 Float_t fWSd; // Wood-Saxon Parameter d
106 Float_t fWSw; // Wood-Saxon Parameter w
107 Float_t fWSn; // Wood-Saxon Parameter n
108 Float_t fSigmaHard; // Hard Cross Section
041f7f97 109 static Float_t fgBMax; // Maximum Impact Parameter
5b3a5a5d 110
a2f2f511 111 Int_t fEllDef; // definition of length (see CalculateLength())
112
5b3a5a5d 113 ClassDef(AliFastGlauber,1) // Event geometry simulation in the Glauber Model
114};
115
116#endif
117
118
119