]>
Commit | Line | Data |
---|---|---|
27de2dfb | 1 | #ifndef ALIHFECUTS_H |
2 | #define ALIHFECUTS_H | |
3 | ||
809a4336 | 4 | /************************************************************************** |
5 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
6 | * * | |
7 | * Author: The ALICE Off-line Project. * | |
8 | * Contributors are mentioned in the code where appropriate. * | |
9 | * * | |
10 | * Permission to use, copy, modify and distribute this software and its * | |
11 | * documentation strictly for non-commercial purposes is hereby granted * | |
12 | * without fee, provided that the above copyright notice appears in all * | |
13 | * copies and that both the copyright notice and this permission notice * | |
14 | * appear in the supporting documentation. The authors make no claims * | |
15 | * about the suitability of this software for any purpose. It is * | |
16 | * provided "as is" without express or implied warranty. * | |
17 | **************************************************************************/ | |
27de2dfb | 18 | |
19 | /* $Id$ */ | |
20 | ||
50685501 | 21 | // |
22 | // Cut container class for the ALICE HFE group | |
23 | // Serves also as interface to the correction Framework | |
24 | // Provides a set of standard cuts | |
25 | // | |
e3fc062d | 26 | #ifndef ROOT_TNamed |
27 | #include <TNamed.h> | |
809a4336 | 28 | #endif |
29 | ||
75d81601 | 30 | #ifndef ALIHFEEXTRACUTS_H |
809a4336 | 31 | #include "AliHFEextraCuts.h" |
32 | #endif | |
33 | ||
34 | class AliCFManager; | |
35 | class AliESDtrack; | |
36 | class AliMCParticle; | |
37 | ||
38 | class TObjArray; | |
39 | class TList; | |
40 | ||
e3fc062d | 41 | class AliHFEcuts : public TNamed{ |
75d81601 | 42 | public: |
3a72645a | 43 | typedef enum{ |
44 | kStepRecNoCut = 0, | |
45 | kStepRecKineITSTPC = 1, | |
46 | kStepRecPrim = 2, | |
47 | kStepHFEcutsITS = 3, | |
48 | kStepHFEcutsTRD = 4, | |
49 | kNcutStepsRecTrack = 5 | |
50 | } RecoCutStep_t; | |
51 | typedef enum{ | |
52 | kStepHFEcutsDca = 0, | |
53 | kNcutStepsDETrack = 1 | |
54 | } DECutStep_t; | |
75d81601 | 55 | typedef enum{ |
56 | kStepMCGenerated = 0, | |
3a72645a | 57 | kStepMCGeneratedZOutNoPileUp = 1, |
58 | kStepMCGeneratedEventCut = 2, | |
59 | kStepMCInAcceptance = 3, | |
60 | kNcutStepsMCTrack = 4 | |
61 | } MCCutStep_t; | |
0792aa82 | 62 | typedef enum{ |
63 | kEventStepGenerated = 0, | |
e3fc062d | 64 | kEventStepRecNoCut = 1, |
3a72645a | 65 | kEventStepRecNoPileUp = 2, |
66 | kEventStepZRange = 3, | |
67 | kEventStepReconstructed = 4, | |
68 | kNcutStepsEvent = 5 | |
0792aa82 | 69 | } EventCutStep_t; |
809a4336 | 70 | |
75d81601 | 71 | AliHFEcuts(); |
e3fc062d | 72 | AliHFEcuts(const Char_t *name, const Char_t *title); |
75d81601 | 73 | AliHFEcuts(const AliHFEcuts &c); |
74 | AliHFEcuts &operator=(const AliHFEcuts &c); | |
e3fc062d | 75 | void Copy(TObject &o) const; |
75d81601 | 76 | ~AliHFEcuts(); |
809a4336 | 77 | |
75d81601 | 78 | void Initialize(AliCFManager *cfm); |
79 | void Initialize(); | |
809a4336 | 80 | |
3a72645a | 81 | Bool_t CheckParticleCuts(UInt_t step, TObject *o); |
75d81601 | 82 | |
83 | TList *GetQAhistograms() const { return fHistQA; } | |
809a4336 | 84 | |
e3fc062d | 85 | void SetQAOn() {SetBit(kDebugMode, kTRUE); }; |
86 | void UnsetQA() {SetBit(kDebugMode, kFALSE); }; | |
87 | Bool_t IsQAOn() const { return TestBit(kDebugMode); }; | |
9bcfd1ab | 88 | void SetAOD() { SetBit(kAOD, kTRUE); } |
89 | void SetESD() { SetBit(kAOD, kFALSE); } | |
9bcfd1ab | 90 | Bool_t IsAOD() const { return TestBit(kAOD); } |
91 | Bool_t IsESD() const { return !TestBit(kAOD); } | |
3a72645a | 92 | |
93 | // Cut Names | |
94 | static const Char_t *MCCutName(UInt_t step){ | |
95 | if(step >= kNcutStepsMCTrack) return fgkUndefined; | |
96 | return fgkMCCutName[step]; | |
97 | }; | |
98 | static const Char_t *RecoCutName(UInt_t step){ | |
99 | if(step >= kNcutStepsRecTrack) return fgkUndefined; | |
100 | return fgkRecoCutName[step]; | |
101 | } | |
102 | static const Char_t *DECutName(UInt_t step){ | |
103 | if(step >= kNcutStepsDETrack) return fgkUndefined; | |
104 | return fgkDECutName[step]; | |
105 | } | |
106 | static const Char_t *EventCutName(UInt_t step){ | |
107 | if(step >= kNcutStepsEvent) return fgkUndefined; | |
108 | return fgkEventCutName[step]; | |
109 | } | |
110 | ||
75d81601 | 111 | // Getters |
112 | Bool_t IsRequireITSpixel() const { return TESTBIT(fRequirements, kITSPixel); }; | |
113 | Bool_t IsRequireMaxImpactParam() const { return TESTBIT(fRequirements, kMaxImpactParam); }; | |
114 | Bool_t IsRequirePrimary() const { return TESTBIT(fRequirements, kPrimary); }; | |
115 | Bool_t IsRequireProdVertex() const { return TESTBIT(fRequirements, kProductionVertex); }; | |
116 | Bool_t IsRequireSigmaToVertex() const { return TESTBIT(fRequirements, kSigmaToVertex); }; | |
117 | Bool_t IsRequireDCAToVertex() const {return TESTBIT(fRequirements, kDCAToVertex); }; | |
faee3b18 | 118 | Bool_t IsRequireKineMCCuts() const {return TESTBIT(fRequirements, kKineMCCuts); }; |
3a72645a | 119 | Double_t GetVertexRange() const {return fVertexRangeZ; }; |
809a4336 | 120 | |
75d81601 | 121 | // Setters |
122 | inline void SetCutITSpixel(UChar_t cut); | |
0792aa82 | 123 | void SetCheckITSLayerStatus(Bool_t checkITSLayerStatus) { fCheckITSLayerStatus = checkITSLayerStatus; } |
75d81601 | 124 | void SetMinNClustersTPC(UChar_t minClustersTPC) { fMinClustersTPC = minClustersTPC; } |
3a72645a | 125 | void SetMinNClustersITS(UChar_t minClustersITS) { fMinClustersITS = minClustersITS; } |
75d81601 | 126 | void SetMinNTrackletsTRD(UChar_t minNtrackletsTRD) { fMinTrackletsTRD = minNtrackletsTRD; } |
127 | void SetMaxChi2perClusterTPC(Double_t chi2) { fMaxChi2clusterTPC = chi2; }; | |
128 | inline void SetMaxImpactParam(Double_t radial, Double_t z); | |
129 | void SetMinRatioTPCclusters(Double_t minRatioTPC) { fMinClusterRatioTPC = minRatioTPC; }; | |
130 | void SetPtRange(Double_t ptmin, Double_t ptmax){fPtRange[0] = ptmin; fPtRange[1] = ptmax;}; | |
131 | inline void SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax); | |
132 | inline void SetSigmaToVertex(Double_t sig); | |
e3ae862b | 133 | void SetTPCmodes(AliHFEextraCuts::ETPCclusterDef_t clusterDef, AliHFEextraCuts::ETPCclrDef_t ratioDef) { |
134 | fTPCclusterDef= clusterDef; | |
135 | fTPCratioDef = ratioDef; | |
136 | } | |
137 | void SetVertexRange(Double_t zrange){fVertexRangeZ = zrange;}; | |
138 | void SetTOFPIDStep(Bool_t tofPidStep) {fTOFPIDStep = tofPidStep;}; | |
809a4336 | 139 | |
75d81601 | 140 | inline void CreateStandardCuts(); |
809a4336 | 141 | |
75d81601 | 142 | // Requirements |
67fe7bd0 | 143 | void SetRequireDCAToVertex() { SETBIT(fRequirements, kDCAToVertex); CLRBIT(fRequirements, kSigmaToVertex); }; |
75d81601 | 144 | void SetRequireIsPrimary() { SETBIT(fRequirements, kPrimary); }; |
145 | void SetRequireITSPixel() { SETBIT(fRequirements, kITSPixel); } | |
146 | void SetRequireProdVertex() { SETBIT(fRequirements, kProductionVertex); }; | |
67fe7bd0 | 147 | void SetRequireSigmaToVertex() { SETBIT(fRequirements, kSigmaToVertex); CLRBIT(fRequirements, kDCAToVertex); }; |
3a72645a | 148 | void UnsetVertexRequirement() { CLRBIT(fRequirements, kDCAToVertex); CLRBIT(fRequirements, kSigmaToVertex); } |
faee3b18 | 149 | void SetRequireKineMCCuts() { SETBIT(fRequirements, kKineMCCuts); }; |
dbe3abbe | 150 | |
75d81601 | 151 | void SetDebugLevel(Int_t level) { fDebugLevel = level; }; |
152 | Int_t GetDebugLevel() const { return fDebugLevel; }; | |
153 | ||
154 | private: | |
50685501 | 155 | enum{ |
9bcfd1ab | 156 | kDebugMode = BIT(14), |
157 | kAOD = BIT(15) | |
50685501 | 158 | }; |
159 | typedef enum{ | |
160 | kPrimary = 0, | |
161 | kProductionVertex = 1, | |
162 | kSigmaToVertex = 2, | |
163 | kDCAToVertex = 3, | |
164 | kITSPixel = 4, | |
faee3b18 | 165 | kMaxImpactParam = 5, |
166 | kKineMCCuts = 6 | |
50685501 | 167 | } Require_t; |
75d81601 | 168 | void SetParticleGenCutList(); |
169 | void SetAcceptanceCutList(); | |
722347d8 | 170 | void SetRecKineITSTPCCutList(); |
75d81601 | 171 | void SetRecPrimaryCutList(); |
172 | void SetHFElectronITSCuts(); | |
75d81601 | 173 | void SetHFElectronTRDCuts(); |
3a72645a | 174 | void SetHFElectronDcaCuts(); |
0792aa82 | 175 | void SetEventCutList(Int_t istep); |
3a72645a | 176 | |
177 | static const Char_t* fgkMCCutName[kNcutStepsMCTrack]; // Cut step names for MC single Track cuts | |
178 | static const Char_t* fgkRecoCutName[kNcutStepsRecTrack]; // Cut step names for Rec single Track cuts | |
179 | static const Char_t* fgkDECutName[kNcutStepsDETrack]; // Cut step names for impact parameter cuts | |
180 | static const Char_t* fgkEventCutName[kNcutStepsEvent]; // Cut step names for Event cuts | |
181 | static const Char_t* fgkUndefined; // Name for undefined (overflow) | |
dbe3abbe | 182 | |
75d81601 | 183 | ULong64_t fRequirements; // Bitmap for requirements |
e3ae862b | 184 | AliHFEextraCuts::ETPCclusterDef_t fTPCclusterDef; // TPC cluster definition |
185 | AliHFEextraCuts::ETPCclrDef_t fTPCratioDef; // TPC cluster ratio Definition | |
75d81601 | 186 | Double_t fDCAtoVtx[2]; // DCA to Vertex |
187 | Double_t fProdVtx[4]; // Production Vertex | |
188 | Double_t fPtRange[2]; // pt range | |
189 | UChar_t fMinClustersTPC; // Min.Number of TPC clusters | |
3a72645a | 190 | UChar_t fMinClustersITS; // Min.Number of TPC clusters |
75d81601 | 191 | UChar_t fMinTrackletsTRD; // Min. Number of TRD tracklets |
192 | UChar_t fCutITSPixel; // Cut on ITS pixel | |
0792aa82 | 193 | Bool_t fCheckITSLayerStatus; // Check ITS layer status |
75d81601 | 194 | Double_t fMaxChi2clusterTPC; // Max Chi2 per TPC cluster |
195 | Double_t fMinClusterRatioTPC; // Min. Ratio findable / found TPC clusters | |
196 | Double_t fSigmaToVtx; // Sigma To Vertex | |
3a72645a | 197 | Double_t fVertexRangeZ; // Vertex Range reconstructed |
e3ae862b | 198 | Bool_t fTOFPIDStep; // TOF matching step efficiency |
3a72645a | 199 | |
809a4336 | 200 | |
75d81601 | 201 | TList *fHistQA; //! QA Histograms |
202 | TObjArray *fCutList; //! List of cut objects(Correction Framework Manager) | |
dbe3abbe | 203 | |
75d81601 | 204 | Int_t fDebugLevel; // Debug Level |
809a4336 | 205 | |
3a72645a | 206 | ClassDef(AliHFEcuts, 2) // Container for HFE cuts |
75d81601 | 207 | }; |
809a4336 | 208 | |
75d81601 | 209 | //__________________________________________________________________ |
210 | void AliHFEcuts::SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax){ | |
211 | // Set the production vertex constraint | |
212 | SetRequireProdVertex(); | |
213 | fProdVtx[0] = xmin; | |
214 | fProdVtx[1] = xmax; | |
215 | fProdVtx[2] = ymin; | |
216 | fProdVtx[3] = ymax; | |
217 | } | |
809a4336 | 218 | |
219 | //__________________________________________________________________ | |
220 | void AliHFEcuts::SetSigmaToVertex(Double_t sig){ | |
221 | SetRequireSigmaToVertex(); | |
222 | fSigmaToVtx = sig; | |
223 | } | |
224 | ||
225 | //__________________________________________________________________ | |
226 | void AliHFEcuts::SetMaxImpactParam(Double_t radial, Double_t z){ | |
ad75027f | 227 | SetRequireDCAToVertex(); |
228 | fDCAtoVtx[0] = radial; | |
229 | fDCAtoVtx[1] = z; | |
809a4336 | 230 | } |
231 | ||
232 | //__________________________________________________________________ | |
233 | void AliHFEcuts::SetCutITSpixel(UChar_t cut){ | |
234 | SetRequireITSPixel(); | |
235 | fCutITSPixel = cut; | |
236 | } | |
237 | ||
238 | //__________________________________________________________________ | |
239 | void AliHFEcuts::CreateStandardCuts(){ | |
240 | // | |
241 | // Standard Cuts defined by the HFE Group | |
242 | // | |
ad75027f | 243 | SetRequireProdVertex(); |
faee3b18 | 244 | fProdVtx[0] = 0; |
722347d8 | 245 | fProdVtx[1] = 3; |
faee3b18 | 246 | fProdVtx[2] = 0; |
722347d8 | 247 | fProdVtx[3] = 3; |
faee3b18 | 248 | //SetRequireDCAToVertex(); |
249 | //fDCAtoVtx[0] = 0.5; | |
250 | //fDCAtoVtx[1] = 1.5; | |
251 | fMinClustersTPC = 80; | |
3a72645a | 252 | fMinClustersITS = 4; |
722347d8 | 253 | fMinTrackletsTRD = 0; |
dbe3abbe | 254 | SetRequireITSPixel(); |
722347d8 | 255 | fCutITSPixel = AliHFEextraCuts::kFirst; |
3a72645a | 256 | fMaxChi2clusterTPC = 4.; |
809a4336 | 257 | fMinClusterRatioTPC = 0.6; |
258 | fPtRange[0] = 0.1; | |
259 | fPtRange[1] = 20.; | |
faee3b18 | 260 | SetRequireKineMCCuts(); |
809a4336 | 261 | } |
262 | #endif |