Line data Source code
1 : /**************************************************************************
2 : * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
3 : * *
4 : * Author: The ALICE Off-line Project. *
5 : * Contributors are mentioned in the code where appropriate. *
6 : * *
7 : * Permission to use, copy, modify and distribute this software and its *
8 : * documentation strictly for non-commercial purposes is hereby granted *
9 : * without fee, provided that the above copyright notice appears in all *
10 : * copies and that both the copyright notice and this permission notice *
11 : * appear in the supporting documentation. The authors make no claims *
12 : * about the suitability of this software for any purpose. It is *
13 : * provided "as is" without express or implied warranty. *
14 : **************************************************************************/
15 :
16 : /* $Id: */
17 :
18 : ///////////////////////////////////////////////////////////////////
19 : // //
20 : // Class to store parameters of ITS response functions //
21 : // Origin: F.Prino, Torino, prino@to.infn.it //
22 : // Modified by: Y. Corrales Morales //
23 : // Torino, corrales@to.infn.it //
24 : // //
25 : ///////////////////////////////////////////////////////////////////
26 :
27 : #include <TMath.h>
28 : #include "AliITSPidParams.h"
29 :
30 176 : ClassImp(AliITSPidParams)
31 :
32 : //______________________________________________________________________
33 : AliITSPidParams::AliITSPidParams(Bool_t isMC):
34 0 : TNamed("default",""),
35 0 : fSDDElecMPV(0),
36 0 : fSDDElecLandauWidth(0),
37 0 : fSDDElecGaussWidth(0),
38 0 : fSSDElecMPV(0),
39 0 : fSSDElecLandauWidth(0),
40 0 : fSSDElecGaussWidth(0),
41 0 : fSDDPionMPV(0),
42 0 : fSDDPionLandauWidth(0),
43 0 : fSDDPionGaussWidth(0),
44 0 : fSSDPionMPV(0),
45 0 : fSSDPionLandauWidth(0),
46 0 : fSSDPionGaussWidth(0),
47 0 : fSDDKaonMPV(0),
48 0 : fSDDKaonLandauWidth(0),
49 0 : fSDDKaonGaussWidth(0),
50 0 : fSSDKaonMPV(0),
51 0 : fSSDKaonLandauWidth(0),
52 0 : fSSDKaonGaussWidth(0),
53 0 : fSDDProtMPV(0),
54 0 : fSDDProtLandauWidth(0),
55 0 : fSDDProtGaussWidth(0),
56 0 : fSSDProtMPV(0),
57 0 : fSSDProtLandauWidth(0),
58 0 : fSSDProtGaussWidth(0)
59 0 : {
60 : // default constructor
61 0 : if (isMC) InitMC();
62 0 : else InitData();
63 0 : }
64 : //______________________________________________________________________
65 : AliITSPidParams::AliITSPidParams(Char_t * name, Bool_t isMC):
66 0 : TNamed(name,""),
67 0 : fSDDElecMPV(0),
68 0 : fSDDElecLandauWidth(0),
69 0 : fSDDElecGaussWidth(0),
70 0 : fSSDElecMPV(0),
71 0 : fSSDElecLandauWidth(0),
72 0 : fSSDElecGaussWidth(0),
73 0 : fSDDPionMPV(0),
74 0 : fSDDPionLandauWidth(0),
75 0 : fSDDPionGaussWidth(0),
76 0 : fSSDPionMPV(0),
77 0 : fSSDPionLandauWidth(0),
78 0 : fSSDPionGaussWidth(0),
79 0 : fSDDKaonMPV(0),
80 0 : fSDDKaonLandauWidth(0),
81 0 : fSDDKaonGaussWidth(0),
82 0 : fSSDKaonMPV(0),
83 0 : fSSDKaonLandauWidth(0),
84 0 : fSSDKaonGaussWidth(0),
85 0 : fSDDProtMPV(0),
86 0 : fSDDProtLandauWidth(0),
87 0 : fSDDProtGaussWidth(0),
88 0 : fSSDProtMPV(0),
89 0 : fSSDProtLandauWidth(0),
90 0 : fSSDProtGaussWidth(0)
91 0 : {
92 : // standard constructor
93 0 : if (isMC) InitMC();
94 0 : else InitData();
95 0 : }
96 : //______________________________________________________________________
97 0 : AliITSPidParams::~AliITSPidParams(){
98 :
99 0 : if(fSDDElecMPV) delete fSDDElecMPV;
100 0 : if(fSDDElecLandauWidth) delete fSDDElecLandauWidth;
101 0 : if(fSDDElecGaussWidth) delete fSDDElecGaussWidth;
102 :
103 0 : if(fSSDElecMPV) delete fSSDElecMPV;
104 0 : if(fSSDElecLandauWidth) delete fSSDElecLandauWidth;
105 0 : if(fSSDElecGaussWidth) delete fSSDElecGaussWidth;
106 :
107 0 : if(fSDDPionMPV) delete fSDDPionMPV;
108 0 : if(fSDDPionLandauWidth) delete fSDDPionLandauWidth;
109 0 : if(fSDDPionGaussWidth) delete fSDDPionGaussWidth;
110 :
111 0 : if(fSSDPionMPV) delete fSSDPionMPV;
112 0 : if(fSSDPionLandauWidth) delete fSSDPionLandauWidth;
113 0 : if(fSSDPionGaussWidth) delete fSSDPionGaussWidth;
114 :
115 0 : if(fSDDKaonMPV) delete fSDDKaonMPV;
116 0 : if(fSDDKaonLandauWidth) delete fSDDKaonLandauWidth;
117 0 : if(fSDDKaonGaussWidth) delete fSDDKaonGaussWidth;
118 :
119 0 : if(fSSDKaonMPV) delete fSSDKaonMPV;
120 0 : if(fSSDKaonLandauWidth) delete fSSDKaonLandauWidth;
121 0 : if(fSSDKaonGaussWidth) delete fSSDKaonGaussWidth;
122 :
123 0 : if(fSDDProtMPV) delete fSDDProtMPV;
124 0 : if(fSDDProtLandauWidth) delete fSDDProtLandauWidth;
125 0 : if(fSDDProtGaussWidth) delete fSDDProtGaussWidth;
126 :
127 0 : if(fSSDProtMPV) delete fSSDProtMPV;
128 0 : if(fSSDProtLandauWidth) delete fSSDProtLandauWidth;
129 0 : if(fSSDProtGaussWidth) delete fSSDProtGaussWidth;
130 0 : }
131 :
132 : //______________________________________________________________________
133 : void AliITSPidParams::InitMC(){
134 : // initialize TFormulas to Monte Carlo values (=p-p simulations PYTHIA+GEANT)
135 : // parameter values from LHC10d1
136 : // MPV BetheBloch parameters;
137 :
138 : //sdd MC electrons parameters
139 0 : Double_t fSDDElecMPVParams[2] = { 0.2507, 84.64};
140 0 : Double_t fSDDElecLWVParams[2] = { 0.02969, 6.634};
141 0 : Double_t fSDDElecGWVParams[2] = { -0.4338, 8.225};
142 :
143 : //ssd MC electrons parameters
144 0 : Double_t fSSDElecMPVParams[2] = { 0.2762, 86.92};
145 0 : Double_t fSSDElecLWVParams[2] = { 0.06276, 6.333};
146 0 : Double_t fSSDElecGWVParams[2] = { 0.1672, 6.519};
147 :
148 : // electrons
149 0 : if(fSDDElecMPV) delete fSDDElecMPV;
150 0 : fSDDElecMPV=new TFormula("fSDDElecMPV","[0]*x+[1]");
151 0 : fSDDElecMPV->SetParameters(fSDDElecMPVParams);
152 :
153 0 : if(fSDDElecLandauWidth) delete fSDDElecLandauWidth;
154 0 : fSDDElecLandauWidth=new TFormula("fSDDElecLandauWidth","[0]*x+[1]");
155 0 : fSDDElecLandauWidth->SetParameters(fSDDElecLWVParams);
156 :
157 0 : if(fSDDElecGaussWidth) delete fSDDElecGaussWidth;
158 0 : fSDDElecGaussWidth=new TFormula("fSDDElecGaussWidth","[0]*x+[1]");
159 0 : fSDDElecGaussWidth->SetParameters(fSDDElecGWVParams);
160 :
161 0 : if(fSSDElecMPV) delete fSSDElecMPV;
162 0 : fSSDElecMPV=new TFormula("fSSDElecMPV","[0]*x+[1]");
163 0 : fSSDElecMPV->SetParameters(fSSDElecMPVParams);
164 :
165 0 : if(fSSDElecLandauWidth) delete fSSDElecLandauWidth;
166 0 : fSSDElecLandauWidth=new TFormula("fSSDElecLandauWidth","[0]*x+[1]");
167 0 : fSSDElecLandauWidth->SetParameters(fSSDElecLWVParams);
168 :
169 0 : if(fSSDElecGaussWidth) delete fSSDElecGaussWidth;
170 0 : fSSDElecGaussWidth=new TFormula("fSSDElecGaussWidth","[0]*x+[1]");
171 0 : fSSDElecGaussWidth->SetParameters(fSSDElecGWVParams);
172 :
173 : //sdd MC hadrons parameters
174 : //pion
175 0 : Double_t fSDDPionMPVParams[3] = { 1.418, 3.653, 76.44};
176 0 : Double_t fSDDPionLWVParams[3] = {0.1932, 0.297, 6.392};
177 0 : Double_t fSDDPionGWVParams[3] = {0.2163, 0.7689, 6.774};
178 : //kaon
179 0 : Double_t fSDDKaonMPVParams[3] = { 8.44, -19.04, 81.33};
180 0 : Double_t fSDDKaonLWVParams[2] = {1.274, 6.344};
181 0 : Double_t fSDDKaonGWVParams[3] = {3.345, 2.411, 5.007};
182 : //proton
183 0 : Double_t fSDDProtMPVParams[3] = {-12.73, -151.4, 147.4};
184 0 : Double_t fSDDProtLWVParams[2] = { 5.858, 5.397};
185 0 : Double_t fSDDProtGWVParams[3] = { 9.169, 1.985, 5.595};
186 :
187 : //ssd MC hadrons parameters
188 : //pion
189 0 : Double_t fSSDPionMPVParams[3] = { 1.502, 4.336, 78.73};
190 0 : Double_t fSSDPionLWVParams[3] = {0.2486, 0.4315, 6.138};
191 0 : Double_t fSSDPionGWVParams[3] = {0.2253, 0.9694, 5.248};
192 : //kaon
193 0 : Double_t fSSDKaonMPVParams[3] = {13.72, -6.747, 78.12};
194 0 : Double_t fSSDKaonLWVParams[2] = {1.558, 5.753};
195 0 : Double_t fSSDKaonGWVParams[3] = { 4.61, 5.838, 1.799};
196 : //proton
197 0 : Double_t fSSDProtMPVParams[3] = {13.16, -97.03, 122.6};
198 0 : Double_t fSSDProtLWVParams[2] = {6.188, 5.177};
199 0 : Double_t fSSDProtGWVParams[3] = {18.88, 23.06, -7.24};
200 :
201 :
202 : // pions
203 0 : if(fSDDPionMPV) delete fSDDPionMPV;
204 0 : fSDDPionMPV=new TFormula("fSDDPionMPV","[0]/(x*x)+[1]*TMath::Log(x)+[2]");
205 0 : fSDDPionMPV->SetParameters(fSDDPionMPVParams);
206 :
207 0 : if(fSDDPionLandauWidth) delete fSDDPionLandauWidth;
208 0 : fSDDPionLandauWidth=new TFormula("fSDDPionLandauWidth","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
209 0 : fSDDPionLandauWidth->SetParameters(fSDDPionLWVParams);
210 :
211 0 : if(fSDDPionGaussWidth) delete fSDDPionGaussWidth;
212 0 : fSDDPionGaussWidth=new TFormula("fSDDPionGaussWidth","[0]/(x*x)+[1]*TMath::Log(x)+[2]");
213 0 : fSDDPionGaussWidth->SetParameters(fSDDPionGWVParams);
214 :
215 0 : if(fSSDPionMPV) delete fSSDPionMPV;
216 0 : fSSDPionMPV=new TFormula("fSSDPionMPV","[0]/(x*x)+[1]*TMath::Log(x)+[2]");
217 0 : fSSDPionMPV->SetParameters(fSSDPionMPVParams);
218 :
219 0 : if(fSSDPionLandauWidth) delete fSSDPionLandauWidth;
220 0 : fSSDPionLandauWidth=new TFormula("fSSDPionLandauWidth","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
221 0 : fSSDPionLandauWidth->SetParameters(fSSDPionLWVParams);
222 :
223 0 : if(fSSDPionGaussWidth) delete fSSDPionGaussWidth;
224 0 : fSSDPionGaussWidth=new TFormula("fSSDPionGaussWidth","[0]/(x*x)+[1]*TMath::Log(x)+[2]");
225 0 : fSSDPionGaussWidth->SetParameters(fSSDPionGWVParams);
226 :
227 : // kaons
228 0 : if(fSDDKaonMPV) delete fSDDKaonMPV;
229 0 : fSDDKaonMPV=new TFormula("fSDDKaonMPV","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
230 0 : fSDDKaonMPV->SetParameters(fSDDKaonMPVParams);
231 :
232 0 : if(fSDDKaonLandauWidth) delete fSDDKaonLandauWidth;
233 0 : fSDDKaonLandauWidth=new TFormula("fSDDKaonLandauWidth","[0]/(x*x)+[1]");
234 0 : fSDDKaonLandauWidth->SetParameters(fSDDKaonLWVParams);
235 :
236 0 : if(fSDDKaonGaussWidth) delete fSDDKaonGaussWidth;
237 0 : fSDDKaonGaussWidth=new TFormula("fSDDKaonGaussWidth","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
238 0 : fSDDKaonGaussWidth->SetParameters(fSDDKaonGWVParams);
239 :
240 0 : if(fSSDKaonMPV) delete fSSDKaonMPV;
241 0 : fSSDKaonMPV=new TFormula("fSSDKaonMPV","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
242 0 : fSSDKaonMPV->SetParameters(fSSDKaonMPVParams);
243 :
244 0 : if(fSSDKaonLandauWidth) delete fSSDKaonLandauWidth;
245 0 : fSSDKaonLandauWidth=new TFormula("fSSDKaonLandauWidth","[0]/(x*x)+[1]");
246 0 : fSSDKaonLandauWidth->SetParameters(fSSDKaonLWVParams);
247 :
248 0 : if(fSSDKaonGaussWidth) delete fSSDKaonGaussWidth;
249 0 : fSSDKaonGaussWidth=new TFormula("fSSDKaonGaussWidth","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
250 0 : fSSDKaonGaussWidth->SetParameters(fSSDKaonGWVParams);
251 :
252 : // protons
253 0 : if(fSDDProtMPV) delete fSDDProtMPV;
254 0 : fSDDProtMPV=new TFormula("fSDDProtMPV","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
255 0 : fSDDProtMPV->SetParameters(fSDDProtMPVParams);
256 :
257 0 : if(fSDDProtLandauWidth) delete fSDDProtLandauWidth;
258 0 : fSDDProtLandauWidth=new TFormula("fSDDProtLandauWidth","[0]/(x*x)+[1]");
259 0 : fSDDProtLandauWidth->SetParameters(fSDDProtLWVParams);
260 :
261 0 : if(fSDDProtGaussWidth) delete fSDDProtGaussWidth;
262 0 : fSDDProtGaussWidth=new TFormula("fSDDProtGaussWidth","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
263 0 : fSDDProtGaussWidth->SetParameters(fSDDProtGWVParams);
264 :
265 0 : if(fSSDProtMPV) delete fSSDProtMPV;
266 0 : fSSDProtMPV=new TFormula("fSSDProtMPV","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
267 0 : fSSDProtMPV->SetParameters(fSSDProtMPVParams);
268 :
269 0 : if(fSSDProtLandauWidth) delete fSSDProtLandauWidth;
270 0 : fSSDProtLandauWidth=new TFormula("fSSDProtLandauWidth","[0]/(x*x)+[1]");
271 0 : fSSDProtLandauWidth->SetParameters(fSSDProtLWVParams);
272 :
273 0 : if(fSSDProtGaussWidth) delete fSSDProtGaussWidth;
274 0 : fSSDProtGaussWidth=new TFormula("fSSDProtGaussWidth","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
275 0 : fSSDProtGaussWidth->SetParameters(fSSDProtGWVParams);
276 0 : }
277 : //______________________________________________________________________
278 : void AliITSPidParams::InitData(){
279 : // initialize TFormulas to Real Data values (=p-p ALICE Experiment)
280 : // parameter values from LHC10b
281 : // MPV BetheBloch parameters;
282 :
283 : //sdd data electrons parameters
284 0 : Double_t fSDDElecMPVParams[2] = { 0.8736, 86.73};
285 0 : Double_t fSDDElecLWVParams[2] = { -0.3681, 6.611};
286 0 : Double_t fSDDElecGWVParams[2] = { 0.9324, 10.14};
287 :
288 : //ssd data electrons parameters
289 0 : Double_t fSSDElecMPVParams[2] = { -0.09946, 89};
290 0 : Double_t fSSDElecLWVParams[2] = { -0.05756, 6.236};
291 0 : Double_t fSSDElecGWVParams[2] = { 0.3355, 7.985};
292 :
293 : // electrons
294 0 : if(fSDDElecMPV) delete fSDDElecMPV;
295 0 : fSDDElecMPV=new TFormula("fSDDElecMPV","[0]*x+[1]");
296 0 : fSDDElecMPV->SetParameters(fSDDElecMPVParams);
297 :
298 0 : if(fSDDElecLandauWidth) delete fSDDElecLandauWidth;
299 0 : fSDDElecLandauWidth=new TFormula("fSDDElecLandauWidth","[0]*x+[1]");
300 0 : fSDDElecLandauWidth->SetParameters(fSDDElecLWVParams);
301 :
302 0 : if(fSDDElecGaussWidth) delete fSDDElecGaussWidth;
303 0 : fSDDElecGaussWidth=new TFormula("fSDDElecGaussWidth","[0]*x+[1]");
304 0 : fSDDElecGaussWidth->SetParameters(fSDDElecGWVParams);
305 :
306 0 : if(fSSDElecMPV) delete fSSDElecMPV;
307 0 : fSSDElecMPV=new TFormula("fSSDElecMPV","[0]*x+[1]");
308 0 : fSSDElecMPV->SetParameters(fSSDElecMPVParams);
309 :
310 0 : if(fSSDElecLandauWidth) delete fSSDElecLandauWidth;
311 0 : fSSDElecLandauWidth=new TFormula("fSSDElecLandauWidth","[0]*x+[1]");
312 0 : fSSDElecLandauWidth->SetParameters(fSSDElecLWVParams);
313 :
314 0 : if(fSSDElecGaussWidth) delete fSSDElecGaussWidth;
315 0 : fSSDElecGaussWidth=new TFormula("fSSDElecGaussWidth","[0]*x+[1]");
316 0 : fSSDElecGaussWidth->SetParameters(fSSDElecGWVParams);
317 :
318 : //sdd data hadrons parameters
319 : //pion
320 0 : Double_t fSDDPionMPVParams[3] = { 1.348, 5.457, 80.29};
321 0 : Double_t fSDDPionLWVParams[3] = {0.1526, 0.2125, 6.456};
322 0 : Double_t fSDDPionGWVParams[3] = {0.2112, 1.07, 8.882};
323 : //kaon
324 0 : Double_t fSDDKaonMPVParams[3] = { 13.35, -8.146, 74.82};
325 0 : Double_t fSDDKaonLWVParams[2] = { 1.247, 5.966};
326 0 : Double_t fSDDKaonGWVParams[3] = { 4.649, 6.21, 5.832};
327 : //proton
328 0 : Double_t fSDDProtMPVParams[3] = {-2.753, -136.5, 133.5};
329 0 : Double_t fSDDProtLWVParams[2] = { 5.393, 4.793};
330 0 : Double_t fSDDProtGWVParams[3] = { 21.08, 30.0, -4.265};
331 :
332 : //ssd data hadrons parameters
333 : //pion
334 0 : Double_t fSSDPionMPVParams[3] = { 1.435, 5.768, 81.76};
335 0 : Double_t fSSDPionLWVParams[3] = {0.2191, 0.385, 6.207};
336 0 : Double_t fSSDPionGWVParams[3] = {0.1941, 0.9167, 6.712};
337 : //kaon
338 0 : Double_t fSSDKaonMPVParams[3] = { 18.71, 4.229, 71.27};
339 0 : Double_t fSSDKaonLWVParams[2] = { 1.421, 5.547};
340 0 : Double_t fSSDKaonGWVParams[3] = { 6.208, 10.35, 1.885};
341 : //proton
342 0 : Double_t fSSDProtMPVParams[3] = {9.856, -108.9, 122.5};
343 0 : Double_t fSSDProtLWVParams[2] = { 5.61, 4.315};
344 0 : Double_t fSSDProtGWVParams[3] = {37.12, 65.45, -23.83};
345 :
346 : // pions
347 0 : if(fSDDPionMPV) delete fSDDPionMPV;
348 0 : fSDDPionMPV=new TFormula("fSDDPionMPV","[0]/(x*x)+[1]*TMath::Log(x)+[2]");
349 0 : fSDDPionMPV->SetParameters(fSDDPionMPVParams);
350 :
351 0 : if(fSDDPionLandauWidth) delete fSDDPionLandauWidth;
352 0 : fSDDPionLandauWidth=new TFormula("fSDDPionLandauWidth","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
353 0 : fSDDPionLandauWidth->SetParameters(fSDDPionLWVParams);
354 :
355 0 : if(fSDDPionGaussWidth) delete fSDDPionGaussWidth;
356 0 : fSDDPionGaussWidth=new TFormula("fSDDPionGaussWidth","[0]/(x*x)+[1]*TMath::Log(x)+[2]");
357 0 : fSDDPionGaussWidth->SetParameters(fSDDPionGWVParams);
358 :
359 0 : if(fSSDPionMPV) delete fSSDPionMPV;
360 0 : fSSDPionMPV=new TFormula("fSSDPionMPV","[0]/(x*x)+[1]*TMath::Log(x)+[2]");
361 0 : fSSDPionMPV->SetParameters(fSSDPionMPVParams);
362 :
363 0 : if(fSSDPionLandauWidth) delete fSSDPionLandauWidth;
364 0 : fSSDPionLandauWidth=new TFormula("fSSDPionLandauWidth","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
365 0 : fSSDPionLandauWidth->SetParameters(fSSDPionLWVParams);
366 :
367 0 : if(fSSDPionGaussWidth) delete fSSDPionGaussWidth;
368 0 : fSSDPionGaussWidth=new TFormula("fSSDPionGaussWidth","[0]/(x*x)+[1]*TMath::Log(x)+[2]");
369 0 : fSSDPionGaussWidth->SetParameters(fSSDPionGWVParams);
370 :
371 : // kaons
372 0 : if(fSDDKaonMPV) delete fSDDKaonMPV;
373 0 : fSDDKaonMPV=new TFormula("fSDDKaonMPV","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
374 0 : fSDDKaonMPV->SetParameters(fSDDKaonMPVParams);
375 :
376 0 : if(fSDDKaonLandauWidth) delete fSDDKaonLandauWidth;
377 0 : fSDDKaonLandauWidth=new TFormula("fSDDKaonLandauWidth","[0]/(x*x)+[1]");
378 0 : fSDDKaonLandauWidth->SetParameters(fSDDKaonLWVParams);
379 :
380 0 : if(fSDDKaonGaussWidth) delete fSDDKaonGaussWidth;
381 0 : fSDDKaonGaussWidth=new TFormula("fSDDKaonGaussWidth","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
382 0 : fSDDKaonGaussWidth->SetParameters(fSDDKaonGWVParams);
383 :
384 0 : if(fSSDKaonMPV) delete fSSDKaonMPV;
385 0 : fSSDKaonMPV=new TFormula("fSSDKaonMPV","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
386 0 : fSSDKaonMPV->SetParameters(fSSDKaonMPVParams);
387 :
388 0 : if(fSSDKaonLandauWidth) delete fSSDKaonLandauWidth;
389 0 : fSSDKaonLandauWidth=new TFormula("fSSDKaonLandauWidth","[0]/(x*x)+[1]");
390 0 : fSSDKaonLandauWidth->SetParameters(fSSDKaonLWVParams);
391 :
392 0 : if(fSSDKaonGaussWidth) delete fSSDKaonGaussWidth;
393 0 : fSSDKaonGaussWidth=new TFormula("fSSDKaonGaussWidth","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
394 0 : fSSDKaonGaussWidth->SetParameters(fSSDKaonGWVParams);
395 :
396 : // protons
397 0 : if(fSDDProtMPV) delete fSDDProtMPV;
398 0 : fSDDProtMPV=new TFormula("fSDDProtMPV","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
399 0 : fSDDProtMPV->SetParameters(fSDDProtMPVParams);
400 :
401 0 : if(fSDDProtLandauWidth) delete fSDDProtLandauWidth;
402 0 : fSDDProtLandauWidth=new TFormula("fSDDProtLandauWidth","[0]/(x*x)+[1]");
403 0 : fSDDProtLandauWidth->SetParameters(fSDDProtLWVParams);
404 :
405 0 : if(fSDDProtGaussWidth) delete fSDDProtGaussWidth;
406 0 : fSDDProtGaussWidth=new TFormula("fSDDProtGaussWidth","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
407 0 : fSDDProtGaussWidth->SetParameters(fSDDProtGWVParams);
408 :
409 0 : if(fSSDProtMPV) delete fSSDProtMPV;
410 0 : fSSDProtMPV=new TFormula("fSSDProtMPV","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
411 0 : fSSDProtMPV->SetParameters(fSSDProtMPVParams);
412 :
413 0 : if(fSSDProtLandauWidth) delete fSSDProtLandauWidth;
414 0 : fSSDProtLandauWidth=new TFormula("fSSDProtLandauWidth","[0]/(x*x)+[1]");
415 0 : fSSDProtLandauWidth->SetParameters(fSSDProtLWVParams);
416 :
417 0 : if(fSSDProtGaussWidth) delete fSSDProtGaussWidth;
418 0 : fSSDProtGaussWidth=new TFormula("fSSDProtGaussWidth","[0]/(x*x)+[1]/x*TMath::Log(x)+[2]");
419 0 : fSSDProtGaussWidth->SetParameters(fSSDProtGWVParams);
420 0 : }
421 : //_______________________________________________________________________
422 : Double_t AliITSPidParams::GetLandauGausNormPdgCode(Double_t dedx, Int_t pdgCode, Double_t mom, Int_t lay) const {
423 : // Computes Landau Gauss convolution for given particle specie and given momentum in a given ITS layer
424 0 : if(TMath::Abs(pdgCode)==11) return GetLandauGausNorm(dedx,AliPID::kElectron,mom,lay);
425 0 : else if(TMath::Abs(pdgCode)==211) return GetLandauGausNorm(dedx,AliPID::kPion,mom,lay);
426 0 : else if(TMath::Abs(pdgCode)==321) return GetLandauGausNorm(dedx,AliPID::kKaon,mom,lay);
427 0 : else if(TMath::Abs(pdgCode)==2212) return GetLandauGausNorm(dedx,AliPID::kProton,mom,lay);
428 0 : else return 0.;
429 0 : }
430 : //_______________________________________________________________________
431 : Double_t AliITSPidParams::GetLandauGausNorm(Double_t dedx, Int_t partType, Double_t mom, Int_t lay) const{
432 : // Computes Landau Gauss convolution for given particle specie and given momentum in a given ITS layer
433 :
434 : Double_t par[4];
435 : Bool_t isSet=kFALSE;
436 0 : if(partType==AliPID::kElectron){
437 0 : if(lay==3 || lay==4){
438 0 : par[0]=GetSDDElecLandauWidth(mom);
439 0 : par[1]=GetSDDElecMPV(mom);
440 0 : par[2]=GetSDDElecGaussWidth(mom);
441 : isSet=kTRUE;
442 0 : }
443 0 : else if(lay==5 || lay==6){
444 0 : par[0]=GetSSDElecLandauWidth(mom);
445 0 : par[1]=GetSSDElecMPV(mom);
446 0 : par[2]=GetSSDElecGaussWidth(mom);
447 : isSet=kTRUE;
448 0 : }
449 0 : }else if(partType==AliPID::kPion){
450 0 : if(lay==3 || lay==4){
451 0 : par[0]=GetSDDPionLandauWidth(mom);
452 0 : par[1]=GetSDDPionMPV(mom);
453 0 : par[2]=GetSDDPionGaussWidth(mom);
454 : isSet=kTRUE;
455 0 : }
456 0 : else if(lay==5 || lay==6){
457 0 : par[0]=GetSSDPionLandauWidth(mom);
458 0 : par[1]=GetSSDPionMPV(mom);
459 0 : par[2]=GetSSDPionGaussWidth(mom);
460 : isSet=kTRUE;
461 0 : }
462 0 : }else if(partType==AliPID::kKaon){
463 0 : if(lay==3 || lay==4){
464 0 : par[0]=GetSDDKaonLandauWidth(mom);
465 0 : par[1]=GetSDDKaonMPV(mom);
466 0 : par[2]=GetSDDKaonGaussWidth(mom);
467 : isSet=kTRUE;
468 0 : }
469 0 : else if(lay==5 || lay==6){
470 0 : par[0]=GetSSDKaonLandauWidth(mom);
471 0 : par[1]=GetSSDKaonMPV(mom);
472 0 : par[2]=GetSSDKaonGaussWidth(mom);
473 : isSet=kTRUE;
474 0 : }
475 0 : }else if(partType==AliPID::kProton){
476 0 : if(lay==3 || lay==4){
477 0 : par[0]=GetSDDProtLandauWidth(mom);
478 0 : par[1]=GetSDDProtMPV(mom);
479 0 : par[2]=GetSDDProtGaussWidth(mom);
480 : isSet=kTRUE;
481 0 : }
482 0 : else if(lay==5 || lay==6){
483 0 : par[0]=GetSSDProtLandauWidth(mom);
484 0 : par[1]=GetSSDProtMPV(mom);
485 0 : par[2]=GetSSDProtGaussWidth(mom);
486 : isSet=kTRUE;
487 0 : }
488 : }
489 0 : if(!isSet) return 0.;
490 : // Numeric constants
491 : Double_t invsq2pi = 0.3989422804014; // (2 pi)^(-1/2)
492 : Double_t mpshift = -0.22278298; // Landau maximum location
493 : // Control constants
494 : Double_t np = 100.0; // number of convolution steps
495 : Double_t sc = 5.0; // convolution extends to +-sc Gaussian sigmas
496 : // Variables
497 : Double_t xx;
498 : Double_t mpc;
499 : Double_t fland;
500 : Double_t sum = 0.0;
501 : Double_t xlow,xupp;
502 : Double_t step;
503 : Double_t i;
504 :
505 : // MP shift correction
506 0 : mpc = par[1] - mpshift * par[0];
507 : // Range of convolution integral
508 0 : xlow = dedx - sc * par[2];
509 0 : xupp = dedx + sc * par[2];
510 0 : if(np!=0) step = (xupp-xlow) / np;
511 :
512 : // Convolution integral of Landau and Gaussian by sum
513 0 : for(i=1.0; i<=np/2; i++) {
514 0 : xx = xlow + (i-.5) * step;
515 :
516 0 : fland = TMath::Landau(xx,mpc,par[0]) / par[0];
517 0 : sum += fland * TMath::Gaus(dedx,xx,par[2]);
518 :
519 0 : xx = xupp - (i-.5) * step;
520 0 : fland = TMath::Landau(xx,mpc,par[0]) / par[0];
521 0 : sum += fland * TMath::Gaus(dedx,xx,par[2]);
522 : }
523 :
524 0 : return (step * sum * invsq2pi / par[2]);
525 0 : }
526 :
|