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#include <string>
22
24public:
25
28 virtual ~RooChi2MCSModule() ;
29
31 Bool_t initializeRun(Int_t /*numSamples*/) ;
33 Bool_t processAfterFit(Int_t /*sampleNum*/) ;
34
35private:
36
37 RooDataSet* _data ; // Summary dataset to store results
38 RooRealVar* _chi2 ; // Chi^2 of function w.r.t. data
39 RooRealVar* _ndof ; // Number of degrees of freedom
40 RooRealVar* _chi2red ; // Reduced Chi^2 w.r.t data
41 RooRealVar* _prob ; // Probability of chi^2,nDOF combination
42
43 ClassDef(RooChi2MCSModule,0) // MCStudy module to calculate chi2 between binned data and fit
44} ;
45
46
47#endif
48
#define ClassDef(name, id)
Definition: Rtypes.h:322
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....
RooDataSet * finalizeRun()
Return auxiliary dataset with results of chi2 analysis calculations of this module so that it is merg...
Bool_t processAfterFit(Int_t)
Bin dataset and calculate chi2 of p.d.f w.r.t binned dataset.
RooRealVar * _chi2red
RooRealVar * _ndof
Bool_t initializeInstance()
Initialize module after attachment to RooMCStudy object.
Bool_t initializeRun(Int_t)
Initialize module at beginning of RooCMStudy run.
RooRealVar * _chi2
RooRealVar * _prob
virtual ~RooChi2MCSModule()
Destructor.
RooDataSet * _data
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:35