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