Logo ROOT  
Reference Guide
RooChi2MCSModule.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id$
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16
17#ifndef ROO_CHI2_MCS_MODULE
18#define ROO_CHI2_MCS_MODULE
19
20#include "RooAbsMCStudyModule.h"
21
23public:
24
27 ~RooChi2MCSModule() override ;
28
29 bool initializeInstance() override ;
30 bool initializeRun(Int_t /*numSamples*/) override ;
31 RooDataSet* finalizeRun() override ;
32 bool processAfterFit(Int_t /*sampleNum*/) override ;
33
34private:
35
36 RooDataSet* _data ; // Summary dataset to store results
37 RooRealVar* _chi2 ; // Chi^2 of function w.r.t. data
38 RooRealVar* _ndof ; // Number of degrees of freedom
39 RooRealVar* _chi2red ; // Reduced Chi^2 w.r.t data
40 RooRealVar* _prob ; // Probability of chi^2,nDOF combination
41
42 ClassDefOverride(RooChi2MCSModule,0) // MCStudy module to calculate chi2 between binned data and fit
43} ;
44
45
46#endif
47
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
RooAbsMCStudyModule is a base class for add-on modules to RooMCStudy that can perform additional calc...
RooChi2MCSModule is an add-on module to RooMCStudy that calculates the chi-squared of fitted p....
~RooChi2MCSModule() override
Destructor.
RooRealVar * _chi2red
bool processAfterFit(Int_t) override
Bin dataset and calculate chi2 of p.d.f w.r.t binned dataset.
RooRealVar * _ndof
bool initializeRun(Int_t) override
Initialize module at beginning of RooCMStudy run.
RooRealVar * _chi2
RooRealVar * _prob
bool initializeInstance() override
Initialize module after attachment to RooMCStudy object.
RooDataSet * finalizeRun() override
Return auxiliary dataset with results of chi2 analysis calculations of this module so that it is merg...
RooDataSet * _data
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:55
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:40