44 #if !defined(__CINT__) || defined(__MAKECINT__)
47 #include <TDirectoryFile.h>
69 TString listName =
"Pi0IM_GammaTrackCorr_EMCAL");
87 TString prod [] = {
"DCAoffPIDoff",
"DCAonPIDoff",
"DCAoffPIDon",
"DCAonPIDon"};
89 TString prodLeg[] = {
"DCA off - PID off",
"DCA on - PID off",
"DCA off - PID on",
"DCA on - PID on"};
101 Int_t color[]={kBlack,kRed,kBlue,kOrange+1,kYellow+1,kGreen+2,kCyan+1,kViolet,kMagenta+2,kGray};
113 TString listName =
"Pi0IM_GammaTrackCorr_EMCAL",
120 printf(
"Open <%s>; Get List : <%s>; format %s\n",
fileName.Data(),listName.Data(),format.Data());
155 gStyle->SetOptTitle(1);
156 gStyle->SetOptStat(0);
157 gStyle->SetOptFit(000000);
158 gStyle->SetPadRightMargin(0.02);
161 gStyle->SetTitleFontSize(0.05);
165 if (trigName.Contains(
"EMCAL")) { calo = 0 ; nCalo = 1 ; }
166 else if(trigName.Contains(
"DCAL" )) { calo = 1 ; nCalo = 2 ; }
168 TString caloString [] = {
"EMCAL",
"DCAL"};
179 for(
Int_t icalo = calo; icalo < nCalo; icalo++)
181 if(trigName.Contains(
"default")) histoTag=Form(
"%s_%s",caloString[icalo].
Data(),trigName.Data());
209 TH1F* hRatRaw [
nProd-1];
210 TH1F* hRatCorr[
nProd-1];
211 TH1F* hRatTM [
nProd-1];
212 TH1F* hRatShSh[
nProd-1];
219 TH1F* hTrackMatchResEtaNeg[
nProd];
220 TH1F* hTrackMatchResEtaPos[
nProd];
221 TH1F* hTrackMatchResPhiNeg[
nProd];
222 TH1F* hTrackMatchResPhiPos[
nProd];
224 TH1F* hRatTrackMatchResEtaNeg[
nProd-1];
225 TH1F* hRatTrackMatchResEtaPos[
nProd-1];
226 TH1F* hRatTrackMatchResPhiNeg[
nProd-1];
227 TH1F* hRatTrackMatchResPhiPos[
nProd-1];
229 TH2F* h2TrackMatchResEtaNegTrackPt[
nProd];
230 TH2F* h2TrackMatchResEtaPosTrackPt[
nProd];
231 TH2F* h2TrackMatchResPhiNegTrackPt[
nProd];
232 TH2F* h2TrackMatchResPhiPosTrackPt[
nProd];
234 TH1F* hTrackMatchResEtaNegTrackPt[
nProd];
235 TH1F* hTrackMatchResEtaPosTrackPt[
nProd];
236 TH1F* hTrackMatchResPhiNegTrackPt[
nProd];
237 TH1F* hTrackMatchResPhiPosTrackPt[
nProd];
239 TH1F* hRatTrackMatchResEtaNegTrackPt[
nProd-1];
240 TH1F* hRatTrackMatchResEtaPosTrackPt[
nProd-1];
241 TH1F* hRatTrackMatchResPhiNegTrackPt[
nProd-1];
242 TH1F* hRatTrackMatchResPhiPosTrackPt[
nProd-1];
245 TLegend lprod(0.6,0.475,0.95,0.675);
246 lprod.SetTextSize(0.04);
247 lprod.SetBorderSize(0);
248 lprod.SetFillColor(0);
252 hRaw [iprod] = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_Cut_0_Open" ,icalo),iprod);
253 hCorr[iprod] = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_Cut_4_NCells" ,icalo),iprod);
254 hTM [iprod] = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_Cut_7_Matching",icalo),iprod);
255 hShSh[iprod] = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_Cut_9_PID" ,icalo),iprod);
257 if(!hRaw[iprod])
return;
259 hRaw [iprod]->Sumw2();
260 hCorr[iprod]->Sumw2();
261 hTM [iprod]->Sumw2();
262 hShSh[iprod]->Sumw2();
264 hRaw [iprod]->Scale(1./
nEvents[iprod]);
265 hCorr[iprod]->Scale(1./
nEvents[iprod]);
266 hTM [iprod]->Scale(1./
nEvents[iprod]);
267 hShSh[iprod]->Scale(1./
nEvents[iprod]);
269 hRaw[iprod]->SetMarkerColor(
color[iprod]);
270 hRaw[iprod]->SetMarkerStyle(24);
272 hCorr[iprod]->SetTitle(
"Cluster spectra with/out cuts");
273 hCorr[iprod]->SetYTitle(
"1/N_{events} dN/dp_{T}");
275 hCorr[iprod]->SetTitleOffset(1.5,
"Y");
276 hCorr[iprod]->SetMarkerColor(
color[iprod]);
277 hCorr[iprod]->SetMarkerStyle(20);
278 hCorr[iprod]->SetAxisRange(0.,30.,
"X");
282 hTM [iprod]->SetMarkerColor(
color[iprod]);
283 hTM [iprod]->SetMarkerStyle(21);
285 hShSh[iprod]->SetMarkerColor(
color[iprod]);
286 hShSh[iprod]->SetMarkerStyle(22);
288 hRaw [iprod]->SetTitleOffset(1.5,
"Y");
289 hTM [iprod]->SetTitleOffset(1.5,
"Y");
290 hShSh[iprod]->SetTitleOffset(1.5,
"Y");
291 hCorr[iprod]->SetTitleOffset(1.5,
"Y");
295 hRatRaw [iprod-1] = (TH1F*)hRaw [iprod]->Clone(Form(
"hRatRaw%s_%s" ,prod[iprod].
Data(),histoTag.Data()));
296 hRatCorr[iprod-1] = (TH1F*)hCorr[iprod]->Clone(Form(
"hRatCorr%s_%s",prod[iprod].
Data(),histoTag.Data()));
297 hRatTM [iprod-1] = (TH1F*)hTM [iprod]->Clone(Form(
"hRatTM%s_%s" ,prod[iprod].
Data(),histoTag.Data()));
298 hRatShSh[iprod-1] = (TH1F*)hShSh[iprod]->Clone(Form(
"hRatShSh%s_%s",prod[iprod].
Data(),histoTag.Data()));
300 hRatRaw [iprod-1]->Divide(hRatRaw [iprod-1],hRaw [0],1.000,1,
"B");
301 hRatCorr[iprod-1]->Divide(hRatCorr[iprod-1],hCorr[0],0.975,1,
"B");
302 hRatTM [iprod-1]->Divide(hRatTM [iprod-1],hTM [0],0.950,1,
"B");
303 hRatShSh[iprod-1]->Divide(hRatShSh[iprod-1],hShSh[0],0.925,1,
"B");
309 h2TrackMatchResEtaNeg[iprod] = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDEtaNegNoCut",icalo),iprod);
310 h2TrackMatchResEtaPos[iprod] = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDEtaPosNoCut",icalo),iprod);
311 h2TrackMatchResPhiNeg[iprod] = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDPhiNegNoCut",icalo),iprod);
312 h2TrackMatchResPhiPos[iprod] = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDPhiPosNoCut",icalo),iprod);
316 if ( histoTag.Contains(
"L0") )
321 else if ( histoTag.Contains(
"L1") )
326 else if ( histoTag.Contains(
"L2") )
332 Float_t binMin = h2TrackMatchResEtaNeg[iprod]->GetXaxis()->FindBin(emin);
333 Float_t binMax = h2TrackMatchResEtaNeg[iprod]->GetXaxis()->FindBin(emax);
335 hTrackMatchResEtaNeg[iprod] =
336 (TH1F*) h2TrackMatchResEtaNeg[iprod]->ProjectionY(Form(
"TMProjEtaNeg%s_%s",
337 prod[iprod].
Data(),histoTag.Data()),binMin, binMax);
338 hTrackMatchResEtaPos[iprod] =
339 (TH1F*) h2TrackMatchResEtaPos[iprod]->ProjectionY(Form(
"TMProjEtaPos%s_%s",
340 prod[iprod].
Data(),histoTag.Data()),binMin, binMax);
341 hTrackMatchResPhiNeg[iprod] =
342 (TH1F*) h2TrackMatchResPhiNeg[iprod]->ProjectionY(Form(
"TMProjPhiNeg%s_%s",
343 prod[iprod].
Data(),histoTag.Data()),binMin, binMax);
344 hTrackMatchResPhiPos[iprod] =
345 (TH1F*) h2TrackMatchResPhiPos[iprod]->ProjectionY(Form(
"TMProjPhiPos%s_%s",
346 prod[iprod].
Data(),histoTag.Data()),binMin, binMax);
348 hTrackMatchResEtaNeg[iprod]->SetXTitle(
"#Delta #eta");
349 hTrackMatchResEtaNeg[iprod]->SetYTitle(
"Entries / N events");
350 hTrackMatchResEtaNeg[iprod]->SetTitle(Form(
"Track-cluster #eta residuals, %2.1f < #it{E}^{cluster} < %2.1f GeV",emin,emax));
351 hTrackMatchResEtaNeg[iprod]->SetAxisRange(-0.025,0.025,
"X");
352 hTrackMatchResEtaNeg[iprod]->Sumw2();
353 hTrackMatchResEtaNeg[iprod]->SetMarkerStyle(24);
354 hTrackMatchResEtaNeg[iprod]->SetMarkerColor(
color[iprod]);
356 hTrackMatchResEtaPos[iprod]->Sumw2();
357 hTrackMatchResEtaPos[iprod]->SetYTitle(
"Entries / N events");
358 hTrackMatchResEtaPos[iprod]->SetXTitle(
"#Delta #eta");
359 hTrackMatchResEtaPos[iprod]->SetTitle(Form(
"Track-cluster #eta residuals, %2.1f < #it{E}^{cluster} < %2.1f GeV",emin,emax));
360 hTrackMatchResEtaPos[iprod]->SetAxisRange(-0.025,0.025,
"X");
361 hTrackMatchResEtaPos[iprod]->SetMarkerStyle(25);
362 hTrackMatchResEtaPos[iprod]->SetMarkerColor(
color[iprod]);
364 hTrackMatchResPhiNeg[iprod]->SetXTitle(
"#Delta #varphi");
365 hTrackMatchResPhiNeg[iprod]->SetTitle(Form(
"Track-cluster #varphi residuals, %2.1f < #it{E}^{cluster} < %2.1f GeV",emin,emax));
366 hTrackMatchResPhiNeg[iprod]->SetYTitle(
"entries / N events");
367 hTrackMatchResPhiNeg[iprod]->SetAxisRange(-0.025,0.025,
"X");
368 hTrackMatchResPhiNeg[iprod]->Sumw2();
369 hTrackMatchResPhiNeg[iprod]->SetMarkerStyle(24);
370 hTrackMatchResPhiNeg[iprod]->SetMarkerColor(
color[iprod]);
372 hTrackMatchResPhiPos[iprod]->Sumw2();
373 hTrackMatchResPhiPos[iprod]->SetYTitle(
"Entries / N events");
374 hTrackMatchResPhiPos[iprod]->SetXTitle(
"#Delta #varphi");
375 hTrackMatchResPhiPos[iprod]->SetTitle(Form(
"Track-cluster #varphi residuals, %2.1f < #it{E}^{cluster} < %2.1f GeV",emin,emax));
376 hTrackMatchResPhiPos[iprod]->SetAxisRange(-0.025,0.025,
"X");
377 hTrackMatchResPhiPos[iprod]->SetMarkerStyle(25);
378 hTrackMatchResPhiPos[iprod]->SetMarkerColor(
color[iprod]);
380 hTrackMatchResEtaNeg[iprod]->Scale(1./
nEvents[iprod]);
381 hTrackMatchResEtaPos[iprod]->Scale(1./
nEvents[iprod]);
382 hTrackMatchResPhiNeg[iprod]->Scale(1./
nEvents[iprod]);
383 hTrackMatchResPhiPos[iprod]->Scale(1./
nEvents[iprod]);
385 hTrackMatchResEtaNeg[iprod]->SetTitleOffset(1.5,
"Y");
386 hTrackMatchResEtaPos[iprod]->SetTitleOffset(1.5,
"Y");
387 hTrackMatchResPhiNeg[iprod]->SetTitleOffset(1.5,
"Y");
388 hTrackMatchResPhiPos[iprod]->SetTitleOffset(1.5,
"Y");
392 hRatTrackMatchResPhiPos[iprod-1] =
393 (TH1F*)hTrackMatchResPhiPos[iprod]->Clone(Form(
"hRatPhiPos%s_%s",prod[iprod].
Data(),histoTag.Data()));
394 hRatTrackMatchResPhiNeg[iprod-1] =
395 (TH1F*)hTrackMatchResPhiNeg[iprod]->Clone(Form(
"hRatPhiNeg%s_%s",prod[iprod].
Data(),histoTag.Data()));
396 hRatTrackMatchResEtaPos[iprod-1] =
397 (TH1F*)hTrackMatchResEtaPos[iprod]->Clone(Form(
"hRatEtaPos%s_%s",prod[iprod].
Data(),histoTag.Data()));
398 hRatTrackMatchResEtaNeg[iprod-1] =
399 (TH1F*)hTrackMatchResEtaNeg[iprod]->Clone(Form(
"hRatEtaNeg%s_%s",prod[iprod].
Data(),histoTag.Data()));
401 hRatTrackMatchResPhiPos[iprod-1]->Divide(hRatTrackMatchResPhiPos[iprod-1],hTrackMatchResPhiPos[0],1.000,1,
"B");
402 hRatTrackMatchResPhiNeg[iprod-1]->Divide(hRatTrackMatchResPhiNeg[iprod-1],hTrackMatchResPhiNeg[0],1.000,1,
"B");
403 hRatTrackMatchResEtaPos[iprod-1]->Divide(hRatTrackMatchResEtaPos[iprod-1],hTrackMatchResEtaPos[0],1.000,1,
"B");
404 hRatTrackMatchResEtaNeg[iprod-1]->Divide(hRatTrackMatchResEtaNeg[iprod-1],hTrackMatchResEtaNeg[0],1.000,1,
"B");
408 h2TrackMatchResEtaNegTrackPt[iprod] = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDEtaNegTrackPtNoCut",icalo),iprod);
409 h2TrackMatchResEtaPosTrackPt[iprod] = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDEtaPosTrackPtNoCut",icalo),iprod);
410 h2TrackMatchResPhiNegTrackPt[iprod] = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDPhiNegTrackPtNoCut",icalo),iprod);
411 h2TrackMatchResPhiPosTrackPt[iprod] = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDPhiPosTrackPtNoCut",icalo),iprod);
413 if ( !h2TrackMatchResEtaNegTrackPt[iprod] )
continue;
415 binMin = h2TrackMatchResEtaNegTrackPt[iprod]->GetXaxis()->FindBin(emin);
416 binMax = h2TrackMatchResEtaNegTrackPt[iprod]->GetXaxis()->FindBin(emax);
418 hTrackMatchResEtaNegTrackPt[iprod] =
419 (TH1F*) h2TrackMatchResEtaNegTrackPt[iprod]->ProjectionY(Form(
"TMProjEtaNegTrackPt%s_%s",
420 prod[iprod].
Data(),histoTag.Data()),binMin, binMax);
421 hTrackMatchResEtaPosTrackPt[iprod] =
422 (TH1F*) h2TrackMatchResEtaPosTrackPt[iprod]->ProjectionY(Form(
"TMProjEtaPosTrackPt%s_%s",
423 prod[iprod].
Data(),histoTag.Data()),binMin, binMax);
424 hTrackMatchResPhiNegTrackPt[iprod] =
425 (TH1F*) h2TrackMatchResPhiNegTrackPt[iprod]->ProjectionY(Form(
"TMProjPhiNegTrackPt%s_%s",
426 prod[iprod].
Data(),histoTag.Data()),binMin, binMax);
427 hTrackMatchResPhiPosTrackPt[iprod] =
428 (TH1F*) h2TrackMatchResPhiPosTrackPt[iprod]->ProjectionY(Form(
"TMProjPhiPosTrackPt%s_%s",
429 prod[iprod].
Data(),histoTag.Data()),binMin, binMax);
431 hTrackMatchResEtaNegTrackPt[iprod]->SetXTitle(
"#Delta #eta");
432 hTrackMatchResEtaNegTrackPt[iprod]->SetYTitle(
"Entries / N events");
433 hTrackMatchResEtaNegTrackPt[iprod]->SetTitle(Form(
"Track-cluster #eta residuals, %2.1f < #it{p}_{T}^{track} < %2.1f GeV",emin,emax));
434 hTrackMatchResEtaNegTrackPt[iprod]->SetAxisRange(-0.025,0.025,
"X");
435 hTrackMatchResEtaNegTrackPt[iprod]->Sumw2();
436 hTrackMatchResEtaNegTrackPt[iprod]->SetMarkerStyle(24);
437 hTrackMatchResEtaNegTrackPt[iprod]->SetMarkerColor(
color[iprod]);
439 hTrackMatchResEtaPosTrackPt[iprod]->Sumw2();
440 hTrackMatchResEtaPosTrackPt[iprod]->SetYTitle(
"Entries / N events");
441 hTrackMatchResEtaPosTrackPt[iprod]->SetXTitle(
"#Delta #eta");
442 hTrackMatchResEtaPosTrackPt[iprod]->SetTitle(Form(
"Track-cluster #eta residuals, %2.1f < #it{p}_{T}^{track} < %2.1f GeV",emin,emax));
443 hTrackMatchResEtaPosTrackPt[iprod]->SetAxisRange(-0.025,0.025,
"X");
444 hTrackMatchResEtaPosTrackPt[iprod]->SetMarkerStyle(25);
445 hTrackMatchResEtaPosTrackPt[iprod]->SetMarkerColor(
color[iprod]);
447 hTrackMatchResPhiNegTrackPt[iprod]->SetXTitle(
"#Delta #varphi");
448 hTrackMatchResPhiNegTrackPt[iprod]->SetTitle(Form(
"Track-cluster #varphi residuals, %2.1f < #it{p}_{T}^{track} < %2.1f GeV",emin,emax));
449 hTrackMatchResPhiNegTrackPt[iprod]->SetYTitle(
"entries / N events");
450 hTrackMatchResPhiNegTrackPt[iprod]->SetAxisRange(-0.025,0.025,
"X");
451 hTrackMatchResPhiNegTrackPt[iprod]->Sumw2();
452 hTrackMatchResPhiNegTrackPt[iprod]->SetMarkerStyle(24);
453 hTrackMatchResPhiNegTrackPt[iprod]->SetMarkerColor(
color[iprod]);
455 hTrackMatchResPhiPosTrackPt[iprod]->Sumw2();
456 hTrackMatchResPhiPosTrackPt[iprod]->SetYTitle(
"Entries / N events");
457 hTrackMatchResPhiPosTrackPt[iprod]->SetXTitle(
"#Delta #varphi");
458 hTrackMatchResPhiPosTrackPt[iprod]->SetTitle(Form(
"Track-cluster #varphi residuals, %2.1f < #it{p}_{T}^{track} < %2.1f GeV",emin,emax));
459 hTrackMatchResPhiPosTrackPt[iprod]->SetAxisRange(-0.025,0.025,
"X");
460 hTrackMatchResPhiPosTrackPt[iprod]->SetMarkerStyle(25);
461 hTrackMatchResPhiPosTrackPt[iprod]->SetMarkerColor(
color[iprod]);
463 hTrackMatchResEtaNegTrackPt[iprod]->Scale(1./
nEvents[iprod]);
464 hTrackMatchResEtaPosTrackPt[iprod]->Scale(1./
nEvents[iprod]);
465 hTrackMatchResPhiNegTrackPt[iprod]->Scale(1./
nEvents[iprod]);
466 hTrackMatchResPhiPosTrackPt[iprod]->Scale(1./
nEvents[iprod]);
468 hTrackMatchResEtaNegTrackPt[iprod]->SetTitleOffset(1.5,
"Y");
469 hTrackMatchResEtaPosTrackPt[iprod]->SetTitleOffset(1.5,
"Y");
470 hTrackMatchResPhiNegTrackPt[iprod]->SetTitleOffset(1.5,
"Y");
471 hTrackMatchResPhiPosTrackPt[iprod]->SetTitleOffset(1.5,
"Y");
475 hRatTrackMatchResPhiPosTrackPt[iprod-1] =
476 (TH1F*)hTrackMatchResPhiPosTrackPt[iprod]->Clone(Form(
"hRatPhiPos%s_%s",prod[iprod].
Data(),histoTag.Data()));
477 hRatTrackMatchResPhiNegTrackPt[iprod-1] =
478 (TH1F*)hTrackMatchResPhiNegTrackPt[iprod]->Clone(Form(
"hRatPhiNeg%s_%s",prod[iprod].
Data(),histoTag.Data()));
479 hRatTrackMatchResEtaPosTrackPt[iprod-1] =
480 (TH1F*)hTrackMatchResEtaPosTrackPt[iprod]->Clone(Form(
"hRatEtaPos%s_%s",prod[iprod].
Data(),histoTag.Data()));
481 hRatTrackMatchResEtaNegTrackPt[iprod-1] =
482 (TH1F*)hTrackMatchResEtaNegTrackPt[iprod]->Clone(Form(
"hRatEtaNeg%s_%s",prod[iprod].
Data(),histoTag.Data()));
484 hRatTrackMatchResPhiPosTrackPt[iprod-1]->Divide(hRatTrackMatchResPhiPosTrackPt[iprod-1],hTrackMatchResPhiPosTrackPt[0],1.000,1,
"B");
485 hRatTrackMatchResPhiNegTrackPt[iprod-1]->Divide(hRatTrackMatchResPhiNegTrackPt[iprod-1],hTrackMatchResPhiNegTrackPt[0],1.000,1,
"B");
486 hRatTrackMatchResEtaPosTrackPt[iprod-1]->Divide(hRatTrackMatchResEtaPosTrackPt[iprod-1],hTrackMatchResEtaPosTrackPt[0],1.000,1,
"B");
487 hRatTrackMatchResEtaNegTrackPt[iprod-1]->Divide(hRatTrackMatchResEtaNegTrackPt[iprod-1],hTrackMatchResEtaNegTrackPt[0],1.000,1,
"B");
497 TCanvas * ccalo =
new TCanvas(Form(
"Cluster_%s",histoTag.Data()),
"",1000,500);
507 hRaw [iprod]->Draw(
"same");
508 hCorr[iprod]->Draw(
"same");
509 hTM [iprod]->Draw(
"same");
510 hShSh[iprod]->Draw(
"same");
512 lprod.AddEntry(hRaw[iprod],prodLeg[iprod],
"P");
517 TLegend lcl(0.55,0.7,0.95,0.89);
518 lcl.SetTextSize(0.04);
519 lcl.SetBorderSize(0);
521 lcl.AddEntry(hRaw [0],
"Raw",
"P");
522 lcl.AddEntry(hCorr[0],
"No Exotics + non lin.",
"P");
523 lcl.AddEntry(hTM [0],
"+ Track matching",
"P");
524 lcl.AddEntry(hShSh[0],
"+ #lambda^{2}_{0} < 0.4",
"P");
531 hRatCorr[0]->SetTitle(
"Cluster spectra ratio");
532 hRatCorr[0]->SetYTitle(Form(
"Ratio data X / %s",prodLeg[0].
Data()));
533 hRatCorr[0]->SetMinimum(0.850);
534 hRatCorr[0]->SetMaximum(1.025);
535 hRatCorr[0]->Draw(
"");
537 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
539 hRatRaw [iprod]->Draw(
"same");
540 hRatCorr[iprod]->Draw(
"same");
541 hRatTM [iprod]->Draw(
"same");
542 hRatShSh[iprod]->Draw(
"same");
546 TLine l2(0,0.975,30,0.975);
547 TLine l3(0,0.95,30,0.95);
548 TLine l4(0,0.925,30,0.925);
555 ccalo->Print(Form(
"%s_ClusterSpectraComp.%s",histoTag.Data(),format.Data()));
560 TGaxis::SetMaxDigits(3);
562 TLine l0Eta(0,hTrackMatchResEtaNeg[0]->GetMinimum(),0,hTrackMatchResEtaNeg[0]->GetMaximum());
564 TLegend lres(0.6,0.75,0.84,0.89);
565 lres.SetTextSize(0.04);
567 lres.SetFillColor(0);
568 lres.AddEntry(hTrackMatchResEtaNeg[0],
"Negative",
"P");
569 lres.AddEntry(hTrackMatchResEtaPos[0],
"Positive",
"P");
572 TCanvas * ccalo2 =
new TCanvas(Form(
"MatchingResiduals_%s",histoTag.Data()),
"",1000,1000);
578 hTrackMatchResEtaPos[0]->SetMaximum(hTrackMatchResEtaPos[0]->GetMaximum()*1.3);
580 hTrackMatchResEtaPos[0]->Draw(
"");
583 hTrackMatchResEtaNeg[iprod]->Draw(
"same");
584 hTrackMatchResEtaPos[iprod]->Draw(
"same");
587 l0Eta.SetLineColor(2);
588 l0Eta.SetLineWidth(2);
595 hTrackMatchResPhiPos[0]->Draw(
"");
598 hTrackMatchResPhiNeg[iprod]->Draw(
"same");
599 hTrackMatchResPhiPos[iprod]->Draw(
"same");
602 TLine l0Phi(0,hTrackMatchResPhiNeg[0]->GetMinimum(),0,hTrackMatchResPhiNeg[0]->GetMaximum());
603 l0Phi.SetLineColor(2);
604 l0Phi.SetLineWidth(2);
610 hRatTrackMatchResEtaPos[0]->SetMaximum(1.2);
611 hRatTrackMatchResEtaPos[0]->SetMinimum(0.8);
612 hRatTrackMatchResEtaPos[0]->Draw(
"");
613 hRatTrackMatchResEtaPos[0]->SetYTitle(Form(
"Ratio data X / %s",prodLeg[0].
Data()));
614 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
616 hRatTrackMatchResEtaNeg[iprod]->Draw(
"same");
617 hRatTrackMatchResEtaPos[iprod]->Draw(
"same");
624 hRatTrackMatchResPhiPos[0]->SetMaximum(1.2);
625 hRatTrackMatchResPhiPos[0]->SetMinimum(0.8);
626 hRatTrackMatchResPhiPos[0]->Draw(
"");
627 hRatTrackMatchResPhiPos[0]->SetYTitle(Form(
"Ratio data X / %s",prodLeg[0].
Data()));
628 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
630 hRatTrackMatchResPhiNeg[iprod]->Draw(
"same");
631 hRatTrackMatchResPhiPos[iprod]->Draw(
"same");
634 ccalo2->Print(Form(
"%s_MatchingResidualsComp.%s",histoTag.Data(),format.Data()));
638 if ( h2TrackMatchResEtaNegTrackPt[0] )
640 TGaxis::SetMaxDigits(3);
642 TLine l0Eta(0,hTrackMatchResEtaNeg[0]->GetMinimum(),0,hTrackMatchResEtaNeg[0]->GetMaximum());
644 TLegend lres(0.6,0.75,0.84,0.89);
645 lres.SetTextSize(0.04);
647 lres.SetFillColor(0);
648 lres.AddEntry(hTrackMatchResEtaNeg[0],
"Negative",
"P");
649 lres.AddEntry(hTrackMatchResEtaPos[0],
"Positive",
"P");
652 TCanvas * ccalo3 =
new TCanvas(Form(
"MatchingResiduals_TrackPtBin_%s",histoTag.Data()),
"",1000,1000);
658 hTrackMatchResEtaPosTrackPt[0]->SetMaximum(hTrackMatchResEtaPosTrackPt[0]->GetMaximum()*1.3);
660 hTrackMatchResEtaPosTrackPt[0]->Draw(
"");
663 hTrackMatchResEtaNegTrackPt[iprod]->Draw(
"same");
664 hTrackMatchResEtaPosTrackPt[iprod]->Draw(
"same");
667 l0Eta.SetLineColor(2);
668 l0Eta.SetLineWidth(2);
675 hTrackMatchResPhiPosTrackPt[0]->Draw(
"");
678 hTrackMatchResPhiNegTrackPt[iprod]->Draw(
"same");
679 hTrackMatchResPhiPosTrackPt[iprod]->Draw(
"same");
682 TLine l0Phi(0,hTrackMatchResPhiNegTrackPt[0]->GetMinimum(),0,hTrackMatchResPhiNegTrackPt[0]->GetMaximum());
683 l0Phi.SetLineColor(2);
684 l0Phi.SetLineWidth(2);
690 hRatTrackMatchResEtaPosTrackPt[0]->SetMaximum(1.2);
691 hRatTrackMatchResEtaPosTrackPt[0]->SetMinimum(0.8);
692 hRatTrackMatchResEtaPosTrackPt[0]->Draw(
"");
693 hRatTrackMatchResEtaPosTrackPt[0]->SetYTitle(Form(
"Ratio data X / %s",prodLeg[0].
Data()));
694 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
696 hRatTrackMatchResEtaNegTrackPt[iprod]->Draw(
"same");
697 hRatTrackMatchResEtaPosTrackPt[iprod]->Draw(
"same");
704 hRatTrackMatchResPhiPosTrackPt[0]->SetMaximum(1.2);
705 hRatTrackMatchResPhiPosTrackPt[0]->SetMinimum(0.8);
706 hRatTrackMatchResPhiPosTrackPt[0]->Draw(
"");
707 hRatTrackMatchResPhiPosTrackPt[0]->SetYTitle(Form(
"Ratio data X / %s",prodLeg[0].
Data()));
708 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
710 hRatTrackMatchResPhiNegTrackPt[iprod]->Draw(
"same");
711 hRatTrackMatchResPhiPosTrackPt[iprod]->Draw(
"same");
714 ccalo3->Print(Form(
"%s_MatchingResidualsTrackPtBinComp.%s",histoTag.Data(),format.Data()));
724 TH1F * hTrackPt[
nProd] ;
725 TH1F * hTrackPtSPD[
nProd] ;
726 TH1F * hTrackPtNoSPD[
nProd] ;
727 TH1F * hRatTrackPt[
nProd-1] ;
728 TH1F * hRatTrackPtSPD[
nProd-1] ;
729 TH1F * hRatTrackPtNoSPD[
nProd-1] ;
734 TH1F * hTrackPhi[
nProd] ;
735 TH1F * hTrackPhiSPD[
nProd] ;
736 TH1F * hTrackPhiNoSPD[
nProd] ;
737 TH1F * hRatTrackPhi[
nProd-1] ;
738 TH1F * hRatTrackPhiSPD[
nProd-1] ;
739 TH1F * hRatTrackPhiNoSPD[
nProd-1] ;
742 TLegend lprod(0.3,0.475,0.84,0.675);
743 lprod.SetTextSize(0.04);
744 lprod.SetBorderSize(0);
745 lprod.SetFillColor(0);
749 hTrackPt [iprod] = (TH1F*)
GetHisto(
"AnaHadrons_hPt" ,iprod);
750 if ( !hTrackPt[iprod] )
return;
752 hTrackPtSPD [iprod] = (TH1F*)
GetHisto(
"AnaHadrons_hPtSPDRefit" ,iprod);
753 hTrackPtNoSPD [iprod] = (TH1F*)
GetHisto(
"AnaHadrons_hPtNoSPDRefit" ,iprod);
754 hTrackEtaPhiSPD [iprod] = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiSPDRefitPt02" ,iprod);
755 hTrackEtaPhiNoSPD[iprod] = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiNoSPDRefitPt02",iprod);
756 hTrackEtaPhi [iprod] = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiPositive" ,iprod);
757 hTrackEtaPhi [iprod]->Add((
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiNegative" ,iprod));
759 hTrackPhiSPD [iprod] = (TH1F*)hTrackEtaPhiSPD [iprod]->ProjectionY(Form(
"hTrackPhiSPD%s" ,prod[iprod].
Data()),0,1000);
760 hTrackPhiNoSPD [iprod] = (TH1F*)hTrackEtaPhiNoSPD[iprod]->ProjectionY(Form(
"hTrackPhiNoSPD%s",prod[iprod].
Data()),0,1000);
761 hTrackPhi [iprod] = (TH1F*)hTrackEtaPhi [iprod]->ProjectionY(Form(
"hTrackPhi%s" ,prod[iprod].
Data()),0,1000);
763 hTrackPt [iprod]->Sumw2();
764 hTrackPtSPD [iprod]->Sumw2();
765 hTrackPtNoSPD[iprod]->Sumw2();
767 hTrackPt [iprod]->Scale(1./
nEvents[iprod]);
768 hTrackPtSPD [iprod]->Scale(1./
nEvents[iprod]);
769 hTrackPtNoSPD[iprod]->Scale(1./
nEvents[iprod]);
771 hTrackPhi [iprod]->Sumw2();
772 hTrackPhiSPD [iprod]->Sumw2();
773 hTrackPhiNoSPD[iprod]->Sumw2();
775 hTrackPhi [iprod]->Scale(1./
nEvents[iprod]);
776 hTrackPhiSPD [iprod]->Scale(1./
nEvents[iprod]);
777 hTrackPhiNoSPD[iprod]->Scale(1./
nEvents[iprod]);
779 hTrackPt[iprod]->SetTitle(
"Track spectra with/out SPD");
780 hTrackPt[iprod]->SetYTitle(
"1/N_{events} dN/dp_{T}");
781 hTrackPt[iprod]->SetTitleOffset(1.5,
"Y");
782 hTrackPt[iprod]->SetMarkerColor(
color[iprod]);
783 hTrackPt[iprod]->SetMarkerStyle(20);
784 hTrackPt[iprod]->SetAxisRange(0.,30.,
"X");
788 hTrackPtSPD[iprod]->SetMarkerColor(
color[iprod]);
789 hTrackPtSPD[iprod]->SetMarkerStyle(26);
791 hTrackPtNoSPD[iprod]->SetMarkerColor(
color[iprod]);
792 hTrackPtNoSPD[iprod]->SetMarkerStyle(25);
794 hTrackPhi[iprod]->SetTitle(
"Track #varphi with/out SPD");
795 hTrackPhi[iprod]->SetYTitle(
"1/N_{events} dN/d#varphi");
796 hTrackPhi[iprod]->SetTitleOffset(1.5,
"Y");
797 hTrackPhi[iprod]->SetMarkerColor(
color[iprod]);
798 hTrackPhi[iprod]->SetMarkerStyle(20);
799 hTrackPhi[iprod]->SetAxisRange(0.,30.,
"X");
803 hTrackPhiSPD[iprod]->SetMarkerColor(
color[iprod]);
804 hTrackPhiSPD[iprod]->SetMarkerStyle(26);
806 hTrackPhiNoSPD[iprod]->SetMarkerColor(
color[iprod]);
807 hTrackPhiNoSPD[iprod]->SetMarkerStyle(25);
811 hRatTrackPhi [iprod-1] = (TH1F*)hTrackPhi [iprod]->Clone(Form(
"hRatTrackPhi%s" ,prod[iprod].
Data()));
812 hRatTrackPhiNoSPD[iprod-1] = (TH1F*)hTrackPhiNoSPD[iprod]->Clone(Form(
"hRatTrackPhiNoSPD%s",prod[iprod].
Data()));
813 hRatTrackPhiSPD [iprod-1] = (TH1F*)hTrackPhiSPD [iprod]->Clone(Form(
"hRatTrackPhiSPD%s" ,prod[iprod].
Data()));
815 hRatTrackPhi [iprod-1]->Divide(hRatTrackPhi [iprod-1],hTrackPhi [0],1.000,1,
"B");
816 hRatTrackPhiSPD [iprod-1]->Divide(hRatTrackPhiSPD [iprod-1],hTrackPhiSPD [0],1.000,1,
"B");
817 hRatTrackPhiNoSPD[iprod-1]->Divide(hRatTrackPhiNoSPD[iprod-1],hTrackPhiNoSPD[0],1.000,1,
"B");
819 hRatTrackPt [iprod-1] = (TH1F*)hTrackPt [iprod]->Clone(Form(
"hRatTrackPt%s" ,prod[iprod].
Data()));
820 hRatTrackPtNoSPD[iprod-1] = (TH1F*)hTrackPtNoSPD[iprod]->Clone(Form(
"hRatTrackPtNoSPD%s",prod[iprod].
Data()));
821 hRatTrackPtSPD [iprod-1] = (TH1F*)hTrackPtSPD [iprod]->Clone(Form(
"hRatTrackPtSPD%s" ,prod[iprod].
Data()));
823 hRatTrackPt [iprod-1]->Divide(hRatTrackPt [iprod-1],hTrackPt [0],1.000,1,
"B");
824 hRatTrackPtSPD [iprod-1]->Divide(hRatTrackPtSPD [iprod-1],hTrackPtSPD [0],1.000,1,
"B");
825 hRatTrackPtNoSPD[iprod-1]->Divide(hRatTrackPtNoSPD[iprod-1],hTrackPtNoSPD[0],1.000,1,
"B");
836 TLegend ltrack(0.6,0.75,0.84,0.89);
837 ltrack.SetTextSize(0.04);
839 ltrack.SetFillColor(0);
840 ltrack.AddEntry(hTrackPt [0],
"All",
"P");
841 ltrack.AddEntry(hTrackPtSPD [0],
"SPD",
"P");
842 ltrack.AddEntry(hTrackPtNoSPD[0],
"No SPD",
"P");
844 TCanvas * ctrack =
new TCanvas(Form(
"TrackHisto_%s",histoTag.Data()),
"",1500,1500);
848 hTrackPt[0]->Draw(
"");
851 hTrackPt [iprod]->Draw(
"same");
852 hTrackPtSPD [iprod]->Draw(
"same");
853 hTrackPtNoSPD[iprod]->Draw(
"same");
861 hRatTrackPt[0]->SetMaximum(1.05);
862 hRatTrackPt[0]->SetMinimum(0.95);
863 hRatTrackPt[0]->Draw(
"");
864 hRatTrackPt[0]->SetYTitle(Form(
"Ratio data X / %s",prodLeg[0].
Data()));
865 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
867 hRatTrackPt [iprod]->Draw(
"same");
868 hRatTrackPtSPD [iprod]->Draw(
"same");
869 hRatTrackPtNoSPD[iprod]->Draw(
"same");
873 hTrackPhi[0]->SetMaximum(3.);
874 hTrackPhi[0]->SetMinimum(0.);
875 hTrackPhi[0]->Draw(
"");
878 hTrackPhi [iprod]->Draw(
"same");
879 hTrackPhiSPD [iprod]->Draw(
"same");
880 hTrackPhiNoSPD[iprod]->Draw(
"same");
886 hRatTrackPhi[0]->SetMaximum(1.05);
887 hRatTrackPhi[0]->SetMinimum(0.95);
888 hRatTrackPhi[0]->Draw(
"");
889 hRatTrackPhi[0]->SetYTitle(Form(
"Ratio data X / %s",prodLeg[0].
Data()));
890 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
892 hRatTrackPhi [iprod]->Draw(
"same");
893 hRatTrackPhiSPD [iprod]->Draw(
"same");
894 hRatTrackPhiNoSPD[iprod]->Draw(
"same");
897 ctrack->Print(Form(
"%s_TrackComp.%s",histoTag.Data(),format.Data()));
914 TH1F* hRatXE[
nProd-1];
915 TH1F* hRatXEUE[
nProd-1];
918 TLegend lprod(0.3,0.475,0.84,0.675);
919 lprod.SetTextSize(0.04);
920 lprod.SetBorderSize(0);
921 lprod.SetFillColor(0);
925 h2XE [iprod]= (
TH2F*)
GetHisto(Form(
"AnaPhotonHadronCorr_Calo%d_hXECharged" ,icalo),iprod);
926 h2XEUE [iprod]= (
TH2F*)
GetHisto(Form(
"AnaPhotonHadronCorr_Calo%d_hXEUeCharged",icalo),iprod);
928 if ( !h2XE[iprod] )
return;
931 TH1F * hTrigger = (TH1F*)
GetHisto(
"AnaPhotonHadronCorr_hPtTrigger",iprod);
932 Int_t minClusterEBin = hTrigger->FindBin(minClusterE);
933 Float_t nTrig = hTrigger->Integral(minClusterE,100000);
935 hXE [iprod] = (TH1F*)h2XE [iprod]->ProjectionY(Form(
"hXE%s_%s" ,prod[iprod].
Data(),histoTag.Data()),minClusterEBin,1000);
936 hXEUE[iprod] = (TH1F*)h2XEUE[iprod]->ProjectionY(Form(
"hXEUE%s_%s",prod[iprod].
Data(),histoTag.Data()),minClusterEBin,1000);
938 hXE [iprod]->Sumw2();
939 hXEUE[iprod]->Sumw2();
941 hXE [iprod]->Scale(1./nTrig);
942 hXEUE[iprod]->Scale(1./nTrig);
944 hXE[iprod]->SetTitle(Form(
"#gamma-hadron x_{E}, p_{T,Trig}>%2.1f GeV/c",minClusterE));
945 hXE[iprod]->SetYTitle(
"1/N_{trigger} dN/dx_{E}");
946 hXE[iprod]->SetTitleOffset(1.5,
"Y");
947 hXE[iprod]->SetMarkerColor(
color[iprod]);
948 hXE[iprod]->SetMarkerStyle(20);
949 hXE[iprod]->SetAxisRange(0.,1.,
"X");
953 hXEUE[iprod]->SetMarkerColor(
color[iprod]);
954 hXEUE[iprod]->SetMarkerStyle(25);
958 hRatXE [iprod-1] = (TH1F*)hXE [iprod]->Clone(Form(
"hRatXE%s_%s" ,prod[iprod].
Data(),histoTag.Data()));
959 hRatXEUE[iprod-1] = (TH1F*)hXEUE[iprod]->Clone(Form(
"hRatXEUE%s_%s",prod[iprod].
Data(),histoTag.Data()));
961 hRatXE [iprod-1]->Divide(hRatXE [iprod-1],hXE [0],1.000,1,
"B");
962 hRatXEUE[iprod-1]->Divide(hRatXEUE[iprod-1],hXEUE[0],1.000,1,
"B");
972 TLegend lxe(0.6,0.75,0.84,0.89);
973 lxe.SetTextSize(0.04);
976 lxe.AddEntry(hXE [0],
"Signal+bkg",
"P");
977 lxe.AddEntry(hXEUE[0],
"Und. Event",
"P");
979 TCanvas * cxe =
new TCanvas(Form(
"XEHisto_%s_%s",histoTag.Data(),histoTag.Data()),
"",1000,500);
986 hXE [iprod]->Draw(
"same");
987 hXEUE[iprod]->Draw(
"same");
995 hRatXE[0]->SetMaximum(1.05);
996 hRatXE[0]->SetMinimum(0.95);
998 hRatXE[0]->SetYTitle(Form(
"Ratio data X / %s",prodLeg[0].
Data()));
999 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
1001 hRatXE [iprod]->Draw(
"same");
1002 hRatXEUE[iprod]->Draw(
"same");
1005 cxe->Print(Form(
"%s_XEComp.%s",histoTag.Data(),format.Data()));
1016 TH1F* hRatCen[
nProd-1];
1019 TLegend lprod(0.3,0.475,0.84,0.675);
1020 lprod.SetTextSize(0.04);
1021 lprod.SetBorderSize(0);
1022 lprod.SetFillColor(0);
1026 hCen[iprod] = (TH1F*)
GetHisto(
"hCentrality",iprod);
1028 if ( !hCen[iprod] )
return;
1031 hCen[iprod]->Sumw2();
1033 hCen[iprod]->Scale(1./
nEvents[iprod]);
1035 hCen[iprod]->SetTitle(
"Centrality");
1036 hCen[iprod]->SetYTitle(
"1/N_{events} dN/d centrality");
1037 hCen[iprod]->SetTitleOffset(1.5,
"Y");
1038 hCen[iprod]->SetMarkerColor(
color[iprod]);
1039 hCen[iprod]->SetMarkerStyle(20);
1046 hRatCen[iprod-1] = (TH1F*)hCen[iprod]->Clone(Form(
"hRatCen%s" ,prod[iprod].
Data()));
1048 hRatCen[iprod-1]->Divide(hRatCen[iprod-1],hCen [0],1.000,1,
"B");
1057 TCanvas * ccen =
new TCanvas(Form(
"Centrality_%s",histoTag.Data()),
"",1000,500);
1066 hCen[iprod]->Draw(
"same");
1074 hRatCen[0]->SetTitle(
"Centrality");
1075 hRatCen[0]->SetYTitle(Form(
"Ratio data X / %s",prodLeg[0].
Data()));
1076 hRatCen[0]->SetMinimum(0.95);
1077 hRatCen[0]->SetMaximum(1.05);
1078 hRatCen[0]->Draw(
"");
1080 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
1082 hRatCen [iprod]->Draw(
"same");
1085 TLine l1(0,1,100,1);
1089 ccen->Print(Form(
"%s_CentralityComp.%s",histoTag.Data(),format.Data()));
1100 TH1F* hVertex [3][
nProd];
1101 TH1F* hRatVertex[3][
nProd-1];
1104 TLegend lprod(0.6,0.6,0.97,0.85);
1105 lprod.SetTextSize(0.04);
1106 lprod.SetBorderSize(0);
1107 lprod.SetFillColor(0);
1111 hVertex[0][iprod] = (TH1F*)
GetHisto(
"hZVertex",iprod);
1112 hVertex[1][iprod] = (TH1F*)
GetHisto(
"hYVertex",iprod);
1113 hVertex[2][iprod] = (TH1F*)
GetHisto(
"hXVertex",iprod);
1115 if ( !hVertex[0][iprod] )
return;
1117 hVertex[0][iprod]->Sumw2();
1118 hVertex[1][iprod]->Sumw2();
1119 hVertex[2][iprod]->Sumw2();
1121 lprod.AddEntry(hVertex[0][iprod],prodLeg[iprod],
"P");
1123 for(
Int_t ivertex = 0; ivertex < 3; ivertex++)
1127 hVertex[ivertex][iprod]->Scale(1./
nEvents[iprod]);
1130 hVertex[ivertex][iprod]->SetYTitle(
"1/N_{events} dN/ d vertex");
1131 hVertex[ivertex][iprod]->SetTitleOffset(1.5,
"Y");
1132 hVertex[ivertex][iprod]->SetMarkerColor(
color[iprod]);
1133 hVertex[ivertex][iprod]->SetLineColor(
color[iprod]);
1134 hVertex[ivertex][iprod]->SetMarkerStyle(20);
1135 if(ivertex==0)hVertex[ivertex][iprod]->SetAxisRange(-10,10.,
"X");
1136 else hVertex[ivertex][iprod]->SetAxisRange(-1.5,1.5,
"X");
1142 hRatVertex[ivertex][iprod-1] = (TH1F*)hVertex[ivertex][iprod]->Clone(Form(
"hRatVertex%s_%d" ,prod[iprod].
Data(),ivertex));
1144 hRatVertex[ivertex][iprod-1]->Divide(hRatVertex[ivertex][iprod-1],hVertex[ivertex][0],1.000,1,
"B");
1154 TCanvas * cvertex =
new TCanvas(Form(
"Vertex_%s",histoTag.Data()),
"",3*500,2*500);
1155 cvertex->Divide(3,2);
1157 for(
Int_t ivertex = 0; ivertex < 3; ivertex++)
1159 cvertex->cd(npannel);
1165 hVertex[ivertex][iprod]->Draw(
"same");
1170 cvertex->cd(npannel+3);
1174 hRatVertex[ivertex][0]->SetYTitle(Form(
"Ratio data X / %s",prodLeg[0].
Data()));
1175 hRatVertex[ivertex][0]->SetMinimum(0.90);
1176 hRatVertex[ivertex][0]->SetMaximum(1.10);
1177 hRatVertex[ivertex][0]->Draw(
"");
1179 for(
Int_t iprod = 0; iprod < nProd-1; iprod++)
1181 hRatVertex[ivertex][iprod]->Draw(
"same");
1187 cvertex->Print(Form(
"%s_VertexComp.%s",histoTag.Data(),format.Data()));
1211 file[iprod] =
new TFile(Form(
"%s/%s",prod[iprod].
Data(),fileName.Data()),
"read");
1212 if(
file[iprod]->Get(
"hNEvents"))
1214 nEvents[iprod] = ((TH1F*)
file[iprod]->Get(
"hNEvents"))->GetEntries();
1215 printf(
"%s: nEvents %e\n",prod[iprod].
Data(),
nEvents[iprod]);
1218 dir[iprod] = (TDirectoryFile*)
file[iprod]->Get(listName);
1221 histArr[iprod] = (
TList*)
dir[iprod]->Get(trigName);
1223 if ( !histArr[iprod] )
continue;
1224 if ( histArr[iprod]->GetEntries() <= 0 )
continue;
1227 printf(
"%s: nEvents %e\n",prod[iprod].
Data(),
nEvents[iprod]);
1231 histArr[iprod] = (
TList*)
file[iprod]->Get(trigName);
1233 if ( !histArr[iprod] )
continue;
1234 if ( histArr[iprod]->GetEntries() <= 0 )
continue;
1237 printf(
"%s: nEvents %e\n",prod[iprod].
Data(),
nEvents[iprod]);
1242 printf(
"list %s not found\n",trigName.Data());
1261 if ( histArr[iprod] )
1262 return histArr[iprod]->FindObject(histoName);
1264 return file[iprod]->Get (histoName);
TObject * GetHisto(TString histoName, Int_t iprod)
TString format
file names tag, basically the trigger and calorimeter combination
TList * histArr[nProd]
TDirectory file where lists per trigger are stored in train ouput.
TDirectoryFile * dir[nProd]
total number of productions to compare
TString prodLeg[]
productions name used in legends
TFile * file[nProd]
TList with histograms for a given trigger.
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)
Float_t nEvents[nProd]
Input train file.
void CorrelQA(Int_t icalo)
TString histoTag
number of events container
Int_t color[]
output plots format: eps, pdf, etc.
void ProcessTrigger(TString trigName="default", TString fileName="AnalysisResults.root", TString listName="Pi0IM_GammaTrackCorr_EMCAL")
void DrawProductionComparison(TString listName="Pi0IM_GammaTrackCorr_EMCAL", TString fileName="AnalysisResults.root", TString fileFormat="eps")
TString prod[]
productions to be compared, directory name
Bool_t GetFileAndList(TString fileName, TString listName, TString trigName)