Jet and Particle identification tasks moved to different directories
[u/mrichter/AliRoot.git] / PWG4 / PartCorr / AliGammaConversionHistograms.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: Ana Marin, Kathrin Koch, Kenneth Aamodt                        *
5  * Version 1.0                                                            *
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  * Class containing histograms 
17  //Change here
18  // here we need a description of the naming scheme of the histograms.
19
20 */
21
22 #include "AliGammaConversionHistograms.h"
23 #include "TMath.h"
24
25 using namespace std;
26
27 ClassImp(AliGammaConversionHistograms)
28
29
30 AliGammaConversionHistograms::AliGammaConversionHistograms() :
31   fOutputContainer(NULL),
32   fNPhiIndex(0),
33   fNRIndex(0),
34   fMinRadius(0.),
35   fMaxRadius(0.),
36   fDeltaR(0.),
37   fMinPhi(0.),
38   fMaxPhi(0.),
39   fDeltaPhi(0.),
40   fMC_EP_R(NULL),
41   fMC_EP_Z_R(NULL),
42   fMC_EP_X_Y(NULL),
43   fMC_EP_OpeningAngle(NULL),
44   fMC_E_Energy(NULL),
45   fMC_E_Pt(NULL),
46   fMC_E_Eta(NULL),
47   fMC_E_Phi(NULL),
48   fMC_P_Energy(NULL),
49   fMC_P_Pt(NULL),
50   fMC_P_Eta(NULL),
51   fMC_P_Phi(NULL),
52   fMC_Gamma_Energy(NULL),
53   fMC_Gamma_Pt(NULL),
54   fMC_Gamma_Eta(NULL),
55   fMC_Gamma_Phi(NULL),
56   fMC_DirectGamma_Energy(NULL),
57   fMC_DirectGamma_Pt(NULL),
58   fMC_DirectGamma_Eta(NULL),
59   fMC_DirectGamma_Phi(NULL),
60   fMC_Mapping(),
61   fMC_Mapping_Phi(),
62   fMC_Mapping_R(),
63   fMC_Match_Gamma_Eta(NULL),
64   fMC_Match_Gamma_Phi(NULL),
65   fMC_Match_Gamma_Pt(NULL),
66   fMC_Match_Gamma_Energy(NULL),
67   fMC_Match_Gamma_Mass(NULL),
68   fMC_Match_Gamma_OpeningAngle(NULL),
69   fMC_Match_Gamma_R(NULL),
70   fMC_Match_Gamma_Z_R(NULL),
71   fMC_Match_Gamma_X_Y(NULL),
72   fMC_Pi0_Eta(NULL),
73   fMC_Pi0_Phi(NULL),
74   fMC_Pi0_Pt(NULL),
75   fMC_Pi0_Energy(NULL),
76   fMC_Pi0_Mass(NULL),
77   fMC_Pi0_OpeningAngleGamma(NULL),
78   fMC_Pi0_R(NULL),
79   fMC_Pi0_Z_R(NULL),
80   fMC_Pi0_X_Y(NULL),
81   fMC_Pi0Secondaries_Eta(NULL),
82   fMC_Pi0Secondaries_Phi(NULL),
83   fMC_Pi0Secondaries_Pt(NULL),
84   fMC_Pi0Secondaries_Energy(NULL),
85   fMC_Pi0Secondaries_Mass(NULL),
86   fMC_Pi0Secondaries_OpeningAngleGamma(NULL),
87   fMC_Pi0Secondaries_R(NULL),
88   fMC_Pi0Secondaries_Z_R(NULL),
89   fMC_Pi0Secondaries_X_Y(NULL),
90   fMC_Eta_Eta(NULL),
91   fMC_Eta_Phi(NULL),
92   fMC_Eta_Pt(NULL),
93   fMC_Eta_Energy(NULL),
94   fMC_Eta_Mass(NULL),
95   fMC_Eta_OpeningAngleGamma(NULL),
96   fMC_Eta_R(NULL),
97   fMC_Eta_Z_R(NULL),
98   fMC_Eta_X_Y(NULL),
99   fESD_EP_R(NULL),
100   fESD_EP_Z_R(NULL),
101   fESD_EP_X_Y(NULL),
102   fESD_EP_OpeningAngle(NULL),
103   fESD_E_Energy(NULL),
104   fESD_E_Pt(NULL),
105   fESD_E_Eta(NULL),
106   fESD_E_Phi(NULL),
107   fESD_P_Energy(NULL),
108   fESD_P_Pt(NULL),
109   fESD_P_Eta(NULL),
110   fESD_P_Phi(NULL),
111   fESD_Gamma_Energy(NULL),
112   fESD_Gamma_Pt(NULL),
113   fESD_Gamma_Eta(NULL),
114   fESD_Gamma_Phi(NULL),
115   fESD_Mapping(),
116   fESD_Mapping_Phi(),
117   fESD_Mapping_R(),
118   fESD_Match_Gamma_OpeningAngle(NULL),
119   fESD_Match_Gamma_Energy(NULL),
120   fESD_Match_Gamma_Pt(NULL),
121   fESD_Match_Gamma_Eta(NULL),
122   fESD_Match_Gamma_Phi(NULL),
123   fESD_Match_Gamma_Mass(NULL),
124   fESD_Match_Gamma_Width(NULL),
125   fESD_Match_Gamma_Chi2(NULL),
126   fESD_Match_Gamma_NDF(NULL),
127   fESD_Match_Gamma_R(NULL),
128   fESD_Match_Gamma_Z_R(NULL),
129   fESD_Match_Gamma_X_Y(NULL),
130   fESD_Pi0_OpeningAngleGamma(NULL),
131   fESD_Pi0_Energy(NULL),
132   fESD_Pi0_Pt(NULL),
133   fESD_Pi0_Eta(NULL),
134   fESD_Pi0_Phi(NULL),
135   fESD_Pi0_Mass(NULL),
136   fESD_Pi0_R(NULL),
137   fESD_Pi0_Z_R(NULL),
138   fESD_Pi0_X_Y(NULL),
139   fESD_Eta_OpeningAngleGamma(NULL),
140   fESD_Eta_Energy(NULL),
141   fESD_Eta_Pt(NULL),
142   fESD_Eta_Eta(NULL),
143   fESD_Eta_Phi(NULL),
144   fESD_Eta_Mass(NULL),
145   fESD_Eta_R(NULL),
146   fESD_Eta_Z_R(NULL),
147   fESD_Eta_X_Y(NULL),
148   fESD_Background_OpeningAngleGamma(NULL),
149   fESD_Background_Energy(NULL),
150   fESD_Background_Pt(NULL),
151   fESD_Background_Eta(NULL),
152   fESD_Background_Phi(NULL),
153   fESD_Background_Mass(NULL),
154   fESD_Background_R(NULL),
155   fESD_Background_Z_R(NULL),
156   fESD_Background_X_Y(NULL),
157   fResolution_dPt(NULL),
158   fResolution_dR(NULL),
159   fResolution_dZ(NULL),
160   fResolution_dR_dPt(NULL),
161   fResolution_MC_Pt(NULL),
162   fResolution_MC_R(NULL),
163   fResolution_MC_Z(NULL),
164   fResolution_ESD_Pt(NULL),
165   fResolution_ESD_R(NULL),
166   fResolution_ESD_Z(NULL),
167   fNumberOfV0s(NULL),
168   fNumberOfSurvivingV0s(NULL),
169   fV0MassDebugCut1(NULL),
170   fV0MassDebugCut2(NULL),
171   fV0MassDebugCut3(NULL),
172   fV0MassDebugCut4(NULL),
173   fV0MassDebugCut5(NULL),
174   fV0MassDebugCut6(NULL),
175   fV0MassDebugCut7(NULL),
176   fV0MassDebugCut8(NULL)
177 {
178
179 }
180
181
182 AliGammaConversionHistograms::AliGammaConversionHistograms(const AliGammaConversionHistograms & original) :
183   fOutputContainer(original.fOutputContainer),
184   fNPhiIndex(0),
185   fNRIndex(0),
186   fMinRadius(0.),
187   fMaxRadius(0.),
188   fDeltaR(0.),
189   fMinPhi(0.),
190   fMaxPhi(0.),
191   fDeltaPhi(0.),
192   fMC_EP_R(original.fMC_EP_R),
193   fMC_EP_Z_R(original.fMC_EP_Z_R),
194   fMC_EP_X_Y(original.fMC_EP_X_Y),
195   fMC_EP_OpeningAngle(original.fMC_EP_OpeningAngle),
196   fMC_E_Energy(original.fMC_E_Energy),
197   fMC_E_Pt(original.fMC_E_Pt),
198   fMC_E_Eta(original.fMC_E_Eta),
199   fMC_E_Phi(original.fMC_E_Phi),
200   fMC_P_Energy(original.fMC_P_Energy),
201   fMC_P_Pt(original.fMC_P_Pt),
202   fMC_P_Eta(original.fMC_P_Eta),
203   fMC_P_Phi(original.fMC_P_Phi),
204   fMC_Gamma_Energy(original.fMC_Gamma_Energy),
205   fMC_Gamma_Pt(original.fMC_Gamma_Pt),
206   fMC_Gamma_Eta(original.fMC_Gamma_Eta),
207   fMC_Gamma_Phi(original.fMC_Gamma_Phi),
208   fMC_DirectGamma_Energy(original.fMC_Gamma_Energy),
209   fMC_DirectGamma_Pt(original.fMC_Gamma_Pt),
210   fMC_DirectGamma_Eta(original.fMC_Gamma_Eta),
211   fMC_DirectGamma_Phi(original.fMC_Gamma_Phi),
212   fMC_Mapping(),
213   fMC_Mapping_Phi(),
214   fMC_Mapping_R(),
215   fMC_Match_Gamma_Eta(original.fMC_Match_Gamma_Eta),
216   fMC_Match_Gamma_Phi(original.fMC_Match_Gamma_Phi),
217   fMC_Match_Gamma_Pt(original.fMC_Match_Gamma_Pt),
218   fMC_Match_Gamma_Energy(original.fMC_Match_Gamma_Energy),
219   fMC_Match_Gamma_Mass(original.fMC_Match_Gamma_Mass),
220   fMC_Match_Gamma_OpeningAngle(original.fMC_Match_Gamma_OpeningAngle),
221   fMC_Match_Gamma_R(original.fMC_Match_Gamma_R),
222   fMC_Match_Gamma_Z_R(original.fMC_Match_Gamma_Z_R),
223   fMC_Match_Gamma_X_Y(original.fMC_Match_Gamma_X_Y),
224   fMC_Pi0_Eta(original.fMC_Pi0_Eta),
225   fMC_Pi0_Phi(original.fMC_Pi0_Phi),
226   fMC_Pi0_Pt(original.fMC_Pi0_Pt),
227   fMC_Pi0_Energy(original.fMC_Pi0_Energy),
228   fMC_Pi0_Mass(original.fMC_Pi0_Mass),
229   fMC_Pi0_OpeningAngleGamma(original.fMC_Pi0_OpeningAngleGamma),
230   fMC_Pi0_R(original.fMC_Pi0_R),
231   fMC_Pi0_Z_R(original.fMC_Pi0_Z_R),
232   fMC_Pi0_X_Y(original.fMC_Pi0_X_Y),
233   fMC_Pi0Secondaries_Eta(original.fMC_Pi0_Eta),
234   fMC_Pi0Secondaries_Phi(original.fMC_Pi0_Phi),
235   fMC_Pi0Secondaries_Pt(original.fMC_Pi0_Pt),
236   fMC_Pi0Secondaries_Energy(original.fMC_Pi0_Energy),
237   fMC_Pi0Secondaries_Mass(original.fMC_Pi0_Mass),
238   fMC_Pi0Secondaries_OpeningAngleGamma(original.fMC_Pi0_OpeningAngleGamma),
239   fMC_Pi0Secondaries_R(original.fMC_Pi0_R),
240   fMC_Pi0Secondaries_Z_R(original.fMC_Pi0_Z_R),
241   fMC_Pi0Secondaries_X_Y(original.fMC_Pi0Secondaries_X_Y),
242   fMC_Eta_Eta(original.fMC_Eta_Eta),
243   fMC_Eta_Phi(original.fMC_Eta_Phi),
244   fMC_Eta_Pt(original.fMC_Eta_Pt),
245   fMC_Eta_Energy(original.fMC_Eta_Energy),
246   fMC_Eta_Mass(original.fMC_Eta_Mass),
247   fMC_Eta_OpeningAngleGamma(original.fMC_Eta_OpeningAngleGamma),
248   fMC_Eta_R(original.fMC_Eta_R),
249   fMC_Eta_Z_R(original.fMC_Eta_Z_R),
250   fMC_Eta_X_Y(original.fMC_Eta_X_Y),
251   fESD_EP_R(original.fESD_EP_R),
252   fESD_EP_Z_R(original.fESD_EP_Z_R),
253   fESD_EP_X_Y(original.fESD_EP_X_Y),
254   fESD_EP_OpeningAngle(original.fESD_EP_OpeningAngle),
255   fESD_E_Energy(original.fESD_E_Energy),
256   fESD_E_Pt(original.fESD_E_Pt),
257   fESD_E_Eta(original.fESD_E_Eta),
258   fESD_E_Phi(original.fESD_E_Phi),
259   fESD_P_Energy(original.fESD_P_Energy),
260   fESD_P_Pt(original.fESD_P_Pt),
261   fESD_P_Eta(original.fESD_P_Eta),
262   fESD_P_Phi(original.fESD_P_Phi),
263   fESD_Gamma_Energy(original.fESD_Gamma_Energy),
264   fESD_Gamma_Pt(original.fESD_Gamma_Pt),
265   fESD_Gamma_Eta(original.fESD_Gamma_Eta),
266   fESD_Gamma_Phi(original.fESD_Gamma_Phi),
267   fESD_Mapping(original.fESD_Mapping),
268   fESD_Mapping_Phi(original.fESD_Mapping_Phi),
269   fESD_Mapping_R(original.fESD_Mapping_R),
270   fESD_Match_Gamma_OpeningAngle(original.fESD_Match_Gamma_OpeningAngle),
271   fESD_Match_Gamma_Energy(original.fESD_Match_Gamma_Energy),
272   fESD_Match_Gamma_Pt(original.fESD_Match_Gamma_Pt),
273   fESD_Match_Gamma_Eta(original.fESD_Match_Gamma_Eta),
274   fESD_Match_Gamma_Phi(original.fESD_Match_Gamma_Phi),
275   fESD_Match_Gamma_Mass(original.fESD_Match_Gamma_Mass),
276   fESD_Match_Gamma_Width(original.fESD_Match_Gamma_Width),
277   fESD_Match_Gamma_Chi2(original.fESD_Match_Gamma_Chi2),
278   fESD_Match_Gamma_NDF(original.fESD_Match_Gamma_NDF),
279   fESD_Match_Gamma_R(original.fESD_Match_Gamma_R),
280   fESD_Match_Gamma_Z_R(original.fESD_Match_Gamma_Z_R),
281   fESD_Match_Gamma_X_Y(original.fESD_Match_Gamma_X_Y),
282   fESD_Pi0_OpeningAngleGamma(original.fESD_Pi0_OpeningAngleGamma),
283   fESD_Pi0_Energy(original.fESD_Pi0_Energy),
284   fESD_Pi0_Pt(original.fESD_Pi0_Pt),
285   fESD_Pi0_Eta(original.fESD_Pi0_Eta),
286   fESD_Pi0_Phi(original.fESD_Pi0_Phi),
287   fESD_Pi0_Mass(original.fESD_Pi0_Mass),
288   fESD_Pi0_R(original.fESD_Pi0_R),
289   fESD_Pi0_Z_R(original.fESD_Pi0_Z_R),
290   fESD_Pi0_X_Y(original.fESD_Pi0_X_Y),
291   fESD_Eta_OpeningAngleGamma(original.fESD_Eta_OpeningAngleGamma),
292   fESD_Eta_Energy(original.fESD_Eta_Energy),
293   fESD_Eta_Pt(original.fESD_Eta_Pt),
294   fESD_Eta_Eta(original.fESD_Eta_Eta),
295   fESD_Eta_Phi(original.fESD_Eta_Phi),
296   fESD_Eta_Mass(original.fESD_Eta_Mass),
297   fESD_Eta_R(original.fESD_Eta_R),
298   fESD_Eta_Z_R(original.fESD_Eta_Z_R),
299   fESD_Eta_X_Y(original.fESD_Eta_X_Y),
300   fESD_Background_OpeningAngleGamma(original.fESD_Background_OpeningAngleGamma),
301   fESD_Background_Energy(original.fESD_Background_Energy),
302   fESD_Background_Pt(original.fESD_Background_Pt),
303   fESD_Background_Eta(original.fESD_Background_Eta),
304   fESD_Background_Phi(original.fESD_Background_Phi),
305   fESD_Background_Mass(original.fESD_Background_Mass),
306   fESD_Background_R(original.fESD_Background_R),
307   fESD_Background_Z_R(original.fESD_Background_Z_R),
308   fESD_Background_X_Y(original.fESD_Background_X_Y),
309   fResolution_dPt(original.fResolution_dPt),
310   fResolution_dR(original.fResolution_dR),
311   fResolution_dZ(original.fResolution_dZ),
312   fResolution_dR_dPt(original.fResolution_dR_dPt),
313   fResolution_MC_Pt(original.fResolution_MC_Pt),
314   fResolution_MC_R(original.fResolution_MC_R),
315   fResolution_MC_Z(original.fResolution_MC_Z),
316   fResolution_ESD_Pt(original.fResolution_ESD_Pt),
317   fResolution_ESD_R(original.fResolution_ESD_R),
318   fResolution_ESD_Z(original.fResolution_ESD_Z),
319   fNumberOfV0s(original.fNumberOfV0s),
320   fNumberOfSurvivingV0s(original.fNumberOfSurvivingV0s),
321   fV0MassDebugCut1(original.fV0MassDebugCut1),
322   fV0MassDebugCut2(original.fV0MassDebugCut2),
323   fV0MassDebugCut3(original.fV0MassDebugCut3),
324   fV0MassDebugCut4(original.fV0MassDebugCut4),
325   fV0MassDebugCut5(original.fV0MassDebugCut5),
326   fV0MassDebugCut6(original.fV0MassDebugCut6),
327   fV0MassDebugCut7(original.fV0MassDebugCut7),
328   fV0MassDebugCut8(original.fV0MassDebugCut8)
329 {    
330
331 }
332
333
334 AliGammaConversionHistograms & AliGammaConversionHistograms::operator = (const AliGammaConversionHistograms & /*source*/)
335 {
336   // assignment operator
337   return *this;
338 }
339
340
341 AliGammaConversionHistograms::~AliGammaConversionHistograms() {
342   if(fOutputContainer != NULL){ delete fOutputContainer;}
343
344   if(fMC_EP_R != NULL){ delete fMC_EP_R;}
345   if(fMC_EP_Z_R != NULL){ delete fMC_EP_Z_R;}
346   if(fMC_EP_X_Y != NULL){ delete fMC_EP_X_Y;}
347   if(fMC_EP_OpeningAngle != NULL){ delete fMC_EP_OpeningAngle;}
348
349   if(fMC_E_Energy != NULL){ delete fMC_E_Energy;}
350   if(fMC_E_Pt != NULL){ delete fMC_E_Pt;}
351   if(fMC_E_Eta != NULL){ delete fMC_E_Eta;}
352   if(fMC_E_Phi != NULL){ delete fMC_E_Phi;}
353
354   if(fMC_P_Energy != NULL){ delete fMC_P_Energy;}
355   if(fMC_P_Pt != NULL){ delete fMC_P_Pt;}
356   if(fMC_P_Eta != NULL){ delete fMC_P_Eta;}
357   if(fMC_P_Phi != NULL){ delete fMC_P_Phi;}
358
359   if(fMC_Gamma_Energy != NULL){ delete fMC_Gamma_Energy;}
360   if(fMC_Gamma_Pt != NULL){ delete fMC_Gamma_Pt;}
361   if(fMC_Gamma_Eta != NULL){ delete fMC_Gamma_Eta;}
362   if(fMC_Gamma_Phi != NULL){ delete fMC_Gamma_Phi;}
363
364   if(fMC_DirectGamma_Energy != NULL){ delete fMC_DirectGamma_Energy;}
365   if(fMC_DirectGamma_Pt != NULL){ delete fMC_DirectGamma_Pt;}
366   if(fMC_DirectGamma_Eta != NULL){ delete fMC_DirectGamma_Eta;}
367   if(fMC_DirectGamma_Phi != NULL){ delete fMC_DirectGamma_Phi;}
368
369   //mapping
370   for(UInt_t i=0;i<fMC_Mapping.size();i++){
371     for(UInt_t j=0;j<fMC_Mapping[i].size();j++){
372       if(fMC_Mapping[i][j] != NULL){delete fMC_Mapping[i][j];}
373       fMC_Mapping[i][j]=NULL;
374     }
375     fMC_Mapping[i].clear();
376   }
377   fMC_Mapping.clear();
378
379   for(UInt_t i=0;i<fMC_Mapping_Phi.size();i++){
380     if(fMC_Mapping_Phi[i] != NULL){delete fMC_Mapping_Phi[i];}
381     fMC_Mapping_Phi[i]=NULL;
382   }
383   fMC_Mapping_Phi.clear();
384
385   for(UInt_t i=0;i<fMC_Mapping_R.size();i++){
386     if(fMC_Mapping_R[i] != NULL){delete fMC_Mapping_R[i];}
387     fMC_Mapping_R[i]=NULL;
388   }
389   fMC_Mapping_R.clear();
390
391
392   if(fMC_Match_Gamma_Eta != NULL){ delete fMC_Match_Gamma_Eta;}
393   if(fMC_Match_Gamma_Phi != NULL){ delete fMC_Match_Gamma_Phi;}
394   if(fMC_Match_Gamma_Pt != NULL){ delete fMC_Match_Gamma_Pt;}
395   if(fMC_Match_Gamma_Energy != NULL){ delete fMC_Match_Gamma_Energy;}
396   if(fMC_Match_Gamma_Mass != NULL){ delete fMC_Match_Gamma_Mass;}
397   if(fMC_Match_Gamma_OpeningAngle != NULL){ delete fMC_Match_Gamma_OpeningAngle;}
398   if(fMC_Match_Gamma_R != NULL){ delete fMC_Match_Gamma_R;}
399   if(fMC_Match_Gamma_Z_R != NULL){ delete fMC_Match_Gamma_Z_R;}
400   if(fMC_Match_Gamma_X_Y != NULL){ delete fMC_Match_Gamma_X_Y;}
401
402   if(fMC_Pi0_Eta != NULL){ delete fMC_Pi0_Eta;}
403   if(fMC_Pi0_Phi != NULL){ delete fMC_Pi0_Phi;}
404   if(fMC_Pi0_Pt != NULL){ delete fMC_Pi0_Pt;}
405   if(fMC_Pi0_Energy != NULL){ delete fMC_Pi0_Energy;}
406   if(fMC_Pi0_Mass != NULL){ delete fMC_Pi0_Mass;}
407   if(fMC_Pi0_OpeningAngleGamma != NULL){ delete fMC_Pi0_OpeningAngleGamma;}
408   if(fMC_Pi0_R != NULL){ delete fMC_Pi0_R;}
409   if(fMC_Pi0_Z_R != NULL){ delete fMC_Pi0_Z_R;}
410   if(fMC_Pi0_X_Y != NULL){ delete fMC_Pi0_X_Y;}
411   if(fMC_Pi0Secondaries_X_Y != NULL){ delete fMC_Pi0Secondaries_X_Y;}
412
413   if(fMC_Eta_Eta != NULL){ delete fMC_Eta_Eta;}
414   if(fMC_Eta_Phi != NULL){ delete fMC_Eta_Phi;}
415   if(fMC_Eta_Pt != NULL){ delete fMC_Eta_Pt;}
416   if(fMC_Eta_Energy != NULL){ delete fMC_Eta_Energy;}
417   if(fMC_Eta_Mass != NULL){ delete fMC_Eta_Mass;}
418   if(fMC_Eta_OpeningAngleGamma != NULL){ delete fMC_Eta_OpeningAngleGamma;}
419   if(fMC_Eta_R != NULL){ delete fMC_Eta_R;}
420   if(fMC_Eta_Z_R != NULL){ delete fMC_Eta_Z_R;}
421   if(fMC_Eta_X_Y != NULL){ delete fMC_Eta_X_Y;}
422     
423   // Histograms from esd tracks
424   if(fESD_EP_R != NULL){ delete fESD_EP_R;}
425   if(fESD_EP_Z_R != NULL){ delete fESD_EP_Z_R;}
426   if(fESD_EP_X_Y != NULL){ delete fESD_EP_X_Y;}
427   if(fESD_EP_OpeningAngle != NULL){ delete fESD_EP_OpeningAngle;}
428
429   if(fESD_E_Energy != NULL){ delete fESD_E_Energy;}
430   if(fESD_E_Pt != NULL){ delete fESD_E_Pt;}
431   if(fESD_E_Eta != NULL){ delete fESD_E_Eta;}
432   if(fESD_E_Phi != NULL){ delete fESD_E_Phi;}
433
434   if(fESD_P_Energy != NULL){ delete fESD_P_Energy;}
435   if(fESD_P_Pt != NULL){ delete fESD_P_Pt;}
436   if(fESD_P_Eta != NULL){ delete fESD_P_Eta;}
437   if(fESD_P_Phi != NULL){ delete fESD_P_Phi;}
438
439   if(fESD_Gamma_Energy != NULL){ delete fESD_Gamma_Energy;}
440   if(fESD_Gamma_Pt != NULL){ delete fESD_Gamma_Pt;}
441   if(fESD_Gamma_Eta != NULL){ delete fESD_Gamma_Eta;}
442   if(fESD_Gamma_Phi != NULL){ delete fESD_Gamma_Phi;}
443
444   //mapping
445   for(UInt_t i=0;i<fESD_Mapping.size();i++){
446     for(UInt_t j=0;j<fESD_Mapping[i].size();j++){
447       if(fESD_Mapping[i][j] != NULL){delete fESD_Mapping[i][j];}
448       fESD_Mapping[i][j]=NULL;
449     }
450     fESD_Mapping[i].clear();
451   }
452   fESD_Mapping.clear();
453
454   for(UInt_t i=0;i<fESD_Mapping_Phi.size();i++){
455     if(fESD_Mapping_Phi[i] != NULL){delete fESD_Mapping_Phi[i];}
456     fESD_Mapping_Phi[i]=NULL;
457   }
458   fESD_Mapping_Phi.clear();
459
460   for(UInt_t i=0;i<fESD_Mapping_R.size();i++){
461     if(fESD_Mapping_R[i] != NULL){delete fESD_Mapping_R[i];}
462     fESD_Mapping_R[i]=NULL;
463   }
464   fESD_Mapping_R.clear();
465
466   if(fESD_Match_Gamma_OpeningAngle != NULL){ delete fESD_Match_Gamma_OpeningAngle;}
467   if(fESD_Match_Gamma_Energy != NULL){ delete fESD_Match_Gamma_Energy;}
468   if(fESD_Match_Gamma_Pt != NULL){ delete fESD_Match_Gamma_Pt;}
469   if(fESD_Match_Gamma_Eta != NULL){ delete fESD_Match_Gamma_Eta;}
470   if(fESD_Match_Gamma_Phi != NULL){ delete fESD_Match_Gamma_Phi;}
471   if(fESD_Match_Gamma_Mass != NULL){ delete fESD_Match_Gamma_Mass;}
472   if(fESD_Match_Gamma_Width != NULL){ delete fESD_Match_Gamma_Width;}
473   if(fESD_Match_Gamma_Chi2 != NULL){ delete fESD_Match_Gamma_Chi2;}
474   if(fESD_Match_Gamma_NDF != NULL){ delete fESD_Match_Gamma_NDF;}
475   if(fESD_Match_Gamma_R != NULL){ delete fESD_Match_Gamma_R;}
476   if(fESD_Match_Gamma_Z_R != NULL){ delete fESD_Match_Gamma_Z_R;}
477   if(fESD_Match_Gamma_X_Y != NULL){ delete fESD_Match_Gamma_X_Y;}
478
479   if(fESD_Pi0_OpeningAngleGamma != NULL){ delete fESD_Pi0_OpeningAngleGamma;}
480   if(fESD_Pi0_Energy != NULL){ delete fESD_Pi0_Energy;}
481   if(fESD_Pi0_Pt != NULL){ delete fESD_Pi0_Pt;}
482   if(fESD_Pi0_Eta != NULL){ delete fESD_Pi0_Eta;}
483   if(fESD_Pi0_Phi != NULL){ delete fESD_Pi0_Phi;}
484   if(fESD_Pi0_Mass != NULL){ delete fESD_Pi0_Mass;}
485   if(fESD_Pi0_R != NULL){ delete fESD_Pi0_R;}
486   if(fESD_Pi0_Z_R != NULL){ delete fESD_Pi0_Z_R;}
487   if(fESD_Pi0_X_Y != NULL){ delete fESD_Pi0_X_Y;}
488
489   if(fESD_Eta_OpeningAngleGamma != NULL){ delete fESD_Eta_OpeningAngleGamma;}
490   if(fESD_Eta_Energy != NULL){ delete fESD_Eta_Energy;}
491   if(fESD_Eta_Pt != NULL){ delete fESD_Eta_Pt;}
492   if(fESD_Eta_Eta != NULL){ delete fESD_Eta_Eta;}
493   if(fESD_Eta_Phi != NULL){ delete fESD_Eta_Phi;}
494   if(fESD_Eta_Mass != NULL){ delete fESD_Eta_Mass;}
495   if(fESD_Eta_R != NULL){ delete fESD_Eta_R;}
496   if(fESD_Eta_Z_R != NULL){ delete fESD_Eta_Z_R;}
497   if(fESD_Eta_X_Y != NULL){ delete fESD_Eta_X_Y;}
498
499   if(fESD_Background_OpeningAngleGamma != NULL){ delete fESD_Background_OpeningAngleGamma;}
500   if(fESD_Background_Energy != NULL){ delete fESD_Background_Energy;}
501   if(fESD_Background_Pt != NULL){ delete fESD_Background_Pt;}
502   if(fESD_Background_Eta != NULL){ delete fESD_Background_Eta;}
503   if(fESD_Background_Phi != NULL){ delete fESD_Background_Phi;}
504   if(fESD_Background_Mass != NULL){ delete fESD_Background_Mass;}
505   if(fESD_Background_R != NULL){ delete fESD_Background_R;}
506   if(fESD_Background_Z_R != NULL){ delete fESD_Background_Z_R;}
507   if(fESD_Background_X_Y != NULL){ delete fESD_Background_X_Y;}
508
509   if(fResolution_dPt != NULL){ delete fResolution_dPt;}
510   if(fResolution_dR != NULL){ delete fResolution_dR;}
511   if(fResolution_dZ != NULL){ delete fResolution_dZ;}
512   if(fResolution_dR_dPt != NULL){ delete fResolution_dR_dPt;}
513   if(fResolution_MC_Pt != NULL){ delete fResolution_MC_Pt;}
514   if(fResolution_MC_R != NULL){ delete fResolution_MC_R;}
515   if(fResolution_MC_Z != NULL){ delete fResolution_MC_Z;}
516   if(fResolution_ESD_Pt != NULL){ delete fResolution_ESD_Pt;}
517   if(fResolution_ESD_R != NULL){ delete fResolution_ESD_R;}
518   if(fResolution_ESD_Z != NULL){ delete fResolution_ESD_Z;}
519   
520   if(fNumberOfV0s != NULL){delete fNumberOfV0s;}
521   if(fNumberOfSurvivingV0s != NULL){delete fNumberOfSurvivingV0s;}
522   if(fV0MassDebugCut1 != NULL){delete fV0MassDebugCut1;}
523   if(fV0MassDebugCut2 != NULL){delete fV0MassDebugCut2;}
524   if(fV0MassDebugCut3 != NULL){delete fV0MassDebugCut3;}
525   if(fV0MassDebugCut4 != NULL){delete fV0MassDebugCut4;}
526   if(fV0MassDebugCut5 != NULL){delete fV0MassDebugCut5;}
527   if(fV0MassDebugCut6 != NULL){delete fV0MassDebugCut6;}
528   if(fV0MassDebugCut7 != NULL){delete fV0MassDebugCut7;}
529   if(fV0MassDebugCut8 != NULL){delete fV0MassDebugCut8;}
530
531 }
532
533
534 TList * AliGammaConversionHistograms::GetOutputContainer(){
535   //checking if the container is alrerady created
536   if(fOutputContainer != NULL){
537     delete fOutputContainer;
538     fOutputContainer=NULL;
539   }
540   fOutputContainer = new TList();
541   TList*  fMappingContainer = new TList();
542   fMappingContainer->SetName("Mapping Histograms");
543
544   if(fMC_EP_R != NULL){ fOutputContainer->Add(fMC_EP_R);}
545   if(fMC_EP_Z_R != NULL){ fOutputContainer->Add(fMC_EP_Z_R);}
546   if(fMC_EP_X_Y != NULL){ fOutputContainer->Add(fMC_EP_X_Y);}
547   if(fMC_EP_OpeningAngle != NULL){ fOutputContainer->Add(fMC_EP_OpeningAngle);}
548
549   if(fMC_E_Energy != NULL){ fOutputContainer->Add(fMC_E_Energy);}
550   if(fMC_E_Pt != NULL){ fOutputContainer->Add(fMC_E_Pt);}
551   if(fMC_E_Eta != NULL){ fOutputContainer->Add(fMC_E_Eta);}
552   if(fMC_E_Phi != NULL){ fOutputContainer->Add(fMC_E_Phi);}
553
554   if(fMC_P_Energy != NULL){ fOutputContainer->Add(fMC_P_Energy);}
555   if(fMC_P_Pt != NULL){ fOutputContainer->Add(fMC_P_Pt);}
556   if(fMC_P_Eta != NULL){ fOutputContainer->Add(fMC_P_Eta);}
557   if(fMC_P_Phi != NULL){ fOutputContainer->Add(fMC_P_Phi);}
558
559   if(fMC_Gamma_Energy != NULL){ fOutputContainer->Add(fMC_Gamma_Energy);}
560   if(fMC_Gamma_Pt != NULL){ fOutputContainer->Add(fMC_Gamma_Pt);}
561   if(fMC_Gamma_Eta != NULL){ fOutputContainer->Add(fMC_Gamma_Eta);}
562   if(fMC_Gamma_Phi != NULL){ fOutputContainer->Add(fMC_Gamma_Phi);}
563
564   if(fMC_DirectGamma_Energy != NULL){ fOutputContainer->Add(fMC_DirectGamma_Energy);}
565   if(fMC_DirectGamma_Pt != NULL){ fOutputContainer->Add(fMC_DirectGamma_Pt);}
566   if(fMC_DirectGamma_Eta != NULL){ fOutputContainer->Add(fMC_DirectGamma_Eta);}
567   if(fMC_DirectGamma_Phi != NULL){ fOutputContainer->Add(fMC_DirectGamma_Phi);}
568
569   //mapping
570   for(UInt_t i=0;i<fMC_Mapping.size();i++){
571     for(UInt_t j=0;j<fMC_Mapping[i].size();j++){
572       if(fMC_Mapping[i][j] != NULL){fMappingContainer->Add(fMC_Mapping[i][j]);}
573     }
574   }
575   for(UInt_t i=0;i<fMC_Mapping_Phi.size();i++){
576     if(fMC_Mapping_Phi[i] != NULL){fMappingContainer->Add(fMC_Mapping_Phi[i]);}
577   }
578   for(UInt_t i=0;i<fMC_Mapping_R.size();i++){
579     if(fMC_Mapping_R[i] != NULL){fMappingContainer->Add(fMC_Mapping_R[i]);}
580   }
581   if(fMC_Match_Gamma_Eta != NULL){ fOutputContainer->Add(fMC_Match_Gamma_Eta);}
582   if(fMC_Match_Gamma_Phi != NULL){ fOutputContainer->Add(fMC_Match_Gamma_Phi);}
583   if(fMC_Match_Gamma_Pt != NULL){ fOutputContainer->Add(fMC_Match_Gamma_Pt);}
584   if(fMC_Match_Gamma_Energy != NULL){ fOutputContainer->Add(fMC_Match_Gamma_Energy);}
585   if(fMC_Match_Gamma_Mass != NULL){ fOutputContainer->Add(fMC_Match_Gamma_Mass);}
586   if(fMC_Match_Gamma_OpeningAngle != NULL){ fOutputContainer->Add(fMC_Match_Gamma_OpeningAngle);}
587   if(fMC_Match_Gamma_R != NULL){ fOutputContainer->Add(fMC_Match_Gamma_R);}
588   if(fMC_Match_Gamma_Z_R != NULL){ fOutputContainer->Add(fMC_Match_Gamma_Z_R);}
589   if(fMC_Match_Gamma_X_Y != NULL){ fOutputContainer->Add(fMC_Match_Gamma_X_Y);}
590
591   if(fMC_Pi0_Eta != NULL){ fOutputContainer->Add(fMC_Pi0_Eta);}
592   if(fMC_Pi0_Phi != NULL){ fOutputContainer->Add(fMC_Pi0_Phi);}
593   if(fMC_Pi0_Pt != NULL){ fOutputContainer->Add(fMC_Pi0_Pt);}
594   if(fMC_Pi0_Energy != NULL){ fOutputContainer->Add(fMC_Pi0_Energy);}
595   if(fMC_Pi0_Mass != NULL){ fOutputContainer->Add(fMC_Pi0_Mass);}
596   if(fMC_Pi0_OpeningAngleGamma != NULL){ fOutputContainer->Add(fMC_Pi0_OpeningAngleGamma);}
597   if(fMC_Pi0_R != NULL){ fOutputContainer->Add(fMC_Pi0_R);}
598   if(fMC_Pi0_Z_R != NULL){ fOutputContainer->Add(fMC_Pi0_Z_R);}
599   if(fMC_Pi0_X_Y != NULL){ fOutputContainer->Add(fMC_Pi0_X_Y);}
600   if(fMC_Pi0Secondaries_X_Y != NULL){ fOutputContainer->Add(fMC_Pi0Secondaries_X_Y);}
601
602   if(fMC_Eta_Eta != NULL){ fOutputContainer->Add(fMC_Eta_Eta);}
603   if(fMC_Eta_Phi != NULL){ fOutputContainer->Add(fMC_Eta_Phi);}
604   if(fMC_Eta_Pt != NULL){ fOutputContainer->Add(fMC_Eta_Pt);}
605   if(fMC_Eta_Energy != NULL){ fOutputContainer->Add(fMC_Eta_Energy);}
606   if(fMC_Eta_Mass != NULL){ fOutputContainer->Add(fMC_Eta_Mass);}
607   if(fMC_Eta_OpeningAngleGamma != NULL){ fOutputContainer->Add(fMC_Eta_OpeningAngleGamma);}
608   if(fMC_Eta_R != NULL){ fOutputContainer->Add(fMC_Eta_R);}
609   if(fMC_Eta_Z_R != NULL){ fOutputContainer->Add(fMC_Eta_Z_R);}
610   if(fMC_Eta_X_Y != NULL){ fOutputContainer->Add(fMC_Eta_X_Y);}
611     
612   // Histograms from esd tracks
613   if(fESD_EP_R != NULL){ fOutputContainer->Add(fESD_EP_R);}
614   if(fESD_EP_Z_R != NULL){ fOutputContainer->Add(fESD_EP_Z_R);}
615   if(fESD_EP_X_Y != NULL){ fOutputContainer->Add(fESD_EP_X_Y);}
616   if(fESD_EP_OpeningAngle != NULL){ fOutputContainer->Add(fESD_EP_OpeningAngle);}
617
618   if(fESD_E_Energy != NULL){ fOutputContainer->Add(fESD_E_Energy);}
619   if(fESD_E_Pt != NULL){ fOutputContainer->Add(fESD_E_Pt);}
620   if(fESD_E_Eta != NULL){ fOutputContainer->Add(fESD_E_Eta);}
621   if(fESD_E_Phi != NULL){ fOutputContainer->Add(fESD_E_Phi);}
622
623   if(fESD_P_Energy != NULL){ fOutputContainer->Add(fESD_P_Energy);}
624   if(fESD_P_Pt != NULL){ fOutputContainer->Add(fESD_P_Pt);}
625   if(fESD_P_Eta != NULL){ fOutputContainer->Add(fESD_P_Eta);}
626   if(fESD_P_Phi != NULL){ fOutputContainer->Add(fESD_P_Phi);}
627
628   if(fESD_Gamma_Energy != NULL){ fOutputContainer->Add(fESD_Gamma_Energy);}
629   if(fESD_Gamma_Pt != NULL){ fOutputContainer->Add(fESD_Gamma_Pt);}
630   if(fESD_Gamma_Eta != NULL){ fOutputContainer->Add(fESD_Gamma_Eta);}
631   if(fESD_Gamma_Phi != NULL){ fOutputContainer->Add(fESD_Gamma_Phi);}
632
633   //mapping
634   for(UInt_t i=0;i<fESD_Mapping.size();i++){
635     for(UInt_t j=0;j<fESD_Mapping[i].size();j++){
636       if(fESD_Mapping[i][j] != NULL){fMappingContainer->Add(fESD_Mapping[i][j]);}
637     }
638   }
639   for(UInt_t i=0;i<fESD_Mapping_Phi.size();i++){
640     if(fESD_Mapping_Phi[i] != NULL){fMappingContainer->Add(fESD_Mapping_Phi[i]);}
641   }
642   for(UInt_t i=0;i<fESD_Mapping_R.size();i++){
643     if(fESD_Mapping_R[i] != NULL){fMappingContainer->Add(fESD_Mapping_R[i]);}
644   }
645
646   fOutputContainer->Add(fMappingContainer);
647
648   if(fESD_Match_Gamma_OpeningAngle != NULL){ fOutputContainer->Add(fESD_Match_Gamma_OpeningAngle);}
649   if(fESD_Match_Gamma_Energy != NULL){ fOutputContainer->Add(fESD_Match_Gamma_Energy);}
650   if(fESD_Match_Gamma_Pt != NULL){ fOutputContainer->Add(fESD_Match_Gamma_Pt);}
651   if(fESD_Match_Gamma_Eta != NULL){ fOutputContainer->Add(fESD_Match_Gamma_Eta);}
652   if(fESD_Match_Gamma_Phi != NULL){ fOutputContainer->Add(fESD_Match_Gamma_Phi);}
653   if(fESD_Match_Gamma_Mass != NULL){ fOutputContainer->Add(fESD_Match_Gamma_Mass);}
654   if(fESD_Match_Gamma_Width != NULL){ fOutputContainer->Add(fESD_Match_Gamma_Width);}
655   if(fESD_Match_Gamma_Chi2 != NULL){ fOutputContainer->Add(fESD_Match_Gamma_Chi2);}
656   if(fESD_Match_Gamma_NDF != NULL){ fOutputContainer->Add(fESD_Match_Gamma_NDF);}
657   if(fESD_Match_Gamma_R != NULL){ fOutputContainer->Add(fESD_Match_Gamma_R);}
658   if(fESD_Match_Gamma_Z_R != NULL){ fOutputContainer->Add(fESD_Match_Gamma_Z_R);}
659   if(fESD_Match_Gamma_X_Y != NULL){ fOutputContainer->Add(fESD_Match_Gamma_X_Y);}
660
661   if(fESD_Pi0_OpeningAngleGamma != NULL){ fOutputContainer->Add(fESD_Pi0_OpeningAngleGamma);}
662   if(fESD_Pi0_Energy != NULL){ fOutputContainer->Add(fESD_Pi0_Energy);}
663   if(fESD_Pi0_Pt != NULL){ fOutputContainer->Add(fESD_Pi0_Pt);}
664   if(fESD_Pi0_Eta != NULL){ fOutputContainer->Add(fESD_Pi0_Eta);}
665   if(fESD_Pi0_Phi != NULL){ fOutputContainer->Add(fESD_Pi0_Phi);}
666   if(fESD_Pi0_Mass != NULL){ fOutputContainer->Add(fESD_Pi0_Mass);}
667   if(fESD_Pi0_R != NULL){ fOutputContainer->Add(fESD_Pi0_R);}
668   if(fESD_Pi0_Z_R != NULL){ fOutputContainer->Add(fESD_Pi0_Z_R);}
669   if(fESD_Pi0_X_Y != NULL){ fOutputContainer->Add(fESD_Pi0_X_Y);}
670
671   if(fESD_Eta_OpeningAngleGamma != NULL){ fOutputContainer->Add(fESD_Eta_OpeningAngleGamma);}
672   if(fESD_Eta_Energy != NULL){ fOutputContainer->Add(fESD_Eta_Energy);}
673   if(fESD_Eta_Pt != NULL){ fOutputContainer->Add(fESD_Eta_Pt);}
674   if(fESD_Eta_Eta != NULL){ fOutputContainer->Add(fESD_Eta_Eta);}
675   if(fESD_Eta_Phi != NULL){ fOutputContainer->Add(fESD_Eta_Phi);}
676   if(fESD_Eta_Mass != NULL){ fOutputContainer->Add(fESD_Eta_Mass);}
677   if(fESD_Eta_R != NULL){ fOutputContainer->Add(fESD_Eta_R);}
678   if(fESD_Eta_Z_R != NULL){ fOutputContainer->Add(fESD_Eta_Z_R);}
679   if(fESD_Eta_X_Y != NULL){ fOutputContainer->Add(fESD_Eta_X_Y);}
680
681   if(fESD_Background_OpeningAngleGamma != NULL){ fOutputContainer->Add(fESD_Background_OpeningAngleGamma);}
682   if(fESD_Background_Energy != NULL){ fOutputContainer->Add(fESD_Background_Energy);}
683   if(fESD_Background_Pt != NULL){ fOutputContainer->Add(fESD_Background_Pt);}
684   if(fESD_Background_Eta != NULL){ fOutputContainer->Add(fESD_Background_Eta);}
685   if(fESD_Background_Phi != NULL){ fOutputContainer->Add(fESD_Background_Phi);}
686   if(fESD_Background_Mass != NULL){ fOutputContainer->Add(fESD_Background_Mass);}
687   if(fESD_Background_R != NULL){ fOutputContainer->Add(fESD_Background_R);}
688   if(fESD_Background_Z_R != NULL){ fOutputContainer->Add(fESD_Background_Z_R);}
689   if(fESD_Background_X_Y != NULL){ fOutputContainer->Add(fESD_Background_X_Y);}
690
691   if(fResolution_dPt != NULL){ fOutputContainer->Add(fResolution_dPt);}
692   if(fResolution_dR != NULL){ fOutputContainer->Add(fResolution_dR);}
693   if(fResolution_dZ != NULL){ fOutputContainer->Add(fResolution_dZ);}
694   if(fResolution_dR_dPt != NULL){ fOutputContainer->Add(fResolution_dR_dPt);}
695   if(fResolution_MC_Pt != NULL){ fOutputContainer->Add(fResolution_MC_Pt);}
696   if(fResolution_MC_R != NULL){ fOutputContainer->Add(fResolution_MC_R);}
697   if(fResolution_MC_Z != NULL){ fOutputContainer->Add(fResolution_MC_Z);}
698   if(fResolution_ESD_Pt != NULL){ fOutputContainer->Add(fResolution_ESD_Pt);}
699   if(fResolution_ESD_R != NULL){ fOutputContainer->Add(fResolution_ESD_R);}
700   if(fResolution_ESD_Z != NULL){ fOutputContainer->Add(fResolution_ESD_Z);}
701
702   if(fNumberOfV0s != NULL){fOutputContainer->Add(fNumberOfV0s);}
703   if(fNumberOfSurvivingV0s != NULL){fOutputContainer->Add(fNumberOfSurvivingV0s);}
704   if(fV0MassDebugCut1 != NULL){fOutputContainer->Add(fV0MassDebugCut1);}
705   if(fV0MassDebugCut2 != NULL){fOutputContainer->Add(fV0MassDebugCut2);}
706   if(fV0MassDebugCut3 != NULL){fOutputContainer->Add(fV0MassDebugCut3);}
707   if(fV0MassDebugCut4 != NULL){fOutputContainer->Add(fV0MassDebugCut4);}
708   if(fV0MassDebugCut5 != NULL){fOutputContainer->Add(fV0MassDebugCut5);}
709   if(fV0MassDebugCut6 != NULL){fOutputContainer->Add(fV0MassDebugCut6);}
710   if(fV0MassDebugCut7 != NULL){fOutputContainer->Add(fV0MassDebugCut7);}
711   if(fV0MassDebugCut8 != NULL){fOutputContainer->Add(fV0MassDebugCut8);}
712
713   return fOutputContainer;
714 }
715
716 Int_t AliGammaConversionHistograms::GetRBin(Double_t radius){
717   Int_t iResult=0;
718   if(fDeltaR>0){
719     iResult = (Int_t)((radius - fMinRadius)/fDeltaR);
720   }
721   return iResult;
722 }
723
724 Int_t AliGammaConversionHistograms::GetPhiBin(Double_t phi){
725   Int_t iResult=0;
726   if(fDeltaPhi>0){
727     if(phi>TMath::Pi()){
728       phi-=2*TMath::Pi();
729     }
730     iResult = (Int_t)((phi - fMinPhi)/fDeltaPhi);
731   }
732   return iResult;
733 }
734
735
736
737 // Initializing the valuse for the mapping
738 void AliGammaConversionHistograms::Initialize_MappingValues(Int_t nPhiIndex, Int_t nRIndex, Int_t nBinsR, Double_t minRadius, Double_t maxRadius,Int_t nBinsPhi, Double_t minPhi, Double_t maxPhi){
739   fNPhiIndex = nPhiIndex;
740   fNRIndex   = nRIndex;
741   fMinRadius      = minRadius;
742   fMaxRadius      = maxRadius;
743   if(nBinsR>0){
744     fDeltaR       = (fMaxRadius - fMinRadius)/nRIndex;
745   }
746   fMinPhi         = minPhi;
747   fMaxPhi         = maxPhi;
748   if(nBinsPhi>0){
749     fDeltaPhi     = (fMaxPhi-fMinPhi)/nPhiIndex;
750   }
751 }
752
753 //Initializing functions for the histograms
754 void AliGammaConversionHistograms::Initialize_MC_EP_R(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
755   fMC_EP_R = new TH1F("MC_EP_R", "", nXBins, firstX, lastX);
756   fMC_EP_R->GetXaxis()->SetTitle(xAxisTitle);
757   fMC_EP_R->GetYaxis()->SetTitle(yAxisTitle);
758 }
759
760 void AliGammaConversionHistograms::Initialize_MC_EP_Z_R(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
761   fMC_EP_Z_R = new TH2F("MC_EP_Z_R", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
762   fMC_EP_Z_R->GetXaxis()->SetTitle(xAxisTitle);
763   fMC_EP_Z_R->GetYaxis()->SetTitle(yAxisTitle);
764 }
765
766 void AliGammaConversionHistograms::Initialize_MC_EP_X_Y(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
767   fMC_EP_X_Y = new TH2F("MC_EP_X_Y", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
768   fMC_EP_X_Y->GetXaxis()->SetTitle(xAxisTitle);
769   fMC_EP_X_Y->GetYaxis()->SetTitle(yAxisTitle);
770 }
771
772 void AliGammaConversionHistograms::Initialize_MC_EP_OpeningAngle(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
773   fMC_EP_OpeningAngle = new TH1F("MC_EP_OpeningAngle", "", nXBins, firstX, lastX);
774   fMC_EP_OpeningAngle->GetXaxis()->SetTitle(xAxisTitle);
775   fMC_EP_OpeningAngle->GetYaxis()->SetTitle(yAxisTitle);
776 }
777
778 void AliGammaConversionHistograms::Initialize_MC_E_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
779   fMC_E_Energy = new TH1F("MC_E_Energy", "", nXBins, firstX, lastX);
780   fMC_E_Energy->GetXaxis()->SetTitle(xAxisTitle);
781   fMC_E_Energy->GetYaxis()->SetTitle(yAxisTitle);
782 }
783
784 void AliGammaConversionHistograms::Initialize_MC_E_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
785   fMC_E_Pt = new TH1F("MC_E_Pt", "", nXBins, firstX, lastX);
786   fMC_E_Pt->GetXaxis()->SetTitle(xAxisTitle);
787   fMC_E_Pt->GetYaxis()->SetTitle(yAxisTitle);
788 }
789
790 void AliGammaConversionHistograms::Initialize_MC_E_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
791   fMC_E_Eta = new TH1F("MC_E_Eta", "", nXBins, firstX, lastX);
792   fMC_E_Eta->GetXaxis()->SetTitle(xAxisTitle);
793   fMC_E_Eta->GetYaxis()->SetTitle(yAxisTitle);
794 }
795
796 void AliGammaConversionHistograms::Initialize_MC_E_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
797   fMC_E_Phi = new TH1F("MC_E_Phi", "", nXBins, firstX, lastX);
798   fMC_E_Phi->GetXaxis()->SetTitle(xAxisTitle);
799   fMC_E_Phi->GetYaxis()->SetTitle(yAxisTitle);
800 }
801
802 void AliGammaConversionHistograms::Initialize_MC_P_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
803   fMC_P_Energy = new TH1F("MC_P_Energy", "", nXBins, firstX, lastX);
804   fMC_P_Energy->GetXaxis()->SetTitle(xAxisTitle);
805   fMC_P_Energy->GetYaxis()->SetTitle(yAxisTitle);
806 }
807
808 void AliGammaConversionHistograms::Initialize_MC_P_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
809   fMC_P_Pt = new TH1F("MC_P_Pt", "", nXBins, firstX, lastX);
810   fMC_P_Pt->GetXaxis()->SetTitle(xAxisTitle);
811   fMC_P_Pt->GetYaxis()->SetTitle(yAxisTitle);
812 }
813
814 void AliGammaConversionHistograms::Initialize_MC_P_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
815   fMC_P_Eta = new TH1F("MC_P_Eta", "", nXBins, firstX, lastX);
816   fMC_P_Eta->GetXaxis()->SetTitle(xAxisTitle);
817   fMC_P_Eta->GetYaxis()->SetTitle(yAxisTitle);
818 }
819
820 void AliGammaConversionHistograms::Initialize_MC_P_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
821   fMC_P_Phi = new TH1F("MC_P_Phi", "", nXBins, firstX, lastX);
822   fMC_P_Phi->GetXaxis()->SetTitle(xAxisTitle);
823   fMC_P_Phi->GetYaxis()->SetTitle(yAxisTitle);
824 }
825
826 void AliGammaConversionHistograms::Initialize_MC_Gamma_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
827   fMC_Gamma_Energy = new TH1F("MC_Gamma_Energy", "", nXBins, firstX, lastX);
828   fMC_Gamma_Energy->GetXaxis()->SetTitle(xAxisTitle);
829   fMC_Gamma_Energy->GetYaxis()->SetTitle(yAxisTitle);
830 }
831
832 void AliGammaConversionHistograms::Initialize_MC_Gamma_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
833   fMC_Gamma_Pt = new TH1F("MC_Gamma_Pt", "", nXBins, firstX, lastX);
834   fMC_Gamma_Pt->GetXaxis()->SetTitle(xAxisTitle);
835   fMC_Gamma_Pt->GetYaxis()->SetTitle(yAxisTitle);
836 }
837
838 void AliGammaConversionHistograms::Initialize_MC_Gamma_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
839   fMC_Gamma_Eta = new TH1F("MC_Gamma_Eta", "", nXBins, firstX, lastX);
840   fMC_Gamma_Eta->GetXaxis()->SetTitle(xAxisTitle);
841   fMC_Gamma_Eta->GetYaxis()->SetTitle(yAxisTitle);
842 }
843
844 void AliGammaConversionHistograms::Initialize_MC_Gamma_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
845   fMC_Gamma_Phi = new TH1F("MC_Gamma_Phi", "", nXBins, firstX, lastX);
846   fMC_Gamma_Phi->GetXaxis()->SetTitle(xAxisTitle);
847   fMC_Gamma_Phi->GetYaxis()->SetTitle(yAxisTitle);
848 }
849
850 void AliGammaConversionHistograms::Initialize_MC_DirectGamma_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
851   fMC_DirectGamma_Energy = new TH1F("MC_DirectGamma_Energy", "", nXBins, firstX, lastX);
852   fMC_DirectGamma_Energy->GetXaxis()->SetTitle(xAxisTitle);
853   fMC_DirectGamma_Energy->GetYaxis()->SetTitle(yAxisTitle);
854 }
855
856 void AliGammaConversionHistograms::Initialize_MC_DirectGamma_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
857   fMC_DirectGamma_Pt = new TH1F("MC_DirectGamma_Pt", "", nXBins, firstX, lastX);
858   fMC_DirectGamma_Pt->GetXaxis()->SetTitle(xAxisTitle);
859   fMC_DirectGamma_Pt->GetYaxis()->SetTitle(yAxisTitle);
860 }
861
862 void AliGammaConversionHistograms::Initialize_MC_DirectGamma_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
863   fMC_DirectGamma_Eta = new TH1F("MC_DirectGamma_Eta", "", nXBins, firstX, lastX);
864   fMC_DirectGamma_Eta->GetXaxis()->SetTitle(xAxisTitle);
865   fMC_DirectGamma_Eta->GetYaxis()->SetTitle(yAxisTitle);
866 }
867
868 void AliGammaConversionHistograms::Initialize_MC_DirectGamma_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
869   fMC_DirectGamma_Phi = new TH1F("MC_DirectGamma_Phi", "", nXBins, firstX, lastX);
870   fMC_DirectGamma_Phi->GetXaxis()->SetTitle(xAxisTitle);
871   fMC_DirectGamma_Phi->GetYaxis()->SetTitle(yAxisTitle);
872 }
873
874 //mapping
875
876
877 void AliGammaConversionHistograms::Initialize_MappingHistograms(Int_t nPhiIndex, Int_t nRIndex,Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
878   
879   for(Int_t phi =0; phi<=fNPhiIndex;phi++){
880     AliConversionMappingVector tmpRowMC;
881     AliConversionMappingVector tmpRowESD;
882     for(Int_t r =0; r<fNRIndex;r++){
883       //MC
884       Char_t nameMC[100];
885       sprintf(nameMC,"MC_EP_Mapping-Phi%02d-R%02d",phi,r);
886       TH2F * tmpMC = new TH2F(nameMC,nameMC,nXBins,firstX,lastX,nYBins,firstY,lastY);
887       tmpMC->SetXTitle(xAxisTitle);
888       tmpMC->SetYTitle(yAxisTitle);
889       tmpRowMC.push_back(tmpMC);
890       //ESD
891       Char_t nameESD[100];
892       sprintf(nameESD,"ESD_EP_Mapping-Phi%02d-R%02d",phi,r);
893       TH2F * tmpESD = new TH2F(nameESD,nameESD,nXBins,firstX,lastX,nYBins,firstY,lastY);
894       tmpESD->SetXTitle(xAxisTitle);
895       tmpESD->SetYTitle(yAxisTitle);
896       tmpRowESD.push_back(tmpESD);
897     }
898     fMC_Mapping.push_back(tmpRowMC);
899     fESD_Mapping.push_back(tmpRowESD);
900   }
901
902   for(Int_t phi =0; phi<=nPhiIndex;phi++){ 
903     //MC
904     Char_t nameMC[100];
905     sprintf(nameMC,"MC_EP_Mapping-Phi%02d",phi);
906     TH2F * tmpMC = new TH2F(nameMC,nameMC,nXBins,firstX,lastX,nYBins,firstY,lastY);
907     tmpMC->SetXTitle(xAxisTitle);
908     tmpMC->SetYTitle(yAxisTitle);
909     fMC_Mapping_Phi.push_back(tmpMC);
910     //ESD
911     Char_t nameESD[100];
912     sprintf(nameESD,"ESD_EP_Mapping-Phi%02d",phi);
913     TH2F * tmpESD = new TH2F(nameESD,nameESD,nXBins,firstX,lastX,nYBins,firstY,lastY);
914     tmpESD->SetXTitle(xAxisTitle);
915     tmpESD->SetYTitle(yAxisTitle);
916     fESD_Mapping_Phi.push_back(tmpESD);   
917   }
918   for(Int_t r =0; r<=nRIndex;r++){
919     //MC
920     Char_t nameMC[100];
921     sprintf(nameMC,"MC_EP_Mapping-R%02d",r);
922     TH2F * tmpMC = new TH2F(nameMC,nameMC,nXBins,firstX,lastX,nYBins,firstY,lastY);
923     tmpMC->SetXTitle(xAxisTitle);
924     tmpMC->SetYTitle(yAxisTitle);
925     fMC_Mapping_R.push_back(tmpMC);
926     //ESD
927     Char_t nameESD[100];
928     sprintf(nameESD,"ESD_EP_Mapping-R%02d",r);
929     TH2F * tmpESD = new TH2F(nameESD,nameESD,nXBins,firstX,lastX,nYBins,firstY,lastY);
930     tmpESD->SetXTitle(xAxisTitle);
931     tmpESD->SetYTitle(yAxisTitle);
932     fESD_Mapping_R.push_back(tmpESD);
933   }
934 }
935
936 void AliGammaConversionHistograms::Initialize_MC_Match_Gamma_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
937   fMC_Match_Gamma_Eta = new TH1F("MC_Match_Gamma_Eta", "", nXBins, firstX, lastX);
938   fMC_Match_Gamma_Eta->GetXaxis()->SetTitle(xAxisTitle);
939   fMC_Match_Gamma_Eta->GetYaxis()->SetTitle(yAxisTitle);
940 }
941
942 void AliGammaConversionHistograms::Initialize_MC_Match_Gamma_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
943   fMC_Match_Gamma_Phi = new TH1F("MC_Match_Gamma_Phi", "", nXBins, firstX, lastX);
944   fMC_Match_Gamma_Phi->GetXaxis()->SetTitle(xAxisTitle);
945   fMC_Match_Gamma_Phi->GetYaxis()->SetTitle(yAxisTitle);
946 }
947
948 void AliGammaConversionHistograms::Initialize_MC_Match_Gamma_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
949   fMC_Match_Gamma_Pt = new TH1F("MC_Match_Gamma_Pt", "", nXBins, firstX, lastX);
950   fMC_Match_Gamma_Pt->GetXaxis()->SetTitle(xAxisTitle);
951   fMC_Match_Gamma_Pt->GetYaxis()->SetTitle(yAxisTitle);
952 }
953
954 void AliGammaConversionHistograms::Initialize_MC_Match_Gamma_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
955   fMC_Match_Gamma_Energy = new TH1F("MC_Match_Gamma_Energy", "", nXBins, firstX, lastX);
956   fMC_Match_Gamma_Energy->GetXaxis()->SetTitle(xAxisTitle);
957   fMC_Match_Gamma_Energy->GetYaxis()->SetTitle(yAxisTitle);
958 }
959
960 void AliGammaConversionHistograms::Initialize_MC_Match_Gamma_Mass(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
961   fMC_Match_Gamma_Mass = new TH1F("MC_Match_Gamma_Mass", "", nXBins, firstX, lastX);
962   fMC_Match_Gamma_Mass->GetXaxis()->SetTitle(xAxisTitle);
963   fMC_Match_Gamma_Mass->GetYaxis()->SetTitle(yAxisTitle);
964 }
965
966 void AliGammaConversionHistograms::Initialize_MC_Match_Gamma_OpeningAngle(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
967   fMC_Match_Gamma_OpeningAngle = new TH1F("MC_Match_Gamma_OpeningAngle", "", nXBins, firstX, lastX);
968   fMC_Match_Gamma_OpeningAngle->GetXaxis()->SetTitle(xAxisTitle);
969   fMC_Match_Gamma_OpeningAngle->GetYaxis()->SetTitle(yAxisTitle);
970 }
971
972 void AliGammaConversionHistograms::Initialize_MC_Match_Gamma_R(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
973   fMC_Match_Gamma_R = new TH1F("MC_Match_Gamma_R", "", nXBins, firstX, lastX);
974   fMC_Match_Gamma_R->GetXaxis()->SetTitle(xAxisTitle);
975   fMC_Match_Gamma_R->GetYaxis()->SetTitle(yAxisTitle);
976 }
977
978 void AliGammaConversionHistograms::Initialize_MC_Match_Gamma_Z_R(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
979   fMC_Match_Gamma_Z_R = new TH2F("MC_Match_Gamma_Z_R", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
980   fMC_Match_Gamma_Z_R->GetXaxis()->SetTitle(xAxisTitle);
981   fMC_Match_Gamma_Z_R->GetYaxis()->SetTitle(yAxisTitle);
982 }
983
984 void AliGammaConversionHistograms::Initialize_MC_Match_Gamma_X_Y(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
985   fMC_Match_Gamma_X_Y = new TH2F("MC_Match_Gamma_X_Y", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
986   fMC_Match_Gamma_X_Y->GetXaxis()->SetTitle(xAxisTitle);
987   fMC_Match_Gamma_X_Y->GetYaxis()->SetTitle(yAxisTitle);
988 }
989
990 void AliGammaConversionHistograms::Initialize_MC_Pi0_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
991   fMC_Pi0_Eta = new TH1F("MC_Pi0_Eta", "", nXBins, firstX, lastX);
992   fMC_Pi0_Eta->GetXaxis()->SetTitle(xAxisTitle);
993   fMC_Pi0_Eta->GetYaxis()->SetTitle(yAxisTitle);
994 }
995
996 void AliGammaConversionHistograms::Initialize_MC_Pi0_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
997   fMC_Pi0_Phi = new TH1F("MC_Pi0_Phi", "", nXBins, firstX, lastX);
998   fMC_Pi0_Phi->GetXaxis()->SetTitle(xAxisTitle);
999   fMC_Pi0_Phi->GetYaxis()->SetTitle(yAxisTitle);
1000 }
1001
1002 void AliGammaConversionHistograms::Initialize_MC_Pi0_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1003   fMC_Pi0_Pt = new TH1F("MC_Pi0_Pt", "", nXBins, firstX, lastX);
1004   fMC_Pi0_Pt->GetXaxis()->SetTitle(xAxisTitle);
1005   fMC_Pi0_Pt->GetYaxis()->SetTitle(yAxisTitle);
1006 }
1007
1008 void AliGammaConversionHistograms::Initialize_MC_Pi0_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1009   fMC_Pi0_Energy = new TH1F("MC_Pi0_Energy", "", nXBins, firstX, lastX);
1010   fMC_Pi0_Energy->GetXaxis()->SetTitle(xAxisTitle);
1011   fMC_Pi0_Energy->GetYaxis()->SetTitle(yAxisTitle);
1012 }
1013
1014 void AliGammaConversionHistograms::Initialize_MC_Pi0_Mass(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1015   fMC_Pi0_Mass = new TH1F("MC_Pi0_Mass", "", nXBins, firstX, lastX);
1016   fMC_Pi0_Mass->GetXaxis()->SetTitle(xAxisTitle);
1017   fMC_Pi0_Mass->GetYaxis()->SetTitle(yAxisTitle);
1018 }
1019
1020 void AliGammaConversionHistograms::Initialize_MC_Pi0_OpeningAngleGamma(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1021   fMC_Pi0_OpeningAngleGamma = new TH1F("MC_Pi0_OpeningAngleGamma", "", nXBins, firstX, lastX);
1022   fMC_Pi0_OpeningAngleGamma->GetXaxis()->SetTitle(xAxisTitle);
1023   fMC_Pi0_OpeningAngleGamma->GetYaxis()->SetTitle(yAxisTitle);
1024 }
1025
1026 void AliGammaConversionHistograms::Initialize_MC_Pi0_R(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1027   fMC_Pi0_R = new TH1F("MC_Pi0_R", "", nXBins, firstX, lastX);
1028   fMC_Pi0_R->GetXaxis()->SetTitle(xAxisTitle);
1029   fMC_Pi0_R->GetYaxis()->SetTitle(yAxisTitle);
1030 }
1031
1032 void AliGammaConversionHistograms::Initialize_MC_Pi0_Z_R(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1033   fMC_Pi0_Z_R = new TH2F("MC_Pi0_Z_R", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1034   fMC_Pi0_Z_R->GetXaxis()->SetTitle(xAxisTitle);
1035   fMC_Pi0_Z_R->GetYaxis()->SetTitle(yAxisTitle);
1036 }
1037
1038 void AliGammaConversionHistograms::Initialize_MC_Pi0_X_Y(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1039   fMC_Pi0_X_Y = new TH2F("MC_Pi0_X_Y", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1040   fMC_Pi0_X_Y->GetXaxis()->SetTitle(xAxisTitle);
1041   fMC_Pi0_X_Y->GetYaxis()->SetTitle(yAxisTitle);
1042 }
1043
1044 void AliGammaConversionHistograms::Initialize_MC_Pi0Secondaries_X_Y(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1045   fMC_Pi0Secondaries_X_Y = new TH2F("MC_Pi0Secondaries_X_Y", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1046   fMC_Pi0Secondaries_X_Y->GetXaxis()->SetTitle(xAxisTitle);
1047   fMC_Pi0Secondaries_X_Y->GetYaxis()->SetTitle(yAxisTitle);
1048 }
1049
1050 void AliGammaConversionHistograms::Initialize_MC_Eta_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1051   fMC_Eta_Eta = new TH1F("MC_Eta_Eta", "", nXBins, firstX, lastX);
1052   fMC_Eta_Eta->GetXaxis()->SetTitle(xAxisTitle);
1053   fMC_Eta_Eta->GetYaxis()->SetTitle(yAxisTitle);
1054 }
1055
1056 void AliGammaConversionHistograms::Initialize_MC_Eta_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1057   fMC_Eta_Phi = new TH1F("MC_Eta_Phi", "", nXBins, firstX, lastX);
1058   fMC_Eta_Phi->GetXaxis()->SetTitle(xAxisTitle);
1059   fMC_Eta_Phi->GetYaxis()->SetTitle(yAxisTitle);
1060 }
1061
1062 void AliGammaConversionHistograms::Initialize_MC_Eta_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1063   fMC_Eta_Pt = new TH1F("MC_Eta_Pt", "", nXBins, firstX, lastX);
1064   fMC_Eta_Pt->GetXaxis()->SetTitle(xAxisTitle);
1065   fMC_Eta_Pt->GetYaxis()->SetTitle(yAxisTitle);
1066 }
1067
1068 void AliGammaConversionHistograms::Initialize_MC_Eta_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1069   fMC_Eta_Energy = new TH1F("MC_Eta_Energy", "", nXBins, firstX, lastX);
1070   fMC_Eta_Energy->GetXaxis()->SetTitle(xAxisTitle);
1071   fMC_Eta_Energy->GetYaxis()->SetTitle(yAxisTitle);
1072 }
1073
1074 void AliGammaConversionHistograms::Initialize_MC_Eta_Mass(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1075   fMC_Eta_Mass = new TH1F("MC_Eta_Mass", "", nXBins, firstX, lastX);
1076   fMC_Eta_Mass->GetXaxis()->SetTitle(xAxisTitle);
1077   fMC_Eta_Mass->GetYaxis()->SetTitle(yAxisTitle);
1078 }
1079
1080 void AliGammaConversionHistograms::Initialize_MC_Eta_OpeningAngleGamma(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1081   fMC_Eta_OpeningAngleGamma = new TH1F("MC_Eta_OpeningAngleGamma", "", nXBins, firstX, lastX);
1082   fMC_Eta_OpeningAngleGamma->GetXaxis()->SetTitle(xAxisTitle);
1083   fMC_Eta_OpeningAngleGamma->GetYaxis()->SetTitle(yAxisTitle);
1084 }
1085
1086 void AliGammaConversionHistograms::Initialize_MC_Eta_R(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1087   fMC_Eta_R = new TH1F("MC_Eta_R", "", nXBins, firstX, lastX);
1088   fMC_Eta_R->GetXaxis()->SetTitle(xAxisTitle);
1089   fMC_Eta_R->GetYaxis()->SetTitle(yAxisTitle);
1090 }
1091
1092 void AliGammaConversionHistograms::Initialize_MC_Eta_Z_R(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1093   fMC_Eta_Z_R = new TH2F("MC_Eta_Z_R", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1094   fMC_Eta_Z_R->GetXaxis()->SetTitle(xAxisTitle);
1095   fMC_Eta_Z_R->GetYaxis()->SetTitle(yAxisTitle);
1096 }
1097
1098 void AliGammaConversionHistograms::Initialize_MC_Eta_X_Y(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1099   fMC_Eta_X_Y = new TH2F("MC_Eta_X_Y", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1100   fMC_Eta_X_Y->GetXaxis()->SetTitle(xAxisTitle);
1101   fMC_Eta_X_Y->GetYaxis()->SetTitle(yAxisTitle);
1102 }   
1103 // esd
1104
1105 void AliGammaConversionHistograms::Initialize_ESD_EP_R(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1106   fESD_EP_R = new TH1F("ESD_EP_R", "", nXBins, firstX, lastX);
1107   fESD_EP_R->GetXaxis()->SetTitle(xAxisTitle);
1108   fESD_EP_R->GetYaxis()->SetTitle(yAxisTitle);
1109 }
1110
1111 void AliGammaConversionHistograms::Initialize_ESD_EP_Z_R(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1112   fESD_EP_Z_R = new TH2F("ESD_EP_Z_R", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1113   fESD_EP_Z_R->GetXaxis()->SetTitle(xAxisTitle);
1114   fESD_EP_Z_R->GetYaxis()->SetTitle(yAxisTitle);
1115 }
1116
1117 void AliGammaConversionHistograms::Initialize_ESD_EP_X_Y(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1118   fESD_EP_X_Y = new TH2F("ESD_EP_X_Y", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1119   fESD_EP_X_Y->GetXaxis()->SetTitle(xAxisTitle);
1120   fESD_EP_X_Y->GetYaxis()->SetTitle(yAxisTitle);
1121 }
1122
1123 void AliGammaConversionHistograms::Initialize_ESD_EP_OpeningAngle(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1124   fESD_EP_OpeningAngle = new TH1F("ESD_EP_OpeningAngle", "", nXBins, firstX, lastX);
1125   fESD_EP_OpeningAngle->GetXaxis()->SetTitle(xAxisTitle);
1126   fESD_EP_OpeningAngle->GetYaxis()->SetTitle(yAxisTitle);
1127 }
1128
1129 void AliGammaConversionHistograms::Initialize_ESD_E_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1130   fESD_E_Energy = new TH1F("ESD_E_Energy", "", nXBins, firstX, lastX);
1131   fESD_E_Energy->GetXaxis()->SetTitle(xAxisTitle);
1132   fESD_E_Energy->GetYaxis()->SetTitle(yAxisTitle);
1133 }
1134
1135 void AliGammaConversionHistograms::Initialize_ESD_E_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1136   fESD_E_Pt = new TH1F("ESD_E_Pt", "", nXBins, firstX, lastX);
1137   fESD_E_Pt->GetXaxis()->SetTitle(xAxisTitle);
1138   fESD_E_Pt->GetYaxis()->SetTitle(yAxisTitle);
1139 }
1140
1141 void AliGammaConversionHistograms::Initialize_ESD_E_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1142   fESD_E_Eta = new TH1F("ESD_E_Eta", "", nXBins, firstX, lastX);
1143   fESD_E_Eta->GetXaxis()->SetTitle(xAxisTitle);
1144   fESD_E_Eta->GetYaxis()->SetTitle(yAxisTitle);
1145 }
1146
1147 void AliGammaConversionHistograms::Initialize_ESD_E_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1148   fESD_E_Phi = new TH1F("ESD_E_Phi", "", nXBins, firstX, lastX);
1149   fESD_E_Phi->GetXaxis()->SetTitle(xAxisTitle);
1150   fESD_E_Phi->GetYaxis()->SetTitle(yAxisTitle);
1151 }
1152
1153 void AliGammaConversionHistograms::Initialize_ESD_P_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1154   fESD_P_Energy = new TH1F("ESD_P_Energy", "", nXBins, firstX, lastX);
1155   fESD_P_Energy->GetXaxis()->SetTitle(xAxisTitle);
1156   fESD_P_Energy->GetYaxis()->SetTitle(yAxisTitle);
1157 }
1158
1159 void AliGammaConversionHistograms::Initialize_ESD_P_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1160   fESD_P_Pt = new TH1F("ESD_P_Pt", "", nXBins, firstX, lastX);
1161   fESD_P_Pt->GetXaxis()->SetTitle(xAxisTitle);
1162   fESD_P_Pt->GetYaxis()->SetTitle(yAxisTitle);
1163 }
1164
1165 void AliGammaConversionHistograms::Initialize_ESD_P_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1166   fESD_P_Eta = new TH1F("ESD_P_Eta", "", nXBins, firstX, lastX);
1167   fESD_P_Eta->GetXaxis()->SetTitle(xAxisTitle);
1168   fESD_P_Eta->GetYaxis()->SetTitle(yAxisTitle);
1169 }
1170
1171 void AliGammaConversionHistograms::Initialize_ESD_P_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1172   fESD_P_Phi = new TH1F("ESD_P_Phi", "", nXBins, firstX, lastX);
1173   fESD_P_Phi->GetXaxis()->SetTitle(xAxisTitle);
1174   fESD_P_Phi->GetYaxis()->SetTitle(yAxisTitle);
1175 }
1176
1177 void AliGammaConversionHistograms::Initialize_ESD_Gamma_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1178   fESD_Gamma_Energy = new TH1F("ESD_Gamma_Energy", "", nXBins, firstX, lastX);
1179   fESD_Gamma_Energy->GetXaxis()->SetTitle(xAxisTitle);
1180   fESD_Gamma_Energy->GetYaxis()->SetTitle(yAxisTitle);
1181 }
1182
1183 void AliGammaConversionHistograms::Initialize_ESD_Gamma_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1184   fESD_Gamma_Pt = new TH1F("ESD_Gamma_Pt", "", nXBins, firstX, lastX);
1185   fESD_Gamma_Pt->GetXaxis()->SetTitle(xAxisTitle);
1186   fESD_Gamma_Pt->GetYaxis()->SetTitle(yAxisTitle);
1187 }
1188
1189 void AliGammaConversionHistograms::Initialize_ESD_Gamma_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1190   fESD_Gamma_Eta = new TH1F("ESD_Gamma_Eta", "", nXBins, firstX, lastX);
1191   fESD_Gamma_Eta->GetXaxis()->SetTitle(xAxisTitle);
1192   fESD_Gamma_Eta->GetYaxis()->SetTitle(yAxisTitle);
1193 }
1194
1195 void AliGammaConversionHistograms::Initialize_ESD_Gamma_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1196   fESD_Gamma_Phi = new TH1F("ESD_Gamma_Phi", "", nXBins, firstX, lastX);
1197   fESD_Gamma_Phi->GetXaxis()->SetTitle(xAxisTitle);
1198   fESD_Gamma_Phi->GetYaxis()->SetTitle(yAxisTitle);
1199 }
1200
1201 void AliGammaConversionHistograms::Initialize_ESD_Match_Gamma_OpeningAngle(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1202   fESD_Match_Gamma_OpeningAngle = new TH1F("ESD_Match_Gamma_OpeningAngle", "", nXBins, firstX, lastX);
1203   fESD_Match_Gamma_OpeningAngle->GetXaxis()->SetTitle(xAxisTitle);
1204   fESD_Match_Gamma_OpeningAngle->GetYaxis()->SetTitle(yAxisTitle);
1205 }
1206
1207 void AliGammaConversionHistograms::Initialize_ESD_Match_Gamma_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1208   fESD_Match_Gamma_Energy = new TH1F("ESD_Match_Gamma_Energy", "", nXBins, firstX, lastX);
1209   fESD_Match_Gamma_Energy->GetXaxis()->SetTitle(xAxisTitle);
1210   fESD_Match_Gamma_Energy->GetYaxis()->SetTitle(yAxisTitle);
1211 }
1212
1213 void AliGammaConversionHistograms::Initialize_ESD_Match_Gamma_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1214   fESD_Match_Gamma_Pt = new TH1F("ESD_Match_Gamma_Pt", "", nXBins, firstX, lastX);
1215   fESD_Match_Gamma_Pt->GetXaxis()->SetTitle(xAxisTitle);
1216   fESD_Match_Gamma_Pt->GetYaxis()->SetTitle(yAxisTitle);
1217 }
1218
1219 void AliGammaConversionHistograms::Initialize_ESD_Match_Gamma_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1220   fESD_Match_Gamma_Eta = new TH1F("ESD_Match_Gamma_Eta", "", nXBins, firstX, lastX);
1221   fESD_Match_Gamma_Eta->GetXaxis()->SetTitle(xAxisTitle);
1222   fESD_Match_Gamma_Eta->GetYaxis()->SetTitle(yAxisTitle);
1223 }
1224
1225 void AliGammaConversionHistograms::Initialize_ESD_Match_Gamma_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1226   fESD_Match_Gamma_Phi = new TH1F("ESD_Match_Gamma_Phi", "", nXBins, firstX, lastX);
1227   fESD_Match_Gamma_Phi->GetXaxis()->SetTitle(xAxisTitle);
1228   fESD_Match_Gamma_Phi->GetYaxis()->SetTitle(yAxisTitle);
1229 }
1230
1231 void AliGammaConversionHistograms::Initialize_ESD_Match_Gamma_Mass(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1232   fESD_Match_Gamma_Mass = new TH1F("ESD_Match_Gamma_Mass", "", nXBins, firstX, lastX);
1233   fESD_Match_Gamma_Mass->GetXaxis()->SetTitle(xAxisTitle);
1234   fESD_Match_Gamma_Mass->GetYaxis()->SetTitle(yAxisTitle);
1235 }
1236
1237 void AliGammaConversionHistograms::Initialize_ESD_Match_Gamma_Width(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1238   fESD_Match_Gamma_Width = new TH1F("ESD_Match_Gamma_Width", "", nXBins, firstX, lastX);
1239   fESD_Match_Gamma_Width->GetXaxis()->SetTitle(xAxisTitle);
1240   fESD_Match_Gamma_Width->GetYaxis()->SetTitle(yAxisTitle);
1241 }
1242
1243 void AliGammaConversionHistograms::Initialize_ESD_Match_Gamma_Chi2(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1244   fESD_Match_Gamma_Chi2 = new TH1F("ESD_Match_Gamma_Chi2", "", nXBins, firstX, lastX);
1245   fESD_Match_Gamma_Chi2->GetXaxis()->SetTitle(xAxisTitle);
1246   fESD_Match_Gamma_Chi2->GetYaxis()->SetTitle(yAxisTitle);
1247 }
1248
1249 void AliGammaConversionHistograms::Initialize_ESD_Match_Gamma_NDF(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1250   fESD_Match_Gamma_NDF = new TH1F("ESD_Match_Gamma_NDF", "", nXBins, firstX, lastX);
1251   fESD_Match_Gamma_NDF->GetXaxis()->SetTitle(xAxisTitle);
1252   fESD_Match_Gamma_NDF->GetYaxis()->SetTitle(yAxisTitle);
1253 }
1254
1255 void AliGammaConversionHistograms::Initialize_ESD_Match_Gamma_R(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1256   fESD_Match_Gamma_R = new TH1F("ESD_Match_Gamma_R", "", nXBins, firstX, lastX);
1257   fESD_Match_Gamma_R->GetXaxis()->SetTitle(xAxisTitle);
1258   fESD_Match_Gamma_R->GetYaxis()->SetTitle(yAxisTitle);
1259 }
1260
1261 void AliGammaConversionHistograms::Initialize_ESD_Match_Gamma_Z_R(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1262   fESD_Match_Gamma_Z_R = new TH2F("ESD_Match_Gamma_Z_R", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1263   fESD_Match_Gamma_Z_R->GetXaxis()->SetTitle(xAxisTitle);
1264   fESD_Match_Gamma_Z_R->GetYaxis()->SetTitle(yAxisTitle);
1265 }
1266
1267 void AliGammaConversionHistograms::Initialize_ESD_Match_Gamma_X_Y(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1268   fESD_Match_Gamma_X_Y = new TH2F("ESD_Match_Gamma_X_Y", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1269   fESD_Match_Gamma_X_Y->GetXaxis()->SetTitle(xAxisTitle);
1270   fESD_Match_Gamma_X_Y->GetYaxis()->SetTitle(yAxisTitle);
1271 }
1272
1273 void AliGammaConversionHistograms::Initialize_ESD_Pi0_OpeningAngleGamma(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1274   fESD_Pi0_OpeningAngleGamma = new TH1F("ESD_Pi0_OpeningAngleGamma", "", nXBins, firstX, lastX);
1275   fESD_Pi0_OpeningAngleGamma->GetXaxis()->SetTitle(xAxisTitle);
1276   fESD_Pi0_OpeningAngleGamma->GetYaxis()->SetTitle(yAxisTitle);
1277 }
1278
1279 void AliGammaConversionHistograms::Initialize_ESD_Pi0_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1280   fESD_Pi0_Energy = new TH1F("ESD_Pi0_Energy", "", nXBins, firstX, lastX);
1281   fESD_Pi0_Energy->GetXaxis()->SetTitle(xAxisTitle);
1282   fESD_Pi0_Energy->GetYaxis()->SetTitle(yAxisTitle);
1283 }
1284
1285 void AliGammaConversionHistograms::Initialize_ESD_Pi0_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1286   fESD_Pi0_Pt = new TH1F("ESD_Pi0_Pt", "", nXBins, firstX, lastX);
1287   fESD_Pi0_Pt->GetXaxis()->SetTitle(xAxisTitle);
1288   fESD_Pi0_Pt->GetYaxis()->SetTitle(yAxisTitle);
1289 }
1290
1291 void AliGammaConversionHistograms::Initialize_ESD_Pi0_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1292   fESD_Pi0_Eta = new TH1F("ESD_Pi0_Eta", "", nXBins, firstX, lastX);
1293   fESD_Pi0_Eta->GetXaxis()->SetTitle(xAxisTitle);
1294   fESD_Pi0_Eta->GetYaxis()->SetTitle(yAxisTitle);
1295 }
1296
1297 void AliGammaConversionHistograms::Initialize_ESD_Pi0_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1298   fESD_Pi0_Phi = new TH1F("ESD_Pi0_Phi", "", nXBins, firstX, lastX);
1299   fESD_Pi0_Phi->GetXaxis()->SetTitle(xAxisTitle);
1300   fESD_Pi0_Phi->GetYaxis()->SetTitle(yAxisTitle);
1301 }
1302
1303 void AliGammaConversionHistograms::Initialize_ESD_Pi0_Mass(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1304   fESD_Pi0_Mass = new TH1F("ESD_Pi0_Mass", "", nXBins, firstX, lastX);
1305   fESD_Pi0_Mass->GetXaxis()->SetTitle(xAxisTitle);
1306   fESD_Pi0_Mass->GetYaxis()->SetTitle(yAxisTitle);
1307 }
1308
1309 void AliGammaConversionHistograms::Initialize_ESD_Pi0_R(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1310   fESD_Pi0_R = new TH1F("ESD_Pi0_R", "", nXBins, firstX, lastX);
1311   fESD_Pi0_R->GetXaxis()->SetTitle(xAxisTitle);
1312   fESD_Pi0_R->GetYaxis()->SetTitle(yAxisTitle);
1313 }
1314
1315 void AliGammaConversionHistograms::Initialize_ESD_Pi0_Z_R(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1316   fESD_Pi0_Z_R = new TH2F("ESD_Pi0_Z_R", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1317   fESD_Pi0_Z_R->GetXaxis()->SetTitle(xAxisTitle);
1318   fESD_Pi0_Z_R->GetYaxis()->SetTitle(yAxisTitle);
1319 }
1320
1321 void AliGammaConversionHistograms::Initialize_ESD_Pi0_X_Y(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1322   fESD_Pi0_X_Y = new TH2F("ESD_Pi0_X_Y", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1323   fESD_Pi0_X_Y->GetXaxis()->SetTitle(xAxisTitle);
1324   fESD_Pi0_X_Y->GetYaxis()->SetTitle(yAxisTitle);
1325 }
1326
1327 void AliGammaConversionHistograms::Initialize_ESD_Eta_OpeningAngleGamma(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1328   fESD_Eta_OpeningAngleGamma = new TH1F("ESD_Eta_OpeningAngleGamma", "", nXBins, firstX, lastX);
1329   fESD_Eta_OpeningAngleGamma->GetXaxis()->SetTitle(xAxisTitle);
1330   fESD_Eta_OpeningAngleGamma->GetYaxis()->SetTitle(yAxisTitle);
1331 }
1332
1333 void AliGammaConversionHistograms::Initialize_ESD_Eta_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1334   fESD_Eta_Energy = new TH1F("ESD_Eta_Energy", "", nXBins, firstX, lastX);
1335   fESD_Eta_Energy->GetXaxis()->SetTitle(xAxisTitle);
1336   fESD_Eta_Energy->GetYaxis()->SetTitle(yAxisTitle);
1337 }
1338
1339 void AliGammaConversionHistograms::Initialize_ESD_Eta_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1340   fESD_Eta_Pt = new TH1F("ESD_Eta_Pt", "", nXBins, firstX, lastX);
1341   fESD_Eta_Pt->GetXaxis()->SetTitle(xAxisTitle);
1342   fESD_Eta_Pt->GetYaxis()->SetTitle(yAxisTitle);
1343 }
1344
1345 void AliGammaConversionHistograms::Initialize_ESD_Eta_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1346   fESD_Eta_Eta = new TH1F("ESD_Eta_Eta", "", nXBins, firstX, lastX);
1347   fESD_Eta_Eta->GetXaxis()->SetTitle(xAxisTitle);
1348   fESD_Eta_Eta->GetYaxis()->SetTitle(yAxisTitle);
1349 }
1350
1351 void AliGammaConversionHistograms::Initialize_ESD_Eta_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1352   fESD_Eta_Phi = new TH1F("ESD_Eta_Phi", "", nXBins, firstX, lastX);
1353   fESD_Eta_Phi->GetXaxis()->SetTitle(xAxisTitle);
1354   fESD_Eta_Phi->GetYaxis()->SetTitle(yAxisTitle);
1355 }
1356
1357 void AliGammaConversionHistograms::Initialize_ESD_Eta_Mass(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1358   fESD_Eta_Mass = new TH1F("ESD_Eta_Mass", "", nXBins, firstX, lastX);
1359   fESD_Eta_Mass->GetXaxis()->SetTitle(xAxisTitle);
1360   fESD_Eta_Mass->GetYaxis()->SetTitle(yAxisTitle);
1361 }
1362
1363 void AliGammaConversionHistograms::Initialize_ESD_Eta_R(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1364   fESD_Eta_R = new TH1F("ESD_Eta_R", "", nXBins, firstX, lastX);
1365   fESD_Eta_R->GetXaxis()->SetTitle(xAxisTitle);
1366   fESD_Eta_R->GetYaxis()->SetTitle(yAxisTitle);
1367 }
1368
1369 void AliGammaConversionHistograms::Initialize_ESD_Eta_Z_R(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1370   fESD_Eta_Z_R = new TH2F("ESD_Eta_Z_R", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1371   fESD_Eta_Z_R->GetXaxis()->SetTitle(xAxisTitle);
1372   fESD_Eta_Z_R->GetYaxis()->SetTitle(yAxisTitle);
1373 }
1374
1375 void AliGammaConversionHistograms::Initialize_ESD_Eta_X_Y(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1376   fESD_Eta_X_Y = new TH2F("ESD_Eta_X_Y", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1377   fESD_Eta_X_Y->GetXaxis()->SetTitle(xAxisTitle);
1378   fESD_Eta_X_Y->GetYaxis()->SetTitle(yAxisTitle);
1379 }
1380 void AliGammaConversionHistograms::Initialize_ESD_Background_OpeningAngleGamma(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1381   fESD_Background_OpeningAngleGamma = new TH1F("ESD_Background_OpeningAngleGamma", "", nXBins, firstX, lastX);
1382   fESD_Background_OpeningAngleGamma->GetXaxis()->SetTitle(xAxisTitle);
1383   fESD_Background_OpeningAngleGamma->GetYaxis()->SetTitle(yAxisTitle);
1384 }
1385
1386 void AliGammaConversionHistograms::Initialize_ESD_Background_Energy(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1387   fESD_Background_Energy = new TH1F("ESD_Background_Energy", "", nXBins, firstX, lastX);
1388   fESD_Background_Energy->GetXaxis()->SetTitle(xAxisTitle);
1389   fESD_Background_Energy->GetYaxis()->SetTitle(yAxisTitle);
1390 }
1391
1392 void AliGammaConversionHistograms::Initialize_ESD_Background_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1393   fESD_Background_Pt = new TH1F("ESD_Background_Pt", "", nXBins, firstX, lastX);
1394   fESD_Background_Pt->GetXaxis()->SetTitle(xAxisTitle);
1395   fESD_Background_Pt->GetYaxis()->SetTitle(yAxisTitle);
1396 }
1397
1398 void AliGammaConversionHistograms::Initialize_ESD_Background_Eta(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1399   fESD_Background_Eta = new TH1F("ESD_Background_Eta", "", nXBins, firstX, lastX);
1400   fESD_Background_Eta->GetXaxis()->SetTitle(xAxisTitle);
1401   fESD_Background_Eta->GetYaxis()->SetTitle(yAxisTitle);
1402 }
1403
1404 void AliGammaConversionHistograms::Initialize_ESD_Background_Phi(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1405   fESD_Background_Phi = new TH1F("ESD_Background_Phi", "", nXBins, firstX, lastX);
1406   fESD_Background_Phi->GetXaxis()->SetTitle(xAxisTitle);
1407   fESD_Background_Phi->GetYaxis()->SetTitle(yAxisTitle);
1408 }
1409
1410 void AliGammaConversionHistograms::Initialize_ESD_Background_Mass(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1411   fESD_Background_Mass = new TH1F("ESD_Background_Mass", "", nXBins, firstX, lastX);
1412   fESD_Background_Mass->GetXaxis()->SetTitle(xAxisTitle);
1413   fESD_Background_Mass->GetYaxis()->SetTitle(yAxisTitle);
1414 }
1415
1416 void AliGammaConversionHistograms::Initialize_ESD_Background_R(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1417   fESD_Background_R = new TH1F("ESD_Background_R", "", nXBins, firstX, lastX);
1418   fESD_Background_R->GetXaxis()->SetTitle(xAxisTitle);
1419   fESD_Background_R->GetYaxis()->SetTitle(yAxisTitle);
1420 }
1421
1422 void AliGammaConversionHistograms::Initialize_ESD_Background_Z_R(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1423   fESD_Background_Z_R = new TH2F("ESD_Background_Z_R", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1424   fESD_Background_Z_R->GetXaxis()->SetTitle(xAxisTitle);
1425   fESD_Background_Z_R->GetYaxis()->SetTitle(yAxisTitle);
1426 }
1427
1428 void AliGammaConversionHistograms::Initialize_ESD_Background_X_Y(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1429   fESD_Background_X_Y = new TH2F("ESD_Background_X_Y", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1430   fESD_Background_X_Y->GetXaxis()->SetTitle(xAxisTitle);
1431   fESD_Background_X_Y->GetYaxis()->SetTitle(yAxisTitle);
1432 }
1433
1434 void AliGammaConversionHistograms::Initialize_Resolution_dPt(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1435   fResolution_dPt = new TH2F("Resolution_dPt", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1436   fResolution_dPt->GetXaxis()->SetTitle(xAxisTitle);
1437   fResolution_dPt->GetYaxis()->SetTitle(yAxisTitle);
1438 }
1439
1440 void AliGammaConversionHistograms::Initialize_Resolution_dR(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1441   fResolution_dR = new TH2F("Resolution_dR", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1442   fResolution_dR->GetXaxis()->SetTitle(xAxisTitle);
1443   fResolution_dR->GetYaxis()->SetTitle(yAxisTitle);
1444 }
1445
1446 void AliGammaConversionHistograms::Initialize_Resolution_dZ(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1447   fResolution_dZ = new TH2F("Resolution_dZ", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1448   fResolution_dZ->GetXaxis()->SetTitle(xAxisTitle);
1449   fResolution_dZ->GetYaxis()->SetTitle(yAxisTitle);
1450 }
1451
1452 void AliGammaConversionHistograms::Initialize_Resolution_dR_dPt(Int_t nXBins, Double_t firstX, Double_t lastX, Int_t nYBins, Double_t firstY, Double_t lastY, TString xAxisTitle, TString yAxisTitle){
1453   fResolution_dR_dPt = new TH2F("Resolution_dR_dPt", "", nXBins, firstX, lastX, nYBins, firstY, lastY);
1454   fResolution_dR_dPt->GetXaxis()->SetTitle(xAxisTitle);
1455   fResolution_dR_dPt->GetYaxis()->SetTitle(yAxisTitle);
1456 }
1457
1458 void AliGammaConversionHistograms::Initialize_Resolution_MC_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1459   fResolution_MC_Pt = new TH1F("Resolution_MC_Pt", "", nXBins, firstX, lastX);
1460   fResolution_MC_Pt->GetXaxis()->SetTitle(xAxisTitle);
1461   fResolution_MC_Pt->GetYaxis()->SetTitle(yAxisTitle);
1462 }
1463
1464 void AliGammaConversionHistograms::Initialize_Resolution_MC_R(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1465   fResolution_MC_R = new TH1F("Resolution_MC_R", "", nXBins, firstX, lastX);
1466   fResolution_MC_R->GetXaxis()->SetTitle(xAxisTitle);
1467   fResolution_MC_R->GetYaxis()->SetTitle(yAxisTitle);
1468 }
1469
1470 void AliGammaConversionHistograms::Initialize_Resolution_MC_Z(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1471   fResolution_MC_Z = new TH1F("Resolution_MC_Z", "", nXBins, firstX, lastX);
1472   fResolution_MC_Z->GetXaxis()->SetTitle(xAxisTitle);
1473   fResolution_MC_Z->GetYaxis()->SetTitle(yAxisTitle);
1474 }
1475
1476 void AliGammaConversionHistograms::Initialize_Resolution_ESD_Pt(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1477   fResolution_ESD_Pt = new TH1F("Resolution_ESD_Pt", "", nXBins, firstX, lastX);
1478   fResolution_ESD_Pt->GetXaxis()->SetTitle(xAxisTitle);
1479   fResolution_ESD_Pt->GetYaxis()->SetTitle(yAxisTitle);
1480 }
1481
1482 void AliGammaConversionHistograms::Initialize_Resolution_ESD_R(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1483   fResolution_ESD_R = new TH1F("Resolution_ESD_R", "", nXBins, firstX, lastX);
1484   fResolution_ESD_R->GetXaxis()->SetTitle(xAxisTitle);
1485   fResolution_ESD_R->GetYaxis()->SetTitle(yAxisTitle);
1486 }
1487
1488 void AliGammaConversionHistograms::Initialize_Resolution_ESD_Z(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1489   fResolution_ESD_Z = new TH1F("Resolution_ESD_Z", "", nXBins, firstX, lastX);
1490   fResolution_ESD_Z->GetXaxis()->SetTitle(xAxisTitle);
1491   fResolution_ESD_Z->GetYaxis()->SetTitle(yAxisTitle);
1492 }
1493
1494 void AliGammaConversionHistograms::Initialize_NumberOfV0s(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1495   fNumberOfV0s = new TH1F("NumberOfV0s", "", nXBins, firstX, lastX);
1496   fNumberOfV0s->GetXaxis()->SetTitle(xAxisTitle);
1497   fNumberOfV0s->GetYaxis()->SetTitle(yAxisTitle);
1498 }
1499
1500 void AliGammaConversionHistograms::Initialize_NumberOfSurvivingV0s(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1501   fNumberOfSurvivingV0s = new TH1F("NumberOfSurvivingV0s", "", nXBins, firstX, lastX);
1502   fNumberOfSurvivingV0s->GetXaxis()->SetTitle(xAxisTitle);
1503   fNumberOfSurvivingV0s->GetYaxis()->SetTitle(yAxisTitle);
1504 }
1505
1506 void AliGammaConversionHistograms::Initialize_V0MassDebugCut1(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1507   fV0MassDebugCut1 = new TH1F("V0MassDebugCut1", "", nXBins, firstX, lastX);
1508   fV0MassDebugCut1->GetXaxis()->SetTitle(xAxisTitle);
1509   fV0MassDebugCut1->GetYaxis()->SetTitle(yAxisTitle);
1510 }
1511
1512 void AliGammaConversionHistograms::Initialize_V0MassDebugCut2(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1513   fV0MassDebugCut2 = new TH1F("V0MassDebugCut2", "", nXBins, firstX, lastX);
1514   fV0MassDebugCut2->GetXaxis()->SetTitle(xAxisTitle);
1515   fV0MassDebugCut2->GetYaxis()->SetTitle(yAxisTitle);
1516 }
1517
1518 void AliGammaConversionHistograms::Initialize_V0MassDebugCut3(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1519   fV0MassDebugCut3 = new TH1F("V0MassDebugCut3", "", nXBins, firstX, lastX);
1520   fV0MassDebugCut3->GetXaxis()->SetTitle(xAxisTitle);
1521   fV0MassDebugCut3->GetYaxis()->SetTitle(yAxisTitle);
1522 }
1523
1524 void AliGammaConversionHistograms::Initialize_V0MassDebugCut4(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1525   fV0MassDebugCut4 = new TH1F("V0MassDebugCut4", "", nXBins, firstX, lastX);
1526   fV0MassDebugCut4->GetXaxis()->SetTitle(xAxisTitle);
1527   fV0MassDebugCut4->GetYaxis()->SetTitle(yAxisTitle);
1528 }
1529
1530 void AliGammaConversionHistograms::Initialize_V0MassDebugCut5(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1531   fV0MassDebugCut5 = new TH1F("V0MassDebugCut5", "", nXBins, firstX, lastX);
1532   fV0MassDebugCut5->GetXaxis()->SetTitle(xAxisTitle);
1533   fV0MassDebugCut5->GetYaxis()->SetTitle(yAxisTitle);
1534 }
1535
1536 void AliGammaConversionHistograms::Initialize_V0MassDebugCut6(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1537   fV0MassDebugCut6 = new TH1F("V0MassDebugCut6", "", nXBins, firstX, lastX);
1538   fV0MassDebugCut6->GetXaxis()->SetTitle(xAxisTitle);
1539   fV0MassDebugCut6->GetYaxis()->SetTitle(yAxisTitle);
1540 }
1541
1542 void AliGammaConversionHistograms::Initialize_V0MassDebugCut7(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1543   fV0MassDebugCut7 = new TH1F("V0MassDebugCut7", "", nXBins, firstX, lastX);
1544   fV0MassDebugCut7->GetXaxis()->SetTitle(xAxisTitle);
1545   fV0MassDebugCut7->GetYaxis()->SetTitle(yAxisTitle);
1546 }
1547
1548 void AliGammaConversionHistograms::Initialize_V0MassDebugCut8(Int_t nXBins, Double_t firstX, Double_t lastX, TString xAxisTitle, TString yAxisTitle){
1549   fV0MassDebugCut8 = new TH1F("V0MassDebugCut8", "", nXBins, firstX, lastX);
1550   fV0MassDebugCut8->GetXaxis()->SetTitle(xAxisTitle);
1551   fV0MassDebugCut8->GetYaxis()->SetTitle(yAxisTitle);
1552 }