]>
Commit | Line | Data |
---|---|---|
35e49ca5 | 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 | ||
a909ffad | 34 | void AddStatusFlag(ULong_t f, Bool_t on) {if (on) fFlagsOn = fFlagsOn | f; else fFlagsOff = fFlagsOff | f;} |
35 | void SetStatusFlags(ULong_t f, Bool_t on) {if (on) fFlagsOn = f; else fFlagsOff = f;} | |
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; fDCARfixed = kFALSE;} | |
40 | void SetDCARmax(Double_t value) {fDCARmax = value; fDCARptFormula = ""; fDCARfixed = kTRUE;} | |
41 | void SetDCAZPtFormula(const char *formula) {fDCAZptFormula = formula; 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;} | |
35e49ca5 | 50 | |
a909ffad | 51 | void SetRejectKinkDaughters(Bool_t yn = kTRUE) {fRejectKinkDaughters = yn;} |
35e49ca5 | 52 | |
53 | virtual Bool_t IsSelected(TObject *obj); | |
a909ffad | 54 | virtual void Print(const Option_t *option = "") const; |
35e49ca5 | 55 | |
56 | protected: | |
57 | ||
58 | Bool_t CheckESD(AliESDtrack *track); | |
59 | Bool_t CheckAOD(AliAODTrack *track); | |
60 | ||
a909ffad | 61 | ULong_t fFlagsOn; // status flags which must be ON (used AliESDtrack ones, connected with '|') |
62 | ULong_t fFlagsOff; // status flags which must be OFF (used AliESDtrack ones, connected with '|') | |
63 | Double_t fPt[2]; // pt range | |
64 | Double_t fEta[2]; // eta range | |
65 | Bool_t fRejectKinkDaughters; // switch to kTRUE if daughters of kinks must be rejected | |
66 | ||
67 | Bool_t fDCARfixed; // flag to switch between fixed and pt-dependent DCA cut | |
68 | TString fDCARptFormula; // expression to compute transverse DCA sigma w.r. to pt | |
69 | Double_t fDCARmax; // maximum value for transverse DCA | |
70 | ||
71 | Bool_t fDCAZfixed; // flag to switch between fixed and pt-dependent DCA cut | |
72 | TString fDCAZptFormula; // expression to compute longitudinal DCA sigma w.r. to pt | |
73 | Double_t fDCAZmax; // maximum value for longitudinal DCA | |
74 | ||
75 | Int_t fSPDminNClusters; // minimum number of required clusters in SPD | |
76 | Int_t fITSminNClusters; // minimum number of required clusters in ITS | |
77 | Double_t fITSmaxChi2; // maximum chi2 / number of clusters in ITS | |
78 | ||
79 | Int_t fTPCminNClusters; // minimum number of required clusters in TPC | |
80 | Double_t fTPCmaxChi2; // maximum chi2 / number of clusters in TPC | |
35e49ca5 | 81 | |
82 | ClassDef(AliRsnCutTrackQuality, 1) | |
83 | }; | |
84 | ||
85 | #endif |