How to get the Cumulative Distribution of Data?

Dear experts,

I am currently trying to get the integral fct. of real world data.
I have the data in ASCII format and already produced TGraph Objects to store them in a ROOT File.

The data has the shape of the derivative of a Gaussian, hence my expectation for the cumulative distribution is to look like Gaussian. I have only found one fct. in ROOT which allows to extract the cumulative if a THD1 is used as an input. In my case this is not an option. Have I overlooked a functionality of root? I know that in python or matlab cumtrapz() would solve my problem, sadly I am unfamiliar with those two. Should I first try to fit the derivative of a Gaussian and then evaluate the cumulative by myself, as I also haven’t seen a fct. for TF1 objects.

Thanks for your help!
Mkor


Please read tips for efficient and successful posting and posting code

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


Hi @makor ,
sorry for the late reply, I think we need @moneta 's or @jonas 's help for this one.

Cheers,
Enrico

Hi,
You can obtained the cumulative distribution from a TGraph, converting first to a TF1.
I attached here a Python example.

Cheers

Lorenzo

cumIntegral.py (782 Bytes)