Maximum histogram bin content


TH1’s documentation says :

[quote]ROOT supports the following histogram types:

1-D histograms:
TH1C : histograms with one byte per channel. Maximum bin content = 255
TH1S : histograms with one short per channel. Maximum bin content = 65535
TH1I : histograms with one int per channel. Maximum bin content = 2147483647
TH1F : histograms with one float per channel. Maximum precision 7 digits
TH1D : histograms with one double per channel. Maximum precision 14 digits[/quote]
There is no word about TH1F and TH1D maximum bin content, which seems to be about 1.6777216e+07 entries. Maybe the documentation should include this specification ?

With TH1F you get the precision of a floating point number (ie around 7 significative digits).
If you fill with weights=1, after 1e7 entries, adding one more entry will have no effect in one
channel. If you have a flat distribution in a TH1F of 100 channels, you can have up 1e9 entries in the histogram.


Ok, I understand better the doc formulation now. Thanks. :slight_smile: