]>
Commit | Line | Data |
---|---|---|
809a4336 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | #ifndef __ALIHFECUTS_H__ | |
16 | #define __ALIHFECUTS_H__ | |
17 | ||
18 | #ifndef ROOT_TObject | |
19 | #include <TObject.h> | |
20 | #endif | |
21 | ||
22 | #ifndef __ALIHFELECTRONEXTRACUTS_H__ | |
23 | #include "AliHFEextraCuts.h" | |
24 | #endif | |
25 | ||
26 | class AliCFManager; | |
27 | class AliESDtrack; | |
28 | class AliMCParticle; | |
29 | ||
30 | class TObjArray; | |
31 | class TList; | |
32 | ||
33 | class AliHFEcuts : public TObject{ | |
34 | enum{ | |
35 | kDebugMode = BIT(14) | |
ad75027f | 36 | }; |
809a4336 | 37 | typedef enum{ |
38 | kPrimary = 0, | |
ad75027f | 39 | kProductionVertex = 1, |
40 | kSigmaToVertex = 2, | |
41 | kDCAToVertex = 3, | |
42 | kITSPixel = 4, | |
43 | kMaxImpactParam = 5 | |
44 | } Require_t; | |
809a4336 | 45 | public: |
46 | ||
47 | typedef enum{ | |
48 | kStepMCGenerated = 0, | |
ad75027f | 49 | kStepMCInAcceptance = 1, |
dbe3abbe | 50 | kStepRecKineTPC = 2, |
51 | kStepRecKineITS = 3, | |
52 | kStepRecPrim = 4, | |
53 | kStepHFEcutsITS = 5, | |
54 | kStepHFEcutsTPC = 6, | |
55 | kStepHFEcutsTRD = 7 | |
56 | } CutStep_t; | |
809a4336 | 57 | |
58 | static const Int_t kNcutSteps; | |
dbe3abbe | 59 | static const Int_t kNcutESDSteps; |
809a4336 | 60 | |
61 | AliHFEcuts(); | |
62 | AliHFEcuts(const AliHFEcuts &c); | |
63 | AliHFEcuts &operator=(const AliHFEcuts &c); | |
64 | ~AliHFEcuts(); | |
65 | ||
66 | void Initialize(AliCFManager *cfm); | |
67 | void Initialize(); | |
68 | ||
69 | Bool_t CheckParticleCuts(CutStep_t step, TObject *o); | |
70 | ||
71 | TList *GetQAhistograms() const { return fHistQA; } | |
72 | ||
73 | void SetDebugMode(); | |
74 | void UnsetDebugMode() { SetBit(kDebugMode, kFALSE); } | |
75 | Bool_t IsInDebugMode() const { return TestBit(kDebugMode); }; | |
76 | ||
77 | // Getters | |
78 | Bool_t IsRequireITSpixel() const { return TESTBIT(fRequirements, kITSPixel); }; | |
79 | Bool_t IsRequireMaxImpactParam() const { return TESTBIT(fRequirements, kMaxImpactParam); }; | |
80 | Bool_t IsRequirePrimary() const { return TESTBIT(fRequirements, kPrimary); }; | |
81 | Bool_t IsRequireProdVertex() const { return TESTBIT(fRequirements, kProductionVertex); }; | |
82 | Bool_t IsRequireSigmaToVertex() const { return TESTBIT(fRequirements, kSigmaToVertex); }; | |
83 | Bool_t IsRequireDCAToVertex() const {return TESTBIT(fRequirements, kDCAToVertex); }; | |
84 | ||
85 | // Setters | |
86 | inline void SetCutITSpixel(UChar_t cut); | |
87 | void SetMinNClustersTPC(UChar_t minClustersTPC) { fMinClustersTPC = minClustersTPC; } | |
88 | void SetMinNTrackletsTRD(UChar_t minNtrackletsTRD) { fMinTrackletsTRD = minNtrackletsTRD; } | |
89 | void SetMaxChi2perClusterTPC(Double_t chi2) { fMaxChi2clusterTPC = chi2; }; | |
90 | inline void SetMaxImpactParam(Double_t radial, Double_t z); | |
91 | void SetMinRatioTPCclusters(Double_t minRatioTPC) { fMinClusterRatioTPC = minRatioTPC; }; | |
92 | void SetPtRange(Double_t ptmin, Double_t ptmax){fPtRange[0] = ptmin; fPtRange[1] = ptmax;}; | |
93 | inline void SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax); | |
94 | inline void SetSigmaToVertex(Double_t sig); | |
95 | ||
96 | inline void CreateStandardCuts(); | |
97 | ||
98 | // Requirements | |
99 | void SetRequireDCAToVertex() { SETBIT(fRequirements, kDCAToVertex); }; | |
100 | void SetRequireIsPrimary() { SETBIT(fRequirements, kPrimary); }; | |
101 | void SetRequireITSPixel() { SETBIT(fRequirements, kITSPixel); } | |
ad75027f | 102 | void SetRequireProdVertex() { SETBIT(fRequirements, kProductionVertex); }; |
809a4336 | 103 | void SetRequireSigmaToVertex() { SETBIT(fRequirements, kSigmaToVertex); }; |
dbe3abbe | 104 | |
105 | void SetDebugLevel(Int_t level) { fDebugLevel = level; }; | |
106 | Int_t GetDebugLevel() const { return fDebugLevel; }; | |
809a4336 | 107 | |
108 | private: | |
109 | void SetParticleGenCutList(); | |
110 | void SetAcceptanceCutList(); | |
dbe3abbe | 111 | void SetRecKineTPCCutList(); |
112 | void SetRecKineITSCutList(); | |
809a4336 | 113 | void SetRecPrimaryCutList(); |
dbe3abbe | 114 | void SetHFElectronITSCuts(); |
115 | void SetHFElectronTPCCuts(); | |
116 | void SetHFElectronTRDCuts(); | |
117 | ||
809a4336 | 118 | ULong64_t fRequirements; // Bitmap for requirements |
119 | Double_t fDCAtoVtx[2]; // DCA to Vertex | |
120 | Double_t fProdVtx[4]; // Production Vertex | |
121 | Double_t fPtRange[2]; // pt range | |
122 | UChar_t fMinClustersTPC; // Min.Number of TPC clusters | |
123 | UChar_t fMinTrackletsTRD; // Min. Number of TRD tracklets | |
124 | UChar_t fCutITSPixel; // Cut on ITS pixel | |
125 | Double_t fMaxChi2clusterTPC; // Max Chi2 per TPC cluster | |
126 | Double_t fMinClusterRatioTPC; // Min. Ratio findable / found TPC clusters | |
127 | Double_t fSigmaToVtx; // Sigma To Vertex | |
809a4336 | 128 | |
129 | TList *fHistQA; //! QA Histograms | |
130 | TObjArray *fCutList; //! List of cut objects(Correction Framework Manager) | |
dbe3abbe | 131 | |
132 | Int_t fDebugLevel; // Debug Level | |
809a4336 | 133 | |
134 | ClassDef(AliHFEcuts, 1) // Container for HFE cuts | |
135 | }; | |
136 | ||
137 | //__________________________________________________________________ | |
138 | void AliHFEcuts::SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax){ | |
139 | // Set the production vertex constraint | |
ad75027f | 140 | SetRequireProdVertex(); |
809a4336 | 141 | fProdVtx[0] = xmin; |
142 | fProdVtx[1] = xmax; | |
143 | fProdVtx[2] = ymin; | |
144 | fProdVtx[3] = ymax; | |
145 | } | |
146 | ||
147 | //__________________________________________________________________ | |
148 | void AliHFEcuts::SetSigmaToVertex(Double_t sig){ | |
149 | SetRequireSigmaToVertex(); | |
150 | fSigmaToVtx = sig; | |
151 | } | |
152 | ||
153 | //__________________________________________________________________ | |
154 | void AliHFEcuts::SetMaxImpactParam(Double_t radial, Double_t z){ | |
ad75027f | 155 | SetRequireDCAToVertex(); |
156 | fDCAtoVtx[0] = radial; | |
157 | fDCAtoVtx[1] = z; | |
809a4336 | 158 | } |
159 | ||
160 | //__________________________________________________________________ | |
161 | void AliHFEcuts::SetCutITSpixel(UChar_t cut){ | |
162 | SetRequireITSPixel(); | |
163 | fCutITSPixel = cut; | |
164 | } | |
165 | ||
166 | //__________________________________________________________________ | |
167 | void AliHFEcuts::CreateStandardCuts(){ | |
168 | // | |
169 | // Standard Cuts defined by the HFE Group | |
170 | // | |
ad75027f | 171 | SetRequireProdVertex(); |
809a4336 | 172 | fProdVtx[0] = -1; |
173 | fProdVtx[1] = 1; | |
174 | fProdVtx[2] = -1; | |
175 | fProdVtx[3] = 1; | |
176 | SetRequireDCAToVertex(); | |
177 | fDCAtoVtx[0] = 4.; | |
178 | fDCAtoVtx[1] = 10.; | |
179 | fMinClustersTPC = 50; | |
180 | fMinTrackletsTRD = 6; | |
dbe3abbe | 181 | SetRequireITSPixel(); |
182 | fCutITSPixel = AliHFEextraCuts::kBoth; | |
809a4336 | 183 | fMaxChi2clusterTPC = 3.5; |
184 | fMinClusterRatioTPC = 0.6; | |
185 | fPtRange[0] = 0.1; | |
186 | fPtRange[1] = 20.; | |
809a4336 | 187 | } |
188 | #endif |