46 std::unique_ptr<RooDataSet>
d{model.generate(
x, 50)};
52 RooGaussian fconstraint(
"fconstraint",
"fconstraint",
f, 0.8, 0.2);
64 std::unique_ptr<RooFitResult> r1{model.fitTo(*
d,
Save(),
PrintLevel(-1))};
73 RooGaussian fconstext(
"fconstext",
"fconstext",
f, 0.2, 0.1);
79 cout <<
"fit result without constraint (data generated at f=0.5)" << endl;
81 cout <<
"fit result with internal constraint (data generated at f=0.5, constraint is f=0.8+/-0.2)" << endl;
83 cout <<
"fit result with (another) external constraint (data generated at f=0.5, constraint is f=0.2+/-0.1)" << endl;
Efficient implementation of a sum of PDFs of the form.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooPolynomial implements a polynomial p.d.f of the form.
Efficient implementation of a product of PDFs of the form.
RooRealVar represents a variable that can be changed from the outside.
RooCmdArg Constrain(const RooArgSet ¶ms)
RooCmdArg Save(bool flag=true)
RooCmdArg ExternalConstraints(const RooArgSet &constraintPdfs)
RooCmdArg PrintLevel(Int_t code)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...