34 Int_t color[]={kBlack,kRed,kBlue,kOrange+1,kYellow+1,kGreen+2,kCyan+1,kViolet,kMagenta+2,kGray};
47 printf(
"Open <%s>; Get List : <%s>\n",
fileName.Data(),listName.Data());
54 gStyle->SetOptTitle(1);
55 gStyle->SetOptStat(0);
56 gStyle->SetOptFit(000000);
57 gStyle->SetPadRightMargin(0.15);
60 gStyle->SetTitleFontSize(0.06);
68 TH1F* hRatRaw [
nProd-1];
69 TH1F* hRatCorr[
nProd-1];
70 TH1F* hRatTM [
nProd-1];
71 TH1F* hRatShSh[
nProd-1];
74 TH1F* hRatCen[
nProd-1];
76 TH1F* hVertex[3][
nProd];
77 TH1F* hRatVertex[3][
nProd-1];
84 TH1F* hTrackMatchResEtaNeg[
nProd];
85 TH1F* hTrackMatchResEtaPos[
nProd];
86 TH1F* hTrackMatchResPhiNeg[
nProd];
87 TH1F* hTrackMatchResPhiPos[
nProd];
89 TH1F* hRatTrackMatchResEtaNeg[
nProd-1];
90 TH1F* hRatTrackMatchResEtaPos[
nProd-1];
91 TH1F* hRatTrackMatchResPhiNeg[
nProd-1];
92 TH1F* hRatTrackMatchResPhiPos[
nProd-1];
94 TH1F * hTrackPt[
nProd] ;
95 TH1F * hTrackPtSPD[
nProd] ;
96 TH1F * hTrackPtNoSPD[
nProd] ;
97 TH1F * hRatTrackPt[
nProd-1] ;
98 TH1F * hRatTrackPtSPD[
nProd-1] ;
99 TH1F * hRatTrackPtNoSPD[
nProd-1] ;
104 TH1F * hTrackPhi[
nProd] ;
105 TH1F * hTrackPhiSPD[
nProd] ;
106 TH1F * hTrackPhiNoSPD[
nProd] ;
107 TH1F * hRatTrackPhi[
nProd-1] ;
108 TH1F * hRatTrackPhiSPD[
nProd-1] ;
109 TH1F * hRatTrackPhiNoSPD[
nProd-1] ;
115 TH1F* hRatXE[
nProd-1];
116 TH1F* hRatXEUE[
nProd-1];
123 hRaw [iprod] = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_0_Open" ,iprod);
124 hCorr[iprod] = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_4_NCells" ,iprod);
125 hTM [iprod] = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_7_Matching",iprod);
126 hShSh[iprod] = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_9_PID" ,iprod);
128 hRaw [iprod]->Sumw2();
129 hCorr[iprod]->Sumw2();
130 hTM [iprod]->Sumw2();
131 hShSh[iprod]->Sumw2();
133 hRaw [iprod]->Scale(1./
nEvents[iprod]);
134 hCorr[iprod]->Scale(1./
nEvents[iprod]);
135 hTM [iprod]->Scale(1./
nEvents[iprod]);
136 hShSh[iprod]->Scale(1./
nEvents[iprod]);
138 hRaw[iprod]->SetMarkerColor(
color[iprod]);
139 hRaw[iprod]->SetMarkerStyle(24);
141 hCorr[iprod]->SetTitle(
"Cluster spectra with/out cuts");
142 hCorr[iprod]->SetYTitle(
"1/N_{events} dN/dp_{T}");
143 hCorr[iprod]->SetTitleOffset(1.5,
"Y");
144 hCorr[iprod]->SetMarkerColor(
color[iprod]);
145 hCorr[iprod]->SetMarkerStyle(20);
146 hCorr[iprod]->SetAxisRange(0.,30.,
"X");
150 hTM [iprod]->SetMarkerColor(
color[iprod]);
151 hTM [iprod]->SetMarkerStyle(21);
153 hShSh[iprod]->SetMarkerColor(
color[iprod]);
154 hShSh[iprod]->SetMarkerStyle(22);
156 hRaw [iprod]->SetTitleOffset(1.5,
"Y");
157 hTM [iprod]->SetTitleOffset(1.5,
"Y");
158 hShSh[iprod]->SetTitleOffset(1.5,
"Y");
159 hCorr[iprod]->SetTitleOffset(1.5,
"Y");
163 hRatRaw [iprod-1] = (TH1F*)hRaw [iprod]->Clone(Form(
"hRatRaw%s" ,prod[iprod].
Data()));
164 hRatCorr[iprod-1] = (TH1F*)hCorr[iprod]->Clone(Form(
"hRatCorr%s",prod[iprod].
Data()));
165 hRatTM [iprod-1] = (TH1F*)hTM [iprod]->Clone(Form(
"hRatTM%s" ,prod[iprod].
Data()));
166 hRatShSh[iprod-1] = (TH1F*)hShSh[iprod]->Clone(Form(
"hRatShSh%s",prod[iprod].
Data()));
168 hRatRaw [iprod-1]->Divide(hRatRaw [iprod-1],hRaw [0],1.000,1,
"B");
169 hRatCorr[iprod-1]->Divide(hRatCorr[iprod-1],hCorr[0],0.975,1,
"B");
170 hRatTM [iprod-1]->Divide(hRatTM [iprod-1],hTM [0],0.950,1,
"B");
171 hRatShSh[iprod-1]->Divide(hRatShSh[iprod-1],hShSh[0],0.925,1,
"B");
177 h2TrackMatchResEtaNeg[iprod] = (
TH2F*)
GetHisto(
"QA_hTrackMatchedDEtaNeg",iprod);
178 h2TrackMatchResEtaPos[iprod] = (
TH2F*)
GetHisto(
"QA_hTrackMatchedDEtaPos",iprod);
179 h2TrackMatchResPhiNeg[iprod] = (
TH2F*)
GetHisto(
"QA_hTrackMatchedDPhiNeg",iprod);
180 h2TrackMatchResPhiPos[iprod] = (
TH2F*)
GetHisto(
"QA_hTrackMatchedDPhiPos",iprod);
182 Float_t binMin = hCorr[iprod]->FindBin(0.5);
183 Float_t binMax = hCorr[iprod]->FindBin(2);
184 hTrackMatchResEtaNeg[iprod] = (TH1F*) h2TrackMatchResEtaNeg[iprod]->ProjectionY(Form(
"TMProjEtaNeg%s",prod[iprod].
Data()),binMin, binMax);
185 hTrackMatchResEtaPos[iprod] = (TH1F*) h2TrackMatchResEtaPos[iprod]->ProjectionY(Form(
"TMProjEtaPos%s",prod[iprod].
Data()),binMin, binMax);
186 hTrackMatchResPhiNeg[iprod] = (TH1F*) h2TrackMatchResPhiNeg[iprod]->ProjectionY(Form(
"TMProjPhiNeg%s",prod[iprod].
Data()),binMin, binMax);
187 hTrackMatchResPhiPos[iprod] = (TH1F*) h2TrackMatchResPhiPos[iprod]->ProjectionY(Form(
"TMProjPhiPos%s",prod[iprod].
Data()),binMin, binMax);
189 hTrackMatchResEtaNeg[iprod]->SetXTitle(
"#Delta #eta");
190 hTrackMatchResEtaNeg[iprod]->SetYTitle(
"entries / N events");
191 hTrackMatchResEtaNeg[iprod]->SetTitle(
"Track-cluster #eta residuals, 0.5 < E < 2 GeV");
192 hTrackMatchResEtaNeg[iprod]->SetAxisRange(-0.05,0.05,
"X");
193 hTrackMatchResEtaNeg[iprod]->Sumw2();
194 hTrackMatchResEtaNeg[iprod]->SetMarkerStyle(24);
195 hTrackMatchResEtaNeg[iprod]->SetMarkerColor(
color[iprod]);
197 hTrackMatchResEtaPos[iprod]->Sumw2();
198 hTrackMatchResEtaPos[iprod]->SetAxisRange(-0.05,0.05,
"X");
199 hTrackMatchResEtaPos[iprod]->SetMarkerStyle(25);
200 hTrackMatchResEtaPos[iprod]->SetMarkerColor(
color[iprod]);
202 hTrackMatchResPhiNeg[iprod]->SetXTitle(
"#Delta #phi");
203 hTrackMatchResPhiNeg[iprod]->SetTitle(
"Track-cluster #phi residuals, 0.5 < E < 2 GeV");
204 hTrackMatchResPhiNeg[iprod]->SetYTitle(
"entries / N events");
205 hTrackMatchResPhiNeg[iprod]->SetAxisRange(-0.05,0.05,
"X");
206 hTrackMatchResPhiNeg[iprod]->Sumw2();
207 hTrackMatchResPhiNeg[iprod]->SetMarkerStyle(24);
208 hTrackMatchResPhiNeg[iprod]->SetMarkerColor(
color[iprod]);
210 hTrackMatchResPhiPos[iprod]->Sumw2();
211 hTrackMatchResPhiPos[iprod]->SetAxisRange(-0.05,0.05,
"X");
212 hTrackMatchResPhiPos[iprod]->SetMarkerStyle(25);
213 hTrackMatchResPhiPos[iprod]->SetMarkerColor(
color[iprod]);
215 hTrackMatchResEtaNeg[iprod]->Scale(1./
nEvents[iprod]);
216 hTrackMatchResEtaPos[iprod]->Scale(1./
nEvents[iprod]);
217 hTrackMatchResPhiNeg[iprod]->Scale(1./
nEvents[iprod]);
218 hTrackMatchResPhiPos[iprod]->Scale(1./
nEvents[iprod]);
220 hTrackMatchResEtaNeg[iprod]->SetTitleOffset(1.5,
"Y");
221 hTrackMatchResEtaPos[iprod]->SetTitleOffset(1.5,
"Y");
222 hTrackMatchResPhiNeg[iprod]->SetTitleOffset(1.5,
"Y");
223 hTrackMatchResPhiPos[iprod]->SetTitleOffset(1.5,
"Y");
227 hRatTrackMatchResPhiPos[iprod-1] = (TH1F*)hTrackMatchResPhiPos[iprod]->Clone(Form(
"hRatPhiPos%s",prod[iprod].
Data()));
228 hRatTrackMatchResPhiNeg[iprod-1] = (TH1F*)hTrackMatchResPhiNeg[iprod]->Clone(Form(
"hRatPhiNeg%s",prod[iprod].
Data()));
229 hRatTrackMatchResEtaPos[iprod-1] = (TH1F*)hTrackMatchResEtaPos[iprod]->Clone(Form(
"hRatEtaPos%s",prod[iprod].
Data()));
230 hRatTrackMatchResEtaNeg[iprod-1] = (TH1F*)hTrackMatchResEtaNeg[iprod]->Clone(Form(
"hRatEtaNeg%s",prod[iprod].
Data()));
232 hRatTrackMatchResPhiPos[iprod-1]->Divide(hRatTrackMatchResPhiPos[iprod-1],hTrackMatchResPhiPos[0],1.000,1,
"B");
233 hRatTrackMatchResPhiNeg[iprod-1]->Divide(hRatTrackMatchResPhiNeg[iprod-1],hTrackMatchResPhiNeg[0],1.000,1,
"B");
234 hRatTrackMatchResEtaPos[iprod-1]->Divide(hRatTrackMatchResEtaPos[iprod-1],hTrackMatchResEtaPos[0],1.000,1,
"B");
235 hRatTrackMatchResEtaNeg[iprod-1]->Divide(hRatTrackMatchResEtaNeg[iprod-1],hTrackMatchResEtaNeg[0],1.000,1,
"B");
241 hTrackPt [iprod] = (TH1F*)
GetHisto(
"AnaHadrons_hPt" ,iprod);
242 hTrackPtSPD [iprod] = (TH1F*)
GetHisto(
"AnaHadrons_hPtSPDRefit" ,iprod);
243 hTrackPtNoSPD [iprod] = (TH1F*)
GetHisto(
"AnaHadrons_hPtNoSPDRefit" ,iprod);
244 hTrackEtaPhiSPD [iprod] = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiSPDRefitPt02" ,iprod);
245 hTrackEtaPhiNoSPD[iprod] = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiNoSPDRefitPt02",iprod);
246 hTrackEtaPhi [iprod] = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiPositive" ,iprod);
247 hTrackEtaPhi [iprod]->Add((
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiNegative" ,iprod));
249 hTrackPhiSPD [iprod] = (TH1F*)hTrackEtaPhiSPD [iprod]->ProjectionY(Form(
"hTrackPhiSPD%s" ,prod[iprod].
Data()),0,1000);
250 hTrackPhiNoSPD [iprod] = (TH1F*)hTrackEtaPhiNoSPD[iprod]->ProjectionY(Form(
"hTrackPhiNoSPD%s",prod[iprod].
Data()),0,1000);
251 hTrackPhi [iprod] = (TH1F*)hTrackEtaPhi [iprod]->ProjectionY(Form(
"hTrackPhi%s" ,prod[iprod].
Data()),0,1000);
253 hTrackPt [iprod]->Sumw2();
254 hTrackPtSPD [iprod]->Sumw2();
255 hTrackPtNoSPD[iprod]->Sumw2();
257 hTrackPt [iprod]->Scale(1./
nEvents[iprod]);
258 hTrackPtSPD [iprod]->Scale(1./
nEvents[iprod]);
259 hTrackPtNoSPD[iprod]->Scale(1./
nEvents[iprod]);
261 hTrackPhi [iprod]->Sumw2();
262 hTrackPhiSPD [iprod]->Sumw2();
263 hTrackPhiNoSPD[iprod]->Sumw2();
265 hTrackPhi [iprod]->Scale(1./
nEvents[iprod]);
266 hTrackPhiSPD [iprod]->Scale(1./
nEvents[iprod]);
267 hTrackPhiNoSPD[iprod]->Scale(1./
nEvents[iprod]);
269 hTrackPt[iprod]->SetTitle(
"Track spectra with/out SPD");
270 hTrackPt[iprod]->SetYTitle(
"1/N_{events} dN/dp_{T}");
271 hTrackPt[iprod]->SetTitleOffset(1.5,
"Y");
272 hTrackPt[iprod]->SetMarkerColor(
color[iprod]);
273 hTrackPt[iprod]->SetMarkerStyle(20);
274 hTrackPt[iprod]->SetAxisRange(0.,30.,
"X");
278 hTrackPtSPD[iprod]->SetMarkerColor(
color[iprod]);
279 hTrackPtSPD[iprod]->SetMarkerStyle(26);
281 hTrackPtNoSPD[iprod]->SetMarkerColor(
color[iprod]);
282 hTrackPtNoSPD[iprod]->SetMarkerStyle(25);
284 hTrackPhi[iprod]->SetTitle(
"Track #phi with/out SPD");
285 hTrackPhi[iprod]->SetYTitle(
"1/N_{events} dN/d#phi");
286 hTrackPhi[iprod]->SetTitleOffset(1.5,
"Y");
287 hTrackPhi[iprod]->SetMarkerColor(
color[iprod]);
288 hTrackPhi[iprod]->SetMarkerStyle(20);
289 hTrackPhi[iprod]->SetAxisRange(0.,30.,
"X");
293 hTrackPhiSPD[iprod]->SetMarkerColor(
color[iprod]);
294 hTrackPhiSPD[iprod]->SetMarkerStyle(26);
296 hTrackPhiNoSPD[iprod]->SetMarkerColor(
color[iprod]);
297 hTrackPhiNoSPD[iprod]->SetMarkerStyle(25);
301 hRatTrackPhi [iprod-1] = (TH1F*)hTrackPhi [iprod]->Clone(Form(
"hRatTrackPhi%s" ,prod[iprod].
Data()));
302 hRatTrackPhiNoSPD[iprod-1] = (TH1F*)hTrackPhiNoSPD[iprod]->Clone(Form(
"hRatTrackPhiNoSPD%s",prod[iprod].
Data()));
303 hRatTrackPhiSPD [iprod-1] = (TH1F*)hTrackPhiSPD [iprod]->Clone(Form(
"hRatTrackPhiSPD%s" ,prod[iprod].
Data()));
305 hRatTrackPhi [iprod-1]->Divide(hRatTrackPhi [iprod-1],hTrackPhi [0],1.000,1,
"B");
306 hRatTrackPhiSPD [iprod-1]->Divide(hRatTrackPhiSPD [iprod-1],hTrackPhiSPD [0],1.000,1,
"B");
307 hRatTrackPhiNoSPD[iprod-1]->Divide(hRatTrackPhiNoSPD[iprod-1],hTrackPhiNoSPD[0],1.000,1,
"B");
309 hRatTrackPt [iprod-1] = (TH1F*)hTrackPt [iprod]->Clone(Form(
"hRatTrackPt%s" ,prod[iprod].
Data()));
310 hRatTrackPtNoSPD[iprod-1] = (TH1F*)hTrackPtNoSPD[iprod]->Clone(Form(
"hRatTrackPtNoSPD%s",prod[iprod].
Data()));
311 hRatTrackPtSPD [iprod-1] = (TH1F*)hTrackPtSPD [iprod]->Clone(Form(
"hRatTrackPtSPD%s" ,prod[iprod].
Data()));
313 hRatTrackPt [iprod-1]->Divide(hRatTrackPt [iprod-1],hTrackPt [0],1.000,1,
"B");
314 hRatTrackPtSPD [iprod-1]->Divide(hRatTrackPtSPD [iprod-1],hTrackPtSPD [0],1.000,1,
"B");
315 hRatTrackPtNoSPD[iprod-1]->Divide(hRatTrackPtNoSPD[iprod-1],hTrackPtNoSPD[0],1.000,1,
"B");
321 h2XE [iprod]= (
TH2F*)
GetHisto(
"AnaPhotonHadronCorr_hXECharged",iprod);
322 h2XEUE [iprod]= (
TH2F*)
GetHisto(
"AnaPhotonHadronCorr_hXEUeCharged",iprod);
325 TH1F * hTrigger = (TH1F*)
GetHisto(
"AnaPhotonHadronCorr_hPtTrigger",iprod);
326 Int_t minClusterEBin = hTrigger->FindBin(minClusterE);
327 Float_t nTrig = hTrigger->Integral(minClusterE,100000);
329 hXE [iprod] = (TH1F*)h2XE [iprod]->ProjectionY(Form(
"hXE%s" ,prod[iprod].
Data()),minClusterEBin,1000);
330 hXEUE[iprod] = (TH1F*)h2XEUE[iprod]->ProjectionY(Form(
"hXEUE%s",prod[iprod].
Data()),minClusterEBin,1000);
332 hXE [iprod]->Sumw2();
333 hXEUE[iprod]->Sumw2();
335 hXE [iprod]->Scale(1./nTrig);
336 hXEUE[iprod]->Scale(1./nTrig);
338 hXE[iprod]->SetTitle(Form(
"#gamma-hadron x_{E}, p_{T,Trig}>%2.1f GeV/c",minClusterE));
339 hXE[iprod]->SetYTitle(
"1/N_{trigger} dN/dx_{E}");
340 hXE[iprod]->SetTitleOffset(1.5,
"Y");
341 hXE[iprod]->SetMarkerColor(
color[iprod]);
342 hXE[iprod]->SetMarkerStyle(20);
343 hXE[iprod]->SetAxisRange(0.,1.,
"X");
347 hXEUE[iprod]->SetMarkerColor(
color[iprod]);
348 hXEUE[iprod]->SetMarkerStyle(25);
352 hRatXE [iprod-1] = (TH1F*)hXE [iprod]->Clone(Form(
"hRatXE%s" ,prod[iprod].
Data()));
353 hRatXEUE[iprod-1] = (TH1F*)hXEUE[iprod]->Clone(Form(
"hRatXEUE%s",prod[iprod].
Data()));
355 hRatXE [iprod-1]->Divide(hRatXE [iprod-1],hXE [0],1.000,1,
"B");
356 hRatXEUE[iprod-1]->Divide(hRatXEUE[iprod-1],hXEUE[0],1.000,1,
"B");
362 hCen[iprod] = (TH1F*)
GetHisto(
"hCentrality",iprod);
364 hCen[iprod]->Sumw2();
366 hCen[iprod]->Scale(1./
nEvents[iprod]);
368 hCen[iprod]->SetTitle(
"Centrality");
369 hCen[iprod]->SetYTitle(
"1/N_{events} dN/d centrality");
370 hCen[iprod]->SetTitleOffset(1.5,
"Y");
371 hCen[iprod]->SetMarkerColor(
color[iprod]);
372 hCen[iprod]->SetMarkerStyle(20);
379 hRatCen[iprod-1] = (TH1F*)hCen[iprod]->Clone(Form(
"hRatCen%s" ,prod[iprod].
Data()));
381 hRatCen[iprod-1]->Divide(hRatCen[iprod-1],hCen [0],1.000,1,
"B");
387 hVertex[0][iprod] = (TH1F*)
GetHisto(
"hZVertex",iprod);
388 hVertex[1][iprod] = (TH1F*)
GetHisto(
"hYVertex",iprod);
389 hVertex[2][iprod] = (TH1F*)
GetHisto(
"hXVertex",iprod);
391 hVertex[0][iprod]->Sumw2();
392 hVertex[1][iprod]->Sumw2();
393 hVertex[2][iprod]->Sumw2();
395 for(
Int_t ivertex = 0; ivertex < 3; ivertex++)
399 hVertex[ivertex][iprod]->Scale(1./
nEvents[iprod]);
402 hVertex[ivertex][iprod]->SetYTitle(
"1/N_{events} dN/ d vertex");
403 hVertex[ivertex][iprod]->SetTitleOffset(1.5,
"Y");
404 hVertex[ivertex][iprod]->SetMarkerColor(
color[iprod]);
405 hVertex[ivertex][iprod]->SetLineColor(
color[iprod]);
406 hVertex[ivertex][iprod]->SetMarkerStyle(20);
407 if(ivertex==0)hVertex[ivertex][iprod]->SetAxisRange(-10,10.,
"X");
408 else hVertex[ivertex][iprod]->SetAxisRange(-1.5,1.5,
"X");
414 hRatVertex[ivertex][iprod-1] = (TH1F*)hVertex[ivertex][iprod]->Clone(Form(
"hRatVertex%s_%d" ,prod[iprod].
Data(),ivertex));
416 hRatVertex[ivertex][iprod-1]->Divide(hRatVertex[ivertex][iprod-1],hVertex[ivertex][0],1.000,1,
"B");
428 TLegend lprod(0.3,0.475,0.84,0.675);
429 lprod.SetTextSize(0.04);
430 lprod.SetBorderSize(0);
431 lprod.SetFillColor(0);
435 TCanvas * ccalo =
new TCanvas(Form(
"Cluster_%s",histoTag.Data()),
"",1000,500);
444 hRaw [iprod]->Draw(
"same");
445 hCorr[iprod]->Draw(
"same");
446 hTM [iprod]->Draw(
"same");
447 hShSh[iprod]->Draw(
"same");
449 lprod.AddEntry(hRaw[iprod],prod[iprod],
"P");
454 TLegend lcl(0.35,0.7,0.84,0.89);
455 lcl.SetTextSize(0.04);
456 lcl.SetBorderSize(0);
458 lcl.AddEntry(hRaw [0],
"Raw",
"P");
459 lcl.AddEntry(hCorr[0],
"No Exotics + non lin.",
"P");
460 lcl.AddEntry(hTM [0],
"+ Track matching",
"P");
461 lcl.AddEntry(hShSh[0],
"+ #lambda^{2}_{0} < 0.4",
"P");
467 hRatCorr[0]->SetTitle(
"Cluster spectra ratio");
468 hRatCorr[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
469 hRatCorr[0]->SetMinimum(0.850);
470 hRatCorr[0]->SetMaximum(1.025);
471 hRatCorr[0]->Draw(
"");
473 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
475 hRatRaw [iprod]->Draw(
"same");
476 hRatCorr[iprod]->Draw(
"same");
477 hRatTM [iprod]->Draw(
"same");
478 hRatShSh[iprod]->Draw(
"same");
482 TLine l2(0,0.975,30,0.975);
483 TLine l3(0,0.95,30,0.95);
484 TLine l4(0,0.925,30,0.925);
491 ccalo->Print(Form(
"%s_ClusterSpectraComp.eps",histoTag.Data()));
496 TLine l0(0,hTrackMatchResEtaNeg[0]->GetMinimum(),0,hTrackMatchResEtaNeg[0]->GetMaximum()*1.2);
498 TLegend lres(0.6,0.75,0.84,0.89);
499 lres.SetTextSize(0.04);
501 lres.SetFillColor(0);
502 lres.AddEntry(hTrackMatchResEtaNeg[0],
"Negative",
"P");
503 lres.AddEntry(hTrackMatchResEtaPos[0],
"Positive",
"P");
506 TCanvas * ccalo2 =
new TCanvas(Form(
"MatchingResiduals_%s",histoTag.Data()),
"",500,500);
512 hTrackMatchResEtaPos[0]->Draw(
"");
515 hTrackMatchResEtaNeg[iprod]->Draw(
"same");
516 hTrackMatchResEtaPos[iprod]->Draw(
"same");
524 hTrackMatchResPhiPos[0]->Draw(
"");
527 hTrackMatchResPhiNeg[iprod]->Draw(
"same");
528 hTrackMatchResPhiPos[iprod]->Draw(
"same");
536 hRatTrackMatchResEtaPos[0]->SetMaximum(1.25);
537 hRatTrackMatchResEtaPos[0]->SetMinimum(0.98);
538 hRatTrackMatchResEtaPos[0]->Draw(
"");
539 hRatTrackMatchResEtaPos[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
540 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
542 hRatTrackMatchResEtaNeg[iprod]->Draw(
"same");
543 hRatTrackMatchResEtaPos[iprod]->Draw(
"same");
550 hRatTrackMatchResPhiPos[0]->SetMaximum(1.20);
551 hRatTrackMatchResPhiPos[0]->SetMinimum(0.95);
552 hRatTrackMatchResPhiPos[0]->Draw(
"");
553 hRatTrackMatchResPhiPos[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
554 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
556 hRatTrackMatchResPhiNeg[iprod]->Draw(
"same");
557 hRatTrackMatchResPhiPos[iprod]->Draw(
"same");
560 ccalo2->Print(Form(
"%s_MatchingResidualsComp.eps",histoTag.Data()));
565 TLegend ltrack(0.6,0.75,0.84,0.89);
566 ltrack.SetTextSize(0.04);
568 ltrack.SetFillColor(0);
569 ltrack.AddEntry(hTrackPt [0],
"All",
"P");
570 ltrack.AddEntry(hTrackPtSPD [0],
"SPD",
"P");
571 ltrack.AddEntry(hTrackPtNoSPD[0],
"No SPD",
"P");
573 TCanvas * ctrack =
new TCanvas(Form(
"TrackHisto_%s",histoTag.Data()),
"",1500,1500);
577 hTrackPt[0]->Draw(
"");
580 hTrackPt [iprod]->Draw(
"same");
581 hTrackPtSPD [iprod]->Draw(
"same");
582 hTrackPtNoSPD[iprod]->Draw(
"same");
590 hRatTrackPt[0]->SetMaximum(1.05);
591 hRatTrackPt[0]->SetMinimum(0.95);
592 hRatTrackPt[0]->Draw(
"");
593 hRatTrackPt[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
594 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
596 hRatTrackPt [iprod]->Draw(
"same");
597 hRatTrackPtSPD [iprod]->Draw(
"same");
598 hRatTrackPtNoSPD[iprod]->Draw(
"same");
602 hTrackPhi[0]->SetMaximum(3.);
603 hTrackPhi[0]->SetMinimum(0.);
604 hTrackPhi[0]->Draw(
"");
607 hTrackPhi [iprod]->Draw(
"same");
608 hTrackPhiSPD [iprod]->Draw(
"same");
609 hTrackPhiNoSPD[iprod]->Draw(
"same");
615 hRatTrackPhi[0]->SetMaximum(1.05);
616 hRatTrackPhi[0]->SetMinimum(0.95);
617 hRatTrackPhi[0]->Draw(
"");
618 hRatTrackPhi[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
619 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
621 hRatTrackPhi [iprod]->Draw(
"same");
622 hRatTrackPhiSPD [iprod]->Draw(
"same");
623 hRatTrackPhiNoSPD[iprod]->Draw(
"same");
626 ctrack->Print(Form(
"%s_TrackComp.eps",histoTag.Data()));
631 TLegend lxe(0.6,0.75,0.84,0.89);
632 lxe.SetTextSize(0.04);
635 lxe.AddEntry(hXE [0],
"Signal+bkg",
"P");
636 lxe.AddEntry(hXEUE[0],
"Und. Event",
"P");
638 TCanvas * cxe =
new TCanvas(Form(
"XEHisto_%s",histoTag.Data()),
"",1000,500);
645 hXE [iprod]->Draw(
"same");
646 hXEUE[iprod]->Draw(
"same");
654 hRatXE[0]->SetMaximum(1.05);
655 hRatXE[0]->SetMinimum(0.95);
657 hRatXE[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
658 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
660 hRatXE [iprod]->Draw(
"same");
661 hRatXEUE[iprod]->Draw(
"same");
664 cxe->Print(Form(
"%s_XEComp.eps",histoTag.Data()));
669 TCanvas * ccen =
new TCanvas(Form(
"Centrality_%s",histoTag.Data()),
"",1000,500);
678 hCen[iprod]->Draw(
"same");
686 hRatCen[0]->SetTitle(
"Centrality");
687 hRatCen[0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
688 hRatCen[0]->SetMinimum(0.95);
689 hRatCen[0]->SetMaximum(1.05);
690 hRatCen[0]->Draw(
"");
692 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
694 hRatCen [iprod]->Draw(
"same");
701 ccen->Print(Form(
"%s_CentralityComp.eps",histoTag.Data()));
706 TCanvas * cvertex =
new TCanvas(Form(
"Vertex_%s",histoTag.Data()),
"",3*500,2*500);
707 cvertex->Divide(3,2);
709 for(
Int_t ivertex = 0; ivertex < 3; ivertex++)
711 cvertex->cd(npannel);
714 hVertex[ivertex][0]->Draw();
717 hVertex[ivertex][iprod]->Draw(
"same");
722 cvertex->cd(npannel+3);
726 hRatVertex[ivertex][0]->SetYTitle(Form(
"data X / %s",prod[0].
Data()));
727 hRatVertex[ivertex][0]->SetMinimum(0.90);
728 hRatVertex[ivertex][0]->SetMaximum(1.10);
729 hRatVertex[ivertex][0]->Draw(
"");
731 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
733 hRatVertex[ivertex][iprod]->Draw(
"same");
738 cvertex->Print(Form(
"%s_VertexComp.eps",histoTag.Data()));
750 file[iprod] =
new TFile(Form(
"%s/%s",prod[iprod].
Data(),fileName.Data()),
"read");
751 if(
file[iprod]->Get(
"hNEvents"))
753 nEvents[iprod] = ((TH1F*)
file[iprod]->Get(
"hNEvents"))->GetEntries();
754 printf(
"%s: nEvents %e\n",prod[iprod].
Data(),
nEvents[iprod]);
757 TDirectory * dir = (TDirectory*)
file[iprod]->Get(listName);
760 list[iprod] = (
TList*) dir->Get(listName);
762 printf(
"%s: nEvents %e\n",prod[iprod],
nEvents[iprod]);
764 else list[iprod] = 0;
774 if(list[iprod])
return list[iprod]->FindObject(histoName);
775 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