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?
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?