AliPhysics  251aa1e (251aa1e)
 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  Bool_t delTrk = kTRUE;
1849 
1850  //__________________________End major event stuff_____________________________
1851 
1852 
1853  //Fill the histogram cataloguing # of events vs. events tagged
1854  if(MBtrg){
1855  fHistNevents_MB->Fill("Events",1);
1856  }
1857  switch(trigVal){
1858  case(EMC7):
1859  fHistNevents_EMC7->Fill("Events",1);
1860  break;
1861 
1862  case(EMCEGA):
1863  fHistNevents_EMCEGA->Fill("Events",1);
1864  break;
1865 
1866  case(EMCJE):
1867  fHistNevents_EMCJet->Fill("Events",1);
1868  break;
1869  }
1870 
1871  //Initialize energy variable and tagging flags
1872  Double_t PtSum=0;
1873  Double_t PtSumEMC=0;
1874  tagStrong=kFALSE;
1875  Bool_t tagEvt=kFALSE;
1876 
1877  //Initialize the # of tracks variable and the Eta Phi arrays
1878  Int_t ntracks=0;
1879  ntracks = aod->GetNumberOfTracks();
1880 
1881  std::vector<Double_t> Eta;
1882  std::vector<Double_t> Phi;
1883 
1884  fPool = fPoolMan->GetEventPool(ntracks, aod->GetPrimaryVertex()->GetZ());
1885 
1886  // Track loop for reconstructed event
1887  for(Int_t i = 0; i < ntracks; i++) {
1888 
1889  tagStrong=kFALSE;
1890  tagPhot=kFALSE;
1891  AliAODTrack* aodtrack = (AliAODTrack*)aod->GetTrack(i); // pointer to reconstructed to track
1892 
1893  if(!aodtrack) {
1894  AliError(Form("ERROR: Could not retrieve track %d",i));
1895  continue;
1896  }
1897 
1898  //Fill TPCOnly track eta-phi
1899 
1900  if(aodtrack->IsTPCOnly()){
1901  fHistEtaPhiTPCOnly_MB->Fill(aodtrack->Eta(),aodtrack->Phi());
1902  }
1903 
1904  //Do hybrid track cuts
1905  if(!aodtrack->IsHybridGlobalConstrainedGlobal()){continue;}
1906 
1907  //Add this tracks energy to the running total
1908  PtSum=PtSum+aodtrack->Pt();
1909  if(aodtrack->Eta()<.7&&aodtrack->Eta()>-.7&&aodtrack->Phi()>80&&aodtrack->Phi()<180){
1910  PtSumEMC=PtSumEMC+aodtrack->Pt();
1911  }
1912 
1913  //Fill the Eta Phi arrays with this tracks Eta and Phi
1914  Eta.push_back(aodtrack->Eta());
1915  Phi.push_back(aodtrack->Phi());
1916 
1917  if(MBtrg){
1918  fHistEtaPhi_MB->Fill(aodtrack->Eta(),aodtrack->Phi());
1919  }
1920  switch(trigVal){
1921  case(EMC7):
1922  fHistEtaPhi_EMC7->Fill(aodtrack->Eta(),aodtrack->Phi());
1923  break;
1924  case(EMCEGA):
1925  fHistEtaPhi_EMCEGA->Fill(aodtrack->Eta(),aodtrack->Phi());
1926  break;
1927  case(EMCJE):
1928  fHistEtaPhi_EMCJet->Fill(aodtrack->Eta(),aodtrack->Phi());
1929  break;
1930  }
1931  //do Cut level histograms
1932  if(MBtrg){
1933  if(aodtrack->GetTPCncls()>0){
1934  fHistTPCNClus_MB->Fill(aodtrack->GetTPCncls());
1935  }
1936  fHistITSNClus_MB->Fill(aodtrack->GetNcls(0));
1937  }
1938  switch(trigVal){
1939  case(EMC7):
1940  if(aodtrack->GetTPCncls()>0){
1941  fHistTPCNClus_EMC7->Fill(aodtrack->GetTPCncls());
1942  }
1943  fHistITSNClus_EMC7->Fill(aodtrack->GetNcls(0));
1944  break;
1945 
1946  case(EMCEGA):
1947  if(aodtrack->GetTPCncls()>0){
1948  fHistTPCNClus_EMCEGA->Fill(aodtrack->GetTPCncls());
1949  }
1950  fHistITSNClus_EMCEGA->Fill(aodtrack->GetNcls(0));
1951  break;
1952 
1953  case(EMCJE):
1954  if(aodtrack->GetTPCncls()>0){
1955  fHistTPCNClus_EMCJet->Fill(aodtrack->GetTPCncls());
1956  }
1957  fHistITSNClus_EMCJet->Fill(aodtrack->GetNcls(0));
1958  break;
1959  }
1960 
1961  //Impact parameter
1962  Float_t xy;
1963  Float_t z;
1964 
1965  xy=TMath::Sqrt(aodtrack->XAtDCA()*aodtrack->XAtDCA()+aodtrack->YAtDCA()*aodtrack->YAtDCA());
1966 
1967  if(MBtrg){
1968  fHistImpPar_MB->Fill(xy);
1969  }
1970  switch(trigVal){
1971  case(EMC7):
1972  fHistImpPar_EMC7->Fill(xy);
1973  break;
1974 
1975  case(EMCEGA):
1976  fHistImpPar_EMCEGA->Fill(xy);
1977  break;
1978 
1979  case(EMCJE):
1980  fHistImpPar_EMCJet->Fill(xy);
1981  break;
1982  }
1983 
1984  FillPhotoElecHistos(aod, aodtrack, fPIDResponse, i);
1985 
1986  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1987  //If the track doesn't pass the cuts, move on to the next one
1988  //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1989  if(trackCutsStrong){
1990  if(!fTrackCutsStrong->AcceptVTrack((AliVTrack*)aodtrack) || aodtrack->GetTPCsignalN()<80){continue;}
1991  }else{
1992  if(!fTrackCutsWeak->AcceptVTrack((AliVTrack*)aodtrack) || aodtrack->GetTPCsignalN()<80){continue;}
1993  }
1994 
1995  FillPIDHistos(aod, aodtrack, fPIDResponse);//Fill PID histos and set "tagStrong" boolean if this track satisfies cuts
1996 
1997  //If the track made it through any 3 detector cuts
1998  if(tagStrong){
1999  tagEvt=kTRUE;//This event contains a candidate electron
2000  //Increment the candidate count and put track ID of candidate into array
2001 
2002  elecIDs[elecCnt]=i;
2003  elecCnt+=1;
2004 
2005  //Fill impact parameter plots
2006  if(MBtrg){
2007  fHistImpParTag_MB->Fill(xy);
2008  }
2009  switch(trigVal){
2010  case(EMC7):
2011  fHistImpParTag_EMC7->Fill(xy);
2012  break;
2013 
2014  case(EMCEGA):
2015  fHistImpParTag_EMCEGA->Fill(xy);
2016  break;
2017 
2018  case(EMCJE):
2019  fHistImpParTag_EMCJet->Fill(xy);
2020  break;
2021  }
2022 
2023  //Pt distribution
2024 
2025  if(MBtrg){
2026  fHistPtTag_MB->Fill(aodtrack->Pt());
2027  }
2028  switch(trigVal){
2029  case(EMC7):
2030  fHistPtTag_EMC7->Fill(aodtrack->Pt());
2031  break;
2032 
2033  case(EMCEGA):
2034  fHistPtTag_EMCEGA->Fill(aodtrack->Pt());
2035  break;
2036 
2037  case(EMCJE):
2038  fHistPtTag_EMCJet->Fill(aodtrack->Pt());
2039  break;
2040  }
2041  FillDPhiHistos(aod, aodtrack, i);//Fill DPhi histos
2042 
2043  if(tagPhot){
2044  if(MBtrg){
2045  fHistPhotoMismatch_MB->Fill(0);
2046  }
2047  switch(trigVal){
2048  case(EMC7):
2049  fHistPhotoMismatch_EMC7->Fill(0);
2050  break;
2051  case(EMCEGA):
2052  fHistPhotoMismatch_EMCEGA->Fill(0);
2053  break;
2054  case(EMCJE):
2055  fHistPhotoMismatch_EMCJet->Fill(0);
2056  break;
2057  }
2058  }
2059 
2060 
2061 
2062 
2063  if(!fPool){cout<<"No Pool for this event man\n"; continue;}
2064 
2065  fPool->PrintInfo();
2066  if(fPool->IsReady() ){
2067  FillMEDPhiHistos(aodtrack);
2068  }
2069  else{
2070  cout<<"Pool wasn't ready\n";
2071  }
2072  }//end if(tagStrong)
2073 
2074  }//end main track loop
2075  if(!fPool){
2076  cout<<"No pool exists, can't update it"<<'\n';
2077  }
2078  else{
2079  if(UseNonSignalEvents){
2080  if(trkArr){
2081  delTrk=kFALSE;
2082  fPool->UpdatePool(trkArr);
2083  }
2084  }else{
2085  if(tagEvt){
2086  if(trkArr){
2087  delTrk=kFALSE;
2088  fPool->UpdatePool(trkArr);
2089  }
2090  }
2091  }
2092  }
2093 
2094  //Call function to fill Region histos and pass it int array of IDs for identified electron tracks
2095  Int_t elecIDsSparse[elecCnt];
2096  for(Int_t i=0;i<elecCnt;i++){
2097  elecIDsSparse[i]=elecIDs[i];
2098  }
2099 
2100  //Fill Number of electrons plot
2101  fHistNElecPerEvent->Fill(elecCnt);
2102 
2103  //Fill the total pt sum histogram
2104  if(tagEvt){
2105  if(MBtrg){
2106  fHistPtSumTag_MB->Fill(PtSum);
2107  }
2108  switch(trigVal){
2109  case(EMC7):
2110  fHistPtSumTag_EMC7->Fill(PtSum);
2111  break;
2112  case(EMCEGA):
2113  fHistPtSumTag_EMCEGA->Fill(PtSum);
2114  break;
2115  case(EMCJE):
2116  fHistPtSumTag_EMCJet->Fill(PtSum);
2117  break;
2118  }
2119  }else{
2120  if(MBtrg){
2121  fHistPtSum_MB->Fill(PtSum);
2122  }
2123  switch(trigVal){
2124  case(EMC7):
2125  fHistPtSum_EMC7->Fill(PtSum);
2126  break;
2127  case(EMCEGA):
2128  fHistPtSum_EMCEGA->Fill(PtSum);
2129  break;
2130  case(EMCJE):
2131  fHistPtSum_EMCJet->Fill(PtSum);
2132  break;
2133  }
2134  }
2135 
2136  if(MBtrg){
2137  fHistPtSumEMC_MB->Fill(PtSumEMC);
2138  }
2139  switch(trigVal){
2140  case(EMC7):
2141  fHistPtSumEMC_EMC7->Fill(PtSumEMC);
2142  break;
2143  case(EMCEGA):
2144  fHistPtSumEMC_EMCEGA->Fill(PtSumEMC);
2145  break;
2146  case(EMCJE):
2147  fHistPtSumEMC_EMCJet->Fill(PtSumEMC);
2148  break;
2149  }
2150 
2151  //Fill Nevent histos
2152  if(tagEvt){
2153  if(MBtrg){
2154  fHistNevents_MB->Fill("Events containing candidates",1);
2155  }
2156  switch(trigVal){
2157  case(EMC7):
2158  fHistNevents_EMC7->Fill("Events containing candidates",1);
2159  break;
2160  case(EMCEGA):
2161  fHistNevents_EMCEGA->Fill("Events containing candidates",1);
2162  break;
2163  case(EMCJE):
2164  fHistNevents_EMCJet->Fill("Events containing candidates",1);
2165  break;
2166  }
2167  }
2168 
2169  //Fill the Eta Phi histograms
2170  if(tagEvt){
2171  for(Int_t i=0;i<Eta.size();i++){
2172  if(MBtrg){
2173  fHistEtaPhiTag_MB->Fill(Eta[i],Phi[i]);
2174  }
2175  switch(trigVal){
2176  case(EMC7):
2177  fHistEtaPhiTag_EMC7->Fill(Eta[i],Phi[i]);
2178  break;
2179  case(EMCEGA):
2180  fHistEtaPhiTag_EMCEGA->Fill(Eta[i],Phi[i]);
2181  break;
2182  case(EMCJE):
2183  fHistEtaPhiTag_EMCJet->Fill(Eta[i],Phi[i]);
2184  break;
2185  }
2186  }
2187  }
2188 
2189  if(trkArr&&delTrk){
2190  delete trkArr;
2191  }
2192 
2193 
2194 
2195  // NEW HISTO should be filled before this point, as PostData puts the
2196  // information for this iteration of the UserExec in the container
2197  PostData(1, fOutputMB);
2198  PostData(2, fOutputEMC7);
2199  PostData(3, fOutputEMCEGA);
2200  PostData(4, fOutputEMCJet);
2201 }
2202 
2203 void AliAnalysisTaskPSHFE::FillPIDHistos(AliAODEvent *aod, AliAODTrack *aodtrack, AliPIDResponse *fPIDResponse){
2204 
2205  if(!aodtrack){
2206  AliWarning("aodtrack is null, no point in doing PID");
2207  return;
2208  }
2209 
2210 
2211  Bool_t isPIDRej = kFALSE;
2212 
2213  //Fill TOF and TPC status variables
2214  AliPIDResponse::EDetPidStatus TOFStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTOF, aodtrack);
2215 
2216  AliPIDResponse::EDetPidStatus TPCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTPC, aodtrack);
2217 
2218  AliPIDResponse::EDetPidStatus TRDStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTRD, aodtrack);
2219 
2220  AliPIDResponse::EDetPidStatus EMCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kEMCAL, aodtrack);
2221 
2222  //Check validity of PID, TODO: Add a rejection histogram
2223  if(TOFStatus!=AliPIDResponse::kDetPidOk){
2224  fHistPIDRejection->Fill(2);
2225  //isPIDRej=kTRUE;
2226  }
2227 
2228  if(TPCStatus!=AliPIDResponse::kDetPidOk){
2229  fHistPIDRejection->Fill(1);
2230  isPIDRej=kTRUE;
2231  }
2232 
2233  if(TRDStatus!=AliPIDResponse::kDetPidOk){
2234  fHistPIDRejection->Fill(3);
2235  isPIDRej=kTRUE;
2236  }
2237 
2238  if(EMCStatus!=AliPIDResponse::kDetPidOk){
2239  fHistPIDRejection->Fill(4);
2240  isPIDRej=kTRUE;
2241  }
2242 
2243 
2244  //Get the # of sigmas around an electron hypothesis for TOF and TPC
2245  Double_t nSigmaTOF;
2246  nSigmaTOF = fPIDResponse->NumberOfSigmasTOF(aodtrack,AliPID::kElectron);
2247 
2248  Double_t nSigmaTPC;
2249  nSigmaTPC = fPIDResponse->NumberOfSigmasTPC(aodtrack,AliPID::kElectron);
2250 
2251  Double_t elecLikeTRD[1];
2252  if(fPIDResponse->ComputeTRDProbability(aodtrack, AliPID::kElectron, elecLikeTRD, AliTRDPIDResponse::kLQ2D) != AliPIDResponse::kDetPidOk || aodtrack->GetTRDntrackletsPID()<4){
2253  fHistPIDRejection->Fill(3);
2254  isPIDRej=kTRUE;
2255  }
2256 
2257  if(isPIDRej){return;}
2258 
2259  //declare emcal cluster PID variables
2260  Double_t EOP=-1;
2261  Int_t caloId=aodtrack->GetEMCALcluster();
2262 
2263  if(caloId==-99999){
2264  return;
2265  }
2266 
2267  AliAODCaloCluster* tagEMCclus=aod->GetCaloCluster(caloId);
2268 
2269  if(tagEMCclus->E()>.5){
2270  EOP = tagEMCclus->E()/aodtrack->Pt();
2271  }
2272  else{
2273  return;
2274  }
2275 
2276 
2277 
2278  //=========================================================================================================================
2279  //PID cuts and histogram filling
2280  //=========================================================================================================================
2281 
2282  //Some Double arrays for pt ranges
2283  Double_t ptUpper[6] = {2, 3, 4, 5, 6, 1000000};
2284  Double_t ptLower[6] = {1, 2, 3, 4, 5, 6};
2285  Double_t TPCcut = 2;
2286  Double_t TOFcut = 2;
2287  Double_t TRDcut = .9;
2288  Double_t EMCcutLower[6] = {.85,.85,.85,.85,.85,.85};
2289  Double_t EMCcutHigher[6] = {1.3,1.3,1.3,1.3,1.3,1.3};
2290 
2291  for(Int_t i=0; i<6; i++){
2292  if(aodtrack->Pt()>ptLower[i]&&aodtrack->Pt()<ptUpper[i]){
2293 
2294  //TPC Plots
2295  //EMC+TRD cuts
2296  if(EOP<EMCcutHigher[i]&&EOP>EMCcutLower[i]&&elecLikeTRD[0]>TRDcut){
2297 
2298  if(MBtrg){
2299  fHistTPC_EMCTRD_MB[i]->Fill(aodtrack->Pt(), nSigmaTPC);
2300  }
2301  switch(trigVal){
2302  case(EMC7):
2303  fHistTPC_EMCTRD_EMC7[i]->Fill(aodtrack->Pt(), nSigmaTPC);
2304  break;
2305 
2306  case(EMCEGA):
2307  fHistTPC_EMCTRD_EMCEGA[i]->Fill(aodtrack->Pt(), nSigmaTPC);
2308  break;
2309 
2310  case(EMCJE):
2311  fHistTPC_EMCTRD_EMCJet[i]->Fill(aodtrack->Pt(), nSigmaTPC);
2312  break;
2313  }
2314  }
2315 
2316  //EMC Plots
2317 
2318  //TPC+TRD cuts
2319  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut){
2320 
2321  if(!applySSCuts){
2322  if(MBtrg){
2323  fHistEMC_TPCTRD_MB[i]->Fill(EOP);
2324  }
2325  switch(trigVal){
2326  case(EMC7):
2327  fHistEMC_TPCTRD_EMC7[i]->Fill(EOP);
2328  break;
2329 
2330  case(EMCEGA):
2331  fHistEMC_TPCTRD_EMCEGA[i]->Fill(EOP);
2332  break;
2333 
2334  case(EMCJE):
2335  fHistEMC_TPCTRD_EMCJet[i]->Fill(EOP);
2336  break;
2337  }
2338  }else{
2339  if(MBtrg){
2340  fHistEMC_TPCTRD_MB[i]->Fill(EOP);
2341  }
2342  switch(trigVal){
2343  case(EMC7):
2344  fHistEMC_TPCTRD_EMC7[i]->Fill(EOP);
2345  break;
2346 
2347  case(EMCEGA):
2348  fHistEMC_TPCTRD_EMCEGA[i]->Fill(EOP);
2349  break;
2350 
2351  case(EMCJE):
2352  fHistEMC_TPCTRD_EMCJet[i]->Fill(EOP);
2353  break;
2354  }
2355  }
2356  }
2357 
2358  //TRD Plots
2359 
2360  //TPC+EMC cuts
2361  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&EOP<EMCcutHigher[i]&&EOP>EMCcutLower[i]){
2362 
2363  if(MBtrg){
2364  fHistTRD_TPCEMC_MB[i]->Fill(aodtrack->Pt(), elecLikeTRD[0]);
2365  }
2366  switch(trigVal){
2367  case(EMC7):
2368  fHistTRD_TPCEMC_EMC7[i]->Fill(aodtrack->Pt(), elecLikeTRD[0]);
2369  break;
2370 
2371  case(EMCEGA):
2372  fHistTRD_TPCEMC_EMCEGA[i]->Fill(aodtrack->Pt(), elecLikeTRD[0]);
2373  break;
2374 
2375  case(EMCJE):
2376  fHistTRD_TPCEMC_EMCJet[i]->Fill(aodtrack->Pt(), elecLikeTRD[0]);
2377  break;
2378  }
2379  }
2380  }
2381  }
2382  if(MBtrg){
2383  if(aodtrack->Pt()<2&&aodtrack->Pt()>1){
2384  if(nSigmaTPC<-2&&nSigmaTPC>-8){
2385  fHistEMC_Had_MB_1Gev->Fill(EOP);
2386  }
2387  }
2388  }
2389 
2390  if(applySSCuts){
2391 
2392  //An electron candidate is one that passes TPC +-2Sig, TRD>.9, 0.85<E/p<1.15, M02=(0,.5), M20=(0,.3)
2393 
2394  if(aodtrack->Pt()<6){
2395  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[0]&&EOP>EMCcutLower[0]){
2396 
2397  tagStrong=kTRUE;
2398 
2399  }
2400 
2401  }
2402 
2403  else{
2404 
2405  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[5]&&EOP>EMCcutLower[5]){
2406 
2407  tagStrong=kTRUE;
2408 
2409  }
2410 
2411  }
2412 
2413  }else{//no sscuts
2414 
2415  //An electron candidate is one that passes TPC +-2Sig, TRD>.9, 0.85<E/p<1.15
2416 
2417  if(aodtrack->Pt()<6){
2418  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[0]&&EOP>EMCcutLower[0]){
2419 
2420  tagStrong=kTRUE;
2421 
2422  }
2423 
2424  }
2425 
2426  else{
2427 
2428  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher[5]&&EOP>EMCcutLower[5]){
2429 
2430  tagStrong=kTRUE;
2431 
2432  }
2433 
2434  }
2435 
2436  }
2437 
2438  /*//Check if any tracks pass all cuts
2439  if(nSigmaTPC<TPCcut&&nSigmaTPC>-TPCcut&&nSigmaTOF<TOFcut&&nSigmaTOF>-TOFcut&&elecLikeTRD[0]>TRDcut&&EOP<EMCcutHigher&&EOP>EMCcutLower){
2440  tagAll=kTRUE;
2441  }*/
2442 
2443  //=========================================================================
2444  // End of PID stuff
2445  //=========================================================================
2446  PostData(1, fOutputMB);
2447  PostData(2, fOutputEMC7);
2448  PostData(3, fOutputEMCEGA);
2449  PostData(4, fOutputEMCJet);
2450  return;
2451 }
2452 
2453 void AliAnalysisTaskPSHFE::FillDPhiHistos(AliAODEvent *aod, AliAODTrack *aodtrack, Int_t i){
2454  //Run through all tracks in this
2455  Int_t ntracks = aod->GetNumberOfTracks();
2456  for(Int_t j = 0; j < ntracks; j++) {
2457 
2458  //Don't double count the tagged tracks
2459  if(i==j){continue;}
2460 
2461 
2462  AliAODTrack* aodtrackassoc = (AliAODTrack*)aod->GetTrack(j); // pointer to reconstructed to track
2463 
2464  if(!aodtrackassoc) {
2465  AliError(Form("ERROR: Could not retrieve aodtrack %d",j));
2466  continue;
2467  }
2468 
2469  //Do hybrid track cuts
2470  if(aodtrackassoc->IsHybridGlobalConstrainedGlobal()){continue;}
2471 
2472  //Pt distribution
2473  if(MBtrg){
2474  fHistPtAssoc_MB->Fill(aodtrackassoc->Pt());
2475  }
2476  switch(trigVal){
2477  case(EMC7):
2478  fHistPtAssoc_EMC7->Fill(aodtrackassoc->Pt());
2479  break;
2480 
2481  case(EMCEGA):
2482  fHistPtAssoc_EMCEGA->Fill(aodtrackassoc->Pt());
2483  break;
2484 
2485  case(EMCJE):
2486  fHistPtAssoc_EMCJet->Fill(aodtrackassoc->Pt());
2487  break;
2488  }
2489 
2490  //Fill Delta Phi variable and correct for periodicity
2491  Double_t DPhi=aodtrackassoc->Phi()-aodtrack->Phi();
2492 
2493  if(DPhi<-TMath::Pi()/2){DPhi=TMath::Abs(2*TMath::Pi()+DPhi);}
2494 
2495  if(DPhi>3*TMath::Pi()/2){DPhi=-TMath::Abs(2*TMath::Pi()-DPhi);}
2496 
2497  Double_t DEta=aodtrackassoc->Eta()-aodtrack->Eta();
2498 
2499  Int_t PID=0;
2500  cout<<"most probPID"<<AliAODTrack::kElectron<<":"<<aodtrackassoc->GetMostProbablePID()<<'\n';
2501  switch(aodtrackassoc->GetMostProbablePID()){
2502  case AliAODTrack::kElectron:
2503  PID=1;
2504  break;
2505  case AliAODTrack::kMuon:
2506  PID=2;
2507  break;
2508  case AliAODTrack::kPion:
2509  PID=3;
2510  break;
2511  case AliAODTrack::kKaon:
2512  PID=4;
2513  break;
2514  case AliAODTrack::kProton:
2515  PID=5;
2516  break;
2517  case AliAODTrack::kDeuteron:
2518  PID=6;
2519  break;
2520  case AliAODTrack::kUnknown:
2521  PID=0;
2522  break;
2523  }
2524 
2525  if(MBtrg){
2526  fHistDPhi18Spe_MB->Fill(DPhi, PID);
2527  }
2528  switch(trigVal){
2529  case(EMC7):
2530  fHistDPhi18Spe_EMC7->Fill(DPhi, PID);
2531  break;
2532  case(EMCEGA):
2533  fHistDPhi18Spe_EMCEGA->Fill(DPhi, PID);
2534  break;
2535  case(EMCJE):
2536  fHistDPhi18Spe_EMCJet->Fill(DPhi, PID);
2537  break;
2538  }
2539 
2540  if(PID==1||PID==2||PID==0){continue;}
2541 
2542  //candidate 1<pt<2
2543  if(aodtrack->Pt()>1&&aodtrack->Pt()<2){
2544 
2545  //300-500MeV
2546  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<.5){
2547  if(MBtrg){
2548  fHistDPhi300_500_MB[0]->Fill(DPhi);
2549  }
2550  switch(trigVal){
2551  case(EMC7):
2552  fHistDPhi300_500_EMC7[0]->Fill(DPhi);
2553  break;
2554  case(EMCEGA):
2555  fHistDPhi300_500_EMCEGA[0]->Fill(DPhi);
2556  break;
2557  case(EMCJE):
2558  fHistDPhi300_500_EMCJet[0]->Fill(DPhi);
2559  break;
2560  }
2561  }
2562 
2563  //500MeV
2564  if(aodtrackassoc->Pt()>.5&&aodtrackassoc->Pt()<.8){
2565  if(MBtrg){
2566  fHistDPhi500_800_MB[0]->Fill(DPhi);
2567  }
2568  switch(trigVal){
2569  case(EMC7):
2570  fHistDPhi500_800_EMC7[0]->Fill(DPhi);
2571  break;
2572  case(EMCEGA):
2573  fHistDPhi500_800_EMCEGA[0]->Fill(DPhi);
2574  break;
2575  case(EMCJE):
2576  fHistDPhi500_800_EMCJet[0]->Fill(DPhi);
2577  break;
2578  }
2579  }
2580 
2581  //800MeV
2582  if(aodtrackassoc->Pt()>.8&&aodtrackassoc->Pt()<1){
2583  if(MBtrg){
2584  fHistDPhi800_1_MB[0]->Fill(DPhi);
2585  }
2586  switch(trigVal){
2587  case(EMC7):
2588  fHistDPhi800_1_EMC7[0]->Fill(DPhi);
2589  break;
2590  case(EMCEGA):
2591  fHistDPhi800_1_EMCEGA[0]->Fill(DPhi);
2592  break;
2593  case(EMCJE):
2594  fHistDPhi800_1_EMCJet[0]->Fill(DPhi);
2595  break;
2596  }
2597  }
2598 
2599  //1GeV
2600  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
2601  if(MBtrg){
2602  fHistDPhi1_2_MB[0]->Fill(DPhi);
2603  }
2604  switch(trigVal){
2605  case(EMC7):
2606  fHistDPhi1_2_EMC7[0]->Fill(DPhi);
2607  break;
2608  case(EMCEGA):
2609  fHistDPhi1_2_EMCEGA[0]->Fill(DPhi);
2610  break;
2611  case(EMCJE):
2612  fHistDPhi1_2_EMCJet[0]->Fill(DPhi);
2613  break;
2614  }
2615  }
2616 
2617  //2GeV
2618  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<3){
2619  if(MBtrg){
2620  fHistDPhi2_3_MB[0]->Fill(DPhi);
2621  }
2622  switch(trigVal){
2623  case(EMC7):
2624  fHistDPhi2_3_EMC7[0]->Fill(DPhi);
2625  break;
2626  case(EMCEGA):
2627  fHistDPhi2_3_EMCEGA[0]->Fill(DPhi);
2628  break;
2629  case(EMCJE):
2630  fHistDPhi2_3_EMCJet[0]->Fill(DPhi);
2631  break;
2632  }
2633  }
2634 
2635  //3GeV
2636  if(aodtrackassoc->Pt()>3&&aodtrackassoc->Pt()<4){
2637  if(MBtrg){
2638  fHistDPhi3_4_MB[0]->Fill(DPhi);
2639  }
2640  switch(trigVal){
2641  case(EMC7):
2642  fHistDPhi3_4_EMC7[0]->Fill(DPhi);
2643  break;
2644  case(EMCEGA):
2645  fHistDPhi3_4_EMCEGA[0]->Fill(DPhi);
2646  break;
2647  case(EMCJE):
2648  fHistDPhi3_4_EMCJet[0]->Fill(DPhi);
2649  break;
2650  }
2651  }
2652 
2653  //5GeV
2654  if(aodtrackassoc->Pt()>4){
2655  if(MBtrg){
2656  fHistDPhi4_MB[0]->Fill(DPhi);
2657  }
2658  switch(trigVal){
2659  case(EMC7):
2660  fHistDPhi4_EMC7[0]->Fill(DPhi);
2661  break;
2662  case(EMCEGA):
2663  fHistDPhi4_EMCEGA[0]->Fill(DPhi);
2664  break;
2665  case(EMCJE):
2666  fHistDPhi4_EMCJet[0]->Fill(DPhi);
2667  break;
2668  }
2669  }
2670  }
2671 
2672  //candidate 2<pt<4
2673  if(aodtrack->Pt()>2&&aodtrack->Pt()<4){
2674 
2675  //300MeV
2676  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<.5){
2677  if(MBtrg){
2678  fHistDPhi300_500_MB[1]->Fill(DPhi);
2679  }
2680  switch(trigVal){
2681  case(EMC7):
2682  fHistDPhi300_500_EMC7[1]->Fill(DPhi);
2683  break;
2684  case(EMCEGA):
2685  fHistDPhi300_500_EMCEGA[1]->Fill(DPhi);
2686  break;
2687  case(EMCJE):
2688  fHistDPhi300_500_EMCJet[1]->Fill(DPhi);
2689  break;
2690  }
2691  }
2692 
2693  //500MeV
2694  if(aodtrackassoc->Pt()>.5&&aodtrackassoc->Pt()<.8){
2695  if(MBtrg){
2696  fHistDPhi500_800_MB[1]->Fill(DPhi);
2697  }
2698  switch(trigVal){
2699  case(EMC7):
2700  fHistDPhi500_800_EMC7[1]->Fill(DPhi);
2701  break;
2702  case(EMCEGA):
2703  fHistDPhi500_800_EMCEGA[1]->Fill(DPhi);
2704  break;
2705  case(EMCJE):
2706  fHistDPhi500_800_EMCJet[1]->Fill(DPhi);
2707  break;
2708  }
2709  }
2710 
2711  //800MeV
2712  if(aodtrackassoc->Pt()>.8&&aodtrackassoc->Pt()<1){
2713  if(MBtrg){
2714  fHistDPhi800_1_MB[1]->Fill(DPhi);
2715  }
2716  switch(trigVal){
2717  case(EMC7):
2718  fHistDPhi800_1_EMC7[1]->Fill(DPhi);
2719  break;
2720  case(EMCEGA):
2721  fHistDPhi800_1_EMCEGA[1]->Fill(DPhi);
2722  break;
2723  case(EMCJE):
2724  fHistDPhi800_1_EMCJet[1]->Fill(DPhi);
2725  break;
2726  }
2727  }
2728 
2729  //1GeV
2730  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
2731  if(MBtrg){
2732  fHistDPhi1_2_MB[1]->Fill(DPhi);
2733  }
2734  switch(trigVal){
2735  case(EMC7):
2736  fHistDPhi1_2_EMC7[1]->Fill(DPhi);
2737  break;
2738  case(EMCEGA):
2739  fHistDPhi1_2_EMCEGA[1]->Fill(DPhi);
2740  break;
2741  case(EMCJE):
2742  fHistDPhi1_2_EMCJet[1]->Fill(DPhi);
2743  break;
2744  }
2745  }
2746 
2747  //2GeV
2748  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<3){
2749  if(MBtrg){
2750  fHistDPhi2_3_MB[1]->Fill(DPhi);
2751  fHistDPhi28_MB->Fill(DPhi);
2752  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2753  }
2754  switch(trigVal){
2755  case(EMC7):
2756  fHistDPhi2_3_EMC7[1]->Fill(DPhi);
2757  fHistDPhi28_EMC7->Fill(DPhi);
2758  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2759  break;
2760  case(EMCEGA):
2761  fHistDPhi2_3_EMCEGA[1]->Fill(DPhi);
2762  fHistDPhi28_EMCEGA->Fill(DPhi);
2763  fHistDPhiDEta28_EMCEGA->Fill(DPhi, DEta);
2764  break;
2765  case(EMCJE):
2766  fHistDPhi2_3_EMCJet[1]->Fill(DPhi);
2767  fHistDPhi28_EMCJet->Fill(DPhi);
2768  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2769  break;
2770  }
2771  }
2772 
2773  //3GeV
2774  if(aodtrackassoc->Pt()>3&&aodtrackassoc->Pt()<4){
2775  if(MBtrg){
2776  fHistDPhi3_4_MB[1]->Fill(DPhi);
2777  fHistDPhi28_MB->Fill(DPhi);
2778  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2779  }
2780  switch(trigVal){
2781  case(EMC7):
2782  fHistDPhi3_4_EMC7[1]->Fill(DPhi);
2783  fHistDPhi28_EMC7->Fill(DPhi);
2784  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2785  break;
2786  case(EMCEGA):
2787  fHistDPhi3_4_EMCEGA[1]->Fill(DPhi);
2788  fHistDPhi28_EMCEGA->Fill(DPhi);
2789  fHistDPhiDEta28_EMCEGA->Fill(DPhi, DEta);
2790  break;
2791  case(EMCJE):
2792  fHistDPhi3_4_EMCJet[1]->Fill(DPhi);
2793  fHistDPhi28_EMCJet->Fill(DPhi);
2794  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2795  break;
2796  }
2797  }
2798 
2799  //5GeV
2800  if(aodtrackassoc->Pt()>4){
2801  if(MBtrg){
2802  fHistDPhi4_MB[1]->Fill(DPhi);
2803  fHistDPhi28_MB->Fill(DPhi);
2804  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2805  }
2806  switch(trigVal){
2807  case(EMC7):
2808  fHistDPhi4_EMC7[1]->Fill(DPhi);
2809  fHistDPhi28_EMC7->Fill(DPhi);
2810  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2811  break;
2812  case(EMCEGA):
2813  fHistDPhi4_EMCEGA[1]->Fill(DPhi);
2814  fHistDPhi28_EMCEGA->Fill(DPhi);
2815  fHistDPhiDEta28_EMCEGA->Fill(DPhi, DEta);
2816  break;
2817  case(EMCJE):
2818  fHistDPhi4_EMCJet[1]->Fill(DPhi);
2819  fHistDPhi28_EMCJet->Fill(DPhi);
2820  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2821  break;
2822  }
2823  }
2824  }
2825 
2826  //candidate 4<pt<8
2827  if(aodtrack->Pt()>4&&aodtrack->Pt()<8){
2828 
2829  //300MeV
2830  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<.5){
2831  if(MBtrg){
2832  fHistDPhi300_500_MB[2]->Fill(DPhi);
2833  }
2834  switch(trigVal){
2835  case(EMC7):
2836  fHistDPhi300_500_EMC7[2]->Fill(DPhi);
2837  break;
2838  case(EMCEGA):
2839  fHistDPhi300_500_EMCEGA[2]->Fill(DPhi);
2840  break;
2841  case(EMCJE):
2842  fHistDPhi300_500_EMCJet[2]->Fill(DPhi);
2843  break;
2844  }
2845  }
2846 
2847  //500MeV
2848  if(aodtrackassoc->Pt()>.5&&aodtrackassoc->Pt()<.8){
2849  if(MBtrg){
2850  fHistDPhi500_800_MB[2]->Fill(DPhi);
2851  }
2852  switch(trigVal){
2853  case(EMC7):
2854  fHistDPhi500_800_EMC7[2]->Fill(DPhi);
2855  break;
2856  case(EMCEGA):
2857  fHistDPhi500_800_EMCEGA[2]->Fill(DPhi);
2858  break;
2859  case(EMCJE):
2860  fHistDPhi500_800_EMCJet[2]->Fill(DPhi);
2861  break;
2862  }
2863  }
2864 
2865  //800MeV
2866  if(aodtrackassoc->Pt()>.8&&aodtrackassoc->Pt()<1){
2867  if(MBtrg){
2868  fHistDPhi800_1_MB[2]->Fill(DPhi);
2869  }
2870  switch(trigVal){
2871  case(EMC7):
2872  fHistDPhi800_1_EMC7[2]->Fill(DPhi);
2873  break;
2874  case(EMCEGA):
2875  fHistDPhi800_1_EMCEGA[2]->Fill(DPhi);
2876  break;
2877  case(EMCJE):
2878  fHistDPhi800_1_EMCJet[2]->Fill(DPhi);
2879  break;
2880  }
2881  }
2882 
2883  //1GeV
2884  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
2885  if(MBtrg){
2886  fHistDPhi1_2_MB[2]->Fill(DPhi);
2887  }
2888  switch(trigVal){
2889  case(EMC7):
2890  fHistDPhi1_2_EMC7[2]->Fill(DPhi);
2891  break;
2892  case(EMCEGA):
2893  fHistDPhi1_2_EMCEGA[2]->Fill(DPhi);
2894  break;
2895  case(EMCJE):
2896  fHistDPhi1_2_EMCJet[2]->Fill(DPhi);
2897  break;
2898  }
2899  }
2900 
2901  //2GeV
2902  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<3){
2903  if(MBtrg){
2904  fHistDPhi2_3_MB[2]->Fill(DPhi);
2905  fHistDPhi28_MB->Fill(DPhi);
2906  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2907  }
2908  switch(trigVal){
2909  case(EMC7):
2910  fHistDPhi2_3_EMC7[2]->Fill(DPhi);
2911  fHistDPhi28_EMC7->Fill(DPhi);
2912  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2913  break;
2914  case(EMCEGA):
2915  fHistDPhi2_3_EMCEGA[2]->Fill(DPhi);
2916  fHistDPhi28_EMCEGA->Fill(DPhi);
2917  fHistDPhiDEta28_EMCEGA->Fill(DPhi, DEta);
2918  break;
2919  case(EMCJE):
2920  fHistDPhi2_3_EMCJet[2]->Fill(DPhi);
2921  fHistDPhi28_EMCJet->Fill(DPhi);
2922  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2923  break;
2924  }
2925  }
2926 
2927  //3GeV
2928  if(aodtrackassoc->Pt()>3&&aodtrackassoc->Pt()<4){
2929  if(MBtrg){
2930  fHistDPhi3_4_MB[2]->Fill(DPhi);
2931  fHistDPhi28_MB->Fill(DPhi);
2932  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2933  }
2934  switch(trigVal){
2935  case(EMC7):
2936  fHistDPhi3_4_EMC7[2]->Fill(DPhi);
2937  fHistDPhi28_EMC7->Fill(DPhi);
2938  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2939  break;
2940  case(EMCEGA):
2941  fHistDPhi3_4_EMCEGA[2]->Fill(DPhi);
2942  fHistDPhi28_EMCEGA->Fill(DPhi);
2943  fHistDPhiDEta28_EMCEGA->Fill(DPhi, DEta);
2944  break;
2945  case(EMCJE):
2946  fHistDPhi3_4_EMCJet[2]->Fill(DPhi);
2947  fHistDPhi28_EMCJet->Fill(DPhi);
2948  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2949  break;
2950  }
2951  }
2952 
2953  //5GeV
2954  if(aodtrackassoc->Pt()>4){
2955  if(MBtrg){
2956  fHistDPhi4_MB[2]->Fill(DPhi);
2957  fHistDPhi28_MB->Fill(DPhi);
2958  fHistDPhiDEta28_MB->Fill(DPhi, DEta);
2959  }
2960  switch(trigVal){
2961  case(EMC7):
2962  fHistDPhi4_EMC7[2]->Fill(DPhi);
2963  fHistDPhi28_EMC7->Fill(DPhi);
2964  fHistDPhiDEta28_EMC7->Fill(DPhi, DEta);
2965  break;
2966  case(EMCEGA):
2967  fHistDPhi4_EMCEGA[2]->Fill(DPhi);
2968  fHistDPhi28_EMCEGA->Fill(DPhi);
2969  fHistDPhiDEta28_EMCEGA->Fill(DPhi, DEta);
2970  break;
2971  case(EMCJE):
2972  fHistDPhi4_EMCJet[2]->Fill(DPhi);
2973  fHistDPhi28_EMCJet->Fill(DPhi);
2974  fHistDPhiDEta28_EMCJet->Fill(DPhi, DEta);
2975  break;
2976  }
2977  }
2978  }
2979 
2980  }
2981  PostData(1, fOutputMB);
2982  PostData(2, fOutputEMC7);
2983  PostData(3, fOutputEMCEGA);
2984  PostData(4, fOutputEMCJet);
2985  return;
2986 }
2987 
2989  trackCutsStrong=trkCutBool;
2990 }
2991 
2993  applySSCuts=SSCutBool;
2994 }
2995 
2996 void AliAnalysisTaskPSHFE::FillPhotoElecHistos(AliAODEvent *aod, AliAODTrack *aodtrack, AliPIDResponse *fPIDResponse, Int_t i){
2997 
2998  if(!aodtrack){
2999  AliWarning("aodtrack is null, no point in doing Photonic Electron stuff");
3000  return;
3001  }
3002 
3003  Bool_t isElec=kFALSE;
3004  Double_t ElecMass=.0005109989;
3005  //Fill TOF and TPC status variables
3006  AliPIDResponse::EDetPidStatus TPCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTPC, aodtrack);
3007 
3008  AliPIDResponse::EDetPidStatus TRDStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTRD, aodtrack);
3009 
3010  AliPIDResponse::EDetPidStatus EMCStatus=fPIDResponse->CheckPIDStatus(AliPIDResponse::kEMCAL, aodtrack);
3011 
3012  //Check validity of PID, TODO: Add a rejection histogram
3013  if(TPCStatus!=AliPIDResponse::kDetPidOk){
3014  return;
3015  }
3016 
3017  if(TRDStatus!=AliPIDResponse::kDetPidOk){
3018  return;
3019  }
3020 
3021  if(EMCStatus!=AliPIDResponse::kDetPidOk){
3022  return;
3023  }
3024 
3025 
3026  //Get the # of sigmas around an electron hypothesis for TOF and TPC
3027  Double_t nSigmaTPC;
3028  nSigmaTPC = fPIDResponse->NumberOfSigmasTPC(aodtrack,AliPID::kElectron);
3029 
3030  Double_t elecLikeTRD[1];
3031  if(fPIDResponse->ComputeTRDProbability(aodtrack, AliPID::kElectron, elecLikeTRD, AliTRDPIDResponse::kLQ2D) != AliPIDResponse::kDetPidOk || aodtrack->GetTRDntrackletsPID()<4){
3032  return;
3033  }
3034 
3035  //declare emcal cluster PID variables
3036  Double_t EOP=-1;
3037  Int_t caloId=aodtrack->GetEMCALcluster();
3038 
3039  if(caloId==-99999){
3040  return;
3041  }
3042 
3043  AliAODCaloCluster* tagEMCclus=aod->GetCaloCluster(caloId);
3044 
3045  EOP = tagEMCclus->E()/aodtrack->Pt();
3046 
3047  if((nSigmaTPC<2&&nSigmaTPC>-2)||(EOP<1.4&&EOP>.8)||(elecLikeTRD[0]>.8)){
3048  isElec=kTRUE;
3049  }
3050 
3051  if(!isElec){return;}
3052 
3053  Int_t ntracks=aod->GetNumberOfTracks();
3054 
3055  for(Int_t j = 0; j < ntracks; j++) {
3056 
3057  //Don't double count the tagged tracks
3058  if(i==j){continue;}
3059 
3060  AliAODTrack* aodtrackassoc = (AliAODTrack*)aod->GetTrack(j); // pointer to reconstructed to track
3061 
3062  if(!aodtrackassoc) {
3063  AliError(Form("ERROR: Could not retrieve aodtrack %d",j));
3064  continue;
3065  }
3066 
3067  //Do hybrid track cuts
3068  if(aodtrackassoc->IsHybridGlobalConstrainedGlobal()){continue;}
3069 
3070  Bool_t isElecToo=kFALSE;
3071 
3072  //Fill TOF and TPC status variables
3073  AliPIDResponse::EDetPidStatus TPCStatusassoc=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTPC, aodtrackassoc);
3074 
3075  AliPIDResponse::EDetPidStatus TRDStatusassoc=fPIDResponse->CheckPIDStatus(AliPIDResponse::kTRD, aodtrackassoc);
3076 
3077  //Check validity of PID, TODO: Add a rejection histogram
3078  if(TPCStatusassoc!=AliPIDResponse::kDetPidOk){
3079  continue;
3080  }
3081 
3082  if(TRDStatusassoc!=AliPIDResponse::kDetPidOk){
3083  continue;
3084  }
3085 
3086 
3087  //Get the # of sigmas around an electron hypothesis for TOF and TPC
3088  Double_t nSigmaTPCassoc;
3089  nSigmaTPCassoc = fPIDResponse->NumberOfSigmasTPC(aodtrackassoc,AliPID::kElectron);
3090 
3091  Double_t elecLikeTRDassoc[1];
3092  if(fPIDResponse->ComputeTRDProbability(aodtrackassoc, AliPID::kElectron, elecLikeTRDassoc, AliTRDPIDResponse::kLQ2D) != AliPIDResponse::kDetPidOk || aodtrackassoc->GetTRDntrackletsPID()<4){
3093  return;
3094  }
3095 
3096  if((nSigmaTPCassoc<2&&nSigmaTPCassoc>-2)||(elecLikeTRDassoc[0]>.8)){
3097  isElecToo=kTRUE;
3098  }
3099 
3100  if(!isElecToo){continue;}
3101 
3102  Double_t elecE1=TMath::Sqrt(aodtrack->P()*aodtrack->P()+ElecMass*ElecMass);
3103  Double_t elecE2=TMath::Sqrt(aodtrackassoc->P()*aodtrackassoc->P()+ElecMass*ElecMass);
3104 
3105  TLorentzVector elec1(aodtrack->Px(), aodtrack->Py(), aodtrack->Pz(), elecE1);
3106  TLorentzVector elec2(aodtrackassoc->Px(), aodtrackassoc->Py(), aodtrackassoc->Pz(), elecE2);
3107 
3108  Double_t InvMass=(elec1+elec2).M();
3109  Double_t OpAng=elec1.Angle(elec2.Vect());
3110 
3111  if(aodtrack->Charge()==aodtrackassoc->Charge()){
3112 
3113  if(MBtrg){
3114  fHistInvMassElecLike_MB->Fill(InvMass);
3115  fHistOpAngElecLike_MB->Fill(OpAng);
3116  }
3117  switch(trigVal){
3118  case(EMC7):
3119  fHistInvMassElecLike_EMC7->Fill(InvMass);
3120  fHistOpAngElecLike_EMC7->Fill(OpAng);
3121  break;
3122 
3123  case(EMCEGA):
3124  fHistInvMassElecLike_EMCEGA->Fill(InvMass);
3125  fHistOpAngElecLike_EMCEGA->Fill(OpAng);
3126  break;
3127 
3128  case(EMCJE):
3129  fHistInvMassElecLike_EMCJet->Fill(InvMass);
3130  fHistOpAngElecLike_EMCJet->Fill(OpAng);
3131  break;
3132  }
3133 
3134  }else{
3135  if(InvMass<0.1&&OpAng<0.1){tagPhot=kTRUE;}
3136  if(MBtrg){
3137  fHistInvMassElecUnLike_MB->Fill(InvMass);
3138  fHistOpAngElecUnLike_MB->Fill(OpAng);
3139  }
3140  switch(trigVal){
3141  case(EMC7):
3142  fHistInvMassElecUnLike_EMC7->Fill(InvMass);
3143  fHistOpAngElecUnLike_EMC7->Fill(OpAng);
3144  break;
3145 
3146  case(EMCEGA):
3147  fHistInvMassElecUnLike_EMCEGA->Fill(InvMass);
3148  fHistOpAngElecUnLike_EMCEGA->Fill(OpAng);
3149  break;
3150 
3151  case(EMCJE):
3152  fHistInvMassElecUnLike_EMCJet->Fill(InvMass);
3153  fHistOpAngElecUnLike_EMCJet->Fill(OpAng);
3154  break;
3155  }
3156  }
3157  }//end loop over tracks
3158 
3159  PostData(1, fOutputMB);
3160  PostData(2, fOutputEMC7);
3161  PostData(3, fOutputEMCEGA);
3162  PostData(4, fOutputEMCJet);
3163  return;
3164 }
3165 
3167 {
3168  if(!aod){AliWarning("Invalid AOD Event");}
3169  Int_t nTracks = aod->GetNumberOfTracks();
3170  TObjArray* accTracks = new TObjArray;
3171  accTracks->SetOwner();
3172 
3173  for(Int_t i=0;i<nTracks;i++){
3174  AliAODTrack *aodtrack = (AliAODTrack*)aod->GetTrack(i);
3175 
3176  if(!aodtrack){
3177  continue;
3178  }
3179 
3180  if(aodtrack->IsHybridGlobalConstrainedGlobal()){
3181  continue;
3182  }
3183  AliAODTrack* temp = new AliAODTrack(*aodtrack);
3184  accTracks->Add(temp);
3185  }
3186 
3187  return accTracks;
3188 }
3189 
3190 void AliAnalysisTaskPSHFE::FillMEDPhiHistos(AliAODTrack *aodtrack)
3191 {
3192  Int_t nEvents = fPool->GetCurrentNEvents();
3193 
3194  for(Int_t Ev=0;Ev<nEvents;Ev++){
3195 
3196  TObjArray *mixedTracks = fPool->GetEvent(Ev);
3197 
3198  Int_t nMixedTracks = mixedTracks->GetEntriesFast();
3199 
3200  for(Int_t j=0;j<nMixedTracks;j++){
3201  AliAODTrack* aodtrackassoc = (AliAODTrack*)mixedTracks->At(j); // pointer to reconstructed to track
3202 
3203  if(!aodtrackassoc) {
3204  AliError(Form("ERROR: Could not retrieve aodtrack %d",j));
3205  continue;
3206  }
3207 
3208  //Do hybrid track cuts
3209  if(aodtrackassoc->IsHybridGlobalConstrainedGlobal()){continue;}
3210 
3211  //Pt distribution
3212  if(MBtrg){
3213  fHistPtAssocMix_MB->Fill(aodtrackassoc->Pt());
3214  }
3215  switch(trigVal){
3216  case(EMC7):
3217  fHistPtAssocMix_EMC7->Fill(aodtrackassoc->Pt());
3218  break;
3219 
3220  case(EMCEGA):
3221  fHistPtAssocMix_EMCEGA->Fill(aodtrackassoc->Pt());
3222  break;
3223 
3224  case(EMCJE):
3225  fHistPtAssocMix_EMCJet->Fill(aodtrackassoc->Pt());
3226  break;
3227  }
3228 
3229  //Fill Delta Phi variable and correct for periodicity
3230  Double_t DPhi=aodtrackassoc->Phi()-aodtrack->Phi();
3231 
3232  if(DPhi<-TMath::Pi()/2){DPhi=TMath::Abs(2*TMath::Pi()+DPhi);}
3233 
3234  if(DPhi>3*TMath::Pi()/2){DPhi=-TMath::Abs(2*TMath::Pi()-DPhi);}
3235 
3236  Double_t DEta=aodtrackassoc->Eta()-aodtrack->Eta();
3237 
3238  //candidate 1<pt<2
3239  if(aodtrack->Pt()>1&&aodtrack->Pt()<2){
3240 
3241  //300-500MeV
3242  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<.5){
3243  if(MBtrg){
3244  fHistDPhiMix300_500_MB[0]->Fill(DPhi);
3245  }
3246  switch(trigVal){
3247  case(EMC7):
3248  fHistDPhiMix300_500_EMC7[0]->Fill(DPhi);
3249  break;
3250  case(EMCEGA):
3251  fHistDPhiMix300_500_EMCEGA[0]->Fill(DPhi);
3252  break;
3253  case(EMCJE):
3254  fHistDPhiMix300_500_EMCJet[0]->Fill(DPhi);
3255  break;
3256  }
3257  }
3258 
3259  //500MeV
3260  if(aodtrackassoc->Pt()>.5&&aodtrackassoc->Pt()<.8){
3261  if(MBtrg){
3262  fHistDPhiMix500_800_MB[0]->Fill(DPhi);
3263  }
3264  switch(trigVal){
3265  case(EMC7):
3266  fHistDPhiMix500_800_EMC7[0]->Fill(DPhi);
3267  break;
3268  case(EMCEGA):
3269  fHistDPhiMix500_800_EMCEGA[0]->Fill(DPhi);
3270  break;
3271  case(EMCJE):
3272  fHistDPhiMix500_800_EMCJet[0]->Fill(DPhi);
3273  break;
3274  }
3275  }
3276 
3277  //800MeV
3278  if(aodtrackassoc->Pt()>.8&&aodtrackassoc->Pt()<1){
3279  if(MBtrg){
3280  fHistDPhiMix800_1_MB[0]->Fill(DPhi);
3281  }
3282  switch(trigVal){
3283  case(EMC7):
3284  fHistDPhiMix800_1_EMC7[0]->Fill(DPhi);
3285  break;
3286  case(EMCEGA):
3287  fHistDPhiMix800_1_EMCEGA[0]->Fill(DPhi);
3288  break;
3289  case(EMCJE):
3290  fHistDPhiMix800_1_EMCJet[0]->Fill(DPhi);
3291  break;
3292  }
3293  }
3294 
3295  //1GeV
3296  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
3297  if(MBtrg){
3298  fHistDPhiMix1_2_MB[0]->Fill(DPhi);
3299  }
3300  switch(trigVal){
3301  case(EMC7):
3302  fHistDPhiMix1_2_EMC7[0]->Fill(DPhi);
3303  break;
3304  case(EMCEGA):
3305  fHistDPhiMix1_2_EMCEGA[0]->Fill(DPhi);
3306  break;
3307  case(EMCJE):
3308  fHistDPhiMix1_2_EMCJet[0]->Fill(DPhi);
3309  break;
3310  }
3311  }
3312 
3313  //2GeV
3314  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<3){
3315  if(MBtrg){
3316  fHistDPhiMix2_3_MB[0]->Fill(DPhi);
3317  }
3318  switch(trigVal){
3319  case(EMC7):
3320  fHistDPhiMix2_3_EMC7[0]->Fill(DPhi);
3321  break;
3322  case(EMCEGA):
3323  fHistDPhiMix2_3_EMCEGA[0]->Fill(DPhi);
3324  break;
3325  case(EMCJE):
3326  fHistDPhiMix2_3_EMCJet[0]->Fill(DPhi);
3327  break;
3328  }
3329  }
3330 
3331  //3GeV
3332  if(aodtrackassoc->Pt()>3&&aodtrackassoc->Pt()<4){
3333  if(MBtrg){
3334  fHistDPhiMix3_4_MB[0]->Fill(DPhi);
3335  }
3336  switch(trigVal){
3337  case(EMC7):
3338  fHistDPhiMix3_4_EMC7[0]->Fill(DPhi);
3339  break;
3340  case(EMCEGA):
3341  fHistDPhiMix3_4_EMCEGA[0]->Fill(DPhi);
3342  break;
3343  case(EMCJE):
3344  fHistDPhiMix3_4_EMCJet[0]->Fill(DPhi);
3345  break;
3346  }
3347  }
3348 
3349  //5GeV
3350  if(aodtrackassoc->Pt()>4){
3351  if(MBtrg){
3352  fHistDPhiMix4_MB[0]->Fill(DPhi);
3353  }
3354  switch(trigVal){
3355  case(EMC7):
3356  fHistDPhiMix4_EMC7[0]->Fill(DPhi);
3357  break;
3358  case(EMCEGA):
3359  fHistDPhiMix4_EMCEGA[0]->Fill(DPhi);
3360  break;
3361  case(EMCJE):
3362  fHistDPhiMix4_EMCJet[0]->Fill(DPhi);
3363  break;
3364  }
3365  }
3366  }
3367 
3368  //candidate 2<pt<4
3369  if(aodtrack->Pt()>2&&aodtrack->Pt()<4){
3370 
3371  //300MeV
3372  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<.5){
3373  if(MBtrg){
3374  fHistDPhiMix300_500_MB[1]->Fill(DPhi);
3375  }
3376  switch(trigVal){
3377  case(EMC7):
3378  fHistDPhiMix300_500_EMC7[1]->Fill(DPhi);
3379  break;
3380  case(EMCEGA):
3381  fHistDPhiMix300_500_EMCEGA[1]->Fill(DPhi);
3382  break;
3383  case(EMCJE):
3384  fHistDPhiMix300_500_EMCJet[1]->Fill(DPhi);
3385  break;
3386  }
3387  }
3388 
3389  //500MeV
3390  if(aodtrackassoc->Pt()>.5&&aodtrackassoc->Pt()<.8){
3391  if(MBtrg){
3392  fHistDPhiMix500_800_MB[1]->Fill(DPhi);
3393  }
3394  switch(trigVal){
3395  case(EMC7):
3396  fHistDPhiMix500_800_EMC7[1]->Fill(DPhi);
3397  break;
3398  case(EMCEGA):
3399  fHistDPhiMix500_800_EMCEGA[1]->Fill(DPhi);
3400  break;
3401  case(EMCJE):
3402  fHistDPhiMix500_800_EMCJet[1]->Fill(DPhi);
3403  break;
3404  }
3405  }
3406 
3407  //800MeV
3408  if(aodtrackassoc->Pt()>.8&&aodtrackassoc->Pt()<1){
3409  if(MBtrg){
3410  fHistDPhiMix800_1_MB[1]->Fill(DPhi);
3411  }
3412  switch(trigVal){
3413  case(EMC7):
3414  fHistDPhiMix800_1_EMC7[1]->Fill(DPhi);
3415  break;
3416  case(EMCEGA):
3417  fHistDPhiMix800_1_EMCEGA[1]->Fill(DPhi);
3418  break;
3419  case(EMCJE):
3420  fHistDPhiMix800_1_EMCJet[1]->Fill(DPhi);
3421  break;
3422  }
3423  }
3424 
3425  //1GeV
3426  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
3427  if(MBtrg){
3428  fHistDPhiMix1_2_MB[1]->Fill(DPhi);
3429  }
3430  switch(trigVal){
3431  case(EMC7):
3432  fHistDPhiMix1_2_EMC7[1]->Fill(DPhi);
3433  break;
3434  case(EMCEGA):
3435  fHistDPhiMix1_2_EMCEGA[1]->Fill(DPhi);
3436  break;
3437  case(EMCJE):
3438  fHistDPhiMix1_2_EMCJet[1]->Fill(DPhi);
3439  break;
3440  }
3441  }
3442 
3443  //2GeV
3444  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<3){
3445  if(MBtrg){
3446  fHistDPhiMix2_3_MB[1]->Fill(DPhi);
3447  fHistDPhiMix28_MB->Fill(DPhi);
3448  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
3449  }
3450  switch(trigVal){
3451  case(EMC7):
3452  fHistDPhiMix2_3_EMC7[1]->Fill(DPhi);
3453  fHistDPhiMix28_EMC7->Fill(DPhi);
3454  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
3455  break;
3456  case(EMCEGA):
3457  fHistDPhiMix2_3_EMCEGA[1]->Fill(DPhi);
3458  fHistDPhiMix28_EMCEGA->Fill(DPhi);
3459  fHistDPhiDEtaMix28_EMCEGA->Fill(DPhi, DEta);
3460  break;
3461  case(EMCJE):
3462  fHistDPhiMix2_3_EMCJet[1]->Fill(DPhi);
3463  fHistDPhiMix28_EMCJet->Fill(DPhi);
3464  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
3465  break;
3466  }
3467  }
3468 
3469  //3GeV
3470  if(aodtrackassoc->Pt()>3&&aodtrackassoc->Pt()<4){
3471  if(MBtrg){
3472  fHistDPhiMix3_4_MB[1]->Fill(DPhi);
3473  fHistDPhiMix28_MB->Fill(DPhi);
3474  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
3475  }
3476  switch(trigVal){
3477  case(EMC7):
3478  fHistDPhiMix3_4_EMC7[1]->Fill(DPhi);
3479  fHistDPhiMix28_EMC7->Fill(DPhi);
3480  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
3481  break;
3482  case(EMCEGA):
3483  fHistDPhiMix3_4_EMCEGA[1]->Fill(DPhi);
3484  fHistDPhiMix28_EMCEGA->Fill(DPhi);
3485  fHistDPhiDEtaMix28_EMCEGA->Fill(DPhi, DEta);
3486  break;
3487  case(EMCJE):
3488  fHistDPhiMix3_4_EMCJet[1]->Fill(DPhi);
3489  fHistDPhiMix28_EMCJet->Fill(DPhi);
3490  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
3491  break;
3492  }
3493  }
3494 
3495  //5GeV
3496  if(aodtrackassoc->Pt()>4){
3497  if(MBtrg){
3498  fHistDPhiMix4_MB[1]->Fill(DPhi);
3499  fHistDPhiMix28_MB->Fill(DPhi);
3500  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
3501  }
3502  switch(trigVal){
3503  case(EMC7):
3504  fHistDPhiMix4_EMC7[1]->Fill(DPhi);
3505  fHistDPhiMix28_EMC7->Fill(DPhi);
3506  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
3507  break;
3508  case(EMCEGA):
3509  fHistDPhiMix4_EMCEGA[1]->Fill(DPhi);
3510  fHistDPhiMix28_EMCEGA->Fill(DPhi);
3511  fHistDPhiDEtaMix28_EMCEGA->Fill(DPhi, DEta);
3512  break;
3513  case(EMCJE):
3514  fHistDPhiMix4_EMCJet[1]->Fill(DPhi);
3515  fHistDPhiMix28_EMCJet->Fill(DPhi);
3516  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
3517  break;
3518  }
3519  }
3520  }
3521 
3522  //candidate 4<pt<8
3523  if(aodtrack->Pt()>4&&aodtrack->Pt()<8){
3524 
3525  //300MeV
3526  if(aodtrackassoc->Pt()>.3&&aodtrackassoc->Pt()<.5){
3527  if(MBtrg){
3528  fHistDPhiMix300_500_MB[2]->Fill(DPhi);
3529  }
3530  switch(trigVal){
3531  case(EMC7):
3532  fHistDPhiMix300_500_EMC7[2]->Fill(DPhi);
3533  break;
3534  case(EMCEGA):
3535  fHistDPhiMix300_500_EMCEGA[2]->Fill(DPhi);
3536  break;
3537  case(EMCJE):
3538  fHistDPhiMix300_500_EMCJet[2]->Fill(DPhi);
3539  break;
3540  }
3541  }
3542 
3543  //500MeV
3544  if(aodtrackassoc->Pt()>.5&&aodtrackassoc->Pt()<.8){
3545  if(MBtrg){
3546  fHistDPhiMix500_800_MB[2]->Fill(DPhi);
3547  }
3548  switch(trigVal){
3549  case(EMC7):
3550  fHistDPhiMix500_800_EMC7[2]->Fill(DPhi);
3551  break;
3552  case(EMCEGA):
3553  fHistDPhiMix500_800_EMCEGA[2]->Fill(DPhi);
3554  break;
3555  case(EMCJE):
3556  fHistDPhiMix500_800_EMCJet[2]->Fill(DPhi);
3557  break;
3558  }
3559  }
3560 
3561  //800MeV
3562  if(aodtrackassoc->Pt()>.8&&aodtrackassoc->Pt()<1){
3563  if(MBtrg){
3564  fHistDPhiMix800_1_MB[2]->Fill(DPhi);
3565  }
3566  switch(trigVal){
3567  case(EMC7):
3568  fHistDPhiMix800_1_EMC7[2]->Fill(DPhi);
3569  break;
3570  case(EMCEGA):
3571  fHistDPhiMix800_1_EMCEGA[2]->Fill(DPhi);
3572  break;
3573  case(EMCJE):
3574  fHistDPhiMix800_1_EMCJet[2]->Fill(DPhi);
3575  break;
3576  }
3577  }
3578 
3579  //1GeV
3580  if(aodtrackassoc->Pt()>1&&aodtrackassoc->Pt()<2){
3581  if(MBtrg){
3582  fHistDPhiMix1_2_MB[2]->Fill(DPhi);
3583  }
3584  switch(trigVal){
3585  case(EMC7):
3586  fHistDPhiMix1_2_EMC7[2]->Fill(DPhi);
3587  break;
3588  case(EMCEGA):
3589  fHistDPhiMix1_2_EMCEGA[2]->Fill(DPhi);
3590  break;
3591  case(EMCJE):
3592  fHistDPhiMix1_2_EMCJet[2]->Fill(DPhi);
3593  break;
3594  }
3595  }
3596 
3597  //2GeV
3598  if(aodtrackassoc->Pt()>2&&aodtrackassoc->Pt()<3){
3599  if(MBtrg){
3600  fHistDPhiMix2_3_MB[2]->Fill(DPhi);
3601  fHistDPhiMix28_MB->Fill(DPhi);
3602  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
3603  }
3604  switch(trigVal){
3605  case(EMC7):
3606  fHistDPhiMix2_3_EMC7[2]->Fill(DPhi);
3607  fHistDPhiMix28_EMC7->Fill(DPhi);
3608  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
3609  break;
3610  case(EMCEGA):
3611  fHistDPhiMix2_3_EMCEGA[2]->Fill(DPhi);
3612  fHistDPhiMix28_EMCEGA->Fill(DPhi);
3613  fHistDPhiDEtaMix28_EMCEGA->Fill(DPhi, DEta);
3614  break;
3615  case(EMCJE):
3616  fHistDPhiMix2_3_EMCJet[2]->Fill(DPhi);
3617  fHistDPhiMix28_EMCJet->Fill(DPhi);
3618  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
3619  break;
3620  }
3621  }
3622 
3623  //3GeV
3624  if(aodtrackassoc->Pt()>3&&aodtrackassoc->Pt()<4){
3625  if(MBtrg){
3626  fHistDPhiMix3_4_MB[2]->Fill(DPhi);
3627  fHistDPhiMix28_MB->Fill(DPhi);
3628  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
3629  }
3630  switch(trigVal){
3631  case(EMC7):
3632  fHistDPhiMix3_4_EMC7[2]->Fill(DPhi);
3633  fHistDPhiMix28_EMC7->Fill(DPhi);
3634  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
3635  break;
3636  case(EMCEGA):
3637  fHistDPhiMix3_4_EMCEGA[2]->Fill(DPhi);
3638  fHistDPhiMix28_EMCEGA->Fill(DPhi);
3639  fHistDPhiDEtaMix28_EMCEGA->Fill(DPhi, DEta);
3640  break;
3641  case(EMCJE):
3642  fHistDPhiMix3_4_EMCJet[2]->Fill(DPhi);
3643  fHistDPhiMix28_EMCJet->Fill(DPhi);
3644  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
3645  break;
3646  }
3647  }
3648 
3649  //5GeV
3650  if(aodtrackassoc->Pt()>4){
3651  if(MBtrg){
3652  fHistDPhiMix4_MB[2]->Fill(DPhi);
3653  fHistDPhiMix28_MB->Fill(DPhi);
3654  fHistDPhiDEtaMix28_MB->Fill(DPhi, DEta);
3655  }
3656  switch(trigVal){
3657  case(EMC7):
3658  fHistDPhiMix4_EMC7[2]->Fill(DPhi);
3659  fHistDPhiMix28_EMC7->Fill(DPhi);
3660  fHistDPhiDEtaMix28_EMC7->Fill(DPhi, DEta);
3661  break;
3662  case(EMCEGA):
3663  fHistDPhiMix4_EMCEGA[2]->Fill(DPhi);
3664  fHistDPhiMix28_EMCEGA->Fill(DPhi);
3665  fHistDPhiDEtaMix28_EMCEGA->Fill(DPhi, DEta);
3666  break;
3667  case(EMCJE):
3668  fHistDPhiMix4_EMCJet[2]->Fill(DPhi);
3669  fHistDPhiMix28_EMCJet->Fill(DPhi);
3670  fHistDPhiDEtaMix28_EMCJet->Fill(DPhi, DEta);
3671  break;
3672  }
3673  }
3674  }
3675  }
3676  }
3677  PostData(1, fOutputMB);
3678  PostData(2, fOutputEMC7);
3679  PostData(3, fOutputEMCEGA);
3680  PostData(4, fOutputEMCJet);
3681  return;
3682 }
3683 
3684 //________________________________________________________________________
3686 {
3687 
3688 }
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