Skip to content

Histograming/Sink/Utils.h: Use double as type for internal histogram stats calculations

FYI @sponce @msaur @clemenci

I have been looking into some of the instabilities we have been seeing in LHCb w.r.t. the histograms stats that are printed. e.g. the tests here

https://lhcb-nightlies.web.cern.ch/nightly/lhcb-master/2527/Rec/x86_64_v2-el9-gcc13-opt/tests

It turns out the issue is with how the calculation of the stats is done for profile histograms using float precision.

The problem is the calculation uses the same type internally, but with float this is not enough precision to prevent machine imprecision effects mounting up and causing instabilities in the output.

This MR simply ensures double precision is always used (already the case for regular histograms) and this removes the diffs we see.

Is there any chance this could make Gaudi v39r2 ?

Edited by Christopher Rob Jones

Merge request reports

Loading