]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/AliRsnCutPIDITS.h
edit to output container arg list from Claude
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutPIDITS.h
1 //
2 // *** Class AliRsnCutPIDITS ***
3 //
4 // This class implements all cuts which have to be used for the 2010 runs
5 // for phi and generic resonance analysis.
6 // It contains an AliESDtrackCuts object for track quality selection
7 // and some criteria for particle identification with ITS, ITS and TOF.
8 //
9 // authors: Martin Vala (martin.vala@cern.ch)
10 //          Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
11 //
12
13 #ifndef ALIRSNCUTPIDITS_H
14 #define ALIRSNCUTPIDITS_H
15
16 #include "AliPID.h"
17
18 #include "AliESDtrack.h"
19 #include "AliESDpid.h"
20 #include "AliAODpidUtil.h"
21
22 #include "AliRsnCut.h"
23
24 class AliESDtrackCuts;
25 class AliAODpidUtil;
26 class AliRsnDaughter;
27
28 class AliRsnCutPIDITS : public AliRsnCut {
29 public:
30
31    AliRsnCutPIDITS(const char *name          = "cutITS",
32                    EPARTYPE    ref           = AliPID::kKaon,
33                    Double_t    nSigmaMin     = -3.,
34                    Double_t    nSigmaMax     =  3.,
35                    Bool_t      rejectOutside = kTRUE);
36
37    AliRsnCutPIDITS(const AliRsnCutPIDITS &copy);
38    AliRsnCutPIDITS &operator=(const AliRsnCutPIDITS &copy);
39    virtual ~AliRsnCutPIDITS() { }
40
41    AliESDpid       *ESDpid()  {return fESDpid;}
42    AliAODpidUtil   *AODpid()  {return fAODpid;}
43
44    void             SetMC(Bool_t mc = kTRUE)                      {fIsMC = mc;}
45    void             SetRejectOutside(Bool_t yn = kTRUE)           {fRejectOutside = yn;}
46    void             SetMomentumRange(Double_t min, Double_t max)  {fMomMin = min; fMomMax = max;}
47    void             SetNSigmaRange(Double_t min, Double_t max)    {fMinD = min; fMaxD = max;}
48    void             SetRefType(EPARTYPE type)                     {fRefType = type;}
49
50    Bool_t           IsTPC(const AliVTrack *vtrack);
51    Bool_t           IsSA(const AliVTrack *vtrack);
52    virtual Bool_t   IsSelected(TObject *object);
53    virtual void     Print(const Option_t *option = "") const;
54
55 private:
56
57    Bool_t          fIsMC;           //  needed to initialize the pid object
58    Bool_t          fRejectOutside;  //  choose if tracks outside momentum range are rejected or not
59    Double_t        fMomMin;         //  min p in range where this cut is checked
60    Double_t        fMomMax;         //  max p in range where this cut is checked
61    EPARTYPE        fRefType;        //  particle type for which PID is checked
62    AliESDpid      *fESDpid;         //! ESD PID object
63    AliAODpidUtil  *fAODpid;         //! AOD PID object
64
65    ClassDef(AliRsnCutPIDITS, 1)
66 };
67
68 inline Bool_t AliRsnCutPIDITS::IsTPC(const AliVTrack *vtrack)
69 {
70 //
71 // Checks if the track has the status flags required for a global track
72 //
73
74    if (!vtrack) {
75       AliWarning("NULL argument: impossible to check status");
76       return kFALSE;
77    }
78
79    Bool_t isTPCin = ((vtrack->GetStatus() & AliESDtrack::kTPCin) != 0);
80
81    return (isTPCin);
82 }
83
84 inline Bool_t AliRsnCutPIDITS::IsSA(const AliVTrack *vtrack)
85 {
86 //
87 // Checks if the track has the status flags required for an ITS standalone track
88 //
89
90    if (!vtrack) {
91       AliWarning("NULL argument: impossible to check status");
92       return kFALSE;
93    }
94
95    Bool_t isTPCin     = ((vtrack->GetStatus() & AliESDtrack::kTPCin) != 0);
96    Bool_t isITSrefit  = ((vtrack->GetStatus() & AliESDtrack::kITSrefit) != 0);
97    Bool_t isITSpureSA = ((vtrack->GetStatus() & AliESDtrack::kITSpureSA) != 0);
98    Bool_t isITSpid    = ((vtrack->GetStatus() & AliESDtrack::kITSpid) != 0);
99
100    return ((!isTPCin) && isITSrefit && (!isITSpureSA) && isITSpid);
101
102    return kTRUE;
103 }
104
105 #endif