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