35 Int_t color[]={kBlack,kRed,kBlue,kOrange+1,kYellow+1,kGreen+2,kCyan+1,kViolet,kMagenta+2,kGray};
48 printf(
"Open <%s>; Get List : <%s>\n",
fileName.Data(),listName.Data());
55 gStyle->SetOptTitle(1);
56 gStyle->SetOptStat(0);
57 gStyle->SetOptFit(000000);
58 gStyle->SetPadRightMargin(0.15);
61 gStyle->SetTitleFontSize(0.06);
69 TH1F* hRatRaw [
nProd-1];
70 TH1F* hRatCorr[
nProd-1];
71 TH1F* hRatTM [
nProd-1];
72 TH1F* hRatShSh[
nProd-1];
75 TH1F* hRatCen[
nProd-1];
77 TH1F* hVertex[3][
nProd];
78 TH1F* hRatVertex[3][
nProd-1];
85 TH1F* hTrackMatchResEtaNeg[
nProd];
86 TH1F* hTrackMatchResEtaPos[
nProd];
87 TH1F* hTrackMatchResPhiNeg[
nProd];
88 TH1F* hTrackMatchResPhiPos[
nProd];
90 TH1F* hRatTrackMatchResEtaNeg[
nProd-1];
91 TH1F* hRatTrackMatchResEtaPos[
nProd-1];
92 TH1F* hRatTrackMatchResPhiNeg[
nProd-1];
93 TH1F* hRatTrackMatchResPhiPos[
nProd-1];
95 TH1F * hTrackPt[
nProd] ;
96 TH1F * hTrackPtSPD[
nProd] ;
97 TH1F * hTrackPtNoSPD[
nProd] ;
98 TH1F * hRatTrackPt[
nProd-1] ;
99 TH1F * hRatTrackPtSPD[
nProd-1] ;
100 TH1F * hRatTrackPtNoSPD[
nProd-1] ;
105 TH1F * hTrackPhi[
nProd] ;
106 TH1F * hTrackPhiSPD[
nProd] ;
107 TH1F * hTrackPhiNoSPD[
nProd] ;
108 TH1F * hRatTrackPhi[
nProd-1] ;
109 TH1F * hRatTrackPhiSPD[
nProd-1] ;
110 TH1F * hRatTrackPhiNoSPD[
nProd-1] ;
116 TH1F* hRatXE[
nProd-1];
117 TH1F* hRatXEUE[
nProd-1];
124 hRaw [iprod] = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_0_Open" ,iprod);
125 hCorr[iprod] = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_4_NCells" ,iprod);
126 hTM [iprod] = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_7_Matching",iprod);
127 hShSh[iprod] = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_9_PID" ,iprod);
129 hRaw [iprod]->Sumw2();
130 hCorr[iprod]->Sumw2();
131 hTM [iprod]->Sumw2();
132 hShSh[iprod]->Sumw2();
134 hRaw [iprod]->Scale(1./
nEvents[iprod]);
135 hCorr[iprod]->Scale(1./
nEvents[iprod]);
136 hTM [iprod]->Scale(1./
nEvents[iprod]);
137 hShSh[iprod]->Scale(1./
nEvents[iprod]);
139 hRaw[iprod]->SetMarkerColor(
color[iprod]);
140 hRaw[iprod]->SetMarkerStyle(24);
142 hCorr[iprod]->SetTitle(
"Cluster spectra with/out cuts");
143 hCorr[iprod]->SetYTitle(
"1/N_{events} dN/dp_{T}");
144 hCorr[iprod]->SetTitleOffset(1.5,
"Y");
145 hCorr[iprod]->SetMarkerColor(
color[iprod]);
146 hCorr[iprod]->SetMarkerStyle(20);
147 hCorr[iprod]->SetAxisRange(0.,30.,
"X");
151 hTM [iprod]->SetMarkerColor(
color[iprod]);
152 hTM [iprod]->SetMarkerStyle(21);
154 hShSh[iprod]->SetMarkerColor(
color[iprod]);
155 hShSh[iprod]->SetMarkerStyle(22);
157 hRaw [iprod]->SetTitleOffset(1.5,
"Y");
158 hTM [iprod]->SetTitleOffset(1.5,
"Y");
159 hShSh[iprod]->SetTitleOffset(1.5,
"Y");
160 hCorr[iprod]->SetTitleOffset(1.5,
"Y");
164 hRatRaw [iprod-1] = (TH1F*)hRaw [iprod]->Clone(Form(
"hRatRaw%s" ,prod[iprod].
Data()));
165 hRatCorr[iprod-1] = (TH1F*)hCorr[iprod]->Clone(Form(
"hRatCorr%s",prod[iprod].
Data()));
166 hRatTM [iprod-1] = (TH1F*)hTM [iprod]->Clone(Form(
"hRatTM%s" ,prod[iprod].
Data()));
167 hRatShSh[iprod-1] = (TH1F*)hShSh[iprod]->Clone(Form(
"hRatShSh%s",prod[iprod].
Data()));
169 hRatRaw [iprod-1]->Divide(hRatRaw [iprod-1],hRaw [0],1.000,1,
"B");
170 hRatCorr[iprod-1]->Divide(hRatCorr[iprod-1],hCorr[0],0.975,1,
"B");
171 hRatTM [iprod-1]->Divide(hRatTM [iprod-1],hTM [0],0.950,1,
"B");
172 hRatShSh[iprod-1]->Divide(hRatShSh[iprod-1],hShSh[0],0.925,1,
"B");
178 h2TrackMatchResEtaNeg[iprod] = (
TH2F*)
GetHisto(
"QA_hTrackMatchedDEtaNeg",iprod);
179 h2TrackMatchResEtaPos[iprod] = (
TH2F*)
GetHisto(
"QA_hTrackMatchedDEtaPos",iprod);
180 h2TrackMatchResPhiNeg[iprod] = (
TH2F*)
GetHisto(
"QA_hTrackMatchedDPhiNeg",iprod);
181 h2TrackMatchResPhiPos[iprod] = (
TH2F*)
GetHisto(
"QA_hTrackMatchedDPhiPos",iprod);
183 Float_t binMin = hCorr[iprod]->FindBin(0.5);
184 Float_t binMax = hCorr[iprod]->FindBin(2);
185 hTrackMatchResEtaNeg[iprod] = (TH1F*) h2TrackMatchResEtaNeg[iprod]->ProjectionY(Form(
"TMProjEtaNeg%s",prod[iprod].
Data()),binMin, binMax);
186 hTrackMatchResEtaPos[iprod] = (TH1F*) h2TrackMatchResEtaPos[iprod]->ProjectionY(Form(
"TMProjEtaPos%s",prod[iprod].
Data()),binMin, binMax);
187 hTrackMatchResPhiNeg[iprod] = (TH1F*) h2TrackMatchResPhiNeg[iprod]->ProjectionY(Form(
"TMProjPhiNeg%s",prod[iprod].
Data()),binMin, binMax);
188 hTrackMatchResPhiPos[iprod] = (TH1F*) h2TrackMatchResPhiPos[iprod]->ProjectionY(Form(
"TMProjPhiPos%s",prod[iprod].
Data()),binMin, binMax);
190 hTrackMatchResEtaNeg[iprod]->SetXTitle(
"#Delta #eta");
191 hTrackMatchResEtaNeg[iprod]->SetYTitle(
"entries / N events");
192 hTrackMatchResEtaNeg[iprod]->SetTitle(
"Track-cluster #eta residuals, 0.5 < E < 2 GeV");
193 hTrackMatchResEtaNeg[iprod]->SetAxisRange(-0.05,0.05,
"X");
194 hTrackMatchResEtaNeg[iprod]->Sumw2();
195 hTrackMatchResEtaNeg[iprod]->SetMarkerStyle(24);
196 hTrackMatchResEtaNeg[iprod]->SetMarkerColor(
color[iprod]);
198 hTrackMatchResEtaPos[iprod]->Sumw2();
199 hTrackMatchResEtaPos[iprod]->SetAxisRange(-0.05,0.05,
"X");
200 hTrackMatchResEtaPos[iprod]->SetMarkerStyle(25);
201 hTrackMatchResEtaPos[iprod]->SetMarkerColor(
color[iprod]);
203 hTrackMatchResPhiNeg[iprod]->SetXTitle(
"#Delta #phi");
204 hTrackMatchResPhiNeg[iprod]->SetTitle(
"Track-cluster #phi residuals, 0.5 < E < 2 GeV");
205 hTrackMatchResPhiNeg[iprod]->SetYTitle(
"entries / N events");
206 hTrackMatchResPhiNeg[iprod]->SetAxisRange(-0.05,0.05,
"X");
207 hTrackMatchResPhiNeg[iprod]->Sumw2();
208 hTrackMatchResPhiNeg[iprod]->SetMarkerStyle(24);
209 hTrackMatchResPhiNeg[iprod]->SetMarkerColor(
color[iprod]);
211 hTrackMatchResPhiPos[iprod]->Sumw2();
212 hTrackMatchResPhiPos[iprod]->SetAxisRange(-0.05,0.05,
"X");
213 hTrackMatchResPhiPos[iprod]->SetMarkerStyle(25);
214 hTrackMatchResPhiPos[iprod]->SetMarkerColor(
color[iprod]);
216 hTrackMatchResEtaNeg[iprod]->Scale(1./
nEvents[iprod]);
217 hTrackMatchResEtaPos[iprod]->Scale(1./
nEvents[iprod]);
218 hTrackMatchResPhiNeg[iprod]->Scale(1./
nEvents[iprod]);
219 hTrackMatchResPhiPos[iprod]->Scale(1./
nEvents[iprod]);
221 hTrackMatchResEtaNeg[iprod]->SetTitleOffset(1.5,
"Y");
222 hTrackMatchResEtaPos[iprod]->SetTitleOffset(1.5,
"Y");
223 hTrackMatchResPhiNeg[iprod]->SetTitleOffset(1.5,
"Y");
224 hTrackMatchResPhiPos[iprod]->SetTitleOffset(1.5,
"Y");
228 hRatTrackMatchResPhiPos[iprod-1] = (TH1F*)hTrackMatchResPhiPos[iprod]->Clone(Form(
"hRatPhiPos%s",prod[iprod].
Data()));
229 hRatTrackMatchResPhiNeg[iprod-1] = (TH1F*)hTrackMatchResPhiNeg[iprod]->Clone(Form(
"hRatPhiNeg%s",prod[iprod].
Data()));
230 hRatTrackMatchResEtaPos[iprod-1] = (TH1F*)hTrackMatchResEtaPos[iprod]->Clone(Form(
"hRatEtaPos%s",prod[iprod].
Data()));
231 hRatTrackMatchResEtaNeg[iprod-1] = (TH1F*)hTrackMatchResEtaNeg[iprod]->Clone(Form(
"hRatEtaNeg%s",prod[iprod].
Data()));
233 hRatTrackMatchResPhiPos[iprod-1]->Divide(hRatTrackMatchResPhiPos[iprod-1],hTrackMatchResPhiPos[0],1.000,1,
"B");
234 hRatTrackMatchResPhiNeg[iprod-1]->Divide(hRatTrackMatchResPhiNeg[iprod-1],hTrackMatchResPhiNeg[0],1.000,1,
"B");
235 hRatTrackMatchResEtaPos[iprod-1]->Divide(hRatTrackMatchResEtaPos[iprod-1],hTrackMatchResEtaPos[0],1.000,1,
"B");
236 hRatTrackMatchResEtaNeg[iprod-1]->Divide(hRatTrackMatchResEtaNeg[iprod-1],hTrackMatchResEtaNeg[0],1.000,1,
"B");
242 hTrackPt [iprod] = (TH1F*)
GetHisto(
"AnaHadrons_hPt" ,iprod);
243 hTrackPtSPD [iprod] = (TH1F*)
GetHisto(
"AnaHadrons_hPtSPDRefit" ,iprod);
244 hTrackPtNoSPD [iprod] = (TH1F*)
GetHisto(
"AnaHadrons_hPtNoSPDRefit" ,iprod);
245 hTrackEtaPhiSPD [iprod] = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiSPDRefitPt02" ,iprod);
246 hTrackEtaPhiNoSPD[iprod] = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiNoSPDRefitPt02",iprod);
247 hTrackEtaPhi [iprod] = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiPositive" ,iprod);
248 hTrackEtaPhi [iprod]->Add((
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiNegative" ,iprod));
250 hTrackPhiSPD [iprod] = (TH1F*)hTrackEtaPhiSPD [iprod]->ProjectionY(Form(
"hTrackPhiSPD%s" ,prod[iprod].
Data()),0,1000);
251 hTrackPhiNoSPD [iprod] = (TH1F*)hTrackEtaPhiNoSPD[iprod]->ProjectionY(Form(
"hTrackPhiNoSPD%s",prod[iprod].
Data()),0,1000);
252 hTrackPhi [iprod] = (TH1F*)hTrackEtaPhi [iprod]->ProjectionY(Form(
"hTrackPhi%s" ,prod[iprod].
Data()),0,1000);
254 hTrackPt [iprod]->Sumw2();
255 hTrackPtSPD [iprod]->Sumw2();
256 hTrackPtNoSPD[iprod]->Sumw2();
258 hTrackPt [iprod]->Scale(1./
nEvents[iprod]);
259 hTrackPtSPD [iprod]->Scale(1./
nEvents[iprod]);
260 hTrackPtNoSPD[iprod]->Scale(1./
nEvents[iprod]);
262 hTrackPhi [iprod]->Sumw2();
263 hTrackPhiSPD [iprod]->Sumw2();
264 hTrackPhiNoSPD[iprod]->Sumw2();
266 hTrackPhi [iprod]->Scale(1./
nEvents[iprod]);
267 hTrackPhiSPD [iprod]->Scale(1./
nEvents[iprod]);
268 hTrackPhiNoSPD[iprod]->Scale(1./
nEvents[iprod]);
270 hTrackPt[iprod]->SetTitle(
"Track spectra with/out SPD");
271 hTrackPt[iprod]->SetYTitle(
"1/N_{events} dN/dp_{T}");
272 hTrackPt[iprod]->SetTitleOffset(1.5,
"Y");
273 hTrackPt[iprod]->SetMarkerColor(
color[iprod]);
274 hTrackPt[iprod]->SetMarkerStyle(20);
275 hTrackPt[iprod]->SetAxisRange(0.,30.,
"X");
279 hTrackPtSPD[iprod]->SetMarkerColor(
color[iprod]);
280 hTrackPtSPD[iprod]->SetMarkerStyle(26);
282 hTrackPtNoSPD[iprod]->SetMarkerColor(
color[iprod]);
283 hTrackPtNoSPD[iprod]->SetMarkerStyle(25);
285 hTrackPhi[iprod]->SetTitle(
"Track #phi with/out SPD");
286 hTrackPhi[iprod]->SetYTitle(
"1/N_{events} dN/d#phi");
287 hTrackPhi[iprod]->SetTitleOffset(1.5,
"Y");
288 hTrackPhi[iprod]->SetMarkerColor(
color[iprod]);
289 hTrackPhi[iprod]->SetMarkerStyle(20);
290 hTrackPhi[iprod]->SetAxisRange(0.,30.,
"X");
294 hTrackPhiSPD[iprod]->SetMarkerColor(
color[iprod]);
295 hTrackPhiSPD[iprod]->SetMarkerStyle(26);
297 hTrackPhiNoSPD[iprod]->SetMarkerColor(
color[iprod]);
298 hTrackPhiNoSPD[iprod]->SetMarkerStyle(25);
302 hRatTrackPhi [iprod-1] = (TH1F*)hTrackPhi [iprod]->Clone(Form(
"hRatTrackPhi%s" ,prod[iprod].
Data()));
303 hRatTrackPhiNoSPD[iprod-1] = (TH1F*)hTrackPhiNoSPD[iprod]->Clone(Form(
"hRatTrackPhiNoSPD%s",prod[iprod].
Data()));
304 hRatTrackPhiSPD [iprod-1] = (TH1F*)hTrackPhiSPD [iprod]->Clone(Form(
"hRatTrackPhiSPD%s" ,prod[iprod].
Data()));
306 hRatTrackPhi [iprod-1]->Divide(hRatTrackPhi [iprod-1],hTrackPhi [0],1.000,1,
"B");
307 hRatTrackPhiSPD [iprod-1]->Divide(hRatTrackPhiSPD [iprod-1],hTrackPhiSPD [0],1.000,1,
"B");
308 hRatTrackPhiNoSPD[iprod-1]->Divide(hRatTrackPhiNoSPD[iprod-1],hTrackPhiNoSPD[0],1.000,1,
"B");
310 hRatTrackPt [iprod-1] = (TH1F*)hTrackPt [iprod]->Clone(Form(
"hRatTrackPt%s" ,prod[iprod].
Data()));
311 hRatTrackPtNoSPD[iprod-1] = (TH1F*)hTrackPtNoSPD[iprod]->Clone(Form(
"hRatTrackPtNoSPD%s",prod[iprod].
Data()));
312 hRatTrackPtSPD [iprod-1] = (TH1F*)hTrackPtSPD [iprod]->Clone(Form(
"hRatTrackPtSPD%s" ,prod[iprod].
Data()));
314 hRatTrackPt [iprod-1]->Divide(hRatTrackPt [iprod-1],hTrackPt [0],1.000,1,
"B");
315 hRatTrackPtSPD [iprod-1]->Divide(hRatTrackPtSPD [iprod-1],hTrackPtSPD [0],1.000,1,
"B");
316 hRatTrackPtNoSPD[iprod-1]->Divide(hRatTrackPtNoSPD[iprod-1],hTrackPtNoSPD[0],1.000,1,
"B");
322 h2XE [iprod]= (
TH2F*)
GetHisto(
"AnaPhotonHadronCorr_hXECharged",iprod);
323 h2XEUE [iprod]= (
TH2F*)
GetHisto(
"AnaPhotonHadronCorr_hXEUeCharged",iprod);
326 TH1F * hTrigger = (TH1F*)
GetHisto(
"AnaPhotonHadronCorr_hPtTrigger",iprod);
327 Int_t minClusterEBin = hTrigger->FindBin(minClusterE);
328 Float_t nTrig = hTrigger->Integral(minClusterE,100000);
330 hXE [iprod] = (TH1F*)h2XE [iprod]->ProjectionY(Form(
"hXE%s" ,prod[iprod].
Data()),minClusterEBin,1000);
331 hXEUE[iprod] = (TH1F*)h2XEUE[iprod]->ProjectionY(Form(
"hXEUE%s",prod[iprod].
Data()),minClusterEBin,1000);
333 hXE [iprod]->Sumw2();
334 hXEUE[iprod]->Sumw2();
336 hXE [iprod]->Scale(1./nTrig);
337 hXEUE[iprod]->Scale(1./nTrig);
339 hXE[iprod]->SetTitle(Form(
"#gamma-hadron x_{E}, p_{T,Trig}>%2.1f GeV/c",minClusterE));
340 hXE[iprod]->SetYTitle(
"1/N_{trigger} dN/dx_{E}");
341 hXE[iprod]->SetTitleOffset(1.5,
"Y");
342 hXE[iprod]->SetMarkerColor(
color[iprod]);
343 hXE[iprod]->SetMarkerStyle(20);
344 hXE[iprod]->SetAxisRange(0.,1.,
"X");
348 hXEUE[iprod]->SetMarkerColor(
color[iprod]);
349 hXEUE[iprod]->SetMarkerStyle(25);
353 hRatXE [iprod-1] = (TH1F*)hXE [iprod]->Clone(Form(
"hRatXE%s" ,prod[iprod].
Data()));
354 hRatXEUE[iprod-1] = (TH1F*)hXEUE[iprod]->Clone(Form(
"hRatXEUE%s",prod[iprod].
Data()));
356 hRatXE [iprod-1]->Divide(hRatXE [iprod-1],hXE [0],1.000,1,
"B");
357 hRatXEUE[iprod-1]->Divide(hRatXEUE[iprod-1],hXEUE[0],1.000,1,
"B");
363 hCen[iprod] = (TH1F*)
GetHisto(
"hCentrality",iprod);
365 hCen[iprod]->Sumw2();
367 hCen[iprod]->Scale(1./
nEvents[iprod]);
369 hCen[iprod]->SetTitle(
"Centrality");
370 hCen[iprod]->SetYTitle(
"1/N_{events} dN/d centrality");
371 hCen[iprod]->SetTitleOffset(1.5,
"Y");
372 hCen[iprod]->SetMarkerColor(
color[iprod]);
373 hCen[iprod]->SetMarkerStyle(20);
380 hRatCen[iprod-1] = (TH1F*)hCen[iprod]->Clone(Form(
"hRatCen%s" ,prod[iprod].
Data()));
382 hRatCen[iprod-1]->Divide(hRatCen[iprod-1],hCen [0],1.000,1,
"B");
388 hVertex[0][iprod] = (TH1F*)
GetHisto(
"hZVertex",iprod);
389 hVertex[1][iprod] = (TH1F*)
GetHisto(
"hYVertex",iprod);
390 hVertex[2][iprod] = (TH1F*)
GetHisto(
"hXVertex",iprod);
392 hVertex[0][iprod]->Sumw2();
393 hVertex[1][iprod]->Sumw2();
394 hVertex[2][iprod]->Sumw2();
396 for(
Int_t ivertex = 0; ivertex < 3; ivertex++)
400 hVertex[ivertex][iprod]->Scale(1./
nEvents[iprod]);
403 hVertex[ivertex][iprod]->SetYTitle(
"1/N_{events} dN/ d vertex");
404 hVertex[ivertex][iprod]->SetTitleOffset(1.5,
"Y");
405 hVertex[ivertex][iprod]->SetMarkerColor(
color[iprod]);
406 hVertex[ivertex][iprod]->SetLineColor(
color[iprod]);
407 hVertex[ivertex][iprod]->SetMarkerStyle(20);
408 if(ivertex==0)hVertex[ivertex][iprod]->SetAxisRange(-10,10.,
"X");
409 else hVertex[ivertex][iprod]->SetAxisRange(-1.5,1.5,
"X");
415 hRatVertex[ivertex][iprod-1] = (TH1F*)hVertex[ivertex][iprod]->Clone(Form(
"hRatVertex%s_%d" ,prod[iprod].
Data(),ivertex));
417 hRatVertex[ivertex][iprod-1]->Divide(hRatVertex[ivertex][iprod-1],hVertex[ivertex][0],1.000,1,
"B");
429 TLegend lprod(0.3,0.475,0.84,0.675);
430 lprod.SetTextSize(0.04);
431 lprod.SetBorderSize(0);
432 lprod.SetFillColor(0);
436 TCanvas * ccalo =
new TCanvas(Form(
"Cluster_%s",histoTag.Data()),
"",1000,500);
445 hRaw [iprod]->Draw(
"same");
446 hCorr[iprod]->Draw(
"same");
447 hTM [iprod]->Draw(
"same");
448 hShSh[iprod]->Draw(
"same");
450 lprod.AddEntry(hRaw[iprod],prod[iprod],
"P");
455 TLegend lcl(0.35,0.7,0.84,0.89);
456 lcl.SetTextSize(0.04);
457 lcl.SetBorderSize(0);
459 lcl.AddEntry(hRaw [0],
"Raw",
"P");
460 lcl.AddEntry(hCorr[0],
"No Exotics + non lin.",
"P");
461 lcl.AddEntry(hTM [0],
"+ Track matching",
"P");
462 lcl.AddEntry(hShSh[0],
"+ #lambda^{2}_{0} < 0.4",
"P");
468 hRatCorr[0]->SetTitle(
"Cluster spectra ratio");
469 hRatCorr[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
470 hRatCorr[0]->SetMinimum(0.850);
471 hRatCorr[0]->SetMaximum(1.025);
472 hRatCorr[0]->Draw(
"");
474 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
476 hRatRaw [iprod]->Draw(
"same");
477 hRatCorr[iprod]->Draw(
"same");
478 hRatTM [iprod]->Draw(
"same");
479 hRatShSh[iprod]->Draw(
"same");
483 TLine l2(0,0.975,30,0.975);
484 TLine l3(0,0.95,30,0.95);
485 TLine l4(0,0.925,30,0.925);
492 ccalo->Print(Form(
"%s_ClusterSpectraComp.eps",histoTag.Data()));
497 TLine l0(0,hTrackMatchResEtaNeg[0]->GetMinimum(),0,hTrackMatchResEtaNeg[0]->GetMaximum()*1.2);
499 TLegend lres(0.6,0.75,0.84,0.89);
500 lres.SetTextSize(0.04);
502 lres.SetFillColor(0);
503 lres.AddEntry(hTrackMatchResEtaNeg[0],
"Negative",
"P");
504 lres.AddEntry(hTrackMatchResEtaPos[0],
"Positive",
"P");
507 TCanvas * ccalo2 =
new TCanvas(Form(
"MatchingResiduals_%s",histoTag.Data()),
"",500,500);
513 hTrackMatchResEtaPos[0]->Draw(
"");
516 hTrackMatchResEtaNeg[iprod]->Draw(
"same");
517 hTrackMatchResEtaPos[iprod]->Draw(
"same");
525 hTrackMatchResPhiPos[0]->Draw(
"");
528 hTrackMatchResPhiNeg[iprod]->Draw(
"same");
529 hTrackMatchResPhiPos[iprod]->Draw(
"same");
537 hRatTrackMatchResEtaPos[0]->SetMaximum(1.25);
538 hRatTrackMatchResEtaPos[0]->SetMinimum(0.98);
539 hRatTrackMatchResEtaPos[0]->Draw(
"");
540 hRatTrackMatchResEtaPos[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
541 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
543 hRatTrackMatchResEtaNeg[iprod]->Draw(
"same");
544 hRatTrackMatchResEtaPos[iprod]->Draw(
"same");
551 hRatTrackMatchResPhiPos[0]->SetMaximum(1.20);
552 hRatTrackMatchResPhiPos[0]->SetMinimum(0.95);
553 hRatTrackMatchResPhiPos[0]->Draw(
"");
554 hRatTrackMatchResPhiPos[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
555 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
557 hRatTrackMatchResPhiNeg[iprod]->Draw(
"same");
558 hRatTrackMatchResPhiPos[iprod]->Draw(
"same");
561 ccalo2->Print(Form(
"%s_MatchingResidualsComp.eps",histoTag.Data()));
566 TLegend ltrack(0.6,0.75,0.84,0.89);
567 ltrack.SetTextSize(0.04);
569 ltrack.SetFillColor(0);
570 ltrack.AddEntry(hTrackPt [0],
"All",
"P");
571 ltrack.AddEntry(hTrackPtSPD [0],
"SPD",
"P");
572 ltrack.AddEntry(hTrackPtNoSPD[0],
"No SPD",
"P");
574 TCanvas * ctrack =
new TCanvas(Form(
"TrackHisto_%s",histoTag.Data()),
"",1500,1500);
578 hTrackPt[0]->Draw(
"");
581 hTrackPt [iprod]->Draw(
"same");
582 hTrackPtSPD [iprod]->Draw(
"same");
583 hTrackPtNoSPD[iprod]->Draw(
"same");
591 hRatTrackPt[0]->SetMaximum(1.05);
592 hRatTrackPt[0]->SetMinimum(0.95);
593 hRatTrackPt[0]->Draw(
"");
594 hRatTrackPt[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
595 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
597 hRatTrackPt [iprod]->Draw(
"same");
598 hRatTrackPtSPD [iprod]->Draw(
"same");
599 hRatTrackPtNoSPD[iprod]->Draw(
"same");
603 hTrackPhi[0]->SetMaximum(3.);
604 hTrackPhi[0]->SetMinimum(0.);
605 hTrackPhi[0]->Draw(
"");
608 hTrackPhi [iprod]->Draw(
"same");
609 hTrackPhiSPD [iprod]->Draw(
"same");
610 hTrackPhiNoSPD[iprod]->Draw(
"same");
616 hRatTrackPhi[0]->SetMaximum(1.05);
617 hRatTrackPhi[0]->SetMinimum(0.95);
618 hRatTrackPhi[0]->Draw(
"");
619 hRatTrackPhi[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
620 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
622 hRatTrackPhi [iprod]->Draw(
"same");
623 hRatTrackPhiSPD [iprod]->Draw(
"same");
624 hRatTrackPhiNoSPD[iprod]->Draw(
"same");
627 ctrack->Print(Form(
"%s_TrackComp.eps",histoTag.Data()));
632 TLegend lxe(0.6,0.75,0.84,0.89);
633 lxe.SetTextSize(0.04);
636 lxe.AddEntry(hXE [0],
"Signal+bkg",
"P");
637 lxe.AddEntry(hXEUE[0],
"Und. Event",
"P");
639 TCanvas * cxe =
new TCanvas(Form(
"XEHisto_%s",histoTag.Data()),
"",1000,500);
646 hXE [iprod]->Draw(
"same");
647 hXEUE[iprod]->Draw(
"same");
655 hRatXE[0]->SetMaximum(1.05);
656 hRatXE[0]->SetMinimum(0.95);
658 hRatXE[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
659 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
661 hRatXE [iprod]->Draw(
"same");
662 hRatXEUE[iprod]->Draw(
"same");
665 cxe->Print(Form(
"%s_XEComp.eps",histoTag.Data()));
670 TCanvas * ccen =
new TCanvas(Form(
"Centrality_%s",histoTag.Data()),
"",1000,500);
679 hCen[iprod]->Draw(
"same");
687 hRatCen[0]->SetTitle(
"Centrality");
688 hRatCen[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
689 hRatCen[0]->SetMinimum(0.95);
690 hRatCen[0]->SetMaximum(1.05);
691 hRatCen[0]->Draw(
"");
693 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
695 hRatCen [iprod]->Draw(
"same");
702 ccen->Print(Form(
"%s_CentralityComp.eps",histoTag.Data()));
707 TCanvas * cvertex =
new TCanvas(Form(
"Vertex_%s",histoTag.Data()),
"",3*500,2*500);
708 cvertex->Divide(3,2);
710 for(
Int_t ivertex = 0; ivertex < 3; ivertex++)
712 cvertex->cd(npannel);
715 hVertex[ivertex][0]->Draw();
718 hVertex[ivertex][iprod]->Draw(
"same");
723 cvertex->cd(npannel+3);
727 hRatVertex[ivertex][0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
728 hRatVertex[ivertex][0]->SetMinimum(0.90);
729 hRatVertex[ivertex][0]->SetMaximum(1.10);
730 hRatVertex[ivertex][0]->Draw(
"");
732 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
734 hRatVertex[ivertex][iprod]->Draw(
"same");
739 cvertex->Print(Form(
"%s_VertexComp.eps",histoTag.Data()));
751 file[iprod] =
new TFile(Form(
"%s/%s",prod[iprod].
Data(),fileName.Data()),
"read");
752 if(
file[iprod]->Get(
"hNEvents"))
754 nEvents[iprod] = ((TH1F*)
file[iprod]->Get(
"hNEvents"))->GetEntries();
755 printf(
"%s: nEvents %e\n",prod[iprod].
Data(),
nEvents[iprod]);
758 TDirectory * dir = (TDirectory*)
file[iprod]->Get(listName);
761 list[iprod] = (
TList*) dir->Get(listName);
763 printf(
"%s: nEvents %e\n",prod[iprod],
nEvents[iprod]);
765 else list[iprod] = 0;
775 if(list[iprod])
return list[iprod]->FindObject(histoName);
776 else return file[iprod]->Get (histoName);
TObject * GetHisto(TString histoName, Int_t iprod)
void GetFileAndList(TString fileName, TString listName)
TList * list[nProd]
productions directory name
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
TObject * FindObject(int bin, const char *nameH, const TList *lst, Bool_t normPerEvent=kTRUE)
void DrawProductionComparison(TString listName="Pi0IM_GammaTrackCorr_EMCAL_default", TString fileName="AnalysisResults.root")
TString prod[]
total number of productions