]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
ALIROOT-5633 o limit the momentum range for deuteron and triton in ITSnSigma o Simpli...
authorwiechula <Jens.Wiechula@cern.ch>
Fri, 31 Oct 2014 11:59:19 +0000 (12:59 +0100)
committermorsch <andreas.morsch@cern.ch>
Thu, 6 Nov 2014 15:05:10 +0000 (16:05 +0100)
STEER/STEERBase/AliITSPIDResponse.cxx
STEER/STEERBase/AliITSPIDResponse.h

index 3292029b6d0d0a41cc72227602afa92380bb4958..631b25ea035b4ca81e8e8bfe5ac3dde1730f785d 100644 (file)
@@ -185,7 +185,11 @@ Double_t AliITSPIDResponse::Bethe(Double_t bg, const Double_t * const par, Bool_
 }
 
 //_________________________________________________________________________
-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 
@@ -196,36 +200,29 @@ Double_t AliITSPIDResponse::Bethe(Double_t p, Double_t mass, Bool_t isSA, Bool_t
   // 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
   //
 
@@ -396,7 +393,7 @@ Double_t AliITSPIDResponse::GetNumberOfSigmas( const AliVTrack* track, AliPID::E
     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;
index c18a3840300a95b682436c4d679c890d7e92b838..2b0274dc0ad1f0b55513ef631d1a53c1022ea1b1 100644 (file)
@@ -43,7 +43,7 @@ public:
  }
 
  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;
@@ -54,6 +54,8 @@ public:
  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);