Update raw2digits framework (Ch.Finck)
[u/mrichter/AliRoot.git] / STEER / AliESDtrack.cxx
CommitLineData
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 **************************************************************************/
ae982df3 15//-----------------------------------------------------------------
16// Implementation of the ESD track class
4427806c 17// ESD = Event Summary Data
15614b8b 18// This is the class to deal with during the phisics analysis of data
4427806c 19// Origin: Iouri Belikov, CERN
20// e-mail: Jouri.Belikov@cern.ch
ae982df3 21//-----------------------------------------------------------------
22
23#include "TMath.h"
24
25#include "AliESDtrack.h"
26#include "AliKalmanTrack.h"
5f7789fc 27#include "AliLog.h"
ae982df3 28
29ClassImp(AliESDtrack)
30
31//_______________________________________________________________________
32AliESDtrack::AliESDtrack() :
90e48c0c 33 TObject(),
34 fFlags(0),
35 fLabel(0),
36 fID(0),
37 fTrackLength(0),
38 fD(0),
39 fZ(0),
40 fStopVertex(0),
41 fRalpha(0),
42 fRx(0),
43 fCalpha(0),
44 fCx(0),
45 fCchi2(1e10),
46 fIalpha(0),
47 fIx(0),
48 fTalpha(0),
49 fTx(0),
50 fITSchi2(0),
51 fITSncls(0),
52 fITSsignal(0),
53 fITSLabel(0),
54 fITSFakeRatio(0),
55 fITStrack(0),
56 fTPCchi2(0),
57 fTPCncls(0),
58 fTPCClusterMap(159),//number of padrows
59 fTPCsignal(0),
60 fTPCLabel(0),
61 fTRDchi2(0),
62 fTRDncls(0),
63 fTRDncls0(0),
64 fTRDsignal(0),
65 fTRDLabel(0),
66 fTRDQuality(0),
67 fTRDtrack(0),
68 fTOFchi2(0),
69 fTOFindex(0),
70 fTOFsignal(-1),
71 fPHOSsignal(-1),
72 fEMCALsignal(-1),
73 fRICHchi2(1e10),
74 fRICHncls(0),
75 fRICHindex(0),
76 fRICHsignal(-1),
77 fRICHtheta(0),
78 fRICHphi(0),
79 fRICHdx(0),
80 fRICHdy(0)
ae982df3 81{
82 //
83 // The default ESD constructor
84 //
304864ab 85 for (Int_t i=0; i<AliPID::kSPECIES; i++) {
4a78b8c5 86 fTrackTime[i]=0.;
87 fR[i]=1.;
88 fITSr[i]=1.;
89 fTPCr[i]=1.;
90 fTRDr[i]=1.;
91 fTOFr[i]=1.;
4a78b8c5 92 fRICHr[i]=1.;
2bad268c 93 }
ac2f7574 94
304864ab 95 for (Int_t i=0; i<AliPID::kSPECIESN; i++) {
704be597 96 fPHOSr[i] = 1.;
97 fEMCALr[i] = 1.;
98 }
99
ac2f7574 100
4a78b8c5 101 fPHOSpos[0]=fPHOSpos[1]=fPHOSpos[2]=0.;
704be597 102 fEMCALpos[0]=fEMCALpos[1]=fEMCALpos[2]=0.;
bb2ceb1f 103 Int_t i;
15614b8b 104 for (i=0; i<5; i++) {
23904d16 105 fRp[i]=fCp[i]=fIp[i]=fTp[i]=0.;
15614b8b 106 }
107 for (i=0; i<15; i++) {
23904d16 108 fRc[i]=fCc[i]=fIc[i]=fTc[i]=0.;
15614b8b 109 }
a866ac60 110 for (i=0; i<6; i++) { fITSindex[i]=0; }
111 for (i=0; i<180; i++){ fTPCindex[i]=0; }
51ad6848 112 for (i=0; i<3;i++) { fKinkIndexes[i]=0;}
113 for (i=0; i<3;i++) { fV0Indexes[i]=-1;}
c4d11b15 114 for (i=0; i<130; i++) { fTRDindex[i]=0; }
eab5961e 115 for (i=0;i<kNPlane;i++) {fTRDsignals[i]=0.; fTRDTimBin[i]=-1;}
51ad6848 116 for (Int_t i=0;i<4;i++) {fTPCPoints[i]=-1;}
117 for (Int_t i=0;i<3;i++) {fTOFLabel[i]=-1;}
118 for (Int_t i=0;i<10;i++) {fTOFInfo[i]=-1;}
6e5b1b04 119 fTPCLabel = 0;
120 fTRDLabel = 0;
7c97ee80 121 fTRDQuality =0;
6e5b1b04 122 fITSLabel = 0;
c4d11b15 123 fITStrack = 0;
124 fTRDtrack = 0;
125}
126
127//_______________________________________________________________________
90e48c0c 128AliESDtrack::AliESDtrack(const AliESDtrack& track):
129 TObject(track),
130 fFlags(track.fFlags),
131 fLabel(track.fLabel),
132 fID(track.fID),
133 fTrackLength(track.fTrackLength),
134 fD(track.fD),
135 fZ(track.fZ),
136 fStopVertex(track.fStopVertex),
137 fRalpha(track.fRalpha),
138 fRx(track.fRx),
139 fCalpha(track.fCalpha),
140 fCx(track.fCx),
141 fCchi2(track.fCchi2),
142 fIalpha(track.fIalpha),
143 fIx(track.fIx),
144 fTalpha(track.fTalpha),
145 fTx(track.fTx),
146 fITSchi2(track.fITSchi2),
147 fITSncls(track.fITSncls),
148 fITSsignal(track.fITSsignal),
149 fITSLabel(track.fITSLabel),
150 fITSFakeRatio(track.fITSFakeRatio),
151 fITStrack(0), //coping separatelly - in user code
152 fTPCchi2(track.fTPCchi2),
153 fTPCncls(track.fTPCncls),
154 fTPCClusterMap(track.fTPCClusterMap),
155 fTPCsignal(track.fTPCsignal),
156 fTPCLabel(track.fTPCLabel),
157 fTRDchi2(track.fTRDchi2),
158 fTRDncls(track.fTRDncls),
159 fTRDncls0(track.fTRDncls0),
160 fTRDsignal(track.fTRDsignal),
161 fTRDLabel(track.fTRDLabel),
162 fTRDQuality(track.fTRDQuality),
163 fTRDtrack(0),
164 fTOFchi2(track.fTOFchi2),
165 fTOFindex(track.fTOFindex),
166 fTOFsignal(track.fTOFsignal),
167 fPHOSsignal(track.fPHOSsignal),
168 fEMCALsignal(track.fEMCALsignal),
169 fRICHchi2(track.fRICHchi2),
170 fRICHncls(track.fRICHncls),
171 fRICHindex(track.fRICHindex),
172 fRICHsignal(track.fRICHsignal),
173 fRICHtheta(track.fRICHtheta),
174 fRICHphi(track.fRICHphi),
175 fRICHdx(track.fRICHdx),
176 fRICHdy(track.fRICHdy)
177{
c4d11b15 178 //
179 //copy constructor
180 //
304864ab 181 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTrackTime[i] =track.fTrackTime[i];
182 for (Int_t i=0;i<AliPID::kSPECIES;i++) fR[i] =track.fR[i];
c4d11b15 183 //
c4d11b15 184 for (Int_t i=0;i<5;i++) fRp[i] =track.fRp[i];
185 for (Int_t i=0;i<15;i++) fRc[i] =track.fRc[i];
186 //
c4d11b15 187 for (Int_t i=0;i<5;i++) fCp[i] =track.fCp[i];
188 for (Int_t i=0;i<15;i++) fCc[i] =track.fCc[i];
c4d11b15 189 //
c4d11b15 190 for (Int_t i=0;i<5;i++) fIp[i] =track.fIp[i];
191 for (Int_t i=0;i<15;i++) fIc[i] =track.fIc[i];
192 //
c4d11b15 193 for (Int_t i=0;i<5;i++) fTp[i] =track.fTp[i];
194 for (Int_t i=0;i<15;i++) fTc[i] =track.fTc[i];
195 //
c4d11b15 196 for (Int_t i=0;i<12;i++) fITSchi2MIP[i] =track.fITSchi2MIP[i];
c4d11b15 197 for (Int_t i=0;i<6;i++) fITSindex[i]=track.fITSindex[i];
304864ab 198 for (Int_t i=0;i<AliPID::kSPECIES;i++) fITSr[i]=track.fITSr[i];
c4d11b15 199 //
c4d11b15 200 for (Int_t i=0;i<180;i++) fTPCindex[i]=track.fTPCindex[i];
304864ab 201 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTPCr[i]=track.fTPCr[i];
51ad6848 202 for (Int_t i=0;i<4;i++) {fTPCPoints[i]=track.fTPCPoints[i];}
203 for (Int_t i=0; i<3;i++) { fKinkIndexes[i]=track.fKinkIndexes[i];}
204 for (Int_t i=0; i<3;i++) { fV0Indexes[i]=track.fV0Indexes[i];}
c4d11b15 205 //
c4d11b15 206 for (Int_t i=0;i<130;i++) fTRDindex[i]=track.fTRDindex[i];
eab5961e 207 for (Int_t i=0;i<kNPlane;i++) {
208 fTRDsignals[i]=track.fTRDsignals[i];
209 fTRDTimBin[i]=track.fTRDTimBin[i];
210 }
304864ab 211 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTRDr[i]=track.fTRDr[i];
c4d11b15 212 //
304864ab 213 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTOFr[i]=track.fTOFr[i];
51ad6848 214 for (Int_t i=0;i<3;i++) fTOFLabel[i]=track.fTOFLabel[i];
215 for (Int_t i=0;i<10;i++) fTOFInfo[i]=track.fTOFInfo[i];
c4d11b15 216 //
217 for (Int_t i=0;i<3;i++) fPHOSpos[i]=track.fPHOSpos[i];
304864ab 218 for (Int_t i=0;i<AliPID::kSPECIESN;i++) fPHOSr[i]=track.fPHOSr[i];
c4d11b15 219 //
220 for (Int_t i=0;i<3;i++) fEMCALpos[i]=track.fEMCALpos[i];
304864ab 221 for (Int_t i=0;i<AliPID::kSPECIESN;i++) fEMCALr[i]=track.fEMCALr[i];
c4d11b15 222 //
304864ab 223 for (Int_t i=0;i<AliPID::kSPECIES;i++) fRICHr[i]=track.fRICHr[i];
ae982df3 224}
c4d11b15 225//_______________________________________________________________________
226AliESDtrack::~AliESDtrack(){
227 //
228 // This is destructor according Coding Conventrions
229 //
230 //printf("Delete track\n");
3fd96ae3 231 delete fITStrack;
232 delete fTRDtrack;
c4d11b15 233}
ae982df3 234
235//_______________________________________________________________________
9559cbc4 236void AliESDtrack::MakeMiniESDtrack(){
237 // Resets everything except
238 // fFlags: Reconstruction status flags
239 // fLabel: Track label
240 // fID: Unique ID of the track
241 // fD: Impact parameter in XY-plane
242 // fZ: Impact parameter in Z
243 // fR[AliPID::kSPECIES]: combined "detector response probability"
244 // Running track parameters
245 // fRalpha: track rotation angle
246 // fRx: X-coordinate of the track reference plane
247 // fRp[5]: external track parameters
248 // fRc[15]: external cov. matrix of the track parameters
249
250 fTrackLength = 0;
251 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTrackTime[i] = 0;
252 fStopVertex = 0;
253
254 // Reset track parameters constrained to the primary vertex
255 fCalpha = 0;
256 fCx = 0;
257 for (Int_t i=0;i<5;i++) fCp[i] = 0;
258 for (Int_t i=0;i<15;i++) fCc[i] = 0;
259 fCchi2 = 0;
260
261 // Reset track parameters at the inner wall of TPC
262 fIalpha = 0;
263 fIx = 0;
264 for (Int_t i=0;i<5;i++) fIp[i] = 0;
265 for (Int_t i=0;i<15;i++) fIc[i] = 0;
266
267 // Reset track parameters at the inner wall of the TRD
268 fTalpha = 0;
269 fTx = 0;
270 for (Int_t i=0;i<5;i++) fTp[i] = 0;
271 for (Int_t i=0;i<15;i++) fTc[i] = 0;
272
273 // Reset ITS track related information
274 fITSchi2 = 0;
275 for (Int_t i=0;i<12;i++) fITSchi2MIP[i] = 0;
276 fITSncls = 0;
277 for (Int_t i=0;i<6;i++) fITSindex[i]= 0;
278 fITSsignal = 0;
279 for (Int_t i=0;i<AliPID::kSPECIES;i++) fITSr[i]= 0;
280 fITSLabel = 0;
281 fITSFakeRatio = 0;
282 fITStrack =0;
283
284 // Reset TPC related track information
285 fTPCchi2 = 0;
286 fTPCncls = 0;
287 for (Int_t i=0;i<180;i++) fTPCindex[i] = 0;
288 fTPCClusterMap = 0;
289 fTPCsignal= 0;
290 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTPCr[i]=0;
291 fTPCLabel=0;
292 for (Int_t i=0;i<4;i++) fTPCPoints[i] = 0;
293 for (Int_t i=0; i<3;i++) fKinkIndexes[i] = 0;
294 for (Int_t i=0; i<3;i++) fV0Indexes[i] = 0;
295
296 // Reset TRD related track information
297 fTRDchi2 = 0;
298 fTRDncls = 0;
299 fTRDncls0 = 0;
300 for (Int_t i=0;i<130;i++) fTRDindex[i] = 0;
301 fTRDsignal = 0;
302 for (Int_t i=0;i<kNPlane;i++) {
303 fTRDsignals[i] = 0;
304 fTRDTimBin[i] = 0;
305 }
306 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTRDr[i] = 0;
307 fTRDLabel = 0;
308 fTRDtrack = 0;
309 fTRDQuality = 0;
310
311 // Reset TOF related track information
312 fTOFchi2 = 0;
313 fTOFindex = 0;
314 fTOFsignal = 0;
315 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTOFr[i] = 0;
316 for (Int_t i=0;i<3;i++) fTOFLabel[i] = 0;
317 for (Int_t i=0;i<10;i++) fTOFInfo[i] = 0;
318
319 // Reset PHOS related track information
320 for (Int_t i=0;i<3;i++) fPHOSpos[i] = 0;
321 fPHOSsignal = 0;
322 for (Int_t i=0;i<AliPID::kSPECIESN;i++) fPHOSr[i] = 0;
323
324 // Reset EMCAL related track information
325 for (Int_t i=0;i<3;i++) fEMCALpos[i] = 0;
326 fEMCALsignal = 0;
327 for (Int_t i=0;i<AliPID::kSPECIESN;i++) fEMCALr[i] = 0;
328
329 // Reset RICH related track information
330 fRICHchi2 = 0;
331 fRICHncls = 0;
332 fRICHindex = 0;
333 fRICHsignal = 0;
334 for (Int_t i=0;i<AliPID::kSPECIES;i++) fRICHr[i] = 0;
335 fRICHtheta = 0;
336 fRICHphi = 0;
337 fRICHdx = 0;
338 fRICHdy = 0;
339
340}
341//_______________________________________________________________________
4a78b8c5 342Double_t AliESDtrack::GetMass() const {
4427806c 343 // Returns the mass of the most probable particle type
ae982df3 344 Float_t max=0.;
345 Int_t k=-1;
304864ab 346 for (Int_t i=0; i<AliPID::kSPECIES; i++) {
ae982df3 347 if (fR[i]>max) {k=i; max=fR[i];}
348 }
db3989b3 349 if (k==0) { // dE/dx "crossing points" in the TPC
350 Double_t p=GetP();
351 if ((p>0.38)&&(p<0.48))
304864ab 352 if (fR[0]<fR[3]*10.) return AliPID::ParticleMass(AliPID::kKaon);
db3989b3 353 if ((p>0.75)&&(p<0.85))
304864ab 354 if (fR[0]<fR[4]*10.) return AliPID::ParticleMass(AliPID::kProton);
db3989b3 355 return 0.00051;
356 }
304864ab 357 if (k==1) return AliPID::ParticleMass(AliPID::kMuon);
358 if (k==2||k==-1) return AliPID::ParticleMass(AliPID::kPion);
359 if (k==3) return AliPID::ParticleMass(AliPID::kKaon);
360 if (k==4) return AliPID::ParticleMass(AliPID::kProton);
5f7789fc 361 AliWarning("Undefined mass !");
304864ab 362 return AliPID::ParticleMass(AliPID::kPion);
ae982df3 363}
364
365//_______________________________________________________________________
15614b8b 366Bool_t AliESDtrack::UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags) {
ae982df3 367 //
368 // This function updates track's running parameters
369 //
15614b8b 370 Bool_t rc=kTRUE;
371
9b859005 372 SetStatus(flags);
373 fLabel=t->GetLabel();
374
375 if (t->IsStartedTimeIntegral()) {
376 SetStatus(kTIME);
377 Double_t times[10];t->GetIntegratedTimes(times); SetIntegratedTimes(times);
378 SetIntegratedLength(t->GetIntegratedLength());
379 }
380
381 fRalpha=t->GetAlpha();
382 t->GetExternalParameters(fRx,fRp);
383 t->GetExternalCovariance(fRc);
384
ae982df3 385 switch (flags) {
ad2f1f2b 386
9b859005 387 case kITSin: case kITSout: case kITSrefit:
ae982df3 388 fITSncls=t->GetNumberOfClusters();
389 fITSchi2=t->GetChi2();
390 for (Int_t i=0;i<fITSncls;i++) fITSindex[i]=t->GetClusterIndex(i);
391 fITSsignal=t->GetPIDsignal();
6e5b1b04 392 fITSLabel = t->GetLabel();
babd135a 393 fITSFakeRatio = t->GetFakeRatio();
ae982df3 394 break;
ad2f1f2b 395
9b859005 396 case kTPCin: case kTPCrefit:
6e5b1b04 397 fTPCLabel = t->GetLabel();
9b859005 398 fIalpha=fRalpha;
51ad6848 399 fIx=fRx;
9b859005 400 {
401 Int_t i;
402 for (i=0; i<5; i++) fIp[i]=fRp[i];
403 for (i=0; i<15;i++) fIc[i]=fRc[i];
404 }
405 case kTPCout:
a866ac60 406
ae982df3 407 fTPCncls=t->GetNumberOfClusters();
408 fTPCchi2=t->GetChi2();
a866ac60 409
410 {//prevrow must be declared in separate namespace, otherwise compiler cries:
411 //"jump to case label crosses initialization of `Int_t prevrow'"
412 Int_t prevrow = -1;
6e5b1b04 413 // for (Int_t i=0;i<fTPCncls;i++)
414 for (Int_t i=0;i<160;i++)
a866ac60 415 {
416 fTPCindex[i]=t->GetClusterIndex(i);
417
418 // Piotr's Cluster Map for HBT
419 // ### please change accordingly if cluster array is changing
420 // to "New TPC Tracking" style (with gaps in array)
421 Int_t idx = fTPCindex[i];
422 Int_t sect = (idx&0xff000000)>>24;
423 Int_t row = (idx&0x00ff0000)>>16;
424 if (sect > 18) row +=63; //if it is outer sector, add number of inner sectors
425
426 fTPCClusterMap.SetBitNumber(row,kTRUE);
427
428 //Fill the gap between previous row and this row with 0 bits
429 //In case ### pleas change it as well - just set bit 0 in case there
430 //is no associated clusters for current "i"
431 if (prevrow < 0)
432 {
433 prevrow = row;//if previous bit was not assigned yet == this is the first one
434 }
435 else
436 { //we don't know the order (inner to outer or reverse)
437 //just to be save in case it is going to change
438 Int_t n = 0, m = 0;
439 if (prevrow < row)
440 {
441 n = prevrow;
442 m = row;
443 }
444 else
445 {
446 n = row;
447 m = prevrow;
448 }
449
450 for (Int_t j = n+1; j < m; j++)
451 {
452 fTPCClusterMap.SetBitNumber(j,kFALSE);
453 }
454 prevrow = row;
455 }
456 // End Of Piotr's Cluster Map for HBT
457 }
458 }
ae982df3 459 fTPCsignal=t->GetPIDsignal();
460 {Double_t mass=t->GetMass(); // preliminary mass setting
461 if (mass>0.5) fR[4]=1.; // used by
462 else if (mass<0.4) fR[2]=1.; // the ITS reconstruction
a866ac60 463 else fR[3]=1.;}
464 //
ae982df3 465 break;
9b859005 466
23904d16 467 case kTRDout: case kTRDin: case kTRDrefit:
51ad6848 468 fTRDLabel = t->GetLabel();
79e94bf8 469 fTRDncls=t->GetNumberOfClusters();
470 fTRDchi2=t->GetChi2();
bb2ceb1f 471 for (Int_t i=0;i<fTRDncls;i++) fTRDindex[i]=t->GetClusterIndex(i);
79e94bf8 472 fTRDsignal=t->GetPIDsignal();
473 break;
c4d11b15 474 case kTRDbackup:
475 t->GetExternalParameters(fTx,fTp);
476 t->GetExternalCovariance(fTc);
35f4ab61 477 fTalpha = t->GetAlpha();
c4d11b15 478 fTRDncls0 = t->GetNumberOfClusters();
479 break;
480 case kTOFin:
481 break;
482 case kTOFout:
483 break;
d0862fea 484 case kTRDStop:
485 break;
ae982df3 486 default:
5f7789fc 487 AliError("Wrong flag !");
ae982df3 488 return kFALSE;
489 }
490
15614b8b 491 return rc;
ae982df3 492}
493
494//_______________________________________________________________________
67c3dcbe 495void
5ccd1720 496AliESDtrack::SetConstrainedTrackParams(const AliKalmanTrack *t, Double_t chi2) {
67c3dcbe 497 //
498 // This function sets the constrained track parameters
499 //
db3989b3 500 Int_t i;
501 Double_t x,buf[15];
67c3dcbe 502 fCalpha=t->GetAlpha();
db3989b3 503 t->GetExternalParameters(x,buf); fCx=x;
504 for (i=0; i<5; i++) fCp[i]=buf[i];
505 t->GetExternalCovariance(buf);
506 for (i=0; i<15; i++) fCc[i]=buf[i];
67c3dcbe 507 fCchi2=chi2;
508}
509
510
511//_______________________________________________________________________
ae982df3 512void AliESDtrack::GetExternalParameters(Double_t &x, Double_t p[5]) const {
513 //---------------------------------------------------------------------
514 // This function returns external representation of the track parameters
515 //---------------------------------------------------------------------
516 x=fRx;
517 for (Int_t i=0; i<5; i++) p[i]=fRp[i];
518}
15614b8b 519
520//_______________________________________________________________________
521Bool_t AliESDtrack::GetExternalParametersAt(Double_t x, Double_t p[5]) const {
522 //---------------------------------------------------------------------
523 // This function returns external representation of the track parameters
524 // at the position given by the first argument
525 //---------------------------------------------------------------------
526 Double_t dx=x-fRx;
527 Double_t f1=fRp[2], f2=f1 + dx*fRp[4]/AliKalmanTrack::GetConvConst();
528
529 if (TMath::Abs(f2) >= 0.9999) return kFALSE;
530
531 Double_t r1=TMath::Sqrt(1.- f1*f1), r2=TMath::Sqrt(1.- f2*f2);
532 p[0] = fRp[0] + dx*(f1+f2)/(r1+r2);
533 p[1] = fRp[1] + dx*(f1+f2)/(f1*r2 + f2*r1)*fRp[3];
534 p[2] = f2;
535 p[3] = fRp[3];
536 p[4] = fRp[4];
537
538 return kTRUE;
539}
540
67c3dcbe 541//_______________________________________________________________________
a866ac60 542void AliESDtrack::GetExternalCovariance(Double_t cov[15]) const {
67c3dcbe 543 //---------------------------------------------------------------------
544 // This function returns external representation of the cov. matrix
545 //---------------------------------------------------------------------
a866ac60 546 for (Int_t i=0; i<15; i++) cov[i]=fRc[i];
67c3dcbe 547}
548
549
550//_______________________________________________________________________
551void
552AliESDtrack::GetConstrainedExternalParameters(Double_t &x, Double_t p[5])const{
553 //---------------------------------------------------------------------
554 // This function returns the constrained external track parameters
555 //---------------------------------------------------------------------
556 x=fCx;
557 for (Int_t i=0; i<5; i++) p[i]=fCp[i];
558}
559//_______________________________________________________________________
560void
561AliESDtrack::GetConstrainedExternalCovariance(Double_t c[15]) const {
562 //---------------------------------------------------------------------
563 // This function returns the constrained external cov. matrix
564 //---------------------------------------------------------------------
565 for (Int_t i=0; i<15; i++) c[i]=fCc[i];
566}
567
ae982df3 568
569Double_t AliESDtrack::GetP() const {
570 //---------------------------------------------------------------------
571 // This function returns the track momentum
b322ab2f 572 // Results for (nearly) straight tracks are meaningless !
ae982df3 573 //---------------------------------------------------------------------
2157f4f2 574 if (TMath::Abs(fRp[4])<=0) return 0;
ae982df3 575 Double_t pt=1./TMath::Abs(fRp[4]);
5bc70ad8 576 return pt*TMath::Sqrt(1.+ fRp[3]*fRp[3]);
ae982df3 577}
578
038834e7 579//_______________________________________________________________________
580Double_t AliESDtrack::GetD(Double_t x, Double_t y) const {
581 //------------------------------------------------------------------
582 // This function calculates the transverse impact parameter
583 // with respect to a point with global coordinates (x,y)
584 //------------------------------------------------------------------
585 Double_t rp4=fRp[4]/AliKalmanTrack::GetConvConst();
586
587 Double_t xt=fRx, yt=fRp[0];
588
589 Double_t sn=TMath::Sin(fRalpha), cs=TMath::Cos(fRalpha);
590 Double_t a = x*cs + y*sn;
591 y = -x*sn + y*cs; x=a;
592 xt-=x; yt-=y;
593
594 sn=rp4*xt - fRp[2]; cs=rp4*yt + TMath::Sqrt(1.- fRp[2]*fRp[2]);
595 a=2*(xt*fRp[2] - yt*TMath::Sqrt(1.- fRp[2]*fRp[2]))-rp4*(xt*xt + yt*yt);
596 if (rp4<0) a=-a;
597 return a/(1 + TMath::Sqrt(sn*sn + cs*cs));
598}
599
09c96efc 600Bool_t Local2GlobalMomentum(Double_t p[3],Double_t alpha) {
601 //----------------------------------------------------------------
602 // This function performs local->global transformation of the
603 // track momentum.
604 // When called, the arguments are:
605 // p[0] = 1/pt of the track;
606 // p[1] = sine of local azim. angle of the track momentum;
607 // p[2] = tangent of the track momentum dip angle;
608 // alpha - rotation angle.
609 // The result is returned as:
610 // p[0] = px
611 // p[1] = py
612 // p[2] = pz
613 // Results for (nearly) straight tracks are meaningless !
614 //----------------------------------------------------------------
615 if (TMath::Abs(p[0])<=0) return kFALSE;
616 if (TMath::Abs(p[1])> 0.999999) return kFALSE;
617
618 Double_t pt=1./TMath::Abs(p[0]);
619 Double_t cs=TMath::Cos(alpha), sn=TMath::Sin(alpha);
620 Double_t r=TMath::Sqrt(1 - p[1]*p[1]);
621 p[0]=pt*(r*cs - p[1]*sn); p[1]=pt*(p[1]*cs + r*sn); p[2]=pt*p[2];
622
623 return kTRUE;
624}
625
626Bool_t Local2GlobalPosition(Double_t r[3],Double_t alpha) {
627 //----------------------------------------------------------------
628 // This function performs local->global transformation of the
629 // track position.
630 // When called, the arguments are:
631 // r[0] = local x
632 // r[1] = local y
633 // r[2] = local z
634 // alpha - rotation angle.
635 // The result is returned as:
636 // r[0] = global x
637 // r[1] = global y
638 // r[2] = global z
639 //----------------------------------------------------------------
640 Double_t cs=TMath::Cos(alpha), sn=TMath::Sin(alpha), x=r[0];
641 r[0]=x*cs - r[1]*sn; r[1]=x*sn + r[1]*cs;
642
643 return kTRUE;
644}
645
646Bool_t AliESDtrack::GetConstrainedPxPyPz(Double_t *p) const {
67c3dcbe 647 //---------------------------------------------------------------------
648 // This function returns the constrained global track momentum components
b322ab2f 649 // Results for (nearly) straight tracks are meaningless !
67c3dcbe 650 //---------------------------------------------------------------------
09c96efc 651 p[0]=fCp[4]; p[1]=fCp[2]; p[2]=fCp[3];
652 return Local2GlobalMomentum(p,fCalpha);
653}
b322ab2f 654
09c96efc 655Bool_t AliESDtrack::GetConstrainedXYZ(Double_t *r) const {
67c3dcbe 656 //---------------------------------------------------------------------
09c96efc 657 // This function returns the constrained global track position
67c3dcbe 658 //---------------------------------------------------------------------
09c96efc 659 r[0]=fCx; r[1]=fCp[0]; r[2]=fCp[1];
660 return Local2GlobalPosition(r,fCalpha);
67c3dcbe 661}
662
09c96efc 663Bool_t AliESDtrack::GetPxPyPz(Double_t *p) const {
ae982df3 664 //---------------------------------------------------------------------
665 // This function returns the global track momentum components
b322ab2f 666 // Results for (nearly) straight tracks are meaningless !
ae982df3 667 //---------------------------------------------------------------------
09c96efc 668 p[0]=fRp[4]; p[1]=fRp[2]; p[2]=fRp[3];
669 return Local2GlobalMomentum(p,fRalpha);
ae982df3 670}
b322ab2f 671
09c96efc 672Bool_t AliESDtrack::GetXYZ(Double_t *r) const {
ae982df3 673 //---------------------------------------------------------------------
674 // This function returns the global track position
675 //---------------------------------------------------------------------
09c96efc 676 r[0]=fRx; r[1]=fRp[0]; r[2]=fRp[1];
677 return Local2GlobalPosition(r,fRalpha);
ae982df3 678}
679
b322ab2f 680void AliESDtrack::GetCovariance(Double_t cv[21]) const {
681 //---------------------------------------------------------------------
682 // This function returns the global covariance matrix of the track params
683 //
684 // Cov(x,x) ... : cv[0]
685 // Cov(y,x) ... : cv[1] cv[2]
686 // Cov(z,x) ... : cv[3] cv[4] cv[5]
687 // Cov(px,x)... : cv[6] cv[7] cv[8] cv[9]
23904d16 688 // Cov(py,x)... : cv[10] cv[11] cv[12] cv[13] cv[14]
689 // Cov(pz,x)... : cv[15] cv[16] cv[17] cv[18] cv[19] cv[20]
b322ab2f 690 //
691 // Results for (nearly) straight tracks are meaningless !
692 //---------------------------------------------------------------------
693 if (TMath::Abs(fRp[4])<=0) {
694 for (Int_t i=0; i<21; i++) cv[i]=0.;
695 return;
696 }
697 if (TMath::Abs(fRp[2]) > 0.999999) {
698 for (Int_t i=0; i<21; i++) cv[i]=0.;
699 return;
700 }
701 Double_t pt=1./TMath::Abs(fRp[4]);
702 Double_t cs=TMath::Cos(fRalpha), sn=TMath::Sin(fRalpha);
703 Double_t r=TMath::Sqrt(1-fRp[2]*fRp[2]);
704
705 Double_t m00=-sn, m10=cs;
706 Double_t m23=-pt*(sn + fRp[2]*cs/r), m43=-pt*pt*(r*cs - fRp[2]*sn);
707 Double_t m24= pt*(cs - fRp[2]*sn/r), m44=-pt*pt*(r*sn + fRp[2]*cs);
708 Double_t m35=pt, m45=-pt*pt*fRp[3];
709
710 cv[0]=fRc[0]*m00*m00;
711 cv[1]=fRc[0]*m00*m10;
712 cv[2]=fRc[0]*m10*m10;
713 cv[3]=fRc[1]*m00;
714 cv[4]=fRc[1]*m10;
715 cv[5]=fRc[2];
716 cv[6]=m00*(fRc[3]*m23+fRc[10]*m43);
717 cv[7]=m10*(fRc[3]*m23+fRc[10]*m43);
718 cv[8]=fRc[4]*m23+fRc[11]*m43;
719 cv[9]=m23*(fRc[5]*m23+fRc[12]*m43)+m43*(fRc[12]*m23+fRc[14]*m43);
720 cv[10]=m00*(fRc[3]*m24+fRc[10]*m44);
721 cv[11]=m10*(fRc[3]*m24+fRc[10]*m44);
722 cv[12]=fRc[4]*m24+fRc[11]*m44;
723 cv[13]=m23*(fRc[5]*m24+fRc[12]*m44)+m43*(fRc[12]*m24+fRc[14]*m44);
724 cv[14]=m24*(fRc[5]*m24+fRc[12]*m44)+m44*(fRc[12]*m24+fRc[14]*m44);
725 cv[15]=m00*(fRc[6]*m35+fRc[10]*m45);
726 cv[16]=m10*(fRc[6]*m35+fRc[10]*m45);
727 cv[17]=fRc[7]*m35+fRc[11]*m45;
728 cv[18]=m23*(fRc[8]*m35+fRc[12]*m45)+m43*(fRc[13]*m35+fRc[14]*m45);
729 cv[19]=m24*(fRc[8]*m35+fRc[12]*m45)+m44*(fRc[13]*m35+fRc[14]*m45);
730 cv[20]=m35*(fRc[9]*m35+fRc[13]*m45)+m45*(fRc[13]*m35+fRc[14]*m45);
731}
67c3dcbe 732
09c96efc 733Bool_t AliESDtrack::GetInnerPxPyPz(Double_t *p) const {
9b859005 734 //---------------------------------------------------------------------
735 // This function returns the global track momentum components
736 // af the entrance of the TPC
737 //---------------------------------------------------------------------
09c96efc 738 p[0]=fIp[4]; p[1]=fIp[2]; p[2]=fIp[3];
739 return Local2GlobalMomentum(p,fIalpha);
9b859005 740}
741
09c96efc 742Bool_t AliESDtrack::GetInnerXYZ(Double_t *r) const {
9b859005 743 //---------------------------------------------------------------------
744 // This function returns the global track position
745 // af the entrance of the TPC
746 //---------------------------------------------------------------------
09c96efc 747 if (fIx==0) return kFALSE;
748 r[0]=fIx; r[1]=fIp[0]; r[2]=fIp[1];
749 return Local2GlobalPosition(r,fIalpha);
9b859005 750}
751
a866ac60 752void AliESDtrack::GetInnerExternalParameters(Double_t &x, Double_t p[5]) const
753{
754 //skowron
755 //---------------------------------------------------------------------
756 // This function returns external representation of the track parameters at Inner Layer of TPC
757 //---------------------------------------------------------------------
758 x=fIx;
759 for (Int_t i=0; i<5; i++) p[i]=fIp[i];
760}
761void AliESDtrack::GetInnerExternalCovariance(Double_t cov[15]) const
762{
763 //skowron
764 //---------------------------------------------------------------------
765 // This function returns external representation of the cov. matrix at Inner Layer of TPC
766 //---------------------------------------------------------------------
767 for (Int_t i=0; i<15; i++) cov[i]=fIc[i];
768
769}
770
35f4ab61 771void AliESDtrack::GetTRDExternalParameters(Double_t &x, Double_t&alpha, Double_t p[5], Double_t cov[15]) const
c4d11b15 772{
773 //
774 //this function returns TRD parameters
775 //
776 x=fTx;
35f4ab61 777 alpha = fTalpha;
c4d11b15 778 for (Int_t i=0; i<5; i++) p[i]=fTp[i];
779 for (Int_t i=0; i<15; i++) cov[i]=fTc[i];
780}
781
23904d16 782Bool_t AliESDtrack::GetPxPyPzAt(Double_t x,Double_t *p) const {
672b5f43 783 //---------------------------------------------------------------------
784 // This function returns the global track momentum components
23904d16 785 // at the position "x" using the helix track approximation
672b5f43 786 //---------------------------------------------------------------------
09c96efc 787 p[0]=fRp[4];
788 p[1]=fRp[2]+(x-fRx)*fRp[4]/AliKalmanTrack::GetConvConst();
789 p[2]=fRp[3];
790 return Local2GlobalMomentum(p,fRalpha);
672b5f43 791}
792
09c96efc 793Bool_t AliESDtrack::GetXYZAt(Double_t x, Double_t *r) const {
3fd96ae3 794 //---------------------------------------------------------------------
795 // This function returns the global track position
23904d16 796 // af the radius "x" using the helix track approximation
3fd96ae3 797 //---------------------------------------------------------------------
23904d16 798 Double_t dx=x-fRx;
799 Double_t f1=fRp[2], f2=f1 + dx*fRp[4]/AliKalmanTrack::GetConvConst();
800
801 if (TMath::Abs(f2) >= 0.9999) return kFALSE;
802
803 Double_t r1=TMath::Sqrt(1.- f1*f1), r2=TMath::Sqrt(1.- f2*f2);
09c96efc 804 r[0] = x;
805 r[1] = fRp[0] + dx*(f1+f2)/(r1+r2);
806 r[2] = fRp[1] + dx*(f1+f2)/(f1*r2 + f2*r1)*fRp[3];
807 return Local2GlobalPosition(r,fRalpha);
23904d16 808}
672b5f43 809
ae982df3 810//_______________________________________________________________________
ae982df3 811void AliESDtrack::GetIntegratedTimes(Double_t *times) const {
4427806c 812 // Returns the array with integrated times for each particle hypothesis
304864ab 813 for (Int_t i=0; i<AliPID::kSPECIES; i++) times[i]=fTrackTime[i];
ae982df3 814}
815
816//_______________________________________________________________________
817void AliESDtrack::SetIntegratedTimes(const Double_t *times) {
4427806c 818 // Sets the array with integrated times for each particle hypotesis
304864ab 819 for (Int_t i=0; i<AliPID::kSPECIES; i++) fTrackTime[i]=times[i];
ae982df3 820}
821
822//_______________________________________________________________________
4427806c 823void AliESDtrack::SetITSpid(const Double_t *p) {
824 // Sets values for the probability of each particle type (in ITS)
304864ab 825 for (Int_t i=0; i<AliPID::kSPECIES; i++) fITSr[i]=p[i];
c630aafd 826 SetStatus(AliESDtrack::kITSpid);
827}
828
babd135a 829void AliESDtrack::SetITSChi2MIP(const Float_t *chi2mip){
c4d11b15 830 for (Int_t i=0; i<12; i++) fITSchi2MIP[i]=chi2mip[i];
babd135a 831}
c630aafd 832//_______________________________________________________________________
833void AliESDtrack::GetITSpid(Double_t *p) const {
4427806c 834 // Gets the probability of each particle type (in ITS)
304864ab 835 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fITSr[i];
c630aafd 836}
837
838//_______________________________________________________________________
ae982df3 839Int_t AliESDtrack::GetITSclusters(UInt_t *idx) const {
840 //---------------------------------------------------------------------
841 // This function returns indices of the assgined ITS clusters
842 //---------------------------------------------------------------------
843 for (Int_t i=0; i<fITSncls; i++) idx[i]=fITSindex[i];
844 return fITSncls;
845}
846
847//_______________________________________________________________________
05e445cd 848Int_t AliESDtrack::GetTPCclusters(Int_t *idx) const {
ae982df3 849 //---------------------------------------------------------------------
850 // This function returns indices of the assgined ITS clusters
851 //---------------------------------------------------------------------
d1420ddf 852 if (idx!=0)
853 for (Int_t i=0; i<180; i++) idx[i]=fTPCindex[i]; // MI I prefer some constant
ae982df3 854 return fTPCncls;
855}
8c6a71ab 856
81e97e0d 857Float_t AliESDtrack::GetTPCdensity(Int_t row0, Int_t row1) const{
858 //
859 // GetDensity of the clusters on given region between row0 and row1
860 // Dead zone effect takin into acoount
861 //
862 Int_t good = 0;
863 Int_t found = 0;
864 //
865 for (Int_t i=row0;i<=row1;i++){
866 Int_t index = fTPCindex[i];
867 if (index!=-1) good++; // track outside of dead zone
868 if (index>0) found++;
869 }
870 Float_t density=0.5;
871 if (good>(row1-row0)*0.5) density = Float_t(found)/Float_t(good);
872 return density;
873}
8c6a71ab 874//_______________________________________________________________________
875void AliESDtrack::SetTPCpid(const Double_t *p) {
4427806c 876 // Sets values for the probability of each particle type (in TPC)
81e97e0d 877 // normalize probabiluty to 1
878 //
879 //
880// Double_t sump=0;
881// for (Int_t i=0; i<AliPID::kSPECIES; i++) {
882// sump+=p[i];
883// }
884// for (Int_t i=0; i<AliPID::kSPECIES; i++) {
885// if (sump>0){
886// fTPCr[i]=p[i]/sump;
887// }
888// else{
889// fTPCr[i]=p[i];
890// }
891// }
892 for (Int_t i=0; i<AliPID::kSPECIES; i++) fTPCr[i] = p[i];
8c6a71ab 893 SetStatus(AliESDtrack::kTPCpid);
894}
895
896//_______________________________________________________________________
897void AliESDtrack::GetTPCpid(Double_t *p) const {
4427806c 898 // Gets the probability of each particle type (in TPC)
304864ab 899 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fTPCr[i];
8c6a71ab 900}
901
902//_______________________________________________________________________
bb2ceb1f 903Int_t AliESDtrack::GetTRDclusters(UInt_t *idx) const {
904 //---------------------------------------------------------------------
905 // This function returns indices of the assgined TRD clusters
906 //---------------------------------------------------------------------
d1420ddf 907 if (idx!=0)
c4d11b15 908 for (Int_t i=0; i<130; i++) idx[i]=fTRDindex[i]; // MI I prefer some constant
bb2ceb1f 909 return fTRDncls;
910}
911
912//_______________________________________________________________________
c630aafd 913void AliESDtrack::SetTRDpid(const Double_t *p) {
4427806c 914 // Sets values for the probability of each particle type (in TRD)
304864ab 915 for (Int_t i=0; i<AliPID::kSPECIES; i++) fTRDr[i]=p[i];
c630aafd 916 SetStatus(AliESDtrack::kTRDpid);
917}
918
919//_______________________________________________________________________
920void AliESDtrack::GetTRDpid(Double_t *p) const {
4427806c 921 // Gets the probability of each particle type (in TRD)
304864ab 922 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fTRDr[i];
c630aafd 923}
924
925//_______________________________________________________________________
79e94bf8 926void AliESDtrack::SetTRDpid(Int_t iSpecies, Float_t p)
927{
4427806c 928 // Sets the probability of particle type iSpecies to p (in TRD)
79e94bf8 929 fTRDr[iSpecies] = p;
930}
931
932Float_t AliESDtrack::GetTRDpid(Int_t iSpecies) const
933{
4427806c 934 // Returns the probability of particle type iSpecies (in TRD)
79e94bf8 935 return fTRDr[iSpecies];
936}
937
938//_______________________________________________________________________
c630aafd 939void AliESDtrack::SetTOFpid(const Double_t *p) {
4427806c 940 // Sets the probability of each particle type (in TOF)
304864ab 941 for (Int_t i=0; i<AliPID::kSPECIES; i++) fTOFr[i]=p[i];
c630aafd 942 SetStatus(AliESDtrack::kTOFpid);
943}
944
945//_______________________________________________________________________
51ad6848 946void AliESDtrack::SetTOFLabel(const Int_t *p) {
947 // Sets (in TOF)
948 for (Int_t i=0; i<3; i++) fTOFLabel[i]=p[i];
949}
950
951//_______________________________________________________________________
c630aafd 952void AliESDtrack::GetTOFpid(Double_t *p) const {
4427806c 953 // Gets probabilities of each particle type (in TOF)
304864ab 954 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fTOFr[i];
c630aafd 955}
956
51ad6848 957//_______________________________________________________________________
958void AliESDtrack::GetTOFLabel(Int_t *p) const {
959 // Gets (in TOF)
960 for (Int_t i=0; i<3; i++) p[i]=fTOFLabel[i];
961}
962
963//_______________________________________________________________________
964void AliESDtrack::GetTOFInfo(Float_t *info) const {
965 // Gets (in TOF)
966 for (Int_t i=0; i<10; i++) info[i]=fTOFInfo[i];
967}
968
969//_______________________________________________________________________
970void AliESDtrack::SetTOFInfo(Float_t*info) {
971 // Gets (in TOF)
972 for (Int_t i=0; i<10; i++) fTOFInfo[i]=info[i];
973}
974
4a78b8c5 975
976
977//_______________________________________________________________________
978void AliESDtrack::SetPHOSpid(const Double_t *p) {
979 // Sets the probability of each particle type (in PHOS)
304864ab 980 for (Int_t i=0; i<AliPID::kSPECIESN; i++) fPHOSr[i]=p[i];
4a78b8c5 981 SetStatus(AliESDtrack::kPHOSpid);
982}
983
984//_______________________________________________________________________
985void AliESDtrack::GetPHOSpid(Double_t *p) const {
986 // Gets probabilities of each particle type (in PHOS)
304864ab 987 for (Int_t i=0; i<AliPID::kSPECIESN; i++) p[i]=fPHOSr[i];
4a78b8c5 988}
989
704be597 990//_______________________________________________________________________
991void AliESDtrack::SetEMCALpid(const Double_t *p) {
992 // Sets the probability of each particle type (in EMCAL)
304864ab 993 for (Int_t i=0; i<AliPID::kSPECIESN; i++) fEMCALr[i]=p[i];
704be597 994 SetStatus(AliESDtrack::kEMCALpid);
995}
996
997//_______________________________________________________________________
998void AliESDtrack::GetEMCALpid(Double_t *p) const {
999 // Gets probabilities of each particle type (in EMCAL)
304864ab 1000 for (Int_t i=0; i<AliPID::kSPECIESN; i++) p[i]=fEMCALr[i];
704be597 1001}
4a78b8c5 1002
1003//_______________________________________________________________________
1004void AliESDtrack::SetRICHpid(const Double_t *p) {
1005 // Sets the probability of each particle type (in RICH)
304864ab 1006 for (Int_t i=0; i<AliPID::kSPECIES; i++) fRICHr[i]=p[i];
4a78b8c5 1007 SetStatus(AliESDtrack::kRICHpid);
1008}
1009
1010//_______________________________________________________________________
1011void AliESDtrack::GetRICHpid(Double_t *p) const {
1012 // Gets probabilities of each particle type (in RICH)
304864ab 1013 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fRICHr[i];
4a78b8c5 1014}
1015
1016
1017
c630aafd 1018//_______________________________________________________________________
8c6a71ab 1019void AliESDtrack::SetESDpid(const Double_t *p) {
4427806c 1020 // Sets the probability of each particle type for the ESD track
304864ab 1021 for (Int_t i=0; i<AliPID::kSPECIES; i++) fR[i]=p[i];
8c6a71ab 1022 SetStatus(AliESDtrack::kESDpid);
1023}
1024
1025//_______________________________________________________________________
1026void AliESDtrack::GetESDpid(Double_t *p) const {
4427806c 1027 // Gets probability of each particle type for the ESD track
304864ab 1028 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fR[i];
8c6a71ab 1029}
1030
ac2f7574 1031//_______________________________________________________________________
1032void AliESDtrack::Print(Option_t *) const {
1033 // Prints info on the track
1034
5f7789fc 1035 printf("ESD track info\n") ;
304864ab 1036 Double_t p[AliPID::kSPECIESN] ;
ac2f7574 1037 Int_t index = 0 ;
1038 if( IsOn(kITSpid) ){
1039 printf("From ITS: ") ;
1040 GetITSpid(p) ;
304864ab 1041 for(index = 0 ; index < AliPID::kSPECIES; index++)
ac2f7574 1042 printf("%f, ", p[index]) ;
1043 printf("\n signal = %f\n", GetITSsignal()) ;
1044 }
1045 if( IsOn(kTPCpid) ){
1046 printf("From TPC: ") ;
1047 GetTPCpid(p) ;
304864ab 1048 for(index = 0 ; index < AliPID::kSPECIES; index++)
ac2f7574 1049 printf("%f, ", p[index]) ;
1050 printf("\n signal = %f\n", GetTPCsignal()) ;
1051 }
1052 if( IsOn(kTRDpid) ){
1053 printf("From TRD: ") ;
1054 GetTRDpid(p) ;
304864ab 1055 for(index = 0 ; index < AliPID::kSPECIES; index++)
ac2f7574 1056 printf("%f, ", p[index]) ;
1057 printf("\n signal = %f\n", GetTRDsignal()) ;
1058 }
1059 if( IsOn(kTOFpid) ){
1060 printf("From TOF: ") ;
1061 GetTOFpid(p) ;
304864ab 1062 for(index = 0 ; index < AliPID::kSPECIES; index++)
ac2f7574 1063 printf("%f, ", p[index]) ;
1064 printf("\n signal = %f\n", GetTOFsignal()) ;
1065 }
1066 if( IsOn(kRICHpid) ){
038834e7 1067 printf("From RICH: ") ;
ac2f7574 1068 GetRICHpid(p) ;
304864ab 1069 for(index = 0 ; index < AliPID::kSPECIES; index++)
ac2f7574 1070 printf("%f, ", p[index]) ;
1071 printf("\n signal = %f\n", GetRICHsignal()) ;
1072 }
1073 if( IsOn(kPHOSpid) ){
1074 printf("From PHOS: ") ;
1075 GetPHOSpid(p) ;
304864ab 1076 for(index = 0 ; index < AliPID::kSPECIESN; index++)
ac2f7574 1077 printf("%f, ", p[index]) ;
1078 printf("\n signal = %f\n", GetPHOSsignal()) ;
1079 }
704be597 1080 if( IsOn(kEMCALpid) ){
1081 printf("From EMCAL: ") ;
1082 GetEMCALpid(p) ;
304864ab 1083 for(index = 0 ; index < AliPID::kSPECIESN; index++)
704be597 1084 printf("%f, ", p[index]) ;
1085 printf("\n signal = %f\n", GetEMCALsignal()) ;
1086 }
ac2f7574 1087}