]>
Commit | Line | Data |
---|---|---|
8e2d649d | 1 | |
c852fdae | 2 | /************************************************************************** |
3 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * * | |
5 | * Author: The ALICE Off-line Project. * | |
6 | * Contributors are mentioned in the code where appropriate. * | |
7 | * * | |
8 | * Permission to use, copy, modify and distribute this software and its * | |
9 | * documentation strictly for non-commercial purposes is hereby granted * | |
10 | * without fee, provided that the above copyright notice appears in all * | |
11 | * copies and that both the copyright notice and this permission notice * | |
12 | * appear in the supporting documentation. The authors make no claims * | |
13 | * about the suitability of this software for any purpose. It is * | |
14 | * provided "as is" without express or implied warranty. * | |
15 | **************************************************************************/ | |
16 | ||
9a1f999b | 17 | //////////////////////////////////////////////////////////////////////// |
18 | // // | |
19 | // Task for Heavy-flavour electron analysis in pPb collisions // | |
20 | // (+ Electron-Hadron Jetlike Azimuthal Correlation) // | |
21 | // // | |
3db2410d | 22 | // version: September 16, 2014. // |
9a1f999b | 23 | // // |
24 | // Authors // | |
25 | // Elienos Pereira de Oliveira Filho (epereira@cern.ch) // | |
26 | // Cristiane Jahnke (cristiane.jahnke@cern.ch) // | |
27 | // // | |
28 | //////////////////////////////////////////////////////////////////////// | |
c852fdae | 29 | |
30 | #include "TChain.h" | |
31 | #include "TTree.h" | |
32 | #include "TNtuple.h" | |
33 | #include "TH1F.h" | |
34 | #include "TH2F.h" | |
35 | #include "TCanvas.h" | |
36 | #include "AliAnalysisTask.h" | |
37 | #include "AliAnalysisManager.h" | |
38 | #include "AliESDEvent.h" | |
39 | #include "AliAODEvent.h" | |
40 | #include "AliVEvent.h" | |
41 | #include "AliESDInputHandler.h" | |
42 | #include "AliESDtrackCuts.h" | |
43 | #include "AliESDCaloCluster.h" | |
44 | #include "AliESDCaloCells.h" | |
45 | #include "AliEMCALTrack.h" | |
46 | #include "AliExternalTrackParam.h" | |
47 | #include "AliPhysicsSelection.h" | |
48 | #include "TGeoGlobalMagField.h" | |
49 | #include "AliMagF.h" | |
50 | #include "AliLog.h" | |
51 | #include "AliStack.h" | |
52 | #include "AliCentrality.h" | |
53 | #include "AliAODMCParticle.h" | |
54 | #include "AliAODMCHeader.h" | |
55 | #include "AliPID.h" | |
56 | #include "AliPIDResponse.h" | |
57 | #include "AliHFEcontainer.h" | |
58 | #include "AliHFEcuts.h" | |
59 | #include "AliHFEpid.h" | |
60 | #include "AliHFEpidBase.h" | |
61 | #include "AliHFEpidQAmanager.h" | |
62 | #include "AliHFEtools.h" | |
63 | #include "AliCFContainer.h" | |
64 | #include "AliCFManager.h" | |
65 | #include "AliSelectNonHFE.h" | |
66 | #include "AliHFEpidTPC.h" | |
67 | #include "AliAnalysisTaskEMCalHFEpA.h" | |
68 | #include "TMath.h" | |
69 | #include "THnSparse.h" | |
70 | #include "TLorentzVector.h" | |
71 | #include "TString.h" | |
72 | #include "TFile.h" | |
73 | #include "AliESDHandler.h" | |
74 | #include "AliMCEventHandler.h" | |
75 | #include "AliMCEvent.h" | |
76 | #include "AliStack.h" | |
77 | #include "TParticle.h" | |
78 | #include "AliLog.h" | |
79 | #include "AliAnalysisTaskSE.h" | |
80 | #include "TRefArray.h" | |
81 | #include "TVector.h" | |
82 | #include "stdio.h" | |
83 | #include "TGeoManager.h" | |
84 | #include "iostream" | |
85 | #include "fstream" | |
86 | #include "AliKFParticle.h" | |
87 | #include "AliKFVertex.h" | |
88 | #include "AliVParticle.h" | |
89 | #include "AliVTrack.h" | |
90 | #include "AliEventPoolManager.h" | |
91 | #include "TObjArray.h" | |
8e2d649d | 92 | //include to use reader as Lucile does |
93 | #include "AliCaloTrackAODReader.h" | |
94 | #include "AliCaloTrackReader.h" | |
1dd85087 | 95 | #include "AliEMCALRecoUtils.h" //to remove exotics |
96 | #include "AliAODHeader.h" | |
97 | #include "AliEMCALGeometry.h" | |
98 | ||
99 | ||
100 | ||
101 | // --- ANALYSIS system --- | |
102 | #include "AliCalorimeterUtils.h" | |
103 | #include "AliESDEvent.h" | |
104 | #include "AliMCEvent.h" | |
105 | #include "AliStack.h" | |
106 | #include "AliAODPWG4Particle.h" | |
107 | #include "AliVCluster.h" | |
108 | #include "AliVCaloCells.h" | |
109 | #include "AliMixedEvent.h" | |
110 | #include "AliAODCaloCluster.h" | |
111 | #include "AliOADBContainer.h" | |
112 | #include "AliAnalysisManager.h" | |
113 | ||
114 | // --- Detector --- | |
115 | #include "AliEMCALGeometry.h" | |
116 | #include "AliPHOSGeoUtils.h" | |
8e2d649d | 117 | |
9a1f999b | 118 | //______________________________________________________________________ |
c852fdae | 119 | |
9a1f999b | 120 | //______________________________________________________________________ |
c852fdae | 121 | ClassImp(AliAnalysisTaskEMCalHFEpA) |
122 | ||
9a1f999b | 123 | //______________________________________________________________________ |
c852fdae | 124 | AliAnalysisTaskEMCalHFEpA::AliAnalysisTaskEMCalHFEpA(const char *name) |
9a1f999b | 125 | : AliAnalysisTaskSE(name) |
126 | ,fCorrelationFlag(0) | |
127 | ,fIsMC(0) | |
128 | ,fUseEMCal(kFALSE) | |
8e2d649d | 129 | ,fUseTrigger(kFALSE) |
3db2410d | 130 | ,fUseTender(kFALSE) |
9a1f999b | 131 | ,fUseShowerShapeCut(kFALSE) |
132 | ,fFillBackground(kFALSE) | |
3db2410d | 133 | ,fEoverPnsigma(kFALSE) |
2c8e1f6c | 134 | ,fAssocWithSPD(kFALSE) |
9a1f999b | 135 | ,fEMCEG1(kFALSE) |
136 | ,fEMCEG2(kFALSE) | |
137 | ,fIsHFE1(kFALSE) | |
138 | ,fIsHFE2(kFALSE) | |
139 | ,fIsNonHFE(kFALSE) | |
140 | ,fIsFromD(kFALSE) | |
141 | ,fIsFromB(kFALSE) | |
142 | ,fIsFromPi0(kFALSE) | |
143 | ,fIsFromEta(kFALSE) | |
144 | ,fIsFromGamma(kFALSE) | |
145 | ,fESD(0) | |
146 | ,fAOD(0) | |
147 | ,fVevent(0) | |
148 | ,fPartnerCuts(new AliESDtrackCuts()) | |
149 | ,fOutputList(0) | |
150 | ,fPidResponse(0) | |
151 | ,fNonHFE(new AliSelectNonHFE()) | |
152 | ,fIsAOD(kFALSE) | |
153 | ,fCentrality(0) | |
154 | ,fCentralityMin(0) | |
155 | ,fCentralityMax(100) | |
156 | ,fHasCentralitySelection(kFALSE) | |
157 | ,fCentralityHist(0) | |
158 | ,fCentralityHistPass(0) | |
159 | ,fZvtx(0) | |
160 | ,fEstimator(0) | |
161 | ,fClus(0) | |
1dd85087 | 162 | //,fClusESD(0) |
9a1f999b | 163 | ,fNevent(0) |
1dd85087 | 164 | ,fNevent2(0) |
9a1f999b | 165 | ,fPtElec_Inc(0) |
8e2d649d | 166 | ,fPtPrim(0) |
167 | ,fPtSec(0) | |
168 | ,fPtPrim2(0) | |
169 | ,fPtSec2(0) | |
9a1f999b | 170 | ,fCharge_n(0) |
171 | ,fCharge_p(0) | |
9a1f999b | 172 | ,fTime(0) |
173 | ,fTime2(0) | |
174 | ,ftimingEle(0) | |
175 | ,ftimingEle2(0) | |
9a1f999b | 176 | ,fPtElec_ULS(0) |
177 | ,fPtElec_LS(0) | |
3db2410d | 178 | |
8e2d649d | 179 | ,fPtElec_ULS_NoPid(0) |
180 | ,fPtElec_LS_NoPid(0) | |
181 | ,fPtElec_ULS_MC(0) | |
182 | ,fPtElec_ULS_MC_weight(0) | |
9a1f999b | 183 | ,fPtElec_ULS2(0) |
184 | ,fPtElec_LS2(0) | |
3db2410d | 185 | |
186 | ,fPtElec_ULS_mc_closure(0) | |
187 | ,fPtElec_LS_mc_closure(0) | |
188 | ,fPtElec_ULS2_mc_closure(0) | |
189 | ,fPtElec_LS2_mc_closure(0) | |
190 | ||
2c8e1f6c | 191 | ,fPtElec_ULS_weight(0) |
192 | ,fPtElec_LS_weight(0) | |
193 | ,fPtElec_ULS2_weight(0) | |
194 | ,fPtElec_LS2_weight(0) | |
2c8e1f6c | 195 | ,fTOF01(0) |
196 | ,fTOF02(0) | |
197 | ,fTOF03(0) | |
9a1f999b | 198 | ,fpid(0) |
3db2410d | 199 | ,fEoverP_pt_true_electrons(0) |
200 | ,fEoverP_pt_true_hadrons(0) | |
201 | ,fEoverP_pt_true_electrons0(0) | |
202 | ,fEoverP_pt_true_hadrons0(0) | |
9a1f999b | 203 | ,fEoverP_pt(0) |
204 | ,fEoverP_tpc(0) | |
628d0da7 | 205 | ,fEoverP_tpc_p_trigger(0) |
206 | ,fEoverP_tpc_pt_trigger(0) | |
9a1f999b | 207 | ,fTPC_pt(0) |
208 | ,fTPC_p(0) | |
209 | ,fTPCnsigma_pt(0) | |
210 | ,fTPCnsigma_p(0) | |
93c64cd2 | 211 | ,fTPCnsigma_p_TPC(0) |
212 | ,fTPCnsigma_p_TPC_on_EMCal_acc(0) | |
213 | ,fTPCnsigma_p_TPC_EoverP_cut(0) | |
9a1f999b | 214 | ,fTPCnsigma_pt_2D(0) |
215 | ,fShowerShapeCut(0) | |
9a4682da | 216 | ,fShowerShapeM02_EoverP(0) |
217 | ,fShowerShapeM20_EoverP(0) | |
9a1f999b | 218 | ,fShowerShape_ha(0) |
219 | ,fShowerShape_ele(0) | |
9a1f999b | 220 | ,fTPCnsigma_eta(0) |
221 | ,fTPCnsigma_phi(0) | |
222 | ,fECluster(0) | |
8e2d649d | 223 | ,fECluster_pure(0) |
1dd85087 | 224 | ,fECluster_not_exotic(0) |
225 | ,fECluster_not_exotic1(0) | |
226 | ,fECluster_not_exotic2(0) | |
227 | ,fECluster_exotic(0) | |
228 | ,fNCluster_pure(0) | |
229 | ,fNCluster_pure_aod(0) | |
230 | ,fNCluster_ECluster(0) | |
231 | ,fNcells_energy(0) | |
232 | ,fNcells_energy_elec_selected(0) | |
233 | ,fNcells_energy_not_exotic(0) | |
234 | ||
9a1f999b | 235 | ,fEtaPhi(0) |
0131ce6c | 236 | ,fEtaPhi_num(0) |
237 | ,fEtaPhi_den(0) | |
1dd85087 | 238 | ,fEtaPhi_data(0) |
8e2d649d | 239 | ,fpt_reco_pt_MC_num(0) |
240 | ,fpt_reco_pt_MC_den(0) | |
9a1f999b | 241 | ,fVtxZ(0) |
0131ce6c | 242 | |
8e2d649d | 243 | ,fVtxZ_new1(0) |
244 | ,fVtxZ_new2(0) | |
245 | ,fVtxZ_new3(0) | |
246 | ,fVtxZ_new4(0) | |
247 | ||
1dd85087 | 248 | ,fzRes1(0) |
249 | ,fzRes2(0) | |
250 | ,fSPD_track_vtx1(0) | |
251 | ,fSPD_track_vtx2(0) | |
252 | ||
253 | ||
8e2d649d | 254 | ,fEtad(0) |
9a1f999b | 255 | ,fNTracks(0) |
1dd85087 | 256 | ,fTrack_Multi(0) |
8e2d649d | 257 | ,fNTracks_pt(0) |
258 | ,fNTracks_eta(0) | |
259 | ,fNTracks_phi(0) | |
9a1f999b | 260 | ,fNClusters(0) |
261 | ,fTPCNcls_EoverP(0) | |
31185d97 | 262 | ,fTPCNcls_pid(0) |
9a1f999b | 263 | ,fEta(0) |
264 | ,fPhi(0) | |
265 | ,fR(0) | |
266 | ,fR_EoverP(0) | |
267 | ,fNcells(0) | |
268 | ,fNcells_EoverP(0) | |
269 | ,fNcells_electrons(0) | |
270 | ,fNcells_hadrons(0) | |
271 | ,fECluster_ptbins(0) | |
272 | ,fEoverP_ptbins(0) | |
273 | ,fEoverP_wSSCut(0) | |
274 | ,fM02_EoverP(0) | |
275 | ,fM20_EoverP(0) | |
276 | ,fTPCnsigma_eta_electrons(0) | |
277 | ,fTPCnsigma_eta_hadrons(0) | |
278 | ,fEoverP_pt_pions(0) | |
279 | ,ftpc_p_EoverPcut(0) | |
280 | ,fnsigma_p_EoverPcut(0) | |
281 | ,fEoverP_pt_pions2(0) | |
282 | ,fNcells_pt(0) | |
283 | ,fEoverP_pt_hadrons(0) | |
284 | ,fCEtaPhi_Inc(0) | |
285 | ,fCEtaPhi_ULS(0) | |
286 | ,fCEtaPhi_LS(0) | |
287 | ,fCEtaPhi_ULS_NoP(0) | |
288 | ,fCEtaPhi_LS_NoP(0) | |
289 | ,fCEtaPhi_ULS_Weight(0) | |
290 | ,fCEtaPhi_LS_Weight(0) | |
291 | ,fCEtaPhi_ULS_NoP_Weight(0) | |
292 | ,fCEtaPhi_LS_NoP_Weight(0) | |
9a1f999b | 293 | ,fInvMass(0) |
294 | ,fInvMassBack(0) | |
295 | ,fDCA(0) | |
296 | ,fDCABack(0) | |
297 | ,fOpAngle(0) | |
298 | ,fOpAngleBack(0) | |
9a1f999b | 299 | ,fInvMass2(0) |
300 | ,fInvMassBack2(0) | |
301 | ,fDCA2(0) | |
302 | ,fDCABack2(0) | |
303 | ,fOpAngle2(0) | |
304 | ,fOpAngleBack2(0) | |
9a1f999b | 305 | ,fMassCut(0.1) |
306 | ,fEtaCutMin(-0.9) | |
307 | ,fEtaCutMax(0.9) | |
9a1f999b | 308 | ,fdPhiCut(0.05) |
309 | ,fdEtaCut(0.05) | |
9a1f999b | 310 | ,fEoverPCutMin(0.8) |
311 | ,fEoverPCutMax(1.2) | |
9a1f999b | 312 | ,fM20CutMin(0.0) |
313 | ,fM20CutMax(10) | |
314 | ,fM02CutMin(0.0) | |
315 | ,fM02CutMax(10) | |
9a1f999b | 316 | ,fAngleCut(999) |
317 | ,fChi2Cut(3.5) | |
a4e971f7 | 318 | ,fDCAcut(999)//dca between two tracks |
319 | ,fDCAcutr(999)//dca to vertex | |
320 | ,fDCAcutz(999)//dca to vertex | |
9a1f999b | 321 | ,fMassCutFlag(kTRUE) |
322 | ,fAngleCutFlag(kFALSE) | |
323 | ,fChi2CutFlag(kFALSE) | |
324 | ,fDCAcutFlag(kFALSE) | |
0131ce6c | 325 | ,fAssHadronPtMin(0.5) |
326 | ,fAssHadronPtMax(2.0) | |
9a1f999b | 327 | ,fPtBackgroundBeforeReco(0) |
328 | ,fPtBackgroundBeforeReco2(0) | |
2c8e1f6c | 329 | ,fPtBackgroundBeforeReco_weight(0) |
330 | ,fPtBackgroundBeforeReco2_weight(0) | |
2235208e | 331 | ,fpT_m_electron(0) |
332 | ,fpT_gm_electron(0) | |
9a1f999b | 333 | ,fPtBackgroundAfterReco(0) |
9a1f999b | 334 | ,fPtMinAsso(0.3) |
335 | ,fTpcNclsAsso(80) | |
9a1f999b | 336 | ,fPtMCparticleAll(0) |
337 | ,fPtMCparticleAll_nonPrimary(0) | |
338 | ,fPtMCparticleAlle_nonPrimary(0) | |
2c8e1f6c | 339 | ,fPtMCparticleAlle_Primary(0) |
9a1f999b | 340 | ,fPtMCparticleReco(0) |
341 | ,fPtMCparticleReco_nonPrimary(0) | |
342 | ,fPtMCparticleAllHfe1(0) | |
343 | ,fPtMCparticleRecoHfe1(0) | |
344 | ,fPtMCparticleAllHfe2(0) | |
345 | ,fPtMCparticleRecoHfe2(0) | |
346 | ,fPtMCelectronAfterAll(0) | |
8e2d649d | 347 | ,fPtMCelectronAfterAll_unfolding(0) |
9a1f999b | 348 | ,fPtMCelectronAfterAll_nonPrimary(0) |
2c8e1f6c | 349 | ,fPtMCelectronAfterAll_Primary(0) |
9a1f999b | 350 | ,fPtMCpi0(0) |
351 | ,fPtMCeta(0) | |
8e2d649d | 352 | ,fPtMCpi02(0) |
353 | ,fPtMCeta2(0) | |
1dd85087 | 354 | ,fPtMCpi03(0) |
355 | ,fPtMCeta3(0) | |
9a1f999b | 356 | ,fPtMC_EMCal_All(0) |
357 | ,fPtMC_EMCal_Selected(0) | |
358 | ,fPtMC_TPC_All(0) | |
359 | ,fPtMC_TPC_Selected(0) | |
8e2d649d | 360 | ,fPt_track_match_den(0) |
361 | ,fPt_track_match_num(0) | |
9a1f999b | 362 | ,fPtMCWithLabel(0) |
363 | ,fPtMCWithoutLabel(0) | |
364 | ,fPtIsPhysicaPrimary(0) | |
365 | ,fCuts(0) | |
8e2d649d | 366 | //,reader(0) |
9a1f999b | 367 | ,fCFM(0) |
368 | ,fPID(new AliHFEpid("hfePid")) | |
8e2d649d | 369 | //Lucile |
9a1f999b | 370 | ,fPIDqa(0) |
371 | ,fMCstack(0) | |
372 | ,fRejectKinkMother(kFALSE) | |
373 | ,fMCtrack(0) | |
374 | ,fMCtrackMother(0) | |
375 | ,fMCtrackGMother(0) | |
376 | ,fMCtrackGGMother(0) | |
377 | ,fMCtrackGGGMother(0) | |
378 | ,fMCarray(0) | |
379 | ,fMCheader(0) | |
380 | ,fMCparticle(0) | |
8e2d649d | 381 | ,fMCparticle2(0) |
9a1f999b | 382 | ,fMCparticleMother(0) |
383 | ,fMCparticleGMother(0) | |
384 | ,fMCparticleGGMother(0) | |
385 | ,fMCparticleGGGMother(0) | |
386 | ,fEventHandler(0) | |
387 | ,fMCevent(0) | |
388 | ,fPoolMgr(0) | |
389 | ,fPool(0) | |
390 | ,fTracksClone(0) | |
391 | ,fTracks(0) | |
392 | ,fCEtaPhi_Inc_EM(0) | |
393 | ,fCEtaPhi_ULS_EM(0) | |
394 | ,fCEtaPhi_LS_EM(0) | |
395 | ,fCEtaPhi_ULS_Weight_EM(0) | |
396 | ,fCEtaPhi_LS_Weight_EM(0) | |
397 | ,fPoolNevents(0) | |
398 | ,fEventMixingFlag(0) | |
399 | ,fCEtaPhi_Inc_DiHadron(0) | |
400 | ,fPtTrigger_Inc(0) | |
1dd85087 | 401 | //,fEMCALRecoUtils(new AliEMCALRecoUtils) |
402 | //,fEMCALGeo(0x0) | |
403 | //,fCaloUtils(0x0) | |
404 | ||
405 | ,fBitEGA(0) | |
406 | //,fEMCALRecoUtils(0)//exotic | |
407 | ||
c852fdae | 408 | { |
9a1f999b | 409 | //Named constructor |
410 | // Define input and output slots here | |
411 | // Input slot #0 works with a TChain | |
1dd85087 | 412 | |
413 | //exotic | |
414 | //fEMCALRecoUtils = new AliEMCALRecoUtils(); | |
415 | ||
9a1f999b | 416 | DefineInput(0, TChain::Class()); |
417 | // Output slot #0 id reserved by the base class for AOD | |
418 | // Output slot #1 writes into a TH1 container | |
419 | // DefineOutput(1, TH1I::Class()); | |
420 | DefineOutput(1, TList::Class()); | |
421 | // DefineOutput(3, TTree::Class()); | |
c852fdae | 422 | } |
423 | ||
9a1f999b | 424 | //________________________________________________________________________ |
c852fdae | 425 | AliAnalysisTaskEMCalHFEpA::AliAnalysisTaskEMCalHFEpA() |
9a1f999b | 426 | : AliAnalysisTaskSE("DefaultAnalysis_AliAnalysisTaskEMCalHFEpA") |
427 | ,fCorrelationFlag(0) | |
428 | ,fIsMC(0) | |
429 | ,fUseEMCal(kFALSE) | |
8e2d649d | 430 | ,fUseTrigger(kFALSE) |
3db2410d | 431 | ,fUseTender(kFALSE) |
9a1f999b | 432 | ,fUseShowerShapeCut(kFALSE) |
433 | ,fFillBackground(kFALSE) | |
3db2410d | 434 | ,fEoverPnsigma(kFALSE) |
2c8e1f6c | 435 | ,fAssocWithSPD(kFALSE) |
9a1f999b | 436 | ,fEMCEG1(kFALSE) |
437 | ,fEMCEG2(kFALSE) | |
438 | ,fIsHFE1(kFALSE) | |
439 | ,fIsHFE2(kFALSE) | |
440 | ,fIsNonHFE(kFALSE) | |
441 | ,fIsFromD(kFALSE) | |
442 | ,fIsFromB(kFALSE) | |
443 | ,fIsFromPi0(kFALSE) | |
444 | ,fIsFromEta(kFALSE) | |
445 | ,fIsFromGamma(kFALSE) | |
446 | ,fESD(0) | |
447 | ,fAOD(0) | |
448 | ,fVevent(0) | |
449 | ,fPartnerCuts(new AliESDtrackCuts()) | |
450 | ,fOutputList(0) | |
451 | ,fPidResponse(0) | |
452 | ,fNonHFE(new AliSelectNonHFE()) | |
453 | ,fIsAOD(kFALSE) | |
454 | ,fCentrality(0) | |
455 | ,fCentralityMin(0) | |
456 | ,fCentralityMax(100) | |
457 | ,fHasCentralitySelection(kFALSE) | |
458 | ,fCentralityHist(0) | |
459 | ,fCentralityHistPass(0) | |
460 | ,fZvtx(0) | |
461 | ,fEstimator(0) | |
462 | ,fClus(0) | |
a89620c8 | 463 | //,fClusESD(0) |
9a1f999b | 464 | ,fNevent(0) |
1dd85087 | 465 | ,fNevent2(0) |
9a1f999b | 466 | ,fPtElec_Inc(0) |
8e2d649d | 467 | ,fPtPrim(0) |
468 | ,fPtSec(0) | |
469 | ,fPtPrim2(0) | |
470 | ,fPtSec2(0) | |
9a1f999b | 471 | ,fCharge_n(0) |
472 | ,fCharge_p(0) | |
9a1f999b | 473 | ,fTime(0) |
474 | ,fTime2(0) | |
475 | ,ftimingEle(0) | |
476 | ,ftimingEle2(0) | |
9a1f999b | 477 | ,fPtElec_ULS(0) |
478 | ,fPtElec_LS(0) | |
8e2d649d | 479 | ,fPtElec_ULS_NoPid(0) |
480 | ,fPtElec_LS_NoPid(0) | |
481 | ,fPtElec_ULS_MC(0) | |
482 | ,fPtElec_ULS_MC_weight(0) | |
9a1f999b | 483 | ,fPtElec_ULS2(0) |
484 | ,fPtElec_LS2(0) | |
3db2410d | 485 | |
486 | ,fPtElec_ULS_mc_closure(0) | |
487 | ,fPtElec_LS_mc_closure(0) | |
488 | ,fPtElec_ULS2_mc_closure(0) | |
489 | ,fPtElec_LS2_mc_closure(0) | |
490 | ||
2c8e1f6c | 491 | ,fPtElec_ULS_weight(0) |
492 | ,fPtElec_LS_weight(0) | |
493 | ,fPtElec_ULS2_weight(0) | |
494 | ,fPtElec_LS2_weight(0) | |
2c8e1f6c | 495 | ,fTOF01(0) |
496 | ,fTOF02(0) | |
497 | ,fTOF03(0) | |
9a1f999b | 498 | ,fpid(0) |
3db2410d | 499 | ,fEoverP_pt_true_electrons(0) |
500 | ,fEoverP_pt_true_hadrons(0) | |
501 | ,fEoverP_pt_true_electrons0(0) | |
502 | ,fEoverP_pt_true_hadrons0(0) | |
9a1f999b | 503 | ,fEoverP_pt(0) |
504 | ,fEoverP_tpc(0) | |
628d0da7 | 505 | ,fEoverP_tpc_p_trigger(0) |
506 | ,fEoverP_tpc_pt_trigger(0) | |
9a1f999b | 507 | ,fTPC_pt(0) |
508 | ,fTPC_p(0) | |
509 | ,fTPCnsigma_pt(0) | |
510 | ,fTPCnsigma_p(0) | |
93c64cd2 | 511 | ,fTPCnsigma_p_TPC(0) |
512 | ,fTPCnsigma_p_TPC_on_EMCal_acc(0) | |
513 | ,fTPCnsigma_p_TPC_EoverP_cut(0) | |
9a1f999b | 514 | ,fTPCnsigma_pt_2D(0) |
515 | ,fShowerShapeCut(0) | |
9a4682da | 516 | ,fShowerShapeM02_EoverP(0) |
517 | ,fShowerShapeM20_EoverP(0) | |
9a4682da | 518 | ,fShowerShape_ha(0) |
519 | ,fShowerShape_ele(0) | |
9a1f999b | 520 | ,fTPCnsigma_eta(0) |
521 | ,fTPCnsigma_phi(0) | |
522 | ,fECluster(0) | |
8e2d649d | 523 | ,fECluster_pure(0) |
1dd85087 | 524 | ,fECluster_not_exotic(0) |
525 | ,fECluster_not_exotic1(0) | |
526 | ,fECluster_not_exotic2(0) | |
527 | ,fECluster_exotic(0) | |
528 | ,fNCluster_pure(0) | |
529 | ,fNCluster_pure_aod(0) | |
530 | ,fNCluster_ECluster(0) | |
531 | ,fNcells_energy(0) | |
532 | ,fNcells_energy_elec_selected(0) | |
533 | ,fNcells_energy_not_exotic(0) | |
9a1f999b | 534 | ,fEtaPhi(0) |
0131ce6c | 535 | ,fEtaPhi_num(0) |
536 | ,fEtaPhi_den(0) | |
1dd85087 | 537 | ,fEtaPhi_data(0) |
8e2d649d | 538 | ,fpt_reco_pt_MC_num(0) |
539 | ,fpt_reco_pt_MC_den(0) | |
9a1f999b | 540 | ,fVtxZ(0) |
0131ce6c | 541 | |
8e2d649d | 542 | ,fVtxZ_new1(0) |
543 | ,fVtxZ_new2(0) | |
544 | ,fVtxZ_new3(0) | |
545 | ,fVtxZ_new4(0) | |
546 | ||
1dd85087 | 547 | ,fzRes1(0) |
548 | ,fzRes2(0) | |
549 | ,fSPD_track_vtx1(0) | |
550 | ,fSPD_track_vtx2(0) | |
551 | ||
552 | ||
553 | ||
8e2d649d | 554 | ,fEtad(0) |
9a1f999b | 555 | ,fNTracks(0) |
1dd85087 | 556 | ,fTrack_Multi(0) |
8e2d649d | 557 | ,fNTracks_pt(0) |
558 | ,fNTracks_eta(0) | |
559 | ,fNTracks_phi(0) | |
9a1f999b | 560 | ,fNClusters(0) |
561 | ,fTPCNcls_EoverP(0) | |
31185d97 | 562 | ,fTPCNcls_pid(0) |
9a1f999b | 563 | ,fEta(0) |
564 | ,fPhi(0) | |
565 | ,fR(0) | |
566 | ,fR_EoverP(0) | |
567 | ,fNcells(0) | |
568 | ,fNcells_EoverP(0) | |
569 | ,fNcells_electrons(0) | |
570 | ,fNcells_hadrons(0) | |
571 | ,fECluster_ptbins(0) | |
572 | ,fEoverP_ptbins(0) | |
573 | ,fEoverP_wSSCut(0) | |
574 | ,fM02_EoverP(0) | |
575 | ,fM20_EoverP(0) | |
576 | ,fTPCnsigma_eta_electrons(0) | |
577 | ,fTPCnsigma_eta_hadrons(0) | |
578 | ,fEoverP_pt_pions(0) | |
579 | ,ftpc_p_EoverPcut(0) | |
580 | ,fnsigma_p_EoverPcut(0) | |
581 | ,fEoverP_pt_pions2(0) | |
582 | ,fNcells_pt(0) | |
583 | ,fEoverP_pt_hadrons(0) | |
584 | ,fCEtaPhi_Inc(0) | |
585 | ,fCEtaPhi_ULS(0) | |
586 | ,fCEtaPhi_LS(0) | |
587 | ,fCEtaPhi_ULS_NoP(0) | |
588 | ,fCEtaPhi_LS_NoP(0) | |
589 | ,fCEtaPhi_ULS_Weight(0) | |
590 | ,fCEtaPhi_LS_Weight(0) | |
591 | ,fCEtaPhi_ULS_NoP_Weight(0) | |
592 | ,fCEtaPhi_LS_NoP_Weight(0) | |
9a1f999b | 593 | ,fInvMass(0) |
594 | ,fInvMassBack(0) | |
595 | ,fDCA(0) | |
596 | ,fDCABack(0) | |
597 | ,fOpAngle(0) | |
598 | ,fOpAngleBack(0) | |
9a1f999b | 599 | ,fInvMass2(0) |
600 | ,fInvMassBack2(0) | |
601 | ,fDCA2(0) | |
602 | ,fDCABack2(0) | |
603 | ,fOpAngle2(0) | |
604 | ,fOpAngleBack2(0) | |
9a1f999b | 605 | ,fMassCut(0.1) |
606 | ,fEtaCutMin(-0.9) | |
607 | ,fEtaCutMax(0.9) | |
9a1f999b | 608 | ,fdPhiCut(0.05) |
609 | ,fdEtaCut(0.05) | |
9a1f999b | 610 | ,fEoverPCutMin(0.8) |
611 | ,fEoverPCutMax(1.2) | |
9a1f999b | 612 | ,fM20CutMin(0) |
613 | ,fM20CutMax(10) | |
614 | ,fM02CutMin(0) | |
615 | ,fM02CutMax(10) | |
9a1f999b | 616 | ,fAngleCut(999) |
617 | ,fChi2Cut(3.5) | |
a4e971f7 | 618 | ,fDCAcut(999)//dca between two tracks |
619 | ,fDCAcutr(999)//dca to vertex | |
620 | ,fDCAcutz(999)//dca to vertex | |
9a1f999b | 621 | ,fMassCutFlag(kTRUE) |
622 | ,fAngleCutFlag(kFALSE) | |
623 | ,fChi2CutFlag(kFALSE) | |
624 | ,fDCAcutFlag(kFALSE) | |
0131ce6c | 625 | ,fAssHadronPtMin(0.5) |
626 | ,fAssHadronPtMax(2.0) | |
9a1f999b | 627 | ,fPtBackgroundBeforeReco(0) |
628 | ,fPtBackgroundBeforeReco2(0) | |
2c8e1f6c | 629 | ,fPtBackgroundBeforeReco_weight(0) |
630 | ,fPtBackgroundBeforeReco2_weight(0) | |
2235208e | 631 | ,fpT_m_electron(0) |
632 | ,fpT_gm_electron(0) | |
9a1f999b | 633 | ,fPtBackgroundAfterReco(0) |
9a1f999b | 634 | ,fPtMinAsso(0.3) |
635 | ,fTpcNclsAsso(80) | |
9a1f999b | 636 | ,fPtMCparticleAll(0) |
637 | ,fPtMCparticleAll_nonPrimary(0) | |
638 | ,fPtMCparticleAlle_nonPrimary(0) | |
2c8e1f6c | 639 | ,fPtMCparticleAlle_Primary(0) |
9a1f999b | 640 | ,fPtMCparticleReco(0) |
641 | ,fPtMCparticleReco_nonPrimary(0) | |
9a1f999b | 642 | ,fPtMCparticleAllHfe1(0) |
643 | ,fPtMCparticleRecoHfe1(0) | |
644 | ,fPtMCparticleAllHfe2(0) | |
645 | ,fPtMCparticleRecoHfe2(0) | |
646 | ,fPtMCelectronAfterAll(0) | |
8e2d649d | 647 | ,fPtMCelectronAfterAll_unfolding(0) |
9a1f999b | 648 | ,fPtMCelectronAfterAll_nonPrimary(0) |
2c8e1f6c | 649 | ,fPtMCelectronAfterAll_Primary(0) |
9a1f999b | 650 | ,fPtMCpi0(0) |
651 | ,fPtMCeta(0) | |
8e2d649d | 652 | ,fPtMCpi02(0) |
653 | ,fPtMCeta2(0) | |
1dd85087 | 654 | ,fPtMCpi03(0) |
655 | ,fPtMCeta3(0) | |
9a1f999b | 656 | ,fPtMC_EMCal_All(0) |
657 | ,fPtMC_EMCal_Selected(0) | |
658 | ,fPtMC_TPC_All(0) | |
659 | ,fPtMC_TPC_Selected(0) | |
8e2d649d | 660 | ,fPt_track_match_den(0) |
661 | ,fPt_track_match_num(0) | |
9a1f999b | 662 | ,fPtMCWithLabel(0) |
663 | ,fPtMCWithoutLabel(0) | |
664 | ,fPtIsPhysicaPrimary(0) | |
665 | ,fCuts(0) | |
8e2d649d | 666 | //Lucile |
667 | //,reader(0) | |
9a1f999b | 668 | ,fCFM(0) |
669 | ,fPID(new AliHFEpid("hfePid")) | |
670 | ,fPIDqa(0) | |
671 | ,fMCstack(0) | |
672 | ,fRejectKinkMother(kFALSE) | |
673 | ,fMCtrack(0) | |
674 | ,fMCtrackMother(0) | |
675 | ,fMCtrackGMother(0) | |
676 | ,fMCtrackGGMother(0) | |
677 | ,fMCtrackGGGMother(0) | |
678 | ,fMCarray(0) | |
679 | ,fMCheader(0) | |
680 | ,fMCparticle(0) | |
8e2d649d | 681 | ,fMCparticle2(0) |
9a1f999b | 682 | ,fMCparticleMother(0) |
683 | ,fMCparticleGMother(0) | |
684 | ,fMCparticleGGMother(0) | |
685 | ,fMCparticleGGGMother(0) | |
686 | ,fEventHandler(0) | |
687 | ,fMCevent(0) | |
688 | ,fPoolMgr(0) | |
689 | ,fPool(0) | |
690 | ,fTracksClone(0) | |
691 | ,fTracks(0) | |
692 | ,fCEtaPhi_Inc_EM(0) | |
693 | ,fCEtaPhi_ULS_EM(0) | |
694 | ,fCEtaPhi_LS_EM(0) | |
695 | ,fCEtaPhi_ULS_Weight_EM(0) | |
696 | ,fCEtaPhi_LS_Weight_EM(0) | |
697 | ,fPoolNevents(0) | |
698 | ,fEventMixingFlag(0) | |
699 | ,fCEtaPhi_Inc_DiHadron(0) | |
700 | ,fPtTrigger_Inc(0) | |
1dd85087 | 701 | //,fEMCALRecoUtils(new AliEMCALRecoUtils) |
702 | //,fEMCALGeo(0x0) | |
703 | //,fCaloUtils(0x0) | |
704 | ,fBitEGA(0) | |
705 | //,fEMCALRecoUtils(0)//exotic | |
c852fdae | 706 | { |
9a1f999b | 707 | // Constructor |
708 | // Define input and output slots here | |
709 | // Input slot #0 works with a TChain | |
1dd85087 | 710 | |
711 | //exotic | |
712 | // fEMCALRecoUtils = new AliEMCALRecoUtils(); | |
713 | ||
c852fdae | 714 | DefineInput(0, TChain::Class()); |
9a1f999b | 715 | // Output slot #0 id reserved by the base class for AOD |
716 | // Output slot #1 writes into a TH1 container | |
717 | // DefineOutput(1, TH1I::Class()); | |
c852fdae | 718 | DefineOutput(1, TList::Class()); |
9a1f999b | 719 | //DefineOutput(3, TTree::Class()); |
c852fdae | 720 | } |
721 | ||
9a1f999b | 722 | //______________________________________________________________________ |
c852fdae | 723 | AliAnalysisTaskEMCalHFEpA::~AliAnalysisTaskEMCalHFEpA() |
724 | { | |
8e2d649d | 725 | //Destructor |
c852fdae | 726 | delete fOutputList; |
727 | delete fPID; | |
728 | delete fCFM; | |
729 | delete fPIDqa; | |
8e2d649d | 730 | //Lucile |
731 | //delete reader; | |
1dd85087 | 732 | //if(fEMCALRecoUtils) delete fEMCALRecoUtils ; |
c852fdae | 733 | } |
734 | ||
9a1f999b | 735 | //______________________________________________________________________ |
736 | //Create Output Objects | |
737 | //Here we can define the histograms and others output files | |
738 | //Called once | |
c852fdae | 739 | void AliAnalysisTaskEMCalHFEpA::UserCreateOutputObjects() |
740 | { | |
9a1f999b | 741 | //______________________________________________________________________ |
742 | //Initialize PID | |
c852fdae | 743 | if(!fPID->GetNumberOfPIDdetectors()) |
744 | { | |
745 | fPID->AddDetector("TPC", 0); | |
746 | } | |
9a1f999b | 747 | |
c852fdae | 748 | fPID->SortDetectors(); |
749 | ||
750 | fPIDqa = new AliHFEpidQAmanager(); | |
751 | fPIDqa->Initialize(fPID); | |
9a1f999b | 752 | //______________________________________________________________________ |
753 | ||
754 | //______________________________________________________________________ | |
755 | //Initialize correction Framework and Cuts | |
c852fdae | 756 | fCFM = new AliCFManager; |
757 | const Int_t kNcutSteps = AliHFEcuts::kNcutStepsMCTrack + AliHFEcuts::kNcutStepsRecTrack + AliHFEcuts::kNcutStepsDETrack; | |
758 | fCFM->SetNStepParticle(kNcutSteps); | |
759 | for(Int_t istep = 0; istep < kNcutSteps; istep++) fCFM->SetParticleCutsList(istep, NULL); | |
9a1f999b | 760 | |
c852fdae | 761 | if(!fCuts) |
762 | { | |
763 | AliWarning("Cuts not available. Default cuts will be used"); | |
764 | fCuts = new AliHFEcuts; | |
765 | fCuts->CreateStandardCuts(); | |
766 | } | |
767 | ||
768 | fCuts->Initialize(fCFM); | |
9a1f999b | 769 | //______________________________________________________________________ |
770 | ||
8e2d649d | 771 | ///___________________//Lucile |
772 | ||
773 | //if(fIsAOD) { | |
774 | // reader = new AliCaloTrackAODReader(); | |
775 | //} | |
776 | //___________________________________________________ | |
9a1f999b | 777 | ///Output Tlist |
778 | //Create TList | |
c852fdae | 779 | fOutputList = new TList(); |
780 | fOutputList->SetOwner(); | |
9a1f999b | 781 | |
782 | //PIDqa | |
c852fdae | 783 | fOutputList->Add(fPIDqa->MakeList("PIDQA")); |
9a1f999b | 784 | |
785 | //Store the number of events | |
786 | //Define the histo | |
1dd85087 | 787 | fNevent = new TH1F("fNevent","Number of Events",30,0,30); |
788 | fNevent2 = new TH1F("fNevent2","Number of Events 2",30,0,30); | |
9a1f999b | 789 | //And then, add to the output list |
c852fdae | 790 | fOutputList->Add(fNevent); |
1dd85087 | 791 | fOutputList->Add(fNevent2); |
c852fdae | 792 | |
793 | fpid = new TH1F("fpid","PID flag",5,0,5); | |
794 | fOutputList->Add(fpid); | |
795 | ||
8e2d649d | 796 | //pt Distribution |
797 | fPtElec_Inc = new TH1F("fPtElec_Inc","Inclusive Electrons; p_{T} (GeV/c); Count",300,0,30); | |
798 | ||
799 | fPtPrim = new TH1F("fPtPrim","Primary Electrons aod track; p_{T} (GeV/c); Count",300,0,30); | |
800 | fPtSec = new TH1F("fPtSec","Secundary Electrons aod track; p_{T} (GeV/c); Count",300,0,30); | |
801 | fPtPrim2 = new TH1F("fPtPrim2","Primary Electrons vtrack; p_{T} (GeV/c); Count",300,0,30); | |
802 | fPtSec2 = new TH1F("fPtSec2","Secundary Electrons vtrack; p_{T} (GeV/c); Count",300,0,30); | |
803 | ||
804 | ||
805 | fPtElec_ULS = new TH1F("fPtElec_ULS","ULS; p_{T} (GeV/c); Count",300,0,30); | |
806 | fPtElec_LS = new TH1F("fPtElec_LS","LS; p_{T} (GeV/c); Count",300,0,30); | |
807 | ||
808 | fPtElec_ULS_NoPid = new TH1F("fPtElec_ULS_NoPid","ULS; p_{T} (GeV/c); Count",300,0,30); | |
809 | fPtElec_LS_NoPid = new TH1F("fPtElec_LS_NoPid","LS; p_{T} (GeV/c); Count",300,0,30); | |
9a4682da | 810 | |
8e2d649d | 811 | fPtElec_ULS_MC = new TH1F("fPtElec_ULS_MC","ULS; p_{T} (GeV/c); Count",300,0,30); |
812 | fPtElec_ULS_MC_weight = new TH1F("fPtElec_ULS_MC_weight","ULS; p_{T} (GeV/c); Count",300,0,30); | |
9a4682da | 813 | |
8e2d649d | 814 | fPtElec_ULS_weight = new TH1F("fPtElec_ULS_weight","ULS; p_{T} (GeV/c); Count",300,0,30); |
815 | fPtElec_LS_weight = new TH1F("fPtElec_LS_weight","LS; p_{T} (GeV/c); Count",300,0,30); | |
2c8e1f6c | 816 | |
817 | fTOF01 = new TH2F("fTOF01","",200,-20,20,200,-20,20); | |
818 | fTOF02 = new TH2F("fTOF02","",200,-20,20,200,-20,20); | |
67eb14b9 | 819 | fTOF03 = new TH2F("fTOF03","",200,-20,20,200,-20,20); |
2c8e1f6c | 820 | |
9a4682da | 821 | if(fFillBackground){ |
8e2d649d | 822 | fPtElec_ULS2 = new TH1F("fPtElec_ULS2","ULS; p_{T} (GeV/c); Count",300,0,30); |
823 | fPtElec_LS2 = new TH1F("fPtElec_LS2","LS; p_{T} (GeV/c); Count",300,0,30); | |
2c8e1f6c | 824 | |
8e2d649d | 825 | fPtElec_ULS2_weight = new TH1F("fPtElec_ULS2_weight","ULS; p_{T} (GeV/c); Count",300,0,30); |
826 | fPtElec_LS2_weight = new TH1F("fPtElec_LS2_weight","LS; p_{T} (GeV/c); Count",300,0,30); | |
3db2410d | 827 | |
828 | //mc closure | |
829 | fPtElec_ULS_mc_closure = new TH1F("fPtElec_ULS_mc_closure","ULS; p_{T} (GeV/c); Count",300,0,30); | |
830 | fPtElec_LS_mc_closure = new TH1F("fPtElec_LS_mc_closure","LS; p_{T} (GeV/c); Count",300,0,30); | |
831 | fPtElec_ULS2_mc_closure = new TH1F("fPtElec_ULS2_mc_closure","ULS; p_{T} (GeV/c); Count",300,0,30); | |
832 | fPtElec_LS2_mc_closure = new TH1F("fPtElec_LS2_mc_closure","LS; p_{T} (GeV/c); Count",300,0,30); | |
833 | ||
834 | ||
2c8e1f6c | 835 | |
9a4682da | 836 | } |
837 | ||
838 | fPtTrigger_Inc = new TH1F("fPtTrigger_Inc","pT dist for Hadron Contamination; p_{t} (GeV/c); Count",300,0,30); | |
c852fdae | 839 | fTPCnsigma_pt_2D = new TH2F("fTPCnsigma_pt_2D",";pt (GeV/c);TPC Electron N#sigma",1000,0.3,30,1000,-15,10); |
93c64cd2 | 840 | |
841 | //new histos for TPC signal -> Can be used for any p range | |
842 | fTPCnsigma_p_TPC = new TH2F("fTPCnsigma_p_TPC",";p (GeV/c);TPC Electron N#sigma",3000,0,30,1000,-15,10); | |
843 | fTPCnsigma_p_TPC_on_EMCal_acc = new TH2F("fTPCnsigma_p_TPC_on_EMCal_acc",";p (GeV/c);TPC Electron N#sigma",3000,0,30,1000,-15,10); | |
844 | fTPCnsigma_p_TPC_EoverP_cut = new TH2F("fTPCnsigma_p_TPC_EoverP_cut",";p (GeV/c);TPC Electron N#sigma",3000,0,30,1000,-15,10); | |
845 | ||
846 | ||
9a4682da | 847 | fShowerShapeCut = new TH2F("fShowerShapeCut","Shower Shape;M02;M20",500,0,1.8,500,0,1.8); |
0131ce6c | 848 | fEtaPhi_num=new TH2F("fEtaPhi_num","#eta x #phi track;#phi;#eta",200,0.,5,50,-1.,1.); |
849 | fEtaPhi_den=new TH2F("fEtaPhi_den","#eta x #phi track;#phi;#eta",200,0.,5,50,-1.,1.); | |
1dd85087 | 850 | fEtaPhi_data=new TH2F("fEtaPhi_data","#eta x #phi track;#phi;#eta",200,0.,5,50,-1.,1.); |
8e2d649d | 851 | |
852 | fpt_reco_pt_MC_num=new TH2F("fpt_reco_pt_MC_num","pt reco x pt MC;pt reco; pt MC",300,0.,30,300,0.,30); | |
853 | fpt_reco_pt_MC_den=new TH2F("fpt_reco_pt_MC_den","pt reco x pt MC;pt reco; pt MC",300,0.,30,300,0.,30); | |
9a4682da | 854 | |
a6f21076 | 855 | |
856 | fCharge_n = new TH1F("fCharge_n","Inclusive Electrons (Negative Charge); p_{t} (GeV/c); Count",200,0,30); | |
857 | fCharge_p = new TH1F("fCharge_p","Inclusive Positrons (Positive Charge); p_{t} (GeV/c); Count",200,0,30); | |
a89620c8 | 858 | |
8e2d649d | 859 | fECluster_pure= new TH1F("fECluster_pure", ";ECluster pure",2000,0,100); |
1dd85087 | 860 | fECluster_not_exotic= new TH1F("fECluster_not_exotic", ";ECluster not exotic - function ",2000,0,100); |
861 | ||
862 | fECluster_not_exotic1= new TH1F("fECluster_not_exotic1", ";ECluster not exotic Ncells > E/3+1",2000,0,100); | |
863 | ||
864 | fECluster_not_exotic2= new TH1F("fECluster_not_exotic2", ";ECluster not exotic 2",2000,0,100); | |
865 | fECluster_exotic= new TH1F("fECluster_exotic", ";ECluster exotic",2000,0,100); | |
866 | ||
867 | //not associated with tracks | |
868 | fNCluster_pure= new TH1F("fNCluster_pure", ";Number of clusters - pure",2000,-1,1999); | |
869 | fNCluster_pure_aod= new TH1F("fNCluster_pure_aod", ";Number of clusters - pure -aod",2000,-1,1999); | |
870 | fNCluster_ECluster= new TH2F("fNCluster_ECluster", ";Number of clusters vs. Energy of Cluster",2000,-1,1999, 4000, -1, 1999); | |
871 | ||
872 | fNcells_energy= new TH2F("fNcells_energy", "all clusters;Number of cells;Energy of Cluster",100,0,100, 2000, 0, 100); | |
873 | fNcells_energy_elec_selected= new TH2F("fNcells_energy_elec_selected", "clusters for electrons on TPC;Number of cells;Energy of Cluster",100,0,100, 2000, 0, 100); | |
874 | fNcells_energy_not_exotic= new TH2F("fNcells_energy_not_exotic", "not exotic cluster;Number of cells;Energy of Cluster ",100,0,100, 2000, 0, 100); | |
8e2d649d | 875 | |
a89620c8 | 876 | if(fUseEMCal){ |
9a4682da | 877 | |
9a1f999b | 878 | if(!fIsAOD){ |
9a4682da | 879 | fTime = new TH2D("fTime","Cells Cluster Time; p_{T} (GeV/c); Time (s)",300,0,30,1000,1e-8,1e-5); |
880 | fTime2 = new TH2D("fTime2","Cells Cluster Time; p_{T} (GeV/c); Time (s)",300,0,30,1000,1e-8,1e-5); | |
9a1f999b | 881 | } |
9a4682da | 882 | |
a89620c8 | 883 | ftimingEle = new TH2D("ftimingEle","Cluster Time; p_{T} (GeV/c); Time (s)",300,0,30,1000,1e-8,1e-5); |
884 | ftimingEle2 = new TH2D("ftimingEle2","Cluster Time; p_{T} (GeV/c); Time (s)",300,0,30,1000,1e-8,1e-5); | |
885 | ||
9a4682da | 886 | fShowerShape_ha = new TH2F("fShowerShape_ha","Shower Shape hadrons;M02;M20",500,0,1.8,500,0,1.8); |
887 | fShowerShape_ele = new TH2F("fShowerShape_ele","Shower Shape electrons;M02;M20",500,0,1.8,500,0,1.8); | |
a89620c8 | 888 | |
9a4682da | 889 | fShowerShapeM02_EoverP = new TH2F("fShowerShapeM02_EoverP","Shower Shape;M02;E/p",500,0,1.8,500,0,1.8); |
890 | fShowerShapeM20_EoverP = new TH2F("fShowerShapeM20_EoverP","Shower Shape;M20;E/p",500,0,1.8,500,0,1.8); | |
9a1f999b | 891 | |
a89620c8 | 892 | } |
c852fdae | 893 | |
2c8e1f6c | 894 | fOutputList->Add(fTOF01); |
895 | fOutputList->Add(fTOF02); | |
896 | fOutputList->Add(fTOF03); | |
897 | ||
0131ce6c | 898 | fOutputList->Add(fEtaPhi_num); |
899 | fOutputList->Add(fEtaPhi_den); | |
1dd85087 | 900 | fOutputList->Add(fEtaPhi_data); |
0131ce6c | 901 | |
8e2d649d | 902 | fOutputList->Add(fpt_reco_pt_MC_num); |
903 | fOutputList->Add(fpt_reco_pt_MC_den); | |
904 | ||
905 | ||
c852fdae | 906 | fOutputList->Add(fPtElec_Inc); |
907 | fOutputList->Add(fPtElec_ULS); | |
908 | fOutputList->Add(fPtElec_LS); | |
8e2d649d | 909 | fOutputList->Add(fPtElec_ULS_NoPid); |
910 | fOutputList->Add(fPtElec_LS_NoPid); | |
911 | fOutputList->Add(fPtElec_ULS_MC); | |
912 | fOutputList->Add(fPtElec_ULS_MC_weight); | |
913 | ||
914 | fOutputList->Add(fPtPrim); | |
915 | fOutputList->Add(fPtSec); | |
916 | fOutputList->Add(fPtPrim2); | |
917 | fOutputList->Add(fPtSec2); | |
918 | ||
919 | ||
920 | ||
2c8e1f6c | 921 | fOutputList->Add(fPtElec_ULS_weight); |
922 | fOutputList->Add(fPtElec_LS_weight); | |
9a4682da | 923 | |
924 | if(fFillBackground){ | |
925 | fOutputList->Add(fPtElec_ULS2); | |
926 | fOutputList->Add(fPtElec_LS2); | |
2c8e1f6c | 927 | fOutputList->Add(fPtElec_ULS2_weight); |
928 | fOutputList->Add(fPtElec_LS2_weight); | |
3db2410d | 929 | |
930 | fOutputList->Add(fPtElec_ULS_mc_closure); | |
931 | fOutputList->Add(fPtElec_LS_mc_closure); | |
932 | fOutputList->Add(fPtElec_ULS2_mc_closure); | |
933 | fOutputList->Add(fPtElec_LS2_mc_closure); | |
9a4682da | 934 | } |
935 | ||
936 | ||
c852fdae | 937 | fOutputList->Add(fPtTrigger_Inc); |
938 | fOutputList->Add(fTPCnsigma_pt_2D); | |
93c64cd2 | 939 | |
940 | fOutputList->Add(fTPCnsigma_p_TPC); | |
941 | fOutputList->Add(fTPCnsigma_p_TPC_on_EMCal_acc); | |
942 | fOutputList->Add(fTPCnsigma_p_TPC_EoverP_cut); | |
943 | ||
944 | ||
945 | ||
a89620c8 | 946 | fOutputList->Add(fShowerShapeCut); |
c852fdae | 947 | |
a6f21076 | 948 | fOutputList->Add(fCharge_n); |
949 | fOutputList->Add(fCharge_p); | |
950 | ||
8e2d649d | 951 | fOutputList->Add(fECluster_pure); |
1dd85087 | 952 | fOutputList->Add(fECluster_not_exotic); |
953 | fOutputList->Add(fECluster_not_exotic1); | |
954 | fOutputList->Add(fECluster_not_exotic2); | |
955 | fOutputList->Add(fECluster_exotic); | |
956 | ||
957 | fOutputList->Add(fNCluster_pure); | |
958 | fOutputList->Add(fNCluster_pure_aod); | |
959 | ||
960 | fOutputList->Add(fNCluster_ECluster); | |
961 | fOutputList->Add(fNcells_energy); | |
962 | fOutputList->Add(fNcells_energy_elec_selected); | |
963 | fOutputList->Add(fNcells_energy_not_exotic); | |
964 | ||
8e2d649d | 965 | |
a89620c8 | 966 | if(fUseEMCal){ |
9a4682da | 967 | |
9a1f999b | 968 | if(!fIsAOD){ |
9a4682da | 969 | fOutputList->Add(fTime); |
970 | fOutputList->Add(fTime2); | |
971 | ||
9a1f999b | 972 | } |
9a4682da | 973 | |
a89620c8 | 974 | fOutputList->Add(ftimingEle); |
975 | fOutputList->Add(ftimingEle2); | |
9a4682da | 976 | |
977 | fOutputList->Add(fShowerShape_ha); | |
978 | fOutputList->Add(fShowerShape_ele); | |
979 | ||
980 | fOutputList->Add(fShowerShapeM02_EoverP); | |
981 | fOutputList->Add(fShowerShapeM20_EoverP); | |
9a4682da | 982 | |
9a1f999b | 983 | |
984 | ||
a89620c8 | 985 | } |
986 | ||
1dd85087 | 987 | fVtxZ_new1= new TH1F("fVtxZ_new1","fVtxZ_new1",4000, -50,50); |
988 | fVtxZ_new2= new TH1F("fVtxZ_new2","fVtxZ_new2",4000, -50,50); | |
989 | fVtxZ_new3= new TH1F("fVtxZ_new3","fVtxZ_new3",4000, -50,50); | |
990 | fVtxZ_new4= new TH1F("fVtxZ_new4","fVtxZ_new4",4000, -50,50); | |
991 | ||
992 | fzRes1= new TH1F("fzRes1","fzRes1",4000, 0,1); | |
993 | fzRes2= new TH1F("fzRes2","fzRes2",4000, 0,1); | |
994 | fSPD_track_vtx1= new TH1F("fSPD_track_vtx1","fSPD_track_vtx1",4000, -5,5); | |
995 | fSPD_track_vtx2= new TH1F("fSPD_track_vtx2","fSPD_track_vtx2",4000, -5,5); | |
8e2d649d | 996 | |
1dd85087 | 997 | |
9a1f999b | 998 | //General Histograms |
c852fdae | 999 | |
9a1f999b | 1000 | //Steps |
1001 | //Step 1: Before Track cuts | |
1002 | //Step 2: Before PID | |
1003 | //Step 3: After PID | |
c852fdae | 1004 | |
1005 | fEoverP_pt = new TH2F *[3]; | |
1006 | fTPC_p = new TH2F *[3]; | |
1007 | fTPCnsigma_p = new TH2F *[3]; | |
1008 | ||
1009 | fECluster= new TH1F *[3]; | |
1010 | fEtaPhi= new TH2F *[3]; | |
1011 | fVtxZ= new TH1F *[3]; | |
0131ce6c | 1012 | fEtad= new TH1F *[3]; |
c852fdae | 1013 | fNTracks= new TH1F *[3]; |
8e2d649d | 1014 | |
1015 | fNTracks_pt= new TH2F *[3]; | |
1016 | fNTracks_eta= new TH2F *[3]; | |
1017 | fNTracks_phi= new TH2F *[3]; | |
1018 | ||
c852fdae | 1019 | fNClusters= new TH1F *[3]; |
1020 | fTPCNcls_EoverP= new TH2F *[3]; | |
aaec953d | 1021 | fTPCNcls_pid=new TH2F *[4]; |
c852fdae | 1022 | |
3db2410d | 1023 | fEoverP_pt_true_electrons = new TH2F("fEoverP_pt_true_electrons",";p_{T} (GeV/c);E/p ",1000,0,30,2000,0,2); |
1024 | fOutputList->Add(fEoverP_pt_true_electrons); | |
1025 | fEoverP_pt_true_electrons0 = new TH2F("fEoverP_pt_true_electrons0",";p_{T} (GeV/c);E/p ",1000,0,30,2000,0,2); | |
1026 | fOutputList->Add(fEoverP_pt_true_electrons0); | |
1027 | ||
a3e8583b | 1028 | |
3db2410d | 1029 | fEoverP_pt_true_hadrons = new TH2F("fEoverP_pt_true_hadrons",";p_{T} (GeV/c);E/p ",1000,0,30,2000,0,2); |
1030 | fOutputList->Add(fEoverP_pt_true_hadrons); | |
1031 | fEoverP_pt_true_hadrons0 = new TH2F("fEoverP_pt_true_hadrons0",";p_{T} (GeV/c);E/p ",1000,0,30,2000,0,2); | |
1032 | fOutputList->Add(fEoverP_pt_true_hadrons0); | |
1033 | ||
1034 | ||
1035 | ||
8e2d649d | 1036 | |
c852fdae | 1037 | for(Int_t i = 0; i < 3; i++) |
1038 | { | |
a4e971f7 | 1039 | fEoverP_pt[i] = new TH2F(Form("fEoverP_pt%d",i),";p_{t} (GeV/c);E / p ",1000,0,30,2000,0,2); |
9a1f999b | 1040 | fTPC_p[i] = new TH2F(Form("fTPC_p%d",i),";pt (GeV/c);TPC dE/dx (a. u.)",1000,0.3,15,1000,-20,200); |
1041 | fTPCnsigma_p[i] = new TH2F(Form("fTPCnsigma_p%d",i),";p (GeV/c);TPC Electron N#sigma",1000,0.3,15,1000,-15,10); | |
1042 | ||
1043 | ||
1044 | fECluster[i]= new TH1F(Form("fECluster%d",i), ";ECluster",2000, 0,100); | |
1045 | fEtaPhi[i]= new TH2F(Form("fEtaPhi%d",i),"#eta x #phi Clusters;#phi;#eta",200,0.,5,50,-1.,1.); | |
1046 | fVtxZ[i]= new TH1F(Form("fVtxZ%d",i),"VtxZ",1000, -50,50); | |
0131ce6c | 1047 | fEtad[i]= new TH1F(Form("fEtad%d",i),"Eta distribution",200, -1.2,1.2); |
1048 | fNTracks[i]= new TH1F(Form("fNTracks%d",i),"NTracks",1000, 0,5000); | |
8e2d649d | 1049 | |
1050 | fNTracks_pt[i]= new TH2F(Form("fNTracks_pt%d",i),"NTracks vs. pt",1000, 0,5000, 1000, 0, 100); | |
1051 | fNTracks_eta[i]= new TH2F(Form("fNTracks_eta%d",i),"NTracks vs. pt",1000, 0,5000, 500, -1.0, 1.0); | |
1052 | fNTracks_phi[i]= new TH2F(Form("fNTracks_phi%d",i),"NTracks vs. pt",1000, 0,5000, 500, 0, 5.0); | |
1053 | ||
1054 | ||
1055 | ||
9a1f999b | 1056 | fNClusters[i]= new TH1F(Form("fNClusters%d",i),"fNClusters0",200, 0,100); |
1057 | fTPCNcls_EoverP[i]= new TH2F(Form("fTPCNcls_EoverP%d",i),"TPCNcls_EoverP",1000,0,200,200,0,2); | |
aaec953d | 1058 | |
9a1f999b | 1059 | |
3db2410d | 1060 | fOutputList->Add(fEoverP_pt[i]); |
9a1f999b | 1061 | fOutputList->Add(fTPC_p[i]); |
1062 | fOutputList->Add(fTPCnsigma_p[i]); | |
1063 | ||
1064 | ||
1065 | fOutputList->Add(fECluster[i]); | |
1066 | fOutputList->Add(fEtaPhi[i]); | |
1067 | fOutputList->Add(fVtxZ[i]); | |
0131ce6c | 1068 | fOutputList->Add(fEtad[i]); |
9a1f999b | 1069 | fOutputList->Add(fNTracks[i]); |
8e2d649d | 1070 | |
1071 | fOutputList->Add(fNTracks_pt[i]); | |
1072 | fOutputList->Add(fNTracks_eta[i]); | |
1073 | fOutputList->Add(fNTracks_phi[i]); | |
1074 | ||
9a1f999b | 1075 | fOutputList->Add(fNClusters[i]); |
1076 | fOutputList->Add(fTPCNcls_EoverP[i]); | |
c852fdae | 1077 | } |
1078 | ||
3db2410d | 1079 | |
1080 | ||
1081 | ||
1dd85087 | 1082 | fTrack_Multi= new TH1F("fTrack_Multi","fTrack_Multi",1000, 0,1000); |
1083 | ||
aaec953d | 1084 | for(Int_t i = 0; i < 4; i++) |
1085 | { | |
1086 | fTPCNcls_pid[i]= new TH2F(Form("fTPCNcls_pid%d",i),"fTPCNcls_pid;NCls;NCls for PID",200,0,200,200,0,200); | |
1087 | fOutputList->Add(fTPCNcls_pid[i]); | |
1088 | } | |
1089 | ||
9a1f999b | 1090 | //pt bin |
2c8e1f6c | 1091 | Int_t fPtBin[7] = {1,2,4,6,8,10,15}; |
1092 | ||
628d0da7 | 1093 | |
1094 | Int_t fPtBin_trigger[11] = {1,2,4,6,8,10,12,14,16,18,20}; | |
1095 | fEoverP_tpc_p_trigger = new TH2F *[10]; | |
1096 | fEoverP_tpc_pt_trigger = new TH2F *[10]; | |
1097 | ||
1098 | ||
2c8e1f6c | 1099 | fEoverP_tpc = new TH2F *[6]; |
1100 | fTPC_pt = new TH1F *[6]; | |
1101 | fTPCnsigma_pt = new TH1F *[6]; | |
1102 | ||
1103 | fEta=new TH1F *[6]; | |
1104 | fPhi=new TH1F *[6]; | |
1105 | fR=new TH1F *[6]; | |
1106 | fR_EoverP=new TH2F *[6]; | |
1107 | fNcells=new TH1F *[6]; | |
1108 | fNcells_EoverP=new TH2F *[6]; | |
1109 | fM02_EoverP= new TH2F *[6]; | |
1110 | fM20_EoverP= new TH2F *[6]; | |
1111 | fEoverP_ptbins=new TH1F *[6]; | |
1112 | fECluster_ptbins=new TH1F *[6]; | |
1113 | fEoverP_wSSCut=new TH1F *[6]; | |
1114 | fNcells_electrons=new TH1F *[6]; | |
1115 | fNcells_hadrons=new TH1F *[6]; | |
1116 | fTPCnsigma_eta_electrons=new TH2F *[6]; | |
1117 | fTPCnsigma_eta_hadrons=new TH2F *[6]; | |
c852fdae | 1118 | |
1119 | if(fCorrelationFlag) | |
1120 | { | |
2c8e1f6c | 1121 | fCEtaPhi_Inc = new TH2F *[6]; |
1122 | fCEtaPhi_Inc_DiHadron = new TH2F *[6]; | |
c852fdae | 1123 | |
2c8e1f6c | 1124 | fCEtaPhi_ULS = new TH2F *[6]; |
1125 | fCEtaPhi_LS = new TH2F *[6]; | |
1126 | fCEtaPhi_ULS_NoP = new TH2F *[6]; | |
1127 | fCEtaPhi_LS_NoP = new TH2F *[6]; | |
c852fdae | 1128 | |
2c8e1f6c | 1129 | fCEtaPhi_ULS_Weight = new TH2F *[6]; |
1130 | fCEtaPhi_LS_Weight = new TH2F *[6]; | |
1131 | fCEtaPhi_ULS_NoP_Weight = new TH2F *[6]; | |
1132 | fCEtaPhi_LS_NoP_Weight = new TH2F *[6]; | |
c852fdae | 1133 | |
2c8e1f6c | 1134 | fCEtaPhi_Inc_EM = new TH2F *[6]; |
c852fdae | 1135 | |
2c8e1f6c | 1136 | fCEtaPhi_ULS_EM = new TH2F *[6]; |
1137 | fCEtaPhi_LS_EM = new TH2F *[6]; | |
c852fdae | 1138 | |
2c8e1f6c | 1139 | fCEtaPhi_ULS_Weight_EM = new TH2F *[6]; |
1140 | fCEtaPhi_LS_Weight_EM = new TH2F *[6]; | |
c852fdae | 1141 | |
1142 | fInvMass = new TH1F("fInvMass","",200,0,0.3); | |
1143 | fInvMassBack = new TH1F("fInvMassBack","",200,0,0.3); | |
1144 | fDCA = new TH1F("fDCA","",200,0,1); | |
1145 | fDCABack = new TH1F("fDCABack","",200,0,1); | |
1146 | fOpAngle = new TH1F("fOpAngle","",200,0,0.5); | |
1147 | fOpAngleBack = new TH1F("fOpAngleBack","",200,0,0.5); | |
1148 | ||
1149 | fOutputList->Add(fInvMass); | |
1150 | fOutputList->Add(fInvMassBack); | |
1151 | fOutputList->Add(fDCA); | |
1152 | fOutputList->Add(fDCABack); | |
1153 | fOutputList->Add(fOpAngle); | |
1154 | fOutputList->Add(fOpAngleBack); | |
1155 | } | |
1156 | ||
9a4682da | 1157 | if(fFillBackground){ |
1158 | ||
1159 | fInvMass = new TH1F("fInvMass","",200,0,0.3); | |
1160 | fInvMassBack = new TH1F("fInvMassBack","",200,0,0.3); | |
1161 | fDCA = new TH1F("fDCA","",200,0,1); | |
1162 | fDCABack = new TH1F("fDCABack","",200,0,1); | |
1163 | fOpAngle = new TH1F("fOpAngle","",200,0,0.5); | |
1164 | fOpAngleBack = new TH1F("fOpAngleBack","",200,0,0.5); | |
9a1f999b | 1165 | |
9a4682da | 1166 | fOutputList->Add(fInvMass); |
1167 | fOutputList->Add(fInvMassBack); | |
1168 | fOutputList->Add(fDCA); | |
1169 | fOutputList->Add(fDCABack); | |
1170 | fOutputList->Add(fOpAngle); | |
1171 | fOutputList->Add(fOpAngleBack); | |
1172 | ||
9a1f999b | 1173 | //histos for TPC-only |
9a4682da | 1174 | fInvMass2 = new TH1F("fInvMass2","",200,0,0.3); |
1175 | fInvMassBack2 = new TH1F("fInvMassBack2","",200,0,0.3); | |
1176 | fDCA2 = new TH1F("fDCA2","",200,0,1); | |
1177 | fDCABack2 = new TH1F("fDCABack2","",200,0,1); | |
1178 | fOpAngle2 = new TH1F("fOpAngle2","",200,0,0.5); | |
1179 | fOpAngleBack2 = new TH1F("fOpAngleBack2","",200,0,0.5); | |
1180 | ||
1181 | fOutputList->Add(fInvMass2); | |
1182 | fOutputList->Add(fInvMassBack2); | |
1183 | fOutputList->Add(fDCA2); | |
1184 | fOutputList->Add(fDCABack2); | |
1185 | fOutputList->Add(fOpAngle2); | |
1186 | fOutputList->Add(fOpAngleBack2); | |
1187 | ||
1188 | } | |
1189 | ||
628d0da7 | 1190 | //new histo for trigger data |
1191 | ||
1192 | for(Int_t i = 0; i < 10; i++) | |
1193 | { | |
1194 | fEoverP_tpc_pt_trigger[i] = new TH2F(Form("fEoverP_tpc_pt_trigger%d",i),Form("%d < p_{t} < %d GeV/c;TPC Electron N#sigma; E/p ",fPtBin_trigger[i],fPtBin_trigger[i+1]),1000,-15,15,100,0,2); | |
1195 | fEoverP_tpc_p_trigger[i] = new TH2F(Form("fEoverP_tpc_p_trigger%d",i),Form("%d < p < %d GeV/c;TPC Electron N#sigma; E/p ",fPtBin_trigger[i],fPtBin_trigger[i+1]),1000,-15,15,100,0,2); | |
1196 | fOutputList->Add(fEoverP_tpc_pt_trigger[i]); | |
1197 | fOutputList->Add(fEoverP_tpc_p_trigger[i]); | |
1198 | ||
1199 | } | |
1200 | ||
1201 | ||
2c8e1f6c | 1202 | for(Int_t i = 0; i < 6; i++) |
c852fdae | 1203 | { |
9a1f999b | 1204 | fEoverP_tpc[i] = new TH2F(Form("fEoverP_tpc%d",i),Form("%d < p_{t} < %d GeV/c;TPC Electron N#sigma;E / p ",fPtBin[i],fPtBin[i+1]),1000,-15,15,100,0,2); |
1205 | fTPC_pt[i] = new TH1F(Form("fTPC_pt%d",i),Form("%d < p_{t} < %d GeV/c;TPC Electron N#sigma;Count",fPtBin[i],fPtBin[i+1]),200,20,200); | |
1206 | fTPCnsigma_pt[i] = new TH1F(Form("fTPCnsigma_pt%d",i),Form("%d < p_{t} < %d GeV/c;TPC Electron N#sigma;Count",fPtBin[i],fPtBin[i+1]),200,-15,10); | |
1207 | ||
1208 | fEta[i]=new TH1F(Form("fEta%d",i), Form("%d < p_{t} < %d GeV/c;#eta; counts",fPtBin[i],fPtBin[i+1]),100, -0.1,0.1); | |
1209 | fPhi[i]=new TH1F(Form("fPhi%d",i),Form("%d < p_{t} < %d GeV/c;#phi; counts )",fPtBin[i],fPtBin[i+1]), 100, -0.1,0.1); | |
1210 | fR[i]=new TH1F(Form("fR%d",i),Form("%d < p_{t} < %d GeV/c;R;counts )",fPtBin[i],fPtBin[i+1]), 100, -0.1,0.1); | |
1211 | fR_EoverP[i]=new TH2F(Form("fR_EoverP%d",i),Form("%d < p_{t} < %d GeV/c;R;E / p ",fPtBin[i],fPtBin[i+1]),100, 0,0.1,1000,0,10); | |
1212 | fNcells[i]=new TH1F(Form("fNcells%d",i), Form("%d < p_{t} < %d GeV/c;ncells;counts ",fPtBin[i],fPtBin[i+1]),100, 0, 30); | |
1213 | fNcells_electrons[i]=new TH1F(Form("fNcells_electrons%d",i), Form("%d < p_{t} < %d GeV/c;ncells;counts ",fPtBin[i],fPtBin[i+1]),100, 0, 30); | |
1214 | fNcells_hadrons[i]=new TH1F(Form("fNcells_hadrons%d",i), Form("%d < p_{t} < %d GeV/c;ncells;counts ",fPtBin[i],fPtBin[i+1]),100, 0, 30); | |
1215 | fNcells_EoverP[i]=new TH2F(Form("fNcells_EoverP%d",i),Form("%d < p_{t} < %d GeV/c; Ncells; E / p ",fPtBin[i],fPtBin[i+1]),1000, 0,20,100,0,30); | |
1216 | fM02_EoverP[i]= new TH2F(Form("fM02_EoverP%d",i),Form("%d < p_{t} < %d GeV/c; M02; E / p ",fPtBin[i],fPtBin[i+1]),1000,0,100,100,0,2); | |
1217 | fM20_EoverP[i]= new TH2F(Form("fM20_EoverP%d",i),Form("%d < p_{t} < %d GeV/c; M20; E / p ",fPtBin[i],fPtBin[i+1]),1000,0,100,100,0,2); | |
1218 | fEoverP_ptbins[i] = new TH1F(Form("fEoverP_ptbins%d",i),Form("%d < p_{t} < %d GeV/c;E / p ",fPtBin[i],fPtBin[i+1]),500,0,2); | |
1219 | fECluster_ptbins[i]= new TH1F(Form("fECluster_ptbins%d",i), Form("%d < p_{t} < %d GeV/c;ECluster; Counts ",fPtBin[i],fPtBin[i+1]),2000, 0,100); | |
1220 | fEoverP_wSSCut[i]=new TH1F(Form("fEoverP_wSSCut%d",i),Form("%d < p_{t} < %d GeV/c;E / p ; Counts",fPtBin[i],fPtBin[i+1]),500,0,2); | |
1221 | fTPCnsigma_eta_electrons[i]=new TH2F(Form("fTPCnsigma_eta_electrons%d",i),Form("%d < p_{t} < %d GeV/c;TPC Electron N#sigma;Eta ",fPtBin[i],fPtBin[i+1]),1000,-15,15,100,-1,1); | |
1222 | fTPCnsigma_eta_hadrons[i]=new TH2F(Form("fTPCnsigma_eta_hadrons%d",i),Form("%d < p_{t} < %d GeV/c;TPC Electron N#sigma;Eta ",fPtBin[i],fPtBin[i+1]),1000,-15,15,100,-1,1); | |
1223 | ||
1224 | fOutputList->Add(fEoverP_tpc[i]); | |
1225 | fOutputList->Add(fTPC_pt[i]); | |
1226 | fOutputList->Add(fTPCnsigma_pt[i]); | |
1227 | ||
1228 | fOutputList->Add(fEta[i]); | |
1229 | fOutputList->Add(fPhi[i]); | |
1230 | fOutputList->Add(fR[i]); | |
1231 | fOutputList->Add(fR_EoverP[i]); | |
1232 | fOutputList->Add(fNcells[i]); | |
1233 | fOutputList->Add(fNcells_electrons[i]); | |
1234 | fOutputList->Add(fNcells_hadrons[i]); | |
1235 | fOutputList->Add(fNcells_EoverP[i]); | |
1236 | fOutputList->Add(fECluster_ptbins[i]); | |
1237 | fOutputList->Add(fEoverP_ptbins[i]); | |
1238 | fOutputList->Add(fEoverP_wSSCut[i]); | |
1239 | fOutputList->Add(fM02_EoverP[i]); | |
1240 | fOutputList->Add(fM20_EoverP[i]); | |
1241 | fOutputList->Add(fTPCnsigma_eta_electrons[i]); | |
1242 | fOutputList->Add(fTPCnsigma_eta_hadrons[i]); | |
1243 | ||
1244 | ||
c852fdae | 1245 | if(fCorrelationFlag) |
1246 | { | |
1247 | fCEtaPhi_Inc[i] = new TH2F(Form("fCEtaPhi_Inc%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1248 | fCEtaPhi_Inc_DiHadron[i] = new TH2F(Form("fCEtaPhi_Inc_DiHadron%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1249 | ||
1250 | fCEtaPhi_ULS[i] = new TH2F(Form("fCEtaPhi_ULS%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1251 | fCEtaPhi_LS[i] = new TH2F(Form("fCEtaPhi_LS%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1252 | fCEtaPhi_ULS_NoP[i] = new TH2F(Form("fCEtaPhi_ULS_NoP%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1253 | fCEtaPhi_LS_NoP[i] = new TH2F(Form("fCEtaPhi_LS_NoP%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1254 | ||
1255 | fCEtaPhi_ULS_Weight[i] = new TH2F(Form("fCEtaPhi_ULS_Weight%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1256 | fCEtaPhi_LS_Weight[i] = new TH2F(Form("fCEtaPhi_LS_Weight%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1257 | fCEtaPhi_ULS_NoP_Weight[i] = new TH2F(Form("fCEtaPhi_ULS_NoP_Weight%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1258 | fCEtaPhi_LS_NoP_Weight[i] = new TH2F(Form("fCEtaPhi_LS_NoP_Weight%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1259 | ||
1260 | fOutputList->Add(fCEtaPhi_Inc[i]); | |
1261 | fOutputList->Add(fCEtaPhi_Inc_DiHadron[i]); | |
1262 | ||
1263 | fOutputList->Add(fCEtaPhi_ULS[i]); | |
1264 | fOutputList->Add(fCEtaPhi_LS[i]); | |
1265 | fOutputList->Add(fCEtaPhi_ULS_NoP[i]); | |
1266 | fOutputList->Add(fCEtaPhi_LS_NoP[i]); | |
1267 | ||
1268 | fOutputList->Add(fCEtaPhi_ULS_Weight[i]); | |
1269 | fOutputList->Add(fCEtaPhi_LS_Weight[i]); | |
1270 | fOutputList->Add(fCEtaPhi_ULS_NoP_Weight[i]); | |
1271 | fOutputList->Add(fCEtaPhi_LS_NoP_Weight[i]); | |
1272 | ||
1273 | if(fEventMixingFlag) | |
1274 | { | |
1275 | fCEtaPhi_Inc_EM[i] = new TH2F(Form("fCEtaPhi_Inc_EM%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1276 | ||
1277 | fCEtaPhi_ULS_EM[i] = new TH2F(Form("fCEtaPhi_ULS_EM%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1278 | fCEtaPhi_LS_EM[i] = new TH2F(Form("fCEtaPhi_LS_EM%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1279 | ||
1280 | fCEtaPhi_ULS_Weight_EM[i] = new TH2F(Form("fCEtaPhi_ULS_Weight_EM%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1281 | fCEtaPhi_LS_Weight_EM[i] = new TH2F(Form("fCEtaPhi_LS_Weight_EM%d",i),Form("%d < p_{t} < %d GeV/c;#DeltaPhi (rad);#Delta#eta",fPtBin[i],fPtBin[i+1]),200,-0.5*TMath::Pi(),1.5*TMath::Pi(),200,-2,2); | |
1282 | ||
1283 | fOutputList->Add(fCEtaPhi_Inc_EM[i]); | |
1284 | ||
1285 | fOutputList->Add(fCEtaPhi_ULS_EM[i]); | |
1286 | fOutputList->Add(fCEtaPhi_LS_EM[i]); | |
1287 | ||
1288 | fOutputList->Add(fCEtaPhi_ULS_Weight_EM[i]); | |
1289 | fOutputList->Add(fCEtaPhi_LS_Weight_EM[i]); | |
1290 | } | |
1291 | } | |
1292 | } | |
1293 | ||
9a1f999b | 1294 | //pt integrated |
c852fdae | 1295 | fTPCnsigma_eta = new TH2F("fTPCnsigma_eta",";Pseudorapidity #eta; TPC signal - <TPC signal>_{elec} (#sigma)",200,-0.9,0.9,200,-15,15); |
1296 | fTPCnsigma_phi = new TH2F("fTPCnsigma_phi",";Azimuthal Angle #phi; TPC signal - <TPC signal>_{elec} (#sigma)",200,0,2*TMath::Pi(),200,-15,15); | |
1297 | ||
aaec953d | 1298 | |
c852fdae | 1299 | |
1300 | fNcells_pt=new TH2F("fNcells_pt","fNcells_pt",1000, 0,20,100,0,30); | |
a4e971f7 | 1301 | fEoverP_pt_pions= new TH2F("fEoverP_pt_pions","fEoverP_pt_pions",1000,0,30,2000,0,2); |
c852fdae | 1302 | |
1303 | ftpc_p_EoverPcut= new TH2F("ftpc_p_EoverPcut","ftpc_p_EoverPcut",1000,0,30,200,20,200); | |
1304 | fnsigma_p_EoverPcut= new TH2F("fnsigma_p_EoverPcut","fnsigma_p_EoverPcut",1000,0,30,500,-15,15); | |
1305 | ||
a4e971f7 | 1306 | fEoverP_pt_pions2= new TH2F("fEoverP_pt_pions2","fEoverP_pt_pions2",1000,0,30,2000,0,2); |
1307 | fEoverP_pt_hadrons= new TH2F("fEoverP_pt_hadrons","fEoverP_pt_hadrons",1000,0,30,2000,0,2); | |
c852fdae | 1308 | |
1309 | ||
1310 | fOutputList->Add(fTPCnsigma_eta); | |
1311 | fOutputList->Add(fTPCnsigma_phi); | |
1312 | ||
1313 | fOutputList->Add(fNcells_pt); | |
1314 | fOutputList->Add(fEoverP_pt_pions); | |
1315 | ||
1316 | fOutputList->Add(ftpc_p_EoverPcut); | |
1317 | fOutputList->Add(fnsigma_p_EoverPcut); | |
1318 | ||
1319 | fOutputList->Add(fEoverP_pt_pions2); | |
1320 | fOutputList->Add(fEoverP_pt_hadrons); | |
1321 | ||
8e2d649d | 1322 | fOutputList->Add(fVtxZ_new1); |
1323 | fOutputList->Add(fVtxZ_new2); | |
1324 | fOutputList->Add(fVtxZ_new3); | |
1325 | fOutputList->Add(fVtxZ_new4); | |
1326 | ||
1dd85087 | 1327 | fOutputList->Add(fzRes1); |
1328 | fOutputList->Add(fzRes2); | |
1329 | fOutputList->Add(fSPD_track_vtx1); | |
1330 | fOutputList->Add(fSPD_track_vtx2); | |
aaec953d | 1331 | |
31185d97 | 1332 | |
1333 | ||
9a1f999b | 1334 | //__________________________________________________________________ |
1335 | //Efficiency studies | |
c852fdae | 1336 | if(fIsMC) |
1337 | { | |
9a4682da | 1338 | fPtBackgroundBeforeReco = new TH1F("fPtBackgroundBeforeReco",";p_{T} (GeV/c);Count",300,0,30); |
2c8e1f6c | 1339 | fPtBackgroundBeforeReco_weight = new TH1F("fPtBackgroundBeforeReco_weight",";p_{T} (GeV/c);Count",300,0,30); |
9a4682da | 1340 | if(fFillBackground)fPtBackgroundBeforeReco2 = new TH1F("fPtBackgroundBeforeReco2",";p_{T} (GeV/c);Count",300,0,30); |
2c8e1f6c | 1341 | if(fFillBackground)fPtBackgroundBeforeReco2_weight = new TH1F("fPtBackgroundBeforeReco2_weight",";p_{T} (GeV/c);Count",300,0,30); |
2235208e | 1342 | fpT_m_electron= new TH2F("fpT_m_electron","fpT_m_electron",300,0,30,300,0,30); |
1343 | fpT_gm_electron= new TH2F("fpT_gm_electron","fpT_gm_electron",300,0,30,300,0,30); | |
2c8e1f6c | 1344 | |
9a4682da | 1345 | fPtBackgroundAfterReco = new TH1F("fPtBackgroundAfterReco",";p_{T} (GeV/c);Count",300,0,30); |
9a1f999b | 1346 | fPtMCparticleAll = new TH1F("fPtMCparticleAll",";p_{T} (GeV/c);Count",200,0,40); |
1347 | fPtMCparticleReco = new TH1F("fPtMCparticleReco",";p_{T} (GeV/c);Count",200,0,40); | |
1348 | ||
1349 | fPtMCparticleAll_nonPrimary = new TH1F("fPtMCparticleAll_nonPrimary",";p_{T} (GeV/c);Count",200,0,40); | |
2c8e1f6c | 1350 | fPtMCparticleAlle_nonPrimary = new TH1F("fPtMCparticleAlle_nonPrimary",";p_{T} (GeV/c);Count",200,0,40); |
1351 | fPtMCparticleAlle_Primary = new TH1F("fPtMCparticleAlle_Primary",";p_{T} (GeV/c);Count",200,0,40); | |
1352 | ||
9a1f999b | 1353 | fPtMCparticleReco_nonPrimary = new TH1F("fPtMCparticleReco_nonPrimary",";p_{T} (GeV/c);Count",200,0,40); |
1354 | ||
c852fdae | 1355 | fPtMCparticleAllHfe1 = new TH1F("fPtMCparticleAllHfe1",";p_{t} (GeV/c);Count",200,0,40); |
1356 | fPtMCparticleRecoHfe1 = new TH1F("fPtMCparticleRecoHfe1",";p_{t} (GeV/c);Count",200,0,40); | |
1357 | fPtMCparticleAllHfe2 = new TH1F("fPtMCparticleAllHfe2",";p_{t} (GeV/c);Count",200,0,40); | |
1358 | fPtMCparticleRecoHfe2 = new TH1F("fPtMCparticleRecoHfe2",";p_{t} (GeV/c);Count",200,0,40); | |
9a1f999b | 1359 | |
1360 | fPtMCelectronAfterAll = new TH1F("fPtMCelectronAfterAll",";p_{T} (GeV/c);Count",200,0,40); | |
8e2d649d | 1361 | fPtMCelectronAfterAll_unfolding = new TH1F("fPtMCelectronAfterAll_unfolding",";p_{T} (GeV/c);Count",200,0,40); |
9a1f999b | 1362 | fPtMCelectronAfterAll_nonPrimary = new TH1F("fPtMCelectronAfterAll_nonPrimary",";p_{T} (GeV/c);Count",200,0,40); |
2c8e1f6c | 1363 | fPtMCelectronAfterAll_Primary = new TH1F("fPtMCelectronAfterAll_Primary",";p_{T} (GeV/c);Count",200,0,40); |
1364 | ||
9a1f999b | 1365 | |
1366 | ||
1367 | fPtMCpi0 = new TH1F("fPtMCpi0",";p_{t} (GeV/c);Count",200,0,30); | |
1368 | fPtMCeta = new TH1F("fPtMCeta",";p_{T} (GeV/c);Count",200,0,30); | |
8e2d649d | 1369 | fPtMCpi02 = new TH1F("fPtMCpi02",";p_{t} (GeV/c);Count",200,0,30); |
1370 | fPtMCeta2 = new TH1F("fPtMCeta2",";p_{T} (GeV/c);Count",200,0,30); | |
1dd85087 | 1371 | fPtMCpi03 = new TH1F("fPtMCpi03",";p_{t} (GeV/c);Count",200,0,30); |
1372 | fPtMCeta3 = new TH1F("fPtMCeta3",";p_{T} (GeV/c);Count",200,0,30); | |
1373 | ||
c852fdae | 1374 | fPtMC_EMCal_All= new TH1F("fPtMC_EMCal_All",";p_{t} (GeV/c);Count",200,0,40); |
1375 | fPtMC_EMCal_Selected= new TH1F("fPtMC_EMCal_Selected",";p_{t} (GeV/c);Count",200,0,40); | |
8e2d649d | 1376 | fPtMC_TPC_All= new TH1F("fPtMC_TPC_All",";p_{T} (GeV/c);Count",200,0,40); |
1377 | fPtMC_TPC_Selected = new TH1F("fPtMC_TPC_Selected",";p_{T} (GeV/c);Count",200,0,40); | |
1378 | ||
1379 | fPt_track_match_den = new TH1F("fPt_track_match_den",";p_{T} (GeV/c);Count",200,0,40); | |
1380 | fPt_track_match_num = new TH1F("fPt_track_match_num",";p_{T} (GeV/c);Count",200,0,40); | |
1381 | ||
c852fdae | 1382 | fPtMCWithLabel = new TH1F("fPtMCWithLabel",";p_{t} (GeV/c);Count",200,0,40); |
1383 | fPtMCWithoutLabel = new TH1F("fPtMCWithoutLabel",";p_{t} (GeV/c);Count",200,0,40); | |
1384 | fPtIsPhysicaPrimary = new TH1F("fPtIsPhysicaPrimary",";p_{t} (GeV/c);Count",200,0,40); | |
1385 | ||
1386 | fOutputList->Add(fPtBackgroundBeforeReco); | |
2c8e1f6c | 1387 | fOutputList->Add(fPtBackgroundBeforeReco_weight); |
1388 | ||
9a4682da | 1389 | if(fFillBackground) fOutputList->Add(fPtBackgroundBeforeReco2); |
2c8e1f6c | 1390 | if(fFillBackground) fOutputList->Add(fPtBackgroundBeforeReco2_weight); |
2235208e | 1391 | |
1392 | fOutputList->Add(fpT_m_electron); | |
1393 | fOutputList->Add(fpT_gm_electron); | |
1394 | ||
c852fdae | 1395 | fOutputList->Add(fPtBackgroundAfterReco); |
1396 | fOutputList->Add(fPtMCparticleAll); | |
1397 | fOutputList->Add(fPtMCparticleReco); | |
9a1f999b | 1398 | |
1399 | fOutputList->Add(fPtMCparticleAll_nonPrimary); | |
1400 | fOutputList->Add(fPtMCparticleAlle_nonPrimary); | |
2c8e1f6c | 1401 | |
1402 | fOutputList->Add(fPtMCparticleAlle_Primary); | |
9a1f999b | 1403 | fOutputList->Add(fPtMCparticleReco_nonPrimary); |
1404 | ||
c852fdae | 1405 | fOutputList->Add(fPtMCparticleAllHfe1); |
1406 | fOutputList->Add(fPtMCparticleRecoHfe1); | |
1407 | fOutputList->Add(fPtMCparticleAllHfe2); | |
1408 | fOutputList->Add(fPtMCparticleRecoHfe2); | |
1409 | fOutputList->Add(fPtMCelectronAfterAll); | |
8e2d649d | 1410 | fOutputList->Add(fPtMCelectronAfterAll_unfolding); |
9a1f999b | 1411 | |
1412 | fOutputList->Add(fPtMCelectronAfterAll_nonPrimary); | |
2c8e1f6c | 1413 | fOutputList->Add(fPtMCelectronAfterAll_Primary); |
1414 | ||
9a1f999b | 1415 | |
1416 | ||
c852fdae | 1417 | fOutputList->Add(fPtMCpi0); |
9a1f999b | 1418 | fOutputList->Add(fPtMCeta); |
8e2d649d | 1419 | fOutputList->Add(fPtMCpi02); |
1420 | fOutputList->Add(fPtMCeta2); | |
1dd85087 | 1421 | fOutputList->Add(fPtMCpi03); |
1422 | fOutputList->Add(fPtMCeta3); | |
c852fdae | 1423 | fOutputList->Add(fPtMC_EMCal_All); |
1424 | fOutputList->Add(fPtMC_EMCal_Selected); | |
1425 | fOutputList->Add(fPtMC_TPC_All); | |
1426 | fOutputList->Add(fPtMC_TPC_Selected); | |
8e2d649d | 1427 | |
1428 | fOutputList->Add(fPt_track_match_den); | |
1429 | fOutputList->Add(fPt_track_match_num); | |
1430 | ||
c852fdae | 1431 | fOutputList->Add(fPtMCWithLabel); |
1432 | fOutputList->Add(fPtMCWithoutLabel); | |
1433 | fOutputList->Add(fPtIsPhysicaPrimary); | |
1434 | } | |
1435 | ||
1436 | fCentralityHist = new TH1F("fCentralityHist",";Centrality (%); Count",1000000,0,100); | |
1437 | fCentralityHistPass = new TH1F("fCentralityHistPass",";Centrality (%); Count",1000000,0,100); | |
1438 | fOutputList->Add(fCentralityHist); | |
1439 | fOutputList->Add(fCentralityHistPass); | |
1440 | ||
1dd85087 | 1441 | //______________________________________________________________________ |
1442 | //Mixed event analysis | |
c852fdae | 1443 | if(fEventMixingFlag) |
1444 | { | |
1445 | fPoolNevents = new TH1F("fPoolNevents","Event Mixing Statistics; Number of events; Count",1000,0,1000); | |
1446 | fOutputList->Add(fPoolNevents); | |
1447 | ||
1448 | Int_t trackDepth = 2000; // number of objects (tracks) kept per event buffer bin. Once the number of stored objects (tracks) is above that limit, the oldest ones are removed. | |
1449 | Int_t poolsize = 1000; // Maximum number of events, ignored in the present implemented of AliEventPoolManager | |
1450 | ||
1451 | Int_t nCentralityBins = 15; | |
1452 | Double_t centralityBins[] = { 0, 1, 2, 3, 4, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100.1 }; | |
1453 | ||
1454 | Int_t nZvtxBins = 9; | |
1455 | Double_t vertexBins[] = {-10, -7, -5, -3, -1, 1, 3, 5, 7, 10}; | |
1456 | ||
1457 | fPoolMgr = new AliEventPoolManager(poolsize, trackDepth, nCentralityBins, (Double_t*) centralityBins, nZvtxBins, (Double_t*) vertexBins); | |
1458 | } | |
9a1f999b | 1459 | //______________________________________________________________________ |
c852fdae | 1460 | |
1461 | PostData(1, fOutputList); | |
1462 | ||
9a1f999b | 1463 | ///______________________________________________________________________ |
c852fdae | 1464 | } |
1465 | ||
8e2d649d | 1466 | //______________________________________________________________________ |
1467 | //Main loop | |
1468 | //Called for each event | |
c852fdae | 1469 | void AliAnalysisTaskEMCalHFEpA::UserExec(Option_t *) |
1470 | { | |
9a1f999b | 1471 | //Check Event |
c852fdae | 1472 | fESD = dynamic_cast<AliESDEvent*>(InputEvent()); |
1473 | fAOD = dynamic_cast<AliAODEvent*>(InputEvent()); | |
1474 | ||
1475 | if(!(fESD || fAOD)) | |
1476 | { | |
1477 | printf("ERROR: fESD & fAOD not available\n"); | |
1478 | return; | |
1479 | } | |
1480 | ||
1481 | fVevent = dynamic_cast<AliVEvent*>(InputEvent()); | |
1482 | ||
1483 | if(!fVevent) | |
1484 | { | |
1485 | printf("ERROR: fVEvent not available\n"); | |
1486 | return; | |
1487 | } | |
9a1f999b | 1488 | |
1489 | //Check Cuts | |
c852fdae | 1490 | if(!fCuts) |
1491 | { | |
1492 | AliError("HFE cuts not available"); | |
1493 | return; | |
1494 | } | |
9a1f999b | 1495 | //Check PID |
c852fdae | 1496 | if(!fPID->IsInitialized()) |
1497 | { | |
9a1f999b | 1498 | // Initialize PID with the given run number |
c852fdae | 1499 | AliWarning("PID not initialised, get from Run no"); |
1500 | ||
1501 | if(fIsAOD) | |
1502 | { | |
1503 | fPID->InitializePID(fAOD->GetRunNumber()); | |
1504 | } | |
1505 | else | |
1506 | { | |
1507 | fPID->InitializePID(fESD->GetRunNumber()); | |
1508 | } | |
1509 | } | |
1510 | ||
9a1f999b | 1511 | //PID response |
c852fdae | 1512 | fPidResponse = fInputHandler->GetPIDResponse(); |
1513 | ||
9a1f999b | 1514 | |
1515 | //Check PID response | |
c852fdae | 1516 | if(!fPidResponse) |
1517 | { | |
1518 | AliDebug(1, "Using default PID Response"); | |
1519 | fPidResponse = AliHFEtools::GetDefaultPID(kFALSE, fInputEvent->IsA() == AliAODEvent::Class()); | |
1520 | } | |
9a1f999b | 1521 | |
c852fdae | 1522 | fPID->SetPIDResponse(fPidResponse); |
9a1f999b | 1523 | |
c852fdae | 1524 | fCFM->SetRecEventInfo(fVevent); |
9a1f999b | 1525 | |
c852fdae | 1526 | Double_t *fListOfmotherkink = 0; |
1527 | Int_t fNumberOfVertices = 0; | |
1528 | Int_t fNumberOfMotherkink = 0; | |
9a1f999b | 1529 | |
1dd85087 | 1530 | |
1531 | //total event before event selection | |
1532 | fNevent->Fill(1); | |
1533 | ||
1534 | //______________________________________________________________________ | |
1535 | //Vertex Selection | |
c852fdae | 1536 | if(fIsAOD) |
1537 | { | |
1538 | const AliAODVertex* trkVtx = fAOD->GetPrimaryVertex(); | |
1539 | if(!trkVtx || trkVtx->GetNContributors()<=0) return; | |
1540 | TString vtxTtl = trkVtx->GetTitle(); | |
1541 | if(!vtxTtl.Contains("VertexerTracks")) return; | |
1dd85087 | 1542 | //Float_t zvtx = trkVtx->GetZ(); |
1543 | Float_t zvtx = -100; | |
1544 | zvtx=trkVtx->GetZ(); | |
c852fdae | 1545 | fZvtx = zvtx; |
8e2d649d | 1546 | |
1547 | fVtxZ_new1->Fill(fZvtx); | |
1548 | ||
c852fdae | 1549 | const AliAODVertex* spdVtx = fAOD->GetPrimaryVertexSPD(); |
1550 | if(spdVtx->GetNContributors()<=0) return; | |
1551 | TString vtxTyp = spdVtx->GetTitle(); | |
1552 | Double_t cov[6]={0}; | |
1553 | spdVtx->GetCovarianceMatrix(cov); | |
1554 | Double_t zRes = TMath::Sqrt(cov[5]); | |
1dd85087 | 1555 | |
1556 | fzRes1->Fill(zRes); | |
c852fdae | 1557 | if(vtxTyp.Contains("vertexer:Z") && (zRes>0.25)) return; |
1dd85087 | 1558 | fzRes2->Fill(zRes); |
1559 | ||
1560 | fSPD_track_vtx1->Fill(spdVtx->GetZ() - trkVtx->GetZ()); | |
c852fdae | 1561 | if(TMath::Abs(spdVtx->GetZ() - trkVtx->GetZ())>0.5) return; |
1dd85087 | 1562 | fSPD_track_vtx2->Fill(spdVtx->GetZ() - trkVtx->GetZ()); |
1563 | ||
c852fdae | 1564 | |
1dd85087 | 1565 | if(TMath::Abs(zvtx) > 10) return; |
8e2d649d | 1566 | fVtxZ_new2->Fill(fZvtx); |
1567 | ||
1dd85087 | 1568 | if(fabs(zvtx>10.0))return; |
1569 | fVtxZ_new3->Fill(fZvtx); | |
1570 | ||
1571 | ||
1572 | //Look for kink mother for AOD | |
c852fdae | 1573 | |
1574 | fNumberOfVertices = 0; | |
1575 | fNumberOfMotherkink = 0; | |
1576 | ||
1577 | if(fIsAOD) | |
1578 | { | |
1579 | fNumberOfVertices = fAOD->GetNumberOfVertices(); | |
1580 | ||
1581 | fListOfmotherkink = new Double_t[fNumberOfVertices]; | |
1582 | ||
1583 | for(Int_t ivertex=0; ivertex < fNumberOfVertices; ivertex++) | |
1584 | { | |
1585 | AliAODVertex *aodvertex = fAOD->GetVertex(ivertex); | |
1586 | if(!aodvertex) continue; | |
1587 | if(aodvertex->GetType()==AliAODVertex::kKink) | |
1588 | { | |
1589 | AliAODTrack *mother1 = (AliAODTrack *) aodvertex->GetParent(); | |
1590 | if(!mother1) continue; | |
1591 | Int_t idmother = mother1->GetID(); | |
1592 | fListOfmotherkink[fNumberOfMotherkink] = idmother; | |
1593 | fNumberOfMotherkink++; | |
1594 | } | |
1595 | } | |
1596 | } | |
1597 | } | |
1598 | else | |
1599 | { | |
c852fdae | 1600 | |
c852fdae | 1601 | |
9a1f999b | 1602 | |
0131ce6c | 1603 | /// ESD |
8079a103 | 1604 | const AliESDVertex* trkVtx = fESD->GetPrimaryVertex(); |
c852fdae | 1605 | if(!trkVtx || trkVtx->GetNContributors()<=0) return; |
1606 | TString vtxTtl = trkVtx->GetTitle(); | |
1607 | if(!vtxTtl.Contains("VertexerTracks")) return; | |
1dd85087 | 1608 | Float_t zvtx = -100; |
1609 | zvtx=trkVtx->GetZ(); | |
1610 | ||
8079a103 | 1611 | |
1612 | const AliESDVertex* spdVtx = fESD->GetPrimaryVertexSPD(); | |
c852fdae | 1613 | if(spdVtx->GetNContributors()<=0) return; |
1614 | TString vtxTyp = spdVtx->GetTitle(); | |
1615 | Double_t cov[6]={0}; | |
1616 | spdVtx->GetCovarianceMatrix(cov); | |
1617 | Double_t zRes = TMath::Sqrt(cov[5]); | |
1618 | if(vtxTyp.Contains("vertexer:Z") && (zRes>0.25)) return; | |
1619 | if(TMath::Abs(spdVtx->GetZ() - trkVtx->GetZ())>0.5) return; | |
8079a103 | 1620 | if(TMath::Abs(zvtx) > 10) return; |
c852fdae | 1621 | } |
c852fdae | 1622 | |
1dd85087 | 1623 | //______________________________________________________________________ |
1624 | //after vertex selection | |
1625 | fNevent->Fill(10); | |
1626 | ||
1627 | //______________________________________________________________________ | |
1628 | //EMCal Trigger Selection (Threshold selection) | |
1629 | ||
1630 | TString firedTrigger; | |
1631 | TString TriggerEG1("EG1"); //takes trigger with name with EG1, ex: CEMC7EG1-B-NOPF-CENTNOTRD | |
1632 | TString TriggerEG2("EG2"); | |
1633 | //Jan 17, 2014 | |
1634 | //TString TriggerEJE("EJE"); | |
8e2d649d | 1635 | |
1dd85087 | 1636 | if(fAOD) firedTrigger = fAOD->GetFiredTriggerClasses(); |
1637 | else if(fESD) firedTrigger = fESD->GetFiredTriggerClasses(); | |
1638 | ||
1639 | //Bool_t IsEventEMCALL0=kTRUE; | |
1640 | Bool_t IsEventEMCALL1=kFALSE; | |
1641 | ||
1642 | if(firedTrigger.Contains(TriggerEG1)){ | |
1643 | fNevent->Fill(2); | |
1644 | IsEventEMCALL1=kTRUE; | |
1645 | } | |
1646 | if(firedTrigger.Contains(TriggerEG2)){ | |
1647 | fNevent->Fill(3); | |
1648 | IsEventEMCALL1=kTRUE; | |
1649 | } | |
1650 | ||
1651 | //if the flag is for a given threshold and it was not fired, return. | |
1652 | ||
1653 | if(fEMCEG1){ | |
1654 | if(!firedTrigger.Contains(TriggerEG1))return; | |
1655 | if(firedTrigger.Contains(TriggerEG2)){ | |
1656 | fNevent->Fill(4); | |
1657 | ||
1658 | } | |
1659 | ||
1660 | } | |
1661 | ||
1662 | ||
1663 | if(fEMCEG2){ | |
1664 | if(!firedTrigger.Contains(TriggerEG2))return; | |
1665 | if(firedTrigger.Contains(TriggerEG1)){ | |
1666 | fNevent->Fill(5); | |
1667 | } | |
1668 | ||
1669 | } | |
1670 | ||
9a1f999b | 1671 | |
8e2d649d | 1672 | |
1dd85087 | 1673 | //______________________________________________________________________ |
1674 | //Testing if there is an overlap EGA and EJE | |
1675 | //none | |
1676 | /* | |
1677 | if(!(firedTrigger.Contains(TriggerEG1) && firedTrigger.Contains(TriggerEG2) ) && !firedTrigger.Contains(TriggerEJE)) | |
1678 | { | |
1679 | fNevent->Fill(6); | |
1680 | } | |
1681 | //only GA | |
1682 | if((firedTrigger.Contains(TriggerEG1) || firedTrigger.Contains(TriggerEG2)) && !firedTrigger.Contains(TriggerEJE)) | |
1683 | { | |
1684 | fNevent->Fill(7); | |
1685 | } | |
1686 | //only JE | |
1687 | if(!(firedTrigger.Contains(TriggerEG1) && firedTrigger.Contains(TriggerEG2)) && firedTrigger.Contains(TriggerEJE)) | |
1688 | { | |
1689 | fNevent->Fill(8); | |
1690 | } | |
1691 | //both | |
1692 | if((firedTrigger.Contains(TriggerEG1) || firedTrigger.Contains(TriggerEG2)) && firedTrigger.Contains(TriggerEJE)) | |
1693 | { | |
1694 | fNevent->Fill(9); | |
1695 | } | |
1696 | */ | |
0131ce6c | 1697 | |
8e2d649d | 1698 | |
1dd85087 | 1699 | |
1700 | ||
1701 | //Only events with at least 2 tracks are accepted | |
1702 | Int_t fNOtrks = fVevent->GetNumberOfTracks(); | |
c852fdae | 1703 | if(fNOtrks<2) return; |
8e2d649d | 1704 | |
1dd85087 | 1705 | fNevent->Fill(11); |
1706 | ||
1707 | if(fIsAOD){ | |
1708 | Int_t fNOtrks2 = fAOD->GetNumberOfTracks(); | |
1709 | if(fNOtrks2<2) return; | |
1710 | } | |
1711 | fNevent->Fill(12); | |
8e2d649d | 1712 | |
1dd85087 | 1713 | //______________________________________________________________________ |
1714 | //new track loop to select events | |
1715 | //track pt cut (at least 2) | |
628d0da7 | 1716 | |
8e2d649d | 1717 | if(fUseTrigger){ |
1718 | if(fIsAOD){ | |
1719 | double fTrackMulti=0; | |
1720 | for(Int_t iTracks = 0; iTracks < fVevent->GetNumberOfTracks(); iTracks++) | |
1721 | { | |
1722 | AliVParticle* Vtrack = fVevent->GetTrack(iTracks); | |
1dd85087 | 1723 | if (!Vtrack) continue; |
1724 | ||
8e2d649d | 1725 | AliVTrack *track = dynamic_cast<AliVTrack*>(Vtrack); |
1dd85087 | 1726 | //AliAODTrack *atrack = dynamic_cast<AliAODTrack*>(Vtrack); |
8e2d649d | 1727 | |
1728 | if((track->Pt())<0.2 || (track->Pt())>1000.0) continue; | |
1dd85087 | 1729 | else fTrackMulti=fTrackMulti+1; |
8e2d649d | 1730 | |
1731 | } | |
1732 | //Only take event if track multiplicity is bigger than 2. | |
1733 | if(fTrackMulti<2) return; | |
1734 | } | |
1735 | } | |
1dd85087 | 1736 | fNevent->Fill(13); |
1737 | //______________________________________________________________________ | |
1738 | //Using more cuts than I have beeing using | |
1739 | //eta cut and primary (at least 2) | |
1740 | if(fUseTrigger){ | |
1741 | if(fIsAOD){ | |
1742 | double fTrackMulti2=0; | |
1743 | for(Int_t i = 0; i < fVevent->GetNumberOfTracks(); i++) | |
1744 | { | |
1745 | AliVParticle* Vtrack2 = fVevent->GetTrack(i); | |
1746 | if (!Vtrack2) continue; | |
1747 | ||
1748 | ||
1749 | AliVTrack *track_new = dynamic_cast<AliVTrack*>(Vtrack2); | |
1750 | AliAODTrack *aodtrack = dynamic_cast<AliAODTrack*>(Vtrack2); | |
1751 | ||
1752 | ||
1753 | if(aodtrack) | |
1754 | { | |
1755 | ||
1756 | ||
1757 | if(TMath::Abs(track_new->Eta())> 0.9) continue; | |
1758 | if (aodtrack->GetType()!= AliAODTrack::kPrimary) continue ; | |
1759 | else fTrackMulti2=fTrackMulti2+1; | |
1760 | } | |
1761 | } | |
1762 | //Only take event if track multiplicity is bigger than 2. | |
1763 | if(fTrackMulti2<2) return; | |
1764 | ||
1765 | ||
1766 | } | |
1767 | } | |
1768 | fNevent->Fill(14); | |
1769 | //______________________________________________________________________ | |
1770 | //Using more cuts than I have beeing using | |
1771 | //hybrid (at least2) | |
1772 | if(fUseTrigger){ | |
1773 | if(fIsAOD){ | |
1774 | double fTrackMulti3=0; | |
1775 | for(Int_t i = 0; i < fVevent->GetNumberOfTracks(); i++) | |
1776 | { | |
1777 | AliVParticle* Vtrack3 = fVevent->GetTrack(i); | |
1778 | if (!Vtrack3) continue; | |
1779 | ||
1780 | //AliVTrack *track_new = dynamic_cast<AliVTrack*>(Vtrack3); | |
1781 | AliAODTrack *aodtrack = dynamic_cast<AliAODTrack*>(Vtrack3); | |
1782 | ||
1783 | ||
1784 | if(aodtrack) | |
1785 | { | |
1786 | ||
1787 | if (!aodtrack->IsHybridGlobalConstrainedGlobal()) continue ; | |
1788 | //another option if I don't want to use hybrid | |
1789 | //if ( aodtrack->TestFilterBit(128)==kFALSE) continue ; | |
1790 | else fTrackMulti3=fTrackMulti3+1; | |
1791 | } | |
1792 | } | |
1793 | //Only take event if track multiplicity is bigger than 2. | |
1794 | if(fTrackMulti3<2) return; | |
1795 | ||
1796 | } | |
1797 | } | |
1798 | fNevent->Fill(15); | |
1799 | //______________________________________________________________________ | |
8e2d649d | 1800 | |
8e2d649d | 1801 | |
1dd85087 | 1802 | if(fUseTrigger){ |
1803 | if(fIsAOD){ | |
1804 | double fTrackMulti4=0; | |
1805 | for(Int_t iTracks = 0; iTracks < fVevent->GetNumberOfTracks(); iTracks++) | |
1806 | { | |
1807 | AliVParticle* Vtrack4 = fVevent->GetTrack(iTracks); | |
1808 | if (!Vtrack4) continue; | |
1809 | ||
1810 | ||
1811 | //AliVTrack *track = dynamic_cast<AliVTrack*>(Vtrack4); | |
1812 | AliAODTrack *atrack = dynamic_cast<AliAODTrack*>(Vtrack4); | |
1813 | ||
1814 | if(!atrack->TestFilterBit(768)) continue; | |
1815 | if(!atrack->IsHybridGlobalConstrainedGlobal()) continue ; | |
1816 | ||
1817 | ||
1818 | else fTrackMulti4=fTrackMulti4+1; | |
1819 | ||
1820 | } | |
1821 | //Only take event if track multiplicity is bigger than 2. | |
1822 | if(fTrackMulti4<2) return; | |
1823 | fTrack_Multi->Fill(fTrackMulti4); | |
1824 | } | |
1825 | } | |
1826 | fNevent->Fill(16); | |
1827 | //______________________________________________________________________ | |
628d0da7 | 1828 | |
c852fdae | 1829 | |
1dd85087 | 1830 | //______________________________________________________________________ |
1831 | //Centrality Selection | |
c852fdae | 1832 | if(fHasCentralitySelection) |
1833 | { | |
1834 | Float_t centrality = -1; | |
1835 | ||
1836 | if(fIsAOD) | |
1837 | { | |
0a918d8d | 1838 | fCentrality = ((AliVAODHeader*)fAOD->GetHeader())->GetCentralityP(); |
c852fdae | 1839 | } |
1840 | else | |
1841 | { | |
1842 | fCentrality = fESD->GetCentrality(); | |
1843 | } | |
1844 | ||
1845 | if(fEstimator==1) centrality = fCentrality->GetCentralityPercentile("ZDC"); | |
1846 | else centrality = fCentrality->GetCentralityPercentile("V0A"); | |
1847 | ||
9a1f999b | 1848 | //cout << "Centrality = " << centrality << " %" << endl; |
c852fdae | 1849 | |
1850 | fCentralityHist->Fill(centrality); | |
1851 | ||
1852 | if(centrality<fCentralityMin || centrality>fCentralityMax) return; | |
1853 | ||
1854 | fCentralityHistPass->Fill(centrality); | |
1855 | } | |
1dd85087 | 1856 | //______________________________________________________________________ |
c852fdae | 1857 | |
1dd85087 | 1858 | |
1859 | fNevent->Fill(17); | |
1860 | ||
1861 | //______________________________________________________________________ | |
c852fdae | 1862 | |
1863 | if(fIsMC) | |
1864 | { | |
1865 | if(fIsAOD) | |
1866 | { | |
1867 | fMCarray = dynamic_cast<TClonesArray*>(fAOD->FindListObject(AliAODMCParticle::StdBranchName())); | |
1868 | ||
1869 | if(!fMCarray) | |
1870 | { | |
1871 | AliError("Array of MC particles not found"); | |
1872 | return; | |
1873 | } | |
1874 | ||
1875 | fMCheader = dynamic_cast<AliAODMCHeader*>(fAOD->GetList()->FindObject(AliAODMCHeader::StdBranchName())); | |
1876 | ||
1877 | if(!fMCheader) | |
1878 | { | |
1879 | AliError("Could not find MC Header in AOD"); | |
1880 | return; | |
1881 | } | |
1882 | ||
1883 | for(Int_t iMC = 0; iMC < fMCarray->GetEntries(); iMC++) | |
1884 | { | |
1885 | fMCparticle = (AliAODMCParticle*) fMCarray->At(iMC); | |
89f41a30 | 1886 | if(fMCparticle->GetMother()>0) fMCparticleMother = (AliAODMCParticle*) fMCarray->At(fMCparticle->GetMother()); |
67eb14b9 | 1887 | |
c852fdae | 1888 | Int_t pdg = fMCparticle->GetPdgCode(); |
67eb14b9 | 1889 | |
29881f7b | 1890 | //==================================================================== |
1891 | //trying take pions spectra 27/May/2014 | |
1892 | //IsPrimary only take events from pythia | |
1893 | //IsPhysicalPrimariee: (all prompt particles, including strong decay products plus weak decay product from heavy-flavor). | |
1894 | //eta cut same as MinJung | |
1895 | ||
1896 | if(fMCparticle->Eta()>=-0.8 && fMCparticle->Eta()<=0.8) | |
1897 | { | |
1898 | if(fMCparticle->IsPrimary()){ | |
1899 | ||
1900 | if(TMath::Abs(pdg)==111) fPtMCpi0->Fill(fMCparticle->Pt()); | |
1901 | if(TMath::Abs(pdg)==221) fPtMCeta->Fill(fMCparticle->Pt()); | |
1902 | //eta cut same as MinJung | |
1903 | } | |
1904 | ||
1905 | if(fMCparticle->IsPhysicalPrimary()){ | |
1906 | if(TMath::Abs(pdg)==111) fPtMCpi02->Fill(fMCparticle->Pt()); | |
1907 | if(TMath::Abs(pdg)==221) fPtMCeta2->Fill(fMCparticle->Pt()); | |
1908 | ||
1909 | } | |
1910 | ||
1911 | if(TMath::Abs(pdg)==111) fPtMCpi03->Fill(fMCparticle->Pt()); | |
1912 | if(TMath::Abs(pdg)==221) fPtMCeta3->Fill(fMCparticle->Pt()); | |
1913 | } | |
1914 | //==================================================================== | |
89f41a30 | 1915 | |
67eb14b9 | 1916 | double proX = fMCparticle->Xv(); |
1917 | double proY = fMCparticle->Yv(); | |
1918 | double proR = sqrt(pow(proX,2)+pow(proY,2)); | |
1919 | ||
1920 | ||
c852fdae | 1921 | if(fMCparticle->Eta()>=fEtaCutMin && fMCparticle->Eta()<=fEtaCutMax && fMCparticle->Charge()!=0) |
1922 | { | |
67eb14b9 | 1923 | //to correct background |
89f41a30 | 1924 | if (TMath::Abs(pdg) == 11 && fMCparticle->GetMother()>0){ |
1925 | Int_t mpdg = fMCparticleMother->GetPdgCode(); | |
1926 | ||
67eb14b9 | 1927 | if(TMath::Abs(mpdg) == 221 || TMath::Abs(mpdg) == 22 || TMath::Abs(mpdg) == 111){ |
1928 | ||
1929 | if(proR<7){ | |
1930 | fPtMCparticleAlle_nonPrimary->Fill(fMCparticle->Pt()); //denominator for total efficiency for all electrons, and not primary | |
1931 | ||
1932 | } | |
1933 | } | |
1934 | } | |
1935 | ||
29881f7b | 1936 | if (TMath::Abs(pdg) == 11 && fMCparticle->IsPhysicalPrimary()){ |
1937 | fPtMCparticleAlle_Primary->Fill(fMCparticle->Pt()); //denominator for total efficiency for all electrons primary | |
1938 | } | |
9a1f999b | 1939 | |
c852fdae | 1940 | if( TMath::Abs(pdg) == 211 || TMath::Abs(pdg) == 2212 || TMath::Abs(pdg) == 321 || TMath::Abs(pdg) == 11 || TMath::Abs(pdg) == 13 ) |
1941 | { | |
9a1f999b | 1942 | |
1943 | fPtMCparticleAll_nonPrimary->Fill(fMCparticle->Pt()); //denominator for total efficiency for all particles, and not primary | |
c852fdae | 1944 | if(fMCparticle->IsPhysicalPrimary()) |
1945 | { | |
1946 | fPtMCparticleAll->Fill(fMCparticle->Pt()); | |
1947 | ||
1948 | Bool_t MotherFound = FindMother(iMC); | |
0131ce6c | 1949 | //Bool_t MotherFound = FindMother(track->GetLabel()); |
c852fdae | 1950 | if(MotherFound) |
1951 | { | |
0131ce6c | 1952 | if(fIsHFE1){ |
8e2d649d | 1953 | //denominator for total efficiency and tracking |
1954 | //unfolding: denominator is pt_MC and numerator is pt_reco | |
0131ce6c | 1955 | fPtMCparticleAllHfe1->Fill(fMCparticle->Pt()); |
1956 | fEtaPhi_den->Fill(fMCparticle->Phi(),fMCparticle->Eta()); | |
8e2d649d | 1957 | |
0131ce6c | 1958 | |
1959 | } //denominator for total efficiency and tracking | |
29881f7b | 1960 | if(fIsHFE2){ |
1961 | fPtMCparticleAllHfe2->Fill(fMCparticle->Pt()); | |
1962 | } | |
c852fdae | 1963 | } |
1964 | } | |
1965 | } | |
67eb14b9 | 1966 | }//eta cut |
1967 | ||
8e2d649d | 1968 | |
1dd85087 | 1969 | |
67eb14b9 | 1970 | }//loop tracks |
1dd85087 | 1971 | |
29881f7b | 1972 | |
1973 | ||
1dd85087 | 1974 | //second loop over track, but only the primaries ones |
1975 | //only primary pions --> how to take the primaries ones in AOD? | |
1976 | /* | |
1977 | for(Int_t iMC = 0; iMC < fMCarray->GetNPrimary(); iMC++){ | |
1978 | fMCparticle = (AliAODMCParticle*) fMCarray->At(iMC); | |
1979 | pdg = fMCparticle->GetPdgCode(); | |
1980 | ||
1981 | if(TMath::Abs(pdg)==111) fPtMCpi0->Fill(fMCparticle->Pt()); | |
1982 | if(TMath::Abs(pdg)==221) fPtMCeta->Fill(fMCparticle->Pt()); | |
1983 | ||
1984 | if(fMCparticle->Eta()>=fEtaCutMin && fMCparticle->Eta()<=fEtaCutMax) | |
1985 | { | |
1986 | ||
1987 | if(TMath::Abs(pdg)==111) fPtMCpi02->Fill(fMCparticle->Pt()); | |
1988 | if(TMath::Abs(pdg)==221) fPtMCeta2->Fill(fMCparticle->Pt()); | |
1989 | ||
1990 | } | |
1991 | } | |
1992 | */ | |
1993 | ||
1994 | ||
67eb14b9 | 1995 | }//AOD |
c852fdae | 1996 | else |
1997 | { | |
1998 | fEventHandler = dynamic_cast<AliMCEventHandler*> (AliAnalysisManager::GetAnalysisManager()->GetMCtruthEventHandler()); | |
1999 | if (!fEventHandler) { | |
9a1f999b | 2000 | Printf("ERROR: Could not retrieve MC event handler"); |
2001 | return; | |
c852fdae | 2002 | } |
9a1f999b | 2003 | |
c852fdae | 2004 | fMCevent = fEventHandler->MCEvent(); |
2005 | if (!fMCevent) { | |
9a1f999b | 2006 | Printf("ERROR: Could not retrieve MC event"); |
2007 | return; | |
c852fdae | 2008 | } |
9a1f999b | 2009 | |
c852fdae | 2010 | fMCstack = fMCevent->Stack(); |
2011 | ||
1dd85087 | 2012 | //pion and eta spectrum |
2013 | //MinJung code | |
2014 | ||
2015 | //---------------------------------------------------------------------------------------------------- | |
2016 | AliVParticle *mctrack2 = NULL; | |
2017 | AliMCParticle *mctrack0 = NULL; | |
2018 | ||
2019 | ||
2020 | for(Int_t imc = 0; imc <fMCEvent->GetNumberOfPrimaries(); imc++){ | |
2021 | if(!(mctrack2 = fMCEvent->GetTrack(imc))) continue; | |
2022 | TParticle* mcpart0 = fMCEvent->Stack()->Particle(imc); | |
2023 | if(!mcpart0) continue; | |
2024 | mctrack0 = dynamic_cast<AliMCParticle *>(mctrack2); | |
2025 | if(!mctrack0) continue; | |
2026 | ||
2027 | if(TMath::Abs(AliHFEtools::GetRapidity(mcpart0))<0.8){ | |
2028 | ||
2029 | if(TMath::Abs(mctrack0->PdgCode()) == 111) // pi0 | |
2030 | { | |
2031 | fPtMCpi0->Fill(mctrack0->Pt()); | |
2032 | } | |
2033 | ||
2034 | if(TMath::Abs(mctrack0->PdgCode()) == 221) // eta | |
2035 | { | |
2036 | fPtMCeta->Fill(mctrack0->Pt()); | |
2037 | } | |
2038 | ||
2039 | } | |
2040 | ||
2041 | } | |
2042 | // end of MinJung | |
2043 | //---------------------------------------------------------------------------------------------------- | |
2044 | ||
2045 | ||
c852fdae | 2046 | for(Int_t iMC = 0; iMC < fMCstack->GetNtrack(); iMC++) |
2047 | { | |
2048 | ||
2049 | fMCtrack = fMCstack->Particle(iMC); | |
89f41a30 | 2050 | if(fMCtrack->GetFirstMother()>0) fMCtrackMother = fMCstack->Particle(fMCtrack->GetFirstMother()); |
67eb14b9 | 2051 | TParticle *particle=fMCstack->Particle(iMC); |
2052 | ||
c852fdae | 2053 | Int_t pdg = fMCtrack->GetPdgCode(); |
89f41a30 | 2054 | |
c852fdae | 2055 | |
9a1f999b | 2056 | if(TMath::Abs(pdg)==111) fPtMCpi0->Fill(fMCtrack->Pt()); |
2c8e1f6c | 2057 | if(TMath::Abs(pdg)==221) fPtMCeta->Fill(fMCtrack->Pt()); |
67eb14b9 | 2058 | |
c852fdae | 2059 | |
2060 | if(fMCtrack->Eta()>=fEtaCutMin && fMCtrack->Eta()<=fEtaCutMax) | |
2061 | { | |
9a1f999b | 2062 | |
67eb14b9 | 2063 | //to correct background |
89f41a30 | 2064 | if (TMath::Abs(pdg) == 11 && fMCtrack->GetFirstMother()>0){ |
2065 | Int_t mpdg = fMCtrackMother->GetPdgCode(); | |
67eb14b9 | 2066 | if(TMath::Abs(mpdg) == 221 || TMath::Abs(mpdg) == 22 || TMath::Abs(mpdg) == 111){ |
2235208e | 2067 | Double_t proR=particle->R(); |
2068 | if(proR<7){ | |
0131ce6c | 2069 | fPtMCparticleAlle_nonPrimary->Fill(fMCtrack->Pt()); //denominator for total efficiency for all electrons, and not primary |
2235208e | 2070 | } |
67eb14b9 | 2071 | } |
2072 | } | |
2073 | ||
0131ce6c | 2074 | if(TMath::Abs(pdg) == 11 && fMCstack->IsPhysicalPrimary(iMC)){ |
2075 | ||
2076 | fPtMCparticleAlle_Primary->Fill(fMCtrack->Pt()); | |
2077 | } | |
9a1f999b | 2078 | |
c852fdae | 2079 | if( TMath::Abs(pdg) == 211 || TMath::Abs(pdg) == 2212 || TMath::Abs(pdg) == 321 || TMath::Abs(pdg) == 11 || TMath::Abs(pdg) == 13 ) |
2080 | { | |
9a1f999b | 2081 | fPtMCparticleAll_nonPrimary->Fill(fMCtrack->Pt());//denominator for total efficiency for all particle, non Primary track |
2082 | ||
0131ce6c | 2083 | if(fMCstack->IsPhysicalPrimary(iMC)) |
c852fdae | 2084 | { |
0131ce6c | 2085 | fPtMCparticleAll->Fill(fMCtrack->Pt()); |
2086 | ||
2087 | Bool_t MotherFound = FindMother(iMC); | |
2088 | //Bool_t MotherFound = FindMother(track->GetLabel()); | |
2089 | if(MotherFound) | |
2090 | { | |
2091 | if(fIsHFE1){ | |
2092 | fPtMCparticleAllHfe1->Fill(fMCtrack->Pt());//denominator for total efficiency and tracking | |
2093 | fEtaPhi_den->Fill(fMCtrack->Phi(),fMCtrack->Eta()); | |
2094 | } | |
29881f7b | 2095 | if(fIsHFE2){ |
2096 | fPtMCparticleAllHfe2->Fill(fMCtrack->Pt()); | |
2097 | } | |
0131ce6c | 2098 | } |
2099 | }//Is Physical primary | |
c852fdae | 2100 | } |
0131ce6c | 2101 | }//eta cut |
67eb14b9 | 2102 | }//loop tracks |
2103 | }//ESD | |
2104 | }//Is MC | |
9a1f999b | 2105 | |
1dd85087 | 2106 | //______________________________________________________________________ |
2107 | //threshold selection was here | |
2108 | //______________________________________________________________________ | |
2109 | //all events selected | |
c852fdae | 2110 | |
2111 | fNevent->Fill(0); | |
c852fdae | 2112 | |
1dd85087 | 2113 | |
2114 | //______________________________________________________________________ | |
2115 | //events in the threshold | |
2116 | ||
c852fdae | 2117 | if(firedTrigger.Contains(TriggerEG1)) |
2118 | { | |
1dd85087 | 2119 | if(fEMCEG1){ |
2120 | fNevent->Fill(18); | |
2121 | if(!firedTrigger.Contains(TriggerEG2)) fNevent->Fill(19); | |
2122 | //if(firedTrigger.Contains(TriggerEG2)) return; | |
2123 | } | |
c852fdae | 2124 | } |
2125 | ||
1dd85087 | 2126 | |
0131ce6c | 2127 | //EG2 |
c852fdae | 2128 | if(firedTrigger.Contains(TriggerEG2)) |
2129 | { | |
1dd85087 | 2130 | if(fEMCEG2){ |
2131 | fNevent->Fill(20); | |
2132 | if(!firedTrigger.Contains(TriggerEG1)) fNevent->Fill(21); | |
2133 | //if(firedTrigger.Contains(TriggerEG1)) return; | |
2134 | } | |
c852fdae | 2135 | } |
2136 | ||
0131ce6c | 2137 | |
1dd85087 | 2138 | |
8e2d649d | 2139 | //New cluster information |
2140 | //after trigger threshold selection | |
1dd85087 | 2141 | Int_t ClsNo2 = -999; |
2142 | ClsNo2 = fVevent->GetNumberOfCaloClusters(); | |
2143 | fNCluster_pure->Fill(ClsNo2); | |
2144 | ||
2145 | ||
0131ce6c | 2146 | |
8e2d649d | 2147 | if(ClsNo2<=0){ |
1dd85087 | 2148 | fNevent->Fill(22); //events with no cluster |
8e2d649d | 2149 | return; |
2150 | } | |
1dd85087 | 2151 | |
2152 | //in order to include time cut | |
2153 | //fEMCALCells = fAOD->GetEMCALCells(); | |
2154 | //Double_t tof = clus->GetTOF(); | |
2155 | //clus->GetNCells() | |
2156 | //if ( clus->E() < minE ) continue ; | |
2157 | ||
8e2d649d | 2158 | |
29881f7b | 2159 | |
93c64cd2 | 2160 | if(fIsAOD){ |
1dd85087 | 2161 | |
0a918d8d | 2162 | //AliAODHeader * aodh = dynamic_cast<AliAODHeader*>(fAOD->GetHeader()); |
2163 | // if(!aodh) AliFatal("Not a standard AOD"); | |
628d0da7 | 2164 | //Int_t bc= aodh->GetBunchCrossNumber(); |
1dd85087 | 2165 | |
2166 | ||
2167 | Int_t ClsNo_aod = -999; | |
2168 | ClsNo_aod = fAOD->GetNumberOfCaloClusters(); | |
2169 | fNCluster_pure_aod->Fill(ClsNo_aod); | |
29881f7b | 2170 | //Bool_t exotic=kTRUE; |
1dd85087 | 2171 | |
2172 | for (Int_t i=0; i< ClsNo_aod; i++ ){ | |
2173 | ||
2174 | //fClus = fVevent->GetCaloCluster(i); | |
2175 | //to be compatible with Shingo | |
2176 | AliVCluster *clust = 0x0; | |
2177 | clust = (AliVCluster*) fAOD->GetCaloCluster(i); | |
2178 | ||
2179 | if(clust && clust->IsEMCAL()) | |
2180 | { | |
29881f7b | 2181 | //pure cluster information |
1dd85087 | 2182 | fECluster_pure->Fill(clust->E()); |
2183 | ||
2184 | fNcells_energy->Fill(clust->GetNCells(),clust->E()); | |
2185 | fNCluster_ECluster->Fill(ClsNo_aod,clust->E()); | |
2186 | ||
2187 | if(clust->E()>1000) fNevent->Fill(23); | |
2188 | ||
2189 | //exotic | |
29881f7b | 2190 | /* |
1dd85087 | 2191 | exotic = fEMCALRecoUtils->IsExoticCluster(clust, (AliVCaloCells*)fAOD->GetEMCALCells(), bc); |
2192 | if(exotic == kFALSE){ | |
2193 | fECluster_not_exotic->Fill(clust->E()); | |
2194 | fNcells_energy_not_exotic->Fill(clust->GetNCells(),clust->E()); | |
2195 | } | |
29881f7b | 2196 | */ |
1dd85087 | 2197 | |
29881f7b | 2198 | //approximation to remove exotics |
1dd85087 | 2199 | if(clust->GetNCells()<5 && clust->E()>15.0){ |
2200 | fECluster_exotic->Fill(clust->E()); | |
2201 | } | |
93c64cd2 | 2202 | //Marcel cut (another approximation to remove exotics) |
1dd85087 | 2203 | else if((clust->GetNCells())> ((clust->E())/3+1)){ |
2204 | fECluster_not_exotic1->Fill(clust->E()); | |
2205 | } | |
2206 | else{ | |
2207 | fECluster_not_exotic2->Fill(clust->E()); | |
2208 | } | |
2209 | ||
2210 | ||
2211 | } | |
29881f7b | 2212 | /* |
1dd85087 | 2213 | //______________________________________________________________________ |
2214 | //Trying to remove events with bad cells and find patches | |
2215 | //First, I will try to count them | |
2216 | //______________________________________________________________________ | |
2217 | ||
2218 | if(clust && clust->IsEMCAL()) | |
2219 | { | |
2220 | Bool_t badchannel = ContainsBadChannel("EMCAL", clust->GetCellsAbsId(),clust->GetNCells() ); | |
2221 | printf("Contém bad channel? %d ", badchannel); | |
2222 | if(badchannel)fNevent2->Fill(0); | |
2223 | ||
2224 | //trying to find patches | |
2225 | TArrayI patches_found=GetTriggerPatches(IsEventEMCALL0, IsEventEMCALL1); | |
2226 | printf("N patches %d, first %d, last %d\n",patches_found.GetSize(), patches_found.At(0), patches_found.At(patches_found.GetSize()-1)); | |
2227 | ||
2228 | } | |
2229 | ||
2230 | //end of bad cells | |
2231 | //______________________________________________________________________ | |
93c64cd2 | 2232 | */ |
1dd85087 | 2233 | |
8e2d649d | 2234 | } |
2235 | } | |
29881f7b | 2236 | |
0131ce6c | 2237 | |
1dd85087 | 2238 | fNevent->Fill(24); //events with cluster |
2239 | ||
0131ce6c | 2240 | |
8e2d649d | 2241 | fVtxZ_new4->Fill(fZvtx); |
2242 | ||
1dd85087 | 2243 | |
c852fdae | 2244 | Int_t ClsNo = -999; |
2245 | if(!fIsAOD) ClsNo = fESD->GetNumberOfCaloClusters(); | |
2246 | else ClsNo = fAOD->GetNumberOfCaloClusters(); | |
2247 | ||
0131ce6c | 2248 | //______________________________________________________________________ |
9a1f999b | 2249 | |
0131ce6c | 2250 | ///_____________________________________________________________________ |
2251 | ///Track loop | |
3db2410d | 2252 | Int_t NTracks=fVevent->GetNumberOfTracks(); |
2253 | ||
2254 | /////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
2255 | //To use tender | |
2256 | if(fUseTender){ | |
2257 | TClonesArray *fTracks_tender = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject("AODFilterTracks")); | |
2258 | NTracks = fTracks_tender->GetEntries(); | |
2259 | TClonesArray *fCaloClusters_tender = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject("EmcCaloClusters")); | |
2260 | ClsNo = fCaloClusters_tender->GetEntries(); | |
2261 | ||
2262 | } | |
2263 | /////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
2264 | ||
2265 | for(Int_t iTracks = 0; iTracks < NTracks; iTracks++) | |
c852fdae | 2266 | { |
2267 | AliVParticle* Vtrack = fVevent->GetTrack(iTracks); | |
2268 | if (!Vtrack) | |
2269 | { | |
2270 | printf("ERROR: Could not receive track %d\n", iTracks); | |
2271 | continue; | |
2272 | } | |
9a1f999b | 2273 | |
3db2410d | 2274 | //main place where track is defined |
2275 | ||
c852fdae | 2276 | AliVTrack *track = dynamic_cast<AliVTrack*>(Vtrack); |
2277 | AliESDtrack *etrack = dynamic_cast<AliESDtrack*>(Vtrack); | |
2278 | AliAODTrack *atrack = dynamic_cast<AliAODTrack*>(Vtrack); | |
2279 | ||
3db2410d | 2280 | /////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2281 | //To use tender | |
2282 | if(fUseTender){ | |
2283 | TClonesArray *fTracks_tender = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject("AODFilterTracks")); | |
2284 | track = static_cast<AliAODTrack*>(fTracks_tender->At(iTracks)); | |
2285 | if (!track) { | |
2286 | printf("ERROR: Could not receive track calibrated %d\n", iTracks); | |
2287 | continue; | |
2288 | } | |
2289 | } | |
2290 | /////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
1dd85087 | 2291 | |
c852fdae | 2292 | Double_t fTPCnSigma = -999; |
2c8e1f6c | 2293 | Double_t fTOFnSigma = -999; |
c852fdae | 2294 | Double_t fTPCnSigma_pion = -999; |
2295 | Double_t fTPCnSigma_proton = -999; | |
2296 | Double_t fTPCnSigma_kaon = -999; | |
2297 | Double_t fTPCsignal = -999; | |
2298 | Double_t fPt = -999; | |
2299 | Double_t fP = -999; | |
2300 | ||
0131ce6c | 2301 | //December 9th 2013 |
2302 | //Etacut test on the begging | |
2303 | fEtad[0]->Fill(track->Eta()); | |
2304 | //if(track->Eta()<fEtaCutMin || track->Eta()>fEtaCutMax) continue; | |
2305 | fEtad[1]->Fill(track->Eta()); | |
8e2d649d | 2306 | |
2307 | ||
2308 | ||
2309 | ||
0131ce6c | 2310 | ///_____________________________________________________________________________ |
2311 | ///Fill QA plots without track selection | |
c852fdae | 2312 | fPt = track->Pt(); |
2313 | fP = TMath::Sqrt((track->Pt())*(track->Pt()) + (track->Pz())*(track->Pz())); | |
2314 | ||
2315 | fTPCsignal = track->GetTPCsignal(); | |
2316 | fTPCnSigma = fPidResponse->NumberOfSigmasTPC(track, AliPID::kElectron); | |
2c8e1f6c | 2317 | fTOFnSigma = fPidResponse->NumberOfSigmasTOF(track, AliPID::kElectron); |
c852fdae | 2318 | fTPCnSigma_pion = fPidResponse->NumberOfSigmasTPC(track, AliPID::kPion); |
2319 | fTPCnSigma_proton = fPidResponse->NumberOfSigmasTPC(track, AliPID::kProton); | |
2320 | fTPCnSigma_kaon = fPidResponse->NumberOfSigmasTPC(track, AliPID::kKaon); | |
9a1f999b | 2321 | |
c852fdae | 2322 | fTPC_p[0]->Fill(fPt,fTPCsignal); |
2323 | fTPCnsigma_p[0]->Fill(fP,fTPCnSigma); | |
2324 | ||
9a1f999b | 2325 | |
c852fdae | 2326 | Float_t TPCNcls = track->GetTPCNcls(); |
31185d97 | 2327 | //TPC Ncls for pid |
2328 | Float_t TPCNcls_pid = track->GetTPCsignalN(); | |
aaec953d | 2329 | |
31185d97 | 2330 | |
2331 | ||
c852fdae | 2332 | Float_t pos[3]={0,0,0}; |
9a1f999b | 2333 | |
c852fdae | 2334 | Double_t fEMCflag = kFALSE; |
2335 | if(track->GetEMCALcluster()>0) | |
2336 | { | |
2337 | fClus = fVevent->GetCaloCluster(track->GetEMCALcluster()); | |
3db2410d | 2338 | /////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2339 | //to use tender | |
2340 | if(fUseTender){ | |
2341 | int EMCalIndex = -1; | |
2342 | EMCalIndex = track->GetEMCALcluster(); | |
2343 | TClonesArray *fCaloClusters_tender = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject("EmcCaloClusters")); | |
2344 | fClus = static_cast<AliVCluster*>(fCaloClusters_tender->At(EMCalIndex)); | |
2345 | } | |
2346 | /////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
2347 | ||
c852fdae | 2348 | if(fClus->IsEMCAL()) |
2349 | { | |
8e2d649d | 2350 | |
2351 | //only for charged tracks | |
2352 | fECluster[0]->Fill(fClus->E()); | |
2353 | ||
2354 | ||
9a1f999b | 2355 | if(TMath::Abs(fClus->GetTrackDx())<=fdPhiCut && TMath::Abs(fClus->GetTrackDz())<=fdEtaCut) |
2356 | { | |
2357 | fEMCflag = kTRUE; | |
2358 | fEoverP_pt[0]->Fill(fPt,(fClus->E() / fP)); | |
2359 | ||
2360 | ||
2361 | Float_t Energy = fClus->E(); | |
2362 | Float_t EoverP = Energy/track->P(); | |
2363 | //Float_t M02 = fClus->GetM02(); | |
2364 | //Float_t M20 = fClus->GetM20(); | |
2365 | ||
2366 | /////////////// for Eta Phi distribution | |
2367 | fClus->GetPosition(pos); | |
2368 | TVector3 vpos(pos[0],pos[1],pos[2]); | |
2369 | Double_t cphi = vpos.Phi(); | |
2370 | Double_t ceta = vpos.Eta(); | |
2371 | fEtaPhi[0]->Fill(cphi,ceta); | |
2372 | ||
8e2d649d | 2373 | |
9a1f999b | 2374 | fTPCNcls_EoverP[0]->Fill(TPCNcls, EoverP); |
2375 | } | |
c852fdae | 2376 | } |
2377 | } | |
2378 | ||
9a1f999b | 2379 | //______________________________________________________________ |
2380 | // Vertex | |
c852fdae | 2381 | |
2382 | fVtxZ[0]->Fill(fZvtx); | |
8e2d649d | 2383 | if(iTracks == 0)fNTracks[0]->Fill(fNOtrks); |
2384 | fNTracks_pt[0]->Fill(fNOtrks, fPt); | |
2385 | fNTracks_eta[0]->Fill(fNOtrks, track->Eta()); | |
2386 | fNTracks_phi[0]->Fill(fNOtrks, track->Phi()); | |
2387 | ||
2388 | ||
c852fdae | 2389 | fNClusters[0]->Fill(ClsNo); |
aaec953d | 2390 | fTPCNcls_pid[0]->Fill(TPCNcls, TPCNcls_pid); |
9a1f999b | 2391 | //______________________________________________________________ |
c852fdae | 2392 | |
8e2d649d | 2393 | ///Fill QA plots without track selection |
2394 | ///_____________________________________________________________________________ | |
2395 | //______________________________________________________________________________________ | |
2396 | //Track Selection Cuts | |
9a1f999b | 2397 | |
8e2d649d | 2398 | //AOD (Test Filter Bit) |
c852fdae | 2399 | if(fIsAOD) |
2400 | { | |
9a1f999b | 2401 | // standard cuts with very loose DCA - BIT(4) |
2402 | // Description: | |
c852fdae | 2403 | /* |
9a1f999b | 2404 | GetStandardITSTPCTrackCuts2011(kFALSE) |
2405 | SetMaxChi2PerClusterTPC(4); | |
2406 | SetAcceptKinkDaughters(kFALSE); | |
2407 | SetRequireTPCRefit(kTRUE); | |
2408 | SetRequireITSRefit(kTRUE); | |
2409 | SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kAny); | |
2410 | SetMaxDCAToVertexZ(2); | |
2411 | SetMaxDCAToVertex2D(kFALSE); | |
2412 | SetRequireSigmaToVertex(kFALSE); | |
2413 | SetMaxChi2PerClusterITS(36); | |
2414 | SetMaxDCAToVertexXY(2.4) | |
2415 | SetMaxDCAToVertexZ(3.2) | |
2416 | SetDCaToVertex2D(kTRUE) | |
2417 | */ | |
c852fdae | 2418 | |
2419 | if(!atrack->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)) continue; | |
2420 | } | |
2421 | ||
8e2d649d | 2422 | //RecKine: ITSTPC cuts |
c852fdae | 2423 | if(!ProcessCutStep(AliHFEcuts::kStepRecKineITSTPC, track)) continue; |
8e2d649d | 2424 | //RecKink |
c852fdae | 2425 | if(fRejectKinkMother) |
2426 | { | |
2427 | if(fIsAOD) | |
2428 | { | |
2429 | Bool_t kinkmotherpass = kTRUE; | |
2430 | for(Int_t kinkmother = 0; kinkmother < fNumberOfMotherkink; kinkmother++) | |
2431 | { | |
2432 | if(track->GetID() == fListOfmotherkink[kinkmother]) | |
2433 | { | |
2434 | kinkmotherpass = kFALSE; | |
2435 | continue; | |
2436 | } | |
2437 | } | |
2438 | if(!kinkmotherpass) continue; | |
2439 | } | |
2440 | else | |
2441 | { | |
2442 | if(etrack->GetKinkIndex(0) != 0) continue; | |
2443 | } | |
2444 | } | |
9a1f999b | 2445 | |
8e2d649d | 2446 | //RecPrim |
a4e971f7 | 2447 | |
2448 | //it was not working on aod... testing again | |
2449 | //July 29th, 2014: aparently working again | |
2450 | ||
2451 | ///if(!fIsAOD) | |
2452 | //{ | |
2453 | ||
2454 | if(!ProcessCutStep(AliHFEcuts::kStepRecPrim, track)) continue; | |
2455 | //} | |
9a1f999b | 2456 | |
8e2d649d | 2457 | //HFEcuts: ITS layers cuts |
c852fdae | 2458 | if(!ProcessCutStep(AliHFEcuts::kStepHFEcutsITS, track)) continue; |
9a1f999b | 2459 | |
8e2d649d | 2460 | //HFE cuts: TPC PID cleanup |
c852fdae | 2461 | if(!ProcessCutStep(AliHFEcuts::kStepHFEcutsTPC, track)) continue; |
a4e971f7 | 2462 | |
3db2410d | 2463 | //DCA cut done by hand -- July 29th, 2014 -> fix it... has to be in absolute values!!!! |
a4e971f7 | 2464 | if(fIsAOD){ |
2465 | Double_t d0z0[2], cov[3]; | |
2466 | AliAODVertex *prim_vtx = fAOD->GetPrimaryVertex(); | |
2467 | track->PropagateToDCA(prim_vtx, fAOD->GetMagneticField(), 20., d0z0, cov); | |
2468 | Double_t DCAxy = d0z0[0]; | |
2469 | Double_t DCAz = d0z0[1]; | |
2470 | ||
2471 | if(DCAxy >= fDCAcutr || DCAz>=fDCAcutz) continue; | |
2472 | } | |
2473 | ||
2474 | ||
2475 | ||
2476 | ||
2477 | ||
8e2d649d | 2478 | //______________________________________________________________________________________ |
c852fdae | 2479 | |
8e2d649d | 2480 | if(fIsAOD){ |
a4e971f7 | 2481 | //AOD test -- Francesco suggestion |
1dd85087 | 2482 | //aod test -- Francesco suggestion |
2483 | AliAODTrack *aod_track=fAOD->GetTrack(iTracks); | |
2484 | ||
8e2d649d | 2485 | Int_t type=aod_track->GetType(); |
2486 | if(type==AliAODTrack::kPrimary) fPtPrim->Fill(aod_track->Pt()); | |
a01415e2 | 2487 | if(type==AliAODTrack::kFromDecayVtx) fPtSec->Fill(aod_track->Pt()); |
8e2d649d | 2488 | |
2489 | //Int_t type2=track->GetType(); | |
2490 | if(type==AliAODTrack::kPrimary) fPtPrim2->Fill(track->Pt()); | |
a01415e2 | 2491 | if(type==AliAODTrack::kFromDecayVtx) fPtSec2->Fill(track->Pt()); |
8e2d649d | 2492 | } |
2493 | ||
2494 | ||
2495 | ///_____________________________________________________________ | |
2496 | ///QA plots after track selection | |
c852fdae | 2497 | if(fIsMC) |
2498 | { | |
2499 | if(track->GetLabel()>=0) fPtMCWithLabel->Fill(fPt); | |
2500 | else fPtMCWithoutLabel->Fill(fPt); | |
2501 | } | |
2502 | ||
0131ce6c | 2503 | if(fIsMC && track->GetLabel()>=0) |
c852fdae | 2504 | { |
29881f7b | 2505 | if(fIsAOD) |
2506 | { | |
0131ce6c | 2507 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); |
c852fdae | 2508 | |
8e2d649d | 2509 | |
29881f7b | 2510 | if(fMCparticle->IsPhysicalPrimary()) |
2511 | { | |
2512 | fPtIsPhysicaPrimary->Fill(fPt); | |
2513 | } | |
0131ce6c | 2514 | |
2515 | Int_t pdg = fMCparticle->GetPdgCode(); | |
2516 | if(fMCparticle->Eta()>=fEtaCutMin && fMCparticle->Eta()<=fEtaCutMax && fMCparticle->Charge()!=0) | |
2517 | { | |
9a1f999b | 2518 | |
2c8e1f6c | 2519 | |
0131ce6c | 2520 | if( TMath::Abs(pdg) == 211 || TMath::Abs(pdg) == 2212 || TMath::Abs(pdg) == 321 || TMath::Abs(pdg) == 11 || TMath::Abs(pdg) == 13 ) |
2521 | { | |
2522 | fPtMCparticleReco_nonPrimary->Fill(fMCparticle->Pt()); //not Primary track | |
9a1f999b | 2523 | |
0131ce6c | 2524 | if(fMCparticle->IsPhysicalPrimary()) |
c852fdae | 2525 | { |
0131ce6c | 2526 | fPtMCparticleReco->Fill(fMCparticle->Pt()); |
2527 | ||
2528 | Bool_t MotherFound = FindMother(track->GetLabel()); | |
2529 | if(MotherFound) | |
2530 | { | |
29881f7b | 2531 | if(fIsHFE1) |
2532 | { | |
8e2d649d | 2533 | fPtMCparticleRecoHfe1->Fill(fMCparticle->Pt());//numerator tracking |
2534 | //unfolding | |
2535 | fpt_reco_pt_MC_den->Fill(track->Pt(),fMCparticle->Pt()); | |
2536 | ||
2537 | } | |
29881f7b | 2538 | if(fIsHFE2){ |
2539 | fPtMCparticleRecoHfe2->Fill(fMCparticle->Pt()); | |
2540 | } | |
0131ce6c | 2541 | } |
c852fdae | 2542 | } |
2543 | } | |
2544 | } | |
8e2d649d | 2545 | |
2546 | ||
2547 | ||
0131ce6c | 2548 | }//close AOD |
2549 | //ESD | |
2550 | else | |
2551 | { | |
2552 | ||
2553 | ||
2554 | if(fMCtrack->Eta()>=fEtaCutMin && fMCtrack->Eta()<=fEtaCutMax) | |
2555 | { | |
9a1f999b | 2556 | |
0131ce6c | 2557 | fMCtrack = fMCstack->Particle(track->GetLabel()); |
2558 | Int_t pdg = fMCtrack->GetPdgCode(); | |
9a1f999b | 2559 | |
0131ce6c | 2560 | if( TMath::Abs(pdg) == 211 || TMath::Abs(pdg) == 2212 || TMath::Abs(pdg) == 321 || TMath::Abs(pdg) == 11 || TMath::Abs(pdg) == 13 ) |
2561 | { | |
2562 | fPtMCparticleReco_nonPrimary->Fill(fMCtrack->Pt());//not Primary track | |
2563 | } | |
9a1f999b | 2564 | |
2565 | ||
0131ce6c | 2566 | if(fMCstack->IsPhysicalPrimary(track->GetLabel())) |
2567 | { | |
9a1f999b | 2568 | fPtIsPhysicaPrimary->Fill(fPt); |
2569 | ||
2570 | ||
9a1f999b | 2571 | if( TMath::Abs(pdg) == 211 || TMath::Abs(pdg) == 2212 || TMath::Abs(pdg) == 321 || TMath::Abs(pdg) == 11 || TMath::Abs(pdg) == 13 ) |
c852fdae | 2572 | { |
9a1f999b | 2573 | fPtMCparticleReco->Fill(fMCtrack->Pt()); |
2574 | ||
2575 | Bool_t MotherFound = FindMother(track->GetLabel()); | |
2576 | if(MotherFound) | |
2577 | { | |
0131ce6c | 2578 | if(fIsHFE1) fPtMCparticleRecoHfe1->Fill(fMCtrack->Pt());//numerator tracking |
9a1f999b | 2579 | if(fIsHFE2) fPtMCparticleRecoHfe2->Fill(fMCtrack->Pt()); |
2580 | } | |
c852fdae | 2581 | } |
0131ce6c | 2582 | } |
c852fdae | 2583 | } |
0131ce6c | 2584 | }//close ESD |
2585 | }//close IsMC | |
c852fdae | 2586 | |
2587 | fTPC_p[1]->Fill(fPt,fTPCsignal); | |
2588 | fTPCnsigma_p[1]->Fill(fP,fTPCnSigma); | |
2c8e1f6c | 2589 | Double_t fPtBin[7] = {1,2,4,6,8,10,15}; |
628d0da7 | 2590 | Double_t fPtBin_trigger[11] = {1,2,4,6,8,10,12,14,16,18,20}; |
9a1f999b | 2591 | |
c852fdae | 2592 | TPCNcls = track->GetTPCNcls(); |
2593 | Float_t pos2[3]={0,0,0}; | |
2594 | ||
2595 | if(track->GetEMCALcluster()>0) | |
2596 | { | |
2597 | fClus = fVevent->GetCaloCluster(track->GetEMCALcluster()); | |
3db2410d | 2598 | /////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2599 | //to use tender | |
2600 | if(fUseTender){ | |
2601 | int EMCalIndex = -1; | |
2602 | EMCalIndex = track->GetEMCALcluster(); | |
2603 | TClonesArray *fCaloClusters_tender = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject("EmcCaloClusters")); | |
2604 | fClus = static_cast<AliVCluster*>(fCaloClusters_tender->At(EMCalIndex)); | |
2605 | } | |
2606 | /////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
2607 | ||
c852fdae | 2608 | if(fClus->IsEMCAL()) |
2609 | { | |
9a1f999b | 2610 | if(TMath::Abs(fClus->GetTrackDx())<=fdPhiCut && TMath::Abs(fClus->GetTrackDz())<=fdEtaCut) |
2611 | { | |
2612 | fEoverP_pt[1]->Fill(fPt,(fClus->E() / fP)); | |
2613 | ||
2614 | Float_t Energy = fClus->E(); | |
2615 | Float_t EoverP = Energy/track->P(); | |
2616 | Float_t M02 = fClus->GetM02(); | |
2617 | Float_t M20 = fClus->GetM20(); | |
2618 | Float_t ncells = fClus->GetNCells(); | |
2619 | ||
2620 | /////////////// for Eta Phi distribution | |
2621 | fClus->GetPosition(pos2); | |
2622 | TVector3 vpos(pos2[0],pos2[1],pos2[2]); | |
2623 | Double_t cphi = vpos.Phi(); | |
2624 | Double_t ceta = vpos.Eta(); | |
2625 | fEtaPhi[1]->Fill(cphi,ceta); | |
2626 | ||
2627 | fECluster[1]->Fill(Energy); | |
2628 | fTPCNcls_EoverP[1]->Fill(TPCNcls, EoverP); | |
2629 | ||
2630 | ||
0131ce6c | 2631 | //for EMCal trigger performance |
9a1f999b | 2632 | if(EoverP > 0.9){ |
2633 | ftpc_p_EoverPcut->Fill(track->P(), fTPCsignal); | |
2634 | fnsigma_p_EoverPcut->Fill(track->P(), fTPCnSigma); | |
2635 | ||
2636 | } | |
2637 | ||
2638 | ||
8e2d649d | 2639 | //for hadron contamination calculations |
9a1f999b | 2640 | |
2641 | ||
8e2d649d | 2642 | // EtaCut -> dados |
9a1f999b | 2643 | if(track->Eta()>=fEtaCutMin && track->Eta()<=fEtaCutMax ){ |
3db2410d | 2644 | |
2645 | //------------------------------------------------------------------- | |
2646 | //true hadrons E/p shape before cuts | |
2647 | if(fIsMC && fIsAOD && track->GetLabel()>=0){ | |
2648 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
2649 | Int_t pdg = fMCparticle->GetPdgCode(); | |
2650 | ||
2651 | if( TMath::Abs(pdg) != 11){ | |
2652 | fEoverP_pt_true_hadrons0->Fill(fPt,(fClus->E() / fP)); | |
2653 | } | |
2654 | } | |
2655 | ||
2656 | ||
2657 | //true electrons E/p shape before cuts | |
2658 | if(fIsMC && fIsAOD && track->GetLabel()>=0){ | |
2659 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
2660 | Int_t pdg = fMCparticle->GetPdgCode(); | |
2661 | ||
2662 | if( TMath::Abs(pdg) == 11){ | |
2663 | fEoverP_pt_true_electrons0->Fill(fPt,(fClus->E() / fP)); | |
2664 | } | |
2665 | } | |
2666 | //------------------------------------------------------------------- | |
2667 | ||
2668 | ||
2669 | //main | |
9a1f999b | 2670 | if(TMath::Abs(fTPCnSigma_pion)<3 || TMath::Abs(fTPCnSigma_proton)<3 || TMath::Abs(fTPCnSigma_kaon)<3 ){ |
2671 | ||
2672 | if(fTPCnSigma<-3.5){ | |
2673 | fEoverP_pt_hadrons->Fill(fPt,EoverP); | |
2674 | if(fUseEMCal) fShowerShape_ha->Fill(M02,M20); | |
3db2410d | 2675 | |
2676 | ||
2677 | //after cut -> Are they really hadrons? E/p shape | |
2678 | if(fIsMC && fIsAOD && track->GetLabel()>=0){ | |
2679 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
2680 | Int_t pdg = fMCparticle->GetPdgCode(); | |
2681 | ||
2682 | if( TMath::Abs(pdg) != 11){ | |
2683 | fEoverP_pt_true_hadrons->Fill(fPt,(fClus->E() / fP)); | |
2684 | } | |
2685 | } | |
2686 | ||
2687 | ||
9a1f999b | 2688 | } |
2689 | } | |
3db2410d | 2690 | |
eae1842e | 2691 | //for systematic studies of hadron contamination |
2692 | if(fTPCnSigma < -3){ | |
9a1f999b | 2693 | fEoverP_pt_pions->Fill(fPt, EoverP); |
2694 | ||
2695 | } | |
2696 | ||
eae1842e | 2697 | if(fTPCnSigma < -3.5){ |
9a1f999b | 2698 | fEoverP_pt_pions2->Fill(fPt, EoverP); |
2699 | ||
2700 | } | |
2701 | ||
2702 | ||
2703 | } | |
2704 | ||
2705 | ||
2706 | ||
2707 | ||
2c8e1f6c | 2708 | for(Int_t i = 0; i < 6; i++) |
9a1f999b | 2709 | { |
2710 | if(fPt>=fPtBin[i] && fPt<fPtBin[i+1]) | |
2711 | { | |
2712 | ||
2713 | if(fTPCnSigma < -5 && fTPCnSigma > -10){ | |
2714 | fNcells_hadrons[i]->Fill(ncells); | |
2715 | } | |
2716 | //hadrons selection using E/p | |
2717 | if((fClus->E() / fP) >= 0.2 && (fClus->E() / fP) <= 0.7){ | |
2718 | fTPCnsigma_eta_hadrons[i]->Fill(fTPCnSigma, ceta); | |
2719 | } | |
2720 | //electrons selection using E/p | |
2721 | if((fClus->E() / fP) >= fEoverPCutMin && (fClus->E() / fP) <= fEoverPCutMax) { | |
2722 | fTPCnsigma_eta_electrons[i]->Fill(fTPCnSigma, ceta); | |
2723 | } | |
2724 | } | |
2725 | } | |
2726 | ||
2727 | if((fClus->E() / fP) >= fEoverPCutMin && (fClus->E() / fP) <= fEoverPCutMax) | |
2728 | { | |
c852fdae | 2729 | fTPCnsigma_eta->Fill(track->Eta(),fTPCnSigma); |
2730 | fTPCnsigma_phi->Fill(track->Phi(),fTPCnSigma); | |
2731 | ||
2732 | if(fUseEMCal) | |
2733 | { | |
2734 | if(fTPCnSigma < 3.5 && fCorrelationFlag) | |
2735 | { | |
2736 | fPtTrigger_Inc->Fill(fPt); | |
2737 | DiHadronCorrelation(track, iTracks); | |
2738 | } | |
2739 | } | |
9a1f999b | 2740 | } |
2741 | ||
2742 | } | |
c852fdae | 2743 | } |
2744 | } | |
2745 | ||
0131ce6c | 2746 | //______________________________________________________________ |
2747 | // Vertex | |
c852fdae | 2748 | |
2749 | fVtxZ[1]->Fill(fZvtx); | |
8e2d649d | 2750 | if(iTracks == 0)fNTracks[1]->Fill(fNOtrks); |
2751 | fNTracks_pt[1]->Fill(fNOtrks, fPt); | |
2752 | fNTracks_eta[1]->Fill(fNOtrks, track->Eta()); | |
2753 | fNTracks_phi[1]->Fill(fNOtrks, track->Phi()); | |
c852fdae | 2754 | fNClusters[1]->Fill(ClsNo); |
aaec953d | 2755 | fTPCNcls_pid[1]->Fill(TPCNcls, TPCNcls_pid); |
c852fdae | 2756 | |
0131ce6c | 2757 | //______________________________________________________________ |
2758 | ||
2759 | ///______________________________________________________________________ | |
2760 | ///Histograms for PID Studies | |
2761 | //Double_t fPtBin[6] = {2,4,6,8,10,15}; | |
c852fdae | 2762 | |
2c8e1f6c | 2763 | for(Int_t i = 0; i < 6; i++) |
c852fdae | 2764 | { |
9a1f999b | 2765 | if(fPt>=fPtBin[i] && fPt<fPtBin[i+1]) |
2766 | { | |
2767 | if(fEMCflag) fEoverP_tpc[i]->Fill(fTPCnSigma,(fClus->E() / fP)); | |
9a1f999b | 2768 | fTPC_pt[i]->Fill(fTPCsignal); |
2769 | fTPCnsigma_pt[i]->Fill(fTPCnSigma); | |
2770 | ||
2771 | } | |
c852fdae | 2772 | } |
2773 | ||
93c64cd2 | 2774 | if(track->Eta()>=fEtaCutMin && track->Eta()<=fEtaCutMax ){ |
2775 | ||
628d0da7 | 2776 | //new pt bins for trigger data |
2777 | ||
2778 | for(Int_t i = 0; i < 10; i++) | |
2779 | { | |
2780 | if(fP>=fPtBin_trigger[i] && fP<fPtBin_trigger[i+1]) | |
2781 | { | |
2782 | if(fEMCflag)fEoverP_tpc_p_trigger[i]->Fill(fTPCnSigma,(fClus->E() / fP)); | |
2783 | ||
2784 | } | |
2785 | ||
2786 | if(fPt>=fPtBin_trigger[i] && fPt<fPtBin_trigger[i+1]) | |
2787 | { | |
2788 | if(fEMCflag)fEoverP_tpc_pt_trigger[i]->Fill(fTPCnSigma,(fClus->E() / fP)); | |
2789 | ||
2790 | } | |
2791 | } | |
2792 | ||
93c64cd2 | 2793 | |
2794 | //new way to calculate TPCnsigma distribution: TPCnsigma in function of p, with/without E/p cut | |
2795 | fTPCnsigma_p_TPC->Fill(fP, fTPCnSigma); | |
2796 | if(fEMCflag){ | |
2797 | ||
2798 | fTPCnsigma_p_TPC_on_EMCal_acc->Fill(fP, fTPCnSigma); | |
2799 | ||
2800 | if((fClus->E() / fP) >= fEoverPCutMin && (fClus->E() / fP) <= fEoverPCutMax){ | |
2801 | fTPCnsigma_p_TPC_EoverP_cut->Fill(fP, fTPCnSigma); | |
2802 | } | |
2803 | ||
2804 | }//close EMCflag | |
628d0da7 | 2805 | |
93c64cd2 | 2806 | }//close eta cut |
2807 | ||
2808 | ///QA plots after track selection | |
2809 | ///_____________________________________________________________ | |
c852fdae | 2810 | |
93c64cd2 | 2811 | //_______________________________________________________ |
2812 | //Correlation Analysis - DiHadron | |
c852fdae | 2813 | if(!fUseEMCal) |
2814 | { | |
2815 | if(fTPCnSigma < 3.5 && fCorrelationFlag) | |
2816 | { | |
2817 | fPtTrigger_Inc->Fill(fPt); | |
2818 | DiHadronCorrelation(track, iTracks); | |
2819 | } | |
2820 | } | |
9a1f999b | 2821 | //_______________________________________________________ |
c852fdae | 2822 | |
2823 | ||
9a1f999b | 2824 | /////////////////////////////////////////////////////////////////// |
2825 | ///TPC - efficiency calculation // | |
c852fdae | 2826 | |
9a1f999b | 2827 | /// changing start here |
c852fdae | 2828 | if(fIsMC && fIsAOD && track->GetLabel()>=0) |
2829 | { | |
2830 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
2831 | Int_t pdg = fMCparticle->GetPdgCode(); | |
2832 | ||
9a1f999b | 2833 | // |
c852fdae | 2834 | if(fMCparticle->IsPhysicalPrimary()){ |
c852fdae | 2835 | |
9a1f999b | 2836 | |
2837 | if(fMCparticle->Eta()>=fEtaCutMin && fMCparticle->Eta()<=fEtaCutMax ){ | |
2838 | ||
c852fdae | 2839 | Bool_t MotherFound = FindMother(track->GetLabel()); |
2840 | if(MotherFound){ | |
2841 | fMCparticleMother = (AliAODMCParticle*) fMCarray->At(fMCparticle->GetMother()); | |
2842 | if( TMath::Abs(pdg) == 11 && fMCparticleMother->GetPdgCode()!=22 ){ | |
9a1f999b | 2843 | if(fIsHFE1) fPtMC_TPC_All->Fill(fMCparticle->Pt()); |
c852fdae | 2844 | } |
2845 | } | |
9a1f999b | 2846 | } |
c852fdae | 2847 | } |
2848 | }///until here | |
2849 | ||
2850 | else if(fIsMC && track->GetLabel()>=0)//ESD | |
2851 | { | |
2852 | ||
2853 | if(fMCstack->IsPhysicalPrimary(track->GetLabel())){ | |
2854 | fMCtrack = fMCstack->Particle(track->GetLabel()); | |
2855 | ||
2856 | Int_t pdg = fMCtrack->GetPdgCode(); | |
2857 | if(fMCtrack->Eta()>=fEtaCutMin && fMCtrack->Eta()<=fEtaCutMax ){ | |
2858 | ||
2859 | if(fMCtrack->GetFirstMother()>0){ | |
2860 | fMCtrackMother = fMCstack->Particle(fMCtrack->GetFirstMother()); | |
0131ce6c | 2861 | Bool_t MotherFound = FindMother(track->GetLabel()); |
2862 | if(MotherFound){ | |
2863 | if( TMath::Abs(pdg) == 11 && fMCtrackMother->GetPdgCode()!=22 ){ | |
2864 | if(fIsHFE1) fPtMC_TPC_All->Fill(fMCtrack->Pt()); | |
2865 | } | |
2866 | } | |
c852fdae | 2867 | } |
2868 | } | |
2869 | } | |
2870 | } | |
2871 | ||
2872 | ||
2c8e1f6c | 2873 | if(fPt>1 && fPt<2) fTOF01->Fill(fTOFnSigma,fTPCnSigma); |
2874 | if(fPt>2 && fPt<4) fTOF02->Fill(fTOFnSigma,fTPCnSigma); | |
2875 | if(fPt>4 && fPt<6) fTOF03->Fill(fTOFnSigma,fTPCnSigma); | |
2876 | ||
8e2d649d | 2877 | ///________________________________________________________________________ |
2878 | ///PID | |
2879 | ///Here the PID cuts defined in the file "ConfigEMCalHFEpA.C" is applied | |
c852fdae | 2880 | Int_t pidpassed = 1; |
2881 | AliHFEpidObject hfetrack; | |
9a4682da | 2882 | hfetrack.SetAnalysisType(AliHFEpidObject::kESDanalysis); |
c852fdae | 2883 | hfetrack.SetRecTrack(track); |
a89620c8 | 2884 | hfetrack.SetPP(); //proton-proton analysis |
c852fdae | 2885 | if(!fPID->IsSelected(&hfetrack, NULL, "", fPIDqa)) pidpassed = 0; |
2886 | fpid->Fill(pidpassed); | |
2887 | ||
2888 | if(pidpassed==0) continue; | |
8e2d649d | 2889 | ///________________________________________________________________________ |
c852fdae | 2890 | |
c852fdae | 2891 | |
8e2d649d | 2892 | //////////////////////////////////////////////////////////////////// |
2893 | ///TPC efficiency calculations | |
9a1f999b | 2894 | |
0131ce6c | 2895 | |
c852fdae | 2896 | if(fIsMC && fIsAOD && track->GetLabel()>=0) |
2897 | { | |
2898 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
2899 | Int_t pdg = fMCparticle->GetPdgCode(); | |
2900 | ||
9a1f999b | 2901 | // |
c852fdae | 2902 | if(fMCparticle->IsPhysicalPrimary()){ |
2903 | ||
2904 | ||
2905 | if(fMCparticle->Eta()>=fEtaCutMin && fMCparticle->Eta()<=fEtaCutMax ){ | |
2906 | ||
2907 | Bool_t MotherFound = FindMother(track->GetLabel()); | |
2908 | if(MotherFound){ | |
2909 | fMCparticleMother = (AliAODMCParticle*) fMCarray->At(fMCparticle->GetMother()); | |
2910 | if( TMath::Abs(pdg) == 11 && fMCparticleMother->GetPdgCode()!=22 ){ | |
2911 | if(fIsHFE1) fPtMC_TPC_Selected->Fill(fMCparticle->Pt()); | |
2912 | } | |
2913 | } | |
2914 | } | |
2915 | } | |
2916 | }///until here | |
2917 | ||
2918 | else if(fIsMC && track->GetLabel()>=0)//ESD | |
2919 | { | |
2920 | ||
2921 | if(fMCstack->IsPhysicalPrimary(track->GetLabel())){ | |
2922 | fMCtrack = fMCstack->Particle(track->GetLabel()); | |
2923 | ||
2924 | Int_t pdg = fMCtrack->GetPdgCode(); | |
2925 | if(fMCtrack->Eta()>=fEtaCutMin && fMCtrack->Eta()<=fEtaCutMax ){ | |
2926 | ||
2927 | if(fMCtrack->GetFirstMother()>0){ | |
2928 | fMCtrackMother = fMCstack->Particle(fMCtrack->GetFirstMother()); | |
0131ce6c | 2929 | Bool_t MotherFound = FindMother(track->GetLabel()); |
2930 | if(MotherFound){ | |
2931 | if( TMath::Abs(pdg) == 11 && fMCtrackMother->GetPdgCode()!=22 ){ | |
2932 | if(fIsHFE1) fPtMC_TPC_Selected->Fill(fMCtrack->Pt()); | |
2933 | } | |
2934 | } | |
c852fdae | 2935 | } |
2936 | } | |
2937 | } | |
2938 | } | |
2939 | ||
8e2d649d | 2940 | //Eta Cut for TPC only |
c852fdae | 2941 | if(track->Eta()>=fEtaCutMin && track->Eta()<=fEtaCutMax ){ |
2942 | fTPCnsigma_pt_2D->Fill(fPt,fTPCnSigma); | |
2943 | } | |
2944 | ||
8e2d649d | 2945 | //Background for TPC only |
9a4682da | 2946 | if(fFillBackground){ |
0131ce6c | 2947 | |
2948 | //efficiency without SS cut for TPC only | |
2949 | if(track->Eta()>=fEtaCutMin && track->Eta()<=fEtaCutMax){ | |
2950 | Background(track, iTracks, Vtrack, kTRUE); //IsTPConly=kTRUE | |
2951 | } //Eta cut to be consistent with other efficiency | |
9a4682da | 2952 | } |
2953 | ||
2954 | ||
c852fdae | 2955 | fTPCnsigma_p[2]->Fill(fP,fTPCnSigma); |
2956 | fTPC_p[2]->Fill(fP,fTPCsignal); | |
2957 | TPCNcls = track->GetTPCNcls(); | |
2958 | Float_t pos3[3]={0,0,0}; | |
2959 | ||
8e2d649d | 2960 | |
2961 | //here denominator for track-matching efficiency | |
2962 | if(fIsMC && fIsAOD && track->GetLabel()>=0) | |
2963 | { | |
2964 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
2965 | Int_t pdg = fMCparticle->GetPdgCode(); | |
2966 | ||
2967 | // | |
2968 | if(fMCparticle->IsPhysicalPrimary()){ | |
2969 | ||
2970 | ||
2971 | if(fMCparticle->Eta()>=fEtaCutMin && fMCparticle->Eta()<=fEtaCutMax ){ | |
2972 | ||
2973 | Bool_t MotherFound = FindMother(track->GetLabel()); | |
2974 | if(MotherFound){ | |
2975 | fMCparticleMother = (AliAODMCParticle*) fMCarray->At(fMCparticle->GetMother()); | |
2976 | if( TMath::Abs(pdg) == 11 && fMCparticleMother->GetPdgCode()!=22 ){ | |
2977 | if(fIsHFE1) fPt_track_match_den->Fill(fMCparticle->Pt()); | |
2978 | } | |
2979 | } | |
2980 | } | |
2981 | } | |
2982 | }///until here | |
2983 | ||
2984 | ||
c852fdae | 2985 | if(track->GetEMCALcluster()>0) |
2986 | { | |
2987 | fClus = fVevent->GetCaloCluster(track->GetEMCALcluster()); | |
3db2410d | 2988 | /////////////////////////////////////////////////////////////////////////////////////////////////////////// |
2989 | //to use tender | |
2990 | if(fUseTender){ | |
2991 | int EMCalIndex = -1; | |
2992 | EMCalIndex = track->GetEMCALcluster(); | |
2993 | TClonesArray *fCaloClusters_tender = dynamic_cast<TClonesArray*>(InputEvent()->FindListObject("EmcCaloClusters")); | |
2994 | fClus = static_cast<AliVCluster*>(fCaloClusters_tender->At(EMCalIndex)); | |
2995 | } | |
2996 | /////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
2997 | ||
c852fdae | 2998 | if(fClus->IsEMCAL()) |
2999 | { | |
3000 | ||
0131ce6c | 3001 | //________________________________________________________________________ |
a89620c8 | 3002 | |
3003 | ||
0131ce6c | 3004 | //Cluster timing distribution -- for ESD |
3005 | if(fUseEMCal && !fIsAOD){ | |
3006 | ||
3007 | AliESDCaloCells &cells_esd=*(fESD->GetEMCALCells()); | |
3008 | TRefArray* caloClusters_esd = new TRefArray(); | |
3009 | fESD->GetEMCALClusters(caloClusters_esd); | |
3010 | Int_t nclus_esd = caloClusters_esd->GetEntries(); | |
3011 | ||
3012 | ||
3013 | for (Int_t icl = 0; icl < nclus_esd; icl++) { | |
3014 | ||
3015 | AliESDCaloCluster* clus_esd = (AliESDCaloCluster*)caloClusters_esd->At(icl); | |
3016 | ||
3017 | if(clus_esd->IsEMCAL()){ | |
3018 | Float_t ncells_esd = fClus->GetNCells(); | |
3019 | UShort_t * index_esd = clus_esd->GetCellsAbsId() ; | |
3020 | UShort_t * index2_esd = fClus->GetCellsAbsId() ; | |
3021 | ||
3022 | ||
3023 | for(Int_t i = 0; i < ncells_esd ; i++){ | |
3024 | ||
3025 | Int_t absId_esd = index_esd[i]; | |
3026 | fTime->Fill(fPt,cells_esd.GetCellTime(absId_esd)); | |
3027 | ||
3028 | Int_t absId2_esd = index2_esd[i]; | |
3029 | fTime2->Fill(fPt,cells_esd.GetCellTime(absId2_esd)); | |
3030 | } | |
3031 | ||
3032 | } | |
3033 | } | |
3034 | ||
3035 | } | |
3036 | /* not working! | |
3037 | //Cluster timing distribution -- for AOD | |
3038 | if(fUseEMCal && fIsAOD){ | |
a89620c8 | 3039 | |
0131ce6c | 3040 | AliAODCaloCells &cells_aod=*(fAOD->GetEMCALCells()); |
a89620c8 | 3041 | |
0131ce6c | 3042 | TRefArray* caloClusters_aod = new TRefArray(); |
3043 | fAOD->GetEMCALClusters(caloClusters_aod); | |
a89620c8 | 3044 | |
0131ce6c | 3045 | Int_t nclus_aod = caloClusters_aod->GetEntries(); |
a89620c8 | 3046 | |
0131ce6c | 3047 | for (Int_t icl = 0; icl < nclus_aod; icl++) { |
3048 | ||
3049 | AliAODCaloCluster* clus_aod = (AliAODCaloCluster*)caloClusters_aod->At(icl); | |
a89620c8 | 3050 | |
a89620c8 | 3051 | |
0131ce6c | 3052 | if(clus_aod->IsEMCAL()){ |
3053 | Float_t ncells_aod = fClus->GetNCells(); | |
3054 | UShort_t * index_aod = clus_aod->GetCellsAbsId() ; | |
3055 | UShort_t * index2_aod = fClus->GetCellsAbsId() ; | |
a89620c8 | 3056 | |
3057 | ||
0131ce6c | 3058 | for(Int_t i = 0; i < ncells_aod ; i++){ |
a89620c8 | 3059 | |
0131ce6c | 3060 | Int_t absId_aod = index_aod[i]; |
3061 | fTime->Fill(fPt,cells_aod.GetCellTime(absId_aod)); | |
a89620c8 | 3062 | |
0131ce6c | 3063 | Int_t absId2_aod = index2_aod[i]; |
3064 | fTime2->Fill(fPt,cells_aod.GetCellTime(absId2_aod)); | |
a89620c8 | 3065 | } |
3066 | ||
3067 | } | |
3068 | } | |
3069 | ||
9a4682da | 3070 | } |
0131ce6c | 3071 | */ |
3072 | ||
3073 | ||
9a4682da | 3074 | if(fUseEMCal){ |
3075 | double emctof = fClus->GetTOF(); | |
3076 | ftimingEle->Fill(fPt,emctof); | |
a89620c8 | 3077 | } |
9a1f999b | 3078 | //________________________________________________________________________ |
a89620c8 | 3079 | |
3080 | ||
3081 | ||
9a1f999b | 3082 | |
0131ce6c | 3083 | // Residuals |
9a1f999b | 3084 | Double_t Dx = fClus->GetTrackDx(); |
3085 | Double_t Dz = fClus->GetTrackDz(); | |
3086 | Double_t R=TMath::Sqrt(Dx*Dx+Dz*Dz); | |
0131ce6c | 3087 | |
2c8e1f6c | 3088 | for(Int_t i = 0; i < 6; i++) |
c852fdae | 3089 | { |
3090 | if(fPt>=fPtBin[i] && fPt<fPtBin[i+1]) | |
3091 | { | |
3092 | ||
3093 | fEta[i]->Fill(Dz); | |
3094 | fPhi[i]->Fill(Dx); | |
3095 | fR[i]->Fill(R); | |
3096 | } | |
9a1f999b | 3097 | } |
c852fdae | 3098 | |
9a1f999b | 3099 | if(TMath::Abs(fClus->GetTrackDx())<=fdPhiCut && TMath::Abs(fClus->GetTrackDz())<=fdEtaCut) |
3100 | { | |
3101 | Float_t Energy = fClus->E(); | |
3102 | Float_t EoverP = Energy/track->P(); | |
3103 | Float_t M02 = fClus->GetM02(); | |
3104 | Float_t M20 = fClus->GetM20(); | |
3105 | Float_t ncells = fClus->GetNCells(); | |
8e2d649d | 3106 | |
3107 | //here numerator for track-matching efficiency | |
3108 | if(fIsMC && fIsAOD && track->GetLabel()>=0) | |
3109 | { | |
3110 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
3111 | Int_t pdg = fMCparticle->GetPdgCode(); | |
3112 | ||
3113 | // | |
3114 | if(fMCparticle->IsPhysicalPrimary()){ | |
3115 | ||
3116 | ||
3117 | if(fMCparticle->Eta()>=fEtaCutMin && fMCparticle->Eta()<=fEtaCutMax ){ | |
3118 | ||
3119 | Bool_t MotherFound = FindMother(track->GetLabel()); | |
3120 | if(MotherFound){ | |
3121 | fMCparticleMother = (AliAODMCParticle*) fMCarray->At(fMCparticle->GetMother()); | |
3122 | if( TMath::Abs(pdg) == 11 && fMCparticleMother->GetPdgCode()!=22 ){ | |
3123 | if(fIsHFE1) fPt_track_match_num->Fill(fMCparticle->Pt()); | |
3124 | } | |
3125 | } | |
3126 | } | |
3127 | } | |
3128 | }///until here | |
3129 | ||
3130 | ||
3131 | ||
0131ce6c | 3132 | //---------------------------------------------------------------------------------------- |
1dd85087 | 3133 | // |
3134 | //EtaCut electrons histogram | |
0131ce6c | 3135 | //Shower Shape Cut |
9a1f999b | 3136 | if(track->Eta()>=fEtaCutMin && track->Eta()<=fEtaCutMax ){ |
3137 | ||
3138 | if(fUseShowerShapeCut){ | |
3139 | if(M02 >= fM02CutMin && M02<=fM02CutMax && M20>=fM20CutMin && M20<=fM20CutMax){ | |
3140 | fEoverP_pt[2]->Fill(fPt,(fClus->E() / fP)); | |
3141 | fShowerShapeCut->Fill(M02,M20); | |
3db2410d | 3142 | //in order to check if there are exotic cluster in this selected cluster (27 may 2014) |
1dd85087 | 3143 | fNcells_energy_elec_selected->Fill(ncells,Energy); |
9a1f999b | 3144 | |
3db2410d | 3145 | //true electrons E/p shape |
3146 | if(fIsMC && fIsAOD && track->GetLabel()>=0){ | |
3147 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
3148 | Int_t pdg = fMCparticle->GetPdgCode(); | |
3149 | ||
3150 | if( TMath::Abs(pdg) == 11){ | |
3151 | fEoverP_pt_true_electrons->Fill(fPt,(fClus->E() / fP)); | |
3152 | } | |
3153 | } | |
3154 | ||
3155 | ||
3156 | ||
9a1f999b | 3157 | } |
3158 | ||
3159 | } | |
3160 | if(!fUseShowerShapeCut){ | |
3161 | fEoverP_pt[2]->Fill(fPt,(fClus->E() / fP)); | |
3162 | fShowerShapeCut->Fill(M02,M20); | |
1dd85087 | 3163 | fNcells_energy_elec_selected->Fill(ncells,Energy); |
3db2410d | 3164 | |
3165 | //after cut -> Are they really electrons ? E/p shape | |
3166 | if(fIsMC && fIsAOD && track->GetLabel()>=0){ | |
3167 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
3168 | Int_t pdg = fMCparticle->GetPdgCode(); | |
3169 | ||
3170 | if( TMath::Abs(pdg) == 11){ | |
3171 | fEoverP_pt_true_electrons->Fill(fPt,(fClus->E() / fP)); | |
3172 | } | |
3173 | } | |
1dd85087 | 3174 | |
9a1f999b | 3175 | |
3176 | } | |
3177 | if(fUseEMCal) fShowerShape_ele->Fill(M02,M20); | |
3178 | ||
8e2d649d | 3179 | //for shower shape cut studies - now with TPC PID Cut |
9a1f999b | 3180 | if(fUseEMCal){ |
3181 | fShowerShapeM02_EoverP->Fill(M02,EoverP); | |
3182 | fShowerShapeM20_EoverP->Fill(M20,EoverP); | |
3183 | } | |
3184 | ||
3185 | } | |
3186 | ||
0131ce6c | 3187 | //---------------------------------------------------------------------------------------- |
9a1f999b | 3188 | |
3189 | ||
3190 | ||
0131ce6c | 3191 | // for Eta Phi distribution |
9a1f999b | 3192 | fClus->GetPosition(pos3); |
3193 | TVector3 vpos(pos3[0],pos3[1],pos3[2]); | |
3194 | Double_t cphi = vpos.Phi(); | |
3195 | Double_t ceta = vpos.Eta(); | |
3196 | fEtaPhi[2]->Fill(cphi,ceta); | |
3197 | ||
3198 | ||
3199 | ||
3200 | fTPCNcls_EoverP[2]->Fill(TPCNcls, EoverP); | |
3201 | ||
2c8e1f6c | 3202 | for(Int_t i = 0; i < 6; i++) |
9a1f999b | 3203 | { |
3204 | if(fPt>=fPtBin[i] && fPt<fPtBin[i+1]) | |
3205 | { | |
3206 | ||
3207 | fR_EoverP[i]->Fill(R, EoverP); | |
3208 | fNcells[i]->Fill(ncells); | |
3209 | fNcells_EoverP[i]->Fill(EoverP, ncells); | |
3210 | fM02_EoverP[i]->Fill(M02,EoverP); | |
3211 | fM20_EoverP[i]->Fill(M20,EoverP); | |
3212 | fECluster_ptbins[i]->Fill(Energy); | |
3213 | fEoverP_ptbins[i]->Fill(EoverP); | |
3214 | ||
3215 | if((fClus->E() / fP) >= fEoverPCutMin && (fClus->E() / fP) <= fEoverPCutMax) { | |
3216 | fNcells_electrons[i]->Fill(ncells); | |
3217 | } | |
3218 | ||
3219 | if(M02<0.5 && M20<0.3) { | |
3220 | fEoverP_wSSCut[i]->Fill(EoverP); | |
3221 | } | |
3222 | } | |
3223 | } | |
3224 | ||
3225 | fNcells_pt->Fill(fPt, ncells); | |
3226 | ||
3227 | ||
0131ce6c | 3228 | //////////////////////////////////////////////////////////////////// |
3229 | ///EMCal - Efficiency calculations | |
9a1f999b | 3230 | |
0131ce6c | 3231 | |
9a1f999b | 3232 | if(fIsMC && fIsAOD && track->GetLabel()>=0) |
3233 | { | |
3234 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
3235 | Int_t pdg = fMCparticle->GetPdgCode(); | |
3236 | ||
0131ce6c | 3237 | // |
9a1f999b | 3238 | if(fMCparticle->IsPhysicalPrimary()){ |
3239 | ||
0131ce6c | 3240 | //Phi cut && fMCparticle->Phi()>=(TMath::Pi()*80/180) && fMCparticle->Phi()<=TMath::Pi() |
3241 | if(fMCparticle->Eta()>=fEtaCutMin && fMCparticle->Eta()<=fEtaCutMax ){ | |
9a1f999b | 3242 | |
3243 | Bool_t MotherFound = FindMother(track->GetLabel()); | |
3244 | if(MotherFound){ | |
3245 | fMCparticleMother = (AliAODMCParticle*) fMCarray->At(fMCparticle->GetMother()); | |
3246 | if( TMath::Abs(pdg) == 11 && fMCparticleMother->GetPdgCode()!=22 ){ | |
0131ce6c | 3247 | if(fIsHFE1)fPtMC_EMCal_All->Fill(fMCparticle->Pt()); |
9a1f999b | 3248 | } |
3249 | } | |
3250 | } | |
3251 | } | |
0131ce6c | 3252 | } |
9a1f999b | 3253 | |
3254 | else if(fIsMC && track->GetLabel()>=0)//ESD | |
3255 | { | |
3256 | ||
3257 | if(fMCstack->IsPhysicalPrimary(track->GetLabel())) | |
3258 | { | |
3259 | ||
3260 | fMCtrack = fMCstack->Particle(track->GetLabel()); | |
3261 | ||
3262 | Int_t pdg = fMCtrack->GetPdgCode(); | |
0131ce6c | 3263 | //Phi cut && fMCtrack->Phi()>=(TMath::Pi()*80/180) && fMCtrack->Phi()<=TMath::Pi() |
3264 | if(fMCtrack->Eta()>=fEtaCutMin && fMCtrack->Eta()<=fEtaCutMax ) | |
9a1f999b | 3265 | { |
0131ce6c | 3266 | Bool_t MotherFound = FindMother(track->GetLabel()); |
3267 | //MotherFound included | |
3268 | if(MotherFound){ | |
3269 | if(fMCtrack->GetFirstMother()>0){ | |
3270 | fMCtrackMother = fMCstack->Particle(fMCtrack->GetFirstMother()); | |
3271 | if( TMath::Abs(pdg) == 11 && fMCtrackMother->GetPdgCode()!=22 ){ | |
3272 | if(fIsHFE1)fPtMC_EMCal_All->Fill(fMCtrack->Pt()); | |
3273 | } | |
9a1f999b | 3274 | } |
3275 | } | |
3276 | } | |
3277 | } | |
3278 | } | |
3279 | ||
aaec953d | 3280 | //_______________________________________________________ |
3281 | //PID using EMCal | |
3db2410d | 3282 | if(fEoverPnsigma)SetEoverPCutPtDependentMC(track->Pt()); |
3283 | ||
9a1f999b | 3284 | if((fClus->E() / fP) >= fEoverPCutMin && (fClus->E() / fP) <= fEoverPCutMax) |
3285 | { | |
3286 | ||
1dd85087 | 3287 | |
3288 | fECluster[2]->Fill(Energy); | |
3289 | fTPCNcls_pid[3]->Fill(TPCNcls, TPCNcls_pid); | |
3290 | ||
0131ce6c | 3291 | |
c852fdae | 3292 | if(fUseEMCal) |
3293 | { | |
1dd85087 | 3294 | if(track->Eta()>=fEtaCutMin && track->Eta()<=fEtaCutMax ){ |
3295 | fPtElec_Inc->Fill(fPt); | |
3296 | //eta phi distribution for data | |
3297 | fEtaPhi_data->Fill(track->Phi(),track->Eta()); | |
3298 | } | |
3299 | ||
aaec953d | 3300 | //Eta cut for background |
a89620c8 | 3301 | if(fFillBackground){ |
0131ce6c | 3302 | fEtad[2]->Fill(track->Eta()); |
3303 | ||
3304 | //background for triggered data: trigger electron must have same cuts on shower shape 06/Jan/2014 | |
3305 | if(fUseShowerShapeCut){ | |
3306 | if(M02 >= fM02CutMin && M02<=fM02CutMax && M20>=fM20CutMin && M20<=fM20CutMax){ | |
3307 | if(track->Eta()>=fEtaCutMin && track->Eta()<=fEtaCutMax){ | |
3308 | Background(track, iTracks, Vtrack, kFALSE); | |
3309 | } | |
3310 | } | |
3311 | } | |
3312 | else{ | |
3313 | if(track->Eta()>=fEtaCutMin && track->Eta()<=fEtaCutMax){ | |
3314 | Background(track, iTracks, Vtrack, kFALSE); | |
3315 | } | |
aaec953d | 3316 | } |
0131ce6c | 3317 | |
a89620c8 | 3318 | } |
3319 | ||
3320 | double emctof2 = fClus->GetTOF(); | |
3321 | ftimingEle2->Fill(fPt,emctof2); | |
0131ce6c | 3322 | //Correlation Analysis |
c852fdae | 3323 | if(fCorrelationFlag) |
3324 | { | |
3325 | ElectronHadronCorrelation(track, iTracks, Vtrack); | |
3326 | } | |
3327 | } | |
aaec953d | 3328 | //_______________________________________________________ |
9a1f999b | 3329 | |
aaec953d | 3330 | //////////////////////////////////////////////////////////////////// |
3331 | ///EMCal - efficiency calculations | |
9a1f999b | 3332 | |
3333 | if(track->Charge()<0) fCharge_n->Fill(fPt); | |
3334 | if(track->Charge()>0) fCharge_p->Fill(fPt); | |
3335 | ||
3336 | ||
aaec953d | 3337 | |
3338 | if(fIsMC && fIsAOD && track->GetLabel()>=0)//AOD | |
9a1f999b | 3339 | { |
3340 | if(track->Charge()<0) fCharge_n->Fill(fPt); | |
3341 | if(track->Charge()>0) fCharge_p->Fill(fPt); | |
3342 | ||
3343 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
89f41a30 | 3344 | if(fMCparticle->GetMother()>0) fMCparticleMother = (AliAODMCParticle*) fMCarray->At(fMCparticle->GetMother()); |
9a1f999b | 3345 | Int_t pdg = fMCparticle->GetPdgCode(); |
89f41a30 | 3346 | |
2235208e | 3347 | double proX = fMCparticle->Xv(); |
3348 | double proY = fMCparticle->Yv(); | |
3349 | double proR = sqrt(pow(proX,2)+pow(proY,2)); | |
3350 | ||
9a1f999b | 3351 | |
0131ce6c | 3352 | if(fMCparticle->Eta()>=fEtaCutMin && fMCparticle->Eta()<=fEtaCutMax && fMCparticle->Phi()>=(TMath::Pi()*80/180) && fMCparticle->Phi()<=TMath::Pi() ){ |
9a1f999b | 3353 | |
89f41a30 | 3354 | if( TMath::Abs(pdg) == 11 && fMCparticle->GetMother()>0 ){ |
3355 | Int_t mpdg = fMCparticleMother->GetPdgCode(); | |
67eb14b9 | 3356 | if(TMath::Abs(mpdg) == 221 || TMath::Abs(mpdg) == 22 || TMath::Abs(mpdg) == 111){ |
2235208e | 3357 | if(proR<7)fPtMCelectronAfterAll_nonPrimary->Fill(fMCparticle->Pt()); //numerator for the total efficiency, non Primary track |
67eb14b9 | 3358 | } |
3359 | } | |
2c8e1f6c | 3360 | if( TMath::Abs(pdg) == 11 && fMCparticle->IsPhysicalPrimary()) fPtMCelectronAfterAll_Primary->Fill(fMCparticle->Pt()); |
9a1f999b | 3361 | } |
3362 | ||
3363 | ||
3364 | // | |
3365 | if(fMCparticle->IsPhysicalPrimary()){ | |
3366 | ||
3367 | ||
3368 | if(fMCparticle->Eta()>=fEtaCutMin && fMCparticle->Eta()<=fEtaCutMax ){ | |
31185d97 | 3369 | |
9a1f999b | 3370 | Bool_t MotherFound = FindMother(track->GetLabel()); |
3371 | if(MotherFound){ | |
0131ce6c | 3372 | |
3373 | if(!fUseShowerShapeCut){ | |
3374 | if(fIsHFE1){ | |
8e2d649d | 3375 | //Unfolding pt_reco/pt_MC in the efficiency |
0131ce6c | 3376 | fPtMCelectronAfterAll->Fill(fMCparticle->Pt()); |
8e2d649d | 3377 | fPtMCelectronAfterAll_unfolding->Fill(track->Pt()); |
0131ce6c | 3378 | fEtaPhi_num->Fill(fMCparticle->Phi(),fMCparticle->Eta()); |
8e2d649d | 3379 | |
3380 | //new histo to estimate how different is pt reco from pt MC | |
3381 | fpt_reco_pt_MC_num->Fill(track->Pt(),fMCparticle->Pt()); | |
0131ce6c | 3382 | }//numerator for the total efficiency AOD |
9a1f999b | 3383 | } |
0131ce6c | 3384 | //November 11 for efficiency of triggered data |
3385 | if(fUseShowerShapeCut){ | |
3386 | if(M02 >= fM02CutMin && M02<=fM02CutMax && M20>=fM20CutMin && M20<=fM20CutMax){ | |
3387 | if(fIsHFE1){ | |
8e2d649d | 3388 | //Unfolding pt_reco/pt_MC in the efficiency |
0131ce6c | 3389 | fPtMCelectronAfterAll->Fill(fMCparticle->Pt()); |
8e2d649d | 3390 | fPtMCelectronAfterAll_unfolding->Fill(track->Pt()); |
0131ce6c | 3391 | fEtaPhi_num->Fill(fMCparticle->Phi(),fMCparticle->Eta()); |
8e2d649d | 3392 | |
3393 | //new histo to estimate how different is pt reco from pt MC | |
3394 | fpt_reco_pt_MC_num->Fill(track->Pt(),fMCparticle->Pt()); | |
0131ce6c | 3395 | }//numerator for the total efficiency AOD |
3396 | } | |
3397 | } | |
3398 | ||
3399 | ||
3400 | ||
3401 | fMCparticleMother = (AliAODMCParticle*) fMCarray->At(fMCparticle->GetMother()); | |
3402 | if( TMath::Abs(pdg) == 11 && fMCparticleMother->GetPdgCode()!=22 ){ | |
3403 | if(fIsHFE1)fPtMC_EMCal_Selected->Fill(fMCparticle->Pt()); | |
3404 | } | |
3405 | }//if MotherFound | |
3406 | }//eta cut | |
9a1f999b | 3407 | } |
0131ce6c | 3408 | }///close AOD |
9a1f999b | 3409 | |
3410 | else if(fIsMC && track->GetLabel()>=0)//ESD | |
3411 | { | |
3412 | if(track->Charge()<0) fCharge_n->Fill(fPt); | |
3413 | if(track->Charge()>0) fCharge_p->Fill(fPt); | |
3414 | ||
3415 | fMCtrack = fMCstack->Particle(track->GetLabel()); | |
29881f7b | 3416 | if(fMCtrack->GetFirstMother()>0) |
3417 | { | |
3418 | fMCtrackMother = fMCstack->Particle(fMCtrack->GetFirstMother()); | |
3419 | } | |
2235208e | 3420 | TParticle *particle=fMCstack->Particle(track->GetLabel()); |
89f41a30 | 3421 | |
9a1f999b | 3422 | Int_t pdg = fMCtrack->GetPdgCode(); |
3423 | ||
89f41a30 | 3424 | |
29881f7b | 3425 | if(fMCtrack->Eta()>=fEtaCutMin && fMCtrack->Eta()<=fEtaCutMax) |
3426 | { | |
3427 | if( TMath::Abs(pdg) == 11 && fMCtrack->GetFirstMother()>0 ) | |
3428 | { | |
89f41a30 | 3429 | Int_t mpdg = fMCtrackMother->GetPdgCode(); |
29881f7b | 3430 | if(TMath::Abs(mpdg) == 221 || TMath::Abs(mpdg) == 22 || TMath::Abs(mpdg) == 111) |
3431 | { | |
2235208e | 3432 | Double_t proR=particle->R(); |
29881f7b | 3433 | if(proR<7) |
3434 | { | |
89f41a30 | 3435 | fPtMCelectronAfterAll_nonPrimary->Fill(fMCtrack->Pt()); //numerator for the total efficiency, non Primary track |
2235208e | 3436 | } |
89f41a30 | 3437 | } |
3438 | } | |
29881f7b | 3439 | if( TMath::Abs(pdg) == 11 && fMCstack->IsPhysicalPrimary(track->GetLabel())) |
3440 | { | |
3441 | fPtMCelectronAfterAll_Primary->Fill(fMCtrack->Pt()); | |
3442 | } | |
9a1f999b | 3443 | } |
3444 | ||
3445 | if(fMCstack->IsPhysicalPrimary(track->GetLabel())) | |
3446 | { | |
c852fdae | 3447 | Bool_t MotherFound = FindMother(track->GetLabel()); |
9a1f999b | 3448 | |
c852fdae | 3449 | if(MotherFound) |
3450 | { | |
29881f7b | 3451 | if(fMCtrack->Eta()>=fEtaCutMin && fMCtrack->Eta()<=fEtaCutMax) |
3452 | { | |
31185d97 | 3453 | if(!fUseShowerShapeCut){ |
0131ce6c | 3454 | if(fIsHFE1){ |
3455 | fPtMCelectronAfterAll->Fill(fMCtrack->Pt()); //numerator for the total efficiency ESD | |
3456 | fEtaPhi_num->Fill(fMCtrack->Phi(),fMCtrack->Eta()); | |
3457 | } | |
31185d97 | 3458 | } |
3459 | //November 11 for efficiency of triggered data | |
3460 | if(fUseShowerShapeCut){ | |
3461 | if(M02 >= fM02CutMin && M02<=fM02CutMax && M20>=fM20CutMin && M20<=fM20CutMax){ | |
0131ce6c | 3462 | if(fIsHFE1){ |
3463 | fPtMCelectronAfterAll->Fill(fMCtrack->Pt()); //numerator for the total efficiency ESD | |
3464 | fEtaPhi_num->Fill(fMCtrack->Phi(),fMCtrack->Eta()); | |
3465 | } | |
31185d97 | 3466 | } |
3467 | } | |
3468 | ||
3469 | ||
3470 | ||
c852fdae | 3471 | } |
3472 | } | |
9a1f999b | 3473 | |
3474 | ||
3475 | ||
0131ce6c | 3476 | // Phi cut && fMCtrack->Phi()>=(TMath::Pi()*80/180) && fMCtrack->Phi()<=TMath::Pi() |
3477 | if(fMCtrack->Eta()>=fEtaCutMin && fMCtrack->Eta()<=fEtaCutMax) | |
9a1f999b | 3478 | { |
0131ce6c | 3479 | //included MotherFound |
3480 | ||
3481 | if(MotherFound) | |
3482 | { | |
3483 | if(fMCtrack->GetFirstMother()>0){ | |
3484 | fMCtrackMother = fMCstack->Particle(fMCtrack->GetFirstMother()); | |
3485 | if( TMath::Abs(pdg) == 11 && fMCtrackMother->GetPdgCode()!=22 ){ | |
9a1f999b | 3486 | |
29881f7b | 3487 | if(fIsHFE1){fPtMC_EMCal_Selected->Fill(fMCtrack->Pt());} |
0131ce6c | 3488 | } |
9a1f999b | 3489 | } |
3490 | } | |
3491 | } | |
3492 | } | |
0131ce6c | 3493 | }//close ESD |
3494 | /////////////////////////////////////////////////////////////////// | |
9a1f999b | 3495 | |
3496 | ||
3497 | } | |
3498 | } | |
c852fdae | 3499 | } |
3500 | } | |
3501 | ||
9a1f999b | 3502 | //______________________________________________________________ |
3503 | // Vertex | |
c852fdae | 3504 | |
3505 | fVtxZ[2]->Fill(fZvtx); | |
8e2d649d | 3506 | if(iTracks == 0)fNTracks[2]->Fill(fNOtrks); |
3507 | fNTracks_pt[2]->Fill(fNOtrks, fPt); | |
3508 | fNTracks_eta[2]->Fill(fNOtrks, track->Eta()); | |
3509 | fNTracks_phi[2]->Fill(fNOtrks, track->Phi()); | |
c852fdae | 3510 | fNClusters[2]->Fill(ClsNo); |
aaec953d | 3511 | fTPCNcls_pid[2]->Fill(TPCNcls, TPCNcls_pid); |
c852fdae | 3512 | |
9a1f999b | 3513 | //______________________________________________________________ |
c852fdae | 3514 | |
9a1f999b | 3515 | //_______________________________________________________ |
3516 | //Correlation Analysis | |
c852fdae | 3517 | if(!fUseEMCal) |
3518 | { | |
3519 | fPtElec_Inc->Fill(fPt); | |
9a1f999b | 3520 | |
c852fdae | 3521 | if(fCorrelationFlag) |
3522 | { | |
3523 | ElectronHadronCorrelation(track, iTracks, Vtrack); | |
3524 | } | |
3525 | } | |
9a1f999b | 3526 | //_______________________________________________________ |
3527 | ||
3528 | ///________________________________________________________________________ | |
c852fdae | 3529 | } |
3530 | ||
9a1f999b | 3531 | //__________________________________________________________________ |
3532 | //Event Mixing Analysis | |
3533 | //Filling pool | |
c852fdae | 3534 | if(fEventMixingFlag) |
3535 | { | |
3536 | fPool = fPoolMgr->GetEventPool(fCentrality->GetCentralityPercentile("V0A"), fZvtx); // Get the buffer associated with the current centrality and z-vtx | |
3537 | ||
3538 | if(!fPool) AliFatal(Form("No pool found for centrality = %f, zVtx = %f", fCentrality->GetCentralityPercentile("V0A"), fZvtx)); | |
9a1f999b | 3539 | |
c852fdae | 3540 | fPool->UpdatePool(SelectedHadrons()); // fill the tracks in the event buffer. The ownership is handed over to the event mixing class. We are not allowed to delete tracksClone anymore! |
9a1f999b | 3541 | |
c852fdae | 3542 | |
3543 | } | |
3544 | ||
9a1f999b | 3545 | //__________________________________________________________________ |
c852fdae | 3546 | |
3547 | delete fListOfmotherkink; | |
3548 | PostData(1, fOutputList); | |
3549 | } | |
3550 | ||
9a1f999b | 3551 | //______________________________________________________________________ |
c852fdae | 3552 | void AliAnalysisTaskEMCalHFEpA::Terminate(Option_t *) |
3553 | { | |
9a1f999b | 3554 | //Draw result to the screen |
3555 | //Called once at the end of the query | |
3556 | ||
c852fdae | 3557 | fOutputList = dynamic_cast<TList*> (GetOutputData(1)); |
3558 | ||
3559 | if(!fOutputList) | |
3560 | { | |
3561 | printf("ERROR: Output list not available\n"); | |
3562 | return; | |
3563 | } | |
3564 | } | |
3565 | ||
9a1f999b | 3566 | //______________________________________________________________________ |
c852fdae | 3567 | Bool_t AliAnalysisTaskEMCalHFEpA::ProcessCutStep(Int_t cutStep, AliVParticle *track) |
3568 | { | |
9a1f999b | 3569 | //Check single track cuts for a given cut step |
3570 | //Note this function is called inside the UserExec function | |
c852fdae | 3571 | const Int_t kMCOffset = AliHFEcuts::kNcutStepsMCTrack; |
3572 | if(!fCFM->CheckParticleCuts(cutStep + kMCOffset, track)) return kFALSE; | |
3573 | return kTRUE; | |
3574 | } | |
3575 | ||
a89620c8 | 3576 | |
9a1f999b | 3577 | //______________________________________________________________________ |
a89620c8 | 3578 | |
9a4682da | 3579 | |
3580 | void AliAnalysisTaskEMCalHFEpA::Background(AliVTrack *track, Int_t trackIndex, AliVParticle *vtrack, Bool_t IsTPConly) | |
a89620c8 | 3581 | { |
8e2d649d | 3582 | ///_________________________________________________________________ |
3583 | ///MC analysis | |
1dd85087 | 3584 | //Bool_t IsMCefix=kFALSE; //to make correction on efix, use kTRUE (do not change the efficiency, so I will keep the correction only for d3) |
a89620c8 | 3585 | |
8e2d649d | 3586 | if(fIsMC) |
a89620c8 | 3587 | { |
8e2d649d | 3588 | if(track->GetLabel() < 0) |
3589 | { | |
3590 | AliWarning(Form("The track %d does not have a valid MC label",trackIndex)); | |
3591 | return; | |
3592 | } | |
a89620c8 | 3593 | |
8e2d649d | 3594 | if(fIsAOD) |
3595 | { | |
3596 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
2c8e1f6c | 3597 | |
8e2d649d | 3598 | if(fMCparticle->GetMother()<0) return; |
67eb14b9 | 3599 | |
8e2d649d | 3600 | fMCparticleMother = (AliAODMCParticle*) fMCarray->At(fMCparticle->GetMother()); |
3601 | if(fMCparticleMother->GetMother()>0)fMCparticleGMother = (AliAODMCParticle*) fMCarray->At(fMCparticleMother->GetMother()); | |
67eb14b9 | 3602 | |
8e2d649d | 3603 | if(TMath::Abs(fMCparticle->GetPdgCode())==11 && (TMath::Abs(fMCparticleMother->GetPdgCode())==22 || TMath::Abs(fMCparticleMother->GetPdgCode())==111 || TMath::Abs(fMCparticleMother->GetPdgCode())==221)) |
3604 | { | |
3605 | //Is Background | |
3606 | if(!IsTPConly)fPtBackgroundBeforeReco->Fill(track->Pt()); | |
3607 | if(IsTPConly)fPtBackgroundBeforeReco2->Fill(track->Pt()); | |
67eb14b9 | 3608 | |
3609 | ||
8e2d649d | 3610 | //October 08th weighted histos |
3611 | if(TMath::Abs(fMCparticleMother->GetPdgCode())==111 || TMath::Abs(fMCparticleMother->GetPdgCode())==221 ){ | |
3612 | ||
2c8e1f6c | 3613 | Double_t mPt=fMCparticleMother->Pt(); |
8e2d649d | 3614 | Double_t mweight=1; |
3615 | ||
8e2d649d | 3616 | |
1dd85087 | 3617 | //________________________________________________________________ |
628d0da7 | 3618 | //correction for d3 based on data |
67eb14b9 | 3619 | |
8e2d649d | 3620 | if(TMath::Abs(fMCparticleMother->GetPdgCode())==111){ |
3621 | Double_t x=mPt; | |
1dd85087 | 3622 | mweight=CalculateWeight(111, x); |
3623 | ||
8e2d649d | 3624 | } |
628d0da7 | 3625 | if(TMath::Abs(fMCparticleMother->GetPdgCode())==221){ |
3626 | Double_t x=mPt; | |
3627 | mweight=CalculateWeight(221, x); | |
3628 | ||
3629 | } | |
2c8e1f6c | 3630 | |
1dd85087 | 3631 | //________________________________________________________________ |
3632 | ||
3633 | //Histo pT mother versus pT electron | |
8e2d649d | 3634 | fpT_m_electron->Fill(mPt, track->Pt()); |
2c8e1f6c | 3635 | |
8e2d649d | 3636 | if(!IsTPConly)fPtBackgroundBeforeReco_weight->Fill(track->Pt(), 1./mweight); |
3637 | if(IsTPConly)fPtBackgroundBeforeReco2_weight->Fill(track->Pt(), 1./mweight); | |
2c8e1f6c | 3638 | } |
2235208e | 3639 | else if(fMCparticleMother->GetMother()>0 && (TMath::Abs(fMCparticleGMother->GetPdgCode())==111 || TMath::Abs(fMCparticleGMother->GetPdgCode())==221 )){ |
8e2d649d | 3640 | |
2c8e1f6c | 3641 | Double_t gmPt=fMCparticleGMother->Pt(); |
8e2d649d | 3642 | Double_t gmweight=1; |
67eb14b9 | 3643 | |
1dd85087 | 3644 | //________________________________________________________________ |
3645 | //correction for d3 based on data | |
2235208e | 3646 | |
8e2d649d | 3647 | if(TMath::Abs(fMCparticleGMother->GetPdgCode())==111){ |
3648 | Double_t x=gmPt; | |
1dd85087 | 3649 | gmweight=CalculateWeight(111, x); |
8e2d649d | 3650 | } |
628d0da7 | 3651 | if(TMath::Abs(fMCparticleGMother->GetPdgCode())==221){ |
3652 | Double_t x=gmPt; | |
3653 | gmweight=CalculateWeight(221, x); | |
3654 | } | |
2c8e1f6c | 3655 | |
8e2d649d | 3656 | |
1dd85087 | 3657 | //________________________________________________________________ |
3658 | //Histo pT gmother versus pT electron | |
8e2d649d | 3659 | |
8e2d649d | 3660 | fpT_gm_electron->Fill(gmPt, track->Pt()); |
2235208e | 3661 | |
8e2d649d | 3662 | if(!IsTPConly)fPtBackgroundBeforeReco_weight->Fill(track->Pt(), 1./gmweight); |
3663 | if(IsTPConly)fPtBackgroundBeforeReco2_weight->Fill(track->Pt(), 1./gmweight); | |
2c8e1f6c | 3664 | } |
3665 | else{ | |
8e2d649d | 3666 | if(!IsTPConly)fPtBackgroundBeforeReco_weight->Fill(track->Pt()); |
3667 | if(IsTPConly)fPtBackgroundBeforeReco2_weight->Fill(track->Pt()); | |
2c8e1f6c | 3668 | } |
8e2d649d | 3669 | }//particle kind |
3670 | }//IsAOD | |
3671 | //ESD | |
3672 | else | |
3673 | { | |
3674 | fMCtrack = fMCstack->Particle(track->GetLabel()); | |
9a4682da | 3675 | |
8e2d649d | 3676 | if(fMCtrack->GetFirstMother()<0) return; |
3677 | ||
3678 | fMCtrackMother = fMCstack->Particle(fMCtrack->GetFirstMother()); | |
3679 | ||
3680 | if(TMath::Abs(fMCtrack->GetPdgCode())==11 && (TMath::Abs(fMCtrackMother->GetPdgCode())==22 || TMath::Abs(fMCtrackMother->GetPdgCode())==111 || TMath::Abs(fMCtrackMother->GetPdgCode())==221)) | |
3681 | { | |
3682 | //Is Background | |
3683 | if(!IsTPConly)fPtBackgroundBeforeReco->Fill(track->Pt()); | |
3684 | if(IsTPConly)fPtBackgroundBeforeReco2->Fill(track->Pt()); | |
3685 | } | |
3686 | } | |
3687 | }//IsMC | |
3688 | ||
1dd85087 | 3689 | ///_________________________________________________________________ |
8e2d649d | 3690 | |
1dd85087 | 3691 | //________________________________________________ |
3692 | //Associated particle cut | |
8e2d649d | 3693 | fPartnerCuts->SetAcceptKinkDaughters(kFALSE); |
3694 | fPartnerCuts->SetRequireITSRefit(kTRUE); | |
3695 | fPartnerCuts->SetRequireTPCRefit(kTRUE); | |
3696 | fPartnerCuts->SetEtaRange(-0.9,0.9); | |
3697 | fPartnerCuts->SetMaxChi2PerClusterTPC(4.0); | |
3698 | fPartnerCuts->SetMinNClustersTPC(80); | |
1dd85087 | 3699 | fPartnerCuts->SetPtRange(0,1e10); |
3700 | //fPartnerCuts->SetRequireSigmaToVertex(kTRUE); | |
3701 | //fPartnerCuts->SetMaxDCAToVertexXY(1); | |
3702 | //fPartnerCuts->SetMaxDCAToVertexZ(3); | |
3703 | //_________________________________________________ | |
3704 | ||
3705 | ///################################################################# | |
3706 | //Non-HFE reconstruction | |
8e2d649d | 3707 | fNonHFE = new AliSelectNonHFE(); |
3708 | fNonHFE->SetAODanalysis(fIsAOD); | |
3709 | if(fMassCutFlag) fNonHFE->SetInvariantMassCut(fMassCut); | |
3710 | if(fAngleCutFlag) fNonHFE->SetOpeningAngleCut(fAngleCut); | |
3711 | if(fChi2CutFlag) fNonHFE->SetChi2OverNDFCut(fChi2Cut); | |
3712 | if(fDCAcutFlag) fNonHFE->SetDCACut(fDCAcut); | |
3713 | fNonHFE->SetAlgorithm("DCA"); //KF | |
3714 | fNonHFE->SetPIDresponse(fPidResponse); | |
3715 | fNonHFE->SetTrackCuts(-3.5,3.5,fPartnerCuts); | |
3716 | fNonHFE->SetAdditionalCuts(fPtMinAsso,fTpcNclsAsso); | |
3717 | ||
3718 | if(!IsTPConly){ | |
3719 | fNonHFE->SetHistAngleBack(fOpAngleBack); | |
3720 | fNonHFE->SetHistAngle(fOpAngle); | |
3721 | fNonHFE->SetHistDCABack(fDCABack); | |
3722 | fNonHFE->SetHistDCA(fDCA); | |
3723 | fNonHFE->SetHistMassBack(fInvMassBack); | |
3724 | fNonHFE->SetHistMass(fInvMass); | |
3725 | } | |
3726 | if(IsTPConly){ | |
3727 | fNonHFE->SetHistAngleBack(fOpAngleBack2); | |
3728 | fNonHFE->SetHistAngle(fOpAngle2); | |
3729 | fNonHFE->SetHistDCABack(fDCABack2); | |
3730 | fNonHFE->SetHistDCA(fDCA2); | |
3731 | fNonHFE->SetHistMassBack(fInvMassBack2); | |
3732 | fNonHFE->SetHistMass(fInvMass2); | |
3733 | } | |
3734 | ||
3735 | fNonHFE->FindNonHFE(trackIndex,vtrack,fVevent); | |
3736 | ||
3737 | //index of track selected as partner | |
3738 | Int_t *fUlsPartner = fNonHFE->GetPartnersULS(); | |
3739 | ||
3740 | //Electron Information | |
3741 | Double_t fPhiE = -999; | |
3742 | Double_t fEtaE = -999; | |
3743 | Double_t fPtE = -999; | |
3744 | fPhiE = track->Phi(); | |
3745 | fEtaE = track->Eta(); | |
3746 | fPtE = track->Pt(); | |
3747 | ||
3748 | ///_________________________________________________________________ | |
3749 | ///MC analysis | |
3750 | if(fIsMC) | |
3751 | { | |
3752 | if(fIsAOD) | |
3753 | { | |
3754 | if(TMath::Abs(fMCparticle->GetPdgCode())==11 && (TMath::Abs(fMCparticleMother->GetPdgCode())==22 || TMath::Abs(fMCparticleMother->GetPdgCode())==111 || TMath::Abs(fMCparticleMother->GetPdgCode())==221)) | |
3755 | { | |
67eb14b9 | 3756 | |
8e2d649d | 3757 | Double_t weight=1; |
67eb14b9 | 3758 | |
8e2d649d | 3759 | if(!IsTPConly){ |
3760 | if(fNonHFE->IsULS()) fPtElec_ULS->Fill(fPtE,fNonHFE->GetNULS()); | |
3761 | if(fNonHFE->IsLS()) fPtElec_LS->Fill(fPtE,fNonHFE->GetNLS()); | |
3762 | ||
2c8e1f6c | 3763 | |
67eb14b9 | 3764 | |
8e2d649d | 3765 | |
3766 | if(TMath::Abs(fMCparticleMother->GetPdgCode())==111 || TMath::Abs(fMCparticleMother->GetPdgCode())==221){ | |
3767 | Double_t mPt=fMCparticleMother->Pt(); | |
1dd85087 | 3768 | Double_t mweight1=1; |
3769 | Double_t mweight2=1; | |
8e2d649d | 3770 | //Double_t weight=1; |
3771 | ||
8e2d649d | 3772 | |
8e2d649d | 3773 | //---------------------------------------------------------------------------- |
628d0da7 | 3774 | //correction based on data only |
8e2d649d | 3775 | if(TMath::Abs(fMCparticleMother->GetPdgCode())==111){ |
3776 | Double_t x=mPt; | |
1dd85087 | 3777 | weight=CalculateWeight(111, x); |
8e2d649d | 3778 | } |
628d0da7 | 3779 | if(TMath::Abs(fMCparticleMother->GetPdgCode())==221){ |
3780 | Double_t x=mPt; | |
3781 | weight=CalculateWeight(221, x); | |
3782 | } | |
8e2d649d | 3783 | |
1dd85087 | 3784 | |
8e2d649d | 3785 | //---------------------------------------------------------------------------- |
3786 | ||
3787 | //check this | |
3788 | if(fNonHFE->IsULS()) mweight1=(fNonHFE->GetNULS())/weight; | |
3789 | if(fNonHFE->IsLS()) mweight2=(fNonHFE->GetNLS())/weight; | |
3790 | ||
3791 | //fill histos | |
3792 | if(fNonHFE->IsULS())fPtElec_ULS_weight->Fill(fPtE, mweight1); | |
3793 | if(fNonHFE->IsLS())fPtElec_LS_weight->Fill(fPtE, mweight2); | |
3794 | } | |
3795 | else if(fMCparticleMother->GetMother()>0 && (TMath::Abs(fMCparticleGMother->GetPdgCode())==111 || TMath::Abs(fMCparticleGMother->GetPdgCode())==221 )){ | |
3796 | Double_t gmPt=fMCparticleGMother->Pt(); | |
1dd85087 | 3797 | Double_t gmweight1=1; |
3798 | Double_t gmweight2=1; | |
8e2d649d | 3799 | //Double_t weight=1; |
3800 | ||
1dd85087 | 3801 | //---------------------------------------------------------------------------- |
3802 | ||
3803 | //---------------------------------------------------------------------------- | |
3804 | ||
3805 | //correction based on data only for pi0 | |
8e2d649d | 3806 | |
8e2d649d | 3807 | if(TMath::Abs(fMCparticleGMother->GetPdgCode())==111){ |
3808 | Double_t x=gmPt; | |
1dd85087 | 3809 | weight=CalculateWeight(111, x); |
8e2d649d | 3810 | } |
628d0da7 | 3811 | if(TMath::Abs(fMCparticleGMother->GetPdgCode())==221){ |
3812 | Double_t x=gmPt; | |
3813 | weight=CalculateWeight(221, x); | |
3814 | } | |
1dd85087 | 3815 | |
8e2d649d | 3816 | |
3817 | ||
3818 | ||
3819 | ||
3820 | //check this | |
3821 | if(fNonHFE->IsULS()) gmweight1=(fNonHFE->GetNULS())/weight; | |
3822 | if(fNonHFE->IsLS()) gmweight2=(fNonHFE->GetNLS())/weight; | |
3823 | ||
3824 | //fill histos | |
3825 | if(fNonHFE->IsULS())fPtElec_ULS_weight->Fill(fPtE, gmweight1); | |
3826 | if(fNonHFE->IsLS())fPtElec_LS_weight->Fill(fPtE, gmweight2); | |
3827 | } | |
3828 | else{ | |
3829 | if(fNonHFE->IsULS()) fPtElec_ULS_weight->Fill(fPtE,fNonHFE->GetNULS()); | |
3830 | if(fNonHFE->IsLS()) fPtElec_LS_weight->Fill(fPtE,fNonHFE->GetNLS()); | |
67eb14b9 | 3831 | } |
2235208e | 3832 | |
67eb14b9 | 3833 | |
8e2d649d | 3834 | }//!IsTPConly |
3835 | ||
3836 | if(IsTPConly){ | |
3837 | if(fNonHFE->IsULS()) fPtElec_ULS2->Fill(fPtE,fNonHFE->GetNULS()); | |
3838 | if(fNonHFE->IsLS()) fPtElec_LS2->Fill(fPtE,fNonHFE->GetNLS()); | |
67eb14b9 | 3839 | |
8e2d649d | 3840 | //new 08 October //weighted histograms |
3841 | if(TMath::Abs(fMCparticleMother->GetPdgCode())==111 || TMath::Abs(fMCparticleMother->GetPdgCode())==221){ | |
3842 | Double_t mPt=fMCparticleMother->Pt(); | |
3843 | ||
1dd85087 | 3844 | Double_t mweight1=1; |
3845 | Double_t mweight2=1; | |
8e2d649d | 3846 | //Double_t weight=1; |
3847 | ||
8e2d649d | 3848 | |
8e2d649d | 3849 | //---------------------------------------------------------------------------- |
3850 | ||
628d0da7 | 3851 | //correction based on data for d3 |
1dd85087 | 3852 | |
8e2d649d | 3853 | if(TMath::Abs(fMCparticleMother->GetPdgCode())==111){ |
3854 | Double_t x=mPt; | |
1dd85087 | 3855 | weight=CalculateWeight(111, x); |
3856 | ||
8e2d649d | 3857 | } |
628d0da7 | 3858 | if(TMath::Abs(fMCparticleMother->GetPdgCode())==221){ |
3859 | Double_t x=mPt; | |
3860 | weight=CalculateWeight(221, x); | |
3861 | ||
3862 | } | |
1dd85087 | 3863 | |
8e2d649d | 3864 | |
3865 | //check this | |
3866 | if(fNonHFE->IsULS()) mweight1=(fNonHFE->GetNULS())/weight; | |
3867 | if(fNonHFE->IsLS()) mweight2=(fNonHFE->GetNLS())/weight; | |
3868 | ||
3869 | //fill histos | |
3870 | if(fNonHFE->IsULS())fPtElec_ULS2_weight->Fill(fPtE, mweight1); | |
3871 | if(fNonHFE->IsLS())fPtElec_LS2_weight->Fill(fPtE, mweight2); | |
3872 | } | |
3873 | else if(fMCparticleMother->GetMother()>0 && (TMath::Abs(fMCparticleGMother->GetPdgCode())==111 || TMath::Abs(fMCparticleGMother->GetPdgCode())==221 )){ | |
3874 | Double_t gmPt=fMCparticleGMother->Pt(); | |
3875 | Double_t gmweight1=1; | |
3876 | Double_t gmweight2=1; | |
3877 | //Double_t weight=1; | |
3878 | ||
3879 | ||
1dd85087 | 3880 | //---------------------------------------------------------------------------- |
8e2d649d | 3881 | //correction based on data only for pi0 |
1dd85087 | 3882 | |
8e2d649d | 3883 | if(TMath::Abs(fMCparticleGMother->GetPdgCode())==111){ |
3884 | Double_t x=gmPt; | |
1dd85087 | 3885 | weight=CalculateWeight(111, x); |
628d0da7 | 3886 | } |
3887 | ||
3888 | ||
3889 | if(TMath::Abs(fMCparticleGMother->GetPdgCode())==221){ | |
3890 | Double_t x=gmPt; | |
3891 | weight=CalculateWeight(221, x); | |
8e2d649d | 3892 | } |
1dd85087 | 3893 | |
8e2d649d | 3894 | //---------------------------------------------------------------------------- |
3895 | ||
3896 | ||
3897 | ||
3898 | //check this | |
3899 | if(fNonHFE->IsULS()) gmweight1=(fNonHFE->GetNULS())/weight; | |
3900 | if(fNonHFE->IsLS()) gmweight2=(fNonHFE->GetNLS())/weight; | |
3901 | ||
3902 | //fill histos | |
3903 | if(fNonHFE->IsULS())fPtElec_ULS2_weight->Fill(fPtE, gmweight1); | |
3904 | if(fNonHFE->IsLS())fPtElec_LS2_weight->Fill(fPtE, gmweight2); | |
3905 | } | |
3906 | else{ | |
3907 | if(fNonHFE->IsULS()) fPtElec_ULS2_weight->Fill(fPtE,fNonHFE->GetNULS()); | |
3908 | if(fNonHFE->IsLS()) fPtElec_LS2_weight->Fill(fPtE,fNonHFE->GetNLS()); | |
67eb14b9 | 3909 | } |
67eb14b9 | 3910 | |
1dd85087 | 3911 | |
3912 | //---------------------------------------------------------------------------- | |
3913 | //to check other way to calculate efficiency | |
3914 | //ULS with no weight from ULS-LS original | |
3915 | //we have to know if track2 comes from same mother!!! | |
3916 | //---------------------------------------------------------------------------- | |
8e2d649d | 3917 | if(fNonHFE->IsULS()){ |
3918 | ||
3919 | for(Int_t iTracks = 0; iTracks < fVevent->GetNumberOfTracks(); iTracks++) | |
3920 | { | |
3921 | ||
3922 | AliVParticle* Vtrack2 = fVevent->GetTrack(iTracks); | |
3923 | if (!Vtrack2) | |
3924 | { | |
3925 | printf("ERROR: Could not receive track %d\n", iTracks); | |
3926 | continue; | |
3927 | } | |
3928 | AliVTrack *track2 = dynamic_cast<AliVTrack*>(Vtrack2); | |
3929 | if(track2->GetLabel()<0) continue; | |
3930 | fMCparticle2 = (AliAODMCParticle*) fMCarray->At(track2->GetLabel()); | |
3931 | if(fMCparticle2->GetMother()<0) continue; | |
3932 | ||
3933 | for(Int_t i = 0; i < fNonHFE->GetNULS(); i++) | |
3934 | { | |
3935 | if(fUlsPartner[i]==iTracks){ | |
3936 | //only fill if it has same mother | |
1dd85087 | 3937 | //with weight to take into account the number of partners |
3938 | if(fMCparticle2->GetMother()==fMCparticle->GetMother()) fPtElec_ULS_MC->Fill(fPtE, fNonHFE->GetNULS()); | |
8e2d649d | 3939 | |
3940 | //----------------------------------------------------------------------------------------------------------- | |
3941 | //weight for mother | |
1dd85087 | 3942 | //Double_t weight2=1; |
8e2d649d | 3943 | Double_t mPt=fMCparticleMother->Pt(); |
3944 | ||
3945 | ||
3946 | if(TMath::Abs(fMCparticleMother->GetPdgCode())==111){ | |
3947 | Double_t x=mPt; | |
1dd85087 | 3948 | weight=CalculateWeight(111, x); |
3949 | ||
8e2d649d | 3950 | |
628d0da7 | 3951 | } |
3952 | if(TMath::Abs(fMCparticleMother->GetPdgCode())==221){ | |
3953 | Double_t x=mPt; | |
3954 | weight=CalculateWeight(221, x); | |
3955 | ||
3956 | ||
8e2d649d | 3957 | } |
1dd85087 | 3958 | |
3959 | //weight for grandmother | |
628d0da7 | 3960 | |
3961 | if((fMCparticleMother->GetMother()>0) && TMath::Abs(((fMCparticleGMother->GetPdgCode())==111))){ | |
3962 | Double_t gmPt=fMCparticleGMother->Pt(); | |
8e2d649d | 3963 | Double_t x=gmPt; |
1dd85087 | 3964 | weight=CalculateWeight(111, x); |
3965 | ||
8e2d649d | 3966 | } |
628d0da7 | 3967 | if((fMCparticleMother->GetMother()>0) && TMath::Abs(((fMCparticleGMother->GetPdgCode())==221))){ |
3968 | Double_t gmPt=fMCparticleGMother->Pt(); | |
3969 | Double_t x=gmPt; | |
3970 | weight=CalculateWeight(221, x); | |
3971 | ||
3972 | } | |
8e2d649d | 3973 | |
8e2d649d | 3974 | |
1dd85087 | 3975 | if(fMCparticle2->GetMother()==fMCparticle->GetMother()) fPtElec_ULS_MC_weight->Fill(fPtE, (fNonHFE->GetNULS())*1./weight); |
3976 | ||
3977 | //----------------------------------------------------------------------------------------------------------- | |
3978 | //end of weight | |
8e2d649d | 3979 | |
3980 | }//partner found same as track | |
3981 | }//loop in all partner | |
3982 | ||
3983 | }//track | |
3984 | }//is ULS | |
1dd85087 | 3985 | //---------------------------------------------------------------------------- |
3986 | //end of part to check other way to calculate efficiency | |
3987 | //---------------------------------------------------------------------------- | |
2c8e1f6c | 3988 | |
8e2d649d | 3989 | }//IsTPConly |
2c8e1f6c | 3990 | |
8e2d649d | 3991 | }//particle kind |
2235208e | 3992 | |
8e2d649d | 3993 | if(IsTPConly){ |
3994 | //ULS-LS with no pid AOD | |
3995 | if(fNonHFE->IsULS()) fPtElec_ULS_NoPid->Fill(fPtE,fNonHFE->GetNULS()); | |
3996 | if(fNonHFE->IsLS()) fPtElec_LS_NoPid->Fill(fPtE,fNonHFE->GetNLS()); | |
9a4682da | 3997 | } |
3998 | ||
8e2d649d | 3999 | }//close IsAOD |
4000 | //It is ESD | |
4001 | else | |
4002 | { | |
4003 | if(TMath::Abs(fMCtrack->GetPdgCode())==11 && (TMath::Abs(fMCtrackMother->GetPdgCode())==22 || TMath::Abs(fMCtrackMother->GetPdgCode())==111 || TMath::Abs(fMCtrackMother->GetPdgCode())==221)) | |
4004 | { | |
4005 | if(!IsTPConly){ | |
4006 | if(fNonHFE->IsULS()) fPtElec_ULS->Fill(fPtE,fNonHFE->GetNULS()); | |
4007 | if(fNonHFE->IsLS()) fPtElec_LS->Fill(fPtE,fNonHFE->GetNLS()); | |
4008 | } | |
4009 | ||
4010 | if(IsTPConly){ | |
4011 | if(fNonHFE->IsULS()) fPtElec_ULS2->Fill(fPtE,fNonHFE->GetNULS()); | |
4012 | if(fNonHFE->IsLS()) fPtElec_LS2->Fill(fPtE,fNonHFE->GetNLS()); | |
4013 | } | |
9a4682da | 4014 | } |
8e2d649d | 4015 | |
4016 | ||
4017 | } | |
4018 | }//close IsMC | |
4019 | ///_________________________________________________________________ | |
4020 | //not MC | |
4021 | else | |
4022 | { | |
4023 | if(!IsTPConly){ | |
4024 | if(fNonHFE->IsULS()) fPtElec_ULS->Fill(fPtE,fNonHFE->GetNULS()); | |
4025 | if(fNonHFE->IsLS()) fPtElec_LS->Fill(fPtE,fNonHFE->GetNLS()); | |
4026 | } | |
4027 | ||
4028 | if(IsTPConly){ | |
4029 | if(fNonHFE->IsULS()) fPtElec_ULS2->Fill(fPtE,fNonHFE->GetNULS()); | |
4030 | if(fNonHFE->IsLS()) fPtElec_LS2->Fill(fPtE,fNonHFE->GetNLS()); | |
a89620c8 | 4031 | } |
9a4682da | 4032 | } |
4033 | ||
3db2410d | 4034 | //for MC closure test |
4035 | // to be used as data, with MC input | |
4036 | if(!IsTPConly){ | |
4037 | if(fNonHFE->IsULS()) fPtElec_ULS_mc_closure->Fill(fPtE,fNonHFE->GetNULS()); | |
4038 | if(fNonHFE->IsLS()) fPtElec_LS_mc_closure->Fill(fPtE,fNonHFE->GetNLS()); | |
4039 | } | |
4040 | ||
4041 | if(IsTPConly){ | |
4042 | if(fNonHFE->IsULS()) fPtElec_ULS2_mc_closure->Fill(fPtE,fNonHFE->GetNULS()); | |
4043 | if(fNonHFE->IsLS()) fPtElec_LS2_mc_closure->Fill(fPtE,fNonHFE->GetNLS()); | |
4044 | } | |
4045 | ||
8e2d649d | 4046 | |
4047 | ||
4048 | }//end of Background function | |
a89620c8 | 4049 | |
9a1f999b | 4050 | //______________________________________________________________________ |
c852fdae | 4051 | void AliAnalysisTaskEMCalHFEpA::ElectronHadronCorrelation(AliVTrack *track, Int_t trackIndex, AliVParticle *vtrack) |
4052 | { | |
a89620c8 | 4053 | |
8e2d649d | 4054 | ///_________________________________________________________________ |
4055 | ///MC analysis | |
c852fdae | 4056 | if(fIsMC) |
4057 | { | |
9a1f999b | 4058 | if(track->GetLabel() < 0) |
c852fdae | 4059 | { |
9a1f999b | 4060 | AliWarning(Form("The track %d does not have a valid MC label",trackIndex)); |
4061 | return; | |
c852fdae | 4062 | } |
9a1f999b | 4063 | |
c852fdae | 4064 | if(fIsAOD) |
4065 | { | |
4066 | fMCparticle = (AliAODMCParticle*) fMCarray->At(track->GetLabel()); | |
4067 | ||
4068 | if(fMCparticle->GetMother()<0) return; | |
4069 | ||
4070 | fMCparticleMother = (AliAODMCParticle*) fMCarray->At(fMCparticle->GetMother()); | |
4071 | ||
4072 | if(TMath::Abs(fMCparticle->GetPdgCode())==11 && (TMath::Abs(fMCparticleMother->GetPdgCode())==22 || TMath::Abs(fMCparticleMother->GetPdgCode())==111 || TMath::Abs(fMCparticleMother->GetPdgCode())==221)) | |
4073 | { | |
9a1f999b | 4074 | //Is Background |
c852fdae | 4075 | fPtBackgroundBeforeReco->Fill(track->Pt()); |
4076 | } | |
4077 | } | |
4078 | else | |
4079 | { | |
4080 | fMCtrack = fMCstack->Particle(track->GetLabel()); | |
4081 | ||
4082 | if(fMCtrack->GetFirstMother()<0) return; | |
4083 | ||
4084 | fMCtrackMother = fMCstack->Particle(fMCtrack->GetFirstMother()); | |
4085 | ||
4086 | if(TMath::Abs(fMCtrack->GetPdgCode())==11 && (TMath::Abs(fMCtrackMother->GetPdgCode())==22 || TMath::Abs(fMCtrackMother->GetPdgCode())==111 || TMath::Abs(fMCtrackMother->GetPdgCode())==221)) | |
4087 | { | |
9a1f999b | 4088 | //Is Background |
c852fdae | 4089 | fPtBackgroundBeforeReco->Fill(track->Pt()); |
4090 | } | |
4091 | } | |
4092 | } | |
9a1f999b | 4093 | ///_________________________________________________________________ |
c852fdae | 4094 | |
9a1f999b | 4095 | //________________________________________________ |
4096 | //Associated particle cut | |
c852fdae | 4097 | fPartnerCuts->SetAcceptKinkDaughters(kFALSE); |
4098 | fPartnerCuts->SetRequireITSRefit(kTRUE); | |
4099 | fPartnerCuts->SetRequireTPCRefit(kTRUE); | |
4100 | fPartnerCuts->SetEtaRange(-0.9,0.9); | |
4101 | fPartnerCuts->SetMaxChi2PerClusterTPC(4.0); | |
4102 | fPartnerCuts->SetMinNClustersTPC(80); | |
4103 | fPartnerCuts->SetPtRange(0.3,1e10); | |
9a1f999b | 4104 | //fPartnerCuts->SetRequireSigmaToVertex(kTRUE); |
4105 | //fPartnerCuts->SetMaxDCAToVertexXY(1); | |
4106 | //fPartnerCuts->SetMaxDCAToVertexZ(3); | |
4107 | //_________________________________________________ | |
c852fdae | 4108 | |
9a1f999b | 4109 | ///################################################################# |
4110 | //Non-HFE reconstruction | |
c852fdae | 4111 | fNonHFE = new AliSelectNonHFE(); |
4112 | fNonHFE->SetAODanalysis(fIsAOD); | |
4113 | if(fMassCutFlag) fNonHFE->SetInvariantMassCut(fMassCut); | |
4114 | if(fAngleCutFlag) fNonHFE->SetOpeningAngleCut(fAngleCut); | |
4115 | if(fChi2CutFlag) fNonHFE->SetChi2OverNDFCut(fChi2Cut); | |
4116 | if(fDCAcutFlag) fNonHFE->SetDCACut(fDCAcut); | |
4117 | fNonHFE->SetAlgorithm("DCA"); //KF | |
4118 | fNonHFE->SetPIDresponse(fPidResponse); | |
4119 | fNonHFE->SetTrackCuts(-3.5,3.5,fPartnerCuts); | |
9a1f999b | 4120 | fNonHFE->SetAdditionalCuts(fPtMinAsso,fTpcNclsAsso); |
9a4682da | 4121 | |
c852fdae | 4122 | |
4123 | fNonHFE->SetHistAngleBack(fOpAngleBack); | |
4124 | fNonHFE->SetHistAngle(fOpAngle); | |
4125 | fNonHFE->SetHistDCABack(fDCABack); | |
4126 | fNonHFE->SetHistDCA(fDCA); | |
4127 | fNonHFE->SetHistMassBack(fInvMassBack); | |
4128 | fNonHFE->SetHistMass(fInvMass); | |
4129 | ||
4130 | fNonHFE->FindNonHFE(trackIndex,vtrack,fVevent); | |
4131 | ||
4132 | Int_t *fUlsPartner = fNonHFE->GetPartnersULS(); | |
4133 | Int_t *fLsPartner = fNonHFE->GetPartnersLS(); | |
4134 | Bool_t fUlsIsPartner = kFALSE; | |
4135 | Bool_t fLsIsPartner = kFALSE; | |
9a1f999b | 4136 | ///################################################################# |
c852fdae | 4137 | |
a89620c8 | 4138 | |
9a1f999b | 4139 | //Electron Information |
c852fdae | 4140 | Double_t fPhiE = -999; |
4141 | Double_t fEtaE = -999; | |
4142 | Double_t fPhiH = -999; | |
4143 | Double_t fEtaH = -999; | |
4144 | Double_t fDphi = -999; | |
4145 | Double_t fDeta = -999; | |
4146 | Double_t fPtE = -999; | |
4147 | Double_t fPtH = -999; | |
4148 | ||
4149 | Double_t pi = TMath::Pi(); | |
4150 | ||
4151 | fPhiE = track->Phi(); | |
4152 | fEtaE = track->Eta(); | |
4153 | fPtE = track->Pt(); | |
4154 | ||
a89620c8 | 4155 | |
9a1f999b | 4156 | ///_________________________________________________________________ |
4157 | ///MC analysis | |
c852fdae | 4158 | if(fIsMC) |
4159 | { | |
4160 | if(fIsAOD) | |
4161 | { | |
4162 | if(TMath::Abs(fMCparticle->GetPdgCode())==11 && (TMath::Abs(fMCparticleMother->GetPdgCode())==22 || TMath::Abs(fMCparticleMother->GetPdgCode())==111 || TMath::Abs(fMCparticleMother->GetPdgCode())==221)) | |
4163 | { | |
4164 | if(fNonHFE->IsULS()) fPtElec_ULS->Fill(fPtE,fNonHFE->GetNULS()); | |
4165 | if(fNonHFE->IsLS()) fPtElec_LS->Fill(fPtE,fNonHFE->GetNLS()); | |
8e2d649d | 4166 | |
4167 | ||
c852fdae | 4168 | } |
8e2d649d | 4169 | |
4170 | if(fNonHFE->IsULS()) fPtElec_ULS_NoPid->Fill(fPtE,fNonHFE->GetNULS()); | |
4171 | if(fNonHFE->IsLS()) fPtElec_LS_NoPid->Fill(fPtE,fNonHFE->GetNLS()); | |
c852fdae | 4172 | } |
4173 | else | |
4174 | { | |
4175 | if(TMath::Abs(fMCtrack->GetPdgCode())==11 && (TMath::Abs(fMCtrackMother->GetPdgCode())==22 || TMath::Abs(fMCtrackMother->GetPdgCode())==111 || TMath::Abs(fMCtrackMother->GetPdgCode())==221)) | |
4176 | { | |
4177 | if(fNonHFE->IsULS()) fPtElec_ULS->Fill(fPtE,fNonHFE->GetNULS()); | |
4178 | if(fNonHFE->IsLS()) fPtElec_LS->Fill(fPtE,fNonHFE->GetNLS()); | |
8e2d649d | 4179 | |
c852fdae | 4180 | } |
8e2d649d | 4181 | |
4182 | ||
c852fdae | 4183 | } |
4184 | } | |
9a1f999b | 4185 | ///_________________________________________________________________ |
c852fdae | 4186 | else |
4187 | { | |
4188 | if(fNonHFE->IsULS()) fPtElec_ULS->Fill(fPtE,fNonHFE->GetNULS()); | |
4189 | if(fNonHFE->IsLS()) fPtElec_LS->Fill(fPtE,fNonHFE->GetNLS()); | |
4190 | } | |
a89620c8 | 4191 | |
4192 | ||
4193 | ||
9a1f999b | 4194 | |
4195 | //__________________________________________________________________ | |
4196 | //Event Mixing Analysis - Hadron Loop | |
4197 | //Retrieve | |
c852fdae | 4198 | if(fEventMixingFlag) |
4199 | { | |
4200 | fPool = fPoolMgr->GetEventPool(fCentrality->GetCentralityPercentile("V0A"), fZvtx); // Get the buffer associated with the current centrality and z-vtx | |
4201 | ||
4202 | if(!fPool) AliFatal(Form("No pool found for centrality = %f, zVtx = %f",fCentrality->GetCentralityPercentile("V0A"), fZvtx)); | |
4203 | ||
4204 | if(fPool->GetCurrentNEvents() >= 5) // start mixing when 5 events are in the buffer | |
4205 | { | |
4206 | fPoolNevents->Fill(fPool->GetCurrentNEvents()); | |
4207 | ||
4208 | for (Int_t jMix = 0; jMix < fPool->GetCurrentNEvents(); jMix++) // mix with each event in the buffer | |
4209 | { | |
4210 | TObjArray* bgTracks = fPool->GetEvent(jMix); | |
4211 | ||
4212 | for (Int_t kMix = 0; kMix < bgTracks->GetEntriesFast(); kMix++) // mix with each track in the event | |
4213 | { | |
4214 | const AliEHCParticle* MixedTrack(dynamic_cast<AliEHCParticle*>(bgTracks->At(kMix))); | |
4215 | if (NULL == MixedTrack) continue; | |
4216 | ||
4217 | fPhiH = MixedTrack->Phi(); | |
4218 | fEtaH = MixedTrack->Eta(); | |
4219 | fPtH = MixedTrack->Pt(); | |
4220 | ||
0131ce6c | 4221 | if(fPtH<fAssHadronPtMin || fPtH>fAssHadronPtMax) continue; |
9a1f999b | 4222 | |
c852fdae | 4223 | fDphi = fPhiE - fPhiH; |
9a1f999b | 4224 | |
c852fdae | 4225 | if (fDphi > 3*pi/2) fDphi = fDphi - 2*pi; |
4226 | if (fDphi < -pi/2) fDphi = fDphi + 2*pi; | |
9a1f999b | 4227 | |
c852fdae | 4228 | fDeta = fEtaE - fEtaH; |
9a1f999b | 4229 | |
2c8e1f6c | 4230 | Double_t fPtBin[7] = {1,2,4,6,8,10,15}; |
c852fdae | 4231 | |
2c8e1f6c | 4232 | for(Int_t i = 0; i < 6; i++) |
c852fdae | 4233 | { |
4234 | if(fPtE>=fPtBin[i] && fPtE<fPtBin[i+1]) | |
4235 | { | |
4236 | fCEtaPhi_Inc_EM[i]->Fill(fDphi,fDeta); | |
4237 | ||
4238 | if(fNonHFE->IsULS()) fCEtaPhi_ULS_EM[i]->Fill(fDphi,fDeta); | |
4239 | if(fNonHFE->IsLS()) fCEtaPhi_LS_EM[i]->Fill(fDphi,fDeta); | |
4240 | ||
4241 | if(fNonHFE->IsULS()) fCEtaPhi_ULS_Weight_EM[i]->Fill(fDphi,fDeta,fNonHFE->GetNULS()); | |
4242 | if(fNonHFE->IsLS()) fCEtaPhi_LS_Weight_EM[i]->Fill(fDphi,fDeta,fNonHFE->GetNLS()); | |
4243 | } | |
4244 | } | |
4245 | ||
9a1f999b | 4246 | // TODO your code: do event mixing with current event and bgTracks |
4247 | // note that usually the content filled now is weighted by 1 / pool->GetCurrentNEvents() | |
c852fdae | 4248 | } |
4249 | } | |
4250 | } | |
4251 | } | |
9a1f999b | 4252 | //__________________________________________________________________ |
c852fdae | 4253 | |
9a1f999b | 4254 | //__________________________________________________________________ |
4255 | //Same Event Analysis - Hadron Loop | |
c852fdae | 4256 | for(Int_t iTracks = 0; iTracks < fVevent->GetNumberOfTracks(); iTracks++) |
4257 | { | |
4258 | if(trackIndex==iTracks) continue; | |
4259 | ||
4260 | AliVParticle* Vtrack2 = fVevent->GetTrack(iTracks); | |
4261 | if (!Vtrack2) | |
4262 | { | |
4263 | printf("ERROR: Could not receive track %d\n", iTracks); | |
4264 | continue; | |
4265 | } | |
9a1f999b | 4266 | |
c852fdae | 4267 | AliVTrack *track2 = dynamic_cast<AliVTrack*>(Vtrack2); |
4268 | ||
0131ce6c | 4269 | if(track2->Eta()<fEtaCutMin || track2->Eta()>fEtaCutMax ) continue; |
4270 | ||
9a1f999b | 4271 | if(fIsAOD) |
4272 | { | |
c852fdae | 4273 | AliAODTrack *atrack2 = dynamic_cast<AliAODTrack*>(Vtrack2); |
4274 | if(!atrack2->TestFilterMask(AliAODTrack::kTrkTPCOnly)) continue; | |
4275 | if((!(atrack2->GetStatus()&AliESDtrack::kITSrefit)|| (!(atrack2->GetStatus()&AliESDtrack::kTPCrefit)))) continue; | |
4276 | if(atrack2->GetTPCNcls() < 80) continue; | |
2c8e1f6c | 4277 | if(fAssocWithSPD && ((!(atrack2->HasPointOnITSLayer(0))) && (!(atrack2->HasPointOnITSLayer(1))))) continue; |
c852fdae | 4278 | } |
4279 | else | |
4280 | { | |
4281 | AliESDtrack *etrack2 = dynamic_cast<AliESDtrack*>(Vtrack2); | |
4282 | if(!fPartnerCuts->AcceptTrack(etrack2)) continue; | |
4283 | } | |
4284 | ||
4285 | fPhiH = track2->Phi(); | |
4286 | fEtaH = track2->Eta(); | |
4287 | fPtH = track2->Pt(); | |
4288 | ||
0131ce6c | 4289 | if(fPtH<fAssHadronPtMin || fPtH>fAssHadronPtMax) continue; |
c852fdae | 4290 | |
4291 | fDphi = fPhiE - fPhiH; | |
9a1f999b | 4292 | |
c852fdae | 4293 | if (fDphi > 3*pi/2) fDphi = fDphi - 2*pi; |
4294 | if (fDphi < -pi/2) fDphi = fDphi + 2*pi; | |
9a1f999b | 4295 | |
c852fdae | 4296 | fDeta = fEtaE - fEtaH; |
9a1f999b | 4297 | |
2c8e1f6c | 4298 | Double_t fPtBin[7] = {1,2,4,6,8,10,15}; |
c852fdae | 4299 | |
8e2d649d | 4300 | //______________________________________________________________ |
4301 | //Check if this track is a Non-HFE partner | |
cc380d0d | 4302 | fUlsIsPartner = kFALSE; |
4303 | fLsIsPartner = kFALSE; | |
9a1f999b | 4304 | for(Int_t i = 0; i < fNonHFE->GetNULS(); i++) |
4305 | { | |
4306 | if(fUlsPartner[i]==iTracks) fUlsIsPartner=kTRUE; | |
4307 | } | |
4308 | for(Int_t i = 0; i < fNonHFE->GetNLS(); i++) | |
4309 | { | |
4310 | if(fLsPartner[i]==iTracks) fLsIsPartner=kTRUE; | |
4311 | } | |
8e2d649d | 4312 | //______________________________________________________________ |
c852fdae | 4313 | |
2c8e1f6c | 4314 | for(Int_t i = 0; i < 6; i++) |
9a1f999b | 4315 | { |
c852fdae | 4316 | if(fPtE>=fPtBin[i] && fPtE<fPtBin[i+1]) |
4317 | { | |
4318 | fCEtaPhi_Inc[i]->Fill(fDphi,fDeta); | |
4319 | ||
4320 | if(fNonHFE->IsULS()) fCEtaPhi_ULS[i]->Fill(fDphi,fDeta); | |
4321 | if(fNonHFE->IsLS()) fCEtaPhi_LS[i]->Fill(fDphi,fDeta); | |
4322 | if(fNonHFE->IsULS() && !fUlsIsPartner) fCEtaPhi_ULS_NoP[i]->Fill(fDphi,fDeta); | |
4323 | if(fNonHFE->IsLS() && !fLsIsPartner) fCEtaPhi_LS_NoP[i]->Fill(fDphi,fDeta); | |
4324 | ||
4325 | if(fNonHFE->IsULS()) fCEtaPhi_ULS_Weight[i]->Fill(fDphi,fDeta,fNonHFE->GetNULS()); | |
4326 | if(fNonHFE->IsLS()) fCEtaPhi_LS_Weight[i]->Fill(fDphi,fDeta,fNonHFE->GetNLS()); | |
4327 | if(fNonHFE->IsULS() && !fUlsIsPartner) fCEtaPhi_ULS_NoP_Weight[i]->Fill(fDphi,fDeta,fNonHFE->GetNULS()); | |
4328 | if(fNonHFE->IsLS() && !fLsIsPartner) fCEtaPhi_LS_NoP_Weight[i]->Fill(fDphi,fDeta,fNonHFE->GetNLS()); | |
4329 | } | |
9a1f999b | 4330 | } |
c852fdae | 4331 | } |
4332 | } | |
4333 | ||
9a1f999b | 4334 | //____________________________________________________________________________________________________________ |
4335 | //Create a TObjArray with selected hadrons, for the mixed event analysis | |
c852fdae | 4336 | TObjArray* AliAnalysisTaskEMCalHFEpA::SelectedHadrons() |
4337 | { | |
4338 | fTracksClone = new TObjArray; | |
4339 | fTracksClone->SetOwner(kTRUE); | |
4340 | ||
4341 | for(Int_t iTracks = 0; iTracks < fVevent->GetNumberOfTracks(); iTracks++) | |
4342 | { | |
4343 | AliVParticle* Vtrack2 = fVevent->GetTrack(iTracks); | |
4344 | if (!Vtrack2) | |
4345 | { | |
4346 | printf("ERROR: Could not receive track %d\n", iTracks); | |
4347 | continue; | |
4348 | } | |
9a1f999b | 4349 | |
c852fdae | 4350 | AliVTrack *track2 = dynamic_cast<AliVTrack*>(Vtrack2); |
4351 | ||
0131ce6c | 4352 | if(track2->Eta()<fEtaCutMin || track2->Eta()>fEtaCutMax ) continue; |
4353 | ||
9a1f999b | 4354 | if(fIsAOD) |
4355 | { | |
c852fdae | 4356 | AliAODTrack *atrack2 = dynamic_cast<AliAODTrack*>(Vtrack2); |
4357 | if(!atrack2->TestFilterMask(AliAODTrack::kTrkTPCOnly)) continue; | |
4358 | if((!(atrack2->GetStatus()&AliESDtrack::kITSrefit)|| (!(atrack2->GetStatus()&AliESDtrack::kTPCrefit)))) continue; | |
4359 | if(atrack2->GetTPCNcls() < 80) continue; | |
2c8e1f6c | 4360 | if(fAssocWithSPD && ((!(atrack2->HasPointOnITSLayer(0))) && (!(atrack2->HasPointOnITSLayer(1))))) continue; |
c852fdae | 4361 | } |
4362 | else | |
4363 | { | |
4364 | AliESDtrack *etrack2 = dynamic_cast<AliESDtrack*>(Vtrack2); | |
4365 | if(!fPartnerCuts->AcceptTrack(etrack2)) continue; | |
4366 | } | |
9a1f999b | 4367 | |
c852fdae | 4368 | fTracksClone->Add(new AliEHCParticle(track2->Eta(), track2->Phi(), track2->Pt())); |
4369 | } | |
4370 | return fTracksClone; | |
4371 | } | |
9a1f999b | 4372 | //____________________________________________________________________________________________________________ |
c852fdae | 4373 | |
9a1f999b | 4374 | //______________________________________________________________________ |
c852fdae | 4375 | void AliAnalysisTaskEMCalHFEpA::DiHadronCorrelation(AliVTrack *track, Int_t trackIndex) |
4376 | { | |
9a1f999b | 4377 | //________________________________________________ |
4378 | //Associated particle cut | |
c852fdae | 4379 | fPartnerCuts->SetAcceptKinkDaughters(kFALSE); |
4380 | fPartnerCuts->SetRequireITSRefit(kTRUE); | |
4381 | fPartnerCuts->SetRequireTPCRefit(kTRUE); | |
4382 | fPartnerCuts->SetEtaRange(-0.9,0.9); | |
4383 | fPartnerCuts->SetMaxChi2PerClusterTPC(4.0); | |
4384 | fPartnerCuts->SetMinNClustersTPC(80); | |
4385 | fPartnerCuts->SetPtRange(0.3,1e10); | |
9a1f999b | 4386 | //fPartnerCuts->SetRequireSigmaToVertex(kTRUE); |
4387 | //fPartnerCuts->SetMaxDCAToVertexXY(1); | |
4388 | //fPartnerCuts->SetMaxDCAToVertexZ(3); | |
4389 | //_________________________________________________ | |
c852fdae | 4390 | |
9a1f999b | 4391 | //Electron Information |
c852fdae | 4392 | Double_t fPhiE = -999; |
4393 | Double_t fEtaE = -999; | |
4394 | Double_t fPhiH = -999; | |
4395 | Double_t fEtaH = -999; | |
4396 | Double_t fDphi = -999; | |
4397 | Double_t fDeta = -999; | |
4398 | Double_t fPtE = -999; | |
4399 | Double_t fPtH = -999; | |
4400 | ||
4401 | Double_t pi = TMath::Pi(); | |
4402 | ||
4403 | fPhiE = track->Phi(); | |
4404 | fEtaE = track->Eta(); | |
4405 | fPtE = track->Pt(); | |
4406 | ||
9a1f999b | 4407 | //__________________________________________________________________ |
4408 | //Same Event Analysis - Hadron Loop | |
c852fdae | 4409 | for(Int_t iTracks = 0; iTracks < fVevent->GetNumberOfTracks(); iTracks++) |
4410 | { | |
4411 | if(trackIndex==iTracks) continue; | |
4412 | ||
4413 | AliVParticle* Vtrack2 = fVevent->GetTrack(iTracks); | |
4414 | if (!Vtrack2) | |
4415 | { | |
4416 | printf("ERROR: Could not receive track %d\n", iTracks); | |
4417 | continue; | |
4418 | } | |
9a1f999b | 4419 | |
c852fdae | 4420 | AliVTrack *track2 = dynamic_cast<AliVTrack*>(Vtrack2); |
0131ce6c | 4421 | if(track2->Eta()<fEtaCutMin || track2->Eta()>fEtaCutMax ) continue; |
c852fdae | 4422 | |
9a1f999b | 4423 | if(fIsAOD) |
4424 | { | |
c852fdae | 4425 | AliAODTrack *atrack2 = dynamic_cast<AliAODTrack*>(Vtrack2); |
4426 | if(!atrack2->TestFilterMask(AliAODTrack::kTrkTPCOnly)) continue; | |
4427 | if((!(atrack2->GetStatus()&AliESDtrack::kITSrefit)|| (!(atrack2->GetStatus()&AliESDtrack::kTPCrefit)))) continue; | |
4428 | if(atrack2->GetTPCNcls() < 80) continue; | |
2c8e1f6c | 4429 | if(fAssocWithSPD && ((!(atrack2->HasPointOnITSLayer(0))) && (!(atrack2->HasPointOnITSLayer(1))))) continue; |
c852fdae | 4430 | } |
4431 | else | |
4432 | { | |
4433 | AliESDtrack *etrack2 = dynamic_cast<AliESDtrack*>(Vtrack2); | |
4434 | if(!fPartnerCuts->AcceptTrack(etrack2)) continue; | |
4435 | } | |
4436 | ||
4437 | fPhiH = track2->Phi(); | |
4438 | fEtaH = track2->Eta(); | |
4439 | fPtH = track2->Pt(); | |
4440 | ||
0131ce6c | 4441 | if(fPtH<fAssHadronPtMin || fPtH>fAssHadronPtMax) continue; |
c852fdae | 4442 | |
4443 | fDphi = fPhiE - fPhiH; | |
9a1f999b | 4444 | |
c852fdae | 4445 | if (fDphi > 3*pi/2) fDphi = fDphi - 2*pi; |
4446 | if (fDphi < -pi/2) fDphi = fDphi + 2*pi; | |
9a1f999b | 4447 | |
c852fdae | 4448 | fDeta = fEtaE - fEtaH; |
9a1f999b | 4449 | |
2c8e1f6c | 4450 | Double_t fPtBin[7] = {1,2,4,6,8,10,15}; |
c852fdae | 4451 | |
2c8e1f6c | 4452 | for(Int_t i = 0; i < 6; i++) |
9a1f999b | 4453 | { |
c852fdae | 4454 | if(fPtE>=fPtBin[i] && fPtE<fPtBin[i+1]) |
4455 | { | |
4456 | fCEtaPhi_Inc_DiHadron[i]->Fill(fDphi,fDeta); | |
4457 | } | |
9a1f999b | 4458 | } |
c852fdae | 4459 | } |
4460 | } | |
9a1f999b | 4461 | //____________________________________________________________________________________________________________ |
c852fdae | 4462 | |
9a1f999b | 4463 | //______________________________________________________________________ |
c852fdae | 4464 | Bool_t AliAnalysisTaskEMCalHFEpA::FindMother(Int_t mcIndex) |
4465 | { | |
4466 | fIsHFE1 = kFALSE; | |
4467 | fIsHFE2 = kFALSE; | |
4468 | fIsNonHFE = kFALSE; | |
4469 | fIsFromD = kFALSE; | |
4470 | fIsFromB = kFALSE; | |
4471 | fIsFromPi0 = kFALSE; | |
4472 | fIsFromEta = kFALSE; | |
4473 | fIsFromGamma = kFALSE; | |
4474 | ||
4475 | if(mcIndex < 0 || !fIsMC) | |
4476 | { | |
4477 | return kFALSE; | |
4478 | } | |
4479 | ||
4480 | Int_t pdg = -99999; | |
4481 | Int_t mpdg = -99999; | |
4482 | Int_t gmpdg = -99999; | |
4483 | Int_t ggmpdg = -99999; | |
4484 | Int_t gggmpdg = -99999; | |
4485 | ||
4486 | if(fIsAOD) | |
4487 | { | |
4488 | fMCparticle = (AliAODMCParticle*) fMCarray->At(mcIndex); | |
9a1f999b | 4489 | |
c852fdae | 4490 | pdg = TMath::Abs(fMCparticle->GetPdgCode()); |
4491 | ||
4492 | ||
4493 | if(pdg!=11) | |
4494 | { | |
4495 | fIsHFE1 = kFALSE; | |
4496 | fIsHFE2 = kFALSE; | |
4497 | fIsNonHFE = kFALSE; | |
4498 | fIsFromD = kFALSE; | |
4499 | fIsFromB = kFALSE; | |
4500 | fIsFromPi0 = kFALSE; | |
4501 | fIsFromEta = kFALSE; | |
4502 | fIsFromGamma = kFALSE; | |
4503 | return kFALSE; | |
4504 | } | |
4505 | ||
4506 | if(fMCparticle->GetMother()<0) | |
4507 | { | |
4508 | fIsHFE1 = kFALSE; | |
4509 | fIsHFE2 = kFALSE; | |
4510 | fIsNonHFE = kFALSE; | |
4511 | fIsFromD = kFALSE; | |
4512 | fIsFromB = kFALSE; | |
4513 | fIsFromPi0 = kFALSE; | |
4514 | fIsFromEta = kFALSE; | |
4515 | fIsFromGamma = kFALSE; | |
4516 | return kFALSE; | |
4517 | } | |
4518 | ||
4519 | fMCparticleMother = (AliAODMCParticle*) fMCarray->At(fMCparticle->GetMother()); | |
4520 | mpdg = TMath::Abs(fMCparticleMother->GetPdgCode()); | |
4521 | ||
4522 | if(fMCparticleMother->GetMother()<0) | |
4523 | { | |
4524 | gmpdg = 0; | |
4525 | ggmpdg = 0; | |
4526 | gggmpdg = 0; | |
4527 | } | |
4528 | else | |
4529 | { | |
4530 | fMCparticleGMother = (AliAODMCParticle*) fMCarray->At(fMCparticleMother->GetMother()); | |
4531 | gmpdg = TMath::Abs(fMCparticleGMother->GetPdgCode()); | |
4532 | if(fMCparticleGMother->GetMother()<0) | |
4533 | { | |
4534 | ggmpdg = 0; | |
4535 | gggmpdg = 0; | |
4536 | } | |
4537 | else | |
4538 | { | |
4539 | fMCparticleGGMother = (AliAODMCParticle*) fMCarray->At(fMCparticleGMother->GetMother()); | |
4540 | ggmpdg = TMath::Abs(fMCparticleGGMother->GetPdgCode()); | |
4541 | if(fMCparticleGGMother->GetMother()<0) | |
4542 | { | |
4543 | gggmpdg = 0; | |
4544 | } | |
4545 | else | |
4546 | { | |
4547 | fMCparticleGGGMother = (AliAODMCParticle*) fMCarray->At(fMCparticleGGMother->GetMother()); | |
4548 | gggmpdg = TMath::Abs(fMCparticleGGGMother->GetPdgCode()); | |
4549 | } | |
4550 | } | |
4551 | } | |
4552 | } | |
4553 | else | |
4554 | { | |
4555 | fMCtrack = fMCstack->Particle(mcIndex); | |
9a1f999b | 4556 | |
c852fdae | 4557 | pdg = TMath::Abs(fMCtrack->GetPdgCode()); |
4558 | ||
4559 | if(pdg!=11) | |
4560 | { | |
4561 | fIsHFE1 = kFALSE; | |
4562 | fIsHFE2 = kFALSE; | |
4563 | fIsNonHFE = kFALSE; | |
4564 | fIsFromD = kFALSE; | |
4565 | fIsFromB = kFALSE; | |
4566 | fIsFromPi0 = kFALSE; | |
4567 | fIsFromEta = kFALSE; | |
4568 | fIsFromGamma = kFALSE; | |
4569 | return kFALSE; | |
4570 | } | |
4571 | ||
4572 | if(fMCtrack->GetFirstMother()<0) | |
4573 | { | |
4574 | fIsHFE1 = kFALSE; | |
4575 | fIsHFE2 = kFALSE; | |
4576 | fIsNonHFE = kFALSE; | |
4577 | fIsFromD = kFALSE; | |
4578 | fIsFromB = kFALSE; | |
4579 | fIsFromPi0 = kFALSE; | |
4580 | fIsFromEta = kFALSE; | |
4581 | fIsFromGamma = kFALSE; | |
4582 | return kFALSE; | |
4583 | } | |
4584 | ||
4585 | fMCtrackMother = fMCstack->Particle(fMCtrack->GetFirstMother()); | |
4586 | mpdg = TMath::Abs(fMCtrackMother->GetPdgCode()); | |
4587 | ||
4588 | if(fMCtrackMother->GetFirstMother()<0) | |
4589 | { | |
4590 | gmpdg = 0; | |
4591 | ggmpdg = 0; | |
4592 | gggmpdg = 0; | |
4593 | } | |
4594 | else | |
4595 | { | |
4596 | fMCtrackGMother = fMCstack->Particle(fMCtrackMother->GetFirstMother()); | |
4597 | gmpdg = TMath::Abs(fMCtrackGMother->GetPdgCode()); | |
4598 | ||
4599 | if(fMCtrackGMother->GetFirstMother()<0) | |
4600 | { | |
4601 | ggmpdg = 0; | |
4602 | gggmpdg = 0; | |
4603 | } | |
4604 | else | |
4605 | { | |
4606 | fMCtrackGGMother = fMCstack->Particle(fMCtrackGMother->GetFirstMother()); | |
4607 | ggmpdg = TMath::Abs(fMCtrackGGMother->GetPdgCode()); | |
9a1f999b | 4608 | |
c852fdae | 4609 | if(fMCtrackGGMother->GetFirstMother()<0) |
4610 | { | |
4611 | gggmpdg = 0; | |
4612 | } | |
4613 | else | |
4614 | { | |
4615 | fMCtrackGGGMother = fMCstack->Particle(fMCtrackGGMother->GetFirstMother()); | |
4616 | gggmpdg = TMath::Abs(fMCtrackGGGMother->GetPdgCode()); | |
4617 | } | |
4618 | } | |
4619 | } | |
4620 | } | |
4621 | ||
4622 | //Tag Electron Source | |
4623 | if(mpdg==111 || mpdg==221 || mpdg==22) | |
4624 | { | |
4625 | fIsHFE1 = kFALSE; | |
4626 | fIsHFE2 = kFALSE; | |
4627 | fIsNonHFE = kTRUE; | |
4628 | fIsFromD = kFALSE; | |
4629 | fIsFromB = kFALSE; | |
4630 | ||
4631 | fIsFromPi0 = kFALSE; | |
4632 | fIsFromEta = kFALSE; | |
4633 | fIsFromGamma = kFALSE; | |
4634 | ||
4635 | if(mpdg==111) fIsFromPi0 = kFALSE; | |
4636 | if(mpdg==221)fIsFromEta = kFALSE; | |
4637 | if(mpdg==22) fIsFromGamma = kFALSE; | |
4638 | ||
4639 | return kTRUE; | |
4640 | } | |
4641 | else | |
4642 | { | |
4643 | fIsHFE1 = kFALSE; | |
4644 | fIsHFE2 = kTRUE; | |
4645 | ||
4646 | fIsFromPi0 = kFALSE; | |
4647 | fIsFromEta = kFALSE; | |
4648 | fIsFromGamma = kFALSE; | |
4649 | ||
4650 | fIsNonHFE = kFALSE; | |
4651 | ||
4652 | fIsFromD = kFALSE; | |
4653 | fIsFromB = kFALSE; | |
4654 | ||
4655 | if(mpdg>400 && mpdg<500) | |
4656 | { | |
4657 | if((gmpdg>500 && gmpdg<600) || (ggmpdg>500 && ggmpdg<600) || (gggmpdg>500 && gggmpdg<600)) | |
4658 | { | |
4659 | fIsHFE1 = kTRUE; | |
4660 | fIsFromD = kFALSE; | |
4661 | fIsFromB = kTRUE; | |
4662 | return kTRUE; | |
4663 | } | |
4664 | else | |
4665 | { | |
4666 | fIsHFE1 = kTRUE; | |
4667 | fIsFromD = kTRUE; | |
4668 | fIsFromB = kFALSE; | |
4669 | return kTRUE; | |
4670 | } | |
4671 | } | |
4672 | else if(mpdg>500 && mpdg<600) | |
4673 | { | |
4674 | fIsHFE1 = kTRUE; | |
4675 | fIsFromD = kFALSE; | |
4676 | fIsFromB = kTRUE; | |
4677 | return kTRUE; | |
4678 | } | |
4679 | else | |
4680 | { | |
4681 | fIsHFE1 = kFALSE; | |
4682 | fIsFromD = kFALSE; | |
4683 | fIsFromB = kFALSE; | |
4684 | return kFALSE; | |
4685 | } | |
4686 | } | |
4687 | } | |
1dd85087 | 4688 | /* |
4689 | Bool_t AliAnalysisTaskEMCalHFEpA::ContainsBadChannel(TString calorimeter,UShort_t* cellList, Int_t nCells) | |
4690 | { | |
4691 | // Check that in the cluster cells, there is no bad channel of those stored | |
4692 | // in fEMCALBadChannelMap | |
4693 | // adapted from AliCalorimeterUtils | |
4694 | ||
4695 | //if (!fRemoveBadChannels) return kFALSE; | |
4696 | //printf("fEMCALBadChannelMap %p, fPHOSBadChannelMap %p \n",fEMCALBadChannelMap,fPHOSBadChannelMap); | |
4697 | if( !fEMCALRecoUtils->GetEMCALChannelStatusMap(0)) return kFALSE; | |
4698 | ||
4699 | //Int_t icol = -1; | |
4700 | //Int_t irow = -1; | |
4701 | //Int_t imod = -1; | |
4702 | for(Int_t iCell = 0; iCell<nCells; iCell++){ | |
4703 | ||
4704 | //Get the column and row | |
4705 | if(calorimeter == "EMCAL"){ | |
4706 | return fEMCALRecoUtils->ClusterContainsBadChannel((AliEMCALGeometry*)fEMCALGeo,cellList,nCells); | |
4707 | } | |
4708 | else return kFALSE; | |
4709 | ||
4710 | }// cell cluster loop | |
4711 | ||
4712 | return kFALSE; | |
4713 | ||
4714 | } | |
4715 | */ | |
4716 | /* | |
4717 | ||
4718 | //________________________________________________________________________________ | |
4719 | TArrayI AliAnalysisTaskEMCalHFEpA::GetTriggerPatches(Bool_t IsEventEMCALL0, Bool_t IsEventEMCALL1) | |
4720 | { | |
4721 | // Select the patches that triggered | |
4722 | // Depend on L0 or L1 | |
4723 | ||
4724 | // some variables | |
4725 | //Int_t trigtimes[30], globCol, globRow,ntimes, i; | |
4726 | Int_t globCol, globRow; | |
4727 | ||
4728 | Int_t absId = -1; //[100]; | |
4729 | Int_t nPatch = 0; | |
4730 | ||
4731 | TArrayI patches(0); | |
4732 | ||
4733 | // get object pointer | |
4734 | AliVCaloTrigger *caloTrigger = InputEvent()->GetCaloTrigger( "EMCAL" ); | |
4735 | ||
4736 | // class is not empty | |
4737 | if( caloTrigger->GetEntries() > 0 ) | |
4738 | { | |
4739 | // must reset before usage, or the class will fail | |
4740 | caloTrigger->Reset(); | |
4741 | ||
4742 | // go throuth the trigger channels | |
4743 | while( caloTrigger->Next() ) | |
4744 | { | |
4745 | // get position in global 2x2 tower coordinates | |
4746 | caloTrigger->GetPosition( globCol, globRow ); | |
4747 | ||
4748 | //L0 | |
4749 | if(IsEventEMCALL0) | |
4750 | { | |
4751 | //not implemented | |
4752 | } | |
4753 | ||
4754 | ||
4755 | else if(IsEventEMCALL1) // L1 | |
4756 | { | |
4757 | Int_t bit = 0; | |
4758 | caloTrigger->GetTriggerBits(bit); | |
4759 | ||
4760 | Bool_t isEGA = ((bit >> fBitEGA) & 0x1); | |
4761 | //Bool_t isEJE = ((bit >> fBitEJE) & 0x1) && IsEventEMCALL1Jet () ; | |
4762 | ||
4763 | if(!isEGA) continue; | |
4764 | ||
4765 | Int_t patchsize = -1; | |
4766 | if(isEGA) patchsize = 2; | |
4767 | //else if (isEJE) patchsize = 16; | |
4768 | ||
4769 | // add 2x2 (EGA) or 16x16 (EJE) patches | |
4770 | for(Int_t irow=0; irow < patchsize; irow++) | |
4771 | { | |
4772 | for(Int_t icol=0; icol < patchsize; icol++) | |
4773 | { | |
4774 | GetCaloUtils()->GetEMCALGeometry()->GetAbsFastORIndexFromPositionInEMCAL(globCol+icol,globRow+irow, absId); | |
4775 | //printf("pass the time cut globCol %d, globRow %d absId %d\n",globCol,globRow, absIDTrig[nTrig]); | |
4776 | patches.Set(nPatch+1); // Set size of this array to nPatch+1 ints. | |
4777 | patches.AddAt(absId,nPatch++); //Add Int_t absId at position nPatch++ | |
4778 | } | |
4779 | } | |
4780 | ||
4781 | } // L1 | |
4782 | ||
4783 | } // trigger iterator | |
4784 | } // go thorough triggers | |
4785 | ||
4786 | printf("N patches %d, test %d,first %d, last %d\n",patches.GetSize(), nPatch, patches.At(0), patches.At(patches.GetSize()-1)); | |
4787 | ||
4788 | return patches; | |
4789 | } | |
4790 | */ | |
4791 | Double_t AliAnalysisTaskEMCalHFEpA::CalculateWeight(Int_t pdg_particle, Double_t x) | |
4792 | { | |
4793 | //weight for d3 based on MinJung parametrization //sent by Jan | |
4794 | Double_t weight=1; | |
4795 | if(pdg_particle==111){ | |
29881f7b | 4796 | if(x>= 0.100000 && x < 0.112797 ) weight=1.262120; |
4797 | if(x>= 0.112797 && x < 0.127231 ) weight=1.277765; | |
4798 | if(x>= 0.127231 && x < 0.143512 ) weight=1.295605; | |
4799 | if(x>= 0.143512 && x < 0.161877 ) weight=1.318155; | |
4800 | if(x>= 0.161877 && x < 0.182592 ) weight=1.348693; | |
4801 | if(x>= 0.182592 && x < 0.205957 ) weight=1.388636; | |
4802 | if(x>= 0.205957 && x < 0.232313 ) weight=1.439122; | |
4803 | if(x>= 0.232313 && x < 0.262041 ) weight=1.497452; | |
4804 | if(x>= 0.262041 && x < 0.295573 ) weight=1.559409; | |
4805 | if(x>= 0.295573 && x < 0.333397 ) weight=1.615169; | |
4806 | if(x>= 0.333397 && x < 0.376060 ) weight=1.654954; | |
4807 | if(x>= 0.376060 && x < 0.424183 ) weight=1.668753; | |
4808 | if(x>= 0.424183 && x < 0.478465 ) weight=1.652225; | |
4809 | if(x>= 0.478465 && x < 0.539692 ) weight=1.603119; | |
4810 | if(x>= 0.539692 && x < 0.608754 ) weight=1.526049; | |
4811 | if(x>= 0.608754 && x < 0.686654 ) weight=1.426724; | |
4812 | if(x>= 0.686654 && x < 0.774523 ) weight=1.312684; | |
4813 | if(x>= 0.774523 && x < 0.873636 ) weight=1.195395; | |
4814 | if(x>= 0.873636 && x < 0.985432 ) weight=1.086264; | |
4815 | if(x>= 0.985432 && x < 1.111534 ) weight=0.993666; | |
4816 | if(x>= 1.111534 && x < 1.253773 ) weight=0.922587; | |
4817 | if(x>= 1.253773 && x < 1.414214 ) weight=0.875739; | |
4818 | if(x>= 1.414214 && x < 1.595185 ) weight=0.852181; | |
4819 | if(x>= 1.595185 && x < 1.799315 ) weight=0.847828; | |
4820 | if(x>= 1.799315 && x < 2.029567 ) weight=0.863875; | |
4821 | if(x>= 2.029567 && x < 2.289283 ) weight=0.899112; | |
4822 | if(x>= 2.289283 && x < 2.582235 ) weight=0.955194; | |
4823 | if(x>= 2.582235 && x < 2.912674 ) weight=1.033824; | |
4824 | if(x>= 2.912674 && x < 3.285398 ) weight=1.133714; | |
4825 | if(x>= 3.285398 && x < 3.705818 ) weight=1.259471; | |
4826 | if(x>= 3.705818 && x < 4.180038 ) weight=1.406883; | |
4827 | if(x>= 4.180038 && x < 4.714942 ) weight=1.578923; | |
4828 | if(x>= 4.714942 && x < 5.318296 ) weight=1.778513; | |
4829 | if(x>= 5.318296 && x < 5.998859 ) weight=2.001171; | |
4830 | if(x>= 5.998859 && x < 6.766511 ) weight=2.223161; | |
4831 | if(x>= 6.766511 && x < 7.632396 ) weight=2.449445; | |
4832 | if(x>= 7.632396 && x < 8.609086 ) weight=2.661734; | |
4833 | if(x>= 8.609086 && x < 9.710759 ) weight=2.851935; | |
4834 | if(x>= 9.710759 && x < 10.953409 ) weight=2.974319; | |
4835 | if(x>= 10.953409 && x < 12.355077 ) weight=3.106314; | |
4836 | if(x>= 12.355077 && x < 13.936111 ) weight=3.126815; | |
4837 | if(x>= 13.936111 && x < 15.719464 ) weight=3.150053; | |
4838 | if(x>= 15.719464 && x < 17.731026 ) weight=3.218509; | |
4839 | if(x>= 17.731026 && x < 20.000000 ) weight=3.252141; | |
1dd85087 | 4840 | |
4841 | } | |
4842 | else if(pdg_particle==221){ | |
628d0da7 | 4843 | if(x>= 0.100000 && x < 0.112797 ) weight=2.159358; |
4844 | if(x>= 0.112797 && x < 0.127231 ) weight=2.145546; | |
4845 | if(x>= 0.127231 && x < 0.143512 ) weight=2.132390; | |
4846 | if(x>= 0.143512 && x < 0.161877 ) weight=2.109918; | |
4847 | if(x>= 0.161877 && x < 0.182592 ) weight=2.084920; | |
4848 | if(x>= 0.182592 && x < 0.205957 ) weight=2.054302; | |
4849 | if(x>= 0.205957 && x < 0.232313 ) weight=2.015202; | |
4850 | if(x>= 0.232313 && x < 0.262041 ) weight=1.966068; | |
4851 | if(x>= 0.262041 && x < 0.295573 ) weight=1.912255; | |
4852 | if(x>= 0.295573 && x < 0.333397 ) weight=1.844087; | |
4853 | if(x>= 0.333397 && x < 0.376060 ) weight=1.767913; | |
4854 | if(x>= 0.376060 && x < 0.424183 ) weight=1.680366; | |
4855 | if(x>= 0.424183 && x < 0.478465 ) weight=1.583468; | |
4856 | if(x>= 0.478465 && x < 0.539692 ) weight=1.475131; | |
4857 | if(x>= 0.539692 && x < 0.608754 ) weight=1.361436; | |
4858 | if(x>= 0.608754 && x < 0.686654 ) weight=1.244388; | |
4859 | if(x>= 0.686654 && x < 0.774523 ) weight=1.125973; | |
4860 | if(x>= 0.774523 && x < 0.873636 ) weight=1.015769; | |
4861 | if(x>= 0.873636 && x < 0.985432 ) weight=0.914579; | |
4862 | if(x>= 0.985432 && x < 1.111534 ) weight=0.830529; | |
4863 | if(x>= 1.111534 && x < 1.253773 ) weight=0.766397; | |
4864 | if(x>= 1.253773 && x < 1.414214 ) weight=0.723663; | |
4865 | if(x>= 1.414214 && x < 1.595185 ) weight=0.701236; | |
4866 | if(x>= 1.595185 && x < 1.799315 ) weight=0.695605; | |
4867 | if(x>= 1.799315 && x < 2.029567 ) weight=0.707578; | |
4868 | if(x>= 2.029567 && x < 2.289283 ) weight=0.735194; | |
4869 | if(x>= 2.289283 && x < 2.582235 ) weight=0.781052; | |
4870 | if(x>= 2.582235 && x < 2.912674 ) weight=0.842350; | |
4871 | if(x>= 2.912674 && x < 3.285398 ) weight=0.923676; | |
4872 | if(x>= 3.285398 && x < 3.705818 ) weight=1.028317; | |
4873 | if(x>= 3.705818 && x < 4.180038 ) weight=1.154029; | |
4874 | if(x>= 4.180038 && x < 4.714942 ) weight=1.296915; | |
4875 | if(x>= 4.714942 && x < 5.318296 ) weight=1.463674; | |
4876 | if(x>= 5.318296 && x < 5.998859 ) weight=1.651985; | |
4877 | if(x>= 5.998859 && x < 6.766511 ) weight=1.847912; | |
4878 | if(x>= 6.766511 && x < 7.632396 ) weight=2.066284; | |
4879 | if(x>= 7.632396 && x < 8.609086 ) weight=2.202231; | |
4880 | if(x>= 8.609086 && x < 9.710759 ) weight=2.399942; | |
4881 | if(x>= 9.710759 && x < 10.953409 ) weight=2.555106; | |
4882 | if(x>= 10.953409 && x < 12.355077 ) weight=2.632377; | |
4883 | if(x>= 12.355077 && x < 13.936111 ) weight=2.609660; | |
4884 | if(x>= 13.936111 && x < 15.719464 ) weight=2.656343; | |
4885 | if(x>= 15.719464 && x < 17.731026 ) weight=2.615438; | |
4886 | if(x>= 17.731026 && x < 20.000000 ) weight=2.576269; | |
4887 | ||
1dd85087 | 4888 | } |
4889 | else weight=1; | |
4890 | ||
4891 | return weight; | |
4892 | ||
4893 | } | |
3db2410d | 4894 | Double_t AliAnalysisTaskEMCalHFEpA::SetEoverPCutPtDependentMC(Double_t pt) |
4895 | { | |
4896 | ||
4897 | fEoverPCutMin=0.8; | |
4898 | fEoverPCutMax=1.2; | |
4899 | ||
4900 | /* | |
4901 | ////====================================================================================== | |
4902 | ////====================================================================================== | |
4903 | ////============================= data 2 sigma =========================================== | |
4904 | if(!fIsMC){ | |
4905 | //data 2 sigma | |
4906 | if(pt>= 2.00 && pt < 2.50){ | |
4907 | fEoverPCutMin=0.7719; | |
4908 | fEoverPCutMax=1.1023; | |
4909 | } | |
4910 | if(pt>= 2.50 && pt < 3.00){ | |
4911 | fEoverPCutMin=0.7966; | |
4912 | fEoverPCutMax=1.1088; | |
4913 | } | |
4914 | if(pt>= 3.00 && pt < 4.00){ | |
4915 | fEoverPCutMin=0.8175; | |
4916 | fEoverPCutMax=1.1101; | |
4917 | } | |
4918 | if(pt>= 4.00 && pt < 5.00){ | |
4919 | fEoverPCutMin=0.8302; | |
4920 | fEoverPCutMax=1.1194; | |
4921 | } | |
4922 | if(pt>= 5.00 && pt < 6.00){ | |
4923 | fEoverPCutMin=0.8517; | |
4924 | fEoverPCutMax=1.1177; | |
4925 | } | |
4926 | if(pt>= 6.00 && pt < 8.00){ | |
4927 | fEoverPCutMin=0.8901; | |
4928 | fEoverPCutMax=1.1139; | |
4929 | } | |
4930 | if(pt>= 8.00 && pt < 10.00){ | |
4931 | fEoverPCutMin=0.8703; | |
4932 | fEoverPCutMax=1.1377; | |
4933 | } | |
4934 | if(pt>= 10.00 && pt < 12.00){ | |
4935 | fEoverPCutMin=0.9043; | |
4936 | fEoverPCutMax=1.1977; | |
4937 | } | |
4938 | } | |
4939 | ||
4940 | ////=========================================== MC 2 sigma =========================================== | |
4941 | ||
4942 | ||
4943 | if(fIsMC){ | |
4944 | ||
4945 | if(pt>= 2.00 && pt < 2.50){ | |
4946 | fEoverPCutMin=0.7712; | |
4947 | fEoverPCutMax=1.0746; | |
4948 | } | |
4949 | if(pt>= 2.50 && pt < 3.00){ | |
4950 | fEoverPCutMin=0.7946; | |
4951 | fEoverPCutMax=1.0708; | |
4952 | } | |
4953 | if(pt>= 3.00 && pt < 4.00){ | |
4954 | fEoverPCutMin=0.8196; | |
4955 | fEoverPCutMax=1.0678; | |
4956 | } | |
4957 | if(pt>= 4.00 && pt < 5.00){ | |
4958 | fEoverPCutMin=0.8396; | |
4959 | fEoverPCutMax=1.0646; | |
4960 | } | |
4961 | if(pt>= 5.00 && pt < 6.00){ | |
4962 | fEoverPCutMin=0.8527; | |
4963 | fEoverPCutMax=1.0647; | |
4964 | } | |
4965 | if(pt>= 6.00 && pt < 8.00){ | |
4966 | fEoverPCutMin=0.8652; | |
4967 | fEoverPCutMax=1.0670; | |
4968 | } | |
4969 | if(pt>= 8.00 && pt < 10.00){ | |
4970 | fEoverPCutMin=0.8748; | |
4971 | fEoverPCutMax=1.0804; | |
4972 | } | |
4973 | if(pt>= 10.00 && pt < 12.00){ | |
4974 | fEoverPCutMin=0.8814; | |
4975 | fEoverPCutMax=1.0842; | |
4976 | } | |
4977 | ||
4978 | } | |
4979 | */ | |
4980 | ////====================================================================================== | |
4981 | ////====================================================================================== | |
4982 | ////=========================== data 1.5 sigma =========================================== | |
4983 | /* | |
4984 | if(!fIsMC){ | |
4985 | //data 1.5 sigmas | |
4986 | if(pt>= 2.00 && pt < 2.50){ | |
4987 | fEoverPCutMin=0.8132; | |
4988 | fEoverPCutMax=1.0610; | |
4989 | } | |
4990 | if(pt>= 2.50 && pt < 3.00){ | |
4991 | fEoverPCutMin=0.8356; | |
4992 | fEoverPCutMax=1.0698; | |
4993 | } | |
4994 | if(pt>= 3.00 && pt < 4.00){ | |
4995 | fEoverPCutMin=0.8541; | |
4996 | fEoverPCutMax=1.0735; | |
4997 | } | |
4998 | if(pt>= 4.00 && pt < 5.00){ | |
4999 | fEoverPCutMin=0.8664; | |
5000 | fEoverPCutMax=1.0832; | |
5001 | } | |
5002 | if(pt>= 5.00 && pt < 6.00){ | |
5003 | fEoverPCutMin=0.8849; | |
5004 | fEoverPCutMax=1.0845; | |
5005 | } | |
5006 | if(pt>= 6.00 && pt < 8.00){ | |
5007 | fEoverPCutMin=0.9180; | |
5008 | fEoverPCutMax=1.0860; | |
5009 | } | |
5010 | if(pt>= 8.00 && pt < 10.00){ | |
5011 | fEoverPCutMin=0.9037; | |
5012 | fEoverPCutMax=1.1043; | |
5013 | } | |
5014 | if(pt>= 10.00 && pt < 12.00){ | |
5015 | fEoverPCutMin=0.9409; | |
5016 | fEoverPCutMax=1.1611; | |
5017 | } | |
5018 | } | |
5019 | ||
5020 | ////====================================================================================== | |
5021 | ////====================================================================================== | |
5022 | ////=========================== MC 1.5 sigma =========================================== | |
5023 | ||
5024 | if(fIsMC){ | |
5025 | //MC 1.5 sigmas | |
5026 | if(pt>= 2.00 && pt < 2.50){ | |
5027 | fEoverPCutMin=0.8091; | |
5028 | fEoverPCutMax=1.0367; | |
5029 | } | |
5030 | if(pt>= 2.50 && pt < 3.00){ | |
5031 | fEoverPCutMin=0.8292; | |
5032 | fEoverPCutMax=1.0362; | |
5033 | } | |
5034 | if(pt>= 3.00 && pt < 4.00){ | |
5035 | fEoverPCutMin=0.8506; | |
5036 | fEoverPCutMax=1.0368; | |
5037 | } | |
5038 | if(pt>= 4.00 && pt < 5.00){ | |
5039 | fEoverPCutMin=0.8677; | |
5040 | fEoverPCutMax=1.0365; | |
5041 | } | |
5042 | if(pt>= 5.00 && pt < 6.00){ | |
5043 | fEoverPCutMin=0.8792; | |
5044 | fEoverPCutMax=1.0382; | |
5045 | } | |
5046 | if(pt>= 6.00 && pt < 8.00){ | |
5047 | fEoverPCutMin=0.8904; | |
5048 | fEoverPCutMax=1.0418; | |
5049 | } | |
5050 | if(pt>= 8.00 && pt < 10.00){ | |
5051 | fEoverPCutMin=0.9005; | |
5052 | fEoverPCutMax=1.0547; | |
5053 | } | |
5054 | if(pt>= 10.00 && pt < 12.00){ | |
5055 | fEoverPCutMin=0.9067; | |
5056 | fEoverPCutMax=1.0589; | |
5057 | } | |
5058 | ||
5059 | } | |
5060 | */ | |
5061 | ////====================================================================================== | |
5062 | ////====================================================================================== | |
5063 | ////=========================== data 2.5 sigma =========================================== | |
5064 | ||
5065 | if(!fIsMC){ | |
5066 | //data 2.5 sigmas | |
5067 | if(pt>= 2.00 && pt < 2.50){ | |
5068 | fEoverPCutMin=0.7306; | |
5069 | fEoverPCutMax=1.1436; | |
5070 | } | |
5071 | if(pt>= 2.50 && pt < 3.00){ | |
5072 | fEoverPCutMin=0.7575; | |
5073 | fEoverPCutMax=1.1479; | |
5074 | } | |
5075 | if(pt>= 3.00 && pt < 4.00){ | |
5076 | fEoverPCutMin=0.7809; | |
5077 | fEoverPCutMax=1.1467; | |
5078 | } | |
5079 | if(pt>= 4.00 && pt < 5.00){ | |
5080 | fEoverPCutMin=0.7941; | |
5081 | fEoverPCutMax=1.1555; | |
5082 | } | |
5083 | if(pt>= 5.00 && pt < 6.00){ | |
5084 | fEoverPCutMin=0.8184; | |
5085 | fEoverPCutMax=1.1510; | |
5086 | } | |
5087 | if(pt>= 6.00 && pt < 8.00){ | |
5088 | fEoverPCutMin=0.8621; | |
5089 | fEoverPCutMax=1.1419; | |
5090 | } | |
5091 | if(pt>= 8.00 && pt < 10.00){ | |
5092 | fEoverPCutMin=0.8368; | |
5093 | fEoverPCutMax=1.1712; | |
5094 | } | |
5095 | if(pt>= 10.00 && pt < 12.00){ | |
5096 | fEoverPCutMin=0.8676; | |
5097 | fEoverPCutMax=1.2344; | |
5098 | } | |
5099 | ||
5100 | } | |
5101 | ||
5102 | ////====================================================================================== | |
5103 | ////====================================================================================== | |
5104 | ////=========================== MC 2.5 sigma =========================================== | |
5105 | ||
5106 | if(fIsMC){ | |
5107 | //MC 2.5 sigmas | |
5108 | if(pt>= 2.00 && pt < 2.50){ | |
5109 | fEoverPCutMin=0.7333; | |
5110 | fEoverPCutMax=1.1125; | |
5111 | } | |
5112 | if(pt>= 2.50 && pt < 3.00){ | |
5113 | fEoverPCutMin=0.7601; | |
5114 | fEoverPCutMax=1.1053; | |
5115 | } | |
5116 | if(pt>= 3.00 && pt < 4.00){ | |
5117 | fEoverPCutMin=0.7885; | |
5118 | fEoverPCutMax=1.0989; | |
5119 | } | |
5120 | if(pt>= 4.00 && pt < 5.00){ | |
5121 | fEoverPCutMin=0.8115; | |
5122 | fEoverPCutMax=1.0927; | |
5123 | } | |
5124 | if(pt>= 5.00 && pt < 6.00){ | |
5125 | fEoverPCutMin=0.8262; | |
5126 | fEoverPCutMax=1.0912; | |
5127 | } | |
5128 | if(pt>= 6.00 && pt < 8.00){ | |
5129 | fEoverPCutMin=0.8400; | |
5130 | fEoverPCutMax=1.0922; | |
5131 | } | |
5132 | if(pt>= 8.00 && pt < 10.00){ | |
5133 | fEoverPCutMin=0.8492; | |
5134 | fEoverPCutMax=1.1060; | |
5135 | } | |
5136 | if(pt>= 10.00 && pt < 12.00){ | |
5137 | fEoverPCutMin=0.8560; | |
5138 | fEoverPCutMax=1.1096; | |
5139 | } | |
5140 | } | |
5141 | ||
5142 | ||
5143 | return fEoverPCutMin; | |
5144 | return fEoverPCutMax; | |
1dd85087 | 5145 | |
3db2410d | 5146 | } |
1dd85087 | 5147 | |
5148 | ||
5149 |