RooFit RooConstraintSum paramSet arguments

I was trying to construct a log likelihood externally for RooMinimizer and was a little stuck while trying to figure out how to add external constraints. If I understood this correctly, for the constructor of RooConstraintSum:

RooConstraintSum (const char *name, const char *title, const RooArgSet &constraintSet, const RooArgSet &paramSet)

paramSet must at least contain all the RooRealVar you want to constraint with your constraining PDFs inside constraintSet. Anything not related to your constraining PDFs will just get ignored by RooFit. Can someone verify this?

@moneta can you help?


the parameter set you are passing defines the normalisation of the constraint term. It should contain the global observables of the model, if you have defined. For examples if you add a Gaussian constraint G( p0 | p, s), p will be the parameter you are constraint and p0 will be the global observables on which you want to normalize your constraint term.
I would suggest you to look how RooConstraintSum in used in RooAbsPdf to add the constraint when calling createNLL


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