}
//_________________________________________________________________________
-Double_t AliITSPIDResponse::Bethe(Double_t p, Double_t mass, Bool_t isSA, Bool_t isNuclei) const {
+Double_t AliITSPIDResponse::Bethe(Double_t p, Double_t mass, Bool_t isSA) const {
+
+ //OLD - Mantained for backward compatibility
+ //from the mass check --> Set the Particle Type
+ //at the end use the method Bethe(Double_t p, AliPID::EParticleType species, Bool_t isSA) const to set the right parameter
//
// returns AliExternalTrackParam::BetheBloch normalized to
// fBBdeu --> parameters for deuteron
// fBBtri --> parameters for triton
-
- const Double_t bg=p/mass;
-
//NOTE
//NOTE: if changes are made here, please also check the alternative function below
//NOTE
- const Double_t *par=fBBtpcits;
- if(isSA){
+
+ AliPID::EParticleType species = AliPID::kPion;
+
if(TMath::AreEqualAbs(mass,AliPID::ParticleMass(0),0.00001)){
//if is an electron use a specific BB parameterization
//To be used only between 100 and 160 MeV/c
- par=fBBsaElectron;
- }else{
- par=fBBsa;
+ species=AliPID::kElectron;
}
- }else{
- if(isNuclei){
- if(TMath::AreEqualAbs(mass,AliPID::ParticleMass(5),0.002)) par=fBBdeu;
- if(TMath::AreEqualAbs(mass,AliPID::ParticleMass(6),0.001)) par=fBBtri;
- }
- }
- return Bethe(bg, par, isNuclei);
+ if(TMath::AreEqualAbs(mass,AliPID::ParticleMass(5),0.002)) species=AliPID::kDeuteron;
+ if(TMath::AreEqualAbs(mass,AliPID::ParticleMass(6),0.001)) species=AliPID::kTriton;
+
+ return Bethe(p,species,isSA);
}
//_________________________________________________________________________
Double_t AliITSPIDResponse::Bethe(Double_t p, AliPID::EParticleType species, Bool_t isSA) const
{
- //
- // Aliternative bethe function assuming a particle type not a mass
+ // NEW - to be used
+ // Alternative bethe function assuming a particle type not a mass
// should be slightly faster
//
if(clumap&(1<<i)) ++nPointsForPid;
}
Float_t mom=track->P();
-
+
//check for ITS standalone tracks
Bool_t isSA=kTRUE;
if( track->GetStatus() & AliVTrack::kTPCin ) isSA=kFALSE;
}
Double_t BetheAleph(Double_t p,Double_t mass) const;
- Double_t Bethe(Double_t p, Double_t mass, Bool_t isSA=kFALSE,Bool_t isNuclei=kFALSE) const;
+ Double_t Bethe(Double_t p, Double_t mass, Bool_t isSA=kFALSE) const;
Double_t Bethe(Double_t p, AliPID::EParticleType species, Bool_t isSA=kFALSE) const;
Double_t BetheITSsaHybrid(Double_t p, Double_t mass) const;
Double_t GetResolution(Double_t bethe, Int_t nPtsForPid=4, Bool_t isSA=kFALSE,Double_t p=0., AliPID::EParticleType type=AliPID::kPion) const;
Double_t GetSignalDelta( const AliVTrack* track, AliPID::EParticleType species, Bool_t ratio=kFALSE) const;
Float_t GetNumberOfSigmas(Float_t mom, Float_t signal, AliPID::EParticleType type, Int_t nPtsForPid=4, Bool_t isSA=kFALSE) const {
+ if(type==AliPID::kDeuteron && mom<0.4) return -999.;
+ if(type==AliPID::kTriton && mom<0.55) return -999.;
const Double_t chargeFactor = TMath::Power(AliPID::ParticleCharge(type),2.);
Float_t bethe = Bethe(mom,type,isSA)*chargeFactor;
return (signal - bethe)/GetResolution(bethe,nPtsForPid,isSA,mom,type);