]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/macros/ConfigGammaConversion.C
Adding histo with all MC pi0s versus rapidity, independent of number of daughters
[u/mrichter/AliRoot.git] / PWG4 / macros / ConfigGammaConversion.C
1 /** VERSION NUMBER 1.1 */
2
3 /**************************************************************************
4  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  *                                                                        *
6  * Author: Ana Marin, Kathrin Koch, Kenneth Aamodt
7  * Contact: kenneth.aamodt@cern.ch
8  * Version 1.1                                                            *
9  *                                                                        *
10  * Permission to use, copy, modify and distribute this software and its   *
11  * documentation strictly for non-commercial purposes is hereby granted   *
12  * without fee, provided that the above copyright notice appears in all   *
13  * copies and that both the copyright notice and this permission notice   *
14  * appear in the supporting documentation. The authors make no claims     *
15  * about the suitability of this software for any purpose. It is          *
16  * provided "as is" without express or implied warranty.                  *
17  **************************************************************************/
18 const int c_array_size = 26;
19
20 class AliAnalysisDataContainer;
21 class AliGammaConversionHistograms;
22 class AliAnalysisTaskGammaConversion;
23 class AliAnalysisTaskGammaJet;
24
25 // set this to a number if you want to analyze a set number of files
26 // if it is 0 it will analyze the files listed in the data list
27 Int_t kGCnumberOfFilesToAnalyze=0;
28
29 Bool_t kGCrunNeutralMeson = kTRUE;
30 Bool_t kGCrunJet          = kFALSE;
31 Bool_t kGCrunChic         = kFALSE;
32 Bool_t kGCrunDalitz       = kFALSE;
33 Bool_t kGCrunCF           = kFALSE;
34 Bool_t kGCcalculateBackground = kTRUE;
35 Bool_t kGCdoNeutralMesonV0MCCheck =kFALSE;
36 Bool_t kGCrunOmegaMeson = kFALSE;
37 Bool_t kGCrunRES = kFALSE;
38 Bool_t kGCRecalculateV0ForGamma = kFALSE;
39 Bool_t kGCUseTrackMultiplicityForBG = kTRUE;
40 Bool_t kGCMoveParticlesAccordingToVertex = kFALSE;
41 Bool_t kGCLowMemoryConsumption = kFALSE;
42 Bool_t kGCApplyChi2Cut = kFALSE;
43
44 Bool_t kGCUseRotationMethodInBG=kTRUE;
45 Int_t kGCnDegreeRotationPMForBG=15;
46 Int_t kGCnumberOfRotationEventsForBG=15;
47 Bool_t kGCdoBGProbability=kFALSE;
48 //Svein 
49 Bool_t kGCRunGammaJetTask = kFALSE;
50 /** ---------------------------------- define cuts here ------------------------------------*/
51 TString kGCAnalysisCutSelectionId="90035620401003321022000000"; // do not change here, use -set-cut-selection in argument instead
52
53 Int_t kGCNEventsForBGCalculation=20;
54
55 Int_t kGCpidOfNegativeTrack=11;
56 Int_t kGCpidOfPositiveTrack=-11;
57
58 Double_t kGCmaxVertexZ   = 10.;
59 Double_t kGCmaxRCut   = 180.;
60 Double_t kGCminRCut   = 2.8;
61 Double_t kGCetaCut    = 0.9;
62 Double_t kGCptCut     = 0.02;
63 Double_t kGCsingleptCut = 0.02;
64 Double_t kGCmaxZCut     = 240.;
65 Double_t kGCminClsTPCCut= 0.;
66 Double_t kGCminClsTPCCutToF= 0.;
67 Double_t kGCchi2CutConversion   = 30.;
68 Double_t kGCchi2CutMeson   = 50.;
69 Double_t kGCalphaCutMeson   = 0.7;
70 Double_t kGCalphaMinCutMeson   = 0.0;
71 Double_t kGCrapidityCutMeson    = 0.9;
72
73 Double_t kGCLineCutZRSlope = tan(2*atan(exp(-kGCetaCut)));
74 Double_t kGCLineCutZValue = 7.;
75
76
77 Double_t kGCxVertexCut = 0.;
78 Double_t kGCyVertexCut = 0.;
79 Double_t kGCzVertexCut = 0.;
80
81 Double_t kGCsigmaCutGammaMass=0.0001;
82
83 Bool_t kGCuseImprovedVertex = kTRUE;
84
85 Bool_t kGCUseOnFlyV0Finder = kTRUE;
86
87 // define masses of different particles, this will be used by the KF particle
88 // together with the width to set mass constraints. Units in GeV.
89 Double_t kGCelectronMass = 0.00051099892;
90 Double_t kGCgammaMass    = 0.;
91 Double_t kGCpi0Mass      = 0.1349766;
92 Double_t kGCetaMass      = 0.54751;
93
94 // define the width constraint used by KF particle.
95 Double_t kGCgammaWidth = 0.01;
96 Double_t kGCpi0Width   = 0.01;
97 Double_t kGCetaWidth   = 0.01;
98
99 // define the probability of track being an electron
100 Double_t kGCprobElectron = 0.000;
101
102 Double_t kGCminOpeningAngleGhostCut = 0.005;
103
104 Bool_t kGCRemovePileUp = kFALSE;
105
106 Bool_t kGCSelectV0AND = kFALSE;
107 Bool_t kGCUseMultiplicity = kFALSE;
108 Int_t  kGCUseMultiplicityBin=0;
109
110 Int_t kGCIsHeavyIon = 0;
111 Int_t kGCUseCentrality = 0;
112 Int_t kGCUseCentralityBin = 0;
113 Int_t kGCUseCorrectedTPCClsInfo = 0;
114
115
116 /** ---------------------------------- define pi0 dalitz cuts here ------------------------------------*/
117
118 Bool_t kGCRunStandalone    = kTRUE;
119 Bool_t kGCUseBayesPID      = kFALSE;
120 Bool_t kGCUseTrackIndexCut = kTRUE;
121 Bool_t kGCUsePsiPairCut    = kTRUE;
122 Bool_t kGCUseMassCut       = kFALSE;
123 Bool_t kGCUseGammaCut      = kFALSE;
124 Bool_t kGCReadMagFieldSign = kTRUE;
125 Bool_t kGCUseAliKF         = kFALSE;
126
127 Double_t kGCPsiPairCut                 = 0.45;
128 Double_t kGCDeltaPhiCutMin             = 0.;
129 Double_t kGCDeltaPhiCutMax             = 0.12;
130 Double_t kGCMassCutMin                 = 0.;
131 Double_t kGCMassCutMax                 = 0.1;
132 Double_t kGCNSigmaBelowElecTPCbethe    = -2.;
133 Double_t kGCNSigmaAboveElecTPCbethe    = 3.;
134 Double_t kGCNSigmaAbovePionTPCbethe    = 2.;
135 Double_t kGCNSigmaAboveKaonTPCbethe    = 2.;
136 Double_t kGCNSigmaAboveProtonTPCbethe  = 2.;
137
138 Int_t kGCTrkSelectionCriteria          = 1;     // kITSsaTrack=0, kGlobalTrack=1, kITSsaGlobalTrack=2
139 // NOTE: for details in the track cuts and defined histograms see AddGammaConvDalitz.C
140
141 /** ----------------------------------end define cuts here----------------------------------*/
142
143 /** -------------------------------- Phi/R Mapping ---------------------------------------*/
144 Int_t kGCnPhiIndex = 8;
145 Int_t kGCnRIndex   = 14;
146
147 Double_t kGCminRadius   = 0.;
148 Double_t kGCmaxRadius   = 200.;
149 Double_t kGCminPhi      = -TMath::Pi();
150 Double_t kGCmaxPhi      = TMath::Pi();
151 /** ------------------------------- end Phi/R Mapping ------------------------------------*/
152
153 Bool_t kGCdoOwnXYZCalculation = kFALSE;
154 Bool_t kGCdoConstructGamma = kFALSE;
155
156 /** -------------AOD stuff ---------------------------------------------------------------*/
157 TString kGCDeltaAODFilename = "AliAODGammaConversion.root";  //If empty, writes to standard common aod file.
158 Bool_t kGCWriteAOD =kTRUE;    // Turn on AOD 
159 Bool_t kGCForceAOD = kFALSE;  // Call AliAnalysisManager::SetFillAOD(kTRUE) every ESD event. 
160
161 /** ------------------- define which histograms to plot here --------------------------------*/
162 /**   NB: to change the bin numbers, see below the histogram flags                           */
163
164 Bool_t kGCplotEventQuality              = kTRUE;
165
166
167 // MC GAMMA DECAY PLOTS
168 Bool_t kGCplotMCGammaFromDecay          = kTRUE;
169 // NEUTRAL MESON PLOTS
170 Bool_t kGCplotMCConversionR             = kTRUE;
171 Bool_t kGCplotMCConversionZR            = kTRUE;
172 Bool_t kGCplotMCConversionXY            = kTRUE;
173 Bool_t kGCplotMCConversionOpeningAngle  = kTRUE;
174 Bool_t kGCplotMCConvGammaEAsymmetryP    = kTRUE;
175 Bool_t kGCplotMCConvGammaPAsymmetryP    = kTRUE;
176
177
178 Bool_t kGCplotMCEEnergy  = kFALSE;
179 Bool_t kGCplotMCEPt      = kTRUE;
180 Bool_t kGCplotMCEEta     = kTRUE;
181 Bool_t kGCplotMCEPhi     = kTRUE;
182 Bool_t kGCplotMCENTPCClusters = kTRUE;
183 Bool_t kGCplotMCENITSClusters = kTRUE;
184
185 Bool_t kGCplotMCPEnergy  = kFALSE;
186 Bool_t kGCplotMCPPt      = kTRUE;
187 Bool_t kGCplotMCPEta     = kTRUE;
188 Bool_t kGCplotMCPPhi     = kTRUE;
189 Bool_t kGCplotMCPNTPCClusters = kTRUE;
190 Bool_t kGCplotMCPNITSClusters = kTRUE;
191
192 Bool_t kGCplotMCallGammaEnergy = kFALSE;
193 Bool_t kGCplotMCallGammaPt     = kTRUE;
194 Bool_t kGCplotMCallGammaEta    = kTRUE;
195 Bool_t kGCplotMCallGammaPhi    = kTRUE;
196 Bool_t kGCplotMCallGammaRapid  = kTRUE;
197
198
199 Bool_t kGCplotMCConvGammaEnergy  = kFALSE;
200 Bool_t kGCplotMCConvGammaPt      = kTRUE;
201 Bool_t kGCplotMCConvGammaEta     = kTRUE;
202 Bool_t kGCplotMCConvGammaPhi     = kTRUE;
203 Bool_t kGCplotMCConvGammaRapid   = kTRUE;
204 Bool_t kGCplotMCConvGammaPtvsEta = kTRUE;
205
206 Bool_t kGCplotMCallDirectGammaEnergy  = kFALSE;
207 Bool_t kGCplotMCallDirectGammaPt      = kTRUE;
208 Bool_t kGCplotMCallDirectGammaEta     = kTRUE;
209 Bool_t kGCplotMCallDirectGammaPhi     = kTRUE;
210 Bool_t kGCplotMCallDirectGammaRapid   = kTRUE;
211
212 Bool_t kGCplotMCConvDirectGammaEnergy  = kFALSE;
213 Bool_t kGCplotMCConvDirectGammaPt      = kTRUE;
214 Bool_t kGCplotMCConvDirectGammaEta     = kTRUE;
215 Bool_t kGCplotMCConvDirectGammaPhi     = kTRUE;
216 Bool_t kGCplotMCConvDirectGammaRapid   = kTRUE;
217
218 Bool_t kGCplotMCMotherEta                                       = kTRUE;
219 Bool_t kGCplotMCMotherRapid                                = kTRUE;
220 Bool_t kGCplotMCMotherPhi                                       = kTRUE;
221 Bool_t kGCplotMCMotherPt                                        = kTRUE;
222 Bool_t kGCplotMCMotherEnergy                            = kFALSE;
223 Bool_t kGCplotMCMotherMass                                      = kTRUE;
224 Bool_t kGCplotMCMotherOpeningAngle                              = kTRUE;
225 Bool_t kGCplotMCMotherR                                 = kTRUE;
226 Bool_t kGCplotMCMotherZR                                        = kFALSE;
227 Bool_t kGCplotMCMotherXY                                        = kFALSE;
228 Bool_t kGCplotMCMotherPtvsEtaWithinAcceptance              = kTRUE;
229 Bool_t kGCplotMCMotherPtvsRapidWithinAcceptance            = kTRUE;
230 Bool_t kGCplotMCMotherPtvsEtaConvGammaWithinAcceptance     = kTRUE;
231 Bool_t kGCplotMCMotherPtvsRapidConvGammaWithinAcceptance   = kTRUE;
232 Bool_t kGCplotMCMotherSpectra                           = kTRUE;
233
234 Bool_t kGCplotMCPhysicalPrimaryChargedPt                = kTRUE;
235
236 Bool_t kGCplotMCPi0Eta                                  = kTRUE;
237 Bool_t kGCplotMCPi0Rapid                                   = kTRUE;
238 Bool_t kGCplotMCPi0PtvsRapid                               = kTRUE;
239 Bool_t kGCplotMCPi0Phi                                     = kTRUE;
240 Bool_t kGCplotMCPi0Pt                                      = kTRUE;
241 Bool_t kGCplotMCPi0PtFiducial                              = kTRUE;
242 Bool_t kGCplotMCPi0PtWithinAcceptanceFiducial              = kTRUE;
243 Bool_t kGCplotMCPi0PtConvGammaWithinAcceptanceFiducial     = kTRUE;
244 Bool_t kGCplotMCPi0OpeningPtConvGammaWithinAcceptance      = kTRUE;
245 Bool_t kGCplotMCPi0PtGammaPtConvGammaWithinAcceptance = kTRUE;
246 Bool_t kGCplotMCPi0Energy                                  = kFALSE;
247 Bool_t kGCplotMCPi0Mass                                    = kTRUE;
248 Bool_t kGCplotMCPi0Alpha                                   = kTRUE;
249 Bool_t kGCplotMCEtaAlpha                                   = kTRUE;
250 Bool_t kGCplotMCPi0OpeningAngle                            = kTRUE;
251 Bool_t kGCplotMCPi0R                                       = kTRUE;
252 Bool_t kGCplotMCPi0ZR                                      = kFALSE;
253 Bool_t kGCplotMCPi0XY                                      = kFALSE;
254 Bool_t kGCplotMCPi0PtvsEtaWithinAcceptance                 = kTRUE;
255 Bool_t kGCplotMCPi0PtvsRapidWithinAcceptance               = kTRUE;
256 Bool_t kGCplotMCPi0PtvsEtaConvGammaWithinAcceptance        = kTRUE;
257 Bool_t kGCplotMCPi0PtvsRapidConvGammaWithinAcceptance      = kTRUE;
258 Bool_t kGCplotMCPi0ZRConvGammaWithinAcceptance          = kTRUE;
259
260 Bool_t kGCplotMCPi0SecondaryEta                                = kTRUE;
261 Bool_t kGCplotMCPi0SecondaryRapid                              = kTRUE;
262 Bool_t kGCplotMCPi0SecondaryPhi                                = kTRUE;
263 Bool_t kGCplotMCPi0SecondaryPt                                 = kTRUE;
264 Bool_t kGCplotMCPi0SecondaryEnergy                             = kFALSE;
265 Bool_t kGCplotMCPi0SecondaryMass                               = kTRUE;
266 Bool_t kGCplotMCPi0SecondaryOpeningAngle                       = kTRUE;
267 Bool_t kGCplotMCPi0SecondaryR                                  = kTRUE;
268 Bool_t kGCplotMCPi0SecondaryZR                                 = kFALSE;
269 Bool_t kGCplotMCPi0SecondaryXY                                 = kFALSE;
270 Bool_t kGCplotMCPi0SecondaryPtvsEtaWithinAcceptance            = kTRUE;
271 Bool_t kGCplotMCPi0SecondaryPtvsRapidWithinAcceptance          = kTRUE;
272 Bool_t kGCplotMCPi0SecondaryPtvsEtaConvGammaWithinAcceptance   = kTRUE;
273 Bool_t kGCplotMCPi0SecondaryPtvsRapidConvGammaWithinAcceptance = kTRUE;
274
275 Bool_t kGCplotMCEtaEta                                = kTRUE;
276 Bool_t kGCplotMCEtaRapid                              = kTRUE;
277 Bool_t kGCplotMCEtaPtvsRapid                          = kTRUE;
278 Bool_t kGCplotMCEtaPhi                                = kTRUE;
279 Bool_t kGCplotMCEtaPt                                 = kTRUE;
280 Bool_t kGCplotMCEtaEnergy                             = kFALSE;
281 Bool_t kGCplotMCEtaMass                               = kTRUE;
282 Bool_t kGCplotMCEtaOpeningAngleGamma                  = kTRUE;
283 Bool_t kGCplotMCEtaR                                  = kTRUE;
284 Bool_t kGCplotMCEtaZR                                 = kFALSE;
285 Bool_t kGCplotMCEtaXY                                 = kFALSE;
286 Bool_t kGCplotMCEtaPtvsEtaWithinAcceptance                 = kTRUE;
287 Bool_t kGCplotMCEtaPtvsRapidWithinAcceptance       = kTRUE;
288 Bool_t kGCplotMCEtaPtvsEtaConvGammaWithinAcceptance   = kTRUE;
289 Bool_t kGCplotMCEtaPtvsRapidConvGammaWithinAcceptance = kTRUE;
290 Bool_t kGCplotMCEtaOpeningPtConvGammaWithinAcceptance = kTRUE;
291 Bool_t kGCplotMCEtaPtGammaPtConvGammaWithinAcceptance = kTRUE;
292 Bool_t kGCplotMCEtaZRConvGammaWithinAcceptance = kTRUE;
293
294 // Histograms from esd tracks
295 Bool_t kGCplotESDConversionR                   = kTRUE;
296 Bool_t kGCplotESDConversionZR                  = kTRUE;
297 Bool_t kGCplotESDConversionXY                  = kTRUE;
298 Bool_t kGCplotESDConversionXYBeamPipe          = kTRUE;
299 Bool_t kGCplotESDConversionRPhiBeamPipe        = kTRUE;
300 Bool_t kGCplotESDConversionOpeningAngle        = kTRUE;
301 Bool_t kGCplotESDConvGammaCosPointingAngle     = kTRUE;
302 Bool_t kGCplotESDConvGammaDcaDaugthers         = kTRUE;
303 Bool_t kGCplotESDConvGammaNormDcaDistDaugthers = kTRUE;
304 Bool_t kGCplotESDConvGammaLikelihoodAP         = kTRUE;
305 Bool_t kGCplotESDConvGammaEAsymmetryP         = kTRUE;
306 Bool_t kGCplotESDConvGammaPAsymmetryP         = kTRUE;
307 Bool_t kGCplotESDConvGammaEdEdxP         = kTRUE;
308 Bool_t kGCplotESDConvGammaPdEdxP         = kTRUE;
309 Bool_t kGCplotESDConvGammaEeProbP         = kTRUE;
310 Bool_t kGCplotESDConvGammaPeProbP         = kTRUE;
311 Bool_t kGCplotESDConvGammaEmupiProbP         = kTRUE;
312 Bool_t kGCplotESDConvGammaPmupiProbP         = kTRUE;
313
314 Bool_t kGCplotESDConvGammaQtAlfa         = kTRUE;
315
316
317 Bool_t kGCplotESDEEnergy = kFALSE;
318 Bool_t kGCplotESDEPt     = kTRUE;
319 Bool_t kGCplotESDEEta    = kTRUE;
320 Bool_t kGCplotESDEPhi    = kTRUE;
321 Bool_t kGCplotESDENTPCClusters = kTRUE;
322 Bool_t kGCplotESDENITSClusters = kTRUE;
323 Bool_t kGCplotESDENTPCClustersToFP = kTRUE;
324 Bool_t kGCplotESDENTPCClustersToFR = kTRUE;
325 Bool_t kGCplotESDETPCchi2 = kTRUE;
326
327 Bool_t kGCplotESDPEnergy = kFALSE;
328 Bool_t kGCplotESDPPt     = kTRUE;
329 Bool_t kGCplotESDPEta    = kTRUE;
330 Bool_t kGCplotESDPPhi    = kTRUE;
331 Bool_t kGCplotESDPNTPCClusters = kTRUE; 
332 Bool_t kGCplotESDPNITSClusters = kTRUE;
333 Bool_t kGCplotESDPNTPCClustersToFP = kTRUE;
334 Bool_t kGCplotESDPNTPCClustersToFR = kTRUE;
335 Bool_t kGCplotESDPTPCchi2 = kTRUE;
336
337 Bool_t kGCplotESDConvGammaEnergy = kFALSE;
338 Bool_t kGCplotESDConvGammaPt     = kTRUE;
339 Bool_t kGCplotESDConvGammaEta    = kTRUE;
340 Bool_t kGCplotESDConvGammaPhi    = kTRUE;
341 Bool_t kGCplotESDConvGammaMass   = kTRUE;
342 Bool_t kGCplotESDConvGammaWidth  = kTRUE;
343 Bool_t kGCplotESDConvGammaChi2   = kTRUE;
344 Bool_t kGCplotESDConvGammaNDF    = kTRUE;
345 Bool_t kGCplotESDConvGammaRapid  = kTRUE;
346 Bool_t kGCplotESDConvGammaPtvsEta = kTRUE;
347 Bool_t kGCplotESDConvGammaPtvsChi2 = kTRUE;
348 Bool_t kGCplotESDConvGammaEtavsChi2 = kTRUE;
349
350
351 Bool_t kGCplotESDTrueDalitzContaminationR    = kTRUE;
352 Bool_t kGCplotESDTruePi0DalitzContaminationR = kTRUE;
353 Bool_t kGCplotESDTrueEtaDalitzContaminationR = kTRUE;
354 Bool_t kGCplotESDTrueCombinatorialContaminationR = kTRUE;
355 Bool_t kGCplotESDTrueCombinatorialElecContaminationR = kTRUE;
356 Bool_t kGCplotESDTrueHadronicContaminationR  = kTRUE;
357 Bool_t kGCplotESDTrueCombinatorialContaminationPt = kTRUE;
358 Bool_t kGCplotESDTrueCombinatorialElecContaminationPt = kTRUE;
359 Bool_t kGCplotESDTrueHadronicContaminationPt  = kTRUE;
360
361 Bool_t kGCplotESDTrueConvGammaEnergy         = kFALSE;
362 Bool_t kGCplotESDTrueConvGammaPt             = kTRUE;
363 Bool_t kGCplotESDTrueConvGammaEta            = kTRUE;
364 Bool_t kGCplotESDTrueConvGammaPhi            = kTRUE;
365 Bool_t kGCplotESDTrueConvGammaMass           = kTRUE;
366 Bool_t kGCplotESDTrueConvGammaWidth          = kTRUE;
367 Bool_t kGCplotESDTrueConvGammaChi2           = kTRUE;
368 Bool_t kGCplotESDTrueConvGammaNDF            = kTRUE;
369 Bool_t kGCplotESDTrueConvGammaRapid          = kTRUE;
370 Bool_t kGCplotESDTrueConvGammaPtvsEta        = kTRUE;
371 Bool_t kGCplotESDTrueConversionR             = kTRUE;
372 Bool_t kGCplotESDTrueConversionZR            = kFALSE;
373 Bool_t kGCplotESDTrueConversionXY            = kFALSE;
374 Bool_t kGCplotESDTrueConversionOpeningAngle  = kTRUE;
375 Bool_t kGCplotESDTrueConvGammaCosPointingAngle     = kTRUE;
376 Bool_t kGCplotESDTrueConvGammaDcaDaugthers         = kTRUE;
377 Bool_t kGCplotESDTrueConvGammaNormDcaDistDaugthers = kTRUE;
378 Bool_t kGCplotESDTrueConvGammaLikelihoodAP         = kTRUE;
379 Bool_t kGCplotESDTrueConvGammaEAsymmetryP         = kTRUE;
380 Bool_t kGCplotESDTrueConvGammaPAsymmetryP         = kTRUE;
381 Bool_t kGCplotESDTrueConvGammaEdEdxP         = kTRUE;
382 Bool_t kGCplotESDTrueConvGammaPdEdxP         = kTRUE;
383 Bool_t kGCplotESDTrueConvGammaQtAlfa         = kTRUE;
384
385 Bool_t kGCplotESDTrueConvGammaPtvsChi2       = kTRUE;
386 Bool_t kGCplotESDTrueConvGammaEtavsChi2      = kTRUE;
387 Bool_t kGCplotESDTrueConvGammaMCPtEta        = kTRUE;
388 Bool_t kGCplotESDTrueConversionMCZR          = kFALSE;
389 Bool_t kGCplotESDTrueConversionMCXY          = kFALSE;
390
391 Bool_t kGCplotESDNoCutConvGammaEnergy         = kFALSE;
392 Bool_t kGCplotESDNoCutConvGammaPt             = kTRUE;
393 Bool_t kGCplotESDNoCutConvGammaEta            = kTRUE;
394 Bool_t kGCplotESDNoCutConvGammaPhi            = kTRUE;
395 Bool_t kGCplotESDNoCutConvGammaMass           = kTRUE;
396 Bool_t kGCplotESDNoCutConvGammaWidth          = kTRUE;
397 Bool_t kGCplotESDNoCutConvGammaChi2           = kTRUE;
398 Bool_t kGCplotESDNoCutConvGammaNDF            = kTRUE;
399 Bool_t kGCplotESDNoCutConvGammaRapid          = kTRUE;
400 Bool_t kGCplotESDNoCutConvGammaPtvsEta        = kTRUE;
401 Bool_t kGCplotESDNoCutConversionR             = kTRUE;
402 Bool_t kGCplotESDNoCutConversionZR            = kFALSE;
403 Bool_t kGCplotESDNoCutConversionXY            = kFALSE;
404 Bool_t kGCplotESDNoCutConversionOpeningAngle  = kTRUE;
405 Bool_t kGCplotESDNoCutConvGammaCosPointingAngle     = kTRUE;
406 Bool_t kGCplotESDNoCutConvGammaDcaDaugthers         = kTRUE;
407 Bool_t kGCplotESDNoCutConvGammaNormDcaDistDaugthers = kTRUE;
408 Bool_t kGCplotESDNoCutConvGammaLikelihoodAP         = kTRUE;
409
410 Bool_t kGCplotESDNoCutConvGammaEAsymmetryP         = kTRUE;
411 Bool_t kGCplotESDNoCutConvGammaPAsymmetryP         = kTRUE;
412 Bool_t kGCplotESDNoCutConvGammaEdEdxP         = kTRUE;
413 Bool_t kGCplotESDNoCutConvGammaPdEdxP         = kTRUE;
414 Bool_t kGCplotESDNoCutConvGammaPtvsChi2       = kTRUE;
415 Bool_t kGCplotESDNoCutConvGammaEtavsChi2      = kTRUE;
416 Bool_t kGCplotESDNoCutConvGammaMCPtEta        = kTRUE;
417 Bool_t kGCplotESDNoCutConversionMCZR          = kFALSE;
418 Bool_t kGCplotESDNoCutConversionMCXY          = kFALSE;
419
420 Bool_t kGCplotESDMotherChi2 = kTRUE;
421 Bool_t kGCplotESDMotherOpeningAngleGamma = kTRUE;
422 Bool_t kGCplotESDMotherEnergy            = kFALSE;
423 Bool_t kGCplotESDMotherPt                = kFALSE;
424 Bool_t kGCplotESDMotherEta               = kTRUE;
425 Bool_t kGCplotESDMotherPhi               = kFALSE;
426 Bool_t kGCplotESDMotherMass              = kFALSE;
427 Bool_t kGCplotESDMotherR                 = kFALSE;
428 Bool_t kGCplotESDMotherZR                = kFALSE;
429 Bool_t kGCplotESDMotherXY                = kFALSE;
430 Bool_t kGCplotESDMotherRapid             = kTRUE;
431
432 Bool_t kGCplotESDBackgroundOpeningAngleGamma = kTRUE;
433 Bool_t kGCplotESDBackgroundEnergy            = kFALSE;
434 Bool_t kGCplotESDBackgroundPt                = kFALSE;
435 Bool_t kGCplotESDBackgroundEta               = kFALSE;
436 Bool_t kGCplotESDBackgroundPhi               = kFALSE;
437 Bool_t kGCplotESDBackgroundMass              = kFALSE;
438 Bool_t kGCplotESDBackgroundR                 = kFALSE;
439 Bool_t kGCplotESDBackgroundZR                = kFALSE;
440 Bool_t kGCplotESDBackgroundXY                = kFALSE;
441 Bool_t kGCplotESDBackgroundRapid             = kFALSE;
442
443 Bool_t kGCplotMapping = kTRUE;       
444
445 Bool_t kGCplotResolutiondPt = kTRUE;
446 Bool_t kGCplotResolutiondR  = kTRUE;
447 Bool_t kGCplotResolutiondZ  = kTRUE;
448
449 Bool_t kGCplotResolutiondRAbs  = kTRUE;
450 Bool_t kGCplotResolutiondZAbs  = kTRUE;
451 Bool_t kGCplotResolutiondPhiAbs  = kTRUE;
452
453 Bool_t kGCplotResolutiondRdPt = kTRUE;
454
455 Bool_t kGCplotResolutionMCPt = kTRUE;
456 Bool_t kGCplotResolutionMCR  = kTRUE;
457 Bool_t kGCplotResolutionMCZ  = kTRUE;
458
459 Bool_t kGCplotResolutionESDPt = kTRUE;
460 Bool_t kGCplotResolutionESDR  = kTRUE;
461 Bool_t kGCplotResolutionESDZ  = kTRUE;
462
463 Bool_t kGCplotResolutionPtdPt = kTRUE;
464
465 Bool_t kGCplotESDNumberOfV0s          = kTRUE;
466 Bool_t kGCplotESDNumberOfSurvivingV0s = kTRUE;
467 Bool_t kGCplotESDNumberOfContributorsVtx = kTRUE;
468 Bool_t kGCplotESDNumberOfGoodESDTracks = kTRUE;
469
470 //  debug histograms
471 Bool_t kGCplotESDCutGetOnFly      = kTRUE;
472 Bool_t kGCplotESDCutNContributors = kTRUE;
473 Bool_t kGCplotESDCutLikeSign      = kTRUE;
474 Bool_t kGCplotESDCutRefit         = kTRUE;
475 Bool_t kGCplotESDCutKink          = kTRUE;
476 Bool_t kGCplotESDCutPIDProb       = kTRUE;
477 Bool_t kGCplotESDCutdedxSigmaElectronLine=kTRUE;
478 Bool_t kGCplotESDCutdedxSigmaPionLine=kTRUE;
479 Bool_t kGCplotESDCutPionRejectionLowP  =kTRUE;
480 Bool_t kGCplotESDCutProtonRejectionLowP=kTRUE;
481 Bool_t kGCplotESDCutKaonRejectionLowP  =kTRUE;
482 Bool_t kGCplotESDCutQtGammaSelection=kTRUE;
483 Bool_t kGCplotESDCutR             = kTRUE;
484 Bool_t kGCplotESDCutMinR          = kTRUE;
485 Bool_t kGCplotESDCutLine          = kTRUE;
486 Bool_t kGCplotESDCutZ             = kTRUE;
487 Bool_t kGCplotESDCutMinClsTPC     = kTRUE;
488 Bool_t kGCplotESDCutMinClsTPCToF  = kTRUE;
489 Bool_t kGCplotESDGoodV0s          = kTRUE;
490 Bool_t kGCplotESDAllV0s           = kTRUE;
491 Bool_t kGCplotESDAllV0sCurrentFinder = kTRUE;
492 Bool_t kGCplotESDAllV0sCurrentFinderQtAlfa = kTRUE;
493
494 Bool_t kGCplotESDCutNDF           = kTRUE;
495 Bool_t kGCplotESDCutChi2          = kTRUE;
496 Bool_t kGCplotESDCutEta           = kTRUE;
497 Bool_t kGCplotESDCutPt            = kTRUE;
498 Bool_t kGCplotESDCutSinglePt      = kTRUE;
499 Bool_t kGCplotESDTrueConvGammaTrackLength =kFALSE;
500 Bool_t kGCplotESDTrueConvGammaTrackLengthVSInvMass =kFALSE;
501
502 Bool_t kGCplotPi0Spectra = kTRUE;
503 Bool_t kGCplotEtaSpectra = kTRUE;
504 Bool_t kGCplotOmegaSpectra = kTRUE;
505
506 /////////////Chi_c Analysis//////////////////////////
507 Bool_t kGCplotStatsElectrons                                  = kTRUE;
508 Bool_t kGCplotRecENegJPsiPtDiff                               = kTRUE;
509 Bool_t kGCplotRecEPosJPsiPtDiff                               = kTRUE;
510 Bool_t kGCplotRecEPosENegR                                    = kTRUE;
511 Bool_t kGCplotRecEPosENegEta                                  = kTRUE;
512 Bool_t kGCplotESDInvMassePluseMinus                           = kTRUE;
513 Bool_t kGCplotESDInvMassGammaePluseMinusChiC                  = kTRUE;
514 Bool_t kGCplotESDInvMassGammaePluseMinusPi0                   = kTRUE;
515 Bool_t kGCplotESDElectronPosNegPt                             = kTRUE;
516 Bool_t kGCplotESDElectronPosNegEta                            = kTRUE;
517 Bool_t kGCplotESDElectronPosNegAngle                          = kTRUE;
518 Bool_t kGCplotMCElectronPosNegPt                              = kTRUE;
519 Bool_t kGCplotMCElectronPosNegEta                             = kTRUE;
520 Bool_t kGCplotMCElectronPosNegJPsiAngle                       = kTRUE;
521 Bool_t kGCplotESDElectronPosNegPi0Angle                       = kTRUE;
522 Bool_t kGCplotMCElectronPosNegPi0Angle                        = kTRUE;
523 Bool_t kGCplotTableElectrons                                  = kTRUE;
524 Bool_t kGCplotESDEPosBackground                               = kTRUE;
525 Bool_t kGCplotESDENegBackground                               = kTRUE;
526 Bool_t kGCplotESDEPosENegBackground                           = kTRUE;
527 Bool_t kGCplotESDEPosENegBackgroundCut                        = kTRUE;
528 Bool_t kGCplotESDePoseNegAngle                                = kTRUE;
529 Bool_t kGCplotESDEPosENegGammaBackgroundMX                    = kTRUE;
530 Bool_t kGCplotMCLabels                                        = kTRUE;
531 ///////////////////////////////////////////////////////////////////
532
533 //---------------- Gamma Jet analysis ----------------------------
534 Bool_t kGCplotdPhiHdrGam            = kTRUE;
535 Bool_t kGCplotdPhiHdrGamIsolated    = kTRUE;
536 Bool_t kGCplotMinimumIsoDistance    = kTRUE;
537 Bool_t kGCplotFFzHdrGam             = kTRUE;
538 Bool_t kGCplotImbalanceHdrGam       = kTRUE;
539 //----------------------------------------------------------------
540
541
542 /** ----------------- end define which histograms to plot here -------------------------------*/
543
544
545
546 /** ----------- Define the binning for the different plot types here -------------------------*/
547 // Number of V0s-plot
548 Int_t kGCnXBinsNV0        = 1000;
549 Double_t kGCfirstXBinNV0  = -0.5;
550 Double_t kGClastXBinNV0   =  999.5;
551
552
553 // Number of ESD track-Plot
554 Int_t kGCnXBinsESDtrk      = 10000;
555 Double_t kGCfirstXBinESDtrk= -0.5;
556 Double_t kGClastXBinESDtrk = 9999.5;
557
558
559 //EventQuality-plot
560 Int_t kGCnXBinsEvtQ= 9;
561 Double_t kGCfirstXBinEvtQ=-1.5;
562 Double_t kGClastXBinEvtQ=7.5;
563
564 //R-plots
565 Int_t kGCnXBinsR = 400;
566 Double_t kGCfirstXBinR = 0.;
567 Double_t kGClastXBinR = 200.;
568
569 //ZR-plots
570 Int_t kGCnXBinsZR = 1000;
571 Double_t kGCfirstXBinZR = -250.;
572 Double_t kGClastXBinZR = 250.;
573 Int_t kGCnYBinsZR = 400;
574 Double_t kGCfirstYBinZR = 0.;
575 Double_t kGClastYBinZR = 200.;
576
577 //XY-plots
578 Int_t kGCnXBinsXY = 800;
579 Double_t kGCfirstXBinXY = -200.;
580 Double_t kGClastXBinXY = 200.;
581 Int_t kGCnYBinsXY = 800;
582 Double_t kGCfirstYBinXY = -200.;
583 Double_t kGClastYBinXY = 200.;
584
585 //XY-plots-BeamPipe
586 Int_t kGCnXBinsXYBP = 200;
587 Double_t kGCfirstXBinXYBP = -10.;
588 Double_t kGClastXBinXYBP = 10.;
589 Int_t kGCnYBinsXYBP = 200;
590 Double_t kGCfirstYBinXYBP = -10.;
591 Double_t kGClastYBinXYBP = 10.;
592
593 //Rphi-plots-BeamPipe
594 Int_t kGCnXBinsRPhiBP = 200;
595 Double_t kGCfirstXBinRPhiBP = -TMath::Pi();
596 Double_t kGClastXBinRPhiBP = TMath::Pi();
597 Int_t kGCnYBinsRPhiBP = 200;
598 Double_t kGCfirstYBinRPhiBP = 0.;
599 Double_t kGClastYBinRPhiBP = 10.;
600
601
602
603 //OpenAngle-plots
604 Int_t kGCnXBinsOpeningAngle = 400;
605 Double_t kGCfirstXBinOpeningAngle = 0.;
606 Double_t kGClastXBinOpeningAngle = TMath::Pi();
607
608 //CosPointingAngle-plots
609 Int_t kGCnXBinsCosPointingAngle = 400;
610 Double_t kGCfirstXBinCosPointingAngle = 0.99;
611 Double_t kGClastXBinCosPointingAngle = 1.01;
612
613 //DCA Daugthers-plots
614 Int_t kGCnXBinsDcaDaughters = 400;
615 Double_t kGCfirstXBinDcaDaughters= 0.;
616 Double_t kGClastXBinDcaDaughters = 5.;
617
618 //Norm DCA dist Daugthers-plots
619 Int_t kGCnXBinsNormDcaDistDaughters = 400;
620 Double_t kGCfirstXBinNormDcaDistDaughters= 0.;
621 Double_t kGClastXBinNormDcaDistDaughters = 10.;
622
623 //LikelihoodAP Plots
624 Int_t kGCnXBinsLikelihoodAP = 400;
625 Double_t kGCfirstXBinLikelihoodAP= 0.;
626 Double_t kGClastXBinLikelihoodAP = 2.;
627
628
629 //Energy-plots
630 Int_t kGCnXBinsEnergy = 200;
631 Double_t kGCfirstXBinEnergy = 0.;
632 Double_t kGClastXBinEnergy = 50.;
633
634 //P-plots
635 Int_t kGCnXBinsP = 200;
636 Double_t kGCfirstXBinP = 0.05;
637 Double_t kGClastXBinP = 50.;
638
639 //dEdx-plots
640 Int_t kGCnYBinsdEdx = 200;
641 Double_t kGCfirstYBindEdx = 0.;
642 Double_t kGClastYBindEdx = 200.;
643
644 //EProb-plots
645 Int_t kGCnYBinsEProb = 200;
646 Double_t kGCfirstYBinEProb = 0.;
647 Double_t kGClastYBinEProb = 1.;
648
649 //Qt-plots
650 Int_t kGCnYBinsQt = 250;
651 Double_t kGCfirstYBinQt = 0.;
652 Double_t kGClastYBinQt = 0.25;
653
654
655
656 //Asymmetry-plots
657 Int_t kGCnYBinsAsymmetry = 200;
658 Double_t kGCfirstYBinAsymmetry = 0.;
659 Double_t kGClastYBinAsymmetry = 1.;
660
661
662 //Pt-plots
663 Int_t kGCnXBinsPt = 500;
664 Double_t kGCfirstXBinPt = 0.;
665 Double_t kGClastXBinPt = 50.;
666
667 //Eta-plots
668 Int_t kGCnXBinsEta = 40;
669 Double_t kGCfirstXBinEta = -2.;
670 Double_t kGClastXBinEta = 2.;
671
672 //Rapidity
673 Int_t kGCnXBinsRapid = 200;
674 Double_t kGCfirstXBinRapid = -10.;
675 Double_t kGClastXBinRapid = 10.;
676
677 //Phi-plots
678 Int_t kGCnXBinsPhi = 72;
679 Double_t kGCfirstXBinPhi = -TMath::Pi();
680 Double_t kGClastXBinPhi = TMath::Pi();
681
682 //nTPCCluster-plots
683 Int_t kGCnXBinsNTPCClusters = 201;
684 Double_t kGCfirstXBinNTPCClusters = -0.5;
685 Double_t kGClastXBinNTPCClusters = 200.5;
686
687 //nITSCluster-plots
688 Int_t kGCnXBinsNITSClusters = 7;
689 Double_t kGCfirstXBinNITSClusters = -0.5;
690 Double_t kGClastXBinNITSClusters = 6.5;
691
692 //TPCcluster to Findable-plots
693 Int_t kGCnYBinsClsToF = 200;
694 Double_t kGCfirstYBinClsToF = 0.;
695 Double_t kGClastYBinClsToF = 2.0;
696
697 //TPCchi2 -plots
698 Int_t kGCnXBinsTPCchi2 = 100;
699 Double_t kGCfirstXBinTPCchi2 = 0.;
700 Double_t kGClastXBinTPCchi2 = 10;
701
702
703 //Mapping-plots
704 Int_t kGCnXBinsMapping = 800;
705 Double_t kGCfirstXBinMapping = -100.;
706 Double_t kGClastXBinMapping = 100.;
707 Int_t kGCnYBinsMapping = 40;
708 Double_t kGCfirstYBinMapping = -2;
709 Double_t kGClastYBinMapping = 2;
710
711 //ResolutionPlots
712 //RESdPt
713 Int_t kGCnXBinsResdPt=500;
714 Int_t kGCfirstXBinResdPt= 0;
715 Int_t kGClastXBinResdPt=100;
716 Int_t kGCnYBinsResdPt=200;
717 Int_t kGCfirstYBinResdPt= -10;
718 Int_t kGClastYBinResdPt=10;
719
720 //RESdR
721 Int_t kGCnXBinsResdR=400;
722 Int_t kGCfirstXBinResdR= 0;
723 Int_t kGClastXBinResdR=200;
724 Int_t kGCnYBinsResdR=100;
725 Int_t kGCfirstYBinResdR= -25;
726 Int_t kGClastYBinResdR=25;
727
728 //RESdZ
729 Int_t kGCnXBinsResdZ=80;
730 Int_t kGCfirstXBinResdZ= -20;
731 Int_t kGClastXBinResdZ=20;
732 Int_t kGCnYBinsResdZ=80;
733 Int_t kGCfirstYBinResdZ= -20;
734 Int_t kGClastYBinResdZ=20;
735
736 //RESdRdPt
737 Int_t kGCnYBinsResdRdPt=400;
738 Int_t kGCfirstYBinResdRdPt= -10;
739 Int_t kGClastYBinResdRdPt=10;
740
741 //RESMCPt
742 Int_t kGCnXBinsResPt=500;
743 Int_t kGCfirstXBinResPt= 0;
744 Int_t kGClastXBinResPt=100;
745
746 //RESMCR
747 Int_t kGCnXBinsResR=500;
748 Int_t kGCfirstXBinResR= 0;
749 Int_t kGClastXBinResR=250;
750
751 //RESMCZ
752 Int_t kGCnXBinsResZ=500;
753 Int_t kGCfirstXBinResZ= 0;
754 Int_t kGClastXBinResZ=250;
755
756 //GammaMass-plots
757 Int_t kGCnXBinsGammaMass = 4000;
758 Double_t kGCfirstXBinGammaMass = 0.;
759 Double_t kGClastXBinGammaMass = 1.;
760
761 //Pi0Mass-plots
762 Int_t kGCnXBinsPi0Mass = 1000;
763 Double_t kGCfirstXBinPi0Mass = 0.;
764 Double_t kGClastXBinPi0Mass = 1.;
765 Double_t kGCfirstXBinPi0Alpha = 0.;
766 Double_t kGClastXBinPi0Alpha = 1.;
767
768
769 //EtaMass-plots
770 Int_t kGCnXBinsEtaMass = 1000;
771 Double_t kGCfirstXBinEtaMass = 0.;
772 Double_t kGClastXBinEtaMass = 1.;
773
774 //GammaWidth-plots
775 Int_t kGCnXBinsGammaWidth = 100;
776 Double_t kGCfirstXBinGammaWidth = 0.;
777 Double_t kGClastXBinGammaWidth = 1.;
778
779 //GammaChi2-plots
780 Int_t kGCnXBinsMesonChi2 = 200;
781 Int_t kGCnXBinsGammaChi2 = 100;
782 Double_t kGCfirstXBinGammaChi2 = 0;
783 Double_t kGClastXBinGammaChi2 = 200.;
784
785 //GammaNDF-plots
786 Int_t kGCnXBinsGammaNDF = 10;
787 Double_t kGCfirstXBinGammaNDF = 0.;
788 Double_t kGClastXBinGammaNDF = 10.;
789
790 //Spectra-plots
791 Int_t kGCnXBinsSpectra = 500;
792 Double_t kGCfirstXBinSpectra = 0.;
793 Double_t kGClastXBinSpectra = 1.;
794 Int_t kGCnYBinsSpectra = 250;
795 Double_t kGCfirstYBinSpectra = 0.;
796 Double_t kGClastYBinSpectra = 25.;
797
798 Double_t kGCfirstXBinAlphaG = -1.;
799 Double_t kGCfirstXBinAlpha = 0.;
800 Double_t kGClastXBinAlpha = 1.;
801
802 //track length plots
803 Int_t kGCnXBinsTrackLength = 1000;
804 Double_t kGCfirstXBinTrackLength = 0;
805 Double_t kGClastXBinTrackLength = 500;
806
807 /////////Pi0 Dalitz decay AnalysisTask ///////////////////////////////////
808
809 Int_t kGCnXBinsDalitzMass = 4000;
810 Double_t kGCfirstXBinDalitzMass = 0.;
811 Double_t kGClastXBinDalitzMass = 4.;
812
813 Int_t kGCnXBinsPi0DalitzMass = 4000;
814 Double_t kGCfirstXBinPi0DalitzMass = 0.;
815 Double_t kGClastXBinPi0DalitzMass = 4.;
816
817 /////////Chic_Analysis///////////////////////////////////
818 Int_t kGCnXBinsEPt = 1000;
819 Double_t kGCfirstXBinEPt = 0.;
820 Double_t kGClastXBinJPsiPt  = 10;
821
822 Int_t kGCnXBinsJPsiMass = 1000;
823 Double_t kGCfirstXBinJPsiMass = 0.;
824 Double_t kGClastXBinJPsiMass = 10.;
825
826 Int_t kGCnXBinsChicMass = 1000;
827 Double_t kGCfirstXBinChicMass = 0.;
828 Double_t kGClastXBinChicMass  = 10.;
829
830 Int_t kGCnXBinsPi0Mass  = 1000;
831 Double_t kGCfirstXBinPi0Mass = 0.;
832 Double_t kGClastXBinPi0Mass  = 1.;
833
834 Int_t kGCnXBinsEPosNegPt = 1000;
835 Double_t kGCfirstXBinEPosNegPt = 0.;
836 Double_t kGClastXBinEPosNegPt  = 10.;
837
838 Int_t kGCnXBinsEPosNegEta = 200;
839 Double_t kGCfirstXBinEPosNegEta = -1.2;
840 Double_t kGClastXBinEPosNegEta  = 1.2;
841
842 Int_t kGCnXBinsEPosNegAngle = 200;
843 Double_t kGCfirstXBinEPosNegAngle = 0.;
844 Double_t kGClastXBinEPosNegAngle = TMath::Pi();
845
846 Int_t kGCnXBinsEBackground = 1000;
847 Double_t kGCfirstXBinEBackground = 0.;
848 Double_t kGClastXBinEBackground  = 10.;
849
850 Int_t kGCnXBinsEBackgroundCut = 100;
851 Double_t kGCfirstXBinEBackgroundCut = 0.;
852 Double_t kGClastXBinEBackgroundCut  = 0.015.;
853
854 Int_t kGCnXBinsMCLabels = 10;
855 Double_t kGCfirstXBinMCLabels = 0.;
856 Double_t kGClastXBinMCLabels  = 10.;
857
858 Int_t kGCnElementsElectronTable = 19;
859
860 //18 elements
861 const char * kGCelectronTable[] = {
862   "Num. Events",  "MC e+ J/Psi |\\eta|<0.9","MC e- J/Psi |\\eta|<0.9","MC e+ e+ from J/Psi |\\eta|<0.9",
863   "ESDtracks",    "Kink Cut",
864   "Vertex Cut","TRDOut","TRDrefit","TPCrefit",
865   "ITSrefit","TRDout+TPC+TPC+ITS+nsigma>3 Pass","pid!=0","ESDElec","ESD e+ JPsi",
866   "ESD e- JPsi","ESD e+ e- JPSI","MC: gamma < 1.2","e+,e- < 0.9 g <1.2"
867 };
868
869
870 // for Gamma Jet analysis
871 Int_t kGCnXBinsdphiHdrGam = 100;
872 Double_t kGCfirstXBindphiHdrGam = -TMath::PiOver2();
873 Double_t kGClastXBindphiHdrGam = 3*TMath::PiOver2();
874
875 Int_t kGCnXBinsMinimumIsoDistance = 100;
876 Double_t kGCfirstXBinMinimumIsoDistance = 0.;
877 Double_t kGClastXBinMinimumIsoDistance = TMath::PiOver2();
878
879 Int_t kGCnXBinsFFzHdrGam = 100;
880 Double_t kGCfirstXBinFFzHdrGam = 0.;
881 Double_t kGClastXBinFFzHdrGam = 5;
882
883 Int_t kGCnXBinsImbalanceHdrGam = 100;
884 Double_t kGCfirstXBinImbalanceHdrGam = -5.;
885 Double_t kGClastXBinImbalanceHdrGam = 5.;
886 ////////////////////////////////////////////////////////
887
888
889 /** ---------- end Define the binning for the different plot types here ----------------------*/
890
891
892 /************************************************************************************************
893  *                                                                                              *
894  *                                                                                              *
895  *                     EVERYTHING BELOW IS FOR DEVELOPERS ONLY                                  *
896  *                                                                                              *
897  *                                                                                              *
898  ************************************************************************************************/
899 TString kGCoutputFileName = "histogramsGammaConversion";
900 TString kGCoutputFileAppendix = "";
901 TString kGCdataList = "";
902 Bool_t kGCwriteNtuple = kFALSE;
903 // WE DOO NOT NEED TO CHANGE THIS (kGCusePWG4PartCorr) ANYMORE SINCE IT IS TAKEN CARE OF AUTOMATICALLY NOW
904 Bool_t kGCusePWG4PartCorr = kTRUE;
905
906 /** Flag to enable running on train  */
907 Bool_t kGCrunOnTrain = kFALSE;
908 Bool_t kGCrunOnGsiTrain = kFALSE;
909
910 /** ------------------------------ Monte Carlo flag -----------------------------------------*/
911 Bool_t kGCdoMCTruth = kTRUE;
912 /** ---------------------------- end Monte Carlo flag ---------------------------------------*/
913
914 /** ------------------------------ Selecting trigger CINT1B -----------------------------------*/
915 Bool_t kGCtriggerCINT1B = kFALSE;
916 /** ---------------------------- end Monte Carlo flag ---------------------------------------*/
917
918 /** ------------------------- Choose KFParticle OR ESDTrack  --------------------------------*/
919 Bool_t kGCuseKFParticle = kTRUE;
920 Bool_t kGCuseESDTrack   = kFALSE;
921 /** ----------------------- end Choose KFParticle OR ESDTrack  -----------------------------*/
922
923 /**------------------------------Flag to apply dEdx cut base on sigmas to electron line----------*/
924 Bool_t kGCdodEdxSigmaCut= kTRUE;
925 /**------------------------------end Flag to apply NsigmadEdx cut ----------*/
926
927 Double_t kGCPIDnSigmaAboveElectronLine=5;
928 Double_t kGCPIDnSigmaBelowElectronLine=-3;
929 Double_t kGCPIDnSigmaAbovePionLine=0;
930 Double_t kGCPIDMinPnSigmaAbovePionLine=1.;
931 Double_t kGCPIDMaxPnSigmaAbovePionLine=3.;
932
933 /**------- Flag to apply rejection at LowP of Kaons, protons , pions------------*/
934 Bool_t kGCdoPionRejectionLowP=kTRUE;
935 Bool_t kGCdoKaonRejectionLowP=kTRUE;
936 Bool_t kGCdoProtonRejectionLowP=kTRUE;
937 /**---------------------------------------*/
938
939 Double_t kGCPIDnSigmaAtLowPAroundKaonLine=0;
940 Double_t kGCPIDnSigmaAtLowPAroundProtonLine=0;
941 Double_t kGCPIDnSigmaAtLowPAroundPionLine=0;
942
943 Double_t kGCPIDMinPKaonRejectionLowP=1.5;
944 Double_t kGCPIDMinPProtonRejectionLowP=2.;
945 Double_t kGCPIDMinPPionRejectionLowP=0.5;
946
947
948 Bool_t kGCdoQtGammaSelection=kTRUE;
949 Double_t kGCQtMax=100.;
950
951
952
953 Bool_t scanArguments(TString arguments){
954   
955   Bool_t iResult = kTRUE;
956         
957   TString allArgs=arguments;
958   TString argument;
959   int bMissingParam=0;
960
961   cout<<"Arguments received: "<<allArgs.Data()<<endl;
962         
963   TObjArray* pTokens=allArgs.Tokenize(" ");
964   if (pTokens) {
965                 
966     for(int i=0; i<pTokens->GetEntries() && iResult==kTRUE; i++) {
967       argument=((TObjString*)pTokens->At(i))->GetString();
968                         
969       if(argument.IsNull()) continue;
970       // -- deconvolute-time option
971       if(argument.CompareTo("-data-list") == 0){
972         if((bMissingParam=(++i>=pTokens->GetEntries()))) break;
973         kGCdataList = ((TObjString*)pTokens->At(i))->GetString();
974         if(kGCdataList.IsNull()){
975           cout<<"-data-list is NULL"<<endl;
976           iResult=kFALSE;
977         }
978         else{
979           cout<<"Data list is set to: "<<kGCdataList<<endl;
980         }
981       }
982       else if(argument.CompareTo("-output-file-name") == 0){
983         if((bMissingParam=(++i>=pTokens->GetEntries()))) break;
984         kGCoutputFileName = ((TObjString*)pTokens->At(i))->GetString();
985         if(kGCoutputFileName.IsNull()){
986           cout<<"-output-file-name is NULL"<<endl;
987           iResult=kFALSE;
988         }
989         else{
990           cout<<"Setting output file name to: "<<kGCoutputFileName<<endl;
991         }
992       }
993       else if (argument.CompareTo("-bg-off") == 0){
994         kGCcalculateBackground =kFALSE;
995       }
996       else if (argument.CompareTo("-bg-prob-off") == 0){
997         kGCdoBGProbability = kFALSE;
998       }
999       else if (argument.CompareTo("-bg-prob-on") == 0){
1000         kGCdoBGProbability = kTRUE;
1001       }
1002       else if (argument.CompareTo("-bg-rotation-off") == 0){
1003         kGCUseRotationMethodInBG = kFALSE;
1004       }
1005       else if (argument.CompareTo("-use-v0-multiplicity") == 0){
1006         kGCUseTrackMultiplicityForBG = kFALSE;
1007       }
1008       else if (argument.CompareTo("-apply-chi2-cut") == 0){
1009         kGCApplyChi2Cut = kTRUE;
1010       }
1011       else if(argument.CompareTo("-set-number-of-rotations") == 0){
1012         if((bMissingParam=(++i>=pTokens->GetEntries()))) break;
1013         kGCnumberOfRotationEventsForBG = ((TObjString*)pTokens->At(i))->GetString().Atoi();
1014       }
1015       else if(argument.CompareTo("-set-number-of-degrees") == 0){
1016         if((bMissingParam=(++i>=pTokens->GetEntries()))) break;
1017         kGCnDegreeRotationPMForBG = ((TObjString*)pTokens->At(i))->GetString().Atoi();
1018       }
1019       else if (argument.CompareTo("-low-memory") == 0){
1020         kGCLowMemoryConsumption = kTRUE;
1021       }
1022       else if (argument.CompareTo("-move-bg-vertex") == 0){
1023         kGCMoveParticlesAccordingToVertex = kTRUE;
1024       }
1025       else if (argument.CompareTo("-check-neutralmeson-pi0s") == 0){
1026         kGCdoNeutralMesonV0MCCheck=kTRUE;
1027       }
1028       else if (argument.CompareTo("-use-offline-finder") == 0){
1029         kGCUseOnFlyV0Finder = kFALSE;
1030       }
1031       else if (argument.CompareTo("-write-ntuple") == 0){
1032         cout<<"Writing ntuple to file."<<endl;
1033         kGCwriteNtuple = kTRUE;
1034       }
1035       else if (argument.CompareTo("-run-on-train") == 0){
1036         cout<<"Running on train"<<endl;
1037         //kGCWriteStandardAOD=kTRUE;
1038         kGCDeltaAODFilename="";
1039         kGCrunOnTrain = kTRUE;
1040       }
1041       else if (argument.CompareTo("-run-on-gsi-train") == 0){
1042         cout<<"Running on gsi train"<<endl;
1043         //kGCWriteStandardAOD=kFALSE;
1044         kGCrunOnTrain = kTRUE;
1045         kGCrunOnGsiTrain = kTRUE;
1046       }
1047       else if (argument.CompareTo("-run-jet") == 0){
1048         cout<<"Running jet analysis"<<endl;
1049         kGCrunJet = kTRUE;
1050       }
1051       else if (argument.CompareTo("-run-gamma-jet-task") == 0){
1052         cout<<"Running gamma jet task"<<endl;
1053         kGCRunGammaJetTask= kTRUE;
1054       }
1055       else if (argument.CompareTo("-run-neutralmeson") == 0){
1056         cout<<"Running neutral meson analysis"<<endl;
1057         kGCrunNeutralMeson = kTRUE;
1058       }
1059       else if (argument.CompareTo("-run-neutral-meson") == 0){
1060         cout<<"Running neutral meson analysis"<<endl;
1061         kGCrunNeutralMeson = kTRUE;
1062       }
1063       else if (argument.CompareTo("-run-omega-meson") == 0){
1064         cout<<"Running omega meson analysis"<<endl;
1065         kGCrunOmegaMeson = kTRUE;
1066       }
1067       else if (argument.CompareTo("-run-chic") == 0){
1068         cout<<"Running Chi_c analysis"<<endl;
1069         kGCrunChic = kTRUE;
1070       }
1071       else if (argument.CompareTo("-run-dalitz") == 0){
1072         cout<<"Running Dalitz analysis"<<endl;
1073         kGCrunDalitz = kTRUE;
1074       }
1075       else if (argument.CompareTo("-run-cf") == 0){
1076         cout<<"Running CF"<<endl;
1077         kGCrunCF = kTRUE;
1078       }
1079       else if (argument.CompareTo("-run-resolution") == 0){
1080         cout<<"Running Resolution"<<endl;
1081         kGCrunRES = kTRUE;
1082       }
1083       else if (argument.CompareTo("-run-recalculateV0") == 0){
1084         cout<<"Running RecalculateV0ForGamma"<<endl;
1085         kGCRecalculateV0ForGamma=kTRUE;
1086       }
1087       else if (argument.CompareTo("-jet-off") == 0){
1088         cout<<"Skipping jet analysis"<<endl;
1089         kGCrunJet = kFALSE;
1090       }
1091       else if (argument.CompareTo("-neutralmeson-off") == 0){
1092         cout<<"Skipping neutral meson analysis"<<endl;
1093         kGCrunNeutralMeson = kFALSE;
1094       }
1095       else if (argument.CompareTo("-neutral-meson-off") == 0){
1096         cout<<"Skipping neutral meson analysis"<<endl;
1097         kGCrunNeutralMeson = kFALSE;
1098       }
1099       else if (argument.CompareTo("-chic-off") == 0){
1100         cout<<"Skipping Chi_c analysis"<<endl;
1101         kGCrunChic = kFALSE;
1102       }
1103       else if (argument.CompareTo("-mc-off") == 0){
1104         cout<<"Switching off kGCdoMCTruth"<<endl;
1105         kGCdoMCTruth = kFALSE;
1106       }
1107       else if (argument.CompareTo("-trigger-CINT1B") == 0){
1108         cout<<"Selecting ONLY kGCtriggerCINT1B"<<endl;
1109         kGCtriggerCINT1B = kTRUE;
1110       }
1111       else if (argument.CompareTo("-use-own-xyz") == 0){
1112         cout<<"Switching on use own xyz calculation"<<endl;
1113         kGCdoOwnXYZCalculation = kTRUE;
1114       }
1115       else if (argument.CompareTo("-use-ConstructGamma") == 0){
1116         cout<<"Switching on use ConstructGamma and OFF own xyz calculation"<<endl;
1117         kGCdoOwnXYZCalculation = kFALSE;
1118         kGCdoConstructGamma = kTRUE;
1119       }
1120       else if (argument.CompareTo("-no-aod") == 0){
1121         cout<<"Turning off AOD"<<endl;
1122         kGCWriteAOD = kFALSE;
1123       }
1124       else if (argument.CompareTo("-force-aod") == 0){
1125         cout<<"Turning on FillAOD = kTRUE every event; If running in common train this should probably not be done!!!"<<endl;
1126         kGCForceAOD = kTRUE;
1127       }
1128       else if (argument.CompareTo("-standard-aod") == 0){
1129         cout<<"Writing to standard AOD, will only work on train"<<endl;
1130         kGCDeltaAODFilename = "";
1131       }
1132       else if(argument.CompareTo("-append-to-output-file") == 0){
1133         if((bMissingParam=(++i>=pTokens->GetEntries()))) break;
1134         kGCoutputFileAppendix = TString("_")+((TObjString*)pTokens->At(i))->GetString();
1135         if(kGCoutputFileAppendix.IsNull()){
1136           cout<<"-appending-to-output-file is NULL"<<endl;
1137           iResult=kFALSE;
1138         }
1139         else{
1140           cout<<"Appending to the output file: "<<kGCoutputFileAppendix<<endl;
1141         }
1142       }
1143       else if(argument.CompareTo("-set-cut-selection") == 0){
1144         if((bMissingParam=(++i>=pTokens->GetEntries()))) break;
1145         kGCAnalysisCutSelectionId = ((TObjString*)pTokens->At(i))->GetString();
1146         cout<<"The analysis cut selection is set to: "<<kGCAnalysisCutSelectionId.Data()<<endl;
1147       }
1148     }
1149     delete pTokens;
1150   }
1151   if (bMissingParam) {
1152     cout<<"Missing parameter for argument "<< argument.Data()<<endl;
1153     iResult=kFALSE;
1154   }
1155   return iResult;
1156 }
1157
1158 void SetVersionLibrary(){
1159   // Check if the file $ALICE_ROOT/PWG4/GammaConv/AliAnalysisTaskGammaConversion.cxx exists.
1160   // If yes, we set kGCusePWG4PartCorr to false since we have a newer version
1161   // If no, kGCusePWG4PartCorr is true.
1162         
1163   TString file = gSystem->Getenv("ALICE_ROOT");
1164   file+="/PWG4/PartCorr/AliAnalysisTaskGammaConversion.cxx";
1165         
1166   ifstream stream;
1167   stream.open(file.Data());
1168         
1169   if(!stream){
1170     kGCusePWG4PartCorr=kFALSE;
1171   }
1172   else{
1173     kGCusePWG4PartCorr=kTRUE;
1174   }
1175   stream.close();
1176 }
1177
1178
1179 AliAnalysisTaskGammaConversion* ConfigGammaConversion(TString arguments, AliAnalysisDataContainer *cin_esd=NULL){
1180
1181                                                       
1182         
1183   
1184   if(!scanArguments(arguments)){
1185     break;
1186   }
1187         
1188   SetVersionLibrary(); // checks if PWG4GammaConv or PWG4PartCorr is used
1189         
1190   if(cin_esd == NULL && kGCrunOnTrain == kTRUE){
1191     cout<<"Error: kGCrunOnTrain flag is set to true but the input AliAnalysisDataContainer is NULL"<<endl;
1192     cout<<"       you must also supply the AliAnalysisDataContainer as an argument"<<endl;
1193     return;
1194   }
1195         
1196   if(cin_esd != NULL && kGCrunOnTrain == kFALSE){
1197     cout<<"Error: kGCrunOnTrain flag is set to false but the input AliAnalysisDataContainer is not null"<<endl;
1198     cout<<"       add -run-on-train to the arguments to turn switch kGCrunOnTrain to kTRUE"<<endl;
1199     return;
1200   }
1201   if(kGCrunOnTrain == kFALSE){
1202     if(kGCnumberOfFilesToAnalyze==0){
1203       ifstream dataInStream;
1204       dataInStream.open(kGCdataList.Data());
1205       if ( !dataInStream ){
1206         cout<<"Data list file does not exist: "<<kGCdataList.Data()<<endl;
1207         return 0;
1208       }
1209       string line;
1210       while ( !dataInStream.eof() )
1211         {
1212           getline(dataInStream, line);
1213           if(line.compare("") != 0){//checks if there is an empty line in the data list
1214             kGCnumberOfFilesToAnalyze++;
1215           }
1216         }
1217     }
1218     cout<<"Number Of files to analyze: "<<kGCnumberOfFilesToAnalyze<<endl;
1219                 
1220     build();//build (if necessary) and load the libraries needed
1221     LoadLibraries();
1222     gROOT->LoadMacro("$ALICE_ROOT/PWG0/CreateESDChain.C"); // load the CreateChain macro
1223   }
1224                 
1225   if(!kGCrunOnTrain){
1226     // for the train leave this to the steering macro
1227     AliLog::SetGlobalDebugLevel(0);
1228     AliLog::SetGlobalLogLevel(AliLog::kFatal);
1229   }
1230   // ------------------------------------------------------------------------
1231                 
1232     // for CF
1233                 
1234     //Container def.
1235     const Double_t ptmin = kGCfirstXBinPt;
1236     const Double_t ptmax = kGClastXBinPt;
1237     const Double_t etamin = kGCfirstXBinEta;
1238     const Double_t etamax = kGClastXBinEta;
1239     const Double_t massmin = kGCfirstXBinPi0Mass;
1240     const Double_t massmax = kGClastXBinPi0Mass;
1241                 
1242                 
1243     // sensitive variables
1244     UInt_t ipt = 0;
1245     UInt_t ieta = 1;
1246     UInt_t imass = 2;   
1247                 
1248     //how many selection steps 
1249     UInt_t nstep = 20;
1250     const Int_t nvar = 3;
1251
1252     Int_t kGCnXBinsPtCF=40;
1253     Int_t kGCnXBinsEtaCF=8;
1254     Int_t kGCnXBinsPi0MassCF=10;
1255
1256     if(!kGCrunCF){
1257       nstep=1;
1258       kGCnXBinsPtCF=1;
1259       kGCnXBinsEtaCF=1;
1260       kGCnXBinsPi0MassCF=1;
1261     }
1262     const Int_t nbin0 = kGCnXBinsPtCF;  // do not use same variable for CF than for histogram
1263     const Int_t nbin1 = kGCnXBinsEtaCF; // do not use same variable for CF than for histogram
1264     const Int_t nbin2 = kGCnXBinsPi0MassCF; // do not use same variable for CF than for histogram               
1265                 
1266     //arrays for the number of bins in each dimension
1267     Int_t iBin[nvar];
1268     iBin[0] = nbin0;
1269     iBin[1] = nbin1;
1270     iBin[2] = nbin2;    
1271                 
1272     //arrays for lower bounds
1273     Double_t *binLim0 = new Double_t[nbin0+1];
1274     Double_t *binLim1 = new Double_t[nbin1+1];  
1275     Double_t *binLim2 = new Double_t[nbin2+1];  
1276                 
1277     // values for lower bounds
1278     for(Int_t i = 0; i <= nbin0; i++) binLim0[i] = ptmin + (ptmax - ptmin)/nbin0*i;
1279     for(Int_t i = 0; i <= nbin1; i++) binLim1[i] = etamin + (etamax - etamin)/nbin1*i;
1280     for(Int_t i = 0; i <= nbin2; i++) binLim2[i] = massmin + (massmax - massmin)/nbin2*i;
1281                 
1282     // create container
1283     AliCFContainer *container = new AliCFContainer("container","container for gammaconversion", nstep,nvar,iBin);
1284     container->SetBinLimits(ipt,binLim0);
1285     container->SetBinLimits(ieta,binLim1);
1286     container->SetBinLimits(imass,binLim2);     
1287                 
1288     AliCFManager *man = new AliCFManager();
1289     man->SetParticleContainer(container);
1290     for(int i = 0;i<nstep;i++){
1291       TObjArray *tmp = new TObjArray(0);
1292       man->SetParticleCutsList(i,tmp) ;
1293     }
1294
1295     // end ---------------------------------------------------------------------------
1296                 
1297                 
1298
1299         
1300   AliGammaConversionHistograms* histograms = new AliGammaConversionHistograms();  
1301   AddHistograms(histograms);
1302         
1303   // Create the Analysis manager
1304   AliAnalysisManager *mgr =NULL;
1305   if(kGCrunOnTrain == kFALSE){
1306     mgr  = new AliAnalysisManager("My Manager", "My Analysis");
1307   }
1308   else{
1309     mgr = AliAnalysisManager::GetAnalysisManager();
1310   }
1311         
1312   if (!mgr) {
1313     ::Error("ConfigGammaConversion", "No analysis manager to connect to.");
1314     return NULL;
1315   }
1316   if(kGCrunOnTrain == kTRUE){
1317     if (!mgr->GetInputEventHandler()) {
1318       ::Error("ConfigGammaConversion", "This task requires an input event handler");
1319       return NULL;
1320     }
1321   }
1322   AliESDInputHandler* inpHandler = NULL;
1323         
1324   if(kGCrunOnTrain == kFALSE){
1325     // Define Input Event Handler 
1326     inpHandler = new AliESDInputHandler();
1327   }
1328   // Define MC Truth Event Handler
1329   AliMCEventHandler* mcHandler = NULL;
1330   if(kGCdoMCTruth){
1331     if(kGCrunOnTrain == kFALSE){
1332       mcHandler = new AliMCEventHandler();
1333     }
1334     else{
1335       mcHandler = (AliMCEventHandler*)mgr->GetMCtruthEventHandler();
1336     }
1337     if (!mcHandler) {
1338       ::Error("", "No MC handler connected");
1339       return NULL;
1340     }
1341   }
1342         
1343
1344         
1345   if(kGCrunOnTrain == kFALSE){
1346     mgr->SetInputEventHandler  (inpHandler);
1347     mgr->SetMCtruthEventHandler(mcHandler);
1348   }
1349   // Be sure you are told what you are doing
1350   // mgr->SetDebugLevel(10);
1351         
1352   // Declare Common Input Tchain
1353   AliAnalysisDataContainer *cinput1 = NULL;
1354   
1355   if(kGCusePWG4PartCorr){
1356   
1357     if(kGCrunOnTrain == kFALSE){
1358       cinput1 = mgr->CreateContainer("GammaConvChain",TChain::Class(),AliAnalysisManager::kInputContainer);
1359     
1360     } else{
1361       cinput1 = cin_esd;
1362     
1363     }
1364   }
1365   else{
1366       cinput1 = mgr->GetCommonInputContainer();
1367   }
1368         
1369   // Common Output Tree in common ??????default?????? output file
1370   // CKB kGCusePWG4PartCorr and writestandard are not mutually exclusive?
1371   AliAnalysisDataContainer *coutput1 = NULL;
1372
1373   if(kGCWriteAOD) {
1374     if(kGCrunOnTrain && !(kGCrunOnGsiTrain)) {
1375       coutput1 = mgr->GetCommonOutputContainer();
1376     } else {
1377       coutput1 = mgr->CreateContainer("GammaConvTree",TTree::Class(),AliAnalysisManager::kOutputContainer, "default");  
1378     }
1379   }
1380         
1381   // Private output objects
1382   if(kGCoutputFileName.Contains(".root")){
1383     kGCoutputFileName.ReplaceAll(".root","");
1384   }
1385   if(kGCoutputFileAppendix.Contains(".root")){
1386     kGCoutputFileAppendix.ReplaceAll(".root","");
1387   }
1388   //TString fileOut = kGCoutputFileName + kGCoutputFileAppendix + ".root";
1389
1390   
1391   TString outputfile = AliAnalysisManager::GetCommonFileName();
1392   cout<<"Analyis cut selection ID is: "<<kGCAnalysisCutSelectionId.Data()<<endl;
1393   //  outputfile += Form(":PWG4_GammaConversion_%s",kGCAnalysisCutSelectionId.Data());
1394   outputfile += Form(":PWG4_GammaConversion");
1395
1396 //   if(kGCrunNeutralMeson==kTRUE) outputfile +="1";  else outputfile +="0";
1397
1398 //   if(kGCrunJet==kTRUE) outputfile +="1"; else outputfile +="0";
1399
1400 //   if(kGCrunChic==kTRUE) outputfile +="1"; else outputfile +="0";
1401
1402 //   if(kGCrunCF==kTRUE) outputfile +="1"; else outputfile +="0";
1403
1404 //   if(kGCcalculateBackground==kTRUE) outputfile +="1"; else outputfile +="0";
1405
1406 //   if(kGCdoNeutralMesonV0MCCheck==kTRUE) outputfile +="1"; else outputfile +="0";
1407
1408 //   if(kGCrunOmegaMeson==kTRUE) outputfile +="1"; else outputfile +="0";
1409
1410 //   if(kGCrunRES==kTRUE) outputfile +="1"; else outputfile +="0";
1411
1412   outputfile += Form("_%s",kGCAnalysisCutSelectionId.Data());
1413
1414   cout<<"Ouput file::"<<  outputfile <<endl;
1415   AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(Form("histogramsAliGammaConversion_%s",kGCAnalysisCutSelectionId.Data()), TList::Class(),AliAnalysisManager::kOutputContainer, outputfile);
1416   // for CF
1417   AliAnalysisDataContainer *coutput3 = mgr->CreateContainer(Form("GammaConvccontainer0_%s",kGCAnalysisCutSelectionId.Data()),AliCFContainer::Class(),AliAnalysisManager::kOutputContainer,outputfile);
1418         
1419   //------------------------ END: Define input/output handlers ---------------------------------------------------
1420         
1421   //check for errors in the specified data
1422   if(kGCuseKFParticle == kTRUE && kGCuseESDTrack == kTRUE){
1423     //Print warning, cannot use both
1424     ::Error("ConfigGammaConversion","Both kGCuseKFParticle and kGCuseESDTracks can be true at the same time")
1425       }
1426   if(kGCuseKFParticle == kFALSE && kGCuseESDTrack == kFALSE){
1427     //Print warning, one have to be specified
1428     ::Error("ConfigGammaConversion","Both kGCuseKFParticle and kGCuseESDTracks can be false at the same time")
1429       }
1430         
1431
1432   if(!SetAnalysisCutSelection(kGCAnalysisCutSelectionId)){
1433     cout<<"Error in analysis cut selection"<<endl;
1434     return 0;
1435   }
1436         
1437   //Create the V0Reader
1438   AliV0Reader * v0Reader = new AliV0Reader();
1439   if(kGCuseKFParticle){
1440     v0Reader->UseKFParticle();
1441   }
1442   else if(kGCuseESDTrack){
1443     v0Reader->UseESDTrack();
1444   }
1445
1446   v0Reader->SetMaxVertexZ(kGCmaxVertexZ);
1447   v0Reader->SetNegativeTrackPID(kGCpidOfNegativeTrack);
1448   v0Reader->SetPositiveTrackPID(kGCpidOfPositiveTrack);
1449   v0Reader->SetMaxRCut(kGCmaxRCut);
1450   v0Reader->SetMinRCut(kGCminRCut);
1451   v0Reader->SetEtaCut(kGCetaCut);
1452   v0Reader->SetRapidityMesonCut(kGCrapidityCutMeson);
1453   v0Reader->SetPtCut(kGCptCut);
1454   v0Reader->SetSinglePtCut(kGCsingleptCut);
1455   v0Reader->SetLineCutZRSlope(kGCLineCutZRSlope);
1456   v0Reader->SetLineCutZValue(kGCLineCutZValue); 
1457   v0Reader->SetMaxZCut(kGCmaxZCut);     
1458   v0Reader->SetMinClsTPCCut(kGCminClsTPCCut);   
1459   v0Reader->SetMinClsTPCCutToF(kGCminClsTPCCutToF);     
1460   v0Reader->SetChi2CutConversion(kGCchi2CutConversion);
1461   v0Reader->SetChi2CutMeson(kGCchi2CutMeson);
1462   v0Reader->SetAlphaCutMeson(kGCalphaCutMeson);
1463   v0Reader->SetAlphaMinCutMeson(kGCalphaMinCutMeson);
1464   v0Reader->SetPIDProbability(kGCprobElectron);
1465   v0Reader->SetXVertexCut(kGCxVertexCut);
1466   v0Reader->SetYVertexCut(kGCyVertexCut);
1467   v0Reader->SetZVertexCut(kGCzVertexCut);
1468   v0Reader->SetSigmaMass(kGCsigmaCutGammaMass);
1469   v0Reader->SetUseImprovedVertex(kGCuseImprovedVertex);
1470   v0Reader->SetDoMCTruth(kGCdoMCTruth);
1471   v0Reader->SetUseOwnXYZCalculation(kGCdoOwnXYZCalculation);
1472   v0Reader->SetUseChargedTracksMultiplicityForBG(kGCUseTrackMultiplicityForBG);
1473   // for CF
1474   v0Reader->SetCFManager(man);
1475         
1476   // for dEdx N sigma Cut
1477   v0Reader->SetDodEdxSigmaCut(kGCdodEdxSigmaCut);
1478   v0Reader->SetPIDnSigmaAboveElectronLine(kGCPIDnSigmaAboveElectronLine);
1479   v0Reader->SetPIDnSigmaBelowElectronLine(kGCPIDnSigmaBelowElectronLine);
1480   v0Reader->SetPIDnSigmaAbovePionLine(kGCPIDnSigmaAbovePionLine);
1481   v0Reader->SetPIDMinPnSigmaAbovePionLine(kGCPIDMinPnSigmaAbovePionLine);
1482   v0Reader->SetPIDMaxPnSigmaAbovePionLine(kGCPIDMaxPnSigmaAbovePionLine);
1483   v0Reader->SetOnFlyFlag(kGCUseOnFlyV0Finder);
1484   v0Reader->SetCalculateBackground(kGCcalculateBackground);
1485
1486   // for the rejection at LowP based on Dedx signal
1487
1488   v0Reader->SetDoKaonRejectionLowP(kGCdoKaonRejectionLowP);
1489   v0Reader->SetDoProtonRejectionLowP(kGCdoProtonRejectionLowP);
1490   v0Reader->SetDoPionRejectionLowP(kGCdoPionRejectionLowP);
1491   v0Reader->SetPIDnSigmaAtLowPAroundKaonLine(kGCPIDnSigmaAtLowPAroundKaonLine);
1492   v0Reader->SetPIDnSigmaAtLowPAroundProtonLine(kGCPIDnSigmaAtLowPAroundProtonLine);
1493   v0Reader->SetPIDnSigmaAtLowPAroundPionLine(kGCPIDnSigmaAtLowPAroundPionLine);
1494   v0Reader->SetPIDMinPKaonRejectionLowP(kGCPIDMinPKaonRejectionLowP);
1495   v0Reader->SetPIDMinPProtonRejectionLowP(kGCPIDMinPProtonRejectionLowP);
1496   v0Reader->SetPIDMinPPionRejectionLowP(kGCPIDMinPPionRejectionLowP);
1497   v0Reader->SetDoQtGammaSelection(kGCdoQtGammaSelection);
1498   v0Reader->SetQtMax(kGCQtMax);
1499   kGCNEventsForBGCalculation= kGCnumberOfRotationEventsForBG;
1500   cout<< "number of Events used for mixing::"<<kGCNEventsForBGCalculation<<endl;
1501   v0Reader->SetNEventsForBG(kGCNEventsForBGCalculation);
1502
1503   // Create the GammaConversionTask
1504
1505
1506   AliAnalysisTaskGammaConversion *gammaconversion = 
1507     new AliAnalysisTaskGammaConversion(Form("GammaConversionTask_%s",kGCAnalysisCutSelectionId.Data()));
1508
1509   cout<<"name of Task::"<< Form("GammaConversionTask_%s",kGCAnalysisCutSelectionId.Data())<< " "<<gammaconversion->GetName() <<endl;
1510   gammaconversion->SetDebugLevel(0);
1511         
1512   gammaconversion->SetWriteNtuple(kGCwriteNtuple);
1513         
1514   gammaconversion->SetV0Reader(v0Reader);
1515   gammaconversion->SetCalculateBackground(kGCcalculateBackground);
1516   gammaconversion->Init();
1517         
1518   gammaconversion->SetElectronMass(kGCelectronMass);
1519   gammaconversion->SetGammaMass(kGCgammaMass);
1520   gammaconversion->SetPi0Mass(kGCpi0Mass);
1521   gammaconversion->SetEtaMass(kGCetaMass);
1522         
1523   gammaconversion->SetGammaWidth(kGCgammaWidth);
1524   gammaconversion->SetPi0Width(kGCpi0Width);
1525   gammaconversion->SetEtaWidth(kGCetaWidth);
1526         
1527   gammaconversion->SetMinOpeningAngleGhostCut(kGCminOpeningAngleGhostCut);
1528   
1529         
1530   Double_t lowPtMapping=0.4;
1531   Double_t highPtMapping=1.5;
1532   gammaconversion->SetLowPtMapping(lowPtMapping);
1533   gammaconversion->SetHighPtMapping(highPtMapping);
1534
1535   // define the width constraint used by KF particle.
1536   Double_t gammaWidth = 0.01;
1537   Double_t pi0Width   = 0.01;
1538   Double_t etaWidth   = 0.01;
1539         
1540   gammaconversion->SetHistograms(histograms);
1541   v0Reader->SetHistograms(histograms);// also give the pointer to the v0reader, for debugging cuts
1542
1543   gammaconversion->SetTriggerCINT1B(kGCtriggerCINT1B);
1544   gammaconversion->SetDoMCTruth(kGCdoMCTruth);
1545         
1546   gammaconversion->SetDoNeutralMeson(kGCrunNeutralMeson);
1547   gammaconversion->SetDoNeutralMesonV0MCCheck(kGCdoNeutralMesonV0MCCheck);
1548   gammaconversion->SetDoJet(kGCrunJet);
1549   gammaconversion->SetDoChic(kGCrunChic);
1550   gammaconversion->SetDoOmegaMeson(kGCrunOmegaMeson);
1551   gammaconversion->SetRecalculateV0ForGamma(kGCRecalculateV0ForGamma);
1552   gammaconversion->SetUseChargedTracksMultiplicityForBG(kGCUseTrackMultiplicityForBG);
1553   gammaconversion->SetMoveParticleAccordingToVertex(kGCMoveParticlesAccordingToVertex);
1554   gammaconversion->SetApplyChi2Cut(kGCApplyChi2Cut);
1555   cout<<"NumberOfDegrees in rotatation method set to: "<<kGCnDegreeRotationPMForBG<<endl;
1556   gammaconversion->SetPMDegreesBG(kGCnDegreeRotationPMForBG);
1557   if(kGCUseRotationMethodInBG){
1558     cout<<"Using rotation method for bg."<<endl;
1559   }
1560   else{
1561     cout<<"Using mixed event for bg."<<endl;
1562   }
1563   if(kGCUseTrackMultiplicityForBG){
1564     cout<<"Using track multiplicity for bck"<<endl;
1565   }else{
1566     cout<<"Using V0 multiplicity for bck"<<endl;
1567   }
1568   gammaconversion->SetDoRotation(kGCUseRotationMethodInBG);
1569   cout<<"Using :"<<kGCnumberOfRotationEventsForBG<<" rotations in bg calculation"<<endl;
1570   gammaconversion->SetNumberOfRotationsBG(kGCnumberOfRotationEventsForBG);
1571   gammaconversion->SetCheckBGProbability(kGCdoBGProbability);
1572
1573   gammaconversion->SetRemovePileUp(kGCRemovePileUp);
1574   gammaconversion->SetSelectV0AND(kGCSelectV0AND);
1575   gammaconversion->SetUseMultiplicity(kGCUseMultiplicity);
1576   gammaconversion->SetUseMultiplicityBin(kGCUseMultiplicityBin);
1577
1578   v0Reader->SetIsHeavyIon(kGCIsHeavyIon);
1579   v0Reader->SetUseCorrectedTPCClsInfo(kGCUseCorrectedTPCClsInfo);
1580   gammaconversion->SetUseCentrality(kGCUseCentrality);
1581   if(kGCUseCentrality){
1582     gammaconversion->SetUseCentralityBin(kGCUseCentralityBin);
1583   }
1584
1585
1586
1587
1588   // for CF
1589   gammaconversion->SetCFManager(man);
1590   gammaconversion->SetDoCF(kGCrunCF);
1591   v0Reader->SetDoCF(kGCrunCF);
1592
1593   // Add task to the manager 
1594   mgr->AddTask(gammaconversion);
1595
1596
1597   // Define Output Event Handler and add
1598   if(kGCWriteAOD){
1599     gammaconversion->SetForceAOD(kGCForceAOD);
1600     gammaconversion->SetOutputAODClassName("AliAODConversionParticle");
1601     //gammaconversion->SetOutputAODClassName("AliGammaConversionAODObject");
1602
1603     if( kGCrunOnTrain ) {
1604       
1605       AliAODHandler * aodHandler = dynamic_cast<AliAODHandler*>(mgr->GetOutputEventHandler());
1606       if(!aodHandler) {
1607         ::Error("This task requires an AOD handler");
1608         return NULL;
1609       }
1610       
1611       gammaconversion->SetDeltaAODFileName(kGCDeltaAODFilename);
1612       
1613       if(kGCDeltaAODFilename.Length() > 0) {
1614         mgr->RegisterExtraFile(kGCDeltaAODFilename.Data());
1615       }
1616       
1617     } else {
1618       if(kGCDeltaAODFilename.Length() == 0 ) {
1619         cout << "Error:: Need a file name for the AOD"<<endl;
1620         return NULL;
1621       }
1622       AliAODHandler* aodHandler = new AliAODHandler();
1623       aodHandler->SetOutputFileName(kGCDeltaAODFilename);
1624       aodHandler->SetCreateNonStandardAOD();
1625       mgr->SetOutputEventHandler(aodHandler);   
1626     }
1627   }  else {
1628     gammaconversion->SetCreateAOD(kFALSE);
1629   }
1630
1631   // Connect I/O to the task
1632   mgr->ConnectInput (gammaconversion, 0, cinput1);
1633   if(mgr->GetCommonOutputContainer())
1634     mgr->ConnectOutput(gammaconversion, 0, mgr->GetCommonOutputContainer());
1635   
1636   mgr->ConnectOutput(gammaconversion, 1, coutput2);
1637   mgr->ConnectOutput(gammaconversion, 2, coutput3);
1638   
1639   if(kGCRunGammaJetTask) {
1640     AliAnalysisTaskGammaJet * gammaJetTask = new AliAnalysisTaskGammaJet("GammaJetTask");
1641     if(kGCrunOnTrain) {
1642       gammaJetTask->SetDeltaAODFileName(kGCDeltaAODFileName);
1643     }
1644     
1645     mgr->ConnectInput(gammaJetTask, 0, cinput1);
1646     AliAnalysisDataContainer *coutputgj = mgr->CreateContainer("chistpt", TList::Class(), AliAnalysisManager::kOutputContainer, "AnalysisResultsConvJets.root");
1647     mgr->ConnectOutput(gammaJetTask, 1, coutputgj);
1648   }
1649
1650
1651   if( kGCrunDalitz ){
1652    
1653    gROOT->LoadMacro("$ALICE_ROOT/PWG4/macros/AddTaskGammaConvDalitz.C");
1654    AddTaskGammaConvDalitz( v0Reader, kGCcalculateBackground, kGCRunStandalone );
1655
1656   }
1657
1658   if(kGCrunOnTrain == kFALSE){
1659     if(kGCdataList.IsNull()){
1660       cout<<"Data list is not set, aborting."<<endl;
1661       return;
1662     }
1663     /*
1664       gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
1665       AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection();
1666       if(kGCdoMCTruth)physSelTask->GetPhysicsSelection()->SetAnalyzeMC();
1667       physSelTask->GetPhysicsSelection()->AddBackgroundIdentification(new AliBackgroundSelection());
1668       gammaconversion->SelectCollisionCandidates();     
1669     */
1670
1671     gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C");
1672     AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(kGCdoMCTruth,kTRUE);
1673     gammaconversion->SelectCollisionCandidates(); 
1674
1675     //    if(kGCrunOnTrain == kFALSE){
1676       TChain* chain= CreateESDChain(kGCdataList,kGCnumberOfFilesToAnalyze);
1677                         
1678       mgr->InitAnalysis();
1679                         
1680       mgr->PrintStatus();
1681                         
1682       mgr->StartAnalysis("local",chain);
1683       //    }
1684   }
1685   return gammaconversion;
1686 }
1687
1688 void LoadLibraries() {
1689                  
1690   TStopwatch timer;
1691   timer.Start();
1692   gSystem->Load("libTree.so");
1693   gSystem->Load("libGeom");
1694   
1695   gSystem->Load("libSTEERBase.so");
1696   gSystem->Load("libVMC.so");
1697   gSystem->Load("libESD.so");
1698   gSystem->Load("libAOD.so");
1699   gSystem->Load("libANALYSIS.so");
1700   gSystem->Load("libANALYSISalice.so");
1701   gSystem->Load("libCORRFW.so");
1702   gSystem->Load("libPWG4GammaConv.so");
1703   
1704   //  gSystem->ChangeDirectory(pwd.Data());
1705   
1706 }
1707 void build() {
1708         
1709   TStopwatch timer;
1710   timer.Start();
1711   gSystem->Load("libTree.so");
1712   gSystem->Load("libGeom");
1713         
1714   TString pwd = gSystem->WorkingDirectory();
1715         
1716   ////
1717   //Setting up STEERBase.par//
1718   ////
1719   cout<<"compiling STEERBase"<<endl;
1720   setupPar("STEERBase");
1721   gSystem->Load("libSTEERBase.so");
1722
1723
1724    ////
1725   //Setting up ESD.par//
1726   ////
1727   cout<<"compiling ESD"<<endl;
1728   setupPar("ESD");
1729   gSystem->Load("libVMC.so");
1730   gSystem->Load("libESD.so");
1731
1732         
1733   ////
1734   //Setting up AOD.par//
1735   ////
1736   cout<<"compiling AOD"<<endl;
1737   setupPar("AOD");
1738   gSystem->Load("libAOD.so");
1739         
1740   ////
1741   //Setting up ANALYSIS.par//
1742   ////
1743   cout<<"compiling ANALYSIS"<<endl;
1744   setupPar("ANALYSIS");
1745   gSystem->Load("libANALYSIS.so");
1746         
1747   ////
1748   //Setting up ANALYSISalice.par//
1749   ////
1750   cout<<"compiling ANALYSISalice"<<endl;
1751   setupPar("ANALYSISalice");
1752   gSystem->Load("libANALYSISalice.so");
1753         
1754   ////
1755   //Setting up CORRFW.par//
1756   ////
1757   cout<<"compiling CORRFW"<<endl;
1758   setupPar("CORRFW");
1759   gSystem->Load("libCORRFW.so");
1760         
1761   ////
1762   //Setting up PWG4GammaConv.par//
1763   ////
1764   cout<<"compiling PWG4GammaConv"<<endl;
1765   setupPar("PWG4GammaConv");
1766   gSystem->Load("libPWG4GammaConv.so");
1767   
1768   gSystem->ChangeDirectory(pwd.Data());
1769 }
1770
1771 Int_t setupPar(const char* pararchivename) {
1772   ///////////////////
1773   // Setup PAR File//
1774   ///////////////////
1775   if (pararchivename) {
1776     char processline[1024];
1777     sprintf(processline,".! tar xvzf %s.par",pararchivename);
1778     gROOT->ProcessLine(processline);
1779     const char* ocwd = gSystem->WorkingDirectory();
1780     gSystem->ChangeDirectory(pararchivename);
1781                 
1782     // check for BUILD.sh and execute
1783     if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
1784       printf("*******************************\n");
1785       printf("*** Building PAR archive    ***\n");
1786       printf("*******************************\n");
1787                         
1788       if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
1789         Error("runAnalysis","Cannot Build the PAR Archive! - Abort!");
1790         return -1;
1791       }
1792     }
1793     // check for SETUP.C and execute
1794     if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
1795       printf("*******************************\n");
1796       printf("*** Setup PAR archive       ***\n");
1797       printf("*******************************\n");
1798       gROOT->Macro("PROOF-INF/SETUP.C");
1799     }
1800                 
1801     gSystem->ChangeDirectory("../");
1802   }                                                                                                                                               
1803   return 1;
1804 }
1805
1806
1807
1808 void AddHistograms(AliGammaConversionHistograms *histograms){
1809   //---------------------------------------------- Jets ---------------------------------------------------------
1810   if(kGCrunJet == kTRUE){
1811     if (kGCplotdPhiHdrGam == kTRUE){
1812       histograms->AddHistogram("ESD_dphiHdrGam","ESD_dphiHdrGam", kGCnXBinsdphiHdrGam,kGCfirstXBindphiHdrGam,kGClastXBindphiHdrGam,"dphiHdrGam (rad)","Counts");
1813     }
1814                 
1815     if (kGCplotdPhiHdrGamIsolated == kTRUE){
1816       histograms->AddHistogram("ESD_dphiHdrGamIsolated","ESD_dphiHdrGamIsolated",  kGCnXBinsdphiHdrGam,kGCfirstXBindphiHdrGam,kGClastXBindphiHdrGam,"dphiHdrGamIsolated (rad)","Counts");
1817     }
1818                 
1819     if (kGCplotMinimumIsoDistance == kTRUE){
1820       histograms->AddHistogram("ESD_MinimumIsoDistance","ESD_MinimumIsoDistance", kGCnXBinsMinimumIsoDistance,kGCfirstXBinMinimumIsoDistance,kGClastXBinMinimumIsoDistance,"Minimum Iso Distance (rad)","Counts");
1821     }
1822                 
1823     if (kGCplotFFzHdrGam == kTRUE){
1824       histograms->AddHistogram("ESD_FFzHdrGam","ESD_FFzHdrGam", kGCnXBinsFFzHdrGam, kGCfirstXBinFFzHdrGam,kGClastXBinFFzHdrGam,"FFz Hdr Gam","Counts");
1825     }
1826                 
1827     if (kGCplotImbalanceHdrGam == kTRUE){
1828       histograms->AddHistogram("ESD_ImbalanceHdrGam","ESD_ImbalanceHdrGam", kGCnXBinsImbalanceHdrGam, kGCfirstXBinImbalanceHdrGam,kGClastXBinImbalanceHdrGam,"Imbalance Hdr Gam","Counts");
1829     }
1830   }//end if(kGCrunJet)
1831         
1832   //---------------------------------------------- Chi_c ---------------------------------------------------------
1833   if(kGCrunChic){
1834                 
1835     if(kGCplotESDInvMassePluseMinus == kTRUE){histograms->AddHistogram("ESD_InvMass_ePluseMinus","",kGCnXBinsJPsiMass, kGCfirstXBinJPsiMass, kGClastXBinJPsiMass, "",
1836                                                                        "");}
1837     if(kGCplotESDInvMassePluseMinus == kTRUE){histograms->AddHistogram("ESD_InvMass_ePluseMinusTest","",kGCnXBinsJPsiMass, kGCfirstXBinJPsiMass, kGClastXBinJPsiMass,
1838                                                                        "","");}
1839     if(kGCplotESDInvMassePluseMinus == kTRUE){histograms->AddHistogram("ESD_InvMass_xPlusxMinus","",kGCnXBinsJPsiMass, kGCfirstXBinJPsiMass, kGClastXBinJPsiMass, "",
1840                                                                        "");}
1841     if(kGCplotESDElectronPosNegPt == kTRUE){histograms->AddHistogram("ESD_ElectronPosNegPt","",kGCnXBinsEPosNegPt,kGCfirstXBinEPosNegPt,kGClastXBinEPosNegPt,"","");}
1842     if(kGCplotESDElectronPosNegEta == kTRUE){histograms->AddHistogram("ESD_ElectronPosNegEta","",kGCnXBinsEPosNegEta,kGCfirstXBinEPosNegEta,kGClastXBinEPosNegEta,"","
1843                                                                                                                                                   ");}
1844                 
1845     if(kGCplotESDElectronPosNegPt == kTRUE){histograms->AddHistogram("ESD_ElectronPosPt","",kGCnXBinsEPosNegPt,kGCfirstXBinEPosNegPt,kGClastXBinEPosNegPt,"","");}
1846     if(kGCplotESDElectronPosNegPt == kTRUE){histograms->AddHistogram("ESD_ElectronNegPt","",kGCnXBinsEPosNegPt,kGCfirstXBinEPosNegPt,kGClastXBinEPosNegPt,"","");}
1847                 
1848     if(kGCplotESDElectronPosNegAngle == kTRUE){histograms->AddHistogram("ESD_ElectronPosNegJPsiAngle","",kGCnXBinsEPosNegAngle,kGCfirstXBinEPosNegAngle,kGClastXBinEPosNegAngle,"","");}
1849
1850     if(kGCplotESDePoseNegAngle == kTRUE){histograms->AddHistogram("ESD_eNegePosAngleBeforeCut","",kGCnXBinsEPosNegAngle,kGCfirstXBinEPosNegAngle,kGClastXBinEPosNegAngle,"","");}
1851     if(kGCplotESDePoseNegAngle == kTRUE){histograms->AddHistogram("ESD_eNegePosAngleAfterCut","",kGCnXBinsEPosNegAngle,kGCfirstXBinEPosNegAngle,kGClastXBinEPosNegAngle,"","");}
1852     if(kGCplotESDInvMassGammaePluseMinusChiC == kTRUE) {histograms->AddHistogram("ESD_InvMass_GammaePluseMinusChiC","",kGCnXBinsChicMass,kGCfirstXBinChicMass,kGClastXBinChicMass,"","");}
1853     if(kGCplotESDInvMassGammaePluseMinusChiC == kTRUE) {histograms->AddHistogram("ESD_InvMass_GammaePluseMinusChiCDiff","",kGCnXBinsChicMass,kGCfirstXBinChicMass,kGClastXBinChicMass,"","");}
1854     if(kGCplotESDInvMassGammaePluseMinusPi0 == kTRUE) {histograms->AddHistogram("ESD_InvMass_GammaePluseMinusPi0","",kGCnXBinsPi0Mass,kGCfirstXBinPi0Mass,kGClastXBinPi0Mass,"","");}
1855     if(kGCplotESDElectronPosNegPi0Angle == kTRUE){histograms->AddHistogram("ESD_ElectronPosNegPi0Angle","",kGCnXBinsEPosNegAngle,kGCfirstXBinEPosNegAngle,kGClastXBinEPosNegAngle,"","");}
1856                 
1857     if(kGCplotESDEPosBackground == kTRUE){histograms->AddHistogram("ESD_EPosBackground","",kGCnXBinsEBackground,kGCfirstXBinEBackground,kGClastXBinEBackground,"","");}
1858                 
1859     if(kGCplotESDEPosBackground == kTRUE){histograms->AddHistogram("ESD_EPosENegNoJPsiBG","",kGCnXBinsEBackground,kGCfirstXBinEBackground,kGClastXBinEBackground,"","");}
1860                 
1861                 
1862     if(kGCplotESDENegBackground == kTRUE){histograms->AddHistogram("ESD_ENegBackground","",kGCnXBinsEBackground,kGCfirstXBinEBackground,kGClastXBinEBackground,"","");}
1863     if(kGCplotESDEPosENegBackground == kTRUE){histograms->AddHistogram("ESD_EPosENegBackground","",kGCnXBinsEBackground,kGCfirstXBinEBackground,kGClastXBinEBackground,"","");}
1864     if(kGCplotESDEPosENegBackgroundCut == kTRUE){histograms->AddHistogram("ESD_EPosENegBackgroundCut","",kGCnXBinsEBackgroundCut,kGCfirstXBinEBackgroundCut,kGClastXBinEBackgroundCut,"","");}
1865                 
1866     if(kGCplotESDEPosENegGammaBackgroundMX == kTRUE){histograms->AddHistogram("ESD_EPosENegGammaBackgroundMX","",kGCnXBinsEBackground,kGCfirstXBinEBackground,kGClastXBinEBackground,"","");}
1867     if(kGCplotESDEPosENegGammaBackgroundMX == kTRUE){histograms->AddHistogram("ESD_EPosENegGammaBackgroundMXDiff","",kGCnXBinsEBackground,kGCfirstXBinEBackground,kGClastXBinEBackground,"","");}
1868                 
1869     if(kGCplotTableElectrons == kTRUE){ histograms->AddTable("Table_Electrons","",kGCnElementsElectronTable,kGCelectronTable);}
1870
1871     if(kGCdoMCTruth){
1872       if(kGCplotMCElectronPosNegPt == kTRUE){histograms->AddHistogram("MC_ElectronPosNegPt","",kGCnXBinsEPosNegPt,kGCfirstXBinEPosNegPt,kGClastXBinEPosNegPt,"","");}
1873       if(kGCplotMCElectronPosNegEta == kTRUE){histograms->AddHistogram("MC_ElectronPosNegEta","",kGCnXBinsEPosNegEta,kGCfirstXBinEPosNegEta,kGClastXBinEPosNegEta,"","");}
1874       if(kGCplotMCElectronPosNegJPsiAngle == kTRUE){histograms->AddHistogram("MC_ElectronPosNegJPsiAngle","",kGCnXBinsEPosNegAngle,kGCfirstXBinEPosNegAngle,kGClastXBinEPosNegAngle,"","");}
1875       if(kGCplotMCElectronPosNegPi0Angle == kTRUE){histograms->AddHistogram("MC_ElectronPosNegPi0Angle","",kGCnXBinsEPosNegAngle,kGCfirstXBinEPosNegAngle,kGClastXBinEPosNegAngle,"","");}
1876     }
1877
1878   }// end kGCrunChic
1879         
1880
1881   //---------------------------------------------- Gamma from Decay ----------------------------------------------------
1882   if(kGCplotMCGammaFromDecay == kTRUE && kGCdoMCTruth == kTRUE){
1883      histograms->AddHistogram("MC_DecayPi0Gamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");  
1884      histograms->AddHistogram("MC_DecayRho0Gamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");
1885      histograms->AddHistogram("MC_DecayEtaGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");
1886      histograms->AddHistogram("MC_DecayOmegaGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");
1887      histograms->AddHistogram("MC_DecayK0sGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");
1888      histograms->AddHistogram("MC_DecayEtapGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");
1889      histograms->AddHistogram("MC_DecayPhiGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");
1890      histograms->AddHistogram("MC_DecayAllGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");
1891   }
1892
1893   //---------------------------------------------- Neutral Meson ---------------------------------------------------------
1894   if(kGCrunNeutralMeson){
1895                 
1896     // Histograms from esd tracks       
1897     if(kGCplotESDEEnergy == kTRUE){ histograms->AddHistogram("ESD_E_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
1898     if(kGCplotESDEPt == kTRUE){ histograms->AddHistogram("ESD_E_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
1899     if(kGCplotESDEEta == kTRUE){ histograms->AddHistogram("ESD_E_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
1900     if(kGCplotESDEPhi == kTRUE){ histograms->AddHistogram("ESD_E_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
1901     if(kGCplotESDENTPCClusters == kTRUE){ histograms->AddHistogram("ESD_E_nTPCClusters" ,"" , kGCnXBinsNTPCClusters, kGCfirstXBinNTPCClusters, kGClastXBinNTPCClusters, "", "");}
1902     if(kGCplotESDENITSClusters == kTRUE){ histograms->AddHistogram("ESD_E_nITSClusters" ,"" , kGCnXBinsNITSClusters, kGCfirstXBinNITSClusters, kGClastXBinNITSClusters, "", "");}
1903     if(kGCplotESDENTPCClustersToFP== kTRUE){ histograms->AddHistogram("ESD_E_nTPCClustersToFP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsClsToF, kGCfirstYBinClsToF, kGClastYBinClsToF,"", "",0);}
1904     if(kGCplotESDENTPCClustersToFR== kTRUE){ histograms->AddHistogram("ESD_E_nTPCClustersToFR" ,"" ,kGCnXBinsR, kGCfirstXBinR, kGClastXBinR,kGCnYBinsClsToF, kGCfirstYBinClsToF, kGClastYBinClsToF,"", "",0);}
1905     if(kGCplotESDENTPCClustersToFR== kTRUE){ histograms->AddHistogram("ESD_TrueConversion_E_nTPCClustersToFR" ,"" ,kGCnXBinsR, kGCfirstXBinR, kGClastXBinR,kGCnYBinsClsToF, kGCfirstYBinClsToF, kGClastYBinClsToF,"", "",0);}
1906     if(kGCplotESDETPCchi2 == kTRUE){ histograms->AddHistogram("ESD_E_TPCchi2" ,"" , kGCnXBinsTPCchi2, kGCfirstXBinTPCchi2, kGClastXBinTPCchi2, "", "");}
1907
1908                 
1909     if(kGCplotESDPEnergy == kTRUE){ histograms->AddHistogram("ESD_P_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
1910     if(kGCplotESDPPt == kTRUE){ histograms->AddHistogram("ESD_P_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
1911     if(kGCplotESDPEta == kTRUE){ histograms->AddHistogram("ESD_P_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
1912     if(kGCplotESDPPhi == kTRUE){ histograms->AddHistogram("ESD_P_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
1913     if(kGCplotESDPNTPCClusters == kTRUE){ histograms->AddHistogram("ESD_P_nTPCClusters" ,"" , kGCnXBinsNTPCClusters, kGCfirstXBinNTPCClusters, kGClastXBinNTPCClusters, "", "");}
1914     if(kGCplotESDPNITSClusters == kTRUE){ histograms->AddHistogram("ESD_P_nITSClusters" ,"" , kGCnXBinsNITSClusters, kGCfirstXBinNITSClusters, kGClastXBinNITSClusters, "", "");}
1915     if(kGCplotESDPNTPCClustersToFP== kTRUE){ histograms->AddHistogram("ESD_P_nTPCClustersToFP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsClsToF, kGCfirstYBinClsToF, kGClastYBinClsToF,"", "",0);}  
1916     if(kGCplotESDPNTPCClustersToFR== kTRUE){ histograms->AddHistogram("ESD_P_nTPCClustersToFR" ,"" ,kGCnXBinsR, kGCfirstXBinR, kGClastXBinR,kGCnYBinsClsToF, kGCfirstYBinClsToF, kGClastYBinClsToF,"", "",0);}
1917     if(kGCplotESDPNTPCClustersToFR== kTRUE){ histograms->AddHistogram("ESD_TrueConversion_P_nTPCClustersToFR" ,"" ,kGCnXBinsR, kGCfirstXBinR, kGClastXBinR,kGCnYBinsClsToF, kGCfirstYBinClsToF, kGClastYBinClsToF,"", "",0);}
1918     if(kGCplotESDPTPCchi2 == kTRUE){ histograms->AddHistogram("ESD_P_TPCchi2" ,"" , kGCnXBinsTPCchi2, kGCfirstXBinTPCchi2, kGClastXBinTPCchi2, "", "");}
1919
1920     if(kGCplotESDConvGammaEnergy == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
1921     if(kGCplotESDConvGammaPt == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
1922     if(kGCplotESDConvGammaEta == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
1923     if(kGCplotESDConvGammaPhi == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
1924     if(kGCplotESDConvGammaMass == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Mass" ,"" ,  kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass, "", "");}
1925     if(kGCplotESDConvGammaWidth == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Width" ,"" , kGCnXBinsGammaWidth, kGCfirstXBinGammaWidth, kGClastXBinGammaWidth, "", "");}
1926     if(kGCplotESDConvGammaChi2 == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Chi2" ,"" , kGCnXBinsGammaChi2, kGCfirstXBinGammaChi2, kGClastXBinGammaChi2, "", "");}
1927     if(kGCplotESDConvGammaNDF == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_NDF" ,"" , kGCnXBinsGammaNDF, kGCfirstXBinGammaNDF, kGClastXBinGammaNDF, "", "");}
1928     if(kGCplotESDConvGammaRapid == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
1929     if(kGCplotESDConvGammaPtvsEta == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Pt_Eta","", kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt,kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta,"","" );}
1930     if(kGCplotESDConvGammaPtvsChi2 == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Pt_Chi2" ,"" ,kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsGammaChi2, kGCfirstXBinGammaChi2, kGClastXBinGammaChi2, "", "");}
1931     if(kGCplotESDConvGammaEtavsChi2 == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_Eta_Chi2" ,"" ,kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, kGCnXBinsGammaChi2, kGCfirstXBinGammaChi2, kGClastXBinGammaChi2, "", "");}
1932                 
1933                 
1934                 
1935     if(kGCplotESDConversionR == kTRUE){ histograms->AddHistogram("ESD_Conversion_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
1936     if(kGCplotESDConversionZR == kTRUE){ histograms->AddHistogram("ESD_Conversion_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
1937     if(kGCplotESDConversionXY == kTRUE){ histograms->AddHistogram("ESD_Conversion_XY" ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
1938     if(kGCplotESDConversionXYBeamPipe == kTRUE && kGCLowMemoryConsumption == kFALSE){ histograms->AddHistogram("ESD_Conversion_XY_BeamPipe" ,"" , kGCnXBinsXYBP, kGCfirstXBinXYBP, kGClastXBinXYBP, kGCnYBinsXYBP, kGCfirstYBinXYBP, kGClastYBinXYBP, "", "");}
1939     if(kGCplotESDConversionRPhiBeamPipe == kTRUE && kGCLowMemoryConsumption == kFALSE){ histograms->AddHistogram("ESD_Conversion_RPhi_BeamPipe" ,"" , kGCnXBinsRPhiBP, kGCfirstXBinRPhiBP, kGClastXBinRPhiBP, kGCnYBinsRPhiBP, kGCfirstYBinRPhiBP, kGClastYBinRPhiBP, "", "");}
1940     if(kGCplotESDConversionOpeningAngle == kTRUE){ histograms->AddHistogram("ESD_Conversion_OpeningAngle" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
1941
1942     if(kGCplotESDConvGammaCosPointingAngle == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_CosPointingAngle" ,"" , kGCnXBinsCosPointingAngle, kGCfirstXBinCosPointingAngle, kGClastXBinCosPointingAngle, "", "");}
1943     if(kGCplotESDConvGammaDcaDaugthers == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_DcaDaughters" ,"" , kGCnXBinsDcaDaughters, kGCfirstXBinDcaDaughters, kGClastXBinDcaDaughters, "", "");}
1944     if(kGCplotESDConvGammaNormDcaDistDaugthers == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_NormDcaDistDaughters" ,"" , kGCnXBinsNormDcaDistDaughters, kGCfirstXBinNormDcaDistDaughters, kGClastXBinNormDcaDistDaughters, "", "");}
1945     if(kGCplotESDConvGammaLikelihoodAP == kTRUE){ histograms->AddHistogram("ESD_ConvGamma_LikelihoodAP" ,"" , kGCnXBinsLikelihoodAP, kGCfirstXBinLikelihoodAP, kGClastXBinLikelihoodAP, "", "");}
1946     if(kGCplotESDConvGammaEAsymmetryP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_E_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
1947     if(kGCplotESDConvGammaPAsymmetryP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_P_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
1948     if(kGCplotESDConvGammaEdEdxP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_E_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);}
1949     if(kGCplotESDConvGammaPdEdxP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_P_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);}
1950
1951     if(kGCplotESDConvGammaEeProbP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_E_EProbP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsEProb, kGCfirstYBinEProb, kGClastYBinEProb,"", "",0);}
1952     if(kGCplotESDConvGammaPeProbP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_P_EProbP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsEProb, kGCfirstYBinEProb, kGClastYBinEProb,"", "",0);}
1953     if(kGCplotESDConvGammaEmupiProbP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_E_mupiProbP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsEProb, kGCfirstYBinEProb, kGClastYBinEProb,"", "",0);}
1954     if(kGCplotESDConvGammaPmupiProbP== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_P_mupiProbP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsEProb, kGCfirstYBinEProb, kGClastYBinEProb,"", "",0);}
1955
1956     if(kGCplotESDConvGammaQtAlfa== kTRUE){ histograms->AddHistogram("ESD_ConvGamma_alfa_qt" ,"" ,kGCnXBinsP, kGCfirstXBinAlphaG, kGClastXBinAlpha,kGCnYBinsQt, kGCfirstYBinQt, kGClastYBinQt,"", "");}
1957
1958
1959                 
1960     if(kGCplotESDTrueDalitzContaminationR == kTRUE){ histograms->AddHistogram("ESD_TrueDalitzContamination_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
1961     if(kGCplotESDTruePi0DalitzContaminationR == kTRUE){ histograms->AddHistogram("ESD_TrueConvDalitzPi0_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
1962     if(kGCplotESDTrueEtaDalitzContaminationR == kTRUE){ histograms->AddHistogram("ESD_TrueConvDalitzEta_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
1963     if(kGCplotESDTrueCombinatorialContaminationR == kTRUE){ histograms->AddHistogram("ESD_TrueConvCombinatorial_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
1964     if(kGCplotESDTrueCombinatorialElecContaminationR == kTRUE){ histograms->AddHistogram("ESD_TrueConvCombinatorialElec_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
1965     if(kGCplotESDTrueHadronicContaminationR == kTRUE){ histograms->AddHistogram("ESD_TrueConvHadronicBck_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
1966     if(kGCplotESDTrueCombinatorialContaminationPt == kTRUE){ histograms->AddHistogram("ESD_TrueConvCombinatorial_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
1967     if(kGCplotESDTrueCombinatorialElecContaminationPt == kTRUE){ histograms->AddHistogram("ESD_TrueConvCombinatorialElec_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
1968     if(kGCplotESDTrueHadronicContaminationPt == kTRUE){ histograms->AddHistogram("ESD_TrueConvHadronicBck_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
1969
1970     histograms->AddHistogram("ESD_TrueConvDalitzPi0_SinglePos_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");
1971     histograms->AddHistogram("ESD_TrueConvDalitzPi0_SingleNeg_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");
1972     histograms->AddHistogram("ESD_TrueConvDalitzPi0_SinglePos_kFirst_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");
1973     histograms->AddHistogram("ESD_TrueConvDalitzPi0_SingleNeg_kFirst_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");
1974     histograms->AddHistogram("ESD_TrueConversion_SinglePos_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR,  kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt,"", "");
1975     histograms->AddHistogram("ESD_TrueConversion_SingleNeg_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR,  kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");
1976     histograms->AddHistogram("ESD_TrueConversion_SinglePos_kFirst_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");
1977     histograms->AddHistogram("ESD_TrueConversion_SingleNeg_kFirst_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");
1978
1979
1980     if(kGCplotESDTrueConvGammaEnergy == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
1981     if(kGCplotESDTrueConvGammaPt == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
1982     if(kGCplotESDTrueConvGammaEta == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
1983     if(kGCplotESDTrueConvGammaPhi == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
1984     if(kGCplotESDTrueConvGammaMass == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Mass" ,"" ,  kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass, "", "");}
1985     if(kGCplotESDTrueConvGammaWidth == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Width" ,"" , kGCnXBinsGammaWidth, kGCfirstXBinGammaWidth, kGClastXBinGammaWidth, "", "");}
1986     if(kGCplotESDTrueConvGammaChi2 == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Chi2" ,"" , kGCnXBinsGammaChi2, kGCfirstXBinGammaChi2, kGClastXBinGammaChi2, "", "");}
1987     if(kGCplotESDTrueConvGammaNDF == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_NDF" ,"" , kGCnXBinsGammaNDF, kGCfirstXBinGammaNDF, kGClastXBinGammaNDF, "", "");}
1988     if(kGCplotESDTrueConvGammaRapid == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
1989     if(kGCplotESDTrueConvGammaPtvsEta == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Pt_Eta" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt,kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
1990     if(kGCplotESDTrueConvGammaPtvsChi2 == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Pt_Chi2" ,"" ,kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsGammaChi2, kGCfirstXBinGammaChi2, kGClastXBinGammaChi2, "", "");}
1991     if(kGCplotESDTrueConvGammaEtavsChi2 == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_Eta_Chi2" ,"" ,kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, kGCnXBinsGammaChi2, kGCfirstXBinGammaChi2, kGClastXBinGammaChi2, "", "");}
1992                 
1993     if(kGCplotESDTrueConversionR == kTRUE){ histograms->AddHistogram("ESD_TrueConversion_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
1994     if(kGCplotESDTrueConversionZR == kTRUE){ histograms->AddHistogram("ESD_TrueConversion_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
1995     if(kGCplotESDTrueConversionXY == kTRUE){ histograms->AddHistogram("ESD_TrueConversion_XY" ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
1996     if(kGCplotESDTrueConversionOpeningAngle == kTRUE){ histograms->AddHistogram("ESD_TrueConversion_OpeningAngle" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
1997
1998     if(kGCplotESDTrueConvGammaCosPointingAngle == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_CosPointingAngle" ,"" , kGCnXBinsCosPointingAngle, kGCfirstXBinCosPointingAngle, kGClastXBinCosPointingAngle, "", "");}
1999     if(kGCplotESDTrueConvGammaDcaDaugthers == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_DcaDaughters" ,"" , kGCnXBinsDcaDaughters, kGCfirstXBinDcaDaughters, kGClastXBinDcaDaughters, "", "");}
2000     if(kGCplotESDTrueConvGammaNormDcaDistDaugthers == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_NormDcaDistDaughters" ,"" , kGCnXBinsNormDcaDistDaughters, kGCfirstXBinNormDcaDistDaughters, kGClastXBinNormDcaDistDaughters, "", "");}
2001     if(kGCplotESDTrueConvGammaLikelihoodAP == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_LikelihoodAP" ,"" , kGCnXBinsLikelihoodAP, kGCfirstXBinLikelihoodAP, kGClastXBinLikelihoodAP, "", "");}
2002     if(kGCplotESDTrueConvGammaEAsymmetryP== kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_E_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
2003     if(kGCplotESDTrueConvGammaPAsymmetryP== kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_P_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
2004     if(kGCplotESDTrueConvGammaEdEdxP== kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_E_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);}
2005     if(kGCplotESDTrueConvGammaPdEdxP== kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_P_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);}
2006     if(kGCplotESDTrueConvGammaQtAlfa== kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_alfa_qt" ,"" ,kGCnXBinsP, kGCfirstXBinAlphaG, kGClastXBinAlpha,kGCnYBinsQt, kGCfirstYBinQt, kGClastYBinQt,"", "");}
2007                 
2008     if(kGCplotESDTrueConvGammaMCPtEta == kTRUE){ histograms->AddHistogram("ESD_TrueConvGamma_MC_Pt_Eta" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2009     if(kGCplotESDTrueConversionMCZR == kTRUE){ histograms->AddHistogram("ESD_TrueConversion_MC_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
2010     if(kGCplotESDTrueConversionMCXY == kTRUE){ histograms->AddHistogram("ESD_TrueConversion_MC_XY" ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
2011                 
2012                 
2013                 
2014     if(kGCplotESDNoCutConvGammaEnergy == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2015     if(kGCplotESDNoCutConvGammaPt == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2016     if(kGCplotESDNoCutConvGammaEta == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2017     if(kGCplotESDNoCutConvGammaPhi == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2018     if(kGCplotESDNoCutConvGammaMass == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Mass" ,"" ,  kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass, "", "");}
2019     if(kGCplotESDNoCutConvGammaWidth == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Width" ,"" , kGCnXBinsGammaWidth, kGCfirstXBinGammaWidth, kGClastXBinGammaWidth, "", "");}
2020     if(kGCplotESDNoCutConvGammaChi2 == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Chi2" ,"" , kGCnXBinsGammaChi2, kGCfirstXBinGammaChi2, kGClastXBinGammaChi2, "", "");}
2021     if(kGCplotESDNoCutConvGammaNDF == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_NDF" ,"" , kGCnXBinsGammaNDF, kGCfirstXBinGammaNDF, kGClastXBinGammaNDF, "", "");}
2022     if(kGCplotESDNoCutConvGammaRapid == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2023     if(kGCplotESDNoCutConvGammaPtvsEta == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Pt_Eta" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt,kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2024     if(kGCplotESDNoCutConvGammaPtvsChi2 == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Pt_Chi2" ,"" ,kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsGammaChi2, kGCfirstXBinGammaChi2, kGClastXBinGammaChi2, "", "");}
2025     if(kGCplotESDNoCutConvGammaEtavsChi2 == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_Eta_Chi2" ,"" ,kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, kGCnXBinsGammaChi2, kGCfirstXBinGammaChi2, kGClastXBinGammaChi2, "", "");}
2026                 
2027     if(kGCplotESDNoCutConversionR == kTRUE){ histograms->AddHistogram("ESD_NoCutConversion_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
2028     if(kGCplotESDNoCutConversionZR == kTRUE){ histograms->AddHistogram("ESD_NoCutConversion_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
2029     if(kGCplotESDNoCutConversionXY == kTRUE){ histograms->AddHistogram("ESD_NoCutConversion_XY" ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
2030     if(kGCplotESDNoCutConversionOpeningAngle == kTRUE){ histograms->AddHistogram("ESD_NoCutConversion_OpeningAngle" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
2031
2032     if(kGCplotESDNoCutConvGammaCosPointingAngle == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_CosPointingAngle" ,"" , kGCnXBinsCosPointingAngle, kGCfirstXBinCosPointingAngle, kGClastXBinCosPointingAngle, "", "");}
2033     if(kGCplotESDNoCutConvGammaDcaDaugthers == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_DcaDaughters" ,"" , kGCnXBinsDcaDaughters, kGCfirstXBinDcaDaughters, kGClastXBinDcaDaughters, "", "");}
2034     if(kGCplotESDNoCutConvGammaNormDcaDistDaugthers == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_NormDcaDistDaughters" ,"" , kGCnXBinsNormDcaDistDaughters, kGCfirstXBinNormDcaDistDaughters, kGClastXBinNormDcaDistDaughters, "", "");}
2035     if(kGCplotESDNoCutConvGammaLikelihoodAP == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_LikelihoodAP" ,"" , kGCnXBinsLikelihoodAP, kGCfirstXBinLikelihoodAP, kGClastXBinLikelihoodAP, "", "");}
2036     if(kGCplotESDNoCutConvGammaEAsymmetryP== kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_E_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
2037     if(kGCplotESDNoCutConvGammaPAsymmetryP== kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_P_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
2038
2039
2040     if(kGCplotESDNoCutConvGammaEdEdxP== kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_E_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);}
2041     if(kGCplotESDNoCutConvGammaPdEdxP== kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_P_dEdxP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);}
2042
2043     if(kGCplotESDNoCutConvGammaMCPtEta == kTRUE){ histograms->AddHistogram("ESD_NoCutConvGamma_MC_Pt_Eta" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2044     if(kGCplotESDNoCutConversionMCZR == kTRUE){ histograms->AddHistogram("ESD_NoCutConversion_MC_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
2045     if(kGCplotESDNoCutConversionMCXY == kTRUE){ histograms->AddHistogram("ESD_NoCutConversion_MC_XY" ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
2046                 
2047                 
2048     if(kGCplotESDMotherChi2 == kTRUE){ histograms->AddHistogram("ESD_Mother_Chi2","" , kGCnXBinsMesonChi2, kGCfirstXBinGammaChi2, kGClastXBinGammaChi2, "", "");}
2049     if(kGCplotESDMotherOpeningAngleGamma == kTRUE){ histograms->AddHistogram("ESD_Mother_GammaDaughter_OpeningAngle" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
2050     if(kGCplotESDMotherEnergy == kTRUE){ histograms->AddHistogram("ESD_Mother_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2051     if(kGCplotESDMotherPt == kTRUE){ histograms->AddHistogram("ESD_Mother_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2052     if(kGCplotESDMotherEta == kTRUE){ histograms->AddHistogram("ESD_Mother_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2053     if(kGCplotESDMotherPhi == kTRUE){ histograms->AddHistogram("ESD_Mother_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2054     if(kGCplotESDMotherMass == kTRUE){ histograms->AddHistogram("ESD_Mother_Mass" ,"" , kGCnXBinsPi0Mass, kGCfirstXBinPi0Mass, kGClastXBinPi0Mass, "", "");}
2055     if(kGCplotESDMotherR == kTRUE){ histograms->AddHistogram("ESD_Mother_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
2056     if(kGCplotESDMotherZR == kTRUE){ histograms->AddHistogram("ESD_Mother_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
2057     if(kGCplotESDMotherXY == kTRUE){ histograms->AddHistogram("ESD_Mother_XY" ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
2058     if(kGCplotESDMotherRapid == kTRUE){ histograms->AddHistogram("ESD_Mother_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2059                 
2060     for(Int_t z=0;z<8;z++){
2061       for(Int_t m=0;m<6;m++){
2062         if(kGCplotESDBackgroundOpeningAngleGamma == kTRUE){ histograms->AddHistogram(Form("%d%dESD_Background_GammaDaughter_OpeningAngle",z,m) ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
2063         if(kGCplotESDBackgroundEnergy == kTRUE){ histograms->AddHistogram(Form("%d%dESD_Background_Energy",z,m) ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2064         if(kGCplotESDBackgroundPt == kTRUE){ histograms->AddHistogram(Form("%d%dESD_Background_Pt",z,m) ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2065         if(kGCplotESDBackgroundEta == kTRUE){ histograms->AddHistogram(Form("%d%dESD_Background_Eta",z,m) ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2066         if(kGCplotESDBackgroundPhi == kTRUE){ histograms->AddHistogram(Form("%d%dESD_Background_Phi",z,m) ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2067         if(kGCplotESDBackgroundMass == kTRUE){ histograms->AddHistogram(Form("%d%dESD_Background_Mass",z,m) ,"" , kGCnXBinsEtaMass, kGCfirstXBinEtaMass, kGClastXBinEtaMass, "", "");}
2068         if(kGCplotESDBackgroundR == kTRUE){ histograms->AddHistogram(Form("%d%dESD_Background_R",z,m) ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
2069         if(kGCplotESDBackgroundZR == kTRUE){ histograms->AddHistogram(Form("%d%dESD_Background_ZR",z,m) ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
2070         if(kGCplotESDBackgroundXY == kTRUE){ histograms->AddHistogram(Form("%d%dESD_Background_XY",z,m) ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
2071         if(kGCplotESDBackgroundRapid == kTRUE){ histograms->AddHistogram(Form("%d%dESD_Background_Rapid",z,m) ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2072       }
2073     }
2074
2075     if(kGCplotESDBackgroundOpeningAngleGamma == kTRUE){ histograms->AddHistogram("ESD_Background_GammaDaughter_OpeningAngle" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
2076     if(kGCplotESDBackgroundEnergy == kTRUE){ histograms->AddHistogram("ESD_Background_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2077     if(kGCplotESDBackgroundPt == kTRUE){ histograms->AddHistogram("ESD_Background_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2078     if(kGCplotESDBackgroundEta == kTRUE){ histograms->AddHistogram("ESD_Background_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2079     if(kGCplotESDBackgroundPhi == kTRUE){ histograms->AddHistogram("ESD_Background_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2080     if(kGCplotESDBackgroundMass == kTRUE){ histograms->AddHistogram("ESD_Background_Mass" ,"" , kGCnXBinsEtaMass, kGCfirstXBinEtaMass, kGClastXBinEtaMass, "", "");}
2081     if(kGCplotESDBackgroundR == kTRUE){ histograms->AddHistogram("ESD_Background_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
2082     if(kGCplotESDBackgroundZR == kTRUE){ histograms->AddHistogram("ESD_Background_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
2083     if(kGCplotESDBackgroundXY == kTRUE){ histograms->AddHistogram("ESD_Background_XY" ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
2084     if(kGCplotESDBackgroundRapid == kTRUE){ histograms->AddHistogram("ESD_Background_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2085                 
2086                 
2087     if(kGCplotMapping == kTRUE){
2088       histograms->InitializeMappingValues(kGCnPhiIndex,kGCnRIndex,kGCnXBinsMapping,kGCminRadius,kGCmaxRadius,kGCnYBinsMapping,kGCminPhi,kGCmaxPhi);
2089       histograms->AddMappingHistograms(kGCnPhiIndex,kGCnRIndex,kGCnXBinsMapping,kGCfirstXBinMapping,kGClastXBinMapping,kGCnYBinsMapping,kGCfirstYBinMapping,kGClastYBinMapping);
2090       //      histograms->AddMappingHistograms(kGCnPhiIndex,kGCnRIndex,kGCnXBinsMapping,kGCminRadius,kGCmaxRadius,kGCnYBinsMapping,kGCminPhi,kGCmaxPhi);
2091     }
2092
2093     //
2094     //************************************* Defining Resolution histograms *******************************************************/
2095     //
2096     // written by Friederike Bock 
2097     // contact: Friederike.Bock@cern.ch
2098     //
2099
2100     if(kGCrunRES == kTRUE){
2101         //------------------------------------------ Absolute Resolutions --------------------------------------------------------
2102     if(kGCplotResolutiondRAbs== kTRUE){
2103                 histograms->AddHistogram("Resolution_dRAbs_VS_R","" ,kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR,kGCnYBinsResdR,kGCfirstYBinResdR, kGClastYBinResdR, "", "");}
2104     if(kGCplotResolutiondZAbs== kTRUE){
2105                 histograms->AddHistogram("Resolution_dZAbs_VS_R","" ,kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR,kGCnYBinsResdR,kGCfirstYBinResdR, kGClastYBinResdR, "", "");}
2106     if(kGCplotResolutiondPhiAbs== kTRUE){
2107                 histograms->AddHistogram("Resolution_dPhiAbs_VS_R","" ,kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR,kGCnYBinsResdR, -TMath::Pi()/30., TMath::Pi()/30., "", "");}
2108
2109         //------------------------------------------ Relative Resolutions --------------------------------------------------------
2110     if(kGCplotResolutiondR == kTRUE){
2111                 histograms->AddHistogram("Resolution_dR" ,"" , kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR, kGCnYBinsResdR, kGCfirstYBinResdR, kGClastYBinResdR, "", "");}
2112     if(kGCplotResolutiondZ == kTRUE){
2113                 histograms->AddHistogram("Resolution_dZ" ,"" , kGCnXBinsResdZ, kGCfirstXBinResdZ, kGClastXBinResdZ, kGCnYBinsResdZ, kGCfirstYBinResdZ, kGClastYBinResdZ, "", "");}
2114
2115         //------------------------------------------- Pt vs R ---------------------------------------------------------------------             
2116     if(kGCplotResolutiondRdPt == kTRUE){
2117                 histograms->AddHistogram("Resolution_R_dPt" ,"" , kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR, kGCnYBinsResdRdPt, kGCfirstYBinResdRdPt, kGClastYBinResdRdPt, "", "");}
2118
2119
2120         // ------------------------------------------- Reconstruction Plots for Resolution ----------------------------------------             
2121     if(kGCplotResolutionMCPt == kTRUE){
2122                 histograms->AddHistogram("Resolution_MC_Pt" ,"" , kGCnXBinsResPt, kGCfirstXBinResPt, kGClastXBinResPt,"","");}
2123     if(kGCplotResolutionMCR == kTRUE){
2124                 histograms->AddHistogram("Resolution_MC_R" ,"" , kGCnXBinsResR, kGCfirstXBinResR, kGClastXBinResR,"","");}
2125     if(kGCplotResolutionMCZ == kTRUE){
2126                 histograms->AddHistogram("Resolution_MC_Z" ,"" , kGCnXBinsResZ, kGCfirstXBinResZ, kGClastXBinResZ,"","");}
2127                 
2128     if(kGCplotResolutionESDPt == kTRUE){
2129                 histograms->AddHistogram("Resolution_ESD_Pt" ,"" , kGCnXBinsResPt, kGCfirstXBinResPt, kGClastXBinResPt,"","");}
2130     if(kGCplotResolutionESDR == kTRUE){
2131                 histograms->AddHistogram("Resolution_ESD_R" ,"" , kGCnXBinsResR, kGCfirstXBinResR, kGClastXBinResR,"","");}
2132     if(kGCplotResolutionESDZ == kTRUE){
2133                 histograms->AddHistogram("Resolution_ESD_Z" ,"" , kGCnXBinsResZ, kGCfirstXBinResZ, kGClastXBinResZ,"","");}
2134
2135         // ------------------------------------------- Plots for specific Gamma Trigger Studies -----------------------------------     
2136     if(kGCplotResolutionPtdPt = kTRUE){
2137                 // ::::::::::::::::::::::::::::::::::::::: histograms for gammas ::::::::::::::::::::::::::::::::::::::::::::::::::::::
2138                 histograms->AddHistogram("Resolution_Gamma_dPt_Pt" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2139                 histograms->AddHistogram("Resolution_Gamma_dPt_Phi" ,"" , kGCnYBinsResdR, -TMath::Pi(), TMath::Pi(), kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2140                 
2141                 // ::::::::::::::::::::::::::::::::::::::: histograms for electrons :::::::::::::::::::::::::::::::::::::::::::::::::::
2142                 histograms->AddHistogram("Resolution_E_dPt_Pt" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2143                 histograms->AddHistogram("Resolution_E_dPt_Pt_ITS0" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2144                 histograms->AddHistogram("Resolution_E_dPt_Pt_ITS1" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2145                 histograms->AddHistogram("Resolution_E_dPt_Pt_ITS2" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2146                 histograms->AddHistogram("Resolution_E_dPt_Pt_ITS3" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2147                 histograms->AddHistogram("Resolution_E_dPt_Pt_ITS4" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2148                 histograms->AddHistogram("Resolution_E_dPt_Pt_ITS5" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2149                 histograms->AddHistogram("Resolution_E_dPt_Pt_ITS6" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2150                 histograms->AddHistogram("Resolution_E_dPt_Phi" ,"" , kGCnYBinsResdR, -TMath::Pi(), TMath::Pi(), kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2151                 histograms->AddHistogram("Resolution_E_nTRDtracklets_ESDPt" ,"" ,kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 8, -0.5, 7.5,"", "");
2152                 histograms->AddHistogram("Resolution_E_nTRDtracklets_MCPt","" ,kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 8, -0.5, 7.5,"", "");    
2153                 histograms->AddHistogram("Resolution_E_nTRDclusters_ESDPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 201, -0.5, 200.5,"", "");
2154                 histograms->AddHistogram("Resolution_E_nTRDclusters_MCPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 201, -0.5, 200.5,"", "");
2155                 //              histograms->AddHistogram("Resolution_E_TRDsignal_ESDPt","", fV0Reader->GetNegativeTrackPt(), fV0Reader->GetNegativeESDTrack()->GetTRDsignal());
2156                 
2157                 // :::::::::::::::::::::::::::::::::::::::: histograms for positrons :::::::::::::::::::::::::::::::::::::::::::::::::::
2158                 histograms->AddHistogram("Resolution_P_dPt_Pt" ,"" , kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2159                 histograms->AddHistogram("Resolution_P_dPt_Pt_ITS0" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2160                 histograms->AddHistogram("Resolution_P_dPt_Pt_ITS1" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2161                 histograms->AddHistogram("Resolution_P_dPt_Pt_ITS2" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2162                 histograms->AddHistogram("Resolution_P_dPt_Pt_ITS3" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2163                 histograms->AddHistogram("Resolution_P_dPt_Pt_ITS4" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2164                 histograms->AddHistogram("Resolution_P_dPt_Pt_ITS5" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2165                 histograms->AddHistogram("Resolution_P_dPt_Pt_ITS6" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2166                 histograms->AddHistogram("Resolution_P_dPt_Phi" ,"" , kGCnYBinsResdR, -TMath::Pi(), TMath::Pi(), kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
2167                 histograms->AddHistogram("Resolution_P_nTRDtracklets_ESDPt" ,"" ,kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 8, -0.5, 7.5,"", "");   
2168                 histograms->AddHistogram("Resolution_P_nTRDtracklets_MCPt","", kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 8, -0.5, 7.5,"", "");
2169                 histograms->AddHistogram("Resolution_P_nTRDclusters_ESDPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 201, -0.5, 200.5,"", "");
2170                 histograms->AddHistogram("Resolution_P_nTRDclusters_MCPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 201,-0.5, 200.5,"", "");
2171                 //              histograms->AddHistogram("Resolution_P_TRDsignal_ESDPt", "",fV0Reader->GetPositiveTrackPt(), fV0Reader->GetPositiveESDTrack()->GetTRDsignal());
2172     } //end of specific trigger study resolution plots
2173     } //end if(kGCrunRES=true)
2174     
2175     // ___________________________________________________________________________________________________________________________________________________
2176
2177     if(kGCplotEventQuality == kTRUE){histograms->AddHistogram("ESD_EventQuality","ESD_EventQuality",kGCnXBinsEvtQ,kGCfirstXBinEvtQ,kGClastXBinEvtQ,"","");}
2178     if(kGCplotESDNumberOfV0s == kTRUE){histograms->AddHistogram("ESD_NumberOfV0s","Number of v0s",kGCnXBinsNV0,kGCfirstXBinNV0 ,kGClastXBinNV0 ,"","");}
2179     if(kGCplotESDNumberOfSurvivingV0s == kTRUE){histograms->AddHistogram("ESD_NumberOfSurvivingV0s","Number of surviving v0s",kGCnXBinsNV0, kGCfirstXBinNV0 , kGClastXBinNV0,"","");}
2180     if(kGCplotESDNumberOfContributorsVtx == kTRUE){histograms->AddHistogram("ESD_NumberOfContributorsVtx","Number of contributors to vertex",kGCnXBinsESDtrk, kGCfirstXBinESDtrk, kGClastXBinESDtrk,"","");}
2181     if(kGCplotESDNumberOfGoodESDTracks == kTRUE){histograms->AddHistogram("ESD_NumberOfGoodESDTracks","Number of Good ESD tracks",kGCnXBinsESDtrk, kGCfirstXBinESDtrk, kGClastXBinESDtrk,"","");}
2182     if(kGCplotESDNumberOfGoodESDTracks == kTRUE){histograms->AddHistogram("ESD_NumberOfGoodESDTracksVtx","Number of Good ESD tracks",kGCnXBinsESDtrk, kGCfirstXBinESDtrk, kGClastXBinESDtrk,"","");}    
2183         
2184     //  debug histograms
2185     if(kGCplotESDCutGetOnFly == kTRUE){histograms->AddHistogram("ESD_CutGetOnFly_InvMass" ,"Not GetOnFly" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2186     if(kGCplotESDCutNContributors == kTRUE){histograms->AddHistogram("ESD_CutNContributors_InvMass" ,"NContributors <= 0" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2187     if(kGCplotESDCutLikeSign == kTRUE){histograms->AddHistogram("ESD_CutLikeSign_InvMass" ,"LikeSign" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2188     if(kGCplotESDCutRefit == kTRUE){histograms->AddHistogram("ESD_CutRefit_InvMass" ,"No TPC refit" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2189     if(kGCplotESDCutKink == kTRUE){histograms->AddHistogram("ESD_CutKink_InvMass" ,"Kinks" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2190     if(kGCplotESDCutPIDProb == kTRUE){histograms->AddHistogram("ESD_CutPIDProb_InvMass" ,"wrong TPC PID" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2191
2192     if(kGCplotESDCutdedxSigmaElectronLine == kTRUE){histograms->AddHistogram("ESD_CutdEdxSigmaElectronLine_InvMass" ,"dedx ElectronLine" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2193     if(kGCplotESDCutdedxSigmaPionLine == kTRUE){histograms->AddHistogram("ESD_CutdEdxSigmaPionLine_InvMass" ,"dedx PionLine" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2194     if(kGCplotESDCutPionRejectionLowP==kTRUE){histograms->AddHistogram("ESD_CutPionRejectionLowP_InvMass" ,"dedx PionRejection LowP" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2195     if(kGCplotESDCutKaonRejectionLowP==kTRUE){histograms->AddHistogram("ESD_CutKaonRejectionLowP_InvMass" ,"dedx KaonRejection LowP" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2196     if(kGCplotESDCutQtGammaSelection==kTRUE){histograms->AddHistogram("ESD_CutQt_InvMass","ESD_CutQt_InvMass",kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2197
2198     if(kGCplotESDCutProtonRejectionLowP==kTRUE){histograms->AddHistogram("ESD_CutProtonRejectionLowP_InvMass" ,"dedx ProtonRejection LowP" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2199     if(kGCplotESDCutR == kTRUE){histograms->AddHistogram("ESD_CutR_InvMass" ,"Above RMax" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2200     if(kGCplotESDCutMinR == kTRUE){histograms->AddHistogram("ESD_CutMinR_InvMass" ,"Above RMax" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2201     if(kGCplotESDCutNDF == kTRUE){histograms->AddHistogram("ESD_CutNDF_InvMass" ,"NDF <= 0" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2202     if(kGCplotESDCutChi2 == kTRUE){histograms->AddHistogram("ESD_CutChi2_InvMass" ,"#chi^{2} > Max" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2203     if(kGCplotESDCutEta == kTRUE){histograms->AddHistogram("ESD_CutEta_InvMass" ,"Above #eta max" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2204     if(kGCplotESDCutSinglePt == kTRUE){histograms->AddHistogram("ESD_CutSinglePt_InvMass" ,"Below p_{t} min" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2205     if(kGCplotESDCutPt == kTRUE){histograms->AddHistogram("ESD_CutPt_InvMass" ,"Below p_{t} min" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2206     if(kGCplotESDCutLine == kTRUE){histograms->AddHistogram("ESD_CutLine_InvMass" ,"Out of reconstruction area" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2207     if(kGCplotESDCutZ == kTRUE){histograms->AddHistogram("ESD_CutZ_InvMass" ,"Out of reconstruction area" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2208     if(kGCplotESDCutMinClsTPC == kTRUE){histograms->AddHistogram("ESD_CutMinNClsTPC_InvMass" ,"Out of reconstruction area" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2209     if(kGCplotESDCutMinClsTPCToF == kTRUE){histograms->AddHistogram("ESD_CutMinNClsTPCToF_InvMass" ,"Out of reconstruction area" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2210
2211     if(kGCplotESDGoodV0s == kTRUE){histograms->AddHistogram("ESD_GoodV0s_InvMass" ,"Good V0s" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2212     if(kGCplotESDAllV0s == kTRUE){histograms->AddHistogram("ESD_AllV0s_InvMass" ,"All V0s" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2213     if(kGCplotESDAllV0sCurrentFinder == kTRUE){histograms->AddHistogram("ESD_AllV0sCurrentFinder_InvMass" ,"All V0s Current Finder" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");}
2214
2215     if(kGCplotESDAllV0sCurrentFinderQtAlfa== kTRUE){ histograms->AddHistogram("ESD_AllV0sCurrentFinder_alfa_qt" ,"" ,kGCnXBinsP, kGCfirstXBinAlphaG, kGClastXBinAlpha,kGCnYBinsQt, kGCfirstYBinQt, kGClastYBinQt,"", "");}
2216     if(kGCplotESDAllV0sCurrentFinderQtAlfa== kTRUE){ histograms->AddHistogram("ESD_AllV0sCurrentFinder_goodtracks_alfa_qt" ,"" ,kGCnXBinsP, kGCfirstXBinAlphaG, kGClastXBinAlpha,kGCnYBinsQt, kGCfirstYBinQt, kGClastYBinQt,"", "");}
2217
2218     if(kGCplotESDTrueConvGammaTrackLength == kTRUE){histograms->AddHistogram("ESD_TrueConvGamma_TrackLength","Track length of TrueConvGamma",kGCnXBinsTrackLength,kGCfirstXBinTrackLength,kGClastXBinTrackLength,"","");}
2219     if(kGCplotESDTrueConvGammaTrackLengthVSInvMass == kTRUE){histograms->AddHistogram("ESD_TrueConvGamma_TrackLengthVSInvMass","Track length of TrueConvGamma vs Inv mass",kGCnXBinsTrackLength,kGCfirstXBinTrackLength,kGClastXBinTrackLength,kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt,"","");}
2220                 
2221     if(kGCplotOmegaSpectra == kTRUE){
2222       histograms->AddHistogram("ESD_Omega_InvMass_vs_Pt" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2223       histograms->AddHistogram("ESD_Omega_InvMass","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2224
2225       histograms->AddHistogram("ESD_Omega_Bck_InvMass_vs_Pt" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2226       histograms->AddHistogram("ESD_Omega_Bck_InvMass","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2227       histograms->AddHistogram("ESD_OmegaPipPinPi0_InvMass_vs_Pt" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2228       histograms->AddHistogram("ESD_OmegaPipPinPi0_InvMass","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2229
2230     }
2231
2232     if(kGCplotPi0Spectra == kTRUE){
2233       histograms->AddHistogram("ESD_Mother_alfa","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinAlpha, kGClastXBinAlpha,"#alpha","Counts");
2234       histograms->AddHistogram("ESD_Mother_alfa_Pi0","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinAlpha, kGClastXBinAlpha,"#alpha","Counts");
2235       histograms->AddHistogram("ESD_Mother_alfa_Eta","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinAlpha, kGClastXBinAlpha,"#alpha","Counts");
2236       histograms->AddHistogram("ESD_Background_alfa_Pi0","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinAlpha, kGClastXBinAlpha,"#alpha","Counts");
2237       histograms->AddHistogram("ESD_Background_alfa_Eta","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinAlpha, kGClastXBinAlpha,"#alpha","Counts");
2238       //      histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2239       histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2240       histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt_alpha" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2241       histograms->AddHistogram("ESD_Mother_InvMass_vs_E_alpha" ,"Invariant Mass vs E" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","E [GeV]");
2242       histograms->AddHistogram("ESD_Mother_InvMass","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2243       histograms->AddHistogram("ESD_Mother_InvMass_1212","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2244       histograms->AddHistogram("ESD_Mother_InvMass_0912","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2245       histograms->AddHistogram("ESD_Mother_InvMass_0909","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2246       histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt1212" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2247       histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt0912" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2248       histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt0909" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2249
2250       if(kGCLowMemoryConsumption == kFALSE){
2251         histograms->AddHistogram("ESD_Mother_InvMass_GammaConvPHOS","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2252         histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt_GammaConvPHOS" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2253         histograms->AddHistogram("ESD_Mother_InvMass_GammaConvPHOS_OpanLow","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2254         histograms->AddHistogram("ESD_Mother_InvMass_GammaConvPHOS_OpanHigh","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2255
2256         histograms->AddHistogram("ESD_Mother_InvMass_GammaConvEMCAL","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2257         histograms->AddHistogram("ESD_Mother_InvMass_GammaConvEMCAL_Bck","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2258         
2259         histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt_GammaConvEMCAL" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2260         histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt_GammaConvEMCAL_Bck" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2261         
2262         histograms->AddHistogram("ESD_Mother_InvMass_GammaConvEMCAL_OpanLow","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2263         histograms->AddHistogram("ESD_Mother_InvMass_GammaConvEMCAL_OpanHigh","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2264       }
2265
2266       //      if(kGCdoNeutralMesonV0MCCheck == kTRUE){
2267       histograms->AddHistogram("ESD_TrueBckGG_InvMass_vs_Pt","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Counts");
2268       histograms->AddHistogram("ESD_TrueBckCont_InvMass_vs_Pt","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Counts");
2269       histograms->AddHistogram("ESD_TruePi0Sec_InvMass_vs_Pt","Invariant mass vs Pt",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Counts");
2270       histograms->AddHistogram("ESD_TruePi0DalitzCont_InvMass_vs_Pt","Invariant mass vs Pt",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Counts");
2271         histograms->AddHistogram("ESD_TruePi0_InvMass","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2272         histograms->AddHistogram("ESD_TruePi0_InvMass_1212","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2273         histograms->AddHistogram("ESD_TruePi0_InvMass_0912","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2274         histograms->AddHistogram("ESD_TruePi0_InvMass_0909","Invariant mass",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2275         histograms->AddHistogram("ESD_TruePi0_OpeningAngle_1212" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");
2276         histograms->AddHistogram("ESD_TruePi0_OpeningAngle_0912" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");
2277         histograms->AddHistogram("ESD_TruePi0_OpeningAngle_0909" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");
2278         histograms->AddHistogram("ESD_TruePi0_InvMass_vs_Pt" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2279 histograms->AddHistogram("ESD_TruePi0_InvMass_vs_Pt_alpha" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2280
2281  if(kGCLowMemoryConsumption == kFALSE){
2282    histograms->AddHistogram("ESD_TruePi0_InvMass_vs_Pt1212" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2283    histograms->AddHistogram("ESD_TruePi0_InvMass_vs_Pt0912" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2284    histograms->AddHistogram("ESD_TruePi0_InvMass_vs_Pt0909" ,"Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2285
2286         //}
2287
2288    histograms->AddHistogram("ESD_Mother_InvMass_vs_Pt_Fiducial" ,"Invariant Mass vs Pt |eta|<0.9" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2289  }
2290       histograms->AddHistogram("ESD_Mother_InvMass_Fiducial","Invariant mass |eta|<0.9",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2291
2292
2293     }
2294
2295     if(kGCplotPi0Spectra == kTRUE && kGCcalculateBackground == kTRUE){
2296       for(Int_t m=0;m<6;m++){
2297         histograms->AddHistogram(Form("%dESD_Mother_InvMass_vs_Pt",m) ,"Background Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2298       }
2299       for(Int_t z=0;z<8;z++){
2300         for(Int_t m=0;m<6;m++){
2301           histograms->AddHistogram(Form("%d%dESD_Mother_InvMass_vs_Pt",z,m) ,"ESD Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2302
2303           histograms->AddHistogram(Form("%d%dESD_Background_InvMass_vs_Pt",z,m) ,"Background Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2304
2305           
2306           histograms->AddHistogram(Form("%d%dESD_Background_InvMass",z,m),"Invariant mass background",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass BG [GeV]","Counts");
2307           histograms->AddHistogram(Form("%d%dESD_Mother_InvMass",z,m),"Invariant mass in z and m bins",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass BG [GeV]","Counts");
2308
2309
2310           histograms->AddHistogram(Form("%d%dESD_Background_InvMassvsPtFid",z,m) ,"Background Invariant Mass vs Pt |eta|<0.9" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2311
2312          
2313           histograms->AddHistogram(Form("%d%dESD_Background_InvMass_Fiducial",z,m),"Invariant mass background |eta|<0.9",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass BG [GeV]","Counts");
2314         }
2315       }
2316     
2317       histograms->AddHistogram("ESD_Background_InvMass_vs_Pt" ,"Background Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2318       histograms->AddHistogram("ESD_Background_InvMass_vs_Pt_alpha" ,"Background Invariant Mass vs Pt" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2319
2320      histograms->AddHistogram("ESD_Background_InvMass_vs_E_alpha" ,"Background Invariant Mass vs E" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","E [GeV]");
2321
2322   histograms->AddHistogram("ESD_Background_InvMass","Invariant mass background",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass BG [GeV]","Counts");
2323
2324       histograms->AddHistogram("ESD_Background_InvMass_vs_Pt_Fiducial" ,"Background Invariant Mass vs Pt |eta|<0.9" , kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");
2325       histograms->AddHistogram("ESD_Background_InvMass_Fiducial","Invariant mass background |eta|<0.9",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass BG [GeV]","Counts");
2326     
2327     }
2328     
2329     if(kGCdoMCTruth){
2330       if(kGCplotMCConversionR == kTRUE){ histograms->AddHistogram("MC_Conversion_R","Radius of gamma conversion points",kGCnXBinsR, kGCfirstXBinR, kGClastXBinR,"counts","cm");}
2331       if(kGCplotMCConversionZR == kTRUE){ histograms->AddHistogram("MC_Conversion_ZR","Radius of gamma conversion points vs Z",kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "cm", "cm");}
2332       if(kGCplotMCConversionXY == kTRUE){ histograms->AddHistogram("MC_Conversion_XY","Gamma XY converison point.",kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "cm", "cm");}
2333       if(kGCplotMCConversionOpeningAngle == kTRUE){ histograms->AddHistogram("MC_Conversion_OpeningAngle","Opening angle of e+e- pairs from gamma conversion",kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "counts", "cm");}
2334       if(kGCplotMCConvGammaEAsymmetryP== kTRUE){ histograms->AddHistogram("MC_ConvGamma_E_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
2335       if(kGCplotMCConvGammaPAsymmetryP== kTRUE){ histograms->AddHistogram("MC_ConvGamma_P_AsymmetryP" ,"" ,kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsAsymmetry, kGCfirstYBinAsymmetry, kGClastYBinAsymmetry,"", "");}
2336                 
2337
2338       if(kGCplotMCEEnergy == kTRUE){ histograms->AddHistogram("MC_E_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2339       if(kGCplotMCEPt == kTRUE){ histograms->AddHistogram("MC_E_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2340       if(kGCplotMCEEta == kTRUE){ histograms->AddHistogram("MC_E_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2341       if(kGCplotMCEPhi == kTRUE){ histograms->AddHistogram("MC_E_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2342       if(kGCplotMCENTPCClusters == kTRUE){ histograms->AddHistogram("MC_E_nTPCClusters" ,"" , kGCnXBinsNTPCClusters, kGCfirstXBinNTPCClusters, kGClastXBinNTPCClusters, "", "");}
2343       if(kGCplotMCENITSClusters == kTRUE){ histograms->AddHistogram("MC_E_nITSClusters" ,"" , kGCnXBinsNITSClusters, kGCfirstXBinNITSClusters, kGClastXBinNITSClusters, "", "");}
2344                 
2345       if(kGCplotMCPEnergy == kTRUE){ histograms->AddHistogram("MC_P_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2346       if(kGCplotMCPPt == kTRUE){ histograms->AddHistogram("MC_P_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2347       if(kGCplotMCPEta == kTRUE){ histograms->AddHistogram("MC_P_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2348       if(kGCplotMCPPhi == kTRUE){ histograms->AddHistogram("MC_P_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2349       if(kGCplotMCPNTPCClusters == kTRUE){ histograms->AddHistogram("MC_P_nTPCClusters" ,"" , kGCnXBinsNTPCClusters, kGCfirstXBinNTPCClusters, kGClastXBinNTPCClusters, "", "");}
2350       if(kGCplotMCPNITSClusters == kTRUE){ histograms->AddHistogram("MC_P_nITSClusters" ,"" , kGCnXBinsNITSClusters, kGCfirstXBinNITSClusters, kGClastXBinNITSClusters, "", "");}
2351                 
2352       if(kGCplotMCallGammaEnergy == kTRUE){ histograms->AddHistogram("MC_allGamma_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2353       if(kGCplotMCallGammaPt == kTRUE){ histograms->AddHistogram("MC_allGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2354       if(kGCplotMCallGammaEta == kTRUE){ histograms->AddHistogram("MC_allGamma_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2355       if(kGCplotMCallGammaPhi == kTRUE){ histograms->AddHistogram("MC_allGamma_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2356       if(kGCplotMCallGammaRapid == kTRUE){ histograms->AddHistogram("MC_allGamma_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2357                 
2358       if(kGCplotMCConvGammaEnergy == kTRUE){ histograms->AddHistogram("MC_ConvGamma_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2359       if(kGCplotMCConvGammaPt == kTRUE){ histograms->AddHistogram("MC_ConvGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2360       if(kGCplotMCConvGammaEta == kTRUE){ histograms->AddHistogram("MC_ConvGamma_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2361       if(kGCplotMCConvGammaPhi == kTRUE){ histograms->AddHistogram("MC_ConvGamma_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2362       if(kGCplotMCConvGammaRapid == kTRUE){ histograms->AddHistogram("MC_ConvGamma_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2363       if(kGCplotMCConvGammaPtvsEta == kTRUE){ histograms->AddHistogram("MC_ConvGamma_Pt_Eta","", kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt,kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta,"","");}
2364                 
2365       if(kGCplotMCallDirectGammaEnergy == kTRUE){ histograms->AddHistogram("MC_allDirectGamma_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2366       if(kGCplotMCallDirectGammaPt == kTRUE){ histograms->AddHistogram("MC_allDirectGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2367       if(kGCplotMCallDirectGammaEta == kTRUE){ histograms->AddHistogram("MC_allDirectGamma_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2368       if(kGCplotMCallDirectGammaPhi == kTRUE){ histograms->AddHistogram("MC_allDirectGamma_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2369       if(kGCplotMCallDirectGammaRapid == kTRUE){ histograms->AddHistogram("MC_allDirectGamma_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2370                 
2371       if(kGCplotMCConvDirectGammaEnergy == kTRUE){ histograms->AddHistogram("MC_ConvDirectGamma_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2372       if(kGCplotMCConvDirectGammaPt == kTRUE){ histograms->AddHistogram("MC_ConvDirectGamma_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2373       if(kGCplotMCConvDirectGammaEta == kTRUE){ histograms->AddHistogram("MC_ConvDirectGamma_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2374       if(kGCplotMCConvDirectGammaPhi == kTRUE){ histograms->AddHistogram("MC_ConvDirectGamma_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2375       if(kGCplotMCConvDirectGammaRapid == kTRUE){ histograms->AddHistogram("MC_ConvDirectGamma_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2376                 
2377       if(kGCplotMCMotherEta == kTRUE){ histograms->AddHistogram("MC_Mother_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2378       if(kGCplotMCMotherPhi == kTRUE){ histograms->AddHistogram("MC_Mother_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2379       if(kGCplotMCMotherRapid == kTRUE){ histograms->AddHistogram("MC_Mother_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2380       if(kGCplotMCMotherPt == kTRUE){ histograms->AddHistogram("MC_Mother_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2381       if(kGCplotMCMotherEnergy == kTRUE){ histograms->AddHistogram("MC_Mother_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2382       if(kGCplotMCMotherMass == kTRUE){ histograms->AddHistogram("MC_Mother_Mass" ,"" , kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass, "", "");}
2383       if(kGCplotMCMotherOpeningAngle == kTRUE){ histograms->AddHistogram("MC_Mother_GammaDaughter_OpeningAngle" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
2384       if(kGCplotMCMotherR == kTRUE){ histograms->AddHistogram("MC_Mother_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
2385       if(kGCplotMCMotherZR == kTRUE){ histograms->AddHistogram("MC_Mother_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
2386       if(kGCplotMCMotherXY == kTRUE){ histograms->AddHistogram("MC_Mother_XY" ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
2387       if(kGCplotMCMotherPtvsEtaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Mother_Pt_Eta_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2388       if(kGCplotMCMotherPtvsRapidWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Mother_Pt_Rapid_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2389       if(kGCplotMCMotherPtvsEtaConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Mother_Pt_Eta_ConvGamma_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2390       if(kGCplotMCMotherPtvsRapidConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Mother_Pt_Rapid_ConvGamma_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2391                 
2392       if(kGCplotMCMotherSpectra == kTRUE){ 
2393         histograms->AddHistogram("MC_Mother_InvMass_vs_Pt" ,"" ,kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra, kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra, "", "");
2394         histograms->AddHistogram("MC_Mother_InvMass_vs_Pt_withinAcceptance" ,"" ,kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra, kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra, "", "");
2395         histograms->AddHistogram("MC_Mother_InvMass_vs_Pt_ConvGamma_withinAcceptance" ,"" ,kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra, kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra, "", "");
2396       }
2397                 
2398       if(kGCplotMCPhysicalPrimaryChargedPt == kTRUE){ histograms->AddHistogram("MC_PhysicalPrimaryCharged_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2399       if(kGCplotMCPi0Eta == kTRUE){ histograms->AddHistogram("MC_Pi0_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}        
2400       if(kGCplotMCPi0Rapid == kTRUE){ histograms->AddHistogram("MC_Pi0_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}      
2401       if(kGCplotMCPi0PtvsRapid == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_vs_Rapid" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2402         if(kGCplotMCPi0PtvsRapid == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_vs_Rapid_allDaughters" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");} // OWN primary Pi0 debug
2403       if(kGCplotMCPi0Phi == kTRUE){ histograms->AddHistogram("MC_Pi0_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2404       if(kGCplotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2405
2406       if(kGCplotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_SD_EvtQ1_Pi0_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2407       if(kGCplotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_SD_EvtQ2_Pi0_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2408       if(kGCplotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_SD_EvtQ3_Pi0_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2409
2410       if(kGCplotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_DD_EvtQ1_Pi0_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2411       if(kGCplotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_DD_EvtQ2_Pi0_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2412       if(kGCplotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_DD_EvtQ3_Pi0_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2413
2414       if(kGCplotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_ND_EvtQ1_Pi0_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2415       if(kGCplotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_ND_EvtQ2_Pi0_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2416       if(kGCplotMCPi0Pt == kTRUE){ histograms->AddHistogram("MC_ND_EvtQ3_Pi0_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2417
2418
2419       if(kGCplotMCPi0PtFiducial == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_Fiducial" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2420       if(kGCplotMCPi0PtWithinAcceptanceFiducial == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_withinAcceptance_Fiducial" ,"" , kGCnXBinsPt,kGCfirstXBinPt, kGClastXBinPt, "", "");}
2421       if(kGCplotMCPi0PtConvGammaWithinAcceptanceFiducial == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_ConvGamma_withinAcceptance_Fiducial","" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2422       if(kGCplotMCPi0OpeningPtConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_ConvGamma_OpeningAngle_Pt","", kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
2423       if(kGCplotMCPi0PtGammaPtConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_ConvGamma_PtGamma_Pt","", kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2424       if(kGCplotMCPi0Energy == kTRUE){ histograms->AddHistogram("MC_Pi0_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2425       if(kGCplotMCPi0Mass == kTRUE){ histograms->AddHistogram("MC_Pi0_Mass" ,"" , kGCnXBinsPi0Mass, kGCfirstXBinPi0Mass, kGClastXBinPi0Mass, "", "");}
2426       if(kGCplotMCPi0Alpha == kTRUE){ histograms->AddHistogram("MC_Pi0_alpha" ,"" , kGCnXBinsPi0Mass, kGCfirstXBinPi0Alpha, kGClastXBinPi0Alpha, "", "");}
2427       if(kGCplotMCEtaAlpha == kTRUE){ histograms->AddHistogram("MC_Eta_alpha" ,"" , kGCnXBinsPi0Mass, kGCfirstXBinPi0Alpha, kGClastXBinPi0Alpha, "", "");}
2428        if(kGCplotMCPi0OpeningAngle == kTRUE){ histograms->AddHistogram("MC_Pi0_GammaDaughter_OpeningAngle" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
2429       if(kGCplotMCPi0R == kTRUE){ histograms->AddHistogram("MC_Pi0_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
2430       if(kGCplotMCPi0ZR == kTRUE){ histograms->AddHistogram("MC_Pi0_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
2431       if(kGCplotMCPi0XY == kTRUE){ histograms->AddHistogram("MC_Pi0_XY" ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
2432       if(kGCplotMCPi0PtvsEtaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_Eta_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2433       if(kGCplotMCPi0PtvsRapidWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_Rapid_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2434       if(kGCplotMCPi0PtvsEtaConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_Eta_ConvGamma_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2435       if(kGCplotMCPi0PtvsRapidConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Pt_Rapid_ConvGamma_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2436       if(kGCplotMCPi0ZRConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_ZR_ConvGamma_withinAcceptance" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
2437                 
2438                 
2439       if(kGCplotMCPi0SecondaryEta == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2440       if(kGCplotMCPi0SecondaryRapid == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2441       if(kGCplotMCPi0SecondaryPhi == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2442       if(kGCplotMCPi0SecondaryPt == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2443       if(kGCplotMCPi0SecondaryEnergy == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2444       if(kGCplotMCPi0SecondaryMass == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Mass" ,"" , kGCnXBinsPi0Mass, kGCfirstXBinPi0Mass, kGClastXBinPi0Mass, "", "");}
2445       if(kGCplotMCPi0SecondaryOpeningAngle == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_GammaDaughter_OpeningAngle" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
2446       if(kGCplotMCPi0SecondaryR == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
2447       if(kGCplotMCPi0SecondaryZR == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
2448       if(kGCplotMCPi0SecondaryXY == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_XY" ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
2449       if(kGCplotMCPi0SecondaryPtvsEtaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Pt_Eta_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2450       if(kGCplotMCPi0SecondaryPtvsRapidWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Pt_Rapid_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2451       if(kGCplotMCPi0SecondaryPtvsEtaConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Pt_Eta_ConvGamma_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2452       if(kGCplotMCPi0SecondaryPtvsRapidConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Pi0_Secondaries_Pt_Rapid_ConvGamma_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2453                 
2454                 
2455                 
2456       if(kGCplotMCEtaEta == kTRUE){ histograms->AddHistogram("MC_Eta_Eta" ,"" , kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2457       if(kGCplotMCEtaRapid == kTRUE){ histograms->AddHistogram("MC_Eta_Rapid" ,"" , kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2458       if(kGCplotMCEtaPtvsRapid == kTRUE){ histograms->AddHistogram("MC_Eta_Pt_vs_Rapid" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2459       if(kGCplotMCEtaPhi == kTRUE){ histograms->AddHistogram("MC_Eta_Phi" ,"" , kGCnXBinsPhi, kGCfirstXBinPhi, kGClastXBinPhi, "", "");}
2460       if(kGCplotMCEtaPt == kTRUE){ histograms->AddHistogram("MC_Eta_Pt" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2461       if(kGCplotMCEtaEnergy == kTRUE){ histograms->AddHistogram("MC_Eta_Energy" ,"" , kGCnXBinsEnergy, kGCfirstXBinEnergy, kGClastXBinEnergy, "", "");}
2462       if(kGCplotMCEtaMass == kTRUE){ histograms->AddHistogram("MC_Eta_Mass" ,"" , kGCnXBinsEtaMass, kGCfirstXBinEtaMass, kGClastXBinEtaMass, "", "");}
2463       if(kGCplotMCEtaOpeningAngleGamma == kTRUE){ histograms->AddHistogram("MC_Eta_GammaDaughter_OpeningAngle" ,"" , kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
2464       if(kGCplotMCEtaR == kTRUE){ histograms->AddHistogram("MC_Eta_R" ,"" , kGCnXBinsR, kGCfirstXBinR, kGClastXBinR, "", "");}
2465       if(kGCplotMCEtaZR == kTRUE){ histograms->AddHistogram("MC_Eta_ZR" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");}
2466       if(kGCplotMCEtaXY == kTRUE){ histograms->AddHistogram("MC_Eta_XY" ,"" , kGCnXBinsXY, kGCfirstXBinXY, kGClastXBinXY, kGCnYBinsXY, kGCfirstYBinXY, kGClastYBinXY, "", "");}
2467       if(kGCplotMCEtaPtvsEtaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Eta_Pt_Eta_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2468       if(kGCplotMCEtaPtvsRapidWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Eta_Pt_Rapid_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2469       if(kGCplotMCEtaPtvsEtaConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Eta_Pt_Eta_ConvGamma_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsEta, kGCfirstXBinEta, kGClastXBinEta, "", "");}
2470       if(kGCplotMCEtaPtvsRapidConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Eta_Pt_Rapid_ConvGamma_withinAcceptance" ,"" , kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsRapid, kGCfirstXBinRapid, kGClastXBinRapid, "", "");}
2471       if(kGCplotMCEtaZRConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Eta_ZR_ConvGamma_withinAcceptance" ,"" , kGCnXBinsZR, kGCfirstXBinZR, kGClastXBinZR, kGCnYBinsZR, kGCfirstYBinZR, kGClastYBinZR, "", "");} 
2472     }
2473     if(kGCplotMCEtaOpeningPtConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Eta_ConvGamma_OpeningAngle_Pt","", kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsOpeningAngle, kGCfirstXBinOpeningAngle, kGClastXBinOpeningAngle, "", "");}
2474     if(kGCplotMCEtaPtGammaPtConvGammaWithinAcceptance == kTRUE){ histograms->AddHistogram("MC_Eta_ConvGamma_PtGamma_Pt","", kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");}
2475   }// end kGCrunNeutralMeson
2476
2477   
2478   //---------------------------------------------------  2 gamma Background -------------------------------------------------------
2479
2480   if(kGCcalculateBackground==kTRUE){
2481     histograms->AddHistogram("ESD_Z_distribution" ,"Z primary vertex" , 2000, -30, 30,"Z[cm]","counts");
2482     histograms->AddHistogram("ESD_multiplicity_distribution" ,"multiplicity distribution" , 200, 0, 200,"counts","Multiplicity");
2483     histograms->AddHistogram("ESD_ZvsMultiplicity" ,"Z vs Multiplicity" , 1000, -10, 10,200,0,200,"Z[cm]","Multiplicity");
2484   }
2485   
2486   if(kGCRecalculateV0ForGamma==kTRUE){
2487     histograms->AddHistogram("ESD_RecalculateV0_InvMass","", kGCnXBinsGammaMass, kGCfirstXBinGammaMass, kGClastXBinGammaMass,"","");
2488     histograms->AddHistogram("ESD_RecalculateV0_Pt","",kGCnXBinsPt, kGCfirstXBinPt, kGClastXBinPt, "", "");
2489     histograms->AddHistogram("ESD_RecalculateV0_E_dEdxP","",kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);
2490     histograms->AddHistogram("ESD_RecalculateV0_P_dEdxP","",kGCnXBinsP, kGCfirstXBinP, kGClastXBinP,kGCnYBinsdEdx, kGCfirstYBindEdx, kGClastYBindEdx,"", "",0);
2491     histograms->AddHistogram("ESD_RecalculateV0_cpa","",1000,-1.,1.,"","");
2492     histograms->AddHistogram("ESD_RecalculateV0_dca","",100,0.,10.,"","");
2493     histograms->AddHistogram("ESD_RecalculateV0_Rr","",250,0.,250.,"","");
2494     histograms->AddHistogram("ESD_RecalculateV0_normdistP","",250,0.,250.,"","");
2495     histograms->AddHistogram("ESD_RecalculateV0_normdistN","",250,0.,250.,"","");
2496
2497     histograms->AddHistogram("ESD_RecalculateGG_InvMass","",kGCnXBinsSpectra,kGCfirstXBinSpectra, kGClastXBinSpectra,"InvMass [GeV]","Counts");
2498     histograms->AddHistogram("ESD_RecalculateGG_InvMass_vs_Pt","", kGCnXBinsSpectra, kGCfirstXBinSpectra, kGClastXBinSpectra,kGCnYBinsSpectra, kGCfirstYBinSpectra, kGClastYBinSpectra,"InvMass [GeV]","Pt [GeV]");             
2499
2500   }
2501   
2502
2503 }
2504
2505
2506
2507 Int_t SetAnalysisCutSelection(TString analysisCutSelection){
2508   Int_t iResult=0;
2509   
2510   // set the cuts depending on the Cut Selection Id
2511   // first number is dummy always set to 9 
2512   //  const char* cutSelection = analysisCutSelection.Data(); 
2513   if(analysisCutSelection.Length()!=c_array_size){
2514     cout<<"Cut selection has the wrong length!"<<endl;
2515     return 0;
2516   }
2517
2518   char cutSelection[] = analysisCutSelection.Data();
2519   int array[c_array_size];
2520   const int N = sizeof(array) / sizeof(int);
2521   string2array( cutSelection, array );
2522
2523
2524
2525   Int_t goodId=array[0];
2526   Int_t v0FinderType=array[1];
2527   Int_t eProbCut=array[2];
2528   Int_t ededxSigmaCut=array[3];
2529   Int_t pidedxSigmaCut=array[4];
2530   Int_t piMomdedxSigmaCut=array[5];
2531   Int_t chi2GammaCut=array[6];
2532   Int_t singlePtCut=array[7];
2533   Int_t clsTPCCut=array[8];
2534   Int_t etaCut=array[9];
2535   Int_t chi2MesonCut=array[10];
2536   Int_t LowPRejectionSigmaCut=array[11];
2537   Int_t QtMaxCut=array[12];
2538   Int_t piMaxMomdedxSigmaCut=array[13];
2539   Int_t alphaMesonCut=array[14];
2540   Int_t minRCut=array[15];
2541   Int_t RapidityMesonCut=array[16];
2542   Int_t BackgroundScheme=array[17];
2543   Int_t DegreesForRotationMethod=array[18];
2544   Int_t NumberOfRotations=array[19];
2545   Int_t removePileUp=array[20];
2546   Int_t selectV0AND=array[21];
2547   Int_t multiplicityBin=array[22];
2548   Int_t isHeavyIon=array[23];
2549   Int_t useCentrality=array[24];
2550   Int_t centralityBin=array[25];
2551
2552   cout<<"CentralityBin::"<< centralityBin <<endl;
2553   cout<<"Use Centrality::"<< useCentrality <<endl;
2554   cout<<"Heavy Ion::"<< isHeavyIon<<endl;
2555   cout<<"Multiplicity Bin::"<< multiplicityBin<<endl;
2556   cout<<"Select V0AND::"<< selectV0AND<<endl;
2557   cout<<"Remove PileUp::"<< removePileUp<<endl;
2558   cout<<"NumberOfRotations::"<<NumberOfRotations<<endl;
2559   cout<<"DegreesForRotationMethod::"<<DegreesForRotationMethod<<endl;
2560   cout<<"BackgroundScheme::"<<BackgroundScheme<<endl;
2561   cout<<"RapidityMesonCut::"<<RapidityMesonCut<<endl;   
2562   cout<<"minRCut::"<<minRCut<<endl;
2563   cout<<"alphaMesonCut::"<<alphaMesonCut<<endl; 
2564   cout<<"piMaxMomdedxSigmaCut::"<<piMaxMomdedxSigmaCut<<endl;
2565   cout<<"QtMaxCut:"<<QtMaxCut<<endl;
2566   cout<<"LowPRejectionSigmaCut:"<<LowPRejectionSigmaCut<<endl;
2567   cout<<"chi2MesonCut: "<< chi2MesonCut<<endl;
2568   cout<<"etaCut: "<<etaCut<<endl;
2569   cout<<"clsTPCCut: "<<clsTPCCut<<endl;
2570   cout<<"singlePtCut: "<<singlePtCut<<endl;
2571   cout<<"chi2GammaCut: "<<chi2GammaCut<<endl;
2572   cout<<"piMomdedxSigmaCut: "<<piMomdedxSigmaCut<<endl;
2573   cout<<"pidedxSigmaCut: "<<pidedxSigmaCut <<endl;
2574   cout<<"ededxSigmaCut: "<<ededxSigmaCut <<endl;
2575   cout<<"eProbCut: "<< eProbCut<<endl;
2576   cout<<"v0FinderType: "<<v0FinderType <<endl;
2577   cout<<"goodId: "<<goodId <<endl;
2578
2579   if(goodId !=9){
2580     cout<<"Analysis Cut Selection too short or does not start with 9"<<endl;
2581     return iResult;
2582   }
2583
2584   switch (v0FinderType){
2585   case 0:  // on fly V0 finder
2586     kGCUseOnFlyV0Finder=kTRUE;
2587     break;
2588   case 1:  // offline V0 finder
2589     kGCUseOnFlyV0Finder=kFALSE;
2590     break;
2591   default:
2592     return iResult;
2593   }
2594
2595   switch(eProbCut){
2596   case 0:
2597     kGCprobElectron=0;
2598     break;
2599   case 1:
2600     kGCprobElectron=0.1;
2601     break;
2602   case 2:
2603     kGCprobElectron=0.5;
2604     break;
2605   case 3:
2606     kGCprobElectron=0.7;
2607     break;
2608   default:
2609     return iResult;
2610   }
2611
2612   switch(ededxSigmaCut){
2613   case 0: // -10,10
2614     kGCPIDnSigmaBelowElectronLine=-10;
2615     kGCPIDnSigmaAboveElectronLine=10;
2616     break;
2617   case 1: // -5,5 
2618     kGCPIDnSigmaBelowElectronLine=-5;
2619     kGCPIDnSigmaAboveElectronLine=5;
2620     break;
2621   case 2: // -3,5
2622     kGCPIDnSigmaBelowElectronLine=-3;
2623     kGCPIDnSigmaAboveElectronLine=5;
2624     break;
2625   case 3: // -4,5
2626     kGCPIDnSigmaBelowElectronLine=-4;
2627     kGCPIDnSigmaAboveElectronLine=5;
2628     break;
2629   default:
2630     return iResult;
2631   }
2632   
2633   switch(pidedxSigmaCut){
2634   case 0:  // -10
2635     kGCPIDnSigmaAbovePionLine=-10;
2636     break;
2637   case 1:   // 0
2638     kGCPIDnSigmaAbovePionLine=0;
2639     break;
2640   case 2:  // 1
2641     kGCPIDnSigmaAbovePionLine=1;
2642     break;
2643   case 3:  // 1
2644     kGCPIDnSigmaAbovePionLine=-1;
2645     break;
2646   case 4:  // 1
2647     kGCPIDnSigmaAbovePionLine=-1.5;
2648     break;
2649   case 5:  // 1
2650     kGCPIDnSigmaAbovePionLine=2.;
2651     break;
2652
2653   default:
2654     return iResult;
2655   }
2656   
2657   switch(piMomdedxSigmaCut){
2658   case 0:  // 0.5 GeV
2659     kGCPIDMinPnSigmaAbovePionLine=0.5;
2660     break;
2661   case 1:  // 1. GeV
2662     kGCPIDMinPnSigmaAbovePionLine=1.;
2663     break;
2664   case 2:  // 1.5 GeV
2665     kGCPIDMinPnSigmaAbovePionLine=1.5;
2666     break;
2667   case 3:  // 20.0 GeV
2668     kGCPIDMinPnSigmaAbovePionLine=20.;
2669     break;
2670   case 4:  // 50.0 GeV
2671     kGCPIDMinPnSigmaAbovePionLine=50.;
2672     break;
2673   case 5:  // 0.3 GeV
2674     kGCPIDMinPnSigmaAbovePionLine=0.3;
2675     break;
2676   case 6:  // 0.3 GeV
2677     kGCPIDMinPnSigmaAbovePionLine=0.25;
2678     break;
2679   case 7:  // 0.4 GeV
2680     kGCPIDMinPnSigmaAbovePionLine=0.4;
2681     break;
2682   default:
2683     return iResult;
2684   }
2685   
2686   switch(chi2GammaCut){
2687   case 0: // 100
2688     kGCchi2CutConversion = 100.;
2689     break;
2690   case 1:  // 50
2691     kGCchi2CutConversion = 50.;
2692     break;
2693   case 2:  // 30
2694     kGCchi2CutConversion = 30.;
2695     break;
2696   case 3:
2697     kGCchi2CutConversion = 200.;
2698     break;
2699   case 4:
2700     kGCchi2CutConversion = 500.;
2701     break;
2702   case 5:
2703     kGCchi2CutConversion = 1000.;
2704     break;
2705   case 6:
2706     kGCchi2CutConversion = 5.;
2707     break;
2708   case 7:
2709     kGCchi2CutConversion = 10.;
2710     break;
2711   case 8:
2712     kGCchi2CutConversion = 20.;
2713     break;
2714   case 9:
2715     kGCchi2CutConversion = 15.;
2716     break;
2717   default:
2718     return iResult;
2719   }
2720
2721   switch(singlePtCut){
2722   case 0: // 0.050 GeV
2723     kGCsingleptCut = 0.050;
2724     break;
2725   case 1:  // 0.100 GeV
2726     kGCsingleptCut = 0.100;
2727     break;
2728   case 2:  // 0.150 GeV
2729     kGCsingleptCut = 0.150;
2730     break;
2731   case 3:  // 0.200 GeV
2732     kGCsingleptCut = 0.200;
2733     break;
2734   case 4:  // 0.075 GeV
2735     kGCsingleptCut = 0.075;
2736     break;
2737   case 5:  // 0.125 GeV
2738     kGCsingleptCut = 0.125;
2739     break;
2740   default:
2741     return iResult;
2742  }
2743
2744   switch(clsTPCCut){
2745   case 0: // 0 
2746     kGCminClsTPCCut= 0.;
2747     break;
2748   case 1:  // 70 
2749     kGCminClsTPCCut= 70.;
2750     break;
2751   case 2:  // 80 
2752     kGCminClsTPCCut= 80.;
2753     break;
2754   case 3:  // 100 
2755     kGCminClsTPCCut= 100.;
2756     break;
2757   case 4:  // 60% of findable clusters
2758     kGCminClsTPCCutToF= 0.6;
2759     kGCUseCorrectedTPCClsInfo=0;
2760     break;
2761   case 5:  // 0% of findable clusters
2762     kGCminClsTPCCutToF= 0.0;
2763     kGCUseCorrectedTPCClsInfo=0;
2764     break;
2765   case 6:  // 0% of findable clusters
2766     kGCminClsTPCCutToF= 0.7;
2767     kGCUseCorrectedTPCClsInfo=0;
2768     break;
2769   case 7:  // 0% of findable clusters
2770     kGCminClsTPCCutToF= 0.35;
2771     kGCUseCorrectedTPCClsInfo=0;
2772     break;
2773   case 8:
2774     kGCminClsTPCCutToF= 0.35;
2775     kGCUseCorrectedTPCClsInfo=1;
2776     break;
2777   default:
2778     return iResult;
2779   }
2780
2781   switch(etaCut){
2782   case 0: // 0.9 
2783     kGCetaCut    = 0.9;
2784     kGCLineCutZRSlope = tan(2*atan(exp(-kGCetaCut)));
2785     break;
2786   case 1:  // 1.2
2787     kGCetaCut    = 1.2;
2788     kGCLineCutZRSlope = tan(2*atan(exp(-kGCetaCut)));
2789     break;
2790   case 2:  // 1.4
2791     kGCetaCut    = 1.4;
2792     kGCLineCutZRSlope = tan(2*atan(exp(-kGCetaCut)));
2793     break;
2794   default:
2795     return iResult;
2796   }
2797
2798   switch(chi2MesonCut){
2799   case 0:  // 100.
2800     kGCchi2CutMeson = 100.;
2801     break;
2802   case 1:  // 50.
2803     kGCchi2CutMeson = 50.;
2804     break;
2805   case 2:  // 30.
2806     kGCchi2CutMeson = 30.;
2807     break;
2808   case 3:
2809     kGCchi2CutMeson = 200.;
2810     break;
2811   case 4:
2812     kGCchi2CutMeson = 500.;
2813     break;
2814   case 5:
2815     kGCchi2CutMeson = 1000.;
2816     break;
2817   default:
2818     return iResult;
2819   }
2820
2821
2822   switch(LowPRejectionSigmaCut){
2823   case 0:  // 
2824     kGCPIDnSigmaAtLowPAroundKaonLine=0;
2825     kGCPIDnSigmaAtLowPAroundProtonLine=0;
2826     kGCPIDnSigmaAtLowPAroundPionLine=0;
2827     break;
2828   case 1:  // 
2829     kGCPIDnSigmaAtLowPAroundKaonLine=0.5;
2830     kGCPIDnSigmaAtLowPAroundProtonLine=0.5;
2831     kGCPIDnSigmaAtLowPAroundPionLine=0.5;
2832     break;
2833   case 2:  // 
2834     kGCPIDnSigmaAtLowPAroundKaonLine=1;
2835     kGCPIDnSigmaAtLowPAroundProtonLine=1;
2836     kGCPIDnSigmaAtLowPAroundPionLine=1;
2837     break;
2838   case 3:  // 
2839     kGCPIDnSigmaAtLowPAroundKaonLine=2.;
2840     kGCPIDnSigmaAtLowPAroundProtonLine=2.;
2841     kGCPIDnSigmaAtLowPAroundPionLine=2.;
2842     break;
2843   case 4:  // 
2844     kGCPIDnSigmaAtLowPAroundKaonLine=0.;
2845     kGCPIDnSigmaAtLowPAroundProtonLine=0.;
2846     kGCPIDnSigmaAtLowPAroundPionLine=1;
2847     break;
2848   case 5:  // 
2849     kGCPIDnSigmaAtLowPAroundKaonLine=0.;
2850     kGCPIDnSigmaAtLowPAroundProtonLine=0.;
2851     kGCPIDnSigmaAtLowPAroundPionLine=1.5;
2852     break;
2853   case 6:  // 
2854     kGCPIDnSigmaAtLowPAroundKaonLine=0.;
2855     kGCPIDnSigmaAtLowPAroundProtonLine=0.;
2856     kGCPIDnSigmaAtLowPAroundPionLine=2.;
2857     break;
2858
2859   default:
2860     return iResult;
2861   }
2862   switch(QtMaxCut){
2863   case 0: //
2864     kGCQtMax=1.;
2865     break;
2866   case 1:
2867     kGCQtMax=0.1;
2868     break;
2869   case 2:
2870     kGCQtMax=0.07;
2871     break;
2872   case 3:
2873     kGCQtMax=0.05;
2874     break;
2875   case 4:
2876     kGCQtMax=0.03;
2877     break;
2878   case 5: // OWN try to improve (get rid of) low InvMass peak in PbPb
2879     kGCQtMax=0.02;
2880     break; // end OWN ///////////////////////////////////////////////
2881   default:
2882     return iResult;
2883   }
2884
2885   switch(piMaxMomdedxSigmaCut){
2886   case 0:  // 100. GeV
2887     kGCPIDMaxPnSigmaAbovePionLine=100.;
2888     break;
2889   case 1:  // 5. GeV
2890     kGCPIDMaxPnSigmaAbovePionLine=5.;
2891     break;
2892   case 2:  // 4. GeV
2893     kGCPIDMaxPnSigmaAbovePionLine=4.;
2894     break;
2895   case 3:  // 3.5 GeV
2896     kGCPIDMaxPnSigmaAbovePionLine=3.5;
2897     break;
2898   case 4:  // 3. GeV
2899     kGCPIDMaxPnSigmaAbovePionLine=3.;
2900     break;
2901   default:
2902     return iResult;
2903   }
2904
2905         
2906   switch(alphaMesonCut){
2907   case 0:  // 0- 0.7
2908     kGCalphaMinCutMeson   = 0.0;
2909     kGCalphaCutMeson   = 0.7;
2910     break;
2911   case 1:  // 0-0.5
2912     kGCalphaMinCutMeson   = 0.0;
2913     kGCalphaCutMeson   = 0.5;
2914     break;
2915   case 2:  // 0.5-1 
2916     kGCalphaMinCutMeson   = 0.5;
2917     kGCalphaCutMeson   = 1.;
2918     break;
2919   case 3:  // 0.0-1 
2920     kGCalphaMinCutMeson   = 0.0;
2921     kGCalphaCutMeson   = 1.;
2922     break;
2923   default:
2924     return iResult;
2925   }
2926   
2927   switch(minRCut){
2928   case 0:
2929     kGCminRCut=0;
2930     kGCmaxRCut = 180.;
2931     break;
2932   case 1:
2933     kGCminRCut=2.8;
2934     kGCmaxRCut = 180.;
2935     break;
2936   case 2:
2937     kGCminRCut=5.;
2938     kGCmaxRCut = 180.;
2939     break;
2940   case 3:
2941     kGCmaxRCut = 70.;
2942     kGCminRCut = 10.;
2943     break;
2944   case 4:
2945     kGCmaxRCut = 70.;
2946     kGCminRCut = 5.;
2947     break;
2948   case 5:
2949     kGCmaxRCut = 180.;
2950     kGCminRCut = 10.;
2951     break;
2952     
2953   default:
2954     return iResult;
2955   }
2956
2957   switch(RapidityMesonCut){
2958   case 0:  //
2959     kGCrapidityCutMeson   = 0.9;
2960     break;
2961   case 1:  // 
2962     kGCrapidityCutMeson   = 0.8;
2963     break;
2964   case 2:  // 
2965     kGCrapidityCutMeson   = 0.7;
2966     break;
2967     
2968   default:
2969     return iResult;
2970   }
2971
2972   switch(BackgroundScheme){
2973   case 0: //Rotation
2974     kGCUseRotationMethodInBG=kTRUE;
2975     kGCdoBGProbability=kFALSE;
2976     break;
2977   case 1: // mixed event with track multiplicity
2978     kGCUseRotationMethodInBG=kFALSE;
2979     kGCUseTrackMultiplicityForBG=kFALSE;
2980     kGCdoBGProbability=kFALSE;
2981     break;
2982   case 2: // mixed event with V0 multiplicity
2983     kGCUseRotationMethodInBG=kFALSE;
2984     kGCUseTrackMultiplicityForBG=kTRUE;
2985     kGCdoBGProbability=kFALSE;
2986     break;
2987   case 3: //Rotation
2988     kGCUseRotationMethodInBG=kTRUE;
2989     kGCdoBGProbability=kTRUE;
2990     break;
2991   default:
2992     return iResult;
2993   }
2994   
2995   switch(DegreesForRotationMethod){
2996   case 0:
2997     kGCnDegreeRotationPMForBG = 5;
2998     break;
2999   case 1:
3000     kGCnDegreeRotationPMForBG = 10;
3001     break;
3002   case 2:
3003     kGCnDegreeRotationPMForBG = 15;
3004     break;
3005   case 3:
3006     kGCnDegreeRotationPMForBG = 20;
3007     break;
3008
3009   default:
3010     return iResult;
3011   }
3012
3013   switch(NumberOfRotations){
3014   case 0:
3015     kGCnumberOfRotationEventsForBG = 5;
3016     break;
3017   case 1:
3018     kGCnumberOfRotationEventsForBG = 10;
3019     break;
3020   case 2:
3021     kGCnumberOfRotationEventsForBG = 15;
3022     break;
3023   case 3:
3024     kGCnumberOfRotationEventsForBG = 20;
3025     break;
3026   case 4:
3027     kGCnumberOfRotationEventsForBG = 2;
3028     break;
3029   case 5:
3030     kGCnumberOfRotationEventsForBG = 50;
3031     break;
3032   case 6:
3033     kGCnumberOfRotationEventsForBG = 80;
3034     break;
3035   case 7:
3036     kGCnumberOfRotationEventsForBG = 100;
3037     break;
3038   default:
3039     return iResult;
3040   }
3041
3042   switch(removePileUp){
3043   case 0:
3044     kGCRemovePileUp=kFALSE;
3045     break;
3046   case 1:
3047     kGCRemovePileUp=kTRUE;
3048     break;
3049   default:
3050     return iResult;
3051   }
3052
3053   switch(selectV0AND){
3054   case 0:
3055     kGCSelectV0AND=kFALSE;
3056     break;
3057   case 1:
3058     kGCSelectV0AND=kTRUE;
3059     break;
3060   default:
3061     return iResult;
3062   }
3063
3064   switch(multiplicityBin){
3065   case 0:
3066     kGCUseMultiplicity=kFALSE;
3067     kGCUseMultiplicityBin=0;
3068     break;
3069   case 1:
3070     kGCUseMultiplicity=kTRUE;
3071     kGCUseMultiplicityBin=1;
3072      break;
3073   case 2:
3074     kGCUseMultiplicity=kTRUE;
3075     kGCUseMultiplicityBin=2;
3076      break;
3077   case 3:
3078     kGCUseMultiplicity=kTRUE;
3079     kGCUseMultiplicityBin=3;
3080      break;
3081   case 4:
3082     kGCUseMultiplicity=kTRUE;
3083     kGCUseMultiplicityBin=4;
3084      break;
3085   case 5:
3086     kGCUseMultiplicity=kTRUE;
3087     kGCUseMultiplicityBin=5;
3088      break;
3089   default:
3090     return iResult;
3091   }
3092
3093   switch(isHeavyIon){
3094   case 0:
3095     kGCIsHeavyIon=0;
3096     break;
3097   case 1:
3098     kGCIsHeavyIon=1;
3099     break;
3100    default:
3101     return iResult;
3102   }
3103
3104   switch(useCentrality){
3105   case 0:
3106     kGCUseCentrality=0;
3107     break;
3108   case 1:
3109     kGCUseCentrality=1;//    GetCentralityClass10("V0M")
3110     break;
3111   case 2:
3112     kGCUseCentrality=2; //    GetCentralityClass10("CL1")
3113     break;
3114    default:
3115     return iResult;
3116   }
3117
3118   switch(centralityBin){
3119   case 0:
3120     kGCUseCentralityBin=0;
3121     break;
3122   case 1:
3123     kGCUseCentralityBin=1;
3124     break;
3125   case 2:
3126     kGCUseCentralityBin=2;
3127     break;
3128   case 3:
3129     kGCUseCentralityBin=3;
3130     break;
3131   case 4:
3132     kGCUseCentralityBin=4;
3133     break;
3134   case 5:
3135     kGCUseCentralityBin=5;
3136     break;
3137   case 6:
3138     kGCUseCentralityBin=6;
3139     break;
3140   case 7:
3141     kGCUseCentralityBin=7;
3142     break;
3143   case 8:
3144     kGCUseCentralityBin=8;
3145     break;
3146   case 9:
3147     kGCUseCentralityBin=9;
3148     break;
3149    default:
3150     return iResult;
3151   }
3152   iResult=1;
3153   return iResult;
3154
3155
3156 }
3157
3158
3159 void string2array(const std::string& number, int a[c_array_size]) 
3160 {
3161     if (number.size() == c_array_size) {
3162 #define ASSIGNARRAY(i)  a[i] = number[i] - '0'
3163         ASSIGNARRAY(0);
3164         ASSIGNARRAY(1);
3165         ASSIGNARRAY(2);
3166         ASSIGNARRAY(3);
3167         ASSIGNARRAY(4);
3168         ASSIGNARRAY(5);
3169         ASSIGNARRAY(6);
3170         ASSIGNARRAY(7);
3171         ASSIGNARRAY(8);
3172         ASSIGNARRAY(9);
3173         ASSIGNARRAY(10);
3174         ASSIGNARRAY(11);
3175         ASSIGNARRAY(12);
3176         ASSIGNARRAY(13);
3177         ASSIGNARRAY(14);
3178         ASSIGNARRAY(15);
3179         ASSIGNARRAY(16);
3180         ASSIGNARRAY(17);
3181         ASSIGNARRAY(18);
3182         ASSIGNARRAY(19);
3183         ASSIGNARRAY(20);
3184         ASSIGNARRAY(21);
3185         ASSIGNARRAY(22);
3186         ASSIGNARRAY(23);
3187         ASSIGNARRAY(24);
3188         ASSIGNARRAY(25);
3189   }
3190 }
3191
3192
3193
3194