TH1F problem

Hi all!

I’m encountering a problem with the filling of the histogram. After a number of entries (around 10^9) in a bin it gets flat… (Please see the attached picture…)

Any ideas how to solve this problem??

Many many thanks,

You should use a TH1D instead of TH1F.
A TH1F uses a float per bin. The precision of a float is between 6 and 7 significative digits.
If you add 1 to 1.6e7 you still get 1.6e7 !!
You can also use a TH1I if you fill with weights that are integers (true in your case).
With TH1I you can go up to 2e9 per bin


Many many thanks!!!