TRatioPlot in a Canvas.Divide() environment

Dear experts,
I am trying to use the nice TRatioPlot features but i am struggling to have a setup for which i populate each PAD out of a Canvas.Divide() with the outcome of TRatio Plot.
Is this possible or better i wrote my own version of it?
Thanks in advance


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

Just trying, it works out of the box.

import ROOT as r

fLPT = r.TFile("data_RK-MM-11-L0I-inclusive.root")

hLPT = fLPT.Get("hist_0")
fMC = r.TFile("mc_RK-MM-11-L0I-inclusive.root")

hMC = fMC.Get("PID-L0-HLT-BDT-BKIN-fromLOI/hist_0")
# hMC.SumW2(r.kTrue)
c = r.TCanvas("c1", "A ratio example");
ratio = r.TRatioPlot( hMC, hLPT, "diffsig" )
ratio2= r.TRatioPlot( hMC, hLPT, "diffsig" )
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.