I am using TEfficiency in ROOT 6.10/09 to calculate the efficiency. When I calculated one efficiency, I got the error message:
Info in <TROOT::TEfficiency::CheckEntries>: Histograms are not consistent: passed bin content > total bin content
Error in <TROOT::TEfficiency::CheckConsistency>: passed TEfficiency objects do not have consistent bin contents
Error in <TEfficiency::TEfficiency(const TH1&,const TH1&)>: histograms are not consistent -> results are useless
But I checked the 2 input hists (pass and total with only 6 bins). Everything looks fine:
Npass = 1283.25, Nall = 1424.83 for ibin = 1
Npass = 2982.94, Nall = 3326.33 for ibin = 2
Npass = 3774.07, Nall = 4298.2 for ibin = 3
Npass = 3365.25, Nall = 3764.94 for ibin = 4
Npass = 4186.04, Nall = 4870.66 for ibin = 5
Npass = 1708.01, Nall = 2032.85 for ibin = 6
I don’t know why. I calculated a lot of efficiencies with the same script, only one efficiency has such problem.
I am attaching the script (EVetoEffFromZmmg.C, the problematic efficiency is at line 534) together with the log file (t.txt). The input root file is very large, I put it in my CERN lxplus public area ~jtao/public/ForTEffProblem/DY_all.root .
This seems very strange. I will look at it. Are you sure you are printing all bins including underflows and overflows ?
The discrepancy could be in some of those extra bins