]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnCutTrackQuality.h
Splitted the PID cuts into three classes for ITS, TPC and TOF, and added the possibil...
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutTrackQuality.h
1 //
2 // Class AliRsnCutRange
3 //
4 // General implementation of cuts which check a value inside a range.
5 // This range can be defined by two integers or two doubles.
6 // A user-friendly enumeration allows to define what is checked.
7 //
8 // authors: Martin Vala (martin.vala@cern.ch)
9 //          Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
10 //
11
12 #ifndef ALIRSNCUTTRACKQUALITY_H
13 #define ALIRSNCUTTRACKQUALITY_H
14
15 #include <TMath.h>
16 #include <TString.h>
17
18 #include "AliRsnCut.h"
19
20 class AliESDtrack;
21 class AliAODTrack;
22
23 class AliRsnCutTrackQuality : public AliRsnCut
24 {
25   public:
26
27     AliRsnCutTrackQuality(const char *name = "AliRsncutTrackQuality");
28     AliRsnCutTrackQuality(const AliRsnCutTrackQuality& copy);
29     AliRsnCutTrackQuality& operator=(const AliRsnCutTrackQuality& copy);
30     virtual ~AliRsnCutTrackQuality() { }
31
32     void      DisableAll();
33     
34     void      AddStatusFlag(ULong_t flag)         {fFlags = fFlags | flag;}
35     void      SetStatusFlags(ULong_t flags)       {fFlags = flags;}
36     void      SetPtRange(Double_t a, Double_t b)  {fPt[0] = TMath::Min(a, b); fPt[1] = TMath::Max(a, b);}
37     void      SetEtaRange(Double_t a, Double_t b) {fEta[0] = TMath::Min(a, b); fEta[1] = TMath::Max(a, b);}
38     
39     void      SetDCARPtFormula(const char *formula) {fDCARptFormula = formula; fDCARptFormula.ReplaceAll("pt", "x"); fDCARfixed = kFALSE;}
40     void      SetDCARmax(Double_t value)            {fDCARmax = value; fDCARptFormula = ""; fDCARfixed = kTRUE;}
41     void      SetDCAZPtFormula(const char *formula) {fDCAZptFormula = formula; fDCAZptFormula.ReplaceAll("pt", "x"); fDCAZfixed = kFALSE;}
42     void      SetDCAZmax(Double_t value)            {fDCAZmax = value; fDCAZptFormula = ""; fDCAZfixed = kTRUE;}
43     
44     void      SetSPDminNClusters(Int_t value)       {fSPDminNClusters = value;}
45     void      SetITSminNClusters(Int_t value)       {fITSminNClusters = value;}
46     void      SetITSmaxChi2(Double_t value)         {fITSmaxChi2 = value;}
47     
48     void      SetTPCminNClusters(Int_t value)       {fTPCminNClusters = value;}
49     void      SetTPCmaxChi2(Double_t value)         {fTPCmaxChi2 = value;}
50     
51     virtual Bool_t IsSelected(TObject *obj);
52
53   protected:
54   
55     Bool_t     CheckESD(AliESDtrack *track);
56     Bool_t     CheckAOD(AliAODTrack *track);
57   
58     ULong_t    fFlags;              // required status flag (used AliESDtrack ones, connected with '|')
59     Double_t   fPt[2];              // pt range
60     Double_t   fEta[2];             // eta range
61     Bool_t     fRejectKinkDaughter; // switch to kTRUE if daughters of kinks must be rejected
62     
63     Bool_t     fDCARfixed;          // flag to switch between fixed and pt-dependent DCA cut
64     TString    fDCARptFormula;      // expression to compute transverse DCA sigma w.r. to pt
65     Double_t   fDCARmax;            // maximum value for transverse DCA
66     
67     Bool_t     fDCAZfixed;          // flag to switch between fixed and pt-dependent DCA cut
68     TString    fDCAZptFormula;      // expression to compute longitudinal DCA sigma w.r. to pt
69     Double_t   fDCAZmax;            // maximum value for longitudinal DCA
70     
71     Int_t      fSPDminNClusters;    // minimum number of required clusters in SPD
72     Int_t      fITSminNClusters;    // minimum number of required clusters in ITS
73     Double_t   fITSmaxChi2;         // maximum chi2 / number of clusters in ITS
74     
75     Int_t      fTPCminNClusters;    // minimum number of required clusters in TPC
76     Double_t   fTPCmaxChi2;         // maximum chi2 / number of clusters in TPC
77     
78     ClassDef(AliRsnCutTrackQuality, 1)
79 };
80
81 #endif