]>
Commit | Line | Data |
---|---|---|
ae982df3 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, 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 | //----------------------------------------------------------------- | |
17 | // Implementation of the ESD track class | |
4427806c | 18 | // ESD = Event Summary Data |
ae982df3 | 19 | // This is the class to deal with during the phisical analysis of data |
4427806c | 20 | // Origin: Iouri Belikov, CERN |
21 | // e-mail: Jouri.Belikov@cern.ch | |
ae982df3 | 22 | //----------------------------------------------------------------- |
23 | ||
24 | #include "TMath.h" | |
25 | ||
26 | #include "AliESDtrack.h" | |
27 | #include "AliKalmanTrack.h" | |
28 | ||
29 | ClassImp(AliESDtrack) | |
30 | ||
31 | //_______________________________________________________________________ | |
32 | AliESDtrack::AliESDtrack() : | |
2bad268c | 33 | fFlags(0), |
34 | fLabel(0), | |
35 | fTrackLength(0), | |
36 | fStopVertex(0), | |
37 | fRalpha(0), | |
38 | fRx(0), | |
a866ac60 | 39 | fCalpha(0), |
40 | fCx(0), | |
67c3dcbe | 41 | fCchi2(1e10), |
a866ac60 | 42 | fIalpha(0), |
43 | fIx(0), | |
44 | fOalpha(0), | |
45 | fOx(0), | |
2bad268c | 46 | fITSchi2(0), |
ae982df3 | 47 | fITSncls(0), |
2bad268c | 48 | fITSsignal(0), |
2bad268c | 49 | fTPCchi2(0), |
05e445cd | 50 | fTPCncls(0), |
a866ac60 | 51 | fTPCClusterMap(159),//number of padrows |
2bad268c | 52 | fTPCsignal(0), |
53 | fTRDchi2(0), | |
54 | fTRDncls(0), | |
55 | fTRDsignal(0), | |
56 | fTOFchi2(0), | |
57 | fTOFindex(0), | |
4a78b8c5 | 58 | fTOFsignal(-1), |
59 | fPHOSsignal(-1), | |
60 | fRICHsignal(-1) | |
ae982df3 | 61 | { |
62 | // | |
63 | // The default ESD constructor | |
64 | // | |
2bad268c | 65 | for (Int_t i=0; i<kSPECIES; i++) { |
4a78b8c5 | 66 | fTrackTime[i]=0.; |
67 | fR[i]=1.; | |
68 | fITSr[i]=1.; | |
69 | fTPCr[i]=1.; | |
70 | fTRDr[i]=1.; | |
71 | fTOFr[i]=1.; | |
72 | fPHOSr[i]=1.; | |
73 | fRICHr[i]=1.; | |
2bad268c | 74 | } |
4a78b8c5 | 75 | fPHOSpos[0]=fPHOSpos[1]=fPHOSpos[2]=0.; |
bb2ceb1f | 76 | Int_t i; |
a866ac60 | 77 | for (i=0; i<5; i++) { fRp[i]=0.; fCp[i]=0.; fIp[i]=0.; fOp[i]=0.;} |
78 | for (i=0; i<15; i++) { fRc[i]=0.; fCc[i]=0.; fIc[i]=0.; fOc[i]=0.; } | |
79 | for (i=0; i<6; i++) { fITSindex[i]=0; } | |
80 | for (i=0; i<180; i++){ fTPCindex[i]=0; } | |
81 | for (i=0; i<90; i++) { fTRDindex[i]=0; } | |
6e5b1b04 | 82 | fTPCLabel = 0; |
83 | fTRDLabel = 0; | |
84 | fITSLabel = 0; | |
85 | ||
ae982df3 | 86 | } |
87 | ||
88 | //_______________________________________________________________________ | |
4a78b8c5 | 89 | Double_t AliESDtrack::GetMass() const { |
4427806c | 90 | // Returns the mass of the most probable particle type |
ae982df3 | 91 | Float_t max=0.; |
92 | Int_t k=-1; | |
93 | for (Int_t i=0; i<kSPECIES; i++) { | |
94 | if (fR[i]>max) {k=i; max=fR[i];} | |
95 | } | |
96 | if (k==0) return 0.00051; | |
97 | if (k==1) return 0.10566; | |
98 | if (k==2||k==-1) return 0.13957; | |
99 | if (k==3) return 0.49368; | |
100 | if (k==4) return 0.93827; | |
101 | Warning("GetMass()","Undefined mass !"); | |
102 | return 0.13957; | |
103 | } | |
104 | ||
105 | //_______________________________________________________________________ | |
ad2f1f2b | 106 | Bool_t AliESDtrack::UpdateTrackParams(AliKalmanTrack *t, ULong_t flags) { |
ae982df3 | 107 | // |
108 | // This function updates track's running parameters | |
109 | // | |
9b859005 | 110 | SetStatus(flags); |
111 | fLabel=t->GetLabel(); | |
112 | ||
113 | if (t->IsStartedTimeIntegral()) { | |
114 | SetStatus(kTIME); | |
115 | Double_t times[10];t->GetIntegratedTimes(times); SetIntegratedTimes(times); | |
116 | SetIntegratedLength(t->GetIntegratedLength()); | |
117 | } | |
118 | ||
119 | fRalpha=t->GetAlpha(); | |
120 | t->GetExternalParameters(fRx,fRp); | |
121 | t->GetExternalCovariance(fRc); | |
122 | ||
ae982df3 | 123 | switch (flags) { |
ad2f1f2b | 124 | |
9b859005 | 125 | case kITSin: case kITSout: case kITSrefit: |
ae982df3 | 126 | fITSncls=t->GetNumberOfClusters(); |
127 | fITSchi2=t->GetChi2(); | |
128 | for (Int_t i=0;i<fITSncls;i++) fITSindex[i]=t->GetClusterIndex(i); | |
129 | fITSsignal=t->GetPIDsignal(); | |
6e5b1b04 | 130 | fITSLabel = t->GetLabel(); |
babd135a | 131 | fITSFakeRatio = t->GetFakeRatio(); |
ae982df3 | 132 | break; |
ad2f1f2b | 133 | |
9b859005 | 134 | case kTPCin: case kTPCrefit: |
6e5b1b04 | 135 | fTPCLabel = t->GetLabel(); |
9b859005 | 136 | fIalpha=fRalpha; |
137 | fIx=fRx; | |
138 | { | |
139 | Int_t i; | |
140 | for (i=0; i<5; i++) fIp[i]=fRp[i]; | |
141 | for (i=0; i<15;i++) fIc[i]=fRc[i]; | |
142 | } | |
143 | case kTPCout: | |
a866ac60 | 144 | |
ae982df3 | 145 | fTPCncls=t->GetNumberOfClusters(); |
146 | fTPCchi2=t->GetChi2(); | |
a866ac60 | 147 | |
148 | {//prevrow must be declared in separate namespace, otherwise compiler cries: | |
149 | //"jump to case label crosses initialization of `Int_t prevrow'" | |
150 | Int_t prevrow = -1; | |
6e5b1b04 | 151 | // for (Int_t i=0;i<fTPCncls;i++) |
152 | for (Int_t i=0;i<160;i++) | |
a866ac60 | 153 | { |
154 | fTPCindex[i]=t->GetClusterIndex(i); | |
155 | ||
156 | // Piotr's Cluster Map for HBT | |
157 | // ### please change accordingly if cluster array is changing | |
158 | // to "New TPC Tracking" style (with gaps in array) | |
159 | Int_t idx = fTPCindex[i]; | |
160 | Int_t sect = (idx&0xff000000)>>24; | |
161 | Int_t row = (idx&0x00ff0000)>>16; | |
162 | if (sect > 18) row +=63; //if it is outer sector, add number of inner sectors | |
163 | ||
164 | fTPCClusterMap.SetBitNumber(row,kTRUE); | |
165 | ||
166 | //Fill the gap between previous row and this row with 0 bits | |
167 | //In case ### pleas change it as well - just set bit 0 in case there | |
168 | //is no associated clusters for current "i" | |
169 | if (prevrow < 0) | |
170 | { | |
171 | prevrow = row;//if previous bit was not assigned yet == this is the first one | |
172 | } | |
173 | else | |
174 | { //we don't know the order (inner to outer or reverse) | |
175 | //just to be save in case it is going to change | |
176 | Int_t n = 0, m = 0; | |
177 | if (prevrow < row) | |
178 | { | |
179 | n = prevrow; | |
180 | m = row; | |
181 | } | |
182 | else | |
183 | { | |
184 | n = row; | |
185 | m = prevrow; | |
186 | } | |
187 | ||
188 | for (Int_t j = n+1; j < m; j++) | |
189 | { | |
190 | fTPCClusterMap.SetBitNumber(j,kFALSE); | |
191 | } | |
192 | prevrow = row; | |
193 | } | |
194 | // End Of Piotr's Cluster Map for HBT | |
195 | } | |
196 | } | |
ae982df3 | 197 | fTPCsignal=t->GetPIDsignal(); |
198 | {Double_t mass=t->GetMass(); // preliminary mass setting | |
199 | if (mass>0.5) fR[4]=1.; // used by | |
200 | else if (mass<0.4) fR[2]=1.; // the ITS reconstruction | |
a866ac60 | 201 | else fR[3]=1.;} |
202 | // | |
ae982df3 | 203 | break; |
9b859005 | 204 | |
672b5f43 | 205 | case kTRDout: |
206 | { //requested by the PHOS ("temporary solution") | |
258fa377 | 207 | Double_t r=460.; |
e964f790 | 208 | if (t->PropagateTo(r,30.,0.)) { |
209 | fOalpha=t->GetAlpha(); | |
210 | t->GetExternalParameters(fOx,fOp); | |
211 | t->GetExternalCovariance(fOc); | |
212 | } | |
672b5f43 | 213 | } |
214 | case kTRDin: case kTRDrefit: | |
6e5b1b04 | 215 | fTRDLabel = t->GetLabel(); |
216 | ||
79e94bf8 | 217 | fTRDncls=t->GetNumberOfClusters(); |
218 | fTRDchi2=t->GetChi2(); | |
bb2ceb1f | 219 | for (Int_t i=0;i<fTRDncls;i++) fTRDindex[i]=t->GetClusterIndex(i); |
79e94bf8 | 220 | fTRDsignal=t->GetPIDsignal(); |
221 | break; | |
d0862fea | 222 | case kTRDStop: |
223 | break; | |
ae982df3 | 224 | default: |
225 | Error("UpdateTrackParams()","Wrong flag !\n"); | |
226 | return kFALSE; | |
227 | } | |
228 | ||
ae982df3 | 229 | return kTRUE; |
230 | } | |
231 | ||
67c3dcbe | 232 | //_______________________________________________________________________ |
233 | void | |
234 | AliESDtrack::SetConstrainedTrackParams(AliKalmanTrack *t, Double_t chi2) { | |
235 | // | |
236 | // This function sets the constrained track parameters | |
237 | // | |
238 | fCalpha=t->GetAlpha(); | |
239 | t->GetExternalParameters(fCx,fCp); | |
240 | t->GetExternalCovariance(fCc); | |
241 | fCchi2=chi2; | |
242 | } | |
243 | ||
244 | ||
ae982df3 | 245 | //_______________________________________________________________________ |
246 | void AliESDtrack::GetExternalParameters(Double_t &x, Double_t p[5]) const { | |
247 | //--------------------------------------------------------------------- | |
248 | // This function returns external representation of the track parameters | |
249 | //--------------------------------------------------------------------- | |
250 | x=fRx; | |
251 | for (Int_t i=0; i<5; i++) p[i]=fRp[i]; | |
252 | } | |
67c3dcbe | 253 | //_______________________________________________________________________ |
a866ac60 | 254 | void AliESDtrack::GetExternalCovariance(Double_t cov[15]) const { |
67c3dcbe | 255 | //--------------------------------------------------------------------- |
256 | // This function returns external representation of the cov. matrix | |
257 | //--------------------------------------------------------------------- | |
a866ac60 | 258 | for (Int_t i=0; i<15; i++) cov[i]=fRc[i]; |
67c3dcbe | 259 | } |
260 | ||
261 | ||
262 | //_______________________________________________________________________ | |
263 | void | |
264 | AliESDtrack::GetConstrainedExternalParameters(Double_t &x, Double_t p[5])const{ | |
265 | //--------------------------------------------------------------------- | |
266 | // This function returns the constrained external track parameters | |
267 | //--------------------------------------------------------------------- | |
268 | x=fCx; | |
269 | for (Int_t i=0; i<5; i++) p[i]=fCp[i]; | |
270 | } | |
271 | //_______________________________________________________________________ | |
272 | void | |
273 | AliESDtrack::GetConstrainedExternalCovariance(Double_t c[15]) const { | |
274 | //--------------------------------------------------------------------- | |
275 | // This function returns the constrained external cov. matrix | |
276 | //--------------------------------------------------------------------- | |
277 | for (Int_t i=0; i<15; i++) c[i]=fCc[i]; | |
278 | } | |
279 | ||
ae982df3 | 280 | |
281 | Double_t AliESDtrack::GetP() const { | |
282 | //--------------------------------------------------------------------- | |
283 | // This function returns the track momentum | |
284 | //--------------------------------------------------------------------- | |
2157f4f2 | 285 | if (TMath::Abs(fRp[4])<=0) return 0; |
ae982df3 | 286 | Double_t lam=TMath::ATan(fRp[3]); |
287 | Double_t pt=1./TMath::Abs(fRp[4]); | |
288 | return pt/TMath::Cos(lam); | |
289 | } | |
290 | ||
67c3dcbe | 291 | void AliESDtrack::GetConstrainedPxPyPz(Double_t *p) const { |
292 | //--------------------------------------------------------------------- | |
293 | // This function returns the constrained global track momentum components | |
294 | //--------------------------------------------------------------------- | |
2157f4f2 | 295 | if (TMath::Abs(fCp[4])<=0) { |
296 | p[0]=p[1]=p[2]=0; | |
297 | return; | |
298 | } | |
67c3dcbe | 299 | Double_t phi=TMath::ASin(fCp[2]) + fCalpha; |
300 | Double_t pt=1./TMath::Abs(fCp[4]); | |
301 | p[0]=pt*TMath::Cos(phi); p[1]=pt*TMath::Sin(phi); p[2]=pt*fCp[3]; | |
302 | } | |
303 | void AliESDtrack::GetConstrainedXYZ(Double_t *xyz) const { | |
304 | //--------------------------------------------------------------------- | |
305 | // This function returns the global track position | |
306 | //--------------------------------------------------------------------- | |
307 | Double_t phi=TMath::ATan2(fCp[0],fCx) + fCalpha; | |
308 | Double_t r=TMath::Sqrt(fCx*fCx + fCp[0]*fCp[0]); | |
309 | xyz[0]=r*TMath::Cos(phi); xyz[1]=r*TMath::Sin(phi); xyz[2]=fCp[1]; | |
310 | } | |
311 | ||
ae982df3 | 312 | void AliESDtrack::GetPxPyPz(Double_t *p) const { |
313 | //--------------------------------------------------------------------- | |
314 | // This function returns the global track momentum components | |
315 | //--------------------------------------------------------------------- | |
2157f4f2 | 316 | if (TMath::Abs(fRp[4])<=0) { |
317 | p[0]=p[1]=p[2]=0; | |
318 | return; | |
319 | } | |
ae982df3 | 320 | Double_t phi=TMath::ASin(fRp[2]) + fRalpha; |
321 | Double_t pt=1./TMath::Abs(fRp[4]); | |
322 | p[0]=pt*TMath::Cos(phi); p[1]=pt*TMath::Sin(phi); p[2]=pt*fRp[3]; | |
323 | } | |
ae982df3 | 324 | void AliESDtrack::GetXYZ(Double_t *xyz) const { |
325 | //--------------------------------------------------------------------- | |
326 | // This function returns the global track position | |
327 | //--------------------------------------------------------------------- | |
bb2ceb1f | 328 | Double_t phi=TMath::ATan2(fRp[0],fRx) + fRalpha; |
ae982df3 | 329 | Double_t r=TMath::Sqrt(fRx*fRx + fRp[0]*fRp[0]); |
330 | xyz[0]=r*TMath::Cos(phi); xyz[1]=r*TMath::Sin(phi); xyz[2]=fRp[1]; | |
331 | } | |
332 | ||
67c3dcbe | 333 | |
9b859005 | 334 | void AliESDtrack::GetInnerPxPyPz(Double_t *p) const { |
335 | //--------------------------------------------------------------------- | |
336 | // This function returns the global track momentum components | |
337 | // af the entrance of the TPC | |
338 | //--------------------------------------------------------------------- | |
e964f790 | 339 | if (fIx==0) {p[0]=p[1]=p[2]=0.; return;} |
9b859005 | 340 | Double_t phi=TMath::ASin(fIp[2]) + fIalpha; |
341 | Double_t pt=1./TMath::Abs(fIp[4]); | |
342 | p[0]=pt*TMath::Cos(phi); p[1]=pt*TMath::Sin(phi); p[2]=pt*fIp[3]; | |
343 | } | |
344 | ||
345 | void AliESDtrack::GetInnerXYZ(Double_t *xyz) const { | |
346 | //--------------------------------------------------------------------- | |
347 | // This function returns the global track position | |
348 | // af the entrance of the TPC | |
349 | //--------------------------------------------------------------------- | |
e964f790 | 350 | if (fIx==0) {xyz[0]=xyz[1]=xyz[2]=0.; return;} |
9b859005 | 351 | Double_t phi=TMath::ATan2(fIp[0],fIx) + fIalpha; |
352 | Double_t r=TMath::Sqrt(fIx*fIx + fIp[0]*fIp[0]); | |
353 | xyz[0]=r*TMath::Cos(phi); xyz[1]=r*TMath::Sin(phi); xyz[2]=fIp[1]; | |
354 | } | |
355 | ||
a866ac60 | 356 | void AliESDtrack::GetInnerExternalParameters(Double_t &x, Double_t p[5]) const |
357 | { | |
358 | //skowron | |
359 | //--------------------------------------------------------------------- | |
360 | // This function returns external representation of the track parameters at Inner Layer of TPC | |
361 | //--------------------------------------------------------------------- | |
362 | x=fIx; | |
363 | for (Int_t i=0; i<5; i++) p[i]=fIp[i]; | |
364 | } | |
365 | void AliESDtrack::GetInnerExternalCovariance(Double_t cov[15]) const | |
366 | { | |
367 | //skowron | |
368 | //--------------------------------------------------------------------- | |
369 | // This function returns external representation of the cov. matrix at Inner Layer of TPC | |
370 | //--------------------------------------------------------------------- | |
371 | for (Int_t i=0; i<15; i++) cov[i]=fIc[i]; | |
372 | ||
373 | } | |
374 | ||
672b5f43 | 375 | void AliESDtrack::GetOuterPxPyPz(Double_t *p) const { |
376 | //--------------------------------------------------------------------- | |
377 | // This function returns the global track momentum components | |
378 | // af the radius of the PHOS | |
379 | //--------------------------------------------------------------------- | |
e964f790 | 380 | if (fOx==0) {p[0]=p[1]=p[2]=0.; return;} |
672b5f43 | 381 | Double_t phi=TMath::ASin(fOp[2]) + fOalpha; |
382 | Double_t pt=1./TMath::Abs(fOp[4]); | |
383 | p[0]=pt*TMath::Cos(phi); p[1]=pt*TMath::Sin(phi); p[2]=pt*fOp[3]; | |
384 | } | |
385 | ||
386 | void AliESDtrack::GetOuterXYZ(Double_t *xyz) const { | |
387 | //--------------------------------------------------------------------- | |
388 | // This function returns the global track position | |
389 | // af the radius of the PHOS | |
390 | //--------------------------------------------------------------------- | |
e964f790 | 391 | if (fOx==0) {xyz[0]=xyz[1]=xyz[2]=0.; return;} |
672b5f43 | 392 | Double_t phi=TMath::ATan2(fOp[0],fOx) + fOalpha; |
393 | Double_t r=TMath::Sqrt(fOx*fOx + fOp[0]*fOp[0]); | |
394 | xyz[0]=r*TMath::Cos(phi); xyz[1]=r*TMath::Sin(phi); xyz[2]=fOp[1]; | |
395 | } | |
396 | ||
ae982df3 | 397 | //_______________________________________________________________________ |
398 | void AliESDtrack::GetIntegratedTimes(Double_t *times) const { | |
4427806c | 399 | // Returns the array with integrated times for each particle hypothesis |
ae982df3 | 400 | for (Int_t i=0; i<kSPECIES; i++) times[i]=fTrackTime[i]; |
401 | } | |
402 | ||
403 | //_______________________________________________________________________ | |
404 | void AliESDtrack::SetIntegratedTimes(const Double_t *times) { | |
4427806c | 405 | // Sets the array with integrated times for each particle hypotesis |
ae982df3 | 406 | for (Int_t i=0; i<kSPECIES; i++) fTrackTime[i]=times[i]; |
407 | } | |
408 | ||
c630aafd | 409 | //_______________________________________________________________________ |
4427806c | 410 | void AliESDtrack::SetITSpid(const Double_t *p) { |
411 | // Sets values for the probability of each particle type (in ITS) | |
c630aafd | 412 | for (Int_t i=0; i<kSPECIES; i++) fITSr[i]=p[i]; |
413 | SetStatus(AliESDtrack::kITSpid); | |
414 | } | |
415 | ||
babd135a | 416 | void AliESDtrack::SetITSChi2MIP(const Float_t *chi2mip){ |
417 | for (Int_t i=0; i<6; i++) fITSchi2MIP[i]=chi2mip[i]; | |
418 | } | |
c630aafd | 419 | //_______________________________________________________________________ |
420 | void AliESDtrack::GetITSpid(Double_t *p) const { | |
4427806c | 421 | // Gets the probability of each particle type (in ITS) |
c630aafd | 422 | for (Int_t i=0; i<kSPECIES; i++) p[i]=fITSr[i]; |
423 | } | |
424 | ||
ae982df3 | 425 | //_______________________________________________________________________ |
426 | Int_t AliESDtrack::GetITSclusters(UInt_t *idx) const { | |
427 | //--------------------------------------------------------------------- | |
428 | // This function returns indices of the assgined ITS clusters | |
429 | //--------------------------------------------------------------------- | |
430 | for (Int_t i=0; i<fITSncls; i++) idx[i]=fITSindex[i]; | |
431 | return fITSncls; | |
432 | } | |
433 | ||
434 | //_______________________________________________________________________ | |
05e445cd | 435 | Int_t AliESDtrack::GetTPCclusters(Int_t *idx) const { |
ae982df3 | 436 | //--------------------------------------------------------------------- |
437 | // This function returns indices of the assgined ITS clusters | |
438 | //--------------------------------------------------------------------- | |
d1420ddf | 439 | if (idx!=0) |
440 | for (Int_t i=0; i<180; i++) idx[i]=fTPCindex[i]; // MI I prefer some constant | |
ae982df3 | 441 | return fTPCncls; |
442 | } | |
8c6a71ab | 443 | |
444 | //_______________________________________________________________________ | |
445 | void AliESDtrack::SetTPCpid(const Double_t *p) { | |
4427806c | 446 | // Sets values for the probability of each particle type (in TPC) |
8c6a71ab | 447 | for (Int_t i=0; i<kSPECIES; i++) fTPCr[i]=p[i]; |
448 | SetStatus(AliESDtrack::kTPCpid); | |
449 | } | |
450 | ||
451 | //_______________________________________________________________________ | |
452 | void AliESDtrack::GetTPCpid(Double_t *p) const { | |
4427806c | 453 | // Gets the probability of each particle type (in TPC) |
8c6a71ab | 454 | for (Int_t i=0; i<kSPECIES; i++) p[i]=fTPCr[i]; |
455 | } | |
456 | ||
bb2ceb1f | 457 | //_______________________________________________________________________ |
458 | Int_t AliESDtrack::GetTRDclusters(UInt_t *idx) const { | |
459 | //--------------------------------------------------------------------- | |
460 | // This function returns indices of the assgined TRD clusters | |
461 | //--------------------------------------------------------------------- | |
d1420ddf | 462 | if (idx!=0) |
463 | for (Int_t i=0; i<90; i++) idx[i]=fTRDindex[i]; // MI I prefer some constant | |
bb2ceb1f | 464 | return fTRDncls; |
465 | } | |
466 | ||
c630aafd | 467 | //_______________________________________________________________________ |
468 | void AliESDtrack::SetTRDpid(const Double_t *p) { | |
4427806c | 469 | // Sets values for the probability of each particle type (in TRD) |
c630aafd | 470 | for (Int_t i=0; i<kSPECIES; i++) fTRDr[i]=p[i]; |
471 | SetStatus(AliESDtrack::kTRDpid); | |
472 | } | |
473 | ||
474 | //_______________________________________________________________________ | |
475 | void AliESDtrack::GetTRDpid(Double_t *p) const { | |
4427806c | 476 | // Gets the probability of each particle type (in TRD) |
c630aafd | 477 | for (Int_t i=0; i<kSPECIES; i++) p[i]=fTRDr[i]; |
478 | } | |
479 | ||
79e94bf8 | 480 | //_______________________________________________________________________ |
481 | void AliESDtrack::SetTRDpid(Int_t iSpecies, Float_t p) | |
482 | { | |
4427806c | 483 | // Sets the probability of particle type iSpecies to p (in TRD) |
79e94bf8 | 484 | fTRDr[iSpecies] = p; |
485 | } | |
486 | ||
487 | Float_t AliESDtrack::GetTRDpid(Int_t iSpecies) const | |
488 | { | |
4427806c | 489 | // Returns the probability of particle type iSpecies (in TRD) |
79e94bf8 | 490 | return fTRDr[iSpecies]; |
491 | } | |
492 | ||
c630aafd | 493 | //_______________________________________________________________________ |
494 | void AliESDtrack::SetTOFpid(const Double_t *p) { | |
4427806c | 495 | // Sets the probability of each particle type (in TOF) |
c630aafd | 496 | for (Int_t i=0; i<kSPECIES; i++) fTOFr[i]=p[i]; |
497 | SetStatus(AliESDtrack::kTOFpid); | |
498 | } | |
499 | ||
500 | //_______________________________________________________________________ | |
501 | void AliESDtrack::GetTOFpid(Double_t *p) const { | |
4427806c | 502 | // Gets probabilities of each particle type (in TOF) |
c630aafd | 503 | for (Int_t i=0; i<kSPECIES; i++) p[i]=fTOFr[i]; |
504 | } | |
505 | ||
4a78b8c5 | 506 | |
507 | ||
508 | //_______________________________________________________________________ | |
509 | void AliESDtrack::SetPHOSpid(const Double_t *p) { | |
510 | // Sets the probability of each particle type (in PHOS) | |
511 | for (Int_t i=0; i<kSPECIES; i++) fPHOSr[i]=p[i]; | |
512 | SetStatus(AliESDtrack::kPHOSpid); | |
513 | } | |
514 | ||
515 | //_______________________________________________________________________ | |
516 | void AliESDtrack::GetPHOSpid(Double_t *p) const { | |
517 | // Gets probabilities of each particle type (in PHOS) | |
518 | for (Int_t i=0; i<kSPECIES; i++) p[i]=fPHOSr[i]; | |
519 | } | |
520 | ||
521 | ||
522 | //_______________________________________________________________________ | |
523 | void AliESDtrack::SetRICHpid(const Double_t *p) { | |
524 | // Sets the probability of each particle type (in RICH) | |
525 | for (Int_t i=0; i<kSPECIES; i++) fRICHr[i]=p[i]; | |
526 | SetStatus(AliESDtrack::kRICHpid); | |
527 | } | |
528 | ||
529 | //_______________________________________________________________________ | |
530 | void AliESDtrack::GetRICHpid(Double_t *p) const { | |
531 | // Gets probabilities of each particle type (in RICH) | |
532 | for (Int_t i=0; i<kSPECIES; i++) p[i]=fRICHr[i]; | |
533 | } | |
534 | ||
535 | ||
536 | ||
8c6a71ab | 537 | //_______________________________________________________________________ |
538 | void AliESDtrack::SetESDpid(const Double_t *p) { | |
4427806c | 539 | // Sets the probability of each particle type for the ESD track |
8c6a71ab | 540 | for (Int_t i=0; i<kSPECIES; i++) fR[i]=p[i]; |
541 | SetStatus(AliESDtrack::kESDpid); | |
542 | } | |
543 | ||
544 | //_______________________________________________________________________ | |
545 | void AliESDtrack::GetESDpid(Double_t *p) const { | |
4427806c | 546 | // Gets probability of each particle type for the ESD track |
8c6a71ab | 547 | for (Int_t i=0; i<kSPECIES; i++) p[i]=fR[i]; |
548 | } | |
549 |