43void rf612_recoverFromInvalidParameters() {
55 std::unique_ptr<RooDataSet> data(pdf.generate(
x, 10000));
93 std::cout <<
"\n\n\n-------------- Starting second fit ---------------\n\n" << std::endl;
114 fitWithoutRecovery->
Print();
115 std::cout <<
"Without recovery, the fitter encountered " << fitWithoutRecovery->
numInvalidNLL()
116 <<
" invalid function values. The parameters are unchanged." << std::endl;
118 fitWithRecovery->
Print();
119 std::cout <<
"With recovery, the fitter encountered " << fitWithRecovery->
numInvalidNLL()
120 <<
" invalid function values, but the parameters are fitted." << std::endl;
126 legend->
AddEntry(frame->
findObject(
"noRecovery"),
"Without recovery (cannot be plotted)",
"L");
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooFitResult is a container class to hold the input and output of a PDF fit to a dataset.
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
Int_t numInvalidNLL() const
Return number of NLL evaluations with problems.
RooPlot * plotOn(RooPlot *frame, const RooAbsArg &par1, const RooAbsArg &par2, const char *options="ME") const
Add objects to a 2D plot.
static RooMsgService & instance()
Return reference to singleton instance.
StreamConfig & getStream(Int_t id)
A RooPlot is a plot frame and a container for graphics objects within that frame.
static RooPlot * frame(const RooAbsRealLValue &var, Double_t xmin, Double_t xmax, Int_t nBins)
Create a new frame for a given variable in x.
TObject * findObject(const char *name, const TClass *clas=0) const
Find the named object in our list of items and return a pointer to it.
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.
RooPolynomial implements a polynomial p.d.f of the form.
RooRealVar represents a variable that can be changed from the outside.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
This class displays a legend box (TPaveText) containing several legend entries.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
virtual void SetBorderSize(Int_t bordersize=4)
RooCmdArg PrintEvalErrors(Int_t numErrors)
RooCmdArg Save(Bool_t flag=kTRUE)
RooCmdArg PrintLevel(Int_t code)
RooCmdArg RecoverFromUndefinedRegions(double strength)
When parameters are chosen such that a PDF is undefined, try to indicate to the minimiser how to leav...
RooCmdArg LineColor(Color_t color)
RooCmdArg Name(const char *name)
void removeTopic(RooFit::MsgTopic oldTopic)