AliPhysics  f05a842 (f05a842)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
40 #include "AliAnalysisTaskSE.h"
41 #include "AliAnalysisManager.h"
42 #include "AliStack.h"
43 #include "AliESDtrackCuts.h"
44 #include "AliESDtrack.h"
45 #include "AliAODTrack.h"
46 #include "AliESDCaloCluster.h"
47 #include "AliAODCaloCluster.h"
48 #include "AliESDEvent.h"
49 #include "AliAODEvent.h"
50 #include "AliESDInputHandler.h"
51 #include "AliAODInputHandler.h"
52 #include "AliPID.h"
53 #include "AliPIDResponse.h"
54 #include "AliTRDPIDResponse.h"
55 #include "AliEventPoolManager.h"
56 
57 using std::cout;
58 using std::endl;
59 
60 
62 
63 //________________________________________________________________________
64 AliAnalysisTaskPSHFE::AliAnalysisTaskPSHFE() // All data members should be initialised here
66  fOutputMB(0),
67  fOutputEMC7(0),
68  fOutputEMCJet(0),
69  fTrackCutsStrong(0),
70  fTrackCutsWeak(0),
71  globaltrackCuts(0),
72  comptrackCuts(0),
73  fPoolMan(0),
74  fPool(0),
75  aodEv(0),
76  trkArr(0),
77  EMC7trg(0),
78  EMCJettrg(0),
79  MBtrg(0),
80  tagStrong(0),
81  tagPhot(0),
82 
83  fHistPIDRejection(0),
84  fHistNElecPerEvent(0),
85 
86  fHistTPCNClus_MB(0),
87  fHistITSNClus_MB(0),
88  fHistTPCSig_MB(0),
89  fHistTPCSigCut_MB(0),
90  fHistImpPar_MB(0),
91  fHistImpParTag_MB(0),
92  fHistNevents_MB(0),
93  fHistPtSum_MB(0),
94  fHistPtSumTag_MB(0),
95  fHistPtSumEMC_MB(0),
96  fHistEtaPhi_MB(0),
97  fHistEtaPhiTag_MB(0),
98  fHistEtaPhiTPCOnly_MB(0),
99  fHistDPhi28_MB(0),
100  fHistDPhiDEta28_MB(0),
101  fHistDPhiMix28_MB(0),
102  fHistDPhiDEtaMix28_MB(0),
103  fHistEMC_Had_MB_1Gev(0),
104  fHistInvMassElecLike_MB(0),
105  fHistInvMassElecUnLike_MB(0),
106  fHistOpAngElecLike_MB(0),
107  fHistOpAngElecUnLike_MB(0),
108  fHistPtAssoc_MB(0),
109  fHistPtAssocMix_MB(0),
110  fHistPtTag_MB(0),
111  fHistPhotoMismatch_MB(0),
112  fHistDPhi18Spe_MB(0),
113 
114  fHistTPCNClus_EMC7(0),
115  fHistITSNClus_EMC7(0),
116  fHistTPCSig_EMC7(0),
117  fHistTPCSigCut_EMC7(0),
118  fHistImpPar_EMC7(0),
119  fHistImpParTag_EMC7(0),
120  fHistNevents_EMC7(0),
121  fHistPtSum_EMC7(0),
122  fHistPtSumTag_EMC7(0),
123  fHistPtSumEMC_EMC7(0),
124  fHistEtaPhi_EMC7(0),
125  fHistEtaPhiTag_EMC7(0),
126  fHistDPhi28_EMC7(0),
127  fHistDPhiDEta28_EMC7(0),
128  fHistDPhiMix28_EMC7(0),
129  fHistDPhiDEtaMix28_EMC7(0),
130  fHistInvMassElecLike_EMC7(0),
131  fHistInvMassElecUnLike_EMC7(0),
132  fHistOpAngElecLike_EMC7(0),
133  fHistOpAngElecUnLike_EMC7(0),
134  fHistPtAssoc_EMC7(0),
135  fHistPtAssocMix_EMC7(0),
136  fHistPtTag_EMC7(0),
137  fHistPhotoMismatch_EMC7(0),
138  fHistDPhi18Spe_EMC7(0),
139 
140  fHistTPCNClus_EMCJet(0),
141  fHistITSNClus_EMCJet(0),
142  fHistTPCSig_EMCJet(0),
143  fHistTPCSigCut_EMCJet(0),
144  fHistImpPar_EMCJet(0),
145  fHistImpParTag_EMCJet(0),
146  fHistNevents_EMCJet(0),
147  fHistPtSum_EMCJet(0),
148  fHistPtSumTag_EMCJet(0),
149  fHistPtSumEMC_EMCJet(0),
150  fHistEtaPhi_EMCJet(0),
151  fHistEtaPhiTag_EMCJet(0),
152  fHistDPhi28_EMCJet(0),
153  fHistDPhiDEta28_EMCJet(0),
154  fHistDPhiMix28_EMCJet(0),
155  fHistDPhiDEtaMix28_EMCJet(0),
156  fHistInvMassElecLike_EMCJet(0),
157  fHistInvMassElecUnLike_EMCJet(0),
158  fHistOpAngElecLike_EMCJet(0),
159  fHistOpAngElecUnLike_EMCJet(0),
160  fHistPtAssoc_EMCJet(0),
161  fHistPtAssocMix_EMCJet(0),
162  fHistPtTag_EMCJet(0),
163  fHistPhotoMismatch_EMCJet(0),
164  fHistDPhi18Spe_EMCJet(0)
165 
166  // The last in the above list should not have a comma after it
167 {
168 
169  //Init the DPhi Plots here because they are stored in arrays
170  for(Int_t i=0; i<3; i++){
171  fHistDPhi300_500_MB[i]=0;
172  fHistDPhi500_800_MB[i]=0;
173  fHistDPhi800_1_MB[i]=0;
174  fHistDPhi1_2_MB[i]=0;
175  fHistDPhi2_3_MB[i]=0;
176  fHistDPhi3_4_MB[i]=0;
177  fHistDPhi4_MB[i]=0;
178 
179  fHistDPhi300_500_EMC7[i]=0;
180  fHistDPhi500_800_EMC7[i]=0;
181  fHistDPhi800_1_EMC7[i]=0;
182  fHistDPhi1_2_EMC7[i]=0;
183  fHistDPhi2_3_EMC7[i]=0;
184  fHistDPhi3_4_EMC7[i]=0;
185  fHistDPhi4_EMC7[i]=0;
186 
187  fHistDPhi300_500_EMCJet[i]=0;
188  fHistDPhi500_800_EMCJet[i]=0;
189  fHistDPhi800_1_EMCJet[i]=0;
190  fHistDPhi1_2_EMCJet[i]=0;
191  fHistDPhi2_3_EMCJet[i]=0;
192  fHistDPhi3_4_EMCJet[i]=0;
193  fHistDPhi4_EMCJet[i]=0;
194 
195  //ME histos
196  fHistDPhiMix300_500_MB[i]=0;
197  fHistDPhiMix500_800_MB[i]=0;
198  fHistDPhiMix800_1_MB[i]=0;
199  fHistDPhiMix1_2_MB[i]=0;
200  fHistDPhiMix2_3_MB[i]=0;
201  fHistDPhiMix3_4_MB[i]=0;
202  fHistDPhiMix4_MB[i]=0;
203 
204  fHistDPhiMix300_500_EMC7[i]=0;
205  fHistDPhiMix500_800_EMC7[i]=0;
206  fHistDPhiMix800_1_EMC7[i]=0;
207  fHistDPhiMix1_2_EMC7[i]=0;
208  fHistDPhiMix2_3_EMC7[i]=0;
209  fHistDPhiMix3_4_EMC7[i]=0;
210  fHistDPhiMix4_EMC7[i]=0;
211 
212  fHistDPhiMix300_500_EMCJet[i]=0;
213  fHistDPhiMix500_800_EMCJet[i]=0;
214  fHistDPhiMix800_1_EMCJet[i]=0;
215  fHistDPhiMix1_2_EMCJet[i]=0;
216  fHistDPhiMix2_3_EMCJet[i]=0;
217  fHistDPhiMix3_4_EMCJet[i]=0;
218  fHistDPhiMix4_EMCJet[i]=0;
219  }
220 
221  //Init PID Plots here since they are stored in Arrays
222  for(int i=0;i<6;i++){
223  //MB Plots
224  fHistTPC_EMCTRD_MB[i]=0;
225 
226  fHistEMC_TPCTRD_MB[i]=0;
227 
228  fHistTRD_TPCEMC_MB[i]=0;
229 
230  //EMC7 Plots
231  fHistTPC_EMCTRD_EMC7[i]=0;
232 
233  fHistEMC_TPCTRD_EMC7[i]=0;
234 
235  fHistTRD_TPCEMC_EMC7[i]=0;
236 
237  //EMCJet Plots
238  fHistTPC_EMCTRD_EMCJet[i]=0;
239 
240  fHistEMC_TPCTRD_EMCJet[i]=0;
241 
242  fHistTRD_TPCEMC_EMCJet[i]=0;
243 
244  fHistM02_All_MB[i]=0;
245  fHistM02_Elec_MB[i]=0;
246  fHistM20_All_MB[i]=0;
247  fHistM20_Elec_MB[i]=0;
248 
249  fHistM02_All_EMC7[i]=0;
250  fHistM02_Elec_EMC7[i]=0;
251  fHistM20_All_EMC7[i]=0;
252  fHistM20_Elec_EMC7[i]=0;
253 
254  fHistM02_All_EMCJet[i]=0;
255  fHistM02_Elec_EMCJet[i]=0;
256  fHistM20_All_EMCJet[i]=0;
257  fHistM20_Elec_EMCJet[i]=0;
258  }
259 
260  // Dummy constructor ALWAYS needed for I/O.
261 }
262 
263 //________________________________________________________________________
264 AliAnalysisTaskPSHFE::AliAnalysisTaskPSHFE(const char *name) // All data members should be initialised here
265  :AliAnalysisTaskSE(name),
266  fOutputMB(0),
267  fOutputEMC7(0),
268  fOutputEMCJet(0),
269  fTrackCutsStrong(0),
270  fTrackCutsWeak(0),
271  globaltrackCuts(0),
272  comptrackCuts(0),
273  fPoolMan(0),
274  fPool(0),
275  aodEv(0),
276  trkArr(0),
277  EMC7trg(0),
278  EMCJettrg(0),
279  MBtrg(0),
280  tagStrong(0),
281  tagPhot(0),
282 
283  fHistPIDRejection(0),
284  fHistNElecPerEvent(0),
285 
286  fHistTPCNClus_MB(0),
287  fHistITSNClus_MB(0),
288  fHistTPCSig_MB(0),
289  fHistTPCSigCut_MB(0),
290  fHistImpPar_MB(0),
291  fHistImpParTag_MB(0),
292  fHistNevents_MB(0),
293  fHistPtSum_MB(0),
294  fHistPtSumTag_MB(0),
295  fHistPtSumEMC_MB(0),
296  fHistEtaPhi_MB(0),
297  fHistEtaPhiTag_MB(0),
298  fHistEtaPhiTPCOnly_MB(0),
299  fHistDPhi28_MB(0),
300  fHistDPhiDEta28_MB(0),
301  fHistDPhiMix28_MB(0),
302  fHistDPhiDEtaMix28_MB(0),
303  fHistEMC_Had_MB_1Gev(0),
304  fHistInvMassElecLike_MB(0),
305  fHistInvMassElecUnLike_MB(0),
306  fHistOpAngElecLike_MB(0),
307  fHistOpAngElecUnLike_MB(0),
308  fHistPtAssoc_MB(0),
309  fHistPtAssocMix_MB(0),
310  fHistPtTag_MB(0),
311  fHistPhotoMismatch_MB(0),
312  fHistDPhi18Spe_MB(0),
313 
314  fHistTPCNClus_EMC7(0),
315  fHistITSNClus_EMC7(0),
316  fHistTPCSig_EMC7(0),
317  fHistTPCSigCut_EMC7(0),
318  fHistImpPar_EMC7(0),
319  fHistImpParTag_EMC7(0),
320  fHistNevents_EMC7(0),
321  fHistPtSum_EMC7(0),
322  fHistPtSumTag_EMC7(0),
323  fHistPtSumEMC_EMC7(0),
324  fHistEtaPhi_EMC7(0),
325  fHistEtaPhiTag_EMC7(0),
326  fHistDPhi28_EMC7(0),
327  fHistDPhiDEta28_EMC7(0),
328  fHistDPhiMix28_EMC7(0),
329  fHistDPhiDEtaMix28_EMC7(0),
330  fHistInvMassElecLike_EMC7(0),
331  fHistInvMassElecUnLike_EMC7(0),
332  fHistOpAngElecLike_EMC7(0),
333  fHistOpAngElecUnLike_EMC7(0),
334  fHistPtAssoc_EMC7(0),
335  fHistPtAssocMix_EMC7(0),
336  fHistPtTag_EMC7(0),
337  fHistPhotoMismatch_EMC7(0),
338  fHistDPhi18Spe_EMC7(0),
339 
340  fHistTPCNClus_EMCJet(0),
341  fHistITSNClus_EMCJet(0),
342  fHistTPCSig_EMCJet(0),
343  fHistTPCSigCut_EMCJet(0),
344  fHistImpPar_EMCJet(0),
345  fHistImpParTag_EMCJet(0),
346  fHistNevents_EMCJet(0),
347  fHistPtSum_EMCJet(0),
348  fHistPtSumTag_EMCJet(0),
349  fHistPtSumEMC_EMCJet(0),
350  fHistEtaPhi_EMCJet(0),
351  fHistEtaPhiTag_EMCJet(0),
352  fHistDPhi28_EMCJet(0),
353  fHistDPhiDEta28_EMCJet(0),
354  fHistDPhiMix28_EMCJet(0),
355  fHistDPhiDEtaMix28_EMCJet(0),
356  fHistInvMassElecLike_EMCJet(0),
357  fHistInvMassElecUnLike_EMCJet(0),
358  fHistOpAngElecLike_EMCJet(0),
359  fHistOpAngElecUnLike_EMCJet(0),
360  fHistPtAssoc_EMCJet(0),
361  fHistPtAssocMix_EMCJet(0),
362  fHistPtTag_EMCJet(0),
363  fHistPhotoMismatch_EMCJet(0),
364  fHistDPhi18Spe_EMCJet(0)
365 
366  // The last in the above list should not have a comma after it
367 {
368  // Constructor
369  // Define input and output slots here (never in the dummy constructor)
370  // Input slot #0 works with a TChain - it is connected to the default input container
371  // Output slot #1 writes into a TH1 container
372 
373  for(Int_t i=0; i<3; i++){
374  fHistDPhi300_500_MB[i]=0;
375  fHistDPhi500_800_MB[i]=0;
376  fHistDPhi800_1_MB[i]=0;
377  fHistDPhi1_2_MB[i]=0;
378  fHistDPhi2_3_MB[i]=0;
379  fHistDPhi3_4_MB[i]=0;
380  fHistDPhi4_MB[i]=0;
381 
384  fHistDPhi800_1_EMC7[i]=0;
385  fHistDPhi1_2_EMC7[i]=0;
386  fHistDPhi2_3_EMC7[i]=0;
387  fHistDPhi3_4_EMC7[i]=0;
388  fHistDPhi4_EMC7[i]=0;
389 
393  fHistDPhi1_2_EMCJet[i]=0;
394  fHistDPhi2_3_EMCJet[i]=0;
395  fHistDPhi3_4_EMCJet[i]=0;
396  fHistDPhi4_EMCJet[i]=0;
397 
398  //ME histos
402  fHistDPhiMix1_2_MB[i]=0;
403  fHistDPhiMix2_3_MB[i]=0;
404  fHistDPhiMix3_4_MB[i]=0;
405  fHistDPhiMix4_MB[i]=0;
406 
413  fHistDPhiMix4_EMC7[i]=0;
414 
422  }
423 
424  //Init PID Plots here since they are stored in Arrays
425  for(Int_t i=0;i<6;i++){
426  //MB Plots
427  fHistTPC_EMCTRD_MB[i]=0;
428 
429  fHistEMC_TPCTRD_MB[i]=0;
430 
431  fHistTRD_TPCEMC_MB[i]=0;
432 
433  //EMC7 Plots
435 
437 
439 
440  //EMCJet Plots
442 
444 
446 
447  fHistM02_All_MB[i]=0;
448  fHistM02_Elec_MB[i]=0;
449  fHistM20_All_MB[i]=0;
450  fHistM20_Elec_MB[i]=0;
451 
452  fHistM02_All_EMC7[i]=0;
453  fHistM02_Elec_EMC7[i]=0;
454  fHistM20_All_EMC7[i]=0;
455  fHistM20_Elec_EMC7[i]=0;
456 
457  fHistM02_All_EMCJet[i]=0;
459  fHistM20_All_EMCJet[i]=0;
461  }
462 
463 
464  DefineOutput(1, TList::Class());//MB
465  DefineOutput(2, TList::Class());//EMC7
466  DefineOutput(3, TList::Class());//EMCJet
467 }
468 
469 //________________________________________________________________________
471 {
472  // Destructor. Clean-up the output list, but not the histograms that are put inside
473  // (the list is owner and will clean-up these histograms). Protect in PROOF case.
474  for(Int_t i=0;i<3;i++){
475  delete fHistDPhi300_500_MB[i];
476  delete fHistDPhi500_800_MB[i];
477  delete fHistDPhi800_1_MB[i];
478  delete fHistDPhi1_2_MB[i];
479  delete fHistDPhi2_3_MB[i];
480  delete fHistDPhi3_4_MB[i];
481  delete fHistDPhi4_MB[i];
482 
483  delete fHistDPhi300_500_EMC7[i];
484  delete fHistDPhi500_800_EMC7[i];
485  delete fHistDPhi800_1_EMC7[i];
486  delete fHistDPhi1_2_EMC7[i];
487  delete fHistDPhi2_3_EMC7[i];
488  delete fHistDPhi3_4_EMC7[i];
489  delete fHistDPhi4_EMC7[i];
490 
491  delete fHistDPhi300_500_EMCJet[i];
492  delete fHistDPhi500_800_EMCJet[i];
493  delete fHistDPhi800_1_EMCJet[i];
494  delete fHistDPhi1_2_EMCJet[i];
495  delete fHistDPhi2_3_EMCJet[i];
496  delete fHistDPhi3_4_EMCJet[i];
497  delete fHistDPhi4_EMCJet[i];
498 
499  //ME histos
500  delete fHistDPhiMix300_500_MB[i];
501  delete fHistDPhiMix500_800_MB[i];
502  delete fHistDPhiMix800_1_MB[i];
503  delete fHistDPhiMix1_2_MB[i];
504  delete fHistDPhiMix2_3_MB[i];
505  delete fHistDPhiMix3_4_MB[i];
506  delete fHistDPhiMix4_MB[i];
507 
508  delete fHistDPhiMix300_500_EMC7[i];
509  delete fHistDPhiMix500_800_EMC7[i];
510  delete fHistDPhiMix800_1_EMC7[i];
511  delete fHistDPhiMix1_2_EMC7[i];
512  delete fHistDPhiMix2_3_EMC7[i];
513  delete fHistDPhiMix3_4_EMC7[i];
514  delete fHistDPhiMix4_EMC7[i];
515 
516  delete fHistDPhiMix300_500_EMCJet[i];
517  delete fHistDPhiMix500_800_EMCJet[i];
518  delete fHistDPhiMix800_1_EMCJet[i];
519  delete fHistDPhiMix1_2_EMCJet[i];
520  delete fHistDPhiMix2_3_EMCJet[i];
521  delete fHistDPhiMix3_4_EMCJet[i];
522  delete fHistDPhiMix4_EMCJet[i];
523  }
524 
525  //Init PID Plots here since they are stored in Arrays
526  for(Int_t i=0;i<6;i++){
527  //MB Plots
528  delete fHistTPC_EMCTRD_MB[i];
529 
530  delete fHistEMC_TPCTRD_MB[i];
531 
532  delete fHistTRD_TPCEMC_MB[i];
533 
534  //EMC7 Plots
535  delete fHistTPC_EMCTRD_EMC7[i];
536 
537  delete fHistEMC_TPCTRD_EMC7[i];
538 
539  delete fHistTRD_TPCEMC_EMC7[i];
540 
541  //EMCJet Plots
542  delete fHistTPC_EMCTRD_EMCJet[i];
543 
544  delete fHistEMC_TPCTRD_EMCJet[i];
545 
546  delete fHistTRD_TPCEMC_EMCJet[i];
547 
548  delete fHistM02_All_MB[i];
549  delete fHistM02_Elec_MB[i];
550  delete fHistM20_All_MB[i];
551  delete fHistM20_Elec_MB[i];
552 
553  delete fHistM02_All_EMC7[i];
554  delete fHistM02_Elec_EMC7[i];
555  delete fHistM20_All_EMC7[i];
556  delete fHistM20_Elec_EMC7[i];
557 
558  delete fHistM02_All_EMCJet[i];
559  delete fHistM02_Elec_EMCJet[i];
560  delete fHistM20_All_EMCJet[i];
561  delete fHistM20_Elec_EMCJet[i];
562  }
563 
564  delete fTrackCutsStrong;
565  delete fTrackCutsWeak;
566 }
567 
568 //________________________________________________________________________
570  // Create histograms
571  // Called once (on the worker node)
572 
573  fOutputMB = new TList();
574  OpenFile(1);
575  fOutputMB->SetOwner(); // IMPORTANT!
576  fOutputEMC7 = new TList();
577  OpenFile(2);
578  fOutputEMC7->SetOwner(); // IMPORTANT!
579  fOutputEMCJet = new TList();
580  OpenFile(3);
581  fOutputEMCJet->SetOwner(); // IMPORTANT!
582 
583  //Initialize event pool stuff
584  Double_t vertexBins[5] = { -10, -4, 0, 4, 10 };
585  Int_t nZvtxBins = 4;
586  Double_t multBins[4] = {0, 200, 500, 1000};
587  Int_t nMultBins = 3;
588 
589  fPoolMan = new AliEventPoolManager(50, 50, nMultBins, multBins, nZvtxBins, vertexBins);
590  fPoolMan->Validate();
591 
592  //Some strings for histograms
593  TString ptRangesDPhi[3] = {"1-2Gev", "2-4Gev", "4-8Gev"};
594  TString ptRangesPID[6] = {"1-2GeV", "2-3GeV", "3-4GeV", "4-5GeV", "5-6GeV", ">6GeV"};
595  TString ptRangesRegion[4] = {"1-2Gev", "2-4Gev", "4-6Gev", ">6Gev"};
596 
597  //Strong cuts for heavy flavour
598  fTrackCutsStrong = new AliESDtrackCuts();
599  // TPC
600  fTrackCutsStrong->SetRequireTPCRefit(kTRUE);
601  // ITS
602  fTrackCutsStrong->SetRequireITSRefit(kTRUE);
603  // 7*(0.0026+0.0050/pt^1.01)
604  fTrackCutsStrong->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
605  fTrackCutsStrong->SetMaxDCAToVertexZ(2);
606  fTrackCutsStrong->SetDCAToVertex2D(kFALSE);
607  fTrackCutsStrong->SetRequireSigmaToVertex(kFALSE);
608  fTrackCutsStrong->SetMaxChi2PerClusterITS(36);
609  fTrackCutsStrong->SetMinNClustersTPC(120);
610  fTrackCutsStrong->SetMinNClustersITS(4);
611  fTrackCutsStrong->SetPtRange(1,10e10);
612  fTrackCutsStrong->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth);
613  fTrackCutsStrong->SetMaxChi2PerClusterTPC(2);
614  fTrackCutsStrong->SetMaxDCAToVertexXY(1);
615  fTrackCutsStrong->SetMaxDCAToVertexZ(2);
616  fTrackCutsStrong->SetEtaRange(-.6, .6);
617  fTrackCutsStrong->SetAcceptKinkDaughters(kFALSE);
618 
619  //Weak cuts for heavy flavour
620  fTrackCutsWeak = new AliESDtrackCuts();
621  // TPC
622  fTrackCutsWeak->SetRequireTPCRefit(kTRUE);
623  // ITS
624  fTrackCutsWeak->SetRequireITSRefit(kTRUE);
625  // 7*(0.0026+0.0050/pt^1.01)
626  fTrackCutsWeak->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
627  fTrackCutsWeak->SetMaxDCAToVertexZ(2);
628  fTrackCutsWeak->SetDCAToVertex2D(kFALSE);
629  fTrackCutsWeak->SetRequireSigmaToVertex(kFALSE);
630  fTrackCutsWeak->SetMaxChi2PerClusterITS(36);
631  fTrackCutsWeak->SetMinNClustersTPC(80);
632  fTrackCutsWeak->SetMinNClustersITS(3);
633  fTrackCutsWeak->SetPtRange(1,10e10);
634  fTrackCutsWeak->SetClusterRequirementITS(AliESDtrackCuts::kSPD, AliESDtrackCuts::kBoth);
635  fTrackCutsWeak->SetMaxChi2PerClusterTPC(4);
636  //fTrackCutsWeak->SetMaxDCAToVertexXY(2);
637  //fTrackCutsWeak->SetMaxDCAToVertexZ(3);
638  fTrackCutsWeak->SetEtaRange(-.7, .7);
639  fTrackCutsWeak->SetAcceptKinkDaughters(kFALSE);
640 
641  // Create histograms
642 
643  //Photonic e mismatch histo
644 
645  fHistPhotoMismatch_MB = new TH1F("fHistPhotoMismatch_MB", "Electrons identified as 'heavy flavour' that fall in photonic invariant mass and opening angle cuts", 2, 0, 1);
646  fHistPhotoMismatch_MB->GetXaxis()->SetTitle("Electrons");
647  fHistPhotoMismatch_MB->GetYaxis()->SetTitle("Cts");
648 
649  fHistPhotoMismatch_EMC7 = new TH1F("fHistPhotoMismatch_EMC7", "Electrons identified as 'heavy flavour' that fall in photonic invariant mass and opening angle cuts", 2, 0, 1);
650  fHistPhotoMismatch_EMC7->GetXaxis()->SetTitle("Electrons");
651  fHistPhotoMismatch_EMC7->GetYaxis()->SetTitle("Cts");
652 
653  fHistPhotoMismatch_EMCJet = new TH1F("fHistPhotoMismatch_EMCJet", "Electrons identified as 'heavy flavour' that fall in photonic invariant mass and opening angle cuts", 2, 0, 1);
654  fHistPhotoMismatch_EMCJet->GetXaxis()->SetTitle("Electrons");
655  fHistPhotoMismatch_EMCJet->GetYaxis()->SetTitle("Cts");
656 
657  //Invariant mass histos
658 
659  fHistInvMassElecLike_MB = new TH1F("fHistInvMassElecLike_MB", "Invariant mass for all like-signed electron pairs", 100, 0, .5);
660  fHistInvMassElecLike_MB->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
661  fHistInvMassElecLike_MB->GetYaxis()->SetTitle("Cts");
662 
663  fHistInvMassElecLike_EMC7 = new TH1F("fHistInvMassElecLike_EMC7", "Invariant mass for all like-signed electron pairs", 100, 0, .5);
664  fHistInvMassElecLike_EMC7->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
665  fHistInvMassElecLike_EMC7->GetYaxis()->SetTitle("Cts");
666 
667  fHistInvMassElecLike_EMCJet = new TH1F("fHistInvMassElecLike_EMCJet", "Invariant mass for all like-signed electron pairs", 100, 0, .5);
668  fHistInvMassElecLike_EMCJet->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
669  fHistInvMassElecLike_EMCJet->GetYaxis()->SetTitle("Cts");
670 
671  fHistInvMassElecUnLike_MB = new TH1F("fHistInvMassElecUnLike_MB", "Invariant mass for all unlike-signed electron pairs", 100, 0, .5);
672  fHistInvMassElecUnLike_MB->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
673  fHistInvMassElecUnLike_MB->GetYaxis()->SetTitle("Cts");
674 
675  fHistInvMassElecUnLike_EMC7 = new TH1F("fHistInvMassElecUnLike_EMC7", "Invariant mass for all unlike-signed electron pairs", 100, 0, .5);
676  fHistInvMassElecUnLike_EMC7->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
677  fHistInvMassElecUnLike_EMC7->GetYaxis()->SetTitle("Cts");
678 
679  fHistInvMassElecUnLike_EMCJet = new TH1F("fHistInvMassElecUnLike_EMCJet", "Invariant mass for all unlike-signed electron pairs", 100, 0, .5);
680  fHistInvMassElecUnLike_EMCJet->GetXaxis()->SetTitle("Invariant Mass(Gev/c^2)");
681  fHistInvMassElecUnLike_EMCJet->GetYaxis()->SetTitle("Cts");
682 
683  //Opening Angle Histos
684 
685  fHistOpAngElecLike_MB = new TH1F("fHistOpAngElecLike_MB", "Opening angle for all like-signed electron pairs", 100, 0, TMath::Pi());
686  fHistOpAngElecLike_MB->GetXaxis()->SetTitle("Opening Angle(rad)");
687  fHistOpAngElecLike_MB->GetYaxis()->SetTitle("Cts");
688 
689  fHistOpAngElecLike_EMC7 = new TH1F("fHistOpAngElecLike_EMC7", "Opening angle for all like-signed electron pairs", 100, 0, TMath::Pi());
690  fHistOpAngElecLike_EMC7->GetXaxis()->SetTitle("Opening Angle(rad)");
691  fHistOpAngElecLike_EMC7->GetYaxis()->SetTitle("Cts");
692 
693  fHistOpAngElecLike_EMCJet = new TH1F("fHistOpAngElecLike_EMCJet", "Opening angle for all like-signed electron pairs", 100, 0, TMath::Pi());
694  fHistOpAngElecLike_EMCJet->GetXaxis()->SetTitle("Opening Angle(rad)");
695  fHistOpAngElecLike_EMCJet->GetYaxis()->SetTitle("Cts");
696 
697  fHistOpAngElecUnLike_MB = new TH1F("fHistOpAngElecUnLike_MB", "Opening angle for all unlike-signed electron pairs", 100, 0, TMath::Pi());
698  fHistOpAngElecUnLike_MB->GetXaxis()->SetTitle("Opening Angle(rad)");
699  fHistOpAngElecUnLike_MB->GetYaxis()->SetTitle("Cts");
700 
701  fHistOpAngElecUnLike_EMC7 = new TH1F("fHistOpAngElecUnLike_EMC7", "Opening angle for all unlike-signed electron pairs", 100, 0, TMath::Pi());
702  fHistOpAngElecUnLike_EMC7->GetXaxis()->SetTitle("Opening Angle(rad)");
703  fHistOpAngElecUnLike_EMC7->GetYaxis()->SetTitle("Cts");
704 
705  fHistOpAngElecUnLike_EMCJet = new TH1F("fHistOpAngElecUnLike_EMCJet", "Opening angle for all unlike-signed electron pairs", 100, 0, TMath::Pi());
706  fHistOpAngElecUnLike_EMCJet->GetXaxis()->SetTitle("Opening Angle(rad)");
707  fHistOpAngElecUnLike_EMCJet->GetYaxis()->SetTitle("Cts");
708 
709  //Rejection Histos
710 
711  fHistPIDRejection = new TH1F("fHistPIDRejection", "PID rejection counts for each detector.", 4, 1, 4);
712  fHistPIDRejection->GetXaxis()->SetTitle("Detector");
713  fHistPIDRejection->GetYaxis()->SetTitle("Cts");
714  fHistPIDRejection->GetXaxis()->SetBinLabel(1, "TPC");
715  fHistPIDRejection->GetXaxis()->SetBinLabel(2, "TOF");
716  fHistPIDRejection->GetXaxis()->SetBinLabel(3, "TRD");
717  fHistPIDRejection->GetXaxis()->SetBinLabel(4, "EMC");
718 
719  //Number of electrons per event histo
720  fHistNElecPerEvent = new TH1F("fHistNElecPerEvent", "Number of tagged electrons per event", 5, 1, 5);
721  fHistNElecPerEvent->GetXaxis()->SetTitle("Num. of Electrons");
722  fHistNElecPerEvent->GetYaxis()->SetTitle("Cts");
723 
724  //PID Plots
725 
726  //TPC PID Plots
727  for(Int_t i=0; i<6; i++){
728  //MB
729  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);
730  fHistTPC_EMCTRD_MB[i]->GetXaxis()->SetTitle("Pt");
731  fHistTPC_EMCTRD_MB[i]->GetYaxis()->SetTitle("nSigma");
732 
733  //EMC7
734  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);
735  fHistTPC_EMCTRD_EMC7[i]->GetXaxis()->SetTitle("Pt");
736  fHistTPC_EMCTRD_EMC7[i]->GetYaxis()->SetTitle("nSigma");
737 
738  //EMCJet
739  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);
740  fHistTPC_EMCTRD_EMCJet[i]->GetXaxis()->SetTitle("Pt");
741  fHistTPC_EMCTRD_EMCJet[i]->GetYaxis()->SetTitle("nSigma");
742  }
743 
744  //EMC PID Plots
745  for(Int_t i=0; i<6; i++){
746  //MB
747  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);
748  fHistEMC_TPCTRD_MB[i]->GetXaxis()->SetTitle("E/p");
749  fHistEMC_TPCTRD_MB[i]->GetYaxis()->SetTitle("Cts");
750 
751  //EMC7
752  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);
753  fHistEMC_TPCTRD_EMC7[i]->GetXaxis()->SetTitle("E/p");
754  fHistEMC_TPCTRD_EMC7[i]->GetYaxis()->SetTitle("Cts");
755 
756  //EMCJet
757  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);
758  fHistEMC_TPCTRD_EMCJet[i]->GetXaxis()->SetTitle("E/p");
759  fHistEMC_TPCTRD_EMCJet[i]->GetYaxis()->SetTitle("Cts");
760  }
761 
762  //TRD PID Plots
763  for(Int_t i=0; i<6; i++){
764  //MB
765  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);
766  fHistTRD_TPCEMC_MB[i]->GetXaxis()->SetTitle("Pt");
767  fHistTRD_TPCEMC_MB[i]->GetYaxis()->SetTitle("electron Likelihood");
768 
769  //EMC7
770  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);
771  fHistTRD_TPCEMC_EMC7[i]->GetXaxis()->SetTitle("Pt");
772  fHistTRD_TPCEMC_EMC7[i]->GetYaxis()->SetTitle("electron Likelihood");
773 
774  //EMCJet
775  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);
776  fHistTRD_TPCEMC_EMCJet[i]->GetXaxis()->SetTitle("Pt");
777  fHistTRD_TPCEMC_EMCJet[i]->GetYaxis()->SetTitle("electron Likelihood");
778  }
779 
780  //EMC Shower Shape PID Plots
781  for(Int_t i=0; i<6; i++){
782  //MB
783  fHistM02_All_MB[i] = new TH2F(TString::Format("fHistM02_All_MB_%s",ptRangesPID[i].Data()), TString::Format("E/p vs M02(semi-major axis) for tracks with Pt between %s",ptRangesPID[i].Data()), 100, 0, 1.5, 300, 0, 2);
784  fHistM02_All_MB[i]->GetXaxis()->SetTitle("M02");
785  fHistM02_All_MB[i]->GetYaxis()->SetTitle("E/p");
786 
787  fHistM20_All_MB[i] = new TH2F(TString::Format("fHistM20_All_MB_%s",ptRangesPID[i].Data()), TString::Format("E/p vs M20(semi-minor axis) for tracks with Pt between %s",ptRangesPID[i].Data()), 100, 0, 1.5, 300, 0, 2);
788  fHistM20_All_MB[i]->GetXaxis()->SetTitle("M20");
789  fHistM20_All_MB[i]->GetYaxis()->SetTitle("E/p");
790 
791  fHistM02_Elec_MB[i] = new TH2F(TString::Format("fHistM02_Elec_MB_%s",ptRangesPID[i].Data()), TString::Format("E/p vs M02(semi-major axis) for electron candidates with Pt between %s",ptRangesPID[i].Data()), 100, 0, 1.5, 300, 0, 2);
792  fHistM02_Elec_MB[i]->GetXaxis()->SetTitle("M02");
793  fHistM02_Elec_MB[i]->GetYaxis()->SetTitle("E/p");
794 
795  fHistM20_Elec_MB[i] = new TH2F(TString::Format("fHistM20_Elec_MB_%s",ptRangesPID[i].Data()), TString::Format("E/p vs M20(semi-minor axis) for electron candidates with Pt between %s",ptRangesPID[i].Data()), 100, 0, 1.5, 300, 0, 2);
796  fHistM20_Elec_MB[i]->GetXaxis()->SetTitle("M20");
797  fHistM20_Elec_MB[i]->GetYaxis()->SetTitle("E/p");
798 
799  //EMC7
800  fHistM02_All_EMC7[i] = new TH2F(TString::Format("fHistM02_All_EMC7_%s",ptRangesPID[i].Data()), TString::Format("E/p vs M02(semi-major axis) for tracks with Pt between %s",ptRangesPID[i].Data()), 100, 0, 1.5, 300, 0, 2);
801  fHistM02_All_EMC7[i]->GetXaxis()->SetTitle("M02");
802  fHistM02_All_EMC7[i]->GetYaxis()->SetTitle("E/p");
803 
804  fHistM20_All_EMC7[i] = new TH2F(TString::Format("fHistM20_All_EMC7_%s",ptRangesPID[i].Data()), TString::Format("E/p vs M20(semi-minor axis) for tracks with Pt between %s",ptRangesPID[i].Data()), 100, 0, 1.5, 300, 0, 2);
805  fHistM20_All_EMC7[i]->GetXaxis()->SetTitle("M20");
806  fHistM20_All_EMC7[i]->GetYaxis()->SetTitle("E/p");
807 
808  fHistM02_Elec_EMC7[i] = new TH2F(TString::Format("fHistM02_Elec_EMC7_%s",ptRangesPID[i].Data()), TString::Format("E/p vs M02(semi-major axis) for electron candidates with Pt between %s",ptRangesPID[i].Data()), 100, 0, 1.5, 300, 0, 2);
809  fHistM02_Elec_EMC7[i]->GetXaxis()->SetTitle("M02");
810  fHistM02_Elec_EMC7[i]->GetYaxis()->SetTitle("E/p");
811 
812  fHistM20_Elec_EMC7[i] = new TH2F(TString::Format("fHistM20_Elec_EMC7_%s",ptRangesPID[i].Data()), TString::Format("E/p vs M20(semi-minor axis) for electron candidates with Pt between %s",ptRangesPID[i].Data()), 100, 0, 1.5, 300, 0, 2);
813  fHistM20_Elec_EMC7[i]->GetXaxis()->SetTitle("M20");
814  fHistM20_Elec_EMC7[i]->GetYaxis()->SetTitle("E/p");
815 
816  //EMCJet
817  fHistM02_All_EMCJet[i] = new TH2F(TString::Format("fHistM02_All_EMCJet_%s",ptRangesPID[i].Data()), TString::Format("E/p vs M02(semi-major axis) for tracks with Pt between %s",ptRangesPID[i].Data()), 100, 0, 1.5, 300, 0, 2);
818  fHistM02_All_EMCJet[i]->GetXaxis()->SetTitle("M02");
819  fHistM02_All_EMCJet[i]->GetYaxis()->SetTitle("E/p");
820 
821  fHistM20_All_EMCJet[i] = new TH2F(TString::Format("fHistM20_All_EMCJet_%s",ptRangesPID[i].Data()), TString::Format("E/p vs M20(semi-minor axis) for tracks with Pt between %s",ptRangesPID[i].Data()), 100, 0, 1.5, 300, 0, 2);
822  fHistM20_All_EMCJet[i]->GetXaxis()->SetTitle("M20");
823  fHistM20_All_EMCJet[i]->GetYaxis()->SetTitle("E/p");
824 
825  fHistM02_Elec_EMCJet[i] = new TH2F(TString::Format("fHistM02_Elec_EMCJet_%s",ptRangesPID[i].Data()), TString::Format("E/p vs M02(semi-major axis) for electron candidates with Pt between %s",ptRangesPID[i].Data()), 100, 0, 1.5, 300, 0, 2);
826  fHistM02_Elec_EMCJet[i]->GetXaxis()->SetTitle("M02");
827  fHistM02_Elec_EMCJet[i]->GetYaxis()->SetTitle("E/p");
828 
829  fHistM20_Elec_EMCJet[i] = new TH2F(TString::Format("fHistM20_Elec_EMCJet_%s",ptRangesPID[i].Data()), TString::Format("E/p vs M20(semi-minor axis) for electron candidates with Pt between %s",ptRangesPID[i].Data()), 100, 0, 1.5, 300, 0, 2);
830  fHistM20_Elec_EMCJet[i]->GetXaxis()->SetTitle("M20");
831  fHistM20_Elec_EMCJet[i]->GetYaxis()->SetTitle("E/p");
832  }
833 
834  //DPhi for candidate electrons 2-8 gev and assoc. particles >3gev
835  fHistDPhi28_MB = new TH1F("fHistDPhi28_MB", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
836  fHistDPhi28_MB->GetXaxis()->SetTitle("Delta-Phi");
837  fHistDPhi28_MB->GetYaxis()->SetTitle("Cts");
838 
839  fHistDPhi28_EMC7 = new TH1F("fHistDPhi28_EMC7", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
840  fHistDPhi28_EMC7->GetXaxis()->SetTitle("Delta-Phi");
841  fHistDPhi28_EMC7->GetYaxis()->SetTitle("Cts");
842 
843  fHistDPhi28_EMCJet = new TH1F("fHistDPhi28_EMCJet", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
844  fHistDPhi28_EMCJet->GetXaxis()->SetTitle("Delta-Phi");
845  fHistDPhi28_EMCJet->GetYaxis()->SetTitle("Cts");
846 
847  //DPhi by Eta for triggered particles 2-8 gev and assoc. particles >3gev
848  fHistDPhiDEta28_MB = new TH2F("fHistDPhiDEta28_MB", "Delta-Phi by Delta-Eta for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 100, -TMath::Pi()/2, 3*TMath::Pi()/2, 100, -0.9, 0.9);
849  fHistDPhiDEta28_MB->GetXaxis()->SetTitle("Delta-Phi");
850  fHistDPhiDEta28_MB->GetYaxis()->SetTitle("Delta-Eta");
851  fHistDPhiDEta28_MB->GetZaxis()->SetTitle("Cts");
852 
853  fHistDPhiDEta28_EMC7 = new TH2F("fHistDPhiDEta28_EMC7", "Delta-Phi by Delta-Eta for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 100, -TMath::Pi()/2, 3*TMath::Pi()/2, 100, -0.9, 0.9);
854  fHistDPhiDEta28_EMC7->GetXaxis()->SetTitle("Delta-Phi");
855  fHistDPhiDEta28_EMC7->GetYaxis()->SetTitle("Delta-Eta");
856  fHistDPhiDEta28_EMC7->GetZaxis()->SetTitle("Cts");
857 
858  fHistDPhiDEta28_EMCJet = new TH2F("fHistDPhiDEta28_EMCJet", "Delta-Phi by Delta-Eta for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev", 100, -TMath::Pi()/2, 3*TMath::Pi()/2, 100, -0.9, 0.9);
859  fHistDPhiDEta28_EMCJet->GetXaxis()->SetTitle("Delta-Phi");
860  fHistDPhiDEta28_EMCJet->GetYaxis()->SetTitle("Delta-Eta");
861  fHistDPhiDEta28_EMCJet->GetZaxis()->SetTitle("Cts");
862 
863  //DPhi for candidate electrons 2-8 gev and assoc. particles >2Gev for Mixed Events
864  fHistDPhiMix28_MB = new TH1F("fHistDPhiMix28_MB", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev for Mixed Events", 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
865  fHistDPhiMix28_MB->GetXaxis()->SetTitle("Delta-Phi");
866  fHistDPhiMix28_MB->GetYaxis()->SetTitle("Cts");
867 
868  fHistDPhiMix28_EMC7 = new TH1F("fHistDPhiMix28_EMC7", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev for Mixed Events", 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
869  fHistDPhiMix28_EMC7->GetXaxis()->SetTitle("Delta-Phi");
870  fHistDPhiMix28_EMC7->GetYaxis()->SetTitle("Cts");
871 
872  fHistDPhiMix28_EMCJet = new TH1F("fHistDPhiMix28_EMCJet", "Delta-Phi for candidate electrons with 2<pt<8Gev and assoc. with pt>2Gev for Mixed Events", 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
873  fHistDPhiMix28_EMCJet->GetXaxis()->SetTitle("Delta-Phi");
874  fHistDPhiMix28_EMCJet->GetYaxis()->SetTitle("Cts");
875 
876  //DPhi by Eta for triggered particles 2-8 gev and assoc. particles >3gev
877  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", 100, -TMath::Pi()/2, 3*TMath::Pi()/2, 100, -0.9, 0.9);
878  fHistDPhiDEtaMix28_MB->GetXaxis()->SetTitle("Delta-Phi");
879  fHistDPhiDEtaMix28_MB->GetYaxis()->SetTitle("Delta-Eta");
880  fHistDPhiDEtaMix28_MB->GetZaxis()->SetTitle("Cts");
881 
882  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", 100, -TMath::Pi()/2, 3*TMath::Pi()/2, 100, -0.9, 0.9);
883  fHistDPhiDEtaMix28_EMC7->GetXaxis()->SetTitle("Delta-Phi");
884  fHistDPhiDEtaMix28_EMC7->GetYaxis()->SetTitle("Delta-Eta");
885  fHistDPhiDEtaMix28_EMC7->GetZaxis()->SetTitle("Cts");
886 
887  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", 100, -TMath::Pi()/2, 3*TMath::Pi()/2, 100, -0.9, 0.9);
888  fHistDPhiDEtaMix28_EMCJet->GetXaxis()->SetTitle("Delta-Phi");
889  fHistDPhiDEtaMix28_EMCJet->GetYaxis()->SetTitle("Delta-Eta");
890  fHistDPhiDEtaMix28_EMCJet->GetZaxis()->SetTitle("Cts");
891 
892  //DPhi by dEdx for triggered particles 2-8 gev and assoc. particles >2gev
893  fHistDPhi18Spe_MB = new TH2F("fHistDPhi18Spe_MB", "Delta-Phi by most probable species for candidate electrons with 1<pt<8Gev and assoc. with pt>.3Gev", 100, -TMath::Pi()/2, 3*TMath::Pi()/2, 10, 0, 10);
894  fHistDPhi18Spe_MB->GetXaxis()->SetTitle("Delta-Phi");
895  fHistDPhi18Spe_MB->GetYaxis()->SetTitle("Species");
896  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(0, "Unkown");
897  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(1, "Electron");
898  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(2, "Muon");
899  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(3, "Pion");
900  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(4, "Kaon");
901  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(5, "Proton");
902  fHistDPhi18Spe_MB->GetYaxis()->SetBinLabel(6, "Deuteron");
903  fHistDPhi18Spe_MB->GetZaxis()->SetTitle("Cts");
904 
905  fHistDPhi18Spe_EMC7 = new TH2F("fHistDPhi18Spe_EMC7", "Delta-Phi by most probable species for candidate electrons with 1<pt<8Gev and assoc. with pt>.3Gev", 100, -TMath::Pi()/2, 3*TMath::Pi()/2, 10, 0, 10);
906  fHistDPhi18Spe_EMC7->GetXaxis()->SetTitle("Delta-Phi");
907  fHistDPhi18Spe_EMC7->GetYaxis()->SetTitle("Species");
908  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(0, "Unkown");
909  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(1, "Electron");
910  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(2, "Muon");
911  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(3, "Pion");
912  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(4, "Kaon");
913  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(5, "Proton");
914  fHistDPhi18Spe_EMC7->GetYaxis()->SetBinLabel(6, "Deuteron");
915  fHistDPhi18Spe_EMC7->GetZaxis()->SetTitle("Cts");
916 
917  fHistDPhi18Spe_EMCJet = new TH2F("fHistDPhi18Spe_EMCJet", "Delta-Phi by most probable species for candidate electrons with 1<pt<8Gev and assoc. with pt>.3Gev", 100, -TMath::Pi()/2, 3*TMath::Pi()/2, 10, 0, 10);
918  fHistDPhi18Spe_EMCJet->GetXaxis()->SetTitle("Delta-Phi");
919  fHistDPhi18Spe_EMCJet->GetYaxis()->SetTitle("Species");
920  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(0, "Unkown");
921  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(1, "Electron");
922  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(2, "Muon");
923  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(3, "Pion");
924  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(4, "Kaon");
925  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(5, "Proton");
926  fHistDPhi18Spe_EMCJet->GetYaxis()->SetBinLabel(6, "Deuteron");
927  fHistDPhi18Spe_EMCJet->GetZaxis()->SetTitle("Cts");
928 
929  // Delta Phi for tracks > 300MeV
930  for(Int_t i=0; i<3; i++){
931  fHistDPhi300_500_MB[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.3-.5Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<.5Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
932  fHistDPhi300_500_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
933  fHistDPhi300_500_MB[i]->GetYaxis()->SetTitle("Cts");
934  }
935 
936  for(Int_t i=0; i<3; i++){
937  fHistDPhi300_500_EMC7[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.3-.5Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<.5Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
938  fHistDPhi300_500_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
939  fHistDPhi300_500_EMC7[i]->GetYaxis()->SetTitle("Cts");
940  }
941 
942  for(Int_t i=0; i<3; i++){
943  fHistDPhi300_500_EMCJet[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.3-.5Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<.5Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
944  fHistDPhi300_500_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
945  fHistDPhi300_500_EMCJet[i]->GetYaxis()->SetTitle("Cts");
946  }
947 
948  // Delta Phi for tracks > 500MeV
949  for(Int_t i=0; i<3; i++){
950  fHistDPhi500_800_MB[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.5-.8Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .5Gev<pt<.8Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
951  fHistDPhi500_800_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
952  fHistDPhi500_800_MB[i]->GetYaxis()->SetTitle("Cts");
953  }
954 
955  for(Int_t i=0; i<3; i++){
956  fHistDPhi500_800_EMC7[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.5-.8Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .5Gev<pt<.8Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
957  fHistDPhi500_800_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
958  fHistDPhi500_800_EMC7[i]->GetYaxis()->SetTitle("Cts");
959  }
960 
961  for(Int_t i=0; i<3; i++){
962  fHistDPhi500_800_EMCJet[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.5-.8Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .5Gev<pt<.8Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
963  fHistDPhi500_800_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
964  fHistDPhi500_800_EMCJet[i]->GetYaxis()->SetTitle("Cts");
965  }
966 
967  // Delta Phi for tracks > 800MeV
968  for(Int_t i=0; i<3; i++){
969  fHistDPhi800_1_MB[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.8-1Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .8Gev<pt<1Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
970  fHistDPhi800_1_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
971  fHistDPhi800_1_MB[i]->GetYaxis()->SetTitle("Cts");
972  }
973 
974  for(Int_t i=0; i<3; i++){
975  fHistDPhi800_1_EMC7[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.8-1Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .8Gev<pt<1Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
976  fHistDPhi800_1_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
977  fHistDPhi800_1_EMC7[i]->GetYaxis()->SetTitle("Cts");
978  }
979 
980  for(Int_t i=0; i<3; i++){
981  fHistDPhi800_1_EMCJet[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_.8-1Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .8Gev<pt<1Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
982  fHistDPhi800_1_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
983  fHistDPhi800_1_EMCJet[i]->GetYaxis()->SetTitle("Cts");
984  }
985 
986  // Delta Phi for tracks > 1GeV
987  for(Int_t i=0; i<3; i++){
988  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(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
989  fHistDPhi1_2_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
990  fHistDPhi1_2_MB[i]->GetYaxis()->SetTitle("Cts");
991  }
992 
993  for(Int_t i=0; i<3; i++){
994  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(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
995  fHistDPhi1_2_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
996  fHistDPhi1_2_EMC7[i]->GetYaxis()->SetTitle("Cts");
997  }
998 
999  for(Int_t i=0; i<3; i++){
1000  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(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1001  fHistDPhi1_2_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1002  fHistDPhi1_2_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1003  }
1004 
1005  // Delta Phi for tracks > 2GeV
1006  for(Int_t i=0; i<3; i++){
1007  fHistDPhi2_3_MB[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_2-3Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<3Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1008  fHistDPhi2_3_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1009  fHistDPhi2_3_MB[i]->GetYaxis()->SetTitle("Cts");
1010  }
1011 
1012  for(Int_t i=0; i<3; i++){
1013  fHistDPhi2_3_EMC7[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_2-3Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<3Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1014  fHistDPhi2_3_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1015  fHistDPhi2_3_EMC7[i]->GetYaxis()->SetTitle("Cts");
1016  }
1017 
1018  for(Int_t i=0; i<3; i++){
1019  fHistDPhi2_3_EMCJet[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_2-3Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<3Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1020  fHistDPhi2_3_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1021  fHistDPhi2_3_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1022  }
1023 
1024  // Delta Phi for tracks > 3GeV
1025  for(Int_t i=0; i<3; i++){
1026  fHistDPhi3_4_MB[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_3-4Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 3Gev<pt<4Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1027  fHistDPhi3_4_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1028  fHistDPhi3_4_MB[i]->GetYaxis()->SetTitle("Cts");
1029  }
1030 
1031  for(Int_t i=0; i<3; i++){
1032  fHistDPhi3_4_EMC7[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_3-4Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 3Gev<pt<4Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1033  fHistDPhi3_4_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1034  fHistDPhi3_4_EMC7[i]->GetYaxis()->SetTitle("Cts");
1035  }
1036 
1037  for(Int_t i=0; i<3; i++){
1038  fHistDPhi3_4_EMCJet[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_3-4Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 3Gev<pt<4Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1039  fHistDPhi3_4_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1040  fHistDPhi3_4_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1041  }
1042 
1043  // Delta Phi for tracks > 5GeV
1044  for(Int_t i=0; i<3; i++){
1045  fHistDPhi4_MB[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_4Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated pt>4Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1046  fHistDPhi4_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1047  fHistDPhi4_MB[i]->GetYaxis()->SetTitle("Cts");
1048  }
1049 
1050  for(Int_t i=0; i<3; i++){
1051  fHistDPhi4_EMC7[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_4Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated pt>4Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1052  fHistDPhi4_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1053  fHistDPhi4_EMC7[i]->GetYaxis()->SetTitle("Cts");
1054  }
1055 
1056  for(Int_t i=0; i<3; i++){
1057  fHistDPhi4_EMCJet[i] = new TH1F(TString::Format("fHistDPhi_trig_%s_assoc_4Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated pt>4Gev",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1058  fHistDPhi4_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1059  fHistDPhi4_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1060  }
1061 
1062  //Mixed Event DPhi plots
1063 
1064  // Delta Phi for tracks > 300MeV
1065  for(Int_t i=0; i<3; i++){
1066  fHistDPhiMix300_500_MB[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.3-.5Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<.5Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1067  fHistDPhiMix300_500_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1068  fHistDPhiMix300_500_MB[i]->GetYaxis()->SetTitle("Cts");
1069  }
1070 
1071  for(Int_t i=0; i<3; i++){
1072  fHistDPhiMix300_500_EMC7[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.3-.5Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<.5Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1073  fHistDPhiMix300_500_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1074  fHistDPhiMix300_500_EMC7[i]->GetYaxis()->SetTitle("Cts");
1075  }
1076 
1077  for(Int_t i=0; i<3; i++){
1078  fHistDPhiMix300_500_EMCJet[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.3-.5Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .3Gev<pt<.5Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1079  fHistDPhiMix300_500_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1080  fHistDPhiMix300_500_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1081  }
1082 
1083  // Delta Phi for tracks > 500MeV
1084  for(Int_t i=0; i<3; i++){
1085  fHistDPhiMix500_800_MB[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.5-.8Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .5Gev<pt<.8Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1086  fHistDPhiMix500_800_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1087  fHistDPhiMix500_800_MB[i]->GetYaxis()->SetTitle("Cts");
1088  }
1089 
1090  for(Int_t i=0; i<3; i++){
1091  fHistDPhiMix500_800_EMC7[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.5-.8Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .5Gev<pt<.8Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1092  fHistDPhiMix500_800_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1093  fHistDPhiMix500_800_EMC7[i]->GetYaxis()->SetTitle("Cts");
1094  }
1095 
1096  for(Int_t i=0; i<3; i++){
1097  fHistDPhiMix500_800_EMCJet[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.5-.8Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .5Gev<pt<.8Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1098  fHistDPhiMix500_800_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1099  fHistDPhiMix500_800_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1100  }
1101 
1102  // Delta Phi for tracks > 800MeV
1103  for(Int_t i=0; i<3; i++){
1104  fHistDPhiMix800_1_MB[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.8-1Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .8Gev<pt<1Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1105  fHistDPhiMix800_1_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1106  fHistDPhiMix800_1_MB[i]->GetYaxis()->SetTitle("Cts");
1107  }
1108 
1109  for(Int_t i=0; i<3; i++){
1110  fHistDPhiMix800_1_EMC7[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.8-1Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .8Gev<pt<1Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1111  fHistDPhiMix800_1_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1112  fHistDPhiMix800_1_EMC7[i]->GetYaxis()->SetTitle("Cts");
1113  }
1114 
1115  for(Int_t i=0; i<3; i++){
1116  fHistDPhiMix800_1_EMCJet[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_.8-1Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated .8Gev<pt<1Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1117  fHistDPhiMix800_1_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1118  fHistDPhiMix800_1_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1119  }
1120 
1121  // Delta Phi for tracks > 1GeV
1122  for(Int_t i=0; i<3; i++){
1123  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(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1124  fHistDPhiMix1_2_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1125  fHistDPhiMix1_2_MB[i]->GetYaxis()->SetTitle("Cts");
1126  }
1127 
1128  for(Int_t i=0; i<3; i++){
1129  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(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1130  fHistDPhiMix1_2_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1131  fHistDPhiMix1_2_EMC7[i]->GetYaxis()->SetTitle("Cts");
1132  }
1133 
1134  for(Int_t i=0; i<3; i++){
1135  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(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1136  fHistDPhiMix1_2_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1137  fHistDPhiMix1_2_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1138  }
1139 
1140  // Delta Phi for tracks > 2GeV
1141  for(Int_t i=0; i<3; i++){
1142  fHistDPhiMix2_3_MB[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_2-3Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<3Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1143  fHistDPhiMix2_3_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1144  fHistDPhiMix2_3_MB[i]->GetYaxis()->SetTitle("Cts");
1145  }
1146 
1147  for(Int_t i=0; i<3; i++){
1148  fHistDPhiMix2_3_EMC7[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_2-3Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<3Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1149  fHistDPhiMix2_3_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1150  fHistDPhiMix2_3_EMC7[i]->GetYaxis()->SetTitle("Cts");
1151  }
1152 
1153  for(Int_t i=0; i<3; i++){
1154  fHistDPhiMix2_3_EMCJet[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_2-3Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 2Gev<pt<3Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1155  fHistDPhiMix2_3_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1156  fHistDPhiMix2_3_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1157  }
1158 
1159  // Delta Phi for tracks > 3GeV
1160  for(Int_t i=0; i<3; i++){
1161  fHistDPhiMix3_4_MB[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_3-4Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 3Gev<pt<4Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1162  fHistDPhiMix3_4_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1163  fHistDPhiMix3_4_MB[i]->GetYaxis()->SetTitle("Cts");
1164  }
1165 
1166  for(Int_t i=0; i<3; i++){
1167  fHistDPhiMix3_4_EMC7[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_3-4Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 3Gev<pt<4Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1168  fHistDPhiMix3_4_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1169  fHistDPhiMix3_4_EMC7[i]->GetYaxis()->SetTitle("Cts");
1170  }
1171 
1172  for(Int_t i=0; i<3; i++){
1173  fHistDPhiMix3_4_EMCJet[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_3-4Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated 3Gev<pt<4Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1174  fHistDPhiMix3_4_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1175  fHistDPhiMix3_4_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1176  }
1177 
1178  // Delta Phi for tracks > 5GeV
1179  for(Int_t i=0; i<3; i++){
1180  fHistDPhiMix4_MB[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_4Gev_MB",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated pt>4Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1181  fHistDPhiMix4_MB[i]->GetXaxis()->SetTitle("Delta-Phi");
1182  fHistDPhiMix4_MB[i]->GetYaxis()->SetTitle("Cts");
1183  }
1184 
1185  for(Int_t i=0; i<3; i++){
1186  fHistDPhiMix4_EMC7[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_4Gev_EMC7",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated pt>4Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1187  fHistDPhiMix4_EMC7[i]->GetXaxis()->SetTitle("Delta-Phi");
1188  fHistDPhiMix4_EMC7[i]->GetYaxis()->SetTitle("Cts");
1189  }
1190 
1191  for(Int_t i=0; i<3; i++){
1192  fHistDPhiMix4_EMCJet[i] = new TH1F(TString::Format("fHistDPhiMix_trig_%s_assoc_4Gev_EMCJet",ptRangesDPhi[i].Data()).Data(), TString::Format("Delta-Phi for candidate electrons w/ pt=%s and Associated pt>4Gev for Mixed Events",ptRangesDPhi[i].Data()).Data(), 100, -TMath::Pi()/2, 3*TMath::Pi()/2);
1193  fHistDPhiMix4_EMCJet[i]->GetXaxis()->SetTitle("Delta-Phi");
1194  fHistDPhiMix4_EMCJet[i]->GetYaxis()->SetTitle("Cts");
1195  }
1196 
1197  //Hadron e/p plot
1198  fHistEMC_Had_MB_1Gev = new TH1F("fHistEMC_Had_MB_1Gev", "E/p for hadrons with Pt between 1-2Gev", 100, 0, 1.5);
1199  fHistEMC_Had_MB_1Gev->GetXaxis()->SetTitle("E/p");
1200  fHistEMC_Had_MB_1Gev->GetYaxis()->SetTitle("Cts");
1201 
1202  // Eta-Phi distribution for tagged events
1203  fHistEtaPhiTag_MB = new TH2F("fHistEtaPhiTag_MB", "Eta-Phi distribution of tracks in tagged events", 100, -.9,.9,100,0,2*TMath::Pi());
1204  fHistEtaPhiTag_MB->GetXaxis()->SetTitle("Eta");
1205  fHistEtaPhiTag_MB->GetYaxis()->SetTitle("Phi");
1206 
1207  fHistEtaPhiTag_EMC7 = new TH2F("fHistEtaPhiTag_EMC7", "Eta-Phi distribution of tracks in tagged events", 100, -.9,.9,100,0,2*TMath::Pi());
1208  fHistEtaPhiTag_EMC7->GetXaxis()->SetTitle("Eta");
1209  fHistEtaPhiTag_EMC7->GetYaxis()->SetTitle("Phi");
1210 
1211  fHistEtaPhiTag_EMCJet = new TH2F("fHistEtaPhiTag_EMCJet", "Eta-Phi distribution of tracks in tagged events", 100, -.9,.9,100,0,2*TMath::Pi());
1212  fHistEtaPhiTag_EMCJet->GetXaxis()->SetTitle("Eta");
1213  fHistEtaPhiTag_EMCJet->GetYaxis()->SetTitle("Phi");
1214 
1215  // Eta-Phi distribution
1216  fHistEtaPhi_MB = new TH2F("fHistEtaPhi_MB", "Eta-Phi distribution of tracks", 100, -.9,.9,100,0,2*TMath::Pi());
1217  fHistEtaPhi_MB->GetXaxis()->SetTitle("Eta");
1218  fHistEtaPhi_MB->GetYaxis()->SetTitle("Phi");
1219 
1220  fHistEtaPhi_EMC7 = new TH2F("fHistEtaPhi_EMC7", "Eta-Phi distribution of tracks", 100, -.9,.9,100,0,2*TMath::Pi());
1221  fHistEtaPhi_EMC7->GetXaxis()->SetTitle("Eta");
1222  fHistEtaPhi_EMC7->GetYaxis()->SetTitle("Phi");
1223 
1224  fHistEtaPhi_EMCJet = new TH2F("fHistEtaPhi_EMCJet", "Eta-Phi distribution of tracks", 100, -.9,.9,100,0,2*TMath::Pi());
1225  fHistEtaPhi_EMCJet->GetXaxis()->SetTitle("Eta");
1226  fHistEtaPhi_EMCJet->GetYaxis()->SetTitle("Phi");
1227 
1228  fHistEtaPhiTPCOnly_MB = new TH2F("fHistEtaPhiTPCOnly_MB", "Eta-Phi distribution of TPC only tracks", 100, -.9,.9,100,0,2*TMath::Pi());
1229  fHistEtaPhiTPCOnly_MB->GetXaxis()->SetTitle("Eta");
1230  fHistEtaPhiTPCOnly_MB->GetYaxis()->SetTitle("Phi");
1231 
1232  // Energy per event histos
1233  fHistPtSum_MB = new TH1F("fHistPtSum_MB", "Pt sum for events w/o an electron candidate", 500, 0, 500);
1234  fHistPtSum_MB->GetXaxis()->SetTitle("Pt Sum");
1235  fHistPtSum_MB->GetYaxis()->SetTitle("Cts");
1236 
1237  fHistPtSum_EMC7 = new TH1F("fHistPtSum_EMC7", "Pt sum for events w/o an electron candidate", 500, 0, 500);
1238  fHistPtSum_EMC7->GetXaxis()->SetTitle("Pt Sum");
1239  fHistPtSum_EMC7->GetYaxis()->SetTitle("Cts");
1240 
1241  fHistPtSum_EMCJet = new TH1F("fHistPtSum_EMCJet", "Pt sum for events w/o an electron candidate", 500, 0, 500);
1242  fHistPtSum_EMCJet->GetXaxis()->SetTitle("Pt Sum");
1243  fHistPtSum_EMCJet->GetYaxis()->SetTitle("Cts");
1244 
1245  // Energy per tagged event histos
1246  fHistPtSumTag_MB = new TH1F("fHistPtSumTag_MB", "Pt sum for events w/ an electron candidate", 500, 0, 500);
1247  fHistPtSumTag_MB->GetXaxis()->SetTitle("Pt Sum");
1248  fHistPtSumTag_MB->GetYaxis()->SetTitle("Cts");
1249 
1250  fHistPtSumTag_EMC7 = new TH1F("fHistPtSumTag_EMC7", "Pt sum for events w/ an electron candidate", 500, 0, 500);
1251  fHistPtSumTag_EMC7->GetXaxis()->SetTitle("Pt Sum");
1252  fHistPtSumTag_EMC7->GetYaxis()->SetTitle("Cts");
1253 
1254  fHistPtSumTag_EMCJet = new TH1F("fHistPtSumTag_EMCJet", "Pt sum for events w/ an electron candidate", 500, 0, 500);
1255  fHistPtSumTag_EMCJet->GetXaxis()->SetTitle("Pt Sum");
1256  fHistPtSumTag_EMCJet->GetYaxis()->SetTitle("Cts");
1257 
1258  // Energy per event in EMC acceptance histos
1259  fHistPtSumEMC_MB = new TH1F("fHistPtSumEMC_MB", "Pt sum for events in EMCal acceptance", 500, 0, 500);
1260  fHistPtSumEMC_MB->GetXaxis()->SetTitle("Pt Sum");
1261  fHistPtSumEMC_MB->GetYaxis()->SetTitle("Cts");
1262 
1263  fHistPtSumEMC_EMC7 = new TH1F("fHistPtSumEMC_EMC7", "Pt sum for events in EMCal acceptance", 500, 0, 500);
1264  fHistPtSumEMC_EMC7->GetXaxis()->SetTitle("Pt Sum");
1265  fHistPtSumEMC_EMC7->GetYaxis()->SetTitle("Cts");
1266 
1267  fHistPtSumEMC_EMCJet = new TH1F("fHistPtSumEMC_EMCJet", "Pt sum for events in EMCal acceptance", 500, 0, 500);
1268  fHistPtSumEMC_EMCJet->GetXaxis()->SetTitle("Pt Sum");
1269  fHistPtSumEMC_EMCJet->GetYaxis()->SetTitle("Cts");
1270 
1271  // Numbers of events
1272  fHistNevents_MB = new TH1F("fHistNevents_MB", "Number of events that have an 'electron'", 2,0,1);
1273  fHistNevents_MB->GetXaxis()->SetBinLabel(1,"Events");
1274  fHistNevents_MB->GetXaxis()->SetBinLabel(2,"Events containing candidates");
1275  fHistNevents_MB->GetYaxis()->SetTitle("Cts");
1276 
1277  fHistNevents_EMC7 = new TH1F("fHistNevents_EMC7", "Number of events that have an 'electron'", 2,0,1);
1278  fHistNevents_EMC7->GetXaxis()->SetBinLabel(1,"Events");
1279  fHistNevents_EMC7->GetXaxis()->SetBinLabel(2,"Events containing candidates");
1280  fHistNevents_EMC7->GetYaxis()->SetTitle("Cts");
1281 
1282  fHistNevents_EMCJet = new TH1F("fHistNevents_EMCJet", "Number of events that have an 'electron'", 2,0,1);
1283  fHistNevents_EMCJet->GetXaxis()->SetBinLabel(1,"Events");
1284  fHistNevents_EMCJet->GetXaxis()->SetBinLabel(2,"Events containing candidates");
1285  fHistNevents_EMCJet->GetYaxis()->SetTitle("Cts");
1286 
1287  //TPC Sigma
1288  fHistTPCSig_MB = new TH1F("fHistTPCSig_MB", "dEdx Resolution in TPC", 100,0,100);
1289  fHistTPCSig_MB->GetXaxis()->SetTitle("Resolution");
1290  fHistTPCSig_MB->GetYaxis()->SetTitle("Count");
1291 
1292  fHistTPCSig_EMC7 = new TH1F("fHistTPCSig_EMC7", "dEdx Resolution in TPC", 100,0,100);
1293  fHistTPCSig_EMC7->GetXaxis()->SetTitle("Resolution");
1294  fHistTPCSig_EMC7->GetYaxis()->SetTitle("Count");
1295 
1296  fHistTPCSig_EMCJet = new TH1F("fHistTPCSig_EMCJet", "dEdx Resolution in TPC", 100,0,100);
1297  fHistTPCSig_EMCJet->GetXaxis()->SetTitle("Resolution");
1298  fHistTPCSig_EMCJet->GetYaxis()->SetTitle("Count");
1299 
1300  //TPC Sigma after general cuts
1301  fHistTPCSigCut_MB = new TH1F("fHistTPCSigCut_MB", "dEdx Resolution in TPC for tracks that pass the basic track cuts", 100,0,100);
1302  fHistTPCSigCut_MB->GetXaxis()->SetTitle("Resolution");
1303  fHistTPCSigCut_MB->GetYaxis()->SetTitle("Count");
1304 
1305  fHistTPCSigCut_EMC7 = new TH1F("fHistTPCSigCut_EMC7", "dEdx Resolution in TPC for tracks that pass the basic track cuts", 100,0,100);
1306  fHistTPCSigCut_EMC7->GetXaxis()->SetTitle("Resolution");
1307  fHistTPCSigCut_EMC7->GetYaxis()->SetTitle("Count");
1308 
1309  fHistTPCSigCut_EMCJet = new TH1F("fHistTPCSigCut_EMCJet", "dEdx Resolution in TPC for tracks that pass the basic track cuts", 100,0,100);
1310  fHistTPCSigCut_EMCJet->GetXaxis()->SetTitle("Resolution");
1311  fHistTPCSigCut_EMCJet->GetYaxis()->SetTitle("Count");
1312 
1313  //Impact Parameter histos
1314  fHistImpPar_MB = new TH1F("fHistImpPar_MB", "Impact Parameter distribution in xy plane for all tracks", 100,-1, 1);
1315  fHistImpPar_MB->GetXaxis()->SetTitle("Impact Parameter(cm)");
1316  fHistImpPar_MB->GetYaxis()->SetTitle("Count");
1317 
1318  fHistImpPar_EMC7 = new TH1F("fHistImpPar_EMC7", "Impact Parameter distribution in xy plane for all tracks", 100,-1, 1);
1319  fHistImpPar_EMC7->GetXaxis()->SetTitle("Impact Parameter(cm)");
1320  fHistImpPar_EMC7->GetYaxis()->SetTitle("Count");
1321 
1322  fHistImpPar_EMCJet = new TH1F("fHistImpPar_EMCJet", "Impact Parameter distribution in xy plane for all tracks", 100,-1, 1);
1323  fHistImpPar_EMCJet->GetXaxis()->SetTitle("Impact Parameter(cm)");
1324  fHistImpPar_EMCJet->GetYaxis()->SetTitle("Count");
1325 
1326  //Impact Parameter for tagged electrons histos
1327  fHistImpParTag_MB = new TH1F("fHistImpParTag_MB", "Impact Parameter distribution in xy plane for electron candidates", 100,-1, 1);
1328  fHistImpParTag_MB->GetXaxis()->SetTitle("Impact Parameter(cm)");
1329  fHistImpParTag_MB->GetYaxis()->SetTitle("Count");
1330 
1331  fHistImpParTag_EMC7 = new TH1F("fHistImpParTag_EMC7", "Impact Parameter distribution in xy plane for electron candidates", 100,-1, 1);
1332  fHistImpParTag_EMC7->GetXaxis()->SetTitle("Impact Parameter(cm)");
1333  fHistImpParTag_EMC7->GetYaxis()->SetTitle("Count");
1334 
1335  fHistImpParTag_EMCJet = new TH1F("fHistImpParTag_EMCJet", "Impact Parameter distribution in xy plane for electron candidates", 100,-1, 1);
1336  fHistImpParTag_EMCJet->GetXaxis()->SetTitle("Impact Parameter(cm)");
1337  fHistImpParTag_EMCJet->GetYaxis()->SetTitle("Count");
1338 
1339  //Number of clusters per track in TPC
1340  fHistTPCNClus_MB = new TH1F("fHistTPCNClus_MB", "Number of Clusters per track in TPC", 159, 0, 159);
1341  fHistTPCNClus_MB->GetXaxis()->SetTitle("Number of TPC Clusters");
1342  fHistTPCNClus_MB->GetYaxis()->SetTitle("Number of Tracks");
1343 
1344  fHistTPCNClus_EMC7 = new TH1F("fHistTPCNClus_EMC7", "Number of Clusters per track in TPC", 159, 0, 159);
1345  fHistTPCNClus_EMC7->GetXaxis()->SetTitle("Number of TPC Clusters");
1346  fHistTPCNClus_EMC7->GetYaxis()->SetTitle("Number of Tracks");
1347 
1348  fHistTPCNClus_EMCJet = new TH1F("fHistTPCNClus_EMCJet", "Number of Clusters per track in TPC", 159, 0, 159);
1349  fHistTPCNClus_EMCJet->GetXaxis()->SetTitle("Number of TPC Clusters");
1350  fHistTPCNClus_EMCJet->GetYaxis()->SetTitle("Number of Tracks");
1351 
1352  //Number of clusters per track in ITS
1353  fHistITSNClus_MB = new TH1F("fHistITSNClus_MB", "Number of Clusters per Track in ITS", 10, 0, 10);
1354  fHistITSNClus_MB->GetXaxis()->SetTitle("Number of ITS Clusters");
1355  fHistITSNClus_MB->GetYaxis()->SetTitle("Number of Tracks");
1356 
1357  fHistITSNClus_EMC7 = new TH1F("fHistITSNClus_EMC7", "Number of Clusters per Track in ITS", 10, 0, 10);
1358  fHistITSNClus_EMC7->GetXaxis()->SetTitle("Number of ITS Clusters");
1359  fHistITSNClus_EMC7->GetYaxis()->SetTitle("Number of Tracks");
1360 
1361  fHistITSNClus_EMCJet = new TH1F("fHistITSNClus_EMCJet", "Number of Clusters per Track in ITS", 10, 0, 10);
1362  fHistITSNClus_EMCJet->GetXaxis()->SetTitle("Number of ITS Clusters");
1363  fHistITSNClus_EMCJet->GetYaxis()->SetTitle("Number of Tracks");
1364 
1365  // Pt distribution of all tracks and tagged tracks
1366  fHistPtAssoc_MB = new TH1F("fHistPtAssoc_MB", "Pt distribution for associated tracks", 100,0, 15);
1367  fHistPtAssoc_MB->GetXaxis()->SetTitle("Pt(Gev)");
1368  fHistPtAssoc_MB->GetYaxis()->SetTitle("Count");
1369 
1370  fHistPtAssoc_EMC7 = new TH1F("fHistPtAssoc_EMC7", "Pt distribution for associated tracks", 100,0, 15);
1371  fHistPtAssoc_EMC7->GetXaxis()->SetTitle("Pt(Gev)");
1372  fHistPtAssoc_EMC7->GetYaxis()->SetTitle("Count");
1373 
1374  fHistPtAssoc_EMCJet = new TH1F("fHistPtAssoc_EMCJet", "Pt distribution for associated tracks", 100,0, 15);
1375  fHistPtAssoc_EMCJet->GetXaxis()->SetTitle("Pt(Gev)");
1376  fHistPtAssoc_EMCJet->GetYaxis()->SetTitle("Count");
1377 
1378  // Pt distribution of all tracks for mixed events
1379  fHistPtAssocMix_MB = new TH1F("fHistPtAssocMix_MB", "Pt distribution for associated tracks in mixed events", 100,0, 15);
1380  fHistPtAssocMix_MB->GetXaxis()->SetTitle("Pt(Gev)");
1381  fHistPtAssocMix_MB->GetYaxis()->SetTitle("Count");
1382 
1383  fHistPtAssocMix_EMC7 = new TH1F("fHistPtAssocMix_EMC7", "Pt distribution for associated tracks in mixed events", 100,0, 15);
1384  fHistPtAssocMix_EMC7->GetXaxis()->SetTitle("Pt(Gev)");
1385  fHistPtAssocMix_EMC7->GetYaxis()->SetTitle("Count");
1386 
1387  fHistPtAssocMix_EMCJet = new TH1F("fHistPtAssocMix_EMCJet", "Pt distribution for associated tracks in mixed events", 100,0, 15);
1388  fHistPtAssocMix_EMCJet->GetXaxis()->SetTitle("Pt(Gev)");
1389  fHistPtAssocMix_EMCJet->GetYaxis()->SetTitle("Count");
1390 
1391  //Impact Parameter for tagged electrons histos
1392  fHistPtTag_MB = new TH1F("fHistPtTag_MB", "Pt distribution for electron candidates", 100,0, 15);
1393  fHistPtTag_MB->GetXaxis()->SetTitle("Pt(Gev)");
1394  fHistPtTag_MB->GetYaxis()->SetTitle("Count");
1395 
1396  fHistPtTag_EMC7 = new TH1F("fHistPtTag_EMC7", "Pt distribution for electron candidates", 100,0, 15);
1397  fHistPtTag_EMC7->GetXaxis()->SetTitle("Pt(Gev)");
1398  fHistPtTag_EMC7->GetYaxis()->SetTitle("Count");
1399 
1400  fHistPtTag_EMCJet = new TH1F("fHistPtTag_EMCJet", "Pt distribution for electron candidates", 100,0, 15);
1401  fHistPtTag_EMCJet->GetXaxis()->SetTitle("Pt(Gev)");
1402  fHistPtTag_EMCJet->GetYaxis()->SetTitle("Count");
1403 
1404  //Add rejection plots to MB plots since it is the easiest place
1407 
1409  fOutputMB->Add(fHistPtAssoc_MB);
1411  fOutputMB->Add(fHistPtTag_MB);
1414  fOutputMB->Add(fHistTPCSig_MB);
1416  fOutputMB->Add(fHistImpPar_MB);
1418  fOutputMB->Add(fHistNevents_MB);
1419  fOutputMB->Add(fHistPtSum_MB);
1422  fOutputMB->Add(fHistEtaPhi_MB);
1430  for(Int_t i=0; i<6;i++){
1431  fOutputMB->Add(fHistTPC_EMCTRD_MB[i]);
1432 
1433  fOutputMB->Add(fHistEMC_TPCTRD_MB[i]);
1434 
1435  fOutputMB->Add(fHistTRD_TPCEMC_MB[i]);
1436 
1437  fOutputMB->Add(fHistM02_All_MB[i]);
1438  fOutputMB->Add(fHistM20_All_MB[i]);
1439  fOutputMB->Add(fHistM02_Elec_MB[i]);
1440  fOutputMB->Add(fHistM20_Elec_MB[i]);
1441  }
1442  for(Int_t i=0; i<3;i++){
1443  fOutputMB->Add(fHistDPhi300_500_MB[i]);
1444  fOutputMB->Add(fHistDPhi500_800_MB[i]);
1445  fOutputMB->Add(fHistDPhi800_1_MB[i]);
1446  fOutputMB->Add(fHistDPhi1_2_MB[i]);
1447  fOutputMB->Add(fHistDPhi2_3_MB[i]);
1448  fOutputMB->Add(fHistDPhi3_4_MB[i]);
1449  fOutputMB->Add(fHistDPhi4_MB[i]);
1453  fOutputMB->Add(fHistDPhiMix1_2_MB[i]);
1454  fOutputMB->Add(fHistDPhiMix2_3_MB[i]);
1455  fOutputMB->Add(fHistDPhiMix3_4_MB[i]);
1456  fOutputMB->Add(fHistDPhiMix4_MB[i]);
1457  }
1458  fOutputMB->Add(fHistDPhi28_MB);
1463 
1484  for(Int_t i=0; i<6;i++){
1486 
1488 
1490 
1491  fOutputEMC7->Add(fHistM02_All_EMC7[i]);
1492  fOutputEMC7->Add(fHistM20_All_EMC7[i]);
1495  }
1496  for(Int_t i=0; i<3;i++){
1500  fOutputEMC7->Add(fHistDPhi1_2_EMC7[i]);
1501  fOutputEMC7->Add(fHistDPhi2_3_EMC7[i]);
1502  fOutputEMC7->Add(fHistDPhi3_4_EMC7[i]);
1503  fOutputEMC7->Add(fHistDPhi4_EMC7[i]);
1511  }
1517 
1538  for(Int_t i=0; i<6;i++){
1540 
1542 
1544 
1549  }
1550  for(Int_t i=0; i<3;i++){
1565  }
1571 
1572  // NEW HISTO added to fOutput here
1573  PostData(1, fOutputMB);
1574  PostData(2, fOutputEMC7);
1575  PostData(3, fOutputEMCJet);// Post data for ALL output slots >0 here, to get at least an empty histogram
1576 }
1577 
1578 //________________________________________________________________________
1580 {
1581  // Main loop
1582  // Called for each event
1583 
1584  //_______________________________Major event-level stuff____________________________________
1585  // Create pointer to reconstructed event
1586  AliVEvent *event = InputEvent();
1587  if (!event) { Printf("ERROR: Could not retrieve event"); return; }
1588 
1589  AliESDEvent* esd;
1590  // create pointer to event
1591  AliAODEvent* aod = dynamic_cast<AliAODEvent*>(event);
1592  if (!aod) {
1593  AliError("Cannot get the AOD event");
1594  return;
1595  }
1596  if(!aodEv){
1597  esd = dynamic_cast<AliESDEvent*>(event);
1598  cout<<"Made ESD Event\n";
1599  if (!esd) {
1600  AliError("Cannot get the ESD event");
1601  return;
1602  }
1603  }
1604 
1605  // input handler
1606  const AliAnalysisManager* man(AliAnalysisManager::GetAnalysisManager());
1607  if (NULL == man) {
1608  AliWarning("AliAnalysisManager is not available");
1609  return;
1610  }
1611 
1612  AliInputEventHandler* inputHandler = (AliInputEventHandler*)man->GetInputEventHandler();
1613  if (!inputHandler) {
1614  AliWarning("AliInputEventHandler is not available");
1615  return;
1616  }
1617  /*if(!aodEv){
1618  AliESDInputHandler* inputHandlerESD = dynamic_cast<AliESDInputHandler*>(man->GetInputEventHandler());
1619  if (!inputHandlerESD) {
1620  AliWarning("AliESDInputHandler is not available");
1621  return;
1622  }
1623  }else{
1624  AliAODInputHandler* inputHandlerAOD = (AliAODInputHandler*)(man->GetInputEventHandler());
1625  if (!inputHandlerAOD) {
1626  AliWarning("AliAODInputHandler is not available");
1627  return;
1628  }
1629  }*/
1630 
1631  UInt_t fSelectMask = inputHandler->IsEventSelected();
1632  /*if(!aodEv){
1633  UInt_t fSelectMask = inputHandler->IsEventSelected();
1634  }else{
1635  UInt_t fSelectMask = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
1636  } */
1637 
1638  Bool_t isSelected = fSelectMask & (AliVEvent::kEMC7 | AliVEvent::kEMCEJE | AliVEvent::kEMC8);
1639  if(!isSelected){
1640  AliWarning("This is not an EMCal triggered event");
1641  }
1642 
1643  MBtrg = fSelectMask & AliVEvent::kAnyINT;
1644  EMC7trg = fSelectMask & AliVEvent::kEMC7;
1645  EMCJettrg = fSelectMask & AliVEvent::kEMCEJE;
1646 
1647  Int_t elecIDs[1000];
1648  Int_t elecCnt=0;
1649 
1650  if(!aodEv){
1652  AliWarning("The hybrid track cuts are null");
1653  return;
1654  }
1655  }
1656 
1657  AliPIDResponse* fPIDResponse = (AliPIDResponse*)inputHandler->GetPIDResponse();
1658  /*if(!aodEv){
1659  AliPIDResponse* fPIDResponse = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->GetPIDResponse();
1660  }else{
1661  AliPIDResponse* fPIDResponse = (inputHandlerAOD)->GetPIDResponse();
1662  }*/
1663  if(!fPIDResponse){
1664  AliWarning("NULL PIDResponse");
1665  }
1666 
1667  if(aodEv){
1668  trkArr = MakeTrkArr(aod);
1669  }
1670  //__________________________End major event stuff_____________________________
1671 
1672 
1673  //Fill the histogram cataloguing # of events vs. events tagged
1674  if(MBtrg){
1675  fHistNevents_MB->Fill("Events",1);
1676  }
1677  if(EMC7trg){
1678  fHistNevents_EMC7->Fill("Events",1);
1679  }
1680 
1681  if(EMCJettrg){
1682  fHistNevents_EMCJet->Fill("Events",1);
1683  }
1684 
1685  //Initialize energy variable and tagging flags
1686  Double_t PtSum=0;
1687  Double_t PtSumEMC=0;
1688  tagStrong=kFALSE;
1689  Bool_t tagEvt=kFALSE;
1690 
1691  //Initialize the # of tracks variable and the Eta Phi arrays
1692  Int_t ntracks=0;
1693  ntracks = aod->GetNumberOfTracks();
1694  if(!aodEv){
1695  ntracks = esd->GetNumberOfTracks();
1696  }
1697 
1698  std::vector<Double_t> Eta;
1699  std::vector<Double_t> Phi;
1700 
1701  // Track loop for reconstructed event
1702  for(Int_t i = 0; i < ntracks; i++) {
1703 
1704  tagStrong=kFALSE;
1705  tagPhot=kFALSE;
1706  AliESDtrack* esdtrack = 0;
1707  AliAODTrack* aodtrack = (AliAODTrack*)aod->GetTrack(i); // pointer to reconstructed to track
1708  if(!aodEv){
1709  esdtrack = (AliESDtrack*)esd->GetTrack(i); // pointer to reconstructed to track
1710  }
1711 
1712  if(!aodtrack) {
1713  AliError(Form("ERROR: Could not retrieve track %d",i));
1714  continue;
1715  }
1716 
1717  if(!aodEv){
1718  if(!esdtrack) {
1719  AliError(Form("ERROR: Could not retrieve track %d",i));
1720  continue;
1721  }
1722  }
1723 
1724  //Fill TPCOnly track eta-phi
1725 
1726  if(aodtrack->IsTPCOnly()){
1727  fHistEtaPhiTPCOnly_MB->Fill(aodtrack->Eta(),aodtrack->Phi());
1728  }
1729 
1730  if(!aodEv){
1731  if(AliESDtrackCuts::GetStandardTPCOnlyTrackCuts()->AcceptTrack(esdtrack)){
1732  fHistEtaPhiTPCOnly_MB->Fill(esdtrack->Eta(),esdtrack->Phi());
1733  }
1734  }
1735 
1736 
1737  //Do hybrid track cuts
1738  if(!aodtrack->IsHybridGlobalConstrainedGlobal()){continue;}
1739  if(!aodEv){
1740  if(!globaltrackCuts->AcceptTrack(esdtrack)&&!comptrackCuts->AcceptTrack(esdtrack)){continue;}
1741  }
1742 
1743  //Add this tracks energy to the running total
1744  PtSum=PtSum+aodtrack->Pt();
1745  if(aodtrack->Eta()<.7&&aodtrack->Eta()>-.7&&aodtrack->Phi()>80&&aodtrack->Phi()<180){
1746  PtSumEMC=PtSumEMC+aodtrack->Pt();
1747  }
1748 
1749  //Fill the Eta Phi arrays with this tracks Eta and Phi
1750  Eta.push_back(aodtrack->Eta());
1751  Phi.push_back(aodtrack->Phi());
1752 
1753  if(MBtrg){
1754  fHistEtaPhi_MB->Fill(aodtrack->Eta(),aodtrack->Phi());
1755  }
1756  if(EMC7trg){
1757  fHistEtaPhi_EMC7->Fill(aodtrack->Eta(),aodtrack->Phi());
1758  }
1759  if(EMCJettrg){
1760  fHistEtaPhi_EMCJet->Fill(aodtrack->Eta(),aodtrack->Phi());
1761  }
1762 
1763  //do Cut level histograms
1764  if(MBtrg){
1765  if(aodtrack->GetTPCncls()>0){
1766  fHistTPCNClus_MB->Fill(aodtrack->GetTPCncls());
1767  }
1768  fHistITSNClus_MB->Fill(aodtrack->GetNcls(0));
1769  }
1770  if(EMC7trg){
1771  if(aodtrack->GetTPCncls()>0){
1772  fHistTPCNClus_EMC7->Fill(aodtrack->GetTPCncls());
1773  }
1774  fHistITSNClus_EMC7->Fill(aodtrack->GetNcls(0));
1775  }
1776 
1777  if(EMCJettrg){
1778  if(aodtrack->GetTPCncls()>0){
1779  fHistTPCNClus_EMCJet->Fill(aodtrack->GetTPCncls());
1780  }
1781  fHistITSNClus_EMCJet->Fill(aodtrack->GetNcls(0));
1782  }
1783 
1784  if(!aodEv){
1785  //Add this tracks energy to the running total
1786  PtSum=PtSum+esdtrack->Pt();
1787 
1788  //Fill the Eta Phi arrays with this tracks Eta and Phi
1789  Eta.push_back(esdtrack->Eta());
1790  Phi.push_back(esdtrack->Phi());
1791 
1792  if(MBtrg){
1793  fHistEtaPhi_MB->Fill(esdtrack->Eta(),esdtrack->Phi());
1794  }
1795  if(EMC7trg){
1796  fHistEtaPhi_EMC7->Fill(esdtrack->Eta(),esdtrack->Phi());
1797  }
1798  if(EMCJettrg){
1799  fHistEtaPhi_EMCJet->Fill(esdtrack->Eta(),esdtrack->Phi());
1800  }
1801 
1802  //do Cut level histograms
1803  if(MBtrg){
1804  if(esdtrack->GetTPCncls()>0){
1805  fHistTPCNClus_MB->Fill(esdtrack->GetTPCncls());
1806  }
1807  fHistITSNClus_MB->Fill(esdtrack->GetNcls(0));
1808  }
1809  if(EMC7trg){
1810  if(esdtrack->GetTPCncls()>0){
1811  fHistTPCNClus_EMC7->Fill(esdtrack->GetTPCncls());
1812  }
1813  fHistITSNClus_EMC7->Fill(esdtrack->GetNcls(0));
1814  }
1815 
1816  if(EMCJettrg){
1817  if(esdtrack->GetTPCncls()>0){
1818  fHistTPCNClus_EMCJet->Fill(esdtrack->GetTPCncls());
1819  }
1820  fHistITSNClus_EMCJet->Fill(esdtrack->GetNcls(0));
1821  }
1822  }
1823 
1824 
1825  //Fill histogram for TPC resolution
1826  if(!aodEv){
1827  if(MBtrg){
1828  fHistTPCSig_MB->Fill(esdtrack->GetTPCsignalSigma());
1829  }
1830  if(EMC7trg){
1831  fHistTPCSig_EMC7->Fill(esdtrack->GetTPCsignalSigma());
1832  }
1833 
1834  if(EMCJettrg){
1835  fHistTPCSig_EMCJet->Fill(esdtrack->GetTPCsignalSigma());
1836  }
1837  }
1838 
1839  //Impact parameter
1840  Float_t xy;
1841  Float_t z;
1842 
1843  xy=TMath::Sqrt(aodtrack->XAtDCA()*aodtrack->XAtDCA()+aodtrack->YAtDCA()*aodtrack->YAtDCA());
1844 
1845  if(!aodEv){
1846  esdtrack->GetImpactParameters(xy, z);
1847  }
1848 
1849  if(MBtrg){
1850  fHistImpPar_MB->Fill(xy);
1851  }
1852  if(EMC7trg){
1853  fHistImpPar_EMC7->Fill(xy);
1854  }
1855 
1856  if(EMCJettrg){
1857  fHistImpPar_EMCJet->Fill(xy);
1858  }
1859 
1860  FillPhotoElecHistos(aod, aodtrack, fPIDResponse, i);
1861 
1862  if(!aodEv){
1863  FillPhotoElecHistos(esd, esdtrack, fPIDResponse, i);
1864  }
1865 
1866  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1867  //If the track doesn't pass the cuts, move on to the next one
1868  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1869  if(trackCutsStrong){
1870  if(!fTrackCutsStrong->AcceptVTrack((AliVTrack*)aodtrack) || aodtrack->GetTPCsignalN()<80){continue;}
1871  }else{
1872  if(!fTrackCutsWeak->AcceptVTrack((AliVTrack*)aodtrack) || aodtrack->GetTPCsignalN()<80){continue;}
1873  }
1874 
1875  if(!aodEv){
1876  if(trackCutsStrong){
1877  if(!fTrackCutsStrong->AcceptTrack(esdtrack) || esdtrack->GetTPCsignalN()<80){continue;}
1878  }else{
1879  if(!fTrackCutsWeak->AcceptTrack(esdtrack) || esdtrack->GetTPCsignalN()<80){continue;}
1880  }
1881  }
1882 
1883 
1884 
1885  //Fill histogram for TPC resolution
1886  if(!aodEv){
1887  if(MBtrg){
1888  fHistTPCSigCut_MB->Fill(esdtrack->GetTPCsignalSigma());
1889  }
1890  if(EMC7trg){
1891  fHistTPCSigCut_EMC7->Fill(esdtrack->GetTPCsignalSigma());
1892  }
1893 
1894  if(EMCJettrg){
1895  fHistTPCSigCut_EMCJet->Fill(esdtrack->GetTPCsignalSigma());
1896  }
1897  }
1898 
1899  FillPIDHistos(aod, aodtrack, fPIDResponse);//Fill PID histos and set "tagStrong" boolean if this track satisfies cuts
1900 
1901  if(!aodEv){
1902  FillPIDHistos(esd, esdtrack, fPIDResponse);//Fill PID histos and set "tagStrong" boolean if this track satisfies cuts
1903  }
1904 
1905  //If the track made it through any 3 detector cuts
1906  if(tagStrong){
1907  tagEvt=kTRUE;//This event contains a candidate electron
1908  //Increment the candidate count and put track ID of candidate into array
1909 
1910  elecIDs[elecCnt]=i;
1911  elecCnt+=1;
1912 
1913  //Fill impact parameter plots
1914  if(MBtrg){
1915  fHistImpParTag_MB->Fill(xy);
1916  }
1917  if(EMC7trg){
1918  fHistImpParTag_EMC7->Fill(xy);
1919  }
1920 
1921  if(EMCJettrg){
1922  fHistImpParTag_EMCJet->Fill(xy);
1923  }
1924 
1925  //Pt distribution
1926 
1927  if(MBtrg){
1928  fHistPtTag_MB->Fill(aodtrack->Pt());
1929  }
1930  if(EMC7trg){
1931  fHistPtTag_EMC7->Fill(aodtrack->Pt());
1932  }
1933 
1934  if(EMCJettrg){
1935  fHistPtTag_EMCJet->Fill(aodtrack->Pt());
1936  }
1937 
1938  if(!aodEv){
1939  if(MBtrg){
1940  fHistPtTag_MB->Fill(esdtrack->Pt());
1941  }
1942  if(EMC7trg){
1943  fHistPtTag_EMC7->Fill(esdtrack->Pt());
1944  }
1945 
1946  if(EMCJettrg){
1947  fHistPtTag_EMCJet->Fill(esdtrack->Pt());
1948  }
1949  }
1950 
1951  FillDPhiHistos(aod, aodtrack, i);//Fill DPhi histos
1952 
1953  if(!aodEv){
1954  FillDPhiHistos(esd, esdtrack, i);//Fill DPhi histos
1955  }
1956 
1957 
1958  fPool = fPoolMan->GetEventPool(ntracks, aod->GetPrimaryVertex()->GetZ());
1959  fPool->PrintInfo();
1960 
1961  if(!fPool){cout<<"No Pool for this event man\n"; continue;}
1962 
1963  if(fPool->IsReady() ){
1964  FillMEDPhiHistos(aodtrack);
1965  }
1966  else{
1967  cout<<"Pool wasn't ready\n";
1968  }
1969 
1970 
1971  if(tagPhot){
1972  if(MBtrg){
1973  fHistPhotoMismatch_MB->Fill(0);
1974  }
1975  if(EMC7trg){
1976  fHistPhotoMismatch_EMC7->Fill(0);
1977  }
1978  if(EMCJettrg){
1979  fHistPhotoMismatch_EMCJet->Fill(0);
1980  }
1981  }
1982 
1983 
1984  }//end if(tagStrong)
1985 
1986  }//end main track loop
1987  if(UseNonSignalEvents){
1988  fPool->UpdatePool(trkArr);
1989  }else{
1990  if(tagEvt){
1991  fPool->UpdatePool(trkArr);
1992  }
1993  }
1994 
1995  //Call function to fill Region histos and pass it int array of IDs for identified electron tracks
1996  Int_t elecIDsSparse[elecCnt];
1997  for(Int_t i=0;i<elecCnt;i++){
1998  elecIDsSparse[i]=elecIDs[i];
1999  }
2000 
2001  //Fill Number of electrons plot
2002  fHistNElecPerEvent->Fill(elecCnt);
2003 
2004  //Fill the total pt sum histogram
2005  if(tagEvt){
2006  if(MBtrg){
2007  fHistPtSumTag_MB->Fill(PtSum);
2008  }
2009  if(EMC7trg){
2010  fHistPtSumTag_EMC7->Fill(PtSum);
2011  }
2012  if(EMCJettrg){
2013  fHistPtSumTag_EMCJet->Fill(PtSum);
2014  }
2015  }else{
2016  if(MBtrg){
2017  fHistPtSum_MB->Fill(PtSum);
2018  }
2019  if(EMC7trg){
2020  fHistPtSum_EMC7->Fill(PtSum);
2021  }
2022  if(EMCJettrg){
2023  fHistPtSum_EMCJet->Fill(PtSum);
2024  }
2025  }
2026 
2027  if(MBtrg){
2028  fHistPtSumEMC_MB->Fill(PtSumEMC);
2029  }
2030  if(EMC7trg){
2031  fHistPtSumEMC_EMC7->Fill(PtSumEMC);
2032  }
2033  if(EMCJettrg){
2034  fHistPtSumEMC_EMCJet->Fill(PtSumEMC);
2035  }
2036 
2037  //Fill Nevent histos
2038  if(tagEvt){
2039  if(MBtrg){
2040  fHistNevents_MB->Fill("Events containing candidates",1);
2041  }
2042  if(EMC7trg){
2043  fHistNevents_EMC7->Fill("Events containing candidates",1);
2044  }
2045  if(EMCJettrg){
2046  fHistNevents_EMCJet->Fill("Events containing candidates",1);
2047  }
2048  }
2049 
2050  //Fill the Eta Phi histograms
2051  if(tagEvt){
2052  for(Int_t i=0;i<Eta.size();i++){
2053  if(MBtrg){
2054  fHistEtaPhiTag_MB->Fill(Eta[i],Phi[i]);
2055  }
2056  if(EMC7trg){
2057  fHistEtaPhiTag_EMC7->Fill(Eta[i],Phi[i]);
2058  }
2059  if(EMCJettrg){
2060  fHistEtaPhiTag_EMCJet->Fill(Eta[i],Phi[i]);
2061  }
2062  }
2063  }
2064 
2065 
2066 
2067  // NEW HISTO should be filled before this point, as PostData puts the
2068  // information for this iteration of the UserExec in the container
2069  PostData(1, fOutputMB);
2070  PostData(2, fOutputEMC7);
2071  PostData(3, fOutputEMCJet);
2072 }
2073 
2074 void AliAnalysisTaskPSHFE::FillPIDHistos(AliESDEvent *esd, AliESDtrack *esdtrack, AliPIDResponse *fPIDResponse){
2075 
2076  if(!esdtrack){
2077  AliWarning("esdtrack is null, no point in doing PID");
2078  return;
2079  }
2080 
2081 
2082  Bool_t isPIDRej = kFALSE;
2083 
2084  //Fill TOF and TPC status variables
2085  AliPIDResponse::EDetPidStatus TOFStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTOF, esdtrack);
2086 
2087  AliPIDResponse::EDetPidStatus TPCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTPC, esdtrack);
2088 
2089  AliPIDResponse::EDetPidStatus TRDStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTRD, esdtrack);
2090 
2091  AliPIDResponse::EDetPidStatus EMCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kEMCAL, esdtrack);
2092 
2093  //Check validity of PID, TODO: Add a rejection histogram
2094  if(TOFStatus!=AliPIDResponse::kDetPidOk){
2095  fHistPIDRejection->Fill(2);
2096  //isPIDRej=kTRUE;
2097  }
2098 
2099  if(TPCStatus!=AliPIDResponse::kDetPidOk){
2100  fHistPIDRejection->Fill(1);
2101  isPIDRej=kTRUE;
2102  }
2103 
2104  if(TRDStatus!=AliPIDResponse::kDetPidOk){
2105  fHistPIDRejection->Fill(3);
2106  isPIDRej=kTRUE;
2107  }
2108 
2109  if(EMCStatus!=AliPIDResponse::kDetPidOk){
2110  fHistPIDRejection->Fill(4);
2111  isPIDRej=kTRUE;
2112  }
2113 
2114 
2115  //Get the # of sigmas around an electron hypothesis for TOF and TPC
2116  Double_t nSigmaTOF;
2117  nSigmaTOF = fPIDResponse->NumberOfSigmasTOF(esdtrack,AliPID::kElectron);
2118 
2119  Double_t nSigmaTPC;
2120  nSigmaTPC = fPIDResponse->NumberOfSigmasTPC(esdtrack,AliPID::kElectron);
2121 
2122  Double_t elecLikeTRD[1];
2123  if(fPIDResponse->ComputeTRDProbability(esdtrack, AliPID::kElectron, elecLikeTRD, AliTRDPIDResponse::kLQ2D) != AliPIDResponse::kDetPidOk || esdtrack->GetTRDntrackletsPID()<4){
2124  fHistPIDRejection->Fill(3);
2125  isPIDRej=kTRUE;
2126  }
2127 
2128  if(isPIDRej){return;}
2129 
2130  //declare emcal cluster PID variables
2131  Double_t EOP=-1;
2132  Double_t M02=-1;
2133  Double_t M20=-1;
2134  Int_t caloId=esdtrack->GetEMCALcluster();
2135 
2136  if(caloId==-99999){
2137  return;
2138  }
2139 
2140  AliESDCaloCluster* tagEMCclus=esd->GetCaloCluster(caloId);
2141 
2142  if(tagEMCclus->E()>.5){
2143  EOP = tagEMCclus->E()/esdtrack->Pt();
2144  M02 = tagEMCclus->GetM02();
2145  M20 = tagEMCclus->GetM20();
2146  }
2147  else{
2148  return;
2149  }
2150 
2151 
2152 
2153  //=========================================================================================================================
2154  //PID cuts and histogram filling
2155  //=========================================================================================================================
2156 
2157  //Some Double arrays for pt ranges
2158  Double_t ptUpper[6] = {2, 3, 4, 5, 6, 1000000};
2159  Double_t ptLower[6] = {1, 2, 3, 4, 5, 6};
2160  Double_t TPCcut = 2;
2161  Double_t TOFcut = 2;
2162  Double_t TRDcut = .9;
2163  Double_t EMCcutLower[6] = {.85,.85,.85,.85,.85,.95};
2164  Double_t EMCcutHigher[6] = {1.15,1.15,1.15,1.15,1.15,1.25};
2165 
2166  for(Int_t i=0; i<6; i++){
2167  if(esdtrack->Pt()>ptLower[i]&&esdtrack->Pt()<ptUpper[i]){
2168 
2169  //Fill general shower shape plots
2170  if(MBtrg){
2171  fHistM02_All_MB[i]->Fill(M02, EOP);
2172  fHistM20_All_MB[i]->Fill(M20, EOP);
2173  }
2174  if(EMC7trg){
2175  fHistM02_All_EMC7[i]->Fill(M02, EOP);
2176  fHistM20_All_EMC7[i]->Fill(M20, EOP);
2177  }
2178 
2179  if(EMCJettrg){
2180  fHistM02_All_EMCJet[i]->Fill(M02, EOP);
2181  fHistM20_All_EMCJet[i]->Fill(M20, EOP);
2182  }
2183 
2184  //TPC Plots
2185  //EMC+TRD cuts
2186  if(EOP<EMCcutHigher[i]&&EOP>EMCcutLower[i]&&elecLikeTRD[0]>TRDcut){
2187 
2188  if(MBtrg){
2189  fHistTPC_EMCTRD_MB[i]->Fill(esdtrack->Pt(), nSigmaTPC);
2190  }
2191  if(EMC7trg){
2192  fHistTPC_EMCTRD_EMC7[i]->Fill(esdtrack->Pt(), nSigmaTPC);
2193  }
2194 
2195  if(EMCJettrg){
2196  fHistTPC_EMCTRD_EMCJet[i]->Fill(esdtrack->Pt(), nSigmaTPC);
2197  }
2198  }
2199 
2200  //EMC Plots
2201 
2202  //TPC+TRD cuts
2203  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut){
2204 
2205  if(!applySSCuts){
2206  if(MBtrg){
2207  fHistEMC_TPCTRD_MB[i]->Fill(EOP);
2208  }
2209  if(EMC7trg){
2210  fHistEMC_TPCTRD_EMC7[i]->Fill(EOP);
2211  }
2212 
2213  if(EMCJettrg){
2214  fHistEMC_TPCTRD_EMCJet[i]->Fill(EOP);
2215  }
2216  }else{
2217  if(M02<.5&&M02>0&&M20<.3&&M20>0){
2218  if(MBtrg){
2219  fHistEMC_TPCTRD_MB[i]->Fill(EOP);
2220  }
2221  if(EMC7trg){
2222  fHistEMC_TPCTRD_EMC7[i]->Fill(EOP);
2223  }
2224 
2225  if(EMCJettrg){
2226  fHistEMC_TPCTRD_EMCJet[i]->Fill(EOP);
2227  }
2228  }
2229  }
2230 
2231  //Fill the shower shape plots here also
2232  if(MBtrg){
2233  fHistM02_Elec_MB[i]->Fill(M02, EOP);
2234  fHistM20_Elec_MB[i]->Fill(M20, EOP);
2235  }
2236  if(EMC7trg){
2237  fHistM02_Elec_EMC7[i]->Fill(M02, EOP);
2238  fHistM20_Elec_EMC7[i]->Fill(M20, EOP);
2239  }
2240 
2241  if(EMCJettrg){
2242  fHistM02_Elec_EMCJet[i]->Fill(M02, EOP);
2243  fHistM20_Elec_EMCJet[i]->Fill(M20, EOP);
2244  }
2245  }
2246 
2247  //TRD Plots
2248 
2249  //TPC+EMC cuts
2250  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&EOP<EMCcutHigher[i]&&EOP>EMCcutLower[i]){
2251 
2252  if(MBtrg){
2253  fHistTRD_TPCEMC_MB[i]->Fill(esdtrack->Pt(), elecLikeTRD[0]);
2254  }
2255  if(EMC7trg){
2256  fHistTRD_TPCEMC_EMC7[i]->Fill(esdtrack->Pt(), elecLikeTRD[0]);
2257  }
2258 
2259  if(EMCJettrg){
2260  fHistTRD_TPCEMC_EMCJet[i]->Fill(esdtrack->Pt(), elecLikeTRD[0]);
2261  }
2262  }
2263  }
2264  }
2265  if(MBtrg){
2266  if(esdtrack->Pt()<2&&esdtrack->Pt()>1){
2267  if(nSigmaTPC<-2&&nSigmaTPC>-8){
2268  fHistEMC_Had_MB_1Gev->Fill(EOP);
2269  }
2270  }
2271  }
2272 
2273  if(applySSCuts){
2274 
2275  //An electron candidate is one that passes TPC +-2Sig, TRD>.9, 0.85<E/p<1.15, M02=(0,.5), M20=(0,.3)
2276 
2277  if(esdtrack->Pt()<6){
2278  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[0]&&EOP>EMCcutLower[0]&&M02<.5&&M02>0&&M20<.3&&M20>0){
2279 
2280  tagStrong=kTRUE;
2281 
2282  }
2283 
2284  }
2285 
2286  else{
2287 
2288  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[5]&&EOP>EMCcutLower[5]&&M02<.5&&M02>0&&M20<.3&&M20>0){
2289 
2290  tagStrong=kTRUE;
2291 
2292  }
2293 
2294  }
2295 
2296  }else{//no sscuts
2297 
2298  //An electron candidate is one that passes TPC +-2Sig, TRD>.9, 0.85<E/p<1.15
2299 
2300  if(esdtrack->Pt()<6){
2301  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[0]&&EOP>EMCcutLower[0]){
2302 
2303  tagStrong=kTRUE;
2304 
2305  }
2306 
2307  }
2308 
2309  else{
2310 
2311  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[5]&&EOP>EMCcutLower[5]){
2312 
2313  tagStrong=kTRUE;
2314 
2315  }
2316 
2317  }
2318 
2319  }
2320 
2321  /*//Check if any tracks pass all cuts
2322  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&nSigmaTOF<TOFcut&&nSigmaTOF>-TOFcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher&&EOP>EMCcutLower){
2323  tagAll=kTRUE;
2324  }*/
2325 
2326  //=========================================================================
2327  // End of PID stuff
2328  //=========================================================================
2329  PostData(1, fOutputMB);
2330  PostData(2, fOutputEMC7);
2331  PostData(3, fOutputEMCJet);
2332  return;
2333 }
2334 
2335 void AliAnalysisTaskPSHFE::FillPIDHistos(AliAODEvent *aod, AliAODTrack *aodtrack, AliPIDResponse *fPIDResponse){
2336 
2337  if(!aodtrack){
2338  AliWarning("aodtrack is null, no point in doing PID");
2339  return;
2340  }
2341 
2342 
2343  Bool_t isPIDRej = kFALSE;
2344 
2345  //Fill TOF and TPC status variables
2346  AliPIDResponse::EDetPidStatus TOFStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTOF, aodtrack);
2347 
2348  AliPIDResponse::EDetPidStatus TPCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTPC, aodtrack);
2349 
2350  AliPIDResponse::EDetPidStatus TRDStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTRD, aodtrack);
2351 
2352  AliPIDResponse::EDetPidStatus EMCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kEMCAL, aodtrack);
2353 
2354  //Check validity of PID, TODO: Add a rejection histogram
2355  if(TOFStatus!=AliPIDResponse::kDetPidOk){
2356  fHistPIDRejection->Fill(2);
2357  //isPIDRej=kTRUE;
2358  }
2359 
2360  if(TPCStatus!=AliPIDResponse::kDetPidOk){
2361  fHistPIDRejection->Fill(1);
2362  isPIDRej=kTRUE;
2363  }
2364 
2365  if(TRDStatus!=AliPIDResponse::kDetPidOk){
2366  fHistPIDRejection->Fill(3);
2367  isPIDRej=kTRUE;
2368  }
2369 
2370  if(EMCStatus!=AliPIDResponse::kDetPidOk){
2371  fHistPIDRejection->Fill(4);
2372  isPIDRej=kTRUE;
2373  }
2374 
2375 
2376  //Get the # of sigmas around an electron hypothesis for TOF and TPC
2377  Double_t nSigmaTOF;
2378  nSigmaTOF = fPIDResponse->NumberOfSigmasTOF(aodtrack,AliPID::kElectron);
2379 
2380  Double_t nSigmaTPC;
2381  nSigmaTPC = fPIDResponse->NumberOfSigmasTPC(aodtrack,AliPID::kElectron);
2382 
2383  Double_t elecLikeTRD[1];
2384  if(fPIDResponse->ComputeTRDProbability(aodtrack, AliPID::kElectron, elecLikeTRD, AliTRDPIDResponse::kLQ2D) != AliPIDResponse::kDetPidOk || aodtrack->GetTRDntrackletsPID()<4){
2385  fHistPIDRejection->Fill(3);
2386  isPIDRej=kTRUE;
2387  }
2388 
2389  if(isPIDRej){return;}
2390 
2391  //declare emcal cluster PID variables
2392  Double_t EOP=-1;
2393  Double_t M02=-1;
2394  Double_t M20=-1;
2395  Int_t caloId=aodtrack->GetEMCALcluster();
2396 
2397  if(caloId==-99999){
2398  return;
2399  }
2400 
2401  AliAODCaloCluster* tagEMCclus=aod->GetCaloCluster(caloId);
2402 
2403  if(tagEMCclus->E()>.5){
2404  EOP = tagEMCclus->E()/aodtrack->Pt();
2405  M02 = tagEMCclus->GetM02();
2406  M20 = tagEMCclus->GetM20();
2407  }
2408  else{
2409  return;
2410  }
2411 
2412 
2413 
2414  //=========================================================================================================================
2415  //PID cuts and histogram filling
2416  //=========================================================================================================================
2417 
2418  //Some Double arrays for pt ranges
2419  Double_t ptUpper[6] = {2, 3, 4, 5, 6, 1000000};
2420  Double_t ptLower[6] = {1, 2, 3, 4, 5, 6};
2421  Double_t TPCcut = 2;
2422  Double_t TOFcut = 2;
2423  Double_t TRDcut = .9;
2424  Double_t EMCcutLower[6] = {.85,.85,.85,.85,.85,.95};
2425  Double_t EMCcutHigher[6] = {1.15,1.15,1.15,1.15,1.15,1.25};
2426 
2427  for(Int_t i=0; i<6; i++){
2428  if(aodtrack->Pt()>ptLower[i]&&aodtrack->Pt()<ptUpper[i]){
2429 
2430  //Fill general shower shape plots
2431  if(MBtrg){
2432  fHistM02_All_MB[i]->Fill(M02, EOP);
2433  fHistM20_All_MB[i]->Fill(M20, EOP);
2434  }
2435  if(EMC7trg){
2436  fHistM02_All_EMC7[i]->Fill(M02, EOP);
2437  fHistM20_All_EMC7[i]->Fill(M20, EOP);
2438  }
2439 
2440  if(EMCJettrg){
2441  fHistM02_All_EMCJet[i]->Fill(M02, EOP);
2442  fHistM20_All_EMCJet[i]->Fill(M20, EOP);
2443  }
2444 
2445  //TPC Plots
2446  //EMC+TRD cuts
2447  if(EOP<EMCcutHigher[i]&&EOP>EMCcutLower[i]&&elecLikeTRD[0]>TRDcut){
2448 
2449  if(MBtrg){
2450  fHistTPC_EMCTRD_MB[i]->Fill(aodtrack->Pt(), nSigmaTPC);
2451  }
2452  if(EMC7trg){
2453  fHistTPC_EMCTRD_EMC7[i]->Fill(aodtrack->Pt(), nSigmaTPC);
2454  }
2455 
2456  if(EMCJettrg){
2457  fHistTPC_EMCTRD_EMCJet[i]->Fill(aodtrack->Pt(), nSigmaTPC);
2458  }
2459  }
2460 
2461  //EMC Plots
2462 
2463  //TPC+TRD cuts
2464  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut){
2465 
2466  if(!applySSCuts){
2467  if(MBtrg){
2468  fHistEMC_TPCTRD_MB[i]->Fill(EOP);
2469  }
2470  if(EMC7trg){
2471  fHistEMC_TPCTRD_EMC7[i]->Fill(EOP);
2472  }
2473 
2474  if(EMCJettrg){
2475  fHistEMC_TPCTRD_EMCJet[i]->Fill(EOP);
2476  }
2477  }else{
2478  if(M02<.5&&M02>0&&M20<.3&&M20>0){
2479  if(MBtrg){
2480  fHistEMC_TPCTRD_MB[i]->Fill(EOP);
2481  }
2482  if(EMC7trg){
2483  fHistEMC_TPCTRD_EMC7[i]->Fill(EOP);
2484  }
2485 
2486  if(EMCJettrg){
2487  fHistEMC_TPCTRD_EMCJet[i]->Fill(EOP);
2488  }
2489  }
2490  }
2491 
2492  //Fill the shower shape plots here also
2493  if(MBtrg){
2494  fHistM02_Elec_MB[i]->Fill(M02, EOP);
2495  fHistM20_Elec_MB[i]->Fill(M20, EOP);
2496  }
2497  if(EMC7trg){
2498  fHistM02_Elec_EMC7[i]->Fill(M02, EOP);
2499  fHistM20_Elec_EMC7[i]->Fill(M20, EOP);
2500  }
2501 
2502  if(EMCJettrg){
2503  fHistM02_Elec_EMCJet[i]->Fill(M02, EOP);
2504  fHistM20_Elec_EMCJet[i]->Fill(M20, EOP);
2505  }
2506  }
2507 
2508  //TRD Plots
2509 
2510  //TPC+EMC cuts
2511  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&EOP<EMCcutHigher[i]&&EOP>EMCcutLower[i]){
2512 
2513  if(MBtrg){
2514  fHistTRD_TPCEMC_MB[i]->Fill(aodtrack->Pt(), elecLikeTRD[0]);
2515  }
2516  if(EMC7trg){
2517  fHistTRD_TPCEMC_EMC7[i]->Fill(aodtrack->Pt(), elecLikeTRD[0]);
2518  }
2519 
2520  if(EMCJettrg){
2521  fHistTRD_TPCEMC_EMCJet[i]->Fill(aodtrack->Pt(), elecLikeTRD[0]);
2522  }
2523  }
2524  }
2525  }
2526  if(MBtrg){
2527  if(aodtrack->Pt()<2&&aodtrack->Pt()>1){
2528  if(nSigmaTPC<-2&&nSigmaTPC>-8){
2529  fHistEMC_Had_MB_1Gev->Fill(EOP);
2530  }
2531  }
2532  }
2533 
2534  if(applySSCuts){
2535 
2536  //An electron candidate is one that passes TPC +-2Sig, TRD>.9, 0.85<E/p<1.15, M02=(0,.5), M20=(0,.3)
2537 
2538  if(aodtrack->Pt()<6){
2539  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[0]&&EOP>EMCcutLower[0]&&M02<.5&&M02>0&&M20<.3&&M20>0){
2540 
2541  tagStrong=kTRUE;
2542 
2543  }
2544 
2545  }
2546 
2547  else{
2548 
2549  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[5]&&EOP>EMCcutLower[5]&&M02<.5&&M02>0&&M20<.3&&M20>0){
2550 
2551  tagStrong=kTRUE;
2552 
2553  }
2554 
2555  }
2556 
2557  }else{//no sscuts
2558 
2559  //An electron candidate is one that passes TPC +-2Sig, TRD>.9, 0.85<E/p<1.15
2560 
2561  if(aodtrack->Pt()<6){
2562  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[0]&&EOP>EMCcutLower[0]){
2563 
2564  tagStrong=kTRUE;
2565 
2566  }
2567 
2568  }
2569 
2570  else{
2571 
2572  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[5]&&EOP>EMCcutLower[5]){
2573 
2574  tagStrong=kTRUE;
2575 
2576  }
2577 
2578  }
2579 
2580  }
2581 
2582  /*//Check if any tracks pass all cuts
2583  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&nSigmaTOF<TOFcut&&nSigmaTOF>-TOFcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher&&EOP>EMCcutLower){
2584  tagAll=kTRUE;
2585  }*/
2586 
2587  //=========================================================================
2588  // End of PID stuff
2589  //=========================================================================
2590  PostData(1, fOutputMB);
2591  PostData(2, fOutputEMC7);
2592  PostData(3, fOutputEMCJet);
2593  return;
2594 }
2595 
2596 void AliAnalysisTaskPSHFE::FillDPhiHistos(AliESDEvent *esd, AliESDtrack *esdtrack, Int_t i){
2597  //Run through all tracks in this
2598  Int_t ntracks = esd->GetNumberOfTracks();
2599  for(Int_t j = 0; j < ntracks; j++) {
2600 
2601  //Don't double count the tagged tracks
2602  if(i==j){continue;}
2603 
2604 
2605  AliESDtrack* esdtrackassoc = (AliESDtrack*)esd->GetTrack(j); // pointer to reconstructed to track
2606 
2607  if(!esdtrackassoc) {
2608  AliError(Form("ERROR: Could not retrieve esdtrack %d",j));
2609  continue;
2610  }
2611 
2612  //Do hybrid track cuts
2613  if(!globaltrackCuts->AcceptTrack(esdtrackassoc)&&!comptrackCuts->AcceptTrack(esdtrackassoc)){continue;}
2614 
2615  //Pt distribution
2616  if(MBtrg){
2617  fHistPtAssoc_MB->Fill(esdtrackassoc->Pt());
2618  }
2619  if(EMC7trg){
2620  fHistPtAssoc_EMC7->Fill(esdtrackassoc->Pt());
2621  }
2622 
2623  if(EMCJettrg){
2624  fHistPtAssoc_EMCJet->Fill(esdtrackassoc->Pt());
2625  }
2626 
2627  //Fill Delta Phi variable and correct for periodicity
2628  Double_t DPhi=esdtrackassoc->Phi()-esdtrack->Phi();
2629 
2630  if(DPhi<-TMath::Pi()/2){DPhi=TMath::Abs(2*TMath::Pi()+DPhi);}
2631 
2632  if(DPhi>3*TMath::Pi()/2){DPhi=-TMath::Abs(2*TMath::Pi()-DPhi);}
2633 
2634  Double_t DEta=esdtrackassoc->Eta()-esdtrack->Eta();
2635 
2636  //candidate 1<pt<2
2637  if(esdtrack->Pt()>1&&esdtrack->Pt()<2){
2638 
2639  //300-500MeV
2640  if(esdtrackassoc->Pt()>.3&&esdtrackassoc->Pt()<.5){
2641  if(MBtrg){
2642  fHistDPhi300_500_MB[0]->Fill(DPhi);
2643  }
2644  if(EMC7trg){
2645  fHistDPhi300_500_EMC7[0]->Fill(DPhi);
2646  }
2647  if(EMCJettrg){
2648  fHistDPhi300_500_EMCJet[0]->Fill(DPhi);
2649  }
2650  }
2651 
2652  //500MeV
2653  if(esdtrackassoc->Pt()>.5&&esdtrackassoc->Pt()<.8){
2654  if(MBtrg){
2655  fHistDPhi500_800_MB[0]->Fill(DPhi);
2656  }
2657  if(EMC7trg){
2658  fHistDPhi500_800_EMC7[0]->Fill(DPhi);
2659  }
2660  if(EMCJettrg){
2661  fHistDPhi500_800_EMCJet[0]->Fill(DPhi);
2662  }
2663  }
2664 
2665  //800MeV
2666  if(esdtrackassoc->Pt()>.8&&esdtrackassoc->Pt()<1){
2667  if(MBtrg){
2668  fHistDPhi800_1_MB[0]->Fill(DPhi);
2669  }
2670  if(EMC7trg){
2671  fHistDPhi800_1_EMC7[0]->Fill(DPhi);
2672  }
2673  if(EMCJettrg){
2674  fHistDPhi800_1_EMCJet[0]->Fill(DPhi);
2675  }
2676  }
2677 
2678  //1GeV
2679  if(esdtrackassoc->Pt()>1&&esdtrackassoc->Pt()<2){
2680  if(MBtrg){
2681  fHistDPhi1_2_MB[0]->Fill(DPhi);
2682  }
2683  if(EMC7trg){
2684  fHistDPhi1_2_EMC7[0]->Fill(DPhi);
2685  }
2686  if(EMCJettrg){
2687  fHistDPhi1_2_EMCJet[0]->Fill(DPhi);
2688  }
2689  }
2690 
2691  //2GeV
2692  if(esdtrackassoc->Pt()>2&&esdtrackassoc->Pt()<3){
2693  if(MBtrg){
2694  fHistDPhi2_3_MB[0]->Fill(DPhi);
2695  }
2696  if(EMC7trg){
2697  fHistDPhi2_3_EMC7[0]->Fill(DPhi);
2698  }
2699  if(EMCJettrg){
2700  fHistDPhi2_3_EMCJet[0]->Fill(DPhi);
2701  }
2702  }
2703 
2704  //3GeV
2705  if(esdtrackassoc->Pt()>3&&esdtrackassoc->Pt()<4){
2706  if(MBtrg){
2707  fHistDPhi3_4_MB[0]->Fill(DPhi);
2708  }
2709  if(EMC7trg){
2710  fHistDPhi3_4_EMC7[0]->Fill(DPhi);
2711  }
2712  if(EMCJettrg){
2713  fHistDPhi3_4_EMCJet[0]->Fill(DPhi);
2714  }
2715  }
2716 
2717  //5GeV
2718  if(esdtrackassoc->Pt()>4){
2719  if(MBtrg){
2720  fHistDPhi4_MB[0]->Fill(DPhi);
2721  }
2722  if(EMC7trg){
2723  fHistDPhi4_EMC7[0]->Fill(DPhi);
2724  }
2725  if(EMCJettrg){
2726  fHistDPhi4_EMCJet[0]->Fill(DPhi);
2727  }
2728  }
2729  }
2730 
2731  //candidate 2<pt<4
2732  if(esdtrack->Pt()>2&&esdtrack->Pt()<4){
2733 
2734  //300MeV
2735  if(esdtrackassoc->Pt()>.3&&esdtrackassoc->Pt()<.5){
2736  if(MBtrg){
2737  fHistDPhi300_500_MB[1]->Fill(DPhi);
2738  }
2739  if(EMC7trg){
2740  fHistDPhi300_500_EMC7[1]->Fill(DPhi);
2741  }
2742  if(EMCJettrg){
2743  fHistDPhi300_500_EMCJet[1]->Fill(DPhi);
2744  }
2745  }
2746 
2747  //500MeV
2748  if(esdtrackassoc->Pt()>.5&&esdtrackassoc->Pt()<.8){
2749  if(MBtrg){
2750  fHistDPhi500_800_MB[1]->Fill(DPhi);
2751  }
2752  if(EMC7trg){
2753  fHistDPhi500_800_EMC7[1]->Fill(DPhi);
2754  }
2755  if(EMCJettrg){
2756  fHistDPhi500_800_EMCJet[1]->Fill(DPhi);
2757  }
2758  }
2759 
2760  //800MeV
2761  if(esdtrackassoc->Pt()>.8&&esdtrackassoc->Pt()<1){
2762  if(MBtrg){
2763  fHistDPhi800_1_MB[1]->Fill(DPhi);
2764  }
2765  if(EMC7trg){
2766  fHistDPhi800_1_EMC7[1]->Fill(DPhi);
2767  }
2768  if(EMCJettrg){
2769  fHistDPhi800_1_EMCJet[1]->Fill(DPhi);
2770  }
2771  }
2772 
2773  //1GeV
2774  if(esdtrackassoc->Pt()>1&&esdtrackassoc->Pt()<2){
2775  if(MBtrg){
2776  fHistDPhi1_2_MB[1]->Fill(DPhi);
2777  }
2778  if(EMC7trg){
2779  fHistDPhi1_2_EMC7[1]->Fill(DPhi);
2780  }
2781  if(EMCJettrg){
2782  fHistDPhi1_2_EMCJet[1]->Fill(DPhi);
2783  }
2784  }
2785 
2786  //2GeV
2787  if(esdtrackassoc->Pt()>2&&esdtrackassoc->Pt()<3){
2788  if(MBtrg){
2789  fHistDPhi2_3_MB[1]->Fill(DPhi);
2790  fHistDPhi28_MB->Fill(DPhi);
2791  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2792  fHistDPhi18Spe_MB->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2793  }
2794  if(EMC7trg){
2795  fHistDPhi2_3_EMC7[1]->Fill(DPhi);
2796  fHistDPhi28_EMC7->Fill(DPhi);
2797  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2798  fHistDPhi18Spe_EMC7->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2799  }
2800  if(EMCJettrg){
2801  fHistDPhi2_3_EMCJet[1]->Fill(DPhi);
2802  fHistDPhi28_EMCJet->Fill(DPhi);
2803  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2804  fHistDPhi18Spe_EMCJet->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2805  }
2806  }
2807 
2808  //3GeV
2809  if(esdtrackassoc->Pt()>3&&esdtrackassoc->Pt()<4){
2810  if(MBtrg){
2811  fHistDPhi3_4_MB[1]->Fill(DPhi);
2812  fHistDPhi28_MB->Fill(DPhi);
2813  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2814  fHistDPhi18Spe_MB->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2815  }
2816  if(EMC7trg){
2817  fHistDPhi3_4_EMC7[1]->Fill(DPhi);
2818  fHistDPhi28_EMC7->Fill(DPhi);
2819  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2820  fHistDPhi18Spe_EMC7->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2821  }
2822  if(EMCJettrg){
2823  fHistDPhi3_4_EMCJet[1]->Fill(DPhi);
2824  fHistDPhi28_EMCJet->Fill(DPhi);
2825  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2826  fHistDPhi18Spe_EMCJet->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2827  }
2828  }
2829 
2830  //5GeV
2831  if(esdtrackassoc->Pt()>4){
2832  if(MBtrg){
2833  fHistDPhi4_MB[1]->Fill(DPhi);
2834  fHistDPhi28_MB->Fill(DPhi);
2835  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2836  fHistDPhi18Spe_MB->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2837  }
2838  if(EMC7trg){
2839  fHistDPhi4_EMC7[1]->Fill(DPhi);
2840  fHistDPhi28_EMC7->Fill(DPhi);
2841  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2842  fHistDPhi18Spe_EMC7->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2843  }
2844  if(EMCJettrg){
2845  fHistDPhi4_EMCJet[1]->Fill(DPhi);
2846  fHistDPhi28_EMCJet->Fill(DPhi);
2847  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2848  fHistDPhi18Spe_EMCJet->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2849  }
2850  }
2851  }
2852 
2853  //candidate 4<pt<8
2854  if(esdtrack->Pt()>4&&esdtrack->Pt()<8){
2855 
2856  //300MeV
2857  if(esdtrackassoc->Pt()>.3&&esdtrackassoc->Pt()<.5){
2858  if(MBtrg){
2859  fHistDPhi300_500_MB[2]->Fill(DPhi);
2860  }
2861  if(EMC7trg){
2862  fHistDPhi300_500_EMC7[2]->Fill(DPhi);
2863  }
2864  if(EMCJettrg){
2865  fHistDPhi300_500_EMCJet[2]->Fill(DPhi);
2866  }
2867  }
2868 
2869  //500MeV
2870  if(esdtrackassoc->Pt()>.5&&esdtrackassoc->Pt()<.8){
2871  if(MBtrg){
2872  fHistDPhi500_800_MB[2]->Fill(DPhi);
2873  }
2874  if(EMC7trg){
2875  fHistDPhi500_800_EMC7[2]->Fill(DPhi);
2876  }
2877  if(EMCJettrg){
2878  fHistDPhi500_800_EMCJet[2]->Fill(DPhi);
2879  }
2880  }
2881 
2882  //800MeV
2883  if(esdtrackassoc->Pt()>.8&&esdtrackassoc->Pt()<1){
2884  if(MBtrg){
2885  fHistDPhi800_1_MB[2]->Fill(DPhi);
2886  }
2887  if(EMC7trg){
2888  fHistDPhi800_1_EMC7[2]->Fill(DPhi);
2889  }
2890  if(EMCJettrg){
2891  fHistDPhi800_1_EMCJet[2]->Fill(DPhi);
2892  }
2893  }
2894 
2895  //1GeV
2896  if(esdtrackassoc->Pt()>1&&esdtrackassoc->Pt()<2){
2897  if(MBtrg){
2898  fHistDPhi1_2_MB[2]->Fill(DPhi);
2899  }
2900  if(EMC7trg){
2901  fHistDPhi1_2_EMC7[2]->Fill(DPhi);
2902  }
2903  if(EMCJettrg){
2904  fHistDPhi1_2_EMCJet[2]->Fill(DPhi);
2905  }
2906  }
2907 
2908  //2GeV
2909  if(esdtrackassoc->Pt()>2&&esdtrackassoc->Pt()<3){
2910  if(MBtrg){
2911  fHistDPhi2_3_MB[2]->Fill(DPhi);
2912  fHistDPhi28_MB->Fill(DPhi);
2913  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2914  fHistDPhi18Spe_MB->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2915  }
2916  if(EMC7trg){
2917  fHistDPhi2_3_EMC7[2]->Fill(DPhi);
2918  fHistDPhi28_EMC7->Fill(DPhi);
2919  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2920  fHistDPhi18Spe_EMC7->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2921  }
2922  if(EMCJettrg){
2923  fHistDPhi2_3_EMCJet[2]->Fill(DPhi);
2924  fHistDPhi28_EMCJet->Fill(DPhi);
2925  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2926  fHistDPhi18Spe_EMCJet->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2927  }
2928  }
2929 
2930  //3GeV
2931  if(esdtrackassoc->Pt()>3&&esdtrackassoc->Pt()<4){
2932  if(MBtrg){
2933  fHistDPhi3_4_MB[2]->Fill(DPhi);
2934  fHistDPhi28_MB->Fill(DPhi);
2935  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2936  fHistDPhi18Spe_MB->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2937  }
2938  if(EMC7trg){
2939  fHistDPhi3_4_EMC7[2]->Fill(DPhi);
2940  fHistDPhi28_EMC7->Fill(DPhi);
2941  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2942  fHistDPhi18Spe_EMC7->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2943  }
2944  if(EMCJettrg){
2945  fHistDPhi3_4_EMCJet[2]->Fill(DPhi);
2946  fHistDPhi28_EMCJet->Fill(DPhi);
2947  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2948  fHistDPhi18Spe_EMCJet->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2949  }
2950  }
2951 
2952  //5GeV
2953  if(esdtrackassoc->Pt()>4){
2954  if(MBtrg){
2955  fHistDPhi4_MB[2]->Fill(DPhi);
2956  fHistDPhi28_MB->Fill(DPhi);
2957  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2958  fHistDPhi18Spe_MB->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2959  }
2960  if(EMC7trg){
2961  fHistDPhi4_EMC7[2]->Fill(DPhi);
2962  fHistDPhi28_EMC7->Fill(DPhi);
2963  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2964  fHistDPhi18Spe_EMC7->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2965  }
2966  if(EMCJettrg){
2967  fHistDPhi4_EMCJet[2]->Fill(DPhi);
2968  fHistDPhi28_EMCJet->Fill(DPhi);
2969  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2970  fHistDPhi18Spe_EMCJet->Fill(DPhi, esdtrackassoc->GetTPCsignal());
2971  }
2972  }
2973  }
2974 
2975  }
2976  PostData(1, fOutputMB);
2977  PostData(2, fOutputEMC7);
2978  PostData(3, fOutputEMCJet);
2979  return;
2980 }
2981 
2982 void AliAnalysisTaskPSHFE::FillDPhiHistos(AliAODEvent *aod, AliAODTrack *aodtrack, Int_t i){
2983  //Run through all tracks in this
2984  Int_t ntracks = aod->GetNumberOfTracks();
2985  for(Int_t j = 0; j < ntracks; j++) {
2986 
2987  //Don't double count the tagged tracks
2988  if(i==j){continue;}
2989 
2990 
2991  AliAODTrack* aodtrackassoc = (AliAODTrack*)aod->GetTrack(j); // pointer to reconstructed to track
2992 
2993  if(!aodtrackassoc) {
2994  AliError(Form("ERROR: Could not retrieve aodtrack %d",j));
2995  continue;
2996  }
2997 
2998  //Do hybrid track cuts
2999  if(aodtrackassoc->IsHybridGlobalConstrainedGlobal()){continue;}
3000 
3001  //Pt distribution
3002  if(MBtrg){
3003  fHistPtAssoc_MB->Fill(aodtrackassoc->Pt());
3004  }
3005  if(EMC7trg){
3006  fHistPtAssoc_EMC7->Fill(aodtrackassoc->Pt());
3007  }
3008 
3009  if(EMCJettrg){
3010  fHistPtAssoc_EMCJet->Fill(aodtrackassoc->Pt());
3011  }
3012 
3013  //Fill Delta Phi variable and correct for periodicity
3014  Double_t DPhi=aodtrackassoc->Phi()-aodtrack->Phi();
3015 
3016  if(DPhi<-TMath::Pi()/2){DPhi=TMath::Abs(2*TMath::Pi()+DPhi);}
3017 
3018  if(DPhi>3*TMath::Pi()/2){DPhi=-TMath::Abs(2*TMath::Pi()-DPhi);}
3019 
3020  Double_t DEta=aodtrackassoc->Eta()-aodtrack->Eta();
3021 
3022  Int_t PID=0;
3023  cout<<"most probPID"<<AliAODTrack::kElectron<<":"<<aodtrackassoc->GetMostProbablePID()<<'\n';
3024  switch(aodtrackassoc->GetMostProbablePID()){
3025  case AliAODTrack::kElectron:
3026  PID=1;
3027  break;
3028  case AliAODTrack::kMuon:
3029  PID=2;
3030  break;
3031  case AliAODTrack::kPion:
3032  PID=3;
3033  break;
3034  case AliAODTrack::kKaon:
3035  PID=4;
3036  break;
3037  case AliAODTrack::kProton:
3038  PID=5;
3039  break;
3040  case AliAODTrack::kDeuteron:
3041  PID=6;
3042  break;
3043  case AliAODTrack::kUnknown:
3044  PID=0;
3045  break;
3046  }
3047 
3048  //candidate 1<pt<2
3049  if(aodtrack->Pt()>1&&aodtrack->Pt()<2){
3050 
3051  //300-500MeV
3052  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<.5){
3053  if(MBtrg){
3054  fHistDPhi300_500_MB[0]->Fill(DPhi);
3055  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3056  }
3057  if(EMC7trg){
3058  fHistDPhi300_500_EMC7[0]->Fill(DPhi);
3059  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3060  }
3061  if(EMCJettrg){
3062  fHistDPhi300_500_EMCJet[0]->Fill(DPhi);
3063  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3064  }
3065  }
3066 
3067  //500MeV
3068  if(aodtrackassoc->Pt()>.5&&aodtrackassoc->Pt()<.8){
3069  if(MBtrg){
3070  fHistDPhi500_800_MB[0]->Fill(DPhi);
3071  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3072  }
3073  if(EMC7trg){
3074  fHistDPhi500_800_EMC7[0]->Fill(DPhi);
3075  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3076  }
3077  if(EMCJettrg){
3078  fHistDPhi500_800_EMCJet[0]->Fill(DPhi);
3079  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3080  }
3081  }
3082 
3083  //800MeV
3084  if(aodtrackassoc->Pt()>.8&&aodtrackassoc->Pt()<1){
3085  if(MBtrg){
3086  fHistDPhi800_1_MB[0]->Fill(DPhi);
3087  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3088  }
3089  if(EMC7trg){
3090  fHistDPhi800_1_EMC7[0]->Fill(DPhi);
3091  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3092  }
3093  if(EMCJettrg){
3094  fHistDPhi800_1_EMCJet[0]->Fill(DPhi);
3095  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3096  }
3097  }
3098 
3099  //1GeV
3100  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
3101  if(MBtrg){
3102  fHistDPhi1_2_MB[0]->Fill(DPhi);
3103  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3104  }
3105  if(EMC7trg){
3106  fHistDPhi1_2_EMC7[0]->Fill(DPhi);
3107  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3108  }
3109  if(EMCJettrg){
3110  fHistDPhi1_2_EMCJet[0]->Fill(DPhi);
3111  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3112  }
3113  }
3114 
3115  //2GeV
3116  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<3){
3117  if(MBtrg){
3118  fHistDPhi2_3_MB[0]->Fill(DPhi);
3119  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3120  }
3121  if(EMC7trg){
3122  fHistDPhi2_3_EMC7[0]->Fill(DPhi);
3123  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3124  }
3125  if(EMCJettrg){
3126  fHistDPhi2_3_EMCJet[0]->Fill(DPhi);
3127  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3128  }
3129  }
3130 
3131  //3GeV
3132  if(aodtrackassoc->Pt()>3&&aodtrackassoc->Pt()<4){
3133  if(MBtrg){
3134  fHistDPhi3_4_MB[0]->Fill(DPhi);
3135  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3136  }
3137  if(EMC7trg){
3138  fHistDPhi3_4_EMC7[0]->Fill(DPhi);
3139  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3140  }
3141  if(EMCJettrg){
3142  fHistDPhi3_4_EMCJet[0]->Fill(DPhi);
3143  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3144  }
3145  }
3146 
3147  //5GeV
3148  if(aodtrackassoc->Pt()>4){
3149  if(MBtrg){
3150  fHistDPhi4_MB[0]->Fill(DPhi);
3151  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3152  }
3153  if(EMC7trg){
3154  fHistDPhi4_EMC7[0]->Fill(DPhi);
3155  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3156  }
3157  if(EMCJettrg){
3158  fHistDPhi4_EMCJet[0]->Fill(DPhi);
3159  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3160  }
3161  }
3162  }
3163 
3164  //candidate 2<pt<4
3165  if(aodtrack->Pt()>2&&aodtrack->Pt()<4){
3166 
3167  //300MeV
3168  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<.5){
3169  if(MBtrg){
3170  fHistDPhi300_500_MB[1]->Fill(DPhi);
3171  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3172  }
3173  if(EMC7trg){
3174  fHistDPhi300_500_EMC7[1]->Fill(DPhi);
3175  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3176  }
3177  if(EMCJettrg){
3178  fHistDPhi300_500_EMCJet[1]->Fill(DPhi);
3179  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3180  }
3181  }
3182 
3183  //500MeV
3184  if(aodtrackassoc->Pt()>.5&&aodtrackassoc->Pt()<.8){
3185  if(MBtrg){
3186  fHistDPhi500_800_MB[1]->Fill(DPhi);
3187  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3188  }
3189  if(EMC7trg){
3190  fHistDPhi500_800_EMC7[1]->Fill(DPhi);
3191  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3192  }
3193  if(EMCJettrg){
3194  fHistDPhi500_800_EMCJet[1]->Fill(DPhi);
3195  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3196  }
3197  }
3198 
3199  //800MeV
3200  if(aodtrackassoc->Pt()>.8&&aodtrackassoc->Pt()<1){
3201  if(MBtrg){
3202  fHistDPhi800_1_MB[1]->Fill(DPhi);
3203  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3204  }
3205  if(EMC7trg){
3206  fHistDPhi800_1_EMC7[1]->Fill(DPhi);
3207  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3208  }
3209  if(EMCJettrg){
3210  fHistDPhi800_1_EMCJet[1]->Fill(DPhi);
3211  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3212  }
3213  }
3214 
3215  //1GeV
3216  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
3217  if(MBtrg){
3218  fHistDPhi1_2_MB[1]->Fill(DPhi);
3219  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3220  }
3221  if(EMC7trg){
3222  fHistDPhi1_2_EMC7[1]->Fill(DPhi);
3223  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3224  }
3225  if(EMCJettrg){
3226  fHistDPhi1_2_EMCJet[1]->Fill(DPhi);
3227  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3228  }
3229  }
3230 
3231  //2GeV
3232  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<3){
3233  if(MBtrg){
3234  fHistDPhi2_3_MB[1]->Fill(DPhi);
3235  fHistDPhi28_MB->Fill(DPhi);
3236  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
3237  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3238  }
3239  if(EMC7trg){
3240  fHistDPhi2_3_EMC7[1]->Fill(DPhi);
3241  fHistDPhi28_EMC7->Fill(DPhi);
3242  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
3243  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3244  }
3245  if(EMCJettrg){
3246  fHistDPhi2_3_EMCJet[1]->Fill(DPhi);
3247  fHistDPhi28_EMCJet->Fill(DPhi);
3248  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
3249  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3250  }
3251  }
3252 
3253  //3GeV
3254  if(aodtrackassoc->Pt()>3&&aodtrackassoc->Pt()<4){
3255  if(MBtrg){
3256  fHistDPhi3_4_MB[1]->Fill(DPhi);
3257  fHistDPhi28_MB->Fill(DPhi);
3258  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
3259  fHistDPhi18Spe_MB->Fill(DPhi,PID);
3260  }
3261  if(EMC7trg){
3262  fHistDPhi3_4_EMC7[1]->Fill(DPhi);
3263  fHistDPhi28_EMC7->Fill(DPhi);
3264  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
3265  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3266  }
3267  if(EMCJettrg){
3268  fHistDPhi3_4_EMCJet[1]->Fill(DPhi);
3269  fHistDPhi28_EMCJet->Fill(DPhi);
3270  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
3271  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3272  }
3273  }
3274 
3275  //5GeV
3276  if(aodtrackassoc->Pt()>4){
3277  if(MBtrg){
3278  fHistDPhi4_MB[1]->Fill(DPhi);
3279  fHistDPhi28_MB->Fill(DPhi);
3280  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
3281  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3282  }
3283  if(EMC7trg){
3284  fHistDPhi4_EMC7[1]->Fill(DPhi);
3285  fHistDPhi28_EMC7->Fill(DPhi);
3286  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
3287  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3288  }
3289  if(EMCJettrg){
3290  fHistDPhi4_EMCJet[1]->Fill(DPhi);
3291  fHistDPhi28_EMCJet->Fill(DPhi);
3292  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
3293  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3294  }
3295  }
3296  }
3297 
3298  //candidate 4<pt<8
3299  if(aodtrack->Pt()>4&&aodtrack->Pt()<8){
3300 
3301  //300MeV
3302  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<.5){
3303  if(MBtrg){
3304  fHistDPhi300_500_MB[2]->Fill(DPhi);
3305  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3306  }
3307  if(EMC7trg){
3308  fHistDPhi300_500_EMC7[2]->Fill(DPhi);
3309  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3310  }
3311  if(EMCJettrg){
3312  fHistDPhi300_500_EMCJet[2]->Fill(DPhi);
3313  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3314  }
3315  }
3316 
3317  //500MeV
3318  if(aodtrackassoc->Pt()>.5&&aodtrackassoc->Pt()<.8){
3319  if(MBtrg){
3320  fHistDPhi500_800_MB[2]->Fill(DPhi);
3321  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3322  }
3323  if(EMC7trg){
3324  fHistDPhi500_800_EMC7[2]->Fill(DPhi);
3325  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3326  }
3327  if(EMCJettrg){
3328  fHistDPhi500_800_EMCJet[2]->Fill(DPhi);
3329  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3330  }
3331  }
3332 
3333  //800MeV
3334  if(aodtrackassoc->Pt()>.8&&aodtrackassoc->Pt()<1){
3335  if(MBtrg){
3336  fHistDPhi800_1_MB[2]->Fill(DPhi);
3337  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3338  }
3339  if(EMC7trg){
3340  fHistDPhi800_1_EMC7[2]->Fill(DPhi);
3341  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3342  }
3343  if(EMCJettrg){
3344  fHistDPhi800_1_EMCJet[2]->Fill(DPhi);
3345  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3346  }
3347  }
3348 
3349  //1GeV
3350  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
3351  if(MBtrg){
3352  fHistDPhi1_2_MB[2]->Fill(DPhi);
3353  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3354  }
3355  if(EMC7trg){
3356  fHistDPhi1_2_EMC7[2]->Fill(DPhi);
3357  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3358  }
3359  if(EMCJettrg){
3360  fHistDPhi1_2_EMCJet[2]->Fill(DPhi);
3361  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3362  }
3363  }
3364 
3365  //2GeV
3366  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<3){
3367  if(MBtrg){
3368  fHistDPhi2_3_MB[2]->Fill(DPhi);
3369  fHistDPhi28_MB->Fill(DPhi);
3370  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
3371  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3372  }
3373  if(EMC7trg){
3374  fHistDPhi2_3_EMC7[2]->Fill(DPhi);
3375  fHistDPhi28_EMC7->Fill(DPhi);
3376  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
3377  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3378  }
3379  if(EMCJettrg){
3380  fHistDPhi2_3_EMCJet[2]->Fill(DPhi);
3381  fHistDPhi28_EMCJet->Fill(DPhi);
3382  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
3383  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3384  }
3385  }
3386 
3387  //3GeV
3388  if(aodtrackassoc->Pt()>3&&aodtrackassoc->Pt()<4){
3389  if(MBtrg){
3390  fHistDPhi3_4_MB[2]->Fill(DPhi);
3391  fHistDPhi28_MB->Fill(DPhi);
3392  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
3393  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3394  }
3395  if(EMC7trg){
3396  fHistDPhi3_4_EMC7[2]->Fill(DPhi);
3397  fHistDPhi28_EMC7->Fill(DPhi);
3398  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
3399  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3400  }
3401  if(EMCJettrg){
3402  fHistDPhi3_4_EMCJet[2]->Fill(DPhi);
3403  fHistDPhi28_EMCJet->Fill(DPhi);
3404  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
3405  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3406  }
3407  }
3408 
3409  //5GeV
3410  if(aodtrackassoc->Pt()>4){
3411  if(MBtrg){
3412  fHistDPhi4_MB[2]->Fill(DPhi);
3413  fHistDPhi28_MB->Fill(DPhi);
3414  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
3415  fHistDPhi18Spe_MB->Fill(DPhi, PID);
3416  }
3417  if(EMC7trg){
3418  fHistDPhi4_EMC7[2]->Fill(DPhi);
3419  fHistDPhi28_EMC7->Fill(DPhi);
3420  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
3421  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
3422  }
3423  if(EMCJettrg){
3424  fHistDPhi4_EMCJet[2]->Fill(DPhi);
3425  fHistDPhi28_EMCJet->Fill(DPhi);
3426  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
3427  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
3428  }
3429  }
3430  }
3431 
3432  }
3433  PostData(1, fOutputMB);
3434  PostData(2, fOutputEMC7);
3435  PostData(3, fOutputEMCJet);
3436  return;
3437 }
3438 
3439 void AliAnalysisTaskPSHFE::SetTrackCuts(AliESDtrackCuts *gtrkCuts, AliESDtrackCuts *ctrkCuts){
3440  cout<<"assigning hybrid track cuts \n";
3441  globaltrackCuts=gtrkCuts;
3442  comptrackCuts=ctrkCuts;
3443 }
3444 
3446  trackCutsStrong=trkCutBool;
3447 }
3448 
3450  applySSCuts=SSCutBool;
3451 }
3452 
3453 void AliAnalysisTaskPSHFE::FillPhotoElecHistos(AliESDEvent *esd, AliESDtrack *esdtrack, AliPIDResponse *fPIDResponse, Int_t i){
3454 
3455  if(!esdtrack){
3456  AliWarning("esdtrack is null, no point in doing Photonic Electron stuff");
3457  return;
3458  }
3459 
3460  Bool_t isElec=kFALSE;
3461  Double_t ElecMass=.0005109989;
3462  //Fill TOF and TPC status variables
3463  AliPIDResponse::EDetPidStatus TPCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTPC, esdtrack);
3464 
3465  AliPIDResponse::EDetPidStatus TRDStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTRD, esdtrack);
3466 
3467  AliPIDResponse::EDetPidStatus EMCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kEMCAL, esdtrack);
3468 
3469  //Check validity of PID, TODO: Add a rejection histogram
3470  if(TPCStatus!=AliPIDResponse::kDetPidOk){
3471  return;
3472  }
3473 
3474  if(TRDStatus!=AliPIDResponse::kDetPidOk){
3475  return;
3476  }
3477 
3478  if(EMCStatus!=AliPIDResponse::kDetPidOk){
3479  return;
3480  }
3481 
3482 
3483  //Get the # of sigmas around an electron hypothesis for TOF and TPC
3484  Double_t nSigmaTPC;
3485  nSigmaTPC = fPIDResponse->NumberOfSigmasTPC(esdtrack,AliPID::kElectron);
3486 
3487  Double_t elecLikeTRD[1];
3488  if(fPIDResponse->ComputeTRDProbability(esdtrack, AliPID::kElectron, elecLikeTRD, AliTRDPIDResponse::kLQ2D) != AliPIDResponse::kDetPidOk || esdtrack->GetTRDntrackletsPID()<4){
3489  return;
3490  }
3491 
3492  //declare emcal cluster PID variables
3493  Double_t EOP=-1;
3494  Int_t caloId=esdtrack->GetEMCALcluster();
3495 
3496  if(caloId==-99999){
3497  return;
3498  }
3499 
3500  AliESDCaloCluster* tagEMCclus=esd->GetCaloCluster(caloId);
3501 
3502  EOP = tagEMCclus->E()/esdtrack->Pt();
3503 
3504  if((nSigmaTPC<2&&nSigmaTPC>-2)||(EOP<1.4&&EOP>.8)||(elecLikeTRD[0]>.8)){
3505  isElec=kTRUE;
3506  }
3507 
3508  if(!isElec){return;}
3509 
3510  Int_t ntracks=esd->GetNumberOfTracks();
3511 
3512  for(Int_t j = 0; j < ntracks; j++) {
3513 
3514  //Don't double count the tagged tracks
3515  if(i==j){continue;}
3516 
3517  AliESDtrack* esdtrackassoc = (AliESDtrack*)esd->GetTrack(j); // pointer to reconstructed to track
3518 
3519  if(!esdtrackassoc) {
3520  AliError(Form("ERROR: Could not retrieve esdtrack %d",j));
3521  continue;
3522  }
3523 
3524  //Do hybrid track cuts
3525  if(!globaltrackCuts->AcceptTrack(esdtrackassoc)&&!comptrackCuts->AcceptTrack(esdtrackassoc)){continue;}
3526 
3527  Bool_t isElecToo=kFALSE;
3528 
3529  //Fill TOF and TPC status variables
3530  AliPIDResponse::EDetPidStatus TPCStatusassoc=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTPC, esdtrackassoc);
3531 
3532  AliPIDResponse::EDetPidStatus TRDStatusassoc=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTRD, esdtrackassoc);
3533 
3534  //Check validity of PID, TODO: Add a rejection histogram
3535  if(TPCStatusassoc!=AliPIDResponse::kDetPidOk){
3536  continue;
3537  }
3538 
3539  if(TRDStatusassoc!=AliPIDResponse::kDetPidOk){
3540  continue;
3541  }
3542 
3543 
3544  //Get the # of sigmas around an electron hypothesis for TOF and TPC
3545  Double_t nSigmaTPCassoc;
3546  nSigmaTPCassoc = fPIDResponse->NumberOfSigmasTPC(esdtrackassoc,AliPID::kElectron);
3547 
3548  Double_t elecLikeTRDassoc[1];
3549  if(fPIDResponse->ComputeTRDProbability(esdtrackassoc, AliPID::kElectron, elecLikeTRDassoc, AliTRDPIDResponse::kLQ2D) != AliPIDResponse::kDetPidOk || esdtrackassoc->GetTRDntrackletsPID()<4){
3550  return;
3551  }
3552 
3553  if((nSigmaTPCassoc<2&&nSigmaTPCassoc>-2)||(elecLikeTRDassoc[0]>.8)){
3554  isElecToo=kTRUE;
3555  }
3556 
3557  if(!isElecToo){continue;}
3558 
3559  Double_t elecE1=TMath::Sqrt(esdtrack->P()*esdtrack->P()+ElecMass*ElecMass);
3560  Double_t elecE2=TMath::Sqrt(esdtrackassoc->P()*esdtrackassoc->P()+ElecMass*ElecMass);
3561 
3562  TLorentzVector elec1(esdtrack->Px(), esdtrack->Py(), esdtrack->Pz(), elecE1);
3563  TLorentzVector elec2(esdtrackassoc->Px(), esdtrackassoc->Py(), esdtrackassoc->Pz(), elecE2);
3564 
3565  Double_t InvMass=(elec1+elec2).M();
3566  Double_t OpAng=elec1.Angle(elec2.Vect());
3567 
3568  if(esdtrack->GetSign()==esdtrackassoc->GetSign()){
3569 
3570  if(MBtrg){
3571  fHistInvMassElecLike_MB->Fill(InvMass);
3572  fHistOpAngElecLike_MB->Fill(OpAng);
3573  }
3574 
3575  if(EMC7trg){
3576  fHistInvMassElecLike_EMC7->Fill(InvMass);
3577  fHistOpAngElecLike_EMC7->Fill(OpAng);
3578  }
3579 
3580  if(EMCJettrg){
3581  fHistInvMassElecLike_EMCJet->Fill(InvMass);
3582  fHistOpAngElecLike_EMCJet->Fill(OpAng);
3583  }
3584 
3585  }else{
3586  if(InvMass<0.1&&OpAng<0.1){tagPhot=kTRUE;}
3587  if(MBtrg){
3588  fHistInvMassElecUnLike_MB->Fill(InvMass);
3589  fHistOpAngElecUnLike_MB->Fill(OpAng);
3590  }
3591 
3592  if(EMC7trg){
3593  fHistInvMassElecUnLike_EMC7->Fill(InvMass);
3594  fHistOpAngElecUnLike_EMC7->Fill(OpAng);
3595  }
3596 
3597  if(EMCJettrg){
3598  fHistInvMassElecUnLike_EMCJet->Fill(InvMass);
3599  fHistOpAngElecUnLike_EMCJet->Fill(OpAng);
3600  }
3601  }
3602  }//end loop over tracks
3603 
3604  PostData(1, fOutputMB);
3605  PostData(2, fOutputEMC7);
3606  PostData(3, fOutputEMCJet);
3607  return;
3608 }
3609 
3610 void AliAnalysisTaskPSHFE::FillPhotoElecHistos(AliAODEvent *aod, AliAODTrack *aodtrack, AliPIDResponse *fPIDResponse, Int_t i){
3611 
3612  if(!aodtrack){
3613  AliWarning("aodtrack is null, no point in doing Photonic Electron stuff");
3614  return;
3615  }
3616 
3617  Bool_t isElec=kFALSE;
3618  Double_t ElecMass=.0005109989;
3619  //Fill TOF and TPC status variables
3620  AliPIDResponse::EDetPidStatus TPCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTPC, aodtrack);
3621 
3622  AliPIDResponse::EDetPidStatus TRDStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTRD, aodtrack);
3623 
3624  AliPIDResponse::EDetPidStatus EMCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kEMCAL, aodtrack);
3625 
3626  //Check validity of PID, TODO: Add a rejection histogram
3627  if(TPCStatus!=AliPIDResponse::kDetPidOk){
3628  return;
3629  }
3630 
3631  if(TRDStatus!=AliPIDResponse::kDetPidOk){
3632  return;
3633  }
3634 
3635  if(EMCStatus!=AliPIDResponse::kDetPidOk){
3636  return;
3637  }
3638 
3639 
3640  //Get the # of sigmas around an electron hypothesis for TOF and TPC
3641  Double_t nSigmaTPC;
3642  nSigmaTPC = fPIDResponse->NumberOfSigmasTPC(aodtrack,AliPID::kElectron);
3643 
3644  Double_t elecLikeTRD[1];
3645  if(fPIDResponse->ComputeTRDProbability(aodtrack, AliPID::kElectron, elecLikeTRD, AliTRDPIDResponse::kLQ2D) != AliPIDResponse::kDetPidOk || aodtrack->GetTRDntrackletsPID()<4){
3646  return;
3647  }
3648 
3649  //declare emcal cluster PID variables
3650  Double_t EOP=-1;
3651  Int_t caloId=aodtrack->GetEMCALcluster();
3652 
3653  if(caloId==-99999){
3654  return;
3655  }
3656 
3657  AliAODCaloCluster* tagEMCclus=aod->GetCaloCluster(caloId);
3658 
3659  EOP = tagEMCclus->E()/aodtrack->Pt();
3660 
3661  if((nSigmaTPC<2&&nSigmaTPC>-2)||(EOP<1.4&&EOP>.8)||(elecLikeTRD[0]>.8)){
3662  isElec=kTRUE;
3663  }
3664 
3665  if(!isElec){return;}
3666 
3667  Int_t ntracks=aod->GetNumberOfTracks();
3668 
3669  for(Int_t j = 0; j < ntracks; j++) {
3670 
3671  //Don't double count the tagged tracks
3672  if(i==j){continue;}
3673 
3674  AliAODTrack* aodtrackassoc = (AliAODTrack*)aod->GetTrack(j); // pointer to reconstructed to track
3675 
3676  if(!aodtrackassoc) {
3677  AliError(Form("ERROR: Could not retrieve aodtrack %d",j));
3678  continue;
3679  }
3680 
3681  //Do hybrid track cuts
3682  if(aodtrackassoc->IsHybridGlobalConstrainedGlobal()){continue;}
3683 
3684  Bool_t isElecToo=kFALSE;
3685 
3686  //Fill TOF and TPC status variables
3687  AliPIDResponse::EDetPidStatus TPCStatusassoc=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTPC, aodtrackassoc);
3688 
3689  AliPIDResponse::EDetPidStatus TRDStatusassoc=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTRD, aodtrackassoc);
3690 
3691  //Check validity of PID, TODO: Add a rejection histogram
3692  if(TPCStatusassoc!=AliPIDResponse::kDetPidOk){
3693  continue;
3694  }
3695 
3696  if(TRDStatusassoc!=AliPIDResponse::kDetPidOk){
3697  continue;
3698  }
3699 
3700 
3701  //Get the # of sigmas around an electron hypothesis for TOF and TPC
3702  Double_t nSigmaTPCassoc;
3703  nSigmaTPCassoc = fPIDResponse->NumberOfSigmasTPC(aodtrackassoc,AliPID::kElectron);
3704 
3705  Double_t elecLikeTRDassoc[1];
3706  if(fPIDResponse->ComputeTRDProbability(aodtrackassoc, AliPID::kElectron, elecLikeTRDassoc, AliTRDPIDResponse::kLQ2D) != AliPIDResponse::kDetPidOk || aodtrackassoc->GetTRDntrackletsPID()<4){
3707  return;
3708  }
3709 
3710  if((nSigmaTPCassoc<2&&nSigmaTPCassoc>-2)||(elecLikeTRDassoc[0]>.8)){
3711  isElecToo=kTRUE;
3712  }
3713 
3714  if(!isElecToo){continue;}
3715 
3716  Double_t elecE1=TMath::Sqrt(aodtrack->P()*aodtrack->P()+ElecMass*ElecMass);
3717  Double_t elecE2=TMath::Sqrt(aodtrackassoc->P()*aodtrackassoc->P()+ElecMass*ElecMass);
3718 
3719  TLorentzVector elec1(aodtrack->Px(), aodtrack->Py(), aodtrack->Pz(), elecE1);
3720  TLorentzVector elec2(aodtrackassoc->Px(), aodtrackassoc->Py(), aodtrackassoc->Pz(), elecE2);
3721 
3722  Double_t InvMass=(elec1+elec2).M();
3723  Double_t OpAng=elec1.Angle(elec2.Vect());
3724 
3725  if(aodtrack->GetSign()==aodtrackassoc->GetSign()){
3726 
3727  if(MBtrg){
3728  fHistInvMassElecLike_MB->Fill(InvMass);
3729  fHistOpAngElecLike_MB->Fill(OpAng);
3730  }
3731 
3732  if(EMC7trg){
3733  fHistInvMassElecLike_EMC7->Fill(InvMass);
3734  fHistOpAngElecLike_EMC7->Fill(OpAng);
3735  }
3736 
3737  if(EMCJettrg){
3738  fHistInvMassElecLike_EMCJet->Fill(InvMass);
3739  fHistOpAngElecLike_EMCJet->Fill(OpAng);
3740  }
3741 
3742  }else{
3743  if(InvMass<0.1&&OpAng<0.1){tagPhot=kTRUE;}
3744  if(MBtrg){
3745  fHistInvMassElecUnLike_MB->Fill(InvMass);
3746  fHistOpAngElecUnLike_MB->Fill(OpAng);
3747  }
3748 
3749  if(EMC7trg){
3750  fHistInvMassElecUnLike_EMC7->Fill(InvMass);
3751  fHistOpAngElecUnLike_EMC7->Fill(OpAng);
3752  }
3753 
3754  if(EMCJettrg){
3755  fHistInvMassElecUnLike_EMCJet->Fill(InvMass);
3756  fHistOpAngElecUnLike_EMCJet->Fill(OpAng);
3757  }
3758  }
3759  }//end loop over tracks
3760 
3761  PostData(1, fOutputMB);
3762  PostData(2, fOutputEMC7);
3763  PostData(3, fOutputEMCJet);
3764  return;
3765 }
3766 
3768 {
3769  if(!aod){AliWarning("Invalid AOD Event");}
3770  Int_t nTracks = aod->GetNumberOfTracks();
3771  TObjArray* accTracks = new TObjArray;
3772 
3773  for(Int_t i=0;i<nTracks;i++){
3774  AliAODTrack *aodtrack = (AliAODTrack*)aod->GetTrack(i);
3775 
3776  if(!aodtrack){
3777  continue;
3778  }
3779 
3780  if(aodtrack->IsHybridGlobalConstrainedGlobal()){
3781  continue;
3782  }
3783 
3784  accTracks->Add(new AliAODTrack(*aodtrack));
3785  }
3786 
3787  return accTracks;
3788 }
3789 
3790 void AliAnalysisTaskPSHFE::FillMEDPhiHistos(AliAODTrack *aodtrack)
3791 {
3792  Int_t nEvents = fPool->GetCurrentNEvents();
3793 
3794  for(Int_t Ev=0;Ev<nEvents;Ev++){
3795 
3796  TObjArray *mixedTracks = fPool->GetEvent(Ev);
3797 
3798  Int_t nMixedTracks = mixedTracks->GetEntriesFast();
3799 
3800  for(Int_t j=0;j<nMixedTracks;j++){
3801  AliAODTrack* aodtrackassoc = (AliAODTrack*)mixedTracks->At(j); // pointer to reconstructed to track
3802 
3803  if(!aodtrackassoc) {
3804  AliError(Form("ERROR: Could not retrieve aodtrack %d",j));
3805  continue;
3806  }
3807 
3808  //Do hybrid track cuts
3809  if(aodtrackassoc->IsHybridGlobalConstrainedGlobal()){continue;}
3810 
3811  //Pt distribution
3812  if(MBtrg){
3813  fHistPtAssocMix_MB->Fill(aodtrackassoc->Pt());
3814  }
3815  if(EMC7trg){
3816  fHistPtAssocMix_EMC7->Fill(aodtrackassoc->Pt());
3817  }
3818 
3819  if(EMCJettrg){
3820  fHistPtAssocMix_EMCJet->Fill(aodtrackassoc->Pt());
3821  }
3822 
3823  //Fill Delta Phi variable and correct for periodicity
3824  Double_t DPhi=aodtrackassoc->Phi()-aodtrack->Phi();
3825 
3826  if(DPhi<-TMath::Pi()/2){DPhi=TMath::Abs(2*TMath::Pi()+DPhi);}
3827 
3828  if(DPhi>3*TMath::Pi()/2){DPhi=-TMath::Abs(2*TMath::Pi()-DPhi);}
3829 
3830  Double_t DEta=aodtrackassoc->Eta()-aodtrack->Eta();
3831 
3832  //candidate 1<pt<2
3833  if(aodtrack->Pt()>1&&aodtrack->Pt()<2){
3834 
3835  //300-500MeV
3836  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<.5){
3837  if(MBtrg){
3838  fHistDPhiMix300_500_MB[0]->Fill(DPhi);
3839  }
3840  if(EMC7trg){
3841  fHistDPhiMix300_500_EMC7[0]->Fill(DPhi);
3842  }
3843  if(EMCJettrg){
3844  fHistDPhiMix300_500_EMCJet[0]->Fill(DPhi);
3845  }
3846  }
3847 
3848  //500MeV
3849  if(aodtrackassoc->Pt()>.5&&aodtrackassoc->Pt()<.8){
3850  if(MBtrg){
3851  fHistDPhiMix500_800_MB[0]->Fill(DPhi);
3852  }
3853  if(EMC7trg){
3854  fHistDPhiMix500_800_EMC7[0]->Fill(DPhi);
3855  }
3856  if(EMCJettrg){
3857  fHistDPhiMix500_800_EMCJet[0]->Fill(DPhi);
3858  }
3859  }
3860 
3861  //800MeV
3862  if(aodtrackassoc->Pt()>.8&&aodtrackassoc->Pt()<1){
3863  if(MBtrg){
3864  fHistDPhiMix800_1_MB[0]->Fill(DPhi);
3865  }
3866  if(EMC7trg){
3867  fHistDPhiMix800_1_EMC7[0]->Fill(DPhi);
3868  }
3869  if(EMCJettrg){
3870  fHistDPhiMix800_1_EMCJet[0]->Fill(DPhi);
3871  }
3872  }
3873 
3874  //1GeV
3875  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
3876  if(MBtrg){
3877  fHistDPhiMix1_2_MB[0]->Fill(DPhi);
3878  }
3879  if(EMC7trg){
3880  fHistDPhiMix1_2_EMC7[0]->Fill(DPhi);
3881  }
3882  if(EMCJettrg){
3883  fHistDPhiMix1_2_EMCJet[0]->Fill(DPhi);
3884  }
3885  }
3886 
3887  //2GeV
3888  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<3){
3889  if(MBtrg){
3890  fHistDPhiMix2_3_MB[0]->Fill(DPhi);
3891  }
3892  if(EMC7trg){
3893  fHistDPhiMix2_3_EMC7[0]->Fill(DPhi);
3894  }
3895  if(EMCJettrg){
3896  fHistDPhiMix2_3_EMCJet[0]->Fill(DPhi);
3897  }
3898  }
3899 
3900  //3GeV
3901  if(aodtrackassoc->Pt()>3&&aodtrackassoc->Pt()<4){
3902  if(MBtrg){
3903  fHistDPhiMix3_4_MB[0]->Fill(DPhi);
3904  }
3905  if(EMC7trg){
3906  fHistDPhiMix3_4_EMC7[0]->Fill(DPhi);
3907  }
3908  if(EMCJettrg){
3909  fHistDPhiMix3_4_EMCJet[0]->Fill(DPhi);
3910  }
3911  }
3912 
3913  //5GeV
3914  if(aodtrackassoc->Pt()>4){
3915  if(MBtrg){
3916  fHistDPhiMix4_MB[0]->Fill(DPhi);
3917  }
3918  if(EMC7trg){
3919  fHistDPhiMix4_EMC7[0]->Fill(DPhi);
3920  }
3921  if(EMCJettrg){
3922  fHistDPhiMix4_EMCJet[0]->Fill(DPhi);
3923  }
3924  }
3925  }
3926 
3927  //candidate 2<pt<4
3928  if(aodtrack->Pt()>2&&aodtrack->Pt()<4){
3929 
3930  //300MeV
3931  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<.5){
3932  if(MBtrg){
3933  fHistDPhiMix300_500_MB[1]->Fill(DPhi);
3934  }
3935  if(EMC7trg){
3936  fHistDPhiMix300_500_EMC7[1]->Fill(DPhi);
3937  }
3938  if(EMCJettrg){
3939  fHistDPhiMix300_500_EMCJet[1]->Fill(DPhi);
3940  }
3941  }
3942 
3943  //500MeV
3944  if(aodtrackassoc->Pt()>.5&&aodtrackassoc->Pt()<.8){
3945  if(MBtrg){
3946  fHistDPhiMix500_800_MB[1]->Fill(DPhi);
3947  }
3948  if(EMC7trg){
3949  fHistDPhiMix500_800_EMC7[1]->Fill(DPhi);
3950  }
3951  if(EMCJettrg){
3952  fHistDPhiMix500_800_EMCJet[1]->Fill(DPhi);
3953  }
3954  }
3955 
3956  //800MeV
3957  if(aodtrackassoc->Pt()>.8&&aodtrackassoc->Pt()<1){
3958  if(MBtrg){
3959  fHistDPhiMix800_1_MB[1]->Fill(DPhi);
3960  }
3961  if(EMC7trg){
3962  fHistDPhiMix800_1_EMC7[1]->Fill(DPhi);
3963  }
3964  if(EMCJettrg){
3965  fHistDPhiMix800_1_EMCJet[1]->Fill(DPhi);
3966  }
3967  }
3968 
3969  //1GeV
3970  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
3971  if(MBtrg){
3972  fHistDPhiMix1_2_MB[1]->Fill(DPhi);
3973  }
3974  if(EMC7trg){
3975  fHistDPhiMix1_2_EMC7[1]->Fill(DPhi);
3976  }
3977  if(EMCJettrg){
3978  fHistDPhiMix1_2_EMCJet[1]->Fill(DPhi);
3979  }
3980  }
3981 
3982  //2GeV
3983  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<3){
3984  if(MBtrg){
3985  fHistDPhiMix2_3_MB[1]->Fill(DPhi);
3986  fHistDPhiMix28_MB->Fill(DPhi);
3987  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
3988  }
3989  if(EMC7trg){
3990  fHistDPhiMix2_3_EMC7[1]->Fill(DPhi);
3991  fHistDPhiMix28_EMC7->Fill(DPhi);
3992  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
3993  }
3994  if(EMCJettrg){
3995  fHistDPhiMix2_3_EMCJet[1]->Fill(DPhi);
3996  fHistDPhiMix28_EMCJet->Fill(DPhi);
3997  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
3998  }
3999  }
4000 
4001  //3GeV
4002  if(aodtrackassoc->Pt()>3&&aodtrackassoc->Pt()<4){
4003  if(MBtrg){
4004  fHistDPhiMix3_4_MB[1]->Fill(DPhi);
4005  fHistDPhiMix28_MB->Fill(DPhi);
4006  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
4007  }
4008  if(EMC7trg){
4009  fHistDPhiMix3_4_EMC7[1]->Fill(DPhi);
4010  fHistDPhiMix28_EMC7->Fill(DPhi);
4011  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
4012  }
4013  if(EMCJettrg){
4014  fHistDPhiMix3_4_EMCJet[1]->Fill(DPhi);
4015  fHistDPhiMix28_EMCJet->Fill(DPhi);
4016  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
4017  }
4018  }
4019 
4020  //5GeV
4021  if(aodtrackassoc->Pt()>4){
4022  if(MBtrg){
4023  fHistDPhiMix4_MB[1]->Fill(DPhi);
4024  fHistDPhiMix28_MB->Fill(DPhi);
4025  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
4026  }
4027  if(EMC7trg){
4028  fHistDPhiMix4_EMC7[1]->Fill(DPhi);
4029  fHistDPhiMix28_EMC7->Fill(DPhi);
4030  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
4031  }
4032  if(EMCJettrg){
4033  fHistDPhiMix4_EMCJet[1]->Fill(DPhi);
4034  fHistDPhiMix28_EMCJet->Fill(DPhi);
4035  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
4036  }
4037  }
4038  }
4039 
4040  //candidate 4<pt<8
4041  if(aodtrack->Pt()>4&&aodtrack->Pt()<8){
4042 
4043  //300MeV
4044  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<.5){
4045  if(MBtrg){
4046  fHistDPhiMix300_500_MB[2]->Fill(DPhi);
4047  }
4048  if(EMC7trg){
4049  fHistDPhiMix300_500_EMC7[2]->Fill(DPhi);
4050  }
4051  if(EMCJettrg){
4052  fHistDPhiMix300_500_EMCJet[2]->Fill(DPhi);
4053  }
4054  }
4055 
4056  //500MeV
4057  if(aodtrackassoc->Pt()>.5&&aodtrackassoc->Pt()<.8){
4058  if(MBtrg){
4059  fHistDPhiMix500_800_MB[2]->Fill(DPhi);
4060  }
4061  if(EMC7trg){
4062  fHistDPhiMix500_800_EMC7[2]->Fill(DPhi);
4063  }
4064  if(EMCJettrg){
4065  fHistDPhiMix500_800_EMCJet[2]->Fill(DPhi);
4066  }
4067  }
4068 
4069  //800MeV
4070  if(aodtrackassoc->Pt()>.8&&aodtrackassoc->Pt()<1){
4071  if(MBtrg){
4072  fHistDPhiMix800_1_MB[2]->Fill(DPhi);
4073  }
4074  if(EMC7trg){
4075  fHistDPhiMix800_1_EMC7[2]->Fill(DPhi);
4076  }
4077  if(EMCJettrg){
4078  fHistDPhiMix800_1_EMCJet[2]->Fill(DPhi);
4079  }
4080  }
4081 
4082  //1GeV
4083  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
4084  if(MBtrg){
4085  fHistDPhiMix1_2_MB[2]->Fill(DPhi);
4086  }
4087  if(EMC7trg){
4088  fHistDPhiMix1_2_EMC7[2]->Fill(DPhi);
4089  }
4090  if(EMCJettrg){
4091  fHistDPhiMix1_2_EMCJet[2]->Fill(DPhi);
4092  }
4093  }
4094 
4095  //2GeV
4096  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<3){
4097  if(MBtrg){
4098  fHistDPhiMix2_3_MB[2]->Fill(DPhi);
4099  fHistDPhiMix28_MB->Fill(DPhi);
4100  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
4101  }
4102  if(EMC7trg){
4103  fHistDPhiMix2_3_EMC7[2]->Fill(DPhi);
4104  fHistDPhiMix28_EMC7->Fill(DPhi);
4105  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
4106  }
4107  if(EMCJettrg){
4108  fHistDPhiMix2_3_EMCJet[2]->Fill(DPhi);
4109  fHistDPhiMix28_EMCJet->Fill(DPhi);
4110  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
4111  }
4112  }
4113 
4114  //3GeV
4115  if(aodtrackassoc->Pt()>3&&aodtrackassoc->Pt()<4){
4116  if(MBtrg){
4117  fHistDPhiMix3_4_MB[2]->Fill(DPhi);
4118  fHistDPhiMix28_MB->Fill(DPhi);
4119  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
4120  }
4121  if(EMC7trg){
4122  fHistDPhiMix3_4_EMC7[2]->Fill(DPhi);
4123  fHistDPhiMix28_EMC7->Fill(DPhi);
4124  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
4125  }
4126  if(EMCJettrg){
4127  fHistDPhiMix3_4_EMCJet[2]->Fill(DPhi);
4128  fHistDPhiMix28_EMCJet->Fill(DPhi);
4129  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
4130  }
4131  }
4132 
4133  //5GeV
4134  if(aodtrackassoc->Pt()>4){
4135  if(MBtrg){
4136  fHistDPhiMix4_MB[2]->Fill(DPhi);
4137  fHistDPhiMix28_MB->Fill(DPhi);
4138  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
4139  }
4140  if(EMC7trg){
4141  fHistDPhiMix4_EMC7[2]->Fill(DPhi);
4142  fHistDPhiMix28_EMC7->Fill(DPhi);
4143  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
4144  }
4145  if(EMCJettrg){
4146  fHistDPhiMix4_EMCJet[2]->Fill(DPhi);
4147  fHistDPhiMix28_EMCJet->Fill(DPhi);
4148  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
4149  }
4150  }
4151  }
4152  }
4153  }
4154  PostData(1, fOutputMB);
4155  PostData(2, fOutputEMC7);
4156  PostData(3, fOutputEMCJet);
4157  return;
4158 }
4159 
4160 //________________________________________________________________________
4162 {
4163 
4164 }
double Double_t
Definition: External.C:58
Definition: External.C:236
virtual void Terminate(Option_t *)
AliESDtrackCuts * globaltrackCuts
void SetTrackCuts(AliESDtrackCuts *gtrkCuts, AliESDtrackCuts *ctrkCuts)
void FillPIDHistos(AliESDEvent *esd, AliESDtrack *esdtrack, AliPIDResponse *fPIDResponse)
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
void FillPhotoElecHistos(AliESDEvent *esd, AliESDtrack *esdtrack, AliPIDResponse *fPIDResponse, Int_t i)
float Float_t
Definition: External.C:68
TObjArray * MakeTrkArr(AliAODEvent *aod)
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)
ClassImp(AliAnalysisTaskPSHFE) AliAnalysisTaskPSHFE
Float_t nEvents[nProd]
void FillDPhiHistos(AliESDEvent *esd, AliESDtrack *esdtrack, Int_t i)
virtual void UserExec(Option_t *option)
virtual void UserCreateOutputObjects()
const char Option_t
Definition: External.C:48
void FillMEDPhiHistos(AliAODTrack *aodtrack)
AliESDtrackCuts * comptrackCuts
bool Bool_t
Definition: External.C:53
void SetSSCutBool(Bool_t SSCutBool)
TList * OpenFile(const char *fname)
Definition: DrawAnaELoss.C:65
AliESDtrackCuts * fTrackCutsStrong