Hello, I’m trying to calculate the area under curve of a TH1F. I wrote
Double_t integral= htempkinensp->Integral(0,45);
but I noticed that I get different values of the area depending of the bin number that I set. For exampl, you can see in the stat box, here I setted
To elaborate: given a 1-D histogram with 10 equidistant bins in the range 0-5, the full bin range (without the overflow/underflow bins) is 1-10 while the axis range is 0-5.
You can find the bin number corresponding to a value on the x axis with FindBin, e.g. histo.FindBin(4.9) would return 10 (bin number 10) for my example above.