Custom Pdf and error message

I am attempting to combine two custom pdfs. It seems that in trying to tie the new pdf in with the rest that I get the following error message:

[#0] ERROR:InputArguments -- RooAddPdf::RooAddPdf(sig) pdf gauss1 is not extendable, ignored [#0] ERROR:InputArguments -- RooAddPdf::RooAddPdf(sig) pdf beta1 is not extendable, ignored

I’ve searched on the error and can’t find the clue I’d hoped for.


Hi Dave,

When you add two p.d.f. you need specify a relative fraction in addition to the components.

M = f*S + (1-f)*B.

The constructor for this form is

RooAddPdf M(“M”,“M”,RooArgList(S,B),f) ;

where S,B are p.d.f.s and f is a fraction parameter.

You get this error because RooFit can also sum extended p.d.f.s
without coefficients. In case S and B are extended p.d.f.s (i.e. they predict a number of expected events in addition to the distribution in one or more observables) you can use the constructor form

RooAddPdf M(“M”,“M”,RooArgList(S,B)) ;

and the fraction f is calculated from nS/(nS+nB).

Hope that helps…