Warning using RooProdPdf and RooExtendPdf

I am performing a 2d unbinned extended maximum likelihood fit using Roofit.
While executing the fit I am getting following warning:
[#0] WARNING:InputArguments – RooProdPdf::RooProdPdf(mdzdelm) WARNING: multiple components with extended terms detected, product will not be extendible.

Relevants line of code:
RooRealVar nsig(“nsig”,“nsig”,200000,0,2000000);
RooProdPdf mdzdelm(“mdzdelm”, “mdzdelm”, RooArgSet(dg_mdz1,dg_delm)); RooExtendPdf mdzdel1(“mdzdel1”,“mdzdel1”,mdzdelm,nsig);
where dg_mdz1 and dg_delm are two 1d pdf’s

Any ideas on the possible reasons for the warning?

Aman

Hi Aman,

did you already extend the components of the product? To me it looks like this is the problem.

Hello Hageboeck,

Thanks for the reply
That was the first thing I checked. But I didn’t extend any of the product’s component before using RooProdPdf.
The components dg_mdz1 and dg_delm are defined as follows:
RooAddPdf dg_mdz1(“dg_mdz1”,“dg_mdz1”,RooArgList(asy_gauss1,bigauss,asy_gauss3,cball),RooArgList(frac_gauss1,fr2,fr3,fr4)) ; // 3AG+ 1CB

RooAddPdf dg_delm(“dg_delm”,“dg_delm”,RooArgList(asygauss1d,student_t,gauss1d),RooArgList(frac_gauss1d,fr2d,fr3d));

for more details, I am attaching my fitting macro.
Use of RooProdPdf and RooExtendPdf is in line 116 and 117.
RooProdPdf components are declared in line 109 and 77.

Amanfit2dn.C (8.4 KB)

Hello Aman,

you did in fact extend them. When you use a RooAddPdf with as many components as coefficients, it interprets these as an extended PDF. This probably causes the warning. If you just want to add them with different fractions, use
RooAddPdf dg_mdz1(“dg_mdz1”, “dg_mdz1”, RooArgList(asy_gauss1,bigauss,asy_gauss3,cball), RooArgList(frac_gauss1,fr2,fr3<NO FRACTION HERE>). In this case, RooFit will not extend, but normalise, and also calculate the missing fraction from the normalisation condition.

Extending your PDF
When you are done constructing the (normalised) model, I would advise to extend with a RooAddPdf by giving it as many coefficients as components. This usually works better than the ExtendPdf if you want to do something like
nSig * signalModel + nBkg * backgroundModel

1 Like

Thanks for the reply Hageboeck.

What you suggested is absolutely right. Using a RooAddPdf with as many components as coefficients were causing the warning. Now after declaring it with one less coefficient, I am not getting any warning.
Problem solved
Thanks!
Aman