]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/AliRsnCutPIDNSigma.h
For backward compatibility changed the method AliVTrack::GetIntegratedTimes(double...
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutPIDNSigma.h
1 #ifndef ALIRSNCUTPIDNSIGMA_H
2 #define ALIRSNCUTPIDNSIGMA_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 <TMath.h>
15 #include <TClonesArray.h>
16
17 #include "AliPID.h"
18 #include "AliESDtrack.h"
19
20 #include "AliRsnCut.h"
21 #include "AliRsnPIDRange.h"
22
23 class AliVTrack;
24 class AliPIDResponse;
25
26 class AliRsnCutPIDNSigma : public AliRsnCut {
27 public:
28
29    enum EDetector {
30       kITS,
31       kTPC,
32       kTOF,
33       kDetectors
34    };
35    AliRsnCutPIDNSigma();
36    AliRsnCutPIDNSigma(const char *name, AliPID::EParticleType species, EDetector det);
37    AliRsnCutPIDNSigma(const AliRsnCutPIDNSigma &copy);
38    AliRsnCutPIDNSigma &operator=(const AliRsnCutPIDNSigma &copy);
39    virtual ~AliRsnCutPIDNSigma() { }
40
41    void             SetSpecies(AliPID::EParticleType type)        {fSpecies = type;}
42    void             SetDetector(EDetector det)                    {fDetector = det;}
43    void             SetRejectUnmatched(Bool_t yn = kTRUE)         {fRejectUnmatched = yn;}
44
45    AliPIDResponse  *MyPID()                                       {return fMyPID;}
46    void             InitMyPID(Bool_t isMC, Bool_t isESD);
47
48    void             SinglePIDRange(Double_t nsigma);
49    void             AddPIDRange(Double_t nsigma, Double_t pmin = 0.0, Double_t pmax = 1E20);
50
51    Bool_t           MatchITS(const AliVTrack *vtrack) const;
52    Bool_t           MatchTPC(const AliVTrack *vtrack) const;
53    Bool_t           MatchTOF(const AliVTrack *vtrack) const;
54    Bool_t           MatchDetector(const AliVTrack *vtrack) const;
55
56    virtual Bool_t   IsSelected(TObject *object);
57    virtual void     Print(const Option_t *option = "") const;
58
59 private:
60
61    AliPID::EParticleType   fSpecies;         //  particle species
62    EDetector               fDetector;        //  detector used for PID
63    Bool_t                  fRejectUnmatched; //  tracks not matched to this detector do pass the cut?
64    Double_t                fTrackNSigma;     //! tmp track number of sigmas w.r. to chosen detector
65    Double_t                fTrackMom;        //! track reference momentum
66    AliPIDResponse         *fMyPID;           //  PID response object to be configured manyally
67    TClonesArray            fRanges;          //  collection of ranges
68
69    ClassDef(AliRsnCutPIDNSigma, 1)
70 };
71
72 #endif