]>
Commit | Line | Data |
---|---|---|
b6d061b7 | 1 | #ifndef ALIQUENCHINGWEIGHTS_H |
2 | #define ALIQUENCHINGWEIGHTS_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //---------------------------------------------------------------------------- | |
9 | // Implementation of the class to calculate the parton energy loss | |
10 | // Based on the "BDMPS" quenching weights by C.A.Salgado and U.A.Wiedemann | |
11 | // | |
12 | // References: | |
13 | // C.A.Salgado and U.A.Wiedemann, Phys.Rev.D68 (2003) 014008 [hep-ph/0302184] | |
14 | // A.Dainese, Eur.Phys.J.C, in press, [nucl-ex/0312005] | |
15 | // | |
16 | // Origin: C. Loizides constantin.loizides@cern.ch | |
17 | // A. Dainese andrea.dainese@pd.infn.it | |
18 | //---------------------------------------------------------------------------- | |
19 | ||
090026bf | 20 | #include <TMath.h> |
b6d061b7 | 21 | #include <TObject.h> |
22 | class TH1F; | |
23 | ||
24 | class AliQuenchingWeights : public TObject { | |
25 | public: | |
b677de56 | 26 | enum kECMethod {kDefault=0,kReweight=1,kReweightCont=2}; |
b6d061b7 | 27 | |
28 | AliQuenchingWeights(); | |
29 | AliQuenchingWeights(const AliQuenchingWeights& a); | |
b90de01a | 30 | AliQuenchingWeights& operator=(const AliQuenchingWeights& a) |
31 | {a.Copy(*this); return(*this);} | |
b6d061b7 | 32 | virtual ~AliQuenchingWeights(); |
620294e8 | 33 | void Init(); |
b6d061b7 | 34 | void Reset(); |
35 | Int_t SampleEnergyLoss(); | |
b90de01a | 36 | Int_t SampleEnergyLoss(Int_t ipart, Double_t r); |
7258586f | 37 | |
38 | Double_t GetELossRandom(Int_t ipart, Double_t length, Double_t e=1.e10) const; | |
b6d061b7 | 39 | Double_t CalcQuenchedEnergy(Int_t ipart, Double_t length, Double_t e) const; |
7258586f | 40 | Double_t GetELossRandom(Int_t ipart, TH1F *hell, Double_t e=1.e10) const; |
b6d061b7 | 41 | Double_t CalcQuenchedEnergy(Int_t ipart, TH1F *hell, Double_t e) const; |
7258586f | 42 | Double_t GetELossRandomK(Int_t ipart, Double_t I0, Double_t I1, Double_t e=1.e10); |
43 | Double_t CalcQuenchedEnergyK(Int_t ipart, Double_t I0, Double_t I1, Double_t e); | |
2552c51a | 44 | Double_t GetELossRandomKFast(Int_t ipart, Double_t I0, Double_t I1, Double_t e=1.e10); |
b90de01a | 45 | Double_t GetELossRandomKFastR(Int_t ipart, Double_t r, Double_t wc, Double_t e=1.e10); |
2552c51a | 46 | Double_t CalcQuenchedEnergyKFast(Int_t ipart, Double_t I0, Double_t I1, Double_t e); |
7258586f | 47 | |
b677de56 | 48 | Double_t GetDiscreteWeight(Int_t ipart, Double_t I0, Double_t I1); |
b90de01a | 49 | Double_t GetDiscreteWeightR(Int_t ipart, Double_t r); |
50 | void GetZeroLossProb(Double_t &p,Double_t &prw,Double_t &prwcont, | |
b677de56 | 51 | Int_t ipart,Double_t I0,Double_t I1,Double_t e=1.e10); |
b90de01a | 52 | void GetZeroLossProbR(Double_t &p,Double_t &prw, Double_t &prwcont, |
53 | Int_t ipart,Double_t r,Double_t wc,Double_t e=1.e10); | |
b677de56 | 54 | |
b6d061b7 | 55 | //multiple soft scattering approximation |
56 | Int_t InitMult(const Char_t *contall="$(ALICE_ROOT)/FASTSIM/data/cont_mult.all", | |
57 | const Char_t *discall="$(ALICE_ROOT)/FASTSIM/data/disc_mult.all"); | |
58 | ||
59 | //single hard scattering approximation | |
60 | Int_t InitSingleHard(const Char_t *contall="$(ALICE_ROOT)/FASTSIM/data/cont_lin.all", | |
61 | const Char_t *discall="$(ALICE_ROOT)/FASTSIM/data/disc_lin.all"); | |
62 | ||
63 | Int_t CalcMult(Int_t ipart, Double_t rrrr,Double_t xxxx, | |
64 | Double_t &continuous,Double_t &discrete) const; | |
65 | Int_t CalcMult(Int_t ipart, | |
66 | Double_t w, Double_t qtransp, Double_t length, | |
67 | Double_t &continuous,Double_t &discrete) const; | |
68 | Int_t CalcSingleHard(Int_t ipart, Double_t rrrr,Double_t xxxx, | |
69 | Double_t &continuous,Double_t &discrete) const; | |
70 | Int_t CalcSingleHard(Int_t ipart, | |
71 | Double_t w, Double_t mu, Double_t length, | |
72 | Double_t &continuous,Double_t &discrete) const; | |
73 | ||
74 | Double_t CalcWC(Double_t q, Double_t l) const | |
7a76a12e | 75 | {return 0.5*q*l*l*fgkConvFmToInvGeV;} |
b6d061b7 | 76 | |
77 | Double_t CalcWCbar(Double_t mu, Double_t l) const | |
7a76a12e | 78 | {return 0.5*mu*mu*l*fgkConvFmToInvGeV;} |
b6d061b7 | 79 | |
80 | Double_t CalcWC(Double_t l) const | |
81 | {if(fMultSoft) return CalcWC(fQTransport,l); | |
82 | else return CalcWCbar(fMu,l);} | |
83 | ||
7258586f | 84 | Double_t CalcWCk(Double_t I1) const |
85 | {if(fMultSoft) return CalcWCk(fK,I1); | |
86 | else return -1;} //not implemented! | |
87 | ||
88 | Double_t CalcWCk(Double_t k, Double_t I1) const | |
89 | {if(fMultSoft) return k*I1/fgkConvFmToInvGeV; | |
90 | else return -1;} //not implemented! | |
91 | ||
b6d061b7 | 92 | Double_t CalcR(Double_t wc, Double_t l) const; |
93 | ||
7258586f | 94 | Double_t CalcRk(Double_t I0, Double_t I1) const |
95 | {return CalcRk(fK,I0,I1);} | |
96 | ||
97 | Double_t CalcRk(Double_t k, Double_t I0, Double_t I1) const; | |
98 | ||
99 | Double_t CalcQk(Double_t I0, Double_t I1) const | |
100 | {return CalcQk(fK,I0,I1);} | |
101 | ||
102 | Double_t CalcQk(Double_t k, Double_t I0, Double_t I1) const | |
cc885e36 | 103 | {return I0*I0/2./I1/fgkConvFmToInvGeV/fgkConvFmToInvGeV*k;} |
6bd26c4a | 104 | |
105 | Double_t CalcLk(Double_t i0, Double_t i1) const | |
106 | {return 2.*i1/i0;} | |
7258586f | 107 | |
b6d061b7 | 108 | Int_t CalcLengthMax(Double_t q) const |
7a76a12e | 109 | {Double_t l3max=fgkRMax/.5/q/fgkConvFmToInvGeV/fgkConvFmToInvGeV; |
b6d061b7 | 110 | return (Int_t)TMath::Power(l3max,1./3.);} |
111 | ||
7258586f | 112 | const TH1F* GetHisto(Int_t ipart,Double_t length) const; |
b6d061b7 | 113 | |
114 | void SetMu(Double_t m=1.) {fMu=m;} | |
115 | void SetQTransport(Double_t q=1.) {fQTransport=q;} | |
7258586f | 116 | void SetK(Double_t k=4.e5) {fK=k;} //about 1 GeV^2/fm |
b6d061b7 | 117 | void SetECMethod(kECMethod type=kDefault); |
118 | void SetLengthMax(Int_t l=20) {fLengthMax=l;} | |
119 | ||
120 | Float_t GetMu() const {return fMu;} | |
121 | Float_t GetQTransport() const {return fQTransport;} | |
7258586f | 122 | Float_t GetK() const {return fK;} |
1d059662 | 123 | kECMethod GetECMethod() const {return fECMethod;} |
b6d061b7 | 124 | Bool_t GetTablesLoaded() const {return fTablesLoaded;} |
125 | Bool_t GetMultSoft() const {return fMultSoft;} | |
126 | Int_t GetLengthMax() const {return fLengthMax;} | |
127 | ||
128 | TH1F* ComputeQWHisto (Int_t ipart,Double_t medval,Double_t length) const; | |
129 | TH1F* ComputeQWHistoX(Int_t ipart,Double_t medval,Double_t length) const; | |
b90de01a | 130 | TH1F* ComputeQWHistoX(Int_t ipart,Double_t r) const; |
7258586f | 131 | TH1F* ComputeELossHisto(Int_t ipart,Double_t medval,Double_t l,Double_t e=1.e10) const; |
132 | TH1F* ComputeELossHisto(Int_t ipart,Double_t medval,TH1F *hEll,Double_t e=1.e10) const; | |
b90de01a | 133 | TH1F* ComputeELossHisto(Int_t ipart,Double_t r) const; |
7258586f | 134 | |
135 | Double_t GetMeanELoss(Int_t ipart,Double_t medval,Double_t l) const; | |
136 | Double_t GetMeanELoss(Int_t ipart,Double_t medval,TH1F *hEll) const; | |
9175f0df | 137 | Double_t GetMeanELoss(Int_t ipart,Double_t r) const; |
b6d061b7 | 138 | |
9175f0df | 139 | void PlotDiscreteWeights(Double_t len=4,Double_t qm=5) const; |
140 | void PlotContWeights(Int_t itype,Double_t len) const; | |
141 | void PlotContWeightsVsL(Int_t itype,Double_t medval) const; | |
142 | void PlotAvgELoss(Double_t len,Double_t qm=5,Double_t e=1.e10) const; | |
143 | void PlotAvgELoss(TH1F *hEll,Double_t e=1.e10) const; | |
144 | void PlotAvgELossVsL(Double_t e=1.e10) const; | |
145 | void PlotAvgELossVsPt(Double_t medval,Double_t len) const; | |
146 | void PlotAvgELossVsPt(Double_t medval,TH1F *hEll) const; | |
b6d061b7 | 147 | |
148 | protected: | |
7258586f | 149 | Int_t GetIndex(Double_t len) const; |
150 | ||
7a76a12e | 151 | static const Double_t fgkConvFmToInvGeV; //conversion factor |
2552c51a | 152 | static const Int_t fgkBins; //number of bins for hists |
153 | static const Double_t fgkMaxBin; //max. value of wc | |
7258586f | 154 | static const Double_t fgkRMax; //max. tabled value of R |
155 | ||
7a76a12e | 156 | static Int_t fgCounter;//static instance counter |
157 | Int_t fInstanceNumber; //instance number of class | |
b6d061b7 | 158 | |
159 | Bool_t fMultSoft; //approximation type | |
b677de56 | 160 | kECMethod fECMethod; //energy constraint method |
7258586f | 161 | Double_t fQTransport; //transport coefficient [GeV^2/fm]] |
b6d061b7 | 162 | Double_t fMu; //Debye screening mass |
7258586f | 163 | Double_t fK; //proportional constant [fm] |
b6d061b7 | 164 | Int_t fLengthMax; //maximum length |
165 | Int_t fLengthMaxOld; //maximum length used for histos | |
166 | ||
167 | //discrete and cont part of quenching for | |
168 | //both parton type and different lengths | |
169 | TH1F ***fHistos; //! | |
7258586f | 170 | TH1F *fHisto; //! |
b6d061b7 | 171 | |
172 | // data strucs for tables | |
7a76a12e | 173 | Double_t fxx[400]; //sampled energy quark |
174 | Double_t fxxg[400]; //sampled energy gluon | |
175 | Double_t fdaq[34]; //discrete weight quark | |
176 | Double_t fdag[34]; //discrete weight gluon | |
177 | Double_t fcaq[34][261]; //continuous weights quarks | |
178 | Double_t fcag[34][261]; //continuous weights gluons | |
179 | Double_t frrr[34]; //r value quark | |
180 | Double_t frrrg[34]; //r value gluon | |
181 | Bool_t fTablesLoaded; //tables loaded | |
b6d061b7 | 182 | |
183 | ClassDef(AliQuenchingWeights,1) // Base class for Quenching Weights | |
184 | }; | |
185 | ||
186 | #endif |