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