22 Int_t color[]={kBlack,kRed,kOrange+1,kYellow+1,kGreen+2,kBlue,kCyan+1,kViolet,kMagenta+2,kGray};
40 printf(
"Open <%s>; Get List : <%s>; Export list? <%d>\n",
fileName.Data(),listName.Data(),export);
47 gStyle->SetOptTitle(1);
48 gStyle->SetOptStat(0);
49 gStyle->SetOptFit(000000);
50 gStyle->SetPadRightMargin(0.15);
53 gStyle->SetTitleFontSize(0.06);
77 TCanvas * ccalo =
new TCanvas(Form(
"CaloHisto_%s",histoTag.Data()),
"",1000,1000);
83 TH1F* hCellAmplitude = (TH1F*)
GetHisto(
"QA_hAmplitude");
84 TH1F* hClusterEnergy = (TH1F*)
GetHisto(
"QA_hE");
86 hClusterEnergy->SetYTitle(
"entries");
87 hClusterEnergy->SetTitle(
"Cluster-cell energy spectra");
88 hClusterEnergy->Sumw2();
89 hClusterEnergy->SetMarkerColor(1);
90 hClusterEnergy->SetMarkerStyle(20);
91 hClusterEnergy->SetAxisRange(0.,50.,
"X");
92 hClusterEnergy->Draw();
94 hCellAmplitude->Sumw2();
95 hCellAmplitude->SetMarkerColor(4);
96 hCellAmplitude->SetMarkerStyle(25);
97 hCellAmplitude->Draw(
"same");
99 TLegend l(0.25,0.7,0.83,0.85);
101 l.AddEntry(hClusterEnergy,
"Cluster (no exotic+non lin.)",
"P");
102 l.AddEntry(hCellAmplitude,
"Cell",
"P");
111 TH1F* hRaw = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_0_Open");
112 TH1F* hCorr = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_4_NCells");
113 TH1F* hTM = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_7_Matching");
114 TH1F* hShSh = (TH1F*)
GetHisto(
"AnaPhoton_hPt_Cut_9_PID");
118 hCorr->SetTitle(
"Ratio after cluster cuts application");
119 hCorr->SetYTitle(
"Selected clusters / Raw clusters");
120 hCorr->SetTitleOffset(1.5,
"Y");
122 hCorr->SetMarkerColor(1);
123 hCorr->SetMarkerStyle(20);
125 hCorr->SetAxisRange(0.,30.,
"X");
126 hCorr->SetMaximum(1.1);
127 hCorr->SetMinimum(0);
131 hTM ->SetMarkerColor(2);
132 hTM ->SetMarkerStyle(21);
137 hShSh->SetMarkerColor(4);
138 hShSh->SetMarkerStyle(22);
142 TLegend l2(0.45,0.8,0.95,0.93);
143 l2.SetTextSize(0.04);
144 l2.AddEntry(hCorr,
"No Exotics + non lin.",
"P");
145 l2.AddEntry(hTM,
"+ Track matching",
"P");
146 l2.AddEntry(hShSh,
"+ #lambda^{2}_{0} < 0.4",
"P");
154 TH2F* hTrackMatchResEtaPhi = (
TH2F*)
GetHisto(
"QA_hTrackMatchedDEtaDPhiPos");
155 if(hTrackMatchResEtaPhi)
157 hTrackMatchResEtaPhi ->Add( (
TH2F*)
GetHisto(
"QA_hTrackMatchedDEtaDPhiNeg") );
162 hTrackMatchResEtaPhi->SetAxisRange(-0.025,0.025,
"X");
163 hTrackMatchResEtaPhi->SetAxisRange(-0.025,0.025,
"Y");
164 hTrackMatchResEtaPhi->SetTitleOffset(1.5,
"Y");
165 hTrackMatchResEtaPhi->SetTitle(
"Track-cluster residual #Delta #phi vs #Delta #eta, E > 0.5 GeV");
166 hTrackMatchResEtaPhi->SetXTitle(
"#Delta #eta");
167 hTrackMatchResEtaPhi->SetYTitle(
"#Delta #phi");
168 hTrackMatchResEtaPhi->SetZTitle(
"entries");
169 hTrackMatchResEtaPhi->Draw(
"colz");
179 Float_t binMin = hCorr->FindBin(0.5);
180 TH1F* hTrackMatchResEtaNeg = (TH1F*) h2TrackMatchResEtaNeg->ProjectionY(
"TMProjEtaNeg",binMin, 1000);
181 TH1F* hTrackMatchResEtaPos = (TH1F*) h2TrackMatchResEtaPos->ProjectionY(
"TMProjEtaPos",binMin, 1000);
182 TH1F* hTrackMatchResPhiNeg = (TH1F*) h2TrackMatchResPhiNeg->ProjectionY(
"TMProjPhiNeg",binMin, 1000);
183 TH1F* hTrackMatchResPhiPos = (TH1F*) h2TrackMatchResPhiPos->ProjectionY(
"TMProjPhiPos",binMin, 1000);
185 hTrackMatchResEtaNeg->SetXTitle(
"#Delta #eta, #Delta #phi");
186 hTrackMatchResEtaNeg->SetYTitle(
"entries");
187 hTrackMatchResEtaNeg->SetTitle(
"Track-cluster residuals, E > 1 GeV");
188 hTrackMatchResEtaNeg->SetAxisRange(-0.05,0.05,
"X");
189 hTrackMatchResEtaNeg->Sumw2();
190 hTrackMatchResEtaNeg->SetMarkerStyle(25);
191 hTrackMatchResEtaNeg->SetMarkerColor(2);
192 hTrackMatchResEtaNeg->Draw(
"");
194 hTrackMatchResEtaPos->Sumw2();
195 hTrackMatchResEtaPos->SetMarkerStyle(25);
196 hTrackMatchResEtaPos->SetMarkerColor(4);
197 hTrackMatchResEtaPos->Draw(
"same");
199 hTrackMatchResPhiNeg->Sumw2();
200 hTrackMatchResPhiNeg->SetMarkerStyle(24);
201 hTrackMatchResPhiNeg->SetMarkerColor(2);
202 hTrackMatchResPhiNeg->Draw(
"same");
204 hTrackMatchResPhiPos->Sumw2();
205 hTrackMatchResPhiPos->SetMarkerStyle(24);
206 hTrackMatchResPhiPos->SetMarkerColor(4);
207 hTrackMatchResPhiPos->Draw(
"same");
209 TLine l0(0,hTrackMatchResEtaNeg->GetMinimum(),0,hTrackMatchResEtaNeg->GetMaximum()*1.2);
212 TLegend l3(0.55,0.7,0.83,0.85);
213 l3.SetTextSize(0.04);
214 l3.AddEntry(hTrackMatchResEtaNeg,
"#Delta #eta, Negative",
"P");
215 l3.AddEntry(hTrackMatchResEtaPos,
"#Delta #eta, Positive",
"P");
216 l3.AddEntry(hTrackMatchResPhiNeg,
"#Delta #phi, Negative",
"P");
217 l3.AddEntry(hTrackMatchResPhiPos,
"#Delta #phi, Positive",
"P");
222 ccalo->Print(Form(
"%s_CaloHisto.eps",histoTag.Data()));
225 TCanvas * ccalo2 =
new TCanvas(Form(
"CaloHisto2_%s",histoTag.Data()),
"",500,500);
241 hClusterTime->SetTitle(
"Cluster energy vs time");
242 hClusterTime->SetYTitle(
"time (ns)");
243 hClusterTime->SetAxisRange(300.,900.,
"Y");
244 hClusterTime->SetAxisRange(0.,30.,
"X");
245 hClusterTime->SetTitleOffset(1.5,
"Y");
246 hClusterTime->Draw(
"colz");
251 hCellActivity->SetTitle(
"Hits per cell (E > 0.2 GeV)");
252 hCellActivity->SetTitleOffset(1.5,
"Y");
253 hCellActivity->Draw(
"colz");
259 hCellActivityE->SetTitle(
"Mean energy per cell (E > 0.2 GeV)");
260 hCellActivityE->Divide(hCellActivity);
261 hCellActivityE->SetTitleOffset(1.5,
"Y");
262 hCellActivityE->Draw(
"colz");
267 hClusterActivity->SetTitle(
"Clusters activity (E > 0.5 GeV)");
268 hClusterActivity->SetTitleOffset(1.5,
"Y");
269 hClusterActivity->Draw(
"colz");
271 ccalo2->Print(Form(
"%s_CaloHisto2.eps",histoTag.Data()));
280 TCanvas * ctrack =
new TCanvas(Form(
"TrackHisto_%s",histoTag.Data()),
"",1000,500);
286 hTrackEtaPhi ->Add((
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiNegative"));
287 hTrackEtaPhi ->SetAxisRange(-0.9,0.9,
"X");
288 hTrackEtaPhi ->SetTitle(
"Hybrid tracks #eta vs #phi (p_{T} > 0.2 GeV)");
289 hTrackEtaPhi ->Draw(
"colz");
293 TH2F * hTrackEtaPhiSPD = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiSPDRefitPt02");
294 TH2F * hTrackEtaPhiNoSPD = (
TH2F*)
GetHisto(
"AnaHadrons_hEtaPhiNoSPDRefitPt02");
296 TH1F* hPhiSPD = (TH1F*)hTrackEtaPhiSPD ->ProjectionY(
"hTrackPhiSPD" ,0,1000);
297 TH1F* hPhiNoSPD = (TH1F*)hTrackEtaPhiNoSPD->ProjectionY(
"hTrackPhiNoSPD",0,1000);
299 TH1F* hPhi = hPhiSPD->Clone(
"hTrackPhi");
300 hPhi->Add(hPhiNoSPD);
301 hPhi ->SetTitle(
"Hybrid track in #phi, composition, p_{T} > 0.2 GeV");
302 hPhi ->SetLineColor(1);
303 hPhiSPD ->SetLineColor(2);
304 hPhiNoSPD->SetLineColor(4);
306 hPhi ->SetMinimum(1);
307 hPhi ->SetMaximum(hPhi->GetMaximum()*1.2);
310 hPhiSPD ->Draw(
"Hsame");
311 hPhiNoSPD->Draw(
"Hsame");
313 TLegend l(0.2,0.75,0.4,0.89);
315 l.AddEntry(hPhi,
"Sum",
"L");
316 l.AddEntry(hPhiSPD ,
"SPD+Refit",
"L");
317 l.AddEntry(hPhiNoSPD,
"No SPD+Refit",
"L");
337 ctrack->Print(Form(
"%s_TrackHisto.eps",histoTag.Data()));
346 TCanvas * cpi0 =
new TCanvas(Form(
"Pi0Histo_%s",histoTag.Data()),
"",500,500);
351 for(
Int_t icen = 0; icen < 10; icen++)
353 hMassE [icen] = (
TH2F*)
GetHisto(Form(
"AnaPi0_hRe_cen%d_pidbit0_asy0_dist1",icen));
354 hMixMassE[icen] = (
TH2F*)
GetHisto(Form(
"AnaPi0_hMi_cen%d_pidbit0_asy0_dist1",icen));
364 h2DMass = (
TH2F*) hMassE[6]->Clone(
"h2DMass");
365 for(
Int_t icen = 7; icen < 10; icen++) h2DMass->Add(hMassE[icen]);
366 h2DMass->SetTitle(
"Invariant mass vs pair E, Cen: 60-100%");
370 h2DMass = (
TH2F*) hMassE[0]->Clone(
"hMassProj");
371 h2DMass->SetTitle(
"Invariant mass vs cluster pair E");
374 h2DMass->SetTitleOffset(1.6,
"Y");
375 h2DMass->SetAxisRange(0.0,0.7,
"Y");
376 h2DMass->SetAxisRange(0,30,
"X");
377 h2DMass->Draw(
"colz");
387 for(
Int_t icen=0; icen<10; icen++ )
395 TH1F * hX = (TH1F*) hMassE[0]->ProjectionX(
"hEPairCen0",0,10000);
396 Int_t binmin = hX->FindBin(2);
397 Int_t binmax = hX->FindBin(10);
400 for(
Int_t icen = 0; icen < 6; icen++)
402 if(!hMassE[icen])
continue;
404 hMass[icen] = (TH1F*) hMassE [icen]->ProjectionY(Form(
"hMassCen%d",icen),binmin,binmax);
405 hMix [icen] = (TH1F*) hMixMassE[icen]->ProjectionY(Form(
"hMixCen%d" ,icen),binmin,binmax);
406 hMass[icen]->Sumw2();
407 hMix [icen]->Sumw2();
409 hMassPi0[icen] = (TH1F*) hMass[icen]->Clone(Form(
"hMassPi0Cen%d",icen));
410 hMassEta[icen] = (TH1F*) hMass[icen]->Clone(Form(
"hMassEtaCen%d",icen));
412 hMassPi0[icen]->Divide(hMix[icen]);
413 hMassPi0[icen]->Fit(
"pol0",
"Q",
"",0.25,0.35);
415 if(hMassPi0[icen]->GetFunction(
"pol0")) scale = hMassPi0[icen]->GetFunction(
"pol0")->GetParameter(0);
417 hMassPi0[icen]->Scale(1./scale);
418 hMassPi0[icen]->SetMarkerStyle(24);
419 hMassPi0[icen]->SetMarkerColor(
color[icen]);
420 hMassPi0[icen]->SetLineColor(
color[icen]);
421 hMassPi0[icen]->SetAxisRange(0.04,0.24);
422 hMassPi0[icen]->SetMarkerSize(0.5);
424 hMassEta[icen]->Rebin(4);
425 hMix [icen]->Rebin(4);
426 hMassEta[icen]->Divide(hMix[icen]);
427 hMassEta[icen]->SetMarkerStyle(25);
428 hMassEta[icen]->SetMarkerColor(
color[icen]);
429 hMassEta[icen]->SetLineColor(
color[icen]);
430 hMassEta[icen]->SetAxisRange(0.4,0.9);
431 hMassEta[icen]->SetMarkerSize(0.5);
432 hMassEta[icen]->Scale(1./scale);
434 if(maxEta < hMassEta[icen]->GetMaximum()) maxEta = hMassEta[icen]->GetMaximum();
435 if(maxPi0 < hMassPi0[icen]->GetMaximum()) maxPi0 = hMassPi0[icen]->GetMaximum();
440 hMassPi0[0]->SetMinimum(0.8);
441 hMassPi0[0]->SetTitleOffset(1.6,
"Y");
442 hMassPi0[0]->SetYTitle(
"Real / Mixed");
443 hMassPi0[0]->SetTitle(
"#pi^{0} peak, 2 < E_{pair}< 10 GeV");
448 hMassPi0[0]->SetMaximum(maxPi0*1.2);
449 hMassPi0[5]->Draw(
"Hsame");
450 hMassPi0[4]->Draw(
"Hsame");
451 hMassPi0[3]->Draw(
"Hsame");
452 hMassPi0[2]->Draw(
"Hsame");
453 hMassPi0[1]->Draw(
"Hsame");
454 hMassPi0[0]->Draw(
"Hsame");
460 TLegend l(0.12,0.6,0.4,0.85);
462 l.AddEntry(hMassPi0[0],
"0-10%",
"P");
463 l.AddEntry(hMassPi0[1],
"10-20%",
"P");
464 l.AddEntry(hMassPi0[2],
"20-30%",
"P");
465 l.AddEntry(hMassPi0[3],
"30-40%",
"P");
466 l.AddEntry(hMassPi0[4],
"40-70%",
"P");
467 l.AddEntry(hMassPi0[5],
"50-60%",
"P");
473 TLine l1(0.04,1,0.24,1);
481 binmin = hX->FindBin(4);
482 binmax = hX->FindBin(20);
485 for(
Int_t ism = 0; ism < 10; ism++)
488 if(!hTmpSM) hTmpSM = (
TH2F*)
GetHisto(Form(
"QA_hIM_Mod%d",ism));
490 hSM[ism] = (TH1F*) hTmpSM->ProjectionY(Form(
"hMassSM%d",ism),binmin,binmax);
492 hSM[ism]->SetMarkerStyle(26);
495 hSM[ism]->SetMarkerColor(
color[ism]);
496 hSM[ism]->SetLineColor(
color[ism]);
497 hSM[ism]->SetMarkerSize(0.5);
502 hMixSM[ism] = (TH1F*) hTmpMixSM->ProjectionY(Form(
"hMassMixSM%d",ism),binmin,binmax);
503 hMixSM[ism]->Sumw2();
504 hMixSM[ism]->Rebin(2);
505 hSM[ism]->Divide(hMixSM[ism]);
506 hSM[ism]->Fit(
"pol0",
"Q",
"",0.25,0.35);
508 if(hSM[ism]->GetFunction(
"pol0")) scale = hSM[ism]->GetFunction(
"pol0")->GetParameter(0);
510 hSM[ism]->Scale(1./scale);
511 hSM[ism]->SetYTitle(
"Real / Mixed");
514 if(maxSM < hSM[ism]->GetMaximum()) maxSM = hSM[ism]->GetMaximum();
517 hSM[0]->SetTitle(
"#pi^{0} peak in Modules, 4 < E_{pair}< 10 GeV");
518 hSM[0]->SetTitleOffset(1.6,
"Y");
519 hSM[0]->SetAxisRange(0.04,0.24);
520 hSM[0]->SetMaximum(maxSM*1.2);
521 hSM[0]->SetMinimum(0.8);
524 TLegend lsm(0.12,0.5,0.35,0.85);
525 lsm.SetTextSize(0.04);
526 lsm.AddEntry(hSM[0],Form(
"Mod %d",0),
"P");
528 for(
Int_t ism = 1; ism < 10; ism++)
530 hSM[ism]->Draw(
"Hsame");
531 lsm.AddEntry(hSM[ism],Form(
"Mod %d",ism),
"P");
534 lsm.SetBorderSize(0);
545 hMassEta[0]->SetMinimum(0.8);
546 hMassEta[0]->SetTitleOffset(1.6,
"Y");
547 hMassEta[0]->SetYTitle(
"Real / Mixed");
548 hMassEta[0]->SetTitle(
"#eta peak, 2 < E_{pair}< 10 GeV");
549 hMassEta[0]->Draw(
"H");
553 hMassEta[0]->SetMaximum(maxEta*1.2);
554 hMassEta[5]->Draw(
"Hsame");
555 hMassEta[4]->Draw(
"Hsame");
556 hMassEta[3]->Draw(
"Hsame");
557 hMassEta[2]->Draw(
"Hsame");
558 hMassEta[1]->Draw(
"Hsame");
559 hMassEta[0]->Draw(
"Hsame");
562 TLegend l2(0.12,0.6,0.4,0.85);
563 l2.SetTextSize(0.04);
564 l2.AddEntry(hMassEta[0],
"0-10%",
"P");
565 l2.AddEntry(hMassEta[1],
"10-20%",
"P");
566 l2.AddEntry(hMassEta[2],
"20-30%",
"P");
567 l2.AddEntry(hMassEta[3],
"30-40%",
"P");
568 l2.AddEntry(hMassEta[4],
"40-70%",
"P");
569 l2.AddEntry(hMassEta[5],
"50-60%",
"P");
575 cpi0->Print(Form(
"%s_Pi0Histo.eps",histoTag.Data()));
584 TCanvas * cCorrelation =
new TCanvas(Form(
"CorrelationHisto_%s",histoTag.Data()),
"",1000,500);
585 cCorrelation->Divide(2,1);
588 Float_t assocBins[] = {0.5,2.,5.,10.,20.};
589 Int_t nAssocBins = 4;
591 TH1F * hTrigger = (TH1F*)
GetHisto(
"AnaPhotonHadronCorr_hPtTrigger");
592 Int_t minClusterEBin = hTrigger->FindBin(minClusterE);
593 Float_t nTrig = hTrigger->Integral(minClusterE,100000);
600 TLegend l(0.35,0.6,0.83,0.85);
601 l.SetHeader(Form(
"p_{T,T} > %2.1f GeV/c",minClusterE));
606 for(
Int_t ibin = 0; ibin < nAssocBins; ibin++ )
608 TH2F* hDeltaPhiE = (
TH2F*)
GetHisto(Form(
"AnaPhotonHadronCorr_hDeltaPhiPtAssocPt%2.1f_%2.1f",assocBins[ibin],assocBins[ibin+1]));
609 hDeltaPhi[ibin] = (TH1F*) hDeltaPhiE->ProjectionY(Form(
"DeltaPhi%2.1f",assocBins[ibin]),minClusterEBin,10000);
610 hDeltaPhi[ibin]->Sumw2();
611 hDeltaPhi[ibin]->Rebin(2);
612 hDeltaPhi[ibin]->Scale(1./nTrig);
614 hDeltaPhi[ibin]->Fit(
"pol0",
"Q",
"",1,2);
616 if(hDeltaPhi[ibin]->GetFunction(
"pol0"))
618 scale = hDeltaPhi[ibin]->GetFunction(
"pol0")->GetParameter(0);
619 hDeltaPhi[ibin]->GetFunction(
"pol0")->SetRange(6,7);
621 hDeltaPhi[ibin]->Scale(1./scale);
624 hDeltaPhi[ibin]->SetAxisRange(-1.6,4.7);
626 hDeltaPhi[ibin]->SetMarkerStyle(24);
627 hDeltaPhi[ibin]->SetMarkerColor(
color[ibin]);
628 hDeltaPhi[ibin]->SetLineColor(
color[ibin]);
629 hDeltaPhi[ibin]->SetTitleOffset(1.5,
"Y");
630 hDeltaPhi[ibin]->SetYTitle(
"N_{pairs} / N_{trig} / ZYAM");
631 hDeltaPhi[ibin]->SetTitle(
"#gamma (#lambda_{0}^{2} < 0.4, neutral cluster) trigger");
633 l.AddEntry(hDeltaPhi[ibin],Form(
"%2.1f< p_{T,A}< %2.1f GeV/c",assocBins[ibin],assocBins[ibin+1]),
"P");
636 hDeltaPhi[2]->SetMaximum(hDeltaPhi[2]->GetMaximum()*10);
637 hDeltaPhi[2]->SetMinimum(0.8);
639 hDeltaPhi[2]->Draw(
"H");
640 hDeltaPhi[1]->Draw(
"Hsame");
641 hDeltaPhi[3]->Draw(
"Hsame");
642 hDeltaPhi[0]->Draw(
"Hsame");
651 TLegend l2(0.35,0.6,0.83,0.85);
652 l2.SetHeader(Form(
"p_{T,T} > %2.1f GeV/c",minClusterE));
653 l2.SetTextSize(0.04);
660 TH1F* hXE = (TH1F*) hEXE->ProjectionY(Form(
"XE%2.1fGeV",minClusterE),minClusterEBin,10000);
663 hXE->Scale(1./nTrig);
664 hXE->SetAxisRange(0,1);
665 hXE->SetMarkerStyle(24);
666 hXE->SetMarkerColor(1);
667 hXE->SetLineColor(1);
668 hXE->SetTitleOffset(1.5,
"Y");
669 hXE->SetYTitle(
"N_{pairs} / N_{trig}");
670 hXE->SetTitle(
"#gamma (#lambda_{0}^{2} < 0.4, neutral cluster) trigger");
671 l2.AddEntry(hXE,
"raw x_{E}",
"P");
674 TH1F* hXEUE = (TH1F*) hEXEUE->ProjectionY(Form(
"XEUE%2.1fGeV",minClusterE),minClusterEBin,10000);
677 hXEUE->Scale(1./nTrig);
678 hXEUE->SetAxisRange(0,1);
679 hXEUE->SetMarkerStyle(25);
680 hXEUE->SetMarkerColor(2);
681 hXEUE->SetLineColor(2);
682 l2.AddEntry(hXEUE,
"raw Und. Event x_{E}",
"P");
687 cCorrelation->Print(Form(
"%s_CorrelationHisto.eps",histoTag.Data()));
701 if(!h2ClusterPho)
return;
707 TH1F* hPrimPho = (TH1F*)
GetHisto(
"AnaPhoton_hPtPrim_MCPhoton");
708 TH1F* hPrimPi0 = (TH1F*)
GetHisto(
"AnaPi0_hPrimPi0Pt");
709 TH1F* hPrimEta = (TH1F*)
GetHisto(
"AnaPi0_hPrimEtaPt");
711 TCanvas * cmc =
new TCanvas(Form(
"MCHisto_%s",histoTag.Data()),
"",1000,1000);
717 TH1F* hClusterPho = (TH1F*) h2ClusterPho->ProjectionX(
"ClusterPho",0,1000);
718 TH1F* hClusterPi0 = (TH1F*) h2ClusterPi0->ProjectionX(
"ClusterPi0",0,1000);
719 TH1F* hClusterEta = (TH1F*) h2ClusterEta->ProjectionX(
"ClusterEta",0,1000);
721 hClusterPho->SetTitle(
"Cluster origin spectra, primary spectra in Calo acceptance");
722 hClusterPho->Sumw2();
723 hClusterPho->SetMarkerColor(1);
724 hClusterPho->SetMarkerStyle(20);
725 hClusterPho->SetAxisRange(0.,50.,
"X");
727 hClusterPho->SetXTitle(
"E_{rec}, p_{T,gen} (GeV)");
728 hClusterPho->Draw(
"");
730 hClusterPi0->Sumw2();
731 hClusterPi0->SetMarkerColor(4);
732 hClusterPi0->SetMarkerStyle(21);
733 hClusterPi0->Draw(
"same");
735 hClusterEta->Sumw2();
736 hClusterEta->SetMarkerColor(2);
737 hClusterEta->SetMarkerStyle(22);
738 hClusterEta->Draw(
"same");
741 hPrimPho->SetMarkerColor(1);
742 hPrimPho->SetMarkerStyle(24);
743 hPrimPho->Draw(
"same");
746 hPrimPi0->SetMarkerColor(4);
747 hPrimPi0->SetMarkerStyle(25);
748 hPrimPi0->Draw(
"same");
751 hPrimEta->SetMarkerColor(2);
752 hPrimEta->SetMarkerStyle(26);
753 hPrimEta->Draw(
"same");
755 TLegend l(0.45,0.6,0.83,0.89);
757 l.AddEntry(hClusterPho,
"#gamma cluster",
"P");
758 l.AddEntry(hClusterPi0,
"#pi^{0} (merged) cluster",
"P");
759 l.AddEntry(hClusterEta,
"#eta (merged) cluster",
"P");
760 l.AddEntry(hPrimPho,
"#gamma generated",
"P");
761 l.AddEntry(hPrimPi0,
"#pi^{0} generated",
"P");
762 l.AddEntry(hPrimEta,
"#eta generated",
"P");
770 TH1F* hRatPho = (TH1F*) hClusterPho->Clone(
"hGenRecoPho");
771 TH1F* hRatPi0 = (TH1F*) hClusterPi0->Clone(
"hGenRecoPi0");
772 TH1F* hRatEta = (TH1F*) hClusterEta->Clone(
"hGenRecoEta");
774 hRatPho->Divide(hPrimPho);
775 hRatPi0->Divide(hPrimPi0);
776 hRatEta->Divide(hPrimEta);
778 hRatPho->SetTitle(
"Reconstructed cluster / Generated particle in Calo acc.");
779 hRatPho->SetYTitle(
"Ratio");
780 hRatPho->SetXTitle(
"E(GeV)");
781 hRatPho->SetMinimum(1e-3);
782 hRatPho->SetMaximum(10);
784 hRatPi0->Draw(
"same");
785 hRatEta->Draw(
"same");
787 TLegend l2(0.15,0.7,0.3,0.85);
788 l2.SetTextSize(0.04);
789 l2.AddEntry(hRatPho,
"#gamma",
"P");
790 l2.AddEntry(hRatPi0,
"#pi^{0}",
"P");
791 l2.AddEntry(hRatEta,
"#eta",
"P");
803 Int_t binMin = hPrimPho->FindBin(3);
805 TH1F* hPrimPhoPhi = (TH1F*) h2PrimPhoPhi->ProjectionY(
"PrimPhoPhi",binMin,1000);
806 TH1F* hPrimPi0Phi = (TH1F*) h2PrimPi0Phi->ProjectionY(
"PrimPi0Phi",binMin,1000);
807 TH1F* hPrimEtaPhi = (TH1F*) h2PrimEtaPhi->ProjectionY(
"PrimEtaPhi",binMin,1000);
809 hPrimPhoPhi->Sumw2();
810 hPrimPi0Phi->Sumw2();
811 hPrimEtaPhi->Sumw2();
813 hPrimPhoPhi->Scale(1./hPrimPhoPhi->Integral(0,1000));
814 hPrimPi0Phi->Scale(1./hPrimPi0Phi->Integral(0,1000));
815 hPrimEtaPhi->Scale(1./hPrimEtaPhi->Integral(0,1000));
817 Float_t maxPhi = hPrimPhoPhi->GetMaximum();
818 if(maxPhi < hPrimPi0Phi->GetMaximum()) maxPhi = hPrimPi0Phi->GetMaximum();
819 if(maxPhi < hPrimEtaPhi->GetMaximum()) maxPhi = hPrimEtaPhi->GetMaximum();
821 Float_t minPhi = hPrimPhoPhi->GetMinimum();
822 if(minPhi > hPrimPi0Phi->GetMinimum()) minPhi = hPrimPi0Phi->GetMinimum();
823 if(minPhi > hPrimEtaPhi->GetMinimum()) minPhi = hPrimEtaPhi->GetMinimum();
825 hPrimPi0Phi->SetMaximum(maxPhi*1.1);
826 hPrimPi0Phi->SetMinimum(minPhi);
827 TGaxis::SetMaxDigits(3);
829 hPrimPi0Phi->SetYTitle(
"1/total entries dN/d#phi");
830 hPrimPi0Phi->SetTitle(
"Generated particles #phi for E > 3 GeV");
831 hPrimPi0Phi->SetTitleOffset(1.6,
"Y");
832 hPrimPi0Phi->SetMarkerColor(4);
833 hPrimPi0Phi->SetMarkerStyle(21);
834 hPrimPi0Phi->Draw(
"");
836 hPrimPhoPhi->SetMarkerColor(1);
837 hPrimPhoPhi->SetMarkerStyle(20);
838 Float_t scale = TMath::RadToDeg();
840 hPrimPhoPhi->Draw(
"same");
842 hPrimEtaPhi->SetMarkerColor(2);
843 hPrimEtaPhi->SetMarkerStyle(22);
844 hPrimEtaPhi->Draw(
"same");
853 h2PrimPhoEta->Sumw2();
854 h2PrimEtaEta->Sumw2();
855 h2PrimPi0Eta->Sumw2();
857 Int_t binMin = hPrimPho->FindBin(3);
859 TH1F* hPrimPhoEta = (TH1F*) h2PrimPhoEta->ProjectionY(
"PrimPhoEta",binMin,1000);
860 TH1F* hPrimPi0Eta = (TH1F*) h2PrimPi0Eta->ProjectionY(
"PrimPi0Eta",binMin,1000);
861 TH1F* hPrimEtaEta = (TH1F*) h2PrimEtaEta->ProjectionY(
"PrimEtaEta",binMin,1000);
863 hPrimPhoEta->Scale(1./hPrimPhoEta->Integral(0,1000));
864 hPrimPi0Eta->Scale(1./hPrimPi0Eta->Integral(0,1000));
865 hPrimEtaEta->Scale(1./hPrimEtaEta->Integral(0,1000));
867 Float_t maxEta = hPrimPhoEta->GetMaximum();
868 if(maxEta < hPrimPi0Eta->GetMaximum()) maxEta = hPrimPi0Eta->GetMaximum();
869 if(maxEta < hPrimEtaEta->GetMaximum()) maxEta = hPrimEtaEta->GetMaximum();
871 Float_t minEta = hPrimPhoEta->GetMinimum();
872 if(minEta > hPrimPi0Eta->GetMinimum()) minEta = hPrimPi0Eta->GetMinimum();
873 if(minEta > hPrimEtaEta->GetMinimum()) minEta = hPrimEtaEta->GetMinimum();
875 hPrimPi0Eta->SetMaximum(maxEta*1.1);
876 hPrimPi0Eta->SetMinimum(minEta);
877 TGaxis::SetMaxDigits(3);
879 hPrimPi0Eta->SetYTitle(
"1/total entries dN/d#eta");
880 hPrimPi0Eta->SetTitle(
"Generated particles #eta for E > 3 GeV");
881 hPrimPi0Eta->SetTitleOffset(1.6,
"Y");
882 hPrimPi0Eta->SetMarkerColor(4);
883 hPrimPi0Eta->SetMarkerStyle(21);
884 hPrimPi0Eta->Draw(
"");
886 hPrimPhoEta->SetMarkerColor(1);
887 hPrimPhoEta->SetMarkerStyle(20);
888 Float_t scale = TMath::RadToDeg();
889 hPrimPhoEta->Draw(
"same");
891 hPrimEtaEta->SetMarkerColor(2);
892 hPrimEtaEta->SetMarkerStyle(22);
893 hPrimEtaEta->Draw(
"same");
895 cmc->Print(Form(
"%s_MCHisto.eps",histoTag.Data()));
904 file =
new TFile(fileName,
"read");
906 TDirectory * dir = (TDirectory*)
file->Get(listName);
909 list = (
TList*) dir->Get(listName);
912 TFile * outputFile =
new TFile(
"AnalysisResultsList.root",
"RECREATE");
926 if(list)
return list->FindObject(histoName);
927 else return file->Get (histoName);
938 if (a->GetXbins()->GetSize())
944 for(
Int_t i = 0; i < X.GetSize(); i++) X[i] = scale*X[i];
945 a->Set((X.GetSize() - 1), X.GetArray());
952 a->Set(a->GetNbins(),
953 - scale*a->GetXmin(),
954 - 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)