void PlotPointingResVrhoRat() { //=========Macro generated from canvas: c/c //========= (Thu May 19 10:15:51 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 xAxis11[6] = {0, 80, 160, 300, 520, 2000}; TH1F *hs_rat_stack_3 = new TH1F("hs_rat_stack_3","",5, xAxis11); hs_rat_stack_3->SetMinimum(0); hs_rat_stack_3->SetMaximum(3); hs_rat_stack_3->SetDirectory(0); hs_rat_stack_3->SetStats(0); Int_t ci; // for color index setting TColor *color; // for color definition with alpha ci = TColor::GetColor("#000099"); hs_rat_stack_3->SetLineColor(ci); hs_rat_stack_3->GetXaxis()->SetTitle("#rho [mm]"); hs_rat_stack_3->GetXaxis()->SetLabelFont(42); hs_rat_stack_3->GetXaxis()->SetTitleOffset(1); hs_rat_stack_3->GetXaxis()->SetTitleFont(42); hs_rat_stack_3->GetYaxis()->SetTitle("Ratio"); hs_rat_stack_3->GetYaxis()->SetLabelFont(42); hs_rat_stack_3->GetYaxis()->SetTitleFont(42); hs_rat_stack_3->GetZaxis()->SetLabelFont(42); hs_rat_stack_3->GetZaxis()->SetTitleOffset(1); hs_rat_stack_3->GetZaxis()->SetTitleFont(42); hs_rat->SetHistogram(hs_rat_stack_3); Double_t xAxis12[6] = {0, 80, 160, 300, 520, 2000}; TH1F *hsig_Hino_135_2ns_stack_1 = new TH1F("hsig_Hino_135_2ns_stack_1","",5, xAxis12); 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.03551757); hsig_Hino_135_2ns_stack_1->SetBinError(2,0.0304119); hsig_Hino_135_2ns_stack_1->SetBinError(3,0.02362405); hsig_Hino_135_2ns_stack_1->SetBinError(4,0.02160629); hsig_Hino_135_2ns_stack_1->SetBinError(5,0.02653264); hsig_Hino_135_2ns_stack_1->SetEntries(6385.223); 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(" #rho - ||SV|| [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 xAxis13[6] = {0, 80, 160, 300, 520, 2000}; TH1F *hsig_Hino_525_Zee_stack_2 = new TH1F("hsig_Hino_525_Zee_stack_2","",5, xAxis13); hsig_Hino_525_Zee_stack_2->SetBinContent(1,1.199907); hsig_Hino_525_Zee_stack_2->SetBinContent(2,1.091507); hsig_Hino_525_Zee_stack_2->SetBinContent(3,1.167343); hsig_Hino_525_Zee_stack_2->SetBinContent(4,1.250464); hsig_Hino_525_Zee_stack_2->SetBinContent(5,1.172432); hsig_Hino_525_Zee_stack_2->SetBinError(1,0.04167821); hsig_Hino_525_Zee_stack_2->SetBinError(2,0.03211069); hsig_Hino_525_Zee_stack_2->SetBinError(3,0.02791421); hsig_Hino_525_Zee_stack_2->SetBinError(4,0.02896249); hsig_Hino_525_Zee_stack_2->SetBinError(5,0.03674417); hsig_Hino_525_Zee_stack_2->SetEntries(6030.658); 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(" #rho - ||SV|| [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 xAxis14[6] = {0, 80, 160, 300, 520, 2000}; TH1F *hsig_Hino_925_Zee_stack_3 = new TH1F("hsig_Hino_925_Zee_stack_3","",5, xAxis14); hsig_Hino_925_Zee_stack_3->SetBinContent(1,1.031054); hsig_Hino_925_Zee_stack_3->SetBinContent(2,1.126718); hsig_Hino_925_Zee_stack_3->SetBinContent(3,1.411357); hsig_Hino_925_Zee_stack_3->SetBinContent(4,1.373874); hsig_Hino_925_Zee_stack_3->SetBinContent(5,1.145523); hsig_Hino_925_Zee_stack_3->SetBinError(1,0.06911897); hsig_Hino_925_Zee_stack_3->SetBinError(2,0.03699781); hsig_Hino_925_Zee_stack_3->SetBinError(3,0.05430115); hsig_Hino_925_Zee_stack_3->SetBinError(4,0.0616165); hsig_Hino_925_Zee_stack_3->SetBinError(5,0.1298185); hsig_Hino_925_Zee_stack_3->SetEntries(1246.293); 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(" #rho - ||SV|| [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 xAxis15[6] = {0, 80, 160, 300, 520, 2000}; TH1F *hsig_Zee_stack_4 = new TH1F("hsig_Zee_stack_4","",5, xAxis15); hsig_Zee_stack_4->SetBinContent(1,0.4887789); hsig_Zee_stack_4->SetBinContent(2,0.338389); hsig_Zee_stack_4->SetBinContent(3,1.23485); hsig_Zee_stack_4->SetBinError(1,0.01241725); hsig_Zee_stack_4->SetBinError(2,0.009135854); hsig_Zee_stack_4->SetBinError(3,1.158643); hsig_Zee_stack_4->SetEntries(3.16671); 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(" #rho - ||SV|| [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); }