38 RooRealVar mean(
"mean",
"mean of gaussians", 5, -10, 10);
39 RooRealVar sigma1(
"sigma1",
"width of gaussians", 0.5, 0.1, 10);
40 RooRealVar sigma2(
"sigma2",
"width of gaussians", 1, 0.1, 10);
42 RooGaussian sig1(
"sig1",
"Signal component 1",
x, mean, sigma1);
43 RooGaussian sig2(
"sig2",
"Signal component 2",
x, mean, sigma2);
51 RooRealVar sig1frac(
"sig1frac",
"fraction of component 1 in signal", 0.8, 0., 1.);
55 RooRealVar bkgfrac(
"bkgfrac",
"fraction of background", 0.5, 0., 1.);
82 TH2 *hcorr =
r->correlationHist();
85 RooPlot *frame =
new RooPlot(sigma1, sig1frac, 0.45, 0.60, 0.65, 0.90);
86 frame->
SetTitle(
"Covariance between sigma1 and sig1frac");
87 r->plotOn(frame, sigma1, sig1frac,
"ME12ABHV");
93 cout <<
"EDM = " <<
r->edm() << endl;
94 cout <<
"-log(L) at minimum = " <<
r->minNll() << endl;
97 cout <<
"final value of floating parameters" << endl;
98 r->floatParsFinal().
Print(
"s");
101 cout <<
"correlation between sig1frac and a0 is " <<
r->correlation(sig1frac, a0) << endl;
102 cout <<
"correlation between bkgfrac and mean is " <<
r->correlation(
"bkgfrac",
"mean") << endl;
109 cout <<
"correlation matrix" << endl;
111 cout <<
"covariance matrix" << endl;
118 TFile f(
"rf607_fitresult.root",
"RECREATE");
125 TCanvas *
c =
new TCanvas(
"rf607_fitresult",
"rf607_fitresult", 800, 400);
128 gPad->SetLeftMargin(0.15);
132 gPad->SetLeftMargin(0.15);
R__EXTERN TStyle * gStyle
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.
A RooPlot is a plot frame and a container for graphics objects within that frame.
void SetTitle(const char *name)
Set the title of the RooPlot to 'title'.
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 SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
Service class for 2-D histogram classes.
void Print(Option_t *name="") const
Print the matrix as a table of elements.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
RooCmdArg Save(Bool_t flag=kTRUE)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...