37 RooRealVar mean(
"mean",
"mean of gaussians", 5, -10, 10);
38 RooRealVar sigma1(
"sigma1",
"width of gaussians", 0.5, 0.1, 10);
39 RooRealVar sigma2(
"sigma2",
"width of gaussians", 1, 0.1, 10);
41 RooGaussian sig1(
"sig1",
"Signal component 1",
x, mean, sigma1);
42 RooGaussian sig2(
"sig2",
"Signal component 2",
x, mean, sigma2);
50 RooRealVar sig1frac(
"sig1frac",
"fraction of component 1 in signal", 0.8, 0., 1.);
54 RooRealVar bkgfrac(
"bkgfrac",
"fraction of background", 0.5, 0., 1.);
81 TH2 *hcorr =
r->correlationHist();
84 RooPlot *frame =
new RooPlot(sigma1, sig1frac, 0.45, 0.60, 0.65, 0.90);
85 frame->
SetTitle(
"Covariance between sigma1 and sig1frac");
86 r->plotOn(frame, sigma1, sig1frac,
"ME12ABHV");
92 cout <<
"EDM = " <<
r->edm() << endl;
93 cout <<
"-log(L) at minimum = " <<
r->minNll() << endl;
96 cout <<
"final value of floating parameters" << endl;
97 r->floatParsFinal().
Print(
"s");
100 cout <<
"correlation between sig1frac and a0 is " <<
r->correlation(sig1frac, a0) << endl;
101 cout <<
"correlation between bkgfrac and mean is " <<
r->correlation(
"bkgfrac",
"mean") << endl;
108 cout <<
"correlation matrix" << endl;
110 cout <<
"covariance matrix" << endl;
117 TFile f(
"rf607_fitresult.root",
"RECREATE");
124 TCanvas *
c =
new TCanvas(
"rf607_fitresult",
"rf607_fitresult", 800, 400);
127 gPad->SetLeftMargin(0.15);
131 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 fundamental (non-derived) real valued object.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title Offset is a correction factor with respect to the "s...
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-Dim 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...
Template specialisation used in RooAbsArg:
RooCmdArg Save(Bool_t flag=kTRUE)