X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=FASTSIM%2FAliFastGlauber.h;h=0036b27c8ec6c4a715b7df2ba2c7ea51c696428d;hb=52ca2609b83428ede3f054e59c7c0b5c47575187;hp=623b855ccb183f80407dc827979a851cb95b36e5;hpb=83f67d086e11c91fa28431ba7adfb0e13d01e86f;p=u%2Fmrichter%2FAliRoot.git diff --git a/FASTSIM/AliFastGlauber.h b/FASTSIM/AliFastGlauber.h index 623b855ccb1..0036b27c8ec 100644 --- a/FASTSIM/AliFastGlauber.h +++ b/FASTSIM/AliFastGlauber.h @@ -4,20 +4,22 @@ * See cxx source for full Copyright notice */ /* $Id$ */ -// + // Utility class to make simple Glauber type calculations for collision geometries: // Impact parameter, production points, reaction plane dependence -// -// Author: andreas.morsch@cern.ch +// Author: Andreas Morsch +// andreas.morsch@cern.ch #include #include -#include class TF1; +class TF2; + class AliFastGlauber : public TObject { public: AliFastGlauber(); + AliFastGlauber(const AliFastGlauber& glauber); virtual ~AliFastGlauber(); void Init(Int_t mode = 0); @@ -26,7 +28,7 @@ class AliFastGlauber : public TObject { void SetWoodSaxonParametersAu() {fWSr0 = 6.38; fWSd = 0.535; fWSw = 0.; fWSn = 8.59e-4;} void SetWoodSaxonParametersPb() - {fWSr0 = 6.624; fWSd = 0.549; fWSw = 0.; fWSn = 7.69e-4;} + {fWSr0 = 6.78; fWSd = 0.54; fWSw = 0.; fWSn = 7.14e-4;} void SetMaxImpact(Float_t bmax = 20.) {fgBMax = bmax;}; void SetHardCrossSection(Float_t xs = 1.0) {fSigmaHard = xs;} void SetNNCrossSection (Float_t xs = 55.6) {fSigmaNN = xs;} @@ -34,24 +36,7 @@ class AliFastGlauber : public TObject { void SetAuAuRhic(); void SetPbPbLHC(); void SetFileName(TString &fn){fName=fn;} - void SetFileName(Char_t *fn="$(ALICE_ROOT)/FASTSIM/data/glauberPbPb.root"){fName=fn;} - - static Double_t WSb (Double_t *xx, Double_t *par); - static Double_t WSbz (Double_t *xx, Double_t *par); - static Double_t WSz (Double_t *xx, Double_t *par); - static Double_t WSta (Double_t *xx, Double_t *par); - static Double_t WStarfi (Double_t *xx, Double_t *par); - static Double_t WStaa (Double_t *xx, Double_t *par); - static Double_t WKParticipants (Double_t *xx, Double_t *par); - static Double_t WParticipants (Double_t *xx, Double_t *par); - static Double_t WSgeo (Double_t *xx, Double_t *par); - static Double_t WSbinary (Double_t *xx, Double_t *par); - static Double_t WSN (Double_t *xx, Double_t *par); - static Double_t WAlmond (Double_t *xx, Double_t *par); - static Double_t WPathLength0 (Double_t *xx, Double_t *par); - static Double_t WPathLength (Double_t *xx, Double_t *par); - static Double_t WIntRadius (Double_t *xx, Double_t *par); - static Double_t WEnergyDensity (Double_t *xx, Double_t *par); + void SetFileName(const char *fn="$(ALICE_ROOT)/FASTSIM/data/glauberPbPb.root"){fName=fn;} const TF1* GetWSB() const {return fgWSb;} const TF2* GetWSbz() const {return fgWSbz;} @@ -71,7 +56,7 @@ class AliFastGlauber : public TObject { const TF1* GetWSbinary() const {return fgWSbinary;} const TF1* GetWSN() const {return fgWSN;} const TF1* GetWEnergyDensity() const {return fgWEnergyDensity;} - const TF2* GetWAlmondFixedB(Int_t i) const {return &fgWAlmondFixedB[i];} + const TF2* GetWAlmondFixedB(Int_t i) const {return fgWAlmondFixedB[i];} Float_t GetWr0() const {return fWSr0;} Float_t GetWSd() const {return fWSd;} @@ -80,7 +65,6 @@ class AliFastGlauber : public TObject { Float_t GetSigmaHard() const {return fSigmaHard;} Float_t GetSigmaNN() const {return fSigmaNN;} Int_t GetA() const {return fA;} - Int_t GetEllDef() const {return fEllDef;} const TString* GetFileName() const {return &fName;} Float_t GetBmin() const {return fBmin;} Float_t GetBmax() const {return fBmax;} @@ -101,13 +85,16 @@ class AliFastGlauber : public TObject { Double_t CrossSection(Double_t b1, Double_t b2) const; Double_t HardCrossSection(Double_t b1, Double_t b2) const; + Double_t NHard(Double_t b1, Double_t b2) const; Double_t FractionOfHardCrossSection(Double_t b1, Double_t b2) const; Double_t Binaries(Double_t b) const; Double_t GetNumberOfBinaries(Double_t b) const; Double_t Participants(Double_t b) const; Double_t GetNumberOfParticipants(Double_t b) const; Double_t GetNumberOfCollisions(Double_t b) const; - + Double_t GetNumberOfCollisionsPerEvent(Double_t b) const; + Double_t MeanOverlap(Double_t b1, Double_t b2); + Double_t MeanNumberOfCollisionsPerEvent(Double_t b1, Double_t b2); void SimulateTrigger(Int_t n); void GetRandom(Float_t& b, Float_t& p, Float_t& mult); void GetRandom(Int_t& bin, Bool_t& hard); @@ -117,6 +104,7 @@ class AliFastGlauber : public TObject { void StoreAlmonds() const; void SetLengthDefinition(Int_t def=1) {fEllDef=def;} + Int_t GetLengthDef() const {return fEllDef;} void SetCentralityClass(Double_t xsecFrLow=0.0,Double_t xsecFrUp=0.1); void GetRandomBHard(Double_t& b); void GetRandomXY(Double_t& x,Double_t& y); @@ -134,9 +122,9 @@ class AliFastGlauber : public TObject { Double_t b=-1.); void PlotBDistr(Int_t n=1000); void PlotLengthDistr(Int_t n=1000,Bool_t save=kFALSE, - Char_t *fname="length.root"); + const char *fname="length.root"); void PlotLengthB2BDistr(Int_t n=1000,Bool_t save=kFALSE, - Char_t *fname="lengthB2B.root"); + const char *fname="lengthB2B.root"); void CalculateI0I1(Double_t& integral0,Double_t& integral1, Double_t b=0., Double_t x0=0.,Double_t y0=0.,Double_t phi0=0., @@ -149,19 +137,47 @@ class AliFastGlauber : public TObject { Double_t& integral02,Double_t& integral12, Double_t& phi, Double_t ellCut=20.,Double_t b=-1.); + void GetI0I1BackToBackAndPhiAndXY(Double_t& integral01,Double_t& integral11, + Double_t& integral02,Double_t& integral12, + Double_t& phi,Double_t& x,Double_t&y, + Double_t ellCut=20.,Double_t b=-1.); void GetI0I1BackToBack(Double_t& integral01,Double_t& integral11, Double_t& integral02,Double_t& integral12, Double_t ellCut=20.,Double_t b=-1.); void GetI0I1ForPythia(Int_t n,Double_t* phi, Double_t* integral0,Double_t* integral1, Double_t ellCut=20.,Double_t b=-1.); + void GetI0I1ForPythiaAndXY(Int_t n,Double_t* phi, + Double_t* integral0,Double_t* integral1, + Double_t&x, Double_t &y, + Double_t ellCut=20.,Double_t b=-1.); void PlotI0I1Distr(Int_t n=1000,Double_t ellCut=20.,Bool_t save=kFALSE, - Char_t *fname="i0i1.root"); + const char *fname="i0i1.root"); void PlotI0I1B2BDistr(Int_t n=1000,Double_t ellCut=20.,Bool_t save=kFALSE, - Char_t *fname="i0i1B2B.root"); + const char *fname="i0i1B2B.root"); void PlotAlmonds() const; + // Copy + AliFastGlauber& operator=(const AliFastGlauber & rhs); + void Copy(TObject&) const; protected: - void Reset(); + static Double_t WSb (Double_t *xx, Double_t *par); + static Double_t WSbz (Double_t *xx, Double_t *par); + static Double_t WSz (Double_t *xx, Double_t *par); + static Double_t WSta (Double_t *xx, Double_t *par); + static Double_t WStarfi (Double_t *xx, Double_t *par); + static Double_t WStaa (Double_t *xx, Double_t *par); + static Double_t WKParticipants (Double_t *xx, Double_t *par); + static Double_t WParticipants (Double_t *xx, Double_t *par); + static Double_t WSgeo (Double_t *xx, Double_t *par); + static Double_t WSbinary (Double_t *xx, Double_t *par); + static Double_t WSN (Double_t *xx, Double_t *par); + static Double_t WAlmond (Double_t *xx, Double_t *par); + static Double_t WPathLength0 (Double_t *xx, Double_t *par); + static Double_t WPathLength (Double_t *xx, Double_t *par); + static Double_t WIntRadius (Double_t *xx, Double_t *par); + static Double_t WEnergyDensity (Double_t *xx, Double_t *par); + + void Reset() const; static Float_t fgBMax; // Maximum Impact Parameter static Int_t fgCounter; // Counter to protect double instantiation @@ -183,7 +199,7 @@ class AliFastGlauber : public TObject { static TF1* fgWSbinary; // dSigma/db binary static TF1* fgWSN; // dN/db binary static TF1* fgWEnergyDensity; // Energy density as a function of impact parameter - static TF2 fgWAlmondFixedB[40]; // Interaction Almonds read from file + static TF2* fgWAlmondFixedB[40]; // Interaction Almonds read from file static TF2* fgWAlmondCurrent; // Interaction Almond used for length Float_t fWSr0; // Wood-Saxon Parameter r0 @@ -200,7 +216,7 @@ class AliFastGlauber : public TObject { Int_t fEllDef; // definition of length (see CalculateLength()) TString fName; // filename of stored distributions - ClassDef(AliFastGlauber,1) // Event geometry simulation in the Glauber Model + ClassDef(AliFastGlauber,2) // Event geometry simulation in the Glauber Model }; #endif