Use a histogram as a weight for other histograms

Hi everybody,

I have a histogram, containing a ratio of data and MC pileup distributions , which is needed to reweight several other histograms. How can this weighting be done? Should I make an array of numbers from this histogram somehow and use it in a Fill() function or are there other methods?

Thanks in advance

See “Operations on histograms” in the TH1 Class Reference.

Thanks for the reply,
Yep,I looked at the references, but it seems these operations are not what is needed for using the histogram as a weight. As far as I’ve understood, I need to extract values of Data/MC PU ratio from my hist to use them in a Fill function. I’ve tried to GetBinContent from each bin and to write these contents to a TBranch (since it can be used as a weight), but this doesn’t work.
So the question remains…

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