I want to make a 3-dimensional pdf, which is a result of a convolution. I found how to do a 3-dimensional Fourier transform, but now the problem is how to signalize the change of parameters to recompute the transform when needed.

I found examples in RooFFTConvPdf::fillCacheObject and RooAbsCachedPdf::getCache, but I don’t understand their general meaning.
Is there any documentation for that? Are there other classes where I can understand what’s happening when parameters are changed (maybe the fit routine)?

It looks like RooFFTConvPdf::fillCacheObject computes function values for all possible parameters, which is strange.

I don’t understand the meaning of

// Determine if there other observables than the convolution observable in the cache

what could those observables be? What if the function does or does not depend on them?

For the general review of how RooFit handles variable changes, I recommend to take a look at the “Caching of values” section in the RooAbsArg documentation.

In an attempt to answer more precisely to your question, I don’t understand exactly what you mean completely, but I’ll try. Maybe we can start from there:

// Determine if there other observables than the convolution observable in the cache
what could those observables be? What if the function does or does not depend on them?

As you see in the documentation of RooAbsCachedPdf::getCache(), it is possible to request cached results for any set of observables. For the convolution, it is possible that one or more of the observables is not the convolution observable. The RooFFTConvPdf is then computing the convolution in “slices” of these other observables (see here the source code).

should I use that paramTracker or RooChangeTracker? If they were they enough, would I need all the other code?

The paramTracker is a RooChangeTracker, so I think we are talking about using the RooChangeTracker in any case.

Should I copy that code right from .cxx files, or is there an easier way, a defined interface to implement such parameter change propagation?

The RooChangeTracker is exactly meant for that, so I think you can indeed copy the code with the RooChangeTracker that you see in RooAbsCachePdf.

I hope this answer is a first start, if you have more precise implementation questions we can also have a look at the code together. Is the code for your 3-dimensional convolution publicly available?

Dear Jonas, many thanks for your reply. Now I get the general idea and have the needed references.
I’m not working on that problem at the moment and not sure that I will actually use the 3-dimensional convolution. If I do and if I have questions, I’ll share the code, of course.
Thank you!