# Taking Ratio of TEfficiency Distributions

**URL:** <https://root-forum.cern.ch/t/taking-ratio-of-tefficiency-distributions/25806>\
**Category:** ROOT\
**Created:** [August 3, 2017, 8:55pm UTC](https://root-forum.cern.ch/t/taking-ratio-of-tefficiency-distributions/25806 "2017-08-03T20:55:09Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![awisecar](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/eada6e/32.png) [@awisecar](https://root-forum.cern.ch/u/awisecar)\
**Post date:** [August 4, 2017, 1:40pm UTC](https://root-forum.cern.ch/t/taking-ratio-of-tefficiency-distributions/25806/4 "2017-08-04T13:40:35Z")

</div>

My mistake. I’ll answer my own question for posterity.

There exist the methods  
TEfficiency::GetEfficiency  
[https://root.cern.ch/doc/master/TEfficiency\_8cxx\_source.html#l02462](https://root.cern.ch/doc/master/TEfficiency_8cxx_source.html#l02462)  
and  
TEfficiency::GetEfficiencyErrorLow and TEfficiency::GetEfficiencyErrorUp  
[https://root.cern.ch/doc/master/TEfficiency\_8cxx\_source.html#l02513](https://root.cern.ch/doc/master/TEfficiency_8cxx_source.html#l02513)

One can then get these values and use TH1::SetBinContent and TH1::SetBinError  
[https://root.cern.ch/doc/master/TH1\_8cxx\_source.html#l08350](https://root.cern.ch/doc/master/TH1_8cxx_source.html#l08350)  
taking the larger of the two efficiency errors as the TH1 error, since TH1’s can only handle symmetric error. A TEfficiency cannot be used for this ratio (Data/MC) plot, since the number of passed events may be greater than the total events (not binomial in nature). And two TGAE’s cannot be extracted and divided since there is no method to do so (?)

Regards,  
Andrew

---

_[View the full topic](https://root-forum.cern.ch/t/taking-ratio-of-tefficiency-distributions/25806)._
