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