void PlotPointingRes() { //=========Macro generated from canvas: c/c //========= (Mon May 9 10:20:52 2022) by ROOT version 6.20/06 TCanvas *c = new TCanvas("c", "c",0,0,1600,1200); gStyle->SetOptStat(0); c->Range(-87.50001,-37.5,787.5,337.5); c->SetFillColor(0); c->SetBorderMode(0); c->SetBorderSize(2); c->SetFrameBorderMode(0); c->SetFrameBorderMode(0); THStack *hs = new THStack(); hs->SetName("hs"); hs->SetTitle(";|z_{origin}| [mm]; Pointing Resolution [mm];"); hs->SetMinimum(0); hs->SetMaximum(300); Double_t xAxis1[8] = {0, 25, 50, 75, 100, 150, 300, 700}; TH1F *hs_stack_1 = new TH1F("hs_stack_1","",7, xAxis1); hs_stack_1->SetMinimum(0); hs_stack_1->SetMaximum(300); hs_stack_1->SetDirectory(0); hs_stack_1->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#000099"); hs_stack_1->SetLineColor(ci); hs_stack_1->GetXaxis()->SetTitle("|z_{origin}| [mm]"); hs_stack_1->GetXaxis()->SetLabelFont(42); hs_stack_1->GetXaxis()->SetTitleOffset(1); hs_stack_1->GetXaxis()->SetTitleFont(42); hs_stack_1->GetYaxis()->SetTitle(" Pointing Resolution [mm]"); hs_stack_1->GetYaxis()->SetLabelFont(42); hs_stack_1->GetYaxis()->SetTitleFont(42); hs_stack_1->GetZaxis()->SetLabelFont(42); hs_stack_1->GetZaxis()->SetTitleOffset(1); hs_stack_1->GetZaxis()->SetTitleFont(42); hs->SetHistogram(hs_stack_1); Double_t xAxis2[8] = {0, 25, 50, 75, 100, 150, 300, 700}; TH1F *hsig_Hino_135_Hyy_stack_1 = new TH1F("hsig_Hino_135_Hyy_stack_1","",7, xAxis2); hsig_Hino_135_Hyy_stack_1->SetBinContent(1,39.65902); hsig_Hino_135_Hyy_stack_1->SetBinContent(2,49.29789); hsig_Hino_135_Hyy_stack_1->SetBinContent(3,54.5422); hsig_Hino_135_Hyy_stack_1->SetBinContent(4,60.96616); hsig_Hino_135_Hyy_stack_1->SetBinContent(5,68.66956); hsig_Hino_135_Hyy_stack_1->SetBinContent(6,86.17393); hsig_Hino_135_Hyy_stack_1->SetBinContent(7,93.18895); hsig_Hino_135_Hyy_stack_1->SetBinError(1,4.207862); hsig_Hino_135_Hyy_stack_1->SetBinError(2,4.767809); hsig_Hino_135_Hyy_stack_1->SetBinError(3,6.888137); hsig_Hino_135_Hyy_stack_1->SetBinError(4,7.825056); hsig_Hino_135_Hyy_stack_1->SetBinError(5,12.84792); hsig_Hino_135_Hyy_stack_1->SetBinError(6,6.248883); hsig_Hino_135_Hyy_stack_1->SetBinError(7,7.035553); hsig_Hino_135_Hyy_stack_1->SetEntries(7); ci = TColor::GetColor("#ff00ff"); hsig_Hino_135_Hyy_stack_1->SetLineColor(ci); ci = TColor::GetColor("#ff00ff"); hsig_Hino_135_Hyy_stack_1->SetMarkerColor(ci); hsig_Hino_135_Hyy_stack_1->SetMarkerStyle(26); hsig_Hino_135_Hyy_stack_1->SetMarkerSize(2); hsig_Hino_135_Hyy_stack_1->GetXaxis()->SetTitle("|z_{origin}| [mm]"); hsig_Hino_135_Hyy_stack_1->GetXaxis()->SetLabelFont(42); hsig_Hino_135_Hyy_stack_1->GetXaxis()->SetTitleOffset(1); hsig_Hino_135_Hyy_stack_1->GetXaxis()->SetTitleFont(42); hsig_Hino_135_Hyy_stack_1->GetYaxis()->SetTitle(" Pointing Resolution [mm]"); hsig_Hino_135_Hyy_stack_1->GetYaxis()->SetLabelFont(42); hsig_Hino_135_Hyy_stack_1->GetYaxis()->SetTitleFont(42); hsig_Hino_135_Hyy_stack_1->GetZaxis()->SetLabelFont(42); hsig_Hino_135_Hyy_stack_1->GetZaxis()->SetTitleOffset(1); hsig_Hino_135_Hyy_stack_1->GetZaxis()->SetTitleFont(42); hs->Add(hsig_Hino_135_Hyy_stack_1,""); Double_t xAxis3[8] = {0, 25, 50, 75, 100, 150, 300, 700}; TH1F *hsig_Hino_135_Zee_stack_2 = new TH1F("hsig_Hino_135_Zee_stack_2","",7, xAxis3); hsig_Hino_135_Zee_stack_2->SetBinContent(1,76.68322); hsig_Hino_135_Zee_stack_2->SetBinContent(2,57.06147); hsig_Hino_135_Zee_stack_2->SetBinContent(3,31.17232); hsig_Hino_135_Zee_stack_2->SetBinContent(4,25.07618); hsig_Hino_135_Zee_stack_2->SetBinContent(5,68.55194); hsig_Hino_135_Zee_stack_2->SetBinContent(6,75.84274); hsig_Hino_135_Zee_stack_2->SetBinContent(7,100.2162); hsig_Hino_135_Zee_stack_2->SetBinError(1,14.22903); hsig_Hino_135_Zee_stack_2->SetBinError(2,8.328603); hsig_Hino_135_Zee_stack_2->SetBinError(3,5.270634); hsig_Hino_135_Zee_stack_2->SetBinError(4,3.773593); hsig_Hino_135_Zee_stack_2->SetBinError(5,9.101977); hsig_Hino_135_Zee_stack_2->SetBinError(6,7.773189); hsig_Hino_135_Zee_stack_2->SetBinError(7,14.07867); hsig_Hino_135_Zee_stack_2->SetEntries(7); ci = TColor::GetColor("#0000ff"); hsig_Hino_135_Zee_stack_2->SetLineColor(ci); ci = TColor::GetColor("#0000ff"); hsig_Hino_135_Zee_stack_2->SetMarkerColor(ci); hsig_Hino_135_Zee_stack_2->SetMarkerStyle(26); hsig_Hino_135_Zee_stack_2->SetMarkerSize(2); hsig_Hino_135_Zee_stack_2->GetXaxis()->SetTitle("|z_{origin}| [mm]"); hsig_Hino_135_Zee_stack_2->GetXaxis()->SetLabelFont(42); hsig_Hino_135_Zee_stack_2->GetXaxis()->SetTitleOffset(1); hsig_Hino_135_Zee_stack_2->GetXaxis()->SetTitleFont(42); hsig_Hino_135_Zee_stack_2->GetYaxis()->SetTitle(" Pointing Resolution [mm]"); hsig_Hino_135_Zee_stack_2->GetYaxis()->SetLabelFont(42); hsig_Hino_135_Zee_stack_2->GetYaxis()->SetTitleFont(42); hsig_Hino_135_Zee_stack_2->GetZaxis()->SetLabelFont(42); hsig_Hino_135_Zee_stack_2->GetZaxis()->SetTitleOffset(1); hsig_Hino_135_Zee_stack_2->GetZaxis()->SetTitleFont(42); hs->Add(hsig_Hino_135_Zee_stack_2,""); Double_t xAxis4[8] = {0, 25, 50, 75, 100, 150, 300, 700}; TH1F *hsig_Zee_stack_3 = new TH1F("hsig_Zee_stack_3","",7, xAxis4); hsig_Zee_stack_3->SetBinContent(1,49.78086); hsig_Zee_stack_3->SetBinContent(2,53.11215); hsig_Zee_stack_3->SetBinContent(3,57.43333); hsig_Zee_stack_3->SetBinContent(4,50.34372); hsig_Zee_stack_3->SetBinContent(5,55.12063); hsig_Zee_stack_3->SetBinError(1,1.069985); hsig_Zee_stack_3->SetBinError(2,1.478995); hsig_Zee_stack_3->SetBinError(3,2.236994); hsig_Zee_stack_3->SetBinError(4,2.931671); hsig_Zee_stack_3->SetBinError(5,7.776256); hsig_Zee_stack_3->SetEntries(5); ci = TColor::GetColor("#ff0000"); hsig_Zee_stack_3->SetLineColor(ci); ci = TColor::GetColor("#ff0000"); hsig_Zee_stack_3->SetMarkerColor(ci); hsig_Zee_stack_3->SetMarkerStyle(24); hsig_Zee_stack_3->SetMarkerSize(2); hsig_Zee_stack_3->GetXaxis()->SetTitle("|z_{origin}| [mm]"); hsig_Zee_stack_3->GetXaxis()->SetLabelFont(42); hsig_Zee_stack_3->GetXaxis()->SetTitleOffset(1); hsig_Zee_stack_3->GetXaxis()->SetTitleFont(42); hsig_Zee_stack_3->GetYaxis()->SetTitle(" Pointing Resolution [mm]"); hsig_Zee_stack_3->GetYaxis()->SetLabelFont(42); hsig_Zee_stack_3->GetYaxis()->SetTitleFont(42); hsig_Zee_stack_3->GetZaxis()->SetLabelFont(42); hsig_Zee_stack_3->GetZaxis()->SetTitleOffset(1); hsig_Zee_stack_3->GetZaxis()->SetTitleFont(42); hs->Add(hsig_Zee_stack_3,""); hs->Draw("nostack p"); TLegend *leg = new TLegend(0.65,0.7,0.82,0.88,NULL,"brNDC"); leg->SetBorderSize(0); leg->SetTextSize(0.03); leg->SetLineColor(1); leg->SetLineStyle(1); leg->SetLineWidth(1); leg->SetFillColor(0); leg->SetFillStyle(1001); TLegendEntry *entry=leg->AddEntry("hsig_Hino_135_Hyy_stack_1","135GeV Hyy signal","lpf"); entry->SetFillStyle(1001); ci = TColor::GetColor("#ff00ff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#ff00ff"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(26); entry->SetMarkerSize(2); entry->SetTextFont(42); entry=leg->AddEntry("hsig_Hino_135_Zee_stack_2","135GeV Zee signal","lpf"); entry->SetFillStyle(1001); ci = TColor::GetColor("#0000ff"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#0000ff"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(26); entry->SetMarkerSize(2); entry->SetTextFont(42); entry=leg->AddEntry("hsig_Zee_stack_3","Zee MC","lpf"); entry->SetFillStyle(1001); ci = TColor::GetColor("#ff0000"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#ff0000"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(24); entry->SetMarkerSize(2); entry->SetTextFont(42); leg->Draw(); TLatex * tex = new TLatex(0.14,0.84,"ATLAS"); tex->SetNDC(); tex->SetTextFont(72); tex->SetTextSize(0.045); tex->SetLineWidth(2); tex->Draw(); tex = new TLatex(0.25,0.84,"Internal"); tex->SetNDC(); tex->SetTextFont(42); tex->SetTextSize(0.045); tex->SetLineWidth(2); tex->Draw(); tex = new TLatex(0.14,0.8,"#sqrt{s} = 13 TeV"); tex->SetNDC(); tex->SetTextFont(42); tex->SetTextSize(0.03375); tex->SetLineWidth(2); tex->Draw(); c->Modified(); c->cd(); c->SetSelected(c); }