21 Int_t color[]={kBlack,kRed,kOrange+1,kYellow+1,kGreen+2,kBlue,kCyan+1,kViolet,kMagenta+2,kGray};
39 printf(
"Open <%s>; Get List : <%s>; Export list? <%d>\n",
fileName.Data(),listName.Data(),export);
46 gStyle->SetOptTitle(1);
47 gStyle->SetOptStat(0);
48 gStyle->SetOptFit(000000);
49 gStyle->SetPadRightMargin(0.15);
52 gStyle->SetTitleFontSize(0.06);
76 TCanvas * ccalo =
new TCanvas(Form(
"CaloHisto_%s",histoTag.Data()),
"",1000,1000);
82 TH1F* hCellAmplitude = (TH1F*)
GetHisto(
"QA_hAmplitude");
83 TH1F* hClusterEnergy = (TH1F*)
GetHisto(
"QA_hE");
85 hClusterEnergy->SetYTitle(
"entries");
86 hClusterEnergy->SetTitle(
"Cluster-cell energy spectra");
87 hClusterEnergy->Sumw2();
88 hClusterEnergy->SetMarkerColor(1);
89 hClusterEnergy->SetMarkerStyle(20);
90 hClusterEnergy->SetAxisRange(0.,50.,
"X");
91 hClusterEnergy->Draw();
93 hCellAmplitude->Sumw2();
94 hCellAmplitude->SetMarkerColor(4);
95 hCellAmplitude->SetMarkerStyle(25);
96 hCellAmplitude->Draw(
"same");
98 TLegend l(0.25,0.7,0.83,0.85);
100 l.AddEntry(hClusterEnergy,
"Cluster (no exotic+non lin.)",
"P");
101 l.AddEntry(hCellAmplitude,
"Cell",
"P");
110 TH1F* hRaw = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_0_Open");
111 TH1F* hCorr = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_4_NCells");
112 TH1F* hTM = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_7_Matching");
113 TH1F* hShSh = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_9_PID");
117 hCorr->SetTitle(
"Ratio after cluster cuts application");
118 hCorr->SetYTitle(
"Selected clusters / Raw clusters");
119 hCorr->SetTitleOffset(1.5,
"Y");
121 hCorr->SetMarkerColor(1);
122 hCorr->SetMarkerStyle(20);
124 hCorr->SetAxisRange(0.,30.,
"X");
125 hCorr->SetMaximum(1.1);
126 hCorr->SetMinimum(0);
130 hTM ->SetMarkerColor(2);
131 hTM ->SetMarkerStyle(21);
136 hShSh->SetMarkerColor(4);
137 hShSh->SetMarkerStyle(22);
141 TLegend l2(0.45,0.8,0.95,0.93);
142 l2.SetTextSize(0.04);
143 l2.AddEntry(hCorr,
"No Exotics + non lin.",
"P");
144 l2.AddEntry(hTM,
"+ Track matching",
"P");
145 l2.AddEntry(hShSh,
"+ #lambda^{2}_{0} < 0.4",
"P");
153 TH2F* hTrackMatchResEtaPhi = (
TH2F*)
GetHisto(
"QA_hTrackMatchedDEtaDPhiPos");
154 if(hTrackMatchResEtaPhi)
156 hTrackMatchResEtaPhi ->Add( (
TH2F*)
GetHisto(
"QA_hTrackMatchedDEtaDPhiNeg") );
161 hTrackMatchResEtaPhi->SetAxisRange(-0.025,0.025,
"X");
162 hTrackMatchResEtaPhi->SetAxisRange(-0.025,0.025,
"Y");
163 hTrackMatchResEtaPhi->SetTitleOffset(1.5,
"Y");
164 hTrackMatchResEtaPhi->SetTitle(
"Track-cluster residual #Delta #phi vs #Delta #eta, E > 0.5 GeV");
165 hTrackMatchResEtaPhi->SetXTitle(
"#Delta #eta");
166 hTrackMatchResEtaPhi->SetYTitle(
"#Delta #phi");
167 hTrackMatchResEtaPhi->SetZTitle(
"entries");
168 hTrackMatchResEtaPhi->Draw(
"colz");
178 Float_t binMin = hCorr->FindBin(0.5);
179 TH1F* hTrackMatchResEtaNeg = (TH1F*) h2TrackMatchResEtaNeg->ProjectionY(
"TMProjEtaNeg",binMin, 1000);
180 TH1F* hTrackMatchResEtaPos = (TH1F*) h2TrackMatchResEtaPos->ProjectionY(
"TMProjEtaPos",binMin, 1000);
181 TH1F* hTrackMatchResPhiNeg = (TH1F*) h2TrackMatchResPhiNeg->ProjectionY(
"TMProjPhiNeg",binMin, 1000);
182 TH1F* hTrackMatchResPhiPos = (TH1F*) h2TrackMatchResPhiPos->ProjectionY(
"TMProjPhiPos",binMin, 1000);
184 hTrackMatchResEtaNeg->SetXTitle(
"#Delta #eta, #Delta #phi");
185 hTrackMatchResEtaNeg->SetYTitle(
"entries");
186 hTrackMatchResEtaNeg->SetTitle(
"Track-cluster residuals, E > 1 GeV");
187 hTrackMatchResEtaNeg->SetAxisRange(-0.05,0.05,
"X");
188 hTrackMatchResEtaNeg->Sumw2();
189 hTrackMatchResEtaNeg->SetMarkerStyle(25);
190 hTrackMatchResEtaNeg->SetMarkerColor(2);
191 hTrackMatchResEtaNeg->Draw(
"");
193 hTrackMatchResEtaPos->Sumw2();
194 hTrackMatchResEtaPos->SetMarkerStyle(25);
195 hTrackMatchResEtaPos->SetMarkerColor(4);
196 hTrackMatchResEtaPos->Draw(
"same");
198 hTrackMatchResPhiNeg->Sumw2();
199 hTrackMatchResPhiNeg->SetMarkerStyle(24);
200 hTrackMatchResPhiNeg->SetMarkerColor(2);
201 hTrackMatchResPhiNeg->Draw(
"same");
203 hTrackMatchResPhiPos->Sumw2();
204 hTrackMatchResPhiPos->SetMarkerStyle(24);
205 hTrackMatchResPhiPos->SetMarkerColor(4);
206 hTrackMatchResPhiPos->Draw(
"same");
208 TLine l0(0,hTrackMatchResEtaNeg->GetMinimum(),0,hTrackMatchResEtaNeg->GetMaximum()*1.2);
211 TLegend l3(0.55,0.7,0.83,0.85);
212 l3.SetTextSize(0.04);
213 l3.AddEntry(hTrackMatchResEtaNeg,
"#Delta #eta, Negative",
"P");
214 l3.AddEntry(hTrackMatchResEtaPos,
"#Delta #eta, Positive",
"P");
215 l3.AddEntry(hTrackMatchResPhiNeg,
"#Delta #phi, Negative",
"P");
216 l3.AddEntry(hTrackMatchResPhiPos,
"#Delta #phi, Positive",
"P");
221 ccalo->Print(Form(
"%s_CaloHisto.eps",histoTag.Data()));
224 TCanvas * ccalo2 =
new TCanvas(Form(
"CaloHisto2_%s",histoTag.Data()),
"",500,500);
240 hClusterTime->SetTitle(
"Cluster energy vs time");
241 hClusterTime->SetYTitle(
"time (ns)");
242 hClusterTime->SetAxisRange(300.,900.,
"Y");
243 hClusterTime->SetAxisRange(0.,30.,
"X");
244 hClusterTime->SetTitleOffset(1.5,
"Y");
245 hClusterTime->Draw(
"colz");
250 hCellActivity->SetTitle(
"Hits per cell (E > 0.2 GeV)");
251 hCellActivity->SetTitleOffset(1.5,
"Y");
252 hCellActivity->Draw(
"colz");
258 hCellActivityE->SetTitle(
"Mean energy per cell (E > 0.2 GeV)");
259 hCellActivityE->Divide(hCellActivity);
260 hCellActivityE->SetTitleOffset(1.5,
"Y");
261 hCellActivityE->Draw(
"colz");
266 hClusterActivity->SetTitle(
"Clusters activity (E > 0.5 GeV)");
267 hClusterActivity->SetTitleOffset(1.5,
"Y");
268 hClusterActivity->Draw(
"colz");
270 ccalo2->Print(Form(
"%s_CaloHisto2.eps",histoTag.Data()));
279 TCanvas * ctrack =
new TCanvas(Form(
"TrackHisto_%s",histoTag.Data()),
"",1000,500);
285 hTrackEtaPhi ->Add((
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiNegative"));
286 hTrackEtaPhi ->SetAxisRange(-0.9,0.9,
"X");
287 hTrackEtaPhi ->SetTitle(
"Hybrid tracks #eta vs #phi (p_{T} > 0.2 GeV)");
288 hTrackEtaPhi ->Draw(
"colz");
292 TH2F * hTrackEtaPhiSPD = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiSPDRefitPt02");
293 TH2F * hTrackEtaPhiNoSPD = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiNoSPDRefitPt02");
295 TH1F* hPhiSPD = (TH1F*)hTrackEtaPhiSPD ->ProjectionY(
"hTrackPhiSPD" ,0,1000);
296 TH1F* hPhiNoSPD = (TH1F*)hTrackEtaPhiNoSPD->ProjectionY(
"hTrackPhiNoSPD",0,1000);
298 TH1F* hPhi = hPhiSPD->Clone(
"hTrackPhi");
299 hPhi->Add(hPhiNoSPD);
300 hPhi ->SetTitle(
"Hybrid track in #phi, composition, p_{T} > 0.2 GeV");
301 hPhi ->SetLineColor(1);
302 hPhiSPD ->SetLineColor(2);
303 hPhiNoSPD->SetLineColor(4);
305 hPhi ->SetMinimum(1);
306 hPhi ->SetMaximum(hPhi->GetMaximum()*1.2);
309 hPhiSPD ->Draw(
"Hsame");
310 hPhiNoSPD->Draw(
"Hsame");
312 TLegend l(0.2,0.75,0.4,0.89);
314 l.AddEntry(hPhi,
"Sum",
"L");
315 l.AddEntry(hPhiSPD ,
"SPD+Refit",
"L");
316 l.AddEntry(hPhiNoSPD,
"No SPD+Refit",
"L");
336 ctrack->Print(Form(
"%s_TrackHisto.eps",histoTag.Data()));
345 TCanvas * cpi0 =
new TCanvas(Form(
"Pi0Histo_%s",histoTag.Data()),
"",500,500);
350 for(
Int_t icen = 0; icen < 10; icen++)
352 hMassE [icen] = (
TH2F*)
GetHisto(Form(
"AnaPi0_hRe_cen%d_pidbit0_asy0_dist1",icen));
353 hMixMassE[icen] = (
TH2F*)
GetHisto(Form(
"AnaPi0_hMi_cen%d_pidbit0_asy0_dist1",icen));
363 h2DMass = (
TH2F*) hMassE[6]->Clone(
"h2DMass");
364 for(
Int_t icen = 7; icen < 10; icen++) h2DMass->Add(hMassE[icen]);
365 h2DMass->SetTitle(
"Invariant mass vs pair E, Cen: 60-100%");
369 h2DMass = (
TH2F*) hMassE[0]->Clone(
"hMassProj");
370 h2DMass->SetTitle(
"Invariant mass vs cluster pair E");
373 h2DMass->SetTitleOffset(1.6,
"Y");
374 h2DMass->SetAxisRange(0.0,0.7,
"Y");
375 h2DMass->SetAxisRange(0,30,
"X");
376 h2DMass->Draw(
"colz");
386 for(
Int_t icen=0; icen<10; icen++ )
394 TH1F * hX = (TH1F*) hMassE[0]->ProjectionX(
"hEPairCen0",0,10000);
395 Int_t binmin = hX->FindBin(2);
396 Int_t binmax = hX->FindBin(10);
399 for(
Int_t icen = 0; icen < 6; icen++)
401 if(!hMassE[icen])
continue;
403 hMass[icen] = (TH1F*) hMassE [icen]->ProjectionY(Form(
"hMassCen%d",icen),binmin,binmax);
404 hMix [icen] = (TH1F*) hMixMassE[icen]->ProjectionY(Form(
"hMixCen%d" ,icen),binmin,binmax);
405 hMass[icen]->Sumw2();
406 hMix [icen]->Sumw2();
408 hMassPi0[icen] = (TH1F*) hMass[icen]->Clone(Form(
"hMassPi0Cen%d",icen));
409 hMassEta[icen] = (TH1F*) hMass[icen]->Clone(Form(
"hMassEtaCen%d",icen));
411 hMassPi0[icen]->Divide(hMix[icen]);
412 hMassPi0[icen]->Fit(
"pol0",
"Q",
"",0.25,0.35);
414 if(hMassPi0[icen]->GetFunction(
"pol0")) scale = hMassPi0[icen]->GetFunction(
"pol0")->GetParameter(0);
416 hMassPi0[icen]->Scale(1./scale);
417 hMassPi0[icen]->SetMarkerStyle(24);
418 hMassPi0[icen]->SetMarkerColor(
color[icen]);
419 hMassPi0[icen]->SetLineColor(
color[icen]);
420 hMassPi0[icen]->SetAxisRange(0.04,0.24);
421 hMassPi0[icen]->SetMarkerSize(0.5);
423 hMassEta[icen]->Rebin(4);
424 hMix [icen]->Rebin(4);
425 hMassEta[icen]->Divide(hMix[icen]);
426 hMassEta[icen]->SetMarkerStyle(25);
427 hMassEta[icen]->SetMarkerColor(
color[icen]);
428 hMassEta[icen]->SetLineColor(
color[icen]);
429 hMassEta[icen]->SetAxisRange(0.4,0.9);
430 hMassEta[icen]->SetMarkerSize(0.5);
431 hMassEta[icen]->Scale(1./scale);
433 if(maxEta < hMassEta[icen]->GetMaximum()) maxEta = hMassEta[icen]->GetMaximum();
434 if(maxPi0 < hMassPi0[icen]->GetMaximum()) maxPi0 = hMassPi0[icen]->GetMaximum();
439 hMassPi0[0]->SetMinimum(0.8);
440 hMassPi0[0]->SetTitleOffset(1.6,
"Y");
441 hMassPi0[0]->SetYTitle(
"Real / Mixed");
442 hMassPi0[0]->SetTitle(
"#pi^{0} peak, 2 < E_{pair}< 10 GeV");
447 hMassPi0[0]->SetMaximum(maxPi0*1.2);
448 hMassPi0[5]->Draw(
"Hsame");
449 hMassPi0[4]->Draw(
"Hsame");
450 hMassPi0[3]->Draw(
"Hsame");
451 hMassPi0[2]->Draw(
"Hsame");
452 hMassPi0[1]->Draw(
"Hsame");
453 hMassPi0[0]->Draw(
"Hsame");
459 TLegend l(0.12,0.6,0.4,0.85);
461 l.AddEntry(hMassPi0[0],
"0-10%",
"P");
462 l.AddEntry(hMassPi0[1],
"10-20%",
"P");
463 l.AddEntry(hMassPi0[2],
"20-30%",
"P");
464 l.AddEntry(hMassPi0[3],
"30-40%",
"P");
465 l.AddEntry(hMassPi0[4],
"40-70%",
"P");
466 l.AddEntry(hMassPi0[5],
"50-60%",
"P");
472 TLine l1(0.04,1,0.24,1);
480 binmin = hX->FindBin(4);
481 binmax = hX->FindBin(20);
484 for(
Int_t ism = 0; ism < 10; ism++)
487 if(!hTmpSM) hTmpSM = (
TH2F*)
GetHisto(Form(
"QA_hIM_Mod%d",ism));
489 hSM[ism] = (TH1F*) hTmpSM->ProjectionY(Form(
"hMassSM%d",ism),binmin,binmax);
491 hSM[ism]->SetMarkerStyle(26);
494 hSM[ism]->SetMarkerColor(
color[ism]);
495 hSM[ism]->SetLineColor(
color[ism]);
496 hSM[ism]->SetMarkerSize(0.5);
501 hMixSM[ism] = (TH1F*) hTmpMixSM->ProjectionY(Form(
"hMassMixSM%d",ism),binmin,binmax);
502 hMixSM[ism]->Sumw2();
503 hMixSM[ism]->Rebin(2);
504 hSM[ism]->Divide(hMixSM[ism]);
505 hSM[ism]->Fit(
"pol0",
"Q",
"",0.25,0.35);
507 if(hSM[ism]->GetFunction(
"pol0")) scale = hSM[ism]->GetFunction(
"pol0")->GetParameter(0);
509 hSM[ism]->Scale(1./scale);
510 hSM[ism]->SetYTitle(
"Real / Mixed");
513 if(maxSM < hSM[ism]->GetMaximum()) maxSM = hSM[ism]->GetMaximum();
516 hSM[0]->SetTitle(
"#pi^{0} peak in Modules, 4 < E_{pair}< 10 GeV");
517 hSM[0]->SetTitleOffset(1.6,
"Y");
518 hSM[0]->SetAxisRange(0.04,0.24);
519 hSM[0]->SetMaximum(maxSM*1.2);
520 hSM[0]->SetMinimum(0.8);
523 TLegend lsm(0.12,0.5,0.35,0.85);
524 lsm.SetTextSize(0.04);
525 lsm.AddEntry(hSM[0],Form(
"Mod %d",0),
"P");
527 for(
Int_t ism = 1; ism < 10; ism++)
529 hSM[ism]->Draw(
"Hsame");
530 lsm.AddEntry(hSM[ism],Form(
"Mod %d",ism),
"P");
533 lsm.SetBorderSize(0);
544 hMassEta[0]->SetMinimum(0.8);
545 hMassEta[0]->SetTitleOffset(1.6,
"Y");
546 hMassEta[0]->SetYTitle(
"Real / Mixed");
547 hMassEta[0]->SetTitle(
"#eta peak, 2 < E_{pair}< 10 GeV");
548 hMassEta[0]->Draw(
"H");
552 hMassEta[0]->SetMaximum(maxEta*1.2);
553 hMassEta[5]->Draw(
"Hsame");
554 hMassEta[4]->Draw(
"Hsame");
555 hMassEta[3]->Draw(
"Hsame");
556 hMassEta[2]->Draw(
"Hsame");
557 hMassEta[1]->Draw(
"Hsame");
558 hMassEta[0]->Draw(
"Hsame");
561 TLegend l2(0.12,0.6,0.4,0.85);
562 l2.SetTextSize(0.04);
563 l2.AddEntry(hMassEta[0],
"0-10%",
"P");
564 l2.AddEntry(hMassEta[1],
"10-20%",
"P");
565 l2.AddEntry(hMassEta[2],
"20-30%",
"P");
566 l2.AddEntry(hMassEta[3],
"30-40%",
"P");
567 l2.AddEntry(hMassEta[4],
"40-70%",
"P");
568 l2.AddEntry(hMassEta[5],
"50-60%",
"P");
574 cpi0->Print(Form(
"%s_Pi0Histo.eps",histoTag.Data()));
583 TCanvas * cCorrelation =
new TCanvas(Form(
"CorrelationHisto_%s",histoTag.Data()),
"",1000,500);
584 cCorrelation->Divide(2,1);
587 Float_t assocBins[] = {0.5,2.,5.,10.,20.};
588 Int_t nAssocBins = 4;
590 TH1F * hTrigger = (TH1F*)
GetHisto(
"AnaPhotonHadronCorr_hPtTrigger");
591 Int_t minClusterEBin = hTrigger->FindBin(minClusterE);
592 Float_t nTrig = hTrigger->Integral(minClusterE,100000);
599 TLegend l(0.35,0.6,0.83,0.85);
600 l.SetHeader(Form(
"p_{T,T} > %2.1f GeV/c",minClusterE));
605 for(
Int_t ibin = 0; ibin < nAssocBins; ibin++ )
607 TH2F* hDeltaPhiE = (
TH2F*)
GetHisto(Form(
"AnaPhotonHadronCorr_hDeltaPhiPtAssocPt%2.1f_%2.1f",assocBins[ibin],assocBins[ibin+1]));
608 hDeltaPhi[ibin] = (TH1F*) hDeltaPhiE->ProjectionY(Form(
"DeltaPhi%2.1f",assocBins[ibin]),minClusterEBin,10000);
609 hDeltaPhi[ibin]->Sumw2();
610 hDeltaPhi[ibin]->Rebin(2);
611 hDeltaPhi[ibin]->Scale(1./nTrig);
613 hDeltaPhi[ibin]->Fit(
"pol0",
"Q",
"",1,2);
615 if(hDeltaPhi[ibin]->GetFunction(
"pol0"))
617 scale = hDeltaPhi[ibin]->GetFunction(
"pol0")->GetParameter(0);
618 hDeltaPhi[ibin]->GetFunction(
"pol0")->SetRange(6,7);
620 hDeltaPhi[ibin]->Scale(1./scale);
623 hDeltaPhi[ibin]->SetAxisRange(-1.6,4.7);
625 hDeltaPhi[ibin]->SetMarkerStyle(24);
626 hDeltaPhi[ibin]->SetMarkerColor(
color[ibin]);
627 hDeltaPhi[ibin]->SetLineColor(
color[ibin]);
628 hDeltaPhi[ibin]->SetTitleOffset(1.5,
"Y");
629 hDeltaPhi[ibin]->SetYTitle(
"N_{pairs} / N_{trig} / ZYAM");
630 hDeltaPhi[ibin]->SetTitle(
"#gamma (#lambda_{0}^{2} < 0.4, neutral cluster) trigger");
632 l.AddEntry(hDeltaPhi[ibin],Form(
"%2.1f< p_{T,A}< %2.1f GeV/c",assocBins[ibin],assocBins[ibin+1]),
"P");
635 hDeltaPhi[2]->SetMaximum(hDeltaPhi[2]->GetMaximum()*10);
636 hDeltaPhi[2]->SetMinimum(0.8);
638 hDeltaPhi[2]->Draw(
"H");
639 hDeltaPhi[1]->Draw(
"Hsame");
640 hDeltaPhi[3]->Draw(
"Hsame");
641 hDeltaPhi[0]->Draw(
"Hsame");
650 TLegend l2(0.35,0.6,0.83,0.85);
651 l2.SetHeader(Form(
"p_{T,T} > %2.1f GeV/c",minClusterE));
652 l2.SetTextSize(0.04);
659 TH1F* hXE = (TH1F*) hEXE->ProjectionY(Form(
"XE%2.1fGeV",minClusterE),minClusterEBin,10000);
662 hXE->Scale(1./nTrig);
663 hXE->SetAxisRange(0,1);
664 hXE->SetMarkerStyle(24);
665 hXE->SetMarkerColor(1);
666 hXE->SetLineColor(1);
667 hXE->SetTitleOffset(1.5,
"Y");
668 hXE->SetYTitle(
"N_{pairs} / N_{trig}");
669 hXE->SetTitle(
"#gamma (#lambda_{0}^{2} < 0.4, neutral cluster) trigger");
670 l2.AddEntry(hXE,
"raw x_{E}",
"P");
673 TH1F* hXEUE = (TH1F*) hEXEUE->ProjectionY(Form(
"XEUE%2.1fGeV",minClusterE),minClusterEBin,10000);
676 hXEUE->Scale(1./nTrig);
677 hXEUE->SetAxisRange(0,1);
678 hXEUE->SetMarkerStyle(25);
679 hXEUE->SetMarkerColor(2);
680 hXEUE->SetLineColor(2);
681 l2.AddEntry(hXEUE,
"raw Und. Event x_{E}",
"P");
686 cCorrelation->Print(Form(
"%s_CorrelationHisto.eps",histoTag.Data()));
700 if(!h2ClusterPho)
return;
706 TH1F* hPrimPho = (TH1F*)
GetHisto(
"AnaPhoton_hPtPrim_MCPhoton");
707 TH1F* hPrimPi0 = (TH1F*)
GetHisto(
"AnaPi0_hPrimPi0Pt");
708 TH1F* hPrimEta = (TH1F*)
GetHisto(
"AnaPi0_hPrimEtaPt");
710 TCanvas * cmc =
new TCanvas(Form(
"MCHisto_%s",histoTag.Data()),
"",1000,1000);
716 TH1F* hClusterPho = (TH1F*) h2ClusterPho->ProjectionX(
"ClusterPho",0,1000);
717 TH1F* hClusterPi0 = (TH1F*) h2ClusterPi0->ProjectionX(
"ClusterPi0",0,1000);
718 TH1F* hClusterEta = (TH1F*) h2ClusterEta->ProjectionX(
"ClusterEta",0,1000);
720 hClusterPho->SetTitle(
"Cluster origin spectra, primary spectra in Calo acceptance");
721 hClusterPho->Sumw2();
722 hClusterPho->SetMarkerColor(1);
723 hClusterPho->SetMarkerStyle(20);
724 hClusterPho->SetAxisRange(0.,50.,
"X");
726 hClusterPho->SetXTitle(
"E_{rec}, p_{T,gen} (GeV)");
727 hClusterPho->Draw(
"");
729 hClusterPi0->Sumw2();
730 hClusterPi0->SetMarkerColor(4);
731 hClusterPi0->SetMarkerStyle(21);
732 hClusterPi0->Draw(
"same");
734 hClusterEta->Sumw2();
735 hClusterEta->SetMarkerColor(2);
736 hClusterEta->SetMarkerStyle(22);
737 hClusterEta->Draw(
"same");
740 hPrimPho->SetMarkerColor(1);
741 hPrimPho->SetMarkerStyle(24);
742 hPrimPho->Draw(
"same");
745 hPrimPi0->SetMarkerColor(4);
746 hPrimPi0->SetMarkerStyle(25);
747 hPrimPi0->Draw(
"same");
750 hPrimEta->SetMarkerColor(2);
751 hPrimEta->SetMarkerStyle(26);
752 hPrimEta->Draw(
"same");
754 TLegend l(0.45,0.6,0.83,0.89);
756 l.AddEntry(hClusterPho,
"#gamma cluster",
"P");
757 l.AddEntry(hClusterPi0,
"#pi^{0} (merged) cluster",
"P");
758 l.AddEntry(hClusterEta,
"#eta (merged) cluster",
"P");
759 l.AddEntry(hPrimPho,
"#gamma generated",
"P");
760 l.AddEntry(hPrimPi0,
"#pi^{0} generated",
"P");
761 l.AddEntry(hPrimEta,
"#eta generated",
"P");
769 TH1F* hRatPho = (TH1F*) hClusterPho->Clone(
"hGenRecoPho");
770 TH1F* hRatPi0 = (TH1F*) hClusterPi0->Clone(
"hGenRecoPi0");
771 TH1F* hRatEta = (TH1F*) hClusterEta->Clone(
"hGenRecoEta");
773 hRatPho->Divide(hPrimPho);
774 hRatPi0->Divide(hPrimPi0);
775 hRatEta->Divide(hPrimEta);
777 hRatPho->SetTitle(
"Reconstructed cluster / Generated particle in Calo acc.");
778 hRatPho->SetYTitle(
"Ratio");
779 hRatPho->SetXTitle(
"E(GeV)");
780 hRatPho->SetMinimum(1e-3);
781 hRatPho->SetMaximum(10);
783 hRatPi0->Draw(
"same");
784 hRatEta->Draw(
"same");
786 TLegend l2(0.15,0.7,0.3,0.85);
787 l2.SetTextSize(0.04);
788 l2.AddEntry(hRatPho,
"#gamma",
"P");
789 l2.AddEntry(hRatPi0,
"#pi^{0}",
"P");
790 l2.AddEntry(hRatEta,
"#eta",
"P");
802 Int_t binMin = hPrimPho->FindBin(3);
804 TH1F* hPrimPhoPhi = (TH1F*) h2PrimPhoPhi->ProjectionY(
"PrimPhoPhi",binMin,1000);
805 TH1F* hPrimPi0Phi = (TH1F*) h2PrimPi0Phi->ProjectionY(
"PrimPi0Phi",binMin,1000);
806 TH1F* hPrimEtaPhi = (TH1F*) h2PrimEtaPhi->ProjectionY(
"PrimEtaPhi",binMin,1000);
808 hPrimPhoPhi->Sumw2();
809 hPrimPi0Phi->Sumw2();
810 hPrimEtaPhi->Sumw2();
812 hPrimPhoPhi->Scale(1./hPrimPhoPhi->Integral(0,1000));
813 hPrimPi0Phi->Scale(1./hPrimPi0Phi->Integral(0,1000));
814 hPrimEtaPhi->Scale(1./hPrimEtaPhi->Integral(0,1000));
816 Float_t maxPhi = hPrimPhoPhi->GetMaximum();
817 if(maxPhi < hPrimPi0Phi->GetMaximum()) maxPhi = hPrimPi0Phi->GetMaximum();
818 if(maxPhi < hPrimEtaPhi->GetMaximum()) maxPhi = hPrimEtaPhi->GetMaximum();
820 Float_t minPhi = hPrimPhoPhi->GetMinimum();
821 if(minPhi > hPrimPi0Phi->GetMinimum()) minPhi = hPrimPi0Phi->GetMinimum();
822 if(minPhi > hPrimEtaPhi->GetMinimum()) minPhi = hPrimEtaPhi->GetMinimum();
824 hPrimPi0Phi->SetMaximum(maxPhi*1.1);
825 hPrimPi0Phi->SetMinimum(minPhi);
826 TGaxis::SetMaxDigits(3);
828 hPrimPi0Phi->SetYTitle(
"1/total entries dN/d#phi");
829 hPrimPi0Phi->SetTitle(
"Generated particles #phi for E > 3 GeV");
830 hPrimPi0Phi->SetTitleOffset(1.6,
"Y");
831 hPrimPi0Phi->SetMarkerColor(4);
832 hPrimPi0Phi->SetMarkerStyle(21);
833 hPrimPi0Phi->Draw(
"");
835 hPrimPhoPhi->SetMarkerColor(1);
836 hPrimPhoPhi->SetMarkerStyle(20);
837 Float_t scale = TMath::RadToDeg();
839 hPrimPhoPhi->Draw(
"same");
841 hPrimEtaPhi->SetMarkerColor(2);
842 hPrimEtaPhi->SetMarkerStyle(22);
843 hPrimEtaPhi->Draw(
"same");
852 h2PrimPhoEta->Sumw2();
853 h2PrimEtaEta->Sumw2();
854 h2PrimPi0Eta->Sumw2();
856 Int_t binMin = hPrimPho->FindBin(3);
858 TH1F* hPrimPhoEta = (TH1F*) h2PrimPhoEta->ProjectionY(
"PrimPhoEta",binMin,1000);
859 TH1F* hPrimPi0Eta = (TH1F*) h2PrimPi0Eta->ProjectionY(
"PrimPi0Eta",binMin,1000);
860 TH1F* hPrimEtaEta = (TH1F*) h2PrimEtaEta->ProjectionY(
"PrimEtaEta",binMin,1000);
862 hPrimPhoEta->Scale(1./hPrimPhoEta->Integral(0,1000));
863 hPrimPi0Eta->Scale(1./hPrimPi0Eta->Integral(0,1000));
864 hPrimEtaEta->Scale(1./hPrimEtaEta->Integral(0,1000));
866 Float_t maxEta = hPrimPhoEta->GetMaximum();
867 if(maxEta < hPrimPi0Eta->GetMaximum()) maxEta = hPrimPi0Eta->GetMaximum();
868 if(maxEta < hPrimEtaEta->GetMaximum()) maxEta = hPrimEtaEta->GetMaximum();
870 Float_t minEta = hPrimPhoEta->GetMinimum();
871 if(minEta > hPrimPi0Eta->GetMinimum()) minEta = hPrimPi0Eta->GetMinimum();
872 if(minEta > hPrimEtaEta->GetMinimum()) minEta = hPrimEtaEta->GetMinimum();
874 hPrimPi0Eta->SetMaximum(maxEta*1.1);
875 hPrimPi0Eta->SetMinimum(minEta);
876 TGaxis::SetMaxDigits(3);
878 hPrimPi0Eta->SetYTitle(
"1/total entries dN/d#eta");
879 hPrimPi0Eta->SetTitle(
"Generated particles #eta for E > 3 GeV");
880 hPrimPi0Eta->SetTitleOffset(1.6,
"Y");
881 hPrimPi0Eta->SetMarkerColor(4);
882 hPrimPi0Eta->SetMarkerStyle(21);
883 hPrimPi0Eta->Draw(
"");
885 hPrimPhoEta->SetMarkerColor(1);
886 hPrimPhoEta->SetMarkerStyle(20);
887 Float_t scale = TMath::RadToDeg();
888 hPrimPhoEta->Draw(
"same");
890 hPrimEtaEta->SetMarkerColor(2);
891 hPrimEtaEta->SetMarkerStyle(22);
892 hPrimEtaEta->Draw(
"same");
894 cmc->Print(Form(
"%s_MCHisto.eps",histoTag.Data()));
903 file =
new TFile(fileName,
"read");
905 TDirectory * dir = (TDirectory*)
file->Get(listName);
908 list = (
TList*) dir->Get(listName);
911 TFile * outputFile =
new TFile(
"AnalysisResultsList.root",
"RECREATE");
925 if(list)
return list->FindObject(histoName);
926 else return file->Get (histoName);
937 if (a->GetXbins()->GetSize())
943 for(
Int_t i = 0; i < X.GetSize(); i++) X[i] = scale*X[i];
944 a->Set((X.GetSize() - 1), X.GetArray());
951 a->Set(a->GetNbins(),
952 - scale*a->GetXmin(),
953 - scale*a->GetXmax());
void DrawAnaCaloTrackQA(TString listName="Pi0IM_GammaTrackCorr_EMCAL_default", TString fileName="AnalysisResults.root", Bool_t export=kFALSE)
void ScaleAxis(TAxis *a, Double_t scale)
void GetFileAndList(TString fileName, TString listName, Bool_t export)
void ScaleXaxis(TH1 *h, Double_t scale)
TObject * GetHisto(TString histoName)