Basic functionality: Calculating chi^2 from histograms and curves in RooPlots, making histogram of residual and pull distributions
{
std::unique_ptr<RooDataSet>
data{gauss.generate(
x, 10000)};
RooPlot *
frame1 =
x.frame(Title(
"Data with distorted Gaussian pdf"), Bins(40));
cout <<
"chi^2 = " <<
frame1->chiSquare() << endl;
TCanvas *
c =
new TCanvas(
"rf109_chi2residpull",
"rf109_chi2residpull", 900, 300);
gPad->SetLeftMargin(0.15);
frame1->GetYaxis()->SetTitleOffset(1.6);
gPad->SetLeftMargin(0.15);
frame2->GetYaxis()->SetTitleOffset(1.6);
gPad->SetLeftMargin(0.15);
frame3->GetYaxis()->SetTitleOffset(1.6);
}
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Graphical representation of binned data based on the TGraphAsymmErrors class.
Plot frame and a container for graphics objects within that frame.
Variable that can be changed from the outside.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
- Date
- July 2008
- Author
- Wouter Verkerke
Definition in file rf109_chi2residpull.C.