Accuracy of convolution using RooFFTConvPdf

Dear experts,

I would like to produce a TH2 representing the convolution of a TH1, the distribution of the invariant mass of muons from Z->mumu decays, with a Gaussian for different values of the standard deviation of the Gaussian (e.g. 'sigma"). The typical range of sigmas I am investigating is [0.,50] GeV in 50 MeV steps.
For the convolution I use RooFFTConvPdf.

I attach a tar file with the PyROOT script and the input file I am using.

Indeed with this script I am experiencing two problems:

  1. with the current settings the shift of the peak position, even with a small value of the sigma, looks larger than expected, e.g. with sigma=50 MeV the peak is shifted of about 200 MeV


  1. when trying a finer scan of the sigmas, I have found that for sigma<5 MeV the convolution fails returning a pdf which is always zero.

I have tried to increase the number of bins used in the FFT or changing the choice of the buffer apparently with no effects.

Am I mis-configuring something? Do you have any suggestion?
Thanks in advance for the answer.

Regards,
Ernesto Migliore
ProbsConv_Z.tar (19.6 KB)