Dear experts,
I loop over a tree, and without applying any cuts, I fill histogram. Both the tree and the hist have nentries 26364, but when I try to retrieve this number with [1], I found val = 263640.
I did that with other trees and each time I found val = 10 * nentries. Do you know what is wrong?
PS: when I’m doing [2] I find the expected value val = 1
Regards
[1]
val = hist->Integral()/hist->GetBinWidth(1) // here val == 10 * nentries
[2]
hist->Scale(1/(hist->Integral()/hist->GetBinWidth(1))); // normalized to area
val = hist->Integral()/hist->GetBinWidth(1); // here val ==1 as expected
h->Integral() returns the number of entries. ( = h->GetEntries() ) (A summatory)
h->Integral(“width”) returns the “actual” integral. ( = h->Integral()*binWidth if fixed bin size)