Normalize each bin of THStack histogram?

Hello

It may sound naive, but is there a ROOT method to normalize each bin of a THStack, ie something that would look like the pic I attach ?

Screen Shot 2020-04-24 at 16.47.19.pdf (57.3 KB)

There is a discussion about this on the forum. Here:


It might help you.

So effectively, you add to the THStack each histo once you normalize it and presumably that should give a THStack which should be normalized to (1/N) where N=amount of histograms.

The problem with this, is that THStack does not have a scale funtion, so it is not possible to normalize the sumed histo the way I want it, i.e. basically to normalize each one of the bins to 1…

You have to add all histograms up, and use that to normalize, not use each single histogram’s area to normalize. You could always have one loop before hand to calculate this integral up “manually”, and scale for each input.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.