32 #if !defined(__CINT__) || defined(__MAKECINT__)
35 #include <TDirectoryFile.h>
74 TDirectoryFile *
dir = 0;
83 Int_t color[]={kBlack,kRed,kOrange+1,kYellow+1,kGreen+2,kBlue,kCyan+1,kViolet,kMagenta+2,kGray,kCyan-2,kViolet-2};
105 TString listName =
"Pi0IM_GammaTrackCorr_EMCAL",
109 TString outFileName =
"CaloTrackCorrQA_output"
115 printf(
"Open <%s>; Get Trigger List : <%s>; Export option <%d>; format %s; outputFileName %s.root\n",
123 printf(
"File not found, do nothing\n");
127 dir = (TDirectoryFile*) file->Get(listName);
130 printf(
"DirectoryFile not found, do nothing\n");
138 fout = TFile::Open(Form(
"%s.root",outFileName.Data()),
"UPDATE");
140 fout =
new TFile(Form(
"%s.root",outFileName.Data()),
"RECREATE");
144 TDirectoryFile *cdd = (TDirectoryFile*)
fout->Get(
"GA");
147 printf(
"Warning: GA <dir> doesn't exist, creating a new one");
148 cdd = (TDirectoryFile*)
fout->mkdir(
"GA");
199 printf(
"\t -- Process trigger %s, ok %d\n",trigName.Data(), ok);
204 gStyle->SetOptTitle(1);
205 gStyle->SetOptStat(0);
206 gStyle->SetOptFit(000000);
207 gStyle->SetPadRightMargin(0.15);
210 gStyle->SetTitleFontSize(0.05);
214 if (trigName.Contains(
"EMCAL")) { calo = 0 ; nCalo = 1 ; }
215 else if(trigName.Contains(
"DCAL" )) { calo = 1 ; nCalo = 2 ; }
217 TString caloString [] = {
"EMCAL",
"DCAL"};
224 for(
Int_t icalo = calo; icalo < nCalo; icalo++)
226 if(trigName.Contains(
"default")) histoTag=Form(
"%s_%s",caloString[icalo].
Data(),trigName.Data());
234 gStyle->SetPadRightMargin(0.02);
245 gStyle->SetPadRightMargin(0.15);
264 TCanvas * ccalo =
new TCanvas(Form(
"%s_CaloHisto_SpectraTM" ,histoTag.Data()),
265 Form(
"Cluster spectra and track match residuals for %s",histoTag.Data()),
273 TH1F* hClusterEnergy = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_Cut_6_Fidutial",icalo));
274 if(!hClusterEnergy)
return;
275 hClusterEnergy->SetYTitle(
"Entries");
276 hClusterEnergy->SetTitle(
"Cluster-cell energy spectra");
277 hClusterEnergy->SetTitleOffset(1.5,
"Y");
278 hClusterEnergy->Sumw2();
279 hClusterEnergy->SetMarkerColor(1);
280 hClusterEnergy->SetMarkerStyle(20);
281 hClusterEnergy->SetAxisRange(0.,50.,
"X");
282 hClusterEnergy->Draw();
284 TLegend l(0.15,0.15,0.3,0.3);
286 l.AddEntry(hClusterEnergy,
"Good Cluster",
"P");
292 TH1F* hCellAmplitude = 0;
295 if(histoTag.Contains(
"default"))
297 if ( icalo == 0 ) hCellAmplitude = (TH1F*) h2CellAmplitude->ProjectionX(Form(
"%s_hCellAmp",histoTag.Data()), 1,12);
298 else hCellAmplitude = (TH1F*) h2CellAmplitude->ProjectionX(Form(
"%s_hCellAmp",histoTag.Data()),12,20);
300 else hCellAmplitude = (TH1F*) h2CellAmplitude->ProjectionX(Form(
"%s_hCellAmp",histoTag.Data()),0,100);
302 hCellAmplitude->Sumw2();
303 hCellAmplitude->SetMarkerColor(4);
304 hCellAmplitude->SetMarkerStyle(25);
305 hCellAmplitude->Draw(
"same");
306 l.AddEntry(hCellAmplitude,
"Cell",
"P");
317 TH1F* hTM = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_Cut_7_Matching",icalo));
318 TH1F* hShSh = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_Cut_9_PID" ,icalo));
334 hTM ->SetTitle(
"Ratio after cluster cuts application");
335 hTM ->SetYTitle(
"Selected clusters / Good clusters");
336 hTM ->SetTitleOffset(1.5,
"Y");
338 hTM ->SetAxisRange(0.,50.,
"X");
339 hTM ->SetMarkerColor(2);
340 hTM ->SetMarkerStyle(21);
341 hTM ->SetMaximum(1.1);
343 hTM ->Divide(hClusterEnergy);
347 hShSh->SetMarkerColor(4);
348 hShSh->SetMarkerStyle(22);
349 hShSh->Divide(hClusterEnergy);
352 TLegend l2(0.15,0.15,0.3,0.3);
353 l2.SetTextSize(0.04);
355 l2.AddEntry(hTM,
"+ Track matching",
"P");
356 l2.AddEntry(hShSh,
"+ #lambda^{2}_{0} < 0.4",
"P");
362 TH1F* hTrackMatchResEtaNeg;
363 TH1F* hTrackMatchResEtaPos;
364 TH1F* hTrackMatchResPhiNeg;
365 TH1F* hTrackMatchResPhiPos;
368 TH2F* hTrackMatchResEtaPhi = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDEtaDPhiPosNoCut",icalo));
369 if(hTrackMatchResEtaPhi)
371 hTrackMatchResEtaPhi ->Add( (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDEtaDPhiNegNoCut",icalo) ));
376 hTrackMatchResEtaPhi->SetAxisRange(-0.025,0.025,
"X");
377 hTrackMatchResEtaPhi->SetAxisRange(-0.025,0.025,
"Y");
378 hTrackMatchResEtaPhi->SetTitleOffset(1.5,
"Y");
379 hTrackMatchResEtaPhi->SetTitleOffset(1.5,
"Z");
380 hTrackMatchResEtaPhi->SetTitle(
"Track-cluster residual #Delta#varphi vs #Delta#eta, #it{E}>0.5 GeV");
381 hTrackMatchResEtaPhi->SetXTitle(
"#Delta #eta");
382 hTrackMatchResEtaPhi->SetYTitle(
"#Delta #varphi");
383 hTrackMatchResEtaPhi->SetZTitle(
"Entries");
384 hTrackMatchResEtaPhi->Draw(
"colz");
388 TGaxis::SetMaxDigits(3);
390 TH2F* h2TrackMatchResEtaNeg = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDEtaNeg",icalo));
391 TH2F* h2TrackMatchResEtaPos = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDEtaPos",icalo));
392 TH2F* h2TrackMatchResPhiNeg = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDPhiNeg",icalo));
393 TH2F* h2TrackMatchResPhiPos = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDPhiPos",icalo));
395 Float_t binMin = hClusterEnergy->FindBin(0.5);
396 hTrackMatchResEtaNeg = (TH1F*) h2TrackMatchResEtaNeg->ProjectionY(Form(
"%s_hTrackMatchProjClusEnEtaNeg",histoTag.Data()),binMin, 1000);
397 hTrackMatchResEtaPos = (TH1F*) h2TrackMatchResEtaPos->ProjectionY(Form(
"%s_hTrackMatchProjClusEnEtaPos",histoTag.Data()),binMin, 1000);
398 hTrackMatchResPhiNeg = (TH1F*) h2TrackMatchResPhiNeg->ProjectionY(Form(
"%s_hTrackMatchProjClusEnPhiNeg",histoTag.Data()),binMin, 1000);
399 hTrackMatchResPhiPos = (TH1F*) h2TrackMatchResPhiPos->ProjectionY(Form(
"%s_hTrackMatchProjClusEnPhiPos",histoTag.Data()),binMin, 1000);
401 hTrackMatchResEtaNeg->SetXTitle(
"#Delta #eta, #Delta #varphi");
402 hTrackMatchResEtaNeg->SetYTitle(
"Entries");
403 hTrackMatchResEtaNeg->SetTitle(
"Track-cluster residuals, #it{E} > 1 GeV");
404 hTrackMatchResEtaNeg->SetTitleOffset(1.5,
"Y");
405 hTrackMatchResEtaNeg->SetAxisRange(-0.025,0.025,
"X");
406 hTrackMatchResEtaNeg->Sumw2();
407 hTrackMatchResEtaNeg->SetMarkerStyle(25);
408 hTrackMatchResEtaNeg->SetMarkerColor(2);
409 hTrackMatchResEtaNeg->Draw(
"");
411 hTrackMatchResEtaPos->Sumw2();
412 hTrackMatchResEtaPos->SetMarkerStyle(25);
413 hTrackMatchResEtaPos->SetMarkerColor(4);
414 hTrackMatchResEtaPos->Draw(
"same");
416 hTrackMatchResPhiNeg->Sumw2();
417 hTrackMatchResPhiNeg->SetMarkerStyle(24);
418 hTrackMatchResPhiNeg->SetMarkerColor(2);
419 hTrackMatchResPhiNeg->Draw(
"same");
421 hTrackMatchResPhiPos->Sumw2();
422 hTrackMatchResPhiPos->SetMarkerStyle(24);
423 hTrackMatchResPhiPos->SetMarkerColor(4);
424 hTrackMatchResPhiPos->Draw(
"same");
426 TLine l0(0,hTrackMatchResEtaNeg->GetMinimum(),0,hTrackMatchResEtaNeg->GetMaximum()*1.);
429 TLegend l3(0.55,0.7,0.83,0.85);
430 l3.SetTextSize(0.04);
431 l3.AddEntry(hTrackMatchResEtaNeg,
"#Delta #eta, Negative",
"P");
432 l3.AddEntry(hTrackMatchResEtaPos,
"#Delta #eta, Positive",
"P");
433 l3.AddEntry(hTrackMatchResPhiNeg,
"#Delta #varphi, Negative",
"P");
434 l3.AddEntry(hTrackMatchResPhiPos,
"#Delta #varphi, Positive",
"P");
440 ccalo->Print(Form(
"%s_CaloHisto_ClusterSpectraAndTrackResiduals.%s",histoTag.Data(),format.Data()));
446 delete hCellAmplitude;
447 delete hTrackMatchResEtaNeg;
448 delete hTrackMatchResEtaPos;
449 delete hTrackMatchResPhiNeg;
450 delete hTrackMatchResPhiPos;
468 TCanvas * ccalo2 =
new TCanvas(Form(
"%s_CaloHisto_CellClusterHit" ,histoTag.Data()),
469 Form(
"Cell and cluster hit maps for %s",histoTag.Data()),
479 if(icalo == 0) hCellActivity->SetAxisRange( 0,127,
"Y");
480 else hCellActivity->SetAxisRange(128,220,
"Y");
481 hCellActivity->SetTitle(
"Hits per cell (#it{E} > 0.2 GeV)");
482 hCellActivity->SetTitleOffset(1.5,
"Y");
483 hCellActivity->SetZTitle(
"Entries");
484 hCellActivity->SetTitleOffset(1.5,
"Z");
485 hCellActivity->Draw(
"colz");
492 if(icalo == 0) hCellActivityE->SetAxisRange( 0,127,
"Y");
493 else hCellActivityE->SetAxisRange(128,220,
"Y");
495 hCellActivityE->SetTitle(
"Mean energy per cell (#it{E} > 0.2 GeV)");
497 if(icalo != 1 && !histoTag.Contains(
"default"))
498 hCellActivityE->Divide(hCellActivity);
500 hCellActivityE->SetTitleOffset(1.5,
"Y");
501 hCellActivityE->SetZTitle(
"#Sigma #it{E}_{cell} / Entries_{per cell}");
502 hCellActivityE->SetTitleOffset(1.5,
"Z");
504 hCellActivityE->Draw(
"colz");
509 TH2F* hClusterActivity = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hEBin0_Cluster_ColRow_PID",icalo));
511 if(histoTag.Contains(
"default")) hClusterActivity->SetTitle(
"Clusters per col-row 0.5<#it{E}<3 GeV");
512 else if(histoTag.Contains(
"L0")) hClusterActivity->SetTitle(
"Clusters per col-row 2<#it{E}<5 GeV");
513 else hClusterActivity->SetTitle(
"Clusters per col-row 5<#it{E}<12 GeV");
515 hClusterActivity->SetTitleOffset(1.5,
"Y");
516 hClusterActivity->SetZTitle(
"Entries");
517 hClusterActivity->SetTitleOffset(1.5,
"Z");
519 hClusterActivity->Draw(
"colz");
524 TH2F* hClusterActivity2 = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hEBin1_Cluster_ColRow_PID",icalo));
526 if(histoTag.Contains(
"default")) hClusterActivity2->SetTitle(
"Clusters per col-row #it{E} > 3 GeV");
527 else if(histoTag.Contains(
"L0")) hClusterActivity2->SetTitle(
"Clusters per col-row #it{E} > 5 GeV");
528 else hClusterActivity2->SetTitle(
"Clusters per col-row #it{E} > 12 GeV");
530 hClusterActivity2->SetTitleOffset(1.5,
"Y");
531 hClusterActivity2->SetZTitle(
"Entries");
532 hClusterActivity2->SetTitleOffset(1.5,
"Z");
534 hClusterActivity2->Draw(
"colz");
536 ccalo2->Print(Form(
"%s_CaloHisto_CellClusterHit.%s",histoTag.Data(),format.Data()));
546 TCanvas * ccalo3 =
new TCanvas(Form(
"%s_CaloHisto_ClusterTimeShape" ,histoTag.Data()),
547 Form(
"Cluster time, shape, ncells for %s",histoTag.Data()),
555 TH2F* hClusterTime = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTimePt",icalo));
556 hClusterTime->SetTitle(
"Cluster #it{E} vs #it{time}");
557 hClusterTime->SetYTitle(
"#it{time} (ns)");
559 hClusterTime->SetAxisRange(0.,30.,
"X");
560 hClusterTime->SetTitleOffset(1.5,
"Y");
561 hClusterTime->SetZTitle(
"Entries");
562 hClusterTime->SetTitleOffset(1.5,
"Z");
563 hClusterTime->Draw(
"colz");
570 hClusterL0->SetTitle(
"Cluster #sigma_{long}");
571 hClusterL0->SetAxisRange(0.,30.,
"X");
572 hClusterL0->SetTitleOffset(1.5,
"Y");
573 hClusterL0->SetZTitle(
"Entries");
574 hClusterL0->SetTitleOffset(1.5,
"Z");
576 hClusterL0->Draw(
"colz");
582 TH2F* hClusterNCell = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hNCellsE",icalo));
583 hClusterNCell->SetTitle(
"Number of cells in cluster");
584 hClusterNCell->SetAxisRange(0.,30.,
"X");
585 hClusterNCell->SetTitleOffset(1.5,
"Y");
586 hClusterNCell->SetZTitle(
"Entries");
587 hClusterNCell->SetTitleOffset(1.5,
"Z");
589 hClusterNCell->Draw(
"colz");
595 TH2F* hClusterECell = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hCellsE",icalo));
596 hClusterECell->SetTitle(
"cells in cluster #it{E} vs cluster #it{E}");
597 hClusterECell->SetAxisRange(0.,30.,
"X");
598 hClusterECell->SetAxisRange(0.,20.,
"Y");
599 hClusterECell->SetTitleOffset(1.5,
"Y");
600 hClusterECell->SetZTitle(
"Entries");
601 hClusterECell->SetTitleOffset(1.5,
"Z");
603 hClusterECell->Draw(
"colz");
605 ccalo3->Print(Form(
"%s_CaloHisto_TimeShapeNCells.%s",histoTag.Data(),format.Data()));
624 TCanvas * ctrack =
new TCanvas(Form(
"%s_TrackHisto" ,histoTag.Data()),
625 Form(
"Hybrid tracks for %s",histoTag.Data()),
632 if(!hTrackEtaPhi)
return;
633 hTrackEtaPhi ->Add( (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiPositive"));
634 hTrackEtaPhi ->SetAxisRange(-0.9,0.9,
"X");
635 hTrackEtaPhi ->SetTitleOffset(1.5,
"Y");
636 hTrackEtaPhi ->SetTitle(
"Hybrid tracks #eta vs #varphi #it{p}_{T} > 0.2 GeV/#it{c}");
637 hTrackEtaPhi->SetZTitle(
"Entries");
638 hTrackEtaPhi->SetTitleOffset(1.5,
"Z");
640 hTrackEtaPhi ->Draw(
"colz");
644 TH2F * hTrackEtaPhiSPD = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiSPDRefitPt02");
645 TH2F * hTrackEtaPhiNoSPD = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiNoSPDRefitPt02");
647 TH1F* hPhiSPD = (TH1F*)hTrackEtaPhiSPD ->ProjectionY(Form(
"%s_hTrackPhiSPD" ,histoTag.Data()),0,1000);
648 TH1F* hPhiNoSPD = (TH1F*)hTrackEtaPhiNoSPD->ProjectionY(Form(
"%s_hTrackPhiNoSPD",histoTag.Data()),0,1000);
649 TH1F* hPhi = (TH1F*)hPhiSPD->Clone( Form(
"%s_hTrackPhi" ,histoTag.Data()));
650 hPhi->Add(hPhiNoSPD);
652 hPhi ->SetTitle(
"Hybrid track type #varphi, 0.2<#it{p}_{T}<2 GeV/#it{c}");
653 hPhi ->SetLineColor(1);
654 hPhiSPD ->SetLineColor(2);
655 hPhiNoSPD->SetLineColor(4);
657 hPhi ->SetMinimum(1);
658 hPhi ->SetMaximum(hPhi->GetMaximum()*1.3);
659 hPhi ->SetTitleOffset(1.5,
"Y");
660 hPhi ->SetYTitle(
"Entries");
662 TGaxis::SetMaxDigits(3);
665 hPhiSPD ->Draw(
"Hsame");
666 hPhiNoSPD->Draw(
"Hsame");
668 TLegend l(0.2,0.75,0.4,0.89);
670 l.AddEntry(hPhi,
"Sum",
"L");
671 l.AddEntry(hPhiSPD ,
"SPD+Refit",
"L");
672 l.AddEntry(hPhiNoSPD,
"No SPD+Refit",
"L");
680 TH1F* hTOF = (TH1F*)
GetHisto(
"AnaHadrons_hTOFSignalPtCut");
681 hTOF->SetYTitle(
"Entries");
682 hTOF->SetTitleOffset(1.5,
"Y");
690 TH1F* hPt = (TH1F*)
GetHisto(
"AnaHadrons_hPt");
691 TH1F* hPtSPD = (TH1F*)
GetHisto(
"AnaHadrons_hPtSPDRefit");
692 TH1F* hPtNoSPD = (TH1F*)
GetHisto(
"AnaHadrons_hPtNoSPDRefit");
693 hPt ->SetLineColor(1);
694 hPtSPD ->SetLineColor(2);
695 hPtNoSPD->SetLineColor(4);
697 hPt ->SetTitle(
"Hybrid track type #it{p}_{T}");
698 hPt ->SetYTitle(
"Entries");
699 hPt ->SetTitleOffset(1.5,
"Y");
702 hPtSPD ->Draw(
"same");
703 hPtNoSPD->Draw(
"same");
721 ctrack->Print(Form(
"%s_TrackHisto.%s",histoTag.Data(),format.Data()));
755 TCanvas * cpi0 =
new TCanvas(Form(
"%s_InvariantMassHisto" ,histoTag.Data()),
756 Form(
"Neutral mesons inv. mass for %s",histoTag.Data()),
762 for(
Int_t icen = 0; icen < 10; icen++)
764 hMassE [icen] = (
TH2F*)
GetHisto(Form(
"AnaPi0_Calo%d_hRe_cen%d_pidbit0_asy0_dist1",icalo,icen));
765 hMixMassE[icen] = (
TH2F*)
GetHisto(Form(
"AnaPi0_Calo%d_hMi_cen%d_pidbit0_asy0_dist1",icalo,icen));
767 if(!hMassE[0])
return;
776 h2DMass = (
TH2F*) hMassE[6]->Clone(Form(
"%s_h2DMass",histoTag.Data()));
777 for(
Int_t icen = 7; icen < 10; icen++) h2DMass->Add(hMassE[icen]);
778 h2DMass->SetTitle(
"Inv. mass vs #it{p}_{T,pair}, Cen: 60-100%");
782 h2DMass = (
TH2F*) hMassE[0]->Clone(Form(
"%s_h2DMass",histoTag.Data()));
783 h2DMass->SetTitle(
"Inv. mass vs #it{p}_{T,pair}");
786 h2DMass->SetTitleOffset(1.5,
"Y");
787 h2DMass->SetAxisRange(0.0,0.7,
"Y");
788 h2DMass->SetAxisRange(0,30,
"X");
789 h2DMass->Draw(
"colz");
799 for(
Int_t icen=0; icen<10; icen++ )
807 TH1F * hX = (TH1F*) hMassE[0]->ProjectionX(Form(
"%s_hEPairCen0",histoTag.Data()),0,10000);
808 Int_t binmin = hX->FindBin(2);
809 Int_t binmax = hX->FindBin(10);
810 if(histoTag.Contains(
"L0"))
812 binmin = hX->FindBin(5);
813 binmax = hX->FindBin(10);
815 else if(histoTag.Contains(
"L2"))
817 binmin = hX->FindBin(8);
818 binmax = hX->FindBin(12);
820 else if(histoTag.Contains(
"L1"))
822 binmin = hX->FindBin(10);
823 binmax = hX->FindBin(15);
830 for(
Int_t icen = 0; icen < 6; icen++)
832 if(!hMassE[icen])
continue;
834 hMass[icen] = (TH1F*) hMassE [icen]->ProjectionY(Form(
"%s_hMassCen%d",histoTag.Data(),icen),binmin,binmax);
835 hMix [icen] = (TH1F*) hMixMassE[icen]->ProjectionY(Form(
"%s_hMixCen%d" ,histoTag.Data(),icen),binmin,binmax);
836 hMass[icen]->Sumw2();
837 hMix [icen]->Sumw2();
839 hMassPi0[icen] = (TH1F*) hMass[icen]->Clone(Form(
"%s_hMassPi0Cen%d",histoTag.Data(),icen));
840 hMassEta[icen] = (TH1F*) hMass[icen]->Clone(Form(
"%s_hMassEtaCen%d",histoTag.Data(),icen));
842 hMassPi0[icen]->Divide(hMix[icen]);
843 hMassPi0[icen]->Fit(
"pol0",
"Q",
"",0.25,0.35);
845 if(hMassPi0[icen]->GetFunction(
"pol0")) scale = hMassPi0[icen]->GetFunction(
"pol0")->GetParameter(0);
847 hMassPi0[icen]->Scale(1./scale);
848 hMassPi0[icen]->SetMarkerStyle(24);
849 hMassPi0[icen]->SetMarkerColor(
color[icen]);
850 hMassPi0[icen]->SetLineColor(
color[icen]);
851 hMassPi0[icen]->SetAxisRange(0.04,0.24);
854 hMassEta[icen]->Rebin(4);
855 hMix [icen]->Rebin(4);
856 hMassEta[icen]->Divide(hMix[icen]);
857 hMassEta[icen]->SetMarkerStyle(25);
858 hMassEta[icen]->SetMarkerColor(
color[icen]);
859 hMassEta[icen]->SetLineColor(
color[icen]);
860 hMassEta[icen]->SetAxisRange(0.4,0.9);
862 hMassEta[icen]->Scale(1./scale);
864 if(maxEta < hMassEta[icen]->GetMaximum()) maxEta = hMassEta[icen]->GetMaximum();
865 if(maxPi0 < hMassPi0[icen]->GetMaximum()) maxPi0 = hMassPi0[icen]->GetMaximum();
867 if(minEta > hMassEta[icen]->GetMinimum()) minEta = hMassEta[icen]->GetMinimum();
868 if(minPi0 > hMassPi0[icen]->GetMinimum()) minPi0 = hMassPi0[icen]->GetMinimum();
873 hMassPi0[0]->SetMinimum(minPi0);
874 hMassPi0[0]->SetTitleOffset(1.5,
"Y");
875 hMassPi0[0]->SetYTitle(
"Real / Mixed");
876 hMassPi0[0]->SetTitle(
"#pi^{0} peak, 2 < #it{E}_{pair}< 10 GeV");
877 if (histoTag.Contains(
"L0")) hMassPi0[0]->SetTitle(
"#pi^{0} peak, 5 < #it{E}_{pair}< 10 GeV");
878 else if(histoTag.Contains(
"L2")) hMassPi0[0]->SetTitle(
"#pi^{0} peak, 8 < #it{E}_{pair}< 12 GeV");
879 else if(histoTag.Contains(
"L1")) hMassPi0[0]->SetTitle(
"#pi^{0} peak, 10 < #it{E}_{pair}< 15 GeV");
885 hMassPi0[0]->SetMaximum(maxPi0*1.2);
886 hMassPi0[5]->Draw(
"Hsame");
887 hMassPi0[4]->Draw(
"Hsame");
888 hMassPi0[3]->Draw(
"Hsame");
889 hMassPi0[2]->Draw(
"Hsame");
890 hMassPi0[1]->Draw(
"Hsame");
891 hMassPi0[0]->Draw(
"Hsame");
897 TLegend l(0.12,0.6,0.4,0.85);
899 l.AddEntry(hMassPi0[0],
"0-10%",
"P");
900 l.AddEntry(hMassPi0[1],
"10-20%",
"P");
901 l.AddEntry(hMassPi0[2],
"20-30%",
"P");
902 l.AddEntry(hMassPi0[3],
"30-40%",
"P");
903 l.AddEntry(hMassPi0[4],
"40-70%",
"P");
904 l.AddEntry(hMassPi0[5],
"50-60%",
"P");
910 TLine l1(0.04,1,0.24,1);
920 for(
Int_t ism = 0; ism < 20; ism++)
926 binmin = hX->FindBin(4);
927 binmax = hX->FindBin(20);
931 if(icalo==1) first = 12;
933 for(
Int_t ism = first; ism < 20; ism++)
936 if(!hTmpSM)
continue;
938 hSM[ism] = (TH1F*) hTmpSM->ProjectionY(Form(
"%s_hMassSM%d",histoTag.Data(),ism),binmin,binmax);
940 hSM[ism]->SetMarkerStyle(26);
943 hSM[ism]->SetMarkerColor(
color[ism-first]);
944 hSM[ism]->SetLineColor(
color[ism-first]);
950 hMixSM[ism] = (TH1F*) hTmpMixSM->ProjectionY(Form(
"%s_hMassMixSM%d",histoTag.Data(),ism),binmin,binmax);
951 hMixSM[ism]->Sumw2();
952 hMixSM[ism]->Rebin(2);
953 hSM[ism]->Divide(hMixSM[ism]);
954 hSM[ism]->Fit(
"pol0",
"Q",
"",0.25,0.35);
956 if(hSM[ism]->GetFunction(
"pol0")) scale = hSM[ism]->GetFunction(
"pol0")->GetParameter(0);
958 hSM[ism]->Scale(1./scale);
961 if(maxSM < hSM[ism]->GetMaximum()) maxSM = hSM[ism]->GetMaximum();
964 hSM[first]->SetTitle(
"#pi^{0} peak in SM, 4 < #it{E}_{pair}< 10 GeV");
965 hSM[first]->SetTitleOffset(1.5,
"Y");
966 hSM[first]->SetAxisRange(0.04,0.24);
967 hSM[first]->SetMaximum(maxSM*1.2);
968 hSM[first]->SetMinimum(0.8);
969 hSM[first]->SetYTitle(
"Real / Mixed");
971 hSM[first]->Draw(
"H");
972 TLegend lsm(0.12,0.5,0.35,0.85);
973 lsm.SetTextSize(0.04);
974 lsm.AddEntry(hSM[first],Form(
"Mod %d",first),
"P");
976 for(
Int_t ism = first+1; ism < 20; ism++)
978 if(!hSM[ism])
continue;
980 hSM[ism]->Draw(
"Hsame");
981 lsm.AddEntry(hSM[ism],Form(
"Mod %d",ism),
"P");
984 lsm.SetBorderSize(0);
995 hMassEta[0]->SetMinimum(minEta);
996 hMassEta[0]->SetTitleOffset(1.5,
"Y");
997 hMassEta[0]->SetYTitle(
"Real / Mixed");
998 hMassEta[0]->SetTitle(
"#eta peak, 2 <#it{E}_{pair}< 10 GeV");
999 if (histoTag.Contains(
"L0")) hMassEta[0]->SetTitle(
"#eta peak, 5 < #it{E}_{pair}< 10 GeV");
1000 else if(histoTag.Contains(
"L2")) hMassEta[0]->SetTitle(
"#eta peak, 8 < #it{E}_{pair}< 12 GeV");
1001 else if(histoTag.Contains(
"L1")) hMassEta[0]->SetTitle(
"#eta peak, 10 < #it{E}_{pair}< 15 GeV");
1003 hMassEta[0]->Draw(
"H");
1007 hMassEta[0]->SetMaximum(maxEta*1.2);
1008 hMassEta[5]->Draw(
"Hsame");
1009 hMassEta[4]->Draw(
"Hsame");
1010 hMassEta[3]->Draw(
"Hsame");
1011 hMassEta[2]->Draw(
"Hsame");
1012 hMassEta[1]->Draw(
"Hsame");
1013 hMassEta[0]->Draw(
"Hsame");
1015 TLegend l2(0.12,0.6,0.4,0.85);
1016 l2.SetTextSize(0.04);
1017 l2.AddEntry(hMassEta[0],
"0-10%",
"P");
1018 l2.AddEntry(hMassEta[1],
"10-20%",
"P");
1019 l2.AddEntry(hMassEta[2],
"20-30%",
"P");
1020 l2.AddEntry(hMassEta[3],
"30-40%",
"P");
1021 l2.AddEntry(hMassEta[4],
"40-70%",
"P");
1022 l2.AddEntry(hMassEta[5],
"50-60%",
"P");
1023 l2.SetBorderSize(0);
1028 cpi0->Print(Form(
"%s_Pi0Histo.%s",histoTag.Data(),format.Data()));
1037 for(
Int_t icen=0; icen<10; icen++ )
1039 if ( hMass [icen] )
delete hMass [icen];
1040 if ( hMix [icen] )
delete hMix [icen];
1041 if ( hMassPi0[icen] )
delete hMassPi0[icen];
1042 if ( hMassEta[icen] )
delete hMassEta[icen];
1045 for(
Int_t ism = first; ism < 20; ism++)
1047 if ( hSM [ism] )
delete hSM [ism];
1048 if ( hMixSM[ism] )
delete hMixSM[ism];
1057 for(
Int_t icen=0; icen<10; icen++ )
1065 for(
Int_t ism = first; ism < 20; ism++)
1085 TCanvas * cIsolation =
new TCanvas(Form(
"%s_IsolationHisto" ,histoTag.Data()),
1086 Form(
"Isolation cone for %s",histoTag.Data()),
1088 cIsolation->Divide(2,2);
1091 if ( histoTag.Contains(
"L0") ) minClusterE = 5;
1092 else if ( histoTag.Contains(
"L2") ) minClusterE = 10;
1093 else if ( histoTag.Contains(
"L1") ) minClusterE = 12;
1095 TH1F * hIsolated = (TH1F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPt" ,icalo));
1096 TH1F * hNotIsolated = (TH1F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPtNoIso",icalo));
1098 if(!hIsolated)
return;
1100 Int_t minClusterEBin = hIsolated->FindBin(minClusterE);
1101 Float_t nTrig = hIsolated->Integral(minClusterEBin,100000)+hNotIsolated->Integral(minClusterE,100000);
1103 if ( nTrig <=0 ) return ;
1111 hIsolated ->Sumw2();
1112 hNotIsolated->Sumw2();
1113 hIsolated ->SetMarkerColor(4);
1114 hNotIsolated->SetMarkerColor(2);
1115 hIsolated ->SetLineColor (4);
1116 hNotIsolated->SetLineColor (2);
1117 hIsolated ->SetMarkerStyle(24);
1118 hNotIsolated->SetMarkerStyle(20);
1120 hNotIsolated->SetTitle(
"(non) isolated cluster spectra, #it{R}=0.4, #Sigma #it{p}_{T}<2 GeV/#it{c}");
1121 hNotIsolated->SetYTitle(
"Entries");
1123 hNotIsolated->Draw();
1124 hIsolated ->Draw(
"same");
1126 TLegend lI(0.4,0.7,0.88,0.88);
1127 lI.SetTextSize(0.04);
1128 lI.SetBorderSize(0);
1130 lI.AddEntry(hIsolated ,
"Isolated candidates",
"P");
1131 lI.AddEntry(hNotIsolated,
"NOT Isolated candidates",
"P");
1140 TLegend l(0.55,0.55,0.88,0.88);
1141 l.SetTextSize(0.04);
1145 TH2F* h2PtInCone = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPtInCone" ,icalo));
1146 TH2F* h2PtInConeCluster = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPtClusterInCone" ,icalo));
1147 TH2F* h2PtInConeTrack = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPtTrackInCone" ,icalo));
1148 TH2F* h2PtInConeTrackPerp = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPtInPerpCone" ,icalo));
1149 TH2F* h2PtInEtaBandTrack = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hEtaBandTrackPt" ,icalo));
1150 TH2F* h2PtInEtaBandCluster = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hEtaBandClusterPt",icalo));
1152 TH1F* hPtInCone = (TH1F*) h2PtInCone ->ProjectionY(Form(
"%s_hPtInCone_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1153 TH1F* hPtInConeCluster = (TH1F*) h2PtInConeCluster ->ProjectionY(Form(
"%s_hPtInConeCluster_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1154 TH1F* hPtInConeTrack = (TH1F*) h2PtInConeTrack ->ProjectionY(Form(
"%s_hPtInConeTrack_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1155 TH1F* hPtInConeTrackPerp = (TH1F*) h2PtInConeTrackPerp ->ProjectionY(Form(
"%s_hPtInConePerp_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1156 TH1F* hPtInEtaBandTrack = (TH1F*) h2PtInEtaBandTrack ->ProjectionY(Form(
"%s_hPtInConeEtaBandTrack_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1157 TH1F* hPtInEtaBandCluster = (TH1F*) h2PtInEtaBandCluster->ProjectionY(Form(
"%s_hPtInConeEtaBandCluster_TrigEnMin%2.0fGeV",histoTag.Data(),minClusterE),minClusterEBin,10000);
1159 hPtInCone ->Sumw2();
1160 hPtInConeCluster ->Sumw2();
1161 hPtInConeTrack ->Sumw2();
1162 hPtInConeTrackPerp ->Sumw2();
1163 hPtInEtaBandCluster->Sumw2();
1164 hPtInEtaBandTrack ->Sumw2();
1167 hPtInCone ->Rebin(rb);
1168 hPtInConeCluster ->Rebin(rb);
1169 hPtInConeTrack ->Rebin(rb);
1170 hPtInConeTrackPerp ->Rebin(rb);
1171 hPtInEtaBandCluster->Rebin(rb);
1172 hPtInEtaBandTrack ->Rebin(rb);
1174 hPtInCone ->Scale(1./nTrig);
1175 hPtInConeCluster ->Scale(1./nTrig);
1176 hPtInConeTrack ->Scale(1./nTrig);
1177 hPtInConeTrackPerp ->Scale(1./nTrig);
1178 hPtInEtaBandCluster->Scale(1./nTrig);
1179 hPtInEtaBandTrack ->Scale(1./nTrig);
1181 hPtInCone ->SetAxisRange(0,20);
1182 hPtInConeCluster ->SetAxisRange(0,20);
1183 hPtInConeTrack ->SetAxisRange(0,20);
1184 hPtInConeTrackPerp ->SetAxisRange(0,20);
1185 hPtInEtaBandCluster->SetAxisRange(0,20);
1186 hPtInEtaBandTrack ->SetAxisRange(0,20);
1188 hPtInCone ->SetMarkerStyle(24);
1189 hPtInConeCluster ->SetMarkerStyle(20);
1190 hPtInConeTrack ->SetMarkerStyle(20);
1191 hPtInConeTrackPerp ->SetMarkerStyle(27);
1192 hPtInEtaBandCluster->SetMarkerStyle(21);
1193 hPtInEtaBandTrack ->SetMarkerStyle(21);
1195 hPtInCone ->SetMarkerColor(1);
1196 hPtInConeCluster ->SetMarkerColor(2);
1197 hPtInConeTrack ->SetMarkerColor(4);
1198 hPtInConeTrackPerp ->SetMarkerColor(4);
1199 hPtInEtaBandCluster->SetMarkerColor(2);
1200 hPtInEtaBandTrack ->SetMarkerColor(4);
1202 hPtInCone ->SetLineColor(1);
1203 hPtInConeCluster ->SetLineColor(2);
1204 hPtInConeTrack ->SetLineColor(4);
1205 hPtInConeTrackPerp ->SetLineColor(4);
1206 hPtInEtaBandCluster->SetLineColor(2);
1207 hPtInEtaBandTrack ->SetLineColor(4);
1209 hPtInCone->SetTitleOffset(1.5,
"Y");
1210 hPtInCone->SetYTitle(
"Entries / #it{N}_{candidates}");
1211 hPtInCone->SetTitle(Form(
"Track/cluster spectra in cone p_{T,cand}>%2.0f GeV/#it{c}, #it{R}=0.4",minClusterE));
1213 Float_t max = hPtInCone->GetMaximum();
1214 if(max < hPtInConeTrack ->GetMaximum()) max = hPtInConeTrack ->GetMaximum();
1215 if(max < hPtInConeCluster ->GetMaximum()) max = hPtInConeCluster ->GetMaximum();
1216 if(max < hPtInConeTrackPerp ->GetMaximum()) max = hPtInConeTrackPerp ->GetMaximum();
1217 if(max < hPtInEtaBandCluster->GetMaximum()) max = hPtInEtaBandCluster->GetMaximum();
1218 if(max < hPtInEtaBandTrack ->GetMaximum()) max = hPtInEtaBandTrack ->GetMaximum();
1219 hPtInCone->SetMaximum(max*2);
1221 hPtInCone ->Draw(
"");
1222 hPtInConeCluster ->Draw(
"same");
1223 hPtInConeTrack ->Draw(
"same");
1224 hPtInConeTrackPerp ->Draw(
"same");
1225 hPtInEtaBandCluster->Draw(
"same");
1226 hPtInEtaBandTrack ->Draw(
"same");
1228 l.AddEntry(hPtInCone ,
"Tracks+Clusters",
"P");
1229 l.AddEntry(hPtInConeCluster ,
"Clusters inside cone",
"P");
1230 l.AddEntry(hPtInConeTrack ,
"Tracks inside cone",
"P");
1231 l.AddEntry(hPtInConeTrackPerp ,
"Tracks inside #perp cones",
"P");
1232 l.AddEntry(hPtInEtaBandTrack ,
"Tracks #eta band",
"P");
1233 l.AddEntry(hPtInEtaBandCluster,
"Clusters #eta band",
"P");
1243 TLegend l2(0.55,0.55,0.88,0.88);
1244 l2.SetTextSize(0.04);
1245 l2.SetBorderSize(0);
1248 TH2F* h2SumPtCone = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConePtSum" ,icalo));
1249 TH2F* h2SumPtConeCluster = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConePtSumCluster" ,icalo));
1250 TH2F* h2SumPtConeTrack = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConePtSumTrack" ,icalo));
1251 TH2F* h2SumPtConeTrackPerp = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPerpConePtSum" ,icalo));
1252 TH2F* h2SumPtEtaBandTrack = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConeSumPtEtaUENormTrack" ,icalo));
1253 TH2F* h2SumPtEtaBandCluster = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConeSumPtEtaUENormCluster",icalo));
1254 TH2F* h2SumPtConeSubTrack = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConeSumPtEtaUESubTrack" ,icalo));
1255 TH2F* h2SumPtConeSubCluster = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConeSumPtEtaUESubCluster" ,icalo));
1256 TH2F* h2SumPtConeSub = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConeSumPtEtaUESub" ,icalo));
1258 TH1F* hSumPtCone = (TH1F*) h2SumPtCone ->ProjectionY(Form(
"%s_hSumPtCone_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1259 TH1F* hSumPtConeCluster = (TH1F*) h2SumPtConeCluster ->ProjectionY(Form(
"%s_hSumPtConeCluster_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1260 TH1F* hSumPtConeTrack = (TH1F*) h2SumPtConeTrack ->ProjectionY(Form(
"%s_hSumPtConeTrack_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1261 TH1F* hSumPtConeTrackPerp = (TH1F*) h2SumPtConeTrackPerp ->ProjectionY(Form(
"%s_hSumPtConePerp_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1262 TH1F* hSumPtEtaBandTrack = (TH1F*) h2SumPtEtaBandTrack ->ProjectionY(Form(
"%s_hSumPtConeEtaBandTrack_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1263 TH1F* hSumPtEtaBandCluster = (TH1F*) h2SumPtEtaBandCluster->ProjectionY(Form(
"%s_hSumPtConeEtaBandCluster_TrigEnMin%2.0fGeV",histoTag.Data(),minClusterE),minClusterEBin,10000);
1264 TH1F* hSumPtConeSub = (TH1F*) h2SumPtConeSub ->ProjectionY(Form(
"%s_hSumPtConeSub_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1265 TH1F* hSumPtConeSubCluster = (TH1F*) h2SumPtConeSubCluster->ProjectionY(Form(
"%s_hSumPtConeSubCluster_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1266 TH1F* hSumPtConeSubTrack = (TH1F*) h2SumPtConeSubTrack ->ProjectionY(Form(
"%s_hSumPtConeSubTrack_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1268 hSumPtCone ->Sumw2();
1269 hSumPtConeCluster ->Sumw2();
1270 hSumPtConeTrack ->Sumw2();
1271 hSumPtConeSub ->Sumw2();
1272 hSumPtConeSubCluster->Sumw2();
1273 hSumPtConeSubTrack ->Sumw2();
1274 hSumPtConeTrackPerp ->Sumw2();
1275 hSumPtEtaBandCluster->Sumw2();
1276 hSumPtEtaBandTrack ->Sumw2();
1279 hSumPtCone ->Rebin(rb);
1280 hSumPtConeCluster ->Rebin(rb);
1281 hSumPtConeTrack ->Rebin(rb);
1282 hSumPtConeSub ->Rebin(rb);
1283 hSumPtConeSubCluster->Rebin(rb);
1284 hSumPtConeSubTrack ->Rebin(rb);
1285 hSumPtConeTrackPerp ->Rebin(rb);
1286 hSumPtEtaBandCluster->Rebin(rb);
1287 hSumPtEtaBandTrack ->Rebin(rb);
1289 hSumPtCone ->Scale(1./nTrig);
1290 hSumPtConeCluster ->Scale(1./nTrig);
1291 hSumPtConeTrack ->Scale(1./nTrig);
1292 hSumPtConeSub ->Scale(1./nTrig);
1293 hSumPtConeSubCluster->Scale(1./nTrig);
1294 hSumPtConeSubTrack ->Scale(1./nTrig);
1295 hSumPtConeTrackPerp ->Scale(1./nTrig);
1296 hSumPtEtaBandCluster->Scale(1./nTrig);
1297 hSumPtEtaBandTrack ->Scale(1./nTrig);
1299 hSumPtCone ->SetAxisRange(0,500);
1300 hSumPtConeCluster ->SetAxisRange(0,500);
1301 hSumPtConeTrack ->SetAxisRange(0,500);
1302 hSumPtConeSub ->SetAxisRange(-5,500);
1303 hSumPtConeSubCluster->SetAxisRange(-5,500);
1304 hSumPtConeSubTrack ->SetAxisRange(-5,500);
1305 hSumPtConeTrackPerp ->SetAxisRange(0,500);
1306 hSumPtEtaBandCluster->SetAxisRange(0,500);
1307 hSumPtEtaBandTrack ->SetAxisRange(0,500);
1309 hSumPtCone ->SetMarkerStyle(24);
1310 hSumPtConeCluster ->SetMarkerStyle(20);
1311 hSumPtConeTrack ->SetMarkerStyle(20);
1312 hSumPtConeSub ->SetMarkerStyle(25);
1313 hSumPtConeSubCluster->SetMarkerStyle(25);
1314 hSumPtConeSubTrack ->SetMarkerStyle(25);
1315 hSumPtConeTrackPerp ->SetMarkerStyle(27);
1316 hSumPtEtaBandCluster->SetMarkerStyle(21);
1317 hSumPtEtaBandTrack ->SetMarkerStyle(21);
1319 hSumPtCone ->SetMarkerColor(1);
1320 hSumPtConeCluster ->SetMarkerColor(2);
1321 hSumPtConeTrack ->SetMarkerColor(4);
1322 hSumPtConeSub ->SetMarkerColor(1);
1323 hSumPtConeSubCluster->SetMarkerColor(2);
1324 hSumPtConeSubTrack ->SetMarkerColor(4);
1325 hSumPtConeTrackPerp ->SetMarkerColor(4);
1326 hSumPtEtaBandCluster->SetMarkerColor(2);
1327 hSumPtEtaBandTrack ->SetMarkerColor(4);
1329 hSumPtCone ->SetLineColor(1);
1330 hSumPtConeCluster ->SetLineColor(2);
1331 hSumPtConeTrack ->SetLineColor(4);
1332 hSumPtConeSub ->SetLineColor(1);
1333 hSumPtConeSubCluster->SetLineColor(2);
1334 hSumPtConeSubTrack ->SetLineColor(4);
1335 hSumPtConeTrackPerp ->SetLineColor(4);
1336 hSumPtEtaBandCluster->SetLineColor(2);
1337 hSumPtEtaBandTrack ->SetLineColor(4);
1339 hSumPtCone->SetTitleOffset(1.5,
"Y");
1340 hSumPtCone->SetYTitle(
"Entries / #it{N}_{candidates}");
1341 hSumPtCone->SetTitle(Form(
"Track/cluster #Sigma #it{p}_{T}, p_{T,cand}>%2.0f GeV/#it{c}, #it{R}=0.4, ",minClusterE));
1343 max = hSumPtCone->GetMaximum();
1344 if(max < hSumPtConeTrack ->GetMaximum()) max = hSumPtConeTrack ->GetMaximum();
1345 if(max < hSumPtConeCluster ->GetMaximum()) max = hSumPtConeCluster ->GetMaximum();
1346 if(max < hSumPtConeSub ->GetMaximum()) max = hSumPtConeSub ->GetMaximum();
1347 if(max < hSumPtConeSubTrack ->GetMaximum()) max = hSumPtConeSubTrack ->GetMaximum();
1348 if(max < hSumPtConeSubCluster->GetMaximum()) max = hSumPtConeSubCluster->GetMaximum();
1349 if(max < hSumPtConeTrackPerp ->GetMaximum()) max = hSumPtConeTrackPerp ->GetMaximum();
1350 if(max < hSumPtEtaBandCluster->GetMaximum()) max = hSumPtEtaBandCluster->GetMaximum();
1351 if(max < hSumPtEtaBandTrack ->GetMaximum()) max = hSumPtEtaBandTrack ->GetMaximum();
1352 hSumPtCone->SetMaximum(max*2);
1354 hSumPtCone ->Draw(
"");
1355 hSumPtConeCluster ->Draw(
"same");
1356 hSumPtConeTrack ->Draw(
"same");
1360 hSumPtConeTrackPerp ->Draw(
"same");
1361 hSumPtEtaBandCluster->Draw(
"same");
1362 hSumPtEtaBandTrack ->Draw(
"same");
1364 l2.AddEntry(hSumPtCone ,
"Tracks+Clusters",
"P");
1365 l2.AddEntry(hSumPtConeCluster ,
"Clusters inside cone",
"P");
1366 l2.AddEntry(hSumPtConeTrack ,
"Tracks inside cone",
"P");
1367 l2.AddEntry(hSumPtConeTrackPerp ,
"Tracks inside #perp cones",
"P");
1368 l2.AddEntry(hSumPtEtaBandTrack ,
"Tracks #eta band",
"P");
1369 l2.AddEntry(hSumPtEtaBandCluster,
"Clusters #eta band",
"P");
1382 TLegend l3(0.4,0.75,0.8,0.88);
1383 l3.SetTextSize(0.04);
1384 l3.SetBorderSize(0);
1387 hSumPtConeSub->SetTitle(Form(
"Track/Cluster #Sigma #it{p}_{T}-#Sigma #eta band, p_{T,cand}>%2.0f GeV/#it{c}, #it{R}=0.4",minClusterE));
1388 hSumPtConeSub->SetYTitle(
"Entries / #it{N}_{candidates}");
1389 hSumPtConeSub->SetMaximum(max*2);
1391 hSumPtConeSub ->Draw(
"");
1392 hSumPtConeSubCluster->Draw(
"same");
1393 hSumPtConeSubTrack ->Draw(
"same");
1395 l3.AddEntry(hSumPtConeSub ,
"Tracks+Clusters-#eta band",
"P");
1396 l3.AddEntry(hSumPtConeSubCluster,
"Clusters inside cone-#eta band",
"P");
1397 l3.AddEntry(hSumPtConeSubTrack ,
"Tracks inside cone-#eta band",
"P");
1401 cIsolation->Print(Form(
"%s_IsolationHisto.%s",histoTag.Data(),format.Data()));
1408 delete hPtInConeCluster ;
1409 delete hPtInConeTrack ;
1410 delete hPtInConeTrackPerp ;
1411 delete hPtInEtaBandTrack ;
1412 delete hPtInEtaBandCluster ;
1415 delete hSumPtConeCluster ;
1416 delete hSumPtConeTrack ;
1417 delete hSumPtConeTrackPerp ;
1418 delete hSumPtEtaBandTrack ;
1419 delete hSumPtEtaBandCluster ;
1421 delete hSumPtConeSub ;
1422 delete hSumPtConeSubCluster ;
1423 delete hSumPtConeSubTrack ;
1461 TCanvas * cCorrelation =
new TCanvas(Form(
"%s_CorrelationHisto" ,histoTag.Data()),
1462 Form(
"Trigger cluster - associated track correlation for %s",histoTag.Data()),
1464 cCorrelation->Divide(2,1);
1467 if ( histoTag.Contains(
"L0") ) minClusterE = 8;
1468 else if ( histoTag.Contains(
"L2") ) minClusterE = 10;
1469 else if ( histoTag.Contains(
"L1") ) minClusterE = 12;
1471 Float_t assocBins[] = {0.5,2.,5.,10.,20.};
1472 Int_t nAssocBins = 4;
1474 TH1F * hTrigger = (TH1F*)
GetHisto(Form(
"AnaPhotonHadronCorr_Calo%d_hPtTrigger",icalo));
1476 if(!hTrigger)
return;
1478 Int_t minClusterEBin = hTrigger->FindBin(minClusterE);
1479 Float_t nTrig = hTrigger->Integral(minClusterEBin,100000);
1481 if ( nTrig <=0 ) return ;
1484 cCorrelation->cd(1);
1487 for(
Int_t i = 0; i < 4; i++) hDeltaPhi[i] = 0;
1489 TLegend l(0.35,0.6,0.83,0.85);
1490 l.SetHeader(Form(
"p_{T,T} > %2.1f GeV/c",minClusterE));
1491 l.SetTextSize(0.04);
1495 for(
Int_t ibin = 0; ibin < nAssocBins; ibin++ )
1498 (
TH2F*)
GetHisto(Form(
"AnaPhotonHadronCorr_Calo%d_hDeltaPhiPtAssocPt%2.1f_%2.1f",icalo,assocBins[ibin],assocBins[ibin+1]));
1500 (TH1F*) hDeltaPhiE->ProjectionY(Form(
"%s_hDeltaPhi_TrackMinPt%2.1fGeV_TrigEnMin%2.0f",histoTag.Data(),assocBins[ibin],minClusterE),minClusterEBin,10000);
1501 hDeltaPhi[ibin]->Sumw2();
1502 hDeltaPhi[ibin]->Rebin(2);
1503 hDeltaPhi[ibin]->Scale(1./nTrig);
1505 hDeltaPhi[ibin]->Fit(
"pol0",
"Q",
"",1,2);
1508 if(hDeltaPhi[ibin]->GetFunction(
"pol0"))
1510 scale = hDeltaPhi[ibin]->GetFunction(
"pol0")->GetParameter(0);
1511 hDeltaPhi[ibin]->GetFunction(
"pol0")->SetRange(6,7);
1513 hDeltaPhi[ibin]->Scale(1./scale);
1516 hDeltaPhi[ibin]->SetAxisRange(-1.6,4.7);
1518 hDeltaPhi[ibin]->SetMarkerStyle(24);
1519 hDeltaPhi[ibin]->SetMarkerColor(
color[ibin]);
1520 hDeltaPhi[ibin]->SetLineColor(
color[ibin]);
1521 hDeltaPhi[ibin]->SetTitleOffset(1.5,
"Y");
1522 hDeltaPhi[ibin]->SetYTitle(
"#it{N}_{pairs} / #it{N}_{trig} / ZYAM");
1523 hDeltaPhi[ibin]->SetTitle(
"#gamma (#lambda_{0}^{2} < 0.4, neutral cluster) trigger");
1525 l.AddEntry(hDeltaPhi[ibin],Form(
"%2.1f<#it{p}_{T,A}< %2.0f GeV/c",assocBins[ibin],assocBins[ibin+1]),
"P");
1528 hDeltaPhi[2]->SetMaximum(hDeltaPhi[2]->GetMaximum()*10);
1529 hDeltaPhi[2]->SetMinimum(0.8);
1531 hDeltaPhi[2]->Draw(
"H");
1532 hDeltaPhi[1]->Draw(
"Hsame");
1533 hDeltaPhi[3]->Draw(
"Hsame");
1534 hDeltaPhi[0]->Draw(
"Hsame");
1539 cCorrelation->cd(2);
1542 TLegend l2(0.35,0.6,0.83,0.85);
1543 l2.SetHeader(Form(
"p_{T,T} > %2.0f GeV/c",minClusterE));
1544 l2.SetTextSize(0.04);
1545 l2.SetBorderSize(0);
1548 TH2F* hEXE = (
TH2F*)
GetHisto(Form(
"AnaPhotonHadronCorr_Calo%d_hXECharged" ,icalo));
1549 TH2F* hEXEUE = (
TH2F*)
GetHisto(Form(
"AnaPhotonHadronCorr_Calo%d_hXEUeCharged",icalo));
1551 TH1F* hXE = (TH1F*) hEXE->ProjectionY(Form(
"%s_hXE_TrigEnMin%2.0fGeV",histoTag.Data(),minClusterE),minClusterEBin,10000);
1554 hXE->Scale(1./nTrig);
1555 hXE->SetAxisRange(0,1);
1556 hXE->SetMarkerStyle(24);
1557 hXE->SetMarkerColor(1);
1558 hXE->SetLineColor(1);
1559 hXE->SetTitleOffset(1.5,
"Y");
1560 hXE->SetYTitle(
"#it{N}_{pairs} / #it{N}_{trig}");
1561 hXE->SetTitle(
"#gamma (#lambda_{0}^{2} < 0.4, neutral cluster) trigger");
1562 l2.AddEntry(hXE,
"raw x_{E}",
"P");
1565 TH1F* hXEUE = (TH1F*) hEXEUE->ProjectionY(Form(
"%s_hXEUE_TrigEnMin%2.0fGeV",histoTag.Data(),minClusterE),minClusterEBin,10000);
1568 hXEUE->Scale(1./nTrig);
1569 hXEUE->SetAxisRange(0,1);
1570 hXEUE->SetMarkerStyle(25);
1571 hXEUE->SetMarkerColor(2);
1572 hXEUE->SetLineColor(2);
1573 l2.AddEntry(hXEUE,
"raw Und. Event x_{E}",
"P");
1574 hXEUE->Draw(
"same");
1578 cCorrelation->Print(Form(
"%s_CorrelationHisto.%s",histoTag.Data(),format.Data()));
1584 for(
Int_t i = 0; i < 4; i++)
delete hDeltaPhi[i];
1589 delete cCorrelation;
1615 TH1F* hClusterPho = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_MCPhoton",icalo));
1616 TH1F* hClusterPi0 = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_MCPi0" ,icalo));
1617 TH1F* hClusterEta = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_MCEta" ,icalo));
1618 TH1F* hClusterPhoPi0 = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_MCPhotonPi0Decay",icalo));
1619 TH1F* hClusterPhoEta = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_MCPhotonEtaDecay",icalo));
1621 if(!hClusterPho)
return;
1623 TH1F* hPrimPho = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPtPrim_MCPhoton" ,icalo));
1624 TH1F* hPrimPhoPi0 = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPtPrim_MCPhotonPi0Decay",icalo));
1625 TH1F* hPrimPhoEta = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPtPrim_MCPhotonEtaDecay",icalo));
1626 TH1F* hPrimPi0 = (TH1F*)
GetHisto(Form(
"AnaPi0_Calo%d_hPrimPi0Pt",icalo));
1627 TH1F* hPrimEta = (TH1F*)
GetHisto(Form(
"AnaPi0_Calo%d_hPrimEtaPt",icalo));
1629 TCanvas * cmc =
new TCanvas(Form(
"%s_MCHisto" ,histoTag.Data()),
1630 Form(
"Cluster MC origin for %s",histoTag.Data()),
1637 hClusterPho->SetTitle(
"Cluster origin spectra, primary spectra in Calo acceptance");
1638 hClusterPho->Sumw2();
1639 hClusterPho->SetMarkerColor(1);
1640 hClusterPho->SetMarkerStyle(20);
1641 hClusterPho->SetAxisRange(0.,50.,
"X");
1643 hClusterPho->SetXTitle(
"#it{E}_{rec}, #it{p}_{T,gen} (GeV)");
1644 hClusterPho->SetYTitle(
"Entries");
1645 hClusterPho->Draw(
"");
1647 hClusterPhoPi0->Sumw2();
1648 hClusterPhoPi0->SetMarkerColor(4);
1649 hClusterPhoPi0->SetMarkerStyle(20);
1650 hClusterPhoPi0->Draw(
"same");
1652 hClusterPhoEta->Sumw2();
1653 hClusterPhoEta->SetMarkerColor(2);
1654 hClusterPhoEta->SetMarkerStyle(20);
1655 hClusterPhoEta->Draw(
"same");
1657 hClusterPi0->Sumw2();
1658 hClusterPi0->SetMarkerColor(4);
1659 hClusterPi0->SetMarkerStyle(21);
1660 hClusterPi0->Draw(
"same");
1662 hClusterEta->Sumw2();
1663 hClusterEta->SetMarkerColor(2);
1664 hClusterEta->SetMarkerStyle(22);
1665 hClusterEta->Draw(
"same");
1668 hPrimPho->SetMarkerColor(1);
1669 hPrimPho->SetMarkerStyle(24);
1670 hPrimPho->Draw(
"same");
1672 hPrimPhoPi0->Sumw2();
1673 hPrimPhoPi0->SetMarkerColor(4);
1674 hPrimPhoPi0->SetMarkerStyle(24);
1675 hPrimPhoPi0->Draw(
"same");
1677 hPrimPhoEta->Sumw2();
1678 hPrimPhoEta->SetMarkerColor(2);
1679 hPrimPhoEta->SetMarkerStyle(24);
1680 hPrimPhoEta->Draw(
"same");
1683 hPrimPi0->SetMarkerColor(4);
1684 hPrimPi0->SetMarkerStyle(25);
1685 hPrimPi0->Draw(
"same");
1688 hPrimEta->SetMarkerColor(2);
1689 hPrimEta->SetMarkerStyle(26);
1690 hPrimEta->Draw(
"same");
1692 TLegend lR(0.5,0.5,0.7,0.89);
1693 lR.SetHeader(
"reco");
1694 lR.SetTextSize(0.04);
1695 lR.AddEntry(hClusterPho,
"#gamma",
"P");
1696 lR.AddEntry(hClusterPhoPi0,
"#gamma_{#pi^{0}}",
"P");
1697 lR.AddEntry(hClusterPhoEta,
"#gamma_{#eta}",
"P");
1698 lR.AddEntry(hClusterPi0,
"#pi^{0}",
"P");
1699 lR.AddEntry(hClusterEta,
"#eta",
"P");
1700 lR.SetBorderSize(0);
1704 TLegend lG(0.7,0.5,0.83,0.89);
1705 lG.SetHeader(
"gener");
1706 lG.SetTextSize(0.04);
1707 lG.AddEntry(hPrimPho,
"#gamma",
"P");
1708 lG.AddEntry(hPrimPhoPi0,
"#gamma_{#pi^{0}}",
"P");
1709 lG.AddEntry(hPrimPhoEta,
"#gamma_{#eta}",
"P");
1710 lG.AddEntry(hPrimPi0,
"#pi^{0}",
"P");
1711 lG.AddEntry(hPrimEta,
"#eta",
"P");
1712 lG.SetBorderSize(0);
1718 TH1F* hRatPho = (TH1F*) hClusterPho ->Clone(Form(
"%s_hGenRecoRatPho" ,histoTag.Data()));
1719 TH1F* hRatPi0 = (TH1F*) hClusterPi0 ->Clone(Form(
"%s_hGenRecoRatPi0" ,histoTag.Data()));
1720 TH1F* hRatEta = (TH1F*) hClusterEta ->Clone(Form(
"%s_hGenRecoRatEta" ,histoTag.Data()));
1721 TH1F* hRatPhoPi0 = (TH1F*) hClusterPhoPi0->Clone(Form(
"%s_hGenRecoRatPhoPi0",histoTag.Data()));
1722 TH1F* hRatPhoEta = (TH1F*) hClusterPhoEta->Clone(Form(
"%s_hGenRecoRatPhoEta",histoTag.Data()));
1724 hRatPho ->Divide(hPrimPho);
1725 hRatPhoPi0->Divide(hPrimPhoPi0);
1726 hRatPhoEta->Divide(hPrimPhoEta);
1727 hRatPi0 ->Divide(hPrimPi0);
1728 hRatEta ->Divide(hPrimEta);
1730 hRatPho->SetTitle(
"Reconstructed cluster / Generated particle in Calo acc.");
1731 hRatPho->SetYTitle(
"#it{Ratio reco / gener}");
1732 hRatPho->SetXTitle(
"#it{E} (GeV)");
1733 hRatPho->SetMinimum(1e-3);
1734 hRatPho->SetMaximum(20);
1736 hRatPhoPi0->Draw(
"same");
1737 hRatPhoEta->Draw(
"same");
1738 hRatPi0->Draw(
"same");
1739 hRatEta->Draw(
"same");
1741 TLegend l2(0.15,0.62,0.3,0.89);
1742 l2.SetTextSize(0.04);
1743 l2.AddEntry(hRatPho,
"#gamma",
"P");
1744 l2.AddEntry(hRatPhoPi0,
"#gamma_{#pi^{0}}",
"P");
1745 l2.AddEntry(hRatPhoEta,
"#gamma_{#eta}",
"P");
1746 l2.AddEntry(hRatPi0,
"#pi^{0}",
"P");
1747 l2.AddEntry(hRatEta,
"#eta",
"P");
1748 l2.SetBorderSize(0);
1755 TH2F* h2PrimPhoPhi = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPhiPrim_MCPhoton",icalo));
1756 TH2F* h2PrimPi0Phi = (
TH2F*)
GetHisto(Form(
"AnaPi0_Calo%d_hPrimPi0Phi" ,icalo));
1757 TH2F* h2PrimEtaPhi = (
TH2F*)
GetHisto(Form(
"AnaPi0_Calo%d_hPrimEtaPhi" ,icalo));
1759 Int_t binMin = hPrimPho->FindBin(3);
1761 TH1F* hPrimPhoPhi = (TH1F*) h2PrimPhoPhi->ProjectionY(Form(
"%s_hPrimPhoPhi",histoTag.Data()),binMin,1000);
1762 TH1F* hPrimPi0Phi = (TH1F*) h2PrimPi0Phi->ProjectionY(Form(
"%s_hPrimPi0Phi",histoTag.Data()),binMin,1000);
1763 TH1F* hPrimEtaPhi = (TH1F*) h2PrimEtaPhi->ProjectionY(Form(
"%s_hPrimEtaPhi",histoTag.Data()),binMin,1000);
1765 hPrimPhoPhi->Sumw2();
1766 hPrimPi0Phi->Sumw2();
1767 hPrimEtaPhi->Sumw2();
1769 hPrimPhoPhi->Scale(1./hPrimPhoPhi->Integral(0,1000));
1770 hPrimPi0Phi->Scale(1./hPrimPi0Phi->Integral(0,1000));
1771 hPrimEtaPhi->Scale(1./hPrimEtaPhi->Integral(0,1000));
1773 Float_t maxPhi = hPrimPhoPhi->GetMaximum();
1774 if(maxPhi < hPrimPi0Phi->GetMaximum()) maxPhi = hPrimPi0Phi->GetMaximum();
1775 if(maxPhi < hPrimEtaPhi->GetMaximum()) maxPhi = hPrimEtaPhi->GetMaximum();
1777 Float_t minPhi = hPrimPhoPhi->GetMinimum();
1778 if(minPhi > hPrimPi0Phi->GetMinimum()) minPhi = hPrimPi0Phi->GetMinimum();
1779 if(minPhi > hPrimEtaPhi->GetMinimum()) minPhi = hPrimEtaPhi->GetMinimum();
1781 hPrimPi0Phi->SetMaximum(maxPhi*1.1);
1782 hPrimPi0Phi->SetMinimum(minPhi);
1783 TGaxis::SetMaxDigits(3);
1785 hPrimPi0Phi->SetYTitle(
"1/total entries d#it{N}/d#varphi");
1786 hPrimPi0Phi->SetTitle(
"Generated particles #varphi for #it{E} > 3 GeV");
1787 hPrimPi0Phi->SetTitleOffset(1.5,
"Y");
1788 hPrimPi0Phi->SetMarkerColor(4);
1789 hPrimPi0Phi->SetMarkerStyle(21);
1790 hPrimPi0Phi->Draw(
"");
1792 hPrimPhoPhi->SetMarkerColor(1);
1793 hPrimPhoPhi->SetMarkerStyle(20);
1794 Float_t scale = TMath::RadToDeg();
1796 hPrimPhoPhi->Draw(
"same");
1798 hPrimEtaPhi->SetMarkerColor(2);
1799 hPrimEtaPhi->SetMarkerStyle(22);
1800 hPrimEtaPhi->Draw(
"same");
1805 TH2F* h2PrimPhoEtaP = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hYPrim_MCPhoton",icalo));
1806 TH2F* h2PrimPi0EtaP = (
TH2F*)
GetHisto(Form(
"AnaPi0_Calo%d_hPrimPi0Rapidity" ,icalo));
1807 TH2F* h2PrimEtaEtaP = (
TH2F*)
GetHisto(Form(
"AnaPi0_Calo%d_hPrimEtaRapidity" ,icalo));
1809 h2PrimPhoEtaP->Sumw2();
1810 h2PrimEtaEtaP->Sumw2();
1811 h2PrimPi0EtaP->Sumw2();
1813 binMin = hPrimPho->FindBin(3);
1815 TH1F* hPrimPhoEtaP = (TH1F*) h2PrimPhoEtaP->ProjectionY(Form(
"%s_hPrimPhoEtaP",histoTag.Data()),binMin,1000);
1816 TH1F* hPrimPi0EtaP = (TH1F*) h2PrimPi0EtaP->ProjectionY(Form(
"%s_hPrimPi0EtaP",histoTag.Data()),binMin,1000);
1817 TH1F* hPrimEtaEtaP = (TH1F*) h2PrimEtaEtaP->ProjectionY(Form(
"%s_hPrimEtaEtaP",histoTag.Data()),binMin,1000);
1819 hPrimPhoEtaP->Scale(1./hPrimPhoEtaP->Integral(0,1000));
1820 hPrimPi0EtaP->Scale(1./hPrimPi0EtaP->Integral(0,1000));
1821 hPrimEtaEtaP->Scale(1./hPrimEtaEtaP->Integral(0,1000));
1823 Float_t maxEta = hPrimPhoEtaP->GetMaximum();
1824 if(maxEta < hPrimPi0EtaP->GetMaximum()) maxEta = hPrimPi0EtaP->GetMaximum();
1825 if(maxEta < hPrimEtaEtaP->GetMaximum()) maxEta = hPrimEtaEtaP->GetMaximum();
1827 Float_t minEta = hPrimPhoEtaP->GetMinimum();
1828 if(minEta > hPrimPi0EtaP->GetMinimum()) minEta = hPrimPi0EtaP->GetMinimum();
1829 if(minEta > hPrimEtaEtaP->GetMinimum()) minEta = hPrimEtaEtaP->GetMinimum();
1831 hPrimPi0EtaP->SetMaximum(maxEta*1.1);
1832 hPrimPi0EtaP->SetMinimum(minEta);
1833 TGaxis::SetMaxDigits(3);
1835 hPrimPi0EtaP->SetYTitle(
"1/total entries d#it{N}/d#eta");
1836 hPrimPi0EtaP->SetTitle(
"Generated particles #eta for #it{E} > 3 GeV");
1837 hPrimPi0EtaP->SetTitleOffset(1.5,
"Y");
1838 hPrimPi0EtaP->SetMarkerColor(4);
1839 hPrimPi0EtaP->SetMarkerStyle(21);
1840 hPrimPi0EtaP->Draw(
"");
1842 hPrimPhoEtaP->SetMarkerColor(1);
1843 hPrimPhoEtaP->SetMarkerStyle(20);
1844 scale = TMath::RadToDeg();
1845 hPrimPhoEtaP->Draw(
"same");
1847 hPrimEtaEtaP->SetMarkerColor(2);
1848 hPrimEtaEtaP->SetMarkerStyle(22);
1849 hPrimEtaEtaP->Draw(
"same");
1851 cmc->Print(Form(
"%s_MCHisto.%s",histoTag.Data(),format.Data()));
1857 delete hPrimPhoPhi ;
1858 delete hPrimPi0Phi ;
1859 delete hPrimEtaPhi ;
1860 delete hPrimPhoEtaP ;
1861 delete hPrimPi0EtaP ;
1862 delete hPrimEtaEtaP ;
1888 if(list)
delete list;
1890 list = (
TList*)
dir->Get(trigName);
1894 printf(
"List not found, do nothing\n");
1898 if ( list->GetEntries() <= 0 )
1900 printf(
"No histograms found <%d>, do nothing\n",list->GetEntries());
1906 fout =
new TFile(Form(
"AnalysisResults%s.root",histoTag.Data()),
"RECREATE");
1927 if ( list ) histo = list->FindObject(histoName);
1928 else histo =
file->Get (histoName);
1947 if(tag) histo->Write(Form(
"fig_ga_%s_%s",histoTag.Data(), histo->GetName()));
1948 else histo->Write(Form(
"fig_ga_%s" ,histo->GetName()));
1961 if(canvas) canvas->Write(Form(
"canvas_ga_%s",canvas->GetName()));
1972 if (a->GetXbins()->GetSize())
1978 for(
Int_t i = 0; i < X.GetSize(); i++) X[i] = scale*X[i];
1979 a->Set((X.GetSize() - 1), X.GetArray());
1986 a->Set(a->GetNbins(),
1987 - scale*a->GetXmin(),
1988 - scale*a->GetXmax());
Int_t color[]
option to what and if export to output file
TString format
file names tag, basically the trigger and calorimeter combination
void CorrelQA(Int_t icalo)
TObject * GetHisto(TString histoName)
TString histoTag
output file with plots or extracted histograms
void SaveCanvas(TCanvas *canvas)
TList * list
TDirectory file where lists per trigger are stored in train ouput.
void ProcessTrigger(TString trigName="default", Bool_t checkList=kTRUE)
void ScaleAxis(TAxis *a, Double_t scale)
void DrawAnaCaloTrackQA(TString listName="Pi0IM_GammaTrackCorr_EMCAL", TString fileName="AnalysisResults.root", Int_t exportTo=1, TString fileFormat="eps", TString outFileName="CaloTrackCorrQA_output")
void SaveHisto(TObject *histo, Bool_t tag=kTRUE)
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)
Int_t exportToFile
plots format: eps, pdf, etc.
TFile * file
TList with histograms for a given trigger.
Bool_t GetList(TString trigName)
TFile * fout
input train file
void ScaleXaxis(TH1 *h, Double_t scale)