* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//-----------------------------------------------------------------
// Implementation of the combined PID class
-//
+// For the Event Summary Data Class
+// produced by the reconstruction process
+// and containing information on the particle identification
// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
//-----------------------------------------------------------------
#include "AliESDpid.h"
-#include "AliESD.h"
+#include "AliESDEvent.h"
#include "AliESDtrack.h"
ClassImp(AliESDpid)
//_________________________________________________________________________
-Int_t AliESDpid::MakePID(AliESD *event)
+Int_t AliESDpid::MakePID(AliESDEvent *event)
{
+ //
+ // Combine the information of various detectors
+ // to determine the Particle Identification
+ //
Int_t ntrk=event->GetNumberOfTracks();
for (Int_t i=0; i<ntrk; i++) {
- Int_t ns=AliESDtrack::kSPECIES;
+ Int_t ns=AliPID::kSPECIES;
Double_t p[10]={1.,1.,1.,1.,1.,1.,1.,1.,1.,1.};
AliESDtrack *t=event->GetTrack(i);
- if ((t->GetStatus()&AliESDtrack::kITSpid )!=0) {
+ if (t->IsOn(AliESDtrack::kITSpid)) {
Double_t d[10];
t->GetITSpid(d);
for (Int_t j=0; j<ns; j++) p[j]*=d[j];
}
- if ((t->GetStatus()&AliESDtrack::kTPCpid )!=0) {
+ if (t->IsOn(AliESDtrack::kTPCpid)) {
Double_t d[10];
t->GetTPCpid(d);
for (Int_t j=0; j<ns; j++) p[j]*=d[j];
}
- if ((t->GetStatus()&AliESDtrack::kTRDpid )!=0) {
+ if (t->IsOn(AliESDtrack::kTRDpid)) {
Double_t d[10];
t->GetTRDpid(d);
for (Int_t j=0; j<ns; j++) p[j]*=d[j];
}
- if ((t->GetStatus()&AliESDtrack::kTOFpid )!=0) {
+ if (t->IsOn(AliESDtrack::kTOFpid)) {
Double_t d[10];
t->GetTOFpid(d);
for (Int_t j=0; j<ns; j++) p[j]*=d[j];
}
+ if (t->IsOn(AliESDtrack::kHMPIDpid)) {
+ Double_t d[10];
+ t->GetHMPIDpid(d);
+ for (Int_t j=0; j<ns; j++) p[j]*=d[j];
+ }
+
t->SetESDpid(p);
}
+
return 0;
}