Line data Source code
1 : /**************************************************************************
2 : * Copyright(c) 2005-2007, 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 : // ITS PID method # 1
20 : // Implementation of the ITS PID class
21 : // Very naive one... Should be made better by the detector experts...
22 : // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
23 : //-----------------------------------------------------------------
24 : #include "TMath.h"
25 : #include "AliVTrack.h"
26 : #include "AliITSPIDResponse.h"
27 : #include "AliITSPidParams.h"
28 : #include "AliExternalTrackParam.h"
29 :
30 176 : ClassImp(AliITSPIDResponse)
31 :
32 12 : AliITSPIDResponse::AliITSPIDResponse(Bool_t isMC):
33 12 : fRes(0.13),
34 12 : fKp1(15.77),
35 12 : fKp2(4.95),
36 12 : fKp3(0.312),
37 12 : fKp4(2.14),
38 12 : fKp5(0.82)
39 36 : {
40 24 : if(!isMC){
41 12 : fBBtpcits[0]=0.73;
42 12 : fBBtpcits[1]=14.68;
43 12 : fBBtpcits[2]=0.905;
44 12 : fBBtpcits[3]=1.2;
45 12 : fBBtpcits[4]=6.6;
46 12 : fBBdeu[0]=76.43; // parameters for the deuteron - tpcits - value from PbPb 2010 run (S.Trogolo - July 2014)
47 12 : fBBdeu[1]=-34.21;
48 12 : fBBdeu[2]=113.2;
49 12 : fBBdeu[3]=-18.12;
50 12 : fBBdeu[4]=0.6019;
51 12 : fBBtri[0]=13.34; // parameters for the triton - tpcits - value from PbPb 2010 run (S.Trogolo - July 2014)
52 12 : fBBtri[1]=55.17;
53 12 : fBBtri[2]=66.41;
54 12 : fBBtri[3]=-6.601;
55 12 : fBBtri[4]=-0.4134;
56 12 : fBBsa[0]=2.73198E7; //pure PHOBOS parameterization
57 12 : fBBsa[1]=6.92389;
58 12 : fBBsa[2]=1.90088E-6;
59 12 : fBBsa[3]=1.90088E-6;
60 12 : fBBsa[4]=3.40644E-7;
61 12 : fBBsaHybrid[0]=1.43505E7; //PHOBOS+Polinomial parameterization
62 12 : fBBsaHybrid[1]=49.3402;
63 12 : fBBsaHybrid[2]=1.77741E-7;
64 12 : fBBsaHybrid[3]=1.77741E-7;
65 12 : fBBsaHybrid[4]=1.01311E-7;
66 12 : fBBsaHybrid[5]=77.2777;
67 12 : fBBsaHybrid[6]=33.4099;
68 12 : fBBsaHybrid[7]=46.0089;
69 12 : fBBsaHybrid[8]=-2.26583;
70 12 : fBBsaElectron[0]=4.05799E6; //electrons in the ITS
71 12 : fBBsaElectron[1]=38.5713;
72 12 : fBBsaElectron[2]=1.46462E-7;
73 12 : fBBsaElectron[3]=1.46462E-7;
74 12 : fBBsaElectron[4]=4.40284E-7;
75 12 : fResolSA[0]=1.; // 0 cluster tracks should not be used
76 12 : fResolSA[1]=0.25; // rough values for tracks with 1
77 12 : fResolSA[2]=0.131; // value from pp 2010 run (L. Milano, 16-Jun-11)
78 12 : fResolSA[3]=0.113; // value from pp 2010 run
79 12 : fResolSA[4]=0.104; // value from pp 2010 run
80 144 : for(Int_t i=0; i<5;i++) fResolTPCITS[i]=0.13;
81 12 : fResolTPCITSDeu3[0]=0.06918; // deuteron resolution vs p
82 12 : fResolTPCITSDeu3[1]=0.02498; // 3 ITS clusters for PId
83 12 : fResolTPCITSDeu3[2]=1.1; // value from PbPb 2010 run (July 2014)
84 12 : fResolTPCITSDeu4[0]=0.06756;// deuteron resolution vs p
85 12 : fResolTPCITSDeu4[1]=0.02078; // 4 ITS clusters for PId
86 12 : fResolTPCITSDeu4[2]=1.05; // value from PbPb 2010 run (July 2014)
87 12 : fResolTPCITSTri3[0]=0.07239; // triton resolution vs p
88 12 : fResolTPCITSTri3[1]=0.0192; // 3 ITS clusters for PId
89 12 : fResolTPCITSTri3[2]=1.1; // value from PbPb 2010 run (July 2014)
90 12 : fResolTPCITSTri4[0]=0.06083; // triton resolution
91 12 : fResolTPCITSTri4[1]=0.02579; // 4 ITS clusters for PId
92 12 : fResolTPCITSTri4[2]=1.15; // value from PbPb 2010 run (July 2014)
93 12 : }else{
94 12 : fBBtpcits[0]=1.04;
95 0 : fBBtpcits[1]=27.14;
96 0 : fBBtpcits[2]=1.00;
97 0 : fBBtpcits[3]=0.964;
98 0 : fBBtpcits[4]=2.59;
99 0 : fBBdeu[0]=88.22; // parameters for the deuteron - MC (LHC14a6)
100 0 : fBBdeu[1]=-40.74;
101 0 : fBBdeu[2]=107.2;
102 0 : fBBdeu[3]=-8.962;
103 0 : fBBdeu[4]=-0.766;
104 0 : fBBtri[0]=100.7; //parameters for the triton - MC (LHC14a6)
105 0 : fBBtri[1]=-68.56;
106 0 : fBBtri[2]=128.2;
107 0 : fBBtri[3]=-15.5;
108 0 : fBBtri[4]=0.1833;
109 0 : fBBsa[0]=2.02078E7; //pure PHOBOS parameterization
110 0 : fBBsa[1]=14.0724;
111 0 : fBBsa[2]=3.84454E-7;
112 0 : fBBsa[3]=3.84454E-7;
113 0 : fBBsa[4]=2.43913E-7;
114 0 : fBBsaHybrid[0]=1.05381E7; //PHOBOS+Polinomial parameterization
115 0 : fBBsaHybrid[1]=89.3933;
116 0 : fBBsaHybrid[2]=2.4831E-7;
117 0 : fBBsaHybrid[3]=2.4831E-7;
118 0 : fBBsaHybrid[4]=7.80591E-8;
119 0 : fBBsaHybrid[5]=62.9214;
120 0 : fBBsaHybrid[6]=32.347;
121 0 : fBBsaHybrid[7]=58.7661;
122 0 : fBBsaHybrid[8]=-3.39869;
123 0 : fBBsaElectron[0]=2.26807E6; //electrons in the ITS
124 0 : fBBsaElectron[1]=99.985;
125 0 : fBBsaElectron[2]=0.000714841;
126 0 : fBBsaElectron[3]=0.000259585;
127 0 : fBBsaElectron[4]=1.39412E-7;
128 0 : fResolSA[0]=1.; // 0 cluster tracks should not be used
129 0 : fResolSA[1]=0.25; // rough values for tracks with 1
130 0 : fResolSA[2]=0.126; // value from pp 2010 simulations (L. Milano, 16-Jun-11)
131 0 : fResolSA[3]=0.109; // value from pp 2010 simulations
132 0 : fResolSA[4]=0.097; // value from pp 2010 simulations
133 0 : for(Int_t i=0; i<5;i++) fResolTPCITS[i]=0.13;
134 0 : fResolTPCITSDeu3[0]=0.06853; // deuteron resolution vs p
135 0 : fResolTPCITSDeu3[1]=0.01607; // 3 ITS clusters for PId
136 0 : fResolTPCITSDeu3[2]=1.08; // value from PbPb 2010 run (July 2014)
137 0 : fResolTPCITSDeu4[0]=0.06853;
138 0 : fResolTPCITSDeu4[1]=0.01607;
139 0 : fResolTPCITSDeu4[2]=1.08;
140 0 : fResolTPCITSTri3[0]=0.07239; // triton resolution vs p
141 0 : fResolTPCITSTri3[1]=0.0192; // 3 ITS clusters for PId
142 0 : fResolTPCITSTri3[2]=1.12; // value from PbPb 2010 run (July 2014)
143 0 : fResolTPCITSTri4[0]=0.07239; // triton resolution vs p
144 0 : fResolTPCITSTri4[1]=0.0192; // 3 ITS clusters for PId
145 0 : fResolTPCITSTri4[2]=1.12;
146 : }
147 24 : }
148 :
149 : /*
150 : //_________________________________________________________________________
151 : AliITSPIDResponse::AliITSPIDResponse(Double_t *param):
152 : fRes(param[0]),
153 : fKp1(15.77),
154 : fKp2(4.95),
155 : fKp3(0.312),
156 : fKp4(2.14),
157 : fKp5(0.82)
158 : {
159 : //
160 : // The main constructor
161 : //
162 : for (Int_t i=0; i<5;i++) {
163 : fBBsa[i]=0.;
164 : fBBtpcits[i]=0.;
165 : fResolSA[i]=0.;
166 : fResolTPCITS[i]=0.;
167 : }
168 : }
169 : */
170 :
171 : //_________________________________________________________________________
172 : Double_t AliITSPIDResponse::BetheAleph(Double_t p, Double_t mass) const {
173 : //
174 : // returns AliExternalTrackParam::BetheBloch normalized to
175 : // fgMIP at the minimum
176 : //
177 :
178 : Double_t bb=
179 0 : AliExternalTrackParam::BetheBlochAleph(p/mass,fKp1,fKp2,fKp3,fKp4,fKp5);
180 0 : return bb;
181 : }
182 :
183 : //_________________________________________________________________________
184 : Double_t AliITSPIDResponse::Bethe(Double_t bg, const Double_t * const par, Bool_t isNuclei) const
185 : {
186 :
187 0 : const Double_t beta = bg/TMath::Sqrt(1.+ bg*bg);
188 0 : const Double_t gamma=bg/beta;
189 : Double_t bb=1.;
190 :
191 : Double_t eff=1.0;
192 0 : if(bg<par[2])
193 0 : eff=(bg-par[3])*(bg-par[3])+par[4];
194 : else
195 0 : eff=(par[2]-par[3])*(par[2]-par[3])+par[4];
196 :
197 0 : if(gamma>=0. && beta>0.){
198 0 : if(isNuclei){
199 : //Parameterization for deuteron between 0.4 - 1.5 GeV/c; triton between 0.58 - 1.65 GeV/c
200 0 : bb=par[0] + par[1]/bg + par[2]/(bg*bg) + par[3]/(bg*bg*bg) + par[4]/(bg*bg*bg*bg);
201 0 : }else{ //Parameterization for pion, kaon, proton, electron
202 0 : bb=(par[1]+2.0*TMath::Log(gamma)-beta*beta)*(par[0]/(beta*beta))*eff;
203 : }
204 : }
205 :
206 0 : return bb;
207 : }
208 :
209 : //_________________________________________________________________________
210 : Double_t AliITSPIDResponse::Bethe(Double_t p, Double_t mass, Bool_t isSA) const {
211 :
212 : //OLD - Mantained for backward compatibility
213 : //from the MASS check --> Set the Particle Type
214 : //at the end use the method Bethe(Double_t p, AliPID::EParticleType species, Bool_t isSA) const to set the right parameter
215 :
216 : //
217 : // returns AliExternalTrackParam::BetheBloch normalized to
218 : // fgMIP at the minimum
219 : //
220 :
221 : // NEW: Parameterization for Deuteron and Triton energy loss, reproduced with a polynomial in fixed p range
222 : // fBBdeu --> parameters for deuteron
223 : // fBBtri --> parameters for triton
224 :
225 : //NOTE
226 : //NOTE: if changes are made here, please also check the alternative function below
227 : //NOTE
228 :
229 : AliPID::EParticleType species = AliPID::kPion;
230 : Bool_t foundMatchingSpecies = kFALSE;
231 0 : for (Int_t spec = 0; spec < AliPID::kSPECIESC; spec++) {
232 0 : if (TMath::AreEqualAbs(mass,AliPID::ParticleMassZ(spec),0.001)){
233 : species = (AliPID::EParticleType)spec;
234 : foundMatchingSpecies = kTRUE;
235 0 : break;
236 : }
237 : }
238 0 : if (!foundMatchingSpecies)
239 0 : printf("Error AliITSPIDResponse::Bethe: Mass does not match any species. Assuming pion! Note that this function is deprecated!\n");
240 :
241 0 : return Bethe(p,species,isSA);
242 : }
243 :
244 : //_________________________________________________________________________
245 : Double_t AliITSPIDResponse::Bethe(Double_t p, AliPID::EParticleType species, Bool_t isSA) const
246 : {
247 : // NEW - to be used
248 : // **** ATTENTION: the second parameter must be the PARTICLE TYPE you want to identify ****
249 : // Alternative bethe function assuming a particle type not a mass
250 : // should be slightly faster
251 : //
252 :
253 0 : const Double_t m=AliPID::ParticleMassZ(species);
254 0 : const Double_t bg=p/m;
255 : Bool_t isNuclei=kFALSE;
256 :
257 : //NOTE
258 : //NOTE: if changes are made here, please also check the alternative function above
259 : //NOTE
260 0 : const Double_t *par=fBBtpcits;
261 0 : if(isSA){
262 0 : if(species == AliPID::kElectron){
263 : //if is an electron use a specific BB parameterization
264 : //To be used only between 100 and 160 MeV/c
265 0 : par=fBBsaElectron;
266 0 : }else{
267 0 : par=fBBsa;
268 : }
269 : }else{
270 0 : if(species == AliPID::kDeuteron) {
271 0 : par=fBBdeu;
272 : isNuclei=kTRUE;
273 0 : }
274 0 : if(species == AliPID::kTriton ) {
275 0 : par=fBBtri;
276 : isNuclei=kTRUE;
277 0 : }
278 : }
279 :
280 0 : return Bethe(bg, par, isNuclei);
281 : }
282 :
283 : //_________________________________________________________________________
284 : Double_t AliITSPIDResponse::BetheITSsaHybrid(Double_t p, Double_t mass) const {
285 : //
286 : // returns AliExternalTrackParam::BetheBloch normalized to
287 : // fgMIP at the minimum. The PHOBOS parameterization is used for beta*gamma>0.76.
288 : // For beta*gamma<0.76 a polinomial function is used
289 :
290 0 : Double_t bg=p/mass;
291 0 : Double_t beta = bg/TMath::Sqrt(1.+ bg*bg);
292 0 : Double_t gamma=bg/beta;
293 : Double_t bb=1.;
294 :
295 0 : Double_t par[9];
296 : //parameters for pi, K, p
297 0 : for(Int_t ip=0; ip<9;ip++) par[ip]=fBBsaHybrid[ip];
298 : //if it is an electron the PHOBOS part of the parameterization is tuned for e
299 : //in the range used for identification beta*gamma is >0.76 for electrons
300 : //To be used only between 100 and 160 MeV/c
301 0 : if(mass>0.0005 && mass<0.00052)for(Int_t ip=0; ip<5;ip++) par[ip]=fBBsaElectron[ip];
302 :
303 0 : if(gamma>=0. && beta>0. && bg>0.1){
304 0 : if(bg>0.76){//PHOBOS
305 : Double_t eff=1.0;
306 0 : if(bg<par[2])
307 0 : eff=(bg-par[3])*(bg-par[3])+par[4];
308 : else
309 0 : eff=(par[2]-par[3])*(par[2]-par[3])+par[4];
310 :
311 0 : bb=(par[1]+2.0*TMath::Log(gamma)-beta*beta)*(par[0]/(beta*beta))*eff;
312 0 : }else{//Polinomial
313 0 : bb=par[5] + par[6]/bg + par[7]/(bg*bg) + par[8]/(bg*bg*bg);
314 : }
315 : }
316 0 : return bb;
317 0 : }
318 :
319 : //_________________________________________________________________________
320 : Double_t AliITSPIDResponse::GetResolution(Double_t bethe,
321 : Int_t nPtsForPid,
322 : Bool_t isSA,
323 : Double_t p,
324 : AliPID::EParticleType type) const {
325 : //
326 : // Calculate expected resolution for truncated mean
327 : //
328 : // NEW: Added new variables which are Double_t p and AliPID::EParticleType type
329 : // AliPID::EParticleType type is used to set the correct resolution for the different particles
330 : // default -> AliPID::EParticleType type = AliPID::kPion
331 : // Double_t p is used for the resolution of deuteron and triton, because they are function of the momentum
332 : // default -> Double_t p=0.
333 :
334 : Float_t r=0.f;
335 : Double_t c=1.; //this is a correction factor used for the nuclei resolution, while for pion/kaon/proton/electron is 1.
336 :
337 0 : if(isSA) r=fResolSA[nPtsForPid];
338 : else{
339 : const Double_t *par=0x0;
340 0 : if(type==AliPID::kDeuteron){
341 0 : if(nPtsForPid==4) par = fResolTPCITSDeu4;
342 0 : else par = fResolTPCITSDeu3;
343 0 : c=par[2];
344 0 : r=par[0]+par[1]*p;
345 0 : } else if(type==AliPID::kTriton){
346 0 : if(nPtsForPid==4) par = fResolTPCITSTri4;
347 0 : else par = fResolTPCITSTri3;
348 0 : c=par[2];
349 0 : r=par[0]+par[1]*p;
350 0 : } else{
351 0 : r=fResolTPCITS[nPtsForPid];
352 : }
353 : }
354 :
355 0 : return r*bethe*c;
356 : }
357 :
358 :
359 : //_________________________________________________________________________
360 : void AliITSPIDResponse::GetITSProbabilities(Float_t mom, Double_t qclu[4], Double_t condprobfun[AliPID::kSPECIES], Bool_t isMC) const {
361 : //
362 : // Method to calculate PID probabilities for a single track
363 : // using the likelihood method
364 : //
365 : const Int_t nLay = 4;
366 : const Int_t nPart= 4;
367 :
368 0 : static AliITSPidParams pars(isMC); // Pid parametrisation parameters
369 :
370 0 : Double_t itsProb[nPart] = {1,1,1,1}; // e, p, K, pi
371 :
372 0 : for (Int_t iLay = 0; iLay < nLay; iLay++) {
373 0 : if (qclu[iLay] <= 50.)
374 : continue;
375 :
376 0 : Float_t dedx = qclu[iLay];
377 0 : Float_t layProb = pars.GetLandauGausNorm(dedx,AliPID::kProton,mom,iLay+3);
378 0 : itsProb[0] *= layProb;
379 :
380 0 : layProb = pars.GetLandauGausNorm(dedx,AliPID::kKaon,mom,iLay+3);
381 0 : itsProb[1] *= layProb;
382 :
383 0 : layProb = pars.GetLandauGausNorm(dedx,AliPID::kPion,mom,iLay+3);
384 0 : itsProb[2] *= layProb;
385 :
386 0 : layProb = pars.GetLandauGausNorm(dedx,AliPID::kElectron,mom,iLay+3);
387 0 : itsProb[3] *= layProb;
388 0 : }
389 :
390 : // Normalise probabilities
391 : Double_t sumProb = 0;
392 0 : for (Int_t iPart = 0; iPart < nPart; iPart++) {
393 0 : sumProb += itsProb[iPart];
394 : }
395 0 : sumProb += itsProb[2]; // muon cannot be distinguished from pions
396 :
397 0 : for (Int_t iPart = 0; iPart < nPart; iPart++) {
398 0 : itsProb[iPart]/=sumProb;
399 : }
400 0 : condprobfun[AliPID::kElectron] = itsProb[3];
401 0 : condprobfun[AliPID::kMuon] = itsProb[2];
402 0 : condprobfun[AliPID::kPion] = itsProb[2];
403 0 : condprobfun[AliPID::kKaon] = itsProb[1];
404 0 : condprobfun[AliPID::kProton] = itsProb[0];
405 : return;
406 0 : }
407 :
408 : //_________________________________________________________________________
409 : void AliITSPIDResponse::GetITSProbabilities(Float_t mom, Double_t qclu[4], Double_t condprobfun[AliPID::kSPECIES], AliITSPidParams *pars) const
410 : {
411 : //
412 : // Method to calculate PID probabilities for a single track
413 : // using the likelihood method
414 : //
415 : const Int_t nLay = 4;
416 : const Int_t nPart= 4;
417 :
418 0 : Double_t itsProb[nPart] = {1,1,1,1}; // e, p, K, pi
419 :
420 0 : for (Int_t iLay = 0; iLay < nLay; iLay++) {
421 0 : if (qclu[iLay] <= 50.)
422 : continue;
423 :
424 0 : Float_t dedx = qclu[iLay];
425 0 : Float_t layProb = pars->GetLandauGausNorm(dedx,AliPID::kProton,mom,iLay+3);
426 0 : itsProb[0] *= layProb;
427 :
428 0 : layProb = pars->GetLandauGausNorm(dedx,AliPID::kKaon,mom,iLay+3);
429 0 : itsProb[1] *= layProb;
430 :
431 0 : layProb = pars->GetLandauGausNorm(dedx,AliPID::kPion,mom,iLay+3);
432 0 : itsProb[2] *= layProb;
433 :
434 0 : layProb = pars->GetLandauGausNorm(dedx,AliPID::kElectron,mom,iLay+3);
435 0 : itsProb[3] *= layProb;
436 0 : }
437 :
438 : // Normalise probabilities
439 : Double_t sumProb = 0;
440 0 : for (Int_t iPart = 0; iPart < nPart; iPart++) {
441 0 : sumProb += itsProb[iPart];
442 : }
443 0 : sumProb += itsProb[2]; // muon cannot be distinguished from pions
444 :
445 0 : for (Int_t iPart = 0; iPart < nPart; iPart++) {
446 0 : itsProb[iPart]/=sumProb;
447 : }
448 0 : condprobfun[AliPID::kElectron] = itsProb[3];
449 0 : condprobfun[AliPID::kMuon] = itsProb[2];
450 0 : condprobfun[AliPID::kPion] = itsProb[2];
451 0 : condprobfun[AliPID::kKaon] = itsProb[1];
452 0 : condprobfun[AliPID::kProton] = itsProb[0];
453 : return;
454 0 : }
455 :
456 : //_________________________________________________________________________
457 : Double_t AliITSPIDResponse::GetNumberOfSigmas( const AliVTrack* track, AliPID::EParticleType type) const
458 : {
459 : //
460 : // number of sigmas
461 : //
462 0 : UChar_t clumap=track->GetITSClusterMap();
463 : Int_t nPointsForPid=0;
464 0 : for(Int_t i=2; i<6; i++){
465 0 : if(clumap&(1<<i)) ++nPointsForPid;
466 : }
467 0 : Float_t mom=track->P();
468 :
469 : //check for ITS standalone tracks
470 : Bool_t isSA=kTRUE;
471 0 : if( track->GetStatus() & AliVTrack::kTPCin ) isSA=kFALSE;
472 :
473 0 : Float_t dEdx=track->GetITSsignal();
474 0 : if (track->GetITSsignalTunedOnData()>0) dEdx = track->GetITSsignalTunedOnData();
475 :
476 : //TODO: in case of the electron, use the SA parametrisation,
477 : // this needs to be changed if ITS provides a parametrisation
478 : // for electrons also for ITS+TPC tracks
479 0 : return GetNumberOfSigmas(mom,dEdx,type,nPointsForPid,isSA || (type==AliPID::kElectron));
480 : }
481 :
482 : //_________________________________________________________________________
483 : Double_t AliITSPIDResponse::GetSignalDelta( const AliVTrack* track, AliPID::EParticleType type, Bool_t ratio/*=kFALSE*/) const
484 : {
485 : //
486 : // Signal - expected
487 : //
488 0 : const Float_t mom=track->P();
489 0 : const Double_t chargeFactor = TMath::Power(AliPID::ParticleCharge(type),2.);
490 : Bool_t isSA=kTRUE;
491 0 : if( track->GetStatus() & AliVTrack::kTPCin ) isSA=kFALSE;
492 :
493 0 : Float_t dEdx=track->GetITSsignal();
494 0 : if (track->GetITSsignalTunedOnData()>0) dEdx = track->GetITSsignalTunedOnData();
495 :
496 :
497 : //TODO: in case of the electron, use the SA parametrisation,
498 : // this needs to be changed if ITS provides a parametrisation
499 : // for electrons also for ITS+TPC tracks
500 :
501 0 : const Float_t bethe = Bethe(mom,type, isSA || (type==AliPID::kElectron))*chargeFactor;
502 :
503 : Double_t delta=-9999.;
504 0 : if (!ratio) delta=dEdx-bethe;
505 0 : else if (bethe>1.e-20) delta=dEdx/bethe;
506 :
507 0 : return delta;
508 : }
509 :
510 : //_________________________________________________________________________
511 : Int_t AliITSPIDResponse::GetParticleIdFromdEdxVsP(Float_t mom, Float_t signal, Bool_t isSA) const{
512 : // method to get particle identity with simple cuts on dE/dx vs. momentum
513 :
514 0 : Double_t massp=AliPID::ParticleMass(AliPID::kProton);
515 0 : Double_t massk=AliPID::ParticleMass(AliPID::kKaon);
516 0 : Double_t bethep=Bethe(mom,massp,isSA);
517 0 : Double_t bethek=Bethe(mom,massk,isSA);
518 0 : if(signal>(0.5*(bethep+bethek))) return AliPID::kProton;
519 0 : Double_t masspi=AliPID::ParticleMass(AliPID::kPion);
520 0 : Double_t bethepi=Bethe(mom,masspi,isSA);
521 0 : if(signal>(0.5*(bethepi+bethek))) return AliPID::kKaon;
522 0 : return AliPID::kPion;
523 :
524 0 : }
|