Double_t threshold = thresholdHist->GetBinContent(GetMomentumBin(track->P()) + 1);
// Do Decision
- Double_t pid_probs[5];
- track->GetTRDpid(pid_probs);
- if(pid_probs[AliPID::kElectron] >= threshold) return kTRUE;
+ Double_t pidProbs[5];
+ track->GetTRDpid(pidProbs);
+ if(pidProbs[AliPID::kElectron] >= threshold) return kTRUE;
return kFALSE;
}
//________________________________________________________________________
Int_t AliTRDpidUtil::Pdg2Pid(Int_t pdg){
//
- // Private Helper function to get the paticle species (ALICE notation)
+ // Private Helper function to get the paticle species (ALICE notation)
// from the Pdg code
//
Int_t species;
return species;
}
+//________________________________________________________________________
+Int_t AliTRDpidUtil::Mass2Pid(Float_t m){
+ //
+ // Private Helper function to get the paticle species (ALICE notation)
+ // from the Pdg mass
+ //
+
+ for(Int_t is(0); is<AliPID::kSPECIES; is++) if(TMath::Abs(m-AliPID::ParticleMass(is))<1.e-4) return is;
+ return -1;
+}
+