'LIKELIHOOD AND MINIMIZATION' RooFit tutorial macro #607
Demonstration of options of the RooFitResult class
Processing /mnt/build/workspace/root-makedoc-v608/rootspi/rdoc/src/v6-08-00-patches/tutorials/roofit/rf607_fitresult.C...
void rf607_fitresult()
{
RooRealVar mean(
"mean",
"mean of gaussians",5,-10,10) ;
RooRealVar sigma1(
"sigma1",
"width of gaussians",0.5,0.1,10) ;
RooRealVar sigma2(
"sigma2",
"width of gaussians",1,0.1,10) ;
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 bkgfrac(
"bkgfrac",
"fraction of background",0.5,0.,1.) ;
frame->
SetTitle(
"Covariance between sigma1 and sig1frac") ;
r->
plotOn(frame,sigma1,sig1frac,
"ME12ABHV") ;
cout <<
"EDM = " << r->
edm() << endl ;
cout <<
"-log(L) at minimum = " << r->
minNll() << endl ;
cout << "final value of floating parameters" << endl ;
cout <<
"correlation between sig1frac and a0 is " << r->
correlation(sig1frac,a0) << endl ;
cout <<
"correlation between bkgfrac and mean is " << r->
correlation(
"bkgfrac",
"mean") << endl ;
cout << "correlation matrix" << endl ;
cout << "covariance matrix" << endl ;
TFile
f(
"rf607_fitresult.root",
"RECREATE") ;
f.Close() ;
TCanvas* c =
new TCanvas(
"rf607_fitresult",
"rf607_fitresult",800,400) ;
}
- Author
- 07/2008 - Wouter Verkerke
Definition in file rf607_fitresult.C.