]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/AliRsnPIDRange.h
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnPIDRange.h
1 #ifndef ALIRSNPIDRANGE_H
2 #define ALIRSNPIDRANGE_H
3
4 //
5 // Class for n-sigma PID cuts.
6 // ---
7 // Requires:
8 //
9 // 1) the used detector, chosen from an enumeration
10 // 2) the reference charged particle species, chosen from AliPID enumeration
11 // 3) a momentum range: outside it, the cut is never passed
12 //
13
14 #include <TObject.h>
15 #include <Rtypes.h>
16
17 class AliRsnPIDRange : public TObject {
18 public:
19
20    AliRsnPIDRange(Double_t nsigma=3.0, Double_t pmin=0.0, Double_t pmax=1E20);
21    AliRsnPIDRange(const AliRsnPIDRange &copy);
22    AliRsnPIDRange &operator=(const AliRsnPIDRange &copy);
23    virtual ~AliRsnPIDRange() { }
24
25    Double_t PMin() const      {return fPMin;}
26    Double_t PMax() const      {return fPMax;}
27    Double_t NSigmaCut() const {return fNSigmaCut;}
28
29    Bool_t IsInRange(Double_t mom)  {return (mom >= fPMin && mom <= fPMax);}
30    Bool_t CutPass(Double_t nsigma) {return (nsigma <= fNSigmaCut);}
31
32 private:
33
34    Double_t fPMin;      // lower bound of momentum range
35    Double_t fPMax;      // upper bound of momentum range
36    Double_t fNSigmaCut; // cut in number of sigmas
37
38    ClassDef(AliRsnPIDRange,1)
39 };
40
41 #endif