Integral function in root

I was using the integral function in root for calculating the area under a histogram in between two bins.

 double area=hist->Integral(hist->FindBin(0), hist->FindBin(5)); 

I felt little confused what is being calculated here. Is it the sum of bin contents between the two limits? Or is it the literal geometrical area? sum(bincontent * binwidth) ? My strong guess is that it is the first way and I was wondering if there is any distinction for the integral function to calculate the literal geometric area and the sum of bin contents
ROOT Version: 6.26
Platform: Ubuntu 22.04
Compiler: gcc
You can find the code by following the link at ‚ÄúDefinition at line‚Ķ‚ÄĚ (eventually reaching the code for DoIntegral).

1 Like

Thanks a lot. This was exactly what I was looking for.

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