RooFFTConvPdf introduces shift in output function?

Hi All,

I am having a bit of trouble with RooFFTConvPdf. When I try to convolve a test function with a Gaussian about the origin, I am seeing a shift in the resulting convolved function that I don’t understand. I have written a test script that demonstrates this using a couple of convolved Gaussians and the difference between the numeric treatment and the analytic treatment. This feature does not show up in RooNumConvPdf, but I am reluctant to use that, as there are warning all over its documentation.

Please let me know if you have any suggestions.

Cheers,

Luke
fit_work.cpp (1.29 KB)

Hi Luke

I just looked at your example. The shift is an effect of the discrete nature of the FFT transform (its half a bin width in your case).

The reason why the effect is so pronounced is that your example doesn’t pick up your custom binning of 10000 because it should be labeled “cache” instead of “fft”, so it
uses the default binning of 100. Once changed to “cache”, the effect becomes insignificant.
I now see that I made that typo in the Users Manual, I will fix it. The corresponding tutorial
macro $ROOTSYS/tutorials/roofit/rf208_convolution.C is correct.

Wouter

Thanks a bunch!