1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 // Implementation of the ESD track class
17 // ESD = Event Summary Data
18 // This is the class to deal with during the phisics analysis of data
19 // Origin: Iouri Belikov, CERN
20 // e-mail: Jouri.Belikov@cern.ch
21 //-----------------------------------------------------------------
25 #include "AliESDtrack.h"
26 #include "AliKalmanTrack.h"
27 #include "AliTrackPointArray.h"
32 void SetPIDValues(Float_t * dest, const Double_t * src, Int_t n) {
33 // This function copies "n" PID weights from "scr" to "dest"
34 // and normalizes their sum to 1 thus producing conditional probabilities.
35 // The negative weights are set to 0.
36 // In case all the weights are non-positive they are replaced by
37 // uniform probabilities
41 Float_t uniform = 1./(Float_t)n;
44 for (Int_t i=0; i<n; i++)
54 for (Int_t i=0; i<n; i++) dest[i] /= sum;
56 for (Int_t i=0; i<n; i++) dest[i] = uniform;
59 //_______________________________________________________________________
60 AliESDtrack::AliESDtrack() :
61 AliExternalTrackParam(),
81 fTPCClusterMap(159),//number of padrows
108 // The default ESD constructor
110 for (Int_t i=0; i<AliPID::kSPECIES; i++) {
120 for (Int_t i=0; i<AliPID::kSPECIESN; i++) {
126 fPHOSpos[0]=fPHOSpos[1]=fPHOSpos[2]=0.;
127 fEMCALpos[0]=fEMCALpos[1]=fEMCALpos[2]=0.;
129 for (i=0;i<12;i++) fITSchi2MIP[i] =1e10;
130 for (i=0; i<6; i++) { fITSindex[i]=0; }
131 for (i=0; i<180; i++){ fTPCindex[i]=0; }
132 for (i=0; i<3;i++) { fKinkIndexes[i]=0;}
133 for (i=0; i<3;i++) { fV0Indexes[i]=-1;}
134 for (i=0; i<130; i++) { fTRDindex[i]=0; }
135 for (i=0;i<kNPlane;i++) {fTRDsignals[i]=0.; fTRDTimBin[i]=-1;}
136 for (i=0;i<4;i++) {fTPCPoints[i]=-1;}
137 for (i=0;i<3;i++) {fTOFLabel[i]=-1;}
138 for (i=0;i<10;i++) {fTOFInfo[i]=-1;}
148 //_______________________________________________________________________
149 AliESDtrack::AliESDtrack(const AliESDtrack& track):
150 AliExternalTrackParam(track),
151 fFlags(track.fFlags),
152 fLabel(track.fLabel),
154 fTrackLength(track.fTrackLength),
157 fStopVertex(track.fStopVertex),
159 fCchi2(track.fCchi2),
162 fITSchi2(track.fITSchi2),
163 fITSncls(track.fITSncls),
164 fITSsignal(track.fITSsignal),
165 fITSLabel(track.fITSLabel),
166 fITSFakeRatio(track.fITSFakeRatio),
167 fITStrack(0), //coping separatelly - in user code
168 fTPCchi2(track.fTPCchi2),
169 fTPCncls(track.fTPCncls),
170 fTPCClusterMap(track.fTPCClusterMap),
171 fTPCsignal(track.fTPCsignal),
172 fTPCLabel(track.fTPCLabel),
173 fTRDchi2(track.fTRDchi2),
174 fTRDncls(track.fTRDncls),
175 fTRDncls0(track.fTRDncls0),
176 fTRDsignal(track.fTRDsignal),
177 fTRDLabel(track.fTRDLabel),
178 fTRDQuality(track.fTRDQuality),
179 fTRDBudget(track.fTRDBudget),
181 fTOFchi2(track.fTOFchi2),
182 fTOFindex(track.fTOFindex),
183 fTOFsignal(track.fTOFsignal),
184 fPHOSsignal(track.fPHOSsignal),
185 fEMCALsignal(track.fEMCALsignal),
186 fRICHchi2(track.fRICHchi2),
187 fRICHncls(track.fRICHncls),
188 fRICHindex(track.fRICHindex),
189 fRICHsignal(track.fRICHsignal),
190 fRICHtheta(track.fRICHtheta),
191 fRICHphi(track.fRICHphi),
192 fRICHdx(track.fRICHdx),
193 fRICHdy(track.fRICHdy),
194 fPoints(track.fPoints)
199 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTrackTime[i] =track.fTrackTime[i];
200 for (Int_t i=0;i<AliPID::kSPECIES;i++) fR[i] =track.fR[i];
202 for (Int_t i=0;i<12;i++) fITSchi2MIP[i] =track.fITSchi2MIP[i];
203 for (Int_t i=0;i<6;i++) fITSindex[i]=track.fITSindex[i];
204 for (Int_t i=0;i<AliPID::kSPECIES;i++) fITSr[i]=track.fITSr[i];
206 for (Int_t i=0;i<180;i++) fTPCindex[i]=track.fTPCindex[i];
207 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTPCr[i]=track.fTPCr[i];
208 for (Int_t i=0;i<4;i++) {fTPCPoints[i]=track.fTPCPoints[i];}
209 for (Int_t i=0; i<3;i++) { fKinkIndexes[i]=track.fKinkIndexes[i];}
210 for (Int_t i=0; i<3;i++) { fV0Indexes[i]=track.fV0Indexes[i];}
212 for (Int_t i=0;i<130;i++) fTRDindex[i]=track.fTRDindex[i];
213 for (Int_t i=0;i<kNPlane;i++) {
214 fTRDsignals[i]=track.fTRDsignals[i];
215 fTRDTimBin[i]=track.fTRDTimBin[i];
217 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTRDr[i]=track.fTRDr[i];
219 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTOFr[i]=track.fTOFr[i];
220 for (Int_t i=0;i<3;i++) fTOFLabel[i]=track.fTOFLabel[i];
221 for (Int_t i=0;i<10;i++) fTOFInfo[i]=track.fTOFInfo[i];
223 for (Int_t i=0;i<3;i++) fPHOSpos[i]=track.fPHOSpos[i];
224 for (Int_t i=0;i<AliPID::kSPECIESN;i++) fPHOSr[i]=track.fPHOSr[i];
226 for (Int_t i=0;i<3;i++) fEMCALpos[i]=track.fEMCALpos[i];
227 for (Int_t i=0;i<AliPID::kSPECIESN;i++) fEMCALr[i]=track.fEMCALr[i];
229 for (Int_t i=0;i<AliPID::kSPECIES;i++) fRICHr[i]=track.fRICHr[i];
231 if (track.fCp) fCp=new AliExternalTrackParam(*track.fCp);
232 if (track.fIp) fIp=new AliExternalTrackParam(*track.fIp);
233 if (track.fOp) fOp=new AliExternalTrackParam(*track.fOp);
235 //_______________________________________________________________________
236 AliESDtrack::~AliESDtrack(){
238 // This is destructor according Coding Conventrions
240 //printf("Delete track\n");
249 //_______________________________________________________________________
250 void AliESDtrack::MakeMiniESDtrack(){
251 // Resets everything except
252 // fFlags: Reconstruction status flags
253 // fLabel: Track label
254 // fID: Unique ID of the track
255 // fD: Impact parameter in XY-plane
256 // fZ: Impact parameter in Z
257 // fR[AliPID::kSPECIES]: combined "detector response probability"
258 // Running track parameters
259 // fRalpha: track rotation angle
260 // fRx: X-coordinate of the track reference plane
261 // fRp[5]: external track parameters
262 // fRc[15]: external cov. matrix of the track parameters
265 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTrackTime[i] = 0;
268 // Reset track parameters constrained to the primary vertex
272 // Reset track parameters at the inner wall of TPC
275 // Reset track parameters at the inner wall of the TRD
278 // Reset ITS track related information
280 for (Int_t i=0;i<12;i++) fITSchi2MIP[i] = 0;
282 for (Int_t i=0;i<6;i++) fITSindex[i]= 0;
284 for (Int_t i=0;i<AliPID::kSPECIES;i++) fITSr[i]= 0;
289 // Reset TPC related track information
292 for (Int_t i=0;i<180;i++) fTPCindex[i] = 0;
295 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTPCr[i]=0;
297 for (Int_t i=0;i<4;i++) fTPCPoints[i] = 0;
298 for (Int_t i=0; i<3;i++) fKinkIndexes[i] = 0;
299 for (Int_t i=0; i<3;i++) fV0Indexes[i] = 0;
301 // Reset TRD related track information
305 for (Int_t i=0;i<130;i++) fTRDindex[i] = 0;
307 for (Int_t i=0;i<kNPlane;i++) {
311 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTRDr[i] = 0;
317 // Reset TOF related track information
321 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTOFr[i] = 0;
322 for (Int_t i=0;i<3;i++) fTOFLabel[i] = 0;
323 for (Int_t i=0;i<10;i++) fTOFInfo[i] = 0;
325 // Reset PHOS related track information
326 for (Int_t i=0;i<3;i++) fPHOSpos[i] = 0;
328 for (Int_t i=0;i<AliPID::kSPECIESN;i++) fPHOSr[i] = 0;
330 // Reset EMCAL related track information
331 for (Int_t i=0;i<3;i++) fEMCALpos[i] = 0;
333 for (Int_t i=0;i<AliPID::kSPECIESN;i++) fEMCALr[i] = 0;
335 // Reset RICH related track information
340 for (Int_t i=0;i<AliPID::kSPECIES;i++) fRICHr[i] = 0;
348 //_______________________________________________________________________
349 Double_t AliESDtrack::GetMass() const {
350 // Returns the mass of the most probable particle type
353 for (Int_t i=0; i<AliPID::kSPECIES; i++) {
354 if (fR[i]>max) {k=i; max=fR[i];}
356 if (k==0) { // dE/dx "crossing points" in the TPC
358 if ((p>0.38)&&(p<0.48))
359 if (fR[0]<fR[3]*10.) return AliPID::ParticleMass(AliPID::kKaon);
360 if ((p>0.75)&&(p<0.85))
361 if (fR[0]<fR[4]*10.) return AliPID::ParticleMass(AliPID::kProton);
364 if (k==1) return AliPID::ParticleMass(AliPID::kMuon);
365 if (k==2||k==-1) return AliPID::ParticleMass(AliPID::kPion);
366 if (k==3) return AliPID::ParticleMass(AliPID::kKaon);
367 if (k==4) return AliPID::ParticleMass(AliPID::kProton);
368 AliWarning("Undefined mass !");
369 return AliPID::ParticleMass(AliPID::kPion);
372 //_______________________________________________________________________
373 Bool_t AliESDtrack::UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags){
375 // This function updates track's running parameters
380 fLabel=t->GetLabel();
382 if (t->IsStartedTimeIntegral()) {
384 Double_t times[10];t->GetIntegratedTimes(times); SetIntegratedTimes(times);
385 SetIntegratedLength(t->GetIntegratedLength());
392 case kITSin: case kITSout: case kITSrefit:
393 fITSncls=t->GetNumberOfClusters();
394 fITSchi2=t->GetChi2();
395 for (Int_t i=0;i<fITSncls;i++) fITSindex[i]=t->GetClusterIndex(i);
396 fITSsignal=t->GetPIDsignal();
397 fITSLabel = t->GetLabel();
398 fITSFakeRatio = t->GetFakeRatio();
401 case kTPCin: case kTPCrefit:
402 fTPCLabel = t->GetLabel();
403 if (!fIp) fIp=new AliExternalTrackParam(*t);
408 fTPCncls=t->GetNumberOfClusters();
409 fTPCchi2=t->GetChi2();
411 {//prevrow must be declared in separate namespace, otherwise compiler cries:
412 //"jump to case label crosses initialization of `Int_t prevrow'"
414 // for (Int_t i=0;i<fTPCncls;i++)
415 for (Int_t i=0;i<160;i++)
417 fTPCindex[i]=t->GetClusterIndex(i);
419 // Piotr's Cluster Map for HBT
420 // ### please change accordingly if cluster array is changing
421 // to "New TPC Tracking" style (with gaps in array)
422 Int_t idx = fTPCindex[i];
423 Int_t sect = (idx&0xff000000)>>24;
424 Int_t row = (idx&0x00ff0000)>>16;
425 if (sect > 18) row +=63; //if it is outer sector, add number of inner sectors
427 fTPCClusterMap.SetBitNumber(row,kTRUE);
429 //Fill the gap between previous row and this row with 0 bits
430 //In case ### pleas change it as well - just set bit 0 in case there
431 //is no associated clusters for current "i"
434 prevrow = row;//if previous bit was not assigned yet == this is the first one
437 { //we don't know the order (inner to outer or reverse)
438 //just to be save in case it is going to change
451 for (Int_t j = n+1; j < m; j++)
453 fTPCClusterMap.SetBitNumber(j,kFALSE);
457 // End Of Piotr's Cluster Map for HBT
460 fTPCsignal=t->GetPIDsignal();
461 {Double_t mass=t->GetMass(); // preliminary mass setting
462 if (mass>0.5) fR[4]=1.; // used by
463 else if (mass<0.4) fR[2]=1.; // the ITS reconstruction
468 case kTRDout: case kTRDin: case kTRDrefit:
469 fTRDLabel = t->GetLabel();
470 fTRDncls=t->GetNumberOfClusters();
471 fTRDchi2=t->GetChi2();
472 for (Int_t i=0;i<fTRDncls;i++) fTRDindex[i]=t->GetClusterIndex(i);
473 fTRDsignal=t->GetPIDsignal();
476 if (!fOp) fOp=new AliExternalTrackParam(*t);
478 fTRDncls0 = t->GetNumberOfClusters();
487 AliError("Wrong flag !");
494 //_______________________________________________________________________
496 AliESDtrack::SetConstrainedTrackParams(const AliKalmanTrack *t, Double_t chi2) {
498 // This function sets the constrained track parameters
500 if (!fCp) fCp=new AliExternalTrackParam(*t);
506 //_______________________________________________________________________
507 void AliESDtrack::GetExternalParameters(Double_t &x, Double_t p[5]) const {
508 //---------------------------------------------------------------------
509 // This function returns external representation of the track parameters
510 //---------------------------------------------------------------------
512 for (Int_t i=0; i<5; i++) p[i]=GetParameter()[i];
515 //_______________________________________________________________________
516 void AliESDtrack::GetExternalCovariance(Double_t cov[15]) const {
517 //---------------------------------------------------------------------
518 // This function returns external representation of the cov. matrix
519 //---------------------------------------------------------------------
520 for (Int_t i=0; i<15; i++) cov[i]=AliExternalTrackParam::GetCovariance()[i];
523 //_______________________________________________________________________
524 Bool_t AliESDtrack::GetConstrainedExternalParameters
525 (Double_t &alpha, Double_t &x, Double_t p[5]) const {
526 //---------------------------------------------------------------------
527 // This function returns the constrained external track parameters
528 //---------------------------------------------------------------------
529 if (!fCp) return kFALSE;
530 alpha=fCp->GetAlpha();
532 for (Int_t i=0; i<5; i++) p[i]=fCp->GetParameter()[i];
536 //_______________________________________________________________________
538 AliESDtrack::GetConstrainedExternalCovariance(Double_t c[15]) const {
539 //---------------------------------------------------------------------
540 // This function returns the constrained external cov. matrix
541 //---------------------------------------------------------------------
542 if (!fCp) return kFALSE;
543 for (Int_t i=0; i<15; i++) c[i]=fCp->GetCovariance()[i];
548 AliESDtrack::GetInnerExternalParameters
549 (Double_t &alpha, Double_t &x, Double_t p[5]) const {
550 //---------------------------------------------------------------------
551 // This function returns external representation of the track parameters
552 // at the inner layer of TPC
553 //---------------------------------------------------------------------
554 if (!fIp) return kFALSE;
555 alpha=fIp->GetAlpha();
557 for (Int_t i=0; i<5; i++) p[i]=fIp->GetParameter()[i];
562 AliESDtrack::GetInnerExternalCovariance(Double_t cov[15]) const {
563 //---------------------------------------------------------------------
564 // This function returns external representation of the cov. matrix
565 // at the inner layer of TPC
566 //---------------------------------------------------------------------
567 if (!fIp) return kFALSE;
568 for (Int_t i=0; i<15; i++) cov[i]=fIp->GetCovariance()[i];
573 AliESDtrack::GetOuterExternalParameters
574 (Double_t &alpha, Double_t &x, Double_t p[5]) const {
575 //---------------------------------------------------------------------
576 // This function returns external representation of the track parameters
577 // at the inner layer of TRD
578 //---------------------------------------------------------------------
579 if (!fOp) return kFALSE;
580 alpha=fOp->GetAlpha();
582 for (Int_t i=0; i<5; i++) p[i]=fOp->GetParameter()[i];
587 AliESDtrack::GetOuterExternalCovariance(Double_t cov[15]) const {
588 //---------------------------------------------------------------------
589 // This function returns external representation of the cov. matrix
590 // at the inner layer of TRD
591 //---------------------------------------------------------------------
592 if (!fOp) return kFALSE;
593 for (Int_t i=0; i<15; i++) cov[i]=fOp->GetCovariance()[i];
597 Int_t AliESDtrack::GetNcls(Int_t idet) const
599 // Get number of clusters by subdetector index
622 Int_t AliESDtrack::GetClusters(Int_t idet, UInt_t *idx) const
624 // Get cluster index array by subdetector index
629 ncls = GetITSclusters(idx);
632 ncls = GetTPCclusters((Int_t *)idx);
635 ncls = GetTRDclusters(idx);
638 if (fTOFindex != 0) {
639 idx[0] = GetTOFcluster();
649 //_______________________________________________________________________
650 void AliESDtrack::GetIntegratedTimes(Double_t *times) const {
651 // Returns the array with integrated times for each particle hypothesis
652 for (Int_t i=0; i<AliPID::kSPECIES; i++) times[i]=fTrackTime[i];
655 //_______________________________________________________________________
656 void AliESDtrack::SetIntegratedTimes(const Double_t *times) {
657 // Sets the array with integrated times for each particle hypotesis
658 for (Int_t i=0; i<AliPID::kSPECIES; i++) fTrackTime[i]=times[i];
661 //_______________________________________________________________________
662 void AliESDtrack::SetITSpid(const Double_t *p) {
663 // Sets values for the probability of each particle type (in ITS)
664 SetPIDValues(fITSr,p,AliPID::kSPECIES);
665 SetStatus(AliESDtrack::kITSpid);
668 void AliESDtrack::SetITSChi2MIP(const Float_t *chi2mip){
669 for (Int_t i=0; i<12; i++) fITSchi2MIP[i]=chi2mip[i];
671 //_______________________________________________________________________
672 void AliESDtrack::GetITSpid(Double_t *p) const {
673 // Gets the probability of each particle type (in ITS)
674 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fITSr[i];
677 //_______________________________________________________________________
678 Int_t AliESDtrack::GetITSclusters(UInt_t *idx) const {
679 //---------------------------------------------------------------------
680 // This function returns indices of the assgined ITS clusters
681 //---------------------------------------------------------------------
682 for (Int_t i=0; i<fITSncls; i++) idx[i]=fITSindex[i];
686 //_______________________________________________________________________
687 Int_t AliESDtrack::GetTPCclusters(Int_t *idx) const {
688 //---------------------------------------------------------------------
689 // This function returns indices of the assgined ITS clusters
690 //---------------------------------------------------------------------
692 for (Int_t i=0; i<180; i++) idx[i]=fTPCindex[i]; // MI I prefer some constant
696 Float_t AliESDtrack::GetTPCdensity(Int_t row0, Int_t row1) const{
698 // GetDensity of the clusters on given region between row0 and row1
699 // Dead zone effect takin into acoount
704 for (Int_t i=row0;i<=row1;i++){
705 Int_t index = fTPCindex[i];
706 if (index!=-1) good++; // track outside of dead zone
707 if (index>0) found++;
710 if (good>(row1-row0)*0.5) density = Float_t(found)/Float_t(good);
714 //_______________________________________________________________________
715 void AliESDtrack::SetTPCpid(const Double_t *p) {
716 // Sets values for the probability of each particle type (in TPC)
717 SetPIDValues(fTPCr,p,AliPID::kSPECIES);
718 SetStatus(AliESDtrack::kTPCpid);
721 //_______________________________________________________________________
722 void AliESDtrack::GetTPCpid(Double_t *p) const {
723 // Gets the probability of each particle type (in TPC)
724 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fTPCr[i];
727 //_______________________________________________________________________
728 Int_t AliESDtrack::GetTRDclusters(UInt_t *idx) const {
729 //---------------------------------------------------------------------
730 // This function returns indices of the assgined TRD clusters
731 //---------------------------------------------------------------------
733 for (Int_t i=0; i<130; i++) idx[i]=fTRDindex[i]; // MI I prefer some constant
737 //_______________________________________________________________________
738 void AliESDtrack::SetTRDpid(const Double_t *p) {
739 // Sets values for the probability of each particle type (in TRD)
740 SetPIDValues(fTRDr,p,AliPID::kSPECIES);
741 SetStatus(AliESDtrack::kTRDpid);
744 //_______________________________________________________________________
745 void AliESDtrack::GetTRDpid(Double_t *p) const {
746 // Gets the probability of each particle type (in TRD)
747 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fTRDr[i];
750 //_______________________________________________________________________
751 void AliESDtrack::SetTRDpid(Int_t iSpecies, Float_t p)
753 // Sets the probability of particle type iSpecies to p (in TRD)
757 Float_t AliESDtrack::GetTRDpid(Int_t iSpecies) const
759 // Returns the probability of particle type iSpecies (in TRD)
760 return fTRDr[iSpecies];
763 //_______________________________________________________________________
764 void AliESDtrack::SetTOFpid(const Double_t *p) {
765 // Sets the probability of each particle type (in TOF)
766 SetPIDValues(fTOFr,p,AliPID::kSPECIES);
767 SetStatus(AliESDtrack::kTOFpid);
770 //_______________________________________________________________________
771 void AliESDtrack::SetTOFLabel(const Int_t *p) {
773 for (Int_t i=0; i<3; i++) fTOFLabel[i]=p[i];
776 //_______________________________________________________________________
777 void AliESDtrack::GetTOFpid(Double_t *p) const {
778 // Gets probabilities of each particle type (in TOF)
779 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fTOFr[i];
782 //_______________________________________________________________________
783 void AliESDtrack::GetTOFLabel(Int_t *p) const {
785 for (Int_t i=0; i<3; i++) p[i]=fTOFLabel[i];
788 //_______________________________________________________________________
789 void AliESDtrack::GetTOFInfo(Float_t *info) const {
791 for (Int_t i=0; i<10; i++) info[i]=fTOFInfo[i];
794 //_______________________________________________________________________
795 void AliESDtrack::SetTOFInfo(Float_t*info) {
797 for (Int_t i=0; i<10; i++) fTOFInfo[i]=info[i];
802 //_______________________________________________________________________
803 void AliESDtrack::SetPHOSpid(const Double_t *p) {
804 // Sets the probability of each particle type (in PHOS)
805 SetPIDValues(fPHOSr,p,AliPID::kSPECIESN);
806 SetStatus(AliESDtrack::kPHOSpid);
809 //_______________________________________________________________________
810 void AliESDtrack::GetPHOSpid(Double_t *p) const {
811 // Gets probabilities of each particle type (in PHOS)
812 for (Int_t i=0; i<AliPID::kSPECIESN; i++) p[i]=fPHOSr[i];
815 //_______________________________________________________________________
816 void AliESDtrack::SetEMCALpid(const Double_t *p) {
817 // Sets the probability of each particle type (in EMCAL)
818 SetPIDValues(fEMCALr,p,AliPID::kSPECIESN);
819 SetStatus(AliESDtrack::kEMCALpid);
822 //_______________________________________________________________________
823 void AliESDtrack::GetEMCALpid(Double_t *p) const {
824 // Gets probabilities of each particle type (in EMCAL)
825 for (Int_t i=0; i<AliPID::kSPECIESN; i++) p[i]=fEMCALr[i];
828 //_______________________________________________________________________
829 void AliESDtrack::SetRICHpid(const Double_t *p) {
830 // Sets the probability of each particle type (in RICH)
831 SetPIDValues(fRICHr,p,AliPID::kSPECIES);
832 SetStatus(AliESDtrack::kRICHpid);
835 //_______________________________________________________________________
836 void AliESDtrack::GetRICHpid(Double_t *p) const {
837 // Gets probabilities of each particle type (in RICH)
838 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fRICHr[i];
843 //_______________________________________________________________________
844 void AliESDtrack::SetESDpid(const Double_t *p) {
845 // Sets the probability of each particle type for the ESD track
846 SetPIDValues(fR,p,AliPID::kSPECIES);
847 SetStatus(AliESDtrack::kESDpid);
850 //_______________________________________________________________________
851 void AliESDtrack::GetESDpid(Double_t *p) const {
852 // Gets probability of each particle type for the ESD track
853 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fR[i];
856 //_______________________________________________________________________
857 void AliESDtrack::Print(Option_t *) const {
858 // Prints info on the track
860 printf("ESD track info\n") ;
861 Double_t p[AliPID::kSPECIESN] ;
864 printf("From ITS: ") ;
866 for(index = 0 ; index < AliPID::kSPECIES; index++)
867 printf("%f, ", p[index]) ;
868 printf("\n signal = %f\n", GetITSsignal()) ;
871 printf("From TPC: ") ;
873 for(index = 0 ; index < AliPID::kSPECIES; index++)
874 printf("%f, ", p[index]) ;
875 printf("\n signal = %f\n", GetTPCsignal()) ;
878 printf("From TRD: ") ;
880 for(index = 0 ; index < AliPID::kSPECIES; index++)
881 printf("%f, ", p[index]) ;
882 printf("\n signal = %f\n", GetTRDsignal()) ;
885 printf("From TOF: ") ;
887 for(index = 0 ; index < AliPID::kSPECIES; index++)
888 printf("%f, ", p[index]) ;
889 printf("\n signal = %f\n", GetTOFsignal()) ;
891 if( IsOn(kRICHpid) ){
892 printf("From RICH: ") ;
894 for(index = 0 ; index < AliPID::kSPECIES; index++)
895 printf("%f, ", p[index]) ;
896 printf("\n signal = %f\n", GetRICHsignal()) ;
898 if( IsOn(kPHOSpid) ){
899 printf("From PHOS: ") ;
901 for(index = 0 ; index < AliPID::kSPECIESN; index++)
902 printf("%f, ", p[index]) ;
903 printf("\n signal = %f\n", GetPHOSsignal()) ;
905 if( IsOn(kEMCALpid) ){
906 printf("From EMCAL: ") ;
908 for(index = 0 ; index < AliPID::kSPECIESN; index++)
909 printf("%f, ", p[index]) ;
910 printf("\n signal = %f\n", GetEMCALsignal()) ;