Ratio plot from TGraphAsymmErrors and a Histogram

Dears,

I’m somehow well familiarized with ROOT but lately a doubt has appeared to me.
I’m needing to construct a ratio plot between data and MC. The data is stored in a root file as a TGraphAsymmErrors (what we generally expect for data) and the MC is a TH1F made by the sum of all MCs. Is there an implementation in ROOT that can be used to compute the ratio and the correct errors for this case?

I know that is possible to divide TH’s and one could think about to convert the TGraphAsymmErrors into a TH1F. But in that case the asymmetric error information will be lost (at least, as far as I know there’s no TH in ROOT which accepts asymmetric error).
I’ve searched for similar topics here in the forum but the ones I found are not answered.
So, if anyone could give me a recommendation of what should be the best procedure (or point me to a similar topic with a proper answer) I appreciate that much.

Thanks in advance!

May be the TRatioPlot class can help you ?

Hi,

Thank you for the answer.
But seems that TRatioPlot takes only histograms. The problem here is how to deal with the asymmetric errors coming from the TGraphAsymmErrors. Converting the TGraph into a TH I would loose the information about the error asymmetry.

may be @moneta can help you with this.

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