# Can we divide TGraphAssymErrors to TH1

**URL:** <https://root-forum.cern.ch/t/can-we-divide-tgraphassymerrors-to-th1/31786>\
**Category:** Newbie\
**Created:** [November 27, 2018, 3:44pm UTC](https://root-forum.cern.ch/t/can-we-divide-tgraphassymerrors-to-th1/31786 "2018-11-27T15:44:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aayushi14](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/aayushi14/32/32051_2.png) [@Aayushi14](https://root-forum.cern.ch/u/Aayushi14)\
**Post date:** [November 27, 2018, 3:44pm UTC](https://root-forum.cern.ch/t/can-we-divide-tgraphassymerrors-to-th1/31786/1 "2018-11-27T15:44:12Z")

</div>

Hi,

I have some data root file, which is in TGraphAssymErrors form. Also I have generated mc simulation data, which is in TH1 form. I want to form ratio plot of Data/MC. Also I have to add the uncertainties on this plot,  
e.g. by putting the data error bars as before and by showing the stat. uncertainty of the  
MC prediction as band (or error bars) around 1.  
Is there a way to do it?

Thanks in advance  
Aayushi

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [November 27, 2018, 3:48pm UTC](https://root-forum.cern.ch/t/can-we-divide-tgraphassymerrors-to-th1/31786/2 "2018-11-27T15:48:38Z")

</div>

ROOT provides a TRatioPlot class which might help you in this task. [Have a look at the documentation](https://root.cern/doc/master/classTRatioPlot.html) to see if it is what you are looking for.

---

<div class="post-metadata">

**Author:** ![Aayushi14](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/aayushi14/32/32051_2.png) [@Aayushi14](https://root-forum.cern.ch/u/Aayushi14)\
**Post date:** [November 27, 2018, 4:23pm UTC](https://root-forum.cern.ch/t/can-we-divide-tgraphassymerrors-to-th1/31786/3 "2018-11-27T16:23:29Z")

</div>

Hi  
I have looked at it, but I think TRatioPlot() requires two histograms for division.  
Do I have to convert TGraphAssymErrors to TH1?  
Thanks  
Aayushi

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [November 28, 2018, 8:45am UTC](https://root-forum.cern.ch/t/can-we-divide-tgraphassymerrors-to-th1/31786/4 "2018-11-28T08:45:08Z")

</div>

I not aware of a ROOT class allowing division between a TH1 and a TGraph. And I could not think how to do it anyway as TGraph can be any collection of points, not even ordered …
