NLL Fit with penalty function

Does anyone have an example of how to perform a fit where a penalty function is added to the Likelihood function? Has anyone written their own goodness-of-fit by implementing a class that inherits from RooAbsOptGoodnessOfFit? If so I’d greatly appreciate an example of how this works. Thanks for your help.

Andrew Wagner

Hi Andrew,

In RooFit >=2.90 (i.e ROOT >=5.21) you can include constraints through p.d.f.s on parameters (i.e. you essentially multiply your p.d.f on your observables with a p.d.f. on one of your parameters (a Gaussian is a common choice here). You can find an example of how this works in $ROOTSYS/tutorials/roofit/rf604_constraints.C

                                                    Wouter