33 #if !defined(__CINT__) || defined(__MAKECINT__)
36 #include <TDirectoryFile.h>
75 TDirectoryFile *
dir = 0;
84 Int_t color[]={kBlack,kRed,kOrange+1,kYellow+1,kGreen+2,kBlue,kCyan+1,kViolet,kMagenta+2,kGray,kCyan-2,kViolet-2};
106 TString listName =
"Pi0IM_GammaTrackCorr_EMCAL",
110 TString outFileName =
"CaloTrackCorrQA_output"
116 printf(
"Open <%s>; Get Trigger List : <%s>; Export option <%d>; format %s; outputFileName %s.root\n",
124 printf(
"File not found, do nothing\n");
128 dir = (TDirectoryFile*) file->Get(listName);
131 printf(
"DirectoryFile not found, do nothing\n");
139 fout = TFile::Open(Form(
"%s.root",outFileName.Data()),
"UPDATE");
141 fout =
new TFile(Form(
"%s.root",outFileName.Data()),
"RECREATE");
145 TDirectoryFile *cdd = (TDirectoryFile*)
fout->Get(
"GA");
148 printf(
"Warning: GA <dir> doesn't exist, creating a new one");
149 cdd = (TDirectoryFile*)
fout->mkdir(
"GA");
200 printf(
"\t -- Process trigger %s, ok %d\n",trigName.Data(), ok);
205 gStyle->SetOptTitle(1);
206 gStyle->SetOptStat(0);
207 gStyle->SetOptFit(000000);
208 gStyle->SetPadRightMargin(0.15);
211 gStyle->SetTitleFontSize(0.05);
215 if (trigName.Contains(
"EMCAL")) { calo = 0 ; nCalo = 1 ; }
216 else if(trigName.Contains(
"DCAL" )) { calo = 1 ; nCalo = 2 ; }
218 TString caloString [] = {
"EMCAL",
"DCAL"};
225 for(
Int_t icalo = calo; icalo < nCalo; icalo++)
227 if(trigName.Contains(
"default")) histoTag=Form(
"%s_%s",caloString[icalo].
Data(),trigName.Data());
235 gStyle->SetPadRightMargin(0.02);
246 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_hTrackMatchedDEtaNegNoCut",icalo));
391 TH2F* h2TrackMatchResEtaPos = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDEtaPosNoCut",icalo));
392 TH2F* h2TrackMatchResPhiNeg = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDPhiNegNoCut",icalo));
393 TH2F* h2TrackMatchResPhiPos = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hTrackMatchedDPhiPosNoCut",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()));
623 TCanvas * ctrack =
new TCanvas(Form(
"%s_TrackHisto" ,histoTag.Data()),
624 Form(
"Hybrid tracks for %s",histoTag.Data()),
631 if(!hTrackEtaPhi)
return;
632 hTrackEtaPhi ->Add( (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiPositive"));
633 hTrackEtaPhi ->SetAxisRange(-0.9,0.9,
"X");
634 hTrackEtaPhi ->SetTitleOffset(1.5,
"Y");
635 hTrackEtaPhi ->SetTitle(
"Hybrid tracks #eta vs #varphi #it{p}_{T} > 0.2 GeV/#it{c}");
636 hTrackEtaPhi->SetZTitle(
"Entries");
637 hTrackEtaPhi->SetTitleOffset(1.5,
"Z");
639 hTrackEtaPhi ->Draw(
"colz");
643 TH2F * hTrackEtaPhiSPD = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiSPDRefitPt02");
644 TH2F * hTrackEtaPhiNoSPD = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiNoSPDRefitPt02");
646 TH1F* hPhiSPD = (TH1F*)hTrackEtaPhiSPD ->ProjectionY(Form(
"%s_hTrackPhiSPD" ,histoTag.Data()),0,1000);
647 TH1F* hPhiNoSPD = (TH1F*)hTrackEtaPhiNoSPD->ProjectionY(Form(
"%s_hTrackPhiNoSPD",histoTag.Data()),0,1000);
648 TH1F* hPhi = (TH1F*)hPhiSPD->Clone( Form(
"%s_hTrackPhi" ,histoTag.Data()));
649 hPhi->Add(hPhiNoSPD);
651 hPhi ->SetTitle(
"Hybrid track type #varphi, 0.2<#it{p}_{T}<2 GeV/#it{c}");
652 hPhi ->SetLineColor(1);
653 hPhiSPD ->SetLineColor(2);
654 hPhiNoSPD->SetLineColor(4);
656 hPhi ->SetMinimum(1);
657 hPhi ->SetMaximum(hPhi->GetMaximum()*1.3);
658 hPhi ->SetTitleOffset(1.5,
"Y");
659 hPhi ->SetYTitle(
"Entries");
661 TGaxis::SetMaxDigits(3);
664 hPhiSPD ->Draw(
"Hsame");
665 hPhiNoSPD->Draw(
"Hsame");
667 TLegend l(0.2,0.75,0.4,0.89);
669 l.AddEntry(hPhi,
"Sum",
"L");
670 l.AddEntry(hPhiSPD ,
"SPD+Refit",
"L");
671 l.AddEntry(hPhiNoSPD,
"No SPD+Refit",
"L");
679 TH1F* hTOF = (TH1F*)
GetHisto(
"AnaHadrons_hTOFSignalPtCut");
680 hTOF->SetYTitle(
"Entries");
681 hTOF->SetTitleOffset(1.5,
"Y");
689 TH1F* hPt = (TH1F*)
GetHisto(
"AnaHadrons_hPt");
690 TH1F* hPtSPD = (TH1F*)
GetHisto(
"AnaHadrons_hPtSPDRefit");
691 TH1F* hPtNoSPD = (TH1F*)
GetHisto(
"AnaHadrons_hPtNoSPDRefit");
692 hPt ->SetLineColor(1);
693 hPtSPD ->SetLineColor(2);
694 hPtNoSPD->SetLineColor(4);
696 hPt ->SetTitle(
"Hybrid track type #it{p}_{T}");
697 hPt ->SetYTitle(
"Entries");
698 hPt ->SetTitleOffset(1.5,
"Y");
701 hPtSPD ->Draw(
"same");
702 hPtNoSPD->Draw(
"same");
720 ctrack->Print(Form(
"%s_TrackHisto.%s",histoTag.Data(),format.Data()));
753 TCanvas * cpi0 =
new TCanvas(Form(
"%s_InvariantMassHisto" ,histoTag.Data()),
754 Form(
"Neutral mesons inv. mass for %s",histoTag.Data()),
760 for(
Int_t icen = 0; icen < 10; icen++)
762 hMassE [icen] = (
TH2F*)
GetHisto(Form(
"AnaPi0_Calo%d_hRe_cen%d_pidbit0_asy0_dist1",icalo,icen));
763 hMixMassE[icen] = (
TH2F*)
GetHisto(Form(
"AnaPi0_Calo%d_hMi_cen%d_pidbit0_asy0_dist1",icalo,icen));
765 if(!hMassE[0])
return;
774 h2DMass = (
TH2F*) hMassE[6]->Clone(Form(
"%s_h2DMass",histoTag.Data()));
775 for(
Int_t icen = 7; icen < 10; icen++) h2DMass->Add(hMassE[icen]);
776 h2DMass->SetTitle(
"Inv. mass vs #it{p}_{T,pair}, Cen: 60-100%");
780 h2DMass = (
TH2F*) hMassE[0]->Clone(Form(
"%s_h2DMass",histoTag.Data()));
781 h2DMass->SetTitle(
"Inv. mass vs #it{p}_{T,pair}");
784 h2DMass->SetTitleOffset(1.5,
"Y");
785 h2DMass->SetAxisRange(0.0,0.7,
"Y");
786 h2DMass->SetAxisRange(0,30,
"X");
787 h2DMass->Draw(
"colz");
797 for(
Int_t icen=0; icen<10; icen++ )
805 TH1F * hX = (TH1F*) hMassE[0]->ProjectionX(Form(
"%s_hEPairCen0",histoTag.Data()),0,10000);
806 Int_t binmin = hX->FindBin(2);
807 Int_t binmax = hX->FindBin(10);
808 if(histoTag.Contains(
"L0"))
810 binmin = hX->FindBin(5);
811 binmax = hX->FindBin(10);
813 else if(histoTag.Contains(
"L2"))
815 binmin = hX->FindBin(8);
816 binmax = hX->FindBin(12);
818 else if(histoTag.Contains(
"L1"))
820 binmin = hX->FindBin(10);
821 binmax = hX->FindBin(15);
828 for(
Int_t icen = 0; icen < 6; icen++)
830 if(!hMassE[icen])
continue;
832 hMass[icen] = (TH1F*) hMassE [icen]->ProjectionY(Form(
"%s_hMassCen%d",histoTag.Data(),icen),binmin,binmax);
833 hMix [icen] = (TH1F*) hMixMassE[icen]->ProjectionY(Form(
"%s_hMixCen%d" ,histoTag.Data(),icen),binmin,binmax);
834 hMass[icen]->Sumw2();
835 hMix [icen]->Sumw2();
837 hMassPi0[icen] = (TH1F*) hMass[icen]->Clone(Form(
"%s_hMassPi0Cen%d",histoTag.Data(),icen));
838 hMassEta[icen] = (TH1F*) hMass[icen]->Clone(Form(
"%s_hMassEtaCen%d",histoTag.Data(),icen));
840 hMassPi0[icen]->Divide(hMix[icen]);
841 hMassPi0[icen]->Fit(
"pol0",
"Q",
"",0.25,0.35);
843 if(hMassPi0[icen]->GetFunction(
"pol0")) scale = hMassPi0[icen]->GetFunction(
"pol0")->GetParameter(0);
845 hMassPi0[icen]->Scale(1./scale);
846 hMassPi0[icen]->SetMarkerStyle(24);
847 hMassPi0[icen]->SetMarkerColor(
color[icen]);
848 hMassPi0[icen]->SetLineColor(
color[icen]);
849 hMassPi0[icen]->SetAxisRange(0.04,0.24);
852 hMassEta[icen]->Rebin(4);
853 hMix [icen]->Rebin(4);
854 hMassEta[icen]->Divide(hMix[icen]);
855 hMassEta[icen]->SetMarkerStyle(25);
856 hMassEta[icen]->SetMarkerColor(
color[icen]);
857 hMassEta[icen]->SetLineColor(
color[icen]);
858 hMassEta[icen]->SetAxisRange(0.4,0.9);
860 hMassEta[icen]->Scale(1./scale);
862 if(maxEta < hMassEta[icen]->GetMaximum()) maxEta = hMassEta[icen]->GetMaximum();
863 if(maxPi0 < hMassPi0[icen]->GetMaximum()) maxPi0 = hMassPi0[icen]->GetMaximum();
865 if(minEta > hMassEta[icen]->GetMinimum()) minEta = hMassEta[icen]->GetMinimum();
866 if(minPi0 > hMassPi0[icen]->GetMinimum()) minPi0 = hMassPi0[icen]->GetMinimum();
871 hMassPi0[0]->SetMinimum(minPi0);
872 hMassPi0[0]->SetTitleOffset(1.5,
"Y");
873 hMassPi0[0]->SetYTitle(
"Real / Mixed");
874 hMassPi0[0]->SetTitle(
"#pi^{0} peak, 2 < #it{E}_{pair}< 10 GeV");
875 if (histoTag.Contains(
"L0")) hMassPi0[0]->SetTitle(
"#pi^{0} peak, 5 < #it{E}_{pair}< 10 GeV");
876 else if(histoTag.Contains(
"L2")) hMassPi0[0]->SetTitle(
"#pi^{0} peak, 8 < #it{E}_{pair}< 12 GeV");
877 else if(histoTag.Contains(
"L1")) hMassPi0[0]->SetTitle(
"#pi^{0} peak, 10 < #it{E}_{pair}< 15 GeV");
883 hMassPi0[0]->SetMaximum(maxPi0*1.2);
884 hMassPi0[5]->Draw(
"Hsame");
885 hMassPi0[4]->Draw(
"Hsame");
886 hMassPi0[3]->Draw(
"Hsame");
887 hMassPi0[2]->Draw(
"Hsame");
888 hMassPi0[1]->Draw(
"Hsame");
889 hMassPi0[0]->Draw(
"Hsame");
895 TLegend l(0.12,0.6,0.4,0.85);
897 l.AddEntry(hMassPi0[0],
"0-10%",
"P");
898 l.AddEntry(hMassPi0[1],
"10-20%",
"P");
899 l.AddEntry(hMassPi0[2],
"20-30%",
"P");
900 l.AddEntry(hMassPi0[3],
"30-40%",
"P");
901 l.AddEntry(hMassPi0[4],
"40-70%",
"P");
902 l.AddEntry(hMassPi0[5],
"50-60%",
"P");
908 TLine l1(0.04,1,0.24,1);
918 for(
Int_t ism = 0; ism < 20; ism++)
924 binmin = hX->FindBin(4);
925 binmax = hX->FindBin(20);
929 if(icalo==1) first = 12;
931 for(
Int_t ism = first; ism < 20; ism++)
934 if(!hTmpSM)
continue;
936 hSM[ism] = (TH1F*) hTmpSM->ProjectionY(Form(
"%s_hMassSM%d",histoTag.Data(),ism),binmin,binmax);
938 hSM[ism]->SetMarkerStyle(26);
941 hSM[ism]->SetMarkerColor(
color[ism-first]);
942 hSM[ism]->SetLineColor(
color[ism-first]);
948 hMixSM[ism] = (TH1F*) hTmpMixSM->ProjectionY(Form(
"%s_hMassMixSM%d",histoTag.Data(),ism),binmin,binmax);
949 hMixSM[ism]->Sumw2();
950 hMixSM[ism]->Rebin(2);
951 hSM[ism]->Divide(hMixSM[ism]);
952 hSM[ism]->Fit(
"pol0",
"Q",
"",0.25,0.35);
954 if(hSM[ism]->GetFunction(
"pol0")) scale = hSM[ism]->GetFunction(
"pol0")->GetParameter(0);
956 hSM[ism]->Scale(1./scale);
959 if(maxSM < hSM[ism]->GetMaximum()) maxSM = hSM[ism]->GetMaximum();
962 hSM[first]->SetTitle(
"#pi^{0} peak in SM, 4 < #it{E}_{pair}< 10 GeV");
963 hSM[first]->SetTitleOffset(1.5,
"Y");
964 hSM[first]->SetAxisRange(0.04,0.24);
965 hSM[first]->SetMaximum(maxSM*1.2);
966 hSM[first]->SetMinimum(0.8);
967 hSM[first]->SetYTitle(
"Real / Mixed");
969 hSM[first]->Draw(
"H");
970 TLegend lsm(0.12,0.5,0.35,0.85);
971 lsm.SetTextSize(0.04);
972 lsm.AddEntry(hSM[first],Form(
"Mod %d",first),
"P");
974 for(
Int_t ism = first+1; ism < 20; ism++)
976 if(!hSM[ism])
continue;
978 hSM[ism]->Draw(
"Hsame");
979 lsm.AddEntry(hSM[ism],Form(
"Mod %d",ism),
"P");
982 lsm.SetBorderSize(0);
993 hMassEta[0]->SetMinimum(minEta);
994 hMassEta[0]->SetTitleOffset(1.5,
"Y");
995 hMassEta[0]->SetYTitle(
"Real / Mixed");
996 hMassEta[0]->SetTitle(
"#eta peak, 2 <#it{E}_{pair}< 10 GeV");
997 if (histoTag.Contains(
"L0")) hMassEta[0]->SetTitle(
"#eta peak, 5 < #it{E}_{pair}< 10 GeV");
998 else if(histoTag.Contains(
"L2")) hMassEta[0]->SetTitle(
"#eta peak, 8 < #it{E}_{pair}< 12 GeV");
999 else if(histoTag.Contains(
"L1")) hMassEta[0]->SetTitle(
"#eta peak, 10 < #it{E}_{pair}< 15 GeV");
1001 hMassEta[0]->Draw(
"H");
1005 hMassEta[0]->SetMaximum(maxEta*1.2);
1006 hMassEta[5]->Draw(
"Hsame");
1007 hMassEta[4]->Draw(
"Hsame");
1008 hMassEta[3]->Draw(
"Hsame");
1009 hMassEta[2]->Draw(
"Hsame");
1010 hMassEta[1]->Draw(
"Hsame");
1011 hMassEta[0]->Draw(
"Hsame");
1013 TLegend l2(0.12,0.6,0.4,0.85);
1014 l2.SetTextSize(0.04);
1015 l2.AddEntry(hMassEta[0],
"0-10%",
"P");
1016 l2.AddEntry(hMassEta[1],
"10-20%",
"P");
1017 l2.AddEntry(hMassEta[2],
"20-30%",
"P");
1018 l2.AddEntry(hMassEta[3],
"30-40%",
"P");
1019 l2.AddEntry(hMassEta[4],
"40-70%",
"P");
1020 l2.AddEntry(hMassEta[5],
"50-60%",
"P");
1021 l2.SetBorderSize(0);
1026 cpi0->Print(Form(
"%s_Pi0Histo.%s",histoTag.Data(),format.Data()));
1035 for(
Int_t icen=0; icen<10; icen++ )
1037 if ( hMass [icen] )
delete hMass [icen];
1038 if ( hMix [icen] )
delete hMix [icen];
1039 if ( hMassPi0[icen] )
delete hMassPi0[icen];
1040 if ( hMassEta[icen] )
delete hMassEta[icen];
1043 for(
Int_t ism = first; ism < 20; ism++)
1045 if ( hSM [ism] )
delete hSM [ism];
1046 if ( hMixSM[ism] )
delete hMixSM[ism];
1055 for(
Int_t icen=0; icen<10; icen++ )
1063 for(
Int_t ism = first; ism < 20; ism++)
1083 TCanvas * cIsolation =
new TCanvas(Form(
"%s_IsolationHisto" ,histoTag.Data()),
1084 Form(
"Isolation cone for %s",histoTag.Data()),
1086 cIsolation->Divide(2,2);
1089 if ( histoTag.Contains(
"L0") ) minClusterE = 5;
1090 else if ( histoTag.Contains(
"L2") ) minClusterE = 10;
1091 else if ( histoTag.Contains(
"L1") ) minClusterE = 12;
1093 TH1F * hIsolated = (TH1F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPt" ,icalo));
1094 TH1F * hNotIsolated = (TH1F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPtNoIso",icalo));
1096 if(!hIsolated)
return;
1098 Int_t minClusterEBin = hIsolated->FindBin(minClusterE);
1099 Float_t nTrig = hIsolated->Integral(minClusterEBin,100000)+hNotIsolated->Integral(minClusterE,100000);
1101 if ( nTrig <=0 ) return ;
1109 hIsolated ->Sumw2();
1110 hNotIsolated->Sumw2();
1111 hIsolated ->SetMarkerColor(4);
1112 hNotIsolated->SetMarkerColor(2);
1113 hIsolated ->SetLineColor (4);
1114 hNotIsolated->SetLineColor (2);
1115 hIsolated ->SetMarkerStyle(24);
1116 hNotIsolated->SetMarkerStyle(20);
1118 hNotIsolated->SetTitle(
"(non) isolated cluster spectra, #it{R}=0.4, #Sigma #it{p}_{T}<2 GeV/#it{c}");
1119 hNotIsolated->SetYTitle(
"Entries");
1121 hNotIsolated->Draw();
1122 hIsolated ->Draw(
"same");
1124 TLegend lI(0.4,0.7,0.88,0.88);
1125 lI.SetTextSize(0.04);
1126 lI.SetBorderSize(0);
1128 lI.AddEntry(hIsolated ,
"Isolated candidates",
"P");
1129 lI.AddEntry(hNotIsolated,
"NOT Isolated candidates",
"P");
1138 TLegend l(0.55,0.55,0.88,0.88);
1139 l.SetTextSize(0.04);
1143 TH2F* h2PtInCone = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPtInCone" ,icalo));
1144 TH2F* h2PtInConeCluster = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPtClusterInCone" ,icalo));
1145 TH2F* h2PtInConeTrack = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPtTrackInCone" ,icalo));
1146 TH2F* h2PtInConeTrackPerp = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPtInPerpCone" ,icalo));
1147 TH2F* h2PtInEtaBandTrack = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hEtaBandTrackPt" ,icalo));
1148 TH2F* h2PtInEtaBandCluster = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hEtaBandClusterPt",icalo));
1150 TH1F* hPtInCone = (TH1F*) h2PtInCone ->ProjectionY(Form(
"%s_hPtInCone_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1151 TH1F* hPtInConeCluster = (TH1F*) h2PtInConeCluster ->ProjectionY(Form(
"%s_hPtInConeCluster_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1152 TH1F* hPtInConeTrack = (TH1F*) h2PtInConeTrack ->ProjectionY(Form(
"%s_hPtInConeTrack_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1153 TH1F* hPtInConeTrackPerp = (TH1F*) h2PtInConeTrackPerp ->ProjectionY(Form(
"%s_hPtInConePerp_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1154 TH1F* hPtInEtaBandTrack = (TH1F*) h2PtInEtaBandTrack ->ProjectionY(Form(
"%s_hPtInConeEtaBandTrack_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1155 TH1F* hPtInEtaBandCluster = (TH1F*) h2PtInEtaBandCluster->ProjectionY(Form(
"%s_hPtInConeEtaBandCluster_TrigEnMin%2.0fGeV",histoTag.Data(),minClusterE),minClusterEBin,10000);
1157 hPtInCone ->Sumw2();
1158 hPtInConeCluster ->Sumw2();
1159 hPtInConeTrack ->Sumw2();
1160 hPtInConeTrackPerp ->Sumw2();
1161 hPtInEtaBandCluster->Sumw2();
1162 hPtInEtaBandTrack ->Sumw2();
1165 hPtInCone ->Rebin(rb);
1166 hPtInConeCluster ->Rebin(rb);
1167 hPtInConeTrack ->Rebin(rb);
1168 hPtInConeTrackPerp ->Rebin(rb);
1169 hPtInEtaBandCluster->Rebin(rb);
1170 hPtInEtaBandTrack ->Rebin(rb);
1172 hPtInCone ->Scale(1./nTrig);
1173 hPtInConeCluster ->Scale(1./nTrig);
1174 hPtInConeTrack ->Scale(1./nTrig);
1175 hPtInConeTrackPerp ->Scale(1./nTrig);
1176 hPtInEtaBandCluster->Scale(1./nTrig);
1177 hPtInEtaBandTrack ->Scale(1./nTrig);
1179 hPtInCone ->SetAxisRange(0,20);
1180 hPtInConeCluster ->SetAxisRange(0,20);
1181 hPtInConeTrack ->SetAxisRange(0,20);
1182 hPtInConeTrackPerp ->SetAxisRange(0,20);
1183 hPtInEtaBandCluster->SetAxisRange(0,20);
1184 hPtInEtaBandTrack ->SetAxisRange(0,20);
1186 hPtInCone ->SetMarkerStyle(24);
1187 hPtInConeCluster ->SetMarkerStyle(20);
1188 hPtInConeTrack ->SetMarkerStyle(20);
1189 hPtInConeTrackPerp ->SetMarkerStyle(27);
1190 hPtInEtaBandCluster->SetMarkerStyle(21);
1191 hPtInEtaBandTrack ->SetMarkerStyle(21);
1193 hPtInCone ->SetMarkerColor(1);
1194 hPtInConeCluster ->SetMarkerColor(2);
1195 hPtInConeTrack ->SetMarkerColor(4);
1196 hPtInConeTrackPerp ->SetMarkerColor(4);
1197 hPtInEtaBandCluster->SetMarkerColor(2);
1198 hPtInEtaBandTrack ->SetMarkerColor(4);
1200 hPtInCone ->SetLineColor(1);
1201 hPtInConeCluster ->SetLineColor(2);
1202 hPtInConeTrack ->SetLineColor(4);
1203 hPtInConeTrackPerp ->SetLineColor(4);
1204 hPtInEtaBandCluster->SetLineColor(2);
1205 hPtInEtaBandTrack ->SetLineColor(4);
1207 hPtInCone->SetTitleOffset(1.5,
"Y");
1208 hPtInCone->SetYTitle(
"Entries / #it{N}_{candidates}");
1209 hPtInCone->SetTitle(Form(
"Track/cluster spectra in cone p_{T,cand}>%2.0f GeV/#it{c}, #it{R}=0.4",minClusterE));
1211 Float_t max = hPtInCone->GetMaximum();
1212 if(max < hPtInConeTrack ->GetMaximum()) max = hPtInConeTrack ->GetMaximum();
1213 if(max < hPtInConeCluster ->GetMaximum()) max = hPtInConeCluster ->GetMaximum();
1214 if(max < hPtInConeTrackPerp ->GetMaximum()) max = hPtInConeTrackPerp ->GetMaximum();
1215 if(max < hPtInEtaBandCluster->GetMaximum()) max = hPtInEtaBandCluster->GetMaximum();
1216 if(max < hPtInEtaBandTrack ->GetMaximum()) max = hPtInEtaBandTrack ->GetMaximum();
1217 hPtInCone->SetMaximum(max*2);
1219 hPtInCone ->Draw(
"");
1220 hPtInConeCluster ->Draw(
"same");
1221 hPtInConeTrack ->Draw(
"same");
1222 hPtInConeTrackPerp ->Draw(
"same");
1223 hPtInEtaBandCluster->Draw(
"same");
1224 hPtInEtaBandTrack ->Draw(
"same");
1226 l.AddEntry(hPtInCone ,
"Tracks+Clusters",
"P");
1227 l.AddEntry(hPtInConeCluster ,
"Clusters inside cone",
"P");
1228 l.AddEntry(hPtInConeTrack ,
"Tracks inside cone",
"P");
1229 l.AddEntry(hPtInConeTrackPerp ,
"Tracks inside #perp cones",
"P");
1230 l.AddEntry(hPtInEtaBandTrack ,
"Tracks #eta band",
"P");
1231 l.AddEntry(hPtInEtaBandCluster,
"Clusters #eta band",
"P");
1241 TLegend l2(0.55,0.55,0.88,0.88);
1242 l2.SetTextSize(0.04);
1243 l2.SetBorderSize(0);
1246 TH2F* h2SumPtCone = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConePtSum" ,icalo));
1247 TH2F* h2SumPtConeCluster = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConePtSumCluster" ,icalo));
1248 TH2F* h2SumPtConeTrack = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConePtSumTrack" ,icalo));
1249 TH2F* h2SumPtConeTrackPerp = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hPerpConePtSum" ,icalo));
1250 TH2F* h2SumPtEtaBandTrack = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConeSumPtEtaUENormTrack" ,icalo));
1251 TH2F* h2SumPtEtaBandCluster = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConeSumPtEtaUENormCluster",icalo));
1252 TH2F* h2SumPtConeSubTrack = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConeSumPtEtaUESubTrack" ,icalo));
1253 TH2F* h2SumPtConeSubCluster = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConeSumPtEtaUESubCluster" ,icalo));
1254 TH2F* h2SumPtConeSub = (
TH2F*)
GetHisto(Form(
"AnaIsolPhoton_Calo%d_hConeSumPtEtaUESub" ,icalo));
1256 TH1F* hSumPtCone = (TH1F*) h2SumPtCone ->ProjectionY(Form(
"%s_hSumPtCone_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1257 TH1F* hSumPtConeCluster = (TH1F*) h2SumPtConeCluster ->ProjectionY(Form(
"%s_hSumPtConeCluster_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1258 TH1F* hSumPtConeTrack = (TH1F*) h2SumPtConeTrack ->ProjectionY(Form(
"%s_hSumPtConeTrack_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1259 TH1F* hSumPtConeTrackPerp = (TH1F*) h2SumPtConeTrackPerp ->ProjectionY(Form(
"%s_hSumPtConePerp_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1260 TH1F* hSumPtEtaBandTrack = (TH1F*) h2SumPtEtaBandTrack ->ProjectionY(Form(
"%s_hSumPtConeEtaBandTrack_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1261 TH1F* hSumPtEtaBandCluster = (TH1F*) h2SumPtEtaBandCluster->ProjectionY(Form(
"%s_hSumPtConeEtaBandCluster_TrigEnMin%2.0fGeV",histoTag.Data(),minClusterE),minClusterEBin,10000);
1262 TH1F* hSumPtConeSub = (TH1F*) h2SumPtConeSub ->ProjectionY(Form(
"%s_hSumPtConeSub_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1263 TH1F* hSumPtConeSubCluster = (TH1F*) h2SumPtConeSubCluster->ProjectionY(Form(
"%s_hSumPtConeSubCluster_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1264 TH1F* hSumPtConeSubTrack = (TH1F*) h2SumPtConeSubTrack ->ProjectionY(Form(
"%s_hSumPtConeSubTrack_TrigEnMin%2.0fGeV" ,histoTag.Data(),minClusterE),minClusterEBin,10000);
1266 hSumPtCone ->Sumw2();
1267 hSumPtConeCluster ->Sumw2();
1268 hSumPtConeTrack ->Sumw2();
1269 hSumPtConeSub ->Sumw2();
1270 hSumPtConeSubCluster->Sumw2();
1271 hSumPtConeSubTrack ->Sumw2();
1272 hSumPtConeTrackPerp ->Sumw2();
1273 hSumPtEtaBandCluster->Sumw2();
1274 hSumPtEtaBandTrack ->Sumw2();
1277 hSumPtCone ->Rebin(rb);
1278 hSumPtConeCluster ->Rebin(rb);
1279 hSumPtConeTrack ->Rebin(rb);
1280 hSumPtConeSub ->Rebin(rb);
1281 hSumPtConeSubCluster->Rebin(rb);
1282 hSumPtConeSubTrack ->Rebin(rb);
1283 hSumPtConeTrackPerp ->Rebin(rb);
1284 hSumPtEtaBandCluster->Rebin(rb);
1285 hSumPtEtaBandTrack ->Rebin(rb);
1287 hSumPtCone ->Scale(1./nTrig);
1288 hSumPtConeCluster ->Scale(1./nTrig);
1289 hSumPtConeTrack ->Scale(1./nTrig);
1290 hSumPtConeSub ->Scale(1./nTrig);
1291 hSumPtConeSubCluster->Scale(1./nTrig);
1292 hSumPtConeSubTrack ->Scale(1./nTrig);
1293 hSumPtConeTrackPerp ->Scale(1./nTrig);
1294 hSumPtEtaBandCluster->Scale(1./nTrig);
1295 hSumPtEtaBandTrack ->Scale(1./nTrig);
1297 hSumPtCone ->SetAxisRange(0,500);
1298 hSumPtConeCluster ->SetAxisRange(0,500);
1299 hSumPtConeTrack ->SetAxisRange(0,500);
1300 hSumPtConeSub ->SetAxisRange(-5,500);
1301 hSumPtConeSubCluster->SetAxisRange(-5,500);
1302 hSumPtConeSubTrack ->SetAxisRange(-5,500);
1303 hSumPtConeTrackPerp ->SetAxisRange(0,500);
1304 hSumPtEtaBandCluster->SetAxisRange(0,500);
1305 hSumPtEtaBandTrack ->SetAxisRange(0,500);
1307 hSumPtCone ->SetMarkerStyle(24);
1308 hSumPtConeCluster ->SetMarkerStyle(20);
1309 hSumPtConeTrack ->SetMarkerStyle(20);
1310 hSumPtConeSub ->SetMarkerStyle(25);
1311 hSumPtConeSubCluster->SetMarkerStyle(25);
1312 hSumPtConeSubTrack ->SetMarkerStyle(25);
1313 hSumPtConeTrackPerp ->SetMarkerStyle(27);
1314 hSumPtEtaBandCluster->SetMarkerStyle(21);
1315 hSumPtEtaBandTrack ->SetMarkerStyle(21);
1317 hSumPtCone ->SetMarkerColor(1);
1318 hSumPtConeCluster ->SetMarkerColor(2);
1319 hSumPtConeTrack ->SetMarkerColor(4);
1320 hSumPtConeSub ->SetMarkerColor(1);
1321 hSumPtConeSubCluster->SetMarkerColor(2);
1322 hSumPtConeSubTrack ->SetMarkerColor(4);
1323 hSumPtConeTrackPerp ->SetMarkerColor(4);
1324 hSumPtEtaBandCluster->SetMarkerColor(2);
1325 hSumPtEtaBandTrack ->SetMarkerColor(4);
1327 hSumPtCone ->SetLineColor(1);
1328 hSumPtConeCluster ->SetLineColor(2);
1329 hSumPtConeTrack ->SetLineColor(4);
1330 hSumPtConeSub ->SetLineColor(1);
1331 hSumPtConeSubCluster->SetLineColor(2);
1332 hSumPtConeSubTrack ->SetLineColor(4);
1333 hSumPtConeTrackPerp ->SetLineColor(4);
1334 hSumPtEtaBandCluster->SetLineColor(2);
1335 hSumPtEtaBandTrack ->SetLineColor(4);
1337 hSumPtCone->SetTitleOffset(1.5,
"Y");
1338 hSumPtCone->SetYTitle(
"Entries / #it{N}_{candidates}");
1339 hSumPtCone->SetTitle(Form(
"Track/cluster #Sigma #it{p}_{T}, p_{T,cand}>%2.0f GeV/#it{c}, #it{R}=0.4, ",minClusterE));
1341 max = hSumPtCone->GetMaximum();
1342 if(max < hSumPtConeTrack ->GetMaximum()) max = hSumPtConeTrack ->GetMaximum();
1343 if(max < hSumPtConeCluster ->GetMaximum()) max = hSumPtConeCluster ->GetMaximum();
1344 if(max < hSumPtConeSub ->GetMaximum()) max = hSumPtConeSub ->GetMaximum();
1345 if(max < hSumPtConeSubTrack ->GetMaximum()) max = hSumPtConeSubTrack ->GetMaximum();
1346 if(max < hSumPtConeSubCluster->GetMaximum()) max = hSumPtConeSubCluster->GetMaximum();
1347 if(max < hSumPtConeTrackPerp ->GetMaximum()) max = hSumPtConeTrackPerp ->GetMaximum();
1348 if(max < hSumPtEtaBandCluster->GetMaximum()) max = hSumPtEtaBandCluster->GetMaximum();
1349 if(max < hSumPtEtaBandTrack ->GetMaximum()) max = hSumPtEtaBandTrack ->GetMaximum();
1350 hSumPtCone->SetMaximum(max*2);
1352 hSumPtCone ->Draw(
"");
1353 hSumPtConeCluster ->Draw(
"same");
1354 hSumPtConeTrack ->Draw(
"same");
1358 hSumPtConeTrackPerp ->Draw(
"same");
1359 hSumPtEtaBandCluster->Draw(
"same");
1360 hSumPtEtaBandTrack ->Draw(
"same");
1362 l2.AddEntry(hSumPtCone ,
"Tracks+Clusters",
"P");
1363 l2.AddEntry(hSumPtConeCluster ,
"Clusters inside cone",
"P");
1364 l2.AddEntry(hSumPtConeTrack ,
"Tracks inside cone",
"P");
1365 l2.AddEntry(hSumPtConeTrackPerp ,
"Tracks inside #perp cones",
"P");
1366 l2.AddEntry(hSumPtEtaBandTrack ,
"Tracks #eta band",
"P");
1367 l2.AddEntry(hSumPtEtaBandCluster,
"Clusters #eta band",
"P");
1380 TLegend l3(0.4,0.75,0.8,0.88);
1381 l3.SetTextSize(0.04);
1382 l3.SetBorderSize(0);
1385 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));
1386 hSumPtConeSub->SetYTitle(
"Entries / #it{N}_{candidates}");
1387 hSumPtConeSub->SetMaximum(max*2);
1389 hSumPtConeSub ->Draw(
"");
1390 hSumPtConeSubCluster->Draw(
"same");
1391 hSumPtConeSubTrack ->Draw(
"same");
1393 l3.AddEntry(hSumPtConeSub ,
"Tracks+Clusters-#eta band",
"P");
1394 l3.AddEntry(hSumPtConeSubCluster,
"Clusters inside cone-#eta band",
"P");
1395 l3.AddEntry(hSumPtConeSubTrack ,
"Tracks inside cone-#eta band",
"P");
1399 cIsolation->Print(Form(
"%s_IsolationHisto.%s",histoTag.Data(),format.Data()));
1406 delete hPtInConeCluster ;
1407 delete hPtInConeTrack ;
1408 delete hPtInConeTrackPerp ;
1409 delete hPtInEtaBandTrack ;
1410 delete hPtInEtaBandCluster ;
1413 delete hSumPtConeCluster ;
1414 delete hSumPtConeTrack ;
1415 delete hSumPtConeTrackPerp ;
1416 delete hSumPtEtaBandTrack ;
1417 delete hSumPtEtaBandCluster ;
1419 delete hSumPtConeSub ;
1420 delete hSumPtConeSubCluster ;
1421 delete hSumPtConeSubTrack ;
1458 TCanvas * cCorrelation =
new TCanvas(Form(
"%s_CorrelationHisto" ,histoTag.Data()),
1459 Form(
"Trigger cluster - associated track correlation for %s",histoTag.Data()),
1461 cCorrelation->Divide(2,1);
1464 if ( histoTag.Contains(
"L0") ) minClusterE = 8;
1465 else if ( histoTag.Contains(
"L2") ) minClusterE = 10;
1466 else if ( histoTag.Contains(
"L1") ) minClusterE = 12;
1468 Float_t assocBins[] = {0.5,2.,5.,10.,20.};
1469 Int_t nAssocBins = 4;
1471 TH1F * hTrigger = (TH1F*)
GetHisto(Form(
"AnaPhotonHadronCorr_Calo%d_hPtTrigger",icalo));
1473 if(!hTrigger)
return;
1475 Int_t minClusterEBin = hTrigger->FindBin(minClusterE);
1476 Float_t nTrig = hTrigger->Integral(minClusterEBin,100000);
1478 if ( nTrig <=0 ) return ;
1481 cCorrelation->cd(1);
1484 for(
Int_t i = 0; i < 4; i++) hDeltaPhi[i] = 0;
1486 TLegend l(0.35,0.6,0.83,0.85);
1487 l.SetHeader(Form(
"p_{T,T} > %2.1f GeV/c",minClusterE));
1488 l.SetTextSize(0.04);
1492 for(
Int_t ibin = 0; ibin < nAssocBins; ibin++ )
1495 (
TH2F*)
GetHisto(Form(
"AnaPhotonHadronCorr_Calo%d_hDeltaPhiPtAssocPt%2.1f_%2.1f",icalo,assocBins[ibin],assocBins[ibin+1]));
1497 (TH1F*) hDeltaPhiE->ProjectionY(Form(
"%s_hDeltaPhi_TrackMinPt%2.1fGeV_TrigEnMin%2.0f",histoTag.Data(),assocBins[ibin],minClusterE),minClusterEBin,10000);
1498 hDeltaPhi[ibin]->Sumw2();
1499 hDeltaPhi[ibin]->Rebin(2);
1500 hDeltaPhi[ibin]->Scale(1./nTrig);
1502 hDeltaPhi[ibin]->Fit(
"pol0",
"Q",
"",1,2);
1505 if(hDeltaPhi[ibin]->GetFunction(
"pol0"))
1507 scale = hDeltaPhi[ibin]->GetFunction(
"pol0")->GetParameter(0);
1508 hDeltaPhi[ibin]->GetFunction(
"pol0")->SetRange(6,7);
1510 hDeltaPhi[ibin]->Scale(1./scale);
1513 hDeltaPhi[ibin]->SetAxisRange(-1.6,4.7);
1515 hDeltaPhi[ibin]->SetMarkerStyle(24);
1516 hDeltaPhi[ibin]->SetMarkerColor(
color[ibin]);
1517 hDeltaPhi[ibin]->SetLineColor(
color[ibin]);
1518 hDeltaPhi[ibin]->SetTitleOffset(1.5,
"Y");
1519 hDeltaPhi[ibin]->SetYTitle(
"#it{N}_{pairs} / #it{N}_{trig} / ZYAM");
1520 hDeltaPhi[ibin]->SetTitle(
"#gamma (#lambda_{0}^{2} < 0.4, neutral cluster) trigger");
1522 l.AddEntry(hDeltaPhi[ibin],Form(
"%2.1f<#it{p}_{T,A}< %2.0f GeV/c",assocBins[ibin],assocBins[ibin+1]),
"P");
1525 hDeltaPhi[2]->SetMaximum(hDeltaPhi[2]->GetMaximum()*10);
1526 hDeltaPhi[2]->SetMinimum(0.8);
1528 hDeltaPhi[2]->Draw(
"H");
1529 hDeltaPhi[1]->Draw(
"Hsame");
1530 hDeltaPhi[3]->Draw(
"Hsame");
1531 hDeltaPhi[0]->Draw(
"Hsame");
1536 cCorrelation->cd(2);
1539 TLegend l2(0.35,0.6,0.83,0.85);
1540 l2.SetHeader(Form(
"p_{T,T} > %2.0f GeV/c",minClusterE));
1541 l2.SetTextSize(0.04);
1542 l2.SetBorderSize(0);
1545 TH2F* hEXE = (
TH2F*)
GetHisto(Form(
"AnaPhotonHadronCorr_Calo%d_hXECharged" ,icalo));
1546 TH2F* hEXEUE = (
TH2F*)
GetHisto(Form(
"AnaPhotonHadronCorr_Calo%d_hXEUeCharged",icalo));
1548 TH1F* hXE = (TH1F*) hEXE->ProjectionY(Form(
"%s_hXE_TrigEnMin%2.0fGeV",histoTag.Data(),minClusterE),minClusterEBin,10000);
1551 hXE->Scale(1./nTrig);
1552 hXE->SetAxisRange(0,1);
1553 hXE->SetMarkerStyle(24);
1554 hXE->SetMarkerColor(1);
1555 hXE->SetLineColor(1);
1556 hXE->SetTitleOffset(1.5,
"Y");
1557 hXE->SetYTitle(
"#it{N}_{pairs} / #it{N}_{trig}");
1558 hXE->SetTitle(
"#gamma (#lambda_{0}^{2} < 0.4, neutral cluster) trigger");
1559 l2.AddEntry(hXE,
"raw x_{E}",
"P");
1562 TH1F* hXEUE = (TH1F*) hEXEUE->ProjectionY(Form(
"%s_hXEUE_TrigEnMin%2.0fGeV",histoTag.Data(),minClusterE),minClusterEBin,10000);
1565 hXEUE->Scale(1./nTrig);
1566 hXEUE->SetAxisRange(0,1);
1567 hXEUE->SetMarkerStyle(25);
1568 hXEUE->SetMarkerColor(2);
1569 hXEUE->SetLineColor(2);
1570 l2.AddEntry(hXEUE,
"raw Und. Event x_{E}",
"P");
1571 hXEUE->Draw(
"same");
1575 cCorrelation->Print(Form(
"%s_CorrelationHisto.%s",histoTag.Data(),format.Data()));
1581 for(
Int_t i = 0; i < 4; i++)
delete hDeltaPhi[i];
1586 delete cCorrelation;
1611 TH1F* hClusterPho = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_MCPhoton",icalo));
1612 TH1F* hClusterPi0 = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_MCPi0" ,icalo));
1613 TH1F* hClusterEta = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_MCEta" ,icalo));
1614 TH1F* hClusterPhoPi0 = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_MCPhotonPi0Decay",icalo));
1615 TH1F* hClusterPhoEta = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPt_MCPhotonEtaDecay",icalo));
1617 if(!hClusterPho)
return;
1619 TH1F* hPrimPho = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPtPrim_MCPhoton" ,icalo));
1620 TH1F* hPrimPhoPi0 = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPtPrim_MCPhotonPi0Decay",icalo));
1621 TH1F* hPrimPhoEta = (TH1F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPtPrim_MCPhotonEtaDecay",icalo));
1622 TH1F* hPrimPi0 = (TH1F*)
GetHisto(Form(
"AnaPi0_Calo%d_hPrimPi0Pt",icalo));
1623 TH1F* hPrimEta = (TH1F*)
GetHisto(Form(
"AnaPi0_Calo%d_hPrimEtaPt",icalo));
1625 TCanvas * cmc =
new TCanvas(Form(
"%s_MCHisto" ,histoTag.Data()),
1626 Form(
"Cluster MC origin for %s",histoTag.Data()),
1633 hClusterPho->SetTitle(
"Cluster origin spectra, primary spectra in Calo acceptance");
1634 hClusterPho->Sumw2();
1635 hClusterPho->SetMarkerColor(1);
1636 hClusterPho->SetMarkerStyle(20);
1637 hClusterPho->SetAxisRange(0.,50.,
"X");
1639 hClusterPho->SetXTitle(
"#it{E}_{rec}, #it{p}_{T,gen} (GeV)");
1640 hClusterPho->SetYTitle(
"Entries");
1641 hClusterPho->Draw(
"");
1643 hClusterPhoPi0->Sumw2();
1644 hClusterPhoPi0->SetMarkerColor(4);
1645 hClusterPhoPi0->SetMarkerStyle(20);
1646 hClusterPhoPi0->Draw(
"same");
1648 hClusterPhoEta->Sumw2();
1649 hClusterPhoEta->SetMarkerColor(2);
1650 hClusterPhoEta->SetMarkerStyle(20);
1651 hClusterPhoEta->Draw(
"same");
1653 hClusterPi0->Sumw2();
1654 hClusterPi0->SetMarkerColor(4);
1655 hClusterPi0->SetMarkerStyle(21);
1656 hClusterPi0->Draw(
"same");
1658 hClusterEta->Sumw2();
1659 hClusterEta->SetMarkerColor(2);
1660 hClusterEta->SetMarkerStyle(22);
1661 hClusterEta->Draw(
"same");
1664 hPrimPho->SetMarkerColor(1);
1665 hPrimPho->SetMarkerStyle(24);
1666 hPrimPho->Draw(
"same");
1668 hPrimPhoPi0->Sumw2();
1669 hPrimPhoPi0->SetMarkerColor(4);
1670 hPrimPhoPi0->SetMarkerStyle(24);
1671 hPrimPhoPi0->Draw(
"same");
1673 hPrimPhoEta->Sumw2();
1674 hPrimPhoEta->SetMarkerColor(2);
1675 hPrimPhoEta->SetMarkerStyle(24);
1676 hPrimPhoEta->Draw(
"same");
1679 hPrimPi0->SetMarkerColor(4);
1680 hPrimPi0->SetMarkerStyle(25);
1681 hPrimPi0->Draw(
"same");
1684 hPrimEta->SetMarkerColor(2);
1685 hPrimEta->SetMarkerStyle(26);
1686 hPrimEta->Draw(
"same");
1688 TLegend lR(0.5,0.5,0.7,0.89);
1689 lR.SetHeader(
"reco");
1690 lR.SetTextSize(0.04);
1691 lR.AddEntry(hClusterPho,
"#gamma",
"P");
1692 lR.AddEntry(hClusterPhoPi0,
"#gamma_{#pi^{0}}",
"P");
1693 lR.AddEntry(hClusterPhoEta,
"#gamma_{#eta}",
"P");
1694 lR.AddEntry(hClusterPi0,
"#pi^{0}",
"P");
1695 lR.AddEntry(hClusterEta,
"#eta",
"P");
1696 lR.SetBorderSize(0);
1700 TLegend lG(0.7,0.5,0.83,0.89);
1701 lG.SetHeader(
"gener");
1702 lG.SetTextSize(0.04);
1703 lG.AddEntry(hPrimPho,
"#gamma",
"P");
1704 lG.AddEntry(hPrimPhoPi0,
"#gamma_{#pi^{0}}",
"P");
1705 lG.AddEntry(hPrimPhoEta,
"#gamma_{#eta}",
"P");
1706 lG.AddEntry(hPrimPi0,
"#pi^{0}",
"P");
1707 lG.AddEntry(hPrimEta,
"#eta",
"P");
1708 lG.SetBorderSize(0);
1714 TH1F* hRatPho = (TH1F*) hClusterPho ->Clone(Form(
"%s_hGenRecoRatPho" ,histoTag.Data()));
1715 TH1F* hRatPi0 = (TH1F*) hClusterPi0 ->Clone(Form(
"%s_hGenRecoRatPi0" ,histoTag.Data()));
1716 TH1F* hRatEta = (TH1F*) hClusterEta ->Clone(Form(
"%s_hGenRecoRatEta" ,histoTag.Data()));
1717 TH1F* hRatPhoPi0 = (TH1F*) hClusterPhoPi0->Clone(Form(
"%s_hGenRecoRatPhoPi0",histoTag.Data()));
1718 TH1F* hRatPhoEta = (TH1F*) hClusterPhoEta->Clone(Form(
"%s_hGenRecoRatPhoEta",histoTag.Data()));
1720 hRatPho ->Divide(hPrimPho);
1721 hRatPhoPi0->Divide(hPrimPhoPi0);
1722 hRatPhoEta->Divide(hPrimPhoEta);
1723 hRatPi0 ->Divide(hPrimPi0);
1724 hRatEta ->Divide(hPrimEta);
1726 hRatPho->SetTitle(
"Reconstructed cluster / Generated particle in Calo acc.");
1727 hRatPho->SetYTitle(
"#it{Ratio reco / gener}");
1728 hRatPho->SetXTitle(
"#it{E} (GeV)");
1729 hRatPho->SetMinimum(1e-3);
1730 hRatPho->SetMaximum(20);
1732 hRatPhoPi0->Draw(
"same");
1733 hRatPhoEta->Draw(
"same");
1734 hRatPi0->Draw(
"same");
1735 hRatEta->Draw(
"same");
1737 TLegend l2(0.15,0.62,0.3,0.89);
1738 l2.SetTextSize(0.04);
1739 l2.AddEntry(hRatPho,
"#gamma",
"P");
1740 l2.AddEntry(hRatPhoPi0,
"#gamma_{#pi^{0}}",
"P");
1741 l2.AddEntry(hRatPhoEta,
"#gamma_{#eta}",
"P");
1742 l2.AddEntry(hRatPi0,
"#pi^{0}",
"P");
1743 l2.AddEntry(hRatEta,
"#eta",
"P");
1744 l2.SetBorderSize(0);
1751 TH2F* h2PrimPhoPhi = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hPhiPrim_MCPhoton",icalo));
1752 TH2F* h2PrimPi0Phi = (
TH2F*)
GetHisto(Form(
"AnaPi0_Calo%d_hPrimPi0Phi" ,icalo));
1753 TH2F* h2PrimEtaPhi = (
TH2F*)
GetHisto(Form(
"AnaPi0_Calo%d_hPrimEtaPhi" ,icalo));
1755 Int_t binMin = hPrimPho->FindBin(3);
1757 TH1F* hPrimPhoPhi = (TH1F*) h2PrimPhoPhi->ProjectionY(Form(
"%s_hPrimPhoPhi",histoTag.Data()),binMin,1000);
1758 TH1F* hPrimPi0Phi = (TH1F*) h2PrimPi0Phi->ProjectionY(Form(
"%s_hPrimPi0Phi",histoTag.Data()),binMin,1000);
1759 TH1F* hPrimEtaPhi = (TH1F*) h2PrimEtaPhi->ProjectionY(Form(
"%s_hPrimEtaPhi",histoTag.Data()),binMin,1000);
1761 hPrimPhoPhi->Sumw2();
1762 hPrimPi0Phi->Sumw2();
1763 hPrimEtaPhi->Sumw2();
1765 hPrimPhoPhi->Scale(1./hPrimPhoPhi->Integral(0,1000));
1766 hPrimPi0Phi->Scale(1./hPrimPi0Phi->Integral(0,1000));
1767 hPrimEtaPhi->Scale(1./hPrimEtaPhi->Integral(0,1000));
1769 Float_t maxPhi = hPrimPhoPhi->GetMaximum();
1770 if(maxPhi < hPrimPi0Phi->GetMaximum()) maxPhi = hPrimPi0Phi->GetMaximum();
1771 if(maxPhi < hPrimEtaPhi->GetMaximum()) maxPhi = hPrimEtaPhi->GetMaximum();
1773 Float_t minPhi = hPrimPhoPhi->GetMinimum();
1774 if(minPhi > hPrimPi0Phi->GetMinimum()) minPhi = hPrimPi0Phi->GetMinimum();
1775 if(minPhi > hPrimEtaPhi->GetMinimum()) minPhi = hPrimEtaPhi->GetMinimum();
1777 hPrimPi0Phi->SetMaximum(maxPhi*1.1);
1778 hPrimPi0Phi->SetMinimum(minPhi);
1779 TGaxis::SetMaxDigits(3);
1781 hPrimPi0Phi->SetYTitle(
"1/total entries d#it{N}/d#varphi");
1782 hPrimPi0Phi->SetTitle(
"Generated particles #varphi for #it{E} > 3 GeV");
1783 hPrimPi0Phi->SetTitleOffset(1.5,
"Y");
1784 hPrimPi0Phi->SetMarkerColor(4);
1785 hPrimPi0Phi->SetMarkerStyle(21);
1786 hPrimPi0Phi->Draw(
"");
1788 hPrimPhoPhi->SetMarkerColor(1);
1789 hPrimPhoPhi->SetMarkerStyle(20);
1790 Float_t scale = TMath::RadToDeg();
1792 hPrimPhoPhi->Draw(
"same");
1794 hPrimEtaPhi->SetMarkerColor(2);
1795 hPrimEtaPhi->SetMarkerStyle(22);
1796 hPrimEtaPhi->Draw(
"same");
1801 TH2F* h2PrimPhoEtaP = (
TH2F*)
GetHisto(Form(
"AnaPhoton_Calo%d_hYPrim_MCPhoton",icalo));
1802 TH2F* h2PrimPi0EtaP = (
TH2F*)
GetHisto(Form(
"AnaPi0_Calo%d_hPrimPi0Rapidity" ,icalo));
1803 TH2F* h2PrimEtaEtaP = (
TH2F*)
GetHisto(Form(
"AnaPi0_Calo%d_hPrimEtaRapidity" ,icalo));
1805 h2PrimPhoEtaP->Sumw2();
1806 h2PrimEtaEtaP->Sumw2();
1807 h2PrimPi0EtaP->Sumw2();
1809 binMin = hPrimPho->FindBin(3);
1811 TH1F* hPrimPhoEtaP = (TH1F*) h2PrimPhoEtaP->ProjectionY(Form(
"%s_hPrimPhoEtaP",histoTag.Data()),binMin,1000);
1812 TH1F* hPrimPi0EtaP = (TH1F*) h2PrimPi0EtaP->ProjectionY(Form(
"%s_hPrimPi0EtaP",histoTag.Data()),binMin,1000);
1813 TH1F* hPrimEtaEtaP = (TH1F*) h2PrimEtaEtaP->ProjectionY(Form(
"%s_hPrimEtaEtaP",histoTag.Data()),binMin,1000);
1815 hPrimPhoEtaP->Scale(1./hPrimPhoEtaP->Integral(0,1000));
1816 hPrimPi0EtaP->Scale(1./hPrimPi0EtaP->Integral(0,1000));
1817 hPrimEtaEtaP->Scale(1./hPrimEtaEtaP->Integral(0,1000));
1819 Float_t maxEta = hPrimPhoEtaP->GetMaximum();
1820 if(maxEta < hPrimPi0EtaP->GetMaximum()) maxEta = hPrimPi0EtaP->GetMaximum();
1821 if(maxEta < hPrimEtaEtaP->GetMaximum()) maxEta = hPrimEtaEtaP->GetMaximum();
1823 Float_t minEta = hPrimPhoEtaP->GetMinimum();
1824 if(minEta > hPrimPi0EtaP->GetMinimum()) minEta = hPrimPi0EtaP->GetMinimum();
1825 if(minEta > hPrimEtaEtaP->GetMinimum()) minEta = hPrimEtaEtaP->GetMinimum();
1827 hPrimPi0EtaP->SetMaximum(maxEta*1.1);
1828 hPrimPi0EtaP->SetMinimum(minEta);
1829 TGaxis::SetMaxDigits(3);
1831 hPrimPi0EtaP->SetYTitle(
"1/total entries d#it{N}/d#eta");
1832 hPrimPi0EtaP->SetTitle(
"Generated particles #eta for #it{E} > 3 GeV");
1833 hPrimPi0EtaP->SetTitleOffset(1.5,
"Y");
1834 hPrimPi0EtaP->SetMarkerColor(4);
1835 hPrimPi0EtaP->SetMarkerStyle(21);
1836 hPrimPi0EtaP->Draw(
"");
1838 hPrimPhoEtaP->SetMarkerColor(1);
1839 hPrimPhoEtaP->SetMarkerStyle(20);
1840 scale = TMath::RadToDeg();
1841 hPrimPhoEtaP->Draw(
"same");
1843 hPrimEtaEtaP->SetMarkerColor(2);
1844 hPrimEtaEtaP->SetMarkerStyle(22);
1845 hPrimEtaEtaP->Draw(
"same");
1847 cmc->Print(Form(
"%s_MCHisto.%s",histoTag.Data(),format.Data()));
1853 delete hPrimPhoPhi ;
1854 delete hPrimPi0Phi ;
1855 delete hPrimEtaPhi ;
1856 delete hPrimPhoEtaP ;
1857 delete hPrimPi0EtaP ;
1858 delete hPrimEtaEtaP ;
1883 if(list)
delete list;
1885 list = (
TList*)
dir->Get(trigName);
1889 printf(
"List not found, do nothing\n");
1893 if ( list->GetEntries() <= 0 )
1895 printf(
"No histograms found <%d>, do nothing\n",list->GetEntries());
1901 fout =
new TFile(Form(
"AnalysisResults%s.root",histoTag.Data()),
"RECREATE");
1921 if ( list ) histo = list->FindObject(histoName);
1922 else histo =
file->Get (histoName);
1940 if(tag) histo->Write(Form(
"fig_ga_%s_%s",histoTag.Data(), histo->GetName()));
1941 else histo->Write(Form(
"fig_ga_%s" ,histo->GetName()));
1953 if(canvas) canvas->Write(Form(
"canvas_ga_%s",canvas->GetName()));
1963 if (a->GetXbins()->GetSize())
1969 for(
Int_t i = 0; i < X.GetSize(); i++) X[i] = scale*X[i];
1970 a->Set((X.GetSize() - 1), X.GetArray());
1977 a->Set(a->GetNbins(),
1978 - scale*a->GetXmin(),
1979 - 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)