31 using namespace RooFit ;
34 void rf607_fitresult()
44 RooRealVar sigma1(
"sigma1",
"width of gaussians",0.5,0.1,10) ;
45 RooRealVar sigma2(
"sigma2",
"width of gaussians",1,0.1,10) ;
56 RooRealVar sig1frac(
"sig1frac",
"fraction of component 1 in signal",0.8,0.,1.) ;
60 RooRealVar bkgfrac(
"bkgfrac",
"fraction of background",0.5,0.,1.) ;
98 RooPlot* frame =
new RooPlot(sigma1,sig1frac,0.45,0.60,0.65,0.90) ;
99 frame->
SetTitle(
"Covariance between sigma1 and sig1frac") ;
100 r->
plotOn(frame,sigma1,sig1frac,
"ME12ABHV") ;
108 cout <<
"EDM = " << r->
edm() << endl ;
109 cout <<
"-log(L) at minimum = " << r->
minNll() << endl ;
112 cout <<
"final value of floating parameters" << endl ;
116 cout <<
"correlation between sig1frac and a0 is " << r->
correlation(sig1frac,a0) << endl ;
117 cout <<
"correlation between bkgfrac and mean is " << r->
correlation(
"bkgfrac",
"mean") << endl ;
124 cout <<
"correlation matrix" << endl ;
126 cout <<
"covariance matrix" << endl ;
134 TFile
f(
"rf607_fitresult.root",
"RECREATE") ;
142 TCanvas* c =
new TCanvas(
"rf607_fitresult",
"rf607_fitresult",800,400) ;
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
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...
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
RooPlot * plotOn(RooPlot *frame, const RooAbsArg &par1, const RooAbsArg &par2, const char *options="ME") const
const RooArgList & floatParsFinal() const
R__EXTERN TStyle * gStyle
TH2 * correlationHist(const char *name="correlation_matrix") const
Return TH2D of correlation matrix.
void SetTitle(const char *name)
Set the title of the RooPlot to 'title'.
Double_t correlation(const RooAbsArg &par1, const RooAbsArg &par2) const
RooRealVar represents a fundamental (non-derived) real valued object.
void Print(Option_t *name="") const
Print the matrix as a table of elements.
Service class for 2-Dim histogram classes.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
const TMatrixDSym & covarianceMatrix() const
Return covariance matrix.
RooDataSet is a container class to hold unbinned data.
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
RooCmdArg Save(Bool_t flag=kTRUE)
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
Chebychev polynomial p.d.f.
const TMatrixDSym & correlationMatrix() const
Return correlation matrix ;.
void SetPalette(Int_t ncolors=kBird, Int_t *colors=0, Float_t alpha=1.)
See TColor::SetPalette.
RooAbsMoment * mean(RooRealVar &obs)
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.