Dear All,
I am not convinced yet that this is a bug that’s why I post it here first (not on Jira).
I’ve been normalizing a histo with the “width” option. I noticed that it also scales the number
of entries. This is because of line 1087 here:
root.cern.ch/root/html606/TH1_8cxx_source.html
The point is that scaling with “width” uses the TH1::Add method with a “special” syntax
such that if the second scale factor is negative it does not add but scale the histo taking
the bin width into account.
However, I am not sure if a histo with a bin width of 0.5 and 1e6 entries should have 2 entries
after normalizing … it should still have 1e6 entries, no?
Here is an example:
root [0] TH1F* h_5 = new TH1F(“h_5”, “h_5”, 20, -5., 5.);
root [1] h_5->FillRandom(“gaus”, 1e6)
root [2] h_5->GetEntries()
(Double_t) 1.00000e+06
root [3] h_5->Scale(1./h_5->Integral(), “width”)
root [4] h_5->GetEntries()
(Double_t) 2.00000
Regards
Andi