Home | News | Documentation | Download

Convolution of TGraph with TF1

I have a Current (I) vs Time (t) graph which I want to convolute with a function of the form y = te^(-t/10). Is there a way to do this in ROOT?

Hi @abhik,
You could try TF1Convolution (example) or RooFit (example).

1 Like

Thanks @vpadulan for your quick response.
I see that TF1Convolution accepts 2 TF1 objects and produce their convolution. For my case, I have a TGraph and a TF1 object and the convolution between these two is required. Any idea if I can convert my TGraph into a TF1 object?
I have attached a figure of the graph that I need to convolute with the function.

TF1 offer the possibility to define a function as C code you can try that and in the code call TGraph::Eval(). That way you will have two TF1 et the values of the 2nd one will come form the TGraph…

Hi @couet, it worked with some help from the code given here.
Thank you.