#include "../macros/StandardLabels.C" #include "Angle.h" void tres_diff_vs_segmentation(void) { TColor::CreateColorWheel(); TCanvas *c1 = new TCanvas("c1"); c1->SetGrid(); c1->SetTicks(); TH2D *axes = new TH2D("axes", "BCAL Timing resolution", 6, 0.5, 6.5, 100, 0.0, 150.0); axes->SetStats(0); axes->SetYTitle("Time resolution (ps)"); axes->SetXTitle("Segmentation Scheme"); TAxis *xaxis = axes->GetXaxis(); xaxis->SetBinLabel(1, "FINE"); xaxis->SetBinLabel(2, "LAYERS_1234"); xaxis->SetBinLabel(3, "LAYERS_22222"); xaxis->SetBinLabel(4, "LAYERS_244"); xaxis->SetBinLabel(5, "LAYERS_3322"); xaxis->SetBinLabel(6, "LAYERS_334"); axes->Draw(); // 500 MeV diff TH1D *h = new TH1D("h", "", 6, 0.5, 6.5); h->SetBinContent(1, 98.73); h->SetBinContent(2, 102.57); h->SetBinContent(3, 118.19); h->SetBinContent(4, 123.32); h->SetBinContent(5, 130.24); h->SetBinContent(6, 129.56); h->SetMarkerStyle(22); h->SetMarkerSize(2.0); h->SetMarkerColor(kRed); h->Draw("Psame"); // 1GeV diff TH1D *h2 = new TH1D("h2", "", 6, 0.5, 6.5); h2->SetBinContent(1, 79.61); h2->SetBinContent(2, 80.47); h2->SetBinContent(3, 104.87); h2->SetBinContent(4, 104.17); h2->SetBinContent(5, 111.50); h2->SetBinContent(6, 110.15); h2->SetMarkerStyle(21); h2->SetMarkerSize(2.0); h2->SetMarkerColor(kBlue); h2->Draw("Psame"); // 500 MeV avg TH1D *h3 = new TH1D("h3", "", 6, 0.5, 6.5); h3->SetBinContent(1, 70.77); h3->SetBinContent(2, 71.97); h3->SetBinContent(3, 80.45); h3->SetBinContent(4, 84.87); h3->SetBinContent(5, 85.98); h3->SetBinContent(6, 84.26); h3->SetMarkerStyle(26); h3->SetMarkerSize(2.0); h3->SetMarkerColor(kRed); h3->Draw("Psame"); // 1GeV avg TH1D *h22 = new TH1D("h22", "", 6, 0.5, 6.5); h22->SetBinContent(1, 52.91); h22->SetBinContent(2, 52.89); h22->SetBinContent(3, 63.88); h22->SetBinContent(4, 65.64); h22->SetBinContent(5, 67.39); h22->SetBinContent(6, 67.74); h22->SetMarkerStyle(25); h22->SetMarkerSize(2.0); h22->SetMarkerColor(kBlue); h22->Draw("Psame"); TLegend *leg = new TLegend(0.655, 0.169, 0.868, 0.379); leg->SetFillColor(kWhite); h->SetLineColor(kWhite); h2->SetLineColor(kWhite); h3->SetLineColor(kWhite); h22->SetLineColor(kWhite); leg->AddEntry(h, "0.5 GeV #Deltat/2"); leg->AddEntry(h2, "1 GeV #Deltat/2"); leg->AddEntry(h3, "0.5 GeV t_{avg}"); leg->AddEntry(h22, "1 GeV t_{avg}"); leg->Draw(); StandardLabels(axes, AngleStr("#theta_{#gamma}=")); c1->SaveAs("tres_diff_vs_segmentation.png"); c1->SaveAs("tres_diff_vs_segmentation.pdf"); }