RooDecay normalization issue

Dear all,
I’m building the model for a fit using the RooDecay model:

self.function_pdf = ROOT.RooDecay("function_pdf", "function_pdf",
                                                            delta_t,
                                                            tau,
                                                            resolution_function,
                                                            ROOT.RooDecay.DoubleSided)

When I call the method:

function_pdf.getNorm(ROOT.RooArgSet(delta_t))

I expected to get 1.0 but it wasn’t.
Isn’t the pdf returned by RooDecay normalized?

Thank you.

Hi @chiara,

this computes the normalisation that is needed to normalise the PDF. When you call getVal without any variables to normalise over, you get a raw, unnormalised value. When you call
getVal(normSet), you get getVal()/getNorm(normSet).

One word of warning. When you call RooFit functions with unnamed temporaries from python, python sometimes manages to delete the temporary before the C++ function completes.
This will work:

function.getNorm(ROOT.RooArgSet(x))

But not this:

function.getNorm(ROOT.RooFit.Something(ROOT.RooArgSet(x)))

By the time getNorm runs, the RooArgSet is gone. A solution is to give the RooArgSet a name.

Dear Stephan,
you have been of great help.

I understood, we can close this issue.
Thanks
Chiara

1 Like

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