I was looking for something like TGraph.Integral() and did not find anything. Can somebody give me some advice on possible fast way to integrate the resulting curve of a graph? Of course I can write the linear interpolation, but it looks like it would be a handy feature if built-in…
You can have a look at the example in the attachment.
The function Integral in this example has several restrictions and cannot be
put as such in the class TGraph. Hoping that it is useful.
gint.C (4.54 KB)
thanks Rene, it seems to suit my needs. Let me precise for future people who might search in the forum that Rene’s script is a copy/paste/modif of the TF1::Integral function. I am attaching the python version of this script just in case…
gint.py (4 KB)