Skip to content

Fix incorrect behaviour in over/underflow checking functions

Aaron Liblong requested to merge fix-overunderflow-check into master

The existing algorithm to tell if a bin is the under- or overflow does not work correctly. It looks up not only the nominal bin number, but also the y and z bins of the global bin numbering system. Since the function is for 1-D histos only, the y and z bins are always 0, so the bin is always considered underflow.

I rewrote the function as a logical OR of the built-in ROOT functions for IsBinUnderflow and IsBinOverflow. I don't think there's any reason to use the global bin numbering system in the first place since this function only accepts 1-D histos.

Merge request reports