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