changes from gsi. Using mult if no centrality. testfilterbit 128
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / macros / Cuts_Events_new.C
CommitLineData
dab7b5d6 1/****************************************************************************************************************************
5fdef45d 2****** provided by Gamma Conversion Group, PWGGA, *****
dab7b5d6 3****** Friederike Bock, friederike.bock@cern.ch *****
4*****************************************************************************************************************************
5*** This macro can be used to observe the effects of the different cuts used in the GammaConversion analysis, it can *****
6*** operate on root files created by the GammaConversionTask. It can take two root-files, where the second one should be ****
7*** a MC file otherwise all histograms including MC need to be commented out. *****
8****************************************************************************************************************************/
9
10#include <Riostream.h>
11#include <fstream>
12#include "PlottingGammaConversionHistos.h"
13#include "PlottingGammaConversionAdditional.h"
14using namespace std;
15
16
17extern TRandom *gRandom;
18extern TBenchmark *gBenchmark;
19extern TSystem *gSystem;
20
21
22void Cuts_Events_new(const char *data = "myOutput", const char *MCfile = "",const char *cutsel = "", const char *path = "", const char *output = "Reconstruction_Cuts", const char *Plots = "kTRUE", const char *suffix = "gif", const char *outlname = "Export_Cuts2.dat"){
23
24 gROOT->Reset();
25 gROOT->SetStyle("Plain");
26// StyleSettingsThesis();
27 StyleSettings();
28 set_plot_style();
29
30 Bool_t SinglePlots = kFALSE;
31 if(Plots == "kTRUE") SinglePlots = kTRUE;
32
33 // textsize for legend
34 Float_t ts=0.04;
35 // textsize for label
36 Float_t ls = 0.04;
37
38 //Array defintion for printing Logo in right upper corner
39 Float_t right_up[4]={0.7,0.63,0.15, 0.02};
40 Float_t right_down[4]={0.7,0.23,0.15, 0.02};
41 //Array defintion for printing Logo in left upper corner
42 Float_t left_up[4]={0.13,0.73, 0.15, 0.02};
43 //Array defintion for printing text in right upper corner
44 Float_t right_up_text[4]={0.6,0.8,0.15, 0.02};
45
46 /* If Full is set to kTRUE you will display all of the Cuts compared to the Data before any cut,
47 if it is set to kFAlSE you will display them compared to the Data before the Cut you made. */
48 Bool_t Full = kFALSE;
49
50 /* If MC is set to kTRUE the second input will be treated as Montecarlo and the true Photons will
51 be extracted as well and if not it stays as it was.*/
52 Bool_t MC1 = kFALSE;
53 Bool_t MC2 = kTRUE;
54
55 char *StandardYAxis = "#gamma/ event scaled by multiplicity";
56
57 if(cutsel != ""){
5fdef45d 58 char *GammaDirectory = Form("PWGGA_GammaConversion_%s", cutsel);
dab7b5d6 59 cout << GammaDirectory << endl;
60 char *GammaList = Form("histogramsAliGammaConversion_%s", cutsel);
61 cout << GammaList << endl;
62 }else{
5fdef45d 63 char *GammaDirectory = "PWGGA_GammaConversion";
dab7b5d6 64 cout << GammaDirectory << endl;
65 char *GammaList = "histogramsAliGammaConversion";
66 cout << GammaList << endl;
67 }
68
69 char *Date = "25th June 2010";
70// --------------------------------- end of self definitions --------------------------------
71
72
73 TPostScript *ps_characteristics;
74 if(!SinglePlots)ps_characteristics = new TPostScript(Form("%s%s.ps",path,output),111);
75
76 Char_t filename_data[200] = (Form("%s%s",path,data));
77 TFile f(filename_data);
78
5fdef45d 79 TDirectory *fPWGGAGammaConversion_data = new TDirectory(); // definition of first folder / list
dab7b5d6 80 TList *fHistosGammaConversion_data = new TList(); // definition of first folder / list
81 TList *fESDContainer_data = new TList(); // definition of following folder / list
82 TList *fMappingContainer_data = new TList();
83
5fdef45d 84 if(!(fPWGGAGammaConversion_data = (TDirectory*)f.Get(GammaDirectory))) cout <<"PWGGAGammConversion TList NOT loaded correctly"<<endl;
85 if(!(fHistosGammaConversion_data = (TList*)fPWGGAGammaConversion_data->Get(GammaList))) cout<<"histogramsAliGammaConversion NOT loaded correctly!"<<endl;
dab7b5d6 86 if(!(fESDContainer_data = (TList*)fHistosGammaConversion_data->FindObject("ESD histograms"))) cout<<"ESD histograms NOT loaded correctly!"<<endl;
87 fMappingContainer_data = (TList*)fHistosGammaConversion_data->FindObject("Mapping histograms");
88 if(MC1){
89 fTRUEContainer_data = (TList*)fHistosGammaConversion_data->FindObject("True conversion histograms");
90 TH1F *TRUE_Conversion_R_data = fTRUEContainer_data->FindObject("ESD_TrueConversion_R");
91 TH1F *ESD_Conversion_R_data= fESDContainer_data->FindObject("ESD_Conversion_R");
92 }
93
94 TH1F * ESD_CutLikeSign_data = fESDContainer_data->FindObject("ESD_CutLikeSign_InvMass");
95 TH1F * ESD_CutRefit_data = fESDContainer_data->FindObject("ESD_CutRefit_InvMass");
96 TH1F * ESD_CutKink_data = fESDContainer_data->FindObject("ESD_CutKink_InvMass");
97 TH1F * ESD_CutdEdxSigmaElectronLine_data = fESDContainer_data->FindObject("ESD_CutdEdxSigmaElectronLine_InvMass");
98 TH1F * ESD_CutdEdxSigmaPionLine_data = fESDContainer_data->FindObject("ESD_CutdEdxSigmaPionLine_InvMass");
99 TH1F * ESD_CutKaonRejectionLowP_data = fESDContainer_data->FindObject("ESD_CutKaonRejectionLowP_InvMass");
100 TH1F * ESD_CutProtonRejectionLowP_data = fESDContainer_data->FindObject("ESD_CutProtonRejectionLowP_InvMass");
101 TH1F * ESD_CutPionRejectionLowP_data = fESDContainer_data->FindObject("ESD_CutPionRejectionLowP_InvMass");
102 TH1F * ESD_CutGetOnFly_data = fESDContainer_data->FindObject("ESD_CutGetOnFly_InvMass");
103 TH1F * ESD_CutNContributors_data = fESDContainer_data->FindObject("ESD_CutNContributors_InvMass");
104 TH1F * ESD_CutPIDProb_data = fESDContainer_data->FindObject("ESD_CutPIDProb_InvMass");
105 TH1F * ESD_CutR_data = fESDContainer_data->FindObject("ESD_CutR_InvMass");
106 TH1F * ESD_CutLine_data = fESDContainer_data->FindObject("ESD_CutLine_InvMass");
107 TH1F * ESD_CutZ_data = fESDContainer_data->FindObject("ESD_CutZ_InvMass");
108 TH1F * ESD_CutMinNClsTPC_data = fESDContainer_data->FindObject("ESD_CutMinNClsTPC_InvMass");
109 TH1F * ESD_CutSinglePt_data = fESDContainer_data->FindObject("ESD_CutSinglePt_InvMass");
110 TH1F * ESD_CutNDF_data = fESDContainer_data->FindObject("ESD_CutNDF_InvMass");
111 TH1F * ESD_CutChi2_data = fESDContainer_data->FindObject("ESD_CutChi2_InvMass");
112 TH1F * ESD_CutEta_data = fESDContainer_data->FindObject("ESD_CutEta_InvMass");
113 TH1F * ESD_CutPt_data = fESDContainer_data->FindObject("ESD_CutPt_InvMass");
114 TH1F * ESD_ConvGamma_Pt_data=fESDContainer_data->FindObject("ESD_ConvGamma_Pt");
115 TH1F * ESD_NumberOfContributorsVtx_data=fESDContainer_data->FindObject("ESD_NumberOfContributorsVtx");
116 TH1F * ESD_ConvGamma_Mass_data = fESDContainer_data->FindObject("ESD_ConvGamma_Mass");
117 TH1F * ESD_NumberOfV0_data = fESDContainer_data->FindObject("ESD_NumberOfV0s");
118 TH1F * ESD_AllV0_data = fESDContainer_data->FindObject("ESD_AllV0s_InvMass");
119 TH1F * ESD_NumberOfGoodESDTracks_data=fESDContainer_data->FindObject("ESD_NumberOfGoodESDTracks");
120 TH1F *ScalingDiagramm_data= fMappingContainer_data->FindObject("ESD_Conversion_Mapping_Phi_in_R_11");
121
122 //get Entries
123 ESD_NumberOfContributorsVtx_data->SetAxisRange(1.,100.);
124 ESD_NumberOfGoodESDTracks_data->SetAxisRange(1.,100.);
125
126
127 Float_t Scaling_data = ScalingDiagramm_data->Integral();
128 Float_t nGoodEvents_data = ESD_NumberOfContributorsVtx_data->Integral();
129 Float_t nGoodTrig_data = ESD_NumberOfContributorsVtx_data->GetEntries();
130 Float_t nRecGamma_data = ESD_ConvGamma_Pt_data->Integral();
131 cout<< data << " Number of events:: " << nGoodEvents_data << " Number of triggers:: " << nGoodTrig_data <<endl;
132
133 Float_t normFac_data=1./nGoodEvents_data;
134// Float_t normFac_data=1./Scaling_data;
135 Double_t mean_data = ESD_NumberOfGoodESDTracks_data->GetMean();
136
137 //Scaling reconstr.
138 ESD_CutLikeSign_data->Sumw2();
139 ESD_CutRefit_data->Sumw2();
140 ESD_CutKink_data->Sumw2();
141 ESD_CutdEdxSigmaElectronLine_data->Sumw2();
142 ESD_CutdEdxSigmaPionLine_data->Sumw2();
143 ESD_CutKaonRejectionLowP_data->Sumw2();
144 ESD_CutProtonRejectionLowP_data->Sumw2();
145 ESD_CutPionRejectionLowP_data->Sumw2();
146 ESD_CutGetOnFly_data->Sumw2();
147 ESD_CutNContributors_data->Sumw2();
148 ESD_CutPIDProb_data->Sumw2();
149 ESD_CutR_data->Sumw2();
150 ESD_CutLine_data->Sumw2();
151 ESD_CutZ_data->Sumw2();
152 ESD_CutMinNClsTPC_data->Sumw2();
153 ESD_CutSinglePt_data->Sumw2();
154 ESD_CutNDF_data->Sumw2();
155 ESD_CutChi2_data->Sumw2();
156 ESD_CutEta_data->Sumw2();
157 ESD_CutPt_data->Sumw2();
158 ESD_ConvGamma_Mass_data->Sumw2();
159 ESD_AllV0_data->Sumw2();
160 // Rebinning, has to be done before merging otherwise it would effect everytime we add the file to another
161
162 const int rebin = 20 ;
163
164 ESD_CutLikeSign_data->Rebin(rebin);
165 ESD_CutRefit_data->Rebin(rebin);
166 ESD_CutKink_data->Rebin(rebin);
167 ESD_CutdEdxSigmaElectronLine_data->Rebin(rebin);
168 ESD_CutdEdxSigmaPionLine_data->Rebin(rebin);
169 ESD_CutKaonRejectionLowP_data->Rebin(rebin);
170 ESD_CutProtonRejectionLowP_data->Rebin(rebin);
171 ESD_CutPionRejectionLowP_data->Rebin(rebin);
172 ESD_CutGetOnFly_data->Rebin(rebin);
173 ESD_CutNContributors_data->Rebin(rebin);
174 ESD_CutPIDProb_data->Rebin(rebin);
175 ESD_CutR_data->Rebin(rebin);
176 ESD_CutLine_data->Rebin(rebin);
177 ESD_CutZ_data->Rebin(rebin);
178 ESD_CutMinNClsTPC_data->Rebin(rebin);
179 ESD_CutSinglePt_data->Rebin(rebin);
180 ESD_CutNDF_data->Rebin(rebin);
181 ESD_CutChi2_data->Rebin(rebin);
182 ESD_CutEta_data->Rebin(rebin);
183 ESD_CutPt_data->Rebin(rebin);
184 ESD_ConvGamma_Mass_data->Rebin(rebin);
185 ESD_AllV0_data->Rebin(rebin);
186
187 // Creation of histograms to compare cut with data before
188
189 TH1F* NoCutGetOnFly_data = (TH1F*) ESD_AllV0_data->Clone();
190
191 TH1F* NoCutLikeSign_data = (TH1F*) NoCutGetOnFly_data->Clone();
192 NoCutLikeSign_data->Add(ESD_CutGetOnFly_data,-1);
193
194 TH1F* NoCutRefit_data = (TH1F*) NoCutLikeSign_data->Clone();
195 NoCutRefit_data->Add(ESD_CutLikeSign_data,-1);
196
197 TH1F* NoCutKink_data = (TH1F*) NoCutRefit_data->Clone();
198 NoCutKink_data->Add(ESD_CutRefit_data,-1);
199
200 TH1F* NoCutdEdxSigmaElectronLine_data = (TH1F*) NoCutKink_data->Clone();
201 NoCutdEdxSigmaElectronLine_data->Add(ESD_CutKink_data,-1);
202
203 TH1F* NoCutdEdxSigmaPionLine_data = (TH1F*) NoCutdEdxSigmaElectronLine_data->Clone();
204 NoCutdEdxSigmaPionLine_data->Add(ESD_CutdEdxSigmaElectronLine_data,-1);
205
206 TH1F* NoCutKaonRejectionLowP_data = (TH1F*) NoCutdEdxSigmaPionLine_data->Clone();
207 NoCutKaonRejectionLowP_data->Add(ESD_CutdEdxSigmaPionLine_data,-1);
208
209 TH1F* NoCutProtonRejectionLowP_data = (TH1F*) NoCutKaonRejectionLowP_data->Clone();
210 NoCutProtonRejectionLowP_data->Add(ESD_CutKaonRejectionLowP_data,-1);
211
212 TH1F* NoCutPionRejectionLowP_data = (TH1F*) NoCutProtonRejectionLowP_data->Clone();
213 NoCutPionRejectionLowP_data->Add(ESD_CutProtonRejectionLowP_data,-1);
214
215 TH1F* NoCutNContributors_data = (TH1F*) NoCutPionRejectionLowP_data->Clone();
216 NoCutNContributors_data->Add(ESD_CutPionRejectionLowP_data,-1);
217
218 TH1F* NoCutPIDProb_data = (TH1F*) NoCutNContributors_data->Clone();
219 NoCutPIDProb_data->Add(ESD_CutNContributors_data,-1);
220
221 TH1F* NoCutR_data = (TH1F*) NoCutPIDProb_data->Clone();
222 NoCutR_data->Add(ESD_CutPIDProb_data,-1);
223
224 TH1F* NoCutLine_data = (TH1F*) NoCutR_data->Clone();
225 NoCutLine_data->Add(ESD_CutR_data,-1);
226
227 TH1F* NoCutZ_data = (TH1F*) NoCutLine_data->Clone();
228 NoCutZ_data->Add(ESD_CutLine_data,-1);
229
230 TH1F* NoCutMinNClsTPC_data = (TH1F*) NoCutZ_data->Clone();
231 NoCutMinNClsTPC_data->Add(ESD_CutZ_data,-1);
232
233 TH1F* NoCutSinglePt_data = (TH1F*) NoCutMinNClsTPC_data->Clone();
234 NoCutSinglePt_data->Add(ESD_CutMinNClsTPC_data,-1);
235
236 TH1F* NoCutNDF_data = (TH1F*) NoCutSinglePt_data->Clone();
237 NoCutNDF_data->Add(ESD_CutSinglePt_data,-1);
238
239 TH1F* NoCutChi2_data = (TH1F*) NoCutNDF_data->Clone();
240 NoCutChi2_data->Add(ESD_CutNDF_data,-1);
241
242 TH1F* NoCutEta_data = (TH1F*) NoCutChi2_data->Clone();
243 NoCutEta_data->Add(ESD_CutChi2_data,-1);
244
245 TH1F* NoCutPt_data = (TH1F*) NoCutEta_data->Clone();
246 NoCutPt_data->Add(ESD_CutEta_data,-1);
247
248 TH1F* Final_data = (TH1F*) NoCutPt_data->Clone();
249 Final_data->Add(ESD_CutPt_data,-1);
250
251
252 Double_t NumberConvGamma_data = ESD_ConvGamma_Mass_data->Integral();
253 Double_t NumberV0_data= ESD_AllV0_data->Integral();
254 //Scaling
255 ESD_CutLikeSign_data->Scale(normFac_data);
256 ESD_CutRefit_data->Scale(normFac_data);
257 ESD_CutKink_data->Scale(normFac_data);
258 ESD_CutdEdxSigmaElectronLine_data->Scale(normFac_data);
259 ESD_CutdEdxSigmaPionLine_data->Scale(normFac_data);
260 ESD_CutKaonRejectionLowP_data->Scale(normFac_data);
261 ESD_CutProtonRejectionLowP_data->Scale(normFac_data);
262 ESD_CutPionRejectionLowP_data->Scale(normFac_data);
263 ESD_CutGetOnFly_data->Scale(normFac_data);
264 ESD_CutNContributors_data->Scale(normFac_data);
265 ESD_CutPIDProb_data->Scale(normFac_data);
266 ESD_CutR_data->Scale(normFac_data);
267 ESD_CutLine_data->Scale(normFac_data);
268 ESD_CutZ_data->Scale(normFac_data);
269 ESD_CutMinNClsTPC_data->Scale(normFac_data);
270 ESD_CutSinglePt_data->Scale(normFac_data);
271 ESD_CutNDF_data->Scale(normFac_data);
272 ESD_CutChi2_data->Scale(normFac_data);
273 ESD_CutEta_data->Scale(normFac_data);
274 ESD_CutPt_data->Scale(normFac_data);
275 ESD_ConvGamma_Mass_data->Scale(normFac_data);
276
277 NoCutPt_data->Scale(normFac_data);
278 NoCutEta_data->Scale(normFac_data);
279 NoCutChi2_data->Scale(normFac_data);
280 NoCutNDF_data->Scale(normFac_data);
281 NoCutZ_data->Scale(normFac_data);
282 NoCutMinNClsTPC_data->Scale(normFac_data);
283 NoCutSinglePt_data->Scale(normFac_data);
284 NoCutLine_data->Scale(normFac_data);
285 NoCutR_data->Scale(normFac_data);
286 NoCutPIDProb_data->Scale(normFac_data);
287 NoCutNContributors_data->Scale(normFac_data);
288 NoCutGetOnFly_data->Scale(normFac_data);
289 NoCutKaonRejectionLowP_data->Scale(normFac_data);
290 NoCutProtonRejectionLowP_data->Scale(normFac_data);
291 NoCutPionRejectionLowP_data->Scale(normFac_data);
292 NoCutdEdxSigmaPionLine_data->Scale(normFac_data);
293 NoCutdEdxSigmaElectronLine_data->Scale(normFac_data);
294 NoCutKink_data->Scale(normFac_data);
295 NoCutRefit_data->Scale(normFac_data);
296 NoCutLikeSign_data->Scale(normFac_data);
297 ESD_AllV0_data->Scale(normFac_data);
298 Final_data->Scale(normFac_data);
299
300 Double_t RealV0_data = 0. ;
301 for(Int_t i=2;i<ESD_NumberOfV0_data->GetNbinsX()+1;i++){
302 RealV0_data += ((ESD_NumberOfV0_data->GetBinCenter(i))* ESD_NumberOfV0_data->GetBinContent(i));
303 }
304
305 cout << "Number of V0's data: " << NumberV0_data <<" " << RealV0_data << endl;
306
307// Second input ------------- same as done for first input -------------------------------------------------------------------------------------
308 TFile *montecarlo = 0x0;
309
310
311 if(MCfile != ""){
312 montecarlo = new TFile(Form("%s%s",path, MCfile));
313
314
315 // for new versions
5fdef45d 316 TDirectory *fPWGGAGammaConversion_montecarlo = new TDirectory(); // definition of first folder / list
dab7b5d6 317 TList *fHistosGammaConversion_montecarlo = new TList(); // definition of first folder / list
318 TList *fESDContainer_montecarlo = new TList(); // definition of following folder / list
319 TList *fMappingContainer_montecarlo = new TList(); // definition of following folder / list
320
5fdef45d 321 if(!(fPWGGAGammaConversion_montecarlo = (TDirectory*)montecarlo->Get(GammaDirectory))) cout <<"PWGGAGammConversion TList NOT loaded correctly"<<endl;
322 if(!(fHistosGammaConversion_montecarlo = (TList*)fPWGGAGammaConversion_montecarlo->Get(GammaList))) cout<<"histogramsAliGammaConversion NOT loaded correctly!"<<endl;
dab7b5d6 323 if(!(fESDContainer_montecarlo = (TList*)fHistosGammaConversion_montecarlo->FindObject("ESD histograms"))) cout<<"ESD histograms NOT loaded correctly!"<<endl;
324 fMappingContainer_montecarlo = (TList*)fHistosGammaConversion_montecarlo->FindObject("Mapping histograms");
325
326 // If second Input is a Montecarlodata file
327 if(MC2){
328 fTRUEContainer_montecarlo = (TList*)fHistosGammaConversion_montecarlo->FindObject("True conversion histograms");
329 TH1F *TRUE_Conversion_R_montecarlo = fTRUEContainer_montecarlo->FindObject("ESD_TrueConversion_R");
330 TH1F *ESD_Conversion_R_montecarlo= fESDContainer_montecarlo->FindObject("ESD_Conversion_R");
331 }
332
333 TH1F * ESD_CutLikeSign_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutLikeSign_InvMass");
334 TH1F * ESD_CutRefit_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutRefit_InvMass");
335 TH1F * ESD_CutKink_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutKink_InvMass");
336 TH1F * ESD_CutdEdxSigmaElectronLine_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutdEdxSigmaElectronLine_InvMass");
337 TH1F * ESD_CutdEdxSigmaPionLine_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutdEdxSigmaPionLine_InvMass");
338 TH1F * ESD_CutKaonRejectionLowP_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutKaonRejectionLowP_InvMass");
339 TH1F * ESD_CutProtonRejectionLowP_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutProtonRejectionLowP_InvMass");
340 TH1F * ESD_CutPionRejectionLowP_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutPionRejectionLowP_InvMass");
341
342 TH1F * ESD_CutGetOnFly_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutGetOnFly_InvMass");
343 TH1F * ESD_CutNContributors_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutNContributors_InvMass");
344 TH1F * ESD_CutPIDProb_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutPIDProb_InvMass");
345 TH1F * ESD_CutR_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutR_InvMass");
346 TH1F * ESD_CutLine_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutLine_InvMass");
347 TH1F * ESD_CutZ_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutZ_InvMass");
348 TH1F * ESD_CutMinNClsTPC_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutMinNClsTPC_InvMass");
349 TH1F * ESD_CutSinglePt_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutSinglePt_InvMass");
350 TH1F * ESD_CutNDF_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutNDF_InvMass");
351 TH1F * ESD_CutChi2_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutChi2_InvMass");
352 TH1F * ESD_CutEta_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutEta_InvMass");
353 TH1F * ESD_CutPt_montecarlo = fESDContainer_montecarlo->FindObject("ESD_CutPt_InvMass");
354 TH1F * ESD_ConvGamma_Pt_montecarlo=fESDContainer_montecarlo->FindObject("ESD_ConvGamma_Pt");
355 TH1F * ESD_NumberOfContributorsVtx_montecarlo=fESDContainer_montecarlo->FindObject("ESD_NumberOfContributorsVtx");
356 TH1F * ESD_ConvGamma_Mass_montecarlo = fESDContainer_montecarlo->FindObject("ESD_ConvGamma_Mass");
357 TH1F * ESD_NumberOfV0_montecarlo = fESDContainer_montecarlo->FindObject("ESD_NumberOfV0s");
358 TH1F * ESD_AllV0_montecarlo = fESDContainer_montecarlo->FindObject("ESD_AllV0s_InvMass");
359 TH1F * ESD_NumberOfGoodESDTracks_montecarlo=fESDContainer_montecarlo->FindObject("ESD_NumberOfGoodESDTracks");
360 TH1F *ScalingDiagramm_montecarlo= fMappingContainer_montecarlo->FindObject("ESD_Conversion_Mapping_Phi_in_R_11");
361 //get Entries
362 ESD_NumberOfContributorsVtx_montecarlo->SetAxisRange(1.,100.);
363 ESD_NumberOfGoodESDTracks_montecarlo->SetAxisRange(1.,100.);
364
365 Float_t Scaling_montecarlo = ScalingDiagramm_montecarlo->Integral();
366 Float_t nGoodEvents_montecarlo = ESD_NumberOfContributorsVtx_montecarlo->Integral();
367 Float_t nGoodTrig_montecarlo = ESD_NumberOfContributorsVtx_montecarlo->GetEntries();
368 Float_t nRecGamma_montecarlo = ESD_ConvGamma_Pt_montecarlo->Integral();
369 cout<< MCfile << " Number of events:: " << nGoodEvents_montecarlo << " Number of triggers:: " << nGoodTrig_montecarlo << endl;
370 Double_t mean_montecarlo = ESD_NumberOfGoodESDTracks_montecarlo->GetMean();
371 Float_t normFac_montecarlo=1./nGoodEvents_montecarlo * mean_data/mean_montecarlo;
372 // Float_t normFac_montecarlo=1./Scaling_montecarlo;
373
374 //Scaling reconstr.
375 ESD_CutLikeSign_montecarlo->Sumw2();
376 ESD_CutRefit_montecarlo->Sumw2();
377 ESD_CutKink_montecarlo->Sumw2();
378 ESD_CutdEdxSigmaElectronLine_montecarlo->Sumw2();
379 ESD_CutdEdxSigmaPionLine_montecarlo->Sumw2();
380 ESD_CutKaonRejectionLowP_montecarlo->Sumw2();
381 ESD_CutProtonRejectionLowP_montecarlo->Sumw2();
382 ESD_CutPionRejectionLowP_montecarlo->Sumw2();
383 ESD_CutGetOnFly_montecarlo->Sumw2();
384 ESD_CutNContributors_montecarlo->Sumw2();
385 ESD_CutPIDProb_montecarlo->Sumw2();
386 ESD_CutR_montecarlo->Sumw2();
387 ESD_CutLine_montecarlo->Sumw2();
388 ESD_CutZ_montecarlo->Sumw2();
389 ESD_CutMinNClsTPC_montecarlo->Sumw2();
390 ESD_CutSinglePt_montecarlo->Sumw2();
391 ESD_CutNDF_montecarlo->Sumw2();
392 ESD_CutChi2_montecarlo->Sumw2();
393 ESD_CutEta_montecarlo->Sumw2();
394 ESD_CutPt_montecarlo->Sumw2();
395 ESD_ConvGamma_Mass_montecarlo->Sumw2();
396 ESD_AllV0_montecarlo->Sumw2();
397 // Rebinning, has to be done before merging otherwise it would effect everytime we add the file to another
398
399 const int rebin = 20 ;
400
401 ESD_CutLikeSign_montecarlo->Rebin(rebin);
402 ESD_CutRefit_montecarlo->Rebin(rebin);
403 ESD_CutKink_montecarlo->Rebin(rebin);
404 ESD_CutdEdxSigmaElectronLine_montecarlo->Rebin(rebin);
405 ESD_CutdEdxSigmaPionLine_montecarlo->Rebin(rebin);
406 ESD_CutKaonRejectionLowP_montecarlo->Rebin(rebin);
407 ESD_CutProtonRejectionLowP_montecarlo->Rebin(rebin);
408 ESD_CutPionRejectionLowP_montecarlo->Rebin(rebin);
409
410 ESD_CutGetOnFly_montecarlo->Rebin(rebin);
411 ESD_CutNContributors_montecarlo->Rebin(rebin);
412 ESD_CutPIDProb_montecarlo->Rebin(rebin);
413 ESD_CutR_montecarlo->Rebin(rebin);
414 ESD_CutLine_montecarlo->Rebin(rebin);
415 ESD_CutZ_montecarlo->Rebin(rebin);
416 ESD_CutMinNClsTPC_montecarlo->Rebin(rebin);
417 ESD_CutSinglePt_montecarlo->Rebin(rebin);
418 ESD_CutNDF_montecarlo->Rebin(rebin);
419 ESD_CutChi2_montecarlo->Rebin(rebin);
420 ESD_CutEta_montecarlo->Rebin(rebin);
421 ESD_CutPt_montecarlo->Rebin(rebin);
422 ESD_ConvGamma_Mass_montecarlo->Rebin(rebin);
423 ESD_AllV0_montecarlo->Rebin(rebin);
424
425 // Creation of histograms to compare cut with data before
426
427 TH1F* NoCutGetOnFly_montecarlo = (TH1F*) ESD_AllV0_montecarlo->Clone();
428
429 TH1F* NoCutLikeSign_montecarlo = (TH1F*) NoCutGetOnFly_montecarlo->Clone();
430 NoCutLikeSign_montecarlo->Add(ESD_CutGetOnFly_montecarlo,-1);
431
432 TH1F* NoCutRefit_montecarlo = (TH1F*) NoCutLikeSign_montecarlo->Clone();
433 NoCutRefit_montecarlo->Add(ESD_CutLikeSign_montecarlo,-1);
434
435 TH1F* NoCutKink_montecarlo = (TH1F*) NoCutRefit_montecarlo->Clone();
436 NoCutKink_montecarlo->Add(ESD_CutRefit_montecarlo,-1);
437
438 TH1F* NoCutdEdxSigmaElectronLine_montecarlo = (TH1F*) NoCutKink_montecarlo->Clone();
439 NoCutdEdxSigmaElectronLine_montecarlo->Add(ESD_CutKink_montecarlo,-1);
440
441 TH1F* NoCutdEdxSigmaPionLine_montecarlo = (TH1F*) NoCutdEdxSigmaElectronLine_montecarlo->Clone();
442 NoCutdEdxSigmaPionLine_montecarlo->Add(ESD_CutdEdxSigmaElectronLine_montecarlo,-1);
443
444 TH1F* NoCutNContributors_montecarlo = (TH1F*) NoCutdEdxSigmaPionLine_montecarlo->Clone();
445 NoCutNContributors_montecarlo->Add(ESD_CutdEdxSigmaPionLine_montecarlo,-1);
446
447 TH1F* NoCutKaonRejectionLowP_montecarlo = (TH1F*) NoCutdEdxSigmaPionLine_montecarlo->Clone();
448 NoCutKaonRejectionLowP_montecarlo->Add(ESD_CutdEdxSigmaPionLine_montecarlo,-1);
449
450 TH1F* NoCutProtonRejectionLowP_montecarlo = (TH1F*) NoCutKaonRejectionLowP_montecarlo->Clone();
451 NoCutProtonRejectionLowP_montecarlo->Add(ESD_CutKaonRejectionLowP_montecarlo,-1);
452
453 TH1F* NoCutPionRejectionLowP_montecarlo = (TH1F*) NoCutProtonRejectionLowP_montecarlo->Clone();
454 NoCutPionRejectionLowP_montecarlo->Add(ESD_CutProtonRejectionLowP_montecarlo,-1);
455
456 TH1F* NoCutNContributors_montecarlo = (TH1F*) NoCutPionRejectionLowP_montecarlo->Clone();
457 NoCutNContributors_montecarlo->Add(ESD_CutPionRejectionLowP_montecarlo,-1);
458
459 TH1F* NoCutPIDProb_montecarlo = (TH1F*) NoCutNContributors_montecarlo->Clone();
460 NoCutPIDProb_montecarlo->Add(ESD_CutNContributors_montecarlo,-1);
461
462
463 TH1F* NoCutR_montecarlo = (TH1F*) NoCutPIDProb_montecarlo->Clone();
464 NoCutR_montecarlo->Add(ESD_CutPIDProb_montecarlo,-1);
465
466 TH1F* NoCutLine_montecarlo = (TH1F*) NoCutR_montecarlo->Clone();
467 NoCutLine_montecarlo->Add(ESD_CutR_montecarlo,-1);
468
469 TH1F* NoCutZ_montecarlo = (TH1F*) NoCutLine_montecarlo->Clone();
470 NoCutZ_montecarlo->Add(ESD_CutLine_montecarlo,-1);
471
472 TH1F* NoCutMinNClsTPC_montecarlo = (TH1F*) NoCutZ_montecarlo->Clone();
473 NoCutMinNClsTPC_montecarlo->Add(ESD_CutZ_montecarlo,-1);
474
475 TH1F* NoCutSinglePt_montecarlo = (TH1F*) NoCutMinNClsTPC_montecarlo->Clone();
476 NoCutSinglePt_montecarlo->Add(ESD_CutMinNClsTPC_montecarlo,-1);
477
478 TH1F* NoCutNDF_montecarlo = (TH1F*) NoCutSinglePt_montecarlo->Clone();
479 NoCutNDF_montecarlo->Add(ESD_CutSinglePt_montecarlo,-1);
480
481 TH1F* NoCutChi2_montecarlo = (TH1F*) NoCutNDF_montecarlo->Clone();
482 NoCutChi2_montecarlo->Add(ESD_CutNDF_montecarlo,-1);
483
484 TH1F* NoCutEta_montecarlo = (TH1F*) NoCutChi2_montecarlo->Clone();
485 NoCutEta_montecarlo->Add(ESD_CutChi2_montecarlo,-1);
486
487 TH1F* NoCutPt_montecarlo = (TH1F*) NoCutEta_montecarlo->Clone();
488 NoCutPt_montecarlo->Add(ESD_CutEta_montecarlo,-1);
489
490 TH1F* Final_montecarlo = (TH1F*) NoCutPt_montecarlo->Clone();
491 Final_montecarlo->Add(ESD_CutPt_montecarlo,-1);
492
493 Double_t NumberConvGamma_montecarlo = ESD_ConvGamma_Mass_montecarlo->Integral();
494 Double_t NumberV0_montecarlo= ESD_AllV0_montecarlo->Integral();
495 //Scaling
496 ESD_CutLikeSign_montecarlo->Scale(normFac_montecarlo);
497 ESD_CutRefit_montecarlo->Scale(normFac_montecarlo);
498 ESD_CutKink_montecarlo->Scale(normFac_montecarlo);
499 ESD_CutdEdxSigmaElectronLine_montecarlo->Scale(normFac_montecarlo);
500 ESD_CutdEdxSigmaPionLine_montecarlo->Scale(normFac_montecarlo);
501 ESD_CutKaonRejectionLowP_montecarlo->Scale(normFac_montecarlo);
502 ESD_CutProtonRejectionLowP_montecarlo->Scale(normFac_montecarlo);
503 ESD_CutPionRejectionLowP_montecarlo->Scale(normFac_montecarlo);
504 ESD_CutGetOnFly_montecarlo->Scale(normFac_montecarlo);
505 ESD_CutNContributors_montecarlo->Scale(normFac_montecarlo);
506 ESD_CutPIDProb_montecarlo->Scale(normFac_montecarlo);
507 ESD_CutR_montecarlo->Scale(normFac_montecarlo);
508 ESD_CutLine_montecarlo->Scale(normFac_montecarlo);
509 ESD_CutZ_montecarlo->Scale(normFac_montecarlo);
510 ESD_CutMinNClsTPC_montecarlo->Scale(normFac_montecarlo);
511 ESD_CutSinglePt_montecarlo->Scale(normFac_montecarlo);
512 ESD_CutNDF_montecarlo->Scale(normFac_montecarlo);
513 ESD_CutChi2_montecarlo->Scale(normFac_montecarlo);
514 ESD_CutEta_montecarlo->Scale(normFac_montecarlo);
515 ESD_CutPt_montecarlo->Scale(normFac_montecarlo);
516 ESD_ConvGamma_Mass_montecarlo->Scale(normFac_montecarlo);
517 NoCutPt_montecarlo->Scale(normFac_montecarlo);
518 NoCutEta_montecarlo->Scale(normFac_montecarlo);
519 NoCutChi2_montecarlo->Scale(normFac_montecarlo);
520 NoCutNDF_montecarlo->Scale(normFac_montecarlo);
521 NoCutZ_montecarlo->Scale(normFac_montecarlo);
522 NoCutMinNClsTPC_montecarlo->Scale(normFac_montecarlo);
523 NoCutSinglePt_montecarlo->Scale(normFac_montecarlo);
524 NoCutLine_montecarlo->Scale(normFac_montecarlo);
525 NoCutR_montecarlo->Scale(normFac_montecarlo);;
526 NoCutPIDProb_montecarlo->Scale(normFac_montecarlo);
527 NoCutNContributors_montecarlo->Scale(normFac_montecarlo);
528 NoCutGetOnFly_montecarlo->Scale(normFac_montecarlo);
529 NoCutKaonRejectionLowP_montecarlo->Scale(normFac_montecarlo);
530 NoCutProtonRejectionLowP_montecarlo->Scale(normFac_montecarlo);
531 NoCutPionRejectionLowP_montecarlo->Scale(normFac_montecarlo);
532 NoCutdEdxSigmaPionLine_montecarlo->Scale(normFac_montecarlo);
533 NoCutdEdxSigmaElectronLine_montecarlo->Scale(normFac_montecarlo);
534 NoCutKink_montecarlo->Scale(normFac_montecarlo);
535 NoCutRefit_montecarlo->Scale(normFac_montecarlo);
536 NoCutLikeSign_montecarlo->Scale(normFac_montecarlo);
537 ESD_AllV0_montecarlo->Scale(normFac_montecarlo);
538 Final_montecarlo->Scale(normFac_montecarlo);
539
540 Double_t RealV0_montecarlo = 0. ;
541 for(Int_t i=2;i<ESD_NumberOfV0_montecarlo->GetNbinsX()+1;i++){
542 RealV0_montecarlo += ((ESD_NumberOfV0_montecarlo->GetBinCenter(i))* ESD_NumberOfV0_montecarlo->GetBinContent(i));
543 }
544
545 cout << "Number of V0's montecarlo: " << NumberV0_montecarlo <<" " << RealV0_montecarlo << endl;
546 }
547
548 //------------------------------Def. of legend for all ------------------------------
549 leg1 = new TLegend(0.55,0.79,0.9,0.9);
550 leg1->AddEntry(ESD_CutLikeSign_data,("Data"),"l");
551 if(MCfile != ""){
552 leg1->AddEntry(ESD_CutLikeSign_montecarlo,("MC"),"l");}
553 if(!Full){
554 leg1->AddEntry(NoCutLikeSign_data,("Data without last cut"),"l");
555 if(MCfile!= "") {
556 leg1->AddEntry(NoCutLikeSign_montecarlo,("MC without last cut"),"l");}
557 }
558 if(Full){
559 leg1->AddEntry(NoCutLikeSign_data,("Data without cut"),"l");
560 if(MCfile!= "") {
561 leg1->AddEntry(NoCutLikeSign_montecarlo,("MC without cut"),"l");}
562 }
563 leg1->SetTextSize(0.04);
564
565
566 // ----------------------- Start ps file -----------------------------------------------------
567
568 // ----------------------- Titlepage - Page 1 -----------------------------------------
569 if(!SinglePlots) {
570// ps_characteristics->NewPage();
571
572// TCanvas * c0 = new TCanvas("c0","",700,1000); // gives the page size
573
574 title0 = new TPaveLabel(0.05,0.92,0.95,0.96,(Form("data: %s",data)));
575 title0->SetFillColor(16);
576 title0->SetTextSize(0.25);
577// title0->Draw();
578
579 if(MCfile != ""){
580 title1 = new TPaveLabel(0.05,0.87,0.95,0.91,(Form("montecarlo: %s",MCfile)));
581 title1->SetFillColor(16);
582 title1->SetTextSize(0.25);
583// title1->Draw();
584
585 }
586
587// c0->Update();
588
589 //------------ Track Cuts - Page 2 ------------------------------------
590
591 ps_characteristics->NewPage();
592
593 TCanvas * c1 = new TCanvas("c1","",700,1000); // gives the page size
594 pad_c1 = new TPad("pad_c1","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
595 pad_c1->SetFillColor(0);
596 pad_c1->GetFrame()->SetFillColor(0);
597 pad_c1->SetBorderMode(0);
598 pad_c1->Divide(2,2);
599 pad_c1->Draw();
600
601 title0->Draw();
602 if(MCfile != ""){title1->Draw();}
603
604
605 pad_c1->cd(1)->SetLogy(1);
606 pad_c1->cd(2)->SetLogy(1);
607 pad_c1->cd(3)->SetLogy(1);
608 pad_c1->cd(4)->SetLogy(1);
609
610 //*************** CutGetOnFly
611 pad_c1->cd(1);
612 if(!Full){
613 if(MCfile == ""){
614 DrawCutGammaHisto( ESD_CutGetOnFly_data, NoCutGetOnFly_data,
615 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
616 kFALSE, 1.5,0.00001,
617 kTRUE,0.000001 ,1,
618 kTRUE, 0.,0.5);
619 }else{
620 DrawCutGammaHistos( ESD_CutGetOnFly_data, NoCutGetOnFly_data,
621 ESD_CutGetOnFly_montecarlo, NoCutGetOnFly_montecarlo,
622 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
623 kFALSE, 1.5,0.00001,
624 kTRUE,0.000001 ,1,
625 kTRUE, 0.,0.5);
626 }
627 }else{
628 if(MCfile == ""){
629 DrawCutGammaHisto( ESD_CutGetOnFly_data, NoCutGetOnFly_data,
630 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
631 kFALSE, 1.5,0.00001,
632 kTRUE,0.000001 ,1,
633 kTRUE, 0.,0.5);
634 }else{
635 DrawCutGammaHistos( ESD_CutGetOnFly_data, NoCutGetOnFly_data,
636 ESD_CutGetOnFly_montecarlo, NoCutGetOnFly_montecarlo,
637 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
638 kFALSE, 1.5,0.00001,
639 kTRUE,0.000001 ,1,
640 kTRUE, 0.,0.5);
641 }
642 }
643 //************** CutLikeSign
644 pad_c1->cd(2);
645 if(!Full){
646 if(MCfile == ""){
647 DrawCutGammaHisto( ESD_CutLikeSign_data, NoCutLikeSign_data,
648 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
649 kFALSE, 1.5,0.00001,
650 kTRUE,0.000001 ,1,
651 kTRUE, 0.,0.5);
652 }else{
653 DrawCutGammaHistos( ESD_CutLikeSign_data, NoCutLikeSign_data,
654 ESD_CutLikeSign_montecarlo, NoCutLikeSign_montecarlo,
655 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
656 kFALSE, 1.5,0.00001,
657 kTRUE,0.000001 ,1,
658 kTRUE, 0.,0.5);
659 }
660 }else{
661 if(MCfile == ""){
662 DrawCutGammaHisto( ESD_CutLikeSign_data, NoCutGetOnFly_data,
663 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
664 kFALSE, 1.5,0.00001,
665 kTRUE,0.000001 ,1,
666 kTRUE, 0.,0.5);
667 }else{
668 DrawCutGammaHistos( ESD_CutLikeSign_data, NoCutGetOnFly_data,
669 ESD_CutLikeSign_montecarlo, NoCutGetOnFly_montecarlo,
670 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
671 kFALSE, 1.5,0.00001,
672 kTRUE,0.000001 ,1,
673 kTRUE, 0.,0.5);
674 }
675 }
676
677 //******************* CutRefit
678 pad_c1->cd(3);
679 if(!Full){
680 if(MCfile == ""){
681 DrawCutGammaHisto( ESD_CutRefit_data, NoCutRefit_data,
682 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
683 kFALSE, 1.5,0.00001,
684 kTRUE,0.000001 ,1,
685 kTRUE, 0.,0.5);
686 }else{
687 DrawCutGammaHistos( ESD_CutRefit_data, NoCutRefit_data,
688 ESD_CutRefit_montecarlo, NoCutRefit_montecarlo,
689 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
690 kFALSE, 1.5,0.00001,
691 kTRUE,0.000001 ,1,
692 kTRUE, 0.,0.5);
693 }
694 }else{
695 if(MCfile == ""){
696 DrawCutGammaHisto( ESD_CutRefit_data, NoCutGetOnFly_data,
697 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
698 kFALSE, 1.5,0.00001,
699 kTRUE,0.000001 ,1,
700 kTRUE, 0.,0.5);
701 }else{
702 DrawCutGammaHistos( ESD_CutRefit_data, NoCutGetOnFly_data,
703 ESD_CutRefit_montecarlo, NoCutGetOnFly_montecarlo,
704 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
705 kFALSE, 1.5,0.00001,
706 kTRUE,0.000001 ,1,
707 kTRUE, 0.,0.5);
708 }
709 }
710
711 //************* CutKink
712 pad_c1->cd(4);
713 if(!Full){
714 if(MCfile == ""){
715 DrawCutGammaHisto( ESD_CutKink_data, NoCutKink_data,
716 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
717 kFALSE, 1.5,0.00001,
718 kTRUE,0.000001 ,1,
719 kTRUE, 0.,0.5);
720 }else{
721 DrawCutGammaHistos( ESD_CutKink_data, NoCutKink_data,
722 ESD_CutKink_montecarlo, NoCutKink_montecarlo,
723 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
724 kFALSE, 1.5,0.00001,
725 kTRUE,0.000001 ,1,
726 kTRUE, 0.,0.5);
727 }
728 }else{
729 if(MCfile == ""){
730 DrawCutGammaHisto( ESD_CutKink_data, NoCutGetOnFly_data,
731 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
732 kFALSE, 1.5,0.00001,
733 kTRUE,0.000001 ,1,
734 kTRUE, 0.,0.5);
735 }else{
736 DrawCutGammaHistos( ESD_CutKink_data, NoCutGetOnFly_data,
737 ESD_CutKink_montecarlo, NoCutGetOnFly_montecarlo,
738 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
739 kFALSE, 1.5,0.00001,
740 kTRUE,0.000001 ,1,
741 kTRUE, 0.,0.5);
742 }
743 }
744
745 c1->Update();
746
747 // ----------ElectronSigma Selection/ Pion rejection - Page 3-------------------------------------------------------------------
748
749 ps_characteristics->NewPage();
750
751 TCanvas * c3 = new TCanvas("c3","",700,1000); // gives the page size
752
753 pad_c3 = new TPad("pad_c3","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
754 pad_c3->SetFillColor(0);
755 pad_c3->GetFrame()->SetFillColor(0);
756 pad_c3->SetBorderMode(0);
757 pad_c3->Divide(1,2);
758 pad_c3->Draw();
759
760 if(MCfile != ""){title1->Draw();}
761 title0->Draw();
762
763 pad_c3->cd(1)->SetLogy(1);
764 pad_c3->cd(2)->SetLogy(1);
765
766 //****************** CutdEdxSigmaElectronLine
767 pad_c3->cd(1);
768 if(!Full){
769 if(MCfile == ""){
770 DrawCutGammaHisto( ESD_CutdEdxSigmaElectronLine_data, NoCutdEdxSigmaElectronLine_data,
771 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
772 kFALSE, 1.5,0.00001,
773 kTRUE,0.000001 ,1,
774 kTRUE, 0.,0.5);
775 }else{
776 DrawCutGammaHistos( ESD_CutdEdxSigmaElectronLine_data, NoCutdEdxSigmaElectronLine_data,
777 ESD_CutdEdxSigmaElectronLine_montecarlo, NoCutdEdxSigmaElectronLine_montecarlo,
778 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
779 kFALSE, 1.5,0.00001,
780 kTRUE,0.000001 ,1,
781 kTRUE, 0.,0.5);
782 }
783 }else{
784 if(MCfile == ""){
785 DrawCutGammaHisto( ESD_CutdEdxSigmaElectronLine_data, NoCutGetOnFly_data,
786 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
787 kFALSE, 1.5,0.00001,
788 kTRUE,0.000001 ,1,
789 kTRUE, 0.,0.5);
790 }else{
791 DrawCutGammaHistos( ESD_CutdEdxSigmaElectronLine_data, NoCutGetOnFly_data,
792 ESD_CutdEdxSigmaElectronLine_montecarlo, NoCutGetOnFly_montecarlo,
793 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
794 kFALSE, 1.5,0.00001,
795 kTRUE,0.000001 ,1,
796 kTRUE, 0.,0.5);
797 }
798 }
799
800 //*************** CutdEdxSigmaPionLine
801 pad_c3->cd(2);
802 if(!Full){
803 if(MCfile == ""){
804 DrawCutGammaHisto( ESD_CutdEdxSigmaPionLine_data, NoCutdEdxSigmaPionLine_data,
805 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
806 kFALSE, 1.5,0.00001,
807 kTRUE,0.000001 ,1,
808 kTRUE, 0.,0.5);
809 }else{
810 DrawCutGammaHistos( ESD_CutdEdxSigmaPionLine_data, NoCutdEdxSigmaPionLine_data,
811 ESD_CutdEdxSigmaPionLine_montecarlo, NoCutdEdxSigmaPionLine_montecarlo,
812 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
813 kFALSE, 1.5,0.00001,
814 kTRUE,0.000001 ,1,
815 kTRUE, 0.,0.5);
816 }
817 }else{
818 if(MCfile == ""){
819 DrawCutGammaHisto( ESD_CutdEdxSigmaPionLine_data, NoCutGetOnFly_data,
820 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
821 kFALSE, 1.5,0.00001,
822 kTRUE,0.000001 ,1,
823 kTRUE, 0.,0.5);
824 }else{
825 DrawCutGammaHistos( ESD_CutdEdxSigmaPionLine_data, NoCutGetOnFly_data,
826 ESD_CutdEdxSigmaPionLine_montecarlo, NoCutGetOnFly_montecarlo,
827 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
828 kFALSE, 1.5,0.00001,
829 kTRUE,0.000001 ,1,
830 kTRUE, 0.,0.5);
831 }
832 }
833
834 c3->Update();
835
836 // -------Selection in converted gammas - Page 4--------------------------------------------------------
837
838 ps_characteristics->NewPage();
839
840 TCanvas * c4 = new TCanvas("c4","",700,1000); // gives the page size
841 pad_c4 = new TPad("pad_c4","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
842 pad_c4->SetFillColor(0);
843 pad_c4->GetFrame()->SetFillColor(0);
844 pad_c4->SetBorderMode(0);
845 pad_c4->Divide(2,3);
846 pad_c4->Draw();
847
848 title0->Draw();
849 if(MCfile != ""){title1->Draw();}
850
851 pad_c4->cd(1)->SetLogy(1);
852 pad_c4->cd(2)->SetLogy(1);
853 pad_c4->cd(3)->SetLogy(1);
854 pad_c4->cd(4)->SetLogy(1);
855 pad_c4->cd(5)->SetLogy(1);
856 pad_c4->cd(6)->SetLogy(1);
857
858 //***************** CutNContributors
859 pad_c4->cd(1);
860 if(!Full){
861 if(MCfile == ""){
862 DrawCutGammaHisto( ESD_CutNContributors_data, NoCutNContributors_data,
863 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
864 kFALSE, 1.5,0.00001,
865 kTRUE,0.000001 ,1,
866 kTRUE, 0.,0.5);
867 }else{
868 DrawCutGammaHistos( ESD_CutNContributors_data, NoCutNContributors_data,
869 ESD_CutNContributors_montecarlo, NoCutNContributors_montecarlo,
870 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
871 kFALSE, 1.5,0.00001,
872 kTRUE,0.000001 ,1,
873 kTRUE, 0.,0.5);
874 }
875 }else{
876 if(MCfile == ""){
877 DrawCutGammaHisto( ESD_CutNContributors_data, NoCutGetOnFly_data,
878 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
879 kFALSE, 1.5,0.00001,
880 kTRUE,0.000001 ,1,
881 kTRUE, 0.,0.5);
882 }else{
883 DrawCutGammaHistos( ESD_CutNContributors_data, NoCutGetOnFly_data,
884 ESD_CutNContributors_montecarlo, NoCutGetOnFly_montecarlo,
885 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
886 kFALSE, 1.5,0.00001,
887 kTRUE,0.000001 ,1,
888 kTRUE, 0.,0.5);
889 }
890 }
891
892 //***************** CutPIDProb
893 pad_c4->cd(2);
894 if(!Full){
895 if(MCfile == ""){
896 DrawCutGammaHisto( ESD_CutPIDProb_data, NoCutPIDProb_data,
897 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
898 kFALSE, 1.5,0.00001,
899 kTRUE,0.000001 ,1,
900 kTRUE, 0.,0.5);
901 }else{
902 DrawCutGammaHistos( ESD_CutPIDProb_data, NoCutPIDProb_data,
903 ESD_CutPIDProb_montecarlo, NoCutPIDProb_montecarlo,
904 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
905 kFALSE, 1.5,0.00001,
906 kTRUE,0.000001 ,1,
907 kTRUE, 0.,0.5);
908 }
909 }else{
910 if(MCfile == ""){
911 DrawCutGammaHisto( ESD_CutPIDProb_data, NoCutGetOnFly_data,
912 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
913 kFALSE, 1.5,0.00001,
914 kTRUE,0.000001 ,1,
915 kTRUE, 0.,0.5);
916 }else{
917 DrawCutGammaHistos( ESD_CutPIDProb_data, NoCutGetOnFly_data,
918 ESD_CutPIDProb_montecarlo, NoCutGetOnFly_montecarlo,
919 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
920 kFALSE, 1.5,0.00001,
921 kTRUE,0.000001 ,1,
922 kTRUE, 0.,0.5);
923 }
924 }
925
926 //*************** CutR
927 pad_c4->cd(3);
928 if(!Full){
929 if(MCfile == ""){
930 DrawCutGammaHisto( ESD_CutR_data, NoCutR_data,
931 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
932 kFALSE, 1.5,0.00001,
933 kTRUE,0.000001 ,1,
934 kTRUE, 0.,0.5);
935 }else{
936 DrawCutGammaHistos( ESD_CutR_data, NoCutR_data,
937 ESD_CutR_montecarlo, NoCutR_montecarlo,
938 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
939 kFALSE, 1.5,0.00001,
940 kTRUE,0.000001 ,1,
941 kTRUE, 0.,0.5);
942 }
943 }else{
944 if(MCfile == ""){
945 DrawCutGammaHisto( ESD_CutR_data, NoCutGetOnFly_data,
946 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
947 kFALSE, 1.5,0.00001,
948 kTRUE,0.000001 ,1,
949 kTRUE, 0.,0.5);
950 }else{
951 DrawCutGammaHistos( ESD_CutR_data, NoCutGetOnFly_data,
952 ESD_CutR_montecarlo, NoCutGetOnFly_montecarlo,
953 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
954 kFALSE, 1.5,0.00001,
955 kTRUE,0.000001 ,1,
956 kTRUE, 0.,0.5);
957 }
958 }
959
960 //****************** CutLine
961 pad_c4->cd(4);
962 if(!Full){
963 if(MCfile == ""){
964 DrawCutGammaHisto( ESD_CutLine_data, NoCutLine_data,
965 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
966 kFALSE, 1.5,0.00001,
967 kTRUE,0.000001 ,1,
968 kTRUE, 0.,0.5);
969 }else{
970 DrawCutGammaHistos( ESD_CutLine_data, NoCutLine_data,
971 ESD_CutLine_montecarlo, NoCutLine_montecarlo,
972 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
973 kFALSE, 1.5,0.00001,
974 kTRUE,0.000001 ,1,
975 kTRUE, 0.,0.5);
976 }
977 }else{
978 if(MCfile == ""){
979 DrawCutGammaHisto( ESD_CutLine_data, NoCutGetOnFly_data,
980 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
981 kFALSE, 1.5,0.00001,
982 kTRUE,0.000001 ,1,
983 kTRUE, 0.,0.5);
984 }else{
985 DrawCutGammaHistos( ESD_CutLine_data, NoCutGetOnFly_data,
986 ESD_CutLine_montecarlo, NoCutGetOnFly_montecarlo,
987 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
988 kFALSE, 1.5,0.00001,
989 kTRUE,0.000001 ,1,
990 kTRUE, 0.,0.5);
991 }
992 }
993
994 //*************** CutZ
995 pad_c4->cd(5);
996 if(!Full){
997 if(MCfile == ""){
998 DrawCutGammaHisto( ESD_CutZ_data, NoCutZ_data,
999 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1000 kFALSE, 1.5,0.00001,
1001 kTRUE,0.000001 ,1,
1002 kTRUE, 0.,0.5);
1003 }else{
1004 DrawCutGammaHistos( ESD_CutZ_data, NoCutZ_data,
1005 ESD_CutZ_montecarlo, NoCutZ_montecarlo,
1006 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1007 kFALSE, 1.5,0.00001,
1008 kTRUE,0.000001 ,1,
1009 kTRUE, 0.,0.5);
1010 }
1011 }else{
1012 if(MCfile == ""){
1013 DrawCutGammaHisto( ESD_CutZ_data, NoCutGetOnFly_data,
1014 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1015 kFALSE, 1.5,0.00001,
1016 kTRUE,0.000001 ,1,
1017 kTRUE, 0.,0.5);
1018 }else{
1019 DrawCutGammaHistos( ESD_CutZ_data, NoCutGetOnFly_data,
1020 ESD_CutZ_montecarlo, NoCutGetOnFly_montecarlo,
1021 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1022 kFALSE, 1.5,0.00001,
1023 kTRUE,0.000001 ,1,
1024 kTRUE, 0.,0.5);
1025 }
1026 }
1027
1028
1029 //******************* CutMinNClsTPC
1030 pad_c4->cd(6);
1031 if(!Full){
1032 if(MCfile == ""){
1033 DrawCutGammaHisto( ESD_CutMinNClsTPC_data, NoCutMinNClsTPC_data,
1034 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1035 kFALSE, 1.5,0.00001,
1036 kTRUE,0.000001 ,1,
1037 kTRUE, 0.,0.5);
1038 }else{
1039 DrawCutGammaHistos( ESD_CutMinNClsTPC_data, NoCutMinNClsTPC_data,
1040 ESD_CutMinNClsTPC_montecarlo, NoCutMinNClsTPC_montecarlo,
1041 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1042 kFALSE, 1.5,0.00001,
1043 kTRUE,0.000001 ,1,
1044 kTRUE, 0.,0.5);
1045 }
1046 }else{
1047 if(MCfile == ""){
1048 DrawCutGammaHisto( ESD_CutMinNClsTPC_data, NoCutGetOnFly_data,
1049 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1050 kFALSE, 1.5,0.00001,
1051 kTRUE,0.000001 ,1,
1052 kTRUE, 0.,0.5);
1053 }else{
1054 DrawCutGammaHistos( ESD_CutMinNClsTPC_data, NoCutGetOnFly_data,
1055 ESD_CutMinNClsTPC_montecarlo, NoCutGetOnFly_montecarlo,
1056 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1057 kFALSE, 1.5,0.00001,
1058 kTRUE,0.000001 ,1,
1059 kTRUE, 0.,0.5);
1060 }
1061 }
1062
1063 c4->Update();
1064
1065 // -----------------------------------------------------------------------------
1066
1067 ps_characteristics->NewPage();
1068
1069 TCanvas * c5 = new TCanvas("c5","",700,1000); // gives the page size
1070 pad_c5 = new TPad("pad_c5","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
1071 pad_c5->SetFillColor(0);
1072 pad_c5->GetFrame()->SetFillColor(0);
1073 pad_c5->SetBorderMode(0);
1074 pad_c5->Divide(2,3);
1075 pad_c5->Draw();
1076
1077 title0->Draw();
1078 if(MCfile != ""){title1->Draw();}
1079
1080 pad_c5->cd(1)->SetLogy(1);
1081 pad_c5->cd(2)->SetLogy(1);
1082 pad_c5->cd(3)->SetLogy(1);
1083 pad_c5->cd(4)->SetLogy(1);
1084 pad_c5->cd(5)->SetLogy(1);
1085 pad_c5->cd(6)->SetLogy(0);
1086
1087 //******************* CutSinglePt
1088 pad_c5->cd(1);
1089 if(!Full){
1090 if(MCfile == ""){
1091 DrawCutGammaHisto( ESD_CutSinglePt_data, NoCutSinglePt_data,
1092 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1093 kFALSE, 1.5,0.00001,
1094 kTRUE,0.000001 ,1,
1095 kTRUE, 0.,0.5);
1096 }else{
1097 DrawCutGammaHistos( ESD_CutSinglePt_data, NoCutSinglePt_data,
1098 ESD_CutSinglePt_montecarlo, NoCutSinglePt_montecarlo,
1099 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1100 kFALSE, 1.5,0.00001,
1101 kTRUE,0.000001 ,1,
1102 kTRUE, 0.,0.5);
1103 }
1104 }else{
1105 if(MCfile == ""){
1106 DrawCutGammaHisto( ESD_CutSinglePt_data, NoCutGetOnFly_data,
1107 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1108 kFALSE, 1.5,0.00001,
1109 kTRUE,0.000001 ,1,
1110 kTRUE, 0.,0.5);
1111 }else{
1112 DrawCutGammaHistos( ESD_CutSinglePt_data, NoCutGetOnFly_data,
1113 ESD_CutSinglePt_montecarlo, NoCutGetOnFly_montecarlo,
1114 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1115 kFALSE, 1.5,0.00001,
1116 kTRUE,0.000001 ,1,
1117 kTRUE, 0.,0.5);
1118 }
1119 }
1120
1121 //******************* CutNDF
1122 pad_c5->cd(2);
1123 if(!Full){
1124 if(MCfile == ""){
1125 DrawCutGammaHisto( ESD_CutNDF_data, NoCutNDF_data,
1126 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1127 kFALSE, 1.5,0.00001,
1128 kTRUE,0.000001 ,1,
1129 kTRUE, 0.,0.5);
1130 }else{
1131 DrawCutGammaHistos( ESD_CutNDF_data, NoCutNDF_data,
1132 ESD_CutNDF_montecarlo, NoCutNDF_montecarlo,
1133 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1134 kFALSE, 1.5,0.00001,
1135 kTRUE,0.000001 ,1,
1136 kTRUE, 0.,0.5);
1137 }
1138 }else{
1139 if(MCfile == ""){
1140 DrawCutGammaHisto( ESD_CutNDF_data, NoCutGetOnFly_data,
1141 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1142 kFALSE, 1.5,0.00001,
1143 kTRUE,0.000001 ,1,
1144 kTRUE, 0.,0.5);
1145 }else{
1146 DrawCutGammaHistos( ESD_CutNDF_data, NoCutGetOnFly_data,
1147 ESD_CutNDF_montecarlo, NoCutGetOnFly_montecarlo,
1148 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1149 kFALSE, 1.5,0.00001,
1150 kTRUE,0.000001 ,1,
1151 kTRUE, 0.,0.5);
1152 }
1153 }
1154
1155
1156
1157 //***************** CutChi2
1158 pad_c5->cd(3);
1159 if(!Full){
1160 if(MCfile == ""){
1161 DrawCutGammaHisto( ESD_CutChi2_data, NoCutChi2_data,
1162 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1163 kFALSE, 1.5,0.00001,
1164 kTRUE,0.000001 ,1,
1165 kTRUE, 0.,0.5);
1166 }else{
1167 DrawCutGammaHistos( ESD_CutChi2_data, NoCutChi2_data,
1168 ESD_CutChi2_montecarlo, NoCutChi2_montecarlo,
1169 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1170 kFALSE, 1.5,0.00001,
1171 kTRUE,0.000001 ,1,
1172 kTRUE, 0.,0.5);
1173 }
1174 }else{
1175 if(MCfile == ""){
1176 DrawCutGammaHisto( ESD_CutChi2_data, NoCutGetOnFly_data,
1177 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1178 kFALSE, 1.5,0.00001,
1179 kTRUE,0.000001 ,1,
1180 kTRUE, 0.,0.5);
1181 }else{
1182 DrawCutGammaHistos( ESD_CutChi2_data, NoCutGetOnFly_data,
1183 ESD_CutChi2_montecarlo, NoCutGetOnFly_montecarlo,
1184 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1185 kFALSE, 1.5,0.00001,
1186 kTRUE,0.000001 ,1,
1187 kTRUE, 0.,0.5);
1188 }
1189 }
1190
1191 //**************** CutEta
1192 pad_c5->cd(4);
1193 if(!Full){
1194 if(MCfile == ""){
1195 DrawCutGammaHisto( ESD_CutEta_data, NoCutEta_data,
1196 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1197 kFALSE, 1.5,0.00001,
1198 kTRUE,0.000001 ,1,
1199 kTRUE, 0.,0.5);
1200 }else{
1201 DrawCutGammaHistos( ESD_CutEta_data, NoCutEta_data,
1202 ESD_CutEta_montecarlo, NoCutEta_montecarlo,
1203 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1204 kFALSE, 1.5,0.00001,
1205 kTRUE,0.000001 ,1,
1206 kTRUE, 0.,0.5);
1207 }
1208 }else{
1209 if(MCfile == ""){
1210 DrawCutGammaHisto( ESD_CutEta_data, NoCutGetOnFly_data,
1211 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1212 kFALSE, 1.5,0.00001,
1213 kTRUE,0.000001 ,1,
1214 kTRUE, 0.,0.5);
1215 }else{
1216 DrawCutGammaHistos( ESD_CutEta_data, NoCutGetOnFly_data,
1217 ESD_CutNDF_montecarlo, NoCutGetOnFly_montecarlo,
1218 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1219 kFALSE, 1.5,0.00001,
1220 kTRUE,0.000001 ,1,
1221 kTRUE, 0.,0.5);
1222 }
1223 }
1224
1225 //********************** CutPt
1226 pad_c5->cd(5);
1227 if(!Full){
1228 if(MCfile == ""){
1229 DrawCutGammaHisto( ESD_CutPt_data, NoCutPt_data,
1230 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1231 kFALSE, 1.5,0.00001,
1232 kTRUE,0.000001 ,1,
1233 kTRUE, 0.,0.5);
1234 }else{
1235 DrawCutGammaHistos( ESD_CutPt_data, NoCutPt_data,
1236 ESD_CutPt_montecarlo, NoCutPt_montecarlo,
1237 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1238 kFALSE, 1.5,0.00001,
1239 kTRUE,0.000001 ,1,
1240 kTRUE, 0.,0.5);
1241 }
1242 }else{
1243 if(MCfile == ""){
1244 DrawCutGammaHisto( ESD_CutPt_data, NoCutGetOnFly_data,
1245 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1246 kFALSE, 1.5,0.00001,
1247 kTRUE,0.000001 ,1,
1248 kTRUE, 0.,0.5);
1249 }else{
1250 DrawCutGammaHistos( ESD_CutPt_data, NoCutGetOnFly_data,
1251 ESD_CutPt_montecarlo, NoCutGetOnFly_montecarlo,
1252 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1253 kFALSE, 1.5,0.00001,
1254 kTRUE,0.000001 ,1,
1255 kTRUE, 0.,0.5);
1256 }
1257 }
1258
1259 c5->Update();
1260
1261
1262
1263
1264
1265 // Rescaling plots
1266 ESD_CutLikeSign_data->Scale(1./normFac_data);
1267 ESD_CutRefit_data->Scale(1./normFac_data);
1268 ESD_CutKink_data->Scale(1./normFac_data);
1269 ESD_CutdEdxSigmaElectronLine_data->Scale(1./normFac_data);
1270 ESD_CutdEdxSigmaPionLine_data->Scale(1./normFac_data);
1271 ESD_CutGetOnFly_data->Scale(1./normFac_data);
1272 ESD_CutNContributors_data->Scale(1./normFac_data);
1273 ESD_CutPIDProb_data->Scale(1./normFac_data);
1274 ESD_CutR_data->Scale(1./normFac_data);
1275 ESD_CutLine_data->Scale(1./normFac_data);
1276 ESD_CutZ_data->Scale(1./normFac_data);
1277 ESD_CutSinglePt_data->Scale(1./normFac_data);
1278 ESD_CutMinNClsTPC_data->Scale(1./normFac_data);
1279 ESD_CutNDF_data->Scale(1./normFac_data);
1280 ESD_CutChi2_data->Scale(1./normFac_data);
1281 ESD_CutEta_data->Scale(1./normFac_data);
1282 ESD_CutPt_data->Scale(1./normFac_data);
1283 ESD_ConvGamma_Mass_data->Scale(1./normFac_data);
1284 NoCutPt_data->Scale(1./normFac_data);
1285 NoCutEta_data->Scale(1./normFac_data);
1286 NoCutChi2_data->Scale(1./normFac_data);
1287 NoCutNDF_data->Scale(1./normFac_data);
1288 NoCutZ_data->Scale(1./normFac_data);
1289 NoCutSinglePt_data->Scale(1./normFac_data);
1290 NoCutMinNClsTPC_data->Scale(1./normFac_data);
1291 NoCutLine_data->Scale(1./normFac_data);
1292 NoCutR_data->Scale(1./normFac_data);;
1293 NoCutPIDProb_data->Scale(1./normFac_data);
1294 NoCutNContributors_data->Scale(1./normFac_data);
1295 NoCutGetOnFly_data->Scale(1./normFac_data);
1296 NoCutdEdxSigmaPionLine_data->Scale(1./normFac_data);
1297 NoCutdEdxSigmaElectronLine_data->Scale(1./normFac_data);
1298 NoCutKink_data->Scale(1./normFac_data);
1299 NoCutRefit_data->Scale(1./normFac_data);
1300 NoCutLikeSign_data->Scale(1./normFac_data);
1301 ESD_AllV0_data->Scale(1./normFac_data);
1302 Final_data->Scale(1./normFac_data);
1303 if(MCfile != ""){
1304 ESD_CutLikeSign_montecarlo->Scale(1./normFac_montecarlo);
1305 ESD_CutRefit_montecarlo->Scale(1./normFac_montecarlo);
1306 ESD_CutKink_montecarlo->Scale(1./normFac_montecarlo);
1307 ESD_CutdEdxSigmaElectronLine_montecarlo->Scale(1./normFac_montecarlo);
1308 ESD_CutdEdxSigmaPionLine_montecarlo->Scale(1./normFac_montecarlo);
1309 ESD_CutGetOnFly_montecarlo->Scale(1./normFac_montecarlo);
1310 ESD_CutNContributors_montecarlo->Scale(1./normFac_montecarlo);
1311 ESD_CutPIDProb_montecarlo->Scale(1./normFac_montecarlo);
1312 ESD_CutR_montecarlo->Scale(1./normFac_montecarlo);
1313 ESD_CutLine_montecarlo->Scale(1./normFac_montecarlo);
1314 ESD_CutZ_montecarlo->Scale(1./normFac_montecarlo);
1315 ESD_CutSinglePt_montecarlo->Scale(1./normFac_montecarlo);
1316 ESD_CutMinNClsTPC_montecarlo->Scale(1./normFac_montecarlo);
1317 ESD_CutNDF_montecarlo->Scale(1./normFac_montecarlo);
1318 ESD_CutChi2_montecarlo->Scale(1./normFac_montecarlo);
1319 ESD_CutEta_montecarlo->Scale(1./normFac_montecarlo);
1320 ESD_CutPt_montecarlo->Scale(1./normFac_montecarlo);
1321 ESD_ConvGamma_Mass_montecarlo->Scale(1./normFac_montecarlo);
1322 NoCutPt_montecarlo->Scale(1./normFac_montecarlo);
1323 NoCutEta_montecarlo->Scale(1./normFac_montecarlo);
1324 NoCutChi2_montecarlo->Scale(1./normFac_montecarlo);
1325 NoCutNDF_montecarlo->Scale(1./normFac_montecarlo);
1326 NoCutZ_montecarlo->Scale(1./normFac_montecarlo);
1327 NoCutSinglePt_montecarlo->Scale(1./normFac_montecarlo);
1328 NoCutMinNClsTPC_montecarlo->Scale(1./normFac_montecarlo);
1329 NoCutLine_montecarlo->Scale(1./normFac_montecarlo);
1330 NoCutR_montecarlo->Scale(1./normFac_montecarlo);;
1331 NoCutPIDProb_montecarlo->Scale(1./normFac_montecarlo);
1332 NoCutNContributors_montecarlo->Scale(1./normFac_montecarlo);
1333 NoCutGetOnFly_montecarlo->Scale(1./normFac_montecarlo);
1334 NoCutdEdxSigmaPionLine_montecarlo->Scale(1./normFac_montecarlo);
1335 NoCutdEdxSigmaElectronLine_montecarlo->Scale(1./normFac_montecarlo);
1336 NoCutKink_montecarlo->Scale(1./normFac_montecarlo);
1337 NoCutRefit_montecarlo->Scale(1./normFac_montecarlo);
1338 NoCutLikeSign_montecarlo->Scale(1./normFac_montecarlo);
1339 ESD_AllV0_montecarlo->Scale(1./normFac_montecarlo);
1340 Final_montecarlo->Scale(1./normFac_montecarlo);
1341 }
1342
1343 ps_characteristics->NewPage() ;
1344
1345 TCanvas * c6 = new TCanvas("c6","",700,1000); // gives the page size
1346 pad_c6 = new TPad("pad_c6","",0.05,0.05,0.95,0.85,0); // gives the size of the histo areas
1347 pad_c6->SetFillColor(0);
1348 pad_c6->GetFrame()->SetFillColor(0);
1349 pad_c6->SetBorderMode(0);
1350 pad_c6->Divide(2,2);
1351 pad_c6->Draw();
1352
1353 title0->Draw();
1354 if(MCfile != ""){title1->Draw();}
1355
1356 pad_c6->cd(1)->SetLogy(1);
1357 //******************** Comparison of Ratio of Cuts
1358 pad_c6->cd(1) ;
1359 const Int_t nx = 17;
1360 char *cuts[nx] = {"V0Finder","LikeSign", "Refit", "Kink", "dEdxElectronLine", "dEdxPionLine" , "NContributors", "PIDProb", "R", "Line", "Z", "Min", "SinglePt","NDF", "Chi2", "Eta", "Pt"};
1361 leg2 = new TLegend(0.6,0.82,0.9,0.9);
1362 leg2->AddEntry(ESD_CutLikeSign_data,("Data"),"l");
1363 if(MCfile != ""){
1364 leg2->AddEntry(ESD_CutLikeSign_montecarlo,("MC"),"l");}
1365 leg2->SetFillColor(0);
1366
1367 Double_t maxRange = ESD_CutdEdxSigmaElectronLine_data->Integral()/NumberV0_data *100;
1368 if(MCfile != ""){
1369 if(maxRange < ESD_CutdEdxSigmaElectronLine_montecarlo->Integral()/NumberV0_montecarlo *100){
1370 maxRange = ESD_CutdEdxSigmaElectronLine_montecarlo->Integral()/NumberV0_montecarlo *100;
1371 }
1372 }
1373
1374 Output_data = new TFile("Output_data.root","RECREATE");
1375
1376 TH1F *ComCuts_data = new TH1F("ComCuts_data","Comparison of Cuts",3,0,3);
1377 ComCuts_data->SetStats(0);
1378 ComCuts_data->SetYTitle("ratio Cut/V0") ;
1379 ComCuts_data->SetBit(TH1::kCanRebin);
1380 ComCuts_data->GetYaxis()->SetRangeUser(0.001, 5 *maxRange);
1381 ComCuts_data->GetYaxis()->SetTitleOffset(1.35);
1382 ComCuts_data->Fill(cuts[0],ESD_CutGetOnFly_data->Integral()/NumberV0_data *100);
1383 ComCuts_data->Fill(cuts[1],ESD_CutLikeSign_data->Integral()/NumberV0_data *100);
1384 ComCuts_data->Fill(cuts[2],ESD_CutRefit_data->Integral()/NumberV0_data *100);
1385 ComCuts_data->Fill(cuts[3],ESD_CutKink_data->Integral()/NumberV0_data *100);
1386 ComCuts_data->Fill(cuts[4],ESD_CutdEdxSigmaElectronLine_data->Integral()/NumberV0_data *100);
1387 ComCuts_data->Fill(cuts[5],ESD_CutdEdxSigmaPionLine_data->Integral()/NumberV0_data *100);
1388 ComCuts_data->Fill(cuts[6],ESD_CutNContributors_data->Integral()/NumberV0_data *100);
1389 ComCuts_data->Fill(cuts[7],ESD_CutPIDProb_data->Integral()/NumberV0_data *100);
1390 ComCuts_data->Fill(cuts[8],ESD_CutR_data->Integral()/NumberV0_data *100);
1391 ComCuts_data->Fill(cuts[9],ESD_CutLine_data->Integral()/NumberV0_data *100);
1392 ComCuts_data->Fill(cuts[10],ESD_CutZ_data->Integral()/NumberV0_data *100);
1393 ComCuts_data->Fill(cuts[11],ESD_CutMinNClsTPC_data->Integral()/NumberV0_data *100);
1394 ComCuts_data->Fill(cuts[12],ESD_CutSinglePt_data->Integral()/NumberV0_data *100);
1395 ComCuts_data->Fill(cuts[13],ESD_CutNDF_data->Integral()/NumberV0_data *100);
1396 ComCuts_data->Fill(cuts[14],ESD_CutChi2_data->Integral()/NumberV0_data *100);
1397 ComCuts_data->Fill(cuts[15],ESD_CutEta_data->Integral()/NumberV0_data *100);
1398 ComCuts_data->Fill(cuts[16],ESD_CutPt_data->Integral()/NumberV0_data *100);
1399 ComCuts_data->LabelsDeflate();
1400 ComCuts_data->Draw("e,hist");
1401 ComCuts_data->Write();
1402 Output_data->Write();
1403
1404 if(MCfile != ""){
1405 Output_montecarlo = new TFile("Output_montecarlo.root","RECREATE");
1406 TH1F *ComCuts_montecarlo = new TH1F("ComCuts_montecarlo","Comparison of Cuts",3,0,3);
1407 ComCuts_montecarlo->SetStats(0);
1408 ComCuts_montecarlo->SetBit(TH1::kCanRebin);
1409 ComCuts_montecarlo->SetLineColor(2);
1410 ComCuts_montecarlo->Fill(cuts[0],ESD_CutGetOnFly_montecarlo->Integral()/NumberV0_montecarlo *100);
1411 ComCuts_montecarlo->Fill(cuts[1],ESD_CutLikeSign_montecarlo->Integral()/NumberV0_montecarlo *100);
1412 ComCuts_montecarlo->Fill(cuts[2],ESD_CutRefit_montecarlo->Integral()/NumberV0_montecarlo *100);
1413 ComCuts_montecarlo->Fill(cuts[3],ESD_CutKink_montecarlo->Integral()/NumberV0_montecarlo *100);
1414 ComCuts_montecarlo->Fill(cuts[4],ESD_CutdEdxSigmaElectronLine_montecarlo->Integral()/NumberV0_montecarlo *100);
1415 ComCuts_montecarlo->Fill(cuts[5],ESD_CutdEdxSigmaPionLine_montecarlo->Integral()/NumberV0_montecarlo *100);
1416 ComCuts_montecarlo->Fill(cuts[6],ESD_CutNContributors_montecarlo->Integral()/NumberV0_montecarlo *100);
1417 ComCuts_montecarlo->Fill(cuts[7],ESD_CutPIDProb_montecarlo->Integral()/NumberV0_montecarlo *100);
1418 ComCuts_montecarlo->Fill(cuts[8],ESD_CutR_montecarlo->Integral()/NumberV0_montecarlo *100);
1419 ComCuts_montecarlo->Fill(cuts[9],ESD_CutLine_montecarlo->Integral()/NumberV0_montecarlo *100);
1420 ComCuts_montecarlo->Fill(cuts[10],ESD_CutZ_montecarlo->Integral()/NumberV0_montecarlo *100);
1421 ComCuts_montecarlo->Fill(cuts[11],ESD_CutMinNClsTPC_montecarlo->Integral()/NumberV0_montecarlo *100);
1422 ComCuts_montecarlo->Fill(cuts[12],ESD_CutSinglePt_montecarlo->Integral()/NumberV0_montecarlo *100);
1423 ComCuts_montecarlo->Fill(cuts[13],ESD_CutNDF_montecarlo->Integral()/NumberV0_montecarlo *100);
1424 ComCuts_montecarlo->Fill(cuts[14],ESD_CutChi2_montecarlo->Integral()/NumberV0_montecarlo *100);
1425 ComCuts_montecarlo->Fill(cuts[15],ESD_CutEta_montecarlo->Integral()/NumberV0_montecarlo *100);
1426 ComCuts_montecarlo->Fill(cuts[16],ESD_CutPt_montecarlo->Integral()/NumberV0_montecarlo *100);
1427 ComCuts_montecarlo->LabelsDeflate();
1428 ComCuts_montecarlo->Draw("e,hist,same");
1429 ComCuts_montecarlo->Write();
1430 Output_montecarlo->Write();
1431 }
1432 leg2->Draw();
1433
1434 pad_c6->cd(2)->SetLogy(0);
1435
1436 //************************* Remaining V0 candidates after Cuts
1437 pad_c6->cd(2) ;
1438 const Int_t nx = 18;
1439 char *cuts2[nx] = {"No Cut", "V0Finder", "LikeSign", "Refit", "Kink", "dEdxElectronLine", "dEdxPionLine", "NContributors", "PIDProb", "R", "Line", "Z","MinClsTPC", "SinglePt","NDF", "Chi2", "Eta", "Pt"};
1440 Double_t maxRange = NoCutLikeSign_data->Integral()/NumberV0_data*100;
1441 if(MCfile != ""){
1442 if(maxRange < NoCutLikeSign_montecarlo->Integral()/NumberV0_data*100){
1443 maxRange = NoCutLikeSign_montecarlo->Integral()/NumberV0_data*100;
1444 }
1445 }
1446
1447 Output_data = new TFile("Output_data.root","UPDATE");
1448
1449 TH1F *ComCuts2_data = new TH1F("ComCuts2_data","Remaining V0 candidates after Cuts ",3,0,3);
1450 ComCuts2_data->SetYTitle("ratio Cut/V0");
1451 ComCuts2_data->SetStats(0);
1452 ComCuts2_data->SetBit(TH1::kCanRebin);
1453 ComCuts2_data->GetYaxis()->SetRangeUser(0.1, 110);
1454 ComCuts2_data->GetYaxis()->SetTitleOffset(1.35);
1455 ComCuts2_data->Fill(cuts2[0],NoCutGetOnFly_data->Integral()/NumberV0_data *100);
1456 cout << "Number NoGetOnFly " << NoCutGetOnFly_data->Integral()/NumberV0_data *100 << endl;
1457 ComCuts2_data->Fill(cuts2[1],NoCutLikeSign_data->Integral()/NumberV0_data *100);
1458 ComCuts2_data->Fill(cuts2[2],NoCutRefit_data->Integral()/NumberV0_data *100);
1459 ComCuts2_data->Fill(cuts2[3],NoCutKink_data->Integral()/NumberV0_data *100);
1460 ComCuts2_data->Fill(cuts2[4],NoCutdEdxSigmaElectronLine_data->Integral()/NumberV0_data *100);
1461 ComCuts2_data->Fill(cuts2[5],NoCutdEdxSigmaPionLine_data->Integral()/NumberV0_data *100);
1462 ComCuts2_data->Fill(cuts2[6],NoCutNContributors_data->Integral()/NumberV0_data *100);
1463 ComCuts2_data->Fill(cuts2[7],NoCutPIDProb_data->Integral()/NumberV0_data *100);
1464 ComCuts2_data->Fill(cuts2[8],NoCutR_data->Integral()/NumberV0_data *100);
1465 ComCuts2_data->Fill(cuts2[9],NoCutLine_data->Integral()/NumberV0_data *100);
1466 ComCuts2_data->Fill(cuts2[10],NoCutZ_data->Integral()/NumberV0_data *100);
1467 ComCuts2_data->Fill(cuts2[11],NoCutMinNClsTPC_data->Integral()/NumberV0_data *100);
1468 ComCuts2_data->Fill(cuts2[12],NoCutSinglePt_data->Integral()/NumberV0_data *100);
1469 ComCuts2_data->Fill(cuts2[13],NoCutNDF_data->Integral()/NumberV0_data *100);
1470 ComCuts2_data->Fill(cuts2[14],NoCutChi2_data->Integral()/NumberV0_data *100);
1471 ComCuts2_data->Fill(cuts2[15],NoCutEta_data->Integral()/NumberV0_data *100);
1472 ComCuts2_data->Fill(cuts2[16],NoCutPt_data->Integral()/NumberV0_data *100);
1473 ComCuts2_data->Fill(cuts2[17],Final_data->Integral()/NumberV0_data *100);
1474 ComCuts2_data->Fill("RealLeftOver",ESD_ConvGamma_Mass_data->Integral()/NumberV0_data *100);
1475 if(MC2){ ComCuts2_data->Fill("TruePhotons",0);}
1476 if(MC1){ ComCuts2_data->Fill("TruePhotons",TRUE_Conversion_R_data->Integral()/NumberV0_data *100);}
1477 ComCuts2_data->LabelsDeflate();
1478 ComCuts2_data->Draw("e,hist");
1479
1480 ComCuts2_data->Write();
1481 Output_data->Write();
1482
1483 if(MCfile != ""){
1484 Output_montecarlo = new TFile("Output_montecarlo.root","UPDATE");
1485 TH1F *ComCuts2_montecarlo = new TH1F("ComCuts2_montecarlo","Remaining V0 candidates after Cuts",3,0,3);
1486 ComCuts2_montecarlo->SetStats(0);
1487 ComCuts2_montecarlo->SetBit(TH1::kCanRebin);
1488 ComCuts2_montecarlo->SetLineColor(2);
1489 ComCuts2_montecarlo->Fill(cuts2[0],NoCutGetOnFly_montecarlo->Integral()/NumberV0_montecarlo *100);
1490 ComCuts2_montecarlo->Fill(cuts2[1],NoCutLikeSign_montecarlo->Integral()/NumberV0_montecarlo *100);
1491 ComCuts2_montecarlo->Fill(cuts2[2],NoCutRefit_montecarlo->Integral()/NumberV0_montecarlo *100);
1492 ComCuts2_montecarlo->Fill(cuts2[3],NoCutKink_montecarlo->Integral()/NumberV0_montecarlo *100);
1493 ComCuts2_montecarlo->Fill(cuts2[4],NoCutdEdxSigmaElectronLine_montecarlo->Integral()/NumberV0_montecarlo *100);
1494 ComCuts2_montecarlo->Fill(cuts2[5],NoCutdEdxSigmaPionLine_montecarlo->Integral()/NumberV0_montecarlo *100);
1495 ComCuts2_montecarlo->Fill(cuts2[6],NoCutNContributors_montecarlo->Integral()/NumberV0_montecarlo *100);
1496 ComCuts2_montecarlo->Fill(cuts2[7],NoCutPIDProb_montecarlo->Integral()/NumberV0_montecarlo *100);
1497 ComCuts2_montecarlo->Fill(cuts2[8],NoCutR_montecarlo->Integral()/NumberV0_montecarlo *100);
1498 ComCuts2_montecarlo->Fill(cuts2[9],NoCutLine_montecarlo->Integral()/NumberV0_montecarlo *100);
1499 ComCuts2_montecarlo->Fill(cuts2[10],NoCutZ_montecarlo->Integral()/NumberV0_montecarlo *100);
1500 ComCuts2_montecarlo->Fill(cuts2[11],NoCutMinNClsTPC_montecarlo->Integral()/NumberV0_montecarlo *100);
1501 ComCuts2_montecarlo->Fill(cuts2[12],NoCutSinglePt_montecarlo->Integral()/NumberV0_montecarlo *100);
1502 ComCuts2_montecarlo->Fill(cuts2[13],NoCutNDF_montecarlo->Integral()/NumberV0_montecarlo *100);
1503 ComCuts2_montecarlo->Fill(cuts2[14],NoCutChi2_montecarlo->Integral()/NumberV0_montecarlo *100);
1504 ComCuts2_montecarlo->Fill(cuts2[15],NoCutEta_montecarlo->Integral()/NumberV0_montecarlo *100);
1505 ComCuts2_montecarlo->Fill(cuts2[16],NoCutPt_montecarlo->Integral()/NumberV0_montecarlo *100);
1506 ComCuts2_montecarlo->Fill(cuts2[17],Final_montecarlo->Integral()/NumberV0_montecarlo *100);
1507 ComCuts2_montecarlo->Fill("RealLeftOver",ESD_ConvGamma_Mass_montecarlo->Integral()/NumberV0_montecarlo *100);
1508 if(MC2){ ComCuts2_montecarlo->Fill("TruePhotons",TRUE_Conversion_R_montecarlo->Integral()/NumberV0_montecarlo *100);}
1509 ComCuts2_montecarlo->LabelsDeflate();
1510 ComCuts2_montecarlo->Draw("e,hist,same");
1511 ComCuts2_montecarlo->Write();
1512 Output_montecarlo->Write();
1513 }
1514 leg2->Draw();
1515
1516 if(MCfile != ""){
1517 if(MC2){
1518
1519 Double_t truePhotons = TRUE_Conversion_R_montecarlo->Integral();
1520 Double_t measPhotons = ESD_Conversion_R_montecarlo->Integral();
1521 cout << "True Photons " << truePhotons << endl;
1522 cout << "Simulated Photons " << measPhotons << endl;
1523
1524
1525
1526 pad_c6->cd(3)->SetLogy(0);
1527
1528 pad_c6->cd(3);
1529 DrawAutoGammaHistos( ESD_Conversion_R_montecarlo,
1530 TRUE_Conversion_R_montecarlo,
1531 "Comparison True Gammas and MC Gammas","R [cm]",StandardYAxis,
1532 kFALSE,2 ,0.0000002,
1533 kFALSE,0. ,0.,
1534 kTRUE, 0.,180.);
1535 }
1536 }
1537
1538
1539 c6->Update();
1540 ps_characteristics->Close();
1541
1542
1543// ------------------------------ Statistics -------------------------------------------------------------------------
1544/* In this part the output-file for the Data is generated, but as it only makes sense for compared outputs,
1545 this section is only executed if a second input is there.
1546*/
1547 if(MCfile != ""){
1548 fstream outl;
1549 outl.open(outlname, ios::out);
1550 outl << "data :\t" << data << endl;
1551 outl << "montecarlo :\t" << MCfile << endl;
1552 outl << "------------------------------------------------------------------------------------------" << endl;
1553 outl << endl;
1554 outl << "\t data \t montecarlo " << endl;
1555 outl << "Number of events" << "\t" << nGoodEvents_data << "\t" << nGoodEvents_montecarlo << endl;
1556 outl << "Number of triggers" << "\t" << nGoodTrig_data << "\t" << nGoodTrig_montecarlo << endl;
1557 outl << "Number reconstructed gammas"<< "\t" << nRecGamma_data << "\t" << nRecGamma_montecarlo <<endl;
1558 outl << "Number of V0's from AllV0s" << "\t" << NumberV0_data <<"\t" << NumberV0_montecarlo << endl;
1559 outl << "Number of V0's real" << "\t" << RealV0_data << "\t" << RealV0_montecarlo << endl;
1560 outl << endl;
1561 if(MC2){
1562 outl << "True Photons " << truePhotons << endl;
1563 outl << "Simulated Photons " << measPhotons << endl;
1564 }
1565 outl << endl;
1566 outl << "------------------------------------------------------------------------------------------" << endl;
1567 outl << "Applied Cut \t" << "data entries \t" << "data norm \t" << "montecarlo entries \t" << "montecarlo norm \t" << endl;
1568 outl << "------------------------------------------------------------------------------------------" << endl;
1569 outl << "GetOnFly \t" << ESD_CutGetOnFly_data->Integral() << "\t" << ESD_CutGetOnFly_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutGetOnFly_montecarlo->Integral() << "\t" << ESD_CutGetOnFly_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1570 outl << "LikeSign \t" << ESD_CutLikeSign_data->Integral() << "\t" << ESD_CutLikeSign_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutLikeSign_montecarlo->Integral() << "\t" << ESD_CutLikeSign_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1571 outl << "Refit \t" << ESD_CutRefit_data->Integral() << "\t" << ESD_CutRefit_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutRefit_montecarlo->Integral() << "\t" << ESD_CutRefit_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1572 outl << "Kink \t" << ESD_CutKink_data->Integral() << "\t" << ESD_CutKink_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutKink_montecarlo->Integral() << "\t" << ESD_CutKink_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1573 outl << "dEdxSigmaElectronLine \t" << ESD_CutdEdxSigmaElectronLine_data->Integral() << "\t" << ESD_CutdEdxSigmaElectronLine_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutdEdxSigmaElectronLine_montecarlo->Integral() << "\t" << ESD_CutdEdxSigmaElectronLine_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1574 outl << "dEdxSigmaPionLine \t" << ESD_CutdEdxSigmaPionLine_data->Integral() << "\t" << ESD_CutdEdxSigmaPionLine_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutdEdxSigmaPionLine_montecarlo->Integral() << "\t" << ESD_CutdEdxSigmaPionLine_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1575 outl << "NContributors \t" << ESD_CutNContributors_data->Integral() << "\t" << ESD_CutNContributors_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutNContributors_montecarlo->Integral() << "\t" << ESD_CutNContributors_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1576 outl << "PIDProb \t" << ESD_CutPIDProb_data->Integral() << "\t" << ESD_CutPIDProb_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutPIDProb_montecarlo->Integral() << "\t" << ESD_CutPIDProb_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1577 outl << "R \t" << ESD_CutR_data->Integral() << "\t" << ESD_CutR_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutR_montecarlo->Integral() << "\t" << ESD_CutR_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1578 outl << "Line \t" << ESD_CutLine_data->Integral() << "\t" << ESD_CutLine_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutLine_montecarlo->Integral() << "\t" << ESD_CutLine_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1579 outl << "Z \t" << ESD_CutZ_data->Integral() << "\t" << ESD_CutZ_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutZ_montecarlo->Integral() << "\t" << ESD_CutZ_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1580 outl << "NDF \t" << ESD_CutNDF_data->Integral() << "\t" << ESD_CutNDF_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutNDF_montecarlo->Integral() << "\t" << ESD_CutNDF_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1581 outl << "Chi2 \t" << ESD_CutChi2_data->Integral() << "\t" << ESD_CutChi2_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutChi2_montecarlo->Integral() << "\t" << ESD_CutChi2_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1582 outl << "Eta \t" << ESD_CutEta_data->Integral() << "\t" << ESD_CutEta_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutEta_montecarlo->Integral() << "\t" << ESD_CutEta_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1583 outl << "Pt \t" << ESD_CutPt_data->Integral() << "\t" << ESD_CutPt_data->Integral()/NumberV0_data * 100 << "\t" << ESD_CutPt_montecarlo->Integral() << "\t" << ESD_CutPt_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1584 outl << "------------------------------------------------------------------------------------------" << endl;
1585 outl << endl;
1586 outl << endl;
1587 outl << "NoCutHistos" << endl;
1588 outl << "------------------------------------------------------------------------------------------" << endl;
1589 outl << "NoGetOnFly \t" << NoCutGetOnFly_data->Integral() << "\t" << NoCutGetOnFly_data->Integral()/NumberV0_data * 100 << "\t" << NoCutGetOnFly_montecarlo->Integral() << "\t" << NoCutGetOnFly_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1590 outl << "NoLikeSign \t" << NoCutLikeSign_data->Integral() << "\t" << NoCutLikeSign_data->Integral()/NumberV0_data * 100 << "\t" << NoCutLikeSign_montecarlo->Integral() << "\t" << NoCutLikeSign_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1591 outl << "NoRefit \t" << NoCutRefit_data->Integral() << "\t" << NoCutRefit_data->Integral()/NumberV0_data * 100 << "\t" << NoCutRefit_montecarlo->Integral() << "\t" << NoCutRefit_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1592 outl << "NoKink \t" << NoCutKink_data->Integral() << "\t" << NoCutKink_data->Integral()/NumberV0_data * 100 << "\t" << NoCutKink_montecarlo->Integral() << "\t" << NoCutKink_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1593 outl << "NodEdxSigmaElectronLine \t" << NoCutdEdxSigmaElectronLine_data->Integral() << "\t" << NoCutdEdxSigmaElectronLine_data->Integral()/NumberV0_data * 100 << "\t" << NoCutdEdxSigmaElectronLine_montecarlo->Integral() << "\t" << NoCutdEdxSigmaElectronLine_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1594 outl << "NodEdxSigmaPionLine \t" << NoCutdEdxSigmaPionLine_data->Integral() << "\t" << NoCutdEdxSigmaPionLine_data->Integral()/NumberV0_data * 100 << "\t" << NoCutdEdxSigmaPionLine_montecarlo->Integral() << "\t" << NoCutdEdxSigmaPionLine_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1595 outl << "NoNContributors \t" << NoCutNContributors_data->Integral() << "\t" << NoCutNContributors_data->Integral()/NumberV0_data * 100 << "\t" << NoCutNContributors_montecarlo->Integral() << "\t" << NoCutNContributors_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1596 outl << "NoPIDProb \t" << NoCutPIDProb_data->Integral() << "\t" << NoCutPIDProb_data->Integral()/NumberV0_data * 100 << "\t" << NoCutPIDProb_montecarlo->Integral() << "\t" << NoCutPIDProb_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1597 outl << "NoR \t" << NoCutR_data->Integral() << "\t" << NoCutR_data->Integral()/NumberV0_data * 100 << "\t" << NoCutR_montecarlo->Integral() << "\t" << NoCutR_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1598 outl << "NoLine \t" << NoCutLine_data->Integral() << "\t" << NoCutLine_data->Integral()/NumberV0_data * 100 << "\t" << NoCutLine_montecarlo->Integral() << "\t" << NoCutLine_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1599 outl << "NoZ \t" << NoCutZ_data->Integral() << "\t" << NoCutZ_data->Integral()/NumberV0_data * 100 << "\t" << NoCutZ_montecarlo->Integral() << "\t" << NoCutZ_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1600 outl << "NoNDF \t" << NoCutNDF_data->Integral() << "\t" << NoCutNDF_data->Integral()/NumberV0_data * 100 << "\t" << NoCutNDF_montecarlo->Integral() << "\t" << NoCutNDF_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1601 outl << "NoChi2 \t" << NoCutChi2_data->Integral() << "\t" << NoCutChi2_data->Integral()/NumberV0_data * 100 << "\t" << NoCutChi2_montecarlo->Integral() << "\t" << NoCutChi2_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1602 outl << "NoEta \t" << NoCutEta_data->Integral() << "\t" << NoCutEta_data->Integral()/NumberV0_data * 100 << "\t" << NoCutEta_montecarlo->Integral() << "\t" << NoCutEta_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1603 outl << "NoPt \t" << NoCutPt_data->Integral() << "\t" << NoCutPt_data->Integral()/NumberV0_data * 100 << "\t" << NoCutPt_montecarlo->Integral() << "\t" << NoCutPt_montecarlo->Integral()/NumberV0_montecarlo *100 << endl;
1604 outl << "------------------------------------------------------------------------------------------" << endl;
1605
1606
1607 outl.close();
1608 }
1609
1610 }
1611//------------------------------------ Single-Plots --------------------------------------------------------------------
1612 if(SinglePlots){
1613// -----------------------------------------CutLikeSign ---------------------
1614 TCanvas * c_SinglePlot_1 = new TCanvas("c_SinglePlot_1","",1000,1000); // gives the page size
1615 c_SinglePlot_1->SetLogy(1);
1616 c_SinglePlot_1->cd();
1617 if(!Full){
1618 if(MCfile == ""){
1619 DrawCutGammaHisto( ESD_CutLikeSign_data, NoCutLikeSign_data,
1620 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1621 kFALSE, 1.5,0.00001,
1622 kTRUE,0.000001 ,1,
1623 kTRUE, 0.,0.5);
1624 }else{
1625 DrawCutGammaHistos( ESD_CutLikeSign_data, NoCutLikeSign_data,
1626 ESD_CutLikeSign_montecarlo, NoCutLikeSign_montecarlo,
1627 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1628 kFALSE, 1.5,0.00001,
1629 kTRUE,0.000001 ,1,
1630 kTRUE, 0.,0.5);
1631 }
1632 }else{
1633 if(MCfile == ""){
1634 DrawCutGammaHisto( ESD_CutLikeSign_data, NoCutGetOnFly_data,
1635 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1636 kFALSE, 1.5,0.00001,
1637 kTRUE,0.000001 ,1,
1638 kTRUE, 0.,0.5);
1639 }else{
1640 DrawCutGammaHistos( ESD_CutLikeSign_data, NoCutGetOnFly_data,
1641 ESD_CutLikeSign_montecarlo, NoCutGetOnFly_montecarlo,
1642 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1643 kFALSE, 1.5,0.00001,
1644 kTRUE,0.000001 ,1,
1645 kTRUE, 0.,0.5);
1646 }
1647 }
1648 c_SinglePlot_1->Update();
1649 c_SinglePlot_1->SaveAs(Form("%s%s/CutLikeSign2.%s",path,suffix,suffix));
1650 delete c_SinglePlot_1;
1651//-------------------------------------------- CutRefit -------------------------------------------------------
1652
1653 TCanvas * c_SinglePlot_2 = new TCanvas("c_SinglePlot_2","",1000,1000); // gives the page size
1654 c_SinglePlot_2->SetLogy(1);
1655 c_SinglePlot_2->cd();
1656 if(!Full){
1657 if(MCfile == ""){
1658 DrawCutGammaHisto( ESD_CutRefit_data, NoCutRefit_data,
1659 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1660 kFALSE, 1.5,0.00001,
1661 kTRUE,0.000001 ,1,
1662 kTRUE, 0.,0.5);
1663 }else{
1664 DrawCutGammaHistos( ESD_CutRefit_data, NoCutRefit_data,
1665 ESD_CutRefit_montecarlo, NoCutRefit_montecarlo,
1666 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1667 kFALSE, 1.5,0.00001,
1668 kTRUE,0.000001 ,1,
1669 kTRUE, 0.,0.5);
1670 }
1671 }else{
1672 if(MCfile == ""){
1673 DrawCutGammaHisto( ESD_CutRefit_data, NoCutGetOnFly_data,
1674 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1675 kFALSE, 1.5,0.00001,
1676 kTRUE,0.000001 ,1,
1677 kTRUE, 0.,0.5);
1678 }else{
1679 DrawCutGammaHistos( ESD_CutRefit_data, NoCutGetOnFly_data,
1680 ESD_CutRefit_montecarlo, NoCutGetOnFly_montecarlo,
1681 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1682 kFALSE, 1.5,0.00001,
1683 kTRUE,0.000001 ,1,
1684 kTRUE, 0.,0.5);
1685 }
1686 }
1687 c_SinglePlot_2->Update();
1688 c_SinglePlot_2->SaveAs(Form("%s%s/CutRefit2.%s",path,suffix,suffix));
1689 delete c_SinglePlot_2;
1690//-------------------------------------------- CutKink --------------------------------------------------------
1691 TCanvas * c_SinglePlot_3 = new TCanvas("c_SinglePlot_3","",1000,1000); // gives the page size
1692 c_SinglePlot_3->SetLogy(1);
1693 c_SinglePlot_3->cd();
1694 if(!Full){
1695 if(MCfile == ""){
1696 DrawCutGammaHisto( ESD_CutKink_data, NoCutKink_data,
1697 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1698 kFALSE, 1.5,0.00001,
1699 kTRUE,0.000001 ,1,
1700 kTRUE, 0.,0.5);
1701 }else{
1702 DrawCutGammaHistos( ESD_CutKink_data, NoCutKink_data,
1703 ESD_CutKink_montecarlo, NoCutKink_montecarlo,
1704 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1705 kFALSE, 1.5,0.00001,
1706 kTRUE,0.000001 ,1,
1707 kTRUE, 0.,0.5);
1708 }
1709 }else{
1710 if(MCfile == ""){
1711 DrawCutGammaHisto( ESD_CutKink_data, NoCutGetOnFly_data,
1712 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1713 kFALSE, 1.5,0.00001,
1714 kTRUE,0.000001 ,1,
1715 kTRUE, 0.,0.5);
1716 }else{
1717 DrawCutGammaHistos( ESD_CutKink_data, NoCutGetOnFly_data,
1718 ESD_CutKink_montecarlo, NoCutGetOnFly_montecarlo,
1719 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1720 kFALSE, 1.5,0.00001,
1721 kTRUE,0.000001 ,1,
1722 kTRUE, 0.,0.5);
1723 }
1724 }
1725 c_SinglePlot_3->Update();
1726 c_SinglePlot_3->SaveAs(Form("%s%s/CutKink2.%s",path,suffix,suffix));
1727 delete c_SinglePlot_3;
1728//-------------------------------------------- CutdEdxElectronLine --------------------------------------------
1729
1730
1731
1732 TCanvas * c_SinglePlot_4 = new TCanvas("c_SinglePlot_4","",1000,1000); // gives the page size
1733 c_SinglePlot_4->SetLogy(1);
1734 c_SinglePlot_4->cd();
1735 if(!Full){
1736 if(MCfile == ""){
1737 DrawCutGammaHisto( ESD_CutdEdxSigmaElectronLine_data, NoCutdEdxSigmaElectronLine_data,
1738 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1739 kFALSE, 1.5,0.00001,
1740 kTRUE,0.000001 ,1,
1741 kTRUE, 0.,0.5);
1742 }else{
1743 DrawCutGammaHistos( ESD_CutdEdxSigmaElectronLine_data, NoCutdEdxSigmaElectronLine_data,
1744 ESD_CutdEdxSigmaElectronLine_montecarlo, NoCutdEdxSigmaElectronLine_montecarlo,
1745 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1746 kFALSE, 1.5,0.00001,
1747 kTRUE,0.000001 ,1,
1748 kTRUE, 0.,0.5);
1749 }
1750 }else{
1751 if(MCfile == ""){
1752 DrawCutGammaHisto( ESD_CutdEdxSigmaElectronLine_data, NoCutGetOnFly_data,
1753 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1754 kFALSE, 1.5,0.00001,
1755 kTRUE,0.000001 ,1,
1756 kTRUE, 0.,0.5);
1757 }else{
1758 DrawCutGammaHistos( ESD_CutdEdxSigmaElectronLine_data, NoCutGetOnFly_data,
1759 ESD_CutdEdxSigmaElectronLine_montecarlo, NoCutGetOnFly_montecarlo,
1760 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1761 kFALSE, 1.5,0.00001,
1762 kTRUE,0.000001 ,1,
1763 kTRUE, 0.,0.5);
1764 }
1765 }
1766 c_SinglePlot_4->Update();
1767 c_SinglePlot_4->SaveAs(Form("%s%s/CutdEdxElectronLine2.%s",path,suffix,suffix));
1768 delete c_SinglePlot_4;
1769//-------------------------------------------- CutdEdxPionLine ------------------------------------------------
1770 TCanvas * c_SinglePlot_5 = new TCanvas("c_SinglePlot_5","",1000,1000); // gives the page size
1771 c_SinglePlot_5->SetLogy(1);
1772 c_SinglePlot_5->cd();
1773 if(!Full){
1774 if(MCfile == ""){
1775 DrawCutGammaHisto( ESD_CutdEdxSigmaPionLine_data, NoCutdEdxSigmaPionLine_data,
1776 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1777 kFALSE, 1.5,0.00001,
1778 kTRUE,0.000001 ,1,
1779 kTRUE, 0.,0.5);
1780 }else{
1781 DrawCutGammaHistos( ESD_CutdEdxSigmaPionLine_data, NoCutdEdxSigmaPionLine_data,
1782 ESD_CutdEdxSigmaPionLine_montecarlo, NoCutdEdxSigmaPionLine_montecarlo,
1783 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1784 kFALSE, 1.5,0.00001,
1785 kTRUE,0.000001 ,1,
1786 kTRUE, 0.,0.5);
1787 }
1788 }else{
1789 if(MCfile == ""){
1790 DrawCutGammaHisto( ESD_CutdEdxSigmaPionLine_data, NoCutGetOnFly_data,
1791 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1792 kFALSE, 1.5,0.00001,
1793 kTRUE,0.000001 ,1,
1794 kTRUE, 0.,0.5);
1795 }else{
1796 DrawCutGammaHistos( ESD_CutdEdxSigmaPionLine_data, NoCutGetOnFly_data,
1797 ESD_CutdEdxSigmaPionLine_montecarlo, NoCutGetOnFly_montecarlo,
1798 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1799 kFALSE, 1.5,0.00001,
1800 kTRUE,0.000001 ,1,
1801 kTRUE, 0.,0.5);
1802 }
1803 }
1804 c_SinglePlot_5->Update();
1805 c_SinglePlot_5->SaveAs(Form("%s%s/CutdEdxPionLine2.%s",path,suffix,suffix));
1806 delete c_SinglePlot_5;
1807//-------------------------------------------- CutGetOnFly ----------------------------------------------------
1808 TCanvas * c_SinglePlot_6 = new TCanvas("c_SinglePlot_6","",1000,1000); // gives the page size
1809 c_SinglePlot_6->SetLogy(1);
1810 c_SinglePlot_6->cd();
1811 if(!Full){
1812 if(MCfile == ""){
1813 DrawCutGammaHisto( ESD_CutGetOnFly_data, NoCutGetOnFly_data,
1814 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1815 kFALSE, 1.5,0.00001,
1816 kTRUE,0.000001 ,1,
1817 kTRUE, 0.,0.5);
1818 }else{
1819 DrawCutGammaHistos( ESD_CutGetOnFly_data, NoCutGetOnFly_data,
1820 ESD_CutGetOnFly_montecarlo, NoCutGetOnFly_montecarlo,
1821 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1822 kFALSE, 1.5,0.00001,
1823 kTRUE,0.000001 ,1,
1824 kTRUE, 0.,0.5);
1825 }
1826 }else{
1827 if(MCfile == ""){
1828 DrawCutGammaHisto( ESD_CutGetOnFly_data, NoCutGetOnFly_data,
1829 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1830 kFALSE, 1.5,0.00001,
1831 kTRUE,0.000001 ,1,
1832 kTRUE, 0.,0.5);
1833 }else{
1834 DrawCutGammaHistos( ESD_CutGetOnFly_data, NoCutGetOnFly_data,
1835 ESD_CutGetOnFly_montecarlo, NoCutGetOnFly_montecarlo,
1836 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1837 kFALSE, 1.5,0.00001,
1838 kTRUE,0.000001 ,1,
1839 kTRUE, 0.,0.5);
1840 }
1841 }
1842 c_SinglePlot_6->Update();
1843 c_SinglePlot_6->SaveAs(Form("%s%s/CutGetOnFly2.%s",path,suffix,suffix));
1844 delete c_SinglePlot_6;
1845//-------------------------------------------- CutNContributors ----------------------------------------------
1846 TCanvas * c_SinglePlot_7 = new TCanvas("c_SinglePlot_7","",1000,1000); // gives the page size
1847 c_SinglePlot_7->cd();
1848 c_SinglePlot_7->SetLogy(1);
1849 if(!Full){
1850 if(MCfile == ""){
1851 DrawCutGammaHisto( ESD_CutNContributors_data, NoCutNContributors_data,
1852 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1853 kFALSE, 1.5,0.00001,
1854 kTRUE,0.000001 ,1,
1855 kTRUE, 0.,0.5);
1856 }else{
1857 DrawCutGammaHistos( ESD_CutNContributors_data, NoCutNContributors_data,
1858 ESD_CutNContributors_montecarlo, NoCutNContributors_montecarlo,
1859 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1860 kFALSE, 1.5,0.00001,
1861 kTRUE,0.000001 ,1,
1862 kTRUE, 0.,0.5);
1863 }
1864 }else{
1865 if(MCfile == ""){
1866 DrawCutGammaHisto( ESD_CutNContributors_data, NoCutGetOnFly_data,
1867 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1868 kFALSE, 1.5,0.00001,
1869 kTRUE,0.000001 ,1,
1870 kTRUE, 0.,0.5);
1871 }else{
1872 DrawCutGammaHistos( ESD_CutNContributors_data, NoCutGetOnFly_data,
1873 ESD_CutNContributors_montecarlo, NoCutGetOnFly_montecarlo,
1874 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1875 kFALSE, 1.5,0.00001,
1876 kTRUE,0.000001 ,1,
1877 kTRUE, 0.,0.5);
1878 }
1879 }
1880 c_SinglePlot_7->Update();
1881 c_SinglePlot_7->SaveAs(Form("%s%s/CutNContributors2.%s",path,suffix,suffix));
1882 delete c_SinglePlot_7;
1883//-------------------------------------------- CutPIDProb ----------------------------------------------------
1884 TCanvas * c_SinglePlot_8 = new TCanvas("c_SinglePlot_8","",1000,1000); // gives the page size
1885 c_SinglePlot_8->SetLogy(1);
1886 c_SinglePlot_8->cd();
1887 if(!Full){
1888 if(MCfile == ""){
1889 DrawCutGammaHisto( ESD_CutPIDProb_data, NoCutPIDProb_data,
1890 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1891 kFALSE, 1.5,0.00001,
1892 kTRUE,0.000001 ,1,
1893 kTRUE, 0.,0.5);
1894 }else{
1895 DrawCutGammaHistos( ESD_CutPIDProb_data, NoCutPIDProb_data,
1896 ESD_CutPIDProb_montecarlo, NoCutPIDProb_montecarlo,
1897 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1898 kFALSE, 1.5,0.00001,
1899 kTRUE,0.000001 ,1,
1900 kTRUE, 0.,0.5);
1901 }
1902 }else{
1903 if(MCfile == ""){
1904 DrawCutGammaHisto( ESD_CutPIDProb_data, NoCutGetOnFly_data,
1905 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1906 kFALSE, 1.5,0.00001,
1907 kTRUE,0.000001 ,1,
1908 kTRUE, 0.,0.5);
1909 }else{
1910 DrawCutGammaHistos( ESD_CutPIDProb_data, NoCutGetOnFly_data,
1911 ESD_CutPIDProb_montecarlo, NoCutGetOnFly_montecarlo,
1912 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1913 kFALSE, 1.5,0.00001,
1914 kTRUE,0.000001 ,1,
1915 kTRUE, 0.,0.5);
1916 }
1917 }
1918 c_SinglePlot_8->Update();
1919 c_SinglePlot_8->SaveAs(Form("%s%s/CutPIDProb2.%s",path,suffix,suffix));
1920 delete c_SinglePlot_8;
1921//-------------------------------------------- CutR ----------------------------------------------------------
1922 TCanvas * c_SinglePlot_9 = new TCanvas("c_SinglePlot_9","",1000,1000); // gives the page size
1923 c_SinglePlot_9->SetLogy(1);
1924 c_SinglePlot_9->cd();
1925 if(!Full){
1926 if(MCfile == ""){
1927 DrawCutGammaHisto( ESD_CutR_data, NoCutR_data,
1928 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1929 kFALSE, 1.5,0.00001,
1930 kTRUE,0.000001 ,1,
1931 kTRUE, 0.,0.5);
1932 }else{
1933 DrawCutGammaHistos( ESD_CutR_data, NoCutR_data,
1934 ESD_CutR_montecarlo, NoCutR_montecarlo,
1935 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1936 kFALSE, 1.5,0.00001,
1937 kTRUE,0.000001 ,1,
1938 kTRUE, 0.,0.5);
1939 }
1940 }else{
1941 if(MCfile == ""){
1942 DrawCutGammaHisto( ESD_CutR_data, NoCutGetOnFly_data,
1943 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1944 kFALSE, 1.5,0.00001,
1945 kTRUE,0.000001 ,1,
1946 kTRUE, 0.,0.5);
1947 }else{
1948 DrawCutGammaHistos( ESD_CutR_data, NoCutGetOnFly_data,
1949 ESD_CutR_montecarlo, NoCutGetOnFly_montecarlo,
1950 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1951 kFALSE, 1.5,0.00001,
1952 kTRUE,0.000001 ,1,
1953 kTRUE, 0.,0.5);
1954 }
1955 }
1956 c_SinglePlot_9->Update();
1957 c_SinglePlot_9->SaveAs(Form("%s%s/CutR2.%s",path,suffix,suffix));
1958 delete c_SinglePlot_9;
1959//-------------------------------------------- CutLine -------------------------------------------------------
1960 TCanvas * c_SinglePlot_10 = new TCanvas("c_SinglePlot_10","",1000,1000); // gives the page size
1961 c_SinglePlot_10->SetLogy(1);
1962 c_SinglePlot_10->cd();
1963 if(!Full){
1964 if(MCfile == ""){
1965 DrawCutGammaHisto( ESD_CutLine_data, NoCutLine_data,
1966 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
1967 kFALSE, 1.5,0.00001,
1968 kTRUE,0.000001 ,1,
1969 kTRUE, 0.,0.5);
1970 }else{
1971 DrawCutGammaHistos( ESD_CutLine_data, NoCutLine_data,
1972 ESD_CutLine_montecarlo, NoCutLine_montecarlo,
1973 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
1974 kFALSE, 1.5,0.00001,
1975 kTRUE,0.000001 ,1,
1976 kTRUE, 0.,0.5);
1977 }
1978 }else{
1979 if(MCfile == ""){
1980 DrawCutGammaHisto( ESD_CutLine_data, NoCutGetOnFly_data,
1981 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
1982 kFALSE, 1.5,0.00001,
1983 kTRUE,0.000001 ,1,
1984 kTRUE, 0.,0.5);
1985 }else{
1986 DrawCutGammaHistos( ESD_CutLine_data, NoCutGetOnFly_data,
1987 ESD_CutLine_montecarlo, NoCutGetOnFly_montecarlo,
1988 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
1989 kFALSE, 1.5,0.00001,
1990 kTRUE,0.000001 ,1,
1991 kTRUE, 0.,0.5);
1992 }
1993 }
1994 c_SinglePlot_10->Update();
1995 c_SinglePlot_10->SaveAs(Form("%s%s/CutLine2.%s",path,suffix,suffix));
1996 delete c_SinglePlot_10;
1997
1998//-------------------------------------------- CutZ ------------------------------------------------------------
1999 TCanvas * c_SinglePlot_11 = new TCanvas("c_SinglePlot_11","",1000,1000); // gives the page size
2000 c_SinglePlot_11->SetLogy(1);
2001 c_SinglePlot_11->cd();
2002 if(!Full){
2003 if(MCfile == ""){
2004 DrawCutGammaHisto( ESD_CutZ_data, NoCutZ_data,
2005 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
2006 kFALSE, 1.5,0.00001,
2007 kTRUE,0.000001 ,1,
2008 kTRUE, 0.,0.5);
2009 }else{
2010 DrawCutGammaHistos( ESD_CutZ_data, NoCutZ_data,
2011 ESD_CutZ_montecarlo, NoCutZ_montecarlo,
2012 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
2013 kFALSE, 1.5,0.00001,
2014 kTRUE,0.000001 ,1,
2015 kTRUE, 0.,0.5);
2016 }
2017 }else{
2018 if(MCfile == ""){
2019 DrawCutGammaHisto( ESD_CutZ_data, NoCutGetOnFly_data,
2020 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
2021 kFALSE, 1.5,0.00001,
2022 kTRUE,0.000001 ,1,
2023 kTRUE, 0.,0.5);
2024 }else{
2025 DrawCutGammaHistos( ESD_CutZ_data, NoCutGetOnFly_data,
2026 ESD_CutZ_montecarlo, NoCutGetOnFly_montecarlo,
2027 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
2028 kFALSE, 1.5,0.00001,
2029 kTRUE,0.000001 ,1,
2030 kTRUE, 0.,0.5);
2031 }
2032 }
2033 c_SinglePlot_11->Update();
2034 c_SinglePlot_11->SaveAs(Form("%s%s/CutZ.%s",path,suffix,suffix));
2035 delete c_SinglePlot_11;
2036
2037//-------------------------------------------- CutMinNClsTPC ------------------------------------------------------------
2038 TCanvas * c_SinglePlot_11 = new TCanvas("c_SinglePlot_11","",1000,1000); // gives the page siMinNClsTPCe
2039 c_SinglePlot_11->SetLogy(1);
2040 c_SinglePlot_11->cd();
2041 if(!Full){
2042 if(MCfile == ""){
2043 DrawCutGammaHisto( ESD_CutMinNClsTPC_data, NoCutMinNClsTPC_data,
2044 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
2045 kFALSE, 1.5,0.00001,
2046 kTRUE,0.000001 ,1,
2047 kTRUE, 0.,0.5);
2048 }else{
2049 DrawCutGammaHistos( ESD_CutMinNClsTPC_data, NoCutMinNClsTPC_data,
2050 ESD_CutMinNClsTPC_montecarlo, NoCutMinNClsTPC_montecarlo,
2051 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
2052 kFALSE, 1.5,0.00001,
2053 kTRUE,0.000001 ,1,
2054 kTRUE, 0.,0.5);
2055 }
2056 }else{
2057 if(MCfile == ""){
2058 DrawCutGammaHisto( ESD_CutMinNClsTPC_data, NoCutGetOnFly_data,
2059 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
2060 kFALSE, 1.5,0.00001,
2061 kTRUE,0.000001 ,1,
2062 kTRUE, 0.,0.5);
2063 }else{
2064 DrawCutGammaHistos( ESD_CutMinNClsTPC_data, NoCutGetOnFly_data,
2065 ESD_CutMinNClsTPC_montecarlo, NoCutGetOnFly_montecarlo,
2066 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
2067 kFALSE, 1.5,0.00001,
2068 kTRUE,0.000001 ,1,
2069 kTRUE, 0.,0.5);
2070 }
2071 }
2072 c_SinglePlot_11->Update();
2073 c_SinglePlot_11->SaveAs(Form("%s%s/CutMinNClsTPC.%s",path,suffix,suffix));
2074 delete c_SinglePlot_11;
2075
2076//-------------------------------------------- CutSinglePt ------------------------------------------------------------
2077 TCanvas * c_SinglePlot_11 = new TCanvas("c_SinglePlot_11","",1000,1000); // gives the page siSinglePte
2078 c_SinglePlot_11->SetLogy(1);
2079 c_SinglePlot_11->cd();
2080 if(!Full){
2081 if(MCfile == ""){
2082 DrawCutGammaHisto( ESD_CutSinglePt_data, NoCutSinglePt_data,
2083 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
2084 kFALSE, 1.5,0.00001,
2085 kTRUE,0.000001 ,1,
2086 kTRUE, 0.,0.5);
2087 }else{
2088 DrawCutGammaHistos( ESD_CutSinglePt_data, NoCutSinglePt_data,
2089 ESD_CutSinglePt_montecarlo, NoCutSinglePt_montecarlo,
2090 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
2091 kFALSE, 1.5,0.00001,
2092 kTRUE,0.000001 ,1,
2093 kTRUE, 0.,0.5);
2094 }
2095 }else{
2096 if(MCfile == ""){
2097 DrawCutGammaHisto( ESD_CutSinglePt_data, NoCutGetOnFly_data,
2098 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
2099 kFALSE, 1.5,0.00001,
2100 kTRUE,0.000001 ,1,
2101 kTRUE, 0.,0.5);
2102 }else{
2103 DrawCutGammaHistos( ESD_CutSinglePt_data, NoCutGetOnFly_data,
2104 ESD_CutSinglePt_montecarlo, NoCutGetOnFly_montecarlo,
2105 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
2106 kFALSE, 1.5,0.00001,
2107 kTRUE,0.000001 ,1,
2108 kTRUE, 0.,0.5);
2109 }
2110 }
2111 c_SinglePlot_11->Update();
2112 c_SinglePlot_11->SaveAs(Form("%s%s/CutSinglePt.%s",path,suffix,suffix));
2113 delete c_SinglePlot_11;
2114
2115//-------------------------------------------- CutNDF ----------------------------------------------------------
2116 TCanvas * c_SinglePlot_12 = new TCanvas("c_SinglePlot_12","",1000,1000); // gives the page size
2117 c_SinglePlot_12->cd();
2118 c_SinglePlot_12->SetLogy(1);
2119 if(!Full){
2120 if(MCfile == ""){
2121 DrawCutGammaHisto( ESD_CutNDF_data, NoCutNDF_data,
2122 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
2123 kFALSE, 1.5,0.00001,
2124 kTRUE,0.000001 ,1,
2125 kTRUE, 0.,0.5);
2126 }else{
2127 DrawCutGammaHistos( ESD_CutNDF_data, NoCutNDF_data,
2128 ESD_CutNDF_montecarlo, NoCutNDF_montecarlo,
2129 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
2130 kFALSE, 1.5,0.00001,
2131 kTRUE,0.000001 ,1,
2132 kTRUE, 0.,0.5);
2133 }
2134 }else{
2135 if(MCfile == ""){
2136 DrawCutGammaHisto( ESD_CutNDF_data, NoCutGetOnFly_data,
2137 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
2138 kFALSE, 1.5,0.00001,
2139 kTRUE,0.000001 ,1,
2140 kTRUE, 0.,0.5);
2141 }else{
2142 DrawCutGammaHistos( ESD_CutNDF_data, NoCutGetOnFly_data,
2143 ESD_CutNDF_montecarlo, NoCutGetOnFly_montecarlo,
2144 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
2145 kFALSE, 1.5,0.00001,
2146 kTRUE,0.000001 ,1,
2147 kTRUE, 0.,0.5);
2148 }
2149 }
2150 c_SinglePlot_12->Update();
2151 c_SinglePlot_12->SaveAs(Form("%s%s/CutNDF2.%s",path,suffix,suffix));
2152 delete c_SinglePlot_12;
2153//-------------------------------------------- CutChi2 ---------------------------------------------------------
2154 TCanvas * c_SinglePlot_13 = new TCanvas("c_SinglePlot_13","",1000,1000); // gives the page size
2155 c_SinglePlot_13->SetLogy(1);
2156 c_SinglePlot_13->cd();
2157 if(!Full){
2158 if(MCfile == ""){
2159 DrawCutGammaHisto( ESD_CutChi2_data, NoCutChi2_data,
2160 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
2161 kFALSE, 1.5,0.00001,
2162 kTRUE,0.000001 ,1,
2163 kTRUE, 0.,0.5);
2164 }else{
2165 DrawCutGammaHistos( ESD_CutChi2_data, NoCutChi2_data,
2166 ESD_CutChi2_montecarlo, NoCutChi2_montecarlo,
2167 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
2168 kFALSE, 1.5,0.00001,
2169 kTRUE,0.000001 ,1,
2170 kTRUE, 0.,0.5);
2171 }
2172 }else{
2173 if(MCfile == ""){
2174 DrawCutGammaHisto( ESD_CutChi2_data, NoCutGetOnFly_data,
2175 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
2176 kFALSE, 1.5,0.00001,
2177 kTRUE,0.000001 ,1,
2178 kTRUE, 0.,0.5);
2179 }else{
2180 DrawCutGammaHistos( ESD_CutChi2_data, NoCutGetOnFly_data,
2181 ESD_CutChi2_montecarlo, NoCutGetOnFly_montecarlo,
2182 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
2183 kFALSE, 1.5,0.00001,
2184 kTRUE,0.000001 ,1,
2185 kTRUE, 0.,0.5);
2186 }
2187 }
2188 c_SinglePlot_13->Update();
2189 c_SinglePlot_13->SaveAs(Form("%s%s/CutChi2_2.%s",path,suffix,suffix));
2190 delete c_SinglePlot_13;
2191//-------------------------------------------- CutEta ----------------------------------------------------------
2192 TCanvas * c_SinglePlot_14 = new TCanvas("c_SinglePlot_14","",1000,1000); // gives the page size
2193 c_SinglePlot_14->cd();
2194 c_SinglePlot_14->SetLogy(1);
2195 if(!Full){
2196 if(MCfile == ""){
2197 DrawCutGammaHisto( ESD_CutEta_data, NoCutEta_data,
2198 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
2199 kFALSE, 1.5,0.00001,
2200 kTRUE,0.000001 ,1,
2201 kTRUE, 0.,0.5);
2202 }else{
2203 DrawCutGammaHistos( ESD_CutEta_data, NoCutEta_data,
2204 ESD_CutEta_montecarlo, NoCutEta_montecarlo,
2205 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
2206 kFALSE, 1.5,0.00001,
2207 kTRUE,0.000001 ,1,
2208 kTRUE, 0.,0.5);
2209 }
2210 }else{
2211 if(MCfile == ""){
2212 DrawCutGammaHisto( ESD_CutEta_data, NoCutGetOnFly_data,
2213 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
2214 kFALSE, 1.5,0.00001,
2215 kTRUE,0.000001 ,1,
2216 kTRUE, 0.,0.5);
2217 }else{
2218 DrawCutGammaHistos( ESD_CutEta_data, NoCutGetOnFly_data,
2219 ESD_CutNDF_montecarlo, NoCutGetOnFly_montecarlo,
2220 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
2221 kFALSE, 1.5,0.00001,
2222 kTRUE,0.000001 ,1,
2223 kTRUE, 0.,0.5);
2224 }
2225 }
2226 c_SinglePlot_14->Update();
2227 c_SinglePlot_14->SaveAs(Form("%s%s/CutEta2.%s",path,suffix,suffix));
2228 delete c_SinglePlot_14;
2229
2230//-------------------------------------------- CutPt ----------------------------------------------------------
2231 TCanvas * c_SinglePlot_15 = new TCanvas("c_SinglePlot_15","",1000,1000); // gives the page size
2232 c_SinglePlot_15->SetLogy(1);
2233 c_SinglePlot_15->cd();
2234 if(!Full){
2235 if(MCfile == ""){
2236 DrawCutGammaHisto( ESD_CutPt_data, NoCutPt_data,
2237 "","InvMass [GeV]",StandardYAxis, "Data without last cut",
2238 kFALSE, 1.5,0.00001,
2239 kTRUE,0.000001 ,1,
2240 kTRUE, 0.,0.5);
2241 }else{
2242 DrawCutGammaHistos( ESD_CutPt_data, NoCutPt_data,
2243 ESD_CutPt_montecarlo, NoCutPt_montecarlo,
2244 "","InvMass [GeV]",StandardYAxis, "Data without last cut", "MC without last cut",
2245 kFALSE, 1.5,0.00001,
2246 kTRUE,0.000001 ,1,
2247 kTRUE, 0.,0.5);
2248 }
2249 }else{
2250 if(MCfile == ""){
2251 DrawCutGammaHisto( ESD_CutPt_data, NoCutGetOnFly_data,
2252 "","InvMass [GeV]",StandardYAxis, "Data without any cut",
2253 kFALSE, 1.5,0.00001,
2254 kTRUE,0.000001 ,1,
2255 kTRUE, 0.,0.5);
2256 }else{
2257 DrawCutGammaHistos( ESD_CutPt_data, NoCutGetOnFly_data,
2258 ESD_CutPt_montecarlo, NoCutGetOnFly_montecarlo,
2259 "","InvMass [GeV]",StandardYAxis, "Data without any cut", "MC without any cut",
2260 kFALSE, 1.5,0.00001,
2261 kTRUE,0.000001 ,1,
2262 kTRUE, 0.,0.5);
2263 }
2264 }
2265 c_SinglePlot_15->Update();
2266 c_SinglePlot_15->SaveAs(Form("%s%s/CutPt2.%s",path,suffix,suffix));
2267 delete c_SinglePlot_15;
2268
2269//-------------------------------------------- InvMassdistribution of leftover ---------------------------------------------
2270 TCanvas * c_SinglePlot_15 = new TCanvas("c_SinglePlot_15","",1000,1000); // gives the page size
2271 c_SinglePlot_15->SetLogy(1);
2272 c_SinglePlot_15->cd();
2273 DrawCutGammaHisto( NoCutGetOnFly_data, ESD_ConvGamma_Mass_data,
2274 "","InvMass [GeV]",StandardYAxis, "Data w/o cut",
2275 kFALSE, 1.5,0.00001,
2276 kTRUE,0.000001 ,1,
2277 kFALSE, 0.,0);
2278 NoCutGetOnFly_data->SetLineWidth(2);
2279 NoCutGetOnFly_data->SetLineColor(1);
2280 NoCutGetOnFly_data->SetTitle();
2281 ESD_ConvGamma_Mass_data->SetTitle();
2282 ESD_ConvGamma_Mass_data->SetLineColor(2);
2283 ESD_ConvGamma_Mass_data->SetLineWidth(2);
2284 ESD_ConvGamma_Mass_data->Draw("same,hist");
2285 leg1 = new TLegend( 0.6,0.82,0.92,0.9);
2286 leg1->SetTextSize(0.03);
2287 leg1->SetFillColor(0);
2288 leg1->AddEntry(NoCutGetOnFly_data,("before cuts"));
2289 leg1->AddEntry(ESD_ConvGamma_Mass_data,("after cuts"));
2290 leg1->Draw();
2291 DrawAliceLogoPerformance(right_up [0],right_up[1],right_up[2],right_up[3],0.03,Date);
2292 c_SinglePlot_15->Update();
2293 c_SinglePlot_15->SaveAs(Form("%s%s/Leftover.%s",path,suffix,suffix));
2294 delete c_SinglePlot_15;
2295
2296
2297
2298
2299
2300
2301
2302// ------------------------ True Photons for MonteCarlo Data ---------------------------------
2303 if(MCfile != ""){
2304 if(MC2){
2305
2306 Double_t truePhotons = TRUE_Conversion_R_montecarlo->Integral();
2307 Double_t measPhotons = ESD_Conversion_R_montecarlo->Integral();
2308 cout << "True Photons " << truePhotons << endl;
2309 cout << "Simulated Photons " << measPhotons << endl;
2310
2311 TCanvas * c20 = new TCanvas("c3_1","",10,10,500,500); // gives the page size
2312 c20->SetLogy(1);
2313
2314 c20->cd();
2315 DrawAutoGammaHistos( ESD_Conversion_R_montecarlo,
2316 TRUE_Conversion_R_montecarlo,
2317 "Comparison True Gammas and MC Gammas","R [cm]",StandardYAxis,
2318 kFALSE,2 ,0.0000002,
2319 kFALSE,0. ,0.,
2320 kTRUE, 0.,180.);
2321
2322 c20->Update();
2323 c20->SaveAs("TRUE-SIM2.gif");
2324 delete c20;
2325 }
2326 }
2327
2328//----------------------------- Comparison of Cuts ------------------------------------------------
2329 // Rescaling plots
2330 ESD_CutLikeSign_data->Scale(1./normFac_data);
2331 ESD_CutRefit_data->Scale(1./normFac_data);
2332 ESD_CutKink_data->Scale(1./normFac_data);
2333 ESD_CutdEdxSigmaElectronLine_data->Scale(1./normFac_data);
2334 ESD_CutdEdxSigmaPionLine_data->Scale(1./normFac_data);
2335 ESD_CutKaonRejectionLowP_data->Scale(1./normFac_data);
2336 ESD_CutProtonRejectionLowP_data->Scale(1./normFac_data);
2337 ESD_CutPionRejectionLowP_data->Scale(1./normFac_data);
2338 ESD_CutGetOnFly_data->Scale(1./normFac_data);
2339 ESD_CutNContributors_data->Scale(1./normFac_data);
2340 ESD_CutPIDProb_data->Scale(1./normFac_data);
2341 ESD_CutR_data->Scale(1./normFac_data);
2342 ESD_CutLine_data->Scale(1./normFac_data);
2343 ESD_CutZ_data->Scale(1./normFac_data);
2344 ESD_CutSinglePt_data->Scale(1./normFac_data);
2345 ESD_CutMinNClsTPC_data->Scale(1./normFac_data);
2346 ESD_CutNDF_data->Scale(1./normFac_data);
2347 ESD_CutChi2_data->Scale(1./normFac_data);
2348 ESD_CutEta_data->Scale(1./normFac_data);
2349 ESD_CutPt_data->Scale(1./normFac_data);
2350 ESD_ConvGamma_Mass_data->Scale(1./normFac_data);
2351 NoCutPt_data->Scale(1./normFac_data);
2352 NoCutEta_data->Scale(1./normFac_data);
2353 NoCutChi2_data->Scale(1./normFac_data);
2354 NoCutNDF_data->Scale(1./normFac_data);
2355 NoCutZ_data->Scale(1./normFac_data);
2356 NoCutSinglePt_data->Scale(1./normFac_data);
2357 NoCutMinNClsTPC_data->Scale(1./normFac_data);
2358 NoCutLine_data->Scale(1./normFac_data);
2359 NoCutR_data->Scale(1./normFac_data);;
2360 NoCutPIDProb_data->Scale(1./normFac_data);
2361 NoCutNContributors_data->Scale(1./normFac_data);
2362 NoCutGetOnFly_data->Scale(1./normFac_data);
2363 NoCutKaonRejectionLowP_data->Scale(1./normFac_data);
2364 NoCutProtonRejectionLowP_data->Scale(1./normFac_data);
2365 NoCutPionRejectionLowP_data->Scale(1./normFac_data);
2366 NoCutdEdxSigmaPionLine_data->Scale(1./normFac_data);
2367 NoCutdEdxSigmaElectronLine_data->Scale(1./normFac_data);
2368 NoCutKink_data->Scale(1./normFac_data);
2369 NoCutRefit_data->Scale(1./normFac_data);
2370 NoCutLikeSign_data->Scale(1./normFac_data);
2371 ESD_AllV0_data->Scale(1./normFac_data);
2372 Final_data->Scale(1./normFac_data);
2373 if(MCfile != ""){
2374 ESD_CutLikeSign_montecarlo->Scale(1./normFac_montecarlo);
2375 ESD_CutRefit_montecarlo->Scale(1./normFac_montecarlo);
2376 ESD_CutKink_montecarlo->Scale(1./normFac_montecarlo);
2377 ESD_CutdEdxSigmaElectronLine_montecarlo->Scale(1./normFac_montecarlo);
2378 ESD_CutdEdxSigmaPionLine_montecarlo->Scale(1./normFac_montecarlo);
2379 ESD_CutKaonRejectionLowP_montecarlo->Scale(1./normFac_montecarlo);
2380 ESD_CutProtonRejectionLowP_montecarlo->Scale(1./normFac_montecarlo);
2381 ESD_CutPionRejectionLowP_montecarlo->Scale(1./normFac_montecarlo);
2382 ESD_CutGetOnFly_montecarlo->Scale(1./normFac_montecarlo);
2383 ESD_CutNContributors_montecarlo->Scale(1./normFac_montecarlo);
2384 ESD_CutPIDProb_montecarlo->Scale(1./normFac_montecarlo);
2385 ESD_CutR_montecarlo->Scale(1./normFac_montecarlo);
2386 ESD_CutLine_montecarlo->Scale(1./normFac_montecarlo);
2387 ESD_CutZ_montecarlo->Scale(1./normFac_montecarlo);
2388 ESD_CutSinglePt_montecarlo->Scale(1./normFac_montecarlo);
2389 ESD_CutMinNClsTPC_montecarlo->Scale(1./normFac_montecarlo);
2390 ESD_CutNDF_montecarlo->Scale(1./normFac_montecarlo);
2391 ESD_CutChi2_montecarlo->Scale(1./normFac_montecarlo);
2392 ESD_CutEta_montecarlo->Scale(1./normFac_montecarlo);
2393 ESD_CutPt_montecarlo->Scale(1./normFac_montecarlo);
2394 ESD_ConvGamma_Mass_montecarlo->Scale(1./normFac_montecarlo);
2395 NoCutPt_montecarlo->Scale(1./normFac_montecarlo);
2396 NoCutEta_montecarlo->Scale(1./normFac_montecarlo);
2397 NoCutChi2_montecarlo->Scale(1./normFac_montecarlo);
2398 NoCutNDF_montecarlo->Scale(1./normFac_montecarlo);
2399 NoCutZ_montecarlo->Scale(1./normFac_montecarlo);
2400 NoCutSinglePt_montecarlo->Scale(1./normFac_montecarlo);
2401 NoCutMinNClsTPC_montecarlo->Scale(1./normFac_montecarlo);
2402 NoCutLine_montecarlo->Scale(1./normFac_montecarlo);
2403 NoCutR_montecarlo->Scale(1./normFac_montecarlo);;
2404 NoCutPIDProb_montecarlo->Scale(1./normFac_montecarlo);
2405 NoCutNContributors_montecarlo->Scale(1./normFac_montecarlo);
2406 NoCutGetOnFly_montecarlo->Scale(1./normFac_montecarlo);
2407 NoCutKaonRejectionLowP_montecarlo->Scale(1./normFac_montecarlo);
2408 NoCutProtonRejectionLowP_montecarlo->Scale(1./normFac_montecarlo);
2409 NoCutPionRejectionLowP_montecarlo->Scale(1./normFac_montecarlo);
2410 NoCutdEdxSigmaPionLine_montecarlo->Scale(1./normFac_montecarlo);
2411 NoCutdEdxSigmaElectronLine_montecarlo->Scale(1./normFac_montecarlo);
2412 NoCutKink_montecarlo->Scale(1./normFac_montecarlo);
2413 NoCutRefit_montecarlo->Scale(1./normFac_montecarlo);
2414 NoCutLikeSign_montecarlo->Scale(1./normFac_montecarlo);
2415 ESD_AllV0_montecarlo->Scale(1./normFac_montecarlo);
2416 Final_montecarlo->Scale(1./normFac_montecarlo);
2417 }
2418 TCanvas * c_SinglePlot_16 = new TCanvas("c_SinglePlot_16","",1000,1000); // gives the page size
2419 c_SinglePlot_16->SetBottomMargin(1.5);
2420 c_SinglePlot_16->SetLogy(1);
2421 c_SinglePlot_16->cd();
2422 const Int_t nx = 20;
2423 char *cuts[nx] = {"V0Finder","LikeSign", "Refit", "Kink", "dEdxElectronLine", "dEdxPionLine", "KaonRejection", "Proton Rejection", "Pion Rejection" , "NContributors", "PIDProb", "R", "Line", "Z", "Min", "SinglePt","NDF", "Chi2", "Eta", "Pt"};
2424 leg2 = new TLegend(0.6,0.82,0.92,0.9);
2425 leg2->AddEntry(ESD_CutLikeSign_data,("Data"),"l");
2426 if(MCfile != ""){
2427 leg2->AddEntry(ESD_CutLikeSign_montecarlo,("MC"),"l");}
2428 leg2->SetFillColor(0);
2429
2430
2431 Double_t maxRange = ESD_CutdEdxSigmaElectronLine_data->Integral()/NumberV0_data * 100;
2432 if(MCfile != ""){
2433 if(maxRange < ESD_CutdEdxSigmaElectronLine_montecarlo->Integral()/NumberV0_montecarlo *100){
2434 maxRange = ESD_CutdEdxSigmaElectronLine_montecarlo->Integral()/NumberV0_montecarlo *100;
2435 }
2436 }
2437
2438 Output_data = new TFile("Output_data_2.root","RECREATE");
2439
2440 TH1F *ComCuts_data = new TH1F("ComCuts_data","Comparison of Cuts",3,0,3);
2441 ComCuts_data->SetStats(0);
2442 ComCuts_data->SetYTitle("ratio Cut/V0");
2443 ComCuts_data->SetBit(TH1::kCanRebin);
2444 ComCuts_data->GetYaxis()->SetRangeUser(0.001, 5 *maxRange);
2445 ComCuts_data->GetYaxis()->SetTitleOffset(1.35);
2446 ComCuts_data->Fill(cuts[0],ESD_CutGetOnFly_data->Integral()/NumberV0_data *100);
2447 ComCuts_data->Fill(cuts[1],ESD_CutLikeSign_data->Integral()/NumberV0_data *100);
2448 ComCuts_data->Fill(cuts[2],ESD_CutRefit_data->Integral()/NumberV0_data *100);
2449 ComCuts_data->Fill(cuts[3],ESD_CutKink_data->Integral()/NumberV0_data *100);
2450 ComCuts_data->Fill(cuts[4],ESD_CutdEdxSigmaElectronLine_data->Integral()/NumberV0_data *100);
2451 ComCuts_data->Fill(cuts[5],ESD_CutdEdxSigmaPionLine_data->Integral()/NumberV0_data *100);
2452 ComCuts_data->Fill(cuts[6],ESD_CutKaonRejectionLowP_data->Integral()/NumberV0_data *100);
2453 ComCuts_data->Fill(cuts[7],ESD_CutProtonRejectionLowP_data->Integral()/NumberV0_data *100);
2454 ComCuts_data->Fill(cuts[8],ESD_CutPionRejectionLowP_data->Integral()/NumberV0_data *100);
2455 ComCuts_data->Fill(cuts[9],ESD_CutNContributors_data->Integral()/NumberV0_data *100);
2456 ComCuts_data->Fill(cuts[10],ESD_CutPIDProb_data->Integral()/NumberV0_data *100);
2457 ComCuts_data->Fill(cuts[11],ESD_CutR_data->Integral()/NumberV0_data *100);
2458 ComCuts_data->Fill(cuts[12],ESD_CutLine_data->Integral()/NumberV0_data *100);
2459 ComCuts_data->Fill(cuts[13],ESD_CutZ_data->Integral()/NumberV0_data *100);
2460 ComCuts_data->Fill(cuts[14],ESD_CutMinNClsTPC_data->Integral()/NumberV0_data *100);
2461 ComCuts_data->Fill(cuts[15],ESD_CutSinglePt_data->Integral()/NumberV0_data *100);
2462 ComCuts_data->Fill(cuts[16],ESD_CutNDF_data->Integral()/NumberV0_data *100);
2463 ComCuts_data->Fill(cuts[17],ESD_CutChi2_data->Integral()/NumberV0_data *100);
2464 ComCuts_data->Fill(cuts[18],ESD_CutEta_data->Integral()/NumberV0_data *100);
2465 ComCuts_data->Fill(cuts[19],ESD_CutPt_data->Integral()/NumberV0_data *100);
2466 ComCuts_data->LabelsDeflate();
2467 ComCuts_data->Draw();
2468 ComCuts_data->Write();
2469
2470 Output_data->Write();
2471
2472 if(MCfile != ""){
2473 Output_montecarlo = new TFile("Output_montecarlo_2.root","RECREATE");
2474 TH1F *ComCuts_montecarlo = new TH1F("ComCuts_montecarlo","Comparison of Cuts",3,0,3);
2475 ComCuts_montecarlo->SetStats(0);
2476 ComCuts_montecarlo->SetBit(TH1::kCanRebin);
2477 ComCuts_montecarlo->SetLineColor(2);
2478 ComCuts_montecarlo->Fill(cuts[0],ESD_CutGetOnFly_montecarlo->Integral()/NumberV0_montecarlo *100);
2479 ComCuts_montecarlo->Fill(cuts[1],ESD_CutLikeSign_montecarlo->Integral()/NumberV0_montecarlo *100);
2480 ComCuts_montecarlo->Fill(cuts[2],ESD_CutRefit_montecarlo->Integral()/NumberV0_montecarlo *100);
2481 ComCuts_montecarlo->Fill(cuts[3],ESD_CutKink_montecarlo->Integral()/NumberV0_montecarlo *100);
2482 ComCuts_montecarlo->Fill(cuts[4],ESD_CutdEdxSigmaElectronLine_montecarlo->Integral()/NumberV0_montecarlo *100);
2483 ComCuts_montecarlo->Fill(cuts[5],ESD_CutdEdxSigmaPionLine_montecarlo->Integral()/NumberV0_montecarlo *100);
2484 ComCuts_montecarlo->Fill(cuts[5],ESD_CutdEdxSigmaPionLine_montecarlo->Integral()/NumberV0_montecarlo *100);
2485 ComCuts_montecarlo->Fill(cuts[6],ESD_CutKaonRejectionLowP_montecarlo->Integral()/NumberV0_montecarlo *100);
2486 ComCuts_montecarlo->Fill(cuts[7],ESD_CutProtonRejectionLowP_montecarlo->Integral()/NumberV0_montecarlo *100);
2487 ComCuts_montecarlo->Fill(cuts[8],ESD_CutPionRejectionLowP_montecarlo->Integral()/NumberV0_montecarlo *100);
2488 ComCuts_montecarlo->Fill(cuts[9],ESD_CutNContributors_montecarlo->Integral()/NumberV0_montecarlo *100);
2489 ComCuts_montecarlo->Fill(cuts[10],ESD_CutPIDProb_montecarlo->Integral()/NumberV0_montecarlo *100);
2490 ComCuts_montecarlo->Fill(cuts[11],ESD_CutR_montecarlo->Integral()/NumberV0_montecarlo *100);
2491 ComCuts_montecarlo->Fill(cuts[12],ESD_CutLine_montecarlo->Integral()/NumberV0_montecarlo *100);
2492 ComCuts_montecarlo->Fill(cuts[13],ESD_CutZ_montecarlo->Integral()/NumberV0_montecarlo *100);
2493 ComCuts_montecarlo->Fill(cuts[14],ESD_CutMinNClsTPC_montecarlo->Integral()/NumberV0_montecarlo *100);
2494 ComCuts_montecarlo->Fill(cuts[15],ESD_CutSinglePt_montecarlo->Integral()/NumberV0_montecarlo *100);
2495 ComCuts_montecarlo->Fill(cuts[16],ESD_CutNDF_montecarlo->Integral()/NumberV0_montecarlo *100);
2496 ComCuts_montecarlo->Fill(cuts[17],ESD_CutChi2_montecarlo->Integral()/NumberV0_montecarlo *100);
2497 ComCuts_montecarlo->Fill(cuts[18],ESD_CutEta_montecarlo->Integral()/NumberV0_montecarlo *100);
2498 ComCuts_montecarlo->Fill(cuts[19],ESD_CutPt_montecarlo->Integral()/NumberV0_montecarlo *100);
2499 ComCuts_montecarlo->LabelsDeflate();
2500 ComCuts_montecarlo->Draw("e,hist,same");
2501 ComCuts_montecarlo->Write();
2502 Output_montecarlo->Write();
2503 }
2504 leg2->Draw();
2505 DrawAliceText(right_up_text[0],right_up_text[1], right_up_text[3]);
2506 c_SinglePlot_16->Update();
2507 c_SinglePlot_16->SaveAs(Form("%s%s/ComparisonCuts2.%s",path,suffix,suffix));
2508
2509
2510//------------------------------ Remaining V0 candidates after cut
2511 TCanvas * c_SinglePlot_17 = new TCanvas("c_SinglePlot_17","",1000,1000); // gives the page size
2512 c_SinglePlot_17->SetLogy(1);
2513 c_SinglePlot_17->cd();
2514 const Int_t nx = 21;
2515 char *cuts2[nx] = {"No Cut", "V0Finder", "LikeSign", "Refit", "Kink", "dEdxElectronLine", "dEdxPionLine", "KaonRejection", "Proton Rejection", "Pion Rejection", "NContributors", "PIDProb", "R", "Line", "Z","MinClsTPC", "SinglePt","NDF", "Chi2", "Eta", "Pt"};
2516 Double_t maxRange = NoCutLikeSign_data->Integral()/NumberV0_data *100;
2517 if(MCfile != ""){
2518 if(maxRange < NoCutLikeSign_montecarlo->Integral()/NumberV0_montecarlo *100){
2519 maxRange = NoCutLikeSign_montecarlo->Integral()/NumberV0_montecarlo *100;
2520 }
2521 }
2522
2523 Output_data = new TFile("Output_data_2.root","UPDATE");
2524
2525 TH1F *ComCuts2_data = new TH1F("ComCuts2_data","Remaining V0 candidates after Cuts ",3,0,3);
2526 ComCuts2_data->SetYTitle("ratio Cut/V0");
2527 ComCuts2_data->GetYaxis()->SetTitleSize(0.03);
2528 ComCuts2_data->SetTitle();
2529 ComCuts2_data->SetStats(0);
2530 ComCuts2_data->SetBit(TH1::kCanRebin);
2531 ComCuts2_data->GetYaxis()->SetRangeUser(1, 300.);
2532 ComCuts2_data->GetYaxis()->SetTitleOffset(1.35);
2533 ComCuts2_data->Fill(cuts2[0],NoCutGetOnFly_data->Integral()/NumberV0_data *100);
2534 ComCuts2_data->Fill(cuts2[1],NoCutLikeSign_data->Integral()/NumberV0_data *100);
2535 ComCuts2_data->Fill(cuts2[2],NoCutRefit_data->Integral()/NumberV0_data *100);
2536 ComCuts2_data->Fill(cuts2[3],NoCutKink_data->Integral()/NumberV0_data *100);
2537 ComCuts2_data->Fill(cuts2[4],NoCutdEdxSigmaElectronLine_data->Integral()/NumberV0_data *100);
2538 ComCuts2_data->Fill(cuts2[5],NoCutdEdxSigmaPionLine_data->Integral()/NumberV0_data *100);
2539 ComCuts2_data->Fill(cuts2[6],NoCutKaonRejectionLowP_data->Integral()/NumberV0_data *100);
2540 ComCuts2_data->Fill(cuts2[7],NoCutProtonRejectionLowP_data->Integral()/NumberV0_data *100);
2541 ComCuts2_data->Fill(cuts2[8],NoCutPionRejectionLowP_data->Integral()/NumberV0_data *100);
2542 ComCuts2_data->Fill(cuts2[9],NoCutNContributors_data->Integral()/NumberV0_data *100);
2543 ComCuts2_data->Fill(cuts2[10],NoCutPIDProb_data->Integral()/NumberV0_data *100);
2544 ComCuts2_data->Fill(cuts2[11],NoCutR_data->Integral()/NumberV0_data *100);
2545 ComCuts2_data->Fill(cuts2[12],NoCutLine_data->Integral()/NumberV0_data *100);
2546 ComCuts2_data->Fill(cuts2[13],NoCutZ_data->Integral()/NumberV0_data *100);
2547 ComCuts2_data->Fill(cuts2[14],NoCutMinNClsTPC_data->Integral()/NumberV0_data *100);
2548 ComCuts2_data->Fill(cuts2[15],NoCutSinglePt_data->Integral()/NumberV0_data *100);
2549 ComCuts2_data->Fill(cuts2[16],NoCutNDF_data->Integral()/NumberV0_data *100);
2550 ComCuts2_data->Fill(cuts2[17],NoCutChi2_data->Integral()/NumberV0_data *100);
2551 ComCuts2_data->Fill(cuts2[18],NoCutEta_data->Integral()/NumberV0_data *100);
2552 ComCuts2_data->Fill(cuts2[19],NoCutPt_data->Integral()/NumberV0_data *100);
2553 ComCuts2_data->Fill(cuts2[20],Final_data->Integral()/NumberV0_data *100);
2554 ComCuts2_data->Fill("RealLeftOver",ESD_ConvGamma_Mass_data->Integral()/NumberV0_data *100);
2555 if(MC2){ ComCuts2_data->Fill("TruePhotons",0);}
2556 if(MC1){ ComCuts2_data->Fill("TruePhotons",TRUE_Conversion_R_data->Integral()/NumberV0_data *100);}
2557 ComCuts2_data->LabelsDeflate();
2558 ComCuts2_data->Draw();
2559 ComCuts2_data->Write();
2560
2561 Output_data->Write();
2562
2563
2564
2565 if(MCfile != ""){
2566 Output_montecarlo = new TFile("Output_montecarlo_2.root","UPDATE");
2567 TH1F *ComCuts2_montecarlo = new TH1F("ComCuts2_montecarlo","Remaining V0 candidates after Cuts",3,0,3);
2568 ComCuts2_montecarlo->SetTitle();
2569 ComCuts2_montecarlo->SetStats(0);
2570 ComCuts2_montecarlo->SetBit(TH1::kCanRebin);
2571 ComCuts2_montecarlo->SetLineColor(2);
2572 ComCuts2_montecarlo->Fill(cuts2[0],NoCutGetOnFly_montecarlo->Integral()/NumberV0_montecarlo *100);
2573 ComCuts2_montecarlo->Fill(cuts2[1],NoCutLikeSign_montecarlo->Integral()/NumberV0_montecarlo *100);
2574 ComCuts2_montecarlo->Fill(cuts2[2],NoCutRefit_montecarlo->Integral()/NumberV0_montecarlo *100);
2575 ComCuts2_montecarlo->Fill(cuts2[3],NoCutKink_montecarlo->Integral()/NumberV0_montecarlo *100);
2576 ComCuts2_montecarlo->Fill(cuts2[4],NoCutdEdxSigmaElectronLine_montecarlo->Integral()/NumberV0_montecarlo *100);
2577 ComCuts2_montecarlo->Fill(cuts2[5],NoCutdEdxSigmaPionLine_montecarlo->Integral()/NumberV0_montecarlo *100);
2578 ComCuts2_montecarlo->Fill(cuts2[6],NoCutKaonRejectionLowP_montecarlo->Integral()/NumberV0_montecarlo *100);
2579 ComCuts2_montecarlo->Fill(cuts2[7],NoCutProtonRejectionLowP_montecarlo->Integral()/NumberV0_montecarlo *100);
2580 ComCuts2_montecarlo->Fill(cuts2[8],NoCutPionRejectionLowP_montecarlo->Integral()/NumberV0_montecarlo *100);
2581 ComCuts2_montecarlo->Fill(cuts2[9],NoCutNContributors_montecarlo->Integral()/NumberV0_montecarlo *100);
2582 ComCuts2_montecarlo->Fill(cuts2[10],NoCutPIDProb_montecarlo->Integral()/NumberV0_montecarlo *100);
2583 ComCuts2_montecarlo->Fill(cuts2[11],NoCutR_montecarlo->Integral()/NumberV0_montecarlo *100);
2584 ComCuts2_montecarlo->Fill(cuts2[12],NoCutLine_montecarlo->Integral()/NumberV0_montecarlo *100);
2585 ComCuts2_montecarlo->Fill(cuts2[13],NoCutZ_montecarlo->Integral()/NumberV0_montecarlo *100);
2586 ComCuts2_montecarlo->Fill(cuts2[14],NoCutMinNClsTPC_montecarlo->Integral()/NumberV0_montecarlo *100);
2587 ComCuts2_montecarlo->Fill(cuts2[15],NoCutSinglePt_montecarlo->Integral()/NumberV0_montecarlo *100);
2588 ComCuts2_montecarlo->Fill(cuts2[16],NoCutNDF_montecarlo->Integral()/NumberV0_montecarlo *100);
2589 ComCuts2_montecarlo->Fill(cuts2[17],NoCutChi2_montecarlo->Integral()/NumberV0_montecarlo *100);
2590 ComCuts2_montecarlo->Fill(cuts2[18],NoCutEta_montecarlo->Integral()/NumberV0_montecarlo *100);
2591 ComCuts2_montecarlo->Fill(cuts2[19],NoCutPt_montecarlo->Integral()/NumberV0_montecarlo *100);
2592 ComCuts2_montecarlo->Fill(cuts2[20],Final_montecarlo->Integral()/NumberV0_montecarlo *100);
2593 ComCuts2_montecarlo->Fill("RealLeftOver",ESD_ConvGamma_Mass_montecarlo->Integral()/NumberV0_montecarlo *100);
2594 if(MC2){ ComCuts2_montecarlo->Fill("TruePhotons",TRUE_Conversion_R_montecarlo->Integral()/NumberV0_montecarlo *100);}
2595 ComCuts2_montecarlo->LabelsDeflate();
2596 ComCuts2_montecarlo->Draw("e,hist,same");
2597 ComCuts2_montecarlo->Write();
2598 Output_montecarlo->Write();
2599
2600 }
2601 leg2->Draw();
2602 DrawAliceLogo(right_up [0],right_up[1],right_up[2],right_up[3]);
2603
2604 c_SinglePlot_17->Update();
2605 c_SinglePlot_17->SaveAs(Form("%s%s/RemainingV0s2.%s",path,suffix,suffix));
2606
2607 }
2608 // end end end
2609
2610
2611}
2612