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 .
Thanks a lot!
EVetoEffFromZmmg.C (28.6 KB)t.txt (10.7 KB)
I can reproduce the issue also with the latest ROOT version but I’m not an expert for the math classes. @moneta can you help?
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
I printed out the contents of all bins which was defined in codes by myself(6 bins). Afer the eff calculation
EBLoR9_eff_nvtx->Divide(EBLoR9_nvtx_pass, EBLoR9_nvtx_all, 1., 1.); from which I got the consistency error message),
I added two lines with the same input hists to not do the consistency check :
Then I can got the correct effciency results as printed out :
Eff = 0.900628 + 0.0135623 - 0.0135623 for ibin = 1
Eff = 0.896765 + 0.00952019 - 0.00952019 for ibin = 2
Eff = 0.878058 + 0.00909188 - 0.00909188 for ibin = 3
Eff = 0.893839 + 0.00889049 - 0.00889049 for ibin = 4
Eff = 0.85944 + 0.00851315 - 0.00851315 for ibin = 5
Eff = 0.840205 + 0.0148522 - 0.0148522 for ibin = 6
I do not know the details of the consistency check.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.