AliPhysics  9c66e61 (9c66e61)
AliAnalysisTaskPSHFE.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 /* $Id$ */
17 
18 /* AliAnalysisTaskPSHFE.cxx
19  *
20  * Macro for analysis of heavy flavour electrons
21  * -Patrick Steffanic
22  */
23 #include "AliAnalysisTaskPSHFE.h"
24 
25  #include <iostream>
26  #include <fstream>
27  #include <vector>
28  #include "Riostream.h"
29  #include "TChain.h"
30  #include "TTree.h"
31  #include "TMath.h"
32  #include "TString.h"
33  #include "TH1F.h"
34  #include "TH2F.h"
35  #include "TCanvas.h"
36  #include "TList.h"
37  #include "TF1.h"
38  #include "TGraph.h"
39  #include "TSystem.h"
40 
41  #include "AliAnalysisTaskSE.h"
42  #include "AliAnalysisManager.h"
43  #include "AliStack.h"
44  #include "AliESDtrackCuts.h"
45  #include "AliAODTrack.h"
46  #include "AliAODCaloCluster.h"
47  #include "AliAODEvent.h"
48  #include "AliAODInputHandler.h"
49  #include "AliPID.h"
50  #include "AliPIDResponse.h"
51  #include "AliTRDPIDResponse.h"
52  #include "AliEventPoolManager.h"
53 
54  using std::cout;
55 using std::endl;
56 
57 
58 ClassImp(AliAnalysisTaskPSHFE)
59 
60  //________________________________________________________________________
61  AliAnalysisTaskPSHFE::AliAnalysisTaskPSHFE() // All data members should be initialised here
63 fOutputMB(0),
64 fOutputEMC7(0),
65 fOutputEMCEGA(0),
66 fOutputEMCJet(0),
67 fTrackCutsStrong(0),
68 fTrackCutsWeak(0),
69 fPoolMan(0),
70 fPool(0),
71 UseNonSignalEvents(0),
72 MBtrg(0),
73 EMC7trg(0),
74 EMCEGAtrg(0),
75 EMCJettrg(0),
76 tagStrong(0),
77 tagPhot(0),
78 
79 
80 fHistTPCNClus_MB(0),
81 fHistITSNClus_MB(0),
82 fHistImpPar_MB(0),
83 fHistImpParTag_MB(0),
84 fHistEMC_Had_MB_1Gev(0),
85 fHistPtSum_MB(0),
86 fHistPtSumTag_MB(0),
87 fHistPtSumEMC_MB(0),
88 fHistEtaPhi_MB(0),
89 fHistEtaPhiTag_MB(0),
90 fHistEtaPhiTPCOnly_MB(0),
91 fHistDPhi28_MB(0),
92 fHistDPhiDEta28_MB(0),
93 fHistNevents_MB(0),
94 fHistInvMassElecLike_MB(0),
95 fHistOpAngElecLike_MB(0),
96 fHistInvMassElecUnLike_MB(0),
97 fHistOpAngElecUnLike_MB(0),
98 fHistPtAssoc_MB(0),
99 fHistPtAssocMix_MB(0),
100 fHistPtTag_MB(0),
101 fHistPhotoMismatch_MB(0),
102 fHistDPhi18Spe_MB(0),
103 fHistDPhiMix28_MB(0),
104 fHistDPhiDEtaMix28_MB(0),
105 
106 
107 fHistTPCNClus_EMC7(0),
108 fHistITSNClus_EMC7(0),
109 fHistImpPar_EMC7(0),
110 fHistImpParTag_EMC7(0),
111 fHistPtSum_EMC7(0),
112 fHistPtSumTag_EMC7(0),
113 fHistPtSumEMC_EMC7(0),
114 fHistEtaPhi_EMC7(0),
115 fHistEtaPhiTag_EMC7(0),
116 fHistDPhi28_EMC7(0),
117 fHistDPhiDEta28_EMC7(0),
118 fHistNevents_EMC7(0),
119 fHistInvMassElecLike_EMC7(0),
120 fHistOpAngElecLike_EMC7(0),
121 fHistInvMassElecUnLike_EMC7(0),
122 fHistOpAngElecUnLike_EMC7(0),
123 fHistPtAssoc_EMC7(0),
124 fHistPtAssocMix_EMC7(0),
125 fHistPtTag_EMC7(0),
126 fHistPhotoMismatch_EMC7(0),
127 fHistDPhi18Spe_EMC7(0),
128 fHistDPhiMix28_EMC7(0),
129 fHistDPhiDEtaMix28_EMC7(0),
130 
131 fHistTPCNClus_EMCEGA(0),
132 fHistITSNClus_EMCEGA(0),
133 fHistImpPar_EMCEGA(0),
134 fHistImpParTag_EMCEGA(0),
135 fHistPtSum_EMCEGA(0),
136 fHistPtSumTag_EMCEGA(0),
137 fHistPtSumEMC_EMCEGA(0),
138 fHistEtaPhi_EMCEGA(0),
139 fHistEtaPhiTag_EMCEGA(0),
140 fHistDPhi28_EMCEGA(0),
141 fHistDPhiDEta28_EMCEGA(0),
142 fHistNevents_EMCEGA(0),
143 fHistInvMassElecLike_EMCEGA(0),
144 fHistOpAngElecLike_EMCEGA(0),
145 fHistInvMassElecUnLike_EMCEGA(0),
146 fHistOpAngElecUnLike_EMCEGA(0),
147 fHistPtAssoc_EMCEGA(0),
148 fHistPtAssocMix_EMCEGA(0),
149 fHistPtTag_EMCEGA(0),
150 fHistPhotoMismatch_EMCEGA(0),
151 fHistDPhi18Spe_EMCEGA(0),
152 fHistDPhiMix28_EMCEGA(0),
153 fHistDPhiDEtaMix28_EMCEGA(0),
154 
155 fHistTPCNClus_EMCJet(0),
156 fHistITSNClus_EMCJet(0),
157 fHistImpPar_EMCJet(0),
158 fHistImpParTag_EMCJet(0),
159 fHistPtSum_EMCJet(0),
160 fHistPtSumTag_EMCJet(0),
161 fHistPtSumEMC_EMCJet(0),
162 fHistEtaPhi_EMCJet(0),
163 fHistEtaPhiTag_EMCJet(0),
164 fHistDPhi28_EMCJet(0),
165 fHistDPhiDEta28_EMCJet(0),
166 fHistNevents_EMCJet(0),
167 fHistInvMassElecLike_EMCJet(0),
168 fHistOpAngElecLike_EMCJet(0),
169 fHistInvMassElecUnLike_EMCJet(0),
170 fHistOpAngElecUnLike_EMCJet(0),
171 fHistPtAssoc_EMCJet(0),
172 fHistPtAssocMix_EMCJet(0),
173 fHistPtTag_EMCJet(0),
174 fHistPhotoMismatch_EMCJet(0),
175 fHistDPhi18Spe_EMCJet(0),
176 fHistDPhiMix28_EMCJet(0),
177 fHistDPhiDEtaMix28_EMCJet(0),
178 
179 fHistPIDRejection(0),
180 fHistNElecPerEvent(0),
181 fHistTestDCA(0),
182 fHistTestEMCEnergy(0),
183 fHistTestTPCdEdx(0),
184 fHistTestEOP(0),
185 fHistTestOGDPhi(0),
186 fHistTestInvMassElecLike(0),
187 fHistTestInvMassElecUnLike(0),
188 fHistTestInvMassPionLike(0),
189 fHistTestInvMassPionUnLike(0),
190 fHistTestPt(0),
191 fHistTestDPhiSpeNoSec(0),
192 fHistTestDPhi18Sec(0),
193 fHistTestDPhi18NoSec(0),
194 fHistTestDPhiType(0)
195 
196  // The last in the above list should not have a comma after it
197 {
198 
199  //Init the DPhi Plots here because they are stored in arrays
200  for(Int_t i=0; i<3; i++){
201  fHistDPhi300_1_MB[i]=0;
202  fHistDPhi1_2_MB[i]=0;
203  fHistDPhi2_4_MB[i]=0;
204  fHistDPhi4_8_MB[i]=0;
205 
206 
207  fHistDPhi300_1_EMC7[i]=0;
208  fHistDPhi1_2_EMC7[i]=0;
209  fHistDPhi2_4_EMC7[i]=0;
210  fHistDPhi4_8_EMC7[i]=0;
211 
212 
213  fHistDPhi300_1_EMCEGA[i]=0;
214  fHistDPhi1_2_EMCEGA[i]=0;
215  fHistDPhi2_4_EMCEGA[i]=0;
216  fHistDPhi4_8_EMCEGA[i]=0;
217 
218  fHistDPhi300_1_EMCJet[i]=0;
219  fHistDPhi1_2_EMCJet[i]=0;
220  fHistDPhi2_4_EMCJet[i]=0;
221  fHistDPhi4_8_EMCJet[i]=0;
222 
223  //ME histos
224 
225  fHistDPhiMix300_1_MB[i]=0;
226  fHistDPhiMix1_2_MB[i]=0;
227  fHistDPhiMix2_4_MB[i]=0;
228  fHistDPhiMix4_8_MB[i]=0;
229 
230  fHistDPhiMix300_1_EMC7[i]=0;
231  fHistDPhiMix1_2_EMC7[i]=0;
232  fHistDPhiMix2_4_EMC7[i]=0;
233  fHistDPhiMix4_8_EMC7[i]=0;
234 
235  fHistDPhiMix300_1_EMCEGA[i]=0;
236  fHistDPhiMix1_2_EMCEGA[i]=0;
237  fHistDPhiMix2_4_EMCEGA[i]=0;
238  fHistDPhiMix4_8_EMCEGA[i]=0;
239 
240  fHistDPhiMix300_1_EMCJet[i]=0;
241  fHistDPhiMix1_2_EMCJet[i]=0;
242  fHistDPhiMix2_4_EMCJet[i]=0;
243  fHistDPhiMix4_8_EMCJet[i]=0;
244  }
245 
246  //Init PID Plots here since they are stored in Arrays
247  for(int i=0;i<6;i++){
248  //MB Plots
249  fHistTPC_EMCTRD_MB[i]=0;
250 
251  fHistEMC_TPCTRD_MB[i]=0;
252 
253  fHistTRD_TPCEMC_MB[i]=0;
254 
255  //EMC7 Plots
256  fHistTPC_EMCTRD_EMC7[i]=0;
257 
258  fHistEMC_TPCTRD_EMC7[i]=0;
259 
260  fHistTRD_TPCEMC_EMC7[i]=0;
261 
262  //EMCEGA Plots
263  fHistTPC_EMCTRD_EMCEGA[i]=0;
264 
265  fHistEMC_TPCTRD_EMCEGA[i]=0;
266 
267  fHistTRD_TPCEMC_EMCEGA[i]=0;
268 
269  //EMCJet Plots
270  fHistTPC_EMCTRD_EMCJet[i]=0;
271 
272  fHistEMC_TPCTRD_EMCJet[i]=0;
273 
274  fHistTRD_TPCEMC_EMCJet[i]=0;
275 
276  }
277 
278  // Dummy constructor ALWAYS needed for I/O.
279 }
280 
281 //________________________________________________________________________
282 AliAnalysisTaskPSHFE::AliAnalysisTaskPSHFE(const char *name) // All data members should be initialised here
283  :AliAnalysisTaskSE(name),
284 fOutputMB(0),
285 fOutputEMC7(0),
286 fOutputEMCEGA(0),
287 fOutputEMCJet(0),
288 fTrackCutsStrong(0),
289 fTrackCutsWeak(0),
290 fPoolMan(0),
291 fPool(0),
292 UseNonSignalEvents(0),
293 MBtrg(0),
294 EMC7trg(0),
295 EMCEGAtrg(0),
296 EMCJettrg(0),
297 tagStrong(0),
298 tagPhot(0),
299 
300 
301 fHistTPCNClus_MB(0),
302 fHistITSNClus_MB(0),
303 fHistImpPar_MB(0),
304 fHistImpParTag_MB(0),
305 fHistEMC_Had_MB_1Gev(0),
306 fHistPtSum_MB(0),
307 fHistPtSumTag_MB(0),
308 fHistPtSumEMC_MB(0),
309 fHistEtaPhi_MB(0),
310 fHistEtaPhiTag_MB(0),
311 fHistEtaPhiTPCOnly_MB(0),
312 fHistDPhi28_MB(0),
313 fHistDPhiDEta28_MB(0),
314 fHistNevents_MB(0),
315 fHistInvMassElecLike_MB(0),
316 fHistOpAngElecLike_MB(0),
317 fHistInvMassElecUnLike_MB(0),
318 fHistOpAngElecUnLike_MB(0),
319 fHistPtAssoc_MB(0),
320 fHistPtAssocMix_MB(0),
321 fHistPtTag_MB(0),
322 fHistPhotoMismatch_MB(0),
323 fHistDPhi18Spe_MB(0),
324 fHistDPhiMix28_MB(0),
325 fHistDPhiDEtaMix28_MB(0),
326 
327 
328 fHistTPCNClus_EMC7(0),
329 fHistITSNClus_EMC7(0),
330 fHistImpPar_EMC7(0),
331 fHistImpParTag_EMC7(0),
332 fHistPtSum_EMC7(0),
333 fHistPtSumTag_EMC7(0),
334 fHistPtSumEMC_EMC7(0),
335 fHistEtaPhi_EMC7(0),
336 fHistEtaPhiTag_EMC7(0),
337 fHistDPhi28_EMC7(0),
338 fHistDPhiDEta28_EMC7(0),
339 fHistNevents_EMC7(0),
340 fHistInvMassElecLike_EMC7(0),
341 fHistOpAngElecLike_EMC7(0),
342 fHistInvMassElecUnLike_EMC7(0),
343 fHistOpAngElecUnLike_EMC7(0),
344 fHistPtAssoc_EMC7(0),
345 fHistPtAssocMix_EMC7(0),
346 fHistPtTag_EMC7(0),
347 fHistPhotoMismatch_EMC7(0),
348 fHistDPhi18Spe_EMC7(0),
349 fHistDPhiMix28_EMC7(0),
350 fHistDPhiDEtaMix28_EMC7(0),
351 
352 fHistTPCNClus_EMCEGA(0),
353 fHistITSNClus_EMCEGA(0),
354 fHistImpPar_EMCEGA(0),
355 fHistImpParTag_EMCEGA(0),
356 fHistPtSum_EMCEGA(0),
357 fHistPtSumTag_EMCEGA(0),
358 fHistPtSumEMC_EMCEGA(0),
359 fHistEtaPhi_EMCEGA(0),
360 fHistEtaPhiTag_EMCEGA(0),
361 fHistDPhi28_EMCEGA(0),
362 fHistDPhiDEta28_EMCEGA(0),
363 fHistNevents_EMCEGA(0),
364 fHistInvMassElecLike_EMCEGA(0),
365 fHistOpAngElecLike_EMCEGA(0),
366 fHistInvMassElecUnLike_EMCEGA(0),
367 fHistOpAngElecUnLike_EMCEGA(0),
368 fHistPtAssoc_EMCEGA(0),
369 fHistPtAssocMix_EMCEGA(0),
370 fHistPtTag_EMCEGA(0),
371 fHistPhotoMismatch_EMCEGA(0),
372 fHistDPhi18Spe_EMCEGA(0),
373 fHistDPhiMix28_EMCEGA(0),
374 fHistDPhiDEtaMix28_EMCEGA(0),
375 
376 fHistTPCNClus_EMCJet(0),
377 fHistITSNClus_EMCJet(0),
378 fHistImpPar_EMCJet(0),
379 fHistImpParTag_EMCJet(0),
380 fHistPtSum_EMCJet(0),
381 fHistPtSumTag_EMCJet(0),
382 fHistPtSumEMC_EMCJet(0),
383 fHistEtaPhi_EMCJet(0),
384 fHistEtaPhiTag_EMCJet(0),
385 fHistDPhi28_EMCJet(0),
386 fHistDPhiDEta28_EMCJet(0),
387 fHistNevents_EMCJet(0),
388 fHistInvMassElecLike_EMCJet(0),
389 fHistOpAngElecLike_EMCJet(0),
390 fHistInvMassElecUnLike_EMCJet(0),
391 fHistOpAngElecUnLike_EMCJet(0),
392 fHistPtAssoc_EMCJet(0),
393 fHistPtAssocMix_EMCJet(0),
394 fHistPtTag_EMCJet(0),
395 fHistPhotoMismatch_EMCJet(0),
396 fHistDPhi18Spe_EMCJet(0),
397 fHistDPhiMix28_EMCJet(0),
398 fHistDPhiDEtaMix28_EMCJet(0),
399 
400 fHistPIDRejection(0),
401 fHistNElecPerEvent(0),
402 fHistTestDCA(0),
403 fHistTestEMCEnergy(0),
404 fHistTestTPCdEdx(0),
405 fHistTestEOP(0),
406 fHistTestOGDPhi(0),
407 fHistTestInvMassElecLike(0),
408 fHistTestInvMassElecUnLike(0),
409 fHistTestInvMassPionLike(0),
410 fHistTestInvMassPionUnLike(0),
411 fHistTestPt(0),
412 fHistTestDPhiSpeNoSec(0),
413 fHistTestDPhi18Sec(0),
414 fHistTestDPhi18NoSec(0),
415 fHistTestDPhiType(0)
416 
417  // The last in the above list should not have a comma after it
418 {
419  // Constructor
420  // Define input and output slots here (never in the dummy constructor)
421  // Input slot #0 works with a TChain - it is connected to the default input container
422  // Output slot #1 writes into a TH1 container
423 
424  for(Int_t i=0; i<3; i++){
425 
426  fHistDPhi300_1_MB[i]=0;
427  fHistDPhi1_2_MB[i]=0;
428  fHistDPhi2_4_MB[i]=0;
429  fHistDPhi4_8_MB[i]=0;
430 
431 
432  fHistDPhi300_1_EMC7[i]=0;
433  fHistDPhi1_2_EMC7[i]=0;
434  fHistDPhi2_4_EMC7[i]=0;
435  fHistDPhi4_8_EMC7[i]=0;
436 
437 
439  fHistDPhi1_2_EMCEGA[i]=0;
440  fHistDPhi2_4_EMCEGA[i]=0;
441  fHistDPhi4_8_EMCEGA[i]=0;
442 
443 
445  fHistDPhi1_2_EMCJet[i]=0;
446  fHistDPhi2_4_EMCJet[i]=0;
447  fHistDPhi4_8_EMCJet[i]=0;
448 
449 
450  //ME histos
451 
453  fHistDPhiMix1_2_MB[i]=0;
454  fHistDPhiMix2_4_MB[i]=0;
455  fHistDPhiMix4_8_MB[i]=0;
456 
457 
462 
463 
468 
469 
474 
475  }
476 
477  //Init PID Plots here since they are stored in Arrays
478  for(Int_t i=0;i<6;i++){
479  //MB Plots
480  fHistTPC_EMCTRD_MB[i]=0;
481 
482  fHistEMC_TPCTRD_MB[i]=0;
483 
484  fHistTRD_TPCEMC_MB[i]=0;
485 
486  //EMC7 Plots
488 
490 
492 
493  //EMCEGA Plots
495 
497 
499 
500  //EMCJet Plots
502 
504 
506 
507  }
508 
509 
510  DefineOutput(1, TList::Class());//MB
511  DefineOutput(2, TList::Class());//EMC7
512  DefineOutput(3, TList::Class());//EMCEGA
513  DefineOutput(4, TList::Class());//EMCJet
514 }
515 
516 //________________________________________________________________________
518 {
519  // Destructor. Clean-up the output list, but not the histograms that are put inside
520  // (the list is owner and will clean-up these histograms). Protect in PROOF case.
521  for(Int_t i=0;i<3;i++){
522 
523  delete fHistDPhi300_1_MB[i];
524  delete fHistDPhi1_2_MB[i];
525  delete fHistDPhi2_4_MB[i];
526  delete fHistDPhi4_8_MB[i];
527 
528  delete fHistDPhi300_1_EMC7[i];
529  delete fHistDPhi1_2_EMC7[i];
530  delete fHistDPhi2_4_EMC7[i];
531  delete fHistDPhi4_8_EMC7[i];
532 
533 
534  delete fHistDPhi300_1_EMCEGA[i];
535  delete fHistDPhi1_2_EMCEGA[i];
536  delete fHistDPhi2_4_EMCEGA[i];
537  delete fHistDPhi4_8_EMCEGA[i];
538 
539 
540  delete fHistDPhi300_1_EMCJet[i];
541  delete fHistDPhi1_2_EMCJet[i];
542  delete fHistDPhi2_4_EMCJet[i];
543  delete fHistDPhi4_8_EMCJet[i];
544 
545 
546  //ME histos
547 
548  delete fHistDPhiMix300_1_MB[i];
549  delete fHistDPhiMix1_2_MB[i];
550  delete fHistDPhiMix2_4_MB[i];
551  delete fHistDPhiMix4_8_MB[i];
552 
553 
554  delete fHistDPhiMix300_1_EMC7[i];
555  delete fHistDPhiMix1_2_EMC7[i];
556  delete fHistDPhiMix2_4_EMC7[i];
557  delete fHistDPhiMix4_8_EMC7[i];
558 
559 
560  delete fHistDPhiMix300_1_EMCEGA[i];
561  delete fHistDPhiMix1_2_EMCEGA[i];
562  delete fHistDPhiMix2_4_EMCEGA[i];
563  delete fHistDPhiMix4_8_EMCEGA[i];
564 
565 
566  delete fHistDPhiMix300_1_EMCJet[i];
567  delete fHistDPhiMix1_2_EMCJet[i];
568  delete fHistDPhiMix2_4_EMCJet[i];
569  delete fHistDPhiMix4_8_EMCJet[i];
570 
571  }
572 
573  //Init PID Plots here since they are stored in Arrays
574  for(Int_t i=0;i<6;i++){
575  //MB Plots
576  delete fHistTPC_EMCTRD_MB[i];
577 
578  delete fHistEMC_TPCTRD_MB[i];
579 
580  delete fHistTRD_TPCEMC_MB[i];
581 
582  //EMC7 Plots
583  delete fHistTPC_EMCTRD_EMC7[i];
584 
585  delete fHistEMC_TPCTRD_EMC7[i];
586 
587  delete fHistTRD_TPCEMC_EMC7[i];
588 
589  //EMCEGA Plots
590  delete fHistTPC_EMCTRD_EMCEGA[i];
591 
592  delete fHistEMC_TPCTRD_EMCEGA[i];
593 
594  delete fHistTRD_TPCEMC_EMCEGA[i];
595 
596  //EMCJet Plots
597  delete fHistTPC_EMCTRD_EMCJet[i];
598 
599  delete fHistEMC_TPCTRD_EMCJet[i];
600 
601  delete fHistTRD_TPCEMC_EMCJet[i];
602 
603  }
604 
605  delete fTrackCutsStrong;
606  delete fTrackCutsWeak;
607 }
608 
609 //________________________________________________________________________
611  // Create histograms
612  // Called once (on the worker node)
613 
614  fOutputMB = new TList();
615  OpenFile(1);
616  fOutputMB->SetOwner(); // IMPORTANT!
617  fOutputEMC7 = new TList();
618  OpenFile(2);
619  fOutputEMC7->SetOwner(); // IMPORTANT!
620  fOutputEMCEGA = new TList();
621  OpenFile(3);
622  fOutputEMCEGA->SetOwner(); // IMPORTANT!
623  fOutputEMCJet = new TList();
624  OpenFile(4);
625  fOutputEMCJet->SetOwner(); // IMPORTANT!
626 
627  //Initialize event pool stuff
628  Double_t vertexBins[5] = { -10, -4, 0, 4, 10 };
629  Int_t nZvtxBins = 4;
630  Double_t multBins[5] = {0, 10, 50, 100, 200};
631  Int_t nMultBins = 4;
632 
633  fPoolMan = new AliEventPoolManager(1000, 10, nMultBins, multBins, nZvtxBins, vertexBins);
634  fPoolMan->Validate();
635 
636  //Some strings for histograms
637  TString ptRangesDPhi[3] = {"1-2Gev", "2-4Gev", "4-8Gev"};
638  TString ptRangesPID[6] = {"1-2GeV", "2-3GeV", "3-4GeV", "4-5GeV", "5-6GeV", ">6GeV"};
639 
640 
641  //Strong cuts for heavy flavour
642  fTrackCutsStrong = new AliESDtrackCuts();
643  // TPC
644  fTrackCutsStrong->SetRequireTPCRefit(kTRUE);
645  // ITS
646  fTrackCutsStrong->SetRequireITSRefit(kTRUE);
647  // 7*(0.0026+0.0050/pt^1.01)
648  fTrackCutsStrong->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
649  fTrackCutsStrong->SetMaxDCAToVertexZ(2);
650  fTrackCutsStrong->SetDCAToVertex2D(kFALSE);
651  fTrackCutsStrong->SetRequireSigmaToVertex(kFALSE);
652  fTrackCutsStrong->SetMaxChi2PerClusterITS(36);
653  fTrackCutsStrong->SetMinNClustersTPC(120);
654  fTrackCutsStrong->SetMinNClustersITS(4);
655  fTrackCutsStrong->SetPtRange(1,10e10);
656  fTrackCutsStrong->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth);
657  fTrackCutsStrong->SetMaxChi2PerClusterTPC(2);
658  fTrackCutsStrong->SetMaxDCAToVertexXY(1);
659  fTrackCutsStrong->SetMaxDCAToVertexZ(2);
660  fTrackCutsStrong->SetEtaRange(-.6, .6);
661  fTrackCutsStrong->SetAcceptKinkDaughters(kFALSE);
662 
663  //Weak cuts for heavy flavour
664  fTrackCutsWeak = new AliESDtrackCuts();
665  // TPC
666  fTrackCutsWeak->SetRequireTPCRefit(kTRUE);
667  // ITS
668  fTrackCutsWeak->SetRequireITSRefit(kTRUE);
669  // 7*(0.0026+0.0050/pt^1.01)
670  fTrackCutsWeak->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
671  fTrackCutsWeak->SetMaxDCAToVertexZ(2);
672  fTrackCutsWeak->SetDCAToVertex2D(kFALSE);
673  fTrackCutsWeak->SetRequireSigmaToVertex(kFALSE);
674  fTrackCutsWeak->SetMaxChi2PerClusterITS(36);
675  fTrackCutsWeak->SetMinNClustersTPC(80);
676  fTrackCutsWeak->SetMinNClustersITS(3);
677  fTrackCutsWeak->SetPtRange(1,10e10);
678  fTrackCutsWeak->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth);
679  fTrackCutsWeak->SetMaxChi2PerClusterTPC(4);
680  //fTrackCutsWeak->SetMaxDCAToVertexXY(2);
681  //fTrackCutsWeak->SetMaxDCAToVertexZ(3);
682  fTrackCutsWeak->SetEtaRange(-.7, .7);
683  fTrackCutsWeak->SetAcceptKinkDaughters(kFALSE);
684 
685  // Create histograms
686 
687  //Photonic e mismatch histo
688 
689  fHistPhotoMismatch_MB = new TH1F("fHistPhotoMismatch_MB", "Electrons identified as 'heavy flavour' that fall in photonic invariant mass and opening angle cuts", 2, 0, 1);
690  fHistPhotoMismatch_MB->GetXaxis()->SetTitle("Electrons");
691  fHistPhotoMismatch_MB->GetYaxis()->SetTitle("Cts");
692 
693  fHistPhotoMismatch_EMC7 = new TH1F("fHistPhotoMismatch_EMC7", "Electrons identified as 'heavy flavour' that fall in photonic invariant mass and opening angle cuts", 2, 0, 1);
694  fHistPhotoMismatch_EMC7->GetXaxis()->SetTitle("Electrons");
695  fHistPhotoMismatch_EMC7->GetYaxis()->SetTitle("Cts");
696 
697  fHistPhotoMismatch_EMCEGA = new TH1F("fHistPhotoMismatch_EMCEGA", "Electrons identified as 'heavy flavour' that fall in photonic invariant mass and opening angle cuts", 2, 0, 1);
698  fHistPhotoMismatch_EMCEGA->GetXaxis()->SetTitle("Electrons");
699  fHistPhotoMismatch_EMCEGA->GetYaxis()->SetTitle("Cts");
700 
701  fHistPhotoMismatch_EMCJet = new TH1F("fHistPhotoMismatch_EMCJet", "Electrons identified as 'heavy flavour' that fall in photonic invariant mass and opening angle cuts", 2, 0, 1);
702  fHistPhotoMismatch_EMCJet->GetXaxis()->SetTitle("Electrons");
703  fHistPhotoMismatch_EMCJet->GetYaxis()->SetTitle("Cts");
704 
705  //Invariant mass histos
706 
707  fHistInvMassElecLike_MB = new TH1F("fHistInvMassElecLike_MB", "Invariant mass for all like-signed electron pairs", 100, 0, .5);
708  fHistInvMassElecLike_MB->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
709  fHistInvMassElecLike_MB->GetYaxis()->SetTitle("Cts");
710 
711  fHistInvMassElecLike_EMC7 = new TH1F("fHistInvMassElecLike_EMC7", "Invariant mass for all like-signed electron pairs", 100, 0, .5);
712  fHistInvMassElecLike_EMC7->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
713  fHistInvMassElecLike_EMC7->GetYaxis()->SetTitle("Cts");
714 
715  fHistInvMassElecLike_EMCEGA = new TH1F("fHistInvMassElecLike_EMCEGA", "Invariant mass for all like-signed electron pairs", 100, 0, .5);
716  fHistInvMassElecLike_EMCEGA->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
717  fHistInvMassElecLike_EMCEGA->GetYaxis()->SetTitle("Cts");
718 
719  fHistInvMassElecLike_EMCJet = new TH1F("fHistInvMassElecLike_EMCJet", "Invariant mass for all like-signed electron pairs", 100, 0, .5);
720  fHistInvMassElecLike_EMCJet->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
721  fHistInvMassElecLike_EMCJet->GetYaxis()->SetTitle("Cts");
722 
723  fHistInvMassElecUnLike_MB = new TH1F("fHistInvMassElecUnLike_MB", "Invariant mass for all unlike-signed electron pairs", 100, 0, .5);
724  fHistInvMassElecUnLike_MB->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
725  fHistInvMassElecUnLike_MB->GetYaxis()->SetTitle("Cts");
726 
727  fHistInvMassElecUnLike_EMC7 = new TH1F("fHistInvMassElecUnLike_EMC7", "Invariant mass for all unlike-signed electron pairs", 100, 0, .5);
728  fHistInvMassElecUnLike_EMC7->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
729  fHistInvMassElecUnLike_EMC7->GetYaxis()->SetTitle("Cts");
730 
731  fHistInvMassElecUnLike_EMCEGA = new TH1F("fHistInvMassElecUnLike_EMCEGA", "Invariant mass for all unlike-signed electron pairs", 100, 0, .5);
732  fHistInvMassElecUnLike_EMCEGA->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
733  fHistInvMassElecUnLike_EMCEGA->GetYaxis()->SetTitle("Cts");
734 
735  fHistInvMassElecUnLike_EMCJet = new TH1F("fHistInvMassElecUnLike_EMCJet", "Invariant mass for all unlike-signed electron pairs", 100, 0, .5);
736  fHistInvMassElecUnLike_EMCJet->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
737  fHistInvMassElecUnLike_EMCJet->GetYaxis()->SetTitle("Cts");
738 
739  //Opening Angle Histos
740 
741  fHistOpAngElecLike_MB = new TH1F("fHistOpAngElecLike_MB", "Opening angle for all like-signed electron pairs", 100, 0, TMath::Pi());
742  fHistOpAngElecLike_MB->GetXaxis()->SetTitle("Opening Angle(rad)");
743  fHistOpAngElecLike_MB->GetYaxis()->SetTitle("Cts");
744 
745  fHistOpAngElecLike_EMC7 = new TH1F("fHistOpAngElecLike_EMC7", "Opening angle for all like-signed electron pairs", 100, 0, TMath::Pi());
746  fHistOpAngElecLike_EMC7->GetXaxis()->SetTitle("Opening Angle(rad)");
747  fHistOpAngElecLike_EMC7->GetYaxis()->SetTitle("Cts");
748 
749  fHistOpAngElecLike_EMCEGA = new TH1F("fHistOpAngElecLike_EMCEGA", "Opening angle for all like-signed electron pairs", 100, 0, TMath::Pi());
750  fHistOpAngElecLike_EMCEGA->GetXaxis()->SetTitle("Opening Angle(rad)");
751  fHistOpAngElecLike_EMCEGA->GetYaxis()->SetTitle("Cts");
752 
753  fHistOpAngElecLike_EMCJet = new TH1F("fHistOpAngElecLike_EMCJet", "Opening angle for all like-signed electron pairs", 100, 0, TMath::Pi());
754  fHistOpAngElecLike_EMCJet->GetXaxis()->SetTitle("Opening Angle(rad)");
755  fHistOpAngElecLike_EMCJet->GetYaxis()->SetTitle("Cts");
756 
757  fHistOpAngElecUnLike_MB = new TH1F("fHistOpAngElecUnLike_MB", "Opening angle for all unlike-signed electron pairs", 100, 0, TMath::Pi());
758  fHistOpAngElecUnLike_MB->GetXaxis()->SetTitle("Opening Angle(rad)");
759  fHistOpAngElecUnLike_MB->GetYaxis()->SetTitle("Cts");
760 
761  fHistOpAngElecUnLike_EMC7 = new TH1F("fHistOpAngElecUnLike_EMC7", "Opening angle for all unlike-signed electron pairs", 100, 0, TMath::Pi());
762  fHistOpAngElecUnLike_EMC7->GetXaxis()->SetTitle("Opening Angle(rad)");
763  fHistOpAngElecUnLike_EMC7->GetYaxis()->SetTitle("Cts");
764 
765  fHistOpAngElecUnLike_EMCEGA = new TH1F("fHistOpAngElecUnLike_EMCEGA", "Opening angle for all unlike-signed electron pairs", 100, 0, TMath::Pi());
766  fHistOpAngElecUnLike_EMCEGA->GetXaxis()->SetTitle("Opening Angle(rad)");
767  fHistOpAngElecUnLike_EMCEGA->GetYaxis()->SetTitle("Cts");
768 
769  fHistOpAngElecUnLike_EMCJet = new TH1F("fHistOpAngElecUnLike_EMCJet", "Opening angle for all unlike-signed electron pairs", 100, 0, TMath::Pi());
770  fHistOpAngElecUnLike_EMCJet->GetXaxis()->SetTitle("Opening Angle(rad)");
771  fHistOpAngElecUnLike_EMCJet->GetYaxis()->SetTitle("Cts");
772 
773  //Rejection Histos
774 
775  fHistPIDRejection = new TH1F("fHistPIDRejection", "PID rejection counts for each detector.", 4, 1, 4);
776  fHistPIDRejection->GetXaxis()->SetTitle("Detector");
777  fHistPIDRejection->GetYaxis()->SetTitle("Cts");
778  fHistPIDRejection->GetXaxis()->SetBinLabel(1, "TPC");
779  fHistPIDRejection->GetXaxis()->SetBinLabel(2, "TOF");
780  fHistPIDRejection->GetXaxis()->SetBinLabel(3, "TRD");
781  fHistPIDRejection->GetXaxis()->SetBinLabel(4, "EMC");
782 
783  //Number of electrons per event histo
784  fHistNElecPerEvent = new TH1F("fHistNElecPerEvent", "Number of tagged electrons per event", 5, 1, 5);
785  fHistNElecPerEvent->GetXaxis()->SetTitle("Num. of Electrons");
786  fHistNElecPerEvent->GetYaxis()->SetTitle("Cts");
787 
788  //PID Plots
789 
790  //TPC PID Plots
791  for(Int_t i=0; i<6; i++){
792  //MB
793  fHistTPC_EMCTRD_MB[i] = new TH2F(TString::Format("fHistTPC_EMCTRD_MB_%s",ptRangesPID[i].Data()), TString::Format("TPC nSigma for tracks with Pt between %s after EMC and TRD cuts",ptRangesPID[i].Data()), 100, 0, 10, 800, -10, 10);
794  fHistTPC_EMCTRD_MB[i]->GetXaxis()->SetTitle("Pt");
795  fHistTPC_EMCTRD_MB[i]->GetYaxis()->SetTitle("nSigma");
796 
797  //EMC7
798  fHistTPC_EMCTRD_EMC7[i] = new TH2F(TString::Format("fHistTPC_EMCTRD_EMC7_%s",ptRangesPID[i].Data()), TString::Format("TPC nSigma for tracks with Pt between %s after EMC and TRD cuts",ptRangesPID[i].Data()), 100, 0, 10, 800, -10, 10);
799  fHistTPC_EMCTRD_EMC7[i]->GetXaxis()->SetTitle("Pt");
800  fHistTPC_EMCTRD_EMC7[i]->GetYaxis()->SetTitle("nSigma");
801 
802  //EMCEGA
803  fHistTPC_EMCTRD_EMCEGA[i] = new TH2F(TString::Format("fHistTPC_EMCTRD_EMCEGA_%s",ptRangesPID[i].Data()), TString::Format("TPC nSigma for tracks with Pt between %s after EMC and TRD cuts",ptRangesPID[i].Data()), 100, 0, 10, 800, -10, 10);
804  fHistTPC_EMCTRD_EMCEGA[i]->GetXaxis()->SetTitle("Pt");
805  fHistTPC_EMCTRD_EMCEGA[i]->GetYaxis()->SetTitle("nSigma");
806 
807  //EMCJet
808  fHistTPC_EMCTRD_EMCJet[i] = new TH2F(TString::Format("fHistTPC_EMCTRD_EMCJet_%s",ptRangesPID[i].Data()), TString::Format("TPC nSigma for tracks with Pt between %s after EMC and TRD cuts",ptRangesPID[i].Data()), 100, 0, 10, 800, -10, 10);
809  fHistTPC_EMCTRD_EMCJet[i]->GetXaxis()->SetTitle("Pt");
810  fHistTPC_EMCTRD_EMCJet[i]->GetYaxis()->SetTitle("nSigma");
811  }
812 
813  //EMC PID Plots
814  for(Int_t i=0; i<6; i++){
815  //MB
816  fHistEMC_TPCTRD_MB[i] = new TH1F(TString::Format("fHistEMC_TPCTRD_MB_%s",ptRangesPID[i].Data()), TString::Format("E/p for tracks with Pt between %s after TPC and TRD cuts",ptRangesPID[i].Data()), 100, 0, 1.5);
817  fHistEMC_TPCTRD_MB[i]->GetXaxis()->SetTitle("E/p");
818  fHistEMC_TPCTRD_MB[i]->GetYaxis()->SetTitle("Cts");
819 
820  //EMC7
821  fHistEMC_TPCTRD_EMC7[i] = new TH1F(TString::Format("fHistEMC_TPCTRD_EMC7_%s",ptRangesPID[i].Data()), TString::Format("E/p for tracks with Pt between %s after TPC and TRD cuts",ptRangesPID[i].Data()), 100, 0, 1.5);
822  fHistEMC_TPCTRD_EMC7[i]->GetXaxis()->SetTitle("E/p");
823  fHistEMC_TPCTRD_EMC7[i]->GetYaxis()->SetTitle("Cts");
824 
825  //EMCEGA
826  fHistEMC_TPCTRD_EMCEGA[i] = new TH1F(TString::Format("fHistEMC_TPCTRD_EMCEGA_%s",ptRangesPID[i].Data()), TString::Format("E/p for tracks with Pt between %s after TPC and TRD cuts",ptRangesPID[i].Data()), 100, 0, 1.5);
827  fHistEMC_TPCTRD_EMCEGA[i]->GetXaxis()->SetTitle("E/p");
828  fHistEMC_TPCTRD_EMCEGA[i]->GetYaxis()->SetTitle("Cts");
829 
830  //EMCJet
831  fHistEMC_TPCTRD_EMCJet[i] = new TH1F(TString::Format("fHistEMC_TPCTRD_EMCJet_%s",ptRangesPID[i].Data()), TString::Format("E/p for tracks with Pt between %s after EMC and TRD cuts",ptRangesPID[i].Data()), 100, 0, 1.5);
832  fHistEMC_TPCTRD_EMCJet[i]->GetXaxis()->SetTitle("E/p");
833  fHistEMC_TPCTRD_EMCJet[i]->GetYaxis()->SetTitle("Cts");
834  }
835 
836  //TRD PID Plots
837  for(Int_t i=0; i<6; i++){
838  //MB
839  fHistTRD_TPCEMC_MB[i] = new TH2F(TString::Format("fHistTRD_TPCEMC_MB_%s",ptRangesPID[i].Data()), TString::Format("TRD electron Likelihood for tracks with Pt between %s after TPC and EMC cuts",ptRangesPID[i].Data()), 100, 0, 10, 800, 0, 1);
840  fHistTRD_TPCEMC_MB[i]->GetXaxis()->SetTitle("Pt");
841  fHistTRD_TPCEMC_MB[i]->GetYaxis()->SetTitle("electron Likelihood");
842 
843  //EMC7
844  fHistTRD_TPCEMC_EMC7[i] = new TH2F(TString::Format("fHistTRD_TPCEMC_EMC7_%s",ptRangesPID[i].Data()), TString::Format("TRD electron Likelihood for tracks with Pt between %s after TPC and EMC cuts",ptRangesPID[i].Data()), 100, 0, 10, 800, 0, 1);
845  fHistTRD_TPCEMC_EMC7[i]->GetXaxis()->SetTitle("Pt");
846  fHistTRD_TPCEMC_EMC7[i]->GetYaxis()->SetTitle("electron Likelihood");
847 
848  //EMCEGA
849  fHistTRD_TPCEMC_EMCEGA[i] = new TH2F(TString::Format("fHistTRD_TPCEMC_EMCEGA_%s",ptRangesPID[i].Data()), TString::Format("TRD electron Likelihood for tracks with Pt between %s after TPC and EMC cuts",ptRangesPID[i].Data()), 100, 0, 10, 800, 0, 1);
850  fHistTRD_TPCEMC_EMCEGA[i]->GetXaxis()->SetTitle("Pt");
851  fHistTRD_TPCEMC_EMCEGA[i]->GetYaxis()->SetTitle("electron Likelihood");
852 
853  //EMCJet
854  fHistTRD_TPCEMC_EMCJet[i] = new TH2F(TString::Format("fHistTRD_TPCEMC_EMCJet_%s",ptRangesPID[i].Data()), TString::Format("TRD electron Likelihood for tracks with Pt between %s after EMC and EMC cuts",ptRangesPID[i].Data()), 100, 0, 10, 800, 0, 1);
855  fHistTRD_TPCEMC_EMCJet[i]->GetXaxis()->SetTitle("Pt");
856  fHistTRD_TPCEMC_EMCJet[i]->GetYaxis()->SetTitle("electron Likelihood");
857  }
858 
859  //DPhi for candidate electrons 2-8 gev and assoc. particles >3gev
860  fHistDPhi28_MB = new TH1F("fHistDPhi28_MB", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
861  fHistDPhi28_MB->GetXaxis()->SetTitle("Delta-Phi");
862  fHistDPhi28_MB->GetYaxis()->SetTitle("Cts");
863 
864  fHistDPhi28_EMC7 = new TH1F("fHistDPhi28_EMC7", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
865  fHistDPhi28_EMC7->GetXaxis()->SetTitle("Delta-Phi");
866  fHistDPhi28_EMC7->GetYaxis()->SetTitle("Cts");
867 
868  fHistDPhi28_EMCEGA = new TH1F("fHistDPhi28_EMCEGA", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
869  fHistDPhi28_EMCEGA->GetXaxis()->SetTitle("Delta-Phi");
870  fHistDPhi28_EMCEGA->GetYaxis()->SetTitle("Cts");
871 
872  fHistDPhi28_EMCJet = new TH1F("fHistDPhi28_EMCJet", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
873  fHistDPhi28_EMCJet->GetXaxis()->SetTitle("Delta-Phi");
874  fHistDPhi28_EMCJet->GetYaxis()->SetTitle("Cts");
875 
876  //DPhi by Eta for triggered particles 2-8 gev and assoc. particles >3gev
877  fHistDPhiDEta28_MB = new TH2F("fHistDPhiDEta28_MB", "Delta-Phi by Delta-Eta for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 50, -TMath::Pi()/2, 3*TMath::Pi()/2, 50, -0.9, 0.9);
878  fHistDPhiDEta28_MB->GetXaxis()->SetTitle("Delta-Phi");
879  fHistDPhiDEta28_MB->GetYaxis()->SetTitle("Delta-Eta");
880  fHistDPhiDEta28_MB->GetZaxis()->SetTitle("Cts");
881 
882  fHistDPhiDEta28_EMC7 = new TH2F("fHistDPhiDEta28_EMC7", "Delta-Phi by Delta-Eta for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 550, -TMath::Pi()/2, 3*TMath::Pi()/2, 50, -0.9, 0.9);
883  fHistDPhiDEta28_EMC7->GetXaxis()->SetTitle("Delta-Phi");
884  fHistDPhiDEta28_EMC7->GetYaxis()->SetTitle("Delta-Eta");
885  fHistDPhiDEta28_EMC7->GetZaxis()->SetTitle("Cts");
886 
887  fHistDPhiDEta28_EMCEGA = new TH2F("fHistDPhiDEta28_EMCEGA", "Delta-Phi by Delta-Eta for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 50, -TMath::Pi()/2, 3*TMath::Pi()/2, 50, -0.9, 0.9);
888  fHistDPhiDEta28_EMCEGA->GetXaxis()->SetTitle("Delta-Phi");
889  fHistDPhiDEta28_EMCEGA->GetYaxis()->SetTitle("Delta-Eta");
890  fHistDPhiDEta28_EMCEGA->GetZaxis()->SetTitle("Cts");
891 
892  fHistDPhiDEta28_EMCJet = new TH2F("fHistDPhiDEta28_EMCJet", "Delta-Phi by Delta-Eta for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 50, -TMath::Pi()/2, 3*TMath::Pi()/2, 50, -0.9, 0.9);
893  fHistDPhiDEta28_EMCJet->GetXaxis()->SetTitle("Delta-Phi");
894  fHistDPhiDEta28_EMCJet->GetYaxis()->SetTitle("Delta-Eta");
895  fHistDPhiDEta28_EMCJet->GetZaxis()->SetTitle("Cts");
896 
897  //DPhi for candidate electrons 2-8 gev and assoc. particles >2Gev for Mixed Events
898  fHistDPhiMix28_MB = new TH1F("fHistDPhiMix28_MB", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev for Mixed Events", 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
899  fHistDPhiMix28_MB->GetXaxis()->SetTitle("Delta-Phi");
900  fHistDPhiMix28_MB->GetYaxis()->SetTitle("Cts");
901 
902  fHistDPhiMix28_EMC7 = new TH1F("fHistDPhiMix28_EMC7", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev for Mixed Events", 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
903  fHistDPhiMix28_EMC7->GetXaxis()->SetTitle("Delta-Phi");
904  fHistDPhiMix28_EMC7->GetYaxis()->SetTitle("Cts");
905 
906  fHistDPhiMix28_EMCEGA = new TH1F("fHistDPhiMix28_EMCEGA", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev for Mixed Events", 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
907  fHistDPhiMix28_EMCEGA->GetXaxis()->SetTitle("Delta-Phi");
908  fHistDPhiMix28_EMCEGA->GetYaxis()->SetTitle("Cts");
909 
910  fHistDPhiMix28_EMCJet = new TH1F("fHistDPhiMix28_EMCJet", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev for Mixed Events", 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
911  fHistDPhiMix28_EMCJet->GetXaxis()->SetTitle("Delta-Phi");
912  fHistDPhiMix28_EMCJet->GetYaxis()->SetTitle("Cts");
913 
914  //DPhi by Eta for triggered particles 2-8 gev and assoc. particles >3gev
915  fHistDPhiDEtaMix28_MB = new TH2F("fHistDPhiDEtaMix28_MB", "Delta-Phi by Delta-Eta for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev for Mixed Events", 50, -TMath::Pi()/2, 3*TMath::Pi()/2, 50, -0.9, 0.9);
916  fHistDPhiDEtaMix28_MB->GetXaxis()->SetTitle("Delta-Phi");
917  fHistDPhiDEtaMix28_MB->GetYaxis()->SetTitle("Delta-Eta");
918  fHistDPhiDEtaMix28_MB->GetZaxis()->SetTitle("Cts");
919 
920  fHistDPhiDEtaMix28_EMC7 = new TH2F("fHistDPhiDEtaMix28_EMC7", "Delta-Phi by Delta-Eta for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev for Mixed Events", 50, -TMath::Pi()/2, 3*TMath::Pi()/2, 50, -0.9, 0.9);
921  fHistDPhiDEtaMix28_EMC7->GetXaxis()->SetTitle("Delta-Phi");
922  fHistDPhiDEtaMix28_EMC7->GetYaxis()->SetTitle("Delta-Eta");
923  fHistDPhiDEtaMix28_EMC7->GetZaxis()->SetTitle("Cts");
924 
925  fHistDPhiDEtaMix28_EMCEGA = new TH2F("fHistDPhiDEtaMix28_EMCEGA", "Delta-Phi by Delta-Eta for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev for Mixed Events", 50, -TMath::Pi()/2, 3*TMath::Pi()/2, 50, -0.9, 0.9);
926  fHistDPhiDEtaMix28_EMCEGA->GetXaxis()->SetTitle("Delta-Phi");
927  fHistDPhiDEtaMix28_EMCEGA->GetYaxis()->SetTitle("Delta-Eta");
928  fHistDPhiDEtaMix28_EMCEGA->GetZaxis()->SetTitle("Cts");
929 
930  fHistDPhiDEtaMix28_EMCJet = new TH2F("fHistDPhiDEtaMix28_EMCJet", "Delta-Phi by Delta-Eta for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev for Mixed Events", 50, -TMath::Pi()/2, 3*TMath::Pi()/2, 50, -0.9, 0.9);
931  fHistDPhiDEtaMix28_EMCJet->GetXaxis()->SetTitle("Delta-Phi");
932  fHistDPhiDEtaMix28_EMCJet->GetYaxis()->SetTitle("Delta-Eta");
933  fHistDPhiDEtaMix28_EMCJet->GetZaxis()->SetTitle("Cts");
934 
935  //DPhi by dEdx for triggered particles 2-8 gev and assoc. particles >2gev
936  fHistDPhi18Spe_MB = new TH2F("fHistDPhi18Spe_MB", "Delta-Phi by most probable species for candidate electrons with 1<pt<8Gev and assoc. with pt>.3Gev", 50, -TMath::Pi()/2, 3*TMath::Pi()/2, 10, 0, 10);
937  fHistDPhi18Spe_MB->GetXaxis()->SetTitle("Delta-Phi");
938  fHistDPhi18Spe_MB->GetYaxis()->SetTitle("Species");
939  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(1, "Unkown");
940  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(2, "Electron");
941  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(3, "Muon");
942  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(4, "Pion");
943  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(5, "Kaon");
944  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(6, "Proton");
945  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(7, "Deuteron");
946  fHistDPhi18Spe_MB->GetZaxis()->SetTitle("Cts");
947 
948  fHistDPhi18Spe_EMC7 = new TH2F("fHistDPhi18Spe_EMC7", "Delta-Phi by most probable species for candidate electrons with 1<pt<8Gev and assoc. with pt>.3Gev", 50, -TMath::Pi()/2, 3*TMath::Pi()/2, 10, 0, 10);
949  fHistDPhi18Spe_EMC7->GetXaxis()->SetTitle("Delta-Phi");
950  fHistDPhi18Spe_EMC7->GetYaxis()->SetTitle("Species");
951  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(1, "Unkown");
952  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(2, "Electron");
953  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(3, "Muon");
954  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(4, "Pion");
955  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(5, "Kaon");
956  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(6, "Proton");
957  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(7, "Deuteron");
958  fHistDPhi18Spe_EMC7->GetZaxis()->SetTitle("Cts");
959 
960  fHistDPhi18Spe_EMCEGA = new TH2F("fHistDPhi18Spe_EMCEGA", "Delta-Phi by most probable species for candidate electrons with 1<pt<8Gev and assoc. with pt>.3Gev", 50, -TMath::Pi()/2, 3*TMath::Pi()/2, 10, 0, 10);
961  fHistDPhi18Spe_EMCEGA->GetXaxis()->SetTitle("Delta-Phi");
962  fHistDPhi18Spe_EMCEGA->GetYaxis()->SetTitle("Species");
963  fHistDPhi18Spe_EMCEGA->GetYaxis()->SetBinLabel(1, "Unkown");
964  fHistDPhi18Spe_EMCEGA->GetYaxis()->SetBinLabel(2, "Electron");
965  fHistDPhi18Spe_EMCEGA->GetYaxis()->SetBinLabel(3, "Muon");
966  fHistDPhi18Spe_EMCEGA->GetYaxis()->SetBinLabel(4, "Pion");
967  fHistDPhi18Spe_EMCEGA->GetYaxis()->SetBinLabel(5, "Kaon");
968  fHistDPhi18Spe_EMCEGA->GetYaxis()->SetBinLabel(6, "Proton");
969  fHistDPhi18Spe_EMCEGA->GetYaxis()->SetBinLabel(7, "Deuteron");
970  fHistDPhi18Spe_EMCEGA->GetZaxis()->SetTitle("Cts");
971 
972  fHistDPhi18Spe_EMCJet = new TH2F("fHistDPhi18Spe_EMCJet", "Delta-Phi by most probable species for candidate electrons with 1<pt<8Gev and assoc. with pt>.3Gev", 50, -TMath::Pi()/2, 3*TMath::Pi()/2, 10, 0, 10);
973  fHistDPhi18Spe_EMCJet->GetXaxis()->SetTitle("Delta-Phi");
974  fHistDPhi18Spe_EMCJet->GetYaxis()->SetTitle("Species");
975  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(1, "Unkown");
976  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(2, "Electron");
977  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(3, "Muon");
978  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(4, "Pion");
979  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(5, "Kaon");
980  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(6, "Proton");
981  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(7, "Deuteron");
982  fHistDPhi18Spe_EMCJet->GetZaxis()->SetTitle("Cts");
983 
984  // Delta Phi for tracks > 300MeV
985  for(Int_t i=0; i<3; i++){
986  fHistDPhi300_1_MB[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.3-1Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<1Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
987  fHistDPhi300_1_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
988  fHistDPhi300_1_MB[i]->GetYaxis()->SetTitle("Cts");
989  }
990 
991  for(Int_t i=0; i<3; i++){
992  fHistDPhi300_1_EMC7[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.3-1Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<1Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
993  fHistDPhi300_1_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
994  fHistDPhi300_1_EMC7[i]->GetYaxis()->SetTitle("Cts");
995  }
996 
997  for(Int_t i=0; i<3; i++){
998  fHistDPhi300_1_EMCEGA[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.3-1Gev_EMCEGA",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<1Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
999  fHistDPhi300_1_EMCEGA[i]->GetXaxis()->SetTitle("Delta-Phi");
1000  fHistDPhi300_1_EMCEGA[i]->GetYaxis()->SetTitle("Cts");
1001  }
1002 
1003  for(Int_t i=0; i<3; i++){
1004  fHistDPhi300_1_EMCJet[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.3-1Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<1Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1005  fHistDPhi300_1_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1006  fHistDPhi300_1_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1007  }
1008 
1009  // Delta Phi for tracks > 1GeV
1010  for(Int_t i=0; i<3; i++){
1011  fHistDPhi1_2_MB[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_1-2Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 1Gev<pt<2Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1012  fHistDPhi1_2_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1013  fHistDPhi1_2_MB[i]->GetYaxis()->SetTitle("Cts");
1014  }
1015 
1016  for(Int_t i=0; i<3; i++){
1017  fHistDPhi1_2_EMC7[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_1-2Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 1Gev<pt<2Gev",ptRangesDPhi[i].Data()).Data(),50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1018  fHistDPhi1_2_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1019  fHistDPhi1_2_EMC7[i]->GetYaxis()->SetTitle("Cts");
1020  }
1021 
1022  for(Int_t i=0; i<3; i++){
1023  fHistDPhi1_2_EMCEGA[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_1-2Gev_EMCEGA",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 1Gev<pt<2Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1024  fHistDPhi1_2_EMCEGA[i]->GetXaxis()->SetTitle("Delta-Phi");
1025  fHistDPhi1_2_EMCEGA[i]->GetYaxis()->SetTitle("Cts");
1026  }
1027 
1028  for(Int_t i=0; i<3; i++){
1029  fHistDPhi1_2_EMCJet[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_1-2Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 1Gev<pt<2Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1030  fHistDPhi1_2_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1031  fHistDPhi1_2_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1032  }
1033 
1034  // Delta Phi for tracks > 2GeV
1035  for(Int_t i=0; i<3; i++){
1036  fHistDPhi2_4_MB[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_2-4Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<4Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1037  fHistDPhi2_4_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1038  fHistDPhi2_4_MB[i]->GetYaxis()->SetTitle("Cts");
1039  }
1040 
1041  for(Int_t i=0; i<3; i++){
1042  fHistDPhi2_4_EMC7[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_2-4Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<4Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1043  fHistDPhi2_4_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1044  fHistDPhi2_4_EMC7[i]->GetYaxis()->SetTitle("Cts");
1045  }
1046 
1047  for(Int_t i=0; i<3; i++){
1048  fHistDPhi2_4_EMCEGA[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_2-4Gev_EMCEGA",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<4Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1049  fHistDPhi2_4_EMCEGA[i]->GetXaxis()->SetTitle("Delta-Phi");
1050  fHistDPhi2_4_EMCEGA[i]->GetYaxis()->SetTitle("Cts");
1051  }
1052 
1053  for(Int_t i=0; i<3; i++){
1054  fHistDPhi2_4_EMCJet[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_2-4Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<4Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1055  fHistDPhi2_4_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1056  fHistDPhi2_4_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1057  }
1058 
1059  // Delta Phi for tracks > 3GeV
1060  for(Int_t i=0; i<3; i++){
1061  fHistDPhi4_8_MB[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_4-8Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 4Gev<pt<8Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1062  fHistDPhi4_8_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1063  fHistDPhi4_8_MB[i]->GetYaxis()->SetTitle("Cts");
1064  }
1065 
1066  for(Int_t i=0; i<3; i++){
1067  fHistDPhi4_8_EMC7[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_4-8Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 4Gev<pt<8Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1068  fHistDPhi4_8_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1069  fHistDPhi4_8_EMC7[i]->GetYaxis()->SetTitle("Cts");
1070  }
1071 
1072  for(Int_t i=0; i<3; i++){
1073  fHistDPhi4_8_EMCEGA[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_4-8Gev_EMCEGA",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 4Gev<pt<8Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1074  fHistDPhi4_8_EMCEGA[i]->GetXaxis()->SetTitle("Delta-Phi");
1075  fHistDPhi4_8_EMCEGA[i]->GetYaxis()->SetTitle("Cts");
1076  }
1077 
1078  for(Int_t i=0; i<3; i++){
1079  fHistDPhi4_8_EMCJet[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_4-8Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 4Gev<pt<8Gev",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1080  fHistDPhi4_8_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1081  fHistDPhi4_8_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1082  }
1083 
1084 
1085 
1086  //Mixed Event DPhi plots
1087 
1088  // Delta Phi for tracks > 300MeV
1089 
1090  for(Int_t i=0; i<3; i++){
1091  fHistDPhiMix300_1_MB[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.3-1Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<1Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1092  fHistDPhiMix300_1_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1093  fHistDPhiMix300_1_MB[i]->GetYaxis()->SetTitle("Cts");
1094  }
1095 
1096  for(Int_t i=0; i<3; i++){
1097  fHistDPhiMix300_1_EMC7[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.3-1Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<1Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1098  fHistDPhiMix300_1_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1099  fHistDPhiMix300_1_EMC7[i]->GetYaxis()->SetTitle("Cts");
1100  }
1101 
1102  for(Int_t i=0; i<3; i++){
1103  fHistDPhiMix300_1_EMCEGA[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.3-1Gev_EMCEGA",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<1Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1104  fHistDPhiMix300_1_EMCEGA[i]->GetXaxis()->SetTitle("Delta-Phi");
1105  fHistDPhiMix300_1_EMCEGA[i]->GetYaxis()->SetTitle("Cts");
1106  }
1107 
1108  for(Int_t i=0; i<3; i++){
1109  fHistDPhiMix300_1_EMCJet[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.3-1Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<1Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1110  fHistDPhiMix300_1_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1111  fHistDPhiMix300_1_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1112  }
1113 
1114  // Delta Phi for tracks > 1GeV
1115  for(Int_t i=0; i<3; i++){
1116  fHistDPhiMix1_2_MB[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_1-2Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 1Gev<pt<2Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1117  fHistDPhiMix1_2_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1118  fHistDPhiMix1_2_MB[i]->GetYaxis()->SetTitle("Cts");
1119  }
1120 
1121  for(Int_t i=0; i<3; i++){
1122  fHistDPhiMix1_2_EMC7[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_1-2Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 1Gev<pt<2Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1123  fHistDPhiMix1_2_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1124  fHistDPhiMix1_2_EMC7[i]->GetYaxis()->SetTitle("Cts");
1125  }
1126 
1127  for(Int_t i=0; i<3; i++){
1128  fHistDPhiMix1_2_EMCEGA[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_1-2Gev_EMCEGA",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 1Gev<pt<2Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1129  fHistDPhiMix1_2_EMCEGA[i]->GetXaxis()->SetTitle("Delta-Phi");
1130  fHistDPhiMix1_2_EMCEGA[i]->GetYaxis()->SetTitle("Cts");
1131  }
1132 
1133  for(Int_t i=0; i<3; i++){
1134  fHistDPhiMix1_2_EMCJet[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_1-2Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 1Gev<pt<2Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1135  fHistDPhiMix1_2_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1136  fHistDPhiMix1_2_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1137  }
1138 
1139  // Delta Phi for tracks > 2GeV
1140  for(Int_t i=0; i<3; i++){
1141  fHistDPhiMix2_4_MB[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_2-4Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<4Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1142  fHistDPhiMix2_4_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1143  fHistDPhiMix2_4_MB[i]->GetYaxis()->SetTitle("Cts");
1144  }
1145 
1146  for(Int_t i=0; i<3; i++){
1147  fHistDPhiMix2_4_EMC7[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_2-4Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<4Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1148  fHistDPhiMix2_4_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1149  fHistDPhiMix2_4_EMC7[i]->GetYaxis()->SetTitle("Cts");
1150  }
1151 
1152  for(Int_t i=0; i<3; i++){
1153  fHistDPhiMix2_4_EMCEGA[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_2-4Gev_EMCEGA",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<4Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1154  fHistDPhiMix2_4_EMCEGA[i]->GetXaxis()->SetTitle("Delta-Phi");
1155  fHistDPhiMix2_4_EMCEGA[i]->GetYaxis()->SetTitle("Cts");
1156  }
1157 
1158  for(Int_t i=0; i<3; i++){
1159  fHistDPhiMix2_4_EMCJet[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_2-4Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<4Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1160  fHistDPhiMix2_4_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1161  fHistDPhiMix2_4_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1162  }
1163 
1164  // Delta Phi for tracks > 3GeV
1165  for(Int_t i=0; i<3; i++){
1166  fHistDPhiMix4_8_MB[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_4-8Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 4Gev<pt<8Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1167  fHistDPhiMix4_8_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1168  fHistDPhiMix4_8_MB[i]->GetYaxis()->SetTitle("Cts");
1169  }
1170 
1171  for(Int_t i=0; i<3; i++){
1172  fHistDPhiMix4_8_EMC7[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_4-8Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 4Gev<pt<8Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1173  fHistDPhiMix4_8_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1174  fHistDPhiMix4_8_EMC7[i]->GetYaxis()->SetTitle("Cts");
1175  }
1176 
1177  for(Int_t i=0; i<3; i++){
1178  fHistDPhiMix4_8_EMCEGA[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_4-8Gev_EMCEGA",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 4Gev<pt<8Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1179  fHistDPhiMix4_8_EMCEGA[i]->GetXaxis()->SetTitle("Delta-Phi");
1180  fHistDPhiMix4_8_EMCEGA[i]->GetYaxis()->SetTitle("Cts");
1181  }
1182 
1183  for(Int_t i=0; i<3; i++){
1184  fHistDPhiMix4_8_EMCJet[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_4-8Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 4Gev<pt<8Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 50, -TMath::Pi()/2, 3*TMath::Pi()/2);
1185  fHistDPhiMix4_8_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1186  fHistDPhiMix4_8_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1187  }
1188 
1189 
1190 
1191  //Hadron e/p plot
1192  fHistEMC_Had_MB_1Gev = new TH1F("fHistEMC_Had_MB_1Gev", "E/p for hadrons with Pt between 1-2Gev", 100, 0, 1.5);
1193  fHistEMC_Had_MB_1Gev->GetXaxis()->SetTitle("E/p");
1194  fHistEMC_Had_MB_1Gev->GetYaxis()->SetTitle("Cts");
1195 
1196  // Eta-Phi distribution for tagged events
1197  fHistEtaPhiTag_MB = new TH2F("fHistEtaPhiTag_MB", "Eta-Phi distribution of tracks in tagged events", 100, -.9,.9,100,0,2*TMath::Pi());
1198  fHistEtaPhiTag_MB->GetXaxis()->SetTitle("Eta");
1199  fHistEtaPhiTag_MB->GetYaxis()->SetTitle("Phi");
1200 
1201  fHistEtaPhiTag_EMC7 = new TH2F("fHistEtaPhiTag_EMC7", "Eta-Phi distribution of tracks in tagged events", 100, -.9,.9,100,0,2*TMath::Pi());
1202  fHistEtaPhiTag_EMC7->GetXaxis()->SetTitle("Eta");
1203  fHistEtaPhiTag_EMC7->GetYaxis()->SetTitle("Phi");
1204 
1205  fHistEtaPhiTag_EMCEGA = new TH2F("fHistEtaPhiTag_EMCEGA", "Eta-Phi distribution of tracks in tagged events", 100, -.9,.9,100,0,2*TMath::Pi());
1206  fHistEtaPhiTag_EMCEGA->GetXaxis()->SetTitle("Eta");
1207  fHistEtaPhiTag_EMCEGA->GetYaxis()->SetTitle("Phi");
1208 
1209  fHistEtaPhiTag_EMCJet = new TH2F("fHistEtaPhiTag_EMCJet", "Eta-Phi distribution of tracks in tagged events", 100, -.9,.9,100,0,2*TMath::Pi());
1210  fHistEtaPhiTag_EMCJet->GetXaxis()->SetTitle("Eta");
1211  fHistEtaPhiTag_EMCJet->GetYaxis()->SetTitle("Phi");
1212 
1213  // Eta-Phi distribution
1214  fHistEtaPhi_MB = new TH2F("fHistEtaPhi_MB", "Eta-Phi distribution of tracks", 100, -.9,.9,100,0,2*TMath::Pi());
1215  fHistEtaPhi_MB->GetXaxis()->SetTitle("Eta");
1216  fHistEtaPhi_MB->GetYaxis()->SetTitle("Phi");
1217 
1218  fHistEtaPhi_EMC7 = new TH2F("fHistEtaPhi_EMC7", "Eta-Phi distribution of tracks", 100, -.9,.9,100,0,2*TMath::Pi());
1219  fHistEtaPhi_EMC7->GetXaxis()->SetTitle("Eta");
1220  fHistEtaPhi_EMC7->GetYaxis()->SetTitle("Phi");
1221 
1222  fHistEtaPhi_EMCEGA = new TH2F("fHistEtaPhi_EMCEGA", "Eta-Phi distribution of tracks", 100, -.9,.9,100,0,2*TMath::Pi());
1223  fHistEtaPhi_EMCEGA->GetXaxis()->SetTitle("Eta");
1224  fHistEtaPhi_EMCEGA->GetYaxis()->SetTitle("Phi");
1225 
1226  fHistEtaPhi_EMCJet = new TH2F("fHistEtaPhi_EMCJet", "Eta-Phi distribution of tracks", 100, -.9,.9,100,0,2*TMath::Pi());
1227  fHistEtaPhi_EMCJet->GetXaxis()->SetTitle("Eta");
1228  fHistEtaPhi_EMCJet->GetYaxis()->SetTitle("Phi");
1229 
1230  fHistEtaPhiTPCOnly_MB = new TH2F("fHistEtaPhiTPCOnly_MB", "Eta-Phi distribution of TPC only tracks", 100, -.9,.9,100,0,2*TMath::Pi());
1231  fHistEtaPhiTPCOnly_MB->GetXaxis()->SetTitle("Eta");
1232  fHistEtaPhiTPCOnly_MB->GetYaxis()->SetTitle("Phi");
1233 
1234  // Energy per event histos
1235  fHistPtSum_MB = new TH1F("fHistPtSum_MB", "Pt sum for events w/o an electron candidate", 500, 0, 500);
1236  fHistPtSum_MB->GetXaxis()->SetTitle("Pt Sum");
1237  fHistPtSum_MB->GetYaxis()->SetTitle("Cts");
1238 
1239  fHistPtSum_EMC7 = new TH1F("fHistPtSum_EMC7", "Pt sum for events w/o an electron candidate", 500, 0, 500);
1240  fHistPtSum_EMC7->GetXaxis()->SetTitle("Pt Sum");
1241  fHistPtSum_EMC7->GetYaxis()->SetTitle("Cts");
1242 
1243  fHistPtSum_EMCEGA = new TH1F("fHistPtSum_EMCEGA", "Pt sum for events w/o an electron candidate", 500, 0, 500);
1244  fHistPtSum_EMCEGA->GetXaxis()->SetTitle("Pt Sum");
1245  fHistPtSum_EMCEGA->GetYaxis()->SetTitle("Cts");
1246 
1247  fHistPtSum_EMCJet = new TH1F("fHistPtSum_EMCJet", "Pt sum for events w/o an electron candidate", 500, 0, 500);
1248  fHistPtSum_EMCJet->GetXaxis()->SetTitle("Pt Sum");
1249  fHistPtSum_EMCJet->GetYaxis()->SetTitle("Cts");
1250 
1251  // Energy per tagged event histos
1252  fHistPtSumTag_MB = new TH1F("fHistPtSumTag_MB", "Pt sum for events w/ an electron candidate", 500, 0, 500);
1253  fHistPtSumTag_MB->GetXaxis()->SetTitle("Pt Sum");
1254  fHistPtSumTag_MB->GetYaxis()->SetTitle("Cts");
1255 
1256  fHistPtSumTag_EMC7 = new TH1F("fHistPtSumTag_EMC7", "Pt sum for events w/ an electron candidate", 500, 0, 500);
1257  fHistPtSumTag_EMC7->GetXaxis()->SetTitle("Pt Sum");
1258  fHistPtSumTag_EMC7->GetYaxis()->SetTitle("Cts");
1259 
1260  fHistPtSumTag_EMCEGA = new TH1F("fHistPtSumTag_EMCEGA", "Pt sum for events w/ an electron candidate", 500, 0, 500);
1261  fHistPtSumTag_EMCEGA->GetXaxis()->SetTitle("Pt Sum");
1262  fHistPtSumTag_EMCEGA->GetYaxis()->SetTitle("Cts");
1263 
1264  fHistPtSumTag_EMCJet = new TH1F("fHistPtSumTag_EMCJet", "Pt sum for events w/ an electron candidate", 500, 0, 500);
1265  fHistPtSumTag_EMCJet->GetXaxis()->SetTitle("Pt Sum");
1266  fHistPtSumTag_EMCJet->GetYaxis()->SetTitle("Cts");
1267 
1268  // Energy per event in EMC acceptance histos
1269  fHistPtSumEMC_MB = new TH1F("fHistPtSumEMC_MB", "Pt sum for events in EMCal acceptance", 500, 0, 500);
1270  fHistPtSumEMC_MB->GetXaxis()->SetTitle("Pt Sum");
1271  fHistPtSumEMC_MB->GetYaxis()->SetTitle("Cts");
1272 
1273  fHistPtSumEMC_EMC7 = new TH1F("fHistPtSumEMC_EMC7", "Pt sum for events in EMCal acceptance", 500, 0, 500);
1274  fHistPtSumEMC_EMC7->GetXaxis()->SetTitle("Pt Sum");
1275  fHistPtSumEMC_EMC7->GetYaxis()->SetTitle("Cts");
1276 
1277  fHistPtSumEMC_EMCEGA = new TH1F("fHistPtSumEMC_EMCEGA", "Pt sum for events in EMCal acceptance", 500, 0, 500);
1278  fHistPtSumEMC_EMCEGA->GetXaxis()->SetTitle("Pt Sum");
1279  fHistPtSumEMC_EMCEGA->GetYaxis()->SetTitle("Cts");
1280 
1281  fHistPtSumEMC_EMCJet = new TH1F("fHistPtSumEMC_EMCJet", "Pt sum for events in EMCal acceptance", 500, 0, 500);
1282  fHistPtSumEMC_EMCJet->GetXaxis()->SetTitle("Pt Sum");
1283  fHistPtSumEMC_EMCJet->GetYaxis()->SetTitle("Cts");
1284 
1285  // Numbers of events
1286  fHistNevents_MB = new TH1F("fHistNevents_MB", "Number of events that have an 'electron'", 2,0,1);
1287  fHistNevents_MB->GetXaxis()->SetBinLabel(1,"Events");
1288  fHistNevents_MB->GetXaxis()->SetBinLabel(2,"Events containing candidates");
1289  fHistNevents_MB->GetYaxis()->SetTitle("Cts");
1290 
1291  fHistNevents_EMC7 = new TH1F("fHistNevents_EMC7", "Number of events that have an 'electron'", 2,0,1);
1292  fHistNevents_EMC7->GetXaxis()->SetBinLabel(1,"Events");
1293  fHistNevents_EMC7->GetXaxis()->SetBinLabel(2,"Events containing candidates");
1294  fHistNevents_EMC7->GetYaxis()->SetTitle("Cts");
1295 
1296  fHistNevents_EMCEGA = new TH1F("fHistNevents_EMCEGA", "Number of events that have an 'electron'", 2,0,1);
1297  fHistNevents_EMCEGA->GetXaxis()->SetBinLabel(1,"Events");
1298  fHistNevents_EMCEGA->GetXaxis()->SetBinLabel(2,"Events containing candidates");
1299  fHistNevents_EMCEGA->GetYaxis()->SetTitle("Cts");
1300 
1301  fHistNevents_EMCJet = new TH1F("fHistNevents_EMCJet", "Number of events that have an 'electron'", 2,0,1);
1302  fHistNevents_EMCJet->GetXaxis()->SetBinLabel(1,"Events");
1303  fHistNevents_EMCJet->GetXaxis()->SetBinLabel(2,"Events containing candidates");
1304  fHistNevents_EMCJet->GetYaxis()->SetTitle("Cts");
1305 
1306  //Impact Parameter histos
1307  fHistImpPar_MB = new TH1F("fHistImpPar_MB", "Impact Parameter distribution in xy plane for all tracks", 100,-1, 1);
1308  fHistImpPar_MB->GetXaxis()->SetTitle("Impact Parameter(cm)");
1309  fHistImpPar_MB->GetYaxis()->SetTitle("Count");
1310 
1311  fHistImpPar_EMC7 = new TH1F("fHistImpPar_EMC7", "Impact Parameter distribution in xy plane for all tracks", 100,-1, 1);
1312  fHistImpPar_EMC7->GetXaxis()->SetTitle("Impact Parameter(cm)");
1313  fHistImpPar_EMC7->GetYaxis()->SetTitle("Count");
1314 
1315  fHistImpPar_EMCEGA = new TH1F("fHistImpPar_EMCEGA", "Impact Parameter distribution in xy plane for all tracks", 100,-1, 1);
1316  fHistImpPar_EMCEGA->GetXaxis()->SetTitle("Impact Parameter(cm)");
1317  fHistImpPar_EMCEGA->GetYaxis()->SetTitle("Count");
1318 
1319  fHistImpPar_EMCJet = new TH1F("fHistImpPar_EMCJet", "Impact Parameter distribution in xy plane for all tracks", 100,-1, 1);
1320  fHistImpPar_EMCJet->GetXaxis()->SetTitle("Impact Parameter(cm)");
1321  fHistImpPar_EMCJet->GetYaxis()->SetTitle("Count");
1322 
1323  //Impact Parameter for tagged electrons histos
1324  fHistImpParTag_MB = new TH1F("fHistImpParTag_MB", "Impact Parameter distribution in xy plane for electron candidates", 100,-1, 1);
1325  fHistImpParTag_MB->GetXaxis()->SetTitle("Impact Parameter(cm)");
1326  fHistImpParTag_MB->GetYaxis()->SetTitle("Count");
1327 
1328  fHistImpParTag_EMC7 = new TH1F("fHistImpParTag_EMC7", "Impact Parameter distribution in xy plane for electron candidates", 100,-1, 1);
1329  fHistImpParTag_EMC7->GetXaxis()->SetTitle("Impact Parameter(cm)");
1330  fHistImpParTag_EMC7->GetYaxis()->SetTitle("Count");
1331 
1332  fHistImpParTag_EMCEGA = new TH1F("fHistImpParTag_EMCEGA", "Impact Parameter distribution in xy plane for electron candidates", 100,-1, 1);
1333  fHistImpParTag_EMCEGA->GetXaxis()->SetTitle("Impact Parameter(cm)");
1334  fHistImpParTag_EMCEGA->GetYaxis()->SetTitle("Count");
1335 
1336  fHistImpParTag_EMCJet = new TH1F("fHistImpParTag_EMCJet", "Impact Parameter distribution in xy plane for electron candidates", 100,-1, 1);
1337  fHistImpParTag_EMCJet->GetXaxis()->SetTitle("Impact Parameter(cm)");
1338  fHistImpParTag_EMCJet->GetYaxis()->SetTitle("Count");
1339 
1340  //Number of clusters per track in TPC
1341  fHistTPCNClus_MB = new TH1F("fHistTPCNClus_MB", "Number of Clusters per track in TPC", 159, 0, 159);
1342  fHistTPCNClus_MB->GetXaxis()->SetTitle("Number of TPC Clusters");
1343  fHistTPCNClus_MB->GetYaxis()->SetTitle("Number of Tracks");
1344 
1345  fHistTPCNClus_EMC7 = new TH1F("fHistTPCNClus_EMC7", "Number of Clusters per track in TPC", 159, 0, 159);
1346  fHistTPCNClus_EMC7->GetXaxis()->SetTitle("Number of TPC Clusters");
1347  fHistTPCNClus_EMC7->GetYaxis()->SetTitle("Number of Tracks");
1348 
1349  fHistTPCNClus_EMCEGA = new TH1F("fHistTPCNClus_EMCEGA", "Number of Clusters per track in TPC", 159, 0, 159);
1350  fHistTPCNClus_EMCEGA->GetXaxis()->SetTitle("Number of TPC Clusters");
1351  fHistTPCNClus_EMCEGA->GetYaxis()->SetTitle("Number of Tracks");
1352 
1353  fHistTPCNClus_EMCJet = new TH1F("fHistTPCNClus_EMCJet", "Number of Clusters per track in TPC", 159, 0, 159);
1354  fHistTPCNClus_EMCJet->GetXaxis()->SetTitle("Number of TPC Clusters");
1355  fHistTPCNClus_EMCJet->GetYaxis()->SetTitle("Number of Tracks");
1356 
1357  //Number of clusters per track in ITS
1358  fHistITSNClus_MB = new TH1F("fHistITSNClus_MB", "Number of Clusters per Track in ITS", 10, 0, 10);
1359  fHistITSNClus_MB->GetXaxis()->SetTitle("Number of ITS Clusters");
1360  fHistITSNClus_MB->GetYaxis()->SetTitle("Number of Tracks");
1361 
1362  fHistITSNClus_EMC7 = new TH1F("fHistITSNClus_EMC7", "Number of Clusters per Track in ITS", 10, 0, 10);
1363  fHistITSNClus_EMC7->GetXaxis()->SetTitle("Number of ITS Clusters");
1364  fHistITSNClus_EMC7->GetYaxis()->SetTitle("Number of Tracks");
1365 
1366  fHistITSNClus_EMCEGA = new TH1F("fHistITSNClus_EMCEGA", "Number of Clusters per Track in ITS", 10, 0, 10);
1367  fHistITSNClus_EMCEGA->GetXaxis()->SetTitle("Number of ITS Clusters");
1368  fHistITSNClus_EMCEGA->GetYaxis()->SetTitle("Number of Tracks");
1369 
1370  fHistITSNClus_EMCJet = new TH1F("fHistITSNClus_EMCJet", "Number of Clusters per Track in ITS", 10, 0, 10);
1371  fHistITSNClus_EMCJet->GetXaxis()->SetTitle("Number of ITS Clusters");
1372  fHistITSNClus_EMCJet->GetYaxis()->SetTitle("Number of Tracks");
1373 
1374  // Pt distribution of all tracks and tagged tracks
1375  fHistPtAssoc_MB = new TH1F("fHistPtAssoc_MB", "Pt distribution for associated tracks", 100,0, 15);
1376  fHistPtAssoc_MB->GetXaxis()->SetTitle("Pt(Gev)");
1377  fHistPtAssoc_MB->GetYaxis()->SetTitle("Count");
1378 
1379  fHistPtAssoc_EMC7 = new TH1F("fHistPtAssoc_EMC7", "Pt distribution for associated tracks", 100,0, 15);
1380  fHistPtAssoc_EMC7->GetXaxis()->SetTitle("Pt(Gev)");
1381  fHistPtAssoc_EMC7->GetYaxis()->SetTitle("Count");
1382 
1383  fHistPtAssoc_EMCEGA = new TH1F("fHistPtAssoc_EMCEGA", "Pt distribution for associated tracks", 100,0, 15);
1384  fHistPtAssoc_EMCEGA->GetXaxis()->SetTitle("Pt(Gev)");
1385  fHistPtAssoc_EMCEGA->GetYaxis()->SetTitle("Count");
1386 
1387  fHistPtAssoc_EMCJet = new TH1F("fHistPtAssoc_EMCJet", "Pt distribution for associated tracks", 100,0, 15);
1388  fHistPtAssoc_EMCJet->GetXaxis()->SetTitle("Pt(Gev)");
1389  fHistPtAssoc_EMCJet->GetYaxis()->SetTitle("Count");
1390 
1391  // Pt distribution of all tracks for mixed events
1392  fHistPtAssocMix_MB = new TH1F("fHistPtAssocMix_MB", "Pt distribution for associated tracks in mixed events", 100,0, 15);
1393  fHistPtAssocMix_MB->GetXaxis()->SetTitle("Pt(Gev)");
1394  fHistPtAssocMix_MB->GetYaxis()->SetTitle("Count");
1395 
1396  fHistPtAssocMix_EMC7 = new TH1F("fHistPtAssocMix_EMC7", "Pt distribution for associated tracks in mixed events", 100,0, 15);
1397  fHistPtAssocMix_EMC7->GetXaxis()->SetTitle("Pt(Gev)");
1398  fHistPtAssocMix_EMC7->GetYaxis()->SetTitle("Count");
1399 
1400  fHistPtAssocMix_EMCEGA = new TH1F("fHistPtAssocMix_EMCEGA", "Pt distribution for associated tracks in mixed events", 100,0, 15);
1401  fHistPtAssocMix_EMCEGA->GetXaxis()->SetTitle("Pt(Gev)");
1402  fHistPtAssocMix_EMCEGA->GetYaxis()->SetTitle("Count");
1403 
1404  fHistPtAssocMix_EMCJet = new TH1F("fHistPtAssocMix_EMCJet", "Pt distribution for associated tracks in mixed events", 100,0, 15);
1405  fHistPtAssocMix_EMCJet->GetXaxis()->SetTitle("Pt(Gev)");
1406  fHistPtAssocMix_EMCJet->GetYaxis()->SetTitle("Count");
1407 
1408  //Impact Parameter for tagged electrons histos
1409  fHistPtTag_MB = new TH1F("fHistPtTag_MB", "Pt distribution for electron candidates", 100,0, 15);
1410  fHistPtTag_MB->GetXaxis()->SetTitle("Pt(Gev)");
1411  fHistPtTag_MB->GetYaxis()->SetTitle("Count");
1412 
1413  fHistPtTag_EMC7 = new TH1F("fHistPtTag_EMC7", "Pt distribution for electron candidates", 100,0, 15);
1414  fHistPtTag_EMC7->GetXaxis()->SetTitle("Pt(Gev)");
1415  fHistPtTag_EMC7->GetYaxis()->SetTitle("Count");
1416 
1417  fHistPtTag_EMCEGA = new TH1F("fHistPtTag_EMCEGA", "Pt distribution for electron candidates", 100,0, 15);
1418  fHistPtTag_EMCEGA->GetXaxis()->SetTitle("Pt(Gev)");
1419  fHistPtTag_EMCEGA->GetYaxis()->SetTitle("Count");
1420 
1421  fHistPtTag_EMCJet = new TH1F("fHistPtTag_EMCJet", "Pt distribution for electron candidates", 100,0, 15);
1422  fHistPtTag_EMCJet->GetXaxis()->SetTitle("Pt(Gev)");
1423  fHistPtTag_EMCJet->GetYaxis()->SetTitle("Count");
1424 
1425  //test histos
1426  fHistTestDCA = new TH1F("fHistTestDCA", "DCA distribution for all tracks with DPhi to any candidate electron <0.1 rad", 100,-15, 15);
1427  fHistTestDCA->GetXaxis()->SetTitle("DCA(cm)");
1428  fHistTestDCA->GetYaxis()->SetTitle("Count");
1429 
1430  fHistTestEMCEnergy = new TH1F("fHistTestEMCEnergy", "Energy from EMCal for all tracks with DPhi to any candidate electron <0.1 rad", 100, 0, 10);
1431  fHistTestEMCEnergy->GetXaxis()->SetTitle("EMC Energy[GeV]");
1432  fHistTestEMCEnergy->GetYaxis()->SetTitle("Counts");
1433 
1434  fHistTestTPCdEdx = new TH2F("fHistTestTPCdEdx", "TPC dE/dx for all tracks with DPhi to any candidate electron <0.1 rad", 100, 0,8, 300, -30, 180);
1435  fHistTestTPCdEdx->GetYaxis()->SetTitle("TPC dE/dx[a.u.]");
1436  fHistTestTPCdEdx->GetXaxis()->SetTitle("pT[GeV/c]");
1437 
1438  fHistTestEOP = new TH1F("fHistTestEOP", "E/p for all tracks with DPhi to any candidate electron <0.1 rad", 30, 0, 1.5);
1439  fHistTestEOP->GetXaxis()->SetTitle("E/p[c]");
1440  fHistTestEOP->GetYaxis()->SetTitle("Counts");
1441 
1442  fHistTestOGDPhi = new TH1F("fHistTestOGDPhi", "Original DPhi before periodicity correction", 100, -2*TMath::Pi(), 2*TMath::Pi());
1443  fHistTestOGDPhi->GetXaxis()->SetTitle("DPhi[rad]");
1444  fHistTestOGDPhi->GetYaxis()->SetTitle("Counts");
1445 
1446  fHistTestPt = new TH1F("fHistTestPt", "Pt distribution for associated particles nearly on top of tagged particle", 30, 0, 8);
1447  fHistTestPt->GetXaxis()->SetTitle("Pt[Gev/c]");
1448  fHistTestPt->GetYaxis()->SetTitle("Cts");
1449 
1450  fHistTestInvMassElecLike = new TH1F("fHistTestInvMassElecLike", "Invariant Mass distribution for associated electrons of like sign in |DPhi|<0.1rad", 30, 0, 8);
1451  fHistTestInvMassElecLike->GetXaxis()->SetTitle("Mass[Gev/c^2]");
1452  fHistTestInvMassElecLike->GetYaxis()->SetTitle("Cts");
1453 
1454  fHistTestInvMassElecUnLike = new TH1F("fHistTestInvMassElecUnLike", "Invariant Mass distribution for associated electrons of unlike sign with |DPhi|<0.1rad", 30, 0, 8);
1455  fHistTestInvMassElecUnLike->GetXaxis()->SetTitle("Mass[Gev/c^2]");
1456  fHistTestInvMassElecUnLike->GetYaxis()->SetTitle("Cts");
1457 
1458  fHistTestInvMassPionLike = new TH1F("fHistTestInvMassPionLike", "Invariant Mass distribution for associated pions with |DPhi|<0.1rad", 30, 0, 8);
1459  fHistTestInvMassPionLike->GetXaxis()->SetTitle("Mass[Gev/c^2]");
1460  fHistTestInvMassPionLike->GetYaxis()->SetTitle("Cts");
1461 
1462  fHistTestInvMassPionUnLike = new TH1F("fHistTestInvMassPionUnLike", "Invariant Mass distribution for associated pions with |DPhi|<0.1rad", 30, 0, 8);
1463  fHistTestInvMassPionUnLike->GetXaxis()->SetTitle("Mass[Gev/c^2]");
1464  fHistTestInvMassPionUnLike->GetYaxis()->SetTitle("Cts");
1465 
1466  //DPhi by dEdx for triggered particles 1-8 gev and assoc. particles >.3gev
1467  fHistTestDPhiSpeNoSec = new TH2F("fHistTestDPhiSpeNoSec", "Delta-Phi by most probable species for candidate electrons with 1<pt<8Gev and assoc. with pt>.3Gev with no secondary tracks", 100, -TMath::Pi()/2, 3*TMath::Pi()/2, 10, 0, 10);
1468  fHistTestDPhiSpeNoSec->GetXaxis()->SetTitle("Delta-Phi");
1469  fHistTestDPhiSpeNoSec->GetYaxis()->SetTitle("Species");
1470  fHistTestDPhiSpeNoSec->GetYaxis()->SetBinLabel(1, "Unkown");
1471  fHistTestDPhiSpeNoSec->GetYaxis()->SetBinLabel(2, "Electron");
1472  fHistTestDPhiSpeNoSec->GetYaxis()->SetBinLabel(3, "Muon");
1473  fHistTestDPhiSpeNoSec->GetYaxis()->SetBinLabel(4, "Pion");
1474  fHistTestDPhiSpeNoSec->GetYaxis()->SetBinLabel(5, "Kaon");
1475  fHistTestDPhiSpeNoSec->GetYaxis()->SetBinLabel(6, "Proton");
1476  fHistTestDPhiSpeNoSec->GetYaxis()->SetBinLabel(7, "Deuteron");
1477  fHistTestDPhiSpeNoSec->GetZaxis()->SetTitle("Cts");
1478 
1479  //DPhi by track type to test for tpconly tracks for triggered particles 1-8 gev and assoc. particles >.3gev
1480  fHistTestDPhiType = new TH2F("fHistTestDPhiType", "Delta-Phi by track type for candidate electrons with 1<pt<8Gev and assoc. with pt>.3Gev", 100, -TMath::Pi()/2, 3*TMath::Pi()/2, 4, 0, 4);
1481  fHistTestDPhiType->GetXaxis()->SetTitle("Delta-Phi");
1482  fHistTestDPhiType->GetYaxis()->SetTitle("Track Type");
1483  fHistTestDPhiType->GetYaxis()->SetBinLabel(1, "Hybrid");
1484  fHistTestDPhiType->GetYaxis()->SetBinLabel(2, "Complementary");
1485  fHistTestDPhiType->GetYaxis()->SetBinLabel(3, "TPC Only");
1486  fHistTestDPhiType->GetZaxis()->SetTitle("Cts");
1487 
1488  //DPhi for candidate electrons 1-8 gev and assoc. particles >.3gev with secondaries
1489  fHistTestDPhi18Sec = new TH1F("fHistTestDPhi18Sec", "Delta-Phi for candidate electrons with 1<pt<8Gev and assoc. with pt>.3Gev", 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1490  fHistTestDPhi18Sec->GetXaxis()->SetTitle("Delta-Phi");
1491  fHistTestDPhi18Sec->GetYaxis()->SetTitle("Cts");
1492 
1493  //DPhi for candidate electrons 1-8 gev and assoc. particles >.3gev without secondaries
1494  fHistTestDPhi18NoSec = new TH1F("fHistTestDPhi18NoSec", "Delta-Phi for candidate electrons with 1<pt<8Gev and assoc. with pt>.3Gev", 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1495  fHistTestDPhi18NoSec->GetXaxis()->SetTitle("Delta-Phi");
1496  fHistTestDPhi18NoSec->GetYaxis()->SetTitle("Cts");
1497 
1498  //Add rejection plots to MB plots since it is the easiest place
1501  //samesies for the test plots
1502  fOutputMB->Add(fHistTestDCA);
1505  fOutputMB->Add(fHistTestEOP);
1506  fOutputMB->Add(fHistTestOGDPhi);
1507  fOutputMB->Add(fHistTestPt);
1516 
1518  fOutputMB->Add(fHistPtAssoc_MB);
1520  fOutputMB->Add(fHistPtTag_MB);
1523  fOutputMB->Add(fHistImpPar_MB);
1525  fOutputMB->Add(fHistNevents_MB);
1526  fOutputMB->Add(fHistPtSum_MB);
1529  fOutputMB->Add(fHistEtaPhi_MB);
1537  for(Int_t i=0; i<6;i++){
1538  fOutputMB->Add(fHistTPC_EMCTRD_MB[i]);
1539 
1540  fOutputMB->Add(fHistEMC_TPCTRD_MB[i]);
1541 
1542  fOutputMB->Add(fHistTRD_TPCEMC_MB[i]);
1543 
1544  }
1545  for(Int_t i=0; i<3;i++){
1546  fOutputMB->Add(fHistDPhi300_1_MB[i]);
1547  fOutputMB->Add(fHistDPhi1_2_MB[i]);
1548  fOutputMB->Add(fHistDPhi2_4_MB[i]);
1549  fOutputMB->Add(fHistDPhi4_8_MB[i]);
1551  fOutputMB->Add(fHistDPhiMix1_2_MB[i]);
1552  fOutputMB->Add(fHistDPhiMix2_4_MB[i]);
1553  fOutputMB->Add(fHistDPhiMix4_8_MB[i]);
1554  }
1555  fOutputMB->Add(fHistDPhi28_MB);
1560 
1579  for(Int_t i=0; i<6;i++){
1581 
1583 
1585 
1586  }
1587  for(Int_t i=0; i<3;i++){
1589  fOutputEMC7->Add(fHistDPhi1_2_EMC7[i]);
1590  fOutputEMC7->Add(fHistDPhi2_4_EMC7[i]);
1591  fOutputEMC7->Add(fHistDPhi4_8_EMC7[i]);
1596  }
1602 
1621  for(Int_t i=0; i<6;i++){
1623 
1625 
1627 
1628  }
1629  for(Int_t i=0; i<3;i++){
1638  }
1644 
1663  for(Int_t i=0; i<6;i++){
1665 
1667 
1669 
1670  }
1671  for(Int_t i=0; i<3;i++){
1680  }
1686 
1687  // NEW HISTO added to fOutput here
1688  PostData(1, fOutputMB);
1689  PostData(2, fOutputEMC7);
1690  PostData(3, fOutputEMCEGA);
1691  PostData(4, fOutputEMCJet);// Post data for ALL output slots >0 here, to get at least an empty histogram
1692 }
1693 
1694 //________________________________________________________________________
1696 {
1697  // Main loop
1698  // Called for each event
1699 
1700  //_______________________________Major event-level stuff____________________________________
1701  // Create pointer to reconstructed event
1702  AliVEvent *event = InputEvent();
1703  if (!event) { Printf("ERROR: Could not retrieve event"); return; }
1704 
1705  // create pointer to event
1706  AliAODEvent* aod = dynamic_cast<AliAODEvent*>(event);
1707  if (!aod) {
1708  AliError("Cannot get the AOD event");
1709  return;
1710  }
1711 
1712  // input handler
1713  const AliAnalysisManager* man(AliAnalysisManager::GetAnalysisManager());
1714  if (NULL == man) {
1715  AliWarning("AliAnalysisManager is not available");
1716  return;
1717  }
1718 
1719  AliInputEventHandler* inputHandler = (AliInputEventHandler*)man->GetInputEventHandler();
1720  if (!inputHandler) {
1721  AliWarning("AliInputEventHandler is not available");
1722  return;
1723  }
1724 
1725  UInt_t fSelectMask = inputHandler->IsEventSelected();
1726 
1727  Bool_t isSelected = fSelectMask & (AliVEvent::kEMC7 | AliVEvent::kEMCEJE | AliVEvent::kEMCEGA);
1728  if(!isSelected){
1729  AliWarning("This is not an EMCal triggered event");
1730  }
1731 
1732  MBtrg = fSelectMask & AliVEvent::kAnyINT;
1733  EMC7trg = fSelectMask & AliVEvent::kEMC7;
1734  EMCEGAtrg = fSelectMask & AliVEvent::kEMCEGA;
1735  EMCJettrg = fSelectMask & AliVEvent::kEMCEJE;
1736 
1738 
1739 
1740  Int_t elecCnt=0;
1741 
1742  AliPIDResponse* fPIDResponse = (AliPIDResponse*)inputHandler->GetPIDResponse();
1743 
1744  if(!fPIDResponse){
1745  AliWarning("NULL PIDResponse");
1746  }
1747 
1748  TObjArray* trkArr = MakeTrkArr(aod);
1749  Bool_t delTrk = kTRUE;
1750 
1751  //__________________________End major event stuff_____________________________
1752 
1753 
1754  //Fill the histogram cataloguing # of events vs. events tagged
1755  if(MBtrg){
1756  fHistNevents_MB->Fill("Events",1);
1757  }
1758  switch(trigVal){ case(NONE): break;
1759  case(EMC7):
1760  fHistNevents_EMC7->Fill("Events",1);
1761  break;
1762 
1763  case(EMCEGA):
1764  fHistNevents_EMCEGA->Fill("Events",1);
1765  break;
1766 
1767  case(EMCJE):
1768  fHistNevents_EMCJet->Fill("Events",1);
1769  break;
1770  }
1771 
1772  //Initialize energy variable and tagging flags
1773  Double_t PtSum=0;
1774  Double_t PtSumEMC=0;
1775  tagStrong=kFALSE;
1776  Bool_t tagEvt=kFALSE;
1777 
1778  //Initialize the # of tracks variable and the Eta Phi arrays
1779  Int_t ntracks=0;
1780  ntracks = aod->GetNumberOfTracks();
1781 
1782  std::vector<Double_t> Eta;
1783  std::vector<Double_t> Phi;
1784 
1785  fPool = fPoolMan->GetEventPool(ntracks, aod->GetPrimaryVertex()->GetZ());
1786 
1787  // Track loop for reconstructed event
1788  for(Int_t i = 0; i < ntracks; i++) {
1789 
1790  tagStrong=kFALSE;
1791  tagPhot=kFALSE;
1792  AliAODTrack* aodtrack = (AliAODTrack*)aod->GetTrack(i); // pointer to reconstructed to track
1793 
1794  if(!aodtrack) {
1795  AliError(Form("ERROR: Could not retrieve track %d",i));
1796  continue;
1797  }
1798 
1799  //Fill TPCOnly track eta-phi
1800 
1801  if(aodtrack->IsTPCOnly()){
1802  fHistEtaPhiTPCOnly_MB->Fill(aodtrack->Eta(),aodtrack->Phi());
1803  }
1804 
1805  //Do hybrid track cuts
1806  if(!aodtrack->IsHybridGlobalConstrainedGlobal()){continue;}
1807 
1808  //Add this tracks energy to the running total
1809  PtSum=PtSum+aodtrack->Pt();
1810  if(aodtrack->Eta()<.7&&aodtrack->Eta()>-.7&&aodtrack->Phi()>80&&aodtrack->Phi()<180){
1811  PtSumEMC=PtSumEMC+aodtrack->Pt();
1812  }
1813 
1814  //Fill the Eta Phi arrays with this tracks Eta and Phi
1815  Eta.push_back(aodtrack->Eta());
1816  Phi.push_back(aodtrack->Phi());
1817 
1818  if(MBtrg){
1819  fHistEtaPhi_MB->Fill(aodtrack->Eta(),aodtrack->Phi());
1820  }
1821  switch(trigVal){ case(NONE): break;
1822  case(EMC7):
1823  fHistEtaPhi_EMC7->Fill(aodtrack->Eta(),aodtrack->Phi());
1824  break;
1825  case(EMCEGA):
1826  fHistEtaPhi_EMCEGA->Fill(aodtrack->Eta(),aodtrack->Phi());
1827  break;
1828  case(EMCJE):
1829  fHistEtaPhi_EMCJet->Fill(aodtrack->Eta(),aodtrack->Phi());
1830  break;
1831  }
1832  //do Cut level histograms
1833  if(MBtrg){
1834  if(aodtrack->GetTPCncls()>0){
1835  fHistTPCNClus_MB->Fill(aodtrack->GetTPCncls());
1836  }
1837  fHistITSNClus_MB->Fill(aodtrack->GetNcls(0));
1838  }
1839  switch(trigVal){ case(NONE): break;
1840  case(EMC7):
1841  if(aodtrack->GetTPCncls()>0){
1842  fHistTPCNClus_EMC7->Fill(aodtrack->GetTPCncls());
1843  }
1844  fHistITSNClus_EMC7->Fill(aodtrack->GetNcls(0));
1845  break;
1846 
1847  case(EMCEGA):
1848  if(aodtrack->GetTPCncls()>0){
1849  fHistTPCNClus_EMCEGA->Fill(aodtrack->GetTPCncls());
1850  }
1851  fHistITSNClus_EMCEGA->Fill(aodtrack->GetNcls(0));
1852  break;
1853 
1854  case(EMCJE):
1855  if(aodtrack->GetTPCncls()>0){
1856  fHistTPCNClus_EMCJet->Fill(aodtrack->GetTPCncls());
1857  }
1858  fHistITSNClus_EMCJet->Fill(aodtrack->GetNcls(0));
1859  break;
1860  }
1861 
1862  //Impact parameter
1863  Float_t xy;
1864 
1865 
1866  xy=TMath::Sqrt(aodtrack->XAtDCA()*aodtrack->XAtDCA()+aodtrack->YAtDCA()*aodtrack->YAtDCA());
1867 
1868  if(MBtrg){
1869  fHistImpPar_MB->Fill(xy);
1870  }
1871  switch(trigVal){ case(NONE): break;
1872  case(EMC7):
1873  fHistImpPar_EMC7->Fill(xy);
1874  break;
1875 
1876  case(EMCEGA):
1877  fHistImpPar_EMCEGA->Fill(xy);
1878  break;
1879 
1880  case(EMCJE):
1881  fHistImpPar_EMCJet->Fill(xy);
1882  break;
1883  }
1884 
1885  FillPhotoElecHistos(aod, aodtrack, fPIDResponse, i);
1886 
1887  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1888  //If the track doesn't pass the cuts, move on to the next one
1889  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1890  if(trackCutsStrong){
1891  if(!fTrackCutsStrong->AcceptVTrack((AliVTrack*)aodtrack) || aodtrack->GetTPCsignalN()<80){continue;}
1892  }else{
1893  if(!fTrackCutsWeak->AcceptVTrack((AliVTrack*)aodtrack) || aodtrack->GetTPCsignalN()<80){continue;}
1894  }
1895 
1896  FillPIDHistos(aod, aodtrack, fPIDResponse);//Fill PID histos and set "tagStrong" boolean if this track satisfies cuts
1897 
1898  //If the track made it through any 3 detector cuts
1899  if(tagStrong){
1900  tagEvt=kTRUE;//This event contains a candidate electron
1901  //Increment the candidate count and put track ID of candidate into array
1902 
1903 
1904  elecCnt+=1;
1905 
1906  //Fill impact parameter plots
1907  if(MBtrg){
1908  fHistImpParTag_MB->Fill(xy);
1909  }
1910  switch(trigVal){ case(NONE): break;
1911  case(EMC7):
1912  fHistImpParTag_EMC7->Fill(xy);
1913  break;
1914 
1915  case(EMCEGA):
1916  fHistImpParTag_EMCEGA->Fill(xy);
1917  break;
1918 
1919  case(EMCJE):
1920  fHistImpParTag_EMCJet->Fill(xy);
1921  break;
1922  }
1923 
1924  //Pt distribution
1925 
1926  if(MBtrg){
1927  fHistPtTag_MB->Fill(aodtrack->Pt());
1928  }
1929  switch(trigVal){ case(NONE): break;
1930  case(EMC7):
1931  fHistPtTag_EMC7->Fill(aodtrack->Pt());
1932  break;
1933 
1934  case(EMCEGA):
1935  fHistPtTag_EMCEGA->Fill(aodtrack->Pt());
1936  break;
1937 
1938  case(EMCJE):
1939  fHistPtTag_EMCJet->Fill(aodtrack->Pt());
1940  break;
1941  }
1942  FillDPhiHistos(aod, aodtrack, i);//Fill DPhi histos
1943 
1944  if(tagPhot){
1945  if(MBtrg){
1946  fHistPhotoMismatch_MB->Fill(0);
1947  }
1948  switch(trigVal){ case(NONE): break;
1949  case(EMC7):
1950  fHistPhotoMismatch_EMC7->Fill(0);
1951  break;
1952  case(EMCEGA):
1953  fHistPhotoMismatch_EMCEGA->Fill(0);
1954  break;
1955  case(EMCJE):
1956  fHistPhotoMismatch_EMCJet->Fill(0);
1957  break;
1958  }
1959  }
1960 
1961 
1962 
1963 
1964  if(!fPool){cout<<"No Pool for this event man\n"; continue;}
1965 
1966  fPool->PrintInfo();
1967  if(fPool->IsReady() ){
1968  FillMEDPhiHistos(aodtrack);
1969  }
1970  else{
1971  cout<<"Pool wasn't ready\n";
1972  }
1973  }//end if(tagStrong)
1974 
1975  }//end main track loop
1976  if(!fPool){
1977  cout<<"No pool exists, can't update it"<<'\n';
1978  }
1979  else{
1980  if(UseNonSignalEvents){
1981  if(trkArr){
1982  delTrk=kFALSE;
1983  fPool->UpdatePool(trkArr);
1984  }
1985  }else{
1986  if(tagEvt){
1987  if(trkArr){
1988  delTrk=kFALSE;
1989  fPool->UpdatePool(trkArr);
1990  }
1991  }
1992  }
1993  }
1994 
1995  //Call function to fill Region histos and pass it int array of IDs for identified electron tracks
1996 
1997 
1998  //Fill Number of electrons plot
1999  fHistNElecPerEvent->Fill(elecCnt);
2000 
2001  //Fill the total pt sum histogram
2002  if(tagEvt){
2003  if(MBtrg){
2004  fHistPtSumTag_MB->Fill(PtSum);
2005  }
2006  switch(trigVal){ case(NONE): break;
2007  case(EMC7):
2008  fHistPtSumTag_EMC7->Fill(PtSum);
2009  break;
2010  case(EMCEGA):
2011  fHistPtSumTag_EMCEGA->Fill(PtSum);
2012  break;
2013  case(EMCJE):
2014  fHistPtSumTag_EMCJet->Fill(PtSum);
2015  break;
2016  }
2017  }else{
2018  if(MBtrg){
2019  fHistPtSum_MB->Fill(PtSum);
2020  }
2021  switch(trigVal){ case(NONE): break;
2022  case(EMC7):
2023  fHistPtSum_EMC7->Fill(PtSum);
2024  break;
2025  case(EMCEGA):
2026  fHistPtSum_EMCEGA->Fill(PtSum);
2027  break;
2028  case(EMCJE):
2029  fHistPtSum_EMCJet->Fill(PtSum);
2030  break;
2031  }
2032  }
2033 
2034  if(MBtrg){
2035  fHistPtSumEMC_MB->Fill(PtSumEMC);
2036  }
2037  switch(trigVal){ case(NONE): break;
2038  case(EMC7):
2039  fHistPtSumEMC_EMC7->Fill(PtSumEMC);
2040  break;
2041  case(EMCEGA):
2042  fHistPtSumEMC_EMCEGA->Fill(PtSumEMC);
2043  break;
2044  case(EMCJE):
2045  fHistPtSumEMC_EMCJet->Fill(PtSumEMC);
2046  break;
2047  }
2048 
2049  //Fill Nevent histos
2050  if(tagEvt){
2051  if(MBtrg){
2052  fHistNevents_MB->Fill("Events containing candidates",1);
2053  }
2054  switch(trigVal){ case(NONE): break;
2055  case(EMC7):
2056  fHistNevents_EMC7->Fill("Events containing candidates",1);
2057  break;
2058  case(EMCEGA):
2059  fHistNevents_EMCEGA->Fill("Events containing candidates",1);
2060  break;
2061  case(EMCJE):
2062  fHistNevents_EMCJet->Fill("Events containing candidates",1);
2063  break;
2064  }
2065  }
2066 
2067  //Fill the Eta Phi histograms
2068  if(tagEvt){
2069  for(UInt_t i=0;i<Eta.size();i++){
2070  if(MBtrg){
2071  fHistEtaPhiTag_MB->Fill(Eta[i],Phi[i]);
2072  }
2073  switch(trigVal){ case(NONE): break;
2074  case(EMC7):
2075  fHistEtaPhiTag_EMC7->Fill(Eta[i],Phi[i]);
2076  break;
2077  case(EMCEGA):
2078  fHistEtaPhiTag_EMCEGA->Fill(Eta[i],Phi[i]);
2079  break;
2080  case(EMCJE):
2081  fHistEtaPhiTag_EMCJet->Fill(Eta[i],Phi[i]);
2082  break;
2083  }
2084  }
2085  }
2086 
2087  if(trkArr&&delTrk){
2088  delete trkArr;
2089  }
2090 
2091 
2092 
2093  // NEW HISTO should be filled before this point, as PostData puts the
2094  // information for this iteration of the UserExec in the container
2095  PostData(1, fOutputMB);
2096  PostData(2, fOutputEMC7);
2097  PostData(3, fOutputEMCEGA);
2098  PostData(4, fOutputEMCJet);
2099 }
2100 
2101 void AliAnalysisTaskPSHFE::FillPIDHistos(AliAODEvent *aod, AliAODTrack *aodtrack, AliPIDResponse *fPIDResponse){
2102 
2103  if(!aodtrack){
2104  AliWarning("aodtrack is null, no point in doing PID");
2105  return;
2106  }
2107 
2108 
2109  Bool_t isPIDRej = kFALSE;
2110 
2111  //Fill TOF and TPC status variables
2112  AliPIDResponse::EDetPidStatus TOFStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTOF, aodtrack);
2113 
2114  AliPIDResponse::EDetPidStatus TPCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTPC, aodtrack);
2115 
2116  AliPIDResponse::EDetPidStatus TRDStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTRD, aodtrack);
2117 
2118  AliPIDResponse::EDetPidStatus EMCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kEMCAL, aodtrack);
2119 
2120  //Check validity of PID, TODO: Add a rejection histogram
2121  if(TOFStatus!=AliPIDResponse::kDetPidOk){
2122  fHistPIDRejection->Fill(2);
2123  //isPIDRej=kTRUE;
2124  }
2125 
2126  if(TPCStatus!=AliPIDResponse::kDetPidOk){
2127  fHistPIDRejection->Fill(1);
2128  isPIDRej=kTRUE;
2129  }
2130 
2131  if(TRDStatus!=AliPIDResponse::kDetPidOk){
2132  fHistPIDRejection->Fill(3);
2133  isPIDRej=kTRUE;
2134  }
2135 
2136  if(EMCStatus!=AliPIDResponse::kDetPidOk){
2137  fHistPIDRejection->Fill(4);
2138  isPIDRej=kTRUE;
2139  }
2140 
2141 
2142  //Get the # of sigmas around an electron hypothesis for TOF and TPC
2143 
2144 
2145  Double_t nSigmaTPC;
2146  nSigmaTPC = fPIDResponse->NumberOfSigmasTPC(aodtrack,AliPID::kElectron);
2147 
2148  Double_t elecLikeTRD[1];
2149  if(fPIDResponse->ComputeTRDProbability(aodtrack, AliPID::kElectron, elecLikeTRD, AliTRDPIDResponse::kLQ2D) != AliPIDResponse::kDetPidOk || aodtrack->GetTRDntrackletsPID()<4){
2150  fHistPIDRejection->Fill(3);
2151  isPIDRej=kTRUE;
2152  }
2153 
2154  if(isPIDRej){return;}
2155 
2156  //declare emcal cluster PID variables
2157  Double_t EOP=-1;
2158  Int_t caloId=aodtrack->GetEMCALcluster();
2159 
2160  if(caloId==-99999){
2161  return;
2162  }
2163 
2164  AliAODCaloCluster* tagEMCclus=aod->GetCaloCluster(caloId);
2165 
2166  if(tagEMCclus->E()>.5){
2167  EOP = tagEMCclus->E()/aodtrack->Pt();
2168  }
2169  else{
2170  return;
2171  }
2172 
2173 
2174 
2175  //=========================================================================================================================
2176  //PID cuts and histogram filling
2177  //=========================================================================================================================
2178 
2179  //Some Double arrays for pt ranges
2180  Double_t ptUpper[6] = {2, 3, 4, 5, 6, 1000000};
2181  Double_t ptLower[6] = {1, 2, 3, 4, 5, 6};
2182  Double_t TPCcut = 2;
2183  Double_t TRDcut = .9;
2184  Double_t EMCcutLower[6] = {.85,.85,.85,.85,.85,.85};
2185  Double_t EMCcutHigher[6] = {1.3,1.3,1.3,1.3,1.3,1.3};
2186 
2187  for(Int_t i=0; i<6; i++){
2188  if(aodtrack->Pt()>ptLower[i]&&aodtrack->Pt()<ptUpper[i]){
2189 
2190  //TPC Plots
2191  //EMC+TRD cuts
2192  if(EOP<EMCcutHigher[i]&&EOP>EMCcutLower[i]&&elecLikeTRD[0]>TRDcut){
2193 
2194  if(MBtrg){
2195  fHistTPC_EMCTRD_MB[i]->Fill(aodtrack->Pt(), nSigmaTPC);
2196  }
2197  switch(trigVal){ case(NONE): break;
2198  case(EMC7):
2199  fHistTPC_EMCTRD_EMC7[i]->Fill(aodtrack->Pt(), nSigmaTPC);
2200  break;
2201 
2202  case(EMCEGA):
2203  fHistTPC_EMCTRD_EMCEGA[i]->Fill(aodtrack->Pt(), nSigmaTPC);
2204  break;
2205 
2206  case(EMCJE):
2207  fHistTPC_EMCTRD_EMCJet[i]->Fill(aodtrack->Pt(), nSigmaTPC);
2208  break;
2209  }
2210  }
2211 
2212  //EMC Plots
2213 
2214  //TPC+TRD cuts
2215  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut){
2216 
2217  if(!applySSCuts){
2218  if(MBtrg){
2219  fHistEMC_TPCTRD_MB[i]->Fill(EOP);
2220  }
2221  switch(trigVal){ case(NONE): break;
2222  case(EMC7):
2223  fHistEMC_TPCTRD_EMC7[i]->Fill(EOP);
2224  break;
2225 
2226  case(EMCEGA):
2227  fHistEMC_TPCTRD_EMCEGA[i]->Fill(EOP);
2228  break;
2229 
2230  case(EMCJE):
2231  fHistEMC_TPCTRD_EMCJet[i]->Fill(EOP);
2232  break;
2233  }
2234  }else{
2235  if(MBtrg){
2236  fHistEMC_TPCTRD_MB[i]->Fill(EOP);
2237  }
2238  switch(trigVal){ case(NONE): break;
2239  case(EMC7):
2240  fHistEMC_TPCTRD_EMC7[i]->Fill(EOP);
2241  break;
2242 
2243  case(EMCEGA):
2244  fHistEMC_TPCTRD_EMCEGA[i]->Fill(EOP);
2245  break;
2246 
2247  case(EMCJE):
2248  fHistEMC_TPCTRD_EMCJet[i]->Fill(EOP);
2249  break;
2250  }
2251  }
2252  }
2253 
2254  //TRD Plots
2255 
2256  //TPC+EMC cuts
2257  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&EOP<EMCcutHigher[i]&&EOP>EMCcutLower[i]){
2258 
2259  if(MBtrg){
2260  fHistTRD_TPCEMC_MB[i]->Fill(aodtrack->Pt(), elecLikeTRD[0]);
2261  }
2262  switch(trigVal){ case(NONE): break;
2263  case(EMC7):
2264  fHistTRD_TPCEMC_EMC7[i]->Fill(aodtrack->Pt(), elecLikeTRD[0]);
2265  break;
2266 
2267  case(EMCEGA):
2268  fHistTRD_TPCEMC_EMCEGA[i]->Fill(aodtrack->Pt(), elecLikeTRD[0]);
2269  break;
2270 
2271  case(EMCJE):
2272  fHistTRD_TPCEMC_EMCJet[i]->Fill(aodtrack->Pt(), elecLikeTRD[0]);
2273  break;
2274  }
2275  }
2276  }
2277  }
2278  if(MBtrg){
2279  if(aodtrack->Pt()<2&&aodtrack->Pt()>1){
2280  if(nSigmaTPC<-2&&nSigmaTPC>-8){
2281  fHistEMC_Had_MB_1Gev->Fill(EOP);
2282  }
2283  }
2284  }
2285 
2286  if(applySSCuts){
2287 
2288  //An electron candidate is one that passes TPC +-2Sig, TRD>.9, 0.85<E/p<1.15, M02=(0,.5), M20=(0,.3)
2289 
2290  if(aodtrack->Pt()<6){
2291  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[0]&&EOP>EMCcutLower[0]){
2292 
2293  tagStrong=kTRUE;
2294 
2295  }
2296 
2297  }
2298 
2299  else{
2300 
2301  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[5]&&EOP>EMCcutLower[5]){
2302 
2303  tagStrong=kTRUE;
2304 
2305  }
2306 
2307  }
2308 
2309  }else{//no sscuts
2310 
2311  //An electron candidate is one that passes TPC +-2Sig, TRD>.9, 0.85<E/p<1.15
2312 
2313  if(aodtrack->Pt()<6){
2314  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[0]&&EOP>EMCcutLower[0]){
2315 
2316  tagStrong=kTRUE;
2317 
2318  }
2319 
2320  }
2321 
2322  else{
2323 
2324  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[5]&&EOP>EMCcutLower[5]){
2325 
2326  tagStrong=kTRUE;
2327 
2328  }
2329 
2330  }
2331 
2332  }
2333 
2334  /*//Check if any tracks pass all cuts
2335  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&nSigmaTOF<TOFcut&&nSigmaTOF>-TOFcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher&&EOP>EMCcutLower){
2336  tagAll=kTRUE;
2337  }*/
2338 
2339  //=========================================================================
2340  // End of PID stuff
2341  //=========================================================================
2342  PostData(1, fOutputMB);
2343  PostData(2, fOutputEMC7);
2344  PostData(3, fOutputEMCEGA);
2345  PostData(4, fOutputEMCJet);
2346  return;
2347 }
2348 
2349 void AliAnalysisTaskPSHFE::FillDPhiHistos(AliAODEvent *aod, AliAODTrack *aodtrack, Int_t i){
2350  //Run through all tracks in this
2351  Int_t ntracks = aod->GetNumberOfTracks();
2352  for(Int_t j = 0; j < ntracks; j++) {
2353 
2354  //Don't double count the tagged tracks
2355  if(i==j){continue;}
2356 
2357 
2358  AliAODTrack* aodtrackassoc = (AliAODTrack*)aod->GetTrack(j); // pointer to reconstructed to track
2359 
2360  if(!aodtrackassoc) {
2361  AliError(Form("ERROR: Could not retrieve aodtrack %d",j));
2362  continue;
2363  }
2364 
2365  //Do hybrid track cuts
2366  if(!aodtrackassoc->IsHybridGlobalConstrainedGlobal()&&!aodtrackassoc->TestFilterMask(AliAODTrack::kTrkGlobalNoDCA)){continue;}
2367 
2368  //Pt distribution
2369  if(MBtrg){
2370  fHistPtAssoc_MB->Fill(aodtrackassoc->Pt());
2371  }
2372  switch(trigVal){ case(NONE): break;
2373  case(EMC7):
2374  fHistPtAssoc_EMC7->Fill(aodtrackassoc->Pt());
2375  break;
2376 
2377  case(EMCEGA):
2378  fHistPtAssoc_EMCEGA->Fill(aodtrackassoc->Pt());
2379  break;
2380 
2381  case(EMCJE):
2382  fHistPtAssoc_EMCJet->Fill(aodtrackassoc->Pt());
2383  break;
2384  }
2385 
2386  //Fill Delta Phi variable and correct for periodicity
2387  Double_t DPhi=aodtrackassoc->Phi()-aodtrack->Phi();
2388 
2389  if(DPhi<-TMath::Pi()/2){DPhi=TMath::Abs(2*TMath::Pi()+DPhi);}
2390 
2391  if(DPhi>3*TMath::Pi()/2){DPhi=-TMath::Abs(2*TMath::Pi()-DPhi);}
2392 
2393  Double_t DEta=aodtrackassoc->Eta()-aodtrack->Eta();
2394 
2395 
2396  Int_t PID=0;
2397  cout<<"most probPID"<<AliAODTrack::kElectron<<":"<<aodtrackassoc->GetMostProbablePID()<<'\n';
2398  switch(aodtrackassoc->GetMostProbablePID()){
2399  case AliAODTrack::kElectron:
2400  PID=1;
2401  break;
2402  case AliAODTrack::kMuon:
2403  PID=2;
2404  break;
2405  case AliAODTrack::kPion:
2406  PID=3;
2407  break;
2408  case AliAODTrack::kKaon:
2409  PID=4;
2410  break;
2411  case AliAODTrack::kProton:
2412  PID=5;
2413  break;
2414  case AliAODTrack::kDeuteron:
2415  PID=6;
2416  break;
2417  case AliAODTrack::kUnknown:
2418  PID=0;
2419  break;
2420  case AliAODTrack::kTriton:
2421  break;
2422  case AliAODTrack::kHelium3:
2423  break;
2424  case AliAODTrack::kAlpha:
2425  break;
2426  case AliAODTrack::kMostProbable:
2427  break;
2428  }
2429 
2430  if(MBtrg){
2431  fHistDPhi18Spe_MB->Fill(DPhi, PID);
2432  }
2433  switch(trigVal){ case(NONE): break;
2434  case(EMC7):
2435  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
2436  break;
2437  case(EMCEGA):
2438  fHistDPhi18Spe_EMCEGA->Fill(DPhi, PID);
2439  break;
2440  case(EMCJE):
2441  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
2442  break;
2443  }
2444 
2445  if(aodtrackassoc->GetType()==AliAODTrack::kPrimary){
2446 
2447  if(aodtrack->Pt()<8&&aodtrack->Pt()>1&&aodtrackassoc->Pt()>0.3)
2448  {
2449  fHistTestDPhi18NoSec->Fill(DPhi);
2450  }
2451 
2452  fHistTestDPhiSpeNoSec->Fill(DPhi, PID);
2453 
2454  }else{
2455  if(aodtrack->Pt()<8&&aodtrack->Pt()>1&&aodtrackassoc->Pt()>0.3)
2456  {
2457  fHistTestDPhi18Sec->Fill(DPhi);
2458  }
2459  }
2460 
2461 
2462 
2463  //Fill DPhi by Type here
2464  if(aodtrackassoc->IsHybridGlobalConstrainedGlobal()) fHistTestDPhiType->Fill(DPhi, 1);
2465 
2466  if((aodtrackassoc->IsGlobalConstrained())) fHistTestDPhiType->Fill(DPhi, 2);
2467 
2468  if((aodtrackassoc->IsTPCOnly())) fHistTestDPhiType->Fill(DPhi, 3);
2469 
2470 
2471  if(DPhi<0.1&&DPhi>-0.1&&DEta<0.1&&DEta>-0.1){
2472 
2473  fHistTestPt->Fill(aodtrackassoc->Pt());
2474  fHistTestOGDPhi->Fill(aodtrackassoc->Phi()-aodtrack->Phi());
2475  fHistTestDCA->Fill(aodtrackassoc->DCA());
2476  fHistTestTPCdEdx->Fill(aodtrackassoc->Pt(), aodtrackassoc->GetTPCsignal());
2477 
2478 
2479  Int_t partOneID = 0;
2480  Int_t partTwoID = 0;
2481 
2482  if(aodtrackassoc->GetMostProbablePID()==AliAODTrack::kElectron) partOneID=1;
2483 
2484  if(aodtrackassoc->GetMostProbablePID()==AliAODTrack::kPion) partOneID=2;
2485 
2486 
2487  for(Int_t k=0;k<ntracks;k++){
2488  if(i==k || j==k){continue;}
2489 
2490  AliAODTrack* aodtrackassoc2 = (AliAODTrack*)aod->GetTrack(k);
2491 
2492  if(aodtrackassoc2->GetMostProbablePID()==AliAODTrack::kElectron) partTwoID=1;
2493 
2494  if(aodtrackassoc2->GetMostProbablePID()==AliAODTrack::kPion) partTwoID=2;
2495 
2496  Double_t DPhi=aodtrackassoc2->Phi()-aodtrack->Phi();
2497 
2498  if(DPhi<-TMath::Pi()/2){DPhi=TMath::Abs(2*TMath::Pi()+DPhi);}
2499 
2500  if(DPhi>3*TMath::Pi()/2){DPhi=-TMath::Abs(2*TMath::Pi()-DPhi);}
2501 
2502 
2503  Double_t ElecMass=.000511;
2504 
2505  Double_t PionMass=.139;
2506  //fill inv mass plot
2507 
2508  if(partOneID==1&&partTwoID==1&&aodtrackassoc->Charge()==aodtrackassoc2->Charge()&&aodtrackassoc->Charge()!=0)
2509  {
2510  Double_t assocE1=TMath::Sqrt(aodtrackassoc->P()*aodtrackassoc->P()+ElecMass*ElecMass);
2511  Double_t assocE2=TMath::Sqrt(aodtrackassoc2->P()*aodtrackassoc2->P()+ElecMass*ElecMass);
2512 
2513  TLorentzVector assoc1(aodtrackassoc->Px(), aodtrackassoc->Py(), aodtrackassoc->Pz(), assocE1);
2514  TLorentzVector assoc2(aodtrackassoc2->Px(), aodtrackassoc2->Py(), aodtrackassoc2->Pz(), assocE2);
2515 
2516  Double_t InvMass=(assoc1+assoc2).M();
2517 
2518  fHistTestInvMassElecLike->Fill(InvMass);
2519  }
2520 
2521  if(partOneID==1&&partTwoID==1&&aodtrackassoc->Charge()!=aodtrackassoc2->Charge()&&aodtrackassoc->Charge()!=0&&aodtrackassoc2->Charge()!=0)
2522  {
2523  Double_t assocE1=TMath::Sqrt(aodtrackassoc->P()*aodtrackassoc->P()+ElecMass*ElecMass);
2524  Double_t assocE2=TMath::Sqrt(aodtrackassoc2->P()*aodtrackassoc2->P()+ElecMass*ElecMass);
2525 
2526  TLorentzVector assoc1(aodtrackassoc->Px(), aodtrackassoc->Py(), aodtrackassoc->Pz(), assocE1);
2527  TLorentzVector assoc2(aodtrackassoc2->Px(), aodtrackassoc2->Py(), aodtrackassoc2->Pz(), assocE2);
2528 
2529  Double_t InvMass=(assoc1+assoc2).M();
2530 
2531  fHistTestInvMassElecUnLike->Fill(InvMass);
2532  }
2533 
2534  if(partOneID==2&&partTwoID==2&&aodtrackassoc->Charge()==aodtrackassoc2->Charge()&&aodtrackassoc->Charge()!=0)
2535  {
2536  Double_t assocE1=TMath::Sqrt(aodtrackassoc->P()*aodtrackassoc->P()+PionMass*PionMass);
2537  Double_t assocE2=TMath::Sqrt(aodtrackassoc2->P()*aodtrackassoc2->P()+PionMass*PionMass);
2538 
2539  TLorentzVector assoc1(aodtrackassoc->Px(), aodtrackassoc->Py(), aodtrackassoc->Pz(), assocE1);
2540  TLorentzVector assoc2(aodtrackassoc2->Px(), aodtrackassoc2->Py(), aodtrackassoc2->Pz(), assocE2);
2541 
2542  Double_t InvMass=(assoc1+assoc2).M();
2543 
2544  fHistTestInvMassPionLike->Fill(InvMass);
2545  }
2546 
2547  if(partOneID==2&&partTwoID==2&&aodtrackassoc->Charge()!=aodtrackassoc2->Charge()&&aodtrackassoc->Charge()!=0&&aodtrackassoc2->Charge()!=0)
2548  {
2549  Double_t assocE1=TMath::Sqrt(aodtrackassoc->P()*aodtrackassoc->P()+PionMass*PionMass);
2550  Double_t assocE2=TMath::Sqrt(aodtrackassoc2->P()*aodtrackassoc2->P()+PionMass*PionMass);
2551 
2552  TLorentzVector assoc1(aodtrackassoc->Px(), aodtrackassoc->Py(), aodtrackassoc->Pz(), assocE1);
2553  TLorentzVector assoc2(aodtrackassoc2->Px(), aodtrackassoc2->Py(), aodtrackassoc2->Pz(), assocE2);
2554 
2555  Double_t InvMass=(assoc1+assoc2).M();
2556 
2557  fHistTestInvMassPionUnLike->Fill(InvMass);
2558  }
2559 
2560 
2561 
2562  }
2563  //Fill other plots
2564  Int_t cid = aodtrackassoc->GetEMCALcluster();
2565  if(cid > 0){
2566  AliAODCaloCluster *aodcl = aod->GetCaloCluster(cid);
2567 
2568  fHistTestEMCEnergy->Fill(aodcl->E());
2569  fHistTestEOP->Fill(aodcl->E()/aodtrackassoc->Pt());
2570  }
2571  else{cout<<"No EMCal cluster for this anamolous Peak\n";}
2572 
2573 
2574 
2575 
2576  }
2577 
2578  if(PID==1||PID==2||PID==0){continue;}
2579 
2580  //candidate 1<pt<2
2581  if(aodtrack->Pt()>1&&aodtrack->Pt()<2){
2582 
2583 
2584 
2585  //300MeV
2586  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<1){
2587  if(MBtrg){
2588  fHistDPhi300_1_MB[0]->Fill(DPhi);
2589  }
2590  switch(trigVal){ case(NONE): break;
2591  case(EMC7):
2592  fHistDPhi300_1_EMC7[0]->Fill(DPhi);
2593  break;
2594  case(EMCEGA):
2595  fHistDPhi300_1_EMCEGA[0]->Fill(DPhi);
2596  break;
2597  case(EMCJE):
2598  fHistDPhi300_1_EMCJet[0]->Fill(DPhi);
2599  break;
2600  }
2601  }
2602 
2603  //1GeV
2604  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
2605  if(MBtrg){
2606  fHistDPhi1_2_MB[0]->Fill(DPhi);
2607  }
2608  switch(trigVal){ case(NONE): break;
2609  case(EMC7):
2610  fHistDPhi1_2_EMC7[0]->Fill(DPhi);
2611  break;
2612  case(EMCEGA):
2613  fHistDPhi1_2_EMCEGA[0]->Fill(DPhi);
2614  break;
2615  case(EMCJE):
2616  fHistDPhi1_2_EMCJet[0]->Fill(DPhi);
2617  break;
2618  }
2619  }
2620 
2621  //2GeV
2622  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<4){
2623  if(MBtrg){
2624  fHistDPhi2_4_MB[0]->Fill(DPhi);
2625  }
2626  switch(trigVal){ case(NONE): break;
2627  case(EMC7):
2628  fHistDPhi2_4_EMC7[0]->Fill(DPhi);
2629  break;
2630  case(EMCEGA):
2631  fHistDPhi2_4_EMCEGA[0]->Fill(DPhi);
2632  break;
2633  case(EMCJE):
2634  fHistDPhi2_4_EMCJet[0]->Fill(DPhi);
2635  break;
2636  }
2637  }
2638 
2639  //4GeV
2640  if(aodtrackassoc->Pt()>4&&aodtrackassoc->Pt()<8){
2641  if(MBtrg){
2642  fHistDPhi4_8_MB[0]->Fill(DPhi);
2643  }
2644  switch(trigVal){ case(NONE): break;
2645  case(EMC7):
2646  fHistDPhi4_8_EMC7[0]->Fill(DPhi);
2647  break;
2648  case(EMCEGA):
2649  fHistDPhi4_8_EMCEGA[0]->Fill(DPhi);
2650  break;
2651  case(EMCJE):
2652  fHistDPhi4_8_EMCJet[0]->Fill(DPhi);
2653  break;
2654  }
2655  }
2656 
2657 
2658  }
2659 
2660  //candidate 2<pt<4
2661  if(aodtrack->Pt()>2&&aodtrack->Pt()<4){
2662 
2663 
2664 
2665  //300MeV
2666  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<1){
2667  if(MBtrg){
2668  fHistDPhi300_1_MB[1]->Fill(DPhi);
2669  }
2670  switch(trigVal){ case(NONE): break;
2671  case(EMC7):
2672  fHistDPhi300_1_EMC7[1]->Fill(DPhi);
2673  break;
2674  case(EMCEGA):
2675  fHistDPhi300_1_EMCEGA[1]->Fill(DPhi);
2676  break;
2677  case(EMCJE):
2678  fHistDPhi300_1_EMCJet[1]->Fill(DPhi);
2679  break;
2680  }
2681  }
2682 
2683  //1GeV
2684  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
2685  if(MBtrg){
2686  fHistDPhi1_2_MB[1]->Fill(DPhi);
2687  }
2688  switch(trigVal){ case(NONE): break;
2689  case(EMC7):
2690  fHistDPhi1_2_EMC7[1]->Fill(DPhi);
2691  break;
2692  case(EMCEGA):
2693  fHistDPhi1_2_EMCEGA[1]->Fill(DPhi);
2694  break;
2695  case(EMCJE):
2696  fHistDPhi1_2_EMCJet[1]->Fill(DPhi);
2697  break;
2698  }
2699  }
2700 
2701  //2GeV
2702  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<4){
2703  if(MBtrg){
2704  fHistDPhi2_4_MB[1]->Fill(DPhi);
2705  fHistDPhi28_MB->Fill(DPhi);
2706  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2707  }
2708  switch(trigVal){ case(NONE): break;
2709  case(EMC7):
2710  fHistDPhi2_4_EMC7[1]->Fill(DPhi);
2711  fHistDPhi28_EMC7->Fill(DPhi);
2712  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2713  break;
2714  case(EMCEGA):
2715  fHistDPhi2_4_EMCEGA[1]->Fill(DPhi);
2716  fHistDPhi28_EMCEGA->Fill(DPhi);
2717  fHistDPhiDEta28_EMCEGA->Fill(DPhi, DEta);
2718  break;
2719  case(EMCJE):
2720  fHistDPhi2_4_EMCJet[1]->Fill(DPhi);
2721  fHistDPhi28_EMCJet->Fill(DPhi);
2722  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2723  break;
2724  }
2725  }
2726 
2727  //4GeV
2728  if(aodtrackassoc->Pt()>4&&aodtrackassoc->Pt()<8){
2729  if(MBtrg){
2730  fHistDPhi4_8_MB[1]->Fill(DPhi);
2731  fHistDPhi28_MB->Fill(DPhi);
2732  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2733  }
2734  switch(trigVal){ case(NONE): break;
2735  case(EMC7):
2736  fHistDPhi4_8_EMC7[1]->Fill(DPhi);
2737  fHistDPhi28_EMC7->Fill(DPhi);
2738  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2739  break;
2740  case(EMCEGA):
2741  fHistDPhi4_8_EMCEGA[1]->Fill(DPhi);
2742  fHistDPhi28_EMCEGA->Fill(DPhi);
2743  fHistDPhiDEta28_EMCEGA->Fill(DPhi, DEta);
2744  break;
2745  case(EMCJE):
2746  fHistDPhi4_8_EMCJet[1]->Fill(DPhi);
2747  fHistDPhi28_EMCJet->Fill(DPhi);
2748  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2749  break;
2750  }
2751  }
2752 
2753 
2754  }
2755 
2756  //candidate 4<pt<8
2757  if(aodtrack->Pt()>4&&aodtrack->Pt()<8){
2758 
2759 
2760 
2761  //300MeV
2762  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<1){
2763  if(MBtrg){
2764  fHistDPhi300_1_MB[2]->Fill(DPhi);
2765  }
2766  switch(trigVal){ case(NONE): break;
2767  case(EMC7):
2768  fHistDPhi300_1_EMC7[2]->Fill(DPhi);
2769  break;
2770  case(EMCEGA):
2771  fHistDPhi300_1_EMCEGA[2]->Fill(DPhi);
2772  break;
2773  case(EMCJE):
2774  fHistDPhi300_1_EMCJet[2]->Fill(DPhi);
2775  break;
2776  }
2777  }
2778 
2779  //1GeV
2780  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
2781  if(MBtrg){
2782  fHistDPhi1_2_MB[2]->Fill(DPhi);
2783  }
2784  switch(trigVal){ case(NONE): break;
2785  case(EMC7):
2786  fHistDPhi1_2_EMC7[2]->Fill(DPhi);
2787  break;
2788  case(EMCEGA):
2789  fHistDPhi1_2_EMCEGA[2]->Fill(DPhi);
2790  break;
2791  case(EMCJE):
2792  fHistDPhi1_2_EMCJet[2]->Fill(DPhi);
2793  break;
2794  }
2795  }
2796 
2797  //2GeV
2798  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<4){
2799  if(MBtrg){
2800  fHistDPhi2_4_MB[2]->Fill(DPhi);
2801  fHistDPhi28_MB->Fill(DPhi);
2802  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2803  }
2804  switch(trigVal){ case(NONE): break;
2805  case(EMC7):
2806  fHistDPhi2_4_EMC7[2]->Fill(DPhi);
2807  fHistDPhi28_EMC7->Fill(DPhi);
2808  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2809  break;
2810  case(EMCEGA):
2811  fHistDPhi2_4_EMCEGA[2]->Fill(DPhi);
2812  fHistDPhi28_EMCEGA->Fill(DPhi);
2813  fHistDPhiDEta28_EMCEGA->Fill(DPhi, DEta);
2814  break;
2815  case(EMCJE):
2816  fHistDPhi2_4_EMCJet[2]->Fill(DPhi);
2817  fHistDPhi28_EMCJet->Fill(DPhi);
2818  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2819  break;
2820  }
2821  }
2822 
2823  //4GeV
2824  if(aodtrackassoc->Pt()>4&&aodtrackassoc->Pt()<8){
2825  if(MBtrg){
2826  fHistDPhi4_8_MB[2]->Fill(DPhi);
2827  fHistDPhi28_MB->Fill(DPhi);
2828  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2829  }
2830  switch(trigVal){ case(NONE): break;
2831  case(EMC7):
2832  fHistDPhi4_8_EMC7[2]->Fill(DPhi);
2833  fHistDPhi28_EMC7->Fill(DPhi);
2834  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2835  break;
2836  case(EMCEGA):
2837  fHistDPhi4_8_EMCEGA[2]->Fill(DPhi);
2838  fHistDPhi28_EMCEGA->Fill(DPhi);
2839  fHistDPhiDEta28_EMCEGA->Fill(DPhi, DEta);
2840  break;
2841  case(EMCJE):
2842  fHistDPhi4_8_EMCJet[2]->Fill(DPhi);
2843  fHistDPhi28_EMCJet->Fill(DPhi);
2844  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2845  break;
2846  }
2847  }
2848 
2849 
2850  }
2851 
2852  }
2853  PostData(1, fOutputMB);
2854  PostData(2, fOutputEMC7);
2855  PostData(3, fOutputEMCEGA);
2856  PostData(4, fOutputEMCJet);
2857  return;
2858 }
2859 
2861  trackCutsStrong=trkCutBool;
2862 }
2863 
2865  applySSCuts=SSCutBool;
2866 }
2867 
2868 void AliAnalysisTaskPSHFE::FillPhotoElecHistos(AliAODEvent *aod, AliAODTrack *aodtrack, AliPIDResponse *fPIDResponse, Int_t i){
2869 
2870  if(!aodtrack){
2871  AliWarning("aodtrack is null, no point in doing Photonic Electron stuff");
2872  return;
2873  }
2874 
2875  Bool_t isElec=kFALSE;
2876  Double_t ElecMass=.0005109989;
2877  //Fill TOF and TPC status variables
2878  AliPIDResponse::EDetPidStatus TPCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTPC, aodtrack);
2879 
2880  AliPIDResponse::EDetPidStatus TRDStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTRD, aodtrack);
2881 
2882  AliPIDResponse::EDetPidStatus EMCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kEMCAL, aodtrack);
2883 
2884  //Check validity of PID, TODO: Add a rejection histogram
2885  if(TPCStatus!=AliPIDResponse::kDetPidOk){
2886  return;
2887  }
2888 
2889  if(TRDStatus!=AliPIDResponse::kDetPidOk){
2890  return;
2891  }
2892 
2893  if(EMCStatus!=AliPIDResponse::kDetPidOk){
2894  return;
2895  }
2896 
2897 
2898  //Get the # of sigmas around an electron hypothesis for TOF and TPC
2899  Double_t nSigmaTPC;
2900  nSigmaTPC = fPIDResponse->NumberOfSigmasTPC(aodtrack,AliPID::kElectron);
2901 
2902  Double_t elecLikeTRD[1];
2903  if(fPIDResponse->ComputeTRDProbability(aodtrack, AliPID::kElectron, elecLikeTRD, AliTRDPIDResponse::kLQ2D) != AliPIDResponse::kDetPidOk || aodtrack->GetTRDntrackletsPID()<4){
2904  return;
2905  }
2906 
2907  //declare emcal cluster PID variables
2908  Double_t EOP=-1;
2909  Int_t caloId=aodtrack->GetEMCALcluster();
2910 
2911  if(caloId==-99999){
2912  return;
2913  }
2914 
2915  AliAODCaloCluster* tagEMCclus=aod->GetCaloCluster(caloId);
2916 
2917  EOP = tagEMCclus->E()/aodtrack->Pt();
2918 
2919  if((nSigmaTPC<2&&nSigmaTPC>-2)||(EOP<1.4&&EOP>.8)||(elecLikeTRD[0]>.8)){
2920  isElec=kTRUE;
2921  }
2922 
2923  if(!isElec){return;}
2924 
2925  Int_t ntracks=aod->GetNumberOfTracks();
2926 
2927  for(Int_t j = 0; j < ntracks; j++) {
2928 
2929  //Don't double count the tagged tracks
2930  if(i==j){continue;}
2931 
2932  AliAODTrack* aodtrackassoc = (AliAODTrack*)aod->GetTrack(j); // pointer to reconstructed to track
2933 
2934  if(!aodtrackassoc) {
2935  AliError(Form("ERROR: Could not retrieve aodtrack %d",j));
2936  continue;
2937  }
2938 
2939  //Do hybrid track cuts
2940  if(aodtrackassoc->IsHybridGlobalConstrainedGlobal()){continue;}
2941 
2942  Bool_t isElecToo=kFALSE;
2943 
2944  //Fill TOF and TPC status variables
2945  AliPIDResponse::EDetPidStatus TPCStatusassoc=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTPC, aodtrackassoc);
2946 
2947  AliPIDResponse::EDetPidStatus TRDStatusassoc=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTRD, aodtrackassoc);
2948 
2949  //Check validity of PID, TODO: Add a rejection histogram
2950  if(TPCStatusassoc!=AliPIDResponse::kDetPidOk){
2951  continue;
2952  }
2953 
2954  if(TRDStatusassoc!=AliPIDResponse::kDetPidOk){
2955  continue;
2956  }
2957 
2958 
2959  //Get the # of sigmas around an electron hypothesis for TOF and TPC
2960  Double_t nSigmaTPCassoc;
2961  nSigmaTPCassoc = fPIDResponse->NumberOfSigmasTPC(aodtrackassoc,AliPID::kElectron);
2962 
2963  Double_t elecLikeTRDassoc[1];
2964  if(fPIDResponse->ComputeTRDProbability(aodtrackassoc, AliPID::kElectron, elecLikeTRDassoc, AliTRDPIDResponse::kLQ2D) != AliPIDResponse::kDetPidOk || aodtrackassoc->GetTRDntrackletsPID()<4){
2965  return;
2966  }
2967 
2968  if((nSigmaTPCassoc<2&&nSigmaTPCassoc>-2)||(elecLikeTRDassoc[0]>.8)){
2969  isElecToo=kTRUE;
2970  }
2971 
2972  if(!isElecToo){continue;}
2973 
2974  Double_t elecE1=TMath::Sqrt(aodtrack->P()*aodtrack->P()+ElecMass*ElecMass);
2975  Double_t elecE2=TMath::Sqrt(aodtrackassoc->P()*aodtrackassoc->P()+ElecMass*ElecMass);
2976 
2977  TLorentzVector elec1(aodtrack->Px(), aodtrack->Py(), aodtrack->Pz(), elecE1);
2978  TLorentzVector elec2(aodtrackassoc->Px(), aodtrackassoc->Py(), aodtrackassoc->Pz(), elecE2);
2979 
2980  Double_t InvMass=(elec1+elec2).M();
2981  Double_t OpAng=elec1.Angle(elec2.Vect());
2982 
2983  if(aodtrack->Charge()==aodtrackassoc->Charge()&&aodtrack->Charge()!=0){
2984 
2985  if(MBtrg){
2986  fHistInvMassElecLike_MB->Fill(InvMass);
2987  fHistOpAngElecLike_MB->Fill(OpAng);
2988  }
2989  switch(trigVal){ case(NONE): break;
2990  case(EMC7):
2991  fHistInvMassElecLike_EMC7->Fill(InvMass);
2992  fHistOpAngElecLike_EMC7->Fill(OpAng);
2993  break;
2994 
2995  case(EMCEGA):
2996  fHistInvMassElecLike_EMCEGA->Fill(InvMass);
2997  fHistOpAngElecLike_EMCEGA->Fill(OpAng);
2998  break;
2999 
3000  case(EMCJE):
3001  fHistInvMassElecLike_EMCJet->Fill(InvMass);
3002  fHistOpAngElecLike_EMCJet->Fill(OpAng);
3003  break;
3004  }
3005 
3006  }else if(aodtrack->Charge()!=aodtrackassoc->Charge()&&aodtrack->Charge()!=0&&aodtrackassoc->Charge()!=0){
3007  if(InvMass<0.1&&OpAng<0.1){tagPhot=kTRUE;}
3008  if(MBtrg){
3009  fHistInvMassElecUnLike_MB->Fill(InvMass);
3010  fHistOpAngElecUnLike_MB->Fill(OpAng);
3011  }
3012  switch(trigVal){ case(NONE): break;
3013  case(EMC7):
3014  fHistInvMassElecUnLike_EMC7->Fill(InvMass);
3015  fHistOpAngElecUnLike_EMC7->Fill(OpAng);
3016  break;
3017 
3018  case(EMCEGA):
3019  fHistInvMassElecUnLike_EMCEGA->Fill(InvMass);
3020  fHistOpAngElecUnLike_EMCEGA->Fill(OpAng);
3021  break;
3022 
3023  case(EMCJE):
3024  fHistInvMassElecUnLike_EMCJet->Fill(InvMass);
3025  fHistOpAngElecUnLike_EMCJet->Fill(OpAng);
3026  break;
3027  }
3028  }
3029  }//end loop over tracks
3030 
3031  PostData(1, fOutputMB);
3032  PostData(2, fOutputEMC7);
3033  PostData(3, fOutputEMCEGA);
3034  PostData(4, fOutputEMCJet);
3035  return;
3036 }
3037 
3039 {
3040  if(!aod){AliWarning("Invalid AOD Event");}
3041  Int_t nTracks = aod->GetNumberOfTracks();
3042  TObjArray* accTracks = new TObjArray;
3043  accTracks->SetOwner();
3044 
3045  for(Int_t i=0;i<nTracks;i++){
3046  AliAODTrack *aodtrack = (AliAODTrack*)aod->GetTrack(i);
3047 
3048  if(!aodtrack){
3049  continue;
3050  }
3051 
3052  if(aodtrack->IsHybridGlobalConstrainedGlobal()){
3053  continue;
3054  }
3055  AliAODTrack* temp = new AliAODTrack(*aodtrack);
3056  accTracks->Add(temp);
3057  }
3058 
3059  return accTracks;
3060 }
3061 
3062 void AliAnalysisTaskPSHFE::FillMEDPhiHistos(AliAODTrack *aodtrack)
3063 {
3064  Int_t nEvents = fPool->GetCurrentNEvents();
3065 
3066  for(Int_t Ev=0;Ev<nEvents;Ev++){
3067 
3068  TObjArray *mixedTracks = fPool->GetEvent(Ev);
3069 
3070  Int_t nMixedTracks = mixedTracks->GetEntriesFast();
3071 
3072  for(Int_t j=0;j<nMixedTracks;j++){
3073  AliAODTrack* aodtrackassoc = (AliAODTrack*)mixedTracks->At(j); // pointer to reconstructed to track
3074 
3075  if(!aodtrackassoc) {
3076  AliError(Form("ERROR: Could not retrieve aodtrack %d",j));
3077  continue;
3078  }
3079 
3080  //Do hybrid track cuts
3081  if(aodtrackassoc->IsHybridGlobalConstrainedGlobal()){continue;}
3082 
3083  //Pt distribution
3084  if(MBtrg){
3085  fHistPtAssocMix_MB->Fill(aodtrackassoc->Pt());
3086  }
3087  switch(trigVal){ case(NONE): break;
3088  case(EMC7):
3089  fHistPtAssocMix_EMC7->Fill(aodtrackassoc->Pt());
3090  break;
3091 
3092  case(EMCEGA):
3093  fHistPtAssocMix_EMCEGA->Fill(aodtrackassoc->Pt());
3094  break;
3095 
3096  case(EMCJE):
3097  fHistPtAssocMix_EMCJet->Fill(aodtrackassoc->Pt());
3098  break;
3099  }
3100 
3101  //Fill Delta Phi variable and correct for periodicity
3102  Double_t DPhi=aodtrackassoc->Phi()-aodtrack->Phi();
3103 
3104  if(DPhi<-TMath::Pi()/2){DPhi=TMath::Abs(2*TMath::Pi()+DPhi);}
3105 
3106  if(DPhi>3*TMath::Pi()/2){DPhi=-TMath::Abs(2*TMath::Pi()-DPhi);}
3107 
3108  Double_t DEta=aodtrackassoc->Eta()-aodtrack->Eta();
3109 
3110  //candidate 1<pt<2
3111  if(aodtrack->Pt()>1&&aodtrack->Pt()<2){
3112 
3113 
3114 
3115  //300MeV
3116  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<1){
3117  if(MBtrg){
3118  fHistDPhiMix300_1_MB[0]->Fill(DPhi);
3119  }
3120  switch(trigVal){ case(NONE): break;
3121  case(EMC7):
3122  fHistDPhiMix300_1_EMC7[0]->Fill(DPhi);
3123  break;
3124  case(EMCEGA):
3125  fHistDPhiMix300_1_EMCEGA[0]->Fill(DPhi);
3126  break;
3127  case(EMCJE):
3128  fHistDPhiMix300_1_EMCJet[0]->Fill(DPhi);
3129  break;
3130  }
3131  }
3132 
3133  //1GeV
3134  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
3135  if(MBtrg){
3136  fHistDPhiMix1_2_MB[0]->Fill(DPhi);
3137  }
3138  switch(trigVal){ case(NONE): break;
3139  case(EMC7):
3140  fHistDPhiMix1_2_EMC7[0]->Fill(DPhi);
3141  break;
3142  case(EMCEGA):
3143  fHistDPhiMix1_2_EMCEGA[0]->Fill(DPhi);
3144  break;
3145  case(EMCJE):
3146  fHistDPhiMix1_2_EMCJet[0]->Fill(DPhi);
3147  break;
3148  }
3149  }
3150 
3151  //2GeV
3152  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<4){
3153  if(MBtrg){
3154  fHistDPhiMix2_4_MB[0]->Fill(DPhi);
3155  }
3156  switch(trigVal){ case(NONE): break;
3157  case(EMC7):
3158  fHistDPhiMix2_4_EMC7[0]->Fill(DPhi);
3159  break;
3160  case(EMCEGA):
3161  fHistDPhiMix2_4_EMCEGA[0]->Fill(DPhi);
3162  break;
3163  case(EMCJE):
3164  fHistDPhiMix2_4_EMCJet[0]->Fill(DPhi);
3165  break;
3166  }
3167  }
3168 
3169  //4GeV
3170  if(aodtrackassoc->Pt()>4&&aodtrackassoc->Pt()<8){
3171  if(MBtrg){
3172  fHistDPhiMix4_8_MB[0]->Fill(DPhi);
3173  }
3174  switch(trigVal){ case(NONE): break;
3175  case(EMC7):
3176  fHistDPhiMix4_8_EMC7[0]->Fill(DPhi);
3177  break;
3178  case(EMCEGA):
3179  fHistDPhiMix4_8_EMCEGA[0]->Fill(DPhi);
3180  break;
3181  case(EMCJE):
3182  fHistDPhiMix4_8_EMCJet[0]->Fill(DPhi);
3183  break;
3184  }
3185  }
3186 
3187 
3188  }
3189 
3190  //candidate 2<pt<4
3191  if(aodtrack->Pt()>2&&aodtrack->Pt()<4){
3192 
3193 
3194 
3195  //300MeV
3196  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<1){
3197  if(MBtrg){
3198  fHistDPhiMix300_1_MB[1]->Fill(DPhi);
3199  }
3200  switch(trigVal){ case(NONE): break;
3201  case(EMC7):
3202  fHistDPhiMix300_1_EMC7[1]->Fill(DPhi);
3203  break;
3204  case(EMCEGA):
3205  fHistDPhiMix300_1_EMCEGA[1]->Fill(DPhi);
3206  break;
3207  case(EMCJE):
3208  fHistDPhiMix300_1_EMCJet[1]->Fill(DPhi);
3209  break;
3210  }
3211  }
3212 
3213  //1GeV
3214  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
3215  if(MBtrg){
3216  fHistDPhiMix1_2_MB[1]->Fill(DPhi);
3217  }
3218  switch(trigVal){ case(NONE): break;
3219  case(EMC7):
3220  fHistDPhiMix1_2_EMC7[1]->Fill(DPhi);
3221  break;
3222  case(EMCEGA):
3223  fHistDPhiMix1_2_EMCEGA[1]->Fill(DPhi);
3224  break;
3225  case(EMCJE):
3226  fHistDPhiMix1_2_EMCJet[1]->Fill(DPhi);
3227  break;
3228  }
3229  }
3230 
3231  //2GeV
3232  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<4){
3233  if(MBtrg){
3234  fHistDPhiMix2_4_MB[1]->Fill(DPhi);
3235  fHistDPhiMix28_MB->Fill(DPhi);
3236  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
3237  }
3238  switch(trigVal){ case(NONE): break;
3239  case(EMC7):
3240  fHistDPhiMix2_4_EMC7[1]->Fill(DPhi);
3241  fHistDPhiMix28_EMC7->Fill(DPhi);
3242  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
3243  break;
3244  case(EMCEGA):
3245  fHistDPhiMix2_4_EMCEGA[1]->Fill(DPhi);
3246  fHistDPhiMix28_EMCEGA->Fill(DPhi);
3247  fHistDPhiDEtaMix28_EMCEGA->Fill(DPhi, DEta);
3248  break;
3249  case(EMCJE):
3250  fHistDPhiMix2_4_EMCJet[1]->Fill(DPhi);
3251  fHistDPhiMix28_EMCJet->Fill(DPhi);
3252  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
3253  break;
3254  }
3255  }
3256 
3257  //4GeV
3258  if(aodtrackassoc->Pt()>4&&aodtrackassoc->Pt()<8){
3259  if(MBtrg){
3260  fHistDPhiMix4_8_MB[1]->Fill(DPhi);
3261  fHistDPhiMix28_MB->Fill(DPhi);
3262  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
3263  }
3264  switch(trigVal){ case(NONE): break;
3265  case(EMC7):
3266  fHistDPhiMix4_8_EMC7[1]->Fill(DPhi);
3267  fHistDPhiMix28_EMC7->Fill(DPhi);
3268  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
3269  break;
3270  case(EMCEGA):
3271  fHistDPhiMix4_8_EMCEGA[1]->Fill(DPhi);
3272  fHistDPhiMix28_EMCEGA->Fill(DPhi);
3273  fHistDPhiDEtaMix28_EMCEGA->Fill(DPhi, DEta);
3274  break;
3275  case(EMCJE):
3276  fHistDPhiMix4_8_EMCJet[1]->Fill(DPhi);
3277  fHistDPhiMix28_EMCJet->Fill(DPhi);
3278  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
3279  break;
3280  }
3281  }
3282 
3283 
3284  }
3285 
3286  //candidate 4<pt<8
3287  if(aodtrack->Pt()>4&&aodtrack->Pt()<8){
3288 
3289 
3290 
3291  //300MeV
3292  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<1){
3293  if(MBtrg){
3294  fHistDPhiMix300_1_MB[2]->Fill(DPhi);
3295  }
3296  switch(trigVal){ case(NONE): break;
3297  case(EMC7):
3298  fHistDPhiMix300_1_EMC7[2]->Fill(DPhi);
3299  break;
3300  case(EMCEGA):
3301  fHistDPhiMix300_1_EMCEGA[2]->Fill(DPhi);
3302  break;
3303  case(EMCJE):
3304  fHistDPhiMix300_1_EMCJet[2]->Fill(DPhi);
3305  break;
3306  }
3307  }
3308 
3309  //1GeV
3310  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
3311  if(MBtrg){
3312  fHistDPhiMix1_2_MB[2]->Fill(DPhi);
3313  }
3314  switch(trigVal){ case(NONE): break;
3315  case(EMC7):
3316  fHistDPhiMix1_2_EMC7[2]->Fill(DPhi);
3317  break;
3318  case(EMCEGA):
3319  fHistDPhiMix1_2_EMCEGA[2]->Fill(DPhi);
3320  break;
3321  case(EMCJE):
3322  fHistDPhiMix1_2_EMCJet[2]->Fill(DPhi);
3323  break;
3324  }
3325  }
3326 
3327  //2GeV
3328  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<4){
3329  if(MBtrg){
3330  fHistDPhiMix2_4_MB[2]->Fill(DPhi);
3331  fHistDPhiMix28_MB->Fill(DPhi);
3332  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
3333  }
3334  switch(trigVal){ case(NONE): break;
3335  case(EMC7):
3336  fHistDPhiMix2_4_EMC7[2]->Fill(DPhi);
3337  fHistDPhiMix28_EMC7->Fill(DPhi);
3338  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
3339  break;
3340  case(EMCEGA):
3341  fHistDPhiMix2_4_EMCEGA[2]->Fill(DPhi);
3342  fHistDPhiMix28_EMCEGA->Fill(DPhi);
3343  fHistDPhiDEtaMix28_EMCEGA->Fill(DPhi, DEta);
3344  break;
3345  case(EMCJE):
3346  fHistDPhiMix2_4_EMCJet[2]->Fill(DPhi);
3347  fHistDPhiMix28_EMCJet->Fill(DPhi);
3348  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
3349  break;
3350  }
3351  }
3352 
3353  //4GeV
3354  if(aodtrackassoc->Pt()>4&&aodtrackassoc->Pt()<8){
3355  if(MBtrg){
3356  fHistDPhiMix4_8_MB[2]->Fill(DPhi);
3357  fHistDPhiMix28_MB->Fill(DPhi);
3358  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
3359  }
3360  switch(trigVal){ case(NONE): break;
3361  case(EMC7):
3362  fHistDPhiMix4_8_EMC7[2]->Fill(DPhi);
3363  fHistDPhiMix28_EMC7->Fill(DPhi);
3364  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
3365  break;
3366  case(EMCEGA):
3367  fHistDPhiMix4_8_EMCEGA[2]->Fill(DPhi);
3368  fHistDPhiMix28_EMCEGA->Fill(DPhi);
3369  fHistDPhiDEtaMix28_EMCEGA->Fill(DPhi, DEta);
3370  break;
3371  case(EMCJE):
3372  fHistDPhiMix4_8_EMCJet[2]->Fill(DPhi);
3373  fHistDPhiMix28_EMCJet->Fill(DPhi);
3374  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
3375  break;
3376  }
3377  }
3378 
3379 
3380  }
3381  }
3382  }
3383  PostData(1, fOutputMB);
3384  PostData(2, fOutputEMC7);
3385  PostData(3, fOutputEMCEGA);
3386  PostData(4, fOutputEMCJet);
3387  return;
3388 }
3389 
3390 //________________________________________________________________________
3392 {
3393 
3394 }
void FillPIDHistos(AliAODEvent *aod, AliAODTrack *aodtrack, AliPIDResponse *fPIDResponse)
double Double_t
Definition: External.C:58
Definition: External.C:236
void FillDPhiHistos(AliAODEvent *esd, AliAODTrack *aodtrack, Int_t i)
void FillPhotoElecHistos(AliAODEvent *aod, AliAODTrack *aodtrack, AliPIDResponse *fPIDResponse, Int_t i)
void InvMass(Int_t icalo, TString particle, TString fileName)
virtual void Terminate(Option_t *)
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
TObjArray * MakeTrkArr(AliAODEvent *aod)
Double_t nEvents
plot quality messages
AliEventPoolManager * fPoolMan
void SetElectronTrackCuts(Bool_t trkCutBool)
AliESDtrackCuts * fTrackCutsWeak
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
virtual void UserExec(Option_t *option)
virtual void UserCreateOutputObjects()
const char Option_t
Definition: External.C:48
void FillMEDPhiHistos(AliAODTrack *aodtrack)
bool Bool_t
Definition: External.C:53
void SetSSCutBool(Bool_t SSCutBool)
TList * OpenFile(const char *fname)
Definition: DrawAnaELoss.C:65
AliESDtrackCuts * fTrackCutsStrong