void rf202_extendedmlfit()
{
RooRealVar sigma1(
"sigma1",
"width of gaussians", 0.5);
RooRealVar sigma2(
"sigma2",
"width of gaussians", 1);
RooGaussian sig1(
"sig1",
"Signal component 1",
x, mean, sigma1);
RooGaussian sig2(
"sig2",
"Signal component 2",
x, mean, sigma2);
RooRealVar sig1frac(
"sig1frac",
"fraction of component 1 in signal", 0.8, 0., 1.);
RooRealVar nsig(
"nsig",
"number of signal events", 500, 0., 10000);
RooRealVar nbkg(
"nbkg",
"number of background events", 500, 0, 10000);
std::unique_ptr<RooDataSet>
data{model.generate(
x)};
model.plotOn(xframe);
model.Print("t");
RooExtendPdf esig(
"esig",
"extended signal pdf", sig, nsig);
RooExtendPdf ebkg(
"ebkg",
"extended background pdf", bkg, nbkg);
new TCanvas(
"rf202_composite",
"rf202_composite", 600, 600);
gPad->SetLeftMargin(0.15);
}
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
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.
RooExtendPdf is a wrapper around an existing PDF that adds a parameteric extended likelihood term to ...
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.
Variable that can be changed from the outside.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
RooCmdArg Title(const char *name)
RooCmdArg PrintLevel(Int_t code)
RooCmdArg Components(Args_t &&... argsOrArgSet)
RooCmdArg LineStyle(Style_t style)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
[#0] WARNING:InputArguments -- The parameter 'sigma1' with range [-inf, inf] of the RooGaussian 'sig1' exceeds the safe range of (0, inf). Advise to limit its range.
[#0] WARNING:InputArguments -- The parameter 'sigma2' with range [-inf, inf] of the RooGaussian 'sig2' exceeds the safe range of (0, inf). Advise to limit its range.
[#1] INFO:Minimization -- p.d.f. provides expected number of events, including extended term in likelihood.
[#1] INFO:Fitting -- RooAbsPdf::fitTo(model) fixing normalization set for coefficient determination to observables in data
[#1] INFO:Fitting -- using generic CPU library compiled with no vectorizations
[#1] INFO:Fitting -- Creation of NLL object took 1.49814 ms
[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_model_modelData) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minimization -- [fitFCN] No discrete parameters, performing continuous minimization only
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (bkg)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: ()
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) directly selected PDF components: (bkg,sig2)
[#1] INFO:Plotting -- RooAbsPdf::plotOn(model) indirectly selected PDF components: (sig)
0x7ffcd6f66160 RooAddPdf::model = 0.898615/1 [Auto,Clean]
0x7ffcd6f65848/V- RooChebychev::bkg = 0.79892 [Auto,Dirty]
0x7ffcd6f65d78/V- RooRealVar::x = 5
0x7ffcd6f639b8/V- RooRealVar::a0 = 0.441701 +/- 0.0731848
0x7ffcd6f63da0/V- RooRealVar::a1 = 0.20108 +/- 0.1176
0x7ffcd6f65460/V- RooRealVar::nbkg = 504.206 +/- 39.3065
0x7ffcd6f64570/V- RooAddPdf::sig = 1/1 [Auto,Clean]
0x7ffcd6f62738/V- RooGaussian::sig1 = 1 [Auto,Dirty]
0x7ffcd6f65d78/V- RooRealVar::x = 5
0x7ffcd6f64c90/V- RooRealVar::mean = 5
0x7ffcd6f631e8/V- RooRealVar::sigma1 = 0.5
0x7ffcd6f64188/V- RooRealVar::sig1frac = 0.837341 +/- 0.116832
0x7ffcd6f62c90/V- RooGaussian::sig2 = 1 [Auto,Dirty]
0x7ffcd6f65d78/V- RooRealVar::x = 5
0x7ffcd6f64c90/V- RooRealVar::mean = 5
0x7ffcd6f635d0/V- RooRealVar::sigma2 = 1
0x7ffcd6f65078/V- RooRealVar::nsig = 495.799 +/- 39.2005