Rebinning to variable bin size

Hi ROOT experts,

It is possible this is a trivial question, but I am having a hard time rebinning histograms from a uniform to variable bin size. I have been looking at the Rebin and RebinAxis documentation, but am not sure if this can do what I want.

It looks like this question may have been asked before and left unanswered:

To be concrete, I have a histogram with 500 bins. Iā€™d like to merge the last 300 bins and perhaps merge bins 150-200 as well.

Thanks in advance,
Will

1 Like

see documentation of TH1::Rebin at root.cern.ch/root/html/TH1.html#TH1:Rebin
see case 2

Rene

Hi Rene,

Yes, that is what I was looking for. Thanks for the quick reply!

Will