Getting integral of a histogram!

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

To Rene Brune,
As reference to this link:
I wonder if you noticed in this code that "xmin- axis->GetBinLowEdge(bmin) " can give 0 value since xmin and low edge number of bmin can be same or 0 for instance.

I can also refer the formula in here :

TH1::Integral always uses “full bins” (i.e. at least the whole “bmin” is taken) so, it’s not a problem.

I feel like the rule when finding the integral is not obeyed.  What do you think it refers when it says xmin and axis->GetBinLowEdge(bmin) separately?

Check the attachment and formula 5.38, please.
Thanks.       ![check_formula5_38|690x388](upload://iF3SKryGN2GrYwAN2LGW4y3Toyd.png) 

You know what I just tried that code I mentioned on a data, and the first deduction part from integral equals to 0 , and second deduction part from integral is equal to = h1->GetBinContent(bin_Upper) indeed.

Does “the way code calculates the integral” still make any sense? Nope. Integral is just double integral = h->Integral(bmin,bmax). However, he was , I guess, trying to deduce some background which only he, himself, understands.

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