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