As you mentioned in your post, that check is hardcoded. Therefore, the only thing I can suggest is building ROOT from source, e.g. for the latest stable version GitHub - root-project/root at latest-stable.
Instructions on how to build from source are available here: Building ROOT from source - ROOT.
Be sure to remove the lines corresponding to the check before building.
Maybe you can manually set the overflowing bins in the “passed” histo to the max bin content in the “total” histo before computing the efficiencies? @moneta might also be able to suggest a workaround.
I think at this point it’s really a question of why you have more “passed” than total (it does not make sense in first approximation) and what makes sense in terms of statistical analysis in your case. TEfficiency has that check because typically passed > total means there is a bug somewhere.
No there’s no bug. In our case, we have 3 types of information: truth level, offline reconstructed level, and runtime reconstructed level, and we loop over truth level to see if there’s a match at offline and runtime reconstructed level respectively.
In these 2 cases (offline/truth and runtime/truth), all “passed” are no larger than total. But we are considering a 3rd efficiency (runtime/offline). In this case, most “passed” are no larger than total, but there might be some bins where the info gets reconstructed at runtime but not offline.
TEfficiency should be use for case where the statistics is binomial. Your case is probably more complicated, when making a ratio like offline/truth you might have fake (noisy) contribution in the online case that do not originate from truth.
The case runtime/offline is even more complicated and probably require a dedicated modelling of the runtime/offline counts.
Note that the case where you can consider the two contributions (numerator and denominator) uncorrelated, the so called Poisson ratio, it is covered in ROOT by using the function TGraphAsymmErrors::Divide with the option pois.