void PlotPointingResVrhoRat() { //=========Macro generated from canvas: c/c //========= (Thu May 19 10:16:33 2022) by ROOT version 6.20/06 TCanvas *c = new TCanvas("c", "c",0,0,1600,1200); gStyle->SetOptStat(0); c->Range(-250,-0.375,2250,3.375); c->SetFillColor(0); c->SetBorderMode(0); c->SetBorderSize(2); c->SetFrameBorderMode(0); c->SetFrameBorderMode(0); THStack *hs_rat = new THStack(); hs_rat->SetName("hs_rat"); hs_rat->SetTitle(";#rho [mm];Ratio;"); hs_rat->SetMinimum(0); hs_rat->SetMaximum(3); Double_t xAxis31[6] = {0, 80, 160, 300, 520, 2000}; TH1F *hs_rat_stack_7 = new TH1F("hs_rat_stack_7","",5, xAxis31); hs_rat_stack_7->SetMinimum(0); hs_rat_stack_7->SetMaximum(3); hs_rat_stack_7->SetDirectory(0); hs_rat_stack_7->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#000099"); hs_rat_stack_7->SetLineColor(ci); hs_rat_stack_7->GetXaxis()->SetTitle("#rho [mm]"); hs_rat_stack_7->GetXaxis()->SetLabelFont(42); hs_rat_stack_7->GetXaxis()->SetTitleOffset(1); hs_rat_stack_7->GetXaxis()->SetTitleFont(42); hs_rat_stack_7->GetYaxis()->SetTitle("Ratio"); hs_rat_stack_7->GetYaxis()->SetLabelFont(42); hs_rat_stack_7->GetYaxis()->SetTitleFont(42); hs_rat_stack_7->GetZaxis()->SetLabelFont(42); hs_rat_stack_7->GetZaxis()->SetTitleOffset(1); hs_rat_stack_7->GetZaxis()->SetTitleFont(42); hs_rat->SetHistogram(hs_rat_stack_7); Double_t xAxis32[6] = {0, 80, 160, 300, 520, 2000}; TH1F *hsig_Hino_135_2ns_stack_1 = new TH1F("hsig_Hino_135_2ns_stack_1","",5, xAxis32); hsig_Hino_135_2ns_stack_1->SetBinContent(1,1); hsig_Hino_135_2ns_stack_1->SetBinContent(2,1); hsig_Hino_135_2ns_stack_1->SetBinContent(3,1); hsig_Hino_135_2ns_stack_1->SetBinContent(4,1); hsig_Hino_135_2ns_stack_1->SetBinContent(5,1); hsig_Hino_135_2ns_stack_1->SetBinError(1,0.03175358); hsig_Hino_135_2ns_stack_1->SetBinError(2,0.02646809); hsig_Hino_135_2ns_stack_1->SetBinError(3,0.02359325); hsig_Hino_135_2ns_stack_1->SetBinError(4,0.02178608); hsig_Hino_135_2ns_stack_1->SetBinError(5,0.02460382); hsig_Hino_135_2ns_stack_1->SetEntries(7472.786); hsig_Hino_135_2ns_stack_1->SetStats(0); ci = TColor::GetColor("#00ff00"); hsig_Hino_135_2ns_stack_1->SetLineColor(ci); ci = TColor::GetColor("#00ff00"); hsig_Hino_135_2ns_stack_1->SetMarkerColor(ci); hsig_Hino_135_2ns_stack_1->SetMarkerStyle(20); hsig_Hino_135_2ns_stack_1->SetMarkerSize(2); hsig_Hino_135_2ns_stack_1->GetXaxis()->SetTitle("#rho [mm]"); hsig_Hino_135_2ns_stack_1->GetXaxis()->SetLabelFont(42); hsig_Hino_135_2ns_stack_1->GetXaxis()->SetTitleOffset(1); hsig_Hino_135_2ns_stack_1->GetXaxis()->SetTitleFont(42); hsig_Hino_135_2ns_stack_1->GetYaxis()->SetTitle(" V_{r} - (SV_{x}^{2} + SV_{y}^{2})^{.5} [mm]"); hsig_Hino_135_2ns_stack_1->GetYaxis()->SetLabelFont(42); hsig_Hino_135_2ns_stack_1->GetYaxis()->SetTitleFont(42); hsig_Hino_135_2ns_stack_1->GetZaxis()->SetLabelFont(42); hsig_Hino_135_2ns_stack_1->GetZaxis()->SetTitleOffset(1); hsig_Hino_135_2ns_stack_1->GetZaxis()->SetTitleFont(42); hs_rat->Add(hsig_Hino_135_2ns_stack_1,""); Double_t xAxis33[6] = {0, 80, 160, 300, 520, 2000}; TH1F *hsig_Hino_525_Zee_stack_2 = new TH1F("hsig_Hino_525_Zee_stack_2","",5, xAxis33); hsig_Hino_525_Zee_stack_2->SetBinContent(1,1.117965); hsig_Hino_525_Zee_stack_2->SetBinContent(2,1.104631); hsig_Hino_525_Zee_stack_2->SetBinContent(3,1.30513); hsig_Hino_525_Zee_stack_2->SetBinContent(4,1.202675); hsig_Hino_525_Zee_stack_2->SetBinContent(5,1.341386); hsig_Hino_525_Zee_stack_2->SetBinError(1,0.03868936); hsig_Hino_525_Zee_stack_2->SetBinError(2,0.03098563); hsig_Hino_525_Zee_stack_2->SetBinError(3,0.0305576); hsig_Hino_525_Zee_stack_2->SetBinError(4,0.02772624); hsig_Hino_525_Zee_stack_2->SetBinError(5,0.03875271); hsig_Hino_525_Zee_stack_2->SetEntries(6512.083); ci = TColor::GetColor("#ffcc00"); hsig_Hino_525_Zee_stack_2->SetLineColor(ci); ci = TColor::GetColor("#ffcc00"); hsig_Hino_525_Zee_stack_2->SetMarkerColor(ci); hsig_Hino_525_Zee_stack_2->SetMarkerStyle(20); hsig_Hino_525_Zee_stack_2->SetMarkerSize(2); hsig_Hino_525_Zee_stack_2->GetXaxis()->SetTitle("#rho [mm]"); hsig_Hino_525_Zee_stack_2->GetXaxis()->SetLabelFont(42); hsig_Hino_525_Zee_stack_2->GetXaxis()->SetTitleOffset(1); hsig_Hino_525_Zee_stack_2->GetXaxis()->SetTitleFont(42); hsig_Hino_525_Zee_stack_2->GetYaxis()->SetTitle(" V_{r} - (SV_{x}^{2} + SV_{y}^{2})^{.5} [mm]"); hsig_Hino_525_Zee_stack_2->GetYaxis()->SetLabelFont(42); hsig_Hino_525_Zee_stack_2->GetYaxis()->SetTitleFont(42); hsig_Hino_525_Zee_stack_2->GetZaxis()->SetLabelFont(42); hsig_Hino_525_Zee_stack_2->GetZaxis()->SetTitleOffset(1); hsig_Hino_525_Zee_stack_2->GetZaxis()->SetTitleFont(42); hs_rat->Add(hsig_Hino_525_Zee_stack_2,""); Double_t xAxis34[6] = {0, 80, 160, 300, 520, 2000}; TH1F *hsig_Hino_925_Zee_stack_3 = new TH1F("hsig_Hino_925_Zee_stack_3","",5, xAxis34); hsig_Hino_925_Zee_stack_3->SetBinContent(1,1.176782); hsig_Hino_925_Zee_stack_3->SetBinContent(2,1.4867); hsig_Hino_925_Zee_stack_3->SetBinContent(3,1.571023); hsig_Hino_925_Zee_stack_3->SetBinContent(4,1.583928); hsig_Hino_925_Zee_stack_3->SetBinContent(5,1.663139); hsig_Hino_925_Zee_stack_3->SetBinError(1,0.06541994); hsig_Hino_925_Zee_stack_3->SetBinError(2,0.06447382); hsig_Hino_925_Zee_stack_3->SetBinError(3,0.0588322); hsig_Hino_925_Zee_stack_3->SetBinError(4,0.06532338); hsig_Hino_925_Zee_stack_3->SetBinError(5,0.1060345); hsig_Hino_925_Zee_stack_3->SetEntries(2042.222); ci = TColor::GetColor("#ff0000"); hsig_Hino_925_Zee_stack_3->SetLineColor(ci); ci = TColor::GetColor("#ff0000"); hsig_Hino_925_Zee_stack_3->SetMarkerColor(ci); hsig_Hino_925_Zee_stack_3->SetMarkerStyle(20); hsig_Hino_925_Zee_stack_3->SetMarkerSize(2); hsig_Hino_925_Zee_stack_3->GetXaxis()->SetTitle("#rho [mm]"); hsig_Hino_925_Zee_stack_3->GetXaxis()->SetLabelFont(42); hsig_Hino_925_Zee_stack_3->GetXaxis()->SetTitleOffset(1); hsig_Hino_925_Zee_stack_3->GetXaxis()->SetTitleFont(42); hsig_Hino_925_Zee_stack_3->GetYaxis()->SetTitle(" V_{r} - (SV_{x}^{2} + SV_{y}^{2})^{.5} [mm]"); hsig_Hino_925_Zee_stack_3->GetYaxis()->SetLabelFont(42); hsig_Hino_925_Zee_stack_3->GetYaxis()->SetTitleFont(42); hsig_Hino_925_Zee_stack_3->GetZaxis()->SetLabelFont(42); hsig_Hino_925_Zee_stack_3->GetZaxis()->SetTitleOffset(1); hsig_Hino_925_Zee_stack_3->GetZaxis()->SetTitleFont(42); hs_rat->Add(hsig_Hino_925_Zee_stack_3,""); Double_t xAxis35[6] = {0, 80, 160, 300, 520, 2000}; TH1F *hsig_Zee_stack_4 = new TH1F("hsig_Zee_stack_4","",5, xAxis35); hsig_Zee_stack_4->SetBinContent(1,0.7796738); hsig_Zee_stack_4->SetBinContent(2,0.6987654); hsig_Zee_stack_4->SetBinContent(3,2.370594); hsig_Zee_stack_4->SetBinError(1,0.01785354); hsig_Zee_stack_4->SetBinError(2,0.0171267); hsig_Zee_stack_4->SetBinError(3,1.719793); hsig_Zee_stack_4->SetEntries(5.007959); hsig_Zee_stack_4->SetMarkerStyle(20); hsig_Zee_stack_4->SetMarkerSize(2); hsig_Zee_stack_4->GetXaxis()->SetTitle("#rho [mm]"); hsig_Zee_stack_4->GetXaxis()->SetLabelFont(42); hsig_Zee_stack_4->GetXaxis()->SetTitleOffset(1); hsig_Zee_stack_4->GetXaxis()->SetTitleFont(42); hsig_Zee_stack_4->GetYaxis()->SetTitle(" V_{r} - (SV_{x}^{2} + SV_{y}^{2})^{.5} [mm]"); hsig_Zee_stack_4->GetYaxis()->SetLabelFont(42); hsig_Zee_stack_4->GetYaxis()->SetTitleFont(42); hsig_Zee_stack_4->GetZaxis()->SetLabelFont(42); hsig_Zee_stack_4->GetZaxis()->SetTitleOffset(1); hsig_Zee_stack_4->GetZaxis()->SetTitleFont(42); hs_rat->Add(hsig_Zee_stack_4,""); hs_rat->Draw("nostack p"); TLegend *leg = new TLegend(0.55,0.7,0.72,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_2ns_stack_1","Hino_135_2ns","lpf"); entry->SetFillStyle(1001); ci = TColor::GetColor("#00ff00"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#00ff00"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(20); entry->SetMarkerSize(2); entry->SetTextFont(42); entry=leg->AddEntry("hsig_Hino_525_Zee_stack_2","Hino_525_Zee","lpf"); entry->SetFillStyle(1001); ci = TColor::GetColor("#ffcc00"); entry->SetLineColor(ci); entry->SetLineStyle(1); entry->SetLineWidth(1); ci = TColor::GetColor("#ffcc00"); entry->SetMarkerColor(ci); entry->SetMarkerStyle(20); entry->SetMarkerSize(2); entry->SetTextFont(42); entry=leg->AddEntry("hsig_Hino_925_Zee_stack_3","Hino_925_Zee","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(20); entry->SetMarkerSize(2); entry->SetTextFont(42); entry=leg->AddEntry("hsig_Zee_stack_4","Zee","lpf"); entry->SetFillStyle(1001); entry->SetLineColor(1); entry->SetLineStyle(1); entry->SetLineWidth(1); entry->SetMarkerColor(1); entry->SetMarkerStyle(20); 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); }