Extracting a portion of a histogram

Is there any way to extract a portion of a histogram? I want to do this for any dimension.

In the one-dimensional case, say I have 100 bins, I’d like to extract bin 40-50 and do a chi^2 comparison with bins 41-51.

Any thoughts?

The closest thing I could think of was to SetRange and then use TH1::Add, but the problem with that is that I would have lots of empty bins in the way, and the histogram shape would still be the same.