Multidimensional convolution in RooFit

In RooFFTConvPdf class reference it’s written

Multi-dimensional convolutions are not supported at the moment.

I want to convolve the 3-dimensional Gaussian with the 3-dimensional exponent (p(r) \sim e^{-r/l}).

On the forum there was a reply in 2010, that multidimensional convolution is not straightforward, because

RooHistPdf does not implement interpolation algortithms for >2 dimensions

In the recent RooHistPdf, however, it is possible to

have an arbitrary number of real or discrete dimensions.

Does anything else still prohibits usage of multidimensional convolutions in RooFit? Is that message in the documentation obsolete?

I tried to find an example of how to make a 3-dimensional Fourier transform directly in ROOT, but failed (many details seem to be missing).

Hi,

Will it not be possible to write the analytical convolution in that case ? It will be easier. I think multi-dim FFT might work, but will require a large number of bins (lots of memory)

Lorenzo

Hi Lorenzo,

I’m afraid no. The analytical formula is known for 1-dimensional case, but when I tried to convolve the exponential with the gaussian with different sigma_x, sigma_y and sigma_z, it looks like no simple formula exists.
Do you mean that the phrase in the documentation is obsolete, and the convolution is possible?

When trying to use that, I found that there is no constructor with RooArgList for the convolution variables. The only variant I see is with

RooRealVar & convVar,

so how could several convolution variables be specified?

Yaroslav

Hi,
The RooFFTConv class of ROoFIt will not work for multi-dimensions, many things needs to be changed.
I was referring to use directly the ROOT FFT classes, since also the TF1COnvolution class it is only for one dimension.
You mentioned you failed using the ROOT classes directly, what was the problem ? DO you have already an example code for this ?

Lorenzo

Hi,

it’s a pity this can’t be done in RooFit. As I wrote, I tried ROOT FFT classes. The problem is I don’t know how to use them. I don’t understand where I shall provide function values (for the inverse transformation).
I created a separate topic for an example of 3d FFT.

I think I shall close this one and will be very thankful if you could answer there.

Yaroslav

One more thing to add: when implementing FFT, I thought about recalculations for different parameters.

It seems that I should derive my convolution class from RooAbsCachedPdf (as RooFFTConvPdf does), and implement the corresponding methods to cache the Fourier transform.

UPD: I spent some time going this way. However, it was very uneasy to understand how RooFit updates parameters during the minimization. I don’t want to copy and paste a lot of not-so-clear code. Probably I will ask a separate question (if it was not asked), but for now I use 1-dimensional convolutions for each coordinate.

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