'BASIC FUNCTIONALITY' RooFit tutorial macro #109
Calculating chi^2 from histograms and curves in RooPlots, making histogram of residual and pull distributions
␛[1mRooFit v3.60 -- Developed by Wouter Verkerke and David Kirkby␛[0m
Copyright (C) 2000-2013 NIKHEF, University of California & Stanford University
All rights reserved, please read http://roofit.sourceforge.net/license.txt
chi^2 = 2.63198
void rf109_chi2residpull()
{
cout <<
"chi^2 = " << frame1->
chiSquare() << endl ;
TCanvas*
c =
new TCanvas(
"rf109_chi2residpull",
"rf109_chi2residpull",900,300) ;
}
RooDataSet is a container class to hold unbinned data.
A RooHist is a graphical representation of binned data based on the TGraphAsymmErrors class.
A RooPlot is a plot frame and a container for graphics objects within that frame.
RooHist * residHist(const char *histname=0, const char *pdfname=0, bool normalize=false, bool useAverage=kFALSE) const
Return a RooHist containing the residuals of histogram 'histname' with respect to curve 'curvename'.
Double_t chiSquare(int nFitParam=0) const
Shortcut for RooPlot::chiSquare(const char* pdfname, const char* histname, int nFitParam=0)
RooHist * pullHist(const char *histname=0, const char *pdfname=0, bool useAverage=false) const
Uses residHist() and sets normalize=true.
void addPlotable(RooPlotable *plotable, Option_t *drawOptions="", Bool_t invisible=kFALSE, Bool_t refreshNorm=kFALSE)
Add the specified plotable object to our plot.
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...
RooConstVar & RooConst(Double_t val)
RooCmdArg DataError(Int_t)
RooCmdArg Bins(Int_t nbin)
static constexpr double gauss
- Author
- 07/2008 - Wouter Verkerke
Definition in file rf109_chi2residpull.C.