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