Problem with TGraphAsymmErrors

Hi,

I’m using a TGraphAsymmErrors to calculate efficiency, due to some events with minus weights I have less events in total hist than pass hist in a few bins, leading to errors:

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 TGraphAsymmErrors::Divide: passed histograms are not consistent

But as I learnt from root.cern.ch/root/html/TGraphAs … ors:Divide, “If the denominator becomes 0 or pass > total, the corresponding bin is skipped.” Do I miss something?

Thank you in advance.

Hi,

I think the documentation is wrong and we need to fix. It does not make sense compute a binomial error is passed is less than total, so this means there is a problem in the input histogram. I prefer not to change this in ROOT.

I understand with negative weights this can happen, but probably in that case you would need to compute the error yourself taking into account what negative weight means. If it is deleting events you should compute the error on the ratio from

Npassed - Npassed_deleted

Ntotal - Ntotal_deleted

Best Regards

Lorenzo

Thank you Lorenzo!