updated
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliAnalysisTaskElecHadronCorrel.cxx
CommitLineData
57189f04 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16
17////////////////////////////////////////////////////////////////////////
18// //
19// Task for Heavy Flavour Electron-Hadron DeltaPhi Correlation //
20// Non-Photonic Electron identified with Invariant mass //
21// analysis methos in function SelectPhotonicElectron //
22// DeltaPhi calculated in function ElectronHadCorrel //
23// //
24// Author: Deepa Thomas (Utrecht University) //
25// //
26////////////////////////////////////////////////////////////////////////
27
28#include "TChain.h"
29#include "TTree.h"
30#include "TH2F.h"
31#include "TMath.h"
32#include "TCanvas.h"
33#include "THnSparse.h"
34#include "TLorentzVector.h"
35#include "TString.h"
36#include "TFile.h"
37
38#include "AliAnalysisTask.h"
39#include "AliAnalysisManager.h"
40
41#include "AliESDEvent.h"
42#include "AliESDHandler.h"
43#include "AliAODEvent.h"
44#include "AliAODHandler.h"
45
46#include "AliAnalysisTaskElecHadronCorrel.h"
47#include "TGeoGlobalMagField.h"
48#include "AliLog.h"
49#include "AliAnalysisTaskSE.h"
50#include "TRefArray.h"
51#include "TVector.h"
987053ce 52
57189f04 53#include "AliESDInputHandler.h"
987053ce 54#include "AliAODInputHandler.h"
57189f04 55#include "AliESDpid.h"
987053ce 56#include "AliAODPid.h"
57189f04 57#include "AliESDtrackCuts.h"
58#include "AliPhysicsSelection.h"
987053ce 59#include "AliCentralitySelectionTask.h"
57189f04 60#include "AliESDCaloCluster.h"
61#include "AliAODCaloCluster.h"
520a29a8 62#include "AliESDCaloTrigger.h"
57189f04 63#include "AliEMCALRecoUtils.h"
64#include "AliEMCALGeometry.h"
65#include "AliGeomManager.h"
66#include "stdio.h"
67#include "TGeoManager.h"
68#include "iostream"
69#include "fstream"
3c56855b 70
3db57d71 71#include "AliEventPoolManager.h"
3c56855b 72
520a29a8 73#include "AliCentrality.h"
57189f04 74#include "AliMagF.h"
75
76#include "AliKFParticle.h"
77#include "AliKFVertex.h"
78
79#include "AliPID.h"
80#include "AliPIDResponse.h"
81#include "AliHFEcontainer.h"
82#include "AliHFEcuts.h"
83#include "AliHFEpid.h"
84#include "AliHFEpidBase.h"
85#include "AliHFEpidQAmanager.h"
86#include "AliHFEtools.h"
87#include "AliCFContainer.h"
88#include "AliCFManager.h"
987053ce 89#include "AliVEvent.h"
90#include "AliStack.h"
91#include "AliMCEvent.h"
92#include "TProfile.h"
93#include "AliESDVZERO.h"
94#include "AliAODVZERO.h"
95#include "TVector3.h"
96#include "TRandom2.h"
57189f04 97
a9123929 98 ClassImp(AliAnalysisTaskElecHadronCorrel)
3db57d71 99ClassImp(AliehDPhiBasicParticle)
a9123929 100 //________________________________________________________________________
520a29a8 101 AliAnalysisTaskElecHadronCorrel::AliAnalysisTaskElecHadronCorrel(const char *name)
57189f04 102 : AliAnalysisTaskSE(name)
987053ce 103 ,fVevent(0)
57189f04 104 ,fESD(0)
987053ce 105 ,fAOD(0)
57189f04 106 ,fGeom(0)
107 ,fOutputList(0)
520a29a8 108 ,fTrackCuts1(new AliESDtrackCuts)
109 ,fTrackCuts2(new AliESDtrackCuts)
57189f04 110 ,fCuts(0)
111 ,fIdentifiedAsOutInz(kFALSE)
112 ,fPassTheEventCut(kFALSE)
113 ,fRejectKinkMother(kFALSE)
114 ,fVz(0.0)
115 ,fCFM(0)
116 ,fPID(0)
117 ,fPIDqa(0)
57189f04 118 ,fInvmassCut(0.01)
3c56855b 119 ,fCentrality(0)
120 ,fCentralityMin(0)
121 ,fCentralityMax(0)
122 ,fkCentralityMethod(0)
a9123929 123 ,fTPCnsigEleMin(-2)
124 ,fTPCnsigEleMax(2)
125 ,fTPCnsigHadMin(-10)
126 ,fTPCnsigHadMax(-3.5)
127 ,fM02CutMin(0.03)
128 ,fM02CutMax(0.5)
129 ,fM20CutMin(0.03)
130 ,fM20CutMax(0.3)
131 ,fDispCutMin(0)
132 ,fDispCutMax(1)
133 ,fEovPMin(0.8)
134 ,fEovPMax(1.2)
135 ,fTriggerCentral(kTRUE)
6ec70f8c 136 ,fTriggerMB(kTRUE)
28ea601a 137 ,fTPCNClsHad(80)
138 ,fAssoEleITSref(kTRUE)
3db57d71 139 ,fPoolMgr(0x0)
a9123929 140 ,fNoEvents(0)
141 // ,fTrkpt(0)
142 ,fTrkEovPAft(0)
143 // ,fTrkEovPBefHad(0)
144 // ,fdEdxBef(0)
987053ce 145 ,fSemiIncElecDphi(0)
487ae960 146 ,fSemiIncElecDphi1(0)
147 ,fSemiIncElecDphi2(0)
148 ,fSemiIncElecDphi3(0)
149 ,fSemiIncElecDphi4(0)
57189f04 150 ,fPhotElecDphi(0)
487ae960 151 ,fPhotElecDphi1(0)
152 ,fPhotElecDphi2(0)
153 ,fPhotElecDphi3(0)
154 ,fPhotElecDphi4(0)
57189f04 155 ,fInclusiveElecDphi(0)
487ae960 156 ,fInclusiveElecDphi1(0)
157 ,fInclusiveElecDphi2(0)
158 ,fInclusiveElecDphi3(0)
159 ,fInclusiveElecDphi4(0)
33369c14 160 ,fInclusiveElecDphiEtaFS(0)
161 ,fInclusiveElecDphiEtaFS1(0)
162 ,fInclusiveElecDphiEtaFS2(0)
163 ,fInclusiveElecDphiEtaFS3(0)
164 ,fInclusiveElecDphiEtaFS4(0)
57189f04 165 ,fDphiULSMassLow(0)
487ae960 166 ,fDphiULSMassLow1(0)
167 ,fDphiULSMassLow2(0)
168 ,fDphiULSMassLow3(0)
169 ,fDphiULSMassLow4(0)
57189f04 170 ,fDphiLSMassLow(0)
487ae960 171 ,fDphiLSMassLow1(0)
172 ,fDphiLSMassLow2(0)
173 ,fDphiLSMassLow3(0)
174 ,fDphiLSMassLow4(0)
520a29a8 175 ,fDphiULSMassLowNoPartner(0)
487ae960 176 ,fDphiULSMassLowNoPartner1(0)
177 ,fDphiULSMassLowNoPartner2(0)
178 ,fDphiULSMassLowNoPartner3(0)
179 ,fDphiULSMassLowNoPartner4(0)
520a29a8 180 ,fDphiLSMassLowNoPartner(0)
487ae960 181 ,fDphiLSMassLowNoPartner1(0)
182 ,fDphiLSMassLowNoPartner2(0)
183 ,fDphiLSMassLowNoPartner3(0)
184 ,fDphiLSMassLowNoPartner4(0)
57189f04 185 ,fPhotoElecPt(0)
186 ,fSemiInclElecPt(0)
520a29a8 187 ,fInclusiveElecPt(0)
188 ,fULSElecPt(0)
189 ,fLSElecPt(0)
bf697dda 190 ,fSemiIncElecDphiEta1(0)
191 ,fSemiIncElecDphiEta11(0)
192 ,fSemiIncElecDphiEta12(0)
193 ,fSemiIncElecDphiEta13(0)
194 ,fSemiIncElecDphiEta14(0)
195 ,fPhotElecDphiEta1(0)
196 ,fPhotElecDphiEta11(0)
197 ,fPhotElecDphiEta12(0)
198 ,fPhotElecDphiEta13(0)
199 ,fPhotElecDphiEta14(0)
200 ,fInclusiveElecDphiEta1(0)
201 ,fInclusiveElecDphiEta11(0)
202 ,fInclusiveElecDphiEta12(0)
203 ,fInclusiveElecDphiEta13(0)
204 ,fInclusiveElecDphiEta14(0)
205 ,fDphiULSMassLowEta1(0)
206 ,fDphiULSMassLowEta11(0)
207 ,fDphiULSMassLowEta12(0)
208 ,fDphiULSMassLowEta13(0)
209 ,fDphiULSMassLowEta14(0)
210 ,fDphiLSMassLowEta1(0)
211 ,fDphiLSMassLowEta11(0)
212 ,fDphiLSMassLowEta12(0)
213 ,fDphiLSMassLowEta13(0)
214 ,fDphiLSMassLowEta14(0)
215 ,fDphiULSMassLowNoPartnerEta1(0)
216 ,fDphiULSMassLowNoPartnerEta11(0)
217 ,fDphiULSMassLowNoPartnerEta12(0)
218 ,fDphiULSMassLowNoPartnerEta13(0)
219 ,fDphiULSMassLowNoPartnerEta14(0)
220 ,fDphiLSMassLowNoPartnerEta1(0)
221 ,fDphiLSMassLowNoPartnerEta11(0)
222 ,fDphiLSMassLowNoPartnerEta12(0)
223 ,fDphiLSMassLowNoPartnerEta13(0)
224 ,fDphiLSMassLowNoPartnerEta14(0)
225 ,fSemiIncElecDphiEta2(0)
226 ,fSemiIncElecDphiEta21(0)
227 ,fSemiIncElecDphiEta22(0)
228 ,fSemiIncElecDphiEta23(0)
229 ,fSemiIncElecDphiEta24(0)
230 ,fPhotElecDphiEta2(0)
231 ,fPhotElecDphiEta21(0)
232 ,fPhotElecDphiEta22(0)
233 ,fPhotElecDphiEta23(0)
234 ,fPhotElecDphiEta24(0)
235 ,fInclusiveElecDphiEta2(0)
236 ,fInclusiveElecDphiEta21(0)
237 ,fInclusiveElecDphiEta22(0)
238 ,fInclusiveElecDphiEta23(0)
239 ,fInclusiveElecDphiEta24(0)
240 ,fDphiULSMassLowEta2(0)
241 ,fDphiULSMassLowEta21(0)
242 ,fDphiULSMassLowEta22(0)
243 ,fDphiULSMassLowEta23(0)
244 ,fDphiULSMassLowEta24(0)
245 ,fDphiLSMassLowEta2(0)
246 ,fDphiLSMassLowEta21(0)
247 ,fDphiLSMassLowEta22(0)
248 ,fDphiLSMassLowEta23(0)
249 ,fDphiLSMassLowEta24(0)
250 ,fDphiULSMassLowNoPartnerEta2(0)
251 ,fDphiULSMassLowNoPartnerEta21(0)
252 ,fDphiULSMassLowNoPartnerEta22(0)
253 ,fDphiULSMassLowNoPartnerEta23(0)
254 ,fDphiULSMassLowNoPartnerEta24(0)
255 ,fDphiLSMassLowNoPartnerEta2(0)
256 ,fDphiLSMassLowNoPartnerEta21(0)
257 ,fDphiLSMassLowNoPartnerEta22(0)
258 ,fDphiLSMassLowNoPartnerEta23(0)
259 ,fDphiLSMassLowNoPartnerEta24(0)
260 // ,fTrackPtBefTrkCuts(0)
261 // ,fTrackPtAftTrkCuts(0)
7e02de85 262 ,fTPCnsigma(0)
bf697dda 263 // ,fNCellv1(0)
264 // ,fClsEv1(0)
265 // ,fNClusv1(0)
266 ,fInvmassLS1(0)
267 // ,fInvmassLS2(0)
268 // ,fInvmassLS3(0)
269 // ,fInvmassLS4(0)
270 // ,fInvmassLS5(0)
271 ,fInvmassULS1(0)
272 // ,fInvmassULS2(0)
273 // ,fInvmassULS3(0)
274 // ,fInvmassULS4(0)
275 // ,fInvmassULS5(0)
520a29a8 276 ,fcentrality(0)
277 ,fElecPhi(0)
3c56855b 278 ,fElecPhiTPChalf(0)
bf697dda 279 ,fElecPhiPt(0)
280 // ,fElecPhiTPC(0)
281 // ,fElecPhiTPCEovP(0)
520a29a8 282 ,fHadronPhi(0)
3c56855b 283 ,fHadronPhiTPChalf(0)
bf697dda 284 ,fHadronPhiPt(0)
285 /* ,fTrackHFEcuts(0)
286 ,fTrakPhiSPD1(0)
287 ,fTrakPhiSPD2(0)
288 ,fTrakPhiSPDOr(0)
289 ,fTrakPhiSPDAnd(0)
290 ,fTrackHFEcutsITS(0)
291 */
3db57d71 292 ,fNoMixedEvents(0)
a9123929 293 ,fMixStat(0)
294 ,fMixStat1(0)
295 ,fMixedIncElecDphi(0)
296 ,fMixedIncElecDphi1(0)
297 ,fMixedIncElecDphi2(0)
298 ,fMixedIncElecDphi3(0)
299 ,fMixedIncElecDphi4(0)
300 ,fMixedPhotElecDphi(0)
301 ,fMixedPhotElecDphi1(0)
302 ,fMixedPhotElecDphi2(0)
303 ,fMixedPhotElecDphi3(0)
304 ,fMixedPhotElecDphi4(0)
305 ,fMixedSemiIncElecDphi(0)
306 ,fMixedSemiIncElecDphi1(0)
307 ,fMixedSemiIncElecDphi2(0)
308 ,fMixedSemiIncElecDphi3(0)
309 ,fMixedSemiIncElecDphi4(0)
310 ,fMixedDphiULSMassLow(0)
311 ,fMixedDphiULSMassLow1(0)
312 ,fMixedDphiULSMassLow2(0)
313 ,fMixedDphiULSMassLow3(0)
314 ,fMixedDphiULSMassLow4(0)
315 ,fMixedDphiLSMassLow(0)
316 ,fMixedDphiLSMassLow1(0)
317 ,fMixedDphiLSMassLow2(0)
318 ,fMixedDphiLSMassLow3(0)
319 ,fMixedDphiLSMassLow4(0)
3c56855b 320 ,fHadronPt(0)
321 ,fCentralityPass(0)
322 ,fCentralityNoPass(0)
0841d73f 323 ,fHadronDphi(0)
324 ,fHadronDphi1(0)
325 ,fHadronDphi2(0)
326 ,fHadronDphi3(0)
327 ,fHadronDphi4(0)
328 ,fPiPt(0)
33369c14 329 ,fHadronDphiNoSS(0)
330 ,fHadronDphiNoSS1(0)
331 ,fHadronDphiNoSS2(0)
332 ,fHadronDphiNoSS3(0)
333 ,fHadronDphiNoSS4(0)
334 ,fPiPtNoSS(0)
bf697dda 335 ,fEovPWoSS(0)
336 ,fEovPWSS(0)
337 ,fEovPHadWoSS(0)
338 ,fEovPHadWSS(0)
0c884279 339 ,fHadronDphiEta1(0)
340 ,fHadronDphiEta11(0)
341 ,fHadronDphiEta12(0)
342 ,fHadronDphiEta13(0)
343 ,fHadronDphiEta14(0)
344 ,fHadronDphiNoSSEta1(0)
345 ,fHadronDphiNoSSEta11(0)
346 ,fHadronDphiNoSSEta12(0)
347 ,fHadronDphiNoSSEta13(0)
348 ,fHadronDphiNoSSEta14(0)
349 ,fHadronDphiEta2(0)
350 ,fHadronDphiEta21(0)
351 ,fHadronDphiEta22(0)
352 ,fHadronDphiEta23(0)
353 ,fHadronDphiEta24(0)
354 ,fHadronDphiNoSSEta2(0)
355 ,fHadronDphiNoSSEta21(0)
356 ,fHadronDphiNoSSEta22(0)
357 ,fHadronDphiNoSSEta23(0)
a9123929 358,fHadronDphiNoSSEta24(0)
359 //,fSparseElectron(0)
360 // ,fvalueElectron(0)
57189f04 361{
362 //Named constructor
520a29a8 363
57189f04 364 fPID = new AliHFEpid("hfePid");
bf697dda 365 //fvalueElectron = new Double_t[6];
57189f04 366
367 // Define input and output slots here
368 // Input slot #0 works with a TChain
369 DefineInput(0, TChain::Class());
370 // Output slot #0 id reserved by the base class for AOD
371 // Output slot #1 writes into a TH1 container
372 // DefineOutput(1, TH1I::Class());
373 DefineOutput(1, TList::Class());
374 // DefineOutput(3, TTree::Class());
375}
376
377//________________________________________________________________________
378AliAnalysisTaskElecHadronCorrel::AliAnalysisTaskElecHadronCorrel()
379 : AliAnalysisTaskSE("DefaultAnalysis_AliAnalysisElecHadCorrel")
987053ce 380 ,fVevent(0)
57189f04 381 ,fESD(0)
987053ce 382 ,fAOD(0)
57189f04 383 ,fGeom(0)
384 ,fOutputList(0)
520a29a8 385 ,fTrackCuts1(new AliESDtrackCuts)
386 ,fTrackCuts2(new AliESDtrackCuts)
57189f04 387 ,fCuts(0)
388 ,fIdentifiedAsOutInz(kFALSE)
389 ,fPassTheEventCut(kFALSE)
390 ,fRejectKinkMother(kFALSE)
4e01b68c 391 ,fVz(0.0)
392 ,fCFM(0)
393 ,fPID(0)
394 ,fPIDqa(0)
57189f04 395 ,fInvmassCut(0.01)
3c56855b 396 ,fCentrality(0)
397 ,fCentralityMin(0)
398 ,fCentralityMax(0)
a9123929 399 ,fkCentralityMethod(0)
400 ,fTPCnsigEleMin(-2)
401 ,fTPCnsigEleMax(2)
402 ,fTPCnsigHadMin(-10)
403 ,fTPCnsigHadMax(-3.5)
404 ,fM02CutMin(0.03)
405 ,fM02CutMax(0.5)
406 ,fM20CutMin(0.03)
407 ,fM20CutMax(0.3)
408 ,fDispCutMin(0)
409 ,fDispCutMax(1)
410 ,fEovPMin(0.8)
411 ,fEovPMax(1.2)
412 ,fTriggerCentral(kTRUE)
6ec70f8c 413 ,fTriggerMB(kTRUE)
28ea601a 414 ,fTPCNClsHad(80)
415 ,fAssoEleITSref(kTRUE)
3db57d71 416 ,fPoolMgr(0x0)
bf697dda 417 ,fNoEvents(0)
418 // ,fTrkpt(0)
419 ,fTrkEovPAft(0)
420 // ,fTrkEovPBefHad(0)
421 // ,fdEdxBef(0)
987053ce 422 ,fSemiIncElecDphi(0)
487ae960 423 ,fSemiIncElecDphi1(0)
424 ,fSemiIncElecDphi2(0)
425 ,fSemiIncElecDphi3(0)
426 ,fSemiIncElecDphi4(0)
57189f04 427 ,fPhotElecDphi(0)
487ae960 428 ,fPhotElecDphi1(0)
429 ,fPhotElecDphi2(0)
430 ,fPhotElecDphi3(0)
431 ,fPhotElecDphi4(0)
57189f04 432 ,fInclusiveElecDphi(0)
487ae960 433 ,fInclusiveElecDphi1(0)
434 ,fInclusiveElecDphi2(0)
435 ,fInclusiveElecDphi3(0)
436 ,fInclusiveElecDphi4(0)
33369c14 437 ,fInclusiveElecDphiEtaFS(0)
438 ,fInclusiveElecDphiEtaFS1(0)
439 ,fInclusiveElecDphiEtaFS2(0)
440 ,fInclusiveElecDphiEtaFS3(0)
441 ,fInclusiveElecDphiEtaFS4(0)
57189f04 442 ,fDphiULSMassLow(0)
487ae960 443 ,fDphiULSMassLow1(0)
444 ,fDphiULSMassLow2(0)
445 ,fDphiULSMassLow3(0)
446 ,fDphiULSMassLow4(0)
57189f04 447 ,fDphiLSMassLow(0)
487ae960 448 ,fDphiLSMassLow1(0)
449 ,fDphiLSMassLow2(0)
450 ,fDphiLSMassLow3(0)
451 ,fDphiLSMassLow4(0)
520a29a8 452 ,fDphiULSMassLowNoPartner(0)
487ae960 453 ,fDphiULSMassLowNoPartner1(0)
454 ,fDphiULSMassLowNoPartner2(0)
455 ,fDphiULSMassLowNoPartner3(0)
456 ,fDphiULSMassLowNoPartner4(0)
520a29a8 457 ,fDphiLSMassLowNoPartner(0)
487ae960 458 ,fDphiLSMassLowNoPartner1(0)
459 ,fDphiLSMassLowNoPartner2(0)
460 ,fDphiLSMassLowNoPartner3(0)
461 ,fDphiLSMassLowNoPartner4(0)
57189f04 462 ,fPhotoElecPt(0)
463 ,fSemiInclElecPt(0)
520a29a8 464 ,fInclusiveElecPt(0)
465 ,fULSElecPt(0)
466 ,fLSElecPt(0)
bf697dda 467 ,fSemiIncElecDphiEta1(0)
468 ,fSemiIncElecDphiEta11(0)
469 ,fSemiIncElecDphiEta12(0)
470 ,fSemiIncElecDphiEta13(0)
471 ,fSemiIncElecDphiEta14(0)
472 ,fPhotElecDphiEta1(0)
473 ,fPhotElecDphiEta11(0)
474 ,fPhotElecDphiEta12(0)
475 ,fPhotElecDphiEta13(0)
476 ,fPhotElecDphiEta14(0)
477 ,fInclusiveElecDphiEta1(0)
478 ,fInclusiveElecDphiEta11(0)
479 ,fInclusiveElecDphiEta12(0)
480 ,fInclusiveElecDphiEta13(0)
481 ,fInclusiveElecDphiEta14(0)
482 ,fDphiULSMassLowEta1(0)
483 ,fDphiULSMassLowEta11(0)
484 ,fDphiULSMassLowEta12(0)
485 ,fDphiULSMassLowEta13(0)
486 ,fDphiULSMassLowEta14(0)
487 ,fDphiLSMassLowEta1(0)
488 ,fDphiLSMassLowEta11(0)
489 ,fDphiLSMassLowEta12(0)
490 ,fDphiLSMassLowEta13(0)
491 ,fDphiLSMassLowEta14(0)
492 ,fDphiULSMassLowNoPartnerEta1(0)
493 ,fDphiULSMassLowNoPartnerEta11(0)
494 ,fDphiULSMassLowNoPartnerEta12(0)
495 ,fDphiULSMassLowNoPartnerEta13(0)
496 ,fDphiULSMassLowNoPartnerEta14(0)
497 ,fDphiLSMassLowNoPartnerEta1(0)
498 ,fDphiLSMassLowNoPartnerEta11(0)
499 ,fDphiLSMassLowNoPartnerEta12(0)
500 ,fDphiLSMassLowNoPartnerEta13(0)
501 ,fDphiLSMassLowNoPartnerEta14(0)
502 ,fSemiIncElecDphiEta2(0)
503 ,fSemiIncElecDphiEta21(0)
504 ,fSemiIncElecDphiEta22(0)
505 ,fSemiIncElecDphiEta23(0)
506 ,fSemiIncElecDphiEta24(0)
507 ,fPhotElecDphiEta2(0)
508 ,fPhotElecDphiEta21(0)
509 ,fPhotElecDphiEta22(0)
510 ,fPhotElecDphiEta23(0)
511 ,fPhotElecDphiEta24(0)
512 ,fInclusiveElecDphiEta2(0)
513 ,fInclusiveElecDphiEta21(0)
514 ,fInclusiveElecDphiEta22(0)
515 ,fInclusiveElecDphiEta23(0)
516 ,fInclusiveElecDphiEta24(0)
517 ,fDphiULSMassLowEta2(0)
518 ,fDphiULSMassLowEta21(0)
519 ,fDphiULSMassLowEta22(0)
520 ,fDphiULSMassLowEta23(0)
521 ,fDphiULSMassLowEta24(0)
522 ,fDphiLSMassLowEta2(0)
523 ,fDphiLSMassLowEta21(0)
524 ,fDphiLSMassLowEta22(0)
525 ,fDphiLSMassLowEta23(0)
526 ,fDphiLSMassLowEta24(0)
527 ,fDphiULSMassLowNoPartnerEta2(0)
528 ,fDphiULSMassLowNoPartnerEta21(0)
529 ,fDphiULSMassLowNoPartnerEta22(0)
530 ,fDphiULSMassLowNoPartnerEta23(0)
531 ,fDphiULSMassLowNoPartnerEta24(0)
532 ,fDphiLSMassLowNoPartnerEta2(0)
533 ,fDphiLSMassLowNoPartnerEta21(0)
534 ,fDphiLSMassLowNoPartnerEta22(0)
535 ,fDphiLSMassLowNoPartnerEta23(0)
536 ,fDphiLSMassLowNoPartnerEta24(0)
537 // ,fTrackPtBefTrkCuts(0)
538 // ,fTrackPtAftTrkCuts(0)
7e02de85 539 ,fTPCnsigma(0)
bf697dda 540 // ,fNCellv1(0)
541 // ,fClsEv1(0)
542 // ,fNClusv1(0)
543 ,fInvmassLS1(0)
544 // ,fInvmassLS2(0)
545 // ,fInvmassLS3(0)
546 // ,fInvmassLS4(0)
547 // ,fInvmassLS5(0)
548 ,fInvmassULS1(0)
549 // ,fInvmassULS2(0)
550 // ,fInvmassULS3(0)
551 // ,fInvmassULS4(0)
552 // ,fInvmassULS5(0)
520a29a8 553 ,fcentrality(0)
554 ,fElecPhi(0)
3c56855b 555 ,fElecPhiTPChalf(0)
bf697dda 556 ,fElecPhiPt(0)
557 // ,fElecPhiTPC(0)
558 // ,fElecPhiTPCEovP(0)
520a29a8 559 ,fHadronPhi(0)
3c56855b 560 ,fHadronPhiTPChalf(0)
bf697dda 561 ,fHadronPhiPt(0)
562 /* ,fTrackHFEcuts(0)
563 ,fTrakPhiSPD1(0)
564 ,fTrakPhiSPD2(0)
565 ,fTrakPhiSPDOr(0)
566 ,fTrakPhiSPDAnd(0)
567 ,fTrackHFEcutsITS(0)
568 */
3db57d71 569 ,fNoMixedEvents(0)
a9123929 570 ,fMixStat(0)
571 ,fMixStat1(0)
572 ,fMixedIncElecDphi(0)
573 ,fMixedIncElecDphi1(0)
574 ,fMixedIncElecDphi2(0)
575 ,fMixedIncElecDphi3(0)
576 ,fMixedIncElecDphi4(0)
577 ,fMixedPhotElecDphi(0)
578 ,fMixedPhotElecDphi1(0)
579 ,fMixedPhotElecDphi2(0)
580 ,fMixedPhotElecDphi3(0)
581 ,fMixedPhotElecDphi4(0)
582 ,fMixedSemiIncElecDphi(0)
583 ,fMixedSemiIncElecDphi1(0)
584 ,fMixedSemiIncElecDphi2(0)
585 ,fMixedSemiIncElecDphi3(0)
586 ,fMixedSemiIncElecDphi4(0)
587 ,fMixedDphiULSMassLow(0)
588 ,fMixedDphiULSMassLow1(0)
589 ,fMixedDphiULSMassLow2(0)
590 ,fMixedDphiULSMassLow3(0)
591 ,fMixedDphiULSMassLow4(0)
592 ,fMixedDphiLSMassLow(0)
593 ,fMixedDphiLSMassLow1(0)
594 ,fMixedDphiLSMassLow2(0)
595 ,fMixedDphiLSMassLow3(0)
596 ,fMixedDphiLSMassLow4(0)
3c56855b 597 ,fHadronPt(0)
598 ,fCentralityPass(0)
599 ,fCentralityNoPass(0)
0841d73f 600 ,fHadronDphi(0)
601 ,fHadronDphi1(0)
602 ,fHadronDphi2(0)
603 ,fHadronDphi3(0)
604 ,fHadronDphi4(0)
33369c14 605 ,fPiPt(0)
606 ,fHadronDphiNoSS(0)
607 ,fHadronDphiNoSS1(0)
608 ,fHadronDphiNoSS2(0)
609 ,fHadronDphiNoSS3(0)
610 ,fHadronDphiNoSS4(0)
611 ,fPiPtNoSS(0)
bf697dda 612 ,fEovPWoSS(0)
613 ,fEovPWSS(0)
614 ,fEovPHadWoSS(0)
0c884279 615 ,fEovPHadWSS(0)
616 ,fHadronDphiEta1(0)
617 ,fHadronDphiEta11(0)
618 ,fHadronDphiEta12(0)
619 ,fHadronDphiEta13(0)
620 ,fHadronDphiEta14(0)
621 ,fHadronDphiNoSSEta1(0)
622 ,fHadronDphiNoSSEta11(0)
623 ,fHadronDphiNoSSEta12(0)
624 ,fHadronDphiNoSSEta13(0)
625 ,fHadronDphiNoSSEta14(0)
626 ,fHadronDphiEta2(0)
627 ,fHadronDphiEta21(0)
628 ,fHadronDphiEta22(0)
629 ,fHadronDphiEta23(0)
630 ,fHadronDphiEta24(0)
631 ,fHadronDphiNoSSEta2(0)
632 ,fHadronDphiNoSSEta21(0)
633 ,fHadronDphiNoSSEta22(0)
634 ,fHadronDphiNoSSEta23(0)
a9123929 635,fHadronDphiNoSSEta24(0)
636 //,fSparseElectron(0)
637 // ,fvalueElectron(0)
57189f04 638{
520a29a8 639 //Default constructor
640 fPID = new AliHFEpid("hfePid");
bf697dda 641 //fvalueElectron = new Double_t[6];
57189f04 642
520a29a8 643 // Constructor
4e01b68c 644 // Define input and output slots here
645 // Input slot #0 works with a TChain
646 DefineInput(0, TChain::Class());
647 // Output slot #0 id reserved by the base class for AOD
648 // Output slot #1 writes into a TH1 container
649 // DefineOutput(1, TH1I::Class());
650 DefineOutput(1, TList::Class());
651 //DefineOutput(3, TTree::Class());
57189f04 652}
653//_________________________________________
654
655AliAnalysisTaskElecHadronCorrel::~AliAnalysisTaskElecHadronCorrel()
656{
4e01b68c 657 //Destructor
658
659 delete fOutputList;
660 delete fGeom;
661 delete fPID;
662 delete fCFM;
663 delete fPIDqa;
664 delete fTrackCuts1;
665 delete fTrackCuts2;
bf697dda 666 // delete fSparseElectron;
667 // delete []fvalueElectron;
57189f04 668}
669//_________________________________________
670
671void AliAnalysisTaskElecHadronCorrel::UserExec(Option_t*)
672{
4e01b68c 673 //Main loop
674 //Called for each event
675
676 // create pointer to event
987053ce 677 fAOD = dynamic_cast<AliAODEvent*>(InputEvent());
4e01b68c 678 fESD = dynamic_cast<AliESDEvent*>(InputEvent());
bf697dda 679
987053ce 680 if(!(fESD || fAOD)){
681 printf("ERROR: fESD & fAOD not available\n");
682 return;
683 }
684 fVevent = dynamic_cast<AliVEvent*>(InputEvent());
685 if (!fVevent) {
686 printf("ERROR: fVEvent not available\n");
4e01b68c 687 return;
688 }
520a29a8 689
4e01b68c 690 if(!fCuts){
691 AliError("HFE cuts not available");
692 return;
693 }
694
695 if(!fPID->IsInitialized()){
696 // Initialize PID with the given run number
697 AliWarning("PID not initialised, get from Run no");
a9123929 698
987053ce 699 if(IsAODanalysis())fPID->InitializePID(fAOD->GetRunNumber());
700 else fPID->InitializePID(fESD->GetRunNumber());
4e01b68c 701 }
702
520a29a8 703
6ec70f8c 704 if(fTriggerMB && fTriggerCentral){
a9123929 705 // trigger selection
706 if(!(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & (AliVEvent::kCentral))) return;
707 }
708
6ec70f8c 709 if(fTriggerMB && !fTriggerCentral){
a9123929 710 // trigger selection
711 if(!(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & (AliVEvent::kSemiCentral))) return;
712 }
6ec70f8c 713
714 if(!fTriggerMB){
715// trigger selection
716 if(!(((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & (AliVEvent::kEMCEGA))) return;
717 }
987053ce 718 // centrality selection
b8c2fb6d 719 // SetCentralityParameters(0., 7., fkCentralityMethod);
987053ce 720 Bool_t pass = kFALSE;
721 CheckCentrality(fVevent,pass);
e4b0faf2 722 if(!pass)return;
723
987053ce 724 Int_t fNOtrks = fVevent->GetNumberOfTracks();
725 const AliVVertex *pVtx = fVevent->GetPrimaryVertex();
520a29a8 726
4e01b68c 727 Double_t pVtxZ = -999;
728 pVtxZ = pVtx->GetZ();
520a29a8 729
4e01b68c 730 if(TMath::Abs(pVtxZ)>10) return;
731 fNoEvents->Fill(0);
732
733 if(fNOtrks<2) return;
734
735 AliPIDResponse *pidResponse = fInputHandler->GetPIDResponse();
736 if(!pidResponse){
737 AliDebug(1, "Using default PID Response");
a9123929 738 pidResponse = AliHFEtools::GetDefaultPID(kFALSE, fInputEvent->IsA() == AliAODEvent::Class());
739 }
740
741 fPID->SetPIDResponse(pidResponse);
742
743 fCFM->SetRecEventInfo(fVevent);
744
745 AliCentrality *fCentrality2 = (AliCentrality*)fAOD->GetCentrality();
b8c2fb6d 746 Double_t centvalue1 = fCentrality2->GetCentralityPercentile(fkCentralityMethod);
3db57d71 747
a9123929 748 //Event mixing
7e02de85 749 AliEventPool* pool;
750 pool = fPoolMgr->GetEventPool(centvalue1, pVtxZ); // Get the buffer associated with the current centrality and z-vtx
a9123929 751 if (!pool)
7e02de85 752 {
a9123929 753 AliFatal(Form("No pool found for centrality = %f, zVtx = %f", centvalue1, pVtxZ));
7e02de85 754 return;
755 }
a9123929 756 // Look for kink mother for AOD
28ea601a 757 Int_t numberofvertices = fAOD->GetNumberOfVertices();
758 Double_t listofmotherkink[numberofvertices];
759 Int_t numberofmotherkink = 0;
a9123929 760 if(IsAODanalysis()){
a9123929 761 for(Int_t ivertex=0; ivertex < numberofvertices; ivertex++) {
762 AliAODVertex *aodvertex = fAOD->GetVertex(ivertex);
763 if(!aodvertex) continue;
764 if(aodvertex->GetType()==AliAODVertex::kKink) {
765 AliAODTrack *mother = (AliAODTrack *) aodvertex->GetParent();
766 if(!mother) continue;
767 Int_t idmother = mother->GetID();
768 listofmotherkink[numberofmotherkink] = idmother;
769 numberofmotherkink++;
770 }
771 }
772 }
773
774 // Track loop
775 for (Int_t iTracks = 0; iTracks < fVevent->GetNumberOfTracks(); iTracks++) {
776 AliVParticle* Vtrack = fVevent->GetTrack(iTracks);
777 if (!Vtrack) {
778 printf("ERROR: Could not receive track %d\n", iTracks);
779 continue;
780 }
781 AliVTrack *track = dynamic_cast<AliVTrack*>(Vtrack);
782 AliESDtrack *etrack = dynamic_cast<AliESDtrack*>(Vtrack);
783 AliAODTrack *atrack = dynamic_cast<AliAODTrack*>(Vtrack);
784
7e02de85 785 if(!track && !etrack && !atrack) continue;
786
a9123929 787 if(IsAODanalysis())
28ea601a 788 if(atrack){
789 if(!atrack->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)) continue;
790 }
a9123929 791 if(track->Pt()<1) continue;
792
793 // fTrackPtBefTrkCuts->Fill(track->Pt());
794
795 // RecKine: ITSTPC cuts
796 if(!ProcessCutStep(AliHFEcuts::kStepRecKineITSTPC, track)) continue;
797
798 // Reject kink mother
799 if(fRejectKinkMother) { // Quick and dirty fix to reject both kink mothers and daughters
800 if(IsAODanalysis()){
801 Bool_t kinkmotherpass = kTRUE;
802 for(Int_t kinkmother = 0; kinkmother < numberofmotherkink; kinkmother++) {
803 if(track->GetID() == listofmotherkink[kinkmother]) {
804 kinkmotherpass = kFALSE;
805 continue;
806 }
bf697dda 807 }
a9123929 808 if(!kinkmotherpass) continue;
809 }
810 else{
811 if(etrack->GetKinkIndex(0) != 0) continue;
812 }
813 }
814 // RecPrim
815 // if(!ProcessCutStep(AliHFEcuts::kStepRecPrim, track)) continue; //gives warning for AOD, so not using
816
817 // HFE cuts: TPC PID cleanup
818 if(!ProcessCutStep(AliHFEcuts::kStepHFEcutsTPC, track)) continue;
819
820 // fTrackHFEcuts->Fill(track->Phi());
821
822 // HFEcuts: ITS layers cuts
823 if(!ProcessCutStep(AliHFEcuts::kStepHFEcutsITS, track)) continue;
824
825 // fTrackHFEcutsITS->Fill(track->Phi());
826 //fTrackPtAftTrkCuts->Fill(track->Pt());
827
828 Double_t fClsE = -999, p = -999, fEovP=-999, pt = -999, dEdx=-999, fTPCnSigma=0;
829 pt = track->Pt();
830 p = track->P();
831 dEdx = track->GetTPCsignal();
832 fTPCnSigma = fPID->GetPIDResponse() ? fPID->GetPIDResponse()->NumberOfSigmasTPC(track, AliPID::kElectron) : 1000;
833
834 //TPC electron phi
835 // if(fTPCnSigma >= -2 && fTPCnSigma <= 2){
836 // fElecPhiTPC->Fill(track->Phi());
837 // }
838
839 //eta cut (-0.7,0.7)
840 if(track->Eta() < -0.7 || track->Eta() > 0.7) continue;
841
842 // Track extrapolation to EMCAL
843 Int_t fClsId = track->GetEMCALcluster();
844 if(fClsId <0) continue;
845 AliVCluster *cluster = fVevent->GetCaloCluster(fClsId);
846 if(!cluster->IsEMCAL()) continue;
847 if(TMath::Abs(cluster->GetTrackDx())>0.05 || TMath::Abs(cluster->GetTrackDz())>0.05) continue;
848 // fdEdxBef->Fill(p,dEdx);
7e02de85 849 fTPCnsigma->Fill(p,fTPCnSigma);
a9123929 850
851 // fTrkpt->Fill(pt);
852 fClsE = cluster->E();
853 fEovP = fClsE/p;
854
855 //--------THnsparse---------
856 //fvalueElectron[0] = pt;
857 //fvalueElectron[1] = fTPCnSigma;
858 //fvalueElectron[2] = fEovP;
859 //fvalueElectron[3] = cluster->GetM20();
860 //fvalueElectron[4] = cluster->GetM02();
861 //fvalueElectron[5] = cluster->GetDispersion();
862
863 //fSparseElectron->Fill(fvalueElectron);
864
865 //----------------
866 //EovP distribution for Had
867 if((fTPCnSigma > fTPCnsigHadMin) && (fTPCnSigma < fTPCnsigHadMax)) fEovPHadWoSS->Fill(pt,fEovP);
868 if(((fTPCnSigma > fTPCnsigHadMin) && (fTPCnSigma < fTPCnsigHadMax)) && ((cluster->GetM20()> fM20CutMin) && (cluster->GetM20()< fM20CutMax)) && ((cluster->GetM02()> fM02CutMin) && (cluster->GetM02()< fM02CutMax)) && ((cluster->GetDispersion()< fDispCutMax))) fEovPHadWSS->Fill(pt,fEovP);
869
870 //Dphi distribution hadrons with shower shape cuts
871 if(((fTPCnSigma > fTPCnsigHadMin) && (fTPCnSigma < fTPCnsigHadMax)) && ((cluster->GetM20()> fM20CutMin) && (cluster->GetM20()< fM20CutMax)) && ((cluster->GetM02()> fM02CutMin) && (cluster->GetM02()< fM02CutMax)) && ((cluster->GetDispersion()< fDispCutMax))&&(fEovP >= fEovPMin && fEovP <= fEovPMax)){
872 ElectronHadCorrel(iTracks, track, fHadronDphi, fHadronDphi1,fHadronDphi2,fHadronDphi3,fHadronDphi4);
873 ElectronHadCorrelEtaBins(iTracks, track, fHadronDphiEta1, fHadronDphiEta11,fHadronDphiEta12,fHadronDphiEta13,fHadronDphiEta14,fHadronDphiEta2, fHadronDphiEta21,fHadronDphiEta22,fHadronDphiEta23,fHadronDphiEta24);
874 fPiPt->Fill(pt);
875 }
876
877 //Dphi distribution hadrons without shower shape cuts
878 if((fTPCnSigma > fTPCnsigHadMin) && (fTPCnSigma < fTPCnsigHadMax)&&(fEovP >= fEovPMin && fEovP <= fEovPMax)){
879 ElectronHadCorrel(iTracks, track, fHadronDphiNoSS, fHadronDphiNoSS1,fHadronDphiNoSS2,fHadronDphiNoSS3,fHadronDphiNoSS4);
880 ElectronHadCorrelEtaBins(iTracks, track, fHadronDphiNoSSEta1, fHadronDphiNoSSEta11,fHadronDphiNoSSEta12,fHadronDphiNoSSEta13,fHadronDphiNoSSEta14,fHadronDphiNoSSEta2, fHadronDphiNoSSEta21,fHadronDphiNoSSEta22,fHadronDphiNoSSEta23,fHadronDphiNoSSEta24);
881 fPiPtNoSS->Fill(pt);
882 }
883
884 //Electron id with TPC
885 if(fTPCnSigma < fTPCnsigEleMin || fTPCnSigma > fTPCnsigEleMax) continue;
886 fEovPWoSS->Fill(pt,fEovP);
887 // fElecPhiTPCEovP->Fill(track->Phi());
888
889 //Electron id with shower shape
890 if(cluster->GetM20()< fM20CutMin || cluster->GetM20()> fM20CutMax || cluster->GetM02()< fM02CutMin || cluster->GetM02()> fM02CutMax || cluster->GetDispersion()> fDispCutMax) continue;
891 fEovPWSS->Fill(pt,fEovP);
892
893 //Electron id with E/p
894 if(fEovP < fEovPMin || fEovP > fEovPMax) continue;
895
896 fTrkEovPAft->Fill(pt,fEovP);
897 fElecPhi->Fill(track->Phi());
898 fElecPhiPt->Fill(track->Phi(),track->Pt());
899 if (track->Eta() >0 && track->Eta() <0.7) fElecPhiTPChalf->Fill(track->Phi());
900
901 HadronInfo(iTracks);
902
903 Bool_t fFlagPhotonicElec = kFALSE;
904 // select photonic electron
905 SelectPhotonicElectron(iTracks,track,fFlagPhotonicElec);
906
907 //Inclusive electron-hadron correlation
908 ElectronHadCorrel(iTracks, track, fInclusiveElecDphi, fInclusiveElecDphi1,fInclusiveElecDphi2,fInclusiveElecDphi3,fInclusiveElecDphi4);
909 fInclusiveElecPt->Fill(pt);
3db57d71 910 MixedEvent(track,fMixedIncElecDphi, fMixedIncElecDphi1,fMixedIncElecDphi2, fMixedIncElecDphi3, fMixedIncElecDphi4);
a9123929 911
912 //Dphi in Eta bins
913 ElectronHadCorrelEtaBins(iTracks, track, fInclusiveElecDphiEta1, fInclusiveElecDphiEta11,fInclusiveElecDphiEta12,fInclusiveElecDphiEta13,fInclusiveElecDphiEta14,fInclusiveElecDphiEta2, fInclusiveElecDphiEta21,fInclusiveElecDphiEta22,fInclusiveElecDphiEta23,fInclusiveElecDphiEta24);
914
915 //Inclusive electron-hadron correlation far eta side
916 ElectronHadCorrelEtaFarSide(iTracks, track, fInclusiveElecDphiEtaFS, fInclusiveElecDphiEtaFS1,fInclusiveElecDphiEtaFS2,fInclusiveElecDphiEtaFS3,fInclusiveElecDphiEtaFS4);
3db57d71 917 MixedEvent(track,fMixedIncElecDphi, fMixedIncElecDphi1,fMixedIncElecDphi2, fMixedIncElecDphi3, fMixedIncElecDphi4);
a9123929 918
919 // photonic electron
920 if(fFlagPhotonicElec){
921 //Electron hadron correlation
922 ElectronHadCorrel(iTracks, track, fPhotElecDphi,fPhotElecDphi1,fPhotElecDphi2,fPhotElecDphi3,fPhotElecDphi4);
923 fPhotoElecPt->Fill(pt);
3db57d71 924 MixedEvent(track,fMixedPhotElecDphi, fMixedPhotElecDphi1,fMixedPhotElecDphi2, fMixedPhotElecDphi3, fMixedPhotElecDphi4);
a9123929 925
926 //Dphi in Eta bins
927 ElectronHadCorrelEtaBins(iTracks, track, fPhotElecDphiEta1,fPhotElecDphiEta11,fPhotElecDphiEta12,fPhotElecDphiEta13,fPhotElecDphiEta14,fPhotElecDphiEta2,fPhotElecDphiEta21,fPhotElecDphiEta22,fPhotElecDphiEta23,fPhotElecDphiEta24);
928 }
929
930 // Semi inclusive electron
931 if(!fFlagPhotonicElec){
932 //Electron hadron correlation
933 ElectronHadCorrel(iTracks, track, fSemiIncElecDphi, fSemiIncElecDphi1,fSemiIncElecDphi2,fSemiIncElecDphi3,fSemiIncElecDphi4);
934 fSemiInclElecPt->Fill(pt);
3db57d71 935 MixedEvent(track,fMixedSemiIncElecDphi,fMixedSemiIncElecDphi1,fMixedSemiIncElecDphi2, fMixedSemiIncElecDphi3, fMixedSemiIncElecDphi4);
a9123929 936
937 //Dphi in Eta bins
938 ElectronHadCorrelEtaBins(iTracks, track, fSemiIncElecDphiEta1, fSemiIncElecDphiEta11,fSemiIncElecDphiEta12,fSemiIncElecDphiEta13,fSemiIncElecDphiEta14,fSemiIncElecDphiEta2, fSemiIncElecDphiEta21,fSemiIncElecDphiEta22,fSemiIncElecDphiEta23,fSemiIncElecDphiEta24);
939 }
940 }
941 /* //EMC clusters
942 Int_t clsNo = fVevent->GetNumberOfCaloClusters();
943 fNClusv1->Fill(clsNo);
944 for(Int_t iclus=0; iclus<clsNo ; iclus++){
945 AliVCluster* clus = fVevent->GetCaloCluster(iclus);
946 if(!clus->IsEMCAL()) continue;
947 fNCellv1->Fill(clus->GetNCells());
948 fClsEv1->Fill(clus->E());
949 }
950 */
3db57d71 951
a9123929 952 TObjArray* tracksClone = CloneAndReduceTrackList();
953 tracksClone->SetOwner();
954 pool->UpdatePool(tracksClone);
3db57d71 955
a9123929 956 PostData(1, fOutputList);
57189f04 957}
958//_________________________________________
959void AliAnalysisTaskElecHadronCorrel::UserCreateOutputObjects()
960{
961 //Create histograms
987053ce 962
963 AliDebug(3, "Creating Output Objects");
964 // Automatic determination of the analysis mode
965 AliVEventHandler *inputHandler = dynamic_cast<AliVEventHandler *>(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
966 if(!TString(inputHandler->IsA()->GetName()).CompareTo("AliAODInputHandler")){
967 SetAODAnalysis();
968 } else {
969 SetESDAnalysis();
970 }
971 printf("Analysis Mode: %s Analysis\n", IsAODanalysis() ? "AOD" : "ESD");
520a29a8 972
57189f04 973 //--------Initialize PID
974 fPID->SetHasMCData(kFALSE);
975 if(!fPID->GetNumberOfPIDdetectors())
520a29a8 976 {
977 fPID->AddDetector("TPC", 0);
978 fPID->AddDetector("EMCAL", 1);
979 }
980
57189f04 981 fPID->SortDetectors();
982 fPIDqa = new AliHFEpidQAmanager();
983 fPIDqa->Initialize(fPID);
520a29a8 984
57189f04 985 //--------Initialize correction Framework and Cuts
986 fCFM = new AliCFManager;
987 const Int_t kNcutSteps = AliHFEcuts::kNcutStepsMCTrack + AliHFEcuts::kNcutStepsRecTrack + AliHFEcuts::kNcutStepsDETrack;
988 fCFM->SetNStepParticle(kNcutSteps);
989 for(Int_t istep = 0; istep < kNcutSteps; istep++)
990 fCFM->SetParticleCutsList(istep, NULL);
520a29a8 991
57189f04 992 if(!fCuts){
993 AliWarning("Cuts not available. Default cuts will be used");
994 fCuts = new AliHFEcuts;
995 fCuts->CreateStandardCuts();
996 }
987053ce 997
998 if(IsAODanalysis()) fCuts->SetAOD();
57189f04 999 fCuts->Initialize(fCFM);
3db57d71 1000
4e01b68c 1001 //Mixed event initialising
1002 Int_t trackDepth = 2000;
1003 Int_t poolsize = 1000;
1004
1005 Int_t nCentralityBins = 5;
3836f884 1006 Int_t nCentralityBinsSC = 6;
487ae960 1007 Int_t nZvtxBins = 4;
a9123929 1008 Double_t CentralityBins[6];
1009 Double_t CentralityBinsSC[7];
1010 Double_t vertexBins[5];
1011 if(fTriggerCentral)
1012 {
1013 CentralityBins[0] = 0;
1014 CentralityBins[1] = 2;
1015 CentralityBins[2] = 4;
1016 CentralityBins[3] = 6;
1017 CentralityBins[4] = 8;
1018 CentralityBins[5] = 10;
1019
1020 vertexBins[0] = -10;
1021 vertexBins[1] = -5;
1022 vertexBins[2] = 0;
1023 vertexBins[3] = 5;
1024 vertexBins[4] = 10;
1025 fPoolMgr = new AliEventPoolManager(poolsize, trackDepth, nCentralityBins, (Double_t*) CentralityBins, nZvtxBins, (Double_t*) vertexBins);
1026 }
1027
a9123929 1028 if(!fTriggerCentral)
1029 {
1030 CentralityBinsSC[0] = 20;
1031 CentralityBinsSC[1] = 25;
1032 CentralityBinsSC[2] = 30;
1033 CentralityBinsSC[3] = 35;
1034 CentralityBinsSC[4] = 40;
1035 CentralityBinsSC[5] = 45;
1036 CentralityBinsSC[6] = 50;
1037
1038 vertexBins[0] = -10;
1039 vertexBins[1] = -5;
1040 vertexBins[2] = 0;
1041 vertexBins[3] = 5;
1042 vertexBins[4] = 10;
3836f884 1043 fPoolMgr = new AliEventPoolManager(poolsize, trackDepth, nCentralityBinsSC, (Double_t*) CentralityBinsSC, nZvtxBins, (Double_t*) vertexBins);
a9123929 1044 }
3db57d71 1045
4e01b68c 1046
57189f04 1047 //---------Output Tlist
1048 fOutputList = new TList();
1049 fOutputList->SetOwner();
1050 fOutputList->Add(fPIDqa->MakeList("PIDQA"));
520a29a8 1051
57189f04 1052 fNoEvents = new TH1F("fNoEvents","",1,0,1) ;
1053 fOutputList->Add(fNoEvents);
520a29a8 1054
1055 fcentrality = new TH1F("fcentrality","centrality", 100,0,100);
1056 fOutputList->Add(fcentrality);
987053ce 1057
bf697dda 1058 // fTrkpt = new TH1F("fTrkpt","track pt",1000,0,50);
1059 // fOutputList->Add(fTrkpt);
1060
1061 // fTrackPtBefTrkCuts = new TH1F("fTrackPtBefTrkCuts","track pt before track cuts",1000,0,50);
1062 // fOutputList->Add(fTrackPtBefTrkCuts);
520a29a8 1063
bf697dda 1064 // fTrackPtAftTrkCuts = new TH1F("fTrackPtAftTrkCuts","track pt after track cuts",1000,0,50);
1065 // fOutputList->Add(fTrackPtAftTrkCuts);
520a29a8 1066
7e02de85 1067 fTPCnsigma = new TH2F("fTPCnsigma", "TPC - n sigma",1000,0,50,200,-10,10);
1068 fOutputList->Add(fTPCnsigma);
987053ce 1069
94b12681 1070 fTrkEovPAft = new TH2F("fTrkEovPAft","track E/p after HFE pid",1000,0,50,100,0,2);
1071 fOutputList->Add(fTrkEovPAft);
520a29a8 1072
bf697dda 1073 // fTrkEovPBefHad = new TH2F("fTrkEovPBefHad","track E/p for TPCnsig < 3.5",1000,0,50,100,0,2);
1074 // fOutputList->Add(fTrkEovPBefHad);
520a29a8 1075
bf697dda 1076 // fdEdxBef = new TH2F("fdEdxBef","track dEdx vs p before HFE pid",1000,0,50,150,0,150);
1077 // fOutputList->Add(fdEdxBef);
520a29a8 1078
520a29a8 1079 fElecPhi = new TH1F("fElecPhi", "Electron phi",1000,0,6.28);
1080 fOutputList->Add(fElecPhi);
1081
3c56855b 1082 fElecPhiPt = new TH2F("fElecPhiPt", "Electron phi vs pt; Electron phi; pt (GeV/c)",1000,0,6.28,1000,0,100);
1083 fOutputList->Add(fElecPhiPt);
1084
1085 fElecPhiTPChalf = new TH1F("fElecPhiTPChalf", "Electron phi for 0<eta<0.7",1000,0,6.28);
1086 fOutputList->Add(fElecPhiTPChalf);
1087
bf697dda 1088 /* fElecPhiTPC = new TH1F("fElecPhiTPC", "Electron phi after TPC cut",1000,0,6.28);
1089 fOutputList->Add(fElecPhiTPC);
4e01b68c 1090
bf697dda 1091 fElecPhiTPCEovP = new TH1F("fElecPhiTPCEovP", "Electron phi after TPC and E/p cut",1000,0,6.28);
1092 fOutputList->Add(fElecPhiTPCEovP);
1093 */
520a29a8 1094 fHadronPhi = new TH1F("fHadronPhi", "Hadron phi",1000,0,6.28);
1095 fOutputList->Add(fHadronPhi);
1096
3c56855b 1097 fHadronPhiTPChalf = new TH1F("fHadronPhiTPChalf", "Hadron phi for 0<eta<0.9",1000,0,6.28);
1098 fOutputList->Add(fHadronPhiTPChalf);
1099
1100 fHadronPhiPt = new TH2F("fHadronPhiPt", "Hadron phi vs pt; hadron phi; pt (GeV/c)",1000,0,6.28,1000,0,100);
1101 fOutputList->Add(fHadronPhiPt);
1102
bf697dda 1103 /*
1104 fTrackHFEcuts = new TH1F("fTrackHFEcuts","Track phi for HFE cuts",1000,0,6.28);
1105 fOutputList->Add(fTrackHFEcuts);
4e01b68c 1106
bf697dda 1107 fTrakPhiSPD1 = new TH1F("fTrakPhiSPD1","Track phi for hit in SPD layer 1",1000,0,6.28);
1108 fOutputList->Add(fTrakPhiSPD1);
4e01b68c 1109
bf697dda 1110 fTrakPhiSPD2 = new TH1F("fTrakPhiSPD2","Track phi for hit in SPD layer 2",1000,0,6.28);
1111 fOutputList->Add(fTrakPhiSPD2);
4e01b68c 1112
bf697dda 1113 fTrakPhiSPDOr = new TH1F("fTrakPhiSPDOr","Track phi for hit in any SPD layer",1000,0,6.28);
1114 fOutputList->Add(fTrakPhiSPDOr);
4e01b68c 1115
bf697dda 1116 fTrakPhiSPDAnd = new TH1F("fTrakPhiSPDAnd","Track phi for hit in both SPD layer",1000,0,6.28);
1117 fOutputList->Add(fTrakPhiSPDAnd);
4e01b68c 1118
bf697dda 1119 fTrackHFEcutsITS = new TH1F("fTrackHFEcutsITS","Track phi for HFE cuts + ITS HFE cuts",1000,0,6.28);
1120 fOutputList->Add(fTrackHFEcutsITS);
1121 */
0523ddd5 1122 fSemiIncElecDphi = new TH2F("fSemiIncElecDphi", "Semi Inclusive elec-had Dphi correlation",200,0,20,64,-1.57,4.71);
57189f04 1123 fOutputList->Add(fSemiIncElecDphi);
520a29a8 1124
a9123929 1125 fSemiIncElecDphi1 = new TH2F("fSemiIncElecDphi1", "Semi Inclusive elec-had Dphi correlation for 2<pt^{asso}<4",200,0,20,64,-1.57,4.71);
487ae960 1126 fOutputList->Add(fSemiIncElecDphi1);
1127
a9123929 1128 fSemiIncElecDphi2 = new TH2F("fSemiIncElecDphi2", "Semi Inclusive elec-had Dphi correlation for 4<pt^{asso}<6",200,0,20,64,-1.57,4.71);
487ae960 1129 fOutputList->Add(fSemiIncElecDphi2);
1130
a9123929 1131 fSemiIncElecDphi3 = new TH2F("fSemiIncElecDphi3", "Semi Inclusive elec-had Dphi correlation for 6<pt^{asso}<8",200,0,20,64,-1.57,4.71);
487ae960 1132 fOutputList->Add(fSemiIncElecDphi3);
1133
a9123929 1134 fSemiIncElecDphi4 = new TH2F("fSemiIncElecDphi4", "Semi Inclusive elec-had Dphi correlation for 4<pt^{asso}<10",200,0,20,64,-1.57,4.71);
487ae960 1135 fOutputList->Add(fSemiIncElecDphi4);
1136
0523ddd5 1137 fPhotElecDphi = new TH2F("fPhotElecDphi", "Photon elec-had Dphi correlation",200,0,20,64,-1.57,4.71);
57189f04 1138 fOutputList->Add(fPhotElecDphi);
520a29a8 1139
a9123929 1140 fPhotElecDphi1 = new TH2F("fPhotElecDphi1", "Photon elec-had Dphi correlation for 2<pt^{asso}<4",200,0,20,64,-1.57,4.71);
487ae960 1141 fOutputList->Add(fPhotElecDphi1);
1142
a9123929 1143 fPhotElecDphi2 = new TH2F("fPhotElecDphi2", "Photon elec-had Dphi correlation for 4<pt^{asso}<6",200,0,20,64,-1.57,4.71);
487ae960 1144 fOutputList->Add(fPhotElecDphi2);
1145
a9123929 1146 fPhotElecDphi3 = new TH2F("fPhotElecDphi3", "Photon elec-had Dphi correlation for 6<pt^{asso}<8",200,0,20,64,-1.57,4.71);
487ae960 1147 fOutputList->Add(fPhotElecDphi3);
1148
a9123929 1149 fPhotElecDphi4 = new TH2F("fPhotElecDphi4", "Photon elec-had Dphi correlation for 4<pt^{asso}<10",200,0,20,64,-1.57,4.71);
487ae960 1150 fOutputList->Add(fPhotElecDphi4);
1151
0523ddd5 1152 fInclusiveElecDphi = new TH2F("fInclusiveElecDphi", "Inclusive elec-had Dphi correlation",200,0,20,64,-1.57,4.71);
57189f04 1153 fOutputList->Add(fInclusiveElecDphi);
520a29a8 1154
a9123929 1155 fInclusiveElecDphi1 = new TH2F("fInclusiveElecDphi1", "Inclusive elec-had Dphi correlation for 2<pt^{asso}<4",200,0,20,64,-1.57,4.71);
487ae960 1156 fOutputList->Add(fInclusiveElecDphi1);
1157
a9123929 1158 fInclusiveElecDphi2 = new TH2F("fInclusiveElecDphi2", "Inclusive elec-had Dphi correlation for 4<pt^{asso}<6",200,0,20,64,-1.57,4.71);
487ae960 1159 fOutputList->Add(fInclusiveElecDphi2);
1160
a9123929 1161 fInclusiveElecDphi3 = new TH2F("fInclusiveElecDphi3", "Inclusive elec-had Dphi correlation for 6<pt^{asso}<8",200,0,20,64,-1.57,4.71);
487ae960 1162 fOutputList->Add(fInclusiveElecDphi3);
1163
a9123929 1164 fInclusiveElecDphi4 = new TH2F("fInclusiveElecDphi4", "Inclusive elec-had Dphi correlation for 4<pt^{asso}<10",200,0,20,64,-1.57,4.71);
487ae960 1165 fOutputList->Add(fInclusiveElecDphi4);
1166
33369c14 1167 fInclusiveElecDphiEtaFS = new TH2F("fInclusiveElecDphiEtaFS", "Inclusive elec-had Dphi correlation (hadron 1<eta<1.6)",200,0,20,64,-1.57,4.71);
1168 fOutputList->Add(fInclusiveElecDphiEtaFS);
1169
a9123929 1170 fInclusiveElecDphiEtaFS1 = new TH2F("fInclusiveElecDphiEtaFS1", "Inclusive elec-had Dphi correlation for 2<pt^{asso}<4 (hadron 1<eta<1.6)",200,0,20,64,-1.57,4.71);
33369c14 1171 fOutputList->Add(fInclusiveElecDphiEtaFS1);
1172
a9123929 1173 fInclusiveElecDphiEtaFS2 = new TH2F("fInclusiveElecDphiEtaFS2", "Inclusive elec-had Dphi correlation for 4<pt^{asso}<6 (hadron 1<eta<1.6)",200,0,20,64,-1.57,4.71);
33369c14 1174 fOutputList->Add(fInclusiveElecDphiEtaFS2);
1175
a9123929 1176 fInclusiveElecDphiEtaFS3 = new TH2F("fInclusiveElecDphiEtaFS3", "Inclusive elec-had Dphi correlation for 6<pt^{asso}<8 (hadron 1<eta<1.6)",200,0,20,64,-1.57,4.71);
33369c14 1177 fOutputList->Add(fInclusiveElecDphiEtaFS3);
1178
a9123929 1179 fInclusiveElecDphiEtaFS4 = new TH2F("fInclusiveElecDphiEtaFS4", "Inclusive elec-had Dphi correlation for 4<pt^{asso}<10 (hadron 1<eta<1.6)",200,0,20,64,-1.57,4.71);
33369c14 1180 fOutputList->Add(fInclusiveElecDphiEtaFS4);
1181
0523ddd5 1182 fDphiULSMassLow = new TH2F("fDphiULSMassLow", "e-h Dphi ULS, mass<cut",200,0,20,64,-1.57,4.71);
57189f04 1183 fOutputList->Add(fDphiULSMassLow);
520a29a8 1184
a9123929 1185 fDphiULSMassLow1 = new TH2F("fDphiULSMassLow1", "e-h Dphi ULS, mass<cut for 2<pt^{asso}<4",200,0,20,64,-1.57,4.71);
487ae960 1186 fOutputList->Add(fDphiULSMassLow1);
1187
a9123929 1188 fDphiULSMassLow2 = new TH2F("fDphiULSMassLow2", "e-h Dphi ULS, mass<cut for 4<pt^{asso}<6",200,0,20,64,-1.57,4.71);
487ae960 1189 fOutputList->Add(fDphiULSMassLow2);
1190
a9123929 1191 fDphiULSMassLow3 = new TH2F("fDphiULSMassLow3", "e-h Dphi ULS, mass<cut for 6<pt^{asso}<8",200,0,20,64,-1.57,4.71);
487ae960 1192 fOutputList->Add(fDphiULSMassLow3);
1193
a9123929 1194 fDphiULSMassLow4 = new TH2F("fDphiULSMassLow4", "e-h Dphi ULS, mass<cut for 4<pt^{asso}<10",200,0,20,64,-1.57,4.71);
487ae960 1195 fOutputList->Add(fDphiULSMassLow4);
1196
0523ddd5 1197 fDphiLSMassLow = new TH2F("fDphiLSMassLow", "e-h Dphi LS, mass<cut",200,0,20,64,-1.57,4.71);
57189f04 1198 fOutputList->Add(fDphiLSMassLow);
520a29a8 1199
a9123929 1200 fDphiLSMassLow1 = new TH2F("fDphiLSMassLow1", "e-h Dphi LS, mass<cut for 2<pt^{asso}<4",200,0,20,64,-1.57,4.71);
487ae960 1201 fOutputList->Add(fDphiLSMassLow1);
1202
a9123929 1203 fDphiLSMassLow2 = new TH2F("fDphiLSMassLow2", "e-h Dphi LS, mass<cut for 4<pt^{asso}<6",200,0,20,64,-1.57,4.71);
487ae960 1204 fOutputList->Add(fDphiLSMassLow2);
1205
a9123929 1206 fDphiLSMassLow3 = new TH2F("fDphiLSMassLow3", "e-h Dphi LS, mass<cut for 6<pt^{asso}<8",200,0,20,64,-1.57,4.71);
487ae960 1207 fOutputList->Add(fDphiLSMassLow3);
1208
a9123929 1209 fDphiLSMassLow4 = new TH2F("fDphiLSMassLow4", "e-h Dphi LS, mass<cut for 8<pt^{asso}<10",200,0,20,64,-1.57,4.71);
487ae960 1210 fOutputList->Add(fDphiLSMassLow4);
1211
0523ddd5 1212 fDphiULSMassLowNoPartner = new TH2F("fDphiULSMassLowNoPartner", "e-h Dphi ULS with no partner, mass<mass cut,",200,0,20,64,-1.57,4.71);
520a29a8 1213 fOutputList->Add(fDphiULSMassLowNoPartner);
1214
a9123929 1215 fDphiULSMassLowNoPartner1 = new TH2F("fDphiULSMassLowNoPartner1", "e-h Dphi ULS with no partner, mass<mass cut for 2<pt^{asso}<4,",200,0,20,64,-1.57,4.71);
487ae960 1216 fOutputList->Add(fDphiULSMassLowNoPartner1);
1217
a9123929 1218 fDphiULSMassLowNoPartner2 = new TH2F("fDphiULSMassLowNoPartner2", "e-h Dphi ULS with no partner, mass<mass cut for 4<pt^{asso}<6,",200,0,20,64,-1.57,4.71);
487ae960 1219 fOutputList->Add(fDphiULSMassLowNoPartner2);
1220
a9123929 1221 fDphiULSMassLowNoPartner3 = new TH2F("fDphiULSMassLowNoPartner3", "e-h Dphi ULS with no partner, mass<mass cut for 6<pt^{asso}<8,",200,0,20,64,-1.57,4.71);
487ae960 1222 fOutputList->Add(fDphiULSMassLowNoPartner3);
1223
a9123929 1224 fDphiULSMassLowNoPartner4 = new TH2F("fDphiULSMassLowNoPartner4", "e-h Dphi ULS with no partner, mass<mass cut for 4<pt^{asso}<10,",200,0,20,64,-1.57,4.71);
487ae960 1225 fOutputList->Add(fDphiULSMassLowNoPartner4);
1226
0523ddd5 1227 fDphiLSMassLowNoPartner = new TH2F("fDphiLSMassLowNoPartner", "e-h Dphi LS with no partner, mass<mass cut",200,0,20,64,-1.57,4.71);
520a29a8 1228 fOutputList->Add(fDphiLSMassLowNoPartner);
1229
a9123929 1230 fDphiLSMassLowNoPartner1 = new TH2F("fDphiLSMassLowNoPartner1", "e-h Dphi LS with no partner, mass<mass cut for 2<pt^{asso}<4,",200,0,20,64,-1.57,4.71);
487ae960 1231 fOutputList->Add(fDphiLSMassLowNoPartner1);
1232
a9123929 1233 fDphiLSMassLowNoPartner2 = new TH2F("fDphiLSMassLowNoPartner2", "e-h Dphi LS with no partner, mass<mass cut for 4<pt^{asso}<6,",200,0,20,64,-1.57,4.71);
487ae960 1234 fOutputList->Add(fDphiLSMassLowNoPartner2);
1235
a9123929 1236 fDphiLSMassLowNoPartner3 = new TH2F("fDphiLSMassLowNoPartner3", "e-h Dphi LS with no partner, mass<mass cut for 6<pt^{asso}<8,",200,0,20,64,-1.57,4.71);
487ae960 1237 fOutputList->Add(fDphiLSMassLowNoPartner3);
1238
a9123929 1239 fDphiLSMassLowNoPartner4 = new TH2F("fDphiLSMassLowNoPartner4", "e-h Dphi LS with no partner, mass<mass cut for 4<pt^{asso}<10,",200,0,20,64,-1.57,4.71);
487ae960 1240 fOutputList->Add(fDphiLSMassLowNoPartner4);
1241
57189f04 1242 fPhotoElecPt = new TH1F("fPhotoElecPt", "photonic electron pt",1000,0,100);
1243 fOutputList->Add(fPhotoElecPt);
520a29a8 1244
57189f04 1245 fSemiInclElecPt = new TH1F("fSemiInclElecPt", "Semi-inclusive electron pt",1000,0,100);
1246 fOutputList->Add(fSemiInclElecPt);
520a29a8 1247
1248 fInclusiveElecPt = new TH1F("fInclElecPt", "Inclusive electron pt",1000,0,100);
1249 fOutputList->Add(fInclusiveElecPt);
1250
1251 fULSElecPt = new TH1F("fULSElecPt", "ULS electron pt",1000,0,100);
1252 fOutputList->Add(fULSElecPt);
1253
1254 fLSElecPt = new TH1F("fLSElecPt", "LS electron pt",1000,0,100);
1255 fOutputList->Add(fLSElecPt);
987053ce 1256
a9123929 1257 fSemiIncElecDphiEta1 = new TH2F("fSemiIncElecDphiEta1", "Semi Inclusive elec-had Dphi correlation for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1258 fOutputList->Add(fSemiIncElecDphiEta1);
a9123929 1259 fSemiIncElecDphiEta11 = new TH2F("fSemiIncElecDphiEta11", "Semi Inclusive elec-had Dphi correlation for 2<pt^{asso}<4 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1260 fOutputList->Add(fSemiIncElecDphiEta11);
a9123929 1261 fSemiIncElecDphiEta12 = new TH2F("fSemiIncElecDphiEta12", "Semi Inclusive elec-had Dphi correlation for 4<pt^{asso}<6 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1262 fOutputList->Add(fSemiIncElecDphiEta12);
a9123929 1263 fSemiIncElecDphiEta13 = new TH2F("fSemiIncElecDphiEta13", "Semi Inclusive elec-had Dphi correlation for 6<pt^{asso}<8 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1264 fOutputList->Add(fSemiIncElecDphiEta13);
a9123929 1265 fSemiIncElecDphiEta14 = new TH2F("fSemiIncElecDphiEta14", "Semi Inclusive elec-had Dphi correlation for 4<pt^{asso}<10 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1266 fOutputList->Add(fSemiIncElecDphiEta14);
a9123929 1267 fPhotElecDphiEta1 = new TH2F("fPhotElecDphiEta1", "Photon elec-had Dphi correlation for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1268 fOutputList->Add(fPhotElecDphiEta1);
a9123929 1269 fPhotElecDphiEta11 = new TH2F("fPhotElecDphiEta11", "Photon elec-had Dphi correlation for 2<pt^{asso}<4 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1270 fOutputList->Add(fPhotElecDphiEta11);
a9123929 1271 fPhotElecDphiEta12 = new TH2F("fPhotElecDphiEta12", "Photon elec-had Dphi correlation for 4<pt^{asso}<6 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1272 fOutputList->Add(fPhotElecDphiEta12);
a9123929 1273 fPhotElecDphiEta13 = new TH2F("fPhotElecDphiEta13", "Photon elec-had Dphi correlation for 6<pt^{asso}<8 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1274 fOutputList->Add(fPhotElecDphiEta13);
a9123929 1275 fPhotElecDphiEta14 = new TH2F("fPhotElecDphiEta14", "Photon elec-had Dphi correlation for 4<pt^{asso}<10 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1276 fOutputList->Add(fPhotElecDphiEta14);
a9123929 1277 fInclusiveElecDphiEta1 = new TH2F("fInclusiveElecDphiEta1", "Inclusive elec-had Dphi correlation for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1278 fOutputList->Add(fInclusiveElecDphiEta1);
a9123929 1279 fInclusiveElecDphiEta11 = new TH2F("fInclusiveElecDphiEta11", "Inclusive elec-had Dphi correlation for 2<pt^{asso}<4 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1280 fOutputList->Add(fInclusiveElecDphiEta11);
a9123929 1281 fInclusiveElecDphiEta12 = new TH2F("fInclusiveElecDphiEta12", "Inclusive elec-had Dphi correlation for 4<pt^{asso}<6 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1282 fOutputList->Add(fInclusiveElecDphiEta12);
a9123929 1283 fInclusiveElecDphiEta13 = new TH2F("fInclusiveElecDphiEta13", "Inclusive elec-had Dphi correlation for 6<pt^{asso}<8 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1284 fOutputList->Add(fInclusiveElecDphiEta13);
a9123929 1285 fInclusiveElecDphiEta14 = new TH2F("fInclusiveElecDphiEta14", "Inclusive elec-had Dphi correlation for 4<pt^{asso}<10 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1286 fOutputList->Add(fInclusiveElecDphiEta14);
a9123929 1287 fDphiULSMassLowEta1 = new TH2F("fDphiULSMassLowEta1", "e-h Dphi ULS, mass<cut for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1288 fOutputList->Add(fDphiULSMassLowEta1);
a9123929 1289 fDphiULSMassLowEta11 = new TH2F("fDphiULSMassLowEta11", "e-h Dphi ULS, mass<cut for 2<pt^{asso}<4 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1290 fOutputList->Add(fDphiULSMassLowEta11);
a9123929 1291 fDphiULSMassLowEta12 = new TH2F("fDphiULSMassLowEta12", "e-h Dphi ULS, mass<cut for 4<pt^{asso}<6 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1292 fOutputList->Add(fDphiULSMassLowEta12);
a9123929 1293 fDphiULSMassLowEta13 = new TH2F("fDphiULSMassLowEta13", "e-h Dphi ULS, mass<cut for 6<pt^{asso}<8 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1294 fOutputList->Add(fDphiULSMassLowEta13);
a9123929 1295 fDphiULSMassLowEta14 = new TH2F("fDphiULSMassLowEta14", "e-h Dphi ULS, mass<cut for 4<pt^{asso}<10 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1296 fOutputList->Add(fDphiULSMassLowEta14);
a9123929 1297 fDphiLSMassLowEta1 = new TH2F("fDphiLSMassLowEta1", "e-h Dphi LS, mass<cut for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1298 fOutputList->Add(fDphiLSMassLowEta1);
a9123929 1299 fDphiLSMassLowEta11 = new TH2F("fDphiLSMassLowEta11", "e-h Dphi LS, mass<cut for 2<pt^{asso}<4 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1300 fOutputList->Add(fDphiLSMassLowEta11);
a9123929 1301 fDphiLSMassLowEta12 = new TH2F("fDphiLSMassLowEta12", "e-h Dphi LS, mass<cut for 4<pt^{asso}<6 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1302 fOutputList->Add(fDphiLSMassLowEta12);
a9123929 1303 fDphiLSMassLowEta13 = new TH2F("fDphiLSMassLowEta13", "e-h Dphi LS, mass<cut for 6<pt^{asso}<8 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1304 fOutputList->Add(fDphiLSMassLowEta13);
a9123929 1305 fDphiLSMassLowEta14 = new TH2F("fDphiLSMassLowEta14", "e-h Dphi LS, mass<cut for 8<pt^{asso}<10 for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1306 fOutputList->Add(fDphiLSMassLowEta14);
a9123929 1307 fDphiULSMassLowNoPartnerEta1 = new TH2F("fDphiULSMassLowNoPartnerEta1", "e-h Dphi ULS with no partner, mass<mass cut, for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1308 fOutputList->Add(fDphiULSMassLowNoPartnerEta1);
a9123929 1309 fDphiULSMassLowNoPartnerEta11 = new TH2F("fDphiULSMassLowNoPartnerEta11", "e-h Dphi ULS with no partner, mass<mass cut for 2<pt^{asso}<4, for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1310 fOutputList->Add(fDphiULSMassLowNoPartnerEta11);
a9123929 1311 fDphiULSMassLowNoPartnerEta12 = new TH2F("fDphiULSMassLowNoPartnerEta12", "e-h Dphi ULS with no partner, mass<mass cut for 4<pt^{asso}<6, for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1312 fOutputList->Add(fDphiULSMassLowNoPartnerEta12);
a9123929 1313 fDphiULSMassLowNoPartnerEta13 = new TH2F("fDphiULSMassLowNoPartnerEta13", "e-h Dphi ULS with no partner, mass<mass cut for 6<pt^{asso}<8, for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1314 fOutputList->Add(fDphiULSMassLowNoPartnerEta13);
a9123929 1315 fDphiULSMassLowNoPartnerEta14 = new TH2F("fDphiULSMassLowNoPartnerEta14", "e-h Dphi ULS with no partner, mass<mass cut for 4<pt^{asso}<10, for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1316 fOutputList->Add(fDphiULSMassLowNoPartnerEta14);
a9123929 1317 fDphiLSMassLowNoPartnerEta1 = new TH2F("fDphiLSMassLowNoPartnerEta1", "e-h Dphi LS with no partner, mass<mass cut, for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1318 fOutputList->Add(fDphiLSMassLowNoPartnerEta1);
a9123929 1319 fDphiLSMassLowNoPartnerEta11 = new TH2F("fDphiLSMassLowNoPartnerEta11", "e-h Dphi LS with no partner, mass<mass cut for 2<pt^{asso}<4, for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1320 fOutputList->Add(fDphiLSMassLowNoPartnerEta11);
a9123929 1321 fDphiLSMassLowNoPartnerEta12 = new TH2F("fDphiLSMassLowNoPartnerEta12", "e-h Dphi LS with no partner, mass<mass cut for 4<pt^{asso}<6, for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1322 fOutputList->Add(fDphiLSMassLowNoPartnerEta12);
a9123929 1323 fDphiLSMassLowNoPartnerEta13 = new TH2F("fDphiLSMassLowNoPartnerEta13", "e-h Dphi LS with no partner, mass<mass cut for 6<pt^{asso}<8, for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1324 fOutputList->Add(fDphiLSMassLowNoPartnerEta13);
a9123929 1325 fDphiLSMassLowNoPartnerEta14 = new TH2F("fDphiLSMassLowNoPartnerEta14", "e-h Dphi LS with no partner, mass<mass cut for 4<pt^{asso}<10, for |Eta < 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1326 fOutputList->Add(fDphiLSMassLowNoPartnerEta14);
1327
a9123929 1328 fSemiIncElecDphiEta2 = new TH2F("fSemiIncElecDphiEta2", "Semi Inclusive elec-had Dphi correlation for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1329 fOutputList->Add(fSemiIncElecDphiEta2);
a9123929 1330 fSemiIncElecDphiEta21 = new TH2F("fSemiIncElecDphiEta21", "Semi Inclusive elec-had Dphi correlation for 2<pt^{asso}<4 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1331 fOutputList->Add(fSemiIncElecDphiEta21);
a9123929 1332 fSemiIncElecDphiEta22 = new TH2F("fSemiIncElecDphiEta22", "Semi Inclusive elec-had Dphi correlation for 4<pt^{asso}<6 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1333 fOutputList->Add(fSemiIncElecDphiEta22);
a9123929 1334 fSemiIncElecDphiEta23 = new TH2F("fSemiIncElecDphiEta23", "Semi Inclusive elec-had Dphi correlation for 6<pt^{asso}<8 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1335 fOutputList->Add(fSemiIncElecDphiEta23);
a9123929 1336 fSemiIncElecDphiEta24 = new TH2F("fSemiIncElecDphiEta24", "Semi Inclusive elec-had Dphi correlation for 4<pt^{asso}<10 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1337 fOutputList->Add(fSemiIncElecDphiEta24);
a9123929 1338 fPhotElecDphiEta2 = new TH2F("fPhotElecDphiEta2", "Photon elec-had Dphi correlation for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1339 fOutputList->Add(fPhotElecDphiEta2);
a9123929 1340 fPhotElecDphiEta21 = new TH2F("fPhotElecDphiEta21", "Photon elec-had Dphi correlation for 2<pt^{asso}<4 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1341 fOutputList->Add(fPhotElecDphiEta21);
a9123929 1342 fPhotElecDphiEta22 = new TH2F("fPhotElecDphiEta22", "Photon elec-had Dphi correlation for 4<pt^{asso}<6 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1343 fOutputList->Add(fPhotElecDphiEta22);
a9123929 1344 fPhotElecDphiEta23 = new TH2F("fPhotElecDphiEta23", "Photon elec-had Dphi correlation for 6<pt^{asso}<8 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1345 fOutputList->Add(fPhotElecDphiEta23);
a9123929 1346 fPhotElecDphiEta24 = new TH2F("fPhotElecDphiEta24", "Photon elec-had Dphi correlation for 4<pt^{asso}<10 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1347 fOutputList->Add(fPhotElecDphiEta24);
a9123929 1348 fInclusiveElecDphiEta2 = new TH2F("fInclusiveElecDphiEta2", "Inclusive elec-had Dphi correlation for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1349 fOutputList->Add(fInclusiveElecDphiEta2);
a9123929 1350 fInclusiveElecDphiEta21 = new TH2F("fInclusiveElecDphiEta21", "Inclusive elec-had Dphi correlation for 2<pt^{asso}<4 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1351 fOutputList->Add(fInclusiveElecDphiEta21);
a9123929 1352 fInclusiveElecDphiEta22 = new TH2F("fInclusiveElecDphiEta22", "Inclusive elec-had Dphi correlation for 4<pt^{asso}<6 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1353 fOutputList->Add(fInclusiveElecDphiEta22);
a9123929 1354 fInclusiveElecDphiEta23 = new TH2F("fInclusiveElecDphiEta23", "Inclusive elec-had Dphi correlation for 6<pt^{asso}<8 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1355 fOutputList->Add(fInclusiveElecDphiEta23);
a9123929 1356 fInclusiveElecDphiEta24 = new TH2F("fInclusiveElecDphiEta24", "Inclusive elec-had Dphi correlation for 4<pt^{asso}<10 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1357 fOutputList->Add(fInclusiveElecDphiEta24);
a9123929 1358 fDphiULSMassLowEta2 = new TH2F("fDphiULSMassLowEta2", "e-h Dphi ULS, mass<cut for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1359 fOutputList->Add(fDphiULSMassLowEta2);
a9123929 1360 fDphiULSMassLowEta21 = new TH2F("fDphiULSMassLowEta21", "e-h Dphi ULS, mass<cut for 2<pt^{asso}<4 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1361 fOutputList->Add(fDphiULSMassLowEta21);
a9123929 1362 fDphiULSMassLowEta22 = new TH2F("fDphiULSMassLowEta22", "e-h Dphi ULS, mass<cut for 4<pt^{asso}<6 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1363 fOutputList->Add(fDphiULSMassLowEta22);
a9123929 1364 fDphiULSMassLowEta23 = new TH2F("fDphiULSMassLowEta23", "e-h Dphi ULS, mass<cut for 6<pt^{asso}<8 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1365 fOutputList->Add(fDphiULSMassLowEta23);
a9123929 1366 fDphiULSMassLowEta24 = new TH2F("fDphiULSMassLowEta24", "e-h Dphi ULS, mass<cut for 4<pt^{asso}<10 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1367 fOutputList->Add(fDphiULSMassLowEta24);
a9123929 1368 fDphiLSMassLowEta2 = new TH2F("fDphiLSMassLowEta2", "e-h Dphi LS, mass<cut for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1369 fOutputList->Add(fDphiLSMassLowEta2);
a9123929 1370 fDphiLSMassLowEta21 = new TH2F("fDphiLSMassLowEta21", "e-h Dphi LS, mass<cut for 2<pt^{asso}<4 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1371 fOutputList->Add(fDphiLSMassLowEta21);
a9123929 1372 fDphiLSMassLowEta22 = new TH2F("fDphiLSMassLowEta22", "e-h Dphi LS, mass<cut for 4<pt^{asso}<6 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1373 fOutputList->Add(fDphiLSMassLowEta22);
a9123929 1374 fDphiLSMassLowEta23 = new TH2F("fDphiLSMassLowEta23", "e-h Dphi LS, mass<cut for 6<pt^{asso}<8 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1375 fOutputList->Add(fDphiLSMassLowEta23);
a9123929 1376 fDphiLSMassLowEta24 = new TH2F("fDphiLSMassLowEta24", "e-h Dphi LS, mass<cut for 4<pt^{asso}<10 for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1377 fOutputList->Add(fDphiLSMassLowEta24);
a9123929 1378 fDphiULSMassLowNoPartnerEta2 = new TH2F("fDphiULSMassLowNoPartnerEta2", "e-h Dphi ULS with no partner, mass<mass cut, for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1379 fOutputList->Add(fDphiULSMassLowNoPartnerEta2);
a9123929 1380 fDphiULSMassLowNoPartnerEta21 = new TH2F("fDphiULSMassLowNoPartnerEta21", "e-h Dphi ULS with no partner, mass<mass cut for 2<pt^{asso}<4, for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1381 fOutputList->Add(fDphiULSMassLowNoPartnerEta21);
a9123929 1382 fDphiULSMassLowNoPartnerEta22 = new TH2F("fDphiULSMassLowNoPartnerEta22", "e-h Dphi ULS with no partner, mass<mass cut for 4<pt^{asso}<6, for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1383 fOutputList->Add(fDphiULSMassLowNoPartnerEta22);
a9123929 1384 fDphiULSMassLowNoPartnerEta23 = new TH2F("fDphiULSMassLowNoPartnerEta23", "e-h Dphi ULS with no partner, mass<mass cut for 6<pt^{asso}<8, for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1385 fOutputList->Add(fDphiULSMassLowNoPartnerEta23);
a9123929 1386 fDphiULSMassLowNoPartnerEta24 = new TH2F("fDphiULSMassLowNoPartnerEta24", "e-h Dphi ULS with no partner, mass<mass cut for 4<pt^{asso}<10, for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1387 fOutputList->Add(fDphiULSMassLowNoPartnerEta24);
a9123929 1388 fDphiLSMassLowNoPartnerEta2 = new TH2F("fDphiLSMassLowNoPartnerEta2", "e-h Dphi LS with no partner, mass<mass cut, for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1389 fOutputList->Add(fDphiLSMassLowNoPartnerEta2);
a9123929 1390 fDphiLSMassLowNoPartnerEta21 = new TH2F("fDphiLSMassLowNoPartnerEta21", "e-h Dphi LS with no partner, mass<mass cut for 2<pt^{asso}<4, for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1391 fOutputList->Add(fDphiLSMassLowNoPartnerEta21);
a9123929 1392 fDphiLSMassLowNoPartnerEta22 = new TH2F("fDphiLSMassLowNoPartnerEta22", "e-h Dphi LS with no partner, mass<mass cut for 4<pt^{asso}<6, for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1393 fOutputList->Add(fDphiLSMassLowNoPartnerEta22);
a9123929 1394 fDphiLSMassLowNoPartnerEta23 = new TH2F("fDphiLSMassLowNoPartnerEta23", "e-h Dphi LS with no partner, mass<mass cut for 6<pt^{asso}<8, for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1395 fOutputList->Add(fDphiLSMassLowNoPartnerEta23);
a9123929 1396 fDphiLSMassLowNoPartnerEta24 = new TH2F("fDphiLSMassLowNoPartnerEta24", "e-h Dphi LS with no partner, mass<mass cut for 4<pt^{asso}<10, for |Eta > 0.8|",200,0,20,64,-1.57,4.71);
bf697dda 1397 fOutputList->Add(fDphiLSMassLowNoPartnerEta24);
1398
1399 /* fNCellv1 = new TH1F("fNCellv1","Ncell in clus (v1); NCell; count",100,0,100) ;
1400 fOutputList->Add(fNCellv1);
1401
1402 fClsEv1 = new TH1F("fClsEv1", "Clus E(v1); Cls E; count",1000,0,100);
1403 fOutputList->Add(fClsEv1);
1404
1405 fNClusv1 = new TH1F("fNClusv1","Nclus in event (v1); NClus; count",500,0,500) ;
1406 fOutputList->Add(fNClusv1);
1407 */
33369c14 1408 fInvmassLS1 = new TH1F("fInvmassLS1", "Inv mass of LS (e,e) for pt^{e}>2; mass(GeV/c^2); counts;", 1000,0,1.0);
520a29a8 1409 fOutputList->Add(fInvmassLS1);
1410
33369c14 1411 fInvmassULS1 = new TH1F("fInvmassULS1", "Inv mass of ULS (e,e) for pt^{e}>2; mass(GeV/c^2); counts;", 1000,0,1.0);
520a29a8 1412 fOutputList->Add(fInvmassULS1);
bf697dda 1413 /*
1414 fInvmassLS2 = new TH1F("fInvmassLS2", "Inv mass of LS (e,e) for pt^{e}>1; mass(GeV/c^2); counts;", 1000,0,1.0);
1415 fOutputList->Add(fInvmassLS2);
487ae960 1416
bf697dda 1417 fInvmassULS2 = new TH1F("fInvmassULS2", "Inv mass of ULS (e,e) for pt^{e}>1; mass(GeV/c^2); counts;", 1000,0,1.0);
1418 fOutputList->Add(fInvmassULS2);
487ae960 1419
bf697dda 1420 fInvmassLS3 = new TH1F("fInvmassLS3", "Inv mass of LS (e,e) for pt^{e}>2; mass(GeV/c^2); counts;", 1000,0,1.0);
1421 fOutputList->Add(fInvmassLS3);
487ae960 1422
bf697dda 1423 fInvmassULS3 = new TH1F("fInvmassULS3", "Inv mass of ULS (e,e) for pt^{e}>2; mass(GeV/c^2); counts;", 1000,0,1.0);
1424 fOutputList->Add(fInvmassULS3);
487ae960 1425
bf697dda 1426 fInvmassLS4 = new TH1F("fInvmassLS4", "Inv mass of LS (e,e) for pt^{e}>3; mass(GeV/c^2); counts;", 1000,0,1.0);
1427 fOutputList->Add(fInvmassLS4);
487ae960 1428
bf697dda 1429 fInvmassULS4 = new TH1F("fInvmassULS4", "Inv mass of ULS (e,e) for pt^{e}>3; mass(GeV/c^2); counts;", 1000,0,1.0);
1430 fOutputList->Add(fInvmassULS4);
487ae960 1431
bf697dda 1432 fInvmassLS5 = new TH1F("fInvmassLS5", "Inv mass of LS (e,e) for pt^{e}>4; mass(GeV/c^2); counts;", 1000,0,1.0);
1433 fOutputList->Add(fInvmassLS5);
487ae960 1434
bf697dda 1435 fInvmassULS5 = new TH1F("fInvmassULS5", "Inv mass of ULS (e,e) for pt^{e}>4; mass(GeV/c^2); counts;", 1000,0,1.0);
1436 fOutputList->Add(fInvmassULS5);
1437 */
3db57d71 1438 fNoMixedEvents = new TH1F("fNoMixedEvents","",1,0,1) ;
a9123929 1439 fOutputList->Add(fNoMixedEvents);
4e01b68c 1440
a9123929 1441 fMixStat = new TH2F("fMixStat","no of events in pool vs Centrality;Nevent in pool;Centrality",200,0,200,5,0,10);
1442 fOutputList->Add(fMixStat);
4e01b68c 1443
a9123929 1444 fMixStat1 = new TH2F("fMixStat1","no of events in pool vs zvtx;Nevents in pool;zvtx",200,0,200,4,-10,10);
1445 fOutputList->Add(fMixStat1);
4e01b68c 1446
7e02de85 1447 fMixedIncElecDphi = new TH2F("fMixedIncElecDphi", "Mixed event - Inclusive elec-had Dphi correlation",200,0,20,64,-1.57,4.71);
a9123929 1448 fOutputList->Add(fMixedIncElecDphi);
4e01b68c 1449
7e02de85 1450 fMixedIncElecDphi1 = new TH2F("fMixedIncElecDphi1", "Mixed event - Inclusive elec-had Dphi correlation 2<pt<4",200,0,20,64,-1.57,4.71);
a9123929 1451 fOutputList->Add(fMixedIncElecDphi1);
3c56855b 1452
7e02de85 1453 fMixedIncElecDphi2 = new TH2F("fMixedIncElecDphi2", "Mixed event - Inclusive elec-had Dphi correlation 4<pt<6",200,0,20,64,-1.57,4.71);
a9123929 1454 fOutputList->Add(fMixedIncElecDphi2);
3c56855b 1455
7e02de85 1456 fMixedIncElecDphi3 = new TH2F("fMixedIncElecDphi3", "Mixed event - Inclusive elec-had Dphi correlation 6<pt<8",200,0,20,64,-1.57,4.71);
a9123929 1457 fOutputList->Add(fMixedIncElecDphi3);
4e01b68c 1458
7e02de85 1459 fMixedIncElecDphi4 = new TH2F("fMixedIncElecDphi4", "Mixed event - Inclusive elec-had Dphi correlation 4<pt<10",200,0,20,64,-1.57,4.71);
a9123929 1460 fOutputList->Add(fMixedIncElecDphi4);
3c56855b 1461
7e02de85 1462 fMixedSemiIncElecDphi = new TH2F("fMixedSemiIncElecDphi", "Mixed event - Semi Inclusive elec-had Dphi correlation",200,0,20,64,-1.57,4.71);
a9123929 1463 fOutputList->Add(fMixedSemiIncElecDphi);
3c56855b 1464
7e02de85 1465 fMixedSemiIncElecDphi1 = new TH2F("fMixedSemiIncElecDphi1", "Mixed event - Semi Inclusive elec-had Dphi correlation 2<pt<4",200,0,20,64,-1.57,4.71);
a9123929 1466 fOutputList->Add(fMixedSemiIncElecDphi1);
4e01b68c 1467
7e02de85 1468 fMixedSemiIncElecDphi2 = new TH2F("fMixedSemiIncElecDphi2", "Mixed event - Semi Inclusive elec-had Dphi correlation 4<pt<6",200,0,20,64,-1.57,4.71);
a9123929 1469 fOutputList->Add(fMixedSemiIncElecDphi2);
3c56855b 1470
7e02de85 1471 fMixedSemiIncElecDphi3 = new TH2F("fMixedSemiIncElecDphi3", "Mixed event - Semi Inclusive elec-had Dphi correlation 6<pt<8",200,0,20,64,-1.57,4.71);
a9123929 1472 fOutputList->Add(fMixedSemiIncElecDphi3);
3c56855b 1473
7e02de85 1474 fMixedSemiIncElecDphi4 = new TH2F("fMixedSemiIncElecDphi4", "Mixed event - Semi Inclusive elec-had Dphi correlation 4<pt<10",200,0,20,64,-1.57,4.71);
a9123929 1475 fOutputList->Add(fMixedSemiIncElecDphi4);
4e01b68c 1476
7e02de85 1477 fMixedPhotElecDphi = new TH2F("fMixedPhotElecDphi", "Mixed event - Photo elec-had Dphi correlation",200,0,20,64,-1.57,4.71);
a9123929 1478 fOutputList->Add(fMixedPhotElecDphi);
3c56855b 1479
7e02de85 1480 fMixedPhotElecDphi1 = new TH2F("fMixedPhotElecDphi1", "Mixed event - Photo elec-had Dphi correlation 2<pt<4",200,0,20,64,-1.57,4.71);
a9123929 1481 fOutputList->Add(fMixedPhotElecDphi1);
3c56855b 1482
7e02de85 1483 fMixedPhotElecDphi2 = new TH2F("fMixedPhotElecDphi2", "Mixed event - Photo elec-had Dphi correlation 4<pt<6",200,0,20,64,-1.57,4.71);
a9123929 1484 fOutputList->Add(fMixedPhotElecDphi2);
3c56855b 1485
7e02de85 1486 fMixedPhotElecDphi3 = new TH2F("fMixedPhotElecDphi3", "Mixed event - Photo elec-had Dphi correlation 6<pt<8",200,0,20,64,-1.57,4.71);
a9123929 1487 fOutputList->Add(fMixedPhotElecDphi3);
1488
7e02de85 1489 fMixedPhotElecDphi4 = new TH2F("fMixedPhotElecDphi4", "Mixed event - Photo elec-had Dphi correlation 4<pt<10",200,0,20,64,-1.57,4.71);
a9123929 1490 fOutputList->Add(fMixedPhotElecDphi4);
1491
7e02de85 1492 fMixedDphiULSMassLow = new TH2F("fMixedDphiULSMassLow", "Mixed event - ULS mass < cut elec-had Dphi correlation",200,0,20,64,-1.57,4.71);
a9123929 1493 fOutputList->Add(fMixedDphiULSMassLow);
1494
7e02de85 1495 fMixedDphiULSMassLow1 = new TH2F("fMixedDphiULSMassLow1", "Mixed event - ULS mass < cut elec-had Dphi correlation 2<pt<4",200,0,20,64,-1.57,4.71);
a9123929 1496 fOutputList->Add(fMixedDphiULSMassLow1);
1497
7e02de85 1498 fMixedDphiULSMassLow2 = new TH2F("fMixedDphiULSMassLow2", "Mixed event - ULS mass < cut elec-had Dphi correlation 4<pt<6",200,0,20,64,-1.57,4.71);
a9123929 1499 fOutputList->Add(fMixedDphiULSMassLow2);
1500
7e02de85 1501 fMixedDphiULSMassLow3 = new TH2F("fMixedDphiULSMassLow3", "Mixed event - ULS mass < cut elec-had Dphi correlation 6<pt<8",200,0,20,64,-1.57,4.71);
a9123929 1502 fOutputList->Add(fMixedDphiULSMassLow3);
1503
7e02de85 1504 fMixedDphiULSMassLow4 = new TH2F("fMixedDphiULSMassLow4", "Mixed event - ULS mass < cut elec-had Dphi correlation 4<pt<10",200,0,20,64,-1.57,4.71);
a9123929 1505 fOutputList->Add(fMixedDphiULSMassLow4);
1506
7e02de85 1507 fMixedDphiLSMassLow = new TH2F("fMixedDphiLSMassLow", "Mixed event - LS mass < cut elec-had Dphi correlation",200,0,20,64,-1.57,4.71);
a9123929 1508 fOutputList->Add(fMixedDphiLSMassLow);
1509
7e02de85 1510 fMixedDphiLSMassLow1 = new TH2F("fMixedDphiLSMassLow1", "Mixed event - LS mass < cut elec-had Dphi correlation 2<pt<4",200,0,20,64,-1.57,4.71);
a9123929 1511 fOutputList->Add(fMixedDphiLSMassLow1);
1512
7e02de85 1513 fMixedDphiLSMassLow2 = new TH2F("fMixedDphiLSMassLow2", "Mixed event - LS mass < cut elec-had Dphi correlation 4<pt<6",200,0,20,64,-1.57,4.71);
a9123929 1514 fOutputList->Add(fMixedDphiLSMassLow2);
1515
7e02de85 1516 fMixedDphiLSMassLow3 = new TH2F("fMixedDphiLSMassLow3", "Mixed event - LS mass < cut elec-had Dphi correlation 6<pt<8",200,0,20,64,-1.57,4.71);
a9123929 1517 fOutputList->Add(fMixedDphiLSMassLow3);
1518
7e02de85 1519 fMixedDphiLSMassLow4 = new TH2F("fMixedDphiLSMassLow4", "Mixed event - LS mass < cut elec-had Dphi correlation 4<pt<10",200,0,20,64,-1.57,4.71);
a9123929 1520 fOutputList->Add(fMixedDphiLSMassLow4);
3db57d71 1521
3c56855b 1522 fHadronPt = new TH1F("fHadronPt","hadron pt distribution",1000,0,100);
1523 fOutputList->Add(fHadronPt);
1524
1525 fCentralityPass = new TH1F("fCentralityPass", "Centrality Pass", 101, -1, 100);
1526 fOutputList->Add(fCentralityPass);
1527
1528 fCentralityNoPass = new TH1F("fCentralityNoPass", "Centrality No Pass", 101, -1, 100);
1529 fOutputList->Add(fCentralityNoPass);
1530
0841d73f 1531 fHadronDphi = new TH2F("fHadronDphi", "Hadron-had Dphi correlation",200,0,20,64,-1.57,4.71);
1532 fOutputList->Add(fHadronDphi);
1533
a9123929 1534 fHadronDphi1 = new TH2F("fHadronDphi1", "Hadron-had Dphi correlation for 2<pt^{asso}<4",200,0,20,64,-1.57,4.71);
0841d73f 1535 fOutputList->Add(fHadronDphi1);
1536
a9123929 1537 fHadronDphi2 = new TH2F("fHadronDphi2", "Hadron-had Dphi correlation for 4<pt^{asso}<6",200,0,20,64,-1.57,4.71);
0841d73f 1538 fOutputList->Add(fHadronDphi2);
1539
a9123929 1540 fHadronDphi3 = new TH2F("fHadronDphi3", "Hadron-had Dphi correlation for 6<pt^{asso}<8",200,0,20,64,-1.57,4.71);
0841d73f 1541 fOutputList->Add(fHadronDphi3);
1542
a9123929 1543 fHadronDphi4 = new TH2F("fHadronDphi4", "Hadron-had Dphi correlation for 4<pt^{asso}<10",200,0,20,64,-1.57,4.71);
0841d73f 1544 fOutputList->Add(fHadronDphi4);
1545
33369c14 1546 fPiPt = new TH1F("fPiPt","Pi (-10 <TPC nsig < -3.5) pt distribution",1000,0,100);
0841d73f 1547 fOutputList->Add(fPiPt);
1548
33369c14 1549 fHadronDphiNoSS = new TH2F("fHadronDphiNoSS", "Hadron-had Dphi correlation (NoSS cuts)",200,0,20,64,-1.57,4.71);
1550 fOutputList->Add(fHadronDphiNoSS);
1551
a9123929 1552 fHadronDphiNoSS1 = new TH2F("fHadronDphiNoSS1", "Hadron-had Dphi correlation (NoSS cuts) for 2<pt^{asso}<4",200,0,20,64,-1.57,4.71);
33369c14 1553 fOutputList->Add(fHadronDphiNoSS1);
1554
a9123929 1555 fHadronDphiNoSS2 = new TH2F("fHadronDphiNoSS2", "Hadron-had Dphi correlation (NoSS cuts) for 4<pt^{asso}<6",200,0,20,64,-1.57,4.71);
33369c14 1556 fOutputList->Add(fHadronDphiNoSS2);
1557
a9123929 1558 fHadronDphiNoSS3 = new TH2F("fHadronDphiNoSS3", "Hadron-had Dphi correlation (NoSS cuts) for 6<pt^{asso}<8",200,0,20,64,-1.57,4.71);
33369c14 1559 fOutputList->Add(fHadronDphiNoSS3);
1560
a9123929 1561 fHadronDphiNoSS4 = new TH2F("fHadronDphiNoSS4", "Hadron-had Dphi correlation (NoSS cuts) for 4<pt^{asso}<10",200,0,20,64,-1.57,4.71);
33369c14 1562 fOutputList->Add(fHadronDphiNoSS4);
1563
1564 fPiPtNoSS = new TH1F("fPiPtNoSS","Pi (-10 <TPC nsig < -3.5) (NoSS cuts) pt distribution",1000,0,100);
1565 fOutputList->Add(fPiPtNoSS);
1566
bf697dda 1567 fEovPWoSS = new TH2F("fEovPWoSS","E/p distribution without SS cuts",1000,0,50,100,0,2);
1568 fOutputList->Add(fEovPWoSS);
1569
1570 fEovPWSS = new TH2F("fEovPWSS","E/p distribution with SS cuts",1000,0,50,100,0,2);
1571 fOutputList->Add(fEovPWSS);
1572
1573 fEovPHadWoSS = new TH2F("fEovPHadWoSS","E/p distribution for hadrons without SS cuts",1000,0,50,100,0,2);
1574 fOutputList->Add(fEovPHadWoSS);
1575
1576 fEovPHadWSS = new TH2F("fEovPHadWSS","E/p distribution for hadrons with SS cuts",1000,0,50,100,0,2);
1577 fOutputList->Add(fEovPHadWSS);
1578
0c884279 1579 fHadronDphiEta1 = new TH2F("fHadronDphiEta1", "Hadron-had Dphi correlation for |Eta <1|",200,0,20,64,-1.57,4.71);
1580 fOutputList->Add(fHadronDphiEta1);
a9123929 1581 fHadronDphiEta11 = new TH2F("fHadronDphiEta11", "Hadron-had Dphi correlation for 2<pt^{asso}<4 for |Eta <1|",200,0,20,64,-1.57,4.71);
0c884279 1582 fOutputList->Add(fHadronDphiEta11);
a9123929 1583 fHadronDphiEta12 = new TH2F("fHadronDphiEta12", "Hadron-had Dphi correlation for 4<pt^{asso}<6 for |Eta <1|",200,0,20,64,-1.57,4.71);
0c884279 1584 fOutputList->Add(fHadronDphiEta12);
a9123929 1585 fHadronDphiEta13 = new TH2F("fHadronDphiEta13", "Hadron-had Dphi correlation for 6<pt^{asso}<8 for |Eta <1|",200,0,20,64,-1.57,4.71);
0c884279 1586 fOutputList->Add(fHadronDphiEta13);
a9123929 1587 fHadronDphiEta14 = new TH2F("fHadronDphiEta14", "Hadron-had Dphi correlation for 8<pt^{asso}<10 for |Eta <1|",200,0,20,64,-1.57,4.71);
0c884279 1588 fOutputList->Add(fHadronDphiEta14);
1589
1590 fHadronDphiNoSSEta1 = new TH2F("fHadronDphiNoSSEta1", "Hadron-had DphiNoSS correlation for |Eta <1|",200,0,20,64,-1.57,4.71);
1591 fOutputList->Add(fHadronDphiNoSSEta1);
a9123929 1592 fHadronDphiNoSSEta11 = new TH2F("fHadronDphiNoSSEta11", "Hadron-had DphiNoSS correlation for 2<pt^{asso}<4 for |Eta <1|",200,0,20,64,-1.57,4.71);
0c884279 1593 fOutputList->Add(fHadronDphiNoSSEta11);
a9123929 1594 fHadronDphiNoSSEta12 = new TH2F("fHadronDphiNoSSEta12", "Hadron-had DphiNoSS correlation for 4<pt^{asso}<6 for |Eta <1|",200,0,20,64,-1.57,4.71);
0c884279 1595 fOutputList->Add(fHadronDphiNoSSEta12);
a9123929 1596 fHadronDphiNoSSEta13 = new TH2F("fHadronDphiNoSSEta13", "Hadron-had DphiNoSS correlation for 6<pt^{asso}<8 for |Eta <1|",200,0,20,64,-1.57,4.71);
0c884279 1597 fOutputList->Add(fHadronDphiNoSSEta13);
a9123929 1598 fHadronDphiNoSSEta14 = new TH2F("fHadronDphiNoSSEta14", "Hadron-had DphiNoSS correlation for 4<pt^{asso}<10 for |Eta <1|",200,0,20,64,-1.57,4.71);
0c884279 1599 fOutputList->Add(fHadronDphiNoSSEta14);
1600
1601 fHadronDphiEta2 = new TH2F("fHadronDphiEta2", "Hadron-had Dphi correlation for |Eta >1|",200,0,20,64,-1.57,4.71);
1602 fOutputList->Add(fHadronDphiEta2);
a9123929 1603 fHadronDphiEta21 = new TH2F("fHadronDphiEta21", "Hadron-had Dphi correlation for 2<pt^{asso}<4 for |Eta >1|",200,0,20,64,-1.57,4.71);
0c884279 1604 fOutputList->Add(fHadronDphiEta21);
a9123929 1605 fHadronDphiEta22 = new TH2F("fHadronDphiEta22", "Hadron-had Dphi correlation for 4<pt^{asso}<6 for |Eta >1|",200,0,20,64,-1.57,4.71);
0c884279 1606 fOutputList->Add(fHadronDphiEta22);
a9123929 1607 fHadronDphiEta23 = new TH2F("fHadronDphiEta23", "Hadron-had Dphi correlation for 6<pt^{asso}<8 for |Eta >1|",200,0,20,64,-1.57,4.71);
0c884279 1608 fOutputList->Add(fHadronDphiEta23);
a9123929 1609 fHadronDphiEta24 = new TH2F("fHadronDphiEta24", "Hadron-had Dphi correlation for 4<pt^{asso}<10 for |Eta >1|",200,0,20,64,-1.57,4.71);
0c884279 1610 fOutputList->Add(fHadronDphiEta24);
1611
1612 fHadronDphiNoSSEta2 = new TH2F("fHadronDphiNoSSEta2", "Hadron-had DphiNoSS correlation for |Eta >1|",200,0,20,64,-1.57,4.71);
1613 fOutputList->Add(fHadronDphiNoSSEta2);
a9123929 1614 fHadronDphiNoSSEta21 = new TH2F("fHadronDphiNoSSEta21", "Hadron-had DphiNoSS correlation for 2<pt^{asso}<4 for |Eta >1|",200,0,20,64,-1.57,4.71);
0c884279 1615 fOutputList->Add(fHadronDphiNoSSEta21);
a9123929 1616 fHadronDphiNoSSEta22 = new TH2F("fHadronDphiNoSSEta22", "Hadron-had DphiNoSS correlation for 4<pt^{asso}<6 for |Eta >1|",200,0,20,64,-1.57,4.71);
0c884279 1617 fOutputList->Add(fHadronDphiNoSSEta22);
a9123929 1618 fHadronDphiNoSSEta23 = new TH2F("fHadronDphiNoSSEta23", "Hadron-had DphiNoSS correlation for 6<pt^{asso}<8 for |Eta >1|",200,0,20,64,-1.57,4.71);
0c884279 1619 fOutputList->Add(fHadronDphiNoSSEta23);
a9123929 1620 fHadronDphiNoSSEta24 = new TH2F("fHadronDphiNoSSEta24", "Hadron-had DphiNoSS correlation for 4<pt^{asso}<10 for |Eta >1|",200,0,20,64,-1.57,4.71);
0c884279 1621 fOutputList->Add(fHadronDphiNoSSEta24);
1622
1623
bf697dda 1624 // Int_t binsv1[6]={500,200,50,50,50,50}; //pt, TPCnsig, E/p, M20, M02, dispersion
1625 // Double_t xminv1[6]={0,-10,0,0,0,0};
1626 // Double_t xmaxv1[6]={25,10,2,2,2,2};
1627 // fSparseElectron = new THnSparseD ("Electron","Electron",6,binsv1,xminv1,xmaxv1);
1628 // fOutputList->Add(fSparseElectron);
33369c14 1629
57189f04 1630 PostData(1,fOutputList);
1631}
1632
1633//________________________________________________________________________
1634void AliAnalysisTaskElecHadronCorrel::Terminate(Option_t *)
1635{
1636 // Info("Terminate");
520a29a8 1637 AliAnalysisTaskSE::Terminate();
57189f04 1638}
1639
1640//________________________________________________________________________
1641Bool_t AliAnalysisTaskElecHadronCorrel::ProcessCutStep(Int_t cutStep, AliVParticle *track)
1642{
1643 // Check single track cuts for a given cut step
1644 const Int_t kMCOffset = AliHFEcuts::kNcutStepsMCTrack;
1645 if(!fCFM->CheckParticleCuts(cutStep + kMCOffset, track)) return kFALSE;
1646 return kTRUE;
1647}
987053ce 1648
57189f04 1649//_________________________________________
987053ce 1650void AliAnalysisTaskElecHadronCorrel::SelectPhotonicElectron(Int_t itrack, AliVTrack *track, Bool_t &fFlagPhotonicElec)
57189f04 1651{
1652 //Identify non-heavy flavour electrons using Invariant mass method
520a29a8 1653
57189f04 1654 fTrackCuts1->SetAcceptKinkDaughters(kFALSE);
1655 fTrackCuts1->SetRequireTPCRefit(kTRUE);
28ea601a 1656 fTrackCuts1->SetRequireITSRefit(fAssoEleITSref);
57189f04 1657 fTrackCuts1->SetEtaRange(-0.9,0.9);
1658 fTrackCuts1->SetRequireSigmaToVertex(kTRUE);
e4b0faf2 1659 fTrackCuts1->SetMaxChi2PerClusterTPC(4);
57189f04 1660 fTrackCuts1->SetMinNClustersTPC(80);
987053ce 1661 fTrackCuts1->SetMaxDCAToVertexZ(3.2);
1662 fTrackCuts1->SetMaxDCAToVertexXY(2.4);
1663 fTrackCuts1->SetDCAToVertex2D(kTRUE);
520a29a8 1664
57189f04 1665 Bool_t flagPhotonicElec = kFALSE;
520a29a8 1666
987053ce 1667 for(Int_t jTracks = 0; jTracks<fVevent->GetNumberOfTracks(); jTracks++){
1668 AliVParticle* VtrackAsso = fVevent->GetTrack(jTracks);
1669 if (!VtrackAsso) {
57189f04 1670 printf("ERROR: Could not receive track %d\n", jTracks);
1671 continue;
1672 }
987053ce 1673
1674 AliVTrack *trackAsso = dynamic_cast<AliVTrack*>(VtrackAsso);
7e02de85 1675 if(!trackAsso) continue;
987053ce 1676
1677 //track cuts applied
1678 if(IsAODanalysis()) {
1679 AliAODTrack *atrackAsso = dynamic_cast<AliAODTrack*>(VtrackAsso);
7e02de85 1680 if(!atrackAsso) continue;
987053ce 1681 if(!atrackAsso->TestFilterMask(AliAODTrack::kTrkTPCOnly)) continue;
1682 if(atrackAsso->GetTPCNcls() < 80) continue;
28ea601a 1683 if(!(atrackAsso->GetStatus()&AliESDtrack::kTPCrefit)) continue;
1684
1685 if(fAssoEleITSref){
1686 if(!(atrackAsso->GetStatus()&AliESDtrack::kITSrefit)) continue;
1687 }
987053ce 1688 }
1689 else{
1690 AliESDtrack *etrackAsso = dynamic_cast<AliESDtrack*>(VtrackAsso);
7e02de85 1691 if(!etrackAsso) continue;
987053ce 1692 if(!fTrackCuts1->AcceptTrack(etrackAsso)) continue;
1693 }
1694
e4b0faf2 1695 if(jTracks==itrack) continue;
520a29a8 1696
987053ce 1697 Double_t dEdxAsso = -999., ptAsso=-999., nsigma=-999.0;
520a29a8 1698 Double_t mass=-999., width = -999;
57189f04 1699 Bool_t fFlagLS=kFALSE, fFlagULS=kFALSE;
520a29a8 1700
57189f04 1701 dEdxAsso = trackAsso->GetTPCsignal();
487ae960 1702 nsigma = fPID->GetPIDResponse() ? fPID->GetPIDResponse()->NumberOfSigmasTPC(trackAsso, AliPID::kElectron) : 1000;
57189f04 1703 ptAsso = trackAsso->Pt();
1704 Int_t chargeAsso = trackAsso->Charge();
1705 Int_t charge = track->Charge();
520a29a8 1706
57189f04 1707 if(ptAsso <0.3) continue;
3c56855b 1708 if(trackAsso->Eta()<-0.9 || trackAsso->Eta()>0.9) continue;
487ae960 1709 if(nsigma < -3 || nsigma > 3) continue;
520a29a8 1710
57189f04 1711 Int_t fPDGe1 = 11; Int_t fPDGe2 = 11;
1712 if(charge>0) fPDGe1 = -11;
1713 if(chargeAsso>0) fPDGe2 = -11;
520a29a8 1714
57189f04 1715 if(charge == chargeAsso) fFlagLS = kTRUE;
1716 if(charge != chargeAsso) fFlagULS = kTRUE;
520a29a8 1717
1718 AliKFParticle ge1 = AliKFParticle(*track, fPDGe1);
1719 AliKFParticle ge2 = AliKFParticle(*trackAsso, fPDGe2);
57189f04 1720 AliKFParticle recg(ge1, ge2);
3c56855b 1721
57189f04 1722 if(recg.GetNDF()<1) continue;
1723 Double_t chi2recg = recg.GetChi2()/recg.GetNDF();
1724 if(TMath::Sqrt(TMath::Abs(chi2recg))>3.) continue;
520a29a8 1725
3c56855b 1726 Int_t MassCorrect;
1727 MassCorrect = recg.GetMass(mass,width);
520a29a8 1728
487ae960 1729 if(fFlagLS) {
33369c14 1730 if(track->Pt()>2)fInvmassLS1->Fill(mass);
a9123929 1731 // if(track->Pt()> 1) fInvmassLS2->Fill(mass);
1732 // if(track->Pt()>2) fInvmassLS3->Fill(mass);
1733 // if(track->Pt()>3) fInvmassLS4->Fill(mass);
1734 // if(track->Pt()>4) fInvmassLS5->Fill(mass);
487ae960 1735 }
1736 if(fFlagULS) {
33369c14 1737 if(track->Pt()>2)fInvmassULS1->Fill(mass);
1738 //if(track->Pt() >1) fInvmassULS2->Fill(mass);
1739 //if(track->Pt() >2) fInvmassULS3->Fill(mass);
1740 //if(track->Pt() >3) fInvmassULS4->Fill(mass);
1741 //if(track->Pt() >4) fInvmassULS5->Fill(mass);
487ae960 1742 }
520a29a8 1743
520a29a8 1744 if(mass<fInvmassCut){
1745 if(fFlagULS)
1746 {
487ae960 1747 ElectronHadCorrel(itrack,track,fDphiULSMassLow, fDphiULSMassLow1,fDphiULSMassLow2,fDphiULSMassLow3,fDphiULSMassLow4);
bf697dda 1748 ElectronHadCorrelEtaBins(itrack,track,fDphiULSMassLowEta1, fDphiULSMassLowEta11,fDphiULSMassLowEta12,fDphiULSMassLowEta13,fDphiULSMassLowEta14,fDphiULSMassLowEta2, fDphiULSMassLowEta21,fDphiULSMassLowEta22,fDphiULSMassLowEta23,fDphiULSMassLowEta24);
520a29a8 1749 fULSElecPt->Fill(track->Pt());
3db57d71 1750 MixedEvent(track,fMixedDphiULSMassLow,fMixedDphiULSMassLow1,fMixedDphiULSMassLow2, fMixedDphiULSMassLow3, fMixedDphiULSMassLow4);
520a29a8 1751 }
1752 if(fFlagLS)
1753 {
487ae960 1754 ElectronHadCorrel(itrack,track,fDphiLSMassLow,fDphiLSMassLow1,fDphiLSMassLow2,fDphiLSMassLow3,fDphiLSMassLow4);
bf697dda 1755 ElectronHadCorrelEtaBins(itrack,track,fDphiLSMassLowEta1, fDphiLSMassLowEta11,fDphiLSMassLowEta12,fDphiLSMassLowEta13,fDphiLSMassLowEta14,fDphiLSMassLowEta2, fDphiLSMassLowEta21,fDphiLSMassLowEta22,fDphiLSMassLowEta23,fDphiLSMassLowEta24);
520a29a8 1756 fLSElecPt->Fill(track->Pt());
3db57d71 1757 MixedEvent(track,fMixedDphiLSMassLow,fMixedDphiLSMassLow1,fMixedDphiLSMassLow2, fMixedDphiLSMassLow3, fMixedDphiLSMassLow4);
520a29a8 1758 }
bf697dda 1759 if(fFlagLS){
1760 ElectronHadCorrelNoPartner(itrack,jTracks,track,fDphiLSMassLowNoPartner, fDphiLSMassLowNoPartner1,fDphiLSMassLowNoPartner2,fDphiLSMassLowNoPartner3,fDphiLSMassLowNoPartner4);
1761 ElectronHadCorrelEtaBinsNoPartner(itrack,jTracks,track,fDphiLSMassLowNoPartnerEta1, fDphiLSMassLowNoPartnerEta11,fDphiLSMassLowNoPartnerEta12,fDphiLSMassLowNoPartnerEta13,fDphiLSMassLowNoPartnerEta14,fDphiLSMassLowNoPartnerEta2, fDphiLSMassLowNoPartnerEta21,fDphiLSMassLowNoPartnerEta22,fDphiLSMassLowNoPartnerEta23,fDphiLSMassLowNoPartnerEta24);
1762 }
1763 if(fFlagULS) {
1764 ElectronHadCorrelNoPartner(itrack,jTracks,track,fDphiULSMassLowNoPartner, fDphiULSMassLowNoPartner1,fDphiULSMassLowNoPartner2,fDphiULSMassLowNoPartner3,fDphiULSMassLowNoPartner4);
1765 ElectronHadCorrelEtaBinsNoPartner(itrack,jTracks,track,fDphiULSMassLowNoPartnerEta1, fDphiULSMassLowNoPartnerEta11,fDphiULSMassLowNoPartnerEta12,fDphiULSMassLowNoPartnerEta13,fDphiULSMassLowNoPartnerEta14,fDphiULSMassLowNoPartnerEta2, fDphiULSMassLowNoPartnerEta21,fDphiULSMassLowNoPartnerEta22,fDphiULSMassLowNoPartnerEta23,fDphiULSMassLowNoPartnerEta24);
1766 }
57189f04 1767 }
520a29a8 1768
57189f04 1769 if(mass<fInvmassCut && fFlagULS && !flagPhotonicElec){
1770 flagPhotonicElec = kTRUE;
1771 }
520a29a8 1772 // }
1773
987053ce 1774}
1775fFlagPhotonicElec = flagPhotonicElec;
57189f04 1776}
1777//_________________________________________
987053ce 1778void AliAnalysisTaskElecHadronCorrel::ElectronHadCorrel(Int_t itrack, AliVTrack *track, TH2F *DphiPt, TH2F *DphiPt1,TH2F *DphiPt2,TH2F *DphiPt3,TH2F *DphiPt4)
57189f04 1779{
1780 //Construct Delta Phi between electrons and hadrons
520a29a8 1781
57189f04 1782 fTrackCuts2->SetAcceptKinkDaughters(kFALSE);
1783 fTrackCuts2->SetRequireTPCRefit(kTRUE);
1784 fTrackCuts2->SetRequireITSRefit(kTRUE);
1785 fTrackCuts2->SetEtaRange(-0.9,0.9);
1786 fTrackCuts2->SetRequireSigmaToVertex(kTRUE);
e4b0faf2 1787 fTrackCuts2->SetMaxChi2PerClusterTPC(4);
28ea601a 1788 fTrackCuts2->SetMinNClustersTPC(fTPCNClsHad);
987053ce 1789 fTrackCuts2->SetMaxDCAToVertexZ(3.2);
1790 fTrackCuts2->SetMaxDCAToVertexXY(2.4);
1791 fTrackCuts2->SetDCAToVertex2D(kTRUE);
520a29a8 1792
987053ce 1793 for(Int_t ktracks = 0; ktracks<fVevent->GetNumberOfTracks(); ktracks++){
1794 AliVParticle* VtrackHad = fVevent->GetTrack(ktracks);
1795 if (!VtrackHad) {
57189f04 1796 printf("ERROR: Could not receive track %d\n", ktracks);
1797 continue;
1798 }
987053ce 1799
1800 AliVTrack *trackHad = dynamic_cast<AliVTrack*>(VtrackHad);
7e02de85 1801 if(!trackHad) continue;
987053ce 1802
1803 if(IsAODanalysis()) {
1804 AliAODTrack *atrackHad = dynamic_cast<AliAODTrack*>(VtrackHad);
7e02de85 1805 if(!atrackHad) continue;
987053ce 1806 if(!atrackHad->TestFilterMask(AliAODTrack::kTrkTPCOnly)) continue;
1807 if((!(atrackHad->GetStatus()&AliESDtrack::kITSrefit)|| (!(atrackHad->GetStatus()&AliESDtrack::kTPCrefit)))) continue;
28ea601a 1808 if(atrackHad->GetTPCNcls() < fTPCNClsHad) continue;
987053ce 1809 }
1810 else{
1811 AliESDtrack *etrackHad = dynamic_cast<AliESDtrack*>(VtrackHad);
7e02de85 1812 if(!etrackHad) continue;
987053ce 1813 if(!fTrackCuts2->AcceptTrack(etrackHad)) continue;
1814 }
a9123929 1815
57189f04 1816 if(ktracks == itrack) continue; //do not select the same electron
520a29a8 1817
57189f04 1818 Double_t ptHad= -999, pHad=-999., dEdxHad = -999;
1819 Double_t ptEle = -999;
1820 Double_t phiEle = -999, phiHad = -999, Dphi = -999;
1821 Double_t pi = 3.14;
520a29a8 1822
57189f04 1823 dEdxHad = trackHad->GetTPCsignal();
1824 ptHad = trackHad->Pt();
1825 pHad = trackHad->P();
4e01b68c 1826 ptEle = track->Pt();
520a29a8 1827
987053ce 1828 // if(ptHad <2) continue;
4e01b68c 1829 if(ptHad > ptEle) continue;
3c56855b 1830 if(trackHad->Eta()<-0.9 || trackHad->Eta()>0.9) continue;
3c56855b 1831
57189f04 1832 phiEle = track->Phi();
1833 phiHad = trackHad->Phi();
1834 Dphi = phiEle - phiHad;
520a29a8 1835 if (Dphi > 3*pi/2)
57189f04 1836 Dphi = Dphi - 2*pi;
520a29a8 1837 if (Dphi < -pi/2)
57189f04 1838 Dphi = Dphi + 2*pi;
520a29a8 1839
487ae960 1840 if(ptHad>2) DphiPt->Fill(ptEle,Dphi);
1841 if(ptHad>2 && ptHad<4) DphiPt1->Fill(ptEle,Dphi);
1842 if(ptHad>4 && ptHad<6) DphiPt2->Fill(ptEle,Dphi);
1843 if(ptHad>6 && ptHad<8) DphiPt3->Fill(ptEle,Dphi);
a9123929 1844 if(ptHad>4 && ptHad<10) DphiPt4->Fill(ptEle,Dphi);
4e01b68c 1845
57189f04 1846 }
1847}
1848//_________________________________________
987053ce 1849void AliAnalysisTaskElecHadronCorrel::ElectronHadCorrelNoPartner(Int_t itrack,Int_t jtrack, AliVTrack *track, TH2F *DphiPtNew, TH2F *DphiPtNew1,TH2F *DphiPtNew2,TH2F *DphiPtNew3,TH2F *DphiPtNew4)
57189f04 1850{
520a29a8 1851 //Construct Delta Phi between electrons and hadrons for electrons from invariant mass calculation excluding associated track
57189f04 1852
520a29a8 1853 fTrackCuts2->SetAcceptKinkDaughters(kFALSE);
1854 fTrackCuts2->SetRequireTPCRefit(kTRUE);
1855 fTrackCuts2->SetRequireITSRefit(kTRUE);
1856 fTrackCuts2->SetEtaRange(-0.9,0.9);
1857 fTrackCuts2->SetRequireSigmaToVertex(kTRUE);
e4b0faf2 1858 fTrackCuts2->SetMaxChi2PerClusterTPC(4);
28ea601a 1859 fTrackCuts2->SetMinNClustersTPC(fTPCNClsHad);
987053ce 1860 fTrackCuts2->SetMaxDCAToVertexZ(3.2);
1861 fTrackCuts2->SetMaxDCAToVertexXY(2.4);
1862 fTrackCuts2->SetDCAToVertex2D(kTRUE);
520a29a8 1863
987053ce 1864 for(Int_t ktracks = 0; ktracks<fVevent->GetNumberOfTracks(); ktracks++){
1865 AliVParticle* VtrackHad = fVevent->GetTrack(ktracks);
1866 if (!VtrackHad) {
520a29a8 1867 printf("ERROR: Could not receive track %d\n", ktracks);
1868 continue;
1869 }
a9123929 1870
987053ce 1871 AliVTrack *trackHad = dynamic_cast<AliVTrack*>(VtrackHad);
7e02de85 1872 if(!trackHad) continue;
520a29a8 1873
987053ce 1874 if(IsAODanalysis()) {
1875 AliAODTrack *atrackHad = dynamic_cast<AliAODTrack*>(VtrackHad);
7e02de85 1876 if(!atrackHad) continue;
987053ce 1877 if(!atrackHad->TestFilterMask(AliAODTrack::kTrkTPCOnly)) continue;
1878 if((!(atrackHad->GetStatus()&AliESDtrack::kITSrefit)|| (!(atrackHad->GetStatus()&AliESDtrack::kTPCrefit)))) continue;
28ea601a 1879 if(atrackHad->GetTPCNcls() < fTPCNClsHad) continue;
987053ce 1880 }
1881 else{
1882 AliESDtrack *etrackHad = dynamic_cast<AliESDtrack*>(VtrackHad);
7e02de85 1883 if(!etrackHad) continue;
987053ce 1884 if(!fTrackCuts2->AcceptTrack(etrackHad)) continue;
1885 }
1886
1887 if(ktracks == itrack || ktracks == jtrack) continue; //do not select the same electron and associated track from inv mass cal
520a29a8 1888
1889 Double_t ptHad= -999, pHad=-999., dEdxHad = -999;
1890 Double_t ptEle = -999;
1891 Double_t phiEle = -999, phiHad = -999, Dphi = -999;
1892 Double_t pi = 3.14;
1893
1894 dEdxHad = trackHad->GetTPCsignal();
1895 ptHad = trackHad->Pt();
1896 pHad = trackHad->P();
4e01b68c 1897 ptEle = track->Pt();
520a29a8 1898
a9123929 1899 // if(ptHad <2) continue;
4e01b68c 1900 if(ptHad > ptEle) continue;
3c56855b 1901 if(trackHad->Eta()<-0.9 || trackHad->Eta()>0.9) continue;
520a29a8 1902
1903 phiEle = track->Phi();
1904 phiHad = trackHad->Phi();
1905 Dphi = phiEle - phiHad;
1906 if (Dphi > 3*pi/2)
1907 Dphi = Dphi - 2*pi;
1908 if (Dphi < -pi/2)
1909 Dphi = Dphi + 2*pi;
57189f04 1910
487ae960 1911 if(ptHad>2) DphiPtNew->Fill(ptEle,Dphi);
1912 if(ptHad>2 && ptHad<4) DphiPtNew1->Fill(ptEle,Dphi);
1913 if(ptHad>4 && ptHad<6) DphiPtNew2->Fill(ptEle,Dphi);
1914 if(ptHad>6 && ptHad<8) DphiPtNew3->Fill(ptEle,Dphi);
a9123929 1915 if(ptHad>4 && ptHad<10) DphiPtNew4->Fill(ptEle,Dphi);
520a29a8 1916 }
1917}
4e01b68c 1918//_________________________________________
33369c14 1919void AliAnalysisTaskElecHadronCorrel::ElectronHadCorrelEtaFarSide(Int_t itrack, AliVTrack *track, TH2F *DphiPt, TH2F *DphiPt1,TH2F *DphiPt2,TH2F *DphiPt3,TH2F *DphiPt4)
4e01b68c 1920{
33369c14 1921 //Construct Delta Phi between electrons and hadrons for 1<eta(had)<1.6
4e01b68c 1922
33369c14 1923 fTrackCuts2->SetAcceptKinkDaughters(kFALSE);
1924 fTrackCuts2->SetRequireTPCRefit(kTRUE);
1925 fTrackCuts2->SetRequireITSRefit(kTRUE);
1926 fTrackCuts2->SetEtaRange(-0.9,0.9);
1927 fTrackCuts2->SetRequireSigmaToVertex(kTRUE);
1928 fTrackCuts2->SetMaxChi2PerClusterTPC(4);
28ea601a 1929 fTrackCuts2->SetMinNClustersTPC(fTPCNClsHad);
33369c14 1930 fTrackCuts2->SetMaxDCAToVertexZ(3.2);
1931 fTrackCuts2->SetMaxDCAToVertexXY(2.4);
1932 fTrackCuts2->SetDCAToVertex2D(kTRUE);
4e01b68c 1933
33369c14 1934 for(Int_t ktracks = 0; ktracks<fVevent->GetNumberOfTracks(); ktracks++){
1935 AliVParticle* VtrackHad = fVevent->GetTrack(ktracks);
1936 if (!VtrackHad) {
1937 printf("ERROR: Could not receive track %d\n", ktracks);
1938 continue;
1939 }
1940 AliVTrack *trackHad = dynamic_cast<AliVTrack*>(VtrackHad);
7e02de85 1941 if(!trackHad) continue;
4e01b68c 1942
33369c14 1943 if(IsAODanalysis()) {
1944 AliAODTrack *atrackHad = dynamic_cast<AliAODTrack*>(VtrackHad);
7e02de85 1945 if(!atrackHad) continue;
33369c14 1946 if(!atrackHad->TestFilterMask(AliAODTrack::kTrkTPCOnly)) continue;
1947 if((!(atrackHad->GetStatus()&AliESDtrack::kITSrefit)|| (!(atrackHad->GetStatus()&AliESDtrack::kTPCrefit)))) continue;
28ea601a 1948 if(atrackHad->GetTPCNcls() < fTPCNClsHad) continue;
33369c14 1949 }
1950 else{
1951 AliESDtrack *etrackHad = dynamic_cast<AliESDtrack*>(VtrackHad);
7e02de85 1952 if(!etrackHad) continue;
33369c14 1953 if(!fTrackCuts2->AcceptTrack(etrackHad)) continue;
1954 }
4e01b68c 1955
33369c14 1956 if(ktracks == itrack) continue; //do not select the same electron
4e01b68c 1957
33369c14 1958 Double_t ptHad= -999, pHad=-999., dEdxHad = -999;
1959 Double_t ptEle = -999;
1960 Double_t phiEle = -999, phiHad = -999, Dphi = -999;
1961 Double_t pi = 3.14;
4e01b68c 1962
33369c14 1963 dEdxHad = trackHad->GetTPCsignal();
1964 ptHad = trackHad->Pt();
1965 pHad = trackHad->P();
1966 ptEle = track->Pt();
4e01b68c 1967
33369c14 1968 // if(ptHad <2) continue;
1969 if(ptHad > ptEle) continue;
1970 if(trackHad->Eta()<1 || trackHad->Eta()>1.6) continue;
1971
1972 phiEle = track->Phi();
1973 phiHad = trackHad->Phi();
1974 Dphi = phiEle - phiHad;
1975 if (Dphi > 3*pi/2)
1976 Dphi = Dphi - 2*pi;
1977 if (Dphi < -pi/2)
1978 Dphi = Dphi + 2*pi;
1979
1980 if(ptHad>2) DphiPt->Fill(ptEle,Dphi);
1981 if(ptHad>2 && ptHad<4) DphiPt1->Fill(ptEle,Dphi);
1982 if(ptHad>4 && ptHad<6) DphiPt2->Fill(ptEle,Dphi);
1983 if(ptHad>6 && ptHad<8) DphiPt3->Fill(ptEle,Dphi);
a9123929 1984 if(ptHad>4 && ptHad<10) DphiPt4->Fill(ptEle,Dphi);
33369c14 1985
1986 }
4e01b68c 1987}
bf697dda 1988//_________________________________________
1989void AliAnalysisTaskElecHadronCorrel::ElectronHadCorrelEtaBins(Int_t itrack, AliVTrack *track, TH2F *DphiPtEta1, TH2F *DphiPtEta11,TH2F *DphiPtEta12,TH2F *DphiPtEta13,TH2F *DphiPtEta14,TH2F *DphiPtEta2, TH2F *DphiPtEta21,TH2F *DphiPtEta22,TH2F *DphiPtEta23,TH2F *DphiPtEta24)
1990{
1991 //Construct Delta Phi between electrons and hadrons in different Eta bins
1992
1993 fTrackCuts2->SetAcceptKinkDaughters(kFALSE);
1994 fTrackCuts2->SetRequireTPCRefit(kTRUE);
1995 fTrackCuts2->SetRequireITSRefit(kTRUE);
1996 fTrackCuts2->SetEtaRange(-0.9,0.9);
1997 fTrackCuts2->SetRequireSigmaToVertex(kTRUE);
1998 fTrackCuts2->SetMaxChi2PerClusterTPC(4);
28ea601a 1999 fTrackCuts2->SetMinNClustersTPC(fTPCNClsHad);
bf697dda 2000 fTrackCuts2->SetMaxDCAToVertexZ(3.2);
2001 fTrackCuts2->SetMaxDCAToVertexXY(2.4);
2002 fTrackCuts2->SetDCAToVertex2D(kTRUE);
2003
2004 for(Int_t ktracks = 0; ktracks<fVevent->GetNumberOfTracks(); ktracks++){
2005 AliVParticle* VtrackHad = fVevent->GetTrack(ktracks);
2006 if (!VtrackHad) {
2007 printf("ERROR: Could not receive track %d\n", ktracks);
2008 continue;
2009 }
2010
2011 AliVTrack *trackHad = dynamic_cast<AliVTrack*>(VtrackHad);
7e02de85 2012 if(!trackHad) continue;
bf697dda 2013
2014 if(IsAODanalysis()) {
2015 AliAODTrack *atrackHad = dynamic_cast<AliAODTrack*>(VtrackHad);
7e02de85 2016 if(!atrackHad) continue;
bf697dda 2017 if(!atrackHad->TestFilterMask(AliAODTrack::kTrkTPCOnly)) continue;
2018 if((!(atrackHad->GetStatus()&AliESDtrack::kITSrefit)|| (!(atrackHad->GetStatus()&AliESDtrack::kTPCrefit)))) continue;
28ea601a 2019 if(atrackHad->GetTPCNcls() < fTPCNClsHad) continue;
bf697dda 2020 }
2021 else{
2022 AliESDtrack *etrackHad = dynamic_cast<AliESDtrack*>(VtrackHad);
7e02de85 2023 if(!etrackHad) continue;
bf697dda 2024 if(!fTrackCuts2->AcceptTrack(etrackHad)) continue;
2025 }
2026
2027 if(ktracks == itrack) continue; //do not select the same electron
2028
2029 Double_t ptHad= -999, pHad=-999., dEdxHad = -999;
2030 Double_t ptEle = -999;
2031 Double_t phiEle = -999, phiHad = -999, Dphi = -999;
2032 Double_t etaEle = -999, etaHad=-999, DEta=-999;
2033 Double_t pi = 3.14;
2034
2035 dEdxHad = trackHad->GetTPCsignal();
2036 ptHad = trackHad->Pt();
2037 pHad = trackHad->P();
2038 ptEle = track->Pt();
2039
2040 // if(ptHad <2) continue;
2041 if(ptHad > ptEle) continue;
2042 if(trackHad->Eta()<-0.9 || trackHad->Eta()>0.9) continue;
2043
2044 phiEle = track->Phi();
2045 phiHad = trackHad->Phi();
2046 Dphi = phiEle - phiHad;
2047
2048 if (Dphi > 3*pi/2)
2049 Dphi = Dphi - 2*pi;
2050 if (Dphi < -pi/2)
2051 Dphi = Dphi + 2*pi;
2052
2053 etaEle = track->Eta();
2054 etaHad = trackHad->Eta();
2055 DEta = etaEle - etaHad;
2056
2057 if(TMath::Abs(DEta)<0.8){
a9123929 2058 if(ptHad>2) DphiPtEta1->Fill(ptEle,Dphi);
2059 if(ptHad>2 && ptHad<4) DphiPtEta11->Fill(ptEle,Dphi);
2060 if(ptHad>4 && ptHad<6) DphiPtEta12->Fill(ptEle,Dphi);
2061 if(ptHad>6 && ptHad<8) DphiPtEta13->Fill(ptEle,Dphi);
2062 if(ptHad>4 && ptHad<10) DphiPtEta14->Fill(ptEle,Dphi);
bf697dda 2063 }
2064
2065 if(TMath::Abs(DEta)>0.8){
2066 if(ptHad>2) DphiPtEta2->Fill(ptEle,Dphi);
2067 if(ptHad>2 && ptHad<4) DphiPtEta21->Fill(ptEle,Dphi);
2068 if(ptHad>4 && ptHad<6) DphiPtEta22->Fill(ptEle,Dphi);
2069 if(ptHad>6 && ptHad<8) DphiPtEta23->Fill(ptEle,Dphi);
a9123929 2070 if(ptHad>4 && ptHad<10) DphiPtEta24->Fill(ptEle,Dphi);
bf697dda 2071 }
2072 }
2073}
2074//_________________________________________
2075void AliAnalysisTaskElecHadronCorrel::ElectronHadCorrelEtaBinsNoPartner(Int_t itrack,Int_t jtrack, AliVTrack *track, TH2F *DphiPtEta1, TH2F *DphiPtEta11,TH2F *DphiPtEta12,TH2F *DphiPtEta13,TH2F *DphiPtEta14,TH2F *DphiPtEta2, TH2F *DphiPtEta21,TH2F *DphiPtEta22,TH2F *DphiPtEta23,TH2F *DphiPtEta24)
2076{
2077 //Construct Delta Phi between electrons and hadrons in different Eta bins (exclude associated track)
2078
2079 fTrackCuts2->SetAcceptKinkDaughters(kFALSE);
2080 fTrackCuts2->SetRequireTPCRefit(kTRUE);
2081 fTrackCuts2->SetRequireITSRefit(kTRUE);
2082 fTrackCuts2->SetEtaRange(-0.9,0.9);
2083 fTrackCuts2->SetRequireSigmaToVertex(kTRUE);
2084 fTrackCuts2->SetMaxChi2PerClusterTPC(4);
28ea601a 2085 fTrackCuts2->SetMinNClustersTPC(fTPCNClsHad);
bf697dda 2086 fTrackCuts2->SetMaxDCAToVertexZ(3.2);
2087 fTrackCuts2->SetMaxDCAToVertexXY(2.4);
2088 fTrackCuts2->SetDCAToVertex2D(kTRUE);
2089
2090 for(Int_t ktracks = 0; ktracks<fVevent->GetNumberOfTracks(); ktracks++){
2091 AliVParticle* VtrackHad = fVevent->GetTrack(ktracks);
2092 if (!VtrackHad) {
2093 printf("ERROR: Could not receive track %d\n", ktracks);
2094 continue;
2095 }
2096
2097 AliVTrack *trackHad = dynamic_cast<AliVTrack*>(VtrackHad);
7e02de85 2098 if(!trackHad) continue;
bf697dda 2099
2100 if(IsAODanalysis()) {
2101 AliAODTrack *atrackHad = dynamic_cast<AliAODTrack*>(VtrackHad);
7e02de85 2102 if(!atrackHad) continue;
bf697dda 2103 if(!atrackHad->TestFilterMask(AliAODTrack::kTrkTPCOnly)) continue;
2104 if((!(atrackHad->GetStatus()&AliESDtrack::kITSrefit)|| (!(atrackHad->GetStatus()&AliESDtrack::kTPCrefit)))) continue;
28ea601a 2105 if(atrackHad->GetTPCNcls() < fTPCNClsHad) continue;
bf697dda 2106 }
2107 else{
2108 AliESDtrack *etrackHad = dynamic_cast<AliESDtrack*>(VtrackHad);
7e02de85 2109 if(!etrackHad) continue;
bf697dda 2110 if(!fTrackCuts2->AcceptTrack(etrackHad)) continue;
2111 }
2112
2113 if(ktracks == itrack || ktracks == jtrack) continue; //do not select the same electron and associated track from inv mass cal
2114
2115 Double_t ptHad= -999, pHad=-999., dEdxHad = -999;
2116 Double_t ptEle = -999;
2117 Double_t phiEle = -999, phiHad = -999, Dphi = -999;
2118 Double_t etaEle = -999, etaHad=-999, DEta=-999;
2119 Double_t pi = 3.14;
2120
2121 dEdxHad = trackHad->GetTPCsignal();
2122 ptHad = trackHad->Pt();
2123 pHad = trackHad->P();
2124 ptEle = track->Pt();
2125
2126 // if(ptHad <2) continue;
2127 if(ptHad > ptEle) continue;
2128 if(trackHad->Eta()<-0.9 || trackHad->Eta()>0.9) continue;
2129
2130 phiEle = track->Phi();
2131 phiHad = trackHad->Phi();
2132 Dphi = phiEle - phiHad;
2133
2134 if (Dphi > 3*pi/2)
2135 Dphi = Dphi - 2*pi;
2136 if (Dphi < -pi/2)
2137 Dphi = Dphi + 2*pi;
2138
2139 etaEle = track->Eta();
2140 etaHad = trackHad->Eta();
2141 DEta = etaEle - etaHad;
2142
2143 if(TMath::Abs(DEta)<0.8){
2144 if(ptHad>2) DphiPtEta1->Fill(ptEle,Dphi);
2145 if(ptHad>2 && ptHad<4) DphiPtEta11->Fill(ptEle,Dphi);
2146 if(ptHad>4 && ptHad<6) DphiPtEta12->Fill(ptEle,Dphi);
2147 if(ptHad>6 && ptHad<8) DphiPtEta13->Fill(ptEle,Dphi);
a9123929 2148 if(ptHad>4 && ptHad<10) DphiPtEta14->Fill(ptEle,Dphi);
bf697dda 2149 }
2150
2151 if(TMath::Abs(DEta)>0.8){
2152 if(ptHad>2) DphiPtEta2->Fill(ptEle,Dphi);
2153 if(ptHad>2 && ptHad<4) DphiPtEta21->Fill(ptEle,Dphi);
2154 if(ptHad>4 && ptHad<6) DphiPtEta22->Fill(ptEle,Dphi);
2155 if(ptHad>6 && ptHad<8) DphiPtEta23->Fill(ptEle,Dphi);
a9123929 2156 if(ptHad>4 && ptHad<10) DphiPtEta24->Fill(ptEle,Dphi);
bf697dda 2157 }
2158 }
2159}
3db57d71 2160
33369c14 2161//_________________________________________
a9123929 2162void AliAnalysisTaskElecHadronCorrel::MixedEvent(AliVTrack *track, TH2F *DphiPt, TH2F *DphiPt1,TH2F *DphiPt2, TH2F *DphiPt3, TH2F *DphiPt4)
4e01b68c 2163{
4e01b68c 2164
a9123929 2165 const AliAODVertex *pVtx = fAOD->GetPrimaryVertex();
2166 Double_t zVtx;
2167 zVtx = pVtx->GetZ();
4e01b68c 2168
7e02de85 2169 AliCentrality *fCentrality1 = (AliCentrality*)fVevent->GetCentrality();
b8c2fb6d 2170 Double_t centvalue = fCentrality1->GetCentralityPercentile(fkCentralityMethod);
3c56855b 2171
7e02de85 2172 AliEventPool* pool;
2173 pool = fPoolMgr->GetEventPool(centvalue, zVtx); // Get the buffer associated with the current centrality and z-vtx
a9123929 2174 if (!pool)
7e02de85 2175 {
a9123929 2176 AliFatal(Form("No pool found for centrality = %f, zVtx = %f", centvalue, zVtx));
7e02de85 2177 return;
2178 }
a9123929 2179 // pool->PrintInfo();
2180 if (pool->GetCurrentNEvents() >= 5) // start mixing when 5 events are in the buffer
2181 {
2182 Int_t nMix = pool->GetCurrentNEvents();
2183 fNoMixedEvents->Fill(0);
2184 fMixStat->Fill(pool->GetCurrentNEvents(),centvalue);
2185 fMixStat1->Fill(pool->GetCurrentNEvents(),zVtx);
2186
2187 // cout << "nMix = " << nMix << " tracks in pool = " << pool->NTracksInPool() << endl;
2188 for (Int_t jMix=0; jMix<nMix; jMix++) // mix with each event in the buffer
2189 {
2190 TObjArray* bgTracks = pool->GetEvent(jMix);
2191 for (Int_t i=0;i<bgTracks->GetEntriesFast(); i++)
2192 {
2193 AliVParticle* mixtrk = (AliVParticle*) bgTracks->At(i);
2194
2195 Double_t mixtrkPhi = -999;
2196 Double_t ptEle = -999;
2197 Double_t phiEle = -999, Dphi = -999;
2198 Double_t pi = 3.14;
2199 Double_t ptmixtrk = -999;
2200
2201 ptEle = track->Pt();
2202 ptmixtrk = mixtrk->Pt();
2203 if(ptmixtrk > ptEle) continue;
2204
2205 mixtrkPhi = mixtrk->Phi();
2206 phiEle = track->Phi();
2207 Dphi = phiEle - mixtrkPhi;
2208
2209 if (Dphi > 3*pi/2)
2210 Dphi = Dphi - 2*pi;
2211 if (Dphi < -pi/2)
2212 Dphi = Dphi + 2*pi;
2213 if(ptmixtrk>2) DphiPt->Fill(ptEle,Dphi);
2214 if(ptmixtrk>2 && ptmixtrk<4) DphiPt1->Fill(ptEle,Dphi);
2215 if(ptmixtrk>4 && ptmixtrk<6) DphiPt2->Fill(ptEle,Dphi);
2216 if(ptmixtrk>6 && ptmixtrk<8) DphiPt3->Fill(ptEle,Dphi);
2217 if(ptmixtrk>4 && ptmixtrk<10) DphiPt4->Fill(ptEle,Dphi);
2218 }
2219 }
2220 }
33369c14 2221}
3db57d71 2222
33369c14 2223//___________________________________________
2224TObjArray* AliAnalysisTaskElecHadronCorrel::CloneAndReduceTrackList()
2225{
a9123929 2226 // clones a track list by using AliehDPhiBasicParticle which uses much less memory (used for event mixing)
2227
2228 fTrackCuts2->SetAcceptKinkDaughters(kFALSE);
2229 fTrackCuts2->SetRequireTPCRefit(kTRUE);
2230 fTrackCuts2->SetRequireITSRefit(kTRUE);
2231 fTrackCuts2->SetEtaRange(-0.9,0.9);
2232 fTrackCuts2->SetRequireSigmaToVertex(kTRUE);
2233 fTrackCuts2->SetMaxChi2PerClusterTPC(3.5);
28ea601a 2234 fTrackCuts2->SetMinNClustersTPC(fTPCNClsHad);
7e02de85 2235 fTrackCuts2->SetMaxDCAToVertexZ(3.2);
2236 fTrackCuts2->SetMaxDCAToVertexXY(2.4);
2237 fTrackCuts2->SetDCAToVertex2D(kTRUE);
a9123929 2238
2239 TObjArray* tracksClone = new TObjArray;
2240 tracksClone->SetOwner(kTRUE);
2241
7e02de85 2242 for(Int_t ktracks = 0; ktracks<fVevent->GetNumberOfTracks(); ktracks++){
2243 AliVParticle* Vtrack = fVevent->GetTrack(ktracks);
2244 if (!Vtrack) {
a9123929 2245 printf("ERROR: Could not receive track %d\n", ktracks);
2246 continue;
2247 }
7e02de85 2248
2249 AliVTrack *track = dynamic_cast<AliVTrack*>(Vtrack);
2250 if(!track) continue;
2251
2252 if(IsAODanalysis()) {
2253 AliAODTrack *atrack = dynamic_cast<AliAODTrack*>(Vtrack);
2254 if(!atrack) continue;
2255 if(!atrack->TestFilterMask(AliAODTrack::kTrkTPCOnly)) continue;
2256 if((!(atrack->GetStatus()&AliESDtrack::kITSrefit)|| (!(atrack->GetStatus()&AliESDtrack::kTPCrefit)))) continue;
28ea601a 2257 if(atrack->GetTPCNcls() < fTPCNClsHad) continue;
7e02de85 2258 }
2259 else{
2260 AliESDtrack *etrack = dynamic_cast<AliESDtrack*>(Vtrack);
2261 if(!etrack) continue;
2262 if(!fTrackCuts2->AcceptTrack(etrack)) continue;
2263 }
a9123929 2264
2265 // if(ktracks == iTrack) continue;
2266 Double_t eta=-999,ptHad= -999, pHad=-999., phi=-999.0;
2267 Int_t label=-9999, id=-999;
2268 eta = track->Eta();
2269 ptHad = track->Pt();
2270 pHad = track->P();
2271 phi= track->Phi();
2272 label= track->GetLabel();
2273 id=track->GetID();
2274
7e02de85 2275 if(track->Eta()<-0.9 || track->Eta()>0.9) continue;
a9123929 2276 if(ptHad <2) continue;
a9123929 2277
7e02de85 2278 AliVParticle* particle = (AliVParticle*) fVevent->GetTrack(ktracks);
a9123929 2279 tracksClone->Add(new AliehDPhiBasicParticle(particle->Eta(), particle->Phi(), particle->Pt(), particle->Charge()));
2280
4e01b68c 2281 }
a9123929 2282 return tracksClone;
33369c14 2283}
3db57d71 2284
3c56855b 2285//___________________________________________
2286void AliAnalysisTaskElecHadronCorrel::HadronInfo(Int_t itrack)
2287{
2288 //Hadron information
987053ce 2289
3c56855b 2290 fTrackCuts2->SetAcceptKinkDaughters(kFALSE);
2291 fTrackCuts2->SetRequireTPCRefit(kTRUE);
2292 fTrackCuts2->SetRequireITSRefit(kTRUE);
2293 fTrackCuts2->SetEtaRange(-0.9,0.9);
2294 fTrackCuts2->SetRequireSigmaToVertex(kTRUE);
e4b0faf2 2295 fTrackCuts2->SetMaxChi2PerClusterTPC(4);
28ea601a 2296 fTrackCuts2->SetMinNClustersTPC(fTPCNClsHad);
987053ce 2297 fTrackCuts2->SetMaxDCAToVertexZ(3.2);
2298 fTrackCuts2->SetMaxDCAToVertexXY(2.4);
2299 fTrackCuts2->SetDCAToVertex2D(kTRUE);
3c56855b 2300
987053ce 2301 for(Int_t ktracks = 0; ktracks<fVevent->GetNumberOfTracks(); ktracks++){
2302 AliVParticle* VtrackHad = fVevent->GetTrack(ktracks);
2303 if (!VtrackHad) {
3c56855b 2304 printf("ERROR: Could not receive track %d\n", ktracks);
2305 continue;
2306 }
987053ce 2307
2308 AliVTrack *trackHad = dynamic_cast<AliVTrack*>(VtrackHad);
7e02de85 2309 if(!trackHad) continue;
987053ce 2310
2311 if(IsAODanalysis()) {
2312 AliAODTrack *atrackHad = dynamic_cast<AliAODTrack*>(VtrackHad);
7e02de85 2313 if(!atrackHad) continue;
987053ce 2314 if(!atrackHad->TestFilterMask(AliAODTrack::kTrkTPCOnly)) continue;
2315 if((!(atrackHad->GetStatus()&AliESDtrack::kITSrefit)|| (!(atrackHad->GetStatus()&AliESDtrack::kTPCrefit)))) continue;
28ea601a 2316 if(atrackHad->GetTPCNcls() < fTPCNClsHad) continue;
987053ce 2317 }
2318 else{
2319 AliESDtrack *etrackHad = dynamic_cast<AliESDtrack*>(VtrackHad);
7e02de85 2320 if(!etrackHad) continue;
987053ce 2321 if(!fTrackCuts2->AcceptTrack(etrackHad)) continue;
2322 }
2323
3c56855b 2324 if(ktracks == itrack) continue; //do not select the same electron
a9123929 2325
3c56855b 2326 Double_t ptHad= -999;
3c56855b 2327 ptHad = trackHad->Pt();
a9123929 2328
3c56855b 2329 if(trackHad->Eta()<-0.9 || trackHad->Eta()>0.9) continue;
a9123929 2330 // cout << "pt had = " << ptHad <<endl;
3c56855b 2331
3c56855b 2332 if(ptHad<2) continue;
2333
2334 fHadronPhi->Fill(trackHad->Phi());
2335 fHadronPhiPt->Fill(trackHad->Phi(),ptHad);
2336 if (trackHad->Eta() >0 && trackHad->Eta() <0.9) fHadronPhiTPChalf->Fill(trackHad->Phi());
2337
3c56855b 2338 fHadronPt->Fill(ptHad);
2339 }
2340}
2341//_________________________________________
987053ce 2342void AliAnalysisTaskElecHadronCorrel::CheckCentrality(AliVEvent* event, Bool_t &centralitypass)
3c56855b 2343{
2344 // Check if event is within the set centrality range. Falls back to V0 centrality determination if no method is set
2345 if (!fkCentralityMethod) AliFatal("No centrality method set! FATAL ERROR!");
2346 fCentrality = event->GetCentrality()->GetCentralityPercentile(fkCentralityMethod);
a9123929 2347 // cout << "Centrality evaluated-------------------------: " << fCentrality <<endl;
3c56855b 2348
2349 if ((fCentrality <= fCentralityMin) || (fCentrality > fCentralityMax))
2350 {
2351 fCentralityNoPass->Fill(fCentrality);
a9123929 2352 // cout << "--------------Fill no pass-------------------------"<<endl;
3c56855b 2353 centralitypass = kFALSE;
2354 }else
2355 {
2356 fCentralityPass->Fill(fCentrality);
a9123929 2357 // cout << "--------------Fill pass-------------------------"<<endl;
3c56855b 2358 centralitypass = kTRUE;
2359 }
2360
2361}
2362//_____________________________________________________________________________
2363void AliAnalysisTaskElecHadronCorrel::SetCentralityParameters(Double_t CentralityMin, Double_t CentralityMax, const char* CentralityMethod)
2364{
2365 // Set a centrality range ]min, max] and define the method to use for centrality selection
2366 fCentralityMin = CentralityMin;
2367 fCentralityMax = CentralityMax;
2368 fkCentralityMethod = CentralityMethod;
2369}