Every couple of years I run into this and hopefully now for the last time
The problem:
Error assignment to a bin with just 1 entry, aka variance == 0
The Solution:
Calculate the variance by using the data of all the other bins.
However, the test that determines whether the bin variance == 0 is
not (!) scale invariant:
In Double_t TProfileHelper::GetBinError:
Double_t test = 1;
if (err2 != 0 && neff < 5) test = eprim2*sum/err2;
if (p->fgApproximate && (test < 1.e-4 || eprim2 < 1e-6)) {
should probably be replaced by
if (eprim2 <= 0) {