43 std::unique_ptr<RooDataSet>
data{model->
generate(*
w->set(
"observables"), 1000)};
54 w->loadSnapshot(
"reference_fit");
56 w->loadSnapshot(
"reference_fit_bkgonly");
60 new TCanvas(
"rf510_wsnamedsets",
"rf503_wsnamedsets", 600, 600);
61 gPad->SetLeftMargin(0.15);
81 RooRealVar mean(
"mean",
"mean of gaussians", 5, 0, 10);
82 RooRealVar sigma1(
"sigma1",
"width of gaussians", 0.5);
83 RooRealVar sigma2(
"sigma2",
"width of gaussians", 1);
85 RooGaussian sig1(
"sig1",
"Signal component 1",
x, mean, sigma1);
86 RooGaussian sig2(
"sig2",
"Signal component 2",
x, mean, sigma2);
94 RooRealVar sig1frac(
"sig1frac",
"fraction of component 1 in signal", 0.8, 0., 1.);
98 RooRealVar bkgfrac(
"bkgfrac",
"fraction of background", 0.5, 0., 1.);
115 w.defineSet(
"parameters", *params);
116 w.defineSet(
"observables",
x);
131 std::unique_ptr<RooDataSet> refData{model.
generate(
x, 10000)};
136 w.saveSnapshot(
"reference_fit", *params,
true);
142 bkgfrac.setConstant(
true);
143 bkgfrac.removeError();
146 w.saveSnapshot(
"reference_fit_bkgonly", *params,
true);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
RooFit::OwningPtr< RooArgSet > getParameters(const RooAbsData *data, bool stripDisconnected=true) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
Abstract interface for all probability density functions.
RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}, const RooCmdArg &arg9={}, const RooCmdArg &arg10={}) const override
Helper calling plotOn(RooPlot*, RooLinkedList&) const.
RooFit::OwningPtr< RooFitResult > fitTo(RooAbsData &data, CmdArgs_t const &... cmdArgs)
Fit PDF to given dataset.
RooFit::OwningPtr< RooDataSet > generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={})
See RooAbsPdf::generate(const RooArgSet&,const RooCmdArg&,const RooCmdArg&,const RooCmdArg&,...
Efficient implementation of a sum of PDFs of the form.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Chebychev polynomial p.d.f.
A RooPlot is a plot frame and a container for graphics objects within that frame.
void Draw(Option_t *options=nullptr) override
Draw this plot and all of the elements it contains.
RooRealVar represents a variable that can be changed from the outside.
Persistable container for RooFit projects.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
RooCmdArg PrintLevel(Int_t code)
RooCmdArg LineColor(Color_t color)
RooCmdArg LineStyle(Style_t style)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...