]>
Commit | Line | Data |
---|---|---|
3b77b2d1 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
92efd725 | 3 | * * |
4 | * Authors: Svein Lindal, Daniel Lohner * | |
5 | * Version 1.0 * | |
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. * | |
3b77b2d1 | 14 | **************************************************************************/ |
15 | ||
16 | //////////////////////////////////////////////// | |
e5b6e8a6 | 17 | //--------------------------------------------- |
3b77b2d1 | 18 | // Class handling all kinds of selection cuts for |
19 | // Gamma Conversion analysis | |
20 | //--------------------------------------------- | |
21 | //////////////////////////////////////////////// | |
22 | ||
23 | #include "AliConversionCuts.h" | |
24 | ||
25 | #include "AliKFVertex.h" | |
26 | #include "AliAODTrack.h" | |
27 | #include "AliESDtrack.h" | |
28 | #include "AliAnalysisManager.h" | |
29 | #include "AliInputEventHandler.h" | |
92efd725 | 30 | #include "AliMCEventHandler.h" |
3b77b2d1 | 31 | #include "AliAODHandler.h" |
32 | #include "AliPIDResponse.h" | |
33 | #include "TH1.h" | |
34 | #include "TH2.h" | |
35 | #include "AliStack.h" | |
36 | #include "AliAODConversionMother.h" | |
37 | #include "TObjString.h" | |
38 | #include "AliAODEvent.h" | |
39 | #include "AliESDEvent.h" | |
40 | #include "AliCentrality.h" | |
41 | #include "TList.h" | |
92efd725 | 42 | #include "AliLog.h" |
ca91a3e1 | 43 | #include "AliGenCocktailEventHeader.h" |
a280ac15 | 44 | #include "AliGenDPMjetEventHeader.h" |
45 | #include "AliGenPythiaEventHeader.h" | |
46 | #include "AliGenHijingEventHeader.h" | |
e5b6e8a6 | 47 | #include "AliTriggerAnalysis.h" |
48 | #include "AliV0ReaderV1.h" | |
92efd725 | 49 | |
3b77b2d1 | 50 | class iostream; |
51 | ||
52 | using namespace std; | |
53 | ||
54 | ClassImp(AliConversionCuts) | |
55 | ||
56 | ||
57 | const char* AliConversionCuts::fgkCutNames[AliConversionCuts::kNCuts] = { | |
4a0aab28 | 58 | "HeavyIon", |
59 | "CentralityMin", | |
60 | "CentralityMax", | |
61 | "SelectV0AND", | |
62 | "MultiplicityMethod", | |
63 | "RemovePileUp", | |
64 | "RejectExtraSignals", | |
65 | "V0FinderType", | |
66 | "EtaCut", | |
67 | "MinRCut", | |
68 | "SinglePtCut", | |
69 | "ClsTPCCut", | |
70 | "ededxSigmaCut", | |
71 | "pidedxSigmaCut", | |
72 | "piMomdedxSigmaCut", | |
73 | "piMaxMomdedxSigmaCut", | |
74 | "LowPRejectionSigmaCut", | |
75 | "TOFelectronPID", | |
76 | "QtMaxCut", | |
77 | "Chi2GammaCut", | |
78 | "PsiPair", | |
79 | "DoPhotonAsymmetryCut", | |
80 | "CosinePointingAngle", | |
81 | "SharedElectronCuts", | |
e5b6e8a6 | 82 | "RejectToCloseV0s" |
3b77b2d1 | 83 | }; |
84 | ||
85 | ||
86 | //________________________________________________________________________ | |
4a0aab28 | 87 | AliConversionCuts::AliConversionCuts(const char *name,const char *title) : |
88 | AliAnalysisCuts(name,title), | |
89 | fHistograms(NULL), | |
e5b6e8a6 | 90 | fHeaderList(NULL), |
4a0aab28 | 91 | fPIDResponse(NULL), |
92 | fEventQuality(-1), | |
93 | fMaxR(200), | |
94 | fMinR(0), | |
95 | fEtaCut(0.9), | |
96 | fEtaCutMin(-0.1), | |
97 | fPtCut(0.02), | |
98 | fSinglePtCut(0), | |
99 | fMaxZ(1000), | |
100 | fMinClsTPC(0.), | |
101 | fMinClsTPCToF(0.), | |
102 | fLineCutZRSlope(0.), | |
103 | fLineCutZValue(0), | |
104 | fLineCutZRSlopeMin(0.), | |
105 | fLineCutZValueMin(0), | |
106 | fChi2CutConversion(1000), | |
107 | fPIDProbabilityCutNegativeParticle(0), | |
108 | fPIDProbabilityCutPositiveParticle(0), | |
109 | fDodEdxSigmaCut(kTRUE), | |
e5b6e8a6 | 110 | fDoTOFsigmaCut(kFALSE), |
4a0aab28 | 111 | fPIDTRDEfficiency(1), |
112 | fDoTRDPID(kFALSE), | |
113 | fPIDnSigmaAboveElectronLine(100), | |
114 | fPIDnSigmaBelowElectronLine(-100), | |
e5b6e8a6 | 115 | fTofPIDnSigmaAboveElectronLine(100), |
116 | fTofPIDnSigmaBelowElectronLine(-100), | |
4a0aab28 | 117 | fPIDnSigmaAbovePionLine(0), |
118 | fPIDnSigmaAbovePionLineHighPt(-100), | |
119 | fPIDMinPnSigmaAbovePionLine(0), | |
120 | fPIDMaxPnSigmaAbovePionLine(0), | |
121 | fDoKaonRejectionLowP(kFALSE), | |
122 | fDoProtonRejectionLowP(kFALSE), | |
123 | fDoPionRejectionLowP(kFALSE), | |
124 | fPIDnSigmaAtLowPAroundKaonLine(0), | |
125 | fPIDnSigmaAtLowPAroundProtonLine(0), | |
126 | fPIDnSigmaAtLowPAroundPionLine(0), | |
e5b6e8a6 | 127 | fPIDMinPKaonRejectionLowP(1.5), |
128 | fPIDMinPProtonRejectionLowP(2), | |
4a0aab28 | 129 | fPIDMinPPionRejectionLowP(0), |
130 | fDoQtGammaSelection(kTRUE), | |
e5b6e8a6 | 131 | fDoHighPtQtGammaSelection(kFALSE), |
4a0aab28 | 132 | fQtMax(100), |
e5b6e8a6 | 133 | fHighPtQtMax(0.), |
134 | fPtBorderForQt(0), | |
4a0aab28 | 135 | fXVertexCut(0.), |
136 | fYVertexCut(0.), | |
137 | fZVertexCut(0.), | |
138 | fNSigmaMass(0.), | |
139 | fUseEtaMinCut(kFALSE), | |
140 | fUseOnFlyV0Finder(kTRUE), | |
141 | fDoPhotonAsymmetryCut(kTRUE), | |
142 | fMinPPhotonAsymmetryCut(100.), | |
143 | fMinPhotonAsymmetry(0.), | |
0a2b2b4b | 144 | fIsHeavyIon(0), |
4a0aab28 | 145 | fDetectorCentrality(0), |
146 | fModCentralityClass(0), | |
147 | fMaxVertexZ(10), | |
148 | fCentralityMin(0), | |
149 | fCentralityMax(0), | |
150 | fUseCorrectedTPCClsInfo(kFALSE), | |
151 | fUseTOFpid(kFALSE), | |
152 | fMultiplicityMethod(0), | |
e5b6e8a6 | 153 | fSpecialTrigger(0), |
4a0aab28 | 154 | fRemovePileUp(kFALSE), |
155 | fOpeningAngle(0.005), | |
156 | fPsiPairCut(10000), | |
157 | fCosPAngleCut(10000), | |
158 | fDoToCloseV0sCut(kFALSE), | |
159 | fRejectExtraSignals(0), | |
160 | fminV0Dist(200.), | |
161 | fDoSharedElecCut(kFALSE), | |
162 | fOfflineTriggerMask(0), | |
e5b6e8a6 | 163 | fHasV0AND(kTRUE), |
164 | fIsSDDFired(kTRUE), | |
4a0aab28 | 165 | fRandom(0), |
e5b6e8a6 | 166 | fElectronArraySize(500), |
4a0aab28 | 167 | fElectronLabelArray(NULL), |
e5b6e8a6 | 168 | fConversionPointXArray(0.0), |
169 | fConversionPointYArray(0.0), | |
170 | fConversionPointZArray(0.0), | |
171 | fnHeaders(0), | |
4a0aab28 | 172 | fNotRejectedStart(NULL), |
173 | fNotRejectedEnd(NULL), | |
174 | fGeneratorNames(NULL), | |
175 | fCutString(NULL), | |
0a2b2b4b | 176 | fUtils(NULL), |
4a0aab28 | 177 | hdEdxCuts(NULL), |
178 | hTPCdEdxbefore(NULL), | |
179 | hTPCdEdxafter(NULL), | |
e5b6e8a6 | 180 | hTPCdEdxSigbefore(NULL), |
181 | hTPCdEdxSigafter(NULL), | |
4a0aab28 | 182 | hTOFbefore(NULL), |
e5b6e8a6 | 183 | hTOFSigbefore(NULL), |
184 | hTOFSigafter(NULL), | |
4a0aab28 | 185 | hTrackCuts(NULL), |
186 | hPhotonCuts(NULL), | |
187 | hInvMassbefore(NULL), | |
188 | hArmenterosbefore(NULL), | |
189 | hInvMassafter(NULL), | |
190 | hArmenterosafter(NULL), | |
191 | hAcceptanceCuts(NULL), | |
192 | hCutIndex(NULL), | |
193 | hV0EventCuts(NULL), | |
194 | hCentrality(NULL), | |
195 | hVertexZ(NULL), | |
a280ac15 | 196 | hTriggerClass(NULL), |
197 | hTriggerClassSelected(NULL) | |
3b77b2d1 | 198 | { |
4a0aab28 | 199 | InitPIDResponse(); |
200 | for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=0;} | |
201 | fCutString=new TObjString((GetCutNumber()).Data()); | |
3b77b2d1 | 202 | |
e5b6e8a6 | 203 | fElectronLabelArray = new Int_t[fElectronArraySize]; |
0a2b2b4b | 204 | fUtils = new AliAnalysisUtils(); |
205 | //if you do not want to apply the cut on the distance between the SPD and TRK vertex: | |
206 | //fUtils->SetCutOnZVertexSPD(kFALSE); | |
ca91a3e1 | 207 | |
0a2b2b4b | 208 | |
3b77b2d1 | 209 | } |
210 | ||
1d9e6011 | 211 | //________________________________________________________________________ |
212 | AliConversionCuts::AliConversionCuts(const AliConversionCuts &ref) : | |
213 | AliAnalysisCuts(ref), | |
214 | fHistograms(NULL), | |
215 | fHeaderList(ref.fHeaderList), | |
216 | fPIDResponse(NULL), | |
217 | fEventQuality(ref.fEventQuality), | |
218 | fMaxR(ref.fMaxR), | |
219 | fMinR(ref.fMinR), | |
220 | fEtaCut(ref.fEtaCut), | |
221 | fEtaCutMin(ref.fEtaCutMin), | |
222 | fPtCut(ref.fPtCut), | |
223 | fSinglePtCut(ref.fSinglePtCut), | |
224 | fMaxZ(ref.fMaxZ), | |
225 | fMinClsTPC(ref.fMinClsTPC), | |
226 | fMinClsTPCToF(ref.fMinClsTPCToF), | |
227 | fLineCutZRSlope(ref.fLineCutZRSlope), | |
228 | fLineCutZValue(ref.fLineCutZValue), | |
229 | fLineCutZRSlopeMin(ref.fLineCutZRSlopeMin), | |
230 | fLineCutZValueMin(ref.fLineCutZValueMin), | |
231 | fChi2CutConversion(ref.fChi2CutConversion), | |
232 | fPIDProbabilityCutNegativeParticle(ref.fPIDProbabilityCutNegativeParticle), | |
233 | fPIDProbabilityCutPositiveParticle(ref.fPIDProbabilityCutPositiveParticle), | |
234 | fDodEdxSigmaCut(ref. fDodEdxSigmaCut), | |
235 | fDoTOFsigmaCut(ref.fDoTOFsigmaCut), | |
236 | fPIDTRDEfficiency(ref.fPIDTRDEfficiency), | |
237 | fDoTRDPID(ref.fDoTRDPID), | |
238 | fPIDnSigmaAboveElectronLine(ref.fPIDnSigmaAboveElectronLine), | |
239 | fPIDnSigmaBelowElectronLine(ref.fPIDnSigmaBelowElectronLine), | |
240 | fTofPIDnSigmaAboveElectronLine(ref.fTofPIDnSigmaAboveElectronLine), | |
241 | fTofPIDnSigmaBelowElectronLine(ref.fTofPIDnSigmaBelowElectronLine), | |
242 | fPIDnSigmaAbovePionLine(ref.fPIDnSigmaAbovePionLine), | |
243 | fPIDnSigmaAbovePionLineHighPt(ref.fPIDnSigmaAbovePionLineHighPt), | |
244 | fPIDMinPnSigmaAbovePionLine(ref.fPIDMinPnSigmaAbovePionLine), | |
245 | fPIDMaxPnSigmaAbovePionLine(ref.fPIDMaxPnSigmaAbovePionLine), | |
246 | fDoKaonRejectionLowP(ref.fDoKaonRejectionLowP), | |
247 | fDoProtonRejectionLowP(ref.fDoProtonRejectionLowP), | |
248 | fDoPionRejectionLowP(ref.fDoPionRejectionLowP), | |
249 | fPIDnSigmaAtLowPAroundKaonLine(ref.fPIDnSigmaAtLowPAroundKaonLine), | |
250 | fPIDnSigmaAtLowPAroundProtonLine(ref.fPIDnSigmaAtLowPAroundProtonLine), | |
251 | fPIDnSigmaAtLowPAroundPionLine(ref.fPIDnSigmaAtLowPAroundPionLine), | |
252 | fPIDMinPKaonRejectionLowP(ref.fPIDMinPKaonRejectionLowP), | |
253 | fPIDMinPProtonRejectionLowP(ref.fPIDMinPProtonRejectionLowP), | |
254 | fPIDMinPPionRejectionLowP(ref.fPIDMinPPionRejectionLowP), | |
255 | fDoQtGammaSelection(ref.fDoQtGammaSelection), | |
256 | fDoHighPtQtGammaSelection(ref.fDoHighPtQtGammaSelection), | |
257 | fQtMax(ref.fQtMax), | |
258 | fHighPtQtMax(ref.fHighPtQtMax), | |
259 | fPtBorderForQt(ref.fPtBorderForQt), | |
260 | fXVertexCut(ref.fXVertexCut), | |
261 | fYVertexCut(ref.fYVertexCut), | |
262 | fZVertexCut(ref.fZVertexCut), | |
263 | fNSigmaMass(ref.fNSigmaMass), | |
264 | fUseEtaMinCut(ref.fUseEtaMinCut), | |
265 | fUseOnFlyV0Finder(ref.fUseOnFlyV0Finder), | |
0a2b2b4b | 266 | fDoPhotonAsymmetryCut(ref.fDoPhotonAsymmetryCut), |
1d9e6011 | 267 | fMinPPhotonAsymmetryCut(ref.fMinPPhotonAsymmetryCut), |
268 | fMinPhotonAsymmetry(ref.fMinPhotonAsymmetry), | |
269 | fIsHeavyIon(ref.fIsHeavyIon), | |
270 | fDetectorCentrality(ref.fDetectorCentrality), | |
271 | fModCentralityClass(ref.fModCentralityClass), | |
272 | fMaxVertexZ(ref.fMaxVertexZ), | |
273 | fCentralityMin(ref.fCentralityMin), | |
274 | fCentralityMax(ref.fCentralityMax), | |
275 | fUseCorrectedTPCClsInfo(ref.fUseCorrectedTPCClsInfo), | |
276 | fUseTOFpid(ref.fUseTOFpid), | |
277 | fMultiplicityMethod(ref.fMultiplicityMethod), | |
278 | fSpecialTrigger(ref.fSpecialTrigger), | |
279 | fRemovePileUp(ref.fRemovePileUp), | |
280 | fOpeningAngle(ref.fOpeningAngle), | |
281 | fPsiPairCut(ref.fPsiPairCut), | |
282 | fCosPAngleCut(ref.fCosPAngleCut), | |
283 | fDoToCloseV0sCut(ref.fDoToCloseV0sCut), | |
284 | fRejectExtraSignals(ref.fRejectExtraSignals), | |
285 | fminV0Dist(ref.fminV0Dist), | |
286 | fDoSharedElecCut(ref.fDoSharedElecCut), | |
287 | fOfflineTriggerMask(ref.fOfflineTriggerMask), | |
288 | fHasV0AND(ref.fHasV0AND), | |
289 | fIsSDDFired(ref.fIsSDDFired), | |
290 | fRandom(ref.fRandom), | |
291 | fElectronArraySize(ref.fElectronArraySize), | |
292 | fElectronLabelArray(NULL), | |
293 | fConversionPointXArray(ref.fConversionPointXArray), | |
294 | fConversionPointYArray(ref.fConversionPointYArray), | |
295 | fConversionPointZArray(ref.fConversionPointZArray), | |
296 | fnHeaders(ref.fnHeaders), | |
297 | fNotRejectedStart(NULL), | |
298 | fNotRejectedEnd(NULL), | |
299 | fGeneratorNames(ref.fGeneratorNames), | |
300 | fCutString(NULL), | |
0a2b2b4b | 301 | fUtils(NULL), |
1d9e6011 | 302 | hdEdxCuts(NULL), |
303 | hTPCdEdxbefore(NULL), | |
304 | hTPCdEdxafter(NULL), | |
305 | hTPCdEdxSigbefore(NULL), | |
306 | hTPCdEdxSigafter(NULL), | |
307 | hTOFbefore(NULL), | |
308 | hTOFSigbefore(NULL), | |
309 | hTOFSigafter(NULL), | |
310 | hTrackCuts(NULL), | |
311 | hPhotonCuts(NULL), | |
312 | hInvMassbefore(NULL), | |
313 | hArmenterosbefore(NULL), | |
314 | hInvMassafter(NULL), | |
315 | hArmenterosafter(NULL), | |
316 | hAcceptanceCuts(NULL), | |
317 | hCutIndex(NULL), | |
318 | hV0EventCuts(NULL), | |
319 | hCentrality(NULL), | |
320 | hVertexZ(NULL), | |
a280ac15 | 321 | hTriggerClass(NULL), |
322 | hTriggerClassSelected(NULL) | |
1d9e6011 | 323 | { |
324 | // Copy Constructor | |
a280ac15 | 325 | for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=ref.fCuts[jj];} |
326 | fCutString=new TObjString((GetCutNumber()).Data()); | |
327 | fElectronLabelArray = new Int_t[fElectronArraySize]; | |
0a2b2b4b | 328 | fUtils = new AliAnalysisUtils(); |
a280ac15 | 329 | // dont copy histograms (if you like histograms, call InitCutHistograms()) |
1d9e6011 | 330 | } |
331 | ||
a280ac15 | 332 | |
3b77b2d1 | 333 | //________________________________________________________________________ |
334 | AliConversionCuts::~AliConversionCuts() { | |
4a0aab28 | 335 | // Destructor |
336 | //Deleting fHistograms leads to seg fault it it's added to output collection of a task | |
337 | // if(fHistograms) | |
338 | // delete fHistograms; | |
339 | // fHistograms = NULL; | |
92efd725 | 340 | if(fCutString != NULL){ |
341 | delete fCutString; | |
342 | fCutString = NULL; | |
343 | } | |
92efd725 | 344 | if(fElectronLabelArray){ |
345 | delete fElectronLabelArray; | |
346 | fElectronLabelArray = NULL; | |
347 | } | |
ca91a3e1 | 348 | if(fNotRejectedStart){ |
349 | delete[] fNotRejectedStart; | |
350 | fNotRejectedStart = NULL; | |
351 | } | |
352 | if(fNotRejectedEnd){ | |
353 | delete[] fNotRejectedEnd; | |
354 | fNotRejectedEnd = NULL; | |
355 | } | |
356 | if(fGeneratorNames){ | |
357 | delete[] fGeneratorNames; | |
358 | fGeneratorNames = NULL; | |
359 | } | |
0a2b2b4b | 360 | if(fUtils){ |
361 | delete fUtils; | |
362 | fUtils = NULL; | |
363 | } | |
364 | ||
3b77b2d1 | 365 | } |
366 | ||
367 | //________________________________________________________________________ | |
92efd725 | 368 | void AliConversionCuts::InitCutHistograms(TString name, Bool_t preCut){ |
3b77b2d1 | 369 | |
4a0aab28 | 370 | // Initialize Cut Histograms for QA (only initialized and filled if function is called) |
371 | ||
372 | if(fHistograms != NULL){ | |
373 | delete fHistograms; | |
374 | fHistograms=NULL; | |
375 | } | |
376 | if(fHistograms==NULL){ | |
377 | fHistograms=new TList(); | |
378 | if(name=="")fHistograms->SetName(Form("ConvCuts_%s",GetCutNumber().Data())); | |
379 | else fHistograms->SetName(Form("%s_%s",name.Data(),GetCutNumber().Data())); | |
380 | } | |
381 | ||
382 | // IsPhotonSelected | |
383 | hCutIndex=new TH1F(Form("IsPhotonSelected %s",GetCutNumber().Data()),"IsPhotonSelected",10,-0.5,9.5); | |
384 | hCutIndex->GetXaxis()->SetBinLabel(kPhotonIn+1,"in"); | |
385 | hCutIndex->GetXaxis()->SetBinLabel(kOnFly+1,"onfly"); | |
386 | hCutIndex->GetXaxis()->SetBinLabel(kNoTracks+1,"no tracks"); | |
387 | hCutIndex->GetXaxis()->SetBinLabel(kdEdxCuts+1,"dEdx"); | |
388 | hCutIndex->GetXaxis()->SetBinLabel(kTrackCuts+1,"Track cuts"); | |
389 | hCutIndex->GetXaxis()->SetBinLabel(kConvPointFail+1,"ConvPoint fail"); | |
390 | hCutIndex->GetXaxis()->SetBinLabel(kPhotonCuts+1,"PhotonCuts"); | |
391 | hCutIndex->GetXaxis()->SetBinLabel(kPhotonOut+1,"out"); | |
392 | fHistograms->Add(hCutIndex); | |
393 | ||
394 | // Track Cuts | |
e5b6e8a6 | 395 | hTrackCuts=new TH1F(Form("TrackCuts %s",GetCutNumber().Data()),"TrackCuts",9,-0.5,8.5); |
4a0aab28 | 396 | hTrackCuts->GetXaxis()->SetBinLabel(1,"in"); |
397 | hTrackCuts->GetXaxis()->SetBinLabel(2,"likesign"); | |
398 | hTrackCuts->GetXaxis()->SetBinLabel(3,"ntpccl"); | |
399 | hTrackCuts->GetXaxis()->SetBinLabel(4,"acceptance"); | |
400 | hTrackCuts->GetXaxis()->SetBinLabel(5,"singlept"); | |
401 | hTrackCuts->GetXaxis()->SetBinLabel(6,"TPCrefit"); | |
402 | hTrackCuts->GetXaxis()->SetBinLabel(7,"kink"); | |
403 | hTrackCuts->GetXaxis()->SetBinLabel(8,"out"); | |
404 | fHistograms->Add(hTrackCuts); | |
405 | ||
406 | // Photon Cuts | |
407 | hPhotonCuts=new TH1F(Form("PhotonCuts %s",GetCutNumber().Data()),"PhotonCuts",12,-0.5,11.5); | |
408 | hPhotonCuts->GetXaxis()->SetBinLabel(1,"in"); | |
409 | hPhotonCuts->GetXaxis()->SetBinLabel(2,"qtcut"); | |
410 | hPhotonCuts->GetXaxis()->SetBinLabel(3,"chi2"); | |
411 | hPhotonCuts->GetXaxis()->SetBinLabel(4,"acceptance"); | |
412 | hPhotonCuts->GetXaxis()->SetBinLabel(5,"asymmetry"); | |
413 | hPhotonCuts->GetXaxis()->SetBinLabel(6,"pidprob"); | |
414 | hPhotonCuts->GetXaxis()->SetBinLabel(7,"cortpcclinfo"); | |
415 | hPhotonCuts->GetXaxis()->SetBinLabel(8,"PsiPair"); | |
416 | hPhotonCuts->GetXaxis()->SetBinLabel(9,"CosPAngle"); | |
417 | hPhotonCuts->GetXaxis()->SetBinLabel(10,"out"); | |
418 | fHistograms->Add(hPhotonCuts); | |
419 | ||
420 | if(preCut){ | |
e5b6e8a6 | 421 | hInvMassbefore=new TH1F(Form("InvMass_before %s",GetCutNumber().Data()),"InvMass_before",1000,0,0.3); |
4a0aab28 | 422 | fHistograms->Add(hInvMassbefore); |
e5b6e8a6 | 423 | hArmenterosbefore=new TH2F(Form("Armenteros_before %s",GetCutNumber().Data()),"Armenteros_before",200,-1,1,1000,0,1.); |
4a0aab28 | 424 | fHistograms->Add(hArmenterosbefore); |
425 | } | |
e5b6e8a6 | 426 | hInvMassafter=new TH1F(Form("InvMass_after %s",GetCutNumber().Data()),"InvMass_after",1000,0,0.3); |
4a0aab28 | 427 | fHistograms->Add(hInvMassafter); |
428 | hArmenterosafter=new TH2F(Form("Armenteros_after %s",GetCutNumber().Data()),"Armenteros_after",200,-1,1,250,0,0.25); | |
429 | fHistograms->Add(hArmenterosafter); | |
430 | ||
431 | hAcceptanceCuts=new TH1F(Form("PhotonAcceptanceCuts %s",GetCutNumber().Data()),"PhotonAcceptanceCuts",10,-0.5,9.5); | |
432 | hAcceptanceCuts->GetXaxis()->SetBinLabel(1,"in"); | |
433 | hAcceptanceCuts->GetXaxis()->SetBinLabel(2,"maxR"); | |
434 | hAcceptanceCuts->GetXaxis()->SetBinLabel(3,"minR"); | |
435 | hAcceptanceCuts->GetXaxis()->SetBinLabel(4,"line"); | |
436 | hAcceptanceCuts->GetXaxis()->SetBinLabel(5,"maxZ"); | |
437 | hAcceptanceCuts->GetXaxis()->SetBinLabel(6,"eta"); | |
438 | hAcceptanceCuts->GetXaxis()->SetBinLabel(7,"minpt"); | |
439 | hAcceptanceCuts->GetXaxis()->SetBinLabel(8,"out"); | |
440 | fHistograms->Add(hAcceptanceCuts); | |
441 | ||
442 | // dEdx Cuts | |
443 | hdEdxCuts=new TH1F(Form("dEdxCuts %s",GetCutNumber().Data()),"dEdxCuts",10,-0.5,9.5); | |
444 | hdEdxCuts->GetXaxis()->SetBinLabel(1,"in"); | |
445 | hdEdxCuts->GetXaxis()->SetBinLabel(2,"TPCelectron"); | |
446 | hdEdxCuts->GetXaxis()->SetBinLabel(3,"TPCpion"); | |
447 | hdEdxCuts->GetXaxis()->SetBinLabel(4,"TPCpionhighp"); | |
448 | hdEdxCuts->GetXaxis()->SetBinLabel(5,"TPCkaonlowprej"); | |
449 | hdEdxCuts->GetXaxis()->SetBinLabel(6,"TPCprotonlowprej"); | |
450 | hdEdxCuts->GetXaxis()->SetBinLabel(7,"TPCpionlowprej"); | |
451 | hdEdxCuts->GetXaxis()->SetBinLabel(8,"TOFelectron"); | |
452 | hdEdxCuts->GetXaxis()->SetBinLabel(9,"TRDelectron"); | |
453 | hdEdxCuts->GetXaxis()->SetBinLabel(10,"out"); | |
454 | fHistograms->Add(hdEdxCuts); | |
e5b6e8a6 | 455 | |
4a0aab28 | 456 | TAxis *AxisBeforedEdx = NULL; |
e5b6e8a6 | 457 | TAxis *AxisBeforedEdxSig = NULL; |
4a0aab28 | 458 | TAxis *AxisBeforeTOF = NULL; |
e5b6e8a6 | 459 | TAxis *AxisBeforeTOFSig = NULL; |
4a0aab28 | 460 | if(preCut){ |
e5b6e8a6 | 461 | hTPCdEdxbefore=new TH2F(Form("Gamma_dEdx_before %s",GetCutNumber().Data()),"dEdx Gamma before" ,150,0.03,20,800,0,200); |
4a0aab28 | 462 | fHistograms->Add(hTPCdEdxbefore); |
e5b6e8a6 | 463 | AxisBeforedEdx = hTPCdEdxbefore->GetXaxis(); |
464 | hTPCdEdxSigbefore=new TH2F(Form("Gamma_dEdxSig_before %s",GetCutNumber().Data()),"dEdx Sigma Gamma before" ,150,0.03,20,400,-10,10); | |
465 | fHistograms->Add(hTPCdEdxSigbefore); | |
466 | AxisBeforedEdxSig = hTPCdEdxSigbefore->GetXaxis(); | |
4a0aab28 | 467 | |
e5b6e8a6 | 468 | hTOFbefore=new TH2F(Form("Gamma_TOF_before %s",GetCutNumber().Data()),"TOF Gamma before" ,150,0.03,20,11000,-1000,10000); |
4a0aab28 | 469 | fHistograms->Add(hTOFbefore); |
e5b6e8a6 | 470 | AxisBeforeTOF = hTOFbefore->GetXaxis(); |
471 | hTOFSigbefore=new TH2F(Form("Gamma_TOFSig_before %s",GetCutNumber().Data()),"TOF Sigma Gamma before" ,150,0.03,20,400,-6,10); | |
472 | fHistograms->Add(hTOFSigbefore); | |
473 | AxisBeforeTOFSig = hTOFSigbefore->GetXaxis(); | |
474 | ||
4a0aab28 | 475 | } |
e5b6e8a6 | 476 | hTPCdEdxSigafter=new TH2F(Form("Gamma_dEdxSig_after %s",GetCutNumber().Data()),"dEdx Sigma Gamma after" ,150,0.03,20,400, -10,10); |
477 | fHistograms->Add(hTPCdEdxSigafter); | |
478 | ||
479 | hTPCdEdxafter=new TH2F(Form("Gamma_dEdx_after %s",GetCutNumber().Data()),"dEdx Gamma after" ,150,0.03,20,800,0,200); | |
4a0aab28 | 480 | fHistograms->Add(hTPCdEdxafter); |
481 | ||
e5b6e8a6 | 482 | hTOFSigafter=new TH2F(Form("Gamma_TOFSig_after %s",GetCutNumber().Data()),"TOF Sigma Gamma after" ,150,0.03,20,400,-6,10); |
483 | fHistograms->Add(hTOFSigafter); | |
4a0aab28 | 484 | |
e5b6e8a6 | 485 | TAxis *AxisAfter = hTPCdEdxSigafter->GetXaxis(); |
4a0aab28 | 486 | Int_t bins = AxisAfter->GetNbins(); |
487 | Double_t from = AxisAfter->GetXmin(); | |
488 | Double_t to = AxisAfter->GetXmax(); | |
489 | Double_t *newBins = new Double_t[bins+1]; | |
490 | newBins[0] = from; | |
491 | Double_t factor = TMath::Power(to/from, 1./bins); | |
492 | for(Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1]; | |
493 | AxisAfter->Set(bins, newBins); | |
e5b6e8a6 | 494 | AxisAfter = hTOFSigafter->GetXaxis(); |
495 | AxisAfter->Set(bins, newBins); | |
496 | AxisAfter = hTPCdEdxafter->GetXaxis(); | |
4a0aab28 | 497 | AxisAfter->Set(bins, newBins); |
498 | if(preCut){ | |
499 | AxisBeforedEdx->Set(bins, newBins); | |
500 | AxisBeforeTOF->Set(bins, newBins); | |
e5b6e8a6 | 501 | AxisBeforedEdxSig->Set(bins, newBins); |
502 | AxisBeforeTOFSig->Set(bins, newBins); | |
4a0aab28 | 503 | } |
504 | delete [] newBins; | |
e5b6e8a6 | 505 | |
4a0aab28 | 506 | // Event Cuts and Info |
507 | if(preCut){ | |
e5b6e8a6 | 508 | hV0EventCuts=new TH1F(Form("ESD_EventCuts %s",GetCutNumber().Data()),"Event Cuts",7,-0.5,6.5); |
4a0aab28 | 509 | hV0EventCuts->GetXaxis()->SetBinLabel(1,"in"); |
510 | hV0EventCuts->GetXaxis()->SetBinLabel(2,"OfflineTrigger"); | |
e5b6e8a6 | 511 | hV0EventCuts->GetXaxis()->SetBinLabel(3,"nvtxcontr"); |
512 | hV0EventCuts->GetXaxis()->SetBinLabel(4,"VertexZ"); | |
4a0aab28 | 513 | hV0EventCuts->GetXaxis()->SetBinLabel(5,"pileup"); |
514 | hV0EventCuts->GetXaxis()->SetBinLabel(6,"centrsel"); | |
515 | hV0EventCuts->GetXaxis()->SetBinLabel(7,"out"); | |
516 | fHistograms->Add(hV0EventCuts); | |
e5b6e8a6 | 517 | |
4a0aab28 | 518 | hCentrality=new TH1F(Form("Centrality %s",GetCutNumber().Data()),"Centrality",100,0,100); |
519 | fHistograms->Add(hCentrality); | |
520 | hVertexZ=new TH1F(Form("VertexZ %s",GetCutNumber().Data()),"VertexZ",1000,-50,50); | |
521 | fHistograms->Add(hVertexZ); | |
e5b6e8a6 | 522 | |
a280ac15 | 523 | hTriggerClass= new TH1F(Form("OfflineTrigger %s",GetCutNumber().Data()),"OfflineTrigger",34,-0.5,33.5); |
e5b6e8a6 | 524 | hTriggerClass->GetXaxis()->SetBinLabel( 1,"kMB"); |
525 | hTriggerClass->GetXaxis()->SetBinLabel( 2,"kINT7"); | |
526 | hTriggerClass->GetXaxis()->SetBinLabel( 3,"kMUON"); | |
527 | hTriggerClass->GetXaxis()->SetBinLabel( 4,"kHighMult"); | |
528 | hTriggerClass->GetXaxis()->SetBinLabel( 5,"kKEMC1"); | |
529 | hTriggerClass->GetXaxis()->SetBinLabel( 6,"kCINT5"); | |
530 | hTriggerClass->GetXaxis()->SetBinLabel( 7,"kCMUS5/kMUSPB"); | |
531 | hTriggerClass->GetXaxis()->SetBinLabel( 8,"kMUSH7/kMUSHPB"); | |
532 | hTriggerClass->GetXaxis()->SetBinLabel( 9,"kMUL7/kMuonLikePB"); | |
533 | hTriggerClass->GetXaxis()->SetBinLabel(10,"kMUU7/kMuonUnlikePB"); | |
534 | hTriggerClass->GetXaxis()->SetBinLabel(11,"kEMC7/kEMC8"); | |
535 | hTriggerClass->GetXaxis()->SetBinLabel(12,"kMUS7"); | |
536 | hTriggerClass->GetXaxis()->SetBinLabel(13,"kPHI1"); | |
537 | hTriggerClass->GetXaxis()->SetBinLabel(14,"kPHI7/kPHI8/kPHOSPb"); | |
538 | hTriggerClass->GetXaxis()->SetBinLabel(15,"kEMCEJE"); | |
539 | hTriggerClass->GetXaxis()->SetBinLabel(16,"kEMCEGA"); | |
540 | hTriggerClass->GetXaxis()->SetBinLabel(17,"kCentral"); | |
541 | hTriggerClass->GetXaxis()->SetBinLabel(18,"kSemiCentral"); | |
542 | hTriggerClass->GetXaxis()->SetBinLabel(19,"kDG5"); | |
543 | hTriggerClass->GetXaxis()->SetBinLabel(20,"kZED"); | |
544 | hTriggerClass->GetXaxis()->SetBinLabel(21,"kSPI7/kSPI"); | |
545 | hTriggerClass->GetXaxis()->SetBinLabel(22,"kINT8"); | |
546 | hTriggerClass->GetXaxis()->SetBinLabel(23,"kMuonSingleLowPt8"); | |
547 | hTriggerClass->GetXaxis()->SetBinLabel(24,"kMuonSingleHighPt8"); | |
548 | hTriggerClass->GetXaxis()->SetBinLabel(25,"kMuonLikeLowPt8"); | |
549 | hTriggerClass->GetXaxis()->SetBinLabel(26,"kMuonUnlikeLowPt8"); | |
550 | hTriggerClass->GetXaxis()->SetBinLabel(27,"kMuonUnlikeLowPt0"); | |
551 | hTriggerClass->GetXaxis()->SetBinLabel(28,"kUserDefined"); | |
552 | hTriggerClass->GetXaxis()->SetBinLabel(29,"kFastOnly"); | |
553 | hTriggerClass->GetXaxis()->SetBinLabel(30,"kAnyINT"); | |
554 | hTriggerClass->GetXaxis()->SetBinLabel(31,"kAny"); | |
555 | hTriggerClass->GetXaxis()->SetBinLabel(32,"V0AND"); | |
556 | hTriggerClass->GetXaxis()->SetBinLabel(33,"NOT kFastOnly"); | |
a280ac15 | 557 | hTriggerClass->GetXaxis()->SetBinLabel(34,"failed Physics Selection"); |
4a0aab28 | 558 | fHistograms->Add(hTriggerClass); |
a280ac15 | 559 | |
560 | hTriggerClassSelected= new TH1F(Form("OfflineTriggerSelected %s",GetCutNumber().Data()),"OfflineTriggerSelected",33,-0.5,32.5); | |
561 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 1,"kMB"); | |
562 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 2,"kINT7"); | |
563 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 3,"kMUON"); | |
564 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 4,"kHighMult"); | |
565 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 5,"kKEMC1"); | |
566 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 6,"kCINT5"); | |
567 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 7,"kCMUS5/kMUSPB"); | |
568 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 8,"kMUSH7/kMUSHPB"); | |
569 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 9,"kMUL7/kMuonLikePB"); | |
570 | hTriggerClassSelected->GetXaxis()->SetBinLabel(10,"kMUU7/kMuonUnlikePB"); | |
571 | hTriggerClassSelected->GetXaxis()->SetBinLabel(11,"kEMC7/kEMC8"); | |
572 | hTriggerClassSelected->GetXaxis()->SetBinLabel(12,"kMUS7"); | |
573 | hTriggerClassSelected->GetXaxis()->SetBinLabel(13,"kPHI1"); | |
574 | hTriggerClassSelected->GetXaxis()->SetBinLabel(14,"kPHI7/kPHI8/kPHOSPb"); | |
575 | hTriggerClassSelected->GetXaxis()->SetBinLabel(15,"kEMCEJE"); | |
576 | hTriggerClassSelected->GetXaxis()->SetBinLabel(16,"kEMCEGA"); | |
577 | hTriggerClassSelected->GetXaxis()->SetBinLabel(17,"kCentral"); | |
578 | hTriggerClassSelected->GetXaxis()->SetBinLabel(18,"kSemiCentral"); | |
579 | hTriggerClassSelected->GetXaxis()->SetBinLabel(19,"kDG5"); | |
580 | hTriggerClassSelected->GetXaxis()->SetBinLabel(20,"kZED"); | |
581 | hTriggerClassSelected->GetXaxis()->SetBinLabel(21,"kSPI7/kSPI"); | |
582 | hTriggerClassSelected->GetXaxis()->SetBinLabel(22,"kINT8"); | |
583 | hTriggerClassSelected->GetXaxis()->SetBinLabel(23,"kMuonSingleLowPt8"); | |
584 | hTriggerClassSelected->GetXaxis()->SetBinLabel(24,"kMuonSingleHighPt8"); | |
585 | hTriggerClassSelected->GetXaxis()->SetBinLabel(25,"kMuonLikeLowPt8"); | |
586 | hTriggerClassSelected->GetXaxis()->SetBinLabel(26,"kMuonUnlikeLowPt8"); | |
587 | hTriggerClassSelected->GetXaxis()->SetBinLabel(27,"kMuonUnlikeLowPt0"); | |
588 | hTriggerClassSelected->GetXaxis()->SetBinLabel(28,"kUserDefined"); | |
589 | hTriggerClassSelected->GetXaxis()->SetBinLabel(29,"kFastOnly"); | |
590 | hTriggerClassSelected->GetXaxis()->SetBinLabel(30,"kAnyINT"); | |
591 | hTriggerClassSelected->GetXaxis()->SetBinLabel(31,"kAny"); | |
592 | hTriggerClassSelected->GetXaxis()->SetBinLabel(32,"V0AND"); | |
593 | hTriggerClassSelected->GetXaxis()->SetBinLabel(33,"NOT kFastOnly"); | |
594 | fHistograms->Add(hTriggerClassSelected); | |
4a0aab28 | 595 | } |
3b77b2d1 | 596 | } |
597 | ||
598 | //________________________________________________________________________ | |
599 | Bool_t AliConversionCuts::InitPIDResponse(){ | |
4a0aab28 | 600 | // Set Pointer to AliPIDResponse |
3b77b2d1 | 601 | |
4a0aab28 | 602 | AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager(); |
e5b6e8a6 | 603 | if(man) { |
4a0aab28 | 604 | AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler()); |
605 | fPIDResponse = (AliPIDResponse*)inputHandler->GetPIDResponse(); | |
606 | if(fPIDResponse)return kTRUE; | |
e5b6e8a6 | 607 | |
4a0aab28 | 608 | } |
e5b6e8a6 | 609 | |
ca91a3e1 | 610 | |
4a0aab28 | 611 | return kFALSE; |
3b77b2d1 | 612 | } |
613 | ///________________________________________________________________________ | |
92efd725 | 614 | Bool_t AliConversionCuts::EventIsSelected(AliVEvent *fInputEvent, AliVEvent *fMCEvent){ |
4a0aab28 | 615 | // Process Event Selection |
3b77b2d1 | 616 | |
4a0aab28 | 617 | Int_t cutindex=0; |
618 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); | |
619 | cutindex++; | |
e5b6e8a6 | 620 | |
4a0aab28 | 621 | // Check for MC event |
622 | if(fMCEvent){ | |
623 | // Check if MC event is correctly loaded | |
624 | AliMCEventHandler* mcHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler()); | |
625 | if (!mcHandler){ | |
626 | fEventQuality = 2; | |
627 | return kFALSE; | |
628 | } | |
629 | if (!mcHandler->InitOk() ){ | |
630 | fEventQuality = 2; | |
631 | return kFALSE; | |
632 | } | |
633 | if (!mcHandler->TreeK() ){ | |
634 | fEventQuality = 2; | |
635 | return kFALSE; | |
636 | } | |
637 | if (!mcHandler->TreeTR() ) { | |
638 | fEventQuality = 2; | |
639 | return kFALSE; | |
640 | } | |
641 | } | |
4a0aab28 | 642 | |
e5b6e8a6 | 643 | // Event Trigger |
4a0aab28 | 644 | if(!IsTriggerSelected()){ |
645 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); | |
646 | fEventQuality = 3; | |
647 | return kFALSE; | |
648 | } | |
649 | cutindex++; | |
a280ac15 | 650 | |
e5b6e8a6 | 651 | if(fInputEvent->IsA()==AliESDEvent::Class()){ |
652 | AliTriggerAnalysis fTriggerAnalysis;// = new AliTriggerAnalysis; | |
653 | fHasV0AND = fTriggerAnalysis.IsOfflineTriggerFired((AliESDEvent*)fInputEvent, AliTriggerAnalysis::kV0AND); | |
654 | if(fHasV0AND&&hTriggerClass)hTriggerClass->Fill(31); | |
655 | } | |
4a0aab28 | 656 | |
e5b6e8a6 | 657 | // Number of Contributors Cut |
658 | if(GetNumberOfContributorsVtx(fInputEvent)<=0) { | |
4a0aab28 | 659 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); |
e5b6e8a6 | 660 | fEventQuality = 5; |
4a0aab28 | 661 | return kFALSE; |
662 | } | |
663 | cutindex++; | |
664 | ||
e5b6e8a6 | 665 | // Z Vertex Position Cut |
666 | if(!VertexZCut(fInputEvent)){ | |
4a0aab28 | 667 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); |
e5b6e8a6 | 668 | fEventQuality = 4; |
4a0aab28 | 669 | return kFALSE; |
670 | } | |
671 | cutindex++; | |
92efd725 | 672 | |
4a0aab28 | 673 | // Pile Up Rejection |
3b77b2d1 | 674 | |
4a0aab28 | 675 | if(fRemovePileUp){ |
676 | if(fInputEvent->IsPileupFromSPD(3,0.8,3.,2.,5.)){ | |
677 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); | |
678 | fEventQuality = 6; | |
679 | return kFALSE; | |
680 | } | |
681 | } | |
682 | cutindex++; | |
683 | ||
684 | // Centrality Selection | |
e5b6e8a6 | 685 | if(!IsCentralitySelected(fInputEvent,fMCEvent)){ |
4a0aab28 | 686 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); |
687 | fEventQuality = 1; | |
688 | return kFALSE; | |
689 | } | |
690 | cutindex++; | |
691 | ||
692 | // Fill Event Histograms | |
693 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); | |
694 | if(hVertexZ)hVertexZ->Fill(fInputEvent->GetPrimaryVertex()->GetZ()); | |
695 | if(hCentrality)hCentrality->Fill(GetCentrality(fInputEvent)); | |
3b77b2d1 | 696 | |
4a0aab28 | 697 | fEventQuality = 0; |
698 | return kTRUE; | |
3b77b2d1 | 699 | } |
700 | ||
701 | ///________________________________________________________________________ | |
92efd725 | 702 | Bool_t AliConversionCuts::PhotonIsSelectedMC(TParticle *particle,AliStack *fMCStack,Bool_t checkForConvertedGamma){ |
4a0aab28 | 703 | // MonteCarlo Photon Selection |
3b77b2d1 | 704 | |
4a0aab28 | 705 | if(!fMCStack)return kFALSE; |
3b77b2d1 | 706 | |
4a0aab28 | 707 | if (particle->GetPdgCode() == 22){ |
e5b6e8a6 | 708 | |
709 | if(particle->R() > fMaxR) return kFALSE; | |
710 | if(abs(particle->Eta())> fEtaCut || abs(particle->Eta())< fEtaCutMin) return kFALSE; | |
4a0aab28 | 711 | |
712 | if(particle->GetMother(0) >-1 && fMCStack->Particle(particle->GetMother(0))->GetPdgCode() == 22){ | |
713 | return kFALSE; // no photon as mothers! | |
714 | } | |
715 | ||
716 | if(particle->GetMother(0) >= fMCStack->GetNprimary()){ | |
717 | return kFALSE; // the gamma has a mother, and it is not a primary particle | |
718 | } | |
719 | ||
720 | if(!checkForConvertedGamma) return kTRUE; // return in case of accepted gamma | |
721 | ||
722 | // looking for conversion gammas (electron + positron from pairbuilding (= 5) ) | |
723 | TParticle* ePos = NULL; | |
724 | TParticle* eNeg = NULL; | |
725 | ||
726 | if(particle->GetNDaughters() >= 2){ | |
727 | for(Int_t daughterIndex=particle->GetFirstDaughter();daughterIndex<=particle->GetLastDaughter();daughterIndex++){ | |
728 | TParticle *tmpDaughter = fMCStack->Particle(daughterIndex); | |
729 | if(tmpDaughter->GetUniqueID() == 5){ | |
730 | if(tmpDaughter->GetPdgCode() == 11){ | |
731 | eNeg = tmpDaughter; | |
732 | } else if(tmpDaughter->GetPdgCode() == -11){ | |
733 | ePos = tmpDaughter; | |
734 | } | |
735 | } | |
736 | } | |
737 | } | |
738 | ||
739 | if(ePos == NULL || eNeg == NULL){ // means we do not have two daughters from pair production | |
740 | return kFALSE; | |
741 | } | |
e5b6e8a6 | 742 | |
4a0aab28 | 743 | if(ePos->Pt()<fSinglePtCut || eNeg->Pt()<fSinglePtCut){ |
744 | return kFALSE; // no reconstruction below the Pt cut | |
745 | } | |
e5b6e8a6 | 746 | |
747 | if( abs(ePos->Eta())> fEtaCut || abs(ePos->Eta())< fEtaCutMin || | |
748 | abs(eNeg->Eta())> fEtaCut || abs(eNeg->Eta())< fEtaCutMin ) { | |
4a0aab28 | 749 | return kFALSE; |
750 | } | |
e5b6e8a6 | 751 | |
4a0aab28 | 752 | if(ePos->R()>fMaxR){ |
753 | return kFALSE; // cuts on distance from collision point | |
754 | } | |
755 | ||
e5b6e8a6 | 756 | if(abs(ePos->Vz()) > fMaxZ){ |
4a0aab28 | 757 | return kFALSE; // outside material |
758 | } | |
e5b6e8a6 | 759 | if(abs(eNeg->Vz()) > fMaxZ){ |
4a0aab28 | 760 | return kFALSE; // outside material |
761 | } | |
762 | ||
e5b6e8a6 | 763 | if( ePos->R() <= ((abs(ePos->Vz()) * fLineCutZRSlope) - fLineCutZValue)){ |
4a0aab28 | 764 | return kFALSE; // line cut to exclude regions where we do not reconstruct |
e5b6e8a6 | 765 | } else if ( fEtaCutMin != -0.1 && ePos->R() >= ((abs(ePos->Vz()) * fLineCutZRSlopeMin) - fLineCutZValueMin)){ |
4a0aab28 | 766 | return kFALSE; |
767 | } | |
e5b6e8a6 | 768 | |
769 | if( eNeg->R() <= ((abs(eNeg->Vz()) * fLineCutZRSlope) - fLineCutZValue)){ | |
4a0aab28 | 770 | return kFALSE; // line cut to exclude regions where we do not reconstruct |
e5b6e8a6 | 771 | } else if ( fEtaCutMin != -0.1 && eNeg->R() >= ((abs(eNeg->Vz()) * fLineCutZRSlopeMin) - fLineCutZValueMin)){ |
4a0aab28 | 772 | return kFALSE; |
773 | } | |
e5b6e8a6 | 774 | |
4a0aab28 | 775 | return kTRUE; |
776 | //if(AcceptanceCut(particle,ePos,eNeg))return kTRUE; | |
777 | } | |
778 | return kFALSE; | |
3b77b2d1 | 779 | } |
780 | ||
2bb2434e | 781 | |
3b77b2d1 | 782 | ///________________________________________________________________________ |
783 | Bool_t AliConversionCuts::PhotonCuts(AliConversionPhotonBase *photon,AliVEvent *event) | |
784 | { // Specific Photon Cuts | |
785 | ||
4a0aab28 | 786 | Int_t cutIndex = 0; |
787 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); | |
788 | cutIndex++; | |
789 | ||
790 | // Fill Histos before Cuts | |
791 | if(hInvMassbefore)hInvMassbefore->Fill(photon->GetMass()); | |
e5b6e8a6 | 792 | |
4a0aab28 | 793 | if(hArmenterosbefore)hArmenterosbefore->Fill(photon->GetArmenterosAlpha(),photon->GetArmenterosQt()); |
794 | ||
795 | // Gamma selection based on QT from Armenteros | |
796 | if(fDoQtGammaSelection == kTRUE){ | |
797 | if(!ArmenterosQtCut(photon)){ | |
798 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //1 | |
799 | return kFALSE; | |
800 | } | |
801 | } | |
802 | cutIndex++; //2 | |
803 | ||
804 | // Chi Cut | |
805 | if(photon->GetChi2perNDF() > fChi2CutConversion || photon->GetChi2perNDF() <=0){ | |
806 | { | |
807 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //2 | |
808 | return kFALSE; | |
809 | } | |
810 | } | |
811 | cutIndex++;//3 | |
812 | ||
813 | // Reconstruction Acceptance Cuts | |
814 | if(!AcceptanceCuts(photon)){ | |
815 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //3 | |
816 | return kFALSE; | |
817 | } | |
818 | ||
819 | cutIndex++; //4 | |
820 | // Asymmetry Cut | |
821 | if(fDoPhotonAsymmetryCut == kTRUE){ | |
822 | if(!AsymmetryCut(photon,event)){ | |
823 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //4 | |
824 | return kFALSE; | |
825 | } | |
826 | } | |
827 | ||
828 | //Check the pid probability | |
829 | cutIndex++; //5 | |
830 | if(!PIDProbabilityCut(photon, event)) { | |
831 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //5 | |
832 | return kFALSE; | |
833 | } | |
834 | ||
835 | cutIndex++; //6 | |
836 | if(!CorrectedTPCClusterCut(photon, event)) { | |
837 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //6 | |
838 | return kFALSE; | |
839 | } | |
840 | ||
841 | ||
842 | cutIndex++; //7 | |
843 | if(!PsiPairCut(photon)) { | |
844 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //7 | |
845 | return kFALSE; | |
846 | } | |
847 | ||
848 | cutIndex++; //8 | |
849 | if(!CosinePAngleCut(photon, event)) { | |
850 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //8 | |
851 | return kFALSE; | |
852 | } | |
853 | ||
854 | cutIndex++; //9 | |
855 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //9 | |
856 | ||
857 | // Histos after Cuts | |
858 | if(hInvMassafter)hInvMassafter->Fill(photon->GetMass()); | |
859 | if(hArmenterosafter)hArmenterosafter->Fill(photon->GetArmenterosAlpha(),photon->GetArmenterosQt()); | |
860 | ||
861 | ||
862 | return kTRUE; | |
3b77b2d1 | 863 | |
864 | } | |
865 | ||
866 | ///________________________________________________________________________ | |
867 | Bool_t AliConversionCuts::CorrectedTPCClusterCut(AliConversionPhotonBase *photon, AliVEvent * event) | |
868 | { //Cut on corrected TPC Cluster Info | |
869 | ||
4a0aab28 | 870 | AliVTrack * negTrack = GetTrack(event, photon->GetTrackLabelNegative()); |
871 | AliVTrack * posTrack = GetTrack(event, photon->GetTrackLabelPositive()); | |
3b77b2d1 | 872 | |
4a0aab28 | 873 | if(!negTrack||!posTrack)return kFALSE; |
3b77b2d1 | 874 | |
4a0aab28 | 875 | Double_t negclsToF=0; |
3b77b2d1 | 876 | |
4a0aab28 | 877 | if (!fUseCorrectedTPCClsInfo ){ |
878 | if(negTrack->GetTPCNclsF()!=0){ | |
879 | negclsToF = (Double_t)negTrack->GetNcls(1)/(Double_t)negTrack->GetTPCNclsF();}// Ncluster/Nfindablecluster | |
880 | } | |
881 | else { | |
882 | negclsToF = negTrack->GetTPCClusterInfo(2,0,GetFirstTPCRow(photon->GetConversionRadius())); | |
883 | } | |
3b77b2d1 | 884 | |
4a0aab28 | 885 | Double_t posclsToF = 0.; |
886 | if (!fUseCorrectedTPCClsInfo ){ | |
e5b6e8a6 | 887 | if(posTrack->GetTPCNclsF()!=0){ |
4a0aab28 | 888 | posclsToF = (Double_t)posTrack->GetNcls(1)/(Double_t)posTrack->GetTPCNclsF(); |
889 | } | |
890 | }else{ | |
891 | posclsToF = posTrack->GetTPCClusterInfo(2,0,GetFirstTPCRow(photon->GetConversionRadius())); | |
892 | } | |
3b77b2d1 | 893 | |
e5b6e8a6 | 894 | if( negclsToF < fMinClsTPCToF || posclsToF < fMinClsTPCToF ){ |
4a0aab28 | 895 | return kFALSE; |
896 | } | |
3b77b2d1 | 897 | |
4a0aab28 | 898 | return kTRUE; |
3b77b2d1 | 899 | } |
900 | ||
3b77b2d1 | 901 | ///________________________________________________________________________ |
d008165e | 902 | Bool_t AliConversionCuts::PhotonIsSelected(AliConversionPhotonBase *photon, AliVEvent * event) |
903 | { | |
4a0aab28 | 904 | //Selection of Reconstructed Photons |
3b77b2d1 | 905 | |
4a0aab28 | 906 | FillPhotonCutIndex(kPhotonIn); |
0a2b2b4b | 907 | |
908 | if(event->IsA()==AliESDEvent::Class()) { | |
909 | if(!SelectV0Finder( ( ((AliESDEvent*)event)->GetV0(photon->GetV0Index())) ) ){ | |
910 | FillPhotonCutIndex(kOnFly); | |
911 | return kFALSE; | |
912 | } | |
913 | } | |
914 | // else if(event->IsA()==AliAODEvent::Class()) { | |
915 | // if(!SelectV0Finder( ( ((AliAODEvent*)event)->GetV0(photon->GetV0Index())) ) ){ | |
916 | // FillPhotonCutIndex(kOnFly); | |
917 | // return kFALSE; | |
918 | // } | |
919 | // } | |
3b77b2d1 | 920 | |
4a0aab28 | 921 | // Get Tracks |
922 | AliVTrack * negTrack = GetTrack(event, photon->GetTrackLabelNegative()); | |
923 | AliVTrack * posTrack = GetTrack(event, photon->GetTrackLabelPositive()); | |
3b77b2d1 | 924 | |
4a0aab28 | 925 | if(!negTrack || !posTrack) { |
926 | FillPhotonCutIndex(kNoTracks); | |
927 | return kFALSE; | |
928 | } | |
3b77b2d1 | 929 | |
4a0aab28 | 930 | // dEdx Cuts |
931 | if(!dEdxCuts(negTrack) || !dEdxCuts(posTrack)) { | |
932 | FillPhotonCutIndex(kdEdxCuts); | |
933 | return kFALSE; | |
934 | } | |
3b77b2d1 | 935 | |
4a0aab28 | 936 | // Track Cuts |
937 | if(!TracksAreSelected(negTrack, posTrack)){ | |
938 | FillPhotonCutIndex(kTrackCuts); | |
939 | return kFALSE; | |
940 | } | |
3b77b2d1 | 941 | |
4a0aab28 | 942 | // Photon Cuts |
943 | if(!PhotonCuts(photon,event)){ | |
944 | FillPhotonCutIndex(kPhotonCuts); | |
945 | return kFALSE; | |
946 | } | |
3b77b2d1 | 947 | |
4a0aab28 | 948 | // Photon passed cuts |
949 | FillPhotonCutIndex(kPhotonOut); | |
950 | return kTRUE; | |
3b77b2d1 | 951 | } |
952 | ||
3b77b2d1 | 953 | ///________________________________________________________________________ |
954 | Bool_t AliConversionCuts::ArmenterosQtCut(AliConversionPhotonBase *photon) | |
955 | { // Armenteros Qt Cut | |
956 | ||
4a0aab28 | 957 | if(fDoHighPtQtGammaSelection){ |
958 | if(photon->GetPhotonPt() < fPtBorderForQt){ | |
959 | if(photon->GetArmenterosQt()>fQtMax){ | |
960 | return kFALSE; | |
961 | } | |
962 | } else { | |
963 | if(photon->GetArmenterosQt()>fHighPtQtMax){ | |
964 | return kFALSE; | |
965 | } | |
966 | } | |
967 | } else { | |
3b77b2d1 | 968 | |
4a0aab28 | 969 | if(photon->GetArmenterosQt()>fQtMax){ |
970 | return kFALSE; | |
971 | } | |
972 | } | |
973 | return kTRUE; | |
3b77b2d1 | 974 | } |
975 | ||
976 | ||
977 | ///________________________________________________________________________ | |
978 | Bool_t AliConversionCuts::AcceptanceCuts(AliConversionPhotonBase *photon) { | |
4a0aab28 | 979 | // Exclude certain areas for photon reconstruction |
3b77b2d1 | 980 | |
4a0aab28 | 981 | Int_t cutIndex=0; |
982 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); | |
983 | cutIndex++; | |
3b77b2d1 | 984 | |
4a0aab28 | 985 | if(photon->GetConversionRadius()>fMaxR){ // cuts on distance from collision point |
986 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); | |
987 | return kFALSE; | |
988 | } | |
989 | cutIndex++; | |
3b77b2d1 | 990 | |
4a0aab28 | 991 | if(photon->GetConversionRadius()<fMinR){ // cuts on distance from collision point |
992 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); | |
993 | return kFALSE; | |
994 | } | |
995 | cutIndex++; | |
3b77b2d1 | 996 | |
e5b6e8a6 | 997 | if(photon->GetConversionRadius() <= ((abs(photon->GetConversionZ())*fLineCutZRSlope)-fLineCutZValue)){ |
3b77b2d1 | 998 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); |
999 | return kFALSE; | |
4a0aab28 | 1000 | } |
e5b6e8a6 | 1001 | else if (fUseEtaMinCut && photon->GetConversionRadius() >= ((abs(photon->GetConversionZ())*fLineCutZRSlopeMin)-fLineCutZValueMin )){ |
4a0aab28 | 1002 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); |
1003 | return kFALSE; | |
1004 | } | |
1005 | cutIndex++; | |
3b77b2d1 | 1006 | |
e5b6e8a6 | 1007 | if(abs(photon->GetConversionZ()) > fMaxZ ){ // cuts out regions where we do not reconstruct |
3b77b2d1 | 1008 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); |
1009 | return kFALSE; | |
4a0aab28 | 1010 | } |
1011 | cutIndex++; | |
3b77b2d1 | 1012 | |
1013 | ||
e5b6e8a6 | 1014 | if(abs(photon->GetPhotonEta())> fEtaCut || abs(photon->GetPhotonEta())< fEtaCutMin){ |
3b77b2d1 | 1015 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); |
1016 | return kFALSE; | |
4a0aab28 | 1017 | } |
1018 | cutIndex++; | |
3b77b2d1 | 1019 | |
1020 | ||
4a0aab28 | 1021 | if(photon->GetPhotonPt()<fPtCut){ |
3b77b2d1 | 1022 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); |
1023 | return kFALSE; | |
4a0aab28 | 1024 | } |
1025 | cutIndex++; | |
3b77b2d1 | 1026 | |
4a0aab28 | 1027 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); |
e5b6e8a6 | 1028 | |
4a0aab28 | 1029 | return kTRUE; |
3b77b2d1 | 1030 | } |
1031 | ||
1032 | ||
1033 | ///________________________________________________________________________ | |
1034 | Bool_t AliConversionCuts::SpecificTrackCuts(AliAODTrack * negTrack, AliAODTrack * posTrack,Int_t &cutIndex) { | |
4a0aab28 | 1035 | // Track Cuts which require AOD/ESD specific implementation |
3b77b2d1 | 1036 | |
4a0aab28 | 1037 | if( !negTrack->IsOn(AliESDtrack::kTPCrefit) || !posTrack->IsOn(AliESDtrack::kTPCrefit) ) { |
3b77b2d1 | 1038 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
1039 | return kFALSE; | |
4a0aab28 | 1040 | } |
1041 | cutIndex++; | |
3b77b2d1 | 1042 | |
4a0aab28 | 1043 | AliAODVertex * NegVtxType=negTrack->GetProdVertex(); |
1044 | AliAODVertex * PosVtxType=posTrack->GetProdVertex(); | |
1045 | if((NegVtxType->GetType())==AliAODVertex::kKink || (PosVtxType->GetType())==AliAODVertex::kKink) { | |
3b77b2d1 | 1046 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
1047 | return kFALSE; | |
4a0aab28 | 1048 | } |
1049 | return kTRUE; | |
3b77b2d1 | 1050 | |
1051 | } | |
1052 | ||
1053 | ||
1054 | ///________________________________________________________________________ | |
1055 | Bool_t AliConversionCuts::SpecificTrackCuts(AliESDtrack * negTrack, AliESDtrack * posTrack,Int_t &cutIndex) { | |
4a0aab28 | 1056 | // Track Cuts which require AOD/ESD specific implementation |
3b77b2d1 | 1057 | |
92efd725 | 1058 | if( !negTrack->IsOn(AliESDtrack::kTPCrefit) || !posTrack->IsOn(AliESDtrack::kTPCrefit) ) { |
3b77b2d1 | 1059 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
1060 | return kFALSE; | |
4a0aab28 | 1061 | } |
1062 | cutIndex++; | |
3b77b2d1 | 1063 | |
4a0aab28 | 1064 | if(negTrack->GetKinkIndex(0) > 0 || posTrack->GetKinkIndex(0) > 0 ) { |
3b77b2d1 | 1065 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
1066 | return kFALSE; | |
4a0aab28 | 1067 | } |
1068 | return kTRUE; | |
3b77b2d1 | 1069 | } |
1070 | ||
1071 | ||
1072 | ||
1073 | ///________________________________________________________________________ | |
1074 | Bool_t AliConversionCuts::TracksAreSelected(AliVTrack * negTrack, AliVTrack * posTrack) { | |
4a0aab28 | 1075 | // Track Selection for Photon Reconstruction |
3b77b2d1 | 1076 | |
4a0aab28 | 1077 | Int_t cutIndex=0; |
1078 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); | |
1079 | cutIndex++; | |
3b77b2d1 | 1080 | |
4a0aab28 | 1081 | // avoid like sign |
1082 | if(negTrack->Charge() == posTrack->Charge()) { | |
1083 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); | |
1084 | return kFALSE; | |
1085 | } | |
1086 | cutIndex++; | |
3b77b2d1 | 1087 | |
4a0aab28 | 1088 | // Number of TPC Clusters |
1089 | if( negTrack->GetNcls(1) < fMinClsTPC || posTrack->GetNcls(1) < fMinClsTPC ) { | |
3b77b2d1 | 1090 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
4a0aab28 | 1091 | return kFALSE; |
1092 | } | |
1093 | cutIndex++; | |
3b77b2d1 | 1094 | |
4a0aab28 | 1095 | // Acceptance |
3b77b2d1 | 1096 | |
e5b6e8a6 | 1097 | if(abs(negTrack->Eta()) > fEtaCut || abs(negTrack->Eta()) < fEtaCutMin || |
1098 | abs(posTrack->Eta())> fEtaCut || abs(posTrack->Eta())< fEtaCutMin) { | |
4a0aab28 | 1099 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
3b77b2d1 | 1100 | return kFALSE; |
4a0aab28 | 1101 | } |
1102 | cutIndex++; | |
3b77b2d1 | 1103 | |
4a0aab28 | 1104 | // Single Pt Cut |
1105 | if( negTrack->Pt()< fSinglePtCut || posTrack->Pt()< fSinglePtCut){ | |
3b77b2d1 | 1106 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
1107 | return kFALSE; | |
4a0aab28 | 1108 | } |
1109 | cutIndex++; | |
3b77b2d1 | 1110 | |
4a0aab28 | 1111 | // AOD ESD specific cuts |
1112 | Bool_t passCuts = kTRUE; | |
3b77b2d1 | 1113 | |
4a0aab28 | 1114 | if(negTrack->IsA()==AliAODTrack::Class()) { |
1115 | passCuts = passCuts * SpecificTrackCuts(static_cast<AliAODTrack*>(negTrack), static_cast<AliAODTrack*>(posTrack),cutIndex); | |
e5b6e8a6 | 1116 | } else { |
4a0aab28 | 1117 | passCuts = passCuts * SpecificTrackCuts(static_cast<AliESDtrack*>(negTrack), static_cast<AliESDtrack*>(posTrack),cutIndex); |
e5b6e8a6 | 1118 | } |
3b77b2d1 | 1119 | |
4a0aab28 | 1120 | if(!passCuts){ |
3b77b2d1 | 1121 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
1122 | return kFALSE; | |
4a0aab28 | 1123 | } |
1124 | cutIndex++; | |
3b77b2d1 | 1125 | |
4a0aab28 | 1126 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
3b77b2d1 | 1127 | |
4a0aab28 | 1128 | return kTRUE; |
e5b6e8a6 | 1129 | |
3b77b2d1 | 1130 | } |
1131 | ||
1132 | ///________________________________________________________________________ | |
1133 | Bool_t AliConversionCuts::dEdxCuts(AliVTrack *fCurrentTrack){ | |
4a0aab28 | 1134 | // Electron Identification Cuts for Photon reconstruction |
3b77b2d1 | 1135 | |
4a0aab28 | 1136 | if(!fPIDResponse){InitPIDResponse();}// Try to reinitialize PID Response |
1137 | if(!fPIDResponse){AliError("No PID Response"); return kTRUE;}// if still missing fatal error | |
3b77b2d1 | 1138 | |
4a0aab28 | 1139 | Int_t cutIndex=0; |
1140 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
e5b6e8a6 | 1141 | if(hTPCdEdxSigbefore)hTPCdEdxSigbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron)); |
1142 | if(hTPCdEdxbefore)hTPCdEdxbefore->Fill(fCurrentTrack->P(),fCurrentTrack->GetTPCsignal()); | |
4a0aab28 | 1143 | cutIndex++; |
e5b6e8a6 | 1144 | |
3b77b2d1 | 1145 | |
4a0aab28 | 1146 | if(fDodEdxSigmaCut == kTRUE){ |
3b77b2d1 | 1147 | // TPC Electron Line |
1148 | if( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLine || | |
4a0aab28 | 1149 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine){ |
3b77b2d1 | 1150 | |
4a0aab28 | 1151 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); |
1152 | return kFALSE; | |
3b77b2d1 | 1153 | } |
1154 | cutIndex++; | |
1155 | ||
1156 | // TPC Pion Line | |
4a0aab28 | 1157 | if( fCurrentTrack->P()>fPIDMinPnSigmaAbovePionLine && fCurrentTrack->P()<fPIDMaxPnSigmaAbovePionLine ){ |
1158 | if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine && | |
1159 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine&& | |
1160 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLine){ | |
1161 | ||
1162 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
1163 | return kFALSE; | |
1164 | } | |
1165 | } | |
1166 | cutIndex++; | |
e5b6e8a6 | 1167 | |
4a0aab28 | 1168 | // High Pt Pion rej |
1169 | if( fCurrentTrack->P()>fPIDMaxPnSigmaAbovePionLine ){ | |
1170 | if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine && | |
e5b6e8a6 | 1171 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine && |
4a0aab28 | 1172 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLineHighPt){ |
1173 | ||
1174 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
1175 | return kFALSE; | |
1176 | } | |
1177 | } | |
1178 | cutIndex++; | |
1179 | } | |
1180 | else{cutIndex+=3;} | |
1181 | ||
1182 | if(fDoKaonRejectionLowP == kTRUE){ | |
1183 | if(fCurrentTrack->P()<fPIDMinPKaonRejectionLowP ){ | |
e5b6e8a6 | 1184 | if( abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kKaon))<fPIDnSigmaAtLowPAroundKaonLine){ |
4a0aab28 | 1185 | |
1186 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
1187 | return kFALSE; | |
1188 | } | |
1189 | } | |
1190 | } | |
1191 | cutIndex++; | |
e5b6e8a6 | 1192 | |
4a0aab28 | 1193 | if(fDoProtonRejectionLowP == kTRUE){ |
1194 | if( fCurrentTrack->P()<fPIDMinPProtonRejectionLowP ){ | |
e5b6e8a6 | 1195 | if( abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kProton))<fPIDnSigmaAtLowPAroundProtonLine){ |
4a0aab28 | 1196 | |
1197 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
1198 | return kFALSE; | |
1199 | } | |
1200 | } | |
1201 | } | |
3b77b2d1 | 1202 | cutIndex++; |
e5b6e8a6 | 1203 | |
4a0aab28 | 1204 | if(fDoPionRejectionLowP == kTRUE){ |
1205 | if( fCurrentTrack->P()<fPIDMinPPionRejectionLowP ){ | |
e5b6e8a6 | 1206 | if( abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion))<fPIDnSigmaAtLowPAroundPionLine){ |
4a0aab28 | 1207 | |
1208 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
1209 | return kFALSE; | |
1210 | } | |
1211 | } | |
1212 | } | |
1213 | cutIndex++; | |
e5b6e8a6 | 1214 | |
1215 | ||
1216 | // cout<<"Start"<<endl; | |
1217 | // AliPIDResponse::EDetPidStatus status=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTOF,fCurrentTrack); | |
a280ac15 | 1218 | |
e5b6e8a6 | 1219 | // if( ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) && ( (status & AliVTrack::kTIME) == AliVTrack::kTIME )) |
1220 | // {cout<<"TOF DA"<<endl;} | |
a280ac15 | 1221 | // if(status == AliPIDResponse::kDetPidOk){ |
e5b6e8a6 | 1222 | // Float_t probMis = fPIDResponse->GetTOFMismatchProbability(fCurrentTrack); |
1223 | // cout<<"--> "<<probMis<<endl; | |
1224 | // if(probMis > 0.01){ | |
a280ac15 | 1225 | |
e5b6e8a6 | 1226 | // } |
1227 | // } | |
a280ac15 | 1228 | |
4a0aab28 | 1229 | if((fCurrentTrack->GetStatus() & AliESDtrack::kTOFpid) && !(fCurrentTrack->GetStatus() & AliESDtrack::kTOFmismatch)){ |
e5b6e8a6 | 1230 | if(hTOFbefore){ |
1231 | Double_t t0 = fPIDResponse->GetTOFResponse().GetStartTime(fCurrentTrack->P()); | |
1232 | Double_t times[5]; | |
1233 | fCurrentTrack->GetIntegratedTimes(times); | |
1234 | Double_t TOFsignal = fCurrentTrack->GetTOFsignal(); | |
1235 | Double_t dT = TOFsignal - t0 - times[0]; | |
1236 | hTOFbefore->Fill(fCurrentTrack->P(),dT); | |
1237 | } | |
1238 | if(hTOFSigbefore) hTOFSigbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)); | |
4a0aab28 | 1239 | if(fUseTOFpid){ |
1240 | if(fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)>fTofPIDnSigmaAboveElectronLine || | |
1241 | fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)<fTofPIDnSigmaBelowElectronLine ){ | |
1242 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
1243 | return kFALSE; | |
1244 | } | |
1245 | } | |
e5b6e8a6 | 1246 | if(hTOFSigafter)hTOFSigafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)); |
4a0aab28 | 1247 | } |
1248 | cutIndex++; | |
e5b6e8a6 | 1249 | |
4a0aab28 | 1250 | // Apply TRD PID |
1251 | if(fDoTRDPID){ | |
1252 | if(!fPIDResponse->IdentifiedAsElectronTRD(fCurrentTrack,fPIDTRDEfficiency)){ | |
4a0aab28 | 1253 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); |
1254 | return kFALSE; | |
1255 | } | |
1256 | } | |
1257 | cutIndex++; | |
3b77b2d1 | 1258 | |
4a0aab28 | 1259 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); |
e5b6e8a6 | 1260 | if(hTPCdEdxSigafter)hTPCdEdxSigafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron)); |
1261 | if(hTPCdEdxafter)hTPCdEdxafter->Fill(fCurrentTrack->P(),fCurrentTrack->GetTPCsignal()); | |
4a0aab28 | 1262 | return kTRUE; |
3b77b2d1 | 1263 | } |
1264 | ||
1265 | ///________________________________________________________________________ | |
1266 | Bool_t AliConversionCuts::AsymmetryCut(AliConversionPhotonBase * photon,AliVEvent *event) { | |
4a0aab28 | 1267 | // Cut on Energy Assymetry |
3b77b2d1 | 1268 | |
4a0aab28 | 1269 | for(Int_t ii=0;ii<2;ii++){ |
3b77b2d1 | 1270 | |
4a0aab28 | 1271 | AliVTrack *track=GetTrack(event,photon->GetTrackLabel(ii)); |
3b77b2d1 | 1272 | |
4a0aab28 | 1273 | if( track->P() > fMinPPhotonAsymmetryCut ){ |
1274 | Double_t trackNegAsy=0; | |
1275 | if (photon->GetPhotonP()!=0.){ | |
1276 | trackNegAsy= track->P()/photon->GetPhotonP(); | |
1277 | } | |
3b77b2d1 | 1278 | |
4a0aab28 | 1279 | if( trackNegAsy<fMinPhotonAsymmetry ||trackNegAsy>(1.- fMinPhotonAsymmetry)){ |
1280 | return kFALSE; | |
1281 | } | |
1282 | } | |
3b77b2d1 | 1283 | |
4a0aab28 | 1284 | } |
1285 | return kTRUE; | |
3b77b2d1 | 1286 | } |
1287 | ||
1288 | ///________________________________________________________________________ | |
92efd725 | 1289 | AliVTrack *AliConversionCuts::GetTrack(AliVEvent * event, Int_t label){ |
4a0aab28 | 1290 | //Returns pointer to the track with given ESD label |
1291 | //(Important for AOD implementation, since Track array in AOD data is different | |
1292 | //from ESD array, but ESD tracklabels are stored in AOD Tracks) | |
1293 | ||
1294 | AliESDEvent * esdEvent = dynamic_cast<AliESDEvent*>(event); | |
1295 | if(esdEvent) { | |
1296 | if(label > event->GetNumberOfTracks() ) return NULL; | |
1297 | AliESDtrack * track = esdEvent->GetTrack(label); | |
1298 | return track; | |
e5b6e8a6 | 1299 | |
1300 | } else { | |
4a0aab28 | 1301 | for(Int_t ii=0; ii<event->GetNumberOfTracks(); ii++) { |
1302 | AliVTrack * track = dynamic_cast<AliVTrack*>(event->GetTrack(ii)); | |
e5b6e8a6 | 1303 | |
1304 | if(track) { | |
4a0aab28 | 1305 | if(track->GetID() == label) { |
1306 | return track; | |
1307 | } | |
1308 | } | |
1309 | } | |
1310 | } | |
e5b6e8a6 | 1311 | |
1312 | //AliDebug(5,(Form("track not found %d %d",label,event->GetNumberOfTracks())); | |
1313 | return NULL; | |
1314 | } | |
1315 | ||
1316 | ///________________________________________________________________________ | |
1317 | AliESDtrack *AliConversionCuts::GetESDTrack(AliESDEvent * event, Int_t label){ | |
1318 | //Returns pointer to the track with given ESD label | |
1319 | //(Important for AOD implementation, since Track array in AOD data is different | |
1320 | //from ESD array, but ESD tracklabels are stored in AOD Tracks) | |
1321 | ||
1322 | if(event) { | |
1323 | if(label > event->GetNumberOfTracks() ) return NULL; | |
1324 | AliESDtrack * track = event->GetTrack(label); | |
1325 | return track; | |
1326 | } | |
4a0aab28 | 1327 | //AliDebug(5,(Form("track not found %d %d",label,event->GetNumberOfTracks())); |
1328 | return NULL; | |
3b77b2d1 | 1329 | } |
1330 | ||
1331 | ||
e5b6e8a6 | 1332 | |
3b77b2d1 | 1333 | ///________________________________________________________________________ |
1334 | Bool_t AliConversionCuts::PIDProbabilityCut(AliConversionPhotonBase *photon, AliVEvent * event){ | |
4a0aab28 | 1335 | // Cut on Electron Probability for Photon Reconstruction |
3b77b2d1 | 1336 | |
4a0aab28 | 1337 | AliESDEvent * esdEvent = dynamic_cast<AliESDEvent*>(event); |
3b77b2d1 | 1338 | |
4a0aab28 | 1339 | if(esdEvent){ |
e5b6e8a6 | 1340 | |
4a0aab28 | 1341 | Bool_t iResult=kFALSE; |
e5b6e8a6 | 1342 | |
4a0aab28 | 1343 | Double_t *posProbArray = new Double_t[AliPID::kSPECIES]; |
1344 | Double_t *negProbArray = new Double_t[AliPID::kSPECIES]; | |
e5b6e8a6 | 1345 | |
4a0aab28 | 1346 | AliESDtrack* negTrack = esdEvent->GetTrack(photon->GetTrackLabelNegative()); |
1347 | AliESDtrack* posTrack = esdEvent->GetTrack(photon->GetTrackLabelPositive()); | |
e5b6e8a6 | 1348 | |
4a0aab28 | 1349 | if(negProbArray && posProbArray){ |
e5b6e8a6 | 1350 | |
4a0aab28 | 1351 | negTrack->GetTPCpid(negProbArray); |
1352 | posTrack->GetTPCpid(posProbArray); | |
3b77b2d1 | 1353 | |
4a0aab28 | 1354 | if(negProbArray[AliPID::kElectron]>=fPIDProbabilityCutNegativeParticle && posProbArray[AliPID::kElectron]>=fPIDProbabilityCutPositiveParticle){ |
1355 | iResult=kTRUE; | |
1356 | } | |
1357 | } | |
e5b6e8a6 | 1358 | |
4a0aab28 | 1359 | delete [] posProbArray; |
1360 | delete [] negProbArray; | |
1361 | return iResult; | |
3b77b2d1 | 1362 | |
4a0aab28 | 1363 | } else { |
3b77b2d1 | 1364 | ///Not possible for AODs |
1365 | return kTRUE; | |
4a0aab28 | 1366 | } |
3b77b2d1 | 1367 | |
1368 | ||
1369 | ||
e5b6e8a6 | 1370 | |
3b77b2d1 | 1371 | } |
1372 | ||
1373 | ||
1374 | ///________________________________________________________________________ | |
1375 | Bool_t AliConversionCuts::AcceptanceCut(TParticle *particle, TParticle * ePos,TParticle* eNeg){ | |
4a0aab28 | 1376 | // MC Acceptance Cuts |
1377 | //(Certain areas were excluded for photon reconstruction) | |
3b77b2d1 | 1378 | |
4a0aab28 | 1379 | if(particle->R()>fMaxR){ |
1380 | return kFALSE;} | |
3b77b2d1 | 1381 | |
4a0aab28 | 1382 | if(ePos->R()>fMaxR){ |
1383 | return kFALSE; | |
1384 | } | |
3b77b2d1 | 1385 | |
4a0aab28 | 1386 | if(ePos->R()<fMinR){ |
1387 | return kFALSE; | |
1388 | } | |
3b77b2d1 | 1389 | |
e5b6e8a6 | 1390 | if( ePos->R() <= ((abs(ePos->Vz())*fLineCutZRSlope)-fLineCutZValue)){ |
4a0aab28 | 1391 | return kFALSE; |
1392 | } | |
e5b6e8a6 | 1393 | else if (fUseEtaMinCut && ePos->R() >= ((abs(ePos->Vz())*fLineCutZRSlopeMin)-fLineCutZValueMin )){ |
3b77b2d1 | 1394 | return kFALSE; |
4a0aab28 | 1395 | } |
3b77b2d1 | 1396 | |
e5b6e8a6 | 1397 | if(abs(eNeg->Vz()) > fMaxZ ){ // cuts out regions where we do not reconstruct |
4a0aab28 | 1398 | return kFALSE; |
1399 | } | |
3b77b2d1 | 1400 | |
4a0aab28 | 1401 | if(eNeg->Vz()!=ePos->Vz()||eNeg->R()!=ePos->R()){ |
1402 | return kFALSE; | |
1403 | } | |
3b77b2d1 | 1404 | |
e5b6e8a6 | 1405 | if(abs(ePos->Vz()) > fMaxZ ){ // cuts out regions where we do not reconstruct |
4a0aab28 | 1406 | return kFALSE; |
1407 | } | |
3b77b2d1 | 1408 | |
e5b6e8a6 | 1409 | if(abs(particle->Eta())> fEtaCut || abs(particle->Eta())< fEtaCutMin){ |
4a0aab28 | 1410 | return kFALSE; |
1411 | } | |
3b77b2d1 | 1412 | |
e5b6e8a6 | 1413 | if(abs(ePos->Eta())> fEtaCut || abs(ePos->Eta())< fEtaCutMin){ |
4a0aab28 | 1414 | return kFALSE; |
1415 | } | |
3b77b2d1 | 1416 | |
e5b6e8a6 | 1417 | if(abs(eNeg->Eta())> fEtaCut || abs(eNeg->Eta())< fEtaCutMin){ |
4a0aab28 | 1418 | return kFALSE; |
1419 | } | |
3b77b2d1 | 1420 | |
4a0aab28 | 1421 | if( ePos->Pt()< fSinglePtCut || eNeg->Pt()< fSinglePtCut){ |
1422 | return kFALSE; | |
1423 | } | |
3b77b2d1 | 1424 | |
4a0aab28 | 1425 | if(particle->Pt()<fPtCut){ |
1426 | return kFALSE; | |
1427 | } | |
3b77b2d1 | 1428 | |
4a0aab28 | 1429 | return kTRUE; |
3b77b2d1 | 1430 | } |
1431 | ///________________________________________________________________________ | |
e5b6e8a6 | 1432 | Bool_t AliConversionCuts::UpdateCutString() { |
4a0aab28 | 1433 | ///Update the cut string (if it has been created yet) |
3b77b2d1 | 1434 | |
4a0aab28 | 1435 | if(fCutString && fCutString->GetString().Length() == kNCuts) { |
1436 | fCutString->SetString(GetCutNumber()); | |
1437 | } else { | |
1438 | return kFALSE; | |
1439 | } | |
1440 | return kTRUE; | |
3b77b2d1 | 1441 | } |
1442 | ||
1443 | ///________________________________________________________________________ | |
1444 | Bool_t AliConversionCuts::InitializeCutsFromCutString(const TString analysisCutSelection ) { | |
1445 | // Initialize Cuts from a given Cut string | |
1446 | ||
4a0aab28 | 1447 | AliInfo(Form("Set Photoncut Number: %s",analysisCutSelection.Data())); |
1448 | if(analysisCutSelection.Length()!=kNCuts) { | |
1449 | AliError(Form("Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(), kNCuts)); | |
1450 | return kFALSE; | |
1451 | } | |
1452 | if(!analysisCutSelection.IsDigit()){ | |
1453 | AliError("Cut selection contains characters"); | |
1454 | return kFALSE; | |
1455 | } | |
e5b6e8a6 | 1456 | |
4a0aab28 | 1457 | const char *cutSelection = analysisCutSelection.Data(); |
1458 | #define ASSIGNARRAY(i) fCuts[i] = cutSelection[i] - '0' | |
1459 | for(Int_t ii=0;ii<kNCuts;ii++){ | |
3b77b2d1 | 1460 | ASSIGNARRAY(ii); |
4a0aab28 | 1461 | } |
3b77b2d1 | 1462 | |
4a0aab28 | 1463 | // Set Individual Cuts |
1464 | for(Int_t ii=0;ii<kNCuts;ii++){ | |
3b77b2d1 | 1465 | if(!SetCut(cutIds(ii),fCuts[ii]))return kFALSE; |
4a0aab28 | 1466 | } |
3b77b2d1 | 1467 | |
4a0aab28 | 1468 | //PrintCuts(); |
92efd725 | 1469 | |
4a0aab28 | 1470 | // Set StandardTriggers |
92efd725 | 1471 | |
4a0aab28 | 1472 | if(fIsHeavyIon)SelectCollisionCandidates(AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral); |
1473 | else SelectCollisionCandidates(AliVEvent::kMB); | |
3b77b2d1 | 1474 | |
4a0aab28 | 1475 | return kTRUE; |
3b77b2d1 | 1476 | } |
1477 | ///________________________________________________________________________ | |
1478 | Bool_t AliConversionCuts::SetCut(cutIds cutID, const Int_t value) { | |
4a0aab28 | 1479 | ///Set individual cut ID |
3b77b2d1 | 1480 | |
4a0aab28 | 1481 | switch (cutID) { |
e5b6e8a6 | 1482 | |
4a0aab28 | 1483 | case kv0FinderType: |
1484 | if( SetV0Finder(value)) { | |
1485 | fCuts[kv0FinderType] = value; | |
e5b6e8a6 | 1486 | UpdateCutString(); |
4a0aab28 | 1487 | return kTRUE; |
1488 | } else return kFALSE; | |
1489 | ||
1490 | case kededxSigmaCut: | |
1491 | if( SetTPCdEdxCutElectronLine(value)) { | |
1492 | fCuts[kededxSigmaCut] = value; | |
e5b6e8a6 | 1493 | UpdateCutString(); |
4a0aab28 | 1494 | return kTRUE; |
1495 | } else return kFALSE; | |
1496 | ||
1497 | case kpidedxSigmaCut: | |
1498 | if( SetTPCdEdxCutPionLine(value)) { | |
1499 | fCuts[kpidedxSigmaCut] = value; | |
e5b6e8a6 | 1500 | UpdateCutString(); |
4a0aab28 | 1501 | return kTRUE; |
1502 | } else return kFALSE; | |
1503 | ||
1504 | case kpiMomdedxSigmaCut: | |
1505 | if( SetMinMomPiondEdxCut(value)) { | |
1506 | fCuts[kpiMomdedxSigmaCut] = value; | |
e5b6e8a6 | 1507 | UpdateCutString(); |
4a0aab28 | 1508 | return kTRUE; |
1509 | } else return kFALSE; | |
1510 | ||
1511 | case kchi2GammaCut: | |
1512 | if( SetChi2GammaCut(value)) { | |
1513 | fCuts[kchi2GammaCut] = value; | |
e5b6e8a6 | 1514 | UpdateCutString(); |
4a0aab28 | 1515 | return kTRUE; |
1516 | } else return kFALSE; | |
1517 | ||
1518 | case ksinglePtCut: | |
1519 | if( SetSinglePtCut(value)) { | |
1520 | fCuts[ksinglePtCut] = value; | |
e5b6e8a6 | 1521 | UpdateCutString(); |
4a0aab28 | 1522 | return kTRUE; |
1523 | } else return kFALSE; | |
1524 | ||
1525 | case kclsTPCCut: | |
1526 | if( SetTPCClusterCut(value)) { | |
1527 | fCuts[kclsTPCCut] = value; | |
e5b6e8a6 | 1528 | UpdateCutString(); |
4a0aab28 | 1529 | return kTRUE; |
1530 | } else return kFALSE; | |
1531 | ||
1532 | case ketaCut: | |
1533 | if( SetEtaCut(value)) { | |
1534 | fCuts[ketaCut] = value; | |
e5b6e8a6 | 1535 | UpdateCutString(); |
4a0aab28 | 1536 | return kTRUE; |
1537 | } else return kFALSE; | |
1538 | ||
1539 | case kLowPRejectionSigmaCut: | |
1540 | if( SetLowPRejectionCuts(value)) { | |
1541 | fCuts[kLowPRejectionSigmaCut] = value; | |
e5b6e8a6 | 1542 | UpdateCutString(); |
4a0aab28 | 1543 | return kTRUE; |
1544 | } else return kFALSE; | |
1545 | ||
1546 | case kQtMaxCut: | |
1547 | if( SetQtMaxCut(value)) { | |
1548 | fCuts[kQtMaxCut] = value; | |
e5b6e8a6 | 1549 | UpdateCutString(); |
4a0aab28 | 1550 | return kTRUE; |
1551 | } else return kFALSE; | |
1552 | ||
1553 | case kpiMaxMomdedxSigmaCut: | |
1554 | if( SetMaxMomPiondEdxCut(value)) { | |
1555 | fCuts[kpiMaxMomdedxSigmaCut] = value; | |
e5b6e8a6 | 1556 | UpdateCutString(); |
4a0aab28 | 1557 | return kTRUE; |
1558 | } else return kFALSE; | |
1559 | ||
1560 | case kRCut: | |
1561 | if( SetRCut(value)) { | |
1562 | fCuts[kRCut] = value; | |
e5b6e8a6 | 1563 | UpdateCutString(); |
4a0aab28 | 1564 | return kTRUE; |
1565 | } else return kFALSE; | |
1566 | ||
1567 | case kremovePileUp: | |
1568 | if( SetRemovePileUp(value)) { | |
1569 | fCuts[kremovePileUp] = value; | |
e5b6e8a6 | 1570 | UpdateCutString(); |
4a0aab28 | 1571 | return kTRUE; |
1572 | } else return kFALSE; | |
1573 | ||
1574 | case kselectV0AND: | |
e5b6e8a6 | 1575 | if( SetSelectSpecialTrigger(value)) { |
4a0aab28 | 1576 | fCuts[kselectV0AND] = value; |
e5b6e8a6 | 1577 | UpdateCutString(); |
4a0aab28 | 1578 | return kTRUE; |
1579 | } else return kFALSE; | |
1580 | ||
1581 | case kmultiplicityMethod: | |
1582 | if( SetMultiplicityMethod(value)) { | |
1583 | fCuts[kmultiplicityMethod] = value; | |
e5b6e8a6 | 1584 | UpdateCutString(); |
4a0aab28 | 1585 | return kTRUE; |
1586 | } else return kFALSE; | |
1587 | ||
1588 | case kisHeavyIon: | |
1589 | if( SetIsHeavyIon(value)) { | |
1590 | fCuts[kisHeavyIon] = value; | |
e5b6e8a6 | 1591 | UpdateCutString(); |
4a0aab28 | 1592 | return kTRUE; |
1593 | } else return kFALSE; | |
1594 | ||
1595 | case kCentralityMin: | |
1596 | if( SetCentralityMin(value)) { | |
1597 | fCuts[kCentralityMin] = value; | |
e5b6e8a6 | 1598 | UpdateCutString(); |
4a0aab28 | 1599 | return kTRUE; |
1600 | } else return kFALSE; | |
1601 | ||
1602 | case kCentralityMax: | |
1603 | if( SetCentralityMax(value)) { | |
1604 | fCuts[kCentralityMax] = value; | |
e5b6e8a6 | 1605 | UpdateCutString(); |
4a0aab28 | 1606 | return kTRUE; |
1607 | } else return kFALSE; | |
1608 | ||
1609 | case kTOFelectronPID: | |
1610 | if( SetTOFElectronPIDCut(value)) { | |
1611 | fCuts[kTOFelectronPID] = value; | |
e5b6e8a6 | 1612 | UpdateCutString(); |
4a0aab28 | 1613 | return kTRUE; |
1614 | } else return kFALSE; | |
1615 | ||
1616 | case kdoPhotonAsymmetryCut: | |
1617 | if( SetPhotonAsymmetryCut(value)) { | |
1618 | fCuts[kdoPhotonAsymmetryCut] = value; | |
e5b6e8a6 | 1619 | UpdateCutString(); |
4a0aab28 | 1620 | return kTRUE; |
1621 | } else return kFALSE; | |
1622 | ||
1623 | case kPsiPair: | |
1624 | if( SetPsiPairCut(value)) { | |
1625 | fCuts[kPsiPair] = value; | |
e5b6e8a6 | 1626 | UpdateCutString(); |
4a0aab28 | 1627 | return kTRUE; |
1628 | } else return kFALSE; | |
1629 | ||
1630 | case kCosPAngle: | |
1631 | if( SetCosPAngleCut(value)) { | |
1632 | fCuts[kCosPAngle] = value; | |
e5b6e8a6 | 1633 | UpdateCutString(); |
4a0aab28 | 1634 | return kTRUE; |
1635 | } else return kFALSE; | |
1636 | ||
1637 | ||
1638 | case kElecShare: | |
1639 | if( SetSharedElectronCut(value)) { | |
1640 | fCuts[kElecShare] = value; | |
e5b6e8a6 | 1641 | UpdateCutString(); |
4a0aab28 | 1642 | return kTRUE; |
1643 | } else return kFALSE; | |
1644 | ||
4a0aab28 | 1645 | case kToCloseV0s: |
1646 | if( SetToCloseV0sCut(value)) { | |
1647 | fCuts[kToCloseV0s] = value; | |
e5b6e8a6 | 1648 | UpdateCutString(); |
4a0aab28 | 1649 | return kTRUE; |
1650 | } else return kFALSE; | |
1651 | ||
1652 | case kExtraSignals: | |
1653 | if( SetRejectExtraSignalsCut(value)) { | |
1654 | fCuts[kExtraSignals] = value; | |
e5b6e8a6 | 1655 | UpdateCutString(); |
4a0aab28 | 1656 | return kTRUE; |
1657 | } else return kFALSE; | |
1658 | ||
4a0aab28 | 1659 | case kNCuts: |
92efd725 | 1660 | AliError("Cut id out of range"); |
4a0aab28 | 1661 | return kFALSE; |
1662 | } | |
d008165e | 1663 | |
4a0aab28 | 1664 | AliError("Cut id %d not recognized"); |
1665 | return kFALSE; | |
3b77b2d1 | 1666 | |
e5b6e8a6 | 1667 | |
3b77b2d1 | 1668 | } |
1669 | ///________________________________________________________________________ | |
e5b6e8a6 | 1670 | void AliConversionCuts::PrintCuts() { |
1671 | // Print out current Cut Selection | |
1672 | for(Int_t ic = 0; ic < kNCuts; ic++) { | |
1673 | printf("%-30s : %d \n", fgkCutNames[ic], fCuts[ic]); | |
1674 | } | |
1675 | } | |
1676 | ///________________________________________________________________________ | |
1677 | Bool_t AliConversionCuts::SetIsHeavyIon(Int_t isHeavyIon) | |
1678 | { // Set Cut | |
1679 | switch(isHeavyIon){ | |
4a0aab28 | 1680 | case 0: |
e5b6e8a6 | 1681 | fIsHeavyIon=0; |
4a0aab28 | 1682 | break; |
1683 | case 1: | |
e5b6e8a6 | 1684 | fIsHeavyIon=1; |
1685 | fDetectorCentrality=0; | |
1686 | break; | |
1687 | case 2: | |
1688 | fIsHeavyIon=1; | |
1689 | fDetectorCentrality=1; | |
1690 | break; | |
1691 | case 3: //allows to select centrality 0-45% in steps of 5% for V0 Multiplicity | |
1692 | fIsHeavyIon=1; | |
1693 | fDetectorCentrality=0; | |
1694 | fModCentralityClass=1; | |
1695 | break; | |
1696 | case 4: //allows to select centrality 45-90% in steps of 5% for V0 Multiplicity | |
1697 | fIsHeavyIon=1; | |
1698 | fDetectorCentrality=0; | |
1699 | fModCentralityClass=2; | |
1700 | break; | |
1701 | case 5: //strict cut on v0 tracks for MC | |
1702 | fIsHeavyIon=1; | |
1703 | fDetectorCentrality=0; | |
1704 | fModCentralityClass=3; | |
1705 | break; | |
1706 | case 6: //allows to select centrality 0-45% in steps of 5% for V0 Multiplicity | |
1707 | //strict cut on v0 tracks for MC | |
1708 | fIsHeavyIon=1; | |
1709 | fDetectorCentrality=0; | |
1710 | fModCentralityClass=4; | |
1711 | break; | |
1712 | case 7: //allows to select centrality 45-90% in steps of 5% for V0 Multiplicity | |
1713 | //strict cut on v0 tracks for MC | |
1714 | fIsHeavyIon=1; | |
1715 | fDetectorCentrality=0; | |
1716 | fModCentralityClass=5; | |
4a0aab28 | 1717 | break; |
0a2b2b4b | 1718 | case 8: |
1719 | fIsHeavyIon=2; | |
1720 | fDetectorCentrality=0; | |
1721 | break; | |
1722 | case 9: | |
1723 | fIsHeavyIon=2; | |
1724 | fDetectorCentrality=1; | |
1725 | break; | |
4a0aab28 | 1726 | default: |
e5b6e8a6 | 1727 | AliError(Form("SetHeavyIon not defined %d",isHeavyIon)); |
4a0aab28 | 1728 | return kFALSE; |
1729 | } | |
1730 | return kTRUE; | |
3b77b2d1 | 1731 | } |
0a2b2b4b | 1732 | |
e5b6e8a6 | 1733 | //___________________________________________________________________ |
1734 | Bool_t AliConversionCuts::SetCentralityMin(Int_t minCentrality) | |
1735 | { | |
1736 | // Set Cut | |
1737 | if(minCentrality<0||minCentrality>9){ | |
1738 | AliError(Form("minCentrality not defined %d",minCentrality)); | |
1739 | return kFALSE; | |
1740 | } | |
3b77b2d1 | 1741 | |
e5b6e8a6 | 1742 | fCentralityMin=minCentrality; |
1743 | return kTRUE; | |
1744 | } | |
1745 | //___________________________________________________________________ | |
1746 | Bool_t AliConversionCuts::SetCentralityMax(Int_t maxCentrality) | |
1747 | { | |
1748 | // Set Cut | |
1749 | if(maxCentrality<0||maxCentrality>9){ | |
1750 | AliError(Form("maxCentrality not defined %d",maxCentrality)); | |
1751 | return kFALSE; | |
1752 | } | |
1753 | fCentralityMax=maxCentrality; | |
1754 | return kTRUE; | |
1755 | } | |
3b77b2d1 | 1756 | ///________________________________________________________________________ |
e5b6e8a6 | 1757 | Int_t AliConversionCuts::SetSelectSpecialTrigger(Int_t selectSpecialTrigger) |
3b77b2d1 | 1758 | {// Set Cut |
e5b6e8a6 | 1759 | |
1760 | switch(selectSpecialTrigger){ | |
4a0aab28 | 1761 | case 0: |
e5b6e8a6 | 1762 | fSpecialTrigger=0; // dont care |
3b77b2d1 | 1763 | break; |
4a0aab28 | 1764 | case 1: |
e5b6e8a6 | 1765 | fSpecialTrigger=1; // V0AND |
1766 | break; | |
1767 | case 2: | |
1768 | fSpecialTrigger=2; // with SDD requested | |
1769 | break; | |
1770 | case 3: | |
1771 | fSpecialTrigger=3; // V0AND plus with SDD requested | |
3b77b2d1 | 1772 | break; |
e5b6e8a6 | 1773 | |
4a0aab28 | 1774 | default: |
e5b6e8a6 | 1775 | AliError("Warning: Special Trigger Not known"); |
3b77b2d1 | 1776 | return kFALSE; |
4a0aab28 | 1777 | } |
1778 | return kTRUE; | |
3b77b2d1 | 1779 | } |
3b77b2d1 | 1780 | ///________________________________________________________________________ |
92efd725 | 1781 | Bool_t AliConversionCuts::SetMultiplicityMethod(Int_t multiplicityMethod) |
1782 | { | |
4a0aab28 | 1783 | // Set Cut |
1784 | fMultiplicityMethod=multiplicityMethod; | |
92efd725 | 1785 | |
4a0aab28 | 1786 | // 0 Photon Multiplicity |
1787 | // 1 TPC Track multiplicity | |
1788 | // 2 V0 Mult | |
1789 | // 3 SPD Mult | |
92efd725 | 1790 | |
4a0aab28 | 1791 | return kTRUE; |
3b77b2d1 | 1792 | } |
3b77b2d1 | 1793 | ///________________________________________________________________________ |
e5b6e8a6 | 1794 | Bool_t AliConversionCuts::SetRemovePileUp(Int_t removePileUp) |
1795 | {// Set Cut | |
1796 | switch(removePileUp){ | |
1797 | case 0: | |
1798 | fRemovePileUp=kFALSE; | |
1799 | break; | |
1800 | case 1: | |
1801 | fRemovePileUp=kTRUE; | |
1802 | break; | |
1803 | default: | |
1804 | AliError("RemovePileUpCut not defined"); | |
1805 | return kFALSE; | |
4a0aab28 | 1806 | } |
e5b6e8a6 | 1807 | return kTRUE; |
3b77b2d1 | 1808 | } |
3b77b2d1 | 1809 | ///________________________________________________________________________ |
e5b6e8a6 | 1810 | Bool_t AliConversionCuts::SetRejectExtraSignalsCut(Int_t extraSignal) { |
1811 | ||
1812 | switch(extraSignal){ | |
4a0aab28 | 1813 | case 0: |
e5b6e8a6 | 1814 | fRejectExtraSignals = 0; |
1815 | break; // No Rejection | |
4a0aab28 | 1816 | case 1: |
e5b6e8a6 | 1817 | fRejectExtraSignals = 1; |
1818 | break; // MinBias Header | |
4a0aab28 | 1819 | case 2: |
e5b6e8a6 | 1820 | fRejectExtraSignals = 2; |
1821 | break; // User String Array | |
4a0aab28 | 1822 | case 3: |
e5b6e8a6 | 1823 | fRejectExtraSignals = 3; |
1824 | break; // Rejection for Gamma Correction only | |
1825 | default: | |
1826 | AliError(Form("Extra Signal Rejection not defined %d",extraSignal)); | |
1827 | return kFALSE; | |
1828 | } | |
1829 | return kTRUE; | |
1830 | } | |
1831 | ///________________________________________________________________________ | |
1832 | Bool_t AliConversionCuts::SetV0Finder(Int_t v0FinderType) | |
1833 | { // Set Cut | |
1834 | switch (v0FinderType){ | |
1835 | case 0: // on fly V0 finder | |
1836 | fUseOnFlyV0Finder=kTRUE; | |
4a0aab28 | 1837 | break; |
e5b6e8a6 | 1838 | case 1: // offline V0 finder |
1839 | fUseOnFlyV0Finder=kFALSE; | |
4a0aab28 | 1840 | break; |
4a0aab28 | 1841 | default: |
e5b6e8a6 | 1842 | AliError(Form(" v0FinderType not defined %d",v0FinderType)); |
4a0aab28 | 1843 | return kFALSE; |
1844 | } | |
1845 | return kTRUE; | |
3b77b2d1 | 1846 | } |
3b77b2d1 | 1847 | ///________________________________________________________________________ |
e5b6e8a6 | 1848 | Bool_t AliConversionCuts::SetEtaCut(Int_t etaCut) |
3b77b2d1 | 1849 | { // Set Cut |
e5b6e8a6 | 1850 | |
1851 | //Set Standard LineCutZValues | |
1852 | fLineCutZValueMin = -2; | |
1853 | fLineCutZValue = 7.; | |
1854 | ||
1855 | switch(etaCut){ | |
1856 | case 0: // 0.9 | |
1857 | fEtaCut = 0.9; | |
1858 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); | |
1859 | fEtaCutMin = -0.1; | |
1860 | fLineCutZRSlopeMin = 0.; | |
4a0aab28 | 1861 | break; |
e5b6e8a6 | 1862 | case 1: // 1.2 |
1863 | fEtaCut = 1.2; | |
1864 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); | |
1865 | fEtaCutMin = -0.1; | |
1866 | fLineCutZRSlopeMin = 0.; | |
4a0aab28 | 1867 | break; |
e5b6e8a6 | 1868 | case 2: // 1.4 |
1869 | fEtaCut = 1.4; | |
1870 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); | |
1871 | fEtaCutMin = -0.1; | |
1872 | fLineCutZRSlopeMin = 0.; | |
4a0aab28 | 1873 | break; |
e5b6e8a6 | 1874 | case 3: // 0.8 |
1875 | fEtaCut = 0.8; | |
1876 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); | |
1877 | fEtaCutMin = -0.1; | |
1878 | fLineCutZRSlopeMin = 0.; | |
4a0aab28 | 1879 | break; |
a280ac15 | 1880 | case 4: // 0.75 |
1881 | fEtaCut = 0.75; | |
e5b6e8a6 | 1882 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); |
1883 | fEtaCutMin = -0.1; | |
1884 | fLineCutZRSlopeMin = 0.; | |
4a0aab28 | 1885 | break; |
e5b6e8a6 | 1886 | case 5: // 0.9 - 1.4 |
1887 | fEtaCut = 1.4; | |
1888 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); | |
1889 | fEtaCutMin = 0.9; | |
1890 | fLineCutZRSlopeMin = tan(2*atan(exp(-fEtaCutMin))); | |
4a0aab28 | 1891 | break; |
e5b6e8a6 | 1892 | case 6: // 5. |
1893 | fEtaCut = 5.; | |
1894 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); | |
1895 | fEtaCutMin = -0.1; | |
1896 | fLineCutZRSlopeMin = 0.; | |
4a0aab28 | 1897 | break; |
e5b6e8a6 | 1898 | case 7: // 0.1 - 0.8 |
1899 | fEtaCut = 0.8; | |
1900 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); | |
1901 | fEtaCutMin = 0.1; | |
1902 | fLineCutZRSlopeMin = tan(2*atan(exp(-fEtaCutMin))); | |
1903 | break; | |
1904 | case 8: // 0.1 - 0.8 | |
1905 | fEtaCut = 0.9; | |
1906 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); | |
1907 | fEtaCutMin = 0.1; | |
1908 | fLineCutZRSlopeMin = tan(2*atan(exp(-fEtaCutMin))); | |
1909 | break; | |
1910 | case 9: // 10 | |
1911 | fEtaCut = 10; | |
1912 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); | |
1913 | fEtaCutMin = -0.1; | |
1914 | fLineCutZRSlopeMin = 0.; | |
4a0aab28 | 1915 | break; |
1916 | default: | |
e5b6e8a6 | 1917 | AliError(Form(" EtaCut not defined %d",etaCut)); |
4a0aab28 | 1918 | return kFALSE; |
4a0aab28 | 1919 | } |
1920 | return kTRUE; | |
3b77b2d1 | 1921 | } |
3b77b2d1 | 1922 | ///________________________________________________________________________ |
e5b6e8a6 | 1923 | Bool_t AliConversionCuts::SetRCut(Int_t RCut){ |
1924 | // Set Cut | |
1925 | switch(RCut){ | |
1926 | case 0: | |
1927 | fMinR=0; | |
1928 | fMaxR = 180.; | |
4a0aab28 | 1929 | break; |
e5b6e8a6 | 1930 | case 1: |
1931 | fMinR=2.8; | |
1932 | fMaxR = 180.; | |
4a0aab28 | 1933 | break; |
e5b6e8a6 | 1934 | case 2: |
1935 | fMinR=5.; | |
1936 | fMaxR = 180.; | |
4a0aab28 | 1937 | break; |
e5b6e8a6 | 1938 | case 3: |
1939 | fMaxR = 70.; | |
1940 | fMinR = 10.; | |
4a0aab28 | 1941 | break; |
e5b6e8a6 | 1942 | case 4: |
1943 | fMaxR = 70.; | |
1944 | fMinR = 5.; | |
4a0aab28 | 1945 | break; |
e5b6e8a6 | 1946 | // High purity cuts for PbPb (remove first layers of material) |
1947 | case 5: | |
1948 | fMaxR = 180.; | |
1949 | fMinR = 10.; | |
4a0aab28 | 1950 | break; |
e5b6e8a6 | 1951 | case 6: |
1952 | fMaxR = 180.; | |
1953 | fMinR = 20.; | |
4a0aab28 | 1954 | break; |
e5b6e8a6 | 1955 | case 7: |
1956 | fMaxR = 180.; | |
1957 | fMinR = 26.; | |
4a0aab28 | 1958 | break; |
e5b6e8a6 | 1959 | case 8: |
1960 | fMaxR = 180.; | |
1961 | fMinR = 35.; | |
4a0aab28 | 1962 | break; |
1963 | case 9: | |
e5b6e8a6 | 1964 | fMaxR = 35.; |
1965 | fMinR = 5.; | |
4a0aab28 | 1966 | break; |
e5b6e8a6 | 1967 | |
4a0aab28 | 1968 | default: |
e5b6e8a6 | 1969 | AliError("RCut not defined"); |
4a0aab28 | 1970 | return kFALSE; |
1971 | } | |
1972 | return kTRUE; | |
92efd725 | 1973 | } |
92efd725 | 1974 | ///________________________________________________________________________ |
e5b6e8a6 | 1975 | Bool_t AliConversionCuts::SetSinglePtCut(Int_t singlePtCut) |
92efd725 | 1976 | { // Set Cut |
e5b6e8a6 | 1977 | switch(singlePtCut){ |
1978 | case 0: // 0.050 GeV | |
1979 | fSinglePtCut = 0.050; | |
4a0aab28 | 1980 | break; |
e5b6e8a6 | 1981 | case 1: // 0.100 GeV |
1982 | fSinglePtCut = 0.100; | |
4a0aab28 | 1983 | break; |
e5b6e8a6 | 1984 | case 2: // 0.150 GeV |
1985 | fSinglePtCut = 0.150; | |
4a0aab28 | 1986 | break; |
e5b6e8a6 | 1987 | case 3: // 0.200 GeV |
1988 | fSinglePtCut = 0.200; | |
4a0aab28 | 1989 | break; |
e5b6e8a6 | 1990 | case 4: // 0.075 GeV |
1991 | fSinglePtCut = 0.075; | |
4a0aab28 | 1992 | break; |
e5b6e8a6 | 1993 | case 5: // 0.125 GeV |
1994 | fSinglePtCut = 0.125; | |
4a0aab28 | 1995 | break; |
e5b6e8a6 | 1996 | case 6: // 0.04 GeV |
1997 | fSinglePtCut = 0.040; | |
4a0aab28 | 1998 | break; |
e5b6e8a6 | 1999 | case 7: // 0.0 GeV |
2000 | fSinglePtCut = 0.0; | |
4a0aab28 | 2001 | break; |
2002 | default: | |
e5b6e8a6 | 2003 | AliError(Form("singlePtCut not defined %d",singlePtCut)); |
4a0aab28 | 2004 | return kFALSE; |
2005 | } | |
2006 | return kTRUE; | |
3b77b2d1 | 2007 | } |
3b77b2d1 | 2008 | ///________________________________________________________________________ |
e5b6e8a6 | 2009 | Bool_t AliConversionCuts::SetTPCClusterCut(Int_t clsTPCCut) |
3b77b2d1 | 2010 | { // Set Cut |
e5b6e8a6 | 2011 | switch(clsTPCCut){ |
2012 | case 0: // 0 | |
2013 | fMinClsTPC= 0.; | |
4a0aab28 | 2014 | break; |
e5b6e8a6 | 2015 | case 1: // 70 |
2016 | fMinClsTPC= 70.; | |
4a0aab28 | 2017 | break; |
e5b6e8a6 | 2018 | case 2: // 80 |
2019 | fMinClsTPC= 80.; | |
4a0aab28 | 2020 | break; |
e5b6e8a6 | 2021 | case 3: // 100 |
2022 | fMinClsTPC= 100.; | |
4a0aab28 | 2023 | break; |
e5b6e8a6 | 2024 | case 4: // 60% of findable clusters |
2025 | fMinClsTPCToF= 0.6; | |
2026 | fUseCorrectedTPCClsInfo=0; | |
4a0aab28 | 2027 | break; |
e5b6e8a6 | 2028 | case 5: // 0% of findable clusters |
2029 | fMinClsTPCToF= 0.0; | |
2030 | fUseCorrectedTPCClsInfo=1; | |
4a0aab28 | 2031 | break; |
e5b6e8a6 | 2032 | case 6: // 70% of findable clusters |
2033 | fMinClsTPCToF= 0.7; | |
2034 | fUseCorrectedTPCClsInfo=1; | |
4a0aab28 | 2035 | break; |
e5b6e8a6 | 2036 | case 7: // 0% of findable clusters |
2037 | fMinClsTPCToF= 0.35; | |
2038 | fUseCorrectedTPCClsInfo=0; | |
4a0aab28 | 2039 | break; |
2040 | case 8: | |
e5b6e8a6 | 2041 | fMinClsTPCToF= 0.35; |
2042 | fUseCorrectedTPCClsInfo=1; | |
4a0aab28 | 2043 | break; |
2044 | case 9: | |
e5b6e8a6 | 2045 | fMinClsTPCToF= 0.6; |
2046 | fUseCorrectedTPCClsInfo=1; | |
4a0aab28 | 2047 | break; |
2048 | default: | |
e5b6e8a6 | 2049 | AliError(Form("Warning: clsTPCCut not defined %d",clsTPCCut)); |
4a0aab28 | 2050 | return kFALSE; |
2051 | } | |
2052 | return kTRUE; | |
3b77b2d1 | 2053 | } |
3b77b2d1 | 2054 | ///________________________________________________________________________ |
e5b6e8a6 | 2055 | Bool_t AliConversionCuts::SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut) |
3b77b2d1 | 2056 | { // Set Cut |
e5b6e8a6 | 2057 | switch(ededxSigmaCut){ |
2058 | case 0: // -10,10 | |
2059 | fPIDnSigmaBelowElectronLine=-10; | |
2060 | fPIDnSigmaAboveElectronLine=10; | |
4a0aab28 | 2061 | break; |
e5b6e8a6 | 2062 | case 1: // -5,5 |
2063 | fPIDnSigmaBelowElectronLine=-5; | |
2064 | fPIDnSigmaAboveElectronLine=5; | |
4a0aab28 | 2065 | break; |
e5b6e8a6 | 2066 | case 2: // -3,5 |
2067 | fPIDnSigmaBelowElectronLine=-3; | |
2068 | fPIDnSigmaAboveElectronLine=5; | |
4a0aab28 | 2069 | break; |
e5b6e8a6 | 2070 | case 3: // -4,5 |
2071 | fPIDnSigmaBelowElectronLine=-4; | |
2072 | fPIDnSigmaAboveElectronLine=5; | |
4a0aab28 | 2073 | break; |
e5b6e8a6 | 2074 | case 4: // -6,7 |
2075 | fPIDnSigmaBelowElectronLine=-6; | |
2076 | fPIDnSigmaAboveElectronLine=7; | |
4a0aab28 | 2077 | break; |
e5b6e8a6 | 2078 | case 5: // -4,4 |
2079 | fPIDnSigmaBelowElectronLine=-4; | |
2080 | fPIDnSigmaAboveElectronLine=4; | |
4a0aab28 | 2081 | break; |
e5b6e8a6 | 2082 | case 6: // -2.5,4 |
2083 | fPIDnSigmaBelowElectronLine=-2.5; | |
2084 | fPIDnSigmaAboveElectronLine=4; | |
4a0aab28 | 2085 | break; |
e5b6e8a6 | 2086 | case 7: // -2,3.5 |
2087 | fPIDnSigmaBelowElectronLine=-2; | |
2088 | fPIDnSigmaAboveElectronLine=3.5; | |
4a0aab28 | 2089 | break; |
2090 | default: | |
e5b6e8a6 | 2091 | AliError("TPCdEdxCutElectronLine not defined"); |
4a0aab28 | 2092 | return kFALSE; |
e5b6e8a6 | 2093 | |
4a0aab28 | 2094 | } |
2095 | return kTRUE; | |
3b77b2d1 | 2096 | } |
2097 | ///________________________________________________________________________ | |
e5b6e8a6 | 2098 | Bool_t AliConversionCuts::SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut) |
3b77b2d1 | 2099 | { // Set Cut |
e5b6e8a6 | 2100 | |
2101 | switch(pidedxSigmaCut){ | |
2102 | case 0: // -10 | |
2103 | fPIDnSigmaAbovePionLine=-10; | |
2104 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2105 | break; |
e5b6e8a6 | 2106 | case 1: // 0 |
2107 | fPIDnSigmaAbovePionLine=0; | |
2108 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2109 | break; |
e5b6e8a6 | 2110 | case 2: // 1 |
2111 | fPIDnSigmaAbovePionLine=1; | |
2112 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2113 | break; |
e5b6e8a6 | 2114 | case 3: // 1 |
2115 | fPIDnSigmaAbovePionLine=2.5; | |
2116 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2117 | break; |
e5b6e8a6 | 2118 | case 4: // 1 |
2119 | fPIDnSigmaAbovePionLine=0.5; | |
2120 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2121 | break; |
e5b6e8a6 | 2122 | case 5: // 1 |
2123 | fPIDnSigmaAbovePionLine=2.; | |
2124 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2125 | break; |
e5b6e8a6 | 2126 | case 6: // 1 |
2127 | fPIDnSigmaAbovePionLine=2.; | |
2128 | fPIDnSigmaAbovePionLineHighPt=0.5; | |
4a0aab28 | 2129 | break; |
e5b6e8a6 | 2130 | case 7: // 1 |
2131 | fPIDnSigmaAbovePionLine=3.5; | |
2132 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2133 | break; |
e5b6e8a6 | 2134 | case 8: // 1 |
2135 | fPIDnSigmaAbovePionLine=2.; | |
2136 | fPIDnSigmaAbovePionLineHighPt=1.; | |
4a0aab28 | 2137 | break; |
2138 | case 9: | |
e5b6e8a6 | 2139 | fPIDnSigmaAbovePionLine=3.0; // We need a bit less tight cut on dE/dx |
2140 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2141 | break; |
2142 | default: | |
e5b6e8a6 | 2143 | AliError(Form("Warning: pidedxSigmaCut not defined %d",pidedxSigmaCut)); |
4a0aab28 | 2144 | return kFALSE; |
2145 | } | |
2146 | return kTRUE; | |
3b77b2d1 | 2147 | } |
3b77b2d1 | 2148 | ///________________________________________________________________________ |
e5b6e8a6 | 2149 | Bool_t AliConversionCuts::SetMinMomPiondEdxCut(Int_t piMomdedxSigmaCut) |
3b77b2d1 | 2150 | { // Set Cut |
e5b6e8a6 | 2151 | switch(piMomdedxSigmaCut){ |
2152 | case 0: // 0.5 GeV | |
2153 | fPIDMinPnSigmaAbovePionLine=0.5; | |
4a0aab28 | 2154 | break; |
e5b6e8a6 | 2155 | case 1: // 1. GeV |
2156 | fPIDMinPnSigmaAbovePionLine=1.; | |
4a0aab28 | 2157 | break; |
e5b6e8a6 | 2158 | case 2: // 1.5 GeV |
2159 | fPIDMinPnSigmaAbovePionLine=1.5; | |
4a0aab28 | 2160 | break; |
e5b6e8a6 | 2161 | case 3: // 20.0 GeV |
2162 | fPIDMinPnSigmaAbovePionLine=20.; | |
4a0aab28 | 2163 | break; |
e5b6e8a6 | 2164 | case 4: // 50.0 GeV |
2165 | fPIDMinPnSigmaAbovePionLine=50.; | |
4a0aab28 | 2166 | break; |
e5b6e8a6 | 2167 | case 5: // 0.3 GeV |
2168 | fPIDMinPnSigmaAbovePionLine=0.3; | |
4a0aab28 | 2169 | break; |
e5b6e8a6 | 2170 | case 6: // 0.25 GeV |
2171 | fPIDMinPnSigmaAbovePionLine=0.25; | |
4a0aab28 | 2172 | break; |
e5b6e8a6 | 2173 | case 7: // 0.4 GeV |
2174 | fPIDMinPnSigmaAbovePionLine=0.4; | |
4a0aab28 | 2175 | break; |
e5b6e8a6 | 2176 | case 8: // 0.2 GeV |
2177 | fPIDMinPnSigmaAbovePionLine=0.2; | |
4a0aab28 | 2178 | break; |
2179 | default: | |
e5b6e8a6 | 2180 | AliError(Form("piMomdedxSigmaCut not defined %d",piMomdedxSigmaCut)); |
4a0aab28 | 2181 | return kFALSE; |
2182 | } | |
2183 | return kTRUE; | |
3b77b2d1 | 2184 | } |
3b77b2d1 | 2185 | ///________________________________________________________________________ |
2186 | Bool_t AliConversionCuts::SetMaxMomPiondEdxCut(Int_t piMaxMomdedxSigmaCut) | |
2187 | { // Set Cut | |
4a0aab28 | 2188 | switch(piMaxMomdedxSigmaCut){ |
2189 | case 0: // 100. GeV | |
2190 | fPIDMaxPnSigmaAbovePionLine=100.; | |
2191 | break; | |
2192 | case 1: // 5. GeV | |
2193 | fPIDMaxPnSigmaAbovePionLine=5.; | |
2194 | break; | |
2195 | case 2: // 4. GeV | |
2196 | fPIDMaxPnSigmaAbovePionLine=4.; | |
2197 | break; | |
2198 | case 3: // 3.5 GeV | |
2199 | fPIDMaxPnSigmaAbovePionLine=3.5; | |
2200 | break; | |
2201 | case 4: // 3. GeV | |
2202 | fPIDMaxPnSigmaAbovePionLine=3.; | |
2203 | break; | |
e5b6e8a6 | 2204 | case 5: // 7. GeV |
2205 | fPIDMaxPnSigmaAbovePionLine=7.; | |
4a0aab28 | 2206 | break; |
2207 | default: | |
e5b6e8a6 | 2208 | AliError(Form("piMaxMomdedxSigmaCut not defined %d",piMaxMomdedxSigmaCut)); |
4a0aab28 | 2209 | return kFALSE; |
92efd725 | 2210 | } |
2211 | return kTRUE; | |
3b77b2d1 | 2212 | } |
3b77b2d1 | 2213 | ///________________________________________________________________________ |
2214 | Bool_t AliConversionCuts::SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut) | |
2215 | { // Set Cut | |
4a0aab28 | 2216 | switch(LowPRejectionSigmaCut){ |
2217 | case 0: // | |
2218 | fPIDnSigmaAtLowPAroundKaonLine=0; | |
2219 | fPIDnSigmaAtLowPAroundProtonLine=0; | |
2220 | fPIDnSigmaAtLowPAroundPionLine=0; | |
e5b6e8a6 | 2221 | fDoKaonRejectionLowP = kFALSE; |
2222 | fDoProtonRejectionLowP = kFALSE; | |
2223 | fDoPionRejectionLowP = kFALSE; | |
2224 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2225 | break; |
2226 | case 1: // | |
2227 | fPIDnSigmaAtLowPAroundKaonLine=0.5; | |
2228 | fPIDnSigmaAtLowPAroundProtonLine=0.5; | |
2229 | fPIDnSigmaAtLowPAroundPionLine=0.5; | |
e5b6e8a6 | 2230 | fDoKaonRejectionLowP = kTRUE; |
2231 | fDoProtonRejectionLowP = kTRUE; | |
2232 | fDoPionRejectionLowP = kTRUE; | |
2233 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2234 | break; |
2235 | case 2: // | |
2236 | fPIDnSigmaAtLowPAroundKaonLine=1; | |
2237 | fPIDnSigmaAtLowPAroundProtonLine=1; | |
2238 | fPIDnSigmaAtLowPAroundPionLine=1; | |
e5b6e8a6 | 2239 | fDoKaonRejectionLowP = kTRUE; |
2240 | fDoProtonRejectionLowP = kTRUE; | |
2241 | fDoPionRejectionLowP = kTRUE; | |
2242 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2243 | break; |
2244 | case 3: // | |
2245 | fPIDnSigmaAtLowPAroundKaonLine=2.; | |
2246 | fPIDnSigmaAtLowPAroundProtonLine=2.; | |
2247 | fPIDnSigmaAtLowPAroundPionLine=2.; | |
e5b6e8a6 | 2248 | fDoKaonRejectionLowP = kTRUE; |
2249 | fDoProtonRejectionLowP = kTRUE; | |
2250 | fDoPionRejectionLowP = kTRUE; | |
2251 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2252 | break; |
2253 | case 4: // | |
2254 | fPIDnSigmaAtLowPAroundKaonLine=0.; | |
2255 | fPIDnSigmaAtLowPAroundProtonLine=0.; | |
2256 | fPIDnSigmaAtLowPAroundPionLine=1; | |
e5b6e8a6 | 2257 | fDoKaonRejectionLowP = kFALSE; |
2258 | fDoProtonRejectionLowP = kFALSE; | |
2259 | fDoPionRejectionLowP = kTRUE; | |
2260 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2261 | break; |
2262 | case 5: // | |
2263 | fPIDnSigmaAtLowPAroundKaonLine=0.; | |
2264 | fPIDnSigmaAtLowPAroundProtonLine=0.; | |
2265 | fPIDnSigmaAtLowPAroundPionLine=1.5; | |
e5b6e8a6 | 2266 | fDoKaonRejectionLowP = kFALSE; |
2267 | fDoProtonRejectionLowP = kFALSE; | |
2268 | fDoPionRejectionLowP = kTRUE; | |
2269 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2270 | break; |
2271 | case 6: // | |
2272 | fPIDnSigmaAtLowPAroundKaonLine=0.; | |
2273 | fPIDnSigmaAtLowPAroundProtonLine=0.; | |
2274 | fPIDnSigmaAtLowPAroundPionLine=2.; | |
e5b6e8a6 | 2275 | fDoKaonRejectionLowP = kFALSE; |
2276 | fDoProtonRejectionLowP = kFALSE; | |
2277 | fDoPionRejectionLowP = kTRUE; | |
2278 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
2279 | break; | |
2280 | case 7: // | |
2281 | fPIDnSigmaAtLowPAroundKaonLine=0.; | |
2282 | fPIDnSigmaAtLowPAroundProtonLine=0.; | |
2283 | fPIDnSigmaAtLowPAroundPionLine=0.5; | |
2284 | fDoKaonRejectionLowP = kFALSE; | |
2285 | fDoProtonRejectionLowP = kFALSE; | |
2286 | fDoPionRejectionLowP = kTRUE; | |
2287 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2288 | break; |
2289 | default: | |
2290 | AliError(Form("LowPRejectionSigmaCut not defined %d",LowPRejectionSigmaCut)); | |
2291 | return kFALSE; | |
2292 | } | |
2293 | return kTRUE; | |
3b77b2d1 | 2294 | } |
3b77b2d1 | 2295 | ///________________________________________________________________________ |
2296 | Bool_t AliConversionCuts::SetTOFElectronPIDCut(Int_t TOFelectronPID){ | |
4a0aab28 | 2297 | // Set Cut |
e5b6e8a6 | 2298 | switch(TOFelectronPID){ |
4a0aab28 | 2299 | case 0: // no cut |
2300 | fUseTOFpid = kFALSE; | |
2301 | fTofPIDnSigmaBelowElectronLine=-100; | |
2302 | fTofPIDnSigmaAboveElectronLine=100; | |
2303 | break; | |
2304 | case 1: // -7,7 | |
2305 | fUseTOFpid = kTRUE; | |
2306 | fTofPIDnSigmaBelowElectronLine=-7; | |
2307 | fTofPIDnSigmaAboveElectronLine=7; | |
2308 | break; | |
2309 | case 2: // -5,5 | |
2310 | fUseTOFpid = kTRUE; | |
2311 | fTofPIDnSigmaBelowElectronLine=-5; | |
2312 | fTofPIDnSigmaAboveElectronLine=5; | |
2313 | break; | |
2314 | case 3: // -3,5 | |
2315 | fUseTOFpid = kTRUE; | |
2316 | fTofPIDnSigmaBelowElectronLine=-3; | |
2317 | fTofPIDnSigmaAboveElectronLine=5; | |
2318 | break; | |
2319 | case 4: // -2,3 | |
2320 | fUseTOFpid = kTRUE; | |
2321 | fTofPIDnSigmaBelowElectronLine=-2; | |
2322 | fTofPIDnSigmaAboveElectronLine=3; | |
2323 | break; | |
e5b6e8a6 | 2324 | case 5: // -3,3 |
2325 | fUseTOFpid = kTRUE; | |
2326 | fTofPIDnSigmaBelowElectronLine=-3; | |
2327 | fTofPIDnSigmaAboveElectronLine=3; | |
4a0aab28 | 2328 | break; |
2329 | default: | |
e5b6e8a6 | 2330 | AliError(Form("TOFElectronCut not defined %d",TOFelectronPID)); |
4a0aab28 | 2331 | return kFALSE; |
2332 | } | |
4a0aab28 | 2333 | return kTRUE; |
3b77b2d1 | 2334 | } |
2335 | ///________________________________________________________________________ | |
2336 | Bool_t AliConversionCuts::SetQtMaxCut(Int_t QtMaxCut) | |
2337 | { // Set Cut | |
4a0aab28 | 2338 | switch(QtMaxCut){ |
2339 | case 0: // | |
2340 | fQtMax=1.; | |
e5b6e8a6 | 2341 | fDoQtGammaSelection=kFALSE; |
2342 | fDoHighPtQtGammaSelection=kFALSE; | |
2343 | fHighPtQtMax=100.; | |
2344 | fPtBorderForQt=100.; | |
4a0aab28 | 2345 | break; |
2346 | case 1: | |
2347 | fQtMax=0.1; | |
e5b6e8a6 | 2348 | fDoHighPtQtGammaSelection=kFALSE; |
2349 | fHighPtQtMax=100.; | |
2350 | fPtBorderForQt=100.; | |
4a0aab28 | 2351 | break; |
2352 | case 2: | |
2353 | fQtMax=0.07; | |
e5b6e8a6 | 2354 | fDoHighPtQtGammaSelection=kFALSE; |
2355 | fHighPtQtMax=100.; | |
2356 | fPtBorderForQt=100.; | |
4a0aab28 | 2357 | break; |
2358 | case 3: | |
2359 | fQtMax=0.05; | |
e5b6e8a6 | 2360 | fDoHighPtQtGammaSelection=kFALSE; |
2361 | fHighPtQtMax=100.; | |
2362 | fPtBorderForQt=100.; | |
4a0aab28 | 2363 | break; |
2364 | case 4: | |
2365 | fQtMax=0.03; | |
e5b6e8a6 | 2366 | fDoHighPtQtGammaSelection=kFALSE; |
2367 | fHighPtQtMax=100.; | |
2368 | fPtBorderForQt=100.; | |
4a0aab28 | 2369 | break; |
e5b6e8a6 | 2370 | case 5: |
4a0aab28 | 2371 | fQtMax=0.02; |
e5b6e8a6 | 2372 | fDoHighPtQtGammaSelection=kFALSE; |
2373 | fHighPtQtMax=100.; | |
2374 | fPtBorderForQt=100.; | |
2375 | break; | |
2376 | case 6: | |
4a0aab28 | 2377 | fQtMax=0.02; |
2378 | fDoHighPtQtGammaSelection=kTRUE; | |
2379 | fHighPtQtMax=0.06; | |
2380 | fPtBorderForQt=2.5; | |
e5b6e8a6 | 2381 | break; |
4a0aab28 | 2382 | case 7: |
2383 | fQtMax=0.15; | |
e5b6e8a6 | 2384 | fDoHighPtQtGammaSelection=kFALSE; |
2385 | fHighPtQtMax=100.; | |
2386 | fPtBorderForQt=100.; | |
4a0aab28 | 2387 | break; |
2388 | default: | |
2389 | AliError(Form("Warning: QtMaxCut not defined %d",QtMaxCut)); | |
2390 | return kFALSE; | |
2391 | } | |
2392 | return kTRUE; | |
3b77b2d1 | 2393 | } |
3b77b2d1 | 2394 | ///________________________________________________________________________ |
e5b6e8a6 | 2395 | Bool_t AliConversionCuts::SetChi2GammaCut(Int_t chi2GammaCut) |
2396 | { // Set Cut | |
2397 | ||
2398 | switch(chi2GammaCut){ | |
2399 | case 0: // 100 | |
2400 | fChi2CutConversion = 100.; | |
4a0aab28 | 2401 | break; |
e5b6e8a6 | 2402 | case 1: // 50 |
2403 | fChi2CutConversion = 50.; | |
4a0aab28 | 2404 | break; |
e5b6e8a6 | 2405 | case 2: // 30 |
2406 | fChi2CutConversion = 30.; | |
2407 | break; | |
2408 | case 3: | |
2409 | fChi2CutConversion = 200.; | |
2410 | break; | |
2411 | case 4: | |
2412 | fChi2CutConversion = 500.; | |
2413 | break; | |
2414 | case 5: | |
2415 | fChi2CutConversion = 100000.; | |
2416 | break; | |
2417 | case 6: | |
2418 | fChi2CutConversion = 5.; | |
2419 | break; | |
2420 | case 7: | |
2421 | fChi2CutConversion = 10.; | |
2422 | break; | |
2423 | case 8: | |
2424 | fChi2CutConversion = 20.; | |
2425 | break; | |
2426 | case 9: | |
2427 | fChi2CutConversion = 15.; | |
4a0aab28 | 2428 | break; |
2429 | default: | |
e5b6e8a6 | 2430 | AliError(Form("Warning: Chi2GammaCut not defined %d",chi2GammaCut)); |
4a0aab28 | 2431 | return kFALSE; |
2432 | } | |
4a0aab28 | 2433 | return kTRUE; |
3b77b2d1 | 2434 | } |
3b77b2d1 | 2435 | ///________________________________________________________________________ |
2436 | Bool_t AliConversionCuts::SetPsiPairCut(Int_t psiCut) { | |
3b77b2d1 | 2437 | |
4a0aab28 | 2438 | switch(psiCut) { |
2439 | case 0: | |
e5b6e8a6 | 2440 | fPsiPairCut = 10000; // |
4a0aab28 | 2441 | break; |
2442 | case 1: | |
e5b6e8a6 | 2443 | fPsiPairCut = 0.1; // |
4a0aab28 | 2444 | break; |
2445 | case 2: | |
2446 | fPsiPairCut = 0.05; // Standard | |
2447 | break; | |
2448 | case 3: | |
e5b6e8a6 | 2449 | fPsiPairCut = 0.035; // |
4a0aab28 | 2450 | break; |
2451 | case 4: | |
e5b6e8a6 | 2452 | fPsiPairCut = 0.15; // |
4a0aab28 | 2453 | break; |
2454 | case 5: | |
e5b6e8a6 | 2455 | fPsiPairCut = 0.2; // |
4a0aab28 | 2456 | break; |
2457 | case 6: | |
e5b6e8a6 | 2458 | fPsiPairCut = 0.03; // |
4a0aab28 | 2459 | break; |
2460 | case 7: | |
e5b6e8a6 | 2461 | fPsiPairCut = 0.025; // |
4a0aab28 | 2462 | break; |
2463 | case 8: | |
e5b6e8a6 | 2464 | fPsiPairCut = 0.01; // |
2465 | break; | |
2466 | case 9: | |
2467 | fPsiPairCut = 0.5; // | |
4a0aab28 | 2468 | break; |
2469 | default: | |
92efd725 | 2470 | AliError(Form("PsiPairCut not defined %d",psiCut)); |
3b77b2d1 | 2471 | return kFALSE; |
4a0aab28 | 2472 | } |
3b77b2d1 | 2473 | |
4a0aab28 | 2474 | return kTRUE; |
3b77b2d1 | 2475 | } |
e5b6e8a6 | 2476 | ///________________________________________________________________________ |
2477 | Bool_t AliConversionCuts::SetPhotonAsymmetryCut(Int_t doPhotonAsymmetryCut){ | |
2478 | // Set Cut | |
2479 | switch(doPhotonAsymmetryCut){ | |
2480 | case 0: | |
2481 | fDoPhotonAsymmetryCut=0; | |
2482 | fMinPPhotonAsymmetryCut=100.; | |
2483 | fMinPhotonAsymmetry=0.; | |
2484 | break; | |
2485 | case 1: | |
2486 | fDoPhotonAsymmetryCut=1; | |
2487 | fMinPPhotonAsymmetryCut=3.5; | |
2488 | fMinPhotonAsymmetry=0.04; | |
2489 | break; | |
2490 | case 2: | |
2491 | fDoPhotonAsymmetryCut=1; | |
2492 | fMinPPhotonAsymmetryCut=3.5; | |
2493 | fMinPhotonAsymmetry=0.06; | |
2494 | break; | |
2495 | default: | |
2496 | AliError(Form("PhotonAsymmetryCut not defined %d",doPhotonAsymmetryCut)); | |
2497 | return kFALSE; | |
2498 | } | |
2499 | fCuts[kdoPhotonAsymmetryCut]=doPhotonAsymmetryCut; | |
2500 | return kTRUE; | |
2501 | } | |
3b77b2d1 | 2502 | ///________________________________________________________________________ |
2503 | Bool_t AliConversionCuts::SetCosPAngleCut(Int_t cosCut) { | |
2504 | ||
4a0aab28 | 2505 | switch(cosCut){ |
2506 | case 0: | |
e5b6e8a6 | 2507 | fCosPAngleCut = TMath::Pi(); // -1 |
4a0aab28 | 2508 | break; |
2509 | case 1: | |
e5b6e8a6 | 2510 | fCosPAngleCut = 0.1; // 0.99500 |
4a0aab28 | 2511 | break; |
2512 | case 2: | |
e5b6e8a6 | 2513 | fCosPAngleCut = 0.05; // 0.99875 |
4a0aab28 | 2514 | break; |
2515 | case 3: | |
e5b6e8a6 | 2516 | fCosPAngleCut = 0.025; // 0.99969 |
4a0aab28 | 2517 | break; |
2518 | case 4: | |
e5b6e8a6 | 2519 | fCosPAngleCut = 0.01; // 0.99995 |
2520 | break; | |
2521 | case 5: | |
2522 | fCosPAngleCut = 0.2; // 0.98007 | |
2523 | break; | |
2524 | case 6: | |
2525 | fCosPAngleCut = 0.5; // 0.87758 | |
2526 | break; | |
2527 | case 7: | |
2528 | fCosPAngleCut = 0.075; // 0.73169 | |
4a0aab28 | 2529 | break; |
2530 | default: | |
2531 | AliError(Form("Cosine Pointing Angle cut not defined %d",cosCut)); | |
2532 | return kFALSE; | |
2533 | } | |
3b77b2d1 | 2534 | |
4a0aab28 | 2535 | return kTRUE; |
3b77b2d1 | 2536 | } |
92efd725 | 2537 | ///________________________________________________________________________ |
2538 | Bool_t AliConversionCuts::SetSharedElectronCut(Int_t sharedElec) { | |
2539 | ||
2540 | switch(sharedElec){ | |
4a0aab28 | 2541 | case 0: |
2542 | fDoSharedElecCut = kFALSE; | |
2543 | break; | |
2544 | case 1: | |
2545 | fDoSharedElecCut = kTRUE; | |
2546 | break; | |
2547 | default: | |
2548 | AliError(Form("Shared Electron Cut not defined %d",sharedElec)); | |
2549 | return kFALSE; | |
2550 | } | |
e5b6e8a6 | 2551 | |
4a0aab28 | 2552 | return kTRUE; |
92efd725 | 2553 | } |
92efd725 | 2554 | ///________________________________________________________________________ |
2555 | Bool_t AliConversionCuts::SetToCloseV0sCut(Int_t toClose) { | |
2556 | ||
2557 | switch(toClose){ | |
2558 | case 0: | |
2559 | fDoToCloseV0sCut = kFALSE; | |
2560 | fminV0Dist = 250; | |
2561 | break; | |
2562 | case 1: | |
2563 | fDoToCloseV0sCut = kTRUE; | |
2564 | fminV0Dist = 1; | |
2565 | break; | |
2566 | case 2: | |
2567 | fDoToCloseV0sCut = kTRUE; | |
2568 | fminV0Dist = 2; | |
2569 | break; | |
2570 | case 3: | |
2571 | fDoToCloseV0sCut = kTRUE; | |
2572 | fminV0Dist = 3; | |
2573 | break; | |
2574 | default: | |
4a0aab28 | 2575 | AliError(Form("Shared Electron Cut not defined %d",toClose)); |
2576 | return kFALSE; | |
92efd725 | 2577 | } |
2578 | return kTRUE; | |
2579 | } | |
ca91a3e1 | 2580 | ///________________________________________________________________________ |
e5b6e8a6 | 2581 | Bool_t AliConversionCuts::SetTRDElectronCut(Int_t TRDElectronCut) |
2582 | { // Set Cut | |
2583 | switch(TRDElectronCut){ | |
ca91a3e1 | 2584 | case 0: |
e5b6e8a6 | 2585 | fDoTRDPID=kFALSE; |
2586 | break; | |
ca91a3e1 | 2587 | case 1: |
e5b6e8a6 | 2588 | fDoTRDPID=kTRUE; |
2589 | fPIDTRDEfficiency=0.1; | |
2590 | break; | |
2591 | case 8: | |
2592 | fDoTRDPID=kTRUE; | |
2593 | fPIDTRDEfficiency=0.8; | |
2594 | break; | |
2595 | case 9: | |
2596 | fDoTRDPID=kTRUE; | |
2597 | fPIDTRDEfficiency=0.9; | |
2598 | break; | |
ca91a3e1 | 2599 | default: |
e5b6e8a6 | 2600 | AliError(Form("TRDElectronCut not defined %d",TRDElectronCut)); |
ca91a3e1 | 2601 | return kFALSE; |
2602 | } | |
e5b6e8a6 | 2603 | |
ca91a3e1 | 2604 | return kTRUE; |
2605 | } | |
e5b6e8a6 | 2606 | //------------------------------------------------------------- |
2607 | Double_t AliConversionCuts::GetCentrality(AliVEvent *event) | |
2608 | { // Get Event Centrality | |
2609 | ||
2610 | AliESDEvent *esdEvent=dynamic_cast<AliESDEvent*>(event); | |
2611 | if(esdEvent){ | |
2612 | AliCentrality *fESDCentrality=(AliCentrality*)esdEvent->GetCentrality(); | |
2613 | ||
2614 | if(fDetectorCentrality==0){ | |
0a2b2b4b | 2615 | if (fIsHeavyIon==2){ |
2616 | return fESDCentrality->GetCentralityPercentile("V0A"); // default for pPb | |
2617 | } | |
2618 | else{ | |
2619 | return fESDCentrality->GetCentralityPercentile("V0M"); // default | |
2620 | } | |
e5b6e8a6 | 2621 | } |
2622 | if(fDetectorCentrality==1){ | |
2623 | return fESDCentrality->GetCentralityPercentile("CL1"); | |
2624 | } | |
2625 | } | |
2626 | ||
2627 | AliAODEvent *aodEvent=dynamic_cast<AliAODEvent*>(event); | |
2628 | if(aodEvent){ | |
2629 | if(aodEvent->GetHeader()){return aodEvent->GetHeader()->GetCentrality();} | |
2630 | } | |
2631 | ||
2632 | return -1; | |
2633 | } | |
2634 | //------------------------------------------------------------- | |
2635 | Bool_t AliConversionCuts::IsCentralitySelected(AliVEvent *event, AliVEvent *fMCEvent) | |
2636 | { // Centrality Selection | |
2637 | if(!fIsHeavyIon)return kTRUE; | |
2638 | ||
2639 | if(fCentralityMin == 0 && fCentralityMax == 0) return kTRUE;//0-100% | |
2640 | if(fCentralityMin >= fCentralityMax) return kTRUE;//0-100% | |
2641 | ||
2642 | Double_t centrality=GetCentrality(event); | |
2643 | if(centrality<0)return kFALSE; | |
2644 | ||
2645 | Int_t centralityC=0; | |
2646 | if (fModCentralityClass == 0){ | |
2647 | centralityC= Int_t(centrality/10); | |
2648 | if(centralityC >= fCentralityMin && centralityC < fCentralityMax) | |
2649 | return kTRUE; | |
2650 | else return kFALSE; | |
2651 | } | |
2652 | else if (fModCentralityClass ==1){ | |
2653 | centralityC= Int_t(centrality); | |
2654 | if(centralityC >= fCentralityMin*5 && centralityC < fCentralityMax*5){ | |
2655 | return kTRUE; | |
2656 | } else return kFALSE; | |
2657 | } | |
2658 | else if (fModCentralityClass ==2){ | |
2659 | centralityC= Int_t(centrality); | |
2660 | if(centralityC >= ((fCentralityMin*5)+45) && centralityC < ((fCentralityMax*5)+45)) | |
2661 | return kTRUE; | |
2662 | else return kFALSE; | |
2663 | } | |
2664 | ||
2665 | // Use strict V0 amplitude cut for MC centrality | |
2666 | Float_t nv0amplitude = event->GetVZEROData()->GetMTotV0A()+event->GetVZEROData()->GetMTotV0C(); | |
2667 | Float_t V0Amplitude10[10] = {9999999.0,13670,9345,6209,3944,2352,1272,611,255, 83}; | |
2668 | // 0 10 20 30 40 50 60 70 80 90% | |
2669 | Float_t V0Amplitude5a[10] = {9999999.0,16612,13670,11290,9345,7650,6209,4984,3944,3074}; | |
2670 | // 0 5 10 15 20 25 30 35 40 45% | |
2671 | Float_t V0Amplitude5b[10] = {3074,2352,1725,1272,899,611,402,255,152,83}; | |
2672 | // 45 50 55 60 65 70 75 80 85 90% | |
2673 | ||
2674 | if (fModCentralityClass == 3){ | |
2675 | if(fMCEvent){ | |
2676 | if(nv0amplitude > V0Amplitude10[fCentralityMax] && nv0amplitude <= V0Amplitude10[fCentralityMin]) | |
2677 | return kTRUE; | |
2678 | else return kFALSE; | |
2679 | } | |
2680 | else{ | |
2681 | centralityC= Int_t(centrality/10); | |
2682 | if(centralityC >= fCentralityMin && centralityC < fCentralityMax) | |
2683 | return kTRUE; | |
2684 | else return kFALSE; | |
2685 | } | |
2686 | } | |
2687 | else if (fModCentralityClass ==4){ | |
2688 | if(fMCEvent){ | |
2689 | if(nv0amplitude > V0Amplitude5a[fCentralityMax] && nv0amplitude <= V0Amplitude5a[fCentralityMin]) | |
2690 | return kTRUE; | |
2691 | else return kFALSE; | |
2692 | } | |
2693 | else{ | |
2694 | centralityC= Int_t(centrality); | |
2695 | if(centralityC >= fCentralityMin*5 && centralityC < fCentralityMax*5){ | |
2696 | return kTRUE; | |
2697 | } else return kFALSE; | |
2698 | } | |
2699 | } | |
2700 | else if (fModCentralityClass ==5){ | |
2701 | if(fMCEvent){ | |
2702 | if(nv0amplitude > V0Amplitude5b[fCentralityMax] && nv0amplitude <= V0Amplitude5b[fCentralityMin]) | |
2703 | return kTRUE; | |
2704 | else return kFALSE; | |
2705 | } | |
2706 | else{ | |
2707 | centralityC= Int_t(centrality); | |
2708 | if(centralityC >= ((fCentralityMin*5)+45) && centralityC < ((fCentralityMax*5)+45)) | |
2709 | return kTRUE; | |
2710 | else return kFALSE; | |
2711 | } | |
2712 | } | |
2713 | ||
2714 | return kFALSE; | |
2715 | } | |
2716 | ///________________________________________________________________________ | |
2717 | Bool_t AliConversionCuts::VertexZCut(AliVEvent *event){ | |
2718 | // Cut on z position of primary vertex | |
2719 | Double_t fVertexZ=event->GetPrimaryVertex()->GetZ(); | |
3b77b2d1 | 2720 | |
e5b6e8a6 | 2721 | if(abs(fVertexZ)>fMaxVertexZ)return kFALSE; |
0a2b2b4b | 2722 | |
2723 | if (fIsHeavyIon == 2){ | |
2724 | if(fUtils->IsFirstEventInChunk(event)) return kFALSE; | |
2725 | if(!fUtils->IsVertexSelected2013pA(event)) return kFALSE; | |
2726 | ||
2727 | } | |
2728 | ||
e5b6e8a6 | 2729 | return kTRUE; |
2730 | } | |
3b77b2d1 | 2731 | ///________________________________________________________________________ |
2732 | ||
2733 | Int_t AliConversionCuts::GetNumberOfContributorsVtx(AliVEvent *event){ | |
4a0aab28 | 2734 | // returns number of contributors to the vertex |
e5b6e8a6 | 2735 | |
4a0aab28 | 2736 | AliESDEvent *fESDEvent=dynamic_cast<AliESDEvent*>(event); |
2737 | if(fESDEvent){ | |
e5b6e8a6 | 2738 | if (fESDEvent->GetPrimaryVertex() != NULL){ |
2739 | if(fESDEvent->GetPrimaryVertex()->GetNContributors()>0) { | |
2740 | return fESDEvent->GetPrimaryVertex()->GetNContributors(); | |
2741 | } | |
4a0aab28 | 2742 | } |
a280ac15 | 2743 | |
e5b6e8a6 | 2744 | if(fESDEvent->GetPrimaryVertexSPD() !=NULL){ |
4a0aab28 | 2745 | if(fESDEvent->GetPrimaryVertexSPD()->GetNContributors()>0) { |
2746 | return fESDEvent->GetPrimaryVertexSPD()->GetNContributors(); | |
e5b6e8a6 | 2747 | } else { |
2748 | AliWarning(Form("Number of contributors from bad vertex type:: %s",fESDEvent->GetPrimaryVertex()->GetName())); | |
4a0aab28 | 2749 | return 0; |
2750 | } | |
2751 | } | |
2752 | } | |
2753 | ||
2754 | AliAODEvent *fAODEvent=dynamic_cast<AliAODEvent*>(event); | |
2755 | if(fAODEvent){ | |
e5b6e8a6 | 2756 | if (fAODEvent->GetPrimaryVertex() != NULL){ |
2757 | if(fAODEvent->GetPrimaryVertex()->GetNContributors()>0) { | |
2758 | return fAODEvent->GetPrimaryVertex()->GetNContributors(); | |
2759 | } | |
a280ac15 | 2760 | } |
e5b6e8a6 | 2761 | if(fAODEvent->GetPrimaryVertexSPD() !=NULL){ |
4a0aab28 | 2762 | if(fAODEvent->GetPrimaryVertexSPD()->GetNContributors()>0) { |
2763 | return fAODEvent->GetPrimaryVertexSPD()->GetNContributors(); | |
e5b6e8a6 | 2764 | } else { |
4a0aab28 | 2765 | AliWarning(Form("Number of contributors from bad vertex type:: %s",fAODEvent->GetPrimaryVertex()->GetName())); |
2766 | return 0; | |
2767 | } | |
2768 | } | |
2769 | } | |
a280ac15 | 2770 | |
4a0aab28 | 2771 | return 0; |
3b77b2d1 | 2772 | } |
2773 | ||
92efd725 | 2774 | ///________________________________________________________________________ |
3b77b2d1 | 2775 | |
92efd725 | 2776 | Bool_t AliConversionCuts::IsTriggerSelected() |
2777 | { | |
e5b6e8a6 | 2778 | |
4a0aab28 | 2779 | AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()); |
2780 | ||
2781 | UInt_t isSelected = AliVEvent::kAny; | |
0a2b2b4b | 2782 | if (fInputHandler==NULL) return kFALSE; |
2783 | if( fInputHandler->GetEventSelection()) { | |
4a0aab28 | 2784 | // Get the actual offline trigger mask for the event and AND it with the |
2785 | // requested mask. If no mask requested select by default the event. | |
2786 | if (fOfflineTriggerMask) | |
2787 | isSelected = fOfflineTriggerMask & fInputHandler->IsEventSelected(); | |
2788 | } | |
e5b6e8a6 | 2789 | fIsSDDFired = !(fInputHandler->IsEventSelected() & AliVEvent::kFastOnly); |
4a0aab28 | 2790 | |
2791 | // Fill Histogram | |
2792 | if(hTriggerClass){ | |
a280ac15 | 2793 | if (fIsSDDFired) hTriggerClass->Fill(32); |
e5b6e8a6 | 2794 | if (fInputHandler->IsEventSelected() & AliVEvent::kMB)hTriggerClass->Fill(0); |
2795 | if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)hTriggerClass->Fill(1); | |
2796 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)hTriggerClass->Fill(2); | |
2797 | if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)hTriggerClass->Fill(3); | |
2798 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)hTriggerClass->Fill(4); | |
4a0aab28 | 2799 | if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)hTriggerClass->Fill(5); |
e5b6e8a6 | 2800 | if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)hTriggerClass->Fill(6); |
2801 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUSPB)hTriggerClass->Fill(6); | |
e5b6e8a6 | 2802 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)hTriggerClass->Fill(7); |
2803 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUSHPB)hTriggerClass->Fill(7); | |
2804 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)hTriggerClass->Fill(8); | |
2805 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikePB)hTriggerClass->Fill(8); | |
2806 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)hTriggerClass->Fill(9); | |
2807 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikePB)hTriggerClass->Fill(9); | |
2808 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)hTriggerClass->Fill(10); | |
2809 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMC8)hTriggerClass->Fill(10); | |
2810 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)hTriggerClass->Fill(11); | |
2811 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)hTriggerClass->Fill(12); | |
2812 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)hTriggerClass->Fill(13); | |
2813 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHI8)hTriggerClass->Fill(13); | |
2814 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHOSPb)hTriggerClass->Fill(13); | |
2815 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)hTriggerClass->Fill(14); | |
2816 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)hTriggerClass->Fill(15); | |
2817 | if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)hTriggerClass->Fill(16); | |
2818 | if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)hTriggerClass->Fill(17); | |
2819 | if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)hTriggerClass->Fill(18); | |
2820 | if (fInputHandler->IsEventSelected() & AliVEvent::kZED)hTriggerClass->Fill(19); | |
2821 | if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)hTriggerClass->Fill(20); | |
2822 | if (fInputHandler->IsEventSelected() & AliVEvent::kSPI)hTriggerClass->Fill(20); | |
2823 | if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)hTriggerClass->Fill(21); | |
2824 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)hTriggerClass->Fill(22); | |
2825 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)hTriggerClass->Fill(23); | |
2826 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)hTriggerClass->Fill(24); | |
2827 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)hTriggerClass->Fill(25); | |
2828 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)hTriggerClass->Fill(26); | |
2829 | if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)hTriggerClass->Fill(27); | |
2830 | if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)hTriggerClass->Fill(28); | |
2831 | if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)hTriggerClass->Fill(29); | |
2832 | if (fInputHandler->IsEventSelected() & AliVEvent::kAny)hTriggerClass->Fill(30); | |
a280ac15 | 2833 | if (!fInputHandler->IsEventSelected()) hTriggerClass->Fill(33); |
2834 | } | |
2835 | ||
2836 | if(hTriggerClassSelected && isSelected){ | |
2837 | if (!fIsSDDFired) hTriggerClassSelected->Fill(32); | |
2838 | if (fInputHandler->IsEventSelected() & AliVEvent::kMB)hTriggerClassSelected->Fill(0); | |
2839 | if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)hTriggerClassSelected->Fill(1); | |
2840 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)hTriggerClassSelected->Fill(2); | |
2841 | if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)hTriggerClassSelected->Fill(3); | |
2842 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)hTriggerClassSelected->Fill(4); | |
2843 | if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)hTriggerClassSelected->Fill(5); | |
2844 | if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)hTriggerClassSelected->Fill(6); | |
2845 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUSPB)hTriggerClassSelected->Fill(6); | |
2846 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)hTriggerClassSelected->Fill(7); | |
2847 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUSHPB)hTriggerClassSelected->Fill(7); | |
2848 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)hTriggerClassSelected->Fill(8); | |
2849 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikePB)hTriggerClassSelected->Fill(8); | |
2850 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)hTriggerClassSelected->Fill(9); | |
2851 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikePB)hTriggerClassSelected->Fill(9); | |
2852 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)hTriggerClassSelected->Fill(10); | |
2853 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMC8)hTriggerClassSelected->Fill(10); | |
2854 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)hTriggerClassSelected->Fill(11); | |
2855 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)hTriggerClassSelected->Fill(12); | |
2856 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)hTriggerClassSelected->Fill(13); | |
2857 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHI8)hTriggerClassSelected->Fill(13); | |
2858 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHOSPb)hTriggerClassSelected->Fill(13); | |
2859 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)hTriggerClassSelected->Fill(14); | |
2860 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)hTriggerClassSelected->Fill(15); | |
2861 | if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)hTriggerClassSelected->Fill(16); | |
2862 | if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)hTriggerClassSelected->Fill(17); | |
2863 | if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)hTriggerClassSelected->Fill(18); | |
2864 | if (fInputHandler->IsEventSelected() & AliVEvent::kZED)hTriggerClassSelected->Fill(19); | |
2865 | if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)hTriggerClassSelected->Fill(20); | |
2866 | if (fInputHandler->IsEventSelected() & AliVEvent::kSPI)hTriggerClassSelected->Fill(20); | |
2867 | if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)hTriggerClassSelected->Fill(21); | |
2868 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)hTriggerClassSelected->Fill(22); | |
2869 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)hTriggerClassSelected->Fill(23); | |
2870 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)hTriggerClassSelected->Fill(24); | |
2871 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)hTriggerClassSelected->Fill(25); | |
2872 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)hTriggerClassSelected->Fill(26); | |
2873 | if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)hTriggerClassSelected->Fill(27); | |
2874 | if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)hTriggerClassSelected->Fill(28); | |
2875 | if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)hTriggerClassSelected->Fill(29); | |
2876 | if (fInputHandler->IsEventSelected() & AliVEvent::kAny)hTriggerClassSelected->Fill(30); | |
4a0aab28 | 2877 | } |
3b77b2d1 | 2878 | |
e5b6e8a6 | 2879 | if(!isSelected)return kFALSE; |
a280ac15 | 2880 | |
4a0aab28 | 2881 | return kTRUE; |
3b77b2d1 | 2882 | |
92efd725 | 2883 | } |
3b77b2d1 | 2884 | |
2885 | ///________________________________________________________________________ | |
2886 | Int_t AliConversionCuts::GetFirstTPCRow(Double_t radius){ | |
4a0aab28 | 2887 | // Get first TPC row |
e5b6e8a6 | 2888 | Int_t firstTPCRow = 0; |
2889 | Double_t radiusI = 84.8; | |
2890 | Double_t radiusO = 134.6; | |
4a0aab28 | 2891 | Double_t radiusOB = 198.; |
e5b6e8a6 | 2892 | Double_t rSizeI = 0.75; |
2893 | Double_t rSizeO = 1.; | |
2894 | Double_t rSizeOB = 1.5; | |
2895 | Int_t nClsI = 63; | |
2896 | Int_t nClsIO = 127; | |
4a0aab28 | 2897 | |
2898 | if(radius <= radiusI){ | |
2899 | return firstTPCRow; | |
2900 | } | |
2901 | if(radius>radiusI && radius<=radiusO){ | |
2902 | firstTPCRow = (Int_t)((radius-radiusI)/rSizeI); | |
2903 | } | |
2904 | if(radius>radiusO && radius<=radiusOB){ | |
2905 | firstTPCRow = (Int_t)(nClsI+(radius-radiusO)/rSizeO); | |
2906 | } | |
2907 | ||
2908 | if(radius>radiusOB){ | |
2909 | firstTPCRow =(Int_t)(nClsIO+(radius-radiusOB)/rSizeOB); | |
2910 | } | |
2911 | ||
2912 | return firstTPCRow; | |
3b77b2d1 | 2913 | } |
2914 | ||
92efd725 | 2915 | Bool_t AliConversionCuts::CosinePAngleCut(const AliConversionPhotonBase * photon, AliVEvent * event) const { |
4a0aab28 | 2916 | ///Check if passes cosine of pointing angle cut |
92efd725 | 2917 | if(GetCosineOfPointingAngle(photon, event) < (TMath::Cos(fCosPAngleCut))){ |
2918 | return kFALSE; | |
2919 | } | |
2920 | return kTRUE; | |
3b77b2d1 | 2921 | } |
2922 | ||
92efd725 | 2923 | Double_t AliConversionCuts::GetCosineOfPointingAngle( const AliConversionPhotonBase * photon, AliVEvent * event) const{ |
e5b6e8a6 | 2924 | // calculates the pointing angle of the recalculated V0 |
3b77b2d1 | 2925 | |
92efd725 | 2926 | Double_t momV0[3] = {0,0,0}; |
2927 | if(event->IsA()==AliESDEvent::Class()){ | |
2928 | AliESDEvent *esdEvent = dynamic_cast<AliESDEvent*>(event); | |
e5b6e8a6 | 2929 | if(!esdEvent) return -999; |
92efd725 | 2930 | AliESDv0 *v0 = esdEvent->GetV0(photon->GetV0Index()); |
e5b6e8a6 | 2931 | if(!v0) return -999; |
92efd725 | 2932 | v0->GetPxPyPz(momV0[0],momV0[1],momV0[2]); |
2933 | } | |
2934 | if(event->IsA()==AliAODEvent::Class()){ | |
2935 | momV0[0] = photon->GetPx(); | |
2936 | momV0[1] = photon->GetPy(); | |
2937 | momV0[2] = photon->GetPz(); | |
2938 | } | |
e5b6e8a6 | 2939 | |
92efd725 | 2940 | //Double_t momV0[3] = { photon->GetPx(), photon->GetPy(), photon->GetPz() }; //momentum of the V0 |
e5b6e8a6 | 2941 | Double_t PosV0[3] = { photon->GetConversionX() - event->GetPrimaryVertex()->GetX(), |
2942 | photon->GetConversionY() - event->GetPrimaryVertex()->GetY(), | |
92efd725 | 2943 | photon->GetConversionZ() - event->GetPrimaryVertex()->GetZ() }; //Recalculated V0 Position vector |
e5b6e8a6 | 2944 | |
3b77b2d1 | 2945 | Double_t momV02 = momV0[0]*momV0[0] + momV0[1]*momV0[1] + momV0[2]*momV0[2]; |
2946 | Double_t PosV02 = PosV0[0]*PosV0[0] + PosV0[1]*PosV0[1] + PosV0[2]*PosV0[2]; | |
2947 | ||
e5b6e8a6 | 2948 | |
2949 | Double_t cosinePointingAngle = -999; | |
2950 | if(momV02*PosV02 > 0.0) | |
2951 | cosinePointingAngle = (PosV0[0]*momV0[0] + PosV0[1]*momV0[1] + PosV0[2]*momV0[2] ) / TMath::Sqrt(momV02 * PosV02); | |
2952 | ||
3b77b2d1 | 2953 | return cosinePointingAngle; |
2954 | } | |
2955 | ||
e5b6e8a6 | 2956 | ///________________________________________________________________________ |
92efd725 | 2957 | Bool_t AliConversionCuts::PsiPairCut(const AliConversionPhotonBase * photon) const { |
3b77b2d1 | 2958 | |
4a0aab28 | 2959 | if(photon->GetPsiPair() > fPsiPairCut){ |
2960 | return kFALSE;} | |
2961 | else{return kTRUE;} | |
3b77b2d1 | 2962 | |
3b77b2d1 | 2963 | } |
2964 | ||
2965 | ///________________________________________________________________________ | |
2966 | TString AliConversionCuts::GetCutNumber(){ | |
4a0aab28 | 2967 | // returns TString with current cut number |
2968 | TString a(kNCuts); | |
2969 | for(Int_t ii=0;ii<kNCuts;ii++){ | |
92efd725 | 2970 | a.Append(Form("%d",fCuts[ii])); |
4a0aab28 | 2971 | } |
2972 | return a; | |
3b77b2d1 | 2973 | } |
2974 | ||
92efd725 | 2975 | ///________________________________________________________________________ |
2976 | void AliConversionCuts::FillElectonLabelArray(AliAODConversionPhoton* photon, Int_t nV0){ | |
e5b6e8a6 | 2977 | |
92efd725 | 2978 | Int_t posLabel = photon->GetTrackLabelPositive(); |
2979 | Int_t negLabel = photon->GetTrackLabelNegative(); | |
e5b6e8a6 | 2980 | |
92efd725 | 2981 | fElectronLabelArray[nV0*2] = posLabel; |
2982 | fElectronLabelArray[(nV0*2)+1] = negLabel; | |
2983 | } | |
2984 | ///________________________________________________________________________ | |
2985 | Bool_t AliConversionCuts::RejectSharedElectronV0s(AliAODConversionPhoton* photon, Int_t nV0, Int_t nV0s){ | |
3b77b2d1 | 2986 | |
92efd725 | 2987 | Int_t posLabel = photon->GetTrackLabelPositive(); |
2988 | Int_t negLabel = photon->GetTrackLabelNegative(); | |
e5b6e8a6 | 2989 | |
92efd725 | 2990 | for(Int_t i = 0; i<nV0s*2;i++){ |
2991 | if(i==nV0*2) continue; | |
2992 | if(i==(nV0*2)+1) continue; | |
2993 | if(fElectronLabelArray[i] == posLabel){ | |
2994 | return kFALSE;} | |
2995 | if(fElectronLabelArray[i] == negLabel){ | |
2996 | return kFALSE;} | |
2997 | } | |
3b77b2d1 | 2998 | |
92efd725 | 2999 | return kTRUE; |
3000 | } | |
3b77b2d1 | 3001 | ///________________________________________________________________________ |
92efd725 | 3002 | Bool_t AliConversionCuts::RejectToCloseV0s(AliAODConversionPhoton* photon, TList *photons, Int_t nV0){ |
3003 | ||
3004 | ||
3005 | Double_t posX = photon->GetConversionX(); | |
3006 | Double_t posY = photon->GetConversionY(); | |
3007 | Double_t posZ = photon->GetConversionZ(); | |
3008 | ||
3009 | for(Int_t i = 0;i<photons->GetEntries();i++){ | |
3010 | if(nV0 == i) continue; | |
3011 | AliAODConversionPhoton *photonComp = (AliAODConversionPhoton*) photons->At(i); | |
3012 | Double_t posCompX = photonComp->GetConversionX(); | |
3013 | Double_t posCompY = photonComp->GetConversionY(); | |
3014 | Double_t posCompZ = photonComp->GetConversionZ(); | |
e5b6e8a6 | 3015 | |
92efd725 | 3016 | Double_t dist = pow((posX - posCompX),2)+pow((posY - posCompY),2)+pow((posZ - posCompZ),2); |
3017 | ||
3018 | if(dist < fminV0Dist*fminV0Dist){ | |
3019 | if(photon->GetChi2perNDF() < photonComp->GetChi2perNDF()) return kTRUE; | |
3020 | else { | |
3021 | return kFALSE;} | |
3022 | } | |
e5b6e8a6 | 3023 | |
92efd725 | 3024 | } |
3025 | return kTRUE; | |
3b77b2d1 | 3026 | } |
ca91a3e1 | 3027 | ///________________________________________________________________________ |
3028 | void AliConversionCuts::GetNotRejectedParticles(Int_t rejection, TList *HeaderList, AliMCEvent *MCEvent){ | |
e5b6e8a6 | 3029 | |
ca91a3e1 | 3030 | if(fNotRejectedStart){ |
3031 | delete[] fNotRejectedStart; | |
3032 | fNotRejectedStart = NULL; | |
3033 | } | |
3034 | if(fNotRejectedEnd){ | |
3035 | delete[] fNotRejectedEnd; | |
3036 | fNotRejectedEnd = NULL; | |
3037 | } | |
3038 | if(fGeneratorNames){ | |
3039 | delete[] fGeneratorNames; | |
3040 | fGeneratorNames = NULL; | |
3041 | } | |
e5b6e8a6 | 3042 | |
ca91a3e1 | 3043 | if(rejection == 0) return; // No Rejection |
3044 | AliGenCocktailEventHeader *cHeader = dynamic_cast<AliGenCocktailEventHeader*>(MCEvent->GenEventHeader()); | |
3045 | if(cHeader){ | |
3046 | TList *genHeaders = cHeader->GetHeaders(); | |
3047 | AliGenEventHeader* gh = 0; | |
3048 | fnHeaders = 0; | |
e5b6e8a6 | 3049 | if(rejection == 1 || rejection == 3) fnHeaders = 1; // MinBiasHeader |
ca91a3e1 | 3050 | if(rejection == 2){ // TList of Headers Names |
3051 | for(Int_t i = 0; i<genHeaders->GetEntries();i++){ | |
3052 | gh = (AliGenEventHeader*)genHeaders->At(i); | |
3053 | TString GeneratorName = gh->GetName(); | |
3054 | for(Int_t j = 0; j<HeaderList->GetEntries();j++){ | |
3055 | TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString(); | |
3056 | if(GeneratorName.CompareTo(GeneratorInList) == 0){ | |
3057 | fnHeaders++; | |
3058 | continue; | |
3059 | } | |
3060 | } | |
3061 | } | |
3062 | } | |
3063 | ||
3064 | fNotRejectedStart = new Int_t[fnHeaders]; | |
3065 | fNotRejectedEnd = new Int_t[fnHeaders]; | |
3066 | fGeneratorNames = new TString[fnHeaders]; | |
3067 | ||
e5b6e8a6 | 3068 | if(rejection == 1 || rejection == 3){ |
ca91a3e1 | 3069 | fNotRejectedStart[0] = 0; |
e5b6e8a6 | 3070 | fNotRejectedEnd[0] = ((AliGenEventHeader*)genHeaders->At(0))->NProduced()-1; |
ca91a3e1 | 3071 | fGeneratorNames[0] = ((AliGenEventHeader*)genHeaders->At(0))->GetName(); |
ca91a3e1 | 3072 | return; |
3073 | } | |
e5b6e8a6 | 3074 | |
ca91a3e1 | 3075 | Int_t firstindex = 0; |
e5b6e8a6 | 3076 | Int_t lastindex = -1; |
ca91a3e1 | 3077 | Int_t nummer = 0; |
3078 | for(Int_t i = 0; i<genHeaders->GetEntries();i++){ | |
3079 | gh = (AliGenEventHeader*)genHeaders->At(i); | |
3080 | TString GeneratorName = gh->GetName(); | |
3081 | lastindex = lastindex + gh->NProduced(); | |
3082 | for(Int_t j = 0; j<HeaderList->GetEntries();j++){ | |
3083 | TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString(); | |
3084 | if(GeneratorName.CompareTo(GeneratorInList) == 0){ | |
3085 | fNotRejectedStart[nummer] = firstindex; | |
3086 | fNotRejectedEnd[nummer] = lastindex; | |
3087 | fGeneratorNames[nummer] = GeneratorName; | |
a280ac15 | 3088 | // cout << "Number of particles produced for: " << i << "\t" << GeneratorName.Data() << "\t" << lastindex-firstindex+1 << endl; |
ca91a3e1 | 3089 | nummer++; |
3090 | continue; | |
3091 | } | |
3092 | } | |
3093 | firstindex = firstindex + gh->NProduced(); | |
3094 | } | |
a280ac15 | 3095 | } else { // No Cocktail Header Found |
ca91a3e1 | 3096 | fNotRejectedStart = new Int_t[1]; |
3097 | fNotRejectedEnd = new Int_t[1]; | |
e5b6e8a6 | 3098 | |
3099 | fnHeaders = 1; | |
ca91a3e1 | 3100 | fNotRejectedStart[0] = 0; |
e5b6e8a6 | 3101 | fNotRejectedEnd[0] = MCEvent->Stack()->GetNprimary()-1; |
0a2b2b4b | 3102 | // if(rejection == 2){ |
a280ac15 | 3103 | fGeneratorNames = new TString[1]; |
3104 | fGeneratorNames[0] = "NoCocktailGeneratorFound"; | |
3105 | // } | |
3106 | ||
3107 | AliGenPythiaEventHeader *mcHeaderPythia = dynamic_cast<AliGenPythiaEventHeader*>(MCEvent->GenEventHeader()); | |
3108 | if (mcHeaderPythia) fGeneratorNames[0] = "NoCocktailGeneratorFound_Pythia"; | |
3109 | AliGenDPMjetEventHeader *mcHeaderPhojet = dynamic_cast<AliGenDPMjetEventHeader*>(MCEvent->GenEventHeader()); | |
3110 | if (mcHeaderPhojet) fGeneratorNames[0] = "NoCocktailGeneratorFound_Phojet"; | |
3111 | AliGenHijingEventHeader *mcHeaderHijing = dynamic_cast<AliGenHijingEventHeader*>(MCEvent->GenEventHeader()); | |
3112 | if (mcHeaderHijing) fGeneratorNames[0] = "NoCocktailGeneratorFound_Hijing"; | |
3113 | ||
e5b6e8a6 | 3114 | SetRejectExtraSignalsCut(0); |
ca91a3e1 | 3115 | } |
e5b6e8a6 | 3116 | |
ca91a3e1 | 3117 | } |
3118 | //_________________________________________________________________________ | |
a280ac15 | 3119 | Int_t AliConversionCuts::IsParticleFromBGEvent(Int_t index, AliStack *MCStack){ |
3120 | ||
3121 | // Not Accepted == kFALSE == 0 | |
3122 | // Accepted == kTRUE == 1 | |
3123 | // FirstHeader == kTRUE == 3 | |
e5b6e8a6 | 3124 | |
a280ac15 | 3125 | if(index < 0) return 0; // No Particle |
e5b6e8a6 | 3126 | |
a280ac15 | 3127 | Int_t accepted = 0; |
ca91a3e1 | 3128 | if( index >= MCStack->GetNprimary()){ // Secondary Particle |
a280ac15 | 3129 | if( ((TParticle*)MCStack->Particle(index))->GetMother(0) < 0) return 1; // Secondary Particle without Mother?? |
ca91a3e1 | 3130 | return IsParticleFromBGEvent(((TParticle*)MCStack->Particle(index))->GetMother(0),MCStack); |
3131 | } | |
ca91a3e1 | 3132 | for(Int_t i = 0;i<fnHeaders;i++){ |
e5b6e8a6 | 3133 | if(index >= fNotRejectedStart[i] && index <= fNotRejectedEnd[i]){ |
a280ac15 | 3134 | accepted = 1; |
3135 | if(i == 0) accepted = 2; // MB Header | |
e5b6e8a6 | 3136 | } |
ca91a3e1 | 3137 | } |
e5b6e8a6 | 3138 | |
ca91a3e1 | 3139 | return accepted; |
3140 | } | |
e5b6e8a6 | 3141 | //_________________________________________________________________________ |
3142 | Int_t AliConversionCuts::IsEventAcceptedByConversionCut(AliConversionCuts *ReaderCuts, AliVEvent *InputEvent, AliMCEvent *MCEvent, Bool_t isHeavyIon){ | |
3143 | ||
3144 | if(isHeavyIon && !(IsCentralitySelected(InputEvent,MCEvent))) | |
3145 | return 1; // Check Centrality --> Not Accepted => eventQuality = 1 | |
a280ac15 | 3146 | |
e5b6e8a6 | 3147 | if(!isHeavyIon && GetIsFromPileup()){ |
3148 | if(InputEvent->IsPileupFromSPD(3,0.8,3.,2.,5.)){ | |
3149 | return 6; // Check Pileup --> Not Accepted => eventQuality = 6 | |
3150 | } | |
3151 | } | |
a280ac15 | 3152 | |
e5b6e8a6 | 3153 | Bool_t hasV0And = ReaderCuts->HasV0AND(); |
3154 | Bool_t isSDDFired = ReaderCuts->IsSDDFired(); | |
3155 | if( (IsSpecialTrigger() == 2 || IsSpecialTrigger() == 3) && !isSDDFired && !MCEvent) | |
3156 | return 7; // With SDD requested but no fired | |
a280ac15 | 3157 | |
e5b6e8a6 | 3158 | if( (IsSpecialTrigger() == 1 || IsSpecialTrigger() == 3) && !hasV0And) |
3159 | return 8; // V0AND requested but no fired | |
a280ac15 | 3160 | |
e5b6e8a6 | 3161 | |
3162 | return 0; | |
3163 | } | |
a280ac15 | 3164 | |
3165 | Float_t AliConversionCuts::GetWeightForMeson(TString period, Int_t index, AliStack *MCStack){ | |
3166 | if (!(period.CompareTo("LHC12f1a") == 0 || period.CompareTo("LHC12f1b") == 0 || period.CompareTo("LHC12i3") == 0 )) return 1.; | |
3167 | ||
3168 | Int_t kCaseGen = 0; | |
3169 | for (Int_t i = 0; i < fnHeaders; i++){ | |
3170 | if (index >= fNotRejectedStart[i] && index < fNotRejectedEnd[i]+1){ | |
3171 | // cout << fGeneratorNames[i].Data() << endl; | |
3172 | if (fGeneratorNames[i].CompareTo("Pythia") == 0){ | |
3173 | kCaseGen = 1; | |
3174 | } else if (fGeneratorNames[i].CompareTo("DPMJET") == 0){ | |
3175 | kCaseGen = 2; | |
3176 | } else if (fGeneratorNames[i].CompareTo("HIJING") == 0){ | |
3177 | kCaseGen = 3; | |
3178 | } else if (fGeneratorNames[i].CompareTo("BOX") == 0){ | |
3179 | kCaseGen = 4; | |
3180 | } else if (fGeneratorNames[i].CompareTo("PARAM") == 0){ | |
3181 | kCaseGen = 5; | |
3182 | } else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound") == 0){ | |
3183 | kCaseGen = 6; | |
3184 | } else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound_Pythia") == 0){ | |
3185 | kCaseGen = 1; | |
3186 | } else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound_Phojet") == 0){ | |
3187 | kCaseGen = 2; | |
3188 | } else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound_Hijing") == 0){ | |
3189 | kCaseGen = 3; | |
3190 | } | |
3191 | // cout << "resulting kCaseGen :" << kCaseGen << endl; | |
3192 | } | |
3193 | } | |
3194 | ||
3195 | Double_t mesonPt = ((TParticle*)MCStack->Particle(index))->Pt(); | |
3196 | ||
a280ac15 | 3197 | Double_t mesonMass = ((TParticle*)MCStack->Particle(index))->GetCalcMass(); |
3198 | Float_t functionResult = 1.; | |
3199 | if (kCaseGen == 1){ | |
3200 | Float_t dNdyMC = 2.1462; | |
3201 | Float_t nMC = 7.06055; | |
3202 | Float_t tMC = 0.12533; | |
3203 | if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 111){ | |
3204 | dNdyMC = 2.1462; | |
3205 | nMC = 7.06055; | |
3206 | tMC = 0.12533; | |
3207 | } else if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 221){ | |
3208 | dNdyMC = 0.2357; | |
3209 | nMC = 5.9105; | |
3210 | tMC = 0.1525; | |
3211 | } | |
626ba282 | 3212 | functionResult = dNdyMC / ( 2 * TMath::Pi())*(nMC-1.)*(nMC-2.) / (nMC*tMC*(nMC*tMC+mesonMass*(nMC-2.))) * TMath::Power(1.+(TMath::Sqrt(mesonPt*mesonPt+mesonMass*mesonMass)-mesonMass)/(nMC*tMC), -nMC); |
a280ac15 | 3213 | } else if (kCaseGen == 2){ |
3214 | Float_t dNdyMC = 2.35978; | |
3215 | Float_t nMC = 6.81795; | |
3216 | Float_t tMC = 0.11492; | |
3217 | if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 111){ | |
3218 | dNdyMC = 2.35978; | |
3219 | nMC = 6.81795; | |
3220 | tMC = 0.11492; | |
3221 | } else if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 221){ | |
3222 | dNdyMC = 0.3690; | |
3223 | nMC = 5.55809; | |
3224 | tMC = 0.13387; | |
3225 | } | |
626ba282 | 3226 | functionResult = dNdyMC / ( 2 * TMath::Pi())*(nMC-1.)*(nMC-2.) / (nMC*tMC*(nMC*tMC+mesonMass*(nMC-2.))) * TMath::Power(1.+(TMath::Sqrt(mesonPt*mesonPt+mesonMass*mesonMass)-mesonMass)/(nMC*tMC), -nMC); |
a280ac15 | 3227 | } else if (kCaseGen == 4){ |
3228 | // functionResult = 1./sqrt(1.-mesonMass*mesonMass/((mesonMass*mesonMass+mesonPt*mesonPt)*cosh(mesonY)*cosh(mesonY))); | |
3229 | Float_t a = 0.23437; | |
3230 | Float_t b = 5.6661; | |
3231 | Float_t c = -1430.5863; | |
3232 | Float_t d = -0.6966624; | |
3233 | Float_t e = 252.3742; | |
3234 | if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 111){ | |
3235 | a = 0.23437; | |
3236 | b = 5.6661; | |
3237 | c = -1430.5863; | |
3238 | d = -0.6966624; | |
3239 | e = 252.3742; | |
3240 | } else if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 221){ | |
3241 | a = 0.10399; | |
3242 | b = 4.35311; | |
3243 | c = -12.17723; | |
3244 | d = -0.01172; | |
3245 | e =1.85140; | |
3246 | } | |
3247 | functionResult = a*TMath::Power(mesonPt,-1.*(b+c/(TMath::Power(mesonPt,d)+e)))*1./mesonPt *1./1.6 *1./(2.* TMath::Pi()); | |
3248 | } | |
3249 | ||
3250 | Float_t dNdyData = 2.2328; | |
3251 | Float_t nData = 7.1473; | |
3252 | Float_t tData = 0.1346; | |
3253 | if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 111){ | |
3254 | dNdyData = 2.2328; | |
3255 | nData = 7.1473; | |
3256 | tData = 0.1346; | |
3257 | } else if ( ((TParticle*)MCStack->Particle(index))->GetPdgCode() == 221){ | |
3258 | dNdyData = 0.38992; //be careful this fit is not optimal, eta in data still has problems | |
3259 | nData = 5.72778; | |
3260 | tData = 0.13835; | |
3261 | } | |
626ba282 | 3262 | Float_t tsallisData = dNdyData / ( 2 * TMath::Pi())*(nData-1.)*(nData-2.) / (nData*tData*(nData*tData+mesonMass*(nData-2.))) * TMath::Power(1.+(TMath::Sqrt(mesonPt*mesonPt+mesonMass*mesonMass)-mesonMass)/(nData*tData), -nData); |
a280ac15 | 3263 | // cout << "tsallisData/functionResult: " << tsallisData/functionResult << endl; |
3264 | return tsallisData/functionResult; | |
3265 | // return | |
3266 | } | |
3267 | ||
3268 | ///________________________________________________________________________ | |
3269 | AliConversionCuts* AliConversionCuts::GetStandardCuts2010PbPb(){ | |
3270 | //Create and return standard 2010 PbPb cuts | |
3271 | AliConversionCuts *cuts=new AliConversionCuts("StandardCuts2010PbPb","StandardCuts2010PbPb"); | |
3272 | if(!cuts->InitializeCutsFromCutString("1000002042092970023220000")){ | |
3273 | cout<<"Warning: Initialization of Standardcuts2010PbPb failed"<<endl;} | |
3274 | return cuts; | |
3275 | } | |
3276 | ||
3277 | ///________________________________________________________________________ | |
3278 | AliConversionCuts* AliConversionCuts::GetStandardCuts2010pp(){ | |
3279 | //Create and return standard 2010 PbPb cuts | |
3280 | AliConversionCuts *cuts=new AliConversionCuts("StandardCuts2010pp","StandardCuts2010pp"); | |
3281 | if(!cuts->InitializeCutsFromCutString("0000011002093663003800000")){ | |
3282 | cout<<"Warning: Initialization of Standardcuts2010pp failed"<<endl;} | |
3283 | return cuts; | |
3284 | } | |
3285 |