TF1Convolution - abnormal range of the convolved function

Hi there,

I have been using TF1Convolution in ROOT 6.04 and noticed something abnormal. Comparing to the ranges of the original functions, the range of the convolved function is not consistent. In addition, it depends proportionally on the number of points set for FFT.

Please download the files and run “.L Test.C+” and “Test()”. In the first canvas, the first 3 histograms show the original functions (fR, fL, fA). The next there show the convolved functions of fR and fA, fR and fL, and all three together using TF1Convolution. I suspect that some how, the magnitude might be added up n times (n is the number of points set for FFT); therefore, I have the last three showed the convolved functions divided by n (n = 5000 in the code). The ranges seem reasonable since they are less than 1 and so are the original functions’.

In the second canvas, the histogram shows the analytical form of the convolution of all three functions fR, fL and fA, which I was given. I am not sure about neither so I would be so grateful if anyone can check them out or recommend me other tools to confirm my results.

Thank you very much!

Best regards,
Nam Nguyen
Test.C (2.68 KB)
RLAfuncs.h (1.44 KB)
RLAfuncs.cxx (3.34 KB)

Hi,

I have fixed in the master the normalisation problem. However the convolution to work you need to have the functions correctly defined (e.g. defined as zero outside their range).
In addition since your resolution function is not symmetric and you are performing a convolution between zero and + infinity, you should be careful on the order of the functions passed. If you want to do f1 CONV f2 = Integral { f1(t) f2(x-t) dt } you should pass first f1 and then f2 in TF1Convolution.

Lorenzo