Read out information from TH1

Hello,

I am using root output for further analysis like:
((TH1*)file->Get(“h_muon_pt”))->GetIntegral()
to get the number of entries.

Now, I want to know only the number of entries for a certain x-axis range (in my case for pt). How can I
realize it? For example the pt range on x-axis is (0-200) GeV. Now I want to know the Integral for (0-50) GeV.
Maybe I can use bin content but I think it is not comfortable(?)

Thanks!
Gordon

You are using the wrong method.
use TH1::Integral(Int_t binx1, Int_t binx2, Option_t* option = “”) const

see: root.cern.ch/root/html/TH1.html#TH1:Integral%1

Rene