Fit using Delta function convoluted with Gaussian

Dear experts

I am trying to do the fit with the delta function convoluted with the Gaussian.
I use the RooTruthModel and RooGaussModel classes for delta and Gaussian functions, respectively,
while for the convolution - RooFFTConvPdf.
However, the fit to the data generated using the model is not possible.

I have attached the example macro to show how I am trying to do this fit.

Could you please point me to the right way to do the fit with delta (x) Gauss?

test.C (1.1 KB)

HI @Archil,

both the RooTruthModel and the RooGaussModel are meant to be used in a analytical convolution via one of the classes inheriting from RooAbsAnaConvPdf (see the inheritance diagram in the documentation). They are not supposed to be convoluted with each other.

If you want to use the numerical FFT convolution, you should use the regular Gaussian pdf class named RooGaussian. But it’s numerically not a good idea to make a numerical convolution with a delta function like RooTruthModel. For the numerical convolution, the pdf is sampled at discrete points, and since the delta function is only non-zero at an infinitesimally small point x = 0, it has no chance of being sampled and the whole pdf is zero.

But why would you want to do the numerical convolution with a delta function anyway? A convolution with a delta function does nothing to the function, so why not take the Gaussian directly?


Hi Jonas,

Thanks a lot for the reply,

Thanks, now I understand why my script does not work.

that’s a good point… actually I do not need to do it, so I will use the Gaussian directly.

Thanks again,


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