I have an issue with TH1::Scale(). I’ve been looking at the code and at previous posts in the forum but I can’t find the solution to this one.
The thing is that I want to use Scale() to, well, scale a TH1 up to the same normalization value as another TH1 that I have. The thing is that after I perform the scaling the integrals of both histograms are still not equal, but slightly different. Here’s a bit of code:
Mmm, I was wrong, I was using TH1F. The thing is that I have ~ 10^9 entries in the histo, maybe I’m hitting a floating precision problem? I’ll try to regenerate the histos with TH1D and see if that works.
Picking up this old post, to ask about my issue: After scaling here, the number of entries in h1 didn’t change, which is strange given the description of Scale() here. Can someone please explain?
It is scaling the bin contents. So, I wondered why does it not reflect in the entries. I wanted to make a plot where I was also displaying the stats. But, since stats did not reflect the updated bin contents, I was puzzled about the Scale().
Yes, the entries depend on how many times I use SetBinContent()/Fill(). That is what you wanted to convey, right?
So, this makes me feel like a TH1F’s entries should display something like the area, shouldn’t it? That would seem like a more appropriate description of the diagram?