CMS-PD / ALPHA

A Light Post Heppy Analyzer
0 stars 10 forks source link

We should not use TH1Fs in CounterAnalyzer #148

Closed pablodecm closed 7 years ago

pablodecm commented 8 years ago

To avoid annoying numerical precision issues when adding the weights which can lead to the wrong number of counter events when larger than 1.0e6 and adding something of the order of 1.0, which is not that uncommon. This is issue is not as bad as it could be because we process small files individually and we only add them up at the end (so sum of larger numbers) but is is just better to fix it anyway.

https://github.com/CMS-PD/ALPHA/blob/master/plugins/CounterAnalyzer.cc#L11

Simplest solution, we could use TH1Ds to have more minimum significant digits (minimum of 15) when adding up small numbers, which should fix the problem in practise.

MDallOsso commented 7 years ago

done in https://github.com/CMS-PD/ALPHA/commit/4b213fa62d9c9be1d0a40ab5aab8391c95cbb683