]>
Commit | Line | Data |
---|---|---|
b536a002 | 1 | #ifndef ALIITSPIDPARAMS_H |
2 | #define ALIITSPIDPARAMS_H | |
3 | /* Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id: $ */ | |
7 | ||
8 | /////////////////////////////////////////////////////////////////// | |
9 | // // | |
2ca1f4ee | 10 | // Class to store parameters of ITS response functions // |
b536a002 | 11 | // Origin: F.Prino, Torino, prino@to.infn.it // |
12 | // // | |
13 | /////////////////////////////////////////////////////////////////// | |
14 | ||
15 | #include <TFormula.h> | |
16 | #include <TNamed.h> | |
2ca1f4ee | 17 | #include "AliPID.h" |
b536a002 | 18 | |
19 | class AliITSPidParams : public TNamed { | |
20 | ||
21 | public: | |
b52bfc67 | 22 | AliITSPidParams(Bool_t isMC = kFALSE); |
23 | AliITSPidParams(Char_t * name, Bool_t isMC = kFALSE); | |
b536a002 | 24 | ~AliITSPidParams(); |
b52bfc67 | 25 | |
8abeb05b | 26 | void InitMC(); |
b52bfc67 | 27 | void InitData(); |
b536a002 | 28 | Double_t GetLandauGausNormPdgCode(Double_t dedx, Int_t pdgCode, Double_t mom, Int_t lay) const; |
29 | Double_t GetLandauGausNorm(Double_t dedx, Int_t partType, Double_t mom, Int_t lay) const; | |
b52bfc67 | 30 | |
2ca1f4ee | 31 | // electron setters |
32 | void SetSDDElecMPVparams(const Double_t* params){ | |
33 | for(Int_t ipar=0; ipar<5; ipar++) fSDDElecMPVBetheParams[ipar]=params[ipar]; | |
34 | } | |
35 | void SetSSDElecMPVparams(const Double_t* params){ | |
36 | for(Int_t ipar=0; ipar<5; ipar++) fSSDElecMPVBetheParams[ipar]=params[ipar]; | |
37 | } | |
38 | void SetSDDElecLandauWidth(const TFormula* form){ | |
39 | if(fSDDElecLandauWidth) delete fSDDElecLandauWidth; | |
40 | fSDDElecLandauWidth=new TFormula(*form); | |
41 | } | |
42 | void SetSDDElecGaussWidth(const TFormula* form){ | |
43 | if(fSDDElecGaussWidth) delete fSDDElecGaussWidth; | |
44 | fSDDElecGaussWidth=new TFormula(*form); | |
45 | } | |
46 | void SetSSDElecLandauWidth(const TFormula* form){ | |
47 | if(fSSDElecLandauWidth) delete fSSDElecLandauWidth; | |
48 | fSSDElecLandauWidth=new TFormula(*form); | |
49 | } | |
50 | void SetSSDElecGaussWidth(const TFormula* form){ | |
51 | if(fSSDElecGaussWidth) delete fSSDElecGaussWidth; | |
52 | fSSDElecGaussWidth=new TFormula(*form); | |
b536a002 | 53 | } |
2ca1f4ee | 54 | |
55 | //Hadron setters | |
56 | void SetSDDHadronMPVparams(const Double_t* params){ | |
57 | for(Int_t ipar=0; ipar<5; ipar++) fSDDHadronMPVBetheParams[ipar]=params[ipar]; | |
58 | } | |
59 | void SetSSDHadronMPVparams(const Double_t* params){ | |
60 | for(Int_t ipar=0; ipar<5; ipar++) fSSDHadronMPVBetheParams[ipar]=params[ipar]; | |
61 | } | |
62 | ||
63 | //Pion setters | |
09e17991 | 64 | void SetSDDPionLandauWidth(const TFormula* form){ |
b536a002 | 65 | if(fSDDPionLandauWidth) delete fSDDPionLandauWidth; |
66 | fSDDPionLandauWidth=new TFormula(*form); | |
67 | } | |
09e17991 | 68 | void SetSDDPionGaussWidth(const TFormula* form){ |
b536a002 | 69 | if(fSDDPionGaussWidth) delete fSDDPionGaussWidth; |
70 | fSDDPionGaussWidth=new TFormula(*form); | |
2ca1f4ee | 71 | } |
09e17991 | 72 | void SetSSDPionLandauWidth(const TFormula* form){ |
b536a002 | 73 | if(fSSDPionLandauWidth) delete fSSDPionLandauWidth; |
74 | fSSDPionLandauWidth=new TFormula(*form); | |
75 | } | |
09e17991 | 76 | void SetSSDPionGaussWidth(const TFormula* form){ |
b536a002 | 77 | if(fSSDPionGaussWidth) delete fSSDPionGaussWidth; |
78 | fSSDPionGaussWidth=new TFormula(*form); | |
79 | } | |
80 | ||
81 | // kaon setters | |
09e17991 | 82 | void SetSDDKaonLandauWidth(const TFormula* form){ |
b536a002 | 83 | if(fSDDKaonLandauWidth) delete fSDDKaonLandauWidth; |
84 | fSDDKaonLandauWidth=new TFormula(*form); | |
85 | } | |
09e17991 | 86 | void SetSDDKaonGaussWidth(const TFormula* form){ |
b536a002 | 87 | if(fSDDKaonGaussWidth) delete fSDDKaonGaussWidth; |
88 | fSDDKaonGaussWidth=new TFormula(*form); | |
89 | } | |
09e17991 | 90 | void SetSSDKaonLandauWidth(const TFormula* form){ |
b536a002 | 91 | if(fSSDKaonLandauWidth) delete fSSDKaonLandauWidth; |
92 | fSSDKaonLandauWidth=new TFormula(*form); | |
93 | } | |
09e17991 | 94 | void SetSSDKaonGaussWidth(const TFormula* form){ |
b536a002 | 95 | if(fSSDKaonGaussWidth) delete fSSDKaonGaussWidth; |
96 | fSSDKaonGaussWidth=new TFormula(*form); | |
97 | } | |
98 | ||
b536a002 | 99 | // proton setters |
09e17991 | 100 | void SetSDDProtLandauWidth(const TFormula* form){ |
b536a002 | 101 | if(fSDDProtLandauWidth) delete fSDDProtLandauWidth; |
102 | fSDDProtLandauWidth=new TFormula(*form); | |
103 | } | |
09e17991 | 104 | void SetSDDProtGaussWidth(const TFormula* form){ |
b536a002 | 105 | if(fSDDProtGaussWidth) delete fSDDProtGaussWidth; |
106 | fSDDProtGaussWidth=new TFormula(*form); | |
107 | } | |
09e17991 | 108 | void SetSSDProtLandauWidth(const TFormula* form){ |
b536a002 | 109 | if(fSSDProtLandauWidth) delete fSSDProtLandauWidth; |
110 | fSSDProtLandauWidth=new TFormula(*form); | |
111 | } | |
09e17991 | 112 | void SetSSDProtGaussWidth(const TFormula* form){ |
b536a002 | 113 | if(fSSDProtGaussWidth) delete fSSDProtGaussWidth; |
114 | fSSDProtGaussWidth=new TFormula(*form); | |
115 | } | |
116 | ||
2ca1f4ee | 117 | // electron getters |
118 | Double_t GetSDDElecMPV(Double_t mom) const { | |
119 | Double_t mass = AliPID::ParticleMass(AliPID::kElectron); | |
120 | return BetheBloch(mom,mass,fSDDElecMPVBetheParams); | |
121 | } | |
122 | Double_t GetSDDElecLandauWidth(Double_t mom) const { | |
123 | return fSDDElecLandauWidth->Eval(mom); | |
124 | } | |
125 | Double_t GetSDDElecGaussWidth(Double_t mom) const { | |
126 | return fSDDElecGaussWidth->Eval(mom); | |
127 | } | |
128 | Double_t GetSSDElecMPV(Double_t mom) const { | |
129 | Double_t mass = AliPID::ParticleMass(AliPID::kElectron); | |
130 | return BetheBloch(mom,mass,fSSDElecMPVBetheParams); | |
131 | } | |
132 | Double_t GetSSDElecLandauWidth(Double_t mom) const { | |
133 | return fSSDElecLandauWidth->Eval(mom); | |
134 | } | |
135 | Double_t GetSSDElecGaussWidth(Double_t mom) const { | |
136 | return fSSDElecGaussWidth->Eval(mom); | |
137 | } | |
b536a002 | 138 | |
139 | // pion getters | |
140 | Double_t GetSDDPionMPV(Double_t mom) const { | |
2ca1f4ee | 141 | Double_t mass = AliPID::ParticleMass(AliPID::kPion); |
142 | return BetheBloch(mom,mass,fSDDHadronMPVBetheParams); | |
b536a002 | 143 | } |
144 | Double_t GetSDDPionLandauWidth(Double_t mom) const { | |
145 | return fSDDPionLandauWidth->Eval(mom); | |
146 | } | |
147 | Double_t GetSDDPionGaussWidth(Double_t mom) const { | |
148 | return fSDDPionGaussWidth->Eval(mom); | |
149 | } | |
150 | Double_t GetSSDPionMPV(Double_t mom) const { | |
2ca1f4ee | 151 | Double_t mass = AliPID::ParticleMass(AliPID::kPion); |
152 | return BetheBloch(mom,mass,fSSDHadronMPVBetheParams); | |
b536a002 | 153 | } |
154 | Double_t GetSSDPionLandauWidth(Double_t mom) const { | |
155 | return fSSDPionLandauWidth->Eval(mom); | |
156 | } | |
157 | Double_t GetSSDPionGaussWidth(Double_t mom) const { | |
158 | return fSSDPionGaussWidth->Eval(mom); | |
159 | } | |
160 | ||
161 | // kaon getters | |
162 | Double_t GetSDDKaonMPV(Double_t mom) const { | |
2ca1f4ee | 163 | Double_t mass = AliPID::ParticleMass(AliPID::kKaon); |
164 | return BetheBloch(mom,mass,fSDDHadronMPVBetheParams); | |
b536a002 | 165 | } |
166 | Double_t GetSDDKaonLandauWidth(Double_t mom) const { | |
2ca1f4ee | 167 | Double_t xlw = 0.3; |
168 | Double_t xup = 0.4; | |
169 | if (mom > xlw) return fSDDKaonLandauWidth->Eval(mom); | |
170 | else { | |
171 | Double_t ylw =fSDDKaonLandauWidth->Eval(xlw); | |
172 | Double_t yup =fSDDKaonLandauWidth->Eval(xup); | |
173 | return ExtrapolateWidth(mom,xlw,ylw,xup,yup); | |
174 | } | |
b536a002 | 175 | } |
176 | Double_t GetSDDKaonGaussWidth(Double_t mom) const { | |
2ca1f4ee | 177 | Double_t xlw = 0.3; |
178 | Double_t xup = 0.4; | |
179 | if (mom > xlw) return fSDDKaonGaussWidth->Eval(mom); | |
180 | else { | |
181 | Double_t ylw =fSDDKaonGaussWidth->Eval(xlw); | |
182 | Double_t yup =fSDDKaonGaussWidth->Eval(xup); | |
183 | return ExtrapolateWidth(mom,xlw,ylw,xup,yup); | |
184 | } | |
b536a002 | 185 | } |
186 | Double_t GetSSDKaonMPV(Double_t mom) const { | |
2ca1f4ee | 187 | Double_t mass = AliPID::ParticleMass(AliPID::kKaon); |
188 | return BetheBloch(mom,mass,fSSDHadronMPVBetheParams); | |
b536a002 | 189 | } |
190 | Double_t GetSSDKaonLandauWidth(Double_t mom) const { | |
2ca1f4ee | 191 | Double_t xlw = 0.3; |
192 | Double_t xup = 0.4; | |
193 | if (mom > xlw) return fSSDKaonLandauWidth->Eval(mom); | |
194 | else { | |
195 | Double_t ylw =fSSDKaonLandauWidth->Eval(xlw); | |
196 | Double_t yup =fSSDKaonLandauWidth->Eval(xup); | |
197 | return ExtrapolateWidth(mom,xlw,ylw,xup,yup); | |
198 | } | |
b536a002 | 199 | } |
200 | Double_t GetSSDKaonGaussWidth(Double_t mom) const { | |
2ca1f4ee | 201 | Double_t xlw = 0.3; |
202 | Double_t xup = 0.4; | |
203 | if (mom > xlw) return fSSDKaonGaussWidth->Eval(mom); | |
204 | else { | |
205 | Double_t ylw =fSSDKaonGaussWidth->Eval(xlw); | |
206 | Double_t yup =fSSDKaonGaussWidth->Eval(xup); | |
207 | return ExtrapolateWidth(mom,xlw,ylw,xup,yup); | |
208 | } | |
b536a002 | 209 | } |
210 | ||
211 | // proton getters | |
212 | Double_t GetSDDProtMPV(Double_t mom) const { | |
2ca1f4ee | 213 | Double_t mass = AliPID::ParticleMass(AliPID::kProton); |
214 | return BetheBloch(mom,mass,fSDDHadronMPVBetheParams); | |
b536a002 | 215 | } |
216 | Double_t GetSDDProtLandauWidth(Double_t mom) const { | |
2ca1f4ee | 217 | Double_t xlw = 0.35; |
218 | Double_t xup = 0.45; | |
219 | if (mom > xlw) return fSDDProtLandauWidth->Eval(mom); | |
220 | else { | |
221 | Double_t ylw =fSDDProtLandauWidth->Eval(xlw); | |
222 | Double_t yup =fSDDProtLandauWidth->Eval(xup); | |
223 | return ExtrapolateWidth(mom,xlw,ylw,xup,yup); | |
224 | } | |
b536a002 | 225 | } |
226 | Double_t GetSDDProtGaussWidth(Double_t mom) const { | |
2ca1f4ee | 227 | Double_t xlw = 0.35; |
228 | Double_t xup = 0.45; | |
229 | if (mom > xlw) return fSDDProtGaussWidth->Eval(mom); | |
230 | else { | |
231 | Double_t ylw =fSDDProtGaussWidth->Eval(xlw); | |
232 | Double_t yup =fSDDProtGaussWidth->Eval(xup); | |
233 | return ExtrapolateWidth(mom,xlw,ylw,xup,yup); | |
234 | } | |
b536a002 | 235 | } |
236 | Double_t GetSSDProtMPV(Double_t mom) const { | |
2ca1f4ee | 237 | Double_t mass = AliPID::ParticleMass(AliPID::kProton); |
238 | return BetheBloch(mom,mass,fSSDHadronMPVBetheParams); | |
b536a002 | 239 | } |
240 | Double_t GetSSDProtLandauWidth(Double_t mom) const { | |
2ca1f4ee | 241 | Double_t xlw = 0.35; |
242 | Double_t xup = 0.45; | |
243 | if (mom > xlw) return fSSDProtLandauWidth->Eval(mom); | |
244 | else { | |
245 | Double_t ylw =fSSDProtLandauWidth->Eval(xlw); | |
246 | Double_t yup =fSSDProtLandauWidth->Eval(xup); | |
247 | return ExtrapolateWidth(mom,xlw,ylw,xup,yup); | |
248 | } | |
b536a002 | 249 | } |
250 | Double_t GetSSDProtGaussWidth(Double_t mom) const { | |
2ca1f4ee | 251 | Double_t xlw = 0.35; |
252 | Double_t xup = 0.45; | |
253 | if (mom > xlw) return fSSDProtGaussWidth->Eval(mom); | |
254 | else { | |
255 | Double_t ylw =fSSDProtGaussWidth->Eval(xlw); | |
256 | Double_t yup =fSSDProtGaussWidth->Eval(xup); | |
257 | return ExtrapolateWidth(mom,xlw,ylw,xup,yup); | |
258 | } | |
b536a002 | 259 | } |
260 | ||
261 | private: | |
b52bfc67 | 262 | |
b536a002 | 263 | AliITSPidParams(const AliITSPidParams& rec); |
264 | AliITSPidParams& operator=(const AliITSPidParams &source); | |
265 | ||
2ca1f4ee | 266 | Double_t BetheBloch(Double_t mom, Double_t mass, const Double_t* p) const; |
267 | Double_t ExtrapolateWidth(Double_t mom, Double_t x1, Double_t y1, Double_t x2, Double_t y2) const; | |
268 | ||
269 | // Electron parameterizations | |
270 | Double_t fSDDElecMPVBetheParams[5]; // Electron bethe block parameters in SDD | |
271 | Double_t fSSDElecMPVBetheParams[5]; // Electron bethe block parameters in SSD | |
272 | ||
273 | TFormula* fSDDElecLandauWidth; // Electron dE/dx Landau width vs. p in SDD | |
274 | TFormula* fSDDElecGaussWidth; // Electron dE/dx Gaussian width vs. p in SDD | |
275 | ||
276 | TFormula* fSSDElecLandauWidth; // Electron dE/dx Landau width vs. p in SSD | |
277 | TFormula* fSSDElecGaussWidth; // Electron dE/dx Gaussian width vs. p in SSD | |
278 | ||
279 | // Hadron parameterizations | |
280 | Double_t fSDDHadronMPVBetheParams[5]; // hadrons bethe block parameters in SDD | |
281 | Double_t fSSDHadronMPVBetheParams[5]; // hadrons bethe block parameters in SSD | |
282 | ||
b536a002 | 283 | TFormula* fSDDPionLandauWidth; // pion dE/dx Landau width vs. p in SDD |
284 | TFormula* fSDDPionGaussWidth; // pion dE/dx Gaussian width vs. p in SDD | |
285 | ||
b536a002 | 286 | TFormula* fSSDPionLandauWidth; // pion dE/dx Landau width vs. p in SSD |
287 | TFormula* fSSDPionGaussWidth; // pion dE/dx Gaussian width vs. p in SSD | |
288 | ||
b536a002 | 289 | TFormula* fSDDKaonLandauWidth; // kaon dE/dx Landau width vs. p in SDD |
290 | TFormula* fSDDKaonGaussWidth; // kaon dE/dx Gaussian width vs. p in SDD | |
291 | ||
b536a002 | 292 | TFormula* fSSDKaonLandauWidth; // kaon dE/dx Landau width vs. p in SSD |
293 | TFormula* fSSDKaonGaussWidth; // kaon dE/dx Gaussian width vs. p in SSD | |
294 | ||
2ca1f4ee | 295 | TFormula* fSDDProtLandauWidth; // Proton dE/dx Landau width vs. p in SDD |
296 | TFormula* fSDDProtGaussWidth; // Proton dE/dx Gaussian width vs. p in SDD | |
b536a002 | 297 | |
2ca1f4ee | 298 | TFormula* fSSDProtLandauWidth; // Proton dE/dx Landau width vs. p in SSD |
299 | TFormula* fSSDProtGaussWidth; // Proton dE/dx Gaussian width vs. p in SSD | |
b536a002 | 300 | |
2ca1f4ee | 301 | |
302 | ||
303 | ClassDef(AliITSPidParams,2); | |
b536a002 | 304 | }; |
305 | #endif |