Time dependant resolution

Dear experts, I am trying to do a convolution of a signal pdf S(t_reconstructed) with a resolution function R where sigmas depend on t_generated. I believe this is not in fact a convolution but an integral of: S(x’) R(x-x’, sigma(x’)) dx’, x’ is t_gen and x is t_rec. Currently I do:

RooFormulaVar sigma(“sigma”, “*A**abs(t_gen)”, RooArgList(t_gen, A));

RooGaussian R(“R”, “R”, t_rec, t_gen, sigma);
RooProdPdf prod(“prod”, “prod”, S, Conditional(R, t_rec));

TH2D* hh = (TH2D*)prod.createHistogram(“hh”, t_gen, Binning(10000), YVar(t_rec,Binning(1000)));

TH1D* recoProj = hh->ProjectionY(“recoProj”);

and than recoProj is my model. I would rather do

RooAbsPdf* recoProj = prod.createProjection(t_gen);
but it doesn’t work with RooBDecay. Any suggestions on how to improve this or do it differently?
Thanks!

Hi @aljaz,

Welcome to the ROOT forum and thank you for your question.

I’m not entirely sure I understand your issue yet. Could you please share a bit more context?

For eg, the ROOT version you’re using, a minimal reproducer, and the error message you’re seeing.

Cheers,

Dev