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