PDF convolution with Function in different ranges

Hello Experts,

I have a TF1 with 4-parameters with a range (0-0.6). I want to convolute it with a PDF which has a range (-0.6,0.6).
Is there any way to do it easily? or is there possible to convert TF1 into a PDF in the range (-0.6,0.6) and use RooFFTConvPdf? How can I do that?

Thanks!

Hi @hym,
An idea would be to convert your pdf to tf1 through asTF and then use TF1Convolution (example) .
Probably @StephanH can add useful ideas as well.
Cheers,
Vincenzo

1 Like

1.

You can bind a RooFit object to any function, also to TF1:
https://root.cern/doc/master/rf105__funcbinding_8C.html

Use bindPdf, though, because the FFT convolution only operates on PDFs, not on functions.

1.1

However, a TF1 is often just a function expression (something like TF1("name", "x*x +2", ...)), which you could theoretically also just put in a RooGenericPdf.

2.

Iā€™m not sure about the different ranges, though. Why are they different? What does that mean for the convolution? Is your TF1 simply zero for negative x (or whatever the observable is)?

  • If yes, just convolve the two on the range [-0.6, 0.6].
  • If no, but you think it should be zero, add something like (x > 0.) * to your TF1. This acts as a heavyside function.

3.

The last step is to put the PDF and the TF1 into the convolution:
https://root.cern/doc/master/rf208__convolution_8C.html

1 Like

Thank you @StephanH and @vpadulan

  • I fitted the TF1 and
  • then passed the parameters to RooGenericPdf, where Pdf is 0 for X < 0.

Thanks again for the suggestions!

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