30void rf204a_extrangefit_RooAddPdf()
41 RooRealVar mean(
"mean",
"mean of gaussians",5) ;
42 RooRealVar sigma1(
"sigma1",
"width of gaussians",0.5) ;
43 RooRealVar sigma2(
"sigma2",
"width of gaussians",1) ;
45 RooGaussian sig1(
"sig1",
"Signal component 1",
x,mean,sigma1) ;
46 RooGaussian sig2(
"sig2",
"Signal component 2",
x,mean,sigma2) ;
54 RooRealVar sig1frac(
"sig1frac",
"fraction of component 1 in signal",0.8,0.,1.) ;
63 x.setRange(
"signalRange",4,6) ;
66 RooRealVar nsig(
"nsig",
"number of signal events in signalRange",500,0.,10000) ;
67 RooRealVar nbkg(
"nbkg",
"number of background events in signalRange",500,0,10000) ;
82 auto canv =
new TCanvas(
"Canvas",
"Canvas", 1500, 600);
103 model1.plotOn(frame);
104 model1.paramOn(frame);
112 x.setRange(
"left", 0., 4.);
113 x.setRange(
"right", 6., 10.);
122 RooPlot * frame2 =
x.frame(
Title(
"Fit in left/right sideband"));
125 model2.plotOn(frame2);
126 model2.paramOn(frame2);
136 x.setRange(
"leftToMiddle", 0., 5.);
140 Range(
"leftToMiddle"),
145 RooPlot * frame3 =
x.frame(
Title(
"Fit from left to middle"));
148 model3.plotOn(frame3);
149 model3.paramOn(frame3);
virtual RooPlot * plotOn(RooPlot *frame, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none()) const
Calls RooPlot* plotOn(RooPlot* frame, const RooLinkedList& cmdList) const ;.
RooAddPdf is an 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.
RooDataSet is a container class to hold unbinned data.
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.
A RooPlot is a plot frame and a container for graphics objects within that frame.
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.
RooRealVar represents a variable that can be changed from the outside.
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
RooCmdArg VisualizeError(const RooDataSet ¶mData, Double_t Z=1)
RooCmdArg Save(Bool_t flag=kTRUE)