Skip to content

Instantly share code, notes, and snippets.

@ram1123
Last active June 6, 2025 19:33
Show Gist options
  • Save ram1123/e9bbb99dae2b47756b29edcd2b3ac6d0 to your computer and use it in GitHub Desktop.
Save ram1123/e9bbb99dae2b47756b29edcd2b3ac6d0 to your computer and use it in GitHub Desktop.
# Draw ratio plot
rp = ROOT.TRatioPlot(h2,h1)
rp.SetH1DrawOpt('p e0 same')
rp.SetH2DrawOpt('p e0 same')
rp.Draw()
# rp.GetLowerRefGraph().SetMinimum(0.0)
# rp.GetLowerRefGraph().SetMaximum(1.5)
leg = TLegend(0.60, 0.65, 0.88, 0.88)
leg.SetBorderSize(0)
leg.AddEntry(h1, "DY M-50 + M100-200", "lep")
leg.AddEntry(h2, "DY VBF-filter M105-160", "lep")
leg.Draw()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment