]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGLF/RESONANCES/AliRsnCutPIDNSigma.h
Modifications to optionally release some track cuts
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutPIDNSigma.h
index 682de29988c50f048d1ed06b4db8a190f9f5fa11..70b7528239f23b5fb6d3af9de4d99abe616e4a5f 100644 (file)
@@ -18,6 +18,7 @@
 #include "AliESDtrack.h"
 
 #include "AliRsnCut.h"
+#include "AliRsnPIDRange.h"
 
 class AliVTrack;
 class AliPIDResponse;
@@ -31,32 +32,6 @@ public:
       kTOF,
       kDetectors
    };
-
-   //
-   // This allows to define several intervals
-   //
-   class AliRsnPIDRange : public TObject {
-   public:
-
-      AliRsnPIDRange(Double_t nsigma, Double_t pmin, Double_t pmax)
-         : fPMin(pmin), fPMax(pmax), fNSigmaCut(nsigma) { }
-
-      Double_t &PMin()      {return fPMin;}
-      Double_t &PMax()      {return fPMax;}
-      Double_t &NSigmaCut() {return fNSigmaCut;}
-
-      Bool_t IsInRange(Double_t mom)  {return (mom >= fPMin && mom <= fPMax);}
-      Bool_t CutPass(Double_t nsigma) {return (nsigma <= fNSigmaCut);}
-
-   private:
-
-      Double_t fPMin;      // lower bound of momentum range
-      Double_t fPMax;      // upper bound of momentum range
-      Double_t fNSigmaCut; // cut in number of sigmas
-
-      ClassDef(AliRsnCutPIDNSigma::AliRsnPIDRange,1)
-   };
-
    AliRsnCutPIDNSigma();
    AliRsnCutPIDNSigma(const char *name, AliPID::EParticleType species, EDetector det);
    AliRsnCutPIDNSigma(const AliRsnCutPIDNSigma &copy);
@@ -94,76 +69,4 @@ private:
    ClassDef(AliRsnCutPIDNSigma, 1)
 };
 
-inline Bool_t AliRsnCutPIDNSigma::MatchITS(const AliVTrack *vtrack) const
-{
-//
-// Checks if the track has the status flags required for an ITS standalone track
-//
-
-   if ((vtrack->GetStatus() & AliESDtrack::kITSin)  == 0) return kFALSE;
-   if ((vtrack->GetStatus() & AliESDtrack::kITSpid) == 0) return kFALSE;
-
-   return kTRUE;
-}
-
-inline Bool_t AliRsnCutPIDNSigma::MatchTPC(const AliVTrack *vtrack) const
-{
-//
-// Checks if the track has the status flags required for a TPC track
-//
-
-   if ((vtrack->GetStatus() & AliESDtrack::kTPCin) == 0) return kFALSE;
-
-   return kTRUE;
-}
-
-inline Bool_t AliRsnCutPIDNSigma::MatchTOF(const AliVTrack *vtrack) const
-{
-//
-// Checks if the track has the status flags required for an ITS standalone track
-//
-
-   if ((vtrack->GetStatus() & AliESDtrack::kTOFout) == 0) return kFALSE;
-   if ((vtrack->GetStatus() & AliESDtrack::kTIME)   == 0) return kFALSE;
-
-   return kTRUE;
-}
-
-inline Bool_t AliRsnCutPIDNSigma::MatchDetector(const AliVTrack *vtrack) const
-{
-//
-// Checks if the track has matched the required detector.
-// If no valid detector is specified, kFALSE is always returned.
-//
-
-   switch (fDetector) {
-      case kITS: return MatchITS(vtrack);
-      case kTPC: return MatchTPC(vtrack);
-      case kTOF: return MatchTOF(vtrack);
-      default  : return kFALSE;
-   }
-}
-
-inline void AliRsnCutPIDNSigma::AddPIDRange(Double_t nsigma, Double_t pmin, Double_t pmax)
-{
-//
-// Add a new slot for checking PID
-//
-
-   Int_t n = fRanges.GetEntries();
-
-   new (fRanges[n]) AliRsnPIDRange(nsigma, pmin, pmax);
-}
-
-inline void AliRsnCutPIDNSigma::SinglePIDRange(Double_t nsigma)
-{
-//
-// Clear all slots and sets a unique one
-//
-
-   fRanges.Delete();
-
-   new (fRanges[0]) AliRsnPIDRange(nsigma, 0.0, 1E20);
-}
-
 #endif