]>
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" |
809a4336 | 61 | #include "AliCFManager.h" |
62 | #include "AliCFParticleGenCuts.h" | |
63 | #include "AliCFTrackIsPrimaryCuts.h" | |
64 | #include "AliCFTrackKineCuts.h" | |
65 | #include "AliCFTrackQualityCuts.h" | |
66 | #include "AliESDtrack.h" | |
c2690925 | 67 | #include "AliHFEextraEventCuts.h" |
e17c1f86 | 68 | #include "AliMCEvent.h" |
69 | #include "AliVEvent.h" | |
809a4336 | 70 | |
71 | #include "AliHFEcuts.h" | |
72 | ||
73 | ClassImp(AliHFEcuts) | |
74 | ||
3a72645a | 75 | const Char_t *AliHFEcuts::fgkMCCutName[AliHFEcuts::kNcutStepsMCTrack] = { |
76 | "MCGenerated", | |
c2690925 | 77 | "MCGeneratedZOutNoPileUpCentralityFine", |
3a72645a | 78 | "MCGeneratedEventCut", |
79 | "MCInAcceptance" | |
80 | }; | |
81 | ||
82 | const Char_t * AliHFEcuts::fgkRecoCutName[AliHFEcuts::kNcutStepsRecTrack] = { | |
83 | "NoCuts", | |
84 | "RecKineITSTPC", | |
85 | "Primary", | |
86 | "HFEITS", | |
9250ffbf | 87 | "HFETOF", |
8c1c76e9 | 88 | "HFETPC", |
3a72645a | 89 | "HFETRD" |
90 | }; | |
91 | ||
92 | const Char_t * AliHFEcuts::fgkDECutName[AliHFEcuts::kNcutStepsDETrack] = { | |
93 | "HFEDCA" | |
94 | }; | |
95 | ||
c2690925 | 96 | const Char_t * AliHFEcuts::fgkSecvtxCutName[AliHFEcuts::kNcutStepsSecvtxTrack] = { |
97 | "HFESecvtx" | |
98 | }; | |
99 | ||
3a72645a | 100 | const Char_t * AliHFEcuts::fgkEventCutName[AliHFEcuts::kNcutStepsEvent] = { |
101 | "EventStepGenerated", | |
102 | "EventStepRecNoCut", | |
103 | "EventStepRecNoPileUp", | |
8c1c76e9 | 104 | "EventStepRecCentralityOK", |
3a72645a | 105 | "EventStepZRange", |
106 | "EventStepReconstructed" | |
107 | }; | |
108 | ||
109 | const Char_t * AliHFEcuts::fgkUndefined = "Undefined"; | |
110 | ||
809a4336 | 111 | //__________________________________________________________________ |
112 | AliHFEcuts::AliHFEcuts(): | |
e3fc062d | 113 | TNamed(), |
114 | fRequirements(0), | |
76d0b522 | 115 | fTPCclusterDef(0), |
116 | fTPCratioDef(0), | |
e3fc062d | 117 | fMinClustersTPC(0), |
e17c1f86 | 118 | fMinClustersTPCPID(0), |
3a72645a | 119 | fMinClustersITS(0), |
e3fc062d | 120 | fMinTrackletsTRD(0), |
cedf0381 | 121 | fMaxChi2TRD(-1.), |
e3fc062d | 122 | fCutITSPixel(0), |
123 | fCheckITSLayerStatus(kTRUE), | |
5cd679b7 | 124 | fCutITSDrift(0), |
8c1c76e9 | 125 | fMaxChi2clusterITS(-1.), |
e3fc062d | 126 | fMaxChi2clusterTPC(0.), |
127 | fMinClusterRatioTPC(0.), | |
3a72645a | 128 | fVertexRangeZ(20.), |
e17c1f86 | 129 | fTRDtrackletsExact(kFALSE), |
e3ae862b | 130 | fTOFPIDStep(kFALSE), |
c2690925 | 131 | fTOFMISMATCHStep(kFALSE), |
8c1c76e9 | 132 | fTPCPIDCLEANUPStep(kFALSE), |
cedf0381 | 133 | fITSpatternCut(kFALSE), |
c2690925 | 134 | fUseMixedVertex(kTRUE), |
63bdf450 | 135 | fUseSPDVertex(kFALSE), |
136 | fUseCorrelationVertex(kFALSE), | |
4437a0d2 | 137 | fSPDVtxResolution(kFALSE), |
138 | fPApileupCut(kFALSE), | |
c2690925 | 139 | fIsIPSigmacut(kFALSE), |
63bdf450 | 140 | fIsIPcharge(kFALSE), |
141 | fIsIPOpp(kFALSE), | |
9250ffbf | 142 | fFractionOfSharedTPCClusters(-1.0), |
143 | fMaxImpactParameterRpar(kFALSE), | |
11ff28c5 | 144 | fAdditionalStatusRequirement(0), |
1c051dd4 | 145 | fTOFsignaldx(-1.0), |
146 | fTOFsignaldz(-1.0), | |
96167a04 | 147 | fAODFilterBit(-1), |
e3fc062d | 148 | fHistQA(0x0), |
149 | fCutList(0x0), | |
150 | fDebugLevel(0) | |
151 | { | |
152 | // | |
153 | // Dummy Constructor | |
154 | // | |
8c1c76e9 | 155 | memset(fProdVtx, 0, sizeof(Double_t) * 4); |
156 | memset(fDCAtoVtx, 0, sizeof(Double_t) * 2); | |
157 | memset(fPtRange, 0, sizeof(Double_t) * 2); | |
158 | memset(fIPCutParams, 0, sizeof(Float_t) * 4); | |
159 | memset(fSigmaToVtx, 0, sizeof(Double_t) * 3); | |
cddc311d | 160 | fEtaRange[0] = -0.8; fEtaRange[1] = 0.8; |
e3fc062d | 161 | } |
162 | ||
163 | //__________________________________________________________________ | |
164 | AliHFEcuts::AliHFEcuts(const Char_t *name, const Char_t *title): | |
165 | TNamed(name, title), | |
809a4336 | 166 | fRequirements(0), |
76d0b522 | 167 | fTPCclusterDef(0), |
168 | fTPCratioDef(0), | |
809a4336 | 169 | fMinClustersTPC(0), |
e17c1f86 | 170 | fMinClustersTPCPID(0), |
3a72645a | 171 | fMinClustersITS(0), |
809a4336 | 172 | fMinTrackletsTRD(0), |
cedf0381 | 173 | fMaxChi2TRD(-1.), |
809a4336 | 174 | fCutITSPixel(0), |
0792aa82 | 175 | fCheckITSLayerStatus(kTRUE), |
5cd679b7 | 176 | fCutITSDrift(0), |
8c1c76e9 | 177 | fMaxChi2clusterITS(-1.), |
809a4336 | 178 | fMaxChi2clusterTPC(0.), |
179 | fMinClusterRatioTPC(0.), | |
3a72645a | 180 | fVertexRangeZ(20.), |
e17c1f86 | 181 | fTRDtrackletsExact(kFALSE), |
e3ae862b | 182 | fTOFPIDStep(kFALSE), |
c2690925 | 183 | fTOFMISMATCHStep(kFALSE), |
8c1c76e9 | 184 | fTPCPIDCLEANUPStep(kFALSE), |
cedf0381 | 185 | fITSpatternCut(kFALSE), |
c2690925 | 186 | fUseMixedVertex(kTRUE), |
63bdf450 | 187 | fUseSPDVertex(kFALSE), |
188 | fUseCorrelationVertex(kFALSE), | |
d87a9d29 | 189 | fSPDVtxResolution(kFALSE), |
4437a0d2 | 190 | fPApileupCut(kFALSE), |
c2690925 | 191 | fIsIPSigmacut(kFALSE), |
63bdf450 | 192 | fIsIPcharge(kFALSE), |
193 | fIsIPOpp(kFALSE), | |
9250ffbf | 194 | fFractionOfSharedTPCClusters(-1.0), |
195 | fMaxImpactParameterRpar(kFALSE), | |
11ff28c5 | 196 | fAdditionalStatusRequirement(0), |
1c051dd4 | 197 | fTOFsignaldx(-1.0), |
198 | fTOFsignaldz(-1.0), | |
96167a04 | 199 | fAODFilterBit(-1), |
809a4336 | 200 | fHistQA(0x0), |
dbe3abbe | 201 | fCutList(0x0), |
202 | fDebugLevel(0) | |
809a4336 | 203 | { |
204 | // | |
205 | // Default Constructor | |
206 | // | |
207 | memset(fProdVtx, 0, sizeof(Double_t) * 4); | |
208 | memset(fDCAtoVtx, 0, sizeof(Double_t) * 2); | |
209 | memset(fPtRange, 0, sizeof(Double_t) * 2); | |
c2690925 | 210 | memset(fIPCutParams, 0, sizeof(Float_t) * 4); |
8c1c76e9 | 211 | memset(fSigmaToVtx, 0, sizeof(Double_t) * 3); |
cddc311d | 212 | fEtaRange[0] = -0.8; fEtaRange[1] = 0.8; |
809a4336 | 213 | } |
214 | ||
215 | //__________________________________________________________________ | |
216 | AliHFEcuts::AliHFEcuts(const AliHFEcuts &c): | |
e3fc062d | 217 | TNamed(c), |
809a4336 | 218 | fRequirements(c.fRequirements), |
e3ae862b | 219 | fTPCclusterDef(c.fTPCclusterDef), |
220 | fTPCratioDef(c.fTPCratioDef), | |
e3fc062d | 221 | fMinClustersTPC(0), |
e17c1f86 | 222 | fMinClustersTPCPID(0), |
3a72645a | 223 | fMinClustersITS(0), |
e3fc062d | 224 | fMinTrackletsTRD(0), |
cedf0381 | 225 | fMaxChi2TRD(-1.), |
e3fc062d | 226 | fCutITSPixel(0), |
227 | fCheckITSLayerStatus(0), | |
5cd679b7 | 228 | fCutITSDrift(0), |
8c1c76e9 | 229 | fMaxChi2clusterITS(-1.), |
e3fc062d | 230 | fMaxChi2clusterTPC(0), |
231 | fMinClusterRatioTPC(0), | |
3a72645a | 232 | fVertexRangeZ(20.), |
e17c1f86 | 233 | fTRDtrackletsExact(kFALSE), |
e3ae862b | 234 | fTOFPIDStep(kFALSE), |
c2690925 | 235 | fTOFMISMATCHStep(kFALSE), |
8c1c76e9 | 236 | fTPCPIDCLEANUPStep(kFALSE), |
cedf0381 | 237 | fITSpatternCut(c.fITSpatternCut), |
c2690925 | 238 | fUseMixedVertex(kTRUE), |
63bdf450 | 239 | fUseSPDVertex(kFALSE), |
d87a9d29 | 240 | fUseCorrelationVertex(c.fUseCorrelationVertex), |
241 | fSPDVtxResolution(c.fSPDVtxResolution), | |
4437a0d2 | 242 | fPApileupCut(c.fPApileupCut), |
c2690925 | 243 | fIsIPSigmacut(kFALSE), |
63bdf450 | 244 | fIsIPcharge(kFALSE), |
245 | fIsIPOpp(kFALSE), | |
9250ffbf | 246 | fFractionOfSharedTPCClusters(-1.0), |
247 | fMaxImpactParameterRpar(kFALSE), | |
11ff28c5 | 248 | fAdditionalStatusRequirement(0), |
1c051dd4 | 249 | fTOFsignaldx(-1.0), |
250 | fTOFsignaldz(-1.0), | |
96167a04 | 251 | fAODFilterBit(-1), |
809a4336 | 252 | fHistQA(0x0), |
dbe3abbe | 253 | fCutList(0x0), |
254 | fDebugLevel(0) | |
809a4336 | 255 | { |
256 | // | |
257 | // Copy Constructor | |
258 | // | |
e3fc062d | 259 | c.Copy(*this); |
260 | } | |
261 | ||
262 | //__________________________________________________________________ | |
263 | AliHFEcuts &AliHFEcuts::operator=(const AliHFEcuts &c){ | |
264 | // | |
265 | // Make assignment | |
266 | // | |
267 | if(&c != this) c.Copy(*this); | |
268 | return *this; | |
269 | } | |
270 | ||
271 | //__________________________________________________________________ | |
272 | void AliHFEcuts::Copy(TObject &c) const { | |
273 | // | |
274 | // Performing copy | |
275 | // | |
276 | AliHFEcuts &target = dynamic_cast<AliHFEcuts &>(c); | |
277 | ||
278 | target.fRequirements = fRequirements; | |
e3ae862b | 279 | target.fTPCclusterDef = fTPCclusterDef; |
280 | target.fTPCratioDef = fTPCratioDef; | |
e3fc062d | 281 | target.fMinClustersTPC = fMinClustersTPC; |
e17c1f86 | 282 | target.fMinClustersTPCPID = fMinClustersTPCPID; |
3a72645a | 283 | target.fMinClustersITS = fMinClustersITS; |
e3fc062d | 284 | target.fMinTrackletsTRD = fMinTrackletsTRD; |
cedf0381 | 285 | target.fMaxChi2TRD = fMaxChi2TRD; |
e3fc062d | 286 | target.fCutITSPixel = fCutITSPixel; |
287 | target.fCheckITSLayerStatus = fCheckITSLayerStatus; | |
5cd679b7 | 288 | target.fCutITSDrift = fCutITSDrift; |
8c1c76e9 | 289 | target.fMaxChi2clusterITS = fMaxChi2clusterITS; |
e3fc062d | 290 | target.fMaxChi2clusterTPC = fMaxChi2clusterTPC; |
291 | target.fMinClusterRatioTPC = fMinClusterRatioTPC; | |
3a72645a | 292 | target.fVertexRangeZ = fVertexRangeZ; |
e17c1f86 | 293 | target.fTRDtrackletsExact = fTRDtrackletsExact; |
e3ae862b | 294 | target.fTOFPIDStep = fTOFPIDStep; |
c2690925 | 295 | target.fTOFMISMATCHStep = fTOFMISMATCHStep; |
8c1c76e9 | 296 | target.fTPCPIDCLEANUPStep = fTPCPIDCLEANUPStep; |
c2690925 | 297 | target.fUseMixedVertex = fUseMixedVertex; |
63bdf450 | 298 | target.fUseSPDVertex = fUseSPDVertex; |
299 | target.fUseCorrelationVertex = fUseCorrelationVertex; | |
d87a9d29 | 300 | target.fSPDVtxResolution = fSPDVtxResolution; |
4437a0d2 | 301 | target.fPApileupCut = fPApileupCut; |
c2690925 | 302 | target.fIsIPSigmacut = fIsIPSigmacut; |
63bdf450 | 303 | target.fIsIPcharge = fIsIPcharge; |
304 | target.fIsIPOpp = fIsIPOpp; | |
9250ffbf | 305 | target.fFractionOfSharedTPCClusters = fFractionOfSharedTPCClusters; |
306 | target.fMaxImpactParameterRpar = fMaxImpactParameterRpar; | |
11ff28c5 | 307 | target.fAdditionalStatusRequirement = fAdditionalStatusRequirement; |
1c051dd4 | 308 | target.fTOFsignaldx = fTOFsignaldx; |
309 | target.fTOFsignaldz = fTOFsignaldz; | |
96167a04 | 310 | target.fAODFilterBit = fAODFilterBit; |
e3fc062d | 311 | target.fDebugLevel = 0; |
312 | ||
313 | memcpy(target.fProdVtx, fProdVtx, sizeof(Double_t) * 4); | |
314 | memcpy(target.fDCAtoVtx, fDCAtoVtx, sizeof(Double_t) * 2); | |
315 | memcpy(target.fPtRange, fPtRange, sizeof(Double_t) *2); | |
c2690925 | 316 | memcpy(target.fIPCutParams, fIPCutParams, sizeof(Float_t) * 4); |
8c1c76e9 | 317 | memcpy(target.fSigmaToVtx, fSigmaToVtx, sizeof(Double_t) * 3); |
cddc311d | 318 | memcpy(target.fEtaRange, fEtaRange, sizeof(Double_t) * 2); |
e3fc062d | 319 | |
320 | // Copy cut List | |
321 | if(target.fCutList){ | |
322 | target.fCutList->Clear(); | |
323 | delete target.fCutList; | |
324 | } | |
325 | if(fCutList){ | |
326 | target.fCutList = dynamic_cast<TObjArray *>(fCutList->Clone()); | |
bf892a6a | 327 | if(target.fCutList) target.fCutList->SetOwner(); // Coverity |
e3fc062d | 328 | } |
329 | if(target.fHistQA){ | |
e3fc062d | 330 | delete target.fHistQA; |
e3fc062d | 331 | } |
332 | if(fHistQA){ | |
333 | // If the QA list was already produced, then we create it new, loop over the cuts and connect all the histos with this list | |
334 | target.fHistQA = new TList; | |
335 | target.fHistQA->SetName(Form("%s_CutQAhistograms", GetName())); | |
c2690925 | 336 | fHistQA->SetOwner(kTRUE); |
e3fc062d | 337 | TIter cit(target.fCutList); |
338 | TObjArray *clist = NULL; | |
339 | AliCFCutBase *co = NULL; | |
340 | while((clist = dynamic_cast<TObjArray *>(cit()))){ | |
341 | TIter cit1(clist); | |
342 | while((co = dynamic_cast<AliCFCutBase *>(cit1()))) co->SetQAOn(target.fHistQA); | |
343 | } | |
344 | } | |
809a4336 | 345 | } |
346 | ||
347 | //__________________________________________________________________ | |
348 | AliHFEcuts::~AliHFEcuts(){ | |
349 | // | |
350 | // Destruktor | |
351 | // | |
352 | if(fCutList){ | |
353 | fCutList->Delete(); | |
354 | delete fCutList; | |
355 | } | |
356 | fCutList = 0x0; | |
c2690925 | 357 | if(fHistQA) delete fHistQA; |
809a4336 | 358 | } |
359 | ||
8c1c76e9 | 360 | //__________________________________________________________________ |
361 | Long64_t AliHFEcuts::Merge(const TCollection *list){ | |
362 | // | |
363 | // Merge function doing nothing, just writing the object to file | |
364 | // | |
365 | if(!list) return 0; | |
366 | if(list->IsEmpty()) return 1; | |
367 | Long64_t counts = 0; | |
368 | // just count the number of objects to merge | |
369 | TIter iter(list); | |
370 | while(iter()){ counts++; } | |
371 | return counts+1; | |
372 | } | |
373 | ||
809a4336 | 374 | //__________________________________________________________________ |
375 | void AliHFEcuts::Initialize(AliCFManager *cfm){ | |
50685501 | 376 | // |
377 | // Initializes the cut objects from the correction framework | |
378 | // Publishes the cuts to the correction framework manager | |
379 | // | |
faee3b18 | 380 | AliDebug(2, "Called"); |
3a72645a | 381 | const Int_t kMCOffset = kNcutStepsMCTrack; |
382 | const Int_t kRecOffset = kNcutStepsRecTrack; | |
e3fc062d | 383 | if(fCutList) |
384 | fCutList->Delete(); | |
385 | else{ | |
386 | fCutList = new TObjArray; | |
387 | fCutList->SetOwner(); | |
388 | } | |
389 | if(IsQAOn()){ | |
390 | fHistQA = new TList; | |
391 | fHistQA->SetName(Form("%s_CutQAhistograms", GetName())); | |
c2690925 | 392 | fHistQA->SetOwner(kTRUE); |
722347d8 | 393 | } |
394 | ||
809a4336 | 395 | // Call all the setters for the cuts |
396 | SetParticleGenCutList(); | |
397 | SetAcceptanceCutList(); | |
722347d8 | 398 | SetRecKineITSTPCCutList(); |
809a4336 | 399 | SetRecPrimaryCutList(); |
dbe3abbe | 400 | SetHFElectronITSCuts(); |
9250ffbf | 401 | SetHFElectronTOFCuts(); |
8c1c76e9 | 402 | SetHFElectronTPCCuts(); |
dbe3abbe | 403 | SetHFElectronTRDCuts(); |
3a72645a | 404 | SetHFElectronDcaCuts(); |
dbe3abbe | 405 | |
9bcfd1ab | 406 | // Publish to the cuts which analysis type they are (ESD Analysis by default) |
407 | if(IsAOD()){ | |
408 | AliInfo("Setting AOD Analysis"); | |
409 | TObjArray *genCuts = dynamic_cast<TObjArray *>(fCutList->FindObject("fPartGenCuts")); | |
410 | if(genCuts){ | |
411 | AliCFParticleGenCuts *myGenCut = dynamic_cast<AliCFParticleGenCuts *>(genCuts->FindObject("fCutsGenMC")); | |
76d0b522 | 412 | if(myGenCut) { |
413 | myGenCut->SetAODMC(kTRUE); | |
414 | } | |
9bcfd1ab | 415 | } |
416 | } | |
417 | ||
0792aa82 | 418 | // Connect the event cuts |
70da6c5a | 419 | SetEventCutList(kEventStepGenerated); |
0792aa82 | 420 | SetEventCutList(kEventStepReconstructed); |
421 | cfm->SetEventCutsList(kEventStepGenerated, dynamic_cast<TObjArray *>(fCutList->FindObject("fEvGenCuts"))); | |
70da6c5a | 422 | cfm->SetEventCutsList(kEventStepReconstructed, dynamic_cast<TObjArray *>(fCutList->FindObject("fEvRecCuts"))); |
809a4336 | 423 | |
0792aa82 | 424 | // Connect the particle cuts |
3a72645a | 425 | // 1st MC |
809a4336 | 426 | cfm->SetParticleCutsList(kStepMCGenerated, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartGenCuts"))); |
427 | cfm->SetParticleCutsList(kStepMCInAcceptance, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartAccCuts"))); | |
3a72645a | 428 | // 2nd Reco |
429 | cfm->SetParticleCutsList(kStepRecKineITSTPC + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartRecKineITSTPCCuts"))); | |
430 | cfm->SetParticleCutsList(kStepRecPrim + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartPrimCuts"))); | |
431 | cfm->SetParticleCutsList(kStepHFEcutsITS + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartHFECutsITS"))); | |
9250ffbf | 432 | cfm->SetParticleCutsList(kStepHFEcutsTOF+ kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartHFECutsTOF"))); |
8c1c76e9 | 433 | cfm->SetParticleCutsList(kStepHFEcutsTPC+ kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartHFECutsTPC"))); |
3a72645a | 434 | cfm->SetParticleCutsList(kStepHFEcutsTRD + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartHFECutsTRD"))); |
435 | cfm->SetParticleCutsList(kStepHFEcutsDca + kRecOffset + kMCOffset, dynamic_cast<TObjArray *>(fCutList->FindObject("fPartHFECutsDca"))); | |
dbe3abbe | 436 | |
809a4336 | 437 | } |
438 | ||
439 | //__________________________________________________________________ | |
440 | void AliHFEcuts::Initialize(){ | |
441 | // Call all the setters for the cuts | |
faee3b18 | 442 | AliDebug(2, "Called\n"); |
e3fc062d | 443 | if(fCutList) |
444 | fCutList->Delete(); | |
445 | else{ | |
446 | fCutList = new TObjArray; | |
447 | fCutList->SetOwner(); | |
448 | } | |
449 | if(IsQAOn()){ | |
450 | fHistQA = new TList; | |
451 | fHistQA->SetName(Form("%s_CutQAhistograms", GetName())); | |
452 | fHistQA->SetOwner(kFALSE); | |
453 | } | |
809a4336 | 454 | SetParticleGenCutList(); |
455 | SetAcceptanceCutList(); | |
722347d8 | 456 | SetRecKineITSTPCCutList(); |
809a4336 | 457 | SetRecPrimaryCutList(); |
dbe3abbe | 458 | SetHFElectronITSCuts(); |
9250ffbf | 459 | SetHFElectronTOFCuts(); |
8c1c76e9 | 460 | SetHFElectronTPCCuts(); |
63bdf450 | 461 | SetHFElectronTRDCuts(); |
3a72645a | 462 | SetHFElectronDcaCuts(); |
dbe3abbe | 463 | |
76d0b522 | 464 | // Publish to the cuts which analysis type they are (ESD Analysis by default) |
465 | if(IsAOD()){ | |
466 | //printf("Initialize AOD\n"); | |
467 | //AliInfo("Setting AOD Analysis"); | |
468 | TObjArray *genCuts = dynamic_cast<TObjArray *>(fCutList->FindObject("fPartGenCuts")); | |
469 | if(genCuts){ | |
470 | AliCFParticleGenCuts *myGenCut = dynamic_cast<AliCFParticleGenCuts *>(genCuts->FindObject("fCutsGenMC")); | |
471 | if(myGenCut) { | |
472 | myGenCut->SetAODMC(kTRUE); | |
473 | //printf("Set AOD MC\n"); | |
474 | } | |
475 | } | |
476 | } | |
477 | ||
e156c3bb | 478 | // Connect the event cuts |
479 | SetEventCutList(kEventStepGenerated); | |
480 | SetEventCutList(kEventStepReconstructed); | |
481 | ||
482 | ||
809a4336 | 483 | } |
484 | ||
0792aa82 | 485 | //__________________________________________________________________ |
486 | void AliHFEcuts::SetEventCutList(Int_t istep){ | |
487 | // | |
488 | // Cuts for Event Selection | |
489 | // | |
faee3b18 | 490 | AliDebug(2, "Called\n"); |
0792aa82 | 491 | TObjArray *arr = new TObjArray; |
492 | if(istep == kEventStepGenerated){ | |
faee3b18 | 493 | AliCFEventGenCuts *evGenCuts = new AliCFEventGenCuts((Char_t *)"fCutsEvGen", (Char_t *)"Event Generated cuts"); |
3a72645a | 494 | //evGenCuts->SetNTracksCut(1); |
0792aa82 | 495 | evGenCuts->SetRequireVtxCuts(kTRUE); |
3a72645a | 496 | //evGenCuts->SetVertexXCut(-1, 1); |
497 | //evGenCuts->SetVertexYCut(-1, 1); | |
498 | evGenCuts->SetVertexZCut(-fVertexRangeZ, fVertexRangeZ); | |
69ac0e6f | 499 | if(IsQAOn()) evGenCuts->SetQAOn(fHistQA); |
0792aa82 | 500 | |
501 | arr->SetName("fEvGenCuts"); | |
502 | arr->AddLast(evGenCuts); | |
503 | } else { | |
c2690925 | 504 | |
63bdf450 | 505 | AliHFEextraEventCuts *evRecCuts = new AliHFEextraEventCuts((Char_t *)"fCutsEvRec", (Char_t *)"Event Reconstructed cuts"); |
506 | evRecCuts->SetRequireVtxCuts(kTRUE); | |
507 | if(fUseSPDVertex) evRecCuts->SetUseSPDVertex(); | |
508 | if(fUseMixedVertex) evRecCuts->SetUseMixedVertex(); | |
509 | if(fUseCorrelationVertex) evRecCuts->SetCheckCorrelationSPDVtx(); | |
d87a9d29 | 510 | if(fSPDVtxResolution) evRecCuts->SetCheckSPDResolution(); |
4437a0d2 | 511 | if(fPApileupCut) evRecCuts->SetpAPileupCut(); |
63bdf450 | 512 | evRecCuts->SetVertexZCut(-fVertexRangeZ, fVertexRangeZ); |
513 | //evRecCuts->SetVertexNContributors(1,(Int_t)1.e9); | |
514 | if(IsQAOn()) evRecCuts->SetQAOn(fHistQA); | |
515 | arr->SetName("fEvRecCuts"); | |
516 | arr->AddLast(evRecCuts); | |
517 | ||
518 | } | |
0792aa82 | 519 | fCutList->AddLast(arr); |
520 | } | |
521 | ||
809a4336 | 522 | //__________________________________________________________________ |
523 | void AliHFEcuts::SetParticleGenCutList(){ | |
524 | // | |
525 | // Initialize Particle Cuts for Monte Carlo Tracks | |
e156c3bb | 526 | // Production Vertex Radius: < 3cm |
809a4336 | 527 | // Particle Species: Electrons |
1c051dd4 | 528 | // Eta: < 0.8 (fEtaRange) |
809a4336 | 529 | // |
faee3b18 | 530 | |
531 | TObjArray *mcCuts = new TObjArray; | |
532 | mcCuts->SetName("fPartGenCuts"); | |
533 | ||
534 | // | |
535 | AliDebug(2, "Called\n"); | |
809a4336 | 536 | AliCFParticleGenCuts *genCuts = new AliCFParticleGenCuts("fCutsGenMC", "Particle Generation Cuts"); |
537 | genCuts->SetRequireIsCharged(); | |
faee3b18 | 538 | if(IsRequirePrimary()) { |
539 | genCuts->SetRequireIsPrimary(); | |
540 | } | |
809a4336 | 541 | if(IsRequireProdVertex()){ |
faee3b18 | 542 | 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])); |
120f0e47 | 543 | //if(!IsAOD()) { |
544 | genCuts->SetProdVtxRangeX(fProdVtx[0], fProdVtx[1]); | |
545 | genCuts->SetProdVtxRangeY(fProdVtx[2], fProdVtx[3]); | |
546 | genCuts->SetProdVtxRange2D(kTRUE); // Use ellipse | |
547 | //} | |
548 | //else { | |
76d0b522 | 549 | // (ONLY PROVISOIRE FOR MC AOD) |
550 | // genCuts->SetProdVtxRangeX(-TMath::Abs(fProdVtx[1]), TMath::Abs(fProdVtx[1])); | |
551 | // genCuts->SetProdVtxRangeY(-TMath::Abs(fProdVtx[3]), TMath::Abs(fProdVtx[3])); | |
120f0e47 | 552 | //} |
809a4336 | 553 | } |
722347d8 | 554 | genCuts->SetRequirePdgCode(11, kTRUE); |
e3fc062d | 555 | if(IsQAOn()) genCuts->SetQAOn(fHistQA); |
809a4336 | 556 | |
faee3b18 | 557 | // Add |
809a4336 | 558 | mcCuts->AddLast(genCuts); |
faee3b18 | 559 | |
560 | // | |
561 | if(IsRequireKineMCCuts()) { | |
562 | AliCFTrackKineCuts *kineMCcuts = new AliCFTrackKineCuts((Char_t *)"fCutsKineMC", (Char_t *)"MC Kine Cuts"); | |
563 | kineMCcuts->SetPtRange(fPtRange[0], fPtRange[1]); | |
1c051dd4 | 564 | //kineMCcuts->SetEtaRange(-0.8, 0.8); |
cddc311d | 565 | kineMCcuts->SetEtaRange(fEtaRange[0],fEtaRange[1]); |
e3fc062d | 566 | if(IsQAOn()) kineMCcuts->SetQAOn(fHistQA); |
faee3b18 | 567 | mcCuts->AddLast(kineMCcuts); |
568 | } | |
569 | ||
809a4336 | 570 | fCutList->AddLast(mcCuts); |
571 | } | |
572 | ||
573 | //__________________________________________________________________ | |
574 | void AliHFEcuts::SetAcceptanceCutList(){ | |
575 | // | |
576 | // Initialize Particle (Monte Carlo) acceptance cuts | |
577 | // Min. Required Hist for Detectors: | |
578 | // ITS [3] | |
579 | // TPC [2] | |
722347d8 | 580 | // TRD [2*nTracklets] |
809a4336 | 581 | // TOF [0] |
582 | // | |
faee3b18 | 583 | AliDebug(2, "Called\n"); |
809a4336 | 584 | AliCFAcceptanceCuts *accCuts = new AliCFAcceptanceCuts("fCutsAccMC", "MC Acceptance Cuts"); |
585 | accCuts->SetMinNHitITS(3); | |
586 | accCuts->SetMinNHitTPC(2); | |
722347d8 | 587 | accCuts->SetMinNHitTRD(2*fMinTrackletsTRD); |
e3fc062d | 588 | if(IsQAOn()) accCuts->SetQAOn(fHistQA); |
809a4336 | 589 | |
75d81601 | 590 | TObjArray *partAccCuts = new TObjArray(); |
591 | partAccCuts->SetName("fPartAccCuts"); | |
592 | partAccCuts->AddLast(accCuts); | |
593 | fCutList->AddLast(partAccCuts); | |
809a4336 | 594 | } |
595 | ||
596 | //__________________________________________________________________ | |
722347d8 | 597 | void AliHFEcuts::SetRecKineITSTPCCutList(){ |
809a4336 | 598 | // |
599 | // Track Kinematics and Quality cuts (Based on the Standard cuts from PWG0) | |
600 | // | |
722347d8 | 601 | // ITS refit |
809a4336 | 602 | // Variances: |
603 | // y: 2 | |
604 | // z: 2 | |
605 | // sin(phi): 0.5 | |
606 | // tan(theta): 0.5 | |
607 | // 1/pt: 2 | |
608 | // Min. Number of Clusters: | |
609 | // TPC: 50 | |
610 | // RefitRequired: | |
809a4336 | 611 | // TPC |
612 | // Chi2 per TPC cluster: 3.5 | |
613 | // | |
614 | // Kinematics: | |
615 | // Momentum Range: 100MeV - 20GeV | |
616 | // Eta: < 0.9 (TRD-TOF acceptance) | |
617 | // | |
11ff28c5 | 618 | const Long_t kStatusSelectionDefault(AliESDtrack::kTPCrefit | AliESDtrack::kITSrefit); |
faee3b18 | 619 | AliDebug(2, "Called\n"); |
620 | AliCFTrackQualityCuts *trackQuality = new AliCFTrackQualityCuts((Char_t *)"fCutsQualityRec", (Char_t *)"REC Track Quality Cuts"); | |
11ff28c5 | 621 | //trackQuality->SetMinNClusterITS(fMinClustersITS); |
809a4336 | 622 | trackQuality->SetMaxChi2PerClusterTPC(fMaxChi2clusterTPC); |
8c1c76e9 | 623 | if(fMaxChi2clusterITS >= 0.) trackQuality->SetMaxChi2PerClusterITS(fMaxChi2clusterITS); |
11ff28c5 | 624 | Long_t statusRequirement; |
625 | if(fAdditionalStatusRequirement) | |
626 | statusRequirement = kStatusSelectionDefault | fAdditionalStatusRequirement; | |
627 | else | |
628 | statusRequirement = kStatusSelectionDefault; | |
629 | trackQuality->SetStatus(statusRequirement); | |
3a72645a | 630 | //trackQuality->SetMaxCovDiagonalElements(2., 2., 0.5, 0.5, 2); |
809a4336 | 631 | |
e17c1f86 | 632 | AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupTPCRec","Extra cuts from the HFE group"); |
722347d8 | 633 | hfecuts->SetDebugLevel(fDebugLevel); |
11ff28c5 | 634 | hfecuts->SetMinNbITScls(fMinClustersITS); |
3a72645a | 635 | // Set the cut in the TPC number of clusters |
76d0b522 | 636 | hfecuts->SetMinNClustersTPC(fMinClustersTPC,AliHFEextraCuts::ETPCclusterDef_t(fTPCclusterDef)); |
e17c1f86 | 637 | hfecuts->SetMinNClustersTPCPID(fMinClustersTPCPID); |
76d0b522 | 638 | hfecuts->SetClusterRatioTPC(fMinClusterRatioTPC,AliHFEextraCuts::ETPCclrDef_t(fTPCratioDef)); |
9250ffbf | 639 | if(fFractionOfSharedTPCClusters > 0.0) hfecuts->SetFractionOfTPCSharedClusters(fFractionOfSharedTPCClusters); |
cedf0381 | 640 | if(fITSpatternCut) hfecuts->SetITSpatternCut(); |
96167a04 | 641 | if(fAODFilterBit > -1) hfecuts->SetAODFilterBit(fAODFilterBit); |
722347d8 | 642 | |
faee3b18 | 643 | AliCFTrackKineCuts *kineCuts = new AliCFTrackKineCuts((Char_t *)"fCutsKineRec", (Char_t *)"REC Kine Cuts"); |
809a4336 | 644 | kineCuts->SetPtRange(fPtRange[0], fPtRange[1]); |
1c051dd4 | 645 | //kineCuts->SetEtaRange(-0.8, 0.8); |
cddc311d | 646 | kineCuts->SetEtaRange(fEtaRange[0],fEtaRange[1]); |
809a4336 | 647 | |
e3fc062d | 648 | if(IsQAOn()){ |
809a4336 | 649 | trackQuality->SetQAOn(fHistQA); |
722347d8 | 650 | hfecuts->SetQAOn(fHistQA); |
809a4336 | 651 | kineCuts->SetQAOn(fHistQA); |
652 | } | |
653 | ||
654 | TObjArray *recCuts = new TObjArray; | |
722347d8 | 655 | recCuts->SetName("fPartRecKineITSTPCCuts"); |
809a4336 | 656 | recCuts->AddLast(trackQuality); |
722347d8 | 657 | recCuts->AddLast(hfecuts); |
809a4336 | 658 | recCuts->AddLast(kineCuts); |
659 | fCutList->AddLast(recCuts); | |
660 | } | |
661 | ||
662 | //__________________________________________________________________ | |
663 | void AliHFEcuts::SetRecPrimaryCutList(){ | |
664 | // | |
665 | // Primary cuts (based on standard cuts from PWG0): | |
666 | // DCA to Vertex: | |
667 | // XY: 3. cm | |
668 | // Z: 10. cm | |
669 | // No Kink daughters | |
670 | // | |
faee3b18 | 671 | AliDebug(2, "Called\n"); |
672 | AliCFTrackIsPrimaryCuts *primaryCut = new AliCFTrackIsPrimaryCuts((Char_t *)"fCutsPrimaryCuts", (Char_t *)"REC Primary Cuts"); | |
6400afdd | 673 | //if(IsRequireDCAToVertex()){ |
78ea5ef4 | 674 | //primaryCut->SetDCAToVertex2D(kTRUE); |
6400afdd | 675 | //primaryCut->SetMaxDCAToVertexXY(fDCAtoVtx[0]); |
676 | //primaryCut->SetMaxDCAToVertexZ(fDCAtoVtx[1]); | |
677 | //} | |
809a4336 | 678 | if(IsRequireSigmaToVertex()){ |
679 | primaryCut->SetRequireSigmaToVertex(kTRUE); | |
8c1c76e9 | 680 | if(fSigmaToVtx[0]) primaryCut->SetMaxNSigmaToVertex(fSigmaToVtx[0]); |
681 | if(fSigmaToVtx[1]) primaryCut->SetMaxSigmaDCAxy(fSigmaToVtx[1]); | |
682 | if(fSigmaToVtx[2]) primaryCut->SetMaxSigmaDCAz(fSigmaToVtx[2]); | |
809a4336 | 683 | } |
6400afdd | 684 | //primaryCut->SetAcceptKinkDaughters(kFALSE); |
e3fc062d | 685 | if(IsQAOn()) primaryCut->SetQAOn(fHistQA); |
809a4336 | 686 | |
9250ffbf | 687 | AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsPrimaryCutsextra","Extra cuts from the HFE group"); |
688 | hfecuts->SetMaxImpactParameterRpar(fMaxImpactParameterRpar); | |
11ff28c5 | 689 | hfecuts->SetRejectKinkDaughter(); |
76d0b522 | 690 | //hfecuts->SetRejectKinkMother(); |
6400afdd | 691 | if(IsRequireDCAToVertex()){ |
692 | hfecuts->SetMaxImpactParamR(fDCAtoVtx[0]); | |
693 | hfecuts->SetMaxImpactParamZ(fDCAtoVtx[1]); | |
694 | } | |
9250ffbf | 695 | |
809a4336 | 696 | TObjArray *primCuts = new TObjArray; |
697 | primCuts->SetName("fPartPrimCuts"); | |
6400afdd | 698 | // needed for AOD... |
5cd679b7 | 699 | if(IsRequireSigmaToVertex()) primCuts->AddLast(primaryCut); |
11ff28c5 | 700 | //if(fMaxImpactParameterRpar){ |
701 | primCuts->AddLast(hfecuts); | |
702 | //} | |
809a4336 | 703 | fCutList->AddLast(primCuts); |
704 | } | |
705 | ||
706 | //__________________________________________________________________ | |
dbe3abbe | 707 | void AliHFEcuts::SetHFElectronITSCuts(){ |
809a4336 | 708 | // |
dbe3abbe | 709 | // Special Cuts introduced by the HFElectron Group: ITS |
809a4336 | 710 | // |
faee3b18 | 711 | AliDebug(2, "Called\n"); |
dbe3abbe | 712 | AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupPixels","Extra cuts from the HFE group"); |
809a4336 | 713 | if(IsRequireITSpixel()){ |
714 | hfecuts->SetRequireITSpixel(AliHFEextraCuts::ITSPixel_t(fCutITSPixel)); | |
0792aa82 | 715 | hfecuts->SetCheckITSstatus(fCheckITSLayerStatus); |
809a4336 | 716 | } |
5cd679b7 | 717 | if(IsRequireITSdrift()){ |
718 | hfecuts->SetRequireITSdrift(AliHFEextraCuts::ITSDrift_t(fCutITSDrift)); | |
719 | } | |
dbe3abbe | 720 | |
e3fc062d | 721 | if(IsQAOn()) hfecuts->SetQAOn(fHistQA); |
78ea5ef4 | 722 | hfecuts->SetDebugLevel(fDebugLevel); |
723 | ||
dbe3abbe | 724 | TObjArray *hfeCuts = new TObjArray; |
725 | hfeCuts->SetName("fPartHFECutsITS"); | |
726 | hfeCuts->AddLast(hfecuts); | |
727 | fCutList->AddLast(hfeCuts); | |
728 | } | |
729 | ||
dbe3abbe | 730 | //__________________________________________________________________ |
9250ffbf | 731 | void AliHFEcuts::SetHFElectronTOFCuts(){ |
dbe3abbe | 732 | // |
733 | // Special Cuts introduced by the HFElectron Group: TRD | |
734 | // | |
faee3b18 | 735 | AliDebug(2, "Called\n"); |
9250ffbf | 736 | AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupTOF","Extra cuts from the HFE group on TOF PID"); |
e3ae862b | 737 | if(fTOFPIDStep) hfecuts->SetTOFPID(kTRUE); |
c2690925 | 738 | if(fTOFMISMATCHStep) hfecuts->SetTOFMISMATCH(kTRUE); |
1c051dd4 | 739 | if((fTOFsignaldx > 0.0) && (fTOFsignaldz > 0.0)) hfecuts->SetTOFsignalDxz(fTOFsignaldx,fTOFsignaldz); |
e3fc062d | 740 | if(IsQAOn()) hfecuts->SetQAOn(fHistQA); |
78ea5ef4 | 741 | hfecuts->SetDebugLevel(fDebugLevel); |
dbe3abbe | 742 | |
9250ffbf | 743 | TObjArray *hfeCuts = new TObjArray; |
744 | hfeCuts->SetName("fPartHFECutsTOF"); | |
745 | hfeCuts->AddLast(hfecuts); | |
746 | fCutList->AddLast(hfeCuts); | |
747 | } | |
748 | ||
8c1c76e9 | 749 | //__________________________________________________________________ |
750 | void AliHFEcuts::SetHFElectronTPCCuts(){ | |
751 | // | |
752 | // Special Cuts introduced by the HFElectron Group: TPC | |
753 | // | |
754 | AliDebug(2, "Called\n"); | |
e17c1f86 | 755 | AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupTPCPID","Extra cuts from the HFE group on TPC PID"); |
8c1c76e9 | 756 | if(fTPCPIDCLEANUPStep) hfecuts->SetTPCPIDCleanUp(kTRUE); |
757 | if(IsQAOn()) hfecuts->SetQAOn(fHistQA); | |
758 | hfecuts->SetDebugLevel(fDebugLevel); | |
759 | ||
760 | TObjArray *hfeCuts = new TObjArray; | |
761 | hfeCuts->SetName("fPartHFECutsTPC"); | |
762 | hfeCuts->AddLast(hfecuts); | |
763 | fCutList->AddLast(hfeCuts); | |
764 | } | |
765 | ||
766 | ||
9250ffbf | 767 | //__________________________________________________________________ |
768 | void AliHFEcuts::SetHFElectronTRDCuts(){ | |
769 | // | |
770 | // Special Cuts introduced by the HFElectron Group: TRD | |
771 | // | |
772 | AliDebug(2, "Called\n"); | |
773 | AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupTRD","Extra cuts from the HFE group on TRD PID"); | |
e17c1f86 | 774 | if(fMinTrackletsTRD > 0.) hfecuts->SetMinTrackletsTRD(fMinTrackletsTRD, fTRDtrackletsExact); |
cedf0381 | 775 | if(fMaxChi2TRD >= 0) |
776 | hfecuts->SetMaxChi2TRD(fMaxChi2TRD); | |
777 | ||
9250ffbf | 778 | if(IsQAOn()) hfecuts->SetQAOn(fHistQA); |
779 | hfecuts->SetDebugLevel(fDebugLevel); | |
780 | ||
dbe3abbe | 781 | TObjArray *hfeCuts = new TObjArray; |
782 | hfeCuts->SetName("fPartHFECutsTRD"); | |
809a4336 | 783 | hfeCuts->AddLast(hfecuts); |
784 | fCutList->AddLast(hfeCuts); | |
785 | } | |
786 | ||
809a4336 | 787 | //__________________________________________________________________ |
3a72645a | 788 | void AliHFEcuts::SetHFElectronDcaCuts(){ |
789 | // | |
790 | // Special Cuts introduced by the HFElectron Group: minimum of impact parameter | |
791 | // | |
792 | AliDebug(2, "Called\n"); | |
793 | AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupDCA","Extra cuts from the HFE group"); | |
63bdf450 | 794 | hfecuts->SetMinHFEImpactParamR(fIPCutParams,fIsIPSigmacut,fIsIPcharge,fIsIPOpp); |
3a72645a | 795 | if(IsQAOn()) hfecuts->SetQAOn(fHistQA); |
796 | hfecuts->SetDebugLevel(fDebugLevel); | |
797 | ||
798 | TObjArray *hfeCuts = new TObjArray; | |
799 | hfeCuts->SetName("fPartHFECutsDca"); | |
800 | hfeCuts->AddLast(hfecuts); | |
801 | fCutList->AddLast(hfeCuts); | |
802 | } | |
803 | ||
804 | //__________________________________________________________________ | |
805 | Bool_t AliHFEcuts::CheckParticleCuts(UInt_t step, TObject *o){ | |
809a4336 | 806 | // |
807 | // Checks the cuts without using the correction framework manager | |
808 | // | |
faee3b18 | 809 | AliDebug(2, "Called\n"); |
8c1c76e9 | 810 | TString stepnames[kNcutStepsMCTrack + kNcutStepsRecTrack + kNcutStepsDETrack + kNcutStepsSecvtxTrack + 1] = {"fPartGenCuts","fPartEvCutPileupZ","fPartEvCut","fPartAccCuts","fPartRecNoCuts","fPartRecKineITSTPCCuts", "fPartPrimCuts", "fPartHFECutsITS","fPartHFECutsTOF","fPartHFECutsTPC","fPartHFECutsTRD","fPartHFECutsDca", "fPartHFECutsSecvtx"}; |
3a72645a | 811 | AliDebug(2, Form("Doing cut %s", stepnames[step].Data())); |
e3fc062d | 812 | TObjArray *cuts = dynamic_cast<TObjArray *>(fCutList->FindObject(stepnames[step].Data())); |
809a4336 | 813 | if(!cuts) return kTRUE; |
3a72645a | 814 | TIter it(cuts); |
809a4336 | 815 | AliCFCutBase *mycut; |
816 | Bool_t status = kTRUE; | |
3a72645a | 817 | while((mycut = dynamic_cast<AliCFCutBase *>(it()))){ |
809a4336 | 818 | status &= mycut->IsSelected(o); |
819 | } | |
809a4336 | 820 | return status; |
821 | } | |
e156c3bb | 822 | |
823 | ||
824 | //__________________________________________________________________ | |
825 | Bool_t AliHFEcuts::CheckEventCuts(const char*namestep, TObject *o){ | |
826 | // | |
827 | // Checks the cuts without using the correction framework manager | |
828 | // | |
829 | AliDebug(2, "Called\n"); | |
830 | TObjArray *cuts = dynamic_cast<TObjArray *>(fCutList->FindObject(namestep)); | |
831 | if(!cuts) return kTRUE; | |
832 | TIter it(cuts); | |
833 | AliCFCutBase *mycut; | |
834 | Bool_t status = kTRUE; | |
835 | while((mycut = dynamic_cast<AliCFCutBase *>(it()))){ | |
836 | status &= mycut->IsSelected(o); | |
837 | } | |
838 | return status; | |
839 | } | |
e17c1f86 | 840 | |
841 | //__________________________________________________________________ | |
842 | void AliHFEcuts::SetRecEvent(const AliVEvent *ev){ | |
843 | // | |
844 | // Publish reconstructed event to the cuts | |
845 | // | |
846 | TIter cutsteps(fCutList); | |
847 | TObjArray *cutstep; | |
848 | AliCFCutBase *cut; | |
849 | while((cutstep = dynamic_cast<TObjArray *>(cutsteps()))){ | |
850 | TIter cutIter(cutstep); | |
851 | while((cut = dynamic_cast<AliCFCutBase *>(cutIter()))){ | |
852 | cut->SetRecEventInfo(ev); | |
853 | } | |
854 | } | |
855 | } | |
856 | ||
857 | //__________________________________________________________________ | |
76d0b522 | 858 | void AliHFEcuts::SetMCEvent(const AliVEvent *ev){ |
e17c1f86 | 859 | // |
860 | // Publish reconstructed event to the cuts | |
861 | // | |
862 | TIter cutsteps(fCutList); | |
863 | TObjArray *cutstep; | |
864 | AliCFCutBase *cut; | |
865 | while((cutstep = dynamic_cast<TObjArray *>(cutsteps()))){ | |
866 | TIter cutIter(cutstep); | |
867 | while((cut = dynamic_cast<AliCFCutBase *>(cutIter()))){ | |
868 | cut->SetMCEventInfo(ev); | |
869 | } | |
870 | } | |
871 | } |