]>
Commit | Line | Data |
---|---|---|
3b77b2d1 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
aff90284 | 3 | * * |
4 | * Authors: Svein Lindal, Daniel Lohner * | |
5 | * Version 1.0 * | |
6 | * * | |
fcc79cf5 | 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 * | |
aff90284 | 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" | |
aff90284 | 35 | #include "TF1.h" |
3b77b2d1 | 36 | #include "AliStack.h" |
37 | #include "AliAODConversionMother.h" | |
38 | #include "TObjString.h" | |
39 | #include "AliAODEvent.h" | |
40 | #include "AliESDEvent.h" | |
41 | #include "AliCentrality.h" | |
42 | #include "TList.h" | |
ae947965 | 43 | #include "TFile.h" |
92efd725 | 44 | #include "AliLog.h" |
ca91a3e1 | 45 | #include "AliGenCocktailEventHeader.h" |
a280ac15 | 46 | #include "AliGenDPMjetEventHeader.h" |
47 | #include "AliGenPythiaEventHeader.h" | |
48 | #include "AliGenHijingEventHeader.h" | |
e5b6e8a6 | 49 | #include "AliTriggerAnalysis.h" |
50 | #include "AliV0ReaderV1.h" | |
ae947965 | 51 | #include "AliAODMCParticle.h" |
52 | #include "AliAODMCHeader.h" | |
92efd725 | 53 | |
3b77b2d1 | 54 | class iostream; |
55 | ||
56 | using namespace std; | |
57 | ||
58 | ClassImp(AliConversionCuts) | |
59 | ||
60 | ||
61 | const char* AliConversionCuts::fgkCutNames[AliConversionCuts::kNCuts] = { | |
4803eb1f | 62 | "HeavyIon",//0 |
63 | "CentralityMin",//1 | |
64 | "CentralityMax",//2 | |
65 | "SelectV0AND",//3 | |
66 | "MultiplicityMethod",//4 | |
67 | "RemovePileUp",//5 | |
68 | "RejectExtraSignals",//6 | |
69 | "V0FinderType",//7 | |
70 | "EtaCut",//8 | |
71 | "MinRCut",//9 | |
72 | "SinglePtCut",//10 | |
73 | "ClsTPCCut", //11 | |
74 | "ededxSigmaCut",//12 | |
75 | "pidedxSigmaCut",//13 | |
76 | "piMomdedxSigmaCut",//14 | |
77 | "piMaxMomdedxSigmaCut",//15 | |
78 | "LowPRejectionSigmaCut",//16 | |
79 | "TOFelectronPID",//17 | |
80 | "QtMaxCut",//18 | |
81 | "Chi2GammaCut", //19 | |
82 | "PsiPair", //20 | |
83 | "DoPhotonAsymmetryCut",//21 | |
84 | "CosinePointingAngle", //22 | |
85 | "SharedElectronCuts", //23 | |
86 | "RejectToCloseV0s", //24 | |
87 | "DcaRPrimVtx", //25 | |
75f195f2 | 88 | "DcaZPrimVtx", //26 |
ae4f2cfb | 89 | "EvetPlane" //27 |
3b77b2d1 | 90 | }; |
91 | ||
92 | ||
93 | //________________________________________________________________________ | |
4a0aab28 | 94 | AliConversionCuts::AliConversionCuts(const char *name,const char *title) : |
95 | AliAnalysisCuts(name,title), | |
96 | fHistograms(NULL), | |
e5b6e8a6 | 97 | fHeaderList(NULL), |
4a0aab28 | 98 | fPIDResponse(NULL), |
99 | fEventQuality(-1), | |
100 | fMaxR(200), | |
101 | fMinR(0), | |
102 | fEtaCut(0.9), | |
103 | fEtaCutMin(-0.1), | |
104 | fPtCut(0.02), | |
105 | fSinglePtCut(0), | |
106 | fMaxZ(1000), | |
107 | fMinClsTPC(0.), | |
108 | fMinClsTPCToF(0.), | |
109 | fLineCutZRSlope(0.), | |
110 | fLineCutZValue(0), | |
111 | fLineCutZRSlopeMin(0.), | |
112 | fLineCutZValueMin(0), | |
113 | fChi2CutConversion(1000), | |
114 | fPIDProbabilityCutNegativeParticle(0), | |
115 | fPIDProbabilityCutPositiveParticle(0), | |
116 | fDodEdxSigmaCut(kTRUE), | |
e5b6e8a6 | 117 | fDoTOFsigmaCut(kFALSE), |
4a0aab28 | 118 | fPIDTRDEfficiency(1), |
119 | fDoTRDPID(kFALSE), | |
120 | fPIDnSigmaAboveElectronLine(100), | |
121 | fPIDnSigmaBelowElectronLine(-100), | |
e5b6e8a6 | 122 | fTofPIDnSigmaAboveElectronLine(100), |
123 | fTofPIDnSigmaBelowElectronLine(-100), | |
4a0aab28 | 124 | fPIDnSigmaAbovePionLine(0), |
125 | fPIDnSigmaAbovePionLineHighPt(-100), | |
126 | fPIDMinPnSigmaAbovePionLine(0), | |
127 | fPIDMaxPnSigmaAbovePionLine(0), | |
128 | fDoKaonRejectionLowP(kFALSE), | |
129 | fDoProtonRejectionLowP(kFALSE), | |
130 | fDoPionRejectionLowP(kFALSE), | |
131 | fPIDnSigmaAtLowPAroundKaonLine(0), | |
132 | fPIDnSigmaAtLowPAroundProtonLine(0), | |
133 | fPIDnSigmaAtLowPAroundPionLine(0), | |
e5b6e8a6 | 134 | fPIDMinPKaonRejectionLowP(1.5), |
135 | fPIDMinPProtonRejectionLowP(2), | |
4a0aab28 | 136 | fPIDMinPPionRejectionLowP(0), |
137 | fDoQtGammaSelection(kTRUE), | |
d8b864f8 | 138 | fDo2DQt(kFALSE), |
4a0aab28 | 139 | fQtMax(100), |
4a0aab28 | 140 | fXVertexCut(0.), |
141 | fYVertexCut(0.), | |
142 | fZVertexCut(0.), | |
143 | fNSigmaMass(0.), | |
144 | fUseEtaMinCut(kFALSE), | |
145 | fUseOnFlyV0Finder(kTRUE), | |
146 | fDoPhotonAsymmetryCut(kTRUE), | |
147 | fMinPPhotonAsymmetryCut(100.), | |
148 | fMinPhotonAsymmetry(0.), | |
0a2b2b4b | 149 | fIsHeavyIon(0), |
4a0aab28 | 150 | fDetectorCentrality(0), |
151 | fModCentralityClass(0), | |
152 | fMaxVertexZ(10), | |
153 | fCentralityMin(0), | |
154 | fCentralityMax(0), | |
155 | fUseCorrectedTPCClsInfo(kFALSE), | |
156 | fUseTOFpid(kFALSE), | |
157 | fMultiplicityMethod(0), | |
e5b6e8a6 | 158 | fSpecialTrigger(0), |
4a0aab28 | 159 | fRemovePileUp(kFALSE), |
160 | fOpeningAngle(0.005), | |
161 | fPsiPairCut(10000), | |
d8b864f8 | 162 | fDo2DPsiPairChi2(kFALSE), |
4a0aab28 | 163 | fCosPAngleCut(10000), |
164 | fDoToCloseV0sCut(kFALSE), | |
165 | fRejectExtraSignals(0), | |
166 | fminV0Dist(200.), | |
167 | fDoSharedElecCut(kFALSE), | |
8fa2d145 | 168 | fDoPhotonQualitySelectionCut(kFALSE), |
169 | fPhotonQualityCut(0), | |
4a0aab28 | 170 | fOfflineTriggerMask(0), |
e5b6e8a6 | 171 | fHasV0AND(kTRUE), |
172 | fIsSDDFired(kTRUE), | |
4a0aab28 | 173 | fRandom(0), |
e5b6e8a6 | 174 | fElectronArraySize(500), |
4a0aab28 | 175 | fElectronLabelArray(NULL), |
4803eb1f | 176 | fDCAZPrimVtxCut(1000), |
177 | fDCARPrimVtxCut(1000), | |
ae4f2cfb | 178 | fInPlaneOutOfPlane(0), |
e5b6e8a6 | 179 | fConversionPointXArray(0.0), |
180 | fConversionPointYArray(0.0), | |
181 | fConversionPointZArray(0.0), | |
182 | fnHeaders(0), | |
4a0aab28 | 183 | fNotRejectedStart(NULL), |
184 | fNotRejectedEnd(NULL), | |
185 | fGeneratorNames(NULL), | |
186 | fCutString(NULL), | |
0a2b2b4b | 187 | fUtils(NULL), |
11c1e680 | 188 | fEtaShift(0.0), |
189 | fDoEtaShift(kFALSE), | |
ae947965 | 190 | fDoReweightHistoMCPi0(kFALSE), |
191 | fDoReweightHistoMCEta(kFALSE), | |
192 | fDoReweightHistoMCK0s(kFALSE), | |
193 | fPathTrFReweighting(""), | |
194 | fNameHistoReweightingPi0(""), | |
195 | fNameHistoReweightingEta(""), | |
196 | fNameHistoReweightingK0s(""), | |
fcc79cf5 | 197 | fNameFitDataPi0(""), |
198 | fNameFitDataEta(""), | |
199 | fNameFitDataK0s(""), | |
f315320f | 200 | hEtaDistV0s(NULL), |
201 | hEtaDistV0sAfterdEdxCuts(NULL), | |
4a0aab28 | 202 | hdEdxCuts(NULL), |
203 | hTPCdEdxbefore(NULL), | |
204 | hTPCdEdxafter(NULL), | |
e5b6e8a6 | 205 | hTPCdEdxSigbefore(NULL), |
206 | hTPCdEdxSigafter(NULL), | |
4a0aab28 | 207 | hTOFbefore(NULL), |
e5b6e8a6 | 208 | hTOFSigbefore(NULL), |
209 | hTOFSigafter(NULL), | |
1390f698 | 210 | hPsiPairDeltaPhiafter(NULL), |
4a0aab28 | 211 | hTrackCuts(NULL), |
212 | hPhotonCuts(NULL), | |
213 | hInvMassbefore(NULL), | |
214 | hArmenterosbefore(NULL), | |
215 | hInvMassafter(NULL), | |
216 | hArmenterosafter(NULL), | |
217 | hAcceptanceCuts(NULL), | |
218 | hCutIndex(NULL), | |
219 | hV0EventCuts(NULL), | |
220 | hCentrality(NULL), | |
4803eb1f | 221 | hCentralityVsNumberOfPrimaryTracks(NULL), |
4a0aab28 | 222 | hVertexZ(NULL), |
ae4f2cfb | 223 | hEventPlanePhi(NULL), |
a280ac15 | 224 | hTriggerClass(NULL), |
ae947965 | 225 | hTriggerClassSelected(NULL), |
226 | hReweightMCHistPi0(NULL), | |
227 | hReweightMCHistEta(NULL), | |
228 | hReweightMCHistK0s(NULL), | |
fcc79cf5 | 229 | fFitDataPi0(NULL), |
230 | fFitDataEta(NULL), | |
231 | fFitDataK0s(NULL), | |
d7b6c10f | 232 | fAddedSignalPDGCode(0), |
ae947965 | 233 | fPreSelCut(kFALSE), |
234 | fTriggerSelectedManually(kFALSE), | |
235 | fSpecialTriggerName("") | |
aff90284 | 236 | |
3b77b2d1 | 237 | { |
4a0aab28 | 238 | InitPIDResponse(); |
239 | for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=0;} | |
240 | fCutString=new TObjString((GetCutNumber()).Data()); | |
3b77b2d1 | 241 | |
e5b6e8a6 | 242 | fElectronLabelArray = new Int_t[fElectronArraySize]; |
0a2b2b4b | 243 | fUtils = new AliAnalysisUtils(); |
244 | //if you do not want to apply the cut on the distance between the SPD and TRK vertex: | |
11c1e680 | 245 | //fUtils->SetCutOnZVertexSPD(kFALSE); |
246 | ||
ca91a3e1 | 247 | |
3b77b2d1 | 248 | } |
249 | ||
1d9e6011 | 250 | //________________________________________________________________________ |
251 | AliConversionCuts::AliConversionCuts(const AliConversionCuts &ref) : | |
252 | AliAnalysisCuts(ref), | |
253 | fHistograms(NULL), | |
254 | fHeaderList(ref.fHeaderList), | |
255 | fPIDResponse(NULL), | |
256 | fEventQuality(ref.fEventQuality), | |
257 | fMaxR(ref.fMaxR), | |
258 | fMinR(ref.fMinR), | |
259 | fEtaCut(ref.fEtaCut), | |
260 | fEtaCutMin(ref.fEtaCutMin), | |
261 | fPtCut(ref.fPtCut), | |
262 | fSinglePtCut(ref.fSinglePtCut), | |
263 | fMaxZ(ref.fMaxZ), | |
264 | fMinClsTPC(ref.fMinClsTPC), | |
265 | fMinClsTPCToF(ref.fMinClsTPCToF), | |
266 | fLineCutZRSlope(ref.fLineCutZRSlope), | |
267 | fLineCutZValue(ref.fLineCutZValue), | |
268 | fLineCutZRSlopeMin(ref.fLineCutZRSlopeMin), | |
269 | fLineCutZValueMin(ref.fLineCutZValueMin), | |
270 | fChi2CutConversion(ref.fChi2CutConversion), | |
271 | fPIDProbabilityCutNegativeParticle(ref.fPIDProbabilityCutNegativeParticle), | |
272 | fPIDProbabilityCutPositiveParticle(ref.fPIDProbabilityCutPositiveParticle), | |
273 | fDodEdxSigmaCut(ref. fDodEdxSigmaCut), | |
274 | fDoTOFsigmaCut(ref.fDoTOFsigmaCut), | |
275 | fPIDTRDEfficiency(ref.fPIDTRDEfficiency), | |
276 | fDoTRDPID(ref.fDoTRDPID), | |
277 | fPIDnSigmaAboveElectronLine(ref.fPIDnSigmaAboveElectronLine), | |
278 | fPIDnSigmaBelowElectronLine(ref.fPIDnSigmaBelowElectronLine), | |
279 | fTofPIDnSigmaAboveElectronLine(ref.fTofPIDnSigmaAboveElectronLine), | |
280 | fTofPIDnSigmaBelowElectronLine(ref.fTofPIDnSigmaBelowElectronLine), | |
281 | fPIDnSigmaAbovePionLine(ref.fPIDnSigmaAbovePionLine), | |
282 | fPIDnSigmaAbovePionLineHighPt(ref.fPIDnSigmaAbovePionLineHighPt), | |
283 | fPIDMinPnSigmaAbovePionLine(ref.fPIDMinPnSigmaAbovePionLine), | |
284 | fPIDMaxPnSigmaAbovePionLine(ref.fPIDMaxPnSigmaAbovePionLine), | |
285 | fDoKaonRejectionLowP(ref.fDoKaonRejectionLowP), | |
286 | fDoProtonRejectionLowP(ref.fDoProtonRejectionLowP), | |
287 | fDoPionRejectionLowP(ref.fDoPionRejectionLowP), | |
288 | fPIDnSigmaAtLowPAroundKaonLine(ref.fPIDnSigmaAtLowPAroundKaonLine), | |
289 | fPIDnSigmaAtLowPAroundProtonLine(ref.fPIDnSigmaAtLowPAroundProtonLine), | |
290 | fPIDnSigmaAtLowPAroundPionLine(ref.fPIDnSigmaAtLowPAroundPionLine), | |
291 | fPIDMinPKaonRejectionLowP(ref.fPIDMinPKaonRejectionLowP), | |
292 | fPIDMinPProtonRejectionLowP(ref.fPIDMinPProtonRejectionLowP), | |
293 | fPIDMinPPionRejectionLowP(ref.fPIDMinPPionRejectionLowP), | |
294 | fDoQtGammaSelection(ref.fDoQtGammaSelection), | |
d8b864f8 | 295 | fDo2DQt(ref.fDo2DQt), |
1d9e6011 | 296 | fQtMax(ref.fQtMax), |
1d9e6011 | 297 | fXVertexCut(ref.fXVertexCut), |
298 | fYVertexCut(ref.fYVertexCut), | |
299 | fZVertexCut(ref.fZVertexCut), | |
300 | fNSigmaMass(ref.fNSigmaMass), | |
301 | fUseEtaMinCut(ref.fUseEtaMinCut), | |
302 | fUseOnFlyV0Finder(ref.fUseOnFlyV0Finder), | |
0a2b2b4b | 303 | fDoPhotonAsymmetryCut(ref.fDoPhotonAsymmetryCut), |
1d9e6011 | 304 | fMinPPhotonAsymmetryCut(ref.fMinPPhotonAsymmetryCut), |
305 | fMinPhotonAsymmetry(ref.fMinPhotonAsymmetry), | |
306 | fIsHeavyIon(ref.fIsHeavyIon), | |
307 | fDetectorCentrality(ref.fDetectorCentrality), | |
308 | fModCentralityClass(ref.fModCentralityClass), | |
309 | fMaxVertexZ(ref.fMaxVertexZ), | |
310 | fCentralityMin(ref.fCentralityMin), | |
311 | fCentralityMax(ref.fCentralityMax), | |
312 | fUseCorrectedTPCClsInfo(ref.fUseCorrectedTPCClsInfo), | |
313 | fUseTOFpid(ref.fUseTOFpid), | |
314 | fMultiplicityMethod(ref.fMultiplicityMethod), | |
315 | fSpecialTrigger(ref.fSpecialTrigger), | |
316 | fRemovePileUp(ref.fRemovePileUp), | |
317 | fOpeningAngle(ref.fOpeningAngle), | |
318 | fPsiPairCut(ref.fPsiPairCut), | |
d8b864f8 | 319 | fDo2DPsiPairChi2(ref.fDo2DPsiPairChi2), |
1d9e6011 | 320 | fCosPAngleCut(ref.fCosPAngleCut), |
321 | fDoToCloseV0sCut(ref.fDoToCloseV0sCut), | |
322 | fRejectExtraSignals(ref.fRejectExtraSignals), | |
323 | fminV0Dist(ref.fminV0Dist), | |
324 | fDoSharedElecCut(ref.fDoSharedElecCut), | |
8fa2d145 | 325 | fDoPhotonQualitySelectionCut(ref.fDoPhotonQualitySelectionCut), |
326 | fPhotonQualityCut(ref.fPhotonQualityCut), | |
1d9e6011 | 327 | fOfflineTriggerMask(ref.fOfflineTriggerMask), |
328 | fHasV0AND(ref.fHasV0AND), | |
329 | fIsSDDFired(ref.fIsSDDFired), | |
330 | fRandom(ref.fRandom), | |
331 | fElectronArraySize(ref.fElectronArraySize), | |
332 | fElectronLabelArray(NULL), | |
4803eb1f | 333 | fDCAZPrimVtxCut(ref.fDCAZPrimVtxCut), |
334 | fDCARPrimVtxCut(ref.fDCAZPrimVtxCut), | |
ae4f2cfb | 335 | fInPlaneOutOfPlane(ref.fInPlaneOutOfPlane), |
1d9e6011 | 336 | fConversionPointXArray(ref.fConversionPointXArray), |
337 | fConversionPointYArray(ref.fConversionPointYArray), | |
338 | fConversionPointZArray(ref.fConversionPointZArray), | |
339 | fnHeaders(ref.fnHeaders), | |
340 | fNotRejectedStart(NULL), | |
341 | fNotRejectedEnd(NULL), | |
342 | fGeneratorNames(ref.fGeneratorNames), | |
343 | fCutString(NULL), | |
0a2b2b4b | 344 | fUtils(NULL), |
11c1e680 | 345 | fEtaShift(ref.fEtaShift), |
346 | fDoEtaShift(ref.fDoEtaShift), | |
ae947965 | 347 | fDoReweightHistoMCPi0(ref.fDoReweightHistoMCPi0), |
348 | fDoReweightHistoMCEta(ref.fDoReweightHistoMCEta), | |
349 | fDoReweightHistoMCK0s(ref.fDoReweightHistoMCK0s), | |
350 | fPathTrFReweighting(ref.fPathTrFReweighting), | |
351 | fNameHistoReweightingPi0(ref.fNameHistoReweightingPi0), | |
352 | fNameHistoReweightingEta(ref.fNameHistoReweightingEta), | |
353 | fNameHistoReweightingK0s(ref.fNameHistoReweightingK0s), | |
fcc79cf5 | 354 | fNameFitDataPi0(ref.fNameFitDataPi0), |
355 | fNameFitDataEta(ref.fNameFitDataEta), | |
356 | fNameFitDataK0s(ref.fNameFitDataK0s), | |
f315320f | 357 | hEtaDistV0s(NULL), |
358 | hEtaDistV0sAfterdEdxCuts(NULL), | |
1d9e6011 | 359 | hdEdxCuts(NULL), |
360 | hTPCdEdxbefore(NULL), | |
361 | hTPCdEdxafter(NULL), | |
362 | hTPCdEdxSigbefore(NULL), | |
363 | hTPCdEdxSigafter(NULL), | |
364 | hTOFbefore(NULL), | |
365 | hTOFSigbefore(NULL), | |
366 | hTOFSigafter(NULL), | |
1390f698 | 367 | hPsiPairDeltaPhiafter(NULL), |
1d9e6011 | 368 | hTrackCuts(NULL), |
369 | hPhotonCuts(NULL), | |
370 | hInvMassbefore(NULL), | |
371 | hArmenterosbefore(NULL), | |
372 | hInvMassafter(NULL), | |
373 | hArmenterosafter(NULL), | |
374 | hAcceptanceCuts(NULL), | |
375 | hCutIndex(NULL), | |
376 | hV0EventCuts(NULL), | |
377 | hCentrality(NULL), | |
4803eb1f | 378 | hCentralityVsNumberOfPrimaryTracks(NULL), |
1d9e6011 | 379 | hVertexZ(NULL), |
ae4f2cfb | 380 | hEventPlanePhi(NULL), |
a280ac15 | 381 | hTriggerClass(NULL), |
ae947965 | 382 | hTriggerClassSelected(NULL), |
aff90284 | 383 | hReweightMCHistPi0(ref.hReweightMCHistPi0), |
384 | hReweightMCHistEta(ref.hReweightMCHistEta), | |
385 | hReweightMCHistK0s(ref.hReweightMCHistK0s), | |
386 | fFitDataPi0(ref.fFitDataPi0), | |
387 | fFitDataEta(ref.fFitDataEta), | |
388 | fFitDataK0s(ref.fFitDataK0s), | |
d7b6c10f | 389 | fAddedSignalPDGCode(ref.fAddedSignalPDGCode), |
ae947965 | 390 | fPreSelCut(ref.fPreSelCut), |
391 | fTriggerSelectedManually(ref.fTriggerSelectedManually), | |
392 | fSpecialTriggerName(ref.fSpecialTriggerName) | |
1d9e6011 | 393 | { |
394 | // Copy Constructor | |
a280ac15 | 395 | for(Int_t jj=0;jj<kNCuts;jj++){fCuts[jj]=ref.fCuts[jj];} |
396 | fCutString=new TObjString((GetCutNumber()).Data()); | |
397 | fElectronLabelArray = new Int_t[fElectronArraySize]; | |
0a2b2b4b | 398 | fUtils = new AliAnalysisUtils(); |
a280ac15 | 399 | // dont copy histograms (if you like histograms, call InitCutHistograms()) |
11c1e680 | 400 | |
1d9e6011 | 401 | } |
402 | ||
a280ac15 | 403 | |
3b77b2d1 | 404 | //________________________________________________________________________ |
405 | AliConversionCuts::~AliConversionCuts() { | |
4a0aab28 | 406 | // Destructor |
407 | //Deleting fHistograms leads to seg fault it it's added to output collection of a task | |
408 | // if(fHistograms) | |
fcc79cf5 | 409 | // delete fHistograms; |
4a0aab28 | 410 | // fHistograms = NULL; |
92efd725 | 411 | if(fCutString != NULL){ |
412 | delete fCutString; | |
413 | fCutString = NULL; | |
414 | } | |
92efd725 | 415 | if(fElectronLabelArray){ |
416 | delete fElectronLabelArray; | |
417 | fElectronLabelArray = NULL; | |
418 | } | |
ca91a3e1 | 419 | if(fNotRejectedStart){ |
420 | delete[] fNotRejectedStart; | |
421 | fNotRejectedStart = NULL; | |
422 | } | |
423 | if(fNotRejectedEnd){ | |
424 | delete[] fNotRejectedEnd; | |
425 | fNotRejectedEnd = NULL; | |
426 | } | |
427 | if(fGeneratorNames){ | |
428 | delete[] fGeneratorNames; | |
429 | fGeneratorNames = NULL; | |
430 | } | |
0a2b2b4b | 431 | if(fUtils){ |
432 | delete fUtils; | |
433 | fUtils = NULL; | |
434 | } | |
435 | ||
3b77b2d1 | 436 | } |
437 | ||
438 | //________________________________________________________________________ | |
92efd725 | 439 | void AliConversionCuts::InitCutHistograms(TString name, Bool_t preCut){ |
3b77b2d1 | 440 | |
4a0aab28 | 441 | // Initialize Cut Histograms for QA (only initialized and filled if function is called) |
ccfa8c0d | 442 | TH1::AddDirectory(kFALSE); |
4a0aab28 | 443 | |
444 | if(fHistograms != NULL){ | |
445 | delete fHistograms; | |
446 | fHistograms=NULL; | |
447 | } | |
448 | if(fHistograms==NULL){ | |
449 | fHistograms=new TList(); | |
ccfa8c0d | 450 | fHistograms->SetOwner(kTRUE); |
4a0aab28 | 451 | if(name=="")fHistograms->SetName(Form("ConvCuts_%s",GetCutNumber().Data())); |
452 | else fHistograms->SetName(Form("%s_%s",name.Data(),GetCutNumber().Data())); | |
453 | } | |
454 | ||
fcc79cf5 | 455 | if (hReweightMCHistPi0){ |
456 | hReweightMCHistPi0->SetName("MCInputForWeightingPi0"); | |
457 | fHistograms->Add(hReweightMCHistPi0); | |
458 | } | |
459 | if (hReweightMCHistEta){ | |
460 | hReweightMCHistEta->SetName("MCInputForWeightingEta"); | |
461 | fHistograms->Add(hReweightMCHistEta); | |
aff90284 | 462 | } |
fcc79cf5 | 463 | if (hReweightMCHistK0s){ |
464 | hReweightMCHistK0s->SetName("MCInputForWeightingK0s"); | |
465 | fHistograms->Add(hReweightMCHistK0s); | |
aff90284 | 466 | } |
34a75862 | 467 | // if (fFitDataPi0){ |
468 | // fFitDataPi0->SetName("DataFitForWeightingPi0"); | |
469 | // fHistograms->Add(fFitDataPi0); | |
470 | // } | |
471 | // if (fFitDataEta){ | |
472 | // fFitDataEta->SetName("DataFitForWeightingEta"); | |
473 | // fHistograms->Add(fFitDataEta); | |
474 | // } | |
475 | // if (fFitDataK0s){ | |
476 | // fFitDataK0s->SetName("DataFitForWeightingK0s"); | |
477 | // fHistograms->Add(fFitDataK0s); | |
478 | // } | |
4a0aab28 | 479 | // IsPhotonSelected |
ae4f2cfb | 480 | hCutIndex=new TH1F(Form("IsPhotonSelected %s",GetCutNumber().Data()),"IsPhotonSelected",11,-0.5,10.5); |
4a0aab28 | 481 | hCutIndex->GetXaxis()->SetBinLabel(kPhotonIn+1,"in"); |
482 | hCutIndex->GetXaxis()->SetBinLabel(kOnFly+1,"onfly"); | |
483 | hCutIndex->GetXaxis()->SetBinLabel(kNoTracks+1,"no tracks"); | |
484 | hCutIndex->GetXaxis()->SetBinLabel(kdEdxCuts+1,"dEdx"); | |
485 | hCutIndex->GetXaxis()->SetBinLabel(kTrackCuts+1,"Track cuts"); | |
486 | hCutIndex->GetXaxis()->SetBinLabel(kConvPointFail+1,"ConvPoint fail"); | |
487 | hCutIndex->GetXaxis()->SetBinLabel(kPhotonCuts+1,"PhotonCuts"); | |
ae4f2cfb | 488 | hCutIndex->GetXaxis()->SetBinLabel(kEventPlane+1,"EventPlane"); |
4a0aab28 | 489 | hCutIndex->GetXaxis()->SetBinLabel(kPhotonOut+1,"out"); |
490 | fHistograms->Add(hCutIndex); | |
491 | ||
492 | // Track Cuts | |
e5b6e8a6 | 493 | hTrackCuts=new TH1F(Form("TrackCuts %s",GetCutNumber().Data()),"TrackCuts",9,-0.5,8.5); |
4a0aab28 | 494 | hTrackCuts->GetXaxis()->SetBinLabel(1,"in"); |
495 | hTrackCuts->GetXaxis()->SetBinLabel(2,"likesign"); | |
496 | hTrackCuts->GetXaxis()->SetBinLabel(3,"ntpccl"); | |
497 | hTrackCuts->GetXaxis()->SetBinLabel(4,"acceptance"); | |
498 | hTrackCuts->GetXaxis()->SetBinLabel(5,"singlept"); | |
499 | hTrackCuts->GetXaxis()->SetBinLabel(6,"TPCrefit"); | |
500 | hTrackCuts->GetXaxis()->SetBinLabel(7,"kink"); | |
501 | hTrackCuts->GetXaxis()->SetBinLabel(8,"out"); | |
502 | fHistograms->Add(hTrackCuts); | |
503 | ||
504 | // Photon Cuts | |
8fa2d145 | 505 | hPhotonCuts=new TH1F(Form("PhotonCuts %s",GetCutNumber().Data()),"PhotonCuts",15,-0.5,14.5); |
4a0aab28 | 506 | hPhotonCuts->GetXaxis()->SetBinLabel(1,"in"); |
507 | hPhotonCuts->GetXaxis()->SetBinLabel(2,"qtcut"); | |
508 | hPhotonCuts->GetXaxis()->SetBinLabel(3,"chi2"); | |
509 | hPhotonCuts->GetXaxis()->SetBinLabel(4,"acceptance"); | |
510 | hPhotonCuts->GetXaxis()->SetBinLabel(5,"asymmetry"); | |
511 | hPhotonCuts->GetXaxis()->SetBinLabel(6,"pidprob"); | |
512 | hPhotonCuts->GetXaxis()->SetBinLabel(7,"cortpcclinfo"); | |
513 | hPhotonCuts->GetXaxis()->SetBinLabel(8,"PsiPair"); | |
514 | hPhotonCuts->GetXaxis()->SetBinLabel(9,"CosPAngle"); | |
4803eb1f | 515 | hPhotonCuts->GetXaxis()->SetBinLabel(10,"DCA R"); |
516 | hPhotonCuts->GetXaxis()->SetBinLabel(11,"DCA Z"); | |
8fa2d145 | 517 | hPhotonCuts->GetXaxis()->SetBinLabel(12,"Photon Quality"); |
518 | hPhotonCuts->GetXaxis()->SetBinLabel(13,"out"); | |
4a0aab28 | 519 | fHistograms->Add(hPhotonCuts); |
520 | ||
521 | if(preCut){ | |
e5b6e8a6 | 522 | hInvMassbefore=new TH1F(Form("InvMass_before %s",GetCutNumber().Data()),"InvMass_before",1000,0,0.3); |
4a0aab28 | 523 | fHistograms->Add(hInvMassbefore); |
e5b6e8a6 | 524 | hArmenterosbefore=new TH2F(Form("Armenteros_before %s",GetCutNumber().Data()),"Armenteros_before",200,-1,1,1000,0,1.); |
4a0aab28 | 525 | fHistograms->Add(hArmenterosbefore); |
f315320f | 526 | hEtaDistV0s = new TH1F(Form("Eta_before %s",GetCutNumber().Data()),"Eta_before",2000,-2,2); |
527 | fHistograms->Add(hEtaDistV0s); | |
528 | ||
4a0aab28 | 529 | } |
e5b6e8a6 | 530 | hInvMassafter=new TH1F(Form("InvMass_after %s",GetCutNumber().Data()),"InvMass_after",1000,0,0.3); |
4a0aab28 | 531 | fHistograms->Add(hInvMassafter); |
532 | hArmenterosafter=new TH2F(Form("Armenteros_after %s",GetCutNumber().Data()),"Armenteros_after",200,-1,1,250,0,0.25); | |
533 | fHistograms->Add(hArmenterosafter); | |
534 | ||
535 | hAcceptanceCuts=new TH1F(Form("PhotonAcceptanceCuts %s",GetCutNumber().Data()),"PhotonAcceptanceCuts",10,-0.5,9.5); | |
536 | hAcceptanceCuts->GetXaxis()->SetBinLabel(1,"in"); | |
537 | hAcceptanceCuts->GetXaxis()->SetBinLabel(2,"maxR"); | |
538 | hAcceptanceCuts->GetXaxis()->SetBinLabel(3,"minR"); | |
539 | hAcceptanceCuts->GetXaxis()->SetBinLabel(4,"line"); | |
540 | hAcceptanceCuts->GetXaxis()->SetBinLabel(5,"maxZ"); | |
541 | hAcceptanceCuts->GetXaxis()->SetBinLabel(6,"eta"); | |
542 | hAcceptanceCuts->GetXaxis()->SetBinLabel(7,"minpt"); | |
543 | hAcceptanceCuts->GetXaxis()->SetBinLabel(8,"out"); | |
544 | fHistograms->Add(hAcceptanceCuts); | |
545 | ||
546 | // dEdx Cuts | |
547 | hdEdxCuts=new TH1F(Form("dEdxCuts %s",GetCutNumber().Data()),"dEdxCuts",10,-0.5,9.5); | |
548 | hdEdxCuts->GetXaxis()->SetBinLabel(1,"in"); | |
549 | hdEdxCuts->GetXaxis()->SetBinLabel(2,"TPCelectron"); | |
550 | hdEdxCuts->GetXaxis()->SetBinLabel(3,"TPCpion"); | |
551 | hdEdxCuts->GetXaxis()->SetBinLabel(4,"TPCpionhighp"); | |
552 | hdEdxCuts->GetXaxis()->SetBinLabel(5,"TPCkaonlowprej"); | |
553 | hdEdxCuts->GetXaxis()->SetBinLabel(6,"TPCprotonlowprej"); | |
554 | hdEdxCuts->GetXaxis()->SetBinLabel(7,"TPCpionlowprej"); | |
555 | hdEdxCuts->GetXaxis()->SetBinLabel(8,"TOFelectron"); | |
556 | hdEdxCuts->GetXaxis()->SetBinLabel(9,"TRDelectron"); | |
557 | hdEdxCuts->GetXaxis()->SetBinLabel(10,"out"); | |
558 | fHistograms->Add(hdEdxCuts); | |
e5b6e8a6 | 559 | |
4a0aab28 | 560 | TAxis *AxisBeforedEdx = NULL; |
e5b6e8a6 | 561 | TAxis *AxisBeforedEdxSig = NULL; |
4a0aab28 | 562 | TAxis *AxisBeforeTOF = NULL; |
e5b6e8a6 | 563 | TAxis *AxisBeforeTOFSig = NULL; |
4a0aab28 | 564 | if(preCut){ |
e5b6e8a6 | 565 | hTPCdEdxbefore=new TH2F(Form("Gamma_dEdx_before %s",GetCutNumber().Data()),"dEdx Gamma before" ,150,0.03,20,800,0,200); |
4a0aab28 | 566 | fHistograms->Add(hTPCdEdxbefore); |
e5b6e8a6 | 567 | AxisBeforedEdx = hTPCdEdxbefore->GetXaxis(); |
568 | hTPCdEdxSigbefore=new TH2F(Form("Gamma_dEdxSig_before %s",GetCutNumber().Data()),"dEdx Sigma Gamma before" ,150,0.03,20,400,-10,10); | |
569 | fHistograms->Add(hTPCdEdxSigbefore); | |
570 | AxisBeforedEdxSig = hTPCdEdxSigbefore->GetXaxis(); | |
4a0aab28 | 571 | |
e5b6e8a6 | 572 | hTOFbefore=new TH2F(Form("Gamma_TOF_before %s",GetCutNumber().Data()),"TOF Gamma before" ,150,0.03,20,11000,-1000,10000); |
4a0aab28 | 573 | fHistograms->Add(hTOFbefore); |
e5b6e8a6 | 574 | AxisBeforeTOF = hTOFbefore->GetXaxis(); |
575 | hTOFSigbefore=new TH2F(Form("Gamma_TOFSig_before %s",GetCutNumber().Data()),"TOF Sigma Gamma before" ,150,0.03,20,400,-6,10); | |
576 | fHistograms->Add(hTOFSigbefore); | |
577 | AxisBeforeTOFSig = hTOFSigbefore->GetXaxis(); | |
578 | ||
4a0aab28 | 579 | } |
e5b6e8a6 | 580 | hTPCdEdxSigafter=new TH2F(Form("Gamma_dEdxSig_after %s",GetCutNumber().Data()),"dEdx Sigma Gamma after" ,150,0.03,20,400, -10,10); |
581 | fHistograms->Add(hTPCdEdxSigafter); | |
582 | ||
583 | hTPCdEdxafter=new TH2F(Form("Gamma_dEdx_after %s",GetCutNumber().Data()),"dEdx Gamma after" ,150,0.03,20,800,0,200); | |
4a0aab28 | 584 | fHistograms->Add(hTPCdEdxafter); |
585 | ||
e5b6e8a6 | 586 | hTOFSigafter=new TH2F(Form("Gamma_TOFSig_after %s",GetCutNumber().Data()),"TOF Sigma Gamma after" ,150,0.03,20,400,-6,10); |
587 | fHistograms->Add(hTOFSigafter); | |
4a0aab28 | 588 | |
f315320f | 589 | hEtaDistV0sAfterdEdxCuts = new TH1F(Form("Eta_afterdEdx %s",GetCutNumber().Data()),"Eta_afterdEdx",2000,-2,2); |
590 | fHistograms->Add(hEtaDistV0sAfterdEdxCuts); | |
591 | ||
1390f698 | 592 | hPsiPairDeltaPhiafter=new TH2F(Form("Gamma_PsiPairDeltaPhi_after %s",GetCutNumber().Data()),"Psi Pair vs Delta Phi Gamma after" ,200,-2,2,200,-2,2); |
593 | fHistograms->Add(hPsiPairDeltaPhiafter); | |
594 | ||
e5b6e8a6 | 595 | TAxis *AxisAfter = hTPCdEdxSigafter->GetXaxis(); |
4a0aab28 | 596 | Int_t bins = AxisAfter->GetNbins(); |
597 | Double_t from = AxisAfter->GetXmin(); | |
598 | Double_t to = AxisAfter->GetXmax(); | |
599 | Double_t *newBins = new Double_t[bins+1]; | |
600 | newBins[0] = from; | |
601 | Double_t factor = TMath::Power(to/from, 1./bins); | |
602 | for(Int_t i=1; i<=bins; ++i) newBins[i] = factor * newBins[i-1]; | |
603 | AxisAfter->Set(bins, newBins); | |
e5b6e8a6 | 604 | AxisAfter = hTOFSigafter->GetXaxis(); |
605 | AxisAfter->Set(bins, newBins); | |
606 | AxisAfter = hTPCdEdxafter->GetXaxis(); | |
4a0aab28 | 607 | AxisAfter->Set(bins, newBins); |
608 | if(preCut){ | |
609 | AxisBeforedEdx->Set(bins, newBins); | |
610 | AxisBeforeTOF->Set(bins, newBins); | |
e5b6e8a6 | 611 | AxisBeforedEdxSig->Set(bins, newBins); |
612 | AxisBeforeTOFSig->Set(bins, newBins); | |
4a0aab28 | 613 | } |
614 | delete [] newBins; | |
e5b6e8a6 | 615 | |
d0a4ea74 | 616 | hCentrality=new TH1F(Form("Centrality %s",GetCutNumber().Data()),"Centrality",100,0,100); |
ae4f2cfb | 617 | fHistograms->Add(hCentrality); |
618 | hCentralityVsNumberOfPrimaryTracks=new TH2F(Form("Centrality vs Primary Tracks %s",GetCutNumber().Data()),"Centrality vs Primary Tracks ",100,0,100,4000,0,4000); | |
619 | fHistograms->Add(hCentralityVsNumberOfPrimaryTracks); | |
620 | ||
4a0aab28 | 621 | // Event Cuts and Info |
622 | if(preCut){ | |
e5b6e8a6 | 623 | hV0EventCuts=new TH1F(Form("ESD_EventCuts %s",GetCutNumber().Data()),"Event Cuts",7,-0.5,6.5); |
4a0aab28 | 624 | hV0EventCuts->GetXaxis()->SetBinLabel(1,"in"); |
625 | hV0EventCuts->GetXaxis()->SetBinLabel(2,"OfflineTrigger"); | |
e5b6e8a6 | 626 | hV0EventCuts->GetXaxis()->SetBinLabel(3,"nvtxcontr"); |
627 | hV0EventCuts->GetXaxis()->SetBinLabel(4,"VertexZ"); | |
4a0aab28 | 628 | hV0EventCuts->GetXaxis()->SetBinLabel(5,"pileup"); |
629 | hV0EventCuts->GetXaxis()->SetBinLabel(6,"centrsel"); | |
630 | hV0EventCuts->GetXaxis()->SetBinLabel(7,"out"); | |
631 | fHistograms->Add(hV0EventCuts); | |
e5b6e8a6 | 632 | |
4a0aab28 | 633 | hVertexZ=new TH1F(Form("VertexZ %s",GetCutNumber().Data()),"VertexZ",1000,-50,50); |
634 | fHistograms->Add(hVertexZ); | |
e5b6e8a6 | 635 | |
11c1e680 | 636 | hTriggerClass= new TH1F(Form("OfflineTrigger %s",GetCutNumber().Data()),"OfflineTrigger",35,-0.5,34.5); |
e5b6e8a6 | 637 | hTriggerClass->GetXaxis()->SetBinLabel( 1,"kMB"); |
638 | hTriggerClass->GetXaxis()->SetBinLabel( 2,"kINT7"); | |
639 | hTriggerClass->GetXaxis()->SetBinLabel( 3,"kMUON"); | |
640 | hTriggerClass->GetXaxis()->SetBinLabel( 4,"kHighMult"); | |
641 | hTriggerClass->GetXaxis()->SetBinLabel( 5,"kKEMC1"); | |
642 | hTriggerClass->GetXaxis()->SetBinLabel( 6,"kCINT5"); | |
643 | hTriggerClass->GetXaxis()->SetBinLabel( 7,"kCMUS5/kMUSPB"); | |
644 | hTriggerClass->GetXaxis()->SetBinLabel( 8,"kMUSH7/kMUSHPB"); | |
645 | hTriggerClass->GetXaxis()->SetBinLabel( 9,"kMUL7/kMuonLikePB"); | |
646 | hTriggerClass->GetXaxis()->SetBinLabel(10,"kMUU7/kMuonUnlikePB"); | |
647 | hTriggerClass->GetXaxis()->SetBinLabel(11,"kEMC7/kEMC8"); | |
648 | hTriggerClass->GetXaxis()->SetBinLabel(12,"kMUS7"); | |
649 | hTriggerClass->GetXaxis()->SetBinLabel(13,"kPHI1"); | |
650 | hTriggerClass->GetXaxis()->SetBinLabel(14,"kPHI7/kPHI8/kPHOSPb"); | |
651 | hTriggerClass->GetXaxis()->SetBinLabel(15,"kEMCEJE"); | |
652 | hTriggerClass->GetXaxis()->SetBinLabel(16,"kEMCEGA"); | |
653 | hTriggerClass->GetXaxis()->SetBinLabel(17,"kCentral"); | |
654 | hTriggerClass->GetXaxis()->SetBinLabel(18,"kSemiCentral"); | |
655 | hTriggerClass->GetXaxis()->SetBinLabel(19,"kDG5"); | |
656 | hTriggerClass->GetXaxis()->SetBinLabel(20,"kZED"); | |
657 | hTriggerClass->GetXaxis()->SetBinLabel(21,"kSPI7/kSPI"); | |
658 | hTriggerClass->GetXaxis()->SetBinLabel(22,"kINT8"); | |
659 | hTriggerClass->GetXaxis()->SetBinLabel(23,"kMuonSingleLowPt8"); | |
660 | hTriggerClass->GetXaxis()->SetBinLabel(24,"kMuonSingleHighPt8"); | |
661 | hTriggerClass->GetXaxis()->SetBinLabel(25,"kMuonLikeLowPt8"); | |
662 | hTriggerClass->GetXaxis()->SetBinLabel(26,"kMuonUnlikeLowPt8"); | |
663 | hTriggerClass->GetXaxis()->SetBinLabel(27,"kMuonUnlikeLowPt0"); | |
664 | hTriggerClass->GetXaxis()->SetBinLabel(28,"kUserDefined"); | |
11c1e680 | 665 | hTriggerClass->GetXaxis()->SetBinLabel(29,"kTRD"); |
666 | hTriggerClass->GetXaxis()->SetBinLabel(30,"kFastOnly"); | |
667 | hTriggerClass->GetXaxis()->SetBinLabel(31,"kAnyINT"); | |
668 | hTriggerClass->GetXaxis()->SetBinLabel(32,"kAny"); | |
669 | hTriggerClass->GetXaxis()->SetBinLabel(33,"V0AND"); | |
670 | hTriggerClass->GetXaxis()->SetBinLabel(34,"NOT kFastOnly"); | |
671 | hTriggerClass->GetXaxis()->SetBinLabel(35,"failed Physics Selection"); | |
4a0aab28 | 672 | fHistograms->Add(hTriggerClass); |
ae947965 | 673 | } |
674 | if(!preCut){ | |
11c1e680 | 675 | hTriggerClassSelected= new TH1F(Form("OfflineTriggerSelected %s",GetCutNumber().Data()),"OfflineTriggerSelected",34,-0.5,33.5); |
a280ac15 | 676 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 1,"kMB"); |
677 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 2,"kINT7"); | |
678 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 3,"kMUON"); | |
679 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 4,"kHighMult"); | |
680 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 5,"kKEMC1"); | |
681 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 6,"kCINT5"); | |
682 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 7,"kCMUS5/kMUSPB"); | |
683 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 8,"kMUSH7/kMUSHPB"); | |
684 | hTriggerClassSelected->GetXaxis()->SetBinLabel( 9,"kMUL7/kMuonLikePB"); | |
685 | hTriggerClassSelected->GetXaxis()->SetBinLabel(10,"kMUU7/kMuonUnlikePB"); | |
686 | hTriggerClassSelected->GetXaxis()->SetBinLabel(11,"kEMC7/kEMC8"); | |
687 | hTriggerClassSelected->GetXaxis()->SetBinLabel(12,"kMUS7"); | |
688 | hTriggerClassSelected->GetXaxis()->SetBinLabel(13,"kPHI1"); | |
689 | hTriggerClassSelected->GetXaxis()->SetBinLabel(14,"kPHI7/kPHI8/kPHOSPb"); | |
690 | hTriggerClassSelected->GetXaxis()->SetBinLabel(15,"kEMCEJE"); | |
691 | hTriggerClassSelected->GetXaxis()->SetBinLabel(16,"kEMCEGA"); | |
692 | hTriggerClassSelected->GetXaxis()->SetBinLabel(17,"kCentral"); | |
693 | hTriggerClassSelected->GetXaxis()->SetBinLabel(18,"kSemiCentral"); | |
694 | hTriggerClassSelected->GetXaxis()->SetBinLabel(19,"kDG5"); | |
695 | hTriggerClassSelected->GetXaxis()->SetBinLabel(20,"kZED"); | |
696 | hTriggerClassSelected->GetXaxis()->SetBinLabel(21,"kSPI7/kSPI"); | |
697 | hTriggerClassSelected->GetXaxis()->SetBinLabel(22,"kINT8"); | |
698 | hTriggerClassSelected->GetXaxis()->SetBinLabel(23,"kMuonSingleLowPt8"); | |
699 | hTriggerClassSelected->GetXaxis()->SetBinLabel(24,"kMuonSingleHighPt8"); | |
700 | hTriggerClassSelected->GetXaxis()->SetBinLabel(25,"kMuonLikeLowPt8"); | |
701 | hTriggerClassSelected->GetXaxis()->SetBinLabel(26,"kMuonUnlikeLowPt8"); | |
702 | hTriggerClassSelected->GetXaxis()->SetBinLabel(27,"kMuonUnlikeLowPt0"); | |
703 | hTriggerClassSelected->GetXaxis()->SetBinLabel(28,"kUserDefined"); | |
11c1e680 | 704 | hTriggerClassSelected->GetXaxis()->SetBinLabel(29,"kTRD"); |
705 | hTriggerClassSelected->GetXaxis()->SetBinLabel(30,"kFastOnly"); | |
706 | hTriggerClassSelected->GetXaxis()->SetBinLabel(31,"kAnyINT"); | |
707 | hTriggerClassSelected->GetXaxis()->SetBinLabel(32,"kAny"); | |
708 | hTriggerClassSelected->GetXaxis()->SetBinLabel(33,"V0AND"); | |
709 | hTriggerClassSelected->GetXaxis()->SetBinLabel(34,"NOT kFastOnly"); | |
a280ac15 | 710 | fHistograms->Add(hTriggerClassSelected); |
ae4f2cfb | 711 | |
712 | hEventPlanePhi=new TH1F(Form("EventPlaneMinusPhotonAngle %s",GetCutNumber().Data()),"EventPlaneMinusPhotonAngle",360,-TMath::Pi(),TMath::Pi()); | |
713 | fHistograms->Add(hEventPlanePhi); | |
714 | ||
715 | ||
4a0aab28 | 716 | } |
ccfa8c0d | 717 | TH1::AddDirectory(kTRUE); |
3b77b2d1 | 718 | } |
719 | ||
720 | //________________________________________________________________________ | |
721 | Bool_t AliConversionCuts::InitPIDResponse(){ | |
4a0aab28 | 722 | // Set Pointer to AliPIDResponse |
3b77b2d1 | 723 | |
4a0aab28 | 724 | AliAnalysisManager *man=AliAnalysisManager::GetAnalysisManager(); |
e5b6e8a6 | 725 | if(man) { |
4a0aab28 | 726 | AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler()); |
727 | fPIDResponse = (AliPIDResponse*)inputHandler->GetPIDResponse(); | |
728 | if(fPIDResponse)return kTRUE; | |
e5b6e8a6 | 729 | |
4a0aab28 | 730 | } |
e5b6e8a6 | 731 | |
ca91a3e1 | 732 | |
4a0aab28 | 733 | return kFALSE; |
3b77b2d1 | 734 | } |
735 | ///________________________________________________________________________ | |
92efd725 | 736 | Bool_t AliConversionCuts::EventIsSelected(AliVEvent *fInputEvent, AliVEvent *fMCEvent){ |
4a0aab28 | 737 | // Process Event Selection |
3b77b2d1 | 738 | |
4a0aab28 | 739 | Int_t cutindex=0; |
740 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); | |
741 | cutindex++; | |
e5b6e8a6 | 742 | |
4a0aab28 | 743 | // Check for MC event |
ae947965 | 744 | if(fMCEvent && fInputEvent->IsA()==AliESDEvent::Class()){ |
4a0aab28 | 745 | // Check if MC event is correctly loaded |
746 | AliMCEventHandler* mcHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler()); | |
747 | if (!mcHandler){ | |
748 | fEventQuality = 2; | |
749 | return kFALSE; | |
750 | } | |
751 | if (!mcHandler->InitOk() ){ | |
752 | fEventQuality = 2; | |
753 | return kFALSE; | |
754 | } | |
755 | if (!mcHandler->TreeK() ){ | |
756 | fEventQuality = 2; | |
757 | return kFALSE; | |
758 | } | |
759 | if (!mcHandler->TreeTR() ) { | |
760 | fEventQuality = 2; | |
761 | return kFALSE; | |
762 | } | |
763 | } | |
4a0aab28 | 764 | |
e5b6e8a6 | 765 | // Event Trigger |
4803eb1f | 766 | // cout << "before event trigger" << endl; |
1186afd2 | 767 | if(!IsTriggerSelected(fInputEvent)){ |
4a0aab28 | 768 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); |
769 | fEventQuality = 3; | |
770 | return kFALSE; | |
771 | } | |
772 | cutindex++; | |
a280ac15 | 773 | |
e5b6e8a6 | 774 | if(fInputEvent->IsA()==AliESDEvent::Class()){ |
775 | AliTriggerAnalysis fTriggerAnalysis;// = new AliTriggerAnalysis; | |
776 | fHasV0AND = fTriggerAnalysis.IsOfflineTriggerFired((AliESDEvent*)fInputEvent, AliTriggerAnalysis::kV0AND); | |
11c1e680 | 777 | if(fHasV0AND&&hTriggerClass)hTriggerClass->Fill(32); |
e5b6e8a6 | 778 | } |
ccfa8c0d | 779 | // cout << "event number " << ((AliESDEvent*)fInputEvent)->GetEventNumberInFile() << " entered"<< endl; |
780 | ||
4a0aab28 | 781 | |
e5b6e8a6 | 782 | // Number of Contributors Cut |
783 | if(GetNumberOfContributorsVtx(fInputEvent)<=0) { | |
4a0aab28 | 784 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); |
e5b6e8a6 | 785 | fEventQuality = 5; |
4a0aab28 | 786 | return kFALSE; |
787 | } | |
788 | cutindex++; | |
789 | ||
e5b6e8a6 | 790 | // Z Vertex Position Cut |
791 | if(!VertexZCut(fInputEvent)){ | |
4a0aab28 | 792 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); |
e5b6e8a6 | 793 | fEventQuality = 4; |
4a0aab28 | 794 | return kFALSE; |
795 | } | |
796 | cutindex++; | |
92efd725 | 797 | |
4a0aab28 | 798 | // Pile Up Rejection |
3b77b2d1 | 799 | |
4a0aab28 | 800 | if(fRemovePileUp){ |
801 | if(fInputEvent->IsPileupFromSPD(3,0.8,3.,2.,5.)){ | |
802 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); | |
803 | fEventQuality = 6; | |
804 | return kFALSE; | |
805 | } | |
806 | } | |
807 | cutindex++; | |
808 | ||
809 | // Centrality Selection | |
e5b6e8a6 | 810 | if(!IsCentralitySelected(fInputEvent,fMCEvent)){ |
4a0aab28 | 811 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); |
812 | fEventQuality = 1; | |
813 | return kFALSE; | |
814 | } | |
815 | cutindex++; | |
816 | ||
817 | // Fill Event Histograms | |
818 | if(hV0EventCuts)hV0EventCuts->Fill(cutindex); | |
819 | if(hVertexZ)hVertexZ->Fill(fInputEvent->GetPrimaryVertex()->GetZ()); | |
820 | if(hCentrality)hCentrality->Fill(GetCentrality(fInputEvent)); | |
4803eb1f | 821 | if(hCentralityVsNumberOfPrimaryTracks) |
822 | hCentralityVsNumberOfPrimaryTracks->Fill(GetCentrality(fInputEvent), | |
823 | ((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager() | |
824 | ->GetTask("V0ReaderV1"))->GetNumberOfPrimaryTracks()); | |
4a0aab28 | 825 | fEventQuality = 0; |
826 | return kTRUE; | |
3b77b2d1 | 827 | } |
828 | ||
829 | ///________________________________________________________________________ | |
92efd725 | 830 | Bool_t AliConversionCuts::PhotonIsSelectedMC(TParticle *particle,AliStack *fMCStack,Bool_t checkForConvertedGamma){ |
4a0aab28 | 831 | // MonteCarlo Photon Selection |
3b77b2d1 | 832 | |
4a0aab28 | 833 | if(!fMCStack)return kFALSE; |
3b77b2d1 | 834 | |
4a0aab28 | 835 | if (particle->GetPdgCode() == 22){ |
e5b6e8a6 | 836 | |
4a0aab28 | 837 | |
11c1e680 | 838 | if( particle->Eta() > (fEtaCut + fEtaShift) || particle->Eta() < (-fEtaCut + fEtaShift) ) |
839 | return kFALSE; | |
840 | if(fEtaCutMin>-0.1){ | |
841 | if( particle->Eta() < (fEtaCutMin + fEtaShift) && particle->Eta() > (-fEtaCutMin + fEtaShift) ) | |
842 | return kFALSE; | |
843 | } | |
ccfa8c0d | 844 | |
4a0aab28 | 845 | if(particle->GetMother(0) >-1 && fMCStack->Particle(particle->GetMother(0))->GetPdgCode() == 22){ |
846 | return kFALSE; // no photon as mothers! | |
847 | } | |
848 | ||
849 | if(particle->GetMother(0) >= fMCStack->GetNprimary()){ | |
850 | return kFALSE; // the gamma has a mother, and it is not a primary particle | |
851 | } | |
852 | ||
853 | if(!checkForConvertedGamma) return kTRUE; // return in case of accepted gamma | |
854 | ||
855 | // looking for conversion gammas (electron + positron from pairbuilding (= 5) ) | |
856 | TParticle* ePos = NULL; | |
857 | TParticle* eNeg = NULL; | |
858 | ||
859 | if(particle->GetNDaughters() >= 2){ | |
860 | for(Int_t daughterIndex=particle->GetFirstDaughter();daughterIndex<=particle->GetLastDaughter();daughterIndex++){ | |
861 | TParticle *tmpDaughter = fMCStack->Particle(daughterIndex); | |
862 | if(tmpDaughter->GetUniqueID() == 5){ | |
863 | if(tmpDaughter->GetPdgCode() == 11){ | |
864 | eNeg = tmpDaughter; | |
865 | } else if(tmpDaughter->GetPdgCode() == -11){ | |
866 | ePos = tmpDaughter; | |
867 | } | |
868 | } | |
869 | } | |
870 | } | |
871 | ||
872 | if(ePos == NULL || eNeg == NULL){ // means we do not have two daughters from pair production | |
873 | return kFALSE; | |
874 | } | |
e5b6e8a6 | 875 | |
4a0aab28 | 876 | if(ePos->Pt()<fSinglePtCut || eNeg->Pt()<fSinglePtCut){ |
877 | return kFALSE; // no reconstruction below the Pt cut | |
878 | } | |
e5b6e8a6 | 879 | |
11c1e680 | 880 | if( ePos->Eta() > (fEtaCut + fEtaShift) || ePos->Eta() < (-fEtaCut + fEtaShift) || |
881 | eNeg->Eta() > (fEtaCut + fEtaShift) || eNeg->Eta() < (-fEtaCut + fEtaShift) ) | |
4a0aab28 | 882 | return kFALSE; |
11c1e680 | 883 | |
884 | if(fEtaCutMin > -0.1){ | |
885 | if( (ePos->Eta() < (fEtaCutMin + fEtaShift) && ePos->Eta() > (-fEtaCutMin + fEtaShift)) || | |
886 | (eNeg->Eta() < (fEtaCutMin + fEtaShift) && eNeg->Eta() > (-fEtaCutMin + fEtaShift)) ) | |
887 | return kFALSE; | |
4a0aab28 | 888 | } |
e5b6e8a6 | 889 | |
4a0aab28 | 890 | if(ePos->R()>fMaxR){ |
891 | return kFALSE; // cuts on distance from collision point | |
892 | } | |
893 | ||
e5b6e8a6 | 894 | if(abs(ePos->Vz()) > fMaxZ){ |
fcc79cf5 | 895 | return kFALSE; // outside material |
4a0aab28 | 896 | } |
e5b6e8a6 | 897 | if(abs(eNeg->Vz()) > fMaxZ){ |
fcc79cf5 | 898 | return kFALSE; // outside material |
4a0aab28 | 899 | } |
900 | ||
e5b6e8a6 | 901 | if( ePos->R() <= ((abs(ePos->Vz()) * fLineCutZRSlope) - fLineCutZValue)){ |
4a0aab28 | 902 | return kFALSE; // line cut to exclude regions where we do not reconstruct |
e5b6e8a6 | 903 | } else if ( fEtaCutMin != -0.1 && ePos->R() >= ((abs(ePos->Vz()) * fLineCutZRSlopeMin) - fLineCutZValueMin)){ |
4a0aab28 | 904 | return kFALSE; |
905 | } | |
e5b6e8a6 | 906 | |
907 | if( eNeg->R() <= ((abs(eNeg->Vz()) * fLineCutZRSlope) - fLineCutZValue)){ | |
4a0aab28 | 908 | return kFALSE; // line cut to exclude regions where we do not reconstruct |
e5b6e8a6 | 909 | } else if ( fEtaCutMin != -0.1 && eNeg->R() >= ((abs(eNeg->Vz()) * fLineCutZRSlopeMin) - fLineCutZValueMin)){ |
4a0aab28 | 910 | return kFALSE; |
911 | } | |
e5b6e8a6 | 912 | |
4a0aab28 | 913 | return kTRUE; |
914 | //if(AcceptanceCut(particle,ePos,eNeg))return kTRUE; | |
915 | } | |
916 | return kFALSE; | |
3b77b2d1 | 917 | } |
ae947965 | 918 | ///________________________________________________________________________ |
919 | Bool_t AliConversionCuts::PhotonIsSelectedAODMC(AliAODMCParticle *particle,TClonesArray *aodmcArray,Bool_t checkForConvertedGamma){ | |
920 | // MonteCarlo Photon Selection | |
921 | ||
922 | if(!aodmcArray)return kFALSE; | |
aff90284 | 923 | |
ae947965 | 924 | if (particle->GetPdgCode() == 22){ |
925 | if( particle->Eta() > (fEtaCut + fEtaShift) || particle->Eta() < (-fEtaCut + fEtaShift) ) | |
926 | return kFALSE; | |
927 | if(fEtaCutMin>-0.1){ | |
928 | if( particle->Eta() < (fEtaCutMin + fEtaShift) && particle->Eta() > (-fEtaCutMin + fEtaShift) ) | |
929 | return kFALSE; | |
930 | } | |
931 | ||
932 | if(particle->GetMother() > -1){ | |
933 | if((static_cast<AliAODMCParticle*>(aodmcArray->At(particle->GetMother())))->GetPdgCode() == 22){ | |
934 | return kFALSE; // no photon as mothers! | |
935 | } | |
936 | if(!(static_cast<AliAODMCParticle*>(aodmcArray->At(particle->GetMother()))->IsPrimary())){ | |
937 | return kFALSE; // the gamma has a mother, and it is not a primary particle | |
938 | } | |
939 | } | |
aff90284 | 940 | |
ae947965 | 941 | if(!checkForConvertedGamma) return kTRUE; // return in case of accepted gamma |
942 | ||
943 | // looking for conversion gammas (electron + positron from pairbuilding (= 5) ) | |
944 | AliAODMCParticle* ePos = NULL; | |
945 | AliAODMCParticle* eNeg = NULL; | |
946 | ||
947 | if(particle->GetNDaughters() >= 2){ | |
948 | for(Int_t daughterIndex=particle->GetDaughter(0);daughterIndex<=particle->GetDaughter(1);daughterIndex++){ | |
949 | AliAODMCParticle *tmpDaughter = static_cast<AliAODMCParticle*>(aodmcArray->At(daughterIndex)); | |
950 | if(!tmpDaughter) continue; | |
951 | if(((tmpDaughter->GetMCProcessCode())) == 5){ // STILL A BUG IN ALIROOT >>8 HAS TPO BE REMOVED AFTER FIX | |
952 | if(tmpDaughter->GetPdgCode() == 11){ | |
953 | eNeg = tmpDaughter; | |
954 | } else if(tmpDaughter->GetPdgCode() == -11){ | |
955 | ePos = tmpDaughter; | |
956 | } | |
957 | } | |
958 | } | |
959 | } | |
aff90284 | 960 | |
ae947965 | 961 | if(ePos == NULL || eNeg == NULL){ // means we do not have two daughters from pair production |
962 | return kFALSE; | |
963 | } | |
964 | ||
965 | if(ePos->Pt()<fSinglePtCut || eNeg->Pt()<fSinglePtCut){ | |
966 | return kFALSE; // no reconstruction below the Pt cut | |
967 | } | |
968 | ||
969 | if( ePos->Eta() > (fEtaCut + fEtaShift) || ePos->Eta() < (-fEtaCut + fEtaShift) || | |
970 | eNeg->Eta() > (fEtaCut + fEtaShift) || eNeg->Eta() < (-fEtaCut + fEtaShift) ) | |
971 | return kFALSE; | |
972 | ||
973 | if(fEtaCutMin > -0.1){ | |
974 | if( (ePos->Eta() < (fEtaCutMin + fEtaShift) && ePos->Eta() > (-fEtaCutMin + fEtaShift)) || | |
975 | (eNeg->Eta() < (fEtaCutMin + fEtaShift) && eNeg->Eta() > (-fEtaCutMin + fEtaShift)) ) | |
976 | return kFALSE; | |
977 | } | |
978 | ||
979 | Double_t rPos = sqrt( (ePos->Xv()*ePos->Xv()) + (ePos->Yv()*ePos->Yv()) ); | |
980 | Double_t rNeg = sqrt( (eNeg->Xv()*eNeg->Xv()) + (eNeg->Yv()*eNeg->Yv()) ); | |
aff90284 | 981 | |
ae947965 | 982 | if(rPos>fMaxR){ |
983 | return kFALSE; // cuts on distance from collision point | |
984 | } | |
985 | if(abs(ePos->Zv()) > fMaxZ){ | |
fcc79cf5 | 986 | return kFALSE; // outside material |
ae947965 | 987 | } |
988 | if(abs(eNeg->Zv()) > fMaxZ){ | |
fcc79cf5 | 989 | return kFALSE; // outside material |
ae947965 | 990 | } |
3b77b2d1 | 991 | |
ae947965 | 992 | if( rPos <= ((abs(ePos->Zv()) * fLineCutZRSlope) - fLineCutZValue)){ |
993 | return kFALSE; // line cut to exclude regions where we do not reconstruct | |
994 | } else if ( fEtaCutMin != -0.1 && rPos >= ((abs(ePos->Zv()) * fLineCutZRSlopeMin) - fLineCutZValueMin)){ | |
995 | return kFALSE; | |
996 | } | |
997 | ||
998 | if( rNeg <= ((abs(eNeg->Zv()) * fLineCutZRSlope) - fLineCutZValue)){ | |
999 | return kFALSE; // line cut to exclude regions where we do not reconstruct | |
1000 | } else if ( fEtaCutMin != -0.1 && rNeg >= ((abs(eNeg->Zv()) * fLineCutZRSlopeMin) - fLineCutZValueMin)){ | |
1001 | return kFALSE; | |
1002 | } | |
2bb2434e | 1003 | |
ae947965 | 1004 | return kTRUE; |
1005 | //if(AcceptanceCut(particle,ePos,eNeg))return kTRUE; | |
1006 | } | |
1007 | return kFALSE; | |
1008 | } | |
3b77b2d1 | 1009 | ///________________________________________________________________________ |
1010 | Bool_t AliConversionCuts::PhotonCuts(AliConversionPhotonBase *photon,AliVEvent *event) | |
1011 | { // Specific Photon Cuts | |
1012 | ||
4a0aab28 | 1013 | Int_t cutIndex = 0; |
1014 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); | |
1015 | cutIndex++; | |
1016 | ||
1017 | // Fill Histos before Cuts | |
1018 | if(hInvMassbefore)hInvMassbefore->Fill(photon->GetMass()); | |
1019 | if(hArmenterosbefore)hArmenterosbefore->Fill(photon->GetArmenterosAlpha(),photon->GetArmenterosQt()); | |
1020 | ||
1021 | // Gamma selection based on QT from Armenteros | |
1022 | if(fDoQtGammaSelection == kTRUE){ | |
1023 | if(!ArmenterosQtCut(photon)){ | |
1024 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //1 | |
1025 | return kFALSE; | |
1026 | } | |
1027 | } | |
1028 | cutIndex++; //2 | |
1029 | ||
1030 | // Chi Cut | |
1031 | if(photon->GetChi2perNDF() > fChi2CutConversion || photon->GetChi2perNDF() <=0){ | |
1032 | { | |
1033 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //2 | |
1034 | return kFALSE; | |
1035 | } | |
1036 | } | |
1037 | cutIndex++;//3 | |
1038 | ||
1039 | // Reconstruction Acceptance Cuts | |
1040 | if(!AcceptanceCuts(photon)){ | |
1041 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //3 | |
1042 | return kFALSE; | |
1043 | } | |
1044 | ||
1045 | cutIndex++; //4 | |
1046 | // Asymmetry Cut | |
1047 | if(fDoPhotonAsymmetryCut == kTRUE){ | |
1048 | if(!AsymmetryCut(photon,event)){ | |
1049 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //4 | |
1050 | return kFALSE; | |
1051 | } | |
1052 | } | |
1053 | ||
1054 | //Check the pid probability | |
1055 | cutIndex++; //5 | |
1056 | if(!PIDProbabilityCut(photon, event)) { | |
1057 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //5 | |
1058 | return kFALSE; | |
1059 | } | |
1060 | ||
1061 | cutIndex++; //6 | |
1062 | if(!CorrectedTPCClusterCut(photon, event)) { | |
1063 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //6 | |
1064 | return kFALSE; | |
1065 | } | |
1066 | ||
1390f698 | 1067 | Double_t magField = event->GetMagneticField(); |
1068 | if( magField < 0.0 ){ | |
1069 | magField = 1.0; | |
1070 | } else { | |
1071 | magField = -1.0; | |
1072 | } | |
d8b864f8 | 1073 | |
1390f698 | 1074 | AliVTrack * electronCandidate = GetTrack(event,photon->GetTrackLabelNegative() ); |
1075 | AliVTrack * positronCandidate = GetTrack(event,photon->GetTrackLabelPositive() ); | |
1076 | Double_t deltaPhi = magField * TVector2::Phi_mpi_pi( electronCandidate->Phi()-positronCandidate->Phi()); | |
4a0aab28 | 1077 | |
1078 | cutIndex++; //7 | |
d8b864f8 | 1079 | if(!PsiPairCut(photon)) { |
4a0aab28 | 1080 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //7 |
1081 | return kFALSE; | |
1082 | } | |
1083 | ||
1084 | cutIndex++; //8 | |
1085 | if(!CosinePAngleCut(photon, event)) { | |
1086 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //8 | |
1087 | return kFALSE; | |
1088 | } | |
1089 | ||
4803eb1f | 1090 | AliAODConversionPhoton* photonAOD = dynamic_cast<AliAODConversionPhoton*>(photon); |
1091 | if (photonAOD){ | |
1092 | photonAOD->CalculateDistanceOfClossetApproachToPrimVtx(event->GetPrimaryVertex()); | |
aff90284 | 1093 | |
4803eb1f | 1094 | cutIndex++; //9 |
1095 | if(photonAOD->GetDCArToPrimVtx() > fDCARPrimVtxCut) { //DCA R cut of photon to primary vertex | |
1096 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //9 | |
1097 | return kFALSE; | |
1098 | } | |
aff90284 | 1099 | |
4803eb1f | 1100 | cutIndex++; //10 |
1101 | if(abs(photonAOD->GetDCAzToPrimVtx()) > fDCAZPrimVtxCut) { //DCA Z cut of photon to primary vertex | |
1102 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //10 | |
1103 | return kFALSE; | |
1104 | } | |
1105 | } else { | |
1106 | cutIndex++; //9 | |
1107 | cutIndex++; //10 | |
1108 | } | |
1109 | cutIndex++; //11 | |
d3345979 | 1110 | |
8fa2d145 | 1111 | if (photonAOD){ |
1112 | if (fDoPhotonQualitySelectionCut && photonAOD->GetPhotonQuality() != fPhotonQualityCut){ | |
1113 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //11 | |
1114 | return kFALSE; | |
1115 | } | |
1116 | } | |
1117 | cutIndex++; //12 | |
4803eb1f | 1118 | if(hPhotonCuts)hPhotonCuts->Fill(cutIndex); //11 |
4a0aab28 | 1119 | |
1120 | // Histos after Cuts | |
1121 | if(hInvMassafter)hInvMassafter->Fill(photon->GetMass()); | |
1122 | if(hArmenterosafter)hArmenterosafter->Fill(photon->GetArmenterosAlpha(),photon->GetArmenterosQt()); | |
1390f698 | 1123 | if(hPsiPairDeltaPhiafter)hPsiPairDeltaPhiafter->Fill(deltaPhi,photon->GetPsiPair()); |
4a0aab28 | 1124 | return kTRUE; |
3b77b2d1 | 1125 | |
1126 | } | |
1127 | ||
1128 | ///________________________________________________________________________ | |
1129 | Bool_t AliConversionCuts::CorrectedTPCClusterCut(AliConversionPhotonBase *photon, AliVEvent * event) | |
1130 | { //Cut on corrected TPC Cluster Info | |
1131 | ||
4a0aab28 | 1132 | AliVTrack * negTrack = GetTrack(event, photon->GetTrackLabelNegative()); |
1133 | AliVTrack * posTrack = GetTrack(event, photon->GetTrackLabelPositive()); | |
3b77b2d1 | 1134 | |
4a0aab28 | 1135 | if(!negTrack||!posTrack)return kFALSE; |
3b77b2d1 | 1136 | |
4a0aab28 | 1137 | Double_t negclsToF=0; |
3b77b2d1 | 1138 | |
4a0aab28 | 1139 | if (!fUseCorrectedTPCClsInfo ){ |
1140 | if(negTrack->GetTPCNclsF()!=0){ | |
1141 | negclsToF = (Double_t)negTrack->GetNcls(1)/(Double_t)negTrack->GetTPCNclsF();}// Ncluster/Nfindablecluster | |
1142 | } | |
1143 | else { | |
1144 | negclsToF = negTrack->GetTPCClusterInfo(2,0,GetFirstTPCRow(photon->GetConversionRadius())); | |
1145 | } | |
3b77b2d1 | 1146 | |
4a0aab28 | 1147 | Double_t posclsToF = 0.; |
1148 | if (!fUseCorrectedTPCClsInfo ){ | |
e5b6e8a6 | 1149 | if(posTrack->GetTPCNclsF()!=0){ |
4a0aab28 | 1150 | posclsToF = (Double_t)posTrack->GetNcls(1)/(Double_t)posTrack->GetTPCNclsF(); |
1151 | } | |
1152 | }else{ | |
1153 | posclsToF = posTrack->GetTPCClusterInfo(2,0,GetFirstTPCRow(photon->GetConversionRadius())); | |
1154 | } | |
3b77b2d1 | 1155 | |
e5b6e8a6 | 1156 | if( negclsToF < fMinClsTPCToF || posclsToF < fMinClsTPCToF ){ |
4a0aab28 | 1157 | return kFALSE; |
1158 | } | |
3b77b2d1 | 1159 | |
4a0aab28 | 1160 | return kTRUE; |
3b77b2d1 | 1161 | } |
1162 | ||
3b77b2d1 | 1163 | ///________________________________________________________________________ |
d008165e | 1164 | Bool_t AliConversionCuts::PhotonIsSelected(AliConversionPhotonBase *photon, AliVEvent * event) |
1165 | { | |
4a0aab28 | 1166 | //Selection of Reconstructed Photons |
3b77b2d1 | 1167 | |
4a0aab28 | 1168 | FillPhotonCutIndex(kPhotonIn); |
11c1e680 | 1169 | |
0a2b2b4b | 1170 | if(event->IsA()==AliESDEvent::Class()) { |
ccfa8c0d | 1171 | if(!SelectV0Finder( ( ((AliESDEvent*)event)->GetV0(photon->GetV0Index()))->GetOnFlyStatus() ) ){ |
0a2b2b4b | 1172 | FillPhotonCutIndex(kOnFly); |
1173 | return kFALSE; | |
1174 | } | |
1175 | } | |
1176 | // else if(event->IsA()==AliAODEvent::Class()) { | |
1177 | // if(!SelectV0Finder( ( ((AliAODEvent*)event)->GetV0(photon->GetV0Index())) ) ){ | |
1178 | // FillPhotonCutIndex(kOnFly); | |
1179 | // return kFALSE; | |
1180 | // } | |
1181 | // } | |
3b77b2d1 | 1182 | |
4a0aab28 | 1183 | // Get Tracks |
1184 | AliVTrack * negTrack = GetTrack(event, photon->GetTrackLabelNegative()); | |
1185 | AliVTrack * posTrack = GetTrack(event, photon->GetTrackLabelPositive()); | |
3b77b2d1 | 1186 | |
4a0aab28 | 1187 | if(!negTrack || !posTrack) { |
1188 | FillPhotonCutIndex(kNoTracks); | |
1189 | return kFALSE; | |
1190 | } | |
4803eb1f | 1191 | photon->DeterminePhotonQuality(negTrack,posTrack); |
4a0aab28 | 1192 | // Track Cuts |
1193 | if(!TracksAreSelected(negTrack, posTrack)){ | |
1194 | FillPhotonCutIndex(kTrackCuts); | |
1195 | return kFALSE; | |
1196 | } | |
f315320f | 1197 | if (hEtaDistV0s)hEtaDistV0s->Fill(photon->GetPhotonEta()); |
1186afd2 | 1198 | // dEdx Cuts |
1199 | if(!dEdxCuts(negTrack) || !dEdxCuts(posTrack)) { | |
1200 | FillPhotonCutIndex(kdEdxCuts); | |
1201 | return kFALSE; | |
1202 | } | |
f315320f | 1203 | if (hEtaDistV0sAfterdEdxCuts)hEtaDistV0sAfterdEdxCuts->Fill(photon->GetPhotonEta()); |
4a0aab28 | 1204 | // Photon Cuts |
1205 | if(!PhotonCuts(photon,event)){ | |
1206 | FillPhotonCutIndex(kPhotonCuts); | |
1207 | return kFALSE; | |
1208 | } | |
3b77b2d1 | 1209 | |
4a0aab28 | 1210 | // Photon passed cuts |
1211 | FillPhotonCutIndex(kPhotonOut); | |
1212 | return kTRUE; | |
3b77b2d1 | 1213 | } |
1214 | ||
3b77b2d1 | 1215 | ///________________________________________________________________________ |
1216 | Bool_t AliConversionCuts::ArmenterosQtCut(AliConversionPhotonBase *photon) | |
1217 | { // Armenteros Qt Cut | |
d8b864f8 FB |
1218 | if(fDo2DQt){ |
1219 | if ( !(TMath::Power(photon->GetArmenterosAlpha()/0.95,2)+TMath::Power(photon->GetArmenterosQt()/fQtMax,2) < 1) ){ | |
1220 | return kFALSE; | |
4a0aab28 | 1221 | } |
1222 | } else { | |
4a0aab28 | 1223 | if(photon->GetArmenterosQt()>fQtMax){ |
1224 | return kFALSE; | |
1225 | } | |
1226 | } | |
1227 | return kTRUE; | |
3b77b2d1 | 1228 | } |
1229 | ||
1230 | ||
1231 | ///________________________________________________________________________ | |
1232 | Bool_t AliConversionCuts::AcceptanceCuts(AliConversionPhotonBase *photon) { | |
4a0aab28 | 1233 | // Exclude certain areas for photon reconstruction |
3b77b2d1 | 1234 | |
4a0aab28 | 1235 | Int_t cutIndex=0; |
1236 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); | |
1237 | cutIndex++; | |
3b77b2d1 | 1238 | |
4a0aab28 | 1239 | if(photon->GetConversionRadius()>fMaxR){ // cuts on distance from collision point |
1240 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); | |
1241 | return kFALSE; | |
1242 | } | |
1243 | cutIndex++; | |
3b77b2d1 | 1244 | |
4a0aab28 | 1245 | if(photon->GetConversionRadius()<fMinR){ // cuts on distance from collision point |
1246 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); | |
1247 | return kFALSE; | |
1248 | } | |
1249 | cutIndex++; | |
3b77b2d1 | 1250 | |
e5b6e8a6 | 1251 | if(photon->GetConversionRadius() <= ((abs(photon->GetConversionZ())*fLineCutZRSlope)-fLineCutZValue)){ |
3b77b2d1 | 1252 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); |
1253 | return kFALSE; | |
4a0aab28 | 1254 | } |
e5b6e8a6 | 1255 | else if (fUseEtaMinCut && photon->GetConversionRadius() >= ((abs(photon->GetConversionZ())*fLineCutZRSlopeMin)-fLineCutZValueMin )){ |
4a0aab28 | 1256 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); |
1257 | return kFALSE; | |
1258 | } | |
1259 | cutIndex++; | |
3b77b2d1 | 1260 | |
e5b6e8a6 | 1261 | if(abs(photon->GetConversionZ()) > fMaxZ ){ // cuts out regions where we do not reconstruct |
3b77b2d1 | 1262 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); |
1263 | return kFALSE; | |
4a0aab28 | 1264 | } |
1265 | cutIndex++; | |
3b77b2d1 | 1266 | |
1267 | ||
11c1e680 | 1268 | if( photon->GetPhotonEta() > (fEtaCut + fEtaShift) || photon->GetPhotonEta() < (-fEtaCut + fEtaShift) ){ |
3b77b2d1 | 1269 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); |
1270 | return kFALSE; | |
4a0aab28 | 1271 | } |
11c1e680 | 1272 | if(fEtaCutMin>-0.1){ |
1273 | if( photon->GetPhotonEta() < (fEtaCutMin + fEtaShift) && photon->GetPhotonEta() > (-fEtaCutMin + fEtaShift) ){ | |
1274 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); | |
1275 | return kFALSE; | |
1276 | } | |
1277 | } | |
4a0aab28 | 1278 | cutIndex++; |
3b77b2d1 | 1279 | |
4a0aab28 | 1280 | if(photon->GetPhotonPt()<fPtCut){ |
3b77b2d1 | 1281 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); |
1282 | return kFALSE; | |
4a0aab28 | 1283 | } |
1284 | cutIndex++; | |
3b77b2d1 | 1285 | |
4a0aab28 | 1286 | if(hAcceptanceCuts)hAcceptanceCuts->Fill(cutIndex); |
e5b6e8a6 | 1287 | |
4a0aab28 | 1288 | return kTRUE; |
3b77b2d1 | 1289 | } |
1290 | ||
1291 | ||
1292 | ///________________________________________________________________________ | |
1293 | Bool_t AliConversionCuts::SpecificTrackCuts(AliAODTrack * negTrack, AliAODTrack * posTrack,Int_t &cutIndex) { | |
4a0aab28 | 1294 | // Track Cuts which require AOD/ESD specific implementation |
3b77b2d1 | 1295 | |
4a0aab28 | 1296 | if( !negTrack->IsOn(AliESDtrack::kTPCrefit) || !posTrack->IsOn(AliESDtrack::kTPCrefit) ) { |
3b77b2d1 | 1297 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
1298 | return kFALSE; | |
4a0aab28 | 1299 | } |
1300 | cutIndex++; | |
3b77b2d1 | 1301 | |
4a0aab28 | 1302 | AliAODVertex * NegVtxType=negTrack->GetProdVertex(); |
1303 | AliAODVertex * PosVtxType=posTrack->GetProdVertex(); | |
4803eb1f | 1304 | if( (NegVtxType->GetType())==AliAODVertex::kKink || (PosVtxType->GetType())==AliAODVertex::kKink) { |
3b77b2d1 | 1305 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
1306 | return kFALSE; | |
4a0aab28 | 1307 | } |
1308 | return kTRUE; | |
3b77b2d1 | 1309 | |
1310 | } | |
1311 | ||
1312 | ||
1313 | ///________________________________________________________________________ | |
1314 | Bool_t AliConversionCuts::SpecificTrackCuts(AliESDtrack * negTrack, AliESDtrack * posTrack,Int_t &cutIndex) { | |
4a0aab28 | 1315 | // Track Cuts which require AOD/ESD specific implementation |
3b77b2d1 | 1316 | |
92efd725 | 1317 | if( !negTrack->IsOn(AliESDtrack::kTPCrefit) || !posTrack->IsOn(AliESDtrack::kTPCrefit) ) { |
3b77b2d1 | 1318 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
1319 | return kFALSE; | |
4a0aab28 | 1320 | } |
1321 | cutIndex++; | |
3b77b2d1 | 1322 | |
4a0aab28 | 1323 | if(negTrack->GetKinkIndex(0) > 0 || posTrack->GetKinkIndex(0) > 0 ) { |
3b77b2d1 | 1324 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
1325 | return kFALSE; | |
4a0aab28 | 1326 | } |
1327 | return kTRUE; | |
3b77b2d1 | 1328 | } |
1329 | ||
1330 | ||
1331 | ||
1332 | ///________________________________________________________________________ | |
1333 | Bool_t AliConversionCuts::TracksAreSelected(AliVTrack * negTrack, AliVTrack * posTrack) { | |
4a0aab28 | 1334 | // Track Selection for Photon Reconstruction |
3b77b2d1 | 1335 | |
4a0aab28 | 1336 | Int_t cutIndex=0; |
1337 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); | |
1338 | cutIndex++; | |
3b77b2d1 | 1339 | |
4a0aab28 | 1340 | // avoid like sign |
1341 | if(negTrack->Charge() == posTrack->Charge()) { | |
1342 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); | |
1343 | return kFALSE; | |
1344 | } | |
1345 | cutIndex++; | |
3b77b2d1 | 1346 | |
4a0aab28 | 1347 | // Number of TPC Clusters |
aff90284 | 1348 | |
1349 | ||
4a0aab28 | 1350 | if( negTrack->GetNcls(1) < fMinClsTPC || posTrack->GetNcls(1) < fMinClsTPC ) { |
3b77b2d1 | 1351 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
4a0aab28 | 1352 | return kFALSE; |
1353 | } | |
1354 | cutIndex++; | |
ccfa8c0d | 1355 | |
4a0aab28 | 1356 | // Acceptance |
11c1e680 | 1357 | if( posTrack->Eta() > (fEtaCut + fEtaShift) || posTrack->Eta() < (-fEtaCut + fEtaShift) || |
1358 | negTrack->Eta() > (fEtaCut + fEtaShift) || negTrack->Eta() < (-fEtaCut + fEtaShift) ){ | |
4a0aab28 | 1359 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
3b77b2d1 | 1360 | return kFALSE; |
4a0aab28 | 1361 | } |
11c1e680 | 1362 | if(fEtaCutMin>-0.1){ |
1363 | if( (posTrack->Eta() < (fEtaCutMin + fEtaShift) && posTrack->Eta() > (-fEtaCutMin + fEtaShift)) || | |
1364 | (negTrack->Eta() < (fEtaCutMin + fEtaShift) && negTrack->Eta() > (-fEtaCutMin + fEtaShift)) ){ | |
1365 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); | |
1366 | return kFALSE; | |
1367 | } | |
1368 | } | |
4a0aab28 | 1369 | cutIndex++; |
3b77b2d1 | 1370 | |
4a0aab28 | 1371 | // Single Pt Cut |
fcc79cf5 | 1372 | if( negTrack->Pt()< fSinglePtCut || posTrack->Pt()< fSinglePtCut){ |
3b77b2d1 | 1373 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
1374 | return kFALSE; | |
4a0aab28 | 1375 | } |
1376 | cutIndex++; | |
3b77b2d1 | 1377 | |
4a0aab28 | 1378 | // AOD ESD specific cuts |
1379 | Bool_t passCuts = kTRUE; | |
3b77b2d1 | 1380 | |
4a0aab28 | 1381 | if(negTrack->IsA()==AliAODTrack::Class()) { |
1382 | passCuts = passCuts * SpecificTrackCuts(static_cast<AliAODTrack*>(negTrack), static_cast<AliAODTrack*>(posTrack),cutIndex); | |
e5b6e8a6 | 1383 | } else { |
4a0aab28 | 1384 | passCuts = passCuts * SpecificTrackCuts(static_cast<AliESDtrack*>(negTrack), static_cast<AliESDtrack*>(posTrack),cutIndex); |
e5b6e8a6 | 1385 | } |
3b77b2d1 | 1386 | |
4a0aab28 | 1387 | if(!passCuts){ |
3b77b2d1 | 1388 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
1389 | return kFALSE; | |
4a0aab28 | 1390 | } |
1391 | cutIndex++; | |
3b77b2d1 | 1392 | |
4a0aab28 | 1393 | if(hTrackCuts)hTrackCuts->Fill(cutIndex); |
3b77b2d1 | 1394 | |
4a0aab28 | 1395 | return kTRUE; |
e5b6e8a6 | 1396 | |
3b77b2d1 | 1397 | } |
1398 | ||
1399 | ///________________________________________________________________________ | |
1400 | Bool_t AliConversionCuts::dEdxCuts(AliVTrack *fCurrentTrack){ | |
4a0aab28 | 1401 | // Electron Identification Cuts for Photon reconstruction |
4a0aab28 | 1402 | if(!fPIDResponse){InitPIDResponse();}// Try to reinitialize PID Response |
1403 | if(!fPIDResponse){AliError("No PID Response"); return kTRUE;}// if still missing fatal error | |
3b77b2d1 | 1404 | |
4a0aab28 | 1405 | Int_t cutIndex=0; |
1406 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
e5b6e8a6 | 1407 | if(hTPCdEdxSigbefore)hTPCdEdxSigbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron)); |
1408 | if(hTPCdEdxbefore)hTPCdEdxbefore->Fill(fCurrentTrack->P(),fCurrentTrack->GetTPCsignal()); | |
4a0aab28 | 1409 | cutIndex++; |
e5b6e8a6 | 1410 | |
4a0aab28 | 1411 | if(fDodEdxSigmaCut == kTRUE){ |
3b77b2d1 | 1412 | // TPC Electron Line |
1413 | if( fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaBelowElectronLine || | |
4a0aab28 | 1414 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaAboveElectronLine){ |
3b77b2d1 | 1415 | |
4a0aab28 | 1416 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); |
1417 | return kFALSE; | |
3b77b2d1 | 1418 | } |
1419 | cutIndex++; | |
1420 | ||
1421 | // TPC Pion Line | |
4a0aab28 | 1422 | if( fCurrentTrack->P()>fPIDMinPnSigmaAbovePionLine && fCurrentTrack->P()<fPIDMaxPnSigmaAbovePionLine ){ |
1423 | if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine && | |
1424 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine&& | |
1425 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLine){ | |
1426 | ||
1427 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
1428 | return kFALSE; | |
1429 | } | |
1430 | } | |
1431 | cutIndex++; | |
e5b6e8a6 | 1432 | |
4a0aab28 | 1433 | // High Pt Pion rej |
1434 | if( fCurrentTrack->P()>fPIDMaxPnSigmaAbovePionLine ){ | |
1435 | if(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)>fPIDnSigmaBelowElectronLine && | |
e5b6e8a6 | 1436 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kElectron)<fPIDnSigmaAboveElectronLine && |
4a0aab28 | 1437 | fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion)<fPIDnSigmaAbovePionLineHighPt){ |
1438 | ||
1439 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
1440 | return kFALSE; | |
1441 | } | |
1442 | } | |
1443 | cutIndex++; | |
1444 | } | |
1445 | else{cutIndex+=3;} | |
1446 | ||
1447 | if(fDoKaonRejectionLowP == kTRUE){ | |
1448 | if(fCurrentTrack->P()<fPIDMinPKaonRejectionLowP ){ | |
e5b6e8a6 | 1449 | if( abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kKaon))<fPIDnSigmaAtLowPAroundKaonLine){ |
4a0aab28 | 1450 | |
1451 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
1452 | return kFALSE; | |
1453 | } | |
1454 | } | |
1455 | } | |
1456 | cutIndex++; | |
4a0aab28 | 1457 | if(fDoProtonRejectionLowP == kTRUE){ |
1458 | if( fCurrentTrack->P()<fPIDMinPProtonRejectionLowP ){ | |
e5b6e8a6 | 1459 | if( abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kProton))<fPIDnSigmaAtLowPAroundProtonLine){ |
4a0aab28 | 1460 | |
1461 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
1462 | return kFALSE; | |
1463 | } | |
1464 | } | |
1465 | } | |
3b77b2d1 | 1466 | cutIndex++; |
e5b6e8a6 | 1467 | |
4a0aab28 | 1468 | if(fDoPionRejectionLowP == kTRUE){ |
1469 | if( fCurrentTrack->P()<fPIDMinPPionRejectionLowP ){ | |
e5b6e8a6 | 1470 | if( abs(fPIDResponse->NumberOfSigmasTPC(fCurrentTrack,AliPID::kPion))<fPIDnSigmaAtLowPAroundPionLine){ |
4a0aab28 | 1471 | |
1472 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
1473 | return kFALSE; | |
1474 | } | |
1475 | } | |
1476 | } | |
1477 | cutIndex++; | |
e5b6e8a6 | 1478 | |
1479 | ||
1480 | // cout<<"Start"<<endl; | |
1481 | // AliPIDResponse::EDetPidStatus status=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTOF,fCurrentTrack); | |
a280ac15 | 1482 | |
e5b6e8a6 | 1483 | // if( ( (status & AliVTrack::kTOFout) == AliVTrack::kTOFout ) && ( (status & AliVTrack::kTIME) == AliVTrack::kTIME )) |
1484 | // {cout<<"TOF DA"<<endl;} | |
a280ac15 | 1485 | // if(status == AliPIDResponse::kDetPidOk){ |
e5b6e8a6 | 1486 | // Float_t probMis = fPIDResponse->GetTOFMismatchProbability(fCurrentTrack); |
1487 | // cout<<"--> "<<probMis<<endl; | |
1488 | // if(probMis > 0.01){ | |
a280ac15 | 1489 | |
e5b6e8a6 | 1490 | // } |
1491 | // } | |
a280ac15 | 1492 | |
4a0aab28 | 1493 | if((fCurrentTrack->GetStatus() & AliESDtrack::kTOFpid) && !(fCurrentTrack->GetStatus() & AliESDtrack::kTOFmismatch)){ |
e5b6e8a6 | 1494 | if(hTOFbefore){ |
1495 | Double_t t0 = fPIDResponse->GetTOFResponse().GetStartTime(fCurrentTrack->P()); | |
60b917c5 | 1496 | Double_t times[AliPID::kSPECIESC]; |
e5b6e8a6 | 1497 | fCurrentTrack->GetIntegratedTimes(times); |
fcc79cf5 | 1498 | Double_t TOFsignal = fCurrentTrack->GetTOFsignal(); |
e5b6e8a6 | 1499 | Double_t dT = TOFsignal - t0 - times[0]; |
1500 | hTOFbefore->Fill(fCurrentTrack->P(),dT); | |
1501 | } | |
1502 | if(hTOFSigbefore) hTOFSigbefore->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)); | |
4a0aab28 | 1503 | if(fUseTOFpid){ |
1504 | if(fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)>fTofPIDnSigmaAboveElectronLine || | |
1505 | fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)<fTofPIDnSigmaBelowElectronLine ){ | |
1506 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); | |
1507 | return kFALSE; | |
1508 | } | |
1509 | } | |
e5b6e8a6 | 1510 | if(hTOFSigafter)hTOFSigafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTOF(fCurrentTrack, AliPID::kElectron)); |
4a0aab28 | 1511 | } |
1512 | cutIndex++; | |
4a0aab28 | 1513 | // Apply TRD PID |
1514 | if(fDoTRDPID){ | |
1515 | if(!fPIDResponse->IdentifiedAsElectronTRD(fCurrentTrack,fPIDTRDEfficiency)){ | |
4a0aab28 | 1516 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); |
1517 | return kFALSE; | |
1518 | } | |
1519 | } | |
1520 | cutIndex++; | |
3b77b2d1 | 1521 | |
4a0aab28 | 1522 | if(hdEdxCuts)hdEdxCuts->Fill(cutIndex); |
e5b6e8a6 | 1523 | if(hTPCdEdxSigafter)hTPCdEdxSigafter->Fill(fCurrentTrack->P(),fPIDResponse->NumberOfSigmasTPC(fCurrentTrack, AliPID::kElectron)); |
1524 | if(hTPCdEdxafter)hTPCdEdxafter->Fill(fCurrentTrack->P(),fCurrentTrack->GetTPCsignal()); | |
f315320f | 1525 | |
4a0aab28 | 1526 | return kTRUE; |
3b77b2d1 | 1527 | } |
1528 | ||
1529 | ///________________________________________________________________________ | |
1530 | Bool_t AliConversionCuts::AsymmetryCut(AliConversionPhotonBase * photon,AliVEvent *event) { | |
4a0aab28 | 1531 | // Cut on Energy Assymetry |
3b77b2d1 | 1532 | |
4a0aab28 | 1533 | for(Int_t ii=0;ii<2;ii++){ |
3b77b2d1 | 1534 | |
4a0aab28 | 1535 | AliVTrack *track=GetTrack(event,photon->GetTrackLabel(ii)); |
3b77b2d1 | 1536 | |
4a0aab28 | 1537 | if( track->P() > fMinPPhotonAsymmetryCut ){ |
1538 | Double_t trackNegAsy=0; | |
1539 | if (photon->GetPhotonP()!=0.){ | |
1540 | trackNegAsy= track->P()/photon->GetPhotonP(); | |
1541 | } | |
aff90284 | 1542 | |
4a0aab28 | 1543 | if( trackNegAsy<fMinPhotonAsymmetry ||trackNegAsy>(1.- fMinPhotonAsymmetry)){ |
1544 | return kFALSE; | |
1545 | } | |
1546 | } | |
3b77b2d1 | 1547 | |
4a0aab28 | 1548 | } |
1549 | return kTRUE; | |
3b77b2d1 | 1550 | } |
1551 | ||
1552 | ///________________________________________________________________________ | |
92efd725 | 1553 | AliVTrack *AliConversionCuts::GetTrack(AliVEvent * event, Int_t label){ |
4a0aab28 | 1554 | //Returns pointer to the track with given ESD label |
1555 | //(Important for AOD implementation, since Track array in AOD data is different | |
1556 | //from ESD array, but ESD tracklabels are stored in AOD Tracks) | |
1557 | ||
1558 | AliESDEvent * esdEvent = dynamic_cast<AliESDEvent*>(event); | |
1559 | if(esdEvent) { | |
1560 | if(label > event->GetNumberOfTracks() ) return NULL; | |
1561 | AliESDtrack * track = esdEvent->GetTrack(label); | |
1562 | return track; | |
e5b6e8a6 | 1563 | |
1564 | } else { | |
ae947965 | 1565 | AliVTrack * track = 0x0; |
1186afd2 | 1566 | if(((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask("V0ReaderV1"))->AreAODsRelabeled()){ |
1567 | track = dynamic_cast<AliVTrack*>(event->GetTrack(label)); | |
1568 | return track; | |
1569 | } | |
aff90284 | 1570 | else{ |
1186afd2 | 1571 | for(Int_t ii=0; ii<event->GetNumberOfTracks(); ii++) { |
1572 | track = dynamic_cast<AliVTrack*>(event->GetTrack(ii)); | |
1573 | if(track){ | |
1574 | if(track->GetID() == label) { | |
ae947965 | 1575 | return track; |
1576 | } | |
1577 | } | |
1578 | } | |
1579 | } | |
4a0aab28 | 1580 | } |
e5b6e8a6 | 1581 | //AliDebug(5,(Form("track not found %d %d",label,event->GetNumberOfTracks())); |
1582 | return NULL; | |
1583 | } | |
1584 | ||
1585 | ///________________________________________________________________________ | |
1586 | AliESDtrack *AliConversionCuts::GetESDTrack(AliESDEvent * event, Int_t label){ | |
1587 | //Returns pointer to the track with given ESD label | |
1588 | //(Important for AOD implementation, since Track array in AOD data is different | |
1589 | //from ESD array, but ESD tracklabels are stored in AOD Tracks) | |
1590 | ||
1591 | if(event) { | |
1592 | if(label > event->GetNumberOfTracks() ) return NULL; | |
1593 | AliESDtrack * track = event->GetTrack(label); | |
1594 | return track; | |
1595 | } | |
4a0aab28 | 1596 | //AliDebug(5,(Form("track not found %d %d",label,event->GetNumberOfTracks())); |
1597 | return NULL; | |
3b77b2d1 | 1598 | } |
1599 | ||
1600 | ||
e5b6e8a6 | 1601 | |
3b77b2d1 | 1602 | ///________________________________________________________________________ |
1603 | Bool_t AliConversionCuts::PIDProbabilityCut(AliConversionPhotonBase *photon, AliVEvent * event){ | |
4a0aab28 | 1604 | // Cut on Electron Probability for Photon Reconstruction |
3b77b2d1 | 1605 | |
4a0aab28 | 1606 | AliESDEvent * esdEvent = dynamic_cast<AliESDEvent*>(event); |
3b77b2d1 | 1607 | |
4a0aab28 | 1608 | if(esdEvent){ |
e5b6e8a6 | 1609 | |
4a0aab28 | 1610 | Bool_t iResult=kFALSE; |
e5b6e8a6 | 1611 | |
4a0aab28 | 1612 | Double_t *posProbArray = new Double_t[AliPID::kSPECIES]; |
1613 | Double_t *negProbArray = new Double_t[AliPID::kSPECIES]; | |
e5b6e8a6 | 1614 | |
fcc79cf5 | 1615 | AliESDtrack* negTrack = esdEvent->GetTrack(photon->GetTrackLabelNegative()); |
1616 | AliESDtrack* posTrack = esdEvent->GetTrack(photon->GetTrackLabelPositive()); | |
e5b6e8a6 | 1617 | |
4a0aab28 | 1618 | if(negProbArray && posProbArray){ |
e5b6e8a6 | 1619 | |
4a0aab28 | 1620 | negTrack->GetTPCpid(negProbArray); |
1621 | posTrack->GetTPCpid(posProbArray); | |
3b77b2d1 | 1622 | |
4a0aab28 | 1623 | if(negProbArray[AliPID::kElectron]>=fPIDProbabilityCutNegativeParticle && posProbArray[AliPID::kElectron]>=fPIDProbabilityCutPositiveParticle){ |
1624 | iResult=kTRUE; | |
1625 | } | |
1626 | } | |
e5b6e8a6 | 1627 | |
4a0aab28 | 1628 | delete [] posProbArray; |
1629 | delete [] negProbArray; | |
1630 | return iResult; | |
3b77b2d1 | 1631 | |
4a0aab28 | 1632 | } else { |
3b77b2d1 | 1633 | ///Not possible for AODs |
1634 | return kTRUE; | |
4a0aab28 | 1635 | } |
3b77b2d1 | 1636 | |
1637 | ||
1638 | ||
e5b6e8a6 | 1639 | |
3b77b2d1 | 1640 | } |
1641 | ||
1642 | ||
1643 | ///________________________________________________________________________ | |
1644 | Bool_t AliConversionCuts::AcceptanceCut(TParticle *particle, TParticle * ePos,TParticle* eNeg){ | |
4a0aab28 | 1645 | // MC Acceptance Cuts |
1646 | //(Certain areas were excluded for photon reconstruction) | |
3b77b2d1 | 1647 | |
4a0aab28 | 1648 | if(particle->R()>fMaxR){ |
1649 | return kFALSE;} | |
3b77b2d1 | 1650 | |
4a0aab28 | 1651 | if(ePos->R()>fMaxR){ |
1652 | return kFALSE; | |
1653 | } | |
3b77b2d1 | 1654 | |
4a0aab28 | 1655 | if(ePos->R()<fMinR){ |
1656 | return kFALSE; | |
1657 | } | |
3b77b2d1 | 1658 | |
e5b6e8a6 | 1659 | if( ePos->R() <= ((abs(ePos->Vz())*fLineCutZRSlope)-fLineCutZValue)){ |
4a0aab28 | 1660 | return kFALSE; |
1661 | } | |
e5b6e8a6 | 1662 | else if (fUseEtaMinCut && ePos->R() >= ((abs(ePos->Vz())*fLineCutZRSlopeMin)-fLineCutZValueMin )){ |
3b77b2d1 | 1663 | return kFALSE; |
4a0aab28 | 1664 | } |
3b77b2d1 | 1665 | |
e5b6e8a6 | 1666 | if(abs(eNeg->Vz()) > fMaxZ ){ // cuts out regions where we do not reconstruct |
4a0aab28 | 1667 | return kFALSE; |
1668 | } | |
3b77b2d1 | 1669 | |
4a0aab28 | 1670 | if(eNeg->Vz()!=ePos->Vz()||eNeg->R()!=ePos->R()){ |
1671 | return kFALSE; | |
1672 | } | |
3b77b2d1 | 1673 | |
e5b6e8a6 | 1674 | if(abs(ePos->Vz()) > fMaxZ ){ // cuts out regions where we do not reconstruct |
4a0aab28 | 1675 | return kFALSE; |
1676 | } | |
3b77b2d1 | 1677 | |
ccfa8c0d | 1678 | |
11c1e680 | 1679 | if( particle->Eta() > (fEtaCut + fEtaShift) || particle->Eta() < (-fEtaCut + fEtaShift) ){ |
4a0aab28 | 1680 | return kFALSE; |
1681 | } | |
11c1e680 | 1682 | if( ePos->Eta() > (fEtaCut + fEtaShift) || ePos->Eta() < (-fEtaCut + fEtaShift) ){ |
4a0aab28 | 1683 | return kFALSE; |
1684 | } | |
11c1e680 | 1685 | if( eNeg->Eta() > (fEtaCut + fEtaShift) || eNeg->Eta() < (-fEtaCut + fEtaShift) ){ |
4a0aab28 | 1686 | return kFALSE; |
1687 | } | |
11c1e680 | 1688 | if(fEtaCutMin>-0.1){ |
1689 | if( particle->Eta() < (fEtaCutMin + fEtaShift) && particle->Eta() > (-fEtaCutMin + fEtaShift) ){ | |
1690 | return kFALSE; | |
1691 | } | |
1692 | if( ePos->Eta() < (fEtaCutMin + fEtaShift) && ePos->Eta() > (-fEtaCutMin + fEtaShift) ){ | |
1693 | return kFALSE; | |
1694 | } | |
1695 | if( eNeg->Eta() < (fEtaCutMin + fEtaShift) && eNeg->Eta() > (-fEtaCutMin + fEtaShift) ){ | |
1696 | return kFALSE; | |
1697 | } | |
1698 | } | |
ccfa8c0d | 1699 | |
4a0aab28 | 1700 | if( ePos->Pt()< fSinglePtCut || eNeg->Pt()< fSinglePtCut){ |
1701 | return kFALSE; | |
1702 | } | |
3b77b2d1 | 1703 | |
4a0aab28 | 1704 | if(particle->Pt()<fPtCut){ |
1705 | return kFALSE; | |
1706 | } | |
3b77b2d1 | 1707 | |
4a0aab28 | 1708 | return kTRUE; |
3b77b2d1 | 1709 | } |
1710 | ///________________________________________________________________________ | |
e5b6e8a6 | 1711 | Bool_t AliConversionCuts::UpdateCutString() { |
4a0aab28 | 1712 | ///Update the cut string (if it has been created yet) |
3b77b2d1 | 1713 | |
4a0aab28 | 1714 | if(fCutString && fCutString->GetString().Length() == kNCuts) { |
1715 | fCutString->SetString(GetCutNumber()); | |
1716 | } else { | |
1717 | return kFALSE; | |
1718 | } | |
1719 | return kTRUE; | |
3b77b2d1 | 1720 | } |
aff90284 | 1721 | ///________________________________________________________________________ |
ae947965 | 1722 | void AliConversionCuts::LoadReweightingHistosMCFromFile() { |
1723 | ||
1724 | AliInfo("Entering loading of histograms for weighting"); | |
1725 | TFile *f = TFile::Open(fPathTrFReweighting.Data()); | |
1726 | if(!f){ | |
1727 | AliError(Form("file for weighting %s not found",fPathTrFReweighting.Data())); | |
1728 | return; | |
aff90284 | 1729 | } |
ae947965 | 1730 | if (fNameHistoReweightingPi0.CompareTo("") != 0 && fDoReweightHistoMCPi0 ){ |
7e6c9796 | 1731 | cout << "I have to find: " << fNameHistoReweightingPi0.Data() << endl; |
aff90284 | 1732 | TH1D *hReweightMCHistPi0temp = (TH1D*)f->Get(fNameHistoReweightingPi0.Data()); |
1733 | hReweightMCHistPi0 = new TH1D(*hReweightMCHistPi0temp); | |
6feb1680 | 1734 | hReweightMCHistPi0->SetDirectory(0); |
ae947965 | 1735 | if (hReweightMCHistPi0) AliInfo(Form("%s has been loaded from %s", fNameHistoReweightingPi0.Data(),fPathTrFReweighting.Data() )); |
aff90284 | 1736 | else AliWarning(Form("%s not found in %s", fNameHistoReweightingPi0.Data() ,fPathTrFReweighting.Data())); |
fcc79cf5 | 1737 | } |
1738 | if (fNameFitDataPi0.CompareTo("") != 0 && fDoReweightHistoMCPi0 ){ | |
7e6c9796 | 1739 | cout << "I have to find: " << fNameFitDataPi0.Data() << endl; |
aff90284 | 1740 | TF1 *fFitDataPi0temp = (TF1*)f->Get(fNameFitDataPi0.Data()); |
1741 | fFitDataPi0 = new TF1(*fFitDataPi0temp); | |
fcc79cf5 | 1742 | if (fFitDataPi0) AliInfo(Form("%s has been loaded from %s", fNameFitDataPi0.Data(),fPathTrFReweighting.Data() )); |
aff90284 | 1743 | else AliWarning(Form("%s not found in %s",fPathTrFReweighting.Data(), fNameFitDataPi0.Data() )); |
ae947965 | 1744 | } |
aff90284 | 1745 | |
ae947965 | 1746 | if (fNameHistoReweightingEta.CompareTo("") != 0 && fDoReweightHistoMCEta){ |
7e6c9796 | 1747 | cout << "I have to find: " << fNameHistoReweightingEta.Data() << endl; |
aff90284 | 1748 | TH1D *hReweightMCHistEtatemp = (TH1D*)f->Get(fNameHistoReweightingEta.Data()); |
1749 | hReweightMCHistEta = new TH1D(*hReweightMCHistEtatemp); | |
6feb1680 | 1750 | hReweightMCHistEta->SetDirectory(0); |
ae947965 | 1751 | if (hReweightMCHistEta) AliInfo(Form("%s has been loaded from %s", fNameHistoReweightingEta.Data(),fPathTrFReweighting.Data() )); |
aff90284 | 1752 | else AliWarning(Form("%s not found in %s", fNameHistoReweightingEta.Data(),fPathTrFReweighting.Data() )); |
fcc79cf5 | 1753 | } |
aff90284 | 1754 | |
fcc79cf5 | 1755 | if (fNameFitDataEta.CompareTo("") != 0 && fDoReweightHistoMCEta){ |
7e6c9796 | 1756 | cout << "I have to find: " << fNameFitDataEta.Data() << endl; |
aff90284 | 1757 | TF1 *fFitDataEtatemp = (TF1*)f->Get(fNameFitDataEta.Data()); |
1758 | fFitDataEta = new TF1(*fFitDataEtatemp); | |
fcc79cf5 | 1759 | if (fFitDataEta) AliInfo(Form("%s has been loaded from %s", fNameFitDataEta.Data(),fPathTrFReweighting.Data() )); |
aff90284 | 1760 | else AliWarning(Form("%s not found in %s", fNameFitDataEta.Data(),fPathTrFReweighting.Data() )); |
ae947965 | 1761 | |
1762 | } | |
1763 | if (fNameHistoReweightingK0s.CompareTo("") != 0 && fDoReweightHistoMCK0s){ | |
7e6c9796 | 1764 | cout << "I have to find: " << fNameHistoReweightingK0s.Data() << endl; |
aff90284 | 1765 | TH1D *hReweightMCHistK0stemp = (TH1D*)f->Get(fNameHistoReweightingK0s.Data()); |
1766 | hReweightMCHistK0s = new TH1D(*hReweightMCHistK0stemp); | |
6feb1680 | 1767 | hReweightMCHistK0s->SetDirectory(0); |
ae947965 | 1768 | if (hReweightMCHistK0s) AliInfo(Form("%s has been loaded from %s", fNameHistoReweightingK0s.Data(),fPathTrFReweighting.Data() )); |
aff90284 | 1769 | else AliWarning(Form("%s not found in %s", fNameHistoReweightingK0s.Data(),fPathTrFReweighting.Data() )); |
ae947965 | 1770 | } |
1771 | ||
fcc79cf5 | 1772 | if (fNameFitDataK0s.CompareTo("") != 0 && fDoReweightHistoMCK0s){ |
7e6c9796 | 1773 | cout << "I have to find: " << fNameFitDataK0s.Data() << endl; |
aff90284 | 1774 | TF1 *fFitDataK0stemp = (TF1*)f->Get(fNameFitDataK0s.Data()); |
1775 | fFitDataK0s = new TF1(*fFitDataK0stemp); | |
fcc79cf5 | 1776 | if (fFitDataK0s) AliInfo(Form("%s has been loaded from %s", fNameFitDataK0s.Data(),fPathTrFReweighting.Data() )); |
aff90284 | 1777 | else AliWarning(Form("%s not found in %s", fNameFitDataK0s.Data(),fPathTrFReweighting.Data() )); |
fcc79cf5 | 1778 | } |
6feb1680 | 1779 | f->Close(); |
1780 | delete f; | |
1781 | ||
ae947965 | 1782 | } |
1783 | ||
1784 | ||
3b77b2d1 | 1785 | ///________________________________________________________________________ |
1786 | Bool_t AliConversionCuts::InitializeCutsFromCutString(const TString analysisCutSelection ) { | |
1787 | // Initialize Cuts from a given Cut string | |
fcc79cf5 | 1788 | if(fDoReweightHistoMCPi0 || fDoReweightHistoMCEta || fDoReweightHistoMCK0s) { |
1789 | AliInfo("Weighting was enabled"); | |
1790 | LoadReweightingHistosMCFromFile(); | |
fcc79cf5 | 1791 | } |
aff90284 | 1792 | |
4a0aab28 | 1793 | AliInfo(Form("Set Photoncut Number: %s",analysisCutSelection.Data())); |
1794 | if(analysisCutSelection.Length()!=kNCuts) { | |
1795 | AliError(Form("Cut selection has the wrong length! size is %d, number of cuts is %d", analysisCutSelection.Length(), kNCuts)); | |
1796 | return kFALSE; | |
1797 | } | |
1798 | if(!analysisCutSelection.IsDigit()){ | |
1799 | AliError("Cut selection contains characters"); | |
1800 | return kFALSE; | |
1801 | } | |
e5b6e8a6 | 1802 | |
4a0aab28 | 1803 | const char *cutSelection = analysisCutSelection.Data(); |
fcc79cf5 | 1804 | #define ASSIGNARRAY(i) fCuts[i] = cutSelection[i] - '0' |
4a0aab28 | 1805 | for(Int_t ii=0;ii<kNCuts;ii++){ |
3b77b2d1 | 1806 | ASSIGNARRAY(ii); |
4a0aab28 | 1807 | } |
3b77b2d1 | 1808 | |
4a0aab28 | 1809 | // Set Individual Cuts |
1810 | for(Int_t ii=0;ii<kNCuts;ii++){ | |
3b77b2d1 | 1811 | if(!SetCut(cutIds(ii),fCuts[ii]))return kFALSE; |
4a0aab28 | 1812 | } |
3b77b2d1 | 1813 | |
d0a4ea74 | 1814 | PrintCutsWithValues(); |
92efd725 | 1815 | |
4a0aab28 | 1816 | return kTRUE; |
3b77b2d1 | 1817 | } |
1818 | ///________________________________________________________________________ | |
1819 | Bool_t AliConversionCuts::SetCut(cutIds cutID, const Int_t value) { | |
4a0aab28 | 1820 | ///Set individual cut ID |
3b77b2d1 | 1821 | |
4a0aab28 | 1822 | switch (cutID) { |
e5b6e8a6 | 1823 | |
4a0aab28 | 1824 | case kv0FinderType: |
1825 | if( SetV0Finder(value)) { | |
1826 | fCuts[kv0FinderType] = value; | |
e5b6e8a6 | 1827 | UpdateCutString(); |
4a0aab28 | 1828 | return kTRUE; |
1829 | } else return kFALSE; | |
1830 | ||
1831 | case kededxSigmaCut: | |
1832 | if( SetTPCdEdxCutElectronLine(value)) { | |
1833 | fCuts[kededxSigmaCut] = value; | |
e5b6e8a6 | 1834 | UpdateCutString(); |
4a0aab28 | 1835 | return kTRUE; |
1836 | } else return kFALSE; | |
1837 | ||
1838 | case kpidedxSigmaCut: | |
1839 | if( SetTPCdEdxCutPionLine(value)) { | |
1840 | fCuts[kpidedxSigmaCut] = value; | |
e5b6e8a6 | 1841 | UpdateCutString(); |
4a0aab28 | 1842 | return kTRUE; |
1843 | } else return kFALSE; | |
1844 | ||
1845 | case kpiMomdedxSigmaCut: | |
1846 | if( SetMinMomPiondEdxCut(value)) { | |
1847 | fCuts[kpiMomdedxSigmaCut] = value; | |
e5b6e8a6 | 1848 | UpdateCutString(); |
4a0aab28 | 1849 | return kTRUE; |
1850 | } else return kFALSE; | |
1851 | ||
1852 | case kchi2GammaCut: | |
1853 | if( SetChi2GammaCut(value)) { | |
1854 | fCuts[kchi2GammaCut] = value; | |
e5b6e8a6 | 1855 | UpdateCutString(); |
4a0aab28 | 1856 | return kTRUE; |
1857 | } else return kFALSE; | |
1858 | ||
1859 | case ksinglePtCut: | |
1860 | if( SetSinglePtCut(value)) { | |
1861 | fCuts[ksinglePtCut] = value; | |
e5b6e8a6 | 1862 | UpdateCutString(); |
4a0aab28 | 1863 | return kTRUE; |
1864 | } else return kFALSE; | |
1865 | ||
1866 | case kclsTPCCut: | |
1867 | if( SetTPCClusterCut(value)) { | |
1868 | fCuts[kclsTPCCut] = value; | |
e5b6e8a6 | 1869 | UpdateCutString(); |
4a0aab28 | 1870 | return kTRUE; |
1871 | } else return kFALSE; | |
1872 | ||
1873 | case ketaCut: | |
1874 | if( SetEtaCut(value)) { | |
1875 | fCuts[ketaCut] = value; | |
e5b6e8a6 | 1876 | UpdateCutString(); |
4a0aab28 | 1877 | return kTRUE; |
1878 | } else return kFALSE; | |
1879 | ||
1880 | case kLowPRejectionSigmaCut: | |
1881 | if( SetLowPRejectionCuts(value)) { | |
1882 | fCuts[kLowPRejectionSigmaCut] = value; | |
e5b6e8a6 | 1883 | UpdateCutString(); |
4a0aab28 | 1884 | return kTRUE; |
1885 | } else return kFALSE; | |
1886 | ||
1887 | case kQtMaxCut: | |
1888 | if( SetQtMaxCut(value)) { | |
1889 | fCuts[kQtMaxCut] = value; | |
e5b6e8a6 | 1890 | UpdateCutString(); |
4a0aab28 | 1891 | return kTRUE; |
1892 | } else return kFALSE; | |
1893 | ||
1894 | case kpiMaxMomdedxSigmaCut: | |
1895 | if( SetMaxMomPiondEdxCut(value)) { | |
1896 | fCuts[kpiMaxMomdedxSigmaCut] = value; | |
e5b6e8a6 | 1897 | UpdateCutString(); |
4a0aab28 | 1898 | return kTRUE; |
1899 | } else return kFALSE; | |
1900 | ||
1901 | case kRCut: | |
1902 | if( SetRCut(value)) { | |
1903 | fCuts[kRCut] = value; | |
e5b6e8a6 | 1904 | UpdateCutString(); |
4a0aab28 | 1905 | return kTRUE; |
1906 | } else return kFALSE; | |
1907 | ||
1908 | case kremovePileUp: | |
1909 | if( SetRemovePileUp(value)) { | |
1910 | fCuts[kremovePileUp] = value; | |
e5b6e8a6 | 1911 | UpdateCutString(); |
4a0aab28 | 1912 | return kTRUE; |
1913 | } else return kFALSE; | |
1914 | ||
1915 | case kselectV0AND: | |
e5b6e8a6 | 1916 | if( SetSelectSpecialTrigger(value)) { |
4a0aab28 | 1917 | fCuts[kselectV0AND] = value; |
e5b6e8a6 | 1918 | UpdateCutString(); |
4a0aab28 | 1919 | return kTRUE; |
1920 | } else return kFALSE; | |
1921 | ||
1922 | case kmultiplicityMethod: | |
1923 | if( SetMultiplicityMethod(value)) { | |
1924 | fCuts[kmultiplicityMethod] = value; | |
e5b6e8a6 | 1925 | UpdateCutString(); |
4a0aab28 | 1926 | return kTRUE; |
1927 | } else return kFALSE; | |
1928 | ||
1929 | case kisHeavyIon: | |
1930 | if( SetIsHeavyIon(value)) { | |
1931 | fCuts[kisHeavyIon] = value; | |
e5b6e8a6 | 1932 | UpdateCutString(); |
4a0aab28 | 1933 | return kTRUE; |
1934 | } else return kFALSE; | |
1935 | ||
1936 | case kCentralityMin: | |
1937 | if( SetCentralityMin(value)) { | |
1938 | fCuts[kCentralityMin] = value; | |
e5b6e8a6 | 1939 | UpdateCutString(); |
4a0aab28 | 1940 | return kTRUE; |
1941 | } else return kFALSE; | |
1942 | ||
1943 | case kCentralityMax: | |
1944 | if( SetCentralityMax(value)) { | |
1945 | fCuts[kCentralityMax] = value; | |
e5b6e8a6 | 1946 | UpdateCutString(); |
4a0aab28 | 1947 | return kTRUE; |
1948 | } else return kFALSE; | |
1949 | ||
1950 | case kTOFelectronPID: | |
1951 | if( SetTOFElectronPIDCut(value)) { | |
1952 | fCuts[kTOFelectronPID] = value; | |
e5b6e8a6 | 1953 | UpdateCutString(); |
4a0aab28 | 1954 | return kTRUE; |
1955 | } else return kFALSE; | |
1956 | ||
1957 | case kdoPhotonAsymmetryCut: | |
1958 | if( SetPhotonAsymmetryCut(value)) { | |
1959 | fCuts[kdoPhotonAsymmetryCut] = value; | |
e5b6e8a6 | 1960 | UpdateCutString(); |
4a0aab28 | 1961 | return kTRUE; |
1962 | } else return kFALSE; | |
1963 | ||
1964 | case kPsiPair: | |
1965 | if( SetPsiPairCut(value)) { | |
1966 | fCuts[kPsiPair] = value; | |
e5b6e8a6 | 1967 | UpdateCutString(); |
4a0aab28 | 1968 | return kTRUE; |
1969 | } else return kFALSE; | |
1970 | ||
1971 | case kCosPAngle: | |
1972 | if( SetCosPAngleCut(value)) { | |
1973 | fCuts[kCosPAngle] = value; | |
e5b6e8a6 | 1974 | UpdateCutString(); |
4a0aab28 | 1975 | return kTRUE; |
1976 | } else return kFALSE; | |
1977 | ||
1978 | ||
1979 | case kElecShare: | |
1980 | if( SetSharedElectronCut(value)) { | |
1981 | fCuts[kElecShare] = value; | |
e5b6e8a6 | 1982 | UpdateCutString(); |
4a0aab28 | 1983 | return kTRUE; |
1984 | } else return kFALSE; | |
1985 | ||
4a0aab28 | 1986 | case kToCloseV0s: |
1987 | if( SetToCloseV0sCut(value)) { | |
1988 | fCuts[kToCloseV0s] = value; | |
e5b6e8a6 | 1989 | UpdateCutString(); |
4a0aab28 | 1990 | return kTRUE; |
1991 | } else return kFALSE; | |
1992 | ||
1993 | case kExtraSignals: | |
1994 | if( SetRejectExtraSignalsCut(value)) { | |
1995 | fCuts[kExtraSignals] = value; | |
e5b6e8a6 | 1996 | UpdateCutString(); |
4a0aab28 | 1997 | return kTRUE; |
1998 | } else return kFALSE; | |
1999 | ||
4803eb1f | 2000 | case kDcaRPrimVtx: |
2001 | if( SetDCARPhotonPrimVtxCut(value)) { | |
2002 | fCuts[kDcaRPrimVtx] = value; | |
2003 | UpdateCutString(); | |
2004 | return kTRUE; | |
2005 | } else return kFALSE; | |
2006 | ||
2007 | case kDcaZPrimVtx: | |
2008 | if( SetDCAZPhotonPrimVtxCut(value)) { | |
2009 | fCuts[kDcaZPrimVtx] = value; | |
2010 | UpdateCutString(); | |
2011 | return kTRUE; | |
2012 | } else return kFALSE; | |
2013 | ||
ae4f2cfb | 2014 | case kInPlaneOutOfPlane: |
2015 | if( SetInPlaneOutOfPlane(value)) { | |
2016 | fCuts[kInPlaneOutOfPlane] = value; | |
2017 | UpdateCutString(); | |
2018 | return kTRUE; | |
2019 | } else return kFALSE; | |
2020 | ||
2021 | ||
2022 | ||
aff90284 | 2023 | |
4a0aab28 | 2024 | case kNCuts: |
92efd725 | 2025 | AliError("Cut id out of range"); |
4a0aab28 | 2026 | return kFALSE; |
2027 | } | |
d008165e | 2028 | |
4a0aab28 | 2029 | AliError("Cut id %d not recognized"); |
2030 | return kFALSE; | |
3b77b2d1 | 2031 | |
e5b6e8a6 | 2032 | |
3b77b2d1 | 2033 | } |
2034 | ///________________________________________________________________________ | |
e5b6e8a6 | 2035 | void AliConversionCuts::PrintCuts() { |
2036 | // Print out current Cut Selection | |
2037 | for(Int_t ic = 0; ic < kNCuts; ic++) { | |
2038 | printf("%-30s : %d \n", fgkCutNames[ic], fCuts[ic]); | |
2039 | } | |
2040 | } | |
d0a4ea74 FB |
2041 | |
2042 | void AliConversionCuts::PrintCutsWithValues() { | |
2043 | // Print out current Cut Selection with value | |
2044 | if (fIsHeavyIon == 0) { | |
2045 | printf("Running in pp mode \n"); | |
2046 | if (fSpecialTrigger == 0){ | |
2047 | printf("\t only events triggered by V0OR will be analysed \n"); | |
2048 | } else if (fSpecialTrigger == 1){ | |
2049 | printf("\t only events triggered by V0AND will be analysed \n"); | |
2050 | } else if (fSpecialTrigger == 2){ | |
2051 | printf("\t only events where SDD was present will be analysed \n"); | |
2052 | } else if (fSpecialTrigger == 3){ | |
2053 | printf("\t only events where SDD was present will be analysed and triggered by VOAND\n"); | |
2054 | } else if (fSpecialTrigger > 3){ | |
2055 | printf("\t only events triggered by %s \n", fSpecialTriggerName.Data()); | |
2056 | } | |
2057 | } else if (fIsHeavyIon == 1){ | |
2058 | printf("Running in PbPb mode \n"); | |
2059 | if (fDetectorCentrality == 0){ | |
2060 | printf("\t centrality selection based on V0M \n"); | |
2061 | } else if (fDetectorCentrality == 1){ | |
2062 | printf("\t centrality selection based on Cl1 \n"); | |
2063 | } | |
2064 | if (fModCentralityClass == 0){ | |
2065 | printf("\t %d - %d \n", fCentralityMin*10, fCentralityMax*10); | |
2066 | } else if ( fModCentralityClass == 1){ | |
2067 | printf("\t %d - %d \n", fCentralityMin*5, fCentralityMax*5); | |
2068 | } else if ( fModCentralityClass == 2){ | |
2069 | printf("\t %d - %d \n", fCentralityMin*5+45, fCentralityMax*5+45); | |
2070 | } else if (fModCentralityClass == 3){ | |
2071 | printf("\t %d - %d, with Track mult in MC as data \n", fCentralityMin*10, fCentralityMax*10); | |
2072 | } else if ( fModCentralityClass == 4){ | |
2073 | printf("\t %d - %d, with Track mult in MC as data \n", fCentralityMin*5, fCentralityMax*5); | |
2074 | } else if ( fModCentralityClass == 5){ | |
2075 | printf("\t %d - %d, with Track mult in MC as data \n", fCentralityMin*5+45, fCentralityMax*5+45); | |
2076 | } | |
2077 | if (fSpecialTrigger == 0){ | |
2078 | printf("\t only events triggered by kMB, kCentral, kSemiCentral will be analysed \n"); | |
2079 | } else if (fSpecialTrigger > 4){ | |
2080 | printf("\t only events triggered by %s \n", fSpecialTriggerName.Data()); | |
2081 | } | |
2082 | } else if (fIsHeavyIon == 2){ | |
2083 | printf("Running in pPb mode \n"); | |
2084 | if (fDetectorCentrality == 0){ | |
2085 | printf("\t centrality selection based on V0A \n"); | |
2086 | } else if (fDetectorCentrality == 1){ | |
2087 | printf("\t centrality selection based on Cl1 \n"); | |
2088 | } | |
2089 | if (fModCentralityClass == 0){ | |
2090 | printf("\t %d - %d \n", fCentralityMin*10, fCentralityMax*10); | |
2091 | } | |
2092 | if (fSpecialTrigger == 0){ | |
2093 | printf("\t only events triggered by kINT7 will be analysed \n"); | |
2094 | } else if (fSpecialTrigger > 4){ | |
2095 | printf("\t only events triggered by %s \n", fSpecialTriggerName.Data()); | |
2096 | } | |
d3345979 | 2097 | } |
2098 | printf("Electron cuts: \n"); | |
2099 | if (fEtaCutMin > -0.1) printf("\t %3.2f < eta_{e} < %3.2f\n", fEtaCutMin, fEtaCut ); | |
2100 | else printf("\t eta_{e} < %3.2f\n", fEtaCut ); | |
2101 | printf("\t p_{T,e} > %3.2f\n", fSinglePtCut ); | |
2102 | printf("\t %3.2f < n sigma e < %3.2f\n", fPIDnSigmaBelowElectronLine, fPIDnSigmaAboveElectronLine ); | |
d0a4ea74 | 2103 | |
d3345979 | 2104 | printf("Photon cuts: \n"); |
2105 | printf("\t %3.2f < R_{conv} < %3.2f\n", fMinR, fMaxR ); | |
2106 | printf("\t Z_{conv} < %3.2f\n", fMaxZ ); | |
2107 | if (fEtaCutMin > -0.1) printf("\t %3.2f < eta_{conv} < %3.2f\n", fEtaCutMin, fEtaCut ); | |
2108 | else printf("\t eta_{conv} < %3.2f\n", fEtaCut ); | |
2109 | printf("\t p_{T,gamma} > %3.2f\n", fPtCut ); | |
2110 | if (fDo2DQt){ | |
2111 | printf("\t 2 dimensional q_{T} cut applied with maximum of %3.2f \n", fQtMax ); | |
2112 | } else { | |
2113 | printf("\t 1 dimensional q_{T} cut applied with maximum of %3.2f \n", fQtMax ); | |
2114 | } | |
2115 | if (fDo2DPsiPairChi2){ | |
2116 | printf("\t 2 dimensional triangle chi^{2} and psi_{pair} cut applied with maximum of chi^{2} = %3.2f and |psi_{pair}| = %3.2f \n", fChi2CutConversion, fPsiPairCut ); | |
2117 | } else { | |
2118 | printf("\t chi^{2} max cut chi^{2} < %3.2f \n", fChi2CutConversion ); | |
2119 | printf("\t psi_{pair} max cut |psi_{pair}| < %3.2f \n", fPsiPairCut ); | |
2120 | } | |
2121 | printf("\t cos(Theta_{point}) > %3.2f \n", fCosPAngleCut ); | |
2122 | printf("\t dca_{R} < %3.2f \n", fDCARPrimVtxCut ); | |
2123 | printf("\t dca_{Z} < %3.2f \n", fDCAZPrimVtxCut ); | |
2124 | if (fDoPhotonQualitySelectionCut) printf("\t selection based on photon quality with quality %d \n", fPhotonQualityCut ); | |
d0a4ea74 FB |
2125 | } |
2126 | ||
e5b6e8a6 | 2127 | ///________________________________________________________________________ |
2128 | Bool_t AliConversionCuts::SetIsHeavyIon(Int_t isHeavyIon) | |
2129 | { // Set Cut | |
2130 | switch(isHeavyIon){ | |
4a0aab28 | 2131 | case 0: |
e5b6e8a6 | 2132 | fIsHeavyIon=0; |
4a0aab28 | 2133 | break; |
2134 | case 1: | |
e5b6e8a6 | 2135 | fIsHeavyIon=1; |
2136 | fDetectorCentrality=0; | |
2137 | break; | |
2138 | case 2: | |
2139 | fIsHeavyIon=1; | |
2140 | fDetectorCentrality=1; | |
2141 | break; | |
2142 | case 3: //allows to select centrality 0-45% in steps of 5% for V0 Multiplicity | |
2143 | fIsHeavyIon=1; | |
2144 | fDetectorCentrality=0; | |
2145 | fModCentralityClass=1; | |
2146 | break; | |
2147 | case 4: //allows to select centrality 45-90% in steps of 5% for V0 Multiplicity | |
2148 | fIsHeavyIon=1; | |
2149 | fDetectorCentrality=0; | |
2150 | fModCentralityClass=2; | |
2151 | break; | |
2152 | case 5: //strict cut on v0 tracks for MC | |
2153 | fIsHeavyIon=1; | |
2154 | fDetectorCentrality=0; | |
2155 | fModCentralityClass=3; | |
2156 | break; | |
4803eb1f | 2157 | case 6: //allows to select centrality 0-45% in steps of 5% for track mult |
e5b6e8a6 | 2158 | //strict cut on v0 tracks for MC |
2159 | fIsHeavyIon=1; | |
2160 | fDetectorCentrality=0; | |
2161 | fModCentralityClass=4; | |
2162 | break; | |
2163 | case 7: //allows to select centrality 45-90% in steps of 5% for V0 Multiplicity | |
2164 | //strict cut on v0 tracks for MC | |
2165 | fIsHeavyIon=1; | |
2166 | fDetectorCentrality=0; | |
2167 | fModCentralityClass=5; | |
4a0aab28 | 2168 | break; |
0a2b2b4b | 2169 | case 8: |
2170 | fIsHeavyIon=2; | |
2171 | fDetectorCentrality=0; | |
2172 | break; | |
2173 | case 9: | |
2174 | fIsHeavyIon=2; | |
2175 | fDetectorCentrality=1; | |
11c1e680 | 2176 | break; |
4a0aab28 | 2177 | default: |
e5b6e8a6 | 2178 | AliError(Form("SetHeavyIon not defined %d",isHeavyIon)); |
4a0aab28 | 2179 | return kFALSE; |
2180 | } | |
2181 | return kTRUE; | |
3b77b2d1 | 2182 | } |
0a2b2b4b | 2183 | |
e5b6e8a6 | 2184 | //___________________________________________________________________ |
2185 | Bool_t AliConversionCuts::SetCentralityMin(Int_t minCentrality) | |
2186 | { | |
2187 | // Set Cut | |
2188 | if(minCentrality<0||minCentrality>9){ | |
2189 | AliError(Form("minCentrality not defined %d",minCentrality)); | |
2190 | return kFALSE; | |
2191 | } | |
3b77b2d1 | 2192 | |
e5b6e8a6 | 2193 | fCentralityMin=minCentrality; |
2194 | return kTRUE; | |
2195 | } | |
2196 | //___________________________________________________________________ | |
2197 | Bool_t AliConversionCuts::SetCentralityMax(Int_t maxCentrality) | |
2198 | { | |
2199 | // Set Cut | |
2200 | if(maxCentrality<0||maxCentrality>9){ | |
2201 | AliError(Form("maxCentrality not defined %d",maxCentrality)); | |
2202 | return kFALSE; | |
2203 | } | |
2204 | fCentralityMax=maxCentrality; | |
2205 | return kTRUE; | |
2206 | } | |
3b77b2d1 | 2207 | ///________________________________________________________________________ |
e5b6e8a6 | 2208 | Int_t AliConversionCuts::SetSelectSpecialTrigger(Int_t selectSpecialTrigger) |
3b77b2d1 | 2209 | {// Set Cut |
e5b6e8a6 | 2210 | |
2211 | switch(selectSpecialTrigger){ | |
4a0aab28 | 2212 | case 0: |
e5b6e8a6 | 2213 | fSpecialTrigger=0; // dont care |
3b77b2d1 | 2214 | break; |
4a0aab28 | 2215 | case 1: |
e5b6e8a6 | 2216 | fSpecialTrigger=1; // V0AND |
2217 | break; | |
2218 | case 2: | |
2219 | fSpecialTrigger=2; // with SDD requested | |
2220 | break; | |
2221 | case 3: | |
2222 | fSpecialTrigger=3; // V0AND plus with SDD requested | |
3b77b2d1 | 2223 | break; |
aff90284 | 2224 | // allows to run MB & 6 other different trigger classes in parallel with the same photon cut |
2225 | case 4: | |
ae947965 | 2226 | fSpecialTrigger=4; // different trigger class as MB |
2227 | fTriggerSelectedManually = kTRUE; | |
2228 | break; | |
aff90284 | 2229 | case 5: |
ae947965 | 2230 | fSpecialTrigger=4; // different trigger class as MB |
2231 | fTriggerSelectedManually = kTRUE; | |
2232 | break; | |
aff90284 | 2233 | case 6: |
ae947965 | 2234 | fSpecialTrigger=4; // different trigger class as MB |
2235 | fTriggerSelectedManually = kTRUE; | |
2236 | break; | |
aff90284 | 2237 | case 7: |
ae947965 | 2238 | fSpecialTrigger=4; // different trigger class as MB |
2239 | fTriggerSelectedManually = kTRUE; | |
2240 | break; | |
aff90284 | 2241 | case 8: |
ae947965 | 2242 | fSpecialTrigger=4; // different trigger class as MB |
2243 | fTriggerSelectedManually = kTRUE; | |
aff90284 | 2244 | break; |
2245 | case 9: | |
ae947965 | 2246 | fSpecialTrigger=4; // different trigger class as MB |
2247 | fTriggerSelectedManually = kTRUE; | |
aff90284 | 2248 | break; |
4a0aab28 | 2249 | default: |
e5b6e8a6 | 2250 | AliError("Warning: Special Trigger Not known"); |
3b77b2d1 | 2251 | return kFALSE; |
4a0aab28 | 2252 | } |
2253 | return kTRUE; | |
3b77b2d1 | 2254 | } |
3b77b2d1 | 2255 | ///________________________________________________________________________ |
92efd725 | 2256 | Bool_t AliConversionCuts::SetMultiplicityMethod(Int_t multiplicityMethod) |
2257 | { | |
4a0aab28 | 2258 | // Set Cut |
2259 | fMultiplicityMethod=multiplicityMethod; | |
92efd725 | 2260 | |
4a0aab28 | 2261 | // 0 Photon Multiplicity |
2262 | // 1 TPC Track multiplicity | |
2263 | // 2 V0 Mult | |
2264 | // 3 SPD Mult | |
92efd725 | 2265 | |
4a0aab28 | 2266 | return kTRUE; |
3b77b2d1 | 2267 | } |
3b77b2d1 | 2268 | ///________________________________________________________________________ |
e5b6e8a6 | 2269 | Bool_t AliConversionCuts::SetRemovePileUp(Int_t removePileUp) |
2270 | {// Set Cut | |
2271 | switch(removePileUp){ | |
2272 | case 0: | |
2273 | fRemovePileUp=kFALSE; | |
2274 | break; | |
2275 | case 1: | |
2276 | fRemovePileUp=kTRUE; | |
2277 | break; | |
2278 | default: | |
2279 | AliError("RemovePileUpCut not defined"); | |
2280 | return kFALSE; | |
4a0aab28 | 2281 | } |
e5b6e8a6 | 2282 | return kTRUE; |
3b77b2d1 | 2283 | } |
3b77b2d1 | 2284 | ///________________________________________________________________________ |
e5b6e8a6 | 2285 | Bool_t AliConversionCuts::SetRejectExtraSignalsCut(Int_t extraSignal) { |
2286 | ||
2287 | switch(extraSignal){ | |
4a0aab28 | 2288 | case 0: |
e5b6e8a6 | 2289 | fRejectExtraSignals = 0; |
2290 | break; // No Rejection | |
4a0aab28 | 2291 | case 1: |
e5b6e8a6 | 2292 | fRejectExtraSignals = 1; |
2293 | break; // MinBias Header | |
4a0aab28 | 2294 | case 2: |
e5b6e8a6 | 2295 | fRejectExtraSignals = 2; |
2296 | break; // User String Array | |
4a0aab28 | 2297 | case 3: |
e5b6e8a6 | 2298 | fRejectExtraSignals = 3; |
2299 | break; // Rejection for Gamma Correction only | |
2300 | default: | |
2301 | AliError(Form("Extra Signal Rejection not defined %d",extraSignal)); | |
2302 | return kFALSE; | |
2303 | } | |
2304 | return kTRUE; | |
2305 | } | |
2306 | ///________________________________________________________________________ | |
2307 | Bool_t AliConversionCuts::SetV0Finder(Int_t v0FinderType) | |
2308 | { // Set Cut | |
2309 | switch (v0FinderType){ | |
2310 | case 0: // on fly V0 finder | |
ccfa8c0d | 2311 | cout << "have chosen onfly V0" << endl; |
e5b6e8a6 | 2312 | fUseOnFlyV0Finder=kTRUE; |
4a0aab28 | 2313 | break; |
e5b6e8a6 | 2314 | case 1: // offline V0 finder |
ccfa8c0d | 2315 | cout << "have chosen offline V0" << endl; |
e5b6e8a6 | 2316 | fUseOnFlyV0Finder=kFALSE; |
4a0aab28 | 2317 | break; |
4a0aab28 | 2318 | default: |
e5b6e8a6 | 2319 | AliError(Form(" v0FinderType not defined %d",v0FinderType)); |
4a0aab28 | 2320 | return kFALSE; |
2321 | } | |
2322 | return kTRUE; | |
3b77b2d1 | 2323 | } |
3b77b2d1 | 2324 | ///________________________________________________________________________ |
e5b6e8a6 | 2325 | Bool_t AliConversionCuts::SetEtaCut(Int_t etaCut) |
3b77b2d1 | 2326 | { // Set Cut |
e5b6e8a6 | 2327 | |
2328 | //Set Standard LineCutZValues | |
2329 | fLineCutZValueMin = -2; | |
2330 | fLineCutZValue = 7.; | |
2331 | ||
2332 | switch(etaCut){ | |
2333 | case 0: // 0.9 | |
fcc79cf5 | 2334 | fEtaCut = 0.9; |
e5b6e8a6 | 2335 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); |
fcc79cf5 | 2336 | fEtaCutMin = -0.1; |
e5b6e8a6 | 2337 | fLineCutZRSlopeMin = 0.; |
4a0aab28 | 2338 | break; |
c9663716 | 2339 | case 1: // 0.6 // changed from 1.2 to 0.6 on 2013.06.10 |
fcc79cf5 | 2340 | fEtaCut = 0.6; |
e5b6e8a6 | 2341 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); |
fcc79cf5 | 2342 | fEtaCutMin = -0.1; |
e5b6e8a6 | 2343 | fLineCutZRSlopeMin = 0.; |
4a0aab28 | 2344 | break; |
fcc79cf5 | 2345 | case 2: // 1.4 |
2346 | fEtaCut = 1.4; | |
e5b6e8a6 | 2347 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); |
fcc79cf5 | 2348 | fEtaCutMin = -0.1; |
e5b6e8a6 | 2349 | fLineCutZRSlopeMin = 0.; |
4a0aab28 | 2350 | break; |
c9663716 | 2351 | case 3: // 0.65 |
2352 | fEtaCut = 0.65; | |
e5b6e8a6 | 2353 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); |
fcc79cf5 | 2354 | fEtaCutMin = -0.1; |
e5b6e8a6 | 2355 | fLineCutZRSlopeMin = 0.; |
4a0aab28 | 2356 | break; |
a280ac15 | 2357 | case 4: // 0.75 |
fcc79cf5 | 2358 | fEtaCut = 0.75; |
e5b6e8a6 | 2359 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); |
fcc79cf5 | 2360 | fEtaCutMin = -0.1; |
e5b6e8a6 | 2361 | fLineCutZRSlopeMin = 0.; |
4a0aab28 | 2362 | break; |
11c1e680 | 2363 | case 5: // 0.5 |
fcc79cf5 | 2364 | fEtaCut = 0.5; |
e5b6e8a6 | 2365 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); |
fcc79cf5 | 2366 | fEtaCutMin = -0.1; |
11c1e680 | 2367 | fLineCutZRSlopeMin = 0.; |
4a0aab28 | 2368 | break; |
e5b6e8a6 | 2369 | case 6: // 5. |
fcc79cf5 | 2370 | fEtaCut = 5.; |
e5b6e8a6 | 2371 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); |
fcc79cf5 | 2372 | fEtaCutMin = -0.1; |
e5b6e8a6 | 2373 | fLineCutZRSlopeMin = 0.; |
4a0aab28 | 2374 | break; |
ccfa8c0d | 2375 | case 7: |
c9663716 | 2376 | if (fIsHeavyIon==1){ |
2377 | fEtaCut = 0.7; | |
2378 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); | |
2379 | fEtaCutMin = -0.1; | |
2380 | fLineCutZRSlopeMin = 0.; | |
2381 | break; | |
6fa95389 | 2382 | } else { |
c9663716 | 2383 | fEtaCut = 0.3; |
2384 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); | |
2385 | fEtaCutMin = -0.1; | |
2386 | fLineCutZRSlopeMin = 0.; | |
2387 | break; | |
2388 | } | |
11c1e680 | 2389 | // case 8: // 0.1 - 0.8 |
fcc79cf5 | 2390 | // fEtaCut = 0.9; |
11c1e680 | 2391 | // fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); |
fcc79cf5 | 2392 | // fEtaCutMin = 0.1; |
11c1e680 | 2393 | // fLineCutZRSlopeMin = tan(2*atan(exp(-fEtaCutMin))); |
2394 | // break; | |
2395 | case 8: // 0.4 | |
fcc79cf5 | 2396 | fEtaCut = 0.4; |
e5b6e8a6 | 2397 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); |
fcc79cf5 | 2398 | fEtaCutMin = -0.1; |
11c1e680 | 2399 | fLineCutZRSlopeMin = 0.; |
e5b6e8a6 | 2400 | break; |
2401 | case 9: // 10 | |
fcc79cf5 | 2402 | fEtaCut = 10; |
e5b6e8a6 | 2403 | fLineCutZRSlope = tan(2*atan(exp(-fEtaCut))); |
fcc79cf5 | 2404 | fEtaCutMin = -0.1; |
e5b6e8a6 | 2405 | fLineCutZRSlopeMin = 0.; |
4a0aab28 | 2406 | break; |
2407 | default: | |
e5b6e8a6 | 2408 | AliError(Form(" EtaCut not defined %d",etaCut)); |
4a0aab28 | 2409 | return kFALSE; |
4a0aab28 | 2410 | } |
2411 | return kTRUE; | |
3b77b2d1 | 2412 | } |
3b77b2d1 | 2413 | ///________________________________________________________________________ |
e5b6e8a6 | 2414 | Bool_t AliConversionCuts::SetRCut(Int_t RCut){ |
2415 | // Set Cut | |
2416 | switch(RCut){ | |
2417 | case 0: | |
2418 | fMinR=0; | |
2419 | fMaxR = 180.; | |
4a0aab28 | 2420 | break; |
e5b6e8a6 | 2421 | case 1: |
2422 | fMinR=2.8; | |
2423 | fMaxR = 180.; | |
4a0aab28 | 2424 | break; |
e5b6e8a6 | 2425 | case 2: |
2426 | fMinR=5.; | |
2427 | fMaxR = 180.; | |
4a0aab28 | 2428 | break; |
e5b6e8a6 | 2429 | case 3: |
2430 | fMaxR = 70.; | |
2431 | fMinR = 10.; | |
4a0aab28 | 2432 | break; |
e5b6e8a6 | 2433 | case 4: |
2434 | fMaxR = 70.; | |
2435 | fMinR = 5.; | |
4a0aab28 | 2436 | break; |
e5b6e8a6 | 2437 | case 5: |
2438 | fMaxR = 180.; | |
2439 | fMinR = 10.; | |
4a0aab28 | 2440 | break; |
e5b6e8a6 | 2441 | case 6: |
2442 | fMaxR = 180.; | |
2443 | fMinR = 20.; | |
4a0aab28 | 2444 | break; |
e5b6e8a6 | 2445 | case 7: |
2446 | fMaxR = 180.; | |
072021d3 | 2447 | fMinR = 35.; //old 26. |
4a0aab28 | 2448 | break; |
e5b6e8a6 | 2449 | case 8: |
2450 | fMaxR = 180.; | |
72395bd9 | 2451 | fMinR = 12.5; |
4a0aab28 | 2452 | break; |
2453 | case 9: | |
72395bd9 | 2454 | fMaxR = 180.; |
2455 | fMinR = 7.5; | |
4a0aab28 | 2456 | break; |
e5b6e8a6 | 2457 | |
4a0aab28 | 2458 | default: |
e5b6e8a6 | 2459 | AliError("RCut not defined"); |
4a0aab28 | 2460 | return kFALSE; |
2461 | } | |
2462 | return kTRUE; | |
92efd725 | 2463 | } |
92efd725 | 2464 | ///________________________________________________________________________ |
e5b6e8a6 | 2465 | Bool_t AliConversionCuts::SetSinglePtCut(Int_t singlePtCut) |
92efd725 | 2466 | { // Set Cut |
e5b6e8a6 | 2467 | switch(singlePtCut){ |
2468 | case 0: // 0.050 GeV | |
2469 | fSinglePtCut = 0.050; | |
4a0aab28 | 2470 | break; |
e5b6e8a6 | 2471 | case 1: // 0.100 GeV |
2472 | fSinglePtCut = 0.100; | |
4a0aab28 | 2473 | break; |
e5b6e8a6 | 2474 | case 2: // 0.150 GeV |
2475 | fSinglePtCut = 0.150; | |
4a0aab28 | 2476 | break; |
e5b6e8a6 | 2477 | case 3: // 0.200 GeV |
2478 | fSinglePtCut = 0.200; | |
4a0aab28 | 2479 | break; |
e5b6e8a6 | 2480 | case 4: // 0.075 GeV |
2481 | fSinglePtCut = 0.075; | |
4a0aab28 | 2482 | break; |
e5b6e8a6 | 2483 | case 5: // 0.125 GeV |
2484 | fSinglePtCut = 0.125; | |
4a0aab28 | 2485 | break; |
e5b6e8a6 | 2486 | case 6: // 0.04 GeV |
2487 | fSinglePtCut = 0.040; | |
4a0aab28 | 2488 | break; |
e5b6e8a6 | 2489 | case 7: // 0.0 GeV |
2490 | fSinglePtCut = 0.0; | |
4a0aab28 | 2491 | break; |
2492 | default: | |
e5b6e8a6 | 2493 | AliError(Form("singlePtCut not defined %d",singlePtCut)); |
4a0aab28 | 2494 | return kFALSE; |
2495 | } | |
2496 | return kTRUE; | |
3b77b2d1 | 2497 | } |
3b77b2d1 | 2498 | ///________________________________________________________________________ |
e5b6e8a6 | 2499 | Bool_t AliConversionCuts::SetTPCClusterCut(Int_t clsTPCCut) |
3b77b2d1 | 2500 | { // Set Cut |
e5b6e8a6 | 2501 | switch(clsTPCCut){ |
2502 | case 0: // 0 | |
2503 | fMinClsTPC= 0.; | |
4a0aab28 | 2504 | break; |
ccfa8c0d | 2505 | case 1: // 60 |
2506 | fMinClsTPC= 60.; | |
4a0aab28 | 2507 | break; |
e5b6e8a6 | 2508 | case 2: // 80 |
2509 | fMinClsTPC= 80.; | |
4a0aab28 | 2510 | break; |
e5b6e8a6 | 2511 | case 3: // 100 |
2512 | fMinClsTPC= 100.; | |
4a0aab28 | 2513 | break; |
ccfa8c0d | 2514 | case 4: // 95% of findable clusters |
2515 | fMinClsTPCToF= 0.95; | |
2516 | fUseCorrectedTPCClsInfo=1; | |
4a0aab28 | 2517 | break; |
e5b6e8a6 | 2518 | case 5: // 0% of findable clusters |
2519 | fMinClsTPCToF= 0.0; | |
2520 | fUseCorrectedTPCClsInfo=1; | |
4a0aab28 | 2521 | break; |
e5b6e8a6 | 2522 | case 6: // 70% of findable clusters |
2523 | fMinClsTPCToF= 0.7; | |
2524 | fUseCorrectedTPCClsInfo=1; | |
4a0aab28 | 2525 | break; |
e5b6e8a6 | 2526 | case 7: // 0% of findable clusters |
2527 | fMinClsTPCToF= 0.35; | |
2528 | fUseCorrectedTPCClsInfo=0; | |
4a0aab28 | 2529 | break; |
2530 | case 8: | |
e5b6e8a6 | 2531 | fMinClsTPCToF= 0.35; |
2532 | fUseCorrectedTPCClsInfo=1; | |
4a0aab28 | 2533 | break; |
2534 | case 9: | |
e5b6e8a6 | 2535 | fMinClsTPCToF= 0.6; |
2536 | fUseCorrectedTPCClsInfo=1; | |
4a0aab28 | 2537 | break; |
2538 | default: | |
e5b6e8a6 | 2539 | AliError(Form("Warning: clsTPCCut not defined %d",clsTPCCut)); |
4a0aab28 | 2540 | return kFALSE; |
2541 | } | |
2542 | return kTRUE; | |
3b77b2d1 | 2543 | } |
3b77b2d1 | 2544 | ///________________________________________________________________________ |
e5b6e8a6 | 2545 | Bool_t AliConversionCuts::SetTPCdEdxCutElectronLine(Int_t ededxSigmaCut) |
3b77b2d1 | 2546 | { // Set Cut |
e5b6e8a6 | 2547 | switch(ededxSigmaCut){ |
2548 | case 0: // -10,10 | |
2549 | fPIDnSigmaBelowElectronLine=-10; | |
2550 | fPIDnSigmaAboveElectronLine=10; | |
4a0aab28 | 2551 | break; |
e5b6e8a6 | 2552 | case 1: // -5,5 |
2553 | fPIDnSigmaBelowElectronLine=-5; | |
2554 | fPIDnSigmaAboveElectronLine=5; | |
4a0aab28 | 2555 | break; |
e5b6e8a6 | 2556 | case 2: // -3,5 |
2557 | fPIDnSigmaBelowElectronLine=-3; | |
2558 | fPIDnSigmaAboveElectronLine=5; | |
4a0aab28 | 2559 | break; |
e5b6e8a6 | 2560 | case 3: // -4,5 |
2561 | fPIDnSigmaBelowElectronLine=-4; | |
2562 | fPIDnSigmaAboveElectronLine=5; | |
4a0aab28 | 2563 | break; |
e5b6e8a6 | 2564 | case 4: // -6,7 |
2565 | fPIDnSigmaBelowElectronLine=-6; | |
2566 | fPIDnSigmaAboveElectronLine=7; | |
4a0aab28 | 2567 | break; |
e5b6e8a6 | 2568 | case 5: // -4,4 |
2569 | fPIDnSigmaBelowElectronLine=-4; | |
2570 | fPIDnSigmaAboveElectronLine=4; | |
4a0aab28 | 2571 | break; |
e5b6e8a6 | 2572 | case 6: // -2.5,4 |
2573 | fPIDnSigmaBelowElectronLine=-2.5; | |
2574 | fPIDnSigmaAboveElectronLine=4; | |
4a0aab28 | 2575 | break; |
e5b6e8a6 | 2576 | case 7: // -2,3.5 |
2577 | fPIDnSigmaBelowElectronLine=-2; | |
2578 | fPIDnSigmaAboveElectronLine=3.5; | |
4a0aab28 | 2579 | break; |
2580 | default: | |
e5b6e8a6 | 2581 | AliError("TPCdEdxCutElectronLine not defined"); |
4a0aab28 | 2582 | return kFALSE; |
e5b6e8a6 | 2583 | |
4a0aab28 | 2584 | } |
2585 | return kTRUE; | |
3b77b2d1 | 2586 | } |
2587 | ///________________________________________________________________________ | |
e5b6e8a6 | 2588 | Bool_t AliConversionCuts::SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut) |
3b77b2d1 | 2589 | { // Set Cut |
e5b6e8a6 | 2590 | |
2591 | switch(pidedxSigmaCut){ | |
2592 | case 0: // -10 | |
2593 | fPIDnSigmaAbovePionLine=-10; | |
2594 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2595 | break; |
e5b6e8a6 | 2596 | case 1: // 0 |
2597 | fPIDnSigmaAbovePionLine=0; | |
2598 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2599 | break; |
e5b6e8a6 | 2600 | case 2: // 1 |
2601 | fPIDnSigmaAbovePionLine=1; | |
2602 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2603 | break; |
e5b6e8a6 | 2604 | case 3: // 1 |
2605 | fPIDnSigmaAbovePionLine=2.5; | |
2606 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2607 | break; |
e5b6e8a6 | 2608 | case 4: // 1 |
2609 | fPIDnSigmaAbovePionLine=0.5; | |
2610 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2611 | break; |
e5b6e8a6 | 2612 | case 5: // 1 |
2613 | fPIDnSigmaAbovePionLine=2.; | |
2614 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2615 | break; |
e5b6e8a6 | 2616 | case 6: // 1 |
2617 | fPIDnSigmaAbovePionLine=2.; | |
2618 | fPIDnSigmaAbovePionLineHighPt=0.5; | |
4a0aab28 | 2619 | break; |
e5b6e8a6 | 2620 | case 7: // 1 |
2621 | fPIDnSigmaAbovePionLine=3.5; | |
2622 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2623 | break; |
e5b6e8a6 | 2624 | case 8: // 1 |
2625 | fPIDnSigmaAbovePionLine=2.; | |
2626 | fPIDnSigmaAbovePionLineHighPt=1.; | |
4a0aab28 | 2627 | break; |
2628 | case 9: | |
e5b6e8a6 | 2629 | fPIDnSigmaAbovePionLine=3.0; // We need a bit less tight cut on dE/dx |
2630 | fPIDnSigmaAbovePionLineHighPt=-10; | |
4a0aab28 | 2631 | break; |
2632 | default: | |
e5b6e8a6 | 2633 | AliError(Form("Warning: pidedxSigmaCut not defined %d",pidedxSigmaCut)); |
4a0aab28 | 2634 | return kFALSE; |
2635 | } | |
2636 | return kTRUE; | |
3b77b2d1 | 2637 | } |
3b77b2d1 | 2638 | ///________________________________________________________________________ |
e5b6e8a6 | 2639 | Bool_t AliConversionCuts::SetMinMomPiondEdxCut(Int_t piMomdedxSigmaCut) |
3b77b2d1 | 2640 | { // Set Cut |
e5b6e8a6 | 2641 | switch(piMomdedxSigmaCut){ |
2642 | case 0: // 0.5 GeV | |
2643 | fPIDMinPnSigmaAbovePionLine=0.5; | |
4a0aab28 | 2644 | break; |
e5b6e8a6 | 2645 | case 1: // 1. GeV |
2646 | fPIDMinPnSigmaAbovePionLine=1.; | |
4a0aab28 | 2647 | break; |
e5b6e8a6 | 2648 | case 2: // 1.5 GeV |
2649 | fPIDMinPnSigmaAbovePionLine=1.5; | |
4a0aab28 | 2650 | break; |
e5b6e8a6 | 2651 | case 3: // 20.0 GeV |
2652 | fPIDMinPnSigmaAbovePionLine=20.; | |
4a0aab28 | 2653 | break; |
e5b6e8a6 | 2654 | case 4: // 50.0 GeV |
2655 | fPIDMinPnSigmaAbovePionLine=50.; | |
4a0aab28 | 2656 | break; |
e5b6e8a6 | 2657 | case 5: // 0.3 GeV |
2658 | fPIDMinPnSigmaAbovePionLine=0.3; | |
4a0aab28 | 2659 | break; |
e5b6e8a6 | 2660 | case 6: // 0.25 GeV |
2661 | fPIDMinPnSigmaAbovePionLine=0.25; | |
4a0aab28 | 2662 | break; |
e5b6e8a6 | 2663 | case 7: // 0.4 GeV |
2664 | fPIDMinPnSigmaAbovePionLine=0.4; | |
4a0aab28 | 2665 | break; |
e5b6e8a6 | 2666 | case 8: // 0.2 GeV |
2667 | fPIDMinPnSigmaAbovePionLine=0.2; | |
4a0aab28 | 2668 | break; |
2669 | default: | |
e5b6e8a6 | 2670 | AliError(Form("piMomdedxSigmaCut not defined %d",piMomdedxSigmaCut)); |
4a0aab28 | 2671 | return kFALSE; |
2672 | } | |
2673 | return kTRUE; | |
3b77b2d1 | 2674 | } |
3b77b2d1 | 2675 | ///________________________________________________________________________ |
2676 | Bool_t AliConversionCuts::SetMaxMomPiondEdxCut(Int_t piMaxMomdedxSigmaCut) | |
2677 | { // Set Cut | |
4a0aab28 | 2678 | switch(piMaxMomdedxSigmaCut){ |
2679 | case 0: // 100. GeV | |
2680 | fPIDMaxPnSigmaAbovePionLine=100.; | |
2681 | break; | |
2682 | case 1: // 5. GeV | |
2683 | fPIDMaxPnSigmaAbovePionLine=5.; | |
2684 | break; | |
2685 | case 2: // 4. GeV | |
2686 | fPIDMaxPnSigmaAbovePionLine=4.; | |
2687 | break; | |
2688 | case 3: // 3.5 GeV | |
2689 | fPIDMaxPnSigmaAbovePionLine=3.5; | |
2690 | break; | |
2691 | case 4: // 3. GeV | |
2692 | fPIDMaxPnSigmaAbovePionLine=3.; | |
2693 | break; | |
e5b6e8a6 | 2694 | case 5: // 7. GeV |
2695 | fPIDMaxPnSigmaAbovePionLine=7.; | |
4a0aab28 | 2696 | break; |
2697 | default: | |
e5b6e8a6 | 2698 | AliError(Form("piMaxMomdedxSigmaCut not defined %d",piMaxMomdedxSigmaCut)); |
4a0aab28 | 2699 | return kFALSE; |
92efd725 | 2700 | } |
2701 | return kTRUE; | |
3b77b2d1 | 2702 | } |
3b77b2d1 | 2703 | ///________________________________________________________________________ |
2704 | Bool_t AliConversionCuts::SetLowPRejectionCuts(Int_t LowPRejectionSigmaCut) | |
2705 | { // Set Cut | |
4a0aab28 | 2706 | switch(LowPRejectionSigmaCut){ |
2707 | case 0: // | |
2708 | fPIDnSigmaAtLowPAroundKaonLine=0; | |
2709 | fPIDnSigmaAtLowPAroundProtonLine=0; | |
2710 | fPIDnSigmaAtLowPAroundPionLine=0; | |
e5b6e8a6 | 2711 | fDoKaonRejectionLowP = kFALSE; |
2712 | fDoProtonRejectionLowP = kFALSE; | |
2713 | fDoPionRejectionLowP = kFALSE; | |
2714 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2715 | break; |
2716 | case 1: // | |
2717 | fPIDnSigmaAtLowPAroundKaonLine=0.5; | |
2718 | fPIDnSigmaAtLowPAroundProtonLine=0.5; | |
2719 | fPIDnSigmaAtLowPAroundPionLine=0.5; | |
e5b6e8a6 | 2720 | fDoKaonRejectionLowP = kTRUE; |
2721 | fDoProtonRejectionLowP = kTRUE; | |
2722 | fDoPionRejectionLowP = kTRUE; | |
2723 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2724 | break; |
2725 | case 2: // | |
2726 | fPIDnSigmaAtLowPAroundKaonLine=1; | |
2727 | fPIDnSigmaAtLowPAroundProtonLine=1; | |
2728 | fPIDnSigmaAtLowPAroundPionLine=1; | |
e5b6e8a6 | 2729 | fDoKaonRejectionLowP = kTRUE; |
2730 | fDoProtonRejectionLowP = kTRUE; | |
2731 | fDoPionRejectionLowP = kTRUE; | |
2732 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2733 | break; |
2734 | case 3: // | |
2735 | fPIDnSigmaAtLowPAroundKaonLine=2.; | |
2736 | fPIDnSigmaAtLowPAroundProtonLine=2.; | |
2737 | fPIDnSigmaAtLowPAroundPionLine=2.; | |
e5b6e8a6 | 2738 | fDoKaonRejectionLowP = kTRUE; |
2739 | fDoProtonRejectionLowP = kTRUE; | |
2740 | fDoPionRejectionLowP = kTRUE; | |
2741 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2742 | break; |
2743 | case 4: // | |
2744 | fPIDnSigmaAtLowPAroundKaonLine=0.; | |
2745 | fPIDnSigmaAtLowPAroundProtonLine=0.; | |
2746 | fPIDnSigmaAtLowPAroundPionLine=1; | |
e5b6e8a6 | 2747 | fDoKaonRejectionLowP = kFALSE; |
2748 | fDoProtonRejectionLowP = kFALSE; | |
2749 | fDoPionRejectionLowP = kTRUE; | |
2750 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2751 | break; |
2752 | case 5: // | |
2753 | fPIDnSigmaAtLowPAroundKaonLine=0.; | |
2754 | fPIDnSigmaAtLowPAroundProtonLine=0.; | |
2755 | fPIDnSigmaAtLowPAroundPionLine=1.5; | |
e5b6e8a6 | 2756 | fDoKaonRejectionLowP = kFALSE; |
2757 | fDoProtonRejectionLowP = kFALSE; | |
2758 | fDoPionRejectionLowP = kTRUE; | |
2759 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2760 | break; |
2761 | case 6: // | |
2762 | fPIDnSigmaAtLowPAroundKaonLine=0.; | |
2763 | fPIDnSigmaAtLowPAroundProtonLine=0.; | |
2764 | fPIDnSigmaAtLowPAroundPionLine=2.; | |
e5b6e8a6 | 2765 | fDoKaonRejectionLowP = kFALSE; |
2766 | fDoProtonRejectionLowP = kFALSE; | |
2767 | fDoPionRejectionLowP = kTRUE; | |
2768 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
2769 | break; | |
2770 | case 7: // | |
2771 | fPIDnSigmaAtLowPAroundKaonLine=0.; | |
2772 | fPIDnSigmaAtLowPAroundProtonLine=0.; | |
2773 | fPIDnSigmaAtLowPAroundPionLine=0.5; | |
2774 | fDoKaonRejectionLowP = kFALSE; | |
2775 | fDoProtonRejectionLowP = kFALSE; | |
2776 | fDoPionRejectionLowP = kTRUE; | |
2777 | fPIDMinPPionRejectionLowP = fPIDMinPnSigmaAbovePionLine; | |
4a0aab28 | 2778 | break; |
2779 | default: | |
2780 | AliError(Form("LowPRejectionSigmaCut not defined %d",LowPRejectionSigmaCut)); | |
2781 | return kFALSE; | |
2782 | } | |
2783 | return kTRUE; | |
3b77b2d1 | 2784 | } |
3b77b2d1 | 2785 | ///________________________________________________________________________ |
2786 | Bool_t AliConversionCuts::SetTOFElectronPIDCut(Int_t TOFelectronPID){ | |
4a0aab28 | 2787 | // Set Cut |
e5b6e8a6 | 2788 | switch(TOFelectronPID){ |
4a0aab28 | 2789 | case 0: // no cut |
2790 | fUseTOFpid = kFALSE; | |
2791 | fTofPIDnSigmaBelowElectronLine=-100; | |
2792 | fTofPIDnSigmaAboveElectronLine=100; | |
2793 | break; | |
2794 | case 1: // -7,7 | |
2795 | fUseTOFpid = kTRUE; | |
2796 | fTofPIDnSigmaBelowElectronLine=-7; | |
2797 | fTofPIDnSigmaAboveElectronLine=7; | |
2798 | break; | |
2799 | case 2: // -5,5 | |
2800 | fUseTOFpid = kTRUE; | |
2801 | fTofPIDnSigmaBelowElectronLine=-5; | |
2802 | fTofPIDnSigmaAboveElectronLine=5; | |
2803 | break; | |
2804 | case 3: // -3,5 | |
2805 | fUseTOFpid = kTRUE; | |
2806 | fTofPIDnSigmaBelowElectronLine=-3; | |
2807 | fTofPIDnSigmaAboveElectronLine=5; | |
2808 | break; | |
2809 | case 4: // -2,3 | |
2810 | fUseTOFpid = kTRUE; | |
2811 | fTofPIDnSigmaBelowElectronLine=-2; | |
2812 | fTofPIDnSigmaAboveElectronLine=3; | |
2813 | break; | |
e5b6e8a6 | 2814 | case 5: // -3,3 |
2815 | fUseTOFpid = kTRUE; | |
2816 | fTofPIDnSigmaBelowElectronLine=-3; | |
2817 | fTofPIDnSigmaAboveElectronLine=3; | |
4a0aab28 | 2818 | break; |
2819 | default: | |
e5b6e8a6 | 2820 | AliError(Form("TOFElectronCut not defined %d",TOFelectronPID)); |
4a0aab28 | 2821 | return kFALSE; |
2822 | } | |
4a0aab28 | 2823 | return kTRUE; |
3b77b2d1 | 2824 | } |
2825 | ///________________________________________________________________________ | |
2826 | Bool_t AliConversionCuts::SetQtMaxCut(Int_t QtMaxCut) | |
2827 | { // Set Cut | |
4a0aab28 | 2828 | switch(QtMaxCut){ |
2829 | case 0: // | |
2830 | fQtMax=1.; | |
e5b6e8a6 | 2831 | fDoQtGammaSelection=kFALSE; |
d8b864f8 | 2832 | fDo2DQt=kFALSE; |
4a0aab28 | 2833 | break; |
2834 | case 1: | |
2835 | fQtMax=0.1; | |
d8b864f8 | 2836 | fDo2DQt=kFALSE; |
4a0aab28 | 2837 | break; |
2838 | case 2: | |
2839 | fQtMax=0.07; | |
d8b864f8 | 2840 | fDo2DQt=kFALSE; |
4a0aab28 | 2841 | break; |
2842 | case 3: | |
2843 | fQtMax=0.05; | |
d8b864f8 | 2844 | fDo2DQt=kFALSE; |
4a0aab28 | 2845 | break; |
2846 | case 4: | |
2847 | fQtMax=0.03; | |
d8b864f8 | 2848 | fDo2DQt=kFALSE; |
4a0aab28 | 2849 | break; |
e5b6e8a6 | 2850 | case 5: |
4a0aab28 | 2851 | fQtMax=0.02; |
d8b864f8 | 2852 | fDo2DQt=kFALSE; |
e5b6e8a6 | 2853 | break; |
2854 | case 6: | |
4a0aab28 | 2855 | fQtMax=0.02; |
d8b864f8 | 2856 | fDo2DQt=kTRUE; |
e5b6e8a6 | 2857 | break; |
4a0aab28 | 2858 | case 7: |
2859 | fQtMax=0.15; | |
d8b864f8 | 2860 | fDo2DQt=kFALSE; |
4a0aab28 | 2861 | break; |
d8b864f8 FB |
2862 | case 8: |
2863 | fQtMax=0.05; | |
2864 | fDo2DQt=kTRUE; | |
2865 | break; | |
2866 | case 9: | |
2867 | fQtMax=0.03; | |
2868 | fDo2DQt=kTRUE; | |
2869 | break; | |
4a0aab28 | 2870 | default: |
2871 | AliError(Form("Warning: QtMaxCut not defined %d",QtMaxCut)); | |
2872 | return kFALSE; | |
2873 | } | |
2874 | return kTRUE; | |
3b77b2d1 | 2875 | } |
3b77b2d1 | 2876 | ///________________________________________________________________________ |
e5b6e8a6 | 2877 | Bool_t AliConversionCuts::SetChi2GammaCut(Int_t chi2GammaCut) |
2878 | { // Set Cut | |
2879 | ||
2880 | switch(chi2GammaCut){ | |
2881 | case 0: // 100 | |
2882 | fChi2CutConversion = 100.; | |
4a0aab28 | 2883 | break; |
e5b6e8a6 | 2884 | case 1: // 50 |
2885 | fChi2CutConversion = 50.; | |
4a0aab28 | 2886 | break; |
e5b6e8a6 | 2887 | case 2: // 30 |
2888 | fChi2CutConversion = 30.; | |
2889 | break; | |
2890 | case 3: | |
2891 | fChi2CutConversion = 200.; | |
2892 | break; | |
2893 | case 4: | |
2894 | fChi2CutConversion = 500.; | |
2895 | break; | |
2896 | case 5: | |
2897 | fChi2CutConversion = 100000.; | |
2898 | break; | |
2899 | case 6: | |
2900 | fChi2CutConversion = 5.; | |
2901 | break; | |
2902 | case 7: | |
2903 | fChi2CutConversion = 10.; | |
2904 | break; | |
2905 | case 8: | |
2906 | fChi2CutConversion = 20.; | |
2907 | break; | |
2908 | case 9: | |
2909 | fChi2CutConversion = 15.; | |
4a0aab28 | 2910 | break; |
2911 | default: | |
e5b6e8a6 | 2912 | AliError(Form("Warning: Chi2GammaCut not defined %d",chi2GammaCut)); |
4a0aab28 | 2913 | return kFALSE; |
2914 | } | |
4a0aab28 | 2915 | return kTRUE; |
3b77b2d1 | 2916 | } |
3b77b2d1 | 2917 | ///________________________________________________________________________ |
2918 | Bool_t AliConversionCuts::SetPsiPairCut(Int_t psiCut) { | |
3b77b2d1 | 2919 | |
4a0aab28 | 2920 | switch(psiCut) { |
2921 | case 0: | |
e5b6e8a6 | 2922 | fPsiPairCut = 10000; // |
4a0aab28 | 2923 | break; |
2924 | case 1: | |
e5b6e8a6 | 2925 | fPsiPairCut = 0.1; // |
4a0aab28 | 2926 | break; |
2927 | case 2: | |
2928 | fPsiPairCut = 0.05; // Standard | |
2929 | break; | |
2930 | case 3: | |
e5b6e8a6 | 2931 | fPsiPairCut = 0.035; // |
4a0aab28 | 2932 | break; |
2933 | case 4: | |
e5b6e8a6 | 2934 | fPsiPairCut = 0.2; // |
1390f698 | 2935 | break; |
2936 | case 5: | |
2937 | fPsiPairCut = 0.1; // | |
d8b864f8 | 2938 | fDo2DPsiPairChi2 = kTRUE; |
4a0aab28 | 2939 | break; |
2940 | case 6: | |
1390f698 | 2941 | fPsiPairCut = 0.05; // |
d8b864f8 | 2942 | fDo2DPsiPairChi2 = kTRUE; |
4a0aab28 | 2943 | break; |
2944 | case 7: | |
1390f698 | 2945 | fPsiPairCut = 0.035; // |
d8b864f8 | 2946 | fDo2DPsiPairChi2 = kTRUE; |
4a0aab28 | 2947 | break; |
2948 | case 8: | |
1390f698 | 2949 | fPsiPairCut = 0.2; // |
d8b864f8 | 2950 | fDo2DPsiPairChi2 = kTRUE; // |
e5b6e8a6 | 2951 | break; |
2952 | case 9: | |
2953 | fPsiPairCut = 0.5; // | |
4a0aab28 | 2954 | break; |
2955 | default: | |
92efd725 | 2956 | AliError(Form("PsiPairCut not defined %d",psiCut)); |
3b77b2d1 | 2957 | return kFALSE; |
4a0aab28 | 2958 | } |
3b77b2d1 | 2959 | |
4a0aab28 | 2960 | return kTRUE; |
3b77b2d1 | 2961 | } |
e5b6e8a6 | 2962 | ///________________________________________________________________________ |
2963 | Bool_t AliConversionCuts::SetPhotonAsymmetryCut(Int_t doPhotonAsymmetryCut){ | |
2964 | // Set Cut | |
2965 | switch(doPhotonAsymmetryCut){ | |
2966 | case 0: | |
2967 | fDoPhotonAsymmetryCut=0; | |
2968 | fMinPPhotonAsymmetryCut=100.; | |
2969 | fMinPhotonAsymmetry=0.; | |
2970 | break; | |
2971 | case 1: | |
2972 | fDoPhotonAsymmetryCut=1; | |
2973 | fMinPPhotonAsymmetryCut=3.5; | |
2974 | fMinPhotonAsymmetry=0.04; | |
2975 | break; | |
2976 | case 2: | |
2977 | fDoPhotonAsymmetryCut=1; | |
2978 | fMinPPhotonAsymmetryCut=3.5; | |
2979 | fMinPhotonAsymmetry=0.06; | |
2980 | break; | |
5a104c5e | 2981 | case 3: |
2982 | fDoPhotonAsymmetryCut=1; | |
2983 | fMinPPhotonAsymmetryCut=0.0; | |
2984 | fMinPhotonAsymmetry=0.05; | |
2985 | break; | |
e5b6e8a6 | 2986 | default: |
2987 | AliError(Form("PhotonAsymmetryCut not defined %d",doPhotonAsymmetryCut)); | |
2988 | return kFALSE; | |
2989 | } | |
2990 | fCuts[kdoPhotonAsymmetryCut]=doPhotonAsymmetryCut; | |
2991 | return kTRUE; | |
2992 | } | |
3b77b2d1 | 2993 | ///________________________________________________________________________ |
2994 | Bool_t AliConversionCuts::SetCosPAngleCut(Int_t cosCut) { | |
2995 | ||
4a0aab28 | 2996 | switch(cosCut){ |
2997 | case 0: | |
d8b864f8 | 2998 | fCosPAngleCut = -1; |
4a0aab28 | 2999 | break; |
3000 | case 1: | |
d8b864f8 | 3001 | fCosPAngleCut = 0; |
4a0aab28 | 3002 | break; |
3003 | case 2: | |
d8b864f8 | 3004 | fCosPAngleCut = 0.5; |
4a0aab28 | 3005 | break; |
3006 | case 3: | |
d8b864f8 | 3007 | fCosPAngleCut = 0.75; |
4a0aab28 | 3008 | break; |
3009 | case 4: | |
d8b864f8 | 3010 | fCosPAngleCut = 0.85; |
e5b6e8a6 | 3011 | break; |
3012 | case 5: | |
d8b864f8 | 3013 | fCosPAngleCut = 0.88; |
e5b6e8a6 | 3014 | break; |
3015 | case 6: | |
d8b864f8 | 3016 | fCosPAngleCut = 0.9; |
e5b6e8a6 | 3017 | break; |
3018 | case 7: | |
d8b864f8 | 3019 | fCosPAngleCut = 0.95; |
4a0aab28 | 3020 | break; |
3021 | default: | |
3022 | AliError(Form("Cosine Pointing Angle cut not defined %d",cosCut)); | |
3023 | return kFALSE; | |
3024 | } | |
3b77b2d1 | 3025 | |
4a0aab28 | 3026 | return kTRUE; |
3b77b2d1 | 3027 | } |
92efd725 | 3028 | ///________________________________________________________________________ |
3029 | Bool_t AliConversionCuts::SetSharedElectronCut(Int_t sharedElec) { | |
3030 | ||
8fa2d145 | 3031 | switch(sharedElec){ |
3032 | case 0: | |
3033 | fDoSharedElecCut = kFALSE; | |
3034 | fDoPhotonQualitySelectionCut = kFALSE; | |
d3345979 | 3035 | fPhotonQualityCut = 0; |
8fa2d145 | 3036 | break; |
3037 | case 1: | |
3038 | fDoSharedElecCut = kTRUE; | |
3039 | fDoPhotonQualitySelectionCut = kFALSE; | |
d3345979 | 3040 | fPhotonQualityCut = 0; |
8fa2d145 | 3041 | break; |
3042 | case 2: | |
3043 | fDoSharedElecCut = kFALSE; | |
3044 | fDoPhotonQualitySelectionCut = kTRUE; | |
3045 | fPhotonQualityCut = 1; | |
d3345979 | 3046 | break; |
8fa2d145 | 3047 | case 3: |
3048 | fDoSharedElecCut = kFALSE; | |
3049 | fDoPhotonQualitySelectionCut = kTRUE; | |
3050 | fPhotonQualityCut = 2; | |
d3345979 | 3051 | break; |
8fa2d145 | 3052 | case 4: |
3053 | fDoSharedElecCut = kFALSE; | |
3054 | fDoPhotonQualitySelectionCut = kTRUE; | |
3055 | fPhotonQualityCut = 3; | |
d3345979 | 3056 | break; |
8fa2d145 | 3057 | default: |
3058 | AliError(Form("Shared Electron Cut not defined %d",sharedElec)); | |
3059 | return kFALSE; | |
4a0aab28 | 3060 | } |
e5b6e8a6 | 3061 | |
4a0aab28 | 3062 | return kTRUE; |
92efd725 | 3063 | } |
92efd725 | 3064 | ///________________________________________________________________________ |
3065 | Bool_t AliConversionCuts::SetToCloseV0sCut(Int_t toClose) { | |
3066 | ||
3067 | switch(toClose){ | |
3068 | case 0: | |
3069 | fDoToCloseV0sCut = kFALSE; | |
3070 | fminV0Dist = 250; | |
3071 | break; | |
3072 | case 1: | |
3073 | fDoToCloseV0sCut = kTRUE; | |
3074 | fminV0Dist = 1; | |
3075 | break; | |
3076 | case 2: | |
3077 | fDoToCloseV0sCut = kTRUE; | |
3078 | fminV0Dist = 2; | |
3079 | break; | |
3080 | case 3: | |
3081 | fDoToCloseV0sCut = kTRUE; | |
3082 | fminV0Dist = 3; | |
3083 | break; | |
3084 | default: | |
4a0aab28 | 3085 | AliError(Form("Shared Electron Cut not defined %d",toClose)); |
3086 | return kFALSE; | |
92efd725 | 3087 | } |
3088 | return kTRUE; | |
3089 | } | |
ca91a3e1 | 3090 | ///________________________________________________________________________ |
e5b6e8a6 | 3091 | Bool_t AliConversionCuts::SetTRDElectronCut(Int_t TRDElectronCut) |
3092 | { // Set Cut | |
3093 | switch(TRDElectronCut){ | |
ca91a3e1 | 3094 | case 0: |
e5b6e8a6 | 3095 | fDoTRDPID=kFALSE; |
3096 | break; | |
ca91a3e1 | 3097 | case 1: |
e5b6e8a6 | 3098 | fDoTRDPID=kTRUE; |
3099 | fPIDTRDEfficiency=0.1; | |
3100 | break; | |
3101 | case 8: | |
3102 | fDoTRDPID=kTRUE; | |
3103 | fPIDTRDEfficiency=0.8; | |
3104 | break; | |
3105 | case 9: | |
3106 | fDoTRDPID=kTRUE; | |
3107 | fPIDTRDEfficiency=0.9; | |
3108 | break; | |
ca91a3e1 | 3109 | default: |
e5b6e8a6 | 3110 | AliError(Form("TRDElectronCut not defined %d",TRDElectronCut)); |
ca91a3e1 | 3111 | return kFALSE; |
3112 | } | |
e5b6e8a6 | 3113 | |
ca91a3e1 | 3114 | return kTRUE; |
3115 | } | |
4803eb1f | 3116 | |
3117 | ///________________________________________________________________________ | |
aff90284 | 3118 | Bool_t AliConversionCuts::SetDCAZPhotonPrimVtxCut(Int_t DCAZPhotonPrimVtx){ |
4803eb1f | 3119 | // Set Cut |
3120 | switch(DCAZPhotonPrimVtx){ | |
3121 | case 0: // | |
aff90284 | 3122 | fDCAZPrimVtxCut = 1000; |
4803eb1f | 3123 | break; |
3124 | case 1: // | |
3125 | fDCAZPrimVtxCut = 10; | |
3126 | break; | |
3127 | case 2: // | |
3128 | fDCAZPrimVtxCut = 5; | |
3129 | break; | |
3130 | case 3: // | |
3131 | fDCAZPrimVtxCut = 4; | |
3132 | break; | |
3133 | case 4: // | |
3134 | fDCAZPrimVtxCut = 3; | |
3135 | break; | |
3136 | case 5: // | |
3137 | fDCAZPrimVtxCut = 2.5; | |
3138 | break; | |
3139 | case 6: // | |
3140 | fDCAZPrimVtxCut = 2; | |
3141 | break; | |
3142 | case 7: // | |
3143 | fDCAZPrimVtxCut = 1.5; | |
3144 | break; | |
3145 | case 8: // | |
3146 | fDCAZPrimVtxCut = 1; | |
3147 | break; | |
3148 | case 9: // | |
3149 | fDCAZPrimVtxCut = 0.5; | |
3150 | break; | |
3151 | default: | |
3152 | cout<<"Warning: DCAZPhotonPrimVtx not defined "<<DCAZPhotonPrimVtx<<endl; | |
3153 | return kFALSE; | |
3154 | } | |
3155 | return kTRUE; | |
3156 | } | |
3157 | ||
3158 | ///________________________________________________________________________ | |
aff90284 | 3159 | Bool_t AliConversionCuts::SetDCARPhotonPrimVtxCut(Int_t DCARPhotonPrimVtx){ |
4803eb1f | 3160 | // Set Cut |
3161 | switch(DCARPhotonPrimVtx){ | |
3162 | case 0: // | |
aff90284 | 3163 | fDCARPrimVtxCut = 1000; |
4803eb1f | 3164 | break; |
3165 | case 1: // | |
3166 | fDCARPrimVtxCut = 10; | |
3167 | break; | |
3168 | case 2: // | |
3169 | fDCARPrimVtxCut = 5; | |
3170 | break; | |
3171 | case 3: // | |
3172 | fDCARPrimVtxCut = 4; | |
3173 | break; | |
3174 | case 4: // | |
3175 | fDCARPrimVtxCut = 3; | |
3176 | break; | |
3177 | case 5: // | |
3178 | fDCARPrimVtxCut = 2.5; | |
3179 | break; | |
3180 | case 6: // | |
3181 | fDCARPrimVtxCut = 2; | |
3182 | break; | |
3183 | case 7: // | |
3184 | fDCARPrimVtxCut = 1.5; | |
3185 | break; | |
3186 | case 8: // | |
3187 | fDCARPrimVtxCut = 1; | |
3188 | break; | |
3189 | case 9: // | |
3190 | fDCARPrimVtxCut = 0.5; | |
3191 | break; | |
3192 | default: | |
3193 | cout<<"Warning: DCARPhotonPrimVtx not defined "<<DCARPhotonPrimVtx<<endl; | |
3194 | return kFALSE; | |
3195 | } | |
3196 | return kTRUE; | |
3197 | } | |
3198 | ||
ae4f2cfb | 3199 | ///________________________________________________________________________ |
3200 | Bool_t AliConversionCuts::SetInPlaneOutOfPlane(Int_t inOutPlane){ | |
3201 | // Set Cut | |
3202 | switch(inOutPlane){ | |
3203 | case 0: // | |
3204 | fInPlaneOutOfPlane = 0; // No Event Plane | |
3205 | break; | |
3206 | case 1: // | |
3207 | fInPlaneOutOfPlane = 1; // In-Plane | |
3208 | break; | |
3209 | case 2: // | |
3210 | fInPlaneOutOfPlane = 2; // Out-Of-Plane | |
3211 | break; | |
3212 | default: | |
3213 | cout<<"Warning: In-Plane or Out-Of-Plane not defined "<<inOutPlane<<endl; | |
3214 | return kFALSE; | |
3215 | } | |
3216 | return kTRUE; | |
3217 | } | |
3218 | ||
4803eb1f | 3219 | |
e5b6e8a6 | 3220 | //------------------------------------------------------------- |
3221 | Double_t AliConversionCuts::GetCentrality(AliVEvent *event) | |
3222 | { // Get Event Centrality | |
3223 | ||
3224 | AliESDEvent *esdEvent=dynamic_cast<AliESDEvent*>(event); | |
3225 | if(esdEvent){ | |
3226 | AliCentrality *fESDCentrality=(AliCentrality*)esdEvent->GetCentrality(); | |
3227 | ||
3228 | if(fDetectorCentrality==0){ | |
ae947965 | 3229 | if (fIsHeavyIon==2){ |
3230 | return fESDCentrality->GetCentralityPercentile("V0A"); // default for pPb | |
3231 | } else{ | |
3232 | return fESDCentrality->GetCentralityPercentile("V0M"); // default | |
3233 | } | |
e5b6e8a6 | 3234 | } |
3235 | if(fDetectorCentrality==1){ | |
3236 | return fESDCentrality->GetCentralityPercentile("CL1"); | |
3237 | } | |
3238 | } | |
3239 | ||
3240 | AliAODEvent *aodEvent=dynamic_cast<AliAODEvent*>(event); | |
3241 | if(aodEvent){ | |
3242 | if(aodEvent->GetHeader()){return aodEvent->GetHeader()->GetCentrality();} | |
3243 | } | |
3244 | ||
3245 | return -1; | |
3246 | } | |
3247 | //------------------------------------------------------------- | |
3248 | Bool_t AliConversionCuts::IsCentralitySelected(AliVEvent *event, AliVEvent *fMCEvent) | |
3249 | { // Centrality Selection | |
3250 | if(!fIsHeavyIon)return kTRUE; | |
3251 | ||
4803eb1f | 3252 | if(fCentralityMin == fCentralityMax ) return kTRUE;//0-100% |
3253 | else if(fCentralityMax==0) fCentralityMax=10; //CentralityRange = fCentralityMin-100% | |
aff90284 | 3254 | |
e5b6e8a6 | 3255 | Double_t centrality=GetCentrality(event); |
3256 | if(centrality<0)return kFALSE; | |
3257 | ||
3258 | Int_t centralityC=0; | |
3259 | if (fModCentralityClass == 0){ | |
3260 | centralityC= Int_t(centrality/10); | |
3261 | if(centralityC >= fCentralityMin && centralityC < fCentralityMax) | |
3262 | return kTRUE; | |
3263 | else return kFALSE; | |
3264 | } | |
3265 | else if (fModCentralityClass ==1){ | |
3266 | centralityC= Int_t(centrality); | |
3267 | if(centralityC >= fCentralityMin*5 && centralityC < fCentralityMax*5){ | |
3268 | return kTRUE; | |
3269 | } else return kFALSE; | |
3270 | } | |
3271 | else if (fModCentralityClass ==2){ | |
3272 | centralityC= Int_t(centrality); | |
3273 | if(centralityC >= ((fCentralityMin*5)+45) && centralityC < ((fCentralityMax*5)+45)) | |
3274 | return kTRUE; | |
3275 | else return kFALSE; | |
3276 | } | |
aff90284 | 3277 | |
4803eb1f | 3278 | Int_t nprimaryTracks = ((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask("V0ReaderV1"))->GetNumberOfPrimaryTracks(); |
aff90284 | 3279 | Int_t PrimaryTracks10[10][2] = |
4803eb1f | 3280 | { |
3281 | {9999,9999}, // 0 | |
d3345979 | 3282 | {1210, 928}, // 10 |
3283 | { 817, 658}, // 20 | |
3284 | { 536, 435}, // 30 | |
3285 | { 337, 276}, // 40 | |
f6c249db | 3286 | { 197, 162}, // 50 |
3287 | { 106, 100}, // 60 | |
d3345979 | 3288 | { 51, 44}, // 70 |
3289 | { 21, 18}, // 80 | |
4803eb1f | 3290 | { 0, 0} // 90 |
3291 | }; | |
aff90284 | 3292 | Int_t PrimaryTracks5a[10][2] = |
4803eb1f | 3293 | { |
3294 | {9999,9999}, // 0 | |
f6c249db | 3295 | {1485,1168}, // 5 |
d3345979 | 3296 | {1210, 928}, // 10 |
3297 | { 995, 795}, // 15 | |
3298 | { 817, 658}, // 20 | |
3299 | { 666, 538}, // 25 | |
3300 | { 536, 435}, // 30 | |
f6c249db | 3301 | { 428, 350}, // 35 |
d3345979 | 3302 | { 337, 276}, // 40 |
3303 | { 260, 214} // 45 | |
4803eb1f | 3304 | }; |
aff90284 | 3305 | Int_t PrimaryTracks5b[10][2] = |
4803eb1f | 3306 | { |
d3345979 | 3307 | { 260, 214}, // 45 |
f6c249db | 3308 | { 197, 162}, // 50 |
3309 | { 147, 125}, // 55 | |
3310 | { 106, 100}, // 60 | |
d3345979 | 3311 | { 75, 63}, // 65 |
3312 | { 51, 44}, // 70 | |
3313 | { 34, 29}, // 75 | |
3314 | { 21, 18}, // 80 | |
3315 | { 13, 11}, // 85 | |
4803eb1f | 3316 | { 0, 0} // 90 |
3317 | }; | |
3318 | ||
3319 | Int_t column = -1; | |
3320 | if(event->IsA()==AliESDEvent::Class()) column = 0; | |
3321 | if(event->IsA()==AliAODEvent::Class()) column = 1; | |
aff90284 | 3322 | |
e5b6e8a6 | 3323 | if (fModCentralityClass == 3){ |
3324 | if(fMCEvent){ | |
4803eb1f | 3325 | if(nprimaryTracks > PrimaryTracks10[fCentralityMax][column] && nprimaryTracks <= PrimaryTracks10[fCentralityMin][column]) |
e5b6e8a6 | 3326 | return kTRUE; |
3327 | else return kFALSE; | |
3328 | } | |
3329 | else{ | |
3330 | centralityC= Int_t(centrality/10); | |
3331 | if(centralityC >= fCentralityMin && centralityC < fCentralityMax) | |
3332 | return kTRUE; | |
3333 | else return kFALSE; | |
3334 | } | |
3335 | } | |
3336 | else if (fModCentralityClass ==4){ | |
3337 | if(fMCEvent){ | |
4803eb1f | 3338 | if(nprimaryTracks > PrimaryTracks5a[fCentralityMax][column] && nprimaryTracks <= PrimaryTracks5a[fCentralityMin][column]) |
e5b6e8a6 | 3339 | return kTRUE; |
3340 | else return kFALSE; | |
3341 | } | |
3342 | else{ | |
3343 | centralityC= Int_t(centrality); | |
3344 | if(centralityC >= fCentralityMin*5 && centralityC < fCentralityMax*5){ | |
3345 | return kTRUE; | |
3346 | } else return kFALSE; | |
3347 | } | |
3348 | } | |
3349 | else if (fModCentralityClass ==5){ | |
3350 | if(fMCEvent){ | |
4803eb1f | 3351 | if(nprimaryTracks > PrimaryTracks5b[fCentralityMax][column] && nprimaryTracks <= PrimaryTracks5b[fCentralityMin][column]) |
e5b6e8a6 | 3352 | return kTRUE; |
3353 | else return kFALSE; | |
3354 | } | |
3355 | else{ | |
3356 | centralityC= Int_t(centrality); | |
3357 | if(centralityC >= ((fCentralityMin*5)+45) && centralityC < ((fCentralityMax*5)+45)) | |
3358 | return kTRUE; | |
3359 | else return kFALSE; | |
3360 | } | |
3361 | } | |
3362 | ||
3363 | return kFALSE; | |
3364 | } | |
3365 | ///________________________________________________________________________ | |
3366 | Bool_t AliConversionCuts::VertexZCut(AliVEvent *event){ | |
3367 | // Cut on z position of primary vertex | |
3368 | Double_t fVertexZ=event->GetPrimaryVertex()->GetZ(); | |
f315320f | 3369 | Double_t fVertexZSPD = 0; |
3370 | AliESDEvent *fESDEvent=dynamic_cast<AliESDEvent*>(event); | |
3371 | if(fESDEvent){ | |
3372 | fVertexZSPD = fESDEvent->GetPrimaryVertexSPD()->GetZ(); | |
3373 | } | |
3374 | AliAODEvent *fAODEvent=dynamic_cast<AliAODEvent*>(event); | |
3375 | if(fAODEvent){ | |
3376 | fVertexZSPD = fAODEvent->GetPrimaryVertexSPD()->GetZ(); | |
3377 | } | |
3378 | ||
e5b6e8a6 | 3379 | if(abs(fVertexZ)>fMaxVertexZ)return kFALSE; |
11c1e680 | 3380 | |
f315320f | 3381 | TString periodName = ((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager() |
3382 | ->GetTask("V0ReaderV1"))->GetPeriodName(); | |
3383 | if (periodName.CompareTo("LHC11h")==0){ | |
3384 | if (abs(fVertexZ-fVertexZSPD) > 0.1) return kFALSE; | |
3385 | } | |
0a2b2b4b | 3386 | if (fIsHeavyIon == 2){ |
3387 | if(fUtils->IsFirstEventInChunk(event)) return kFALSE; | |
3388 | if(!fUtils->IsVertexSelected2013pA(event)) return kFALSE; | |
49af2ef8 | 3389 | if(fUtils->IsPileUpEvent(event)) return kFALSE; |
0a2b2b4b | 3390 | } |
11c1e680 | 3391 | |
e5b6e8a6 | 3392 | return kTRUE; |
3393 | } | |
3b77b2d1 | 3394 | ///________________________________________________________________________ |
3395 | ||
3396 | Int_t AliConversionCuts::GetNumberOfContributorsVtx(AliVEvent *event){ | |
4a0aab28 | 3397 | // returns number of contributors to the vertex |
e5b6e8a6 | 3398 | |
4a0aab28 | 3399 | AliESDEvent *fESDEvent=dynamic_cast<AliESDEvent*>(event); |
3400 | if(fESDEvent){ | |
e5b6e8a6 | 3401 | if (fESDEvent->GetPrimaryVertex() != NULL){ |
3402 | if(fESDEvent->GetPrimaryVertex()->GetNContributors()>0) { | |
fcc79cf5 | 3403 | // cout << "accepted global" << fESDEvent->GetEventNumberInFile() << " with NCont: " << fESDEvent->GetPrimaryVertex()->GetNContributors() << endl; |
e5b6e8a6 | 3404 | return fESDEvent->GetPrimaryVertex()->GetNContributors(); |
3405 | } | |
4a0aab28 | 3406 | } |
a280ac15 | 3407 | |
e5b6e8a6 | 3408 | if(fESDEvent->GetPrimaryVertexSPD() !=NULL){ |
4a0aab28 | 3409 | if(fESDEvent->GetPrimaryVertexSPD()->GetNContributors()>0) { |
fcc79cf5 | 3410 | // cout << "accepted SPD" << fESDEvent->GetEventNumberInFile() << " with NCont: " << fESDEvent->GetPrimaryVertexSPD()->GetNContributors() << endl; |
4a0aab28 | 3411 | return fESDEvent->GetPrimaryVertexSPD()->GetNContributors(); |
e5b6e8a6 | 3412 | } else { |
3413 | AliWarning(Form("Number of contributors from bad vertex type:: %s",fESDEvent->GetPrimaryVertex()->GetName())); | |
ccfa8c0d | 3414 | // cout << "rejected " << fESDEvent->GetEventNumberInFile() << endl; |
4a0aab28 | 3415 | return 0; |
3416 | } | |
3417 | } | |
3418 | } | |
3419 | ||
3420 | AliAODEvent *fAODEvent=dynamic_cast<AliAODEvent*>(event); | |
3421 | if(fAODEvent){ | |
e5b6e8a6 | 3422 | if (fAODEvent->GetPrimaryVertex() != NULL){ |
3423 | if(fAODEvent->GetPrimaryVertex()->GetNContributors()>0) { | |
3424 | return fAODEvent->GetPrimaryVertex()->GetNContributors(); | |
3425 | } | |
a280ac15 | 3426 | } |
e5b6e8a6 | 3427 | if(fAODEvent->GetPrimaryVertexSPD() !=NULL){ |
4a0aab28 | 3428 | if(fAODEvent->GetPrimaryVertexSPD()->GetNContributors()>0) { |
3429 | return fAODEvent->GetPrimaryVertexSPD()->GetNContributors(); | |
e5b6e8a6 | 3430 | } else { |
4a0aab28 | 3431 | AliWarning(Form("Number of contributors from bad vertex type:: %s",fAODEvent->GetPrimaryVertex()->GetName())); |
3432 | return 0; | |
3433 | } | |
3434 | } | |
3435 | } | |
ccfa8c0d | 3436 | // cout << "rejected " << fESDEvent->GetEventNumberInFile() << endl; |
4a0aab28 | 3437 | return 0; |
3b77b2d1 | 3438 | } |
3439 | ||
92efd725 | 3440 | ///________________________________________________________________________ |
3b77b2d1 | 3441 | |
1186afd2 | 3442 | Bool_t AliConversionCuts::IsTriggerSelected(AliVEvent *fInputEvent) |
92efd725 | 3443 | { |
e5b6e8a6 | 3444 | |
4a0aab28 | 3445 | AliInputEventHandler *fInputHandler=(AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()); |
3446 | ||
3447 | UInt_t isSelected = AliVEvent::kAny; | |
8fa2d145 | 3448 | TString periodName = ((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask("V0ReaderV1"))->GetPeriodName(); |
3449 | // cout << periodName.Data() << endl; | |
3450 | ||
0a2b2b4b | 3451 | if (fInputHandler==NULL) return kFALSE; |
1186afd2 | 3452 | if( fInputHandler->GetEventSelection() || fInputEvent->IsA()==AliAODEvent::Class()) { |
ae947965 | 3453 | if (!fTriggerSelectedManually){ |
3454 | if (fPreSelCut) fOfflineTriggerMask = AliVEvent::kAny; | |
3455 | else { | |
3456 | if (fIsHeavyIon == 1) fOfflineTriggerMask = AliVEvent::kMB | AliVEvent::kCentral | AliVEvent::kSemiCentral; | |
8fa2d145 | 3457 | else if (fIsHeavyIon == 2) fOfflineTriggerMask = AliVEvent::kINT7; |
c92c97b5 | 3458 | else if (periodName.CompareTo("LHC11c") == 0 || periodName.CompareTo("LHC11d") == 0 || periodName.CompareTo("LHC11e") == 0 || periodName.CompareTo("LHC11f") == 0 || periodName.CompareTo("LHC11g") == 0 || periodName.CompareTo("LHC12a") == 0 || periodName.CompareTo("LHC12b") == 0 || periodName.CompareTo("LHC12c") == 0 || periodName.CompareTo("LHC12d") == 0 || periodName.CompareTo("LHC12f") == 0 || periodName.CompareTo("LHC13g") == 0 ) { |
3459 | fOfflineTriggerMask = AliVEvent::kINT7; | |
3460 | // cout << "will take kINT7 as trigger mask" << endl; | |
3461 | } | |
8fa2d145 | 3462 | else fOfflineTriggerMask = AliVEvent::kMB; |
aff90284 | 3463 | } |
ae947965 | 3464 | } |
4a0aab28 | 3465 | // Get the actual offline trigger mask for the event and AND it with the |
3466 | // requested mask. If no mask requested select by default the event. | |
ae947965 | 3467 | // if (fPreSelCut) cout << "Trigger selected from outside: "<< fTriggerSelectedManually <<"\t Offline Trigger mask for Precut: " << fOfflineTriggerMask << endl; |
3468 | // else cout << "Trigger selected from outside: "<< fTriggerSelectedManually <<"\t Offline Trigger mask: " << fOfflineTriggerMask << endl; | |
aff90284 | 3469 | |
4a0aab28 | 3470 | if (fOfflineTriggerMask) |
3471 | isSelected = fOfflineTriggerMask & fInputHandler->IsEventSelected(); | |
3472 | } | |
e5b6e8a6 | 3473 | fIsSDDFired = !(fInputHandler->IsEventSelected() & AliVEvent::kFastOnly); |
4a0aab28 | 3474 | |
3475 | // Fill Histogram | |
3476 | if(hTriggerClass){ | |
11c1e680 | 3477 | if (fIsSDDFired) hTriggerClass->Fill(33); |
e5b6e8a6 | 3478 | if (fInputHandler->IsEventSelected() & AliVEvent::kMB)hTriggerClass->Fill(0); |
3479 | if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)hTriggerClass->Fill(1); | |
3480 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)hTriggerClass->Fill(2); | |
3481 | if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)hTriggerClass->Fill(3); | |
3482 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)hTriggerClass->Fill(4); | |
4a0aab28 | 3483 | if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)hTriggerClass->Fill(5); |
e5b6e8a6 | 3484 | if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)hTriggerClass->Fill(6); |
3485 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUSPB)hTriggerClass->Fill(6); | |
e5b6e8a6 | 3486 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)hTriggerClass->Fill(7); |
3487 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUSHPB)hTriggerClass->Fill(7); | |
3488 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)hTriggerClass->Fill(8); | |
3489 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikePB)hTriggerClass->Fill(8); | |
3490 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)hTriggerClass->Fill(9); | |
3491 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikePB)hTriggerClass->Fill(9); | |
3492 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)hTriggerClass->Fill(10); | |
3493 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMC8)hTriggerClass->Fill(10); | |
3494 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)hTriggerClass->Fill(11); | |
3495 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)hTriggerClass->Fill(12); | |
3496 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)hTriggerClass->Fill(13); | |
3497 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHI8)hTriggerClass->Fill(13); | |
3498 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHOSPb)hTriggerClass->Fill(13); | |
3499 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)hTriggerClass->Fill(14); | |
3500 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)hTriggerClass->Fill(15); | |
3501 | if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)hTriggerClass->Fill(16); | |
3502 | if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)hTriggerClass->Fill(17); | |
3503 | if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)hTriggerClass->Fill(18); | |
3504 | if (fInputHandler->IsEventSelected() & AliVEvent::kZED)hTriggerClass->Fill(19); | |
3505 | if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)hTriggerClass->Fill(20); | |
3506 | if (fInputHandler->IsEventSelected() & AliVEvent::kSPI)hTriggerClass->Fill(20); | |
3507 | if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)hTriggerClass->Fill(21); | |
3508 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)hTriggerClass->Fill(22); | |
3509 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)hTriggerClass->Fill(23); | |
3510 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)hTriggerClass->Fill(24); | |
3511 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)hTriggerClass->Fill(25); | |
3512 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)hTriggerClass->Fill(26); | |
3513 | if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)hTriggerClass->Fill(27); | |
11c1e680 | 3514 | if (fInputHandler->IsEventSelected() & AliVEvent::kTRD)hTriggerClass->Fill(28); |
3515 | if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)hTriggerClass->Fill(29); | |
3516 | if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)hTriggerClass->Fill(30); | |
3517 | if (fInputHandler->IsEventSelected() & AliVEvent::kAny)hTriggerClass->Fill(31); | |
3518 | if (!fInputHandler->IsEventSelected()) hTriggerClass->Fill(34); | |
a280ac15 | 3519 | } |
3520 | ||
3521 | if(hTriggerClassSelected && isSelected){ | |
11c1e680 | 3522 | if (!fIsSDDFired) hTriggerClassSelected->Fill(33); |
a280ac15 | 3523 | if (fInputHandler->IsEventSelected() & AliVEvent::kMB)hTriggerClassSelected->Fill(0); |
3524 | if (fInputHandler->IsEventSelected() & AliVEvent::kINT7)hTriggerClassSelected->Fill(1); | |
3525 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUON)hTriggerClassSelected->Fill(2); | |
3526 | if (fInputHandler->IsEventSelected() & AliVEvent::kHighMult)hTriggerClassSelected->Fill(3); | |
3527 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMC1)hTriggerClassSelected->Fill(4); | |
3528 | if (fInputHandler->IsEventSelected() & AliVEvent::kCINT5)hTriggerClassSelected->Fill(5); | |
3529 | if (fInputHandler->IsEventSelected() & AliVEvent::kCMUS5)hTriggerClassSelected->Fill(6); | |
3530 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUSPB)hTriggerClassSelected->Fill(6); | |
3531 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUSH7)hTriggerClassSelected->Fill(7); | |
3532 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUSHPB)hTriggerClassSelected->Fill(7); | |
3533 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUL7)hTriggerClassSelected->Fill(8); | |
3534 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikePB)hTriggerClassSelected->Fill(8); | |
3535 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUU7)hTriggerClassSelected->Fill(9); | |
3536 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikePB)hTriggerClassSelected->Fill(9); | |
3537 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMC7)hTriggerClassSelected->Fill(10); | |
3538 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMC8)hTriggerClassSelected->Fill(10); | |
3539 | if (fInputHandler->IsEventSelected() & AliVEvent::kMUS7)hTriggerClassSelected->Fill(11); | |
3540 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHI1)hTriggerClassSelected->Fill(12); | |
3541 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHI7)hTriggerClassSelected->Fill(13); | |
3542 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHI8)hTriggerClassSelected->Fill(13); | |
3543 | if (fInputHandler->IsEventSelected() & AliVEvent::kPHOSPb)hTriggerClassSelected->Fill(13); | |
3544 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE)hTriggerClassSelected->Fill(14); | |
3545 | if (fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA)hTriggerClassSelected->Fill(15); | |
3546 | if (fInputHandler->IsEventSelected() & AliVEvent::kCentral)hTriggerClassSelected->Fill(16); | |
3547 | if (fInputHandler->IsEventSelected() & AliVEvent::kSemiCentral)hTriggerClassSelected->Fill(17); | |
3548 | if (fInputHandler->IsEventSelected() & AliVEvent::kDG5)hTriggerClassSelected->Fill(18); | |
3549 | if (fInputHandler->IsEventSelected() & AliVEvent::kZED)hTriggerClassSelected->Fill(19); | |
3550 | if (fInputHandler->IsEventSelected() & AliVEvent::kSPI7)hTriggerClassSelected->Fill(20); | |
3551 | if (fInputHandler->IsEventSelected() & AliVEvent::kSPI)hTriggerClassSelected->Fill(20); | |
3552 | if (fInputHandler->IsEventSelected() & AliVEvent::kINT8)hTriggerClassSelected->Fill(21); | |
3553 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleLowPt8)hTriggerClassSelected->Fill(22); | |
3554 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonSingleHighPt8)hTriggerClassSelected->Fill(23); | |
3555 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonLikeLowPt8)hTriggerClassSelected->Fill(24); | |
3556 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt8)hTriggerClassSelected->Fill(25); | |
3557 | if (fInputHandler->IsEventSelected() & AliVEvent::kMuonUnlikeLowPt0)hTriggerClassSelected->Fill(26); | |
3558 | if (fInputHandler->IsEventSelected() & AliVEvent::kUserDefined)hTriggerClassSelected->Fill(27); | |
11c1e680 | 3559 | if (fInputHandler->IsEventSelected() & AliVEvent::kTRD)hTriggerClassSelected->Fill(28); |
3560 | if (fInputHandler->IsEventSelected() & AliVEvent::kFastOnly)hTriggerClassSelected->Fill(29); | |
3561 | if (fInputHandler->IsEventSelected() & AliVEvent::kAnyINT)hTriggerClassSelected->Fill(30); | |
3562 | if (fInputHandler->IsEventSelected() & AliVEvent::kAny)hTriggerClassSelected->Fill(31); | |
4a0aab28 | 3563 | } |
3b77b2d1 | 3564 | |
e5b6e8a6 | 3565 | if(!isSelected)return kFALSE; |
a280ac15 | 3566 | |
4a0aab28 | 3567 | return kTRUE; |
3b77b2d1 | 3568 | |
92efd725 | 3569 | } |
3b77b2d1 | 3570 | |
3571 | ///________________________________________________________________________ | |
3572 | Int_t AliConversionCuts::GetFirstTPCRow(Double_t radius){ | |
4a0aab28 | 3573 | // Get first TPC row |
e5b6e8a6 | 3574 | Int_t firstTPCRow = 0; |
3575 | Double_t radiusI = 84.8; | |
3576 | Double_t radiusO = 134.6; | |
4a0aab28 | 3577 | Double_t radiusOB = 198.; |
e5b6e8a6 | 3578 | Double_t rSizeI = 0.75; |
3579 | Double_t rSizeO = 1.; | |
3580 | Double_t rSizeOB = 1.5; | |
3581 | Int_t nClsI = 63; | |
3582 | Int_t nClsIO = 127; | |
4a0aab28 | 3583 | |
3584 | if(radius <= radiusI){ | |
3585 | return firstTPCRow; | |
3586 | } | |
3587 | if(radius>radiusI && radius<=radiusO){ | |
3588 | firstTPCRow = (Int_t)((radius-radiusI)/rSizeI); | |
3589 | } | |
3590 | if(radius>radiusO && radius<=radiusOB){ | |
3591 | firstTPCRow = (Int_t)(nClsI+(radius-radiusO)/rSizeO); | |
3592 | } | |
3593 | ||
3594 | if(radius>radiusOB){ | |
3595 | firstTPCRow =(Int_t)(nClsIO+(radius-radiusOB)/rSizeOB); | |
3596 | } | |
3597 | ||
3598 | return firstTPCRow; | |
3b77b2d1 | 3599 | } |
3600 | ||
92efd725 | 3601 | Bool_t AliConversionCuts::CosinePAngleCut(const AliConversionPhotonBase * photon, AliVEvent * event) const { |
4a0aab28 | 3602 | ///Check if passes cosine of pointing angle cut |
d8b864f8 | 3603 | if(GetCosineOfPointingAngle(photon, event) < fCosPAngleCut){ |
92efd725 | 3604 | return kFALSE; |
3605 | } | |
3606 | return kTRUE; | |
3b77b2d1 | 3607 | } |
3608 | ||
92efd725 | 3609 | Double_t AliConversionCuts::GetCosineOfPointingAngle( const AliConversionPhotonBase * photon, AliVEvent * event) const{ |
e5b6e8a6 | 3610 | // calculates the pointing angle of the recalculated V0 |
3b77b2d1 | 3611 | |
92efd725 | 3612 | Double_t momV0[3] = {0,0,0}; |
3613 | if(event->IsA()==AliESDEvent::Class()){ | |
3614 | AliESDEvent *esdEvent = dynamic_cast<AliESDEvent*>(event); | |
e5b6e8a6 | 3615 | if(!esdEvent) return -999; |
92efd725 | 3616 | AliESDv0 *v0 = esdEvent->GetV0(photon->GetV0Index()); |
e5b6e8a6 | 3617 | if(!v0) return -999; |
92efd725 | 3618 | v0->GetPxPyPz(momV0[0],momV0[1],momV0[2]); |
3619 | } | |
3620 | if(event->IsA()==AliAODEvent::Class()){ | |
3621 | momV0[0] = photon->GetPx(); | |
3622 | momV0[1] = photon->GetPy(); | |
3623 | momV0[2] = photon->GetPz(); | |
3624 | } | |
e5b6e8a6 | 3625 | |
92efd725 | 3626 | //Double_t momV0[3] = { photon->GetPx(), photon->GetPy(), photon->GetPz() }; //momentum of the V0 |
e5b6e8a6 | 3627 | Double_t PosV0[3] = { photon->GetConversionX() - event->GetPrimaryVertex()->GetX(), |
3628 | photon->GetConversionY() - event->GetPrimaryVertex()->GetY(), | |
92efd725 | 3629 | photon->GetConversionZ() - event->GetPrimaryVertex()->GetZ() }; //Recalculated V0 Position vector |
e5b6e8a6 | 3630 | |
3b77b2d1 | 3631 | Double_t momV02 = momV0[0]*momV0[0] + momV0[1]*momV0[1] + momV0[2]*momV0[2]; |
3632 | Double_t PosV02 = PosV0[0]*PosV0[0] + PosV0[1]*PosV0[1] + PosV0[2]*PosV0[2]; | |
3633 | ||
e5b6e8a6 | 3634 | |
3635 | Double_t cosinePointingAngle = -999; | |
3636 | if(momV02*PosV02 > 0.0) | |
3637 | cosinePointingAngle = (PosV0[0]*momV0[0] + PosV0[1]*momV0[1] + PosV0[2]*momV0[2] ) / TMath::Sqrt(momV02 * PosV02); | |
3638 | ||
3b77b2d1 | 3639 | return cosinePointingAngle; |
3640 | } | |
3641 | ||
e5b6e8a6 | 3642 | ///________________________________________________________________________ |
d8b864f8 | 3643 | Bool_t AliConversionCuts::PsiPairCut(const AliConversionPhotonBase * photon) const { |
1390f698 | 3644 | |
d8b864f8 FB |
3645 | if (fDo2DPsiPairChi2){ |
3646 | if (abs(photon->GetPsiPair()) < -fPsiPairCut/fChi2CutConversion*photon->GetChi2perNDF() + fPsiPairCut ){ | |
3647 | return kTRUE; | |
3648 | } else { | |
3649 | return kFALSE; | |
3650 | } | |
1390f698 | 3651 | } else { |
3652 | if(abs(photon->GetPsiPair()) > fPsiPairCut){ | |
3653 | return kFALSE;} | |
3654 | else{return kTRUE;} | |
3655 | } | |
3b77b2d1 | 3656 | } |
3657 | ||
3658 | ///________________________________________________________________________ | |
3659 | TString AliConversionCuts::GetCutNumber(){ | |
4a0aab28 | 3660 | // returns TString with current cut number |
3661 | TString a(kNCuts); | |
3662 | for(Int_t ii=0;ii<kNCuts;ii++){ | |
92efd725 | 3663 | a.Append(Form("%d",fCuts[ii])); |
4a0aab28 | 3664 | } |
3665 | return a; | |
3b77b2d1 | 3666 | } |
3667 | ||
92efd725 | 3668 | ///________________________________________________________________________ |
3669 | void AliConversionCuts::FillElectonLabelArray(AliAODConversionPhoton* photon, Int_t nV0){ | |
e5b6e8a6 | 3670 | |
92efd725 | 3671 | Int_t posLabel = photon->GetTrackLabelPositive(); |
3672 | Int_t negLabel = photon->GetTrackLabelNegative(); | |
e5b6e8a6 | 3673 | |
92efd725 | 3674 | fElectronLabelArray[nV0*2] = posLabel; |
3675 | fElectronLabelArray[(nV0*2)+1] = negLabel; | |
3676 | } | |
3677 | ///________________________________________________________________________ | |
3678 | Bool_t AliConversionCuts::RejectSharedElectronV0s(AliAODConversionPhoton* photon, Int_t nV0, Int_t nV0s){ | |
3b77b2d1 | 3679 | |
92efd725 | 3680 | Int_t posLabel = photon->GetTrackLabelPositive(); |
3681 | Int_t negLabel = photon->GetTrackLabelNegative(); | |
e5b6e8a6 | 3682 | |
92efd725 | 3683 | for(Int_t i = 0; i<nV0s*2;i++){ |
3684 | if(i==nV0*2) continue; | |
3685 | if(i==(nV0*2)+1) continue; | |
3686 | if(fElectronLabelArray[i] == posLabel){ | |
3687 | return kFALSE;} | |
3688 | if(fElectronLabelArray[i] == negLabel){ | |
3689 | return kFALSE;} | |
3690 | } | |
3b77b2d1 | 3691 | |
92efd725 | 3692 | return kTRUE; |
3693 | } | |
3b77b2d1 | 3694 | ///________________________________________________________________________ |
92efd725 | 3695 | Bool_t AliConversionCuts::RejectToCloseV0s(AliAODConversionPhoton* photon, TList *photons, Int_t nV0){ |
3696 | ||
3697 | ||
3698 | Double_t posX = photon->GetConversionX(); | |
3699 | Double_t posY = photon->GetConversionY(); | |
3700 | Double_t posZ = photon->GetConversionZ(); | |
3701 | ||
3702 | for(Int_t i = 0;i<photons->GetEntries();i++){ | |
3703 | if(nV0 == i) continue; | |
3704 | AliAODConversionPhoton *photonComp = (AliAODConversionPhoton*) photons->At(i); | |
3705 | Double_t posCompX = photonComp->GetConversionX(); | |
3706 | Double_t posCompY = photonComp->GetConversionY(); | |
3707 | Double_t posCompZ = photonComp->GetConversionZ(); | |
e5b6e8a6 | 3708 | |
92efd725 | 3709 | Double_t dist = pow((posX - posCompX),2)+pow((posY - posCompY),2)+pow((posZ - posCompZ),2); |
3710 | ||
3711 | if(dist < fminV0Dist*fminV0Dist){ | |
3712 | if(photon->GetChi2perNDF() < photonComp->GetChi2perNDF()) return kTRUE; | |
3713 | else { | |
3714 | return kFALSE;} | |
3715 | } | |
e5b6e8a6 | 3716 | |
92efd725 | 3717 | } |
3718 | return kTRUE; | |
3b77b2d1 | 3719 | } |
ca91a3e1 | 3720 | ///________________________________________________________________________ |
ae947965 | 3721 | void AliConversionCuts::GetNotRejectedParticles(Int_t rejection, TList *HeaderList, AliVEvent *MCEvent){ |
e5b6e8a6 | 3722 | |
5df11614 | 3723 | TString periodName = ((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask("V0ReaderV1"))->GetPeriodName(); |
3724 | ||
3725 | ||
3726 | if(fNotRejectedStart){ | |
3727 | delete[] fNotRejectedStart; | |
3728 | fNotRejectedStart = NULL; | |
3729 | } | |
3730 | if(fNotRejectedEnd){ | |
3731 | delete[] fNotRejectedEnd; | |
3732 | fNotRejectedEnd = NULL; | |
3733 | } | |
3734 | if(fGeneratorNames){ | |
3735 | delete[] fGeneratorNames; | |
3736 | fGeneratorNames = NULL; | |
3737 | } | |
3738 | ||
3739 | if(rejection == 0) return; // No Rejection | |
3740 | ||
3741 | AliGenCocktailEventHeader *cHeader = 0x0; | |
3742 | AliAODMCHeader *cHeaderAOD = 0x0; | |
3743 | Bool_t headerFound = kFALSE; | |
3744 | AliStack *fMCStack = 0x0; | |
3745 | TClonesArray *fMCStackAOD = 0x0; | |
3746 | if(MCEvent->IsA()==AliMCEvent::Class()){ | |
3747 | cHeader = dynamic_cast<AliGenCocktailEventHeader*>(dynamic_cast<AliMCEvent*>(MCEvent)->GenEventHeader()); | |
3748 | if(cHeader) headerFound = kTRUE; | |
3749 | fMCStack = dynamic_cast<AliStack*>(dynamic_cast<AliMCEvent*>(MCEvent)->Stack()); | |
3750 | } | |
3751 | if(MCEvent->IsA()==AliAODEvent::Class()){ // MCEvent is a AODEvent in case of AOD | |
3752 | cHeaderAOD = dynamic_cast<AliAODMCHeader*>(MCEvent->FindListObject(AliAODMCHeader::StdBranchName())); | |
3753 | fMCStackAOD = dynamic_cast<TClonesArray*>(MCEvent->FindListObject(AliAODMCParticle::StdBranchName())); | |
3754 | ||
3755 | ||
3756 | if(cHeaderAOD) headerFound = kTRUE; | |
3757 | } | |
3758 | ||
3759 | if(headerFound){ | |
3760 | TList *genHeaders = 0x0; | |
3761 | if(cHeader) genHeaders = cHeader->GetHeaders(); | |
3762 | if(cHeaderAOD){ | |
3763 | genHeaders = cHeaderAOD->GetCocktailHeaders(); | |
3764 | if(genHeaders->GetEntries()==1){ | |
3765 | SetRejectExtraSignalsCut(0); | |
3766 | return; | |
3767 | } | |
3768 | } | |
3769 | AliGenEventHeader* gh = 0; | |
3770 | fnHeaders = 0; | |
3771 | Int_t firstindexA = 0; | |
3772 | Int_t lastindexA = -1; | |
3773 | if(rejection == 1 || rejection == 3) fnHeaders = 1; // MinBiasHeader | |
3774 | if(rejection == 2){ // TList of Headers Names | |
3775 | for(Int_t i = 0; i<genHeaders->GetEntries();i++){ | |
3776 | gh = (AliGenEventHeader*)genHeaders->At(i); | |
3777 | TString GeneratorName = gh->GetName(); | |
3778 | lastindexA = lastindexA + gh->NProduced(); | |
e87efc38 | 3779 | // cout << i << "\t" << GeneratorName.Data() << endl; |
5df11614 | 3780 | for(Int_t j = 0; j<HeaderList->GetEntries();j++){ |
d7b6c10f | 3781 | TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString(); |
3782 | if(GeneratorName.CompareTo(GeneratorInList) == 0){ | |
3783 | if (GeneratorInList.CompareTo("PARAM") == 0 || GeneratorInList.CompareTo("BOX") == 0 ){ | |
3784 | if(fMCStack){ | |
3785 | if (fMCStack->Particle(firstindexA)->GetPdgCode() == fAddedSignalPDGCode ) { | |
3786 | if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){ | |
3787 | if (gh->NProduced() > 10 && fMCStack->Particle(firstindexA+10)->GetPdgCode() == fAddedSignalPDGCode ){ | |
3788 | // cout << "cond 1: "<< fnHeaders << endl; | |
3789 | fnHeaders++; | |
3790 | continue; | |
3791 | } | |
3792 | continue; | |
3793 | } else { | |
3794 | // cout << "cond 2: " << fnHeaders << endl; | |
5df11614 | 3795 | fnHeaders++; |
3796 | continue; | |
3797 | } | |
d7b6c10f | 3798 | } |
3799 | } | |
3800 | if ( fMCStackAOD){ | |
3801 | AliAODMCParticle *aodMCParticle = static_cast<AliAODMCParticle*>(fMCStackAOD->At(firstindexA)); | |
3802 | if ( aodMCParticle->GetPdgCode() == fAddedSignalPDGCode ){ | |
3803 | if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){ | |
3804 | if (gh->NProduced() > 10){ | |
3805 | AliAODMCParticle *aodMCParticle2 = static_cast<AliAODMCParticle*>(fMCStackAOD->At(firstindexA+10)); | |
3806 | if ( aodMCParticle2->GetPdgCode() == fAddedSignalPDGCode ){ | |
3807 | // cout << "cond 1: " << fnHeaders << endl; | |
3808 | fnHeaders++; | |
3809 | continue; | |
3810 | } | |
3811 | } | |
3812 | continue; | |
3813 | } else { | |
3814 | // cout << "cond 2: " << fnHeaders << endl; | |
5df11614 | 3815 | fnHeaders++; |
3816 | continue; | |
3817 | } | |
d7b6c10f | 3818 | } |
3819 | } | |
3820 | continue; | |
5df11614 | 3821 | } |
d7b6c10f | 3822 | // cout << "cond 3: "<< fnHeaders << endl; |
3823 | fnHeaders++; | |
3824 | continue; | |
5df11614 | 3825 | } |
5df11614 | 3826 | } |
3827 | firstindexA = firstindexA + gh->NProduced(); | |
3828 | } | |
3829 | } | |
d7b6c10f | 3830 | // cout << "number of headers: " <<fnHeaders << endl; |
3831 | ||
5df11614 | 3832 | fNotRejectedStart = new Int_t[fnHeaders]; |
3833 | fNotRejectedEnd = new Int_t[fnHeaders]; | |
3834 | fGeneratorNames = new TString[fnHeaders]; | |
3835 | ||
3836 | if(rejection == 1 || rejection == 3){ | |
3837 | fNotRejectedStart[0] = 0; | |
3838 | fNotRejectedEnd[0] = ((AliGenEventHeader*)genHeaders->At(0))->NProduced()-1; | |
3839 | fGeneratorNames[0] = ((AliGenEventHeader*)genHeaders->At(0))->GetName(); | |
3840 | return; | |
3841 | } | |
3842 | ||
3843 | Int_t firstindex = 0; | |
3844 | Int_t lastindex = -1; | |
3845 | Int_t number = 0; | |
d7b6c10f | 3846 | |
5df11614 | 3847 | for(Int_t i = 0; i<genHeaders->GetEntries();i++){ |
3848 | gh = (AliGenEventHeader*)genHeaders->At(i); | |
3849 | TString GeneratorName = gh->GetName(); | |
3850 | lastindex = lastindex + gh->NProduced(); | |
3851 | for(Int_t j = 0; j<HeaderList->GetEntries();j++){ | |
3852 | TString GeneratorInList = ((TObjString*)HeaderList->At(j))->GetString(); | |
d7b6c10f | 3853 | // cout << i << "\t" << GeneratorName.Data() << endl; |
5df11614 | 3854 | if(GeneratorName.CompareTo(GeneratorInList) == 0){ |
3855 | if (GeneratorInList.CompareTo("PARAM") == 0 || GeneratorInList.CompareTo("BOX") == 0 ){ | |
3856 | if(fMCStack){ | |
d7b6c10f | 3857 | if (fMCStack->Particle(firstindex)->GetPdgCode() == fAddedSignalPDGCode ) { |
7feeb8ec | 3858 | if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){ |
d7b6c10f | 3859 | // cout << "produced " << gh->NProduced() << " with box generator" << endl; |
3860 | if (gh->NProduced() > 10 && fMCStack->Particle(firstindex+10)->GetPdgCode() == fAddedSignalPDGCode){ | |
3861 | // cout << "one of them was a pi0 or eta" << endl; | |
5df11614 | 3862 | fNotRejectedStart[number] = firstindex; |
3863 | fNotRejectedEnd[number] = lastindex; | |
3864 | fGeneratorNames[number] = GeneratorName; | |
3865 | number++; | |
d7b6c10f | 3866 | // cout << "Number of particles produced for: " << i << "\t" << GeneratorName.Data() << "\t" << lastindex-firstindex+1 << endl; |
5df11614 | 3867 | continue; |
3868 | } | |
3869 | } else { | |
3870 | fNotRejectedStart[number] = firstindex; | |
3871 | fNotRejectedEnd[number] = lastindex; | |
3872 | fGeneratorNames[number] = GeneratorName; | |
3873 | number++; | |
3874 | continue; | |
3875 | } | |
3876 | } | |
3877 | } | |
3878 | if ( fMCStackAOD){ | |
3879 | AliAODMCParticle *aodMCParticle = static_cast<AliAODMCParticle*>(fMCStackAOD->At(firstindex)); | |
d7b6c10f | 3880 | if ( aodMCParticle->GetPdgCode() == fAddedSignalPDGCode ){ |
7feeb8ec | 3881 | if (periodName.CompareTo("LHC14a1b")==0 || periodName.CompareTo("LHC14a1c")==0 ){ |
d7b6c10f | 3882 | if (gh->NProduced() > 10) { |
3883 | AliAODMCParticle *aodMCParticle2 = static_cast<AliAODMCParticle*>(fMCStackAOD->At(firstindex+10)); | |
3884 | if ( aodMCParticle2->GetPdgCode() == fAddedSignalPDGCode ){ | |
3885 | fNotRejectedEnd[number] = lastindex; | |
3886 | fNotRejectedStart[number] = firstindex; | |
3887 | fGeneratorNames[number] = GeneratorName; | |
3888 | number++; | |
5df11614 | 3889 | } |
d7b6c10f | 3890 | continue; |
3891 | } | |
5df11614 | 3892 | } else { |
3893 | fNotRejectedStart[number] = firstindex; | |
3894 | fNotRejectedEnd[number] = lastindex; | |
3895 | fGeneratorNames[number] = GeneratorName; | |
3896 | number++; | |
3897 | continue; | |
3898 | } | |
3899 | } | |
3900 | } | |
d7b6c10f | 3901 | continue; |
5df11614 | 3902 | } else { |
3903 | fNotRejectedStart[number] = firstindex; | |
3904 | fNotRejectedEnd[number] = lastindex; | |
3905 | fGeneratorNames[number] = GeneratorName; | |
d7b6c10f | 3906 | // cout << "Number of particles produced for: " << i << "\t" << GeneratorName.Data() << "\t" << lastindex-firstindex+1 << endl; |
5df11614 | 3907 | number++; |
3908 | continue; | |
3909 | } | |
d7b6c10f | 3910 | |
5df11614 | 3911 | } |
3912 | } | |
3913 | firstindex = firstindex + gh->NProduced(); | |
3914 | } | |
d7b6c10f | 3915 | // for (Int_t i = 0; i < number; i++){ |
3916 | // cout << i << "\t" <<fGeneratorNames[i] << "\t" << fNotRejectedStart[i] << "\t" <<fNotRejectedEnd[i] << endl; | |
3917 | // } | |
3918 | ||
5df11614 | 3919 | } else { // No Cocktail Header Found |
3920 | fNotRejectedStart = new Int_t[1]; | |
3921 | fNotRejectedEnd = new Int_t[1]; | |
3922 | ||
3923 | fnHeaders = 1; | |
3924 | fNotRejectedStart[0] = 0; | |
3925 | fNotRejectedEnd[0] = static_cast<AliMCEvent*>(MCEvent)->Stack()->GetNprimary()-1; | |
3926 | fGeneratorNames = new TString[1]; | |
3927 | fGeneratorNames[0] = "NoCocktailGeneratorFound"; | |
3928 | ||
3929 | AliGenPythiaEventHeader *mcHeaderPythia = dynamic_cast<AliGenPythiaEventHeader*>(static_cast<AliMCEvent*>(MCEvent)->GenEventHeader()); | |
3930 | if (mcHeaderPythia) fGeneratorNames[0] = "NoCocktailGeneratorFound_Pythia"; | |
3931 | AliGenDPMjetEventHeader *mcHeaderPhojet = dynamic_cast<AliGenDPMjetEventHeader*>(static_cast<AliMCEvent*>(MCEvent)->GenEventHeader()); | |
3932 | if (mcHeaderPhojet) fGeneratorNames[0] = "NoCocktailGeneratorFound_Phojet"; | |
3933 | AliGenHijingEventHeader *mcHeaderHijing = dynamic_cast<AliGenHijingEventHeader*>(static_cast<AliMCEvent*>(MCEvent)->GenEventHeader()); | |
3934 | if (mcHeaderHijing) fGeneratorNames[0] = "NoCocktailGeneratorFound_Hijing"; | |
3935 | ||
3936 | SetRejectExtraSignalsCut(0); | |
3937 | } | |
d7b6c10f | 3938 | |
ca91a3e1 | 3939 | } |
209b710e | 3940 | |
ca91a3e1 | 3941 | //_________________________________________________________________________ |
ae947965 | 3942 | Int_t AliConversionCuts::IsParticleFromBGEvent(Int_t index, AliStack *MCStack, AliVEvent *InputEvent){ |
a280ac15 | 3943 | |
d7b6c10f | 3944 | // Not Accepted == kFALSE == 0 |
3945 | // Accepted == kTRUE == 1 | |
3946 | // FirstHeader == kTRUE == 3 | |
3947 | if(index < 0) return 0; // No Particle | |
3948 | ||
3949 | // if (index == 100){ | |
3950 | // cout << "possible headers" << endl; | |
3951 | // for(Int_t i = 0;i<fnHeaders;i++){ | |
3952 | // cout << i << "\t" <<fGeneratorNames[i] << "\t" << fNotRejectedStart[i] << "\t" <<fNotRejectedEnd[i] << endl; | |
3953 | // } | |
3954 | // } | |
3955 | Int_t accepted = 0; | |
3956 | if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){ | |
3957 | if( index >= MCStack->GetNprimary()){ // Secondary Particle | |
3958 | if( ((TParticle*)MCStack->Particle(index))->GetMother(0) < 0) return 1; // Secondary Particle without Mother?? | |
3959 | return IsParticleFromBGEvent(((TParticle*)MCStack->Particle(index))->GetMother(0),MCStack,InputEvent); | |
3960 | } | |
3961 | for(Int_t i = 0;i<fnHeaders;i++){ | |
3962 | if(index >= fNotRejectedStart[i] && index <= fNotRejectedEnd[i]){ | |
3963 | accepted = 1; | |
3964 | if(i == 0) accepted = 2; // MB Header | |
3965 | } | |
3966 | } | |
3967 | } | |
3968 | else if(InputEvent->IsA()==AliAODEvent::Class()){ | |
3969 | TClonesArray *AODMCTrackArray = dynamic_cast<TClonesArray*>(InputEvent->FindListObject(AliAODMCParticle::StdBranchName())); | |
3970 | AliAODMCParticle *aodMCParticle = static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index)); | |
3971 | if(!aodMCParticle) return 1; // Photon Without a Mother ? --> Accepted | |
3972 | if(!aodMCParticle->IsPrimary()){ | |
3973 | if( aodMCParticle->GetMother() < 0) return 1;// Secondary Particle without Mother?? | |
3974 | return IsParticleFromBGEvent(aodMCParticle->GetMother(),MCStack,InputEvent); | |
3975 | } | |
3976 | index = abs(static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index))->GetLabel()); | |
3977 | for(Int_t i = 0;i<fnHeaders;i++){ | |
3978 | if(index >= fNotRejectedStart[i] && index <= fNotRejectedEnd[i]){ | |
3979 | accepted = 1; | |
3980 | if(i == 0) accepted = 2; // MB Header | |
3981 | } | |
3982 | } | |
3983 | } | |
e5b6e8a6 | 3984 | |
d7b6c10f | 3985 | return accepted; |
ca91a3e1 | 3986 | } |
209b710e | 3987 | |
e5b6e8a6 | 3988 | //_________________________________________________________________________ |
75f195f2 | 3989 | Int_t AliConversionCuts::IsEventAcceptedByConversionCut(AliConversionCuts *ReaderCuts, AliVEvent *InputEvent, AliMCEvent *MCEvent, Int_t isHeavyIon){ |
e5b6e8a6 | 3990 | |
1186afd2 | 3991 | if ( !IsTriggerSelected(InputEvent) ) |
ae947965 | 3992 | return 3; |
aff90284 | 3993 | |
75f195f2 | 3994 | if(isHeavyIon != 0 && !(IsCentralitySelected(InputEvent,MCEvent))) |
e5b6e8a6 | 3995 | return 1; // Check Centrality --> Not Accepted => eventQuality = 1 |
e492d61d FB |
3996 | |
3997 | ||
75f195f2 | 3998 | if(isHeavyIon == 0 && GetIsFromPileup()){ |
e5b6e8a6 | 3999 | if(InputEvent->IsPileupFromSPD(3,0.8,3.,2.,5.)){ |
ccfa8c0d | 4000 | |
e5b6e8a6 | 4001 | return 6; // Check Pileup --> Not Accepted => eventQuality = 6 |
4002 | } | |
4003 | } | |
aff90284 | 4004 | |
e5b6e8a6 | 4005 | Bool_t hasV0And = ReaderCuts->HasV0AND(); |
4006 | Bool_t isSDDFired = ReaderCuts->IsSDDFired(); | |
4007 | if( (IsSpecialTrigger() == 2 || IsSpecialTrigger() == 3) && !isSDDFired && !MCEvent) | |
4008 | return 7; // With SDD requested but no fired | |
a280ac15 | 4009 | |
e5b6e8a6 | 4010 | if( (IsSpecialTrigger() == 1 || IsSpecialTrigger() == 3) && !hasV0And) |
4011 | return 8; // V0AND requested but no fired | |
aff90284 | 4012 | |
e492d61d FB |
4013 | if(hCentrality)hCentrality->Fill(GetCentrality(InputEvent)); |
4014 | if(hCentralityVsNumberOfPrimaryTracks) | |
4015 | hCentralityVsNumberOfPrimaryTracks->Fill(GetCentrality(InputEvent), | |
4016 | ((AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager() | |
4017 | ->GetTask("V0ReaderV1"))->GetNumberOfPrimaryTracks()); | |
e5b6e8a6 | 4018 | |
4019 | return 0; | |
4020 | } | |
209b710e | 4021 | |
ccfa8c0d | 4022 | //_________________________________________________________________________ |
ae947965 | 4023 | Float_t AliConversionCuts::GetWeightForMeson(TString period, Int_t index, AliStack *MCStack, AliVEvent *InputEvent){ |
5df11614 | 4024 | if (!(period.CompareTo("LHC12f1a") == 0 || period.CompareTo("LHC12f1b") == 0 || period.CompareTo("LHC12i3") == 0 || period.CompareTo("LHC11a10a") == 0 || period.CompareTo("LHC11a10b") == 0 || period.CompareTo("LHC11a10b_bis") == 0 || period.CompareTo("LHC11a10a_bis") == 0 || period.CompareTo("LHC11a10b_plus") == 0 || period.Contains("LHC13d2")|| period.Contains("LHC14a1") || |
d0a4ea74 | 4025 | period.CompareTo("LHC13e7") == 0 || period.Contains("LHC13b2_efix"))) return 1.; |
aff90284 | 4026 | |
a280ac15 | 4027 | Int_t kCaseGen = 0; |
4028 | for (Int_t i = 0; i < fnHeaders; i++){ | |
4029 | if (index >= fNotRejectedStart[i] && index < fNotRejectedEnd[i]+1){ | |
a280ac15 | 4030 | if (fGeneratorNames[i].CompareTo("Pythia") == 0){ |
4031 | kCaseGen = 1; | |
4032 | } else if (fGeneratorNames[i].CompareTo("DPMJET") == 0){ | |
4033 | kCaseGen = 2; | |
aff90284 | 4034 | } else if (fGeneratorNames[i].CompareTo("HIJING") == 0 || |
4035 | fGeneratorNames[i].CompareTo("Hijing") == 0 || | |
ae947965 | 4036 | fGeneratorNames[i].Contains("hijing")){ |
a280ac15 | 4037 | kCaseGen = 3; |
4038 | } else if (fGeneratorNames[i].CompareTo("BOX") == 0){ | |
fcc79cf5 | 4039 | kCaseGen = 4; |
a280ac15 | 4040 | } else if (fGeneratorNames[i].CompareTo("PARAM") == 0){ |
4041 | kCaseGen = 5; | |
4042 | } else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound") == 0){ | |
4043 | kCaseGen = 6; | |
4044 | } else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound_Pythia") == 0){ | |
4045 | kCaseGen = 1; | |
4046 | } else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound_Phojet") == 0){ | |
4047 | kCaseGen = 2; | |
4048 | } else if (fGeneratorNames[i].CompareTo("NoCocktailGeneratorFound_Hijing") == 0){ | |
4049 | kCaseGen = 3; | |
11c1e680 | 4050 | } |
5df11614 | 4051 | if (period.Contains("LHC13d2") || period.CompareTo("LHC13e7") == 0 || period.Contains("LHC13b2_efix") || period.Contains("LHC14a1") ){ |
aff90284 | 4052 | kCaseGen = 3; |
fcc79cf5 | 4053 | } |
a280ac15 | 4054 | } |
4055 | } | |
ae947965 | 4056 | if (kCaseGen == 0) return 1; |
aff90284 | 4057 | |
11c1e680 | 4058 | |
ae947965 | 4059 | Double_t mesonPt = 0; |
4060 | Double_t mesonMass = 0; | |
4061 | Int_t PDGCode = 0; | |
4062 | if(!InputEvent || InputEvent->IsA()==AliESDEvent::Class()){ | |
4063 | mesonPt = ((TParticle*)MCStack->Particle(index))->Pt(); | |
4064 | mesonMass = ((TParticle*)MCStack->Particle(index))->GetCalcMass(); | |
4065 | PDGCode = ((TParticle*)MCStack->Particle(index))->GetPdgCode(); | |
4066 | } | |
4067 | else if(InputEvent->IsA()==AliAODEvent::Class()){ | |
4068 | TClonesArray *AODMCTrackArray = dynamic_cast<TClonesArray*>(InputEvent->FindListObject(AliAODMCParticle::StdBranchName())); | |
4069 | AliAODMCParticle *aodMCParticle = static_cast<AliAODMCParticle*>(AODMCTrackArray->At(index)); | |
4070 | mesonPt = aodMCParticle->Pt(); | |
4071 | mesonMass = aodMCParticle->GetCalcMass(); | |
4072 | PDGCode = aodMCParticle->GetPdgCode(); | |
aff90284 | 4073 | } |
ae947965 | 4074 | |
4075 | Float_t functionResultMC = 1.; | |
4076 | if (kCaseGen == 1){ // Pythia 6 | |
a280ac15 | 4077 | Float_t dNdyMC = 2.1462; |
4078 | Float_t nMC = 7.06055; | |
4079 | Float_t tMC = 0.12533; | |
ae947965 | 4080 | if ( PDGCode == 111){ |
a280ac15 | 4081 | dNdyMC = 2.1462; |
4082 | nMC = 7.06055; | |
4083 | tMC = 0.12533; | |
ae947965 | 4084 | } else if ( PDGCode == 221){ |
a280ac15 | 4085 | dNdyMC = 0.2357; |
4086 | nMC = 5.9105; | |
4087 | tMC = 0.1525; | |
4088 | } | |
ae947965 | 4089 | functionResultMC = 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); |
4090 | } else if (kCaseGen == 2){ // Phojet | |
a280ac15 | 4091 | Float_t dNdyMC = 2.35978; |
4092 | Float_t nMC = 6.81795; | |
4093 | Float_t tMC = 0.11492; | |
ae947965 | 4094 | if ( PDGCode == 111){ |
a280ac15 | 4095 | dNdyMC = 2.35978; |
4096 | nMC = 6.81795; | |
4097 | tMC = 0.11492; | |
ae947965 | 4098 | } else if ( PDGCode == 221){ |
a280ac15 | 4099 | dNdyMC = 0.3690; |
4100 | nMC = 5.55809; | |
4101 | tMC = 0.13387; | |
4102 | } | |
ae947965 | 4103 | functionResultMC = 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); |
4104 | } else if (kCaseGen == 4){ // BOX generators pp | |
4105 | // functionResultMC = 1./sqrt(1.-mesonMass*mesonMass/((mesonMass*mesonMass+mesonPt*mesonPt)*cosh(mesonY)*cosh(mesonY))); | |
a280ac15 | 4106 | Float_t a = 0.23437; |
4107 | Float_t b = 5.6661; | |
4108 | Float_t c = -1430.5863; | |
4109 | Float_t d = -0.6966624; | |
4110 | Float_t e = 252.3742; | |
ae947965 | 4111 | if ( PDGCode == 111){ |
a280ac15 | 4112 | a = 0.23437; |
4113 | b = 5.6661; | |
4114 | c = -1430.5863; | |
4115 | d = -0.6966624; | |
4116 | e = 252.3742; | |
ae947965 | 4117 | } else if ( PDGCode == 221){ |
a280ac15 | 4118 | a = 0.10399; |
4119 | b = 4.35311; | |
4120 | c = -12.17723; | |
4121 | d = -0.01172; | |
4122 | e =1.85140; | |
4123 | } | |
ae947965 | 4124 | functionResultMC = a*TMath::Power(mesonPt,-1.*(b+c/(TMath::Power(mesonPt,d)+e)))*1./mesonPt *1./1.6 *1./(2.* TMath::Pi()); |
4803eb1f | 4125 | // cout << functionResultMC << endl; |
ae947965 | 4126 | } else if (kCaseGen == 3 ){ // HIJING |
4127 | if ( PDGCode == 111 && fDoReweightHistoMCPi0 && hReweightMCHistPi0!= 0x0){ | |
4128 | functionResultMC = hReweightMCHistPi0->Interpolate(mesonPt); | |
fcc79cf5 | 4129 | } |
4130 | if ( PDGCode == 221 && fDoReweightHistoMCEta && hReweightMCHistEta!= 0x0){ | |
4131 | functionResultMC = hReweightMCHistEta->Interpolate(mesonPt); | |
4132 | } | |
ae947965 | 4133 | if ( PDGCode == 310 && fDoReweightHistoMCK0s && hReweightMCHistK0s!= 0x0){ |
4134 | functionResultMC = hReweightMCHistK0s->Interpolate(mesonPt); | |
4135 | } | |
a280ac15 | 4136 | } |
11c1e680 | 4137 | |
ae947965 | 4138 | Float_t functionResultData = 1; |
4139 | if (kCaseGen == 1 || kCaseGen == 2 || kCaseGen == 4 ){ | |
4140 | Float_t dNdyData = 2.2328; | |
4141 | Float_t nData = 7.1473; | |
4142 | Float_t tData = 0.1346; | |
4143 | if ( PDGCode == 111){ | |
a280ac15 | 4144 | dNdyData = 2.2328; |
4145 | nData = 7.1473; | |
4146 | tData = 0.1346; | |
ae947965 | 4147 | } else if ( PDGCode == 221){ |
a280ac15 | 4148 | dNdyData = 0.38992; //be careful this fit is not optimal, eta in data still has problems |
4149 | nData = 5.72778; | |
4150 | tData = 0.13835; | |
4151 | } | |
ae947965 | 4152 | functionResultData = 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); |
4803eb1f | 4153 | // cout << functionResultData << endl; |
ae947965 | 4154 | } else { |
fcc79cf5 | 4155 | if ( PDGCode == 111 && fDoReweightHistoMCPi0 && fFitDataPi0!= 0x0){ |
4156 | functionResultData = fFitDataPi0->Eval(mesonPt); | |
4157 | } | |
4158 | if ( PDGCode == 221 && fDoReweightHistoMCEta && fFitDataEta!= 0x0){ | |
4159 | functionResultData = fFitDataEta->Eval(mesonPt); | |
4160 | } | |
4161 | if ( PDGCode == 310 && fDoReweightHistoMCK0s && fFitDataK0s!= 0x0){ | |
4162 | functionResultData = fFitDataK0s->Eval(mesonPt); | |
4163 | } | |
aff90284 | 4164 | |
ae947965 | 4165 | } |
aff90284 | 4166 | |
ae947965 | 4167 | Double_t weight = 1; |
4168 | if (PDGCode == 111 || PDGCode == 221){ | |
4169 | if (functionResultData != 0. && functionResultMC != 0. && isfinite(functionResultData) && isfinite(functionResultMC)){ | |
4170 | weight = functionResultData/functionResultMC; | |
4803eb1f | 4171 | if ( kCaseGen == 3){ |
d0a4ea74 FB |
4172 | if (PDGCode == 111){ |
4173 | if (!(fDoReweightHistoMCPi0 && hReweightMCHistPi0!= 0x0 && PDGCode == 111)){ | |
4174 | weight = 1.; | |
4175 | } | |
4176 | } | |
4177 | if (PDGCode == 221){ | |
4178 | if (!(fDoReweightHistoMCEta && hReweightMCHistEta!= 0x0 && PDGCode == 221)){ | |
4179 | weight = 1.; | |
4180 | } | |
4803eb1f | 4181 | } |
ae947965 | 4182 | } |
aff90284 | 4183 | if (!isfinite(functionResultData)) weight = 1.; |
4184 | if (!isfinite(weight)) weight = 1.; | |
ae947965 | 4185 | } |
4186 | } else if (PDGCode == 310 && functionResultMC != 0 && isfinite(functionResultMC)){ | |
4187 | weight = functionResultMC; | |
4188 | } | |
aff90284 | 4189 | |
ae947965 | 4190 | // if (fModCentralityClass == 0 && fCentralityMin == 4 && fCentralityMax == 6 && PDGCode == 111){ |
4803eb1f | 4191 | // cout << period.Data() << "\t" << kCaseGen << "\t" <<fModCentralityClass<< "\t" <<fCentralityMin<< "\t" <<fCentralityMax << "\t" << mesonPt << "\t" <<mesonMass<< "\t"<<functionResultData << "\t"<< functionResultMC << "\t" << weight <<endl; |
ae947965 | 4192 | // } |
4193 | return weight; | |
a280ac15 | 4194 | } |
a280ac15 | 4195 | ///________________________________________________________________________ |
4196 | AliConversionCuts* AliConversionCuts::GetStandardCuts2010PbPb(){ | |
4197 | //Create and return standard 2010 PbPb cuts | |
4198 | AliConversionCuts *cuts=new AliConversionCuts("StandardCuts2010PbPb","StandardCuts2010PbPb"); | |
430b9c94 | 4199 | if(!cuts->InitializeCutsFromCutString("100000204209297002322000000")){ |
fcc79cf5 | 4200 | cout<<"Warning: Initialization of Standardcuts2010PbPb failed"<<endl;} |
a280ac15 | 4201 | return cuts; |
4202 | } | |
4203 | ||
4204 | ///________________________________________________________________________ | |
4205 | AliConversionCuts* AliConversionCuts::GetStandardCuts2010pp(){ | |
4206 | //Create and return standard 2010 PbPb cuts | |
4207 | AliConversionCuts *cuts=new AliConversionCuts("StandardCuts2010pp","StandardCuts2010pp"); | |
430b9c94 | 4208 | if(!cuts->InitializeCutsFromCutString("000001100209366300380000000")){ |
fcc79cf5 | 4209 | cout<<"Warning: Initialization of Standardcuts2010pp failed"<<endl;} |
a280ac15 | 4210 | return cuts; |
4211 | } | |
ccfa8c0d | 4212 | ///________________________________________________________________________ |
4213 | void AliConversionCuts::GetCorrectEtaShiftFromPeriod(TString periodName){ | |
4214 | ||
4215 | if(periodName.CompareTo("LHC12g") == 0 || //pilot run 2012 | |
4216 | periodName.CompareTo("LHC13b") == 0 || //mainly minimum bias | |
4217 | periodName.CompareTo("LHC13c") == 0 || //mainly minimum bias | |
4218 | periodName.CompareTo("LHC13d") == 0 || //mainly triggered | |
4219 | periodName.CompareTo("LHC13e") == 0 || //mainly triggered | |
4220 | periodName.CompareTo("LHC13c3") == 0 || //MC Starlight, anchor LHC13d+e | |
4221 | periodName.CompareTo("LHC13c2") == 0 || //MC Starlight, coherent J/Psi, UPC muon anchor LHC13d+e | |
4222 | periodName.CompareTo("LHC13b4") == 0 || //MC Pythia 6 (Jet-Jet), anchor LHC13b | |
4223 | periodName.CompareTo("LHC13b2_fix_1") == 0 || //MC DPMJET, anchr LHC13b+c | |
1390f698 | 4224 | periodName.CompareTo("LHC13b2_efix_p1") == 0 || //MC DPMJET, anchr LHC13b+c |
4225 | periodName.CompareTo("LHC13b2_efix_p2") == 0 || //MC DPMJET, anchr LHC13b+c | |
4226 | periodName.CompareTo("LHC13b2_efix_p3") == 0 || //MC DPMJET, anchr LHC13b+c | |
4227 | periodName.CompareTo("LHC13b2_efix_p4") == 0 || //MC DPMJET, anchr LHC13b+c | |
f315320f | 4228 | periodName.CompareTo("LHC13e7") == 0 || //MC DPMJET, anchr LHC13b+c |
ccfa8c0d | 4229 | periodName.CompareTo("LHC13b3") == 0 || //MC HIJING, weighted to number of events per run, anchor LHC13b |
4230 | periodName.CompareTo("LHC13b2") == 0 || // MC DPMJET, wrong energy, anchor LHC13b | |
4231 | periodName.CompareTo("LHC13b2_plus") == 0 || // MC DPMJET, weighted to number event per run, anchor LHC13b | |
4232 | periodName.CompareTo("LHC13c1_bis") == 0 || // MC AMPT fast generation, pT hardbin, anchor ? | |
4233 | periodName.CompareTo("LHC13c1") == 0 || // MC AMPT fast generation, anchor ? | |
4234 | periodName.CompareTo("LHC13b1") == 0 || // MC DPMJET, fragments, with fixed label 0, anchor LHC12g | |
4235 | periodName.CompareTo("LHC12g4b_fix") == 0 || // MC DPMJET, with fixed label 0, anchor LHC12g | |
4236 | periodName.CompareTo("LHC12g1_fix") == 0 || // MC ?, with fixed label 0, anchor LHC12g | |
4237 | periodName.CompareTo("LHC12g4c") == 0 || // MC DPMJET, shifted vertex runs, anchor LHC12g | |
4238 | periodName.CompareTo("LHC12h6") == 0 || // MC muon cocktail, anchor LHC12g | |
4239 | periodName.CompareTo("LHC12g4b") == 0 || // MC DPMJET 3rd iteration, anchor LHC12g | |
4240 | periodName.CompareTo("LHC12g4a") == 0 || // MC DPMJET improved, anchor LHC12g | |
4241 | periodName.CompareTo("LHC12g4") == 0 || // MC DPMJET, anchor LHC12g | |
4242 | periodName.CompareTo("LHC12g5") == 0 || // MC PHOJET, anchor LHC12g | |
4243 | periodName.CompareTo("LHC12g2") == 0 || // MC Starlight background, anchor LHC12g | |
4244 | periodName.CompareTo("LHC12g1") == 0 ) // MC ?, anchor LHC12g | |
4245 | { | |
4246 | printf(" Gamma Conversion Cuts %s :: pPb Run doing Eta Shift of %f \n\n",(GetCutNumber()).Data(),-0.465); | |
4247 | SetEtaShift(-0.465); | |
4248 | } | |
4249 | else if(periodName.CompareTo("LHC13f") == 0 || | |
4250 | periodName.CompareTo("LHC13c6b") == 0 ||// MC Jpsi -> mumu, anchor LHC13f | |
4251 | periodName.CompareTo("LHC13c5") == 0 || //MC Starlight, gamma gamma UPC muon, anchor LHC13f | |
4252 | periodName.CompareTo("LHC13c4") == 0 )//MC Starlight, coherent JPsi, UPC muon, anchor LHC13f | |
4253 | { | |
4254 | printf(" Gamma Conversion Cuts %s :: Pbp Run doing Eta Shift of %f \n\n",(GetCutNumber()).Data(),0.465); | |
4255 | SetEtaShift(+0.465); | |
4256 | } | |
4257 | else printf(" Gamma Conversion Cuts %s :: Automatic Eta Shift requested but Period is not known -> No Shift \n\n",(GetCutNumber()).Data()); | |
4258 | } | |
ae4f2cfb | 4259 | |
4260 | ///________________________________________________________________________ | |
4261 | Bool_t AliConversionCuts::InPlaneOutOfPlaneCut(Double_t photonPhi, Double_t eventPlaneAngle, Bool_t fill){ | |
4262 | ||
4263 | //GetPhotonPhi() 0-2 Pi //eventPlaneAngle -1pi-1pi | |
4264 | eventPlaneAngle=eventPlaneAngle+TMath::Pi(); | |
4265 | Double_t gammaToEPAngle = eventPlaneAngle-photonPhi; | |
4266 | if(gammaToEPAngle < 0) gammaToEPAngle=gammaToEPAngle+2*TMath::Pi(); | |
4267 | gammaToEPAngle = gammaToEPAngle-TMath::Pi(); // angle from -pi +pi | |
4268 | ||
4269 | if(!fInPlaneOutOfPlane){ | |
4270 | if(fill&&hEventPlanePhi)hEventPlanePhi->Fill(gammaToEPAngle); | |
4271 | return kTRUE; | |
4272 | } | |
4273 | else if(fInPlaneOutOfPlane == 1){ | |
4274 | if(abs(gammaToEPAngle)<=0.25*TMath::Pi() || abs(gammaToEPAngle)>=0.75*TMath::Pi()){ | |
4275 | if(fill&&hEventPlanePhi)hEventPlanePhi->Fill(gammaToEPAngle); | |
4276 | return kTRUE; | |
4277 | } | |
4278 | else return kFALSE; | |
4279 | } | |
4280 | else if(fInPlaneOutOfPlane == 2){ | |
4281 | if(abs(gammaToEPAngle)>0.25*TMath::Pi() && abs(gammaToEPAngle)<0.75*TMath::Pi()){ | |
4282 | if(fill&&hEventPlanePhi)hEventPlanePhi->Fill(gammaToEPAngle); | |
4283 | return kTRUE; | |
4284 | } | |
4285 | else return kFALSE; | |
4286 | } | |
4287 | return kFALSE; | |
4288 | ||
4289 | } | |
4290 |