]>
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 menagement class implemented by the | |
17 | // ALICE Heavy Flavour Electron Group | |
18 | // Interface to the correction framework | |
19 | // Provides a set of standard cuts | |
20 | // | |
21 | // Authors: | |
22 | // Raphaelle Bailhache <R.Bailhache@gsi.de> | |
23 | // Markus Fasel <M.Fasel@gsi.de> | |
24 | // Markus Heide <mheide@uni-muenster.de> | |
25 | // Matus Kalisky <m.kalisky@uni-muenster.de> | |
26 | // | |
70da6c5a | 27 | // Overview over the 18 steps in the correction Framework |
28 | // 0. Generated Electrons | |
29 | // 1. Signal Electrons | |
30 | // 2. Electron in Acceptance | |
31 | // ------------------------------------------------------------ | |
32 | // 3. Rec without cuts (MC information) | |
33 | // 4. Rec Kine ITS/TPC (MC Information) | |
34 | // 5. Rec Primary (MC Information) | |
35 | // 6. HFE ITS (MC Information) | |
36 | // 7. HFE TRD (MC Information) | |
37 | // 8. PID (MC Information) | |
38 | // ............................................................ | |
39 | // 9. Rec without cuts(MC Information for tracks which are already registered) | |
40 | // 10. Rec Kine ITS/TPC (MC Information for tracks which are already registered) | |
41 | // 11. RecPrimary (MC Information for tracks which are already registered) | |
42 | // 12. HFE ITS (MC Information for tracks which are already registered) | |
43 | // 13. HFE TPC (MC Information for tracks which are already registered) | |
44 | // 14. PID (MC Information for tracks which are already registered) | |
45 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
46 | // 15. Rec without cuts | |
47 | // 16. Rec Kine ITS/TPC | |
48 | // 17. Rec Primary | |
49 | // 18. HFE ITS | |
50 | // 19. HFE TRD | |
51 | // 20. PID | |
52 | // | |
809a4336 | 53 | #include <TClass.h> |
54 | #include <TList.h> | |
55 | #include <TObjArray.h> | |
56 | #include <TString.h> | |
57 | ||
58 | #include "AliCFAcceptanceCuts.h" | |
59 | #include "AliCFCutBase.h" | |
0792aa82 | 60 | #include "AliCFEventGenCuts.h" |
61 | #include "AliCFEventRecCuts.h" | |
809a4336 | 62 | #include "AliCFManager.h" |
63 | #include "AliCFParticleGenCuts.h" | |
64 | #include "AliCFTrackIsPrimaryCuts.h" | |
65 | #include "AliCFTrackKineCuts.h" | |
66 | #include "AliCFTrackQualityCuts.h" | |
67 | #include "AliESDtrack.h" | |
809a4336 | 68 | |
69 | #include "AliHFEcuts.h" | |
70 | ||
71 | ClassImp(AliHFEcuts) | |
72 | ||
3a72645a | 73 | const Char_t *AliHFEcuts::fgkMCCutName[AliHFEcuts::kNcutStepsMCTrack] = { |
74 | "MCGenerated", | |
75 | "MCGeneratedZOutNoPileUp", | |
76 | "MCGeneratedEventCut", | |
77 | "MCInAcceptance" | |
78 | }; | |
79 | ||
80 | const Char_t * AliHFEcuts::fgkRecoCutName[AliHFEcuts::kNcutStepsRecTrack] = { | |
81 | "NoCuts", | |
82 | "RecKineITSTPC", | |
83 | "Primary", | |
84 | "HFEITS", | |
85 | "HFETRD" | |
86 | }; | |
87 | ||
88 | const Char_t * AliHFEcuts::fgkDECutName[AliHFEcuts::kNcutStepsDETrack] = { | |
89 | "HFEDCA" | |
90 | }; | |
91 | ||
92 | const Char_t * AliHFEcuts::fgkEventCutName[AliHFEcuts::kNcutStepsEvent] = { | |
93 | "EventStepGenerated", | |
94 | "EventStepRecNoCut", | |
95 | "EventStepRecNoPileUp", | |
96 | "EventStepZRange", | |
97 | "EventStepReconstructed" | |
98 | }; | |
99 | ||
100 | const Char_t * AliHFEcuts::fgkUndefined = "Undefined"; | |
101 | ||
809a4336 | 102 | //__________________________________________________________________ |
103 | AliHFEcuts::AliHFEcuts(): | |
e3fc062d | 104 | TNamed(), |
105 | fRequirements(0), | |
e3ae862b | 106 | fTPCclusterDef(AliHFEextraCuts::kFound), |
107 | fTPCratioDef(AliHFEextraCuts::kFoundOverFindable), | |
e3fc062d | 108 | fMinClustersTPC(0), |
3a72645a | 109 | fMinClustersITS(0), |
e3fc062d | 110 | fMinTrackletsTRD(0), |
111 | fCutITSPixel(0), | |
112 | fCheckITSLayerStatus(kTRUE), | |
113 | fMaxChi2clusterTPC(0.), | |
114 | fMinClusterRatioTPC(0.), | |
115 | fSigmaToVtx(0.), | |
3a72645a | 116 | fVertexRangeZ(20.), |
e3ae862b | 117 | fTOFPIDStep(kFALSE), |
e3fc062d | 118 | fHistQA(0x0), |
119 | fCutList(0x0), | |
120 | fDebugLevel(0) | |
121 | { | |
122 | // | |
123 | // Dummy Constructor | |
124 | // | |
125 | } | |
126 | ||
127 | //__________________________________________________________________ | |
128 | AliHFEcuts::AliHFEcuts(const Char_t *name, const Char_t *title): | |
129 | TNamed(name, title), | |
809a4336 | 130 | fRequirements(0), |
e3ae862b | 131 | fTPCclusterDef(AliHFEextraCuts::kFound), |
132 | fTPCratioDef(AliHFEextraCuts::kFoundOverFindable), | |
809a4336 | 133 | fMinClustersTPC(0), |
3a72645a | 134 | fMinClustersITS(0), |
809a4336 | 135 | fMinTrackletsTRD(0), |
136 | fCutITSPixel(0), | |
0792aa82 | 137 | fCheckITSLayerStatus(kTRUE), |
809a4336 | 138 | fMaxChi2clusterTPC(0.), |
139 | fMinClusterRatioTPC(0.), | |
140 | fSigmaToVtx(0.), | |
3a72645a | 141 | fVertexRangeZ(20.), |
e3ae862b | 142 | fTOFPIDStep(kFALSE), |
809a4336 | 143 | fHistQA(0x0), |
dbe3abbe | 144 | fCutList(0x0), |
145 | fDebugLevel(0) | |
809a4336 | 146 | { |
147 | // | |
148 | // Default Constructor | |
149 | // | |
150 | memset(fProdVtx, 0, sizeof(Double_t) * 4); | |
151 | memset(fDCAtoVtx, 0, sizeof(Double_t) * 2); | |
152 | memset(fPtRange, 0, sizeof(Double_t) * 2); | |
809a4336 | 153 | } |
154 | ||
155 | //__________________________________________________________________ | |
156 | AliHFEcuts::AliHFEcuts(const AliHFEcuts &c): | |
e3fc062d | 157 | TNamed(c), |
809a4336 | 158 | fRequirements(c.fRequirements), |
e3ae862b | 159 | fTPCclusterDef(c.fTPCclusterDef), |
160 | fTPCratioDef(c.fTPCratioDef), | |
e3fc062d | 161 | fMinClustersTPC(0), |
3a72645a | 162 | fMinClustersITS(0), |
e3fc062d | 163 | fMinTrackletsTRD(0), |
164 | fCutITSPixel(0), | |
165 | fCheckITSLayerStatus(0), | |
166 | fMaxChi2clusterTPC(0), | |
167 | fMinClusterRatioTPC(0), | |
168 | fSigmaToVtx(0), | |
3a72645a | 169 | fVertexRangeZ(20.), |
e3ae862b | 170 | fTOFPIDStep(kFALSE), |
809a4336 | 171 | fHistQA(0x0), |
dbe3abbe | 172 | fCutList(0x0), |
173 | fDebugLevel(0) | |
809a4336 | 174 | { |
175 | // | |
176 | // Copy Constructor | |
177 | // | |
e3fc062d | 178 | c.Copy(*this); |
179 | } | |
180 | ||
181 | //__________________________________________________________________ | |
182 | AliHFEcuts &AliHFEcuts::operator=(const AliHFEcuts &c){ | |
183 | // | |
184 | // Make assignment | |
185 | // | |
186 | if(&c != this) c.Copy(*this); | |
187 | return *this; | |
188 | } | |
189 | ||
190 | //__________________________________________________________________ | |
191 | void AliHFEcuts::Copy(TObject &c) const { | |
192 | // | |
193 | // Performing copy | |
194 | // | |
195 | AliHFEcuts &target = dynamic_cast<AliHFEcuts &>(c); | |
196 | ||
197 | target.fRequirements = fRequirements; | |
e3ae862b | 198 | target.fTPCclusterDef = fTPCclusterDef; |
199 | target.fTPCratioDef = fTPCratioDef; | |
e3fc062d | 200 | target.fMinClustersTPC = fMinClustersTPC; |
3a72645a | 201 | target.fMinClustersITS = fMinClustersITS; |
e3fc062d | 202 | target.fMinTrackletsTRD = fMinTrackletsTRD; |
203 | target.fCutITSPixel = fCutITSPixel; | |
204 | target.fCheckITSLayerStatus = fCheckITSLayerStatus; | |
205 | target.fMaxChi2clusterTPC = fMaxChi2clusterTPC; | |
206 | target.fMinClusterRatioTPC = fMinClusterRatioTPC; | |
207 | target.fSigmaToVtx = fSigmaToVtx; | |
3a72645a | 208 | target.fVertexRangeZ = fVertexRangeZ; |
e3ae862b | 209 | target.fTOFPIDStep = fTOFPIDStep; |
e3fc062d | 210 | target.fDebugLevel = 0; |
211 | ||
212 | memcpy(target.fProdVtx, fProdVtx, sizeof(Double_t) * 4); | |
213 | memcpy(target.fDCAtoVtx, fDCAtoVtx, sizeof(Double_t) * 2); | |
214 | memcpy(target.fPtRange, fPtRange, sizeof(Double_t) *2); | |
215 | ||
216 | // Copy cut List | |
217 | if(target.fCutList){ | |
218 | target.fCutList->Clear(); | |
219 | delete target.fCutList; | |
220 | } | |
221 | if(fCutList){ | |
222 | target.fCutList = dynamic_cast<TObjArray *>(fCutList->Clone()); | |
bf892a6a | 223 | if(target.fCutList) target.fCutList->SetOwner(); // Coverity |
e3fc062d | 224 | } |
225 | if(target.fHistQA){ | |
226 | target.fHistQA->Clear(); | |
227 | delete target.fHistQA; | |
228 | target.fHistQA = NULL; | |
229 | } | |
230 | if(fHistQA){ | |
231 | // If the QA list was already produced, then we create it new, loop over the cuts and connect all the histos with this list | |
232 | target.fHistQA = new TList; | |
233 | target.fHistQA->SetName(Form("%s_CutQAhistograms", GetName())); | |
234 | fHistQA->SetOwner(kFALSE); | |
235 | TIter cit(target.fCutList); | |
236 | TObjArray *clist = NULL; | |
237 | AliCFCutBase *co = NULL; | |
238 | while((clist = dynamic_cast<TObjArray *>(cit()))){ | |
239 | TIter cit1(clist); | |
240 | while((co = dynamic_cast<AliCFCutBase *>(cit1()))) co->SetQAOn(target.fHistQA); | |
241 | } | |
242 | } | |
809a4336 | 243 | } |
244 | ||
245 | //__________________________________________________________________ | |
246 | AliHFEcuts::~AliHFEcuts(){ | |
247 | // | |
248 | // Destruktor | |
249 | // | |
250 | if(fCutList){ | |
251 | fCutList->Delete(); | |
252 | delete fCutList; | |
253 | } | |
254 | fCutList = 0x0; | |
255 | if(fHistQA) fHistQA->Clear(); | |
256 | delete fHistQA; | |
257 | } | |
258 | ||
259 | //__________________________________________________________________ | |
260 | void AliHFEcuts::Initialize(AliCFManager *cfm){ | |
50685501 | 261 | // |
262 | // Initializes the cut objects from the correction framework | |
263 | // Publishes the cuts to the correction framework manager | |
264 | // | |
faee3b18 | 265 | AliDebug(2, "Called"); |
3a72645a | 266 | const Int_t kMCOffset = kNcutStepsMCTrack; |
267 | const Int_t kRecOffset = kNcutStepsRecTrack; | |
e3fc062d | 268 | if(fCutList) |
269 | fCutList->Delete(); | |
270 | else{ | |
271 | fCutList = new TObjArray; | |
272 | fCutList->SetOwner(); | |
273 | } | |
274 | if(IsQAOn()){ | |
275 | fHistQA = new TList; | |
276 | fHistQA->SetName(Form("%s_CutQAhistograms", GetName())); | |
722347d8 | 277 | fHistQA->SetOwner(kFALSE); |
278 | } | |
279 | ||
809a4336 | 280 | // Call all the setters for the cuts |
281 | SetParticleGenCutList(); | |
282 | SetAcceptanceCutList(); | |
722347d8 | 283 | SetRecKineITSTPCCutList(); |
809a4336 | 284 | SetRecPrimaryCutList(); |
dbe3abbe | 285 | SetHFElectronITSCuts(); |
dbe3abbe | 286 | SetHFElectronTRDCuts(); |
3a72645a | 287 | SetHFElectronDcaCuts(); |
dbe3abbe | 288 | |
9bcfd1ab | 289 | // Publish to the cuts which analysis type they are (ESD Analysis by default) |
290 | if(IsAOD()){ | |
291 | AliInfo("Setting AOD Analysis"); | |
292 | TObjArray *genCuts = dynamic_cast<TObjArray *>(fCutList->FindObject("fPartGenCuts")); | |
293 | if(genCuts){ | |
294 | AliCFParticleGenCuts *myGenCut = dynamic_cast<AliCFParticleGenCuts *>(genCuts->FindObject("fCutsGenMC")); | |
295 | if(myGenCut) myGenCut->SetAODMC(kTRUE); | |
296 | } | |
297 | } | |
298 | ||
0792aa82 | 299 | // Connect the event cuts |
70da6c5a | 300 | SetEventCutList(kEventStepGenerated); |
0792aa82 | 301 | SetEventCutList(kEventStepReconstructed); |
302 | cfm->SetEventCutsList(kEventStepGenerated, dynamic_cast<TObjArray *>(fCutList->FindObject("fEvGenCuts"))); | |
70da6c5a | 303 | cfm->SetEventCutsList(kEventStepReconstructed, dynamic_cast<TObjArray *>(fCutList->FindObject("fEvRecCuts"))); |
809a4336 | 304 | |
0792aa82 | 305 | // Connect the particle cuts |
3a72645a | 306 | // 1st MC |
809a4336 | 307 | cfm->SetParticleCutsList(kStepMCGenerated, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartGenCuts"))); |
308 | cfm->SetParticleCutsList(kStepMCInAcceptance, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartAccCuts"))); | |
3a72645a | 309 | // 2nd Reco |
310 | cfm->SetParticleCutsList(kStepRecKineITSTPC + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartRecKineITSTPCCuts"))); | |
311 | cfm->SetParticleCutsList(kStepRecPrim + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartPrimCuts"))); | |
312 | cfm->SetParticleCutsList(kStepHFEcutsITS + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartHFECutsITS"))); | |
313 | cfm->SetParticleCutsList(kStepHFEcutsTRD + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartHFECutsTRD"))); | |
314 | cfm->SetParticleCutsList(kStepHFEcutsDca + kRecOffset + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartHFECutsDca"))); | |
dbe3abbe | 315 | |
809a4336 | 316 | } |
317 | ||
318 | //__________________________________________________________________ | |
319 | void AliHFEcuts::Initialize(){ | |
320 | // Call all the setters for the cuts | |
faee3b18 | 321 | AliDebug(2, "Called\n"); |
e3fc062d | 322 | if(fCutList) |
323 | fCutList->Delete(); | |
324 | else{ | |
325 | fCutList = new TObjArray; | |
326 | fCutList->SetOwner(); | |
327 | } | |
328 | if(IsQAOn()){ | |
329 | fHistQA = new TList; | |
330 | fHistQA->SetName(Form("%s_CutQAhistograms", GetName())); | |
331 | fHistQA->SetOwner(kFALSE); | |
332 | } | |
809a4336 | 333 | SetParticleGenCutList(); |
334 | SetAcceptanceCutList(); | |
722347d8 | 335 | SetRecKineITSTPCCutList(); |
809a4336 | 336 | SetRecPrimaryCutList(); |
dbe3abbe | 337 | SetHFElectronITSCuts(); |
dbe3abbe | 338 | SetHFElectronTRDCuts(); |
3a72645a | 339 | SetHFElectronDcaCuts(); |
dbe3abbe | 340 | |
809a4336 | 341 | } |
342 | ||
0792aa82 | 343 | //__________________________________________________________________ |
344 | void AliHFEcuts::SetEventCutList(Int_t istep){ | |
345 | // | |
346 | // Cuts for Event Selection | |
347 | // | |
faee3b18 | 348 | AliDebug(2, "Called\n"); |
0792aa82 | 349 | TObjArray *arr = new TObjArray; |
350 | if(istep == kEventStepGenerated){ | |
faee3b18 | 351 | AliCFEventGenCuts *evGenCuts = new AliCFEventGenCuts((Char_t *)"fCutsEvGen", (Char_t *)"Event Generated cuts"); |
3a72645a | 352 | //evGenCuts->SetNTracksCut(1); |
0792aa82 | 353 | evGenCuts->SetRequireVtxCuts(kTRUE); |
3a72645a | 354 | //evGenCuts->SetVertexXCut(-1, 1); |
355 | //evGenCuts->SetVertexYCut(-1, 1); | |
356 | evGenCuts->SetVertexZCut(-fVertexRangeZ, fVertexRangeZ); | |
69ac0e6f | 357 | if(IsQAOn()) evGenCuts->SetQAOn(fHistQA); |
0792aa82 | 358 | |
359 | arr->SetName("fEvGenCuts"); | |
360 | arr->AddLast(evGenCuts); | |
361 | } else { | |
faee3b18 | 362 | AliCFEventRecCuts *evRecCuts = new AliCFEventRecCuts((Char_t *)"fCutsEvRec", (Char_t *)"Event Reconstructed cuts"); |
3a72645a | 363 | //evRecCuts->SetNTracksCut(1); |
0792aa82 | 364 | evRecCuts->SetRequireVtxCuts(kTRUE); |
3a72645a | 365 | //evRecCuts->SetVertexXCut(-1, 1); |
366 | //evRecCuts->SetVertexYCut(-1, 1); | |
367 | //evRecCuts->SetVertexZCut(-30, 30); | |
368 | evRecCuts->SetVertexZCut(-fVertexRangeZ, fVertexRangeZ); | |
369 | evRecCuts->SetVertexNContributors(1,(Int_t)1.e9); | |
69ac0e6f | 370 | if(IsQAOn()) evRecCuts->SetQAOn(fHistQA); |
0792aa82 | 371 | |
372 | arr->SetName("fEvRecCuts"); | |
373 | arr->AddLast(evRecCuts); | |
374 | } | |
375 | fCutList->AddLast(arr); | |
376 | } | |
377 | ||
809a4336 | 378 | //__________________________________________________________________ |
379 | void AliHFEcuts::SetParticleGenCutList(){ | |
380 | // | |
381 | // Initialize Particle Cuts for Monte Carlo Tracks | |
382 | // Production Vertex: < 1cm (Beampipe) | |
383 | // Particle Species: Electrons | |
384 | // Eta: < 0.9 (TRD-TOF acceptance) | |
385 | // | |
faee3b18 | 386 | |
387 | TObjArray *mcCuts = new TObjArray; | |
388 | mcCuts->SetName("fPartGenCuts"); | |
389 | ||
390 | // | |
391 | AliDebug(2, "Called\n"); | |
809a4336 | 392 | AliCFParticleGenCuts *genCuts = new AliCFParticleGenCuts("fCutsGenMC", "Particle Generation Cuts"); |
393 | genCuts->SetRequireIsCharged(); | |
faee3b18 | 394 | if(IsRequirePrimary()) { |
395 | genCuts->SetRequireIsPrimary(); | |
396 | } | |
809a4336 | 397 | if(IsRequireProdVertex()){ |
faee3b18 | 398 | AliDebug(3, Form("Vertex Range: fProdVtx[0] %f, fProdVtx[1] %f, fProdVtx[2] %f, fProdVtx[3] %f", fProdVtx[0], fProdVtx[1], fProdVtx[2], fProdVtx[3])); |
809a4336 | 399 | genCuts->SetProdVtxRangeX(fProdVtx[0], fProdVtx[1]); |
400 | genCuts->SetProdVtxRangeY(fProdVtx[2], fProdVtx[3]); | |
70da6c5a | 401 | genCuts->SetProdVtxRange2D(kTRUE); // Use ellipse |
809a4336 | 402 | } |
722347d8 | 403 | genCuts->SetRequirePdgCode(11, kTRUE); |
e3fc062d | 404 | if(IsQAOn()) genCuts->SetQAOn(fHistQA); |
809a4336 | 405 | |
faee3b18 | 406 | // Add |
809a4336 | 407 | mcCuts->AddLast(genCuts); |
faee3b18 | 408 | |
409 | // | |
410 | if(IsRequireKineMCCuts()) { | |
411 | AliCFTrackKineCuts *kineMCcuts = new AliCFTrackKineCuts((Char_t *)"fCutsKineMC", (Char_t *)"MC Kine Cuts"); | |
412 | kineMCcuts->SetPtRange(fPtRange[0], fPtRange[1]); | |
413 | kineMCcuts->SetEtaRange(-0.8, 0.8); | |
e3fc062d | 414 | if(IsQAOn()) kineMCcuts->SetQAOn(fHistQA); |
faee3b18 | 415 | mcCuts->AddLast(kineMCcuts); |
416 | } | |
417 | ||
809a4336 | 418 | fCutList->AddLast(mcCuts); |
419 | } | |
420 | ||
421 | //__________________________________________________________________ | |
422 | void AliHFEcuts::SetAcceptanceCutList(){ | |
423 | // | |
424 | // Initialize Particle (Monte Carlo) acceptance cuts | |
425 | // Min. Required Hist for Detectors: | |
426 | // ITS [3] | |
427 | // TPC [2] | |
722347d8 | 428 | // TRD [2*nTracklets] |
809a4336 | 429 | // TOF [0] |
430 | // | |
faee3b18 | 431 | AliDebug(2, "Called\n"); |
809a4336 | 432 | AliCFAcceptanceCuts *accCuts = new AliCFAcceptanceCuts("fCutsAccMC", "MC Acceptance Cuts"); |
433 | accCuts->SetMinNHitITS(3); | |
434 | accCuts->SetMinNHitTPC(2); | |
722347d8 | 435 | accCuts->SetMinNHitTRD(2*fMinTrackletsTRD); |
e3fc062d | 436 | if(IsQAOn()) accCuts->SetQAOn(fHistQA); |
809a4336 | 437 | |
75d81601 | 438 | TObjArray *partAccCuts = new TObjArray(); |
439 | partAccCuts->SetName("fPartAccCuts"); | |
440 | partAccCuts->AddLast(accCuts); | |
441 | fCutList->AddLast(partAccCuts); | |
809a4336 | 442 | } |
443 | ||
444 | //__________________________________________________________________ | |
722347d8 | 445 | void AliHFEcuts::SetRecKineITSTPCCutList(){ |
809a4336 | 446 | // |
447 | // Track Kinematics and Quality cuts (Based on the Standard cuts from PWG0) | |
448 | // | |
722347d8 | 449 | // ITS refit |
809a4336 | 450 | // Variances: |
451 | // y: 2 | |
452 | // z: 2 | |
453 | // sin(phi): 0.5 | |
454 | // tan(theta): 0.5 | |
455 | // 1/pt: 2 | |
456 | // Min. Number of Clusters: | |
457 | // TPC: 50 | |
458 | // RefitRequired: | |
809a4336 | 459 | // TPC |
460 | // Chi2 per TPC cluster: 3.5 | |
461 | // | |
462 | // Kinematics: | |
463 | // Momentum Range: 100MeV - 20GeV | |
464 | // Eta: < 0.9 (TRD-TOF acceptance) | |
465 | // | |
faee3b18 | 466 | AliDebug(2, "Called\n"); |
467 | AliCFTrackQualityCuts *trackQuality = new AliCFTrackQualityCuts((Char_t *)"fCutsQualityRec", (Char_t *)"REC Track Quality Cuts"); | |
3a72645a | 468 | trackQuality->SetMinNClusterITS(fMinClustersITS); |
809a4336 | 469 | trackQuality->SetMaxChi2PerClusterTPC(fMaxChi2clusterTPC); |
722347d8 | 470 | trackQuality->SetStatus(AliESDtrack::kTPCrefit | AliESDtrack::kITSrefit); |
3a72645a | 471 | //trackQuality->SetMaxCovDiagonalElements(2., 2., 0.5, 0.5, 2); |
809a4336 | 472 | |
722347d8 | 473 | AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupTPC","Extra cuts from the HFE group"); |
722347d8 | 474 | hfecuts->SetDebugLevel(fDebugLevel); |
3a72645a | 475 | |
476 | // Set the cut in the TPC number of clusters | |
e3ae862b | 477 | hfecuts->SetMinNClustersTPC(fMinClustersTPC, fTPCclusterDef); |
478 | hfecuts->SetClusterRatioTPC(fMinClusterRatioTPC, fTPCratioDef); | |
722347d8 | 479 | |
faee3b18 | 480 | AliCFTrackKineCuts *kineCuts = new AliCFTrackKineCuts((Char_t *)"fCutsKineRec", (Char_t *)"REC Kine Cuts"); |
809a4336 | 481 | kineCuts->SetPtRange(fPtRange[0], fPtRange[1]); |
70da6c5a | 482 | kineCuts->SetEtaRange(-0.8, 0.8); |
809a4336 | 483 | |
e3fc062d | 484 | if(IsQAOn()){ |
809a4336 | 485 | trackQuality->SetQAOn(fHistQA); |
722347d8 | 486 | hfecuts->SetQAOn(fHistQA); |
809a4336 | 487 | kineCuts->SetQAOn(fHistQA); |
488 | } | |
489 | ||
490 | TObjArray *recCuts = new TObjArray; | |
722347d8 | 491 | recCuts->SetName("fPartRecKineITSTPCCuts"); |
809a4336 | 492 | recCuts->AddLast(trackQuality); |
722347d8 | 493 | recCuts->AddLast(hfecuts); |
809a4336 | 494 | recCuts->AddLast(kineCuts); |
495 | fCutList->AddLast(recCuts); | |
496 | } | |
497 | ||
498 | //__________________________________________________________________ | |
499 | void AliHFEcuts::SetRecPrimaryCutList(){ | |
500 | // | |
501 | // Primary cuts (based on standard cuts from PWG0): | |
502 | // DCA to Vertex: | |
503 | // XY: 3. cm | |
504 | // Z: 10. cm | |
505 | // No Kink daughters | |
506 | // | |
faee3b18 | 507 | AliDebug(2, "Called\n"); |
508 | AliCFTrackIsPrimaryCuts *primaryCut = new AliCFTrackIsPrimaryCuts((Char_t *)"fCutsPrimaryCuts", (Char_t *)"REC Primary Cuts"); | |
809a4336 | 509 | if(IsRequireDCAToVertex()){ |
78ea5ef4 | 510 | //primaryCut->SetDCAToVertex2D(kTRUE); |
809a4336 | 511 | primaryCut->SetMaxDCAToVertexXY(fDCAtoVtx[0]); |
512 | primaryCut->SetMaxDCAToVertexZ(fDCAtoVtx[1]); | |
513 | } | |
514 | if(IsRequireSigmaToVertex()){ | |
515 | primaryCut->SetRequireSigmaToVertex(kTRUE); | |
516 | primaryCut->SetMaxNSigmaToVertex(fSigmaToVtx); | |
517 | } | |
518 | primaryCut->SetAcceptKinkDaughters(kFALSE); | |
e3fc062d | 519 | if(IsQAOn()) primaryCut->SetQAOn(fHistQA); |
809a4336 | 520 | |
521 | TObjArray *primCuts = new TObjArray; | |
522 | primCuts->SetName("fPartPrimCuts"); | |
523 | primCuts->AddLast(primaryCut); | |
524 | fCutList->AddLast(primCuts); | |
525 | } | |
526 | ||
527 | //__________________________________________________________________ | |
dbe3abbe | 528 | void AliHFEcuts::SetHFElectronITSCuts(){ |
809a4336 | 529 | // |
dbe3abbe | 530 | // Special Cuts introduced by the HFElectron Group: ITS |
809a4336 | 531 | // |
faee3b18 | 532 | AliDebug(2, "Called\n"); |
dbe3abbe | 533 | AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupPixels","Extra cuts from the HFE group"); |
809a4336 | 534 | if(IsRequireITSpixel()){ |
535 | hfecuts->SetRequireITSpixel(AliHFEextraCuts::ITSPixel_t(fCutITSPixel)); | |
0792aa82 | 536 | hfecuts->SetCheckITSstatus(fCheckITSLayerStatus); |
809a4336 | 537 | } |
dbe3abbe | 538 | |
e3fc062d | 539 | if(IsQAOn()) hfecuts->SetQAOn(fHistQA); |
78ea5ef4 | 540 | hfecuts->SetDebugLevel(fDebugLevel); |
541 | ||
dbe3abbe | 542 | TObjArray *hfeCuts = new TObjArray; |
543 | hfeCuts->SetName("fPartHFECutsITS"); | |
544 | hfeCuts->AddLast(hfecuts); | |
545 | fCutList->AddLast(hfeCuts); | |
546 | } | |
547 | ||
dbe3abbe | 548 | //__________________________________________________________________ |
549 | void AliHFEcuts::SetHFElectronTRDCuts(){ | |
550 | // | |
551 | // Special Cuts introduced by the HFElectron Group: TRD | |
552 | // | |
faee3b18 | 553 | AliDebug(2, "Called\n"); |
dbe3abbe | 554 | AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupTRD","Extra cuts from the HFE group"); |
555 | if(fMinTrackletsTRD > 0.) hfecuts->SetMinTrackletsTRD(fMinTrackletsTRD); | |
e3ae862b | 556 | if(fTOFPIDStep) hfecuts->SetTOFPID(kTRUE); |
e3fc062d | 557 | if(IsQAOn()) hfecuts->SetQAOn(fHistQA); |
78ea5ef4 | 558 | hfecuts->SetDebugLevel(fDebugLevel); |
dbe3abbe | 559 | |
560 | TObjArray *hfeCuts = new TObjArray; | |
561 | hfeCuts->SetName("fPartHFECutsTRD"); | |
809a4336 | 562 | hfeCuts->AddLast(hfecuts); |
563 | fCutList->AddLast(hfeCuts); | |
564 | } | |
565 | ||
809a4336 | 566 | //__________________________________________________________________ |
3a72645a | 567 | void AliHFEcuts::SetHFElectronDcaCuts(){ |
568 | // | |
569 | // Special Cuts introduced by the HFElectron Group: minimum of impact parameter | |
570 | // | |
571 | AliDebug(2, "Called\n"); | |
572 | AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupDCA","Extra cuts from the HFE group"); | |
573 | hfecuts->SetMinHFEImpactParamR(); | |
574 | //hfecuts->SetMinHFEImpactParamNsigmaR(); | |
575 | if(IsQAOn()) hfecuts->SetQAOn(fHistQA); | |
576 | hfecuts->SetDebugLevel(fDebugLevel); | |
577 | ||
578 | TObjArray *hfeCuts = new TObjArray; | |
579 | hfeCuts->SetName("fPartHFECutsDca"); | |
580 | hfeCuts->AddLast(hfecuts); | |
581 | fCutList->AddLast(hfeCuts); | |
582 | } | |
583 | ||
584 | //__________________________________________________________________ | |
585 | Bool_t AliHFEcuts::CheckParticleCuts(UInt_t step, TObject *o){ | |
809a4336 | 586 | // |
587 | // Checks the cuts without using the correction framework manager | |
588 | // | |
faee3b18 | 589 | AliDebug(2, "Called\n"); |
3a72645a | 590 | TString stepnames[kNcutStepsMCTrack + kNcutStepsRecTrack + kNcutStepsDETrack + 1] = {"fPartGenCuts","fPartEvCutPileupZ","fPartEvCut","fPartAccCuts","fPartRecNoCuts","fPartRecKineITSTPCCuts", "fPartPrimCuts", "fPartHFECutsITS","fPartHFECutsTRD","fPartHFECutsDca"}; |
591 | AliDebug(2, Form("Doing cut %s", stepnames[step].Data())); | |
e3fc062d | 592 | TObjArray *cuts = dynamic_cast<TObjArray *>(fCutList->FindObject(stepnames[step].Data())); |
809a4336 | 593 | if(!cuts) return kTRUE; |
3a72645a | 594 | TIter it(cuts); |
809a4336 | 595 | AliCFCutBase *mycut; |
596 | Bool_t status = kTRUE; | |
3a72645a | 597 | while((mycut = dynamic_cast<AliCFCutBase *>(it()))){ |
809a4336 | 598 | status &= mycut->IsSelected(o); |
599 | } | |
809a4336 | 600 | return status; |
601 | } |