Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooChi2MCSModule.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitCore                                                       *
0004  *    File: $Id$
0005  * Authors:                                                                  *
0006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
0007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
0008  *                                                                           *
0009  * Copyright (c) 2000-2005, Regents of the University of California          *
0010  *                          and Stanford University. All rights reserved.    *
0011  *                                                                           *
0012  * Redistribution and use in source and binary forms,                        *
0013  * with or without modification, are permitted according to the terms        *
0014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0015  *****************************************************************************/
0016 
0017 #ifndef ROO_CHI2_MCS_MODULE
0018 #define ROO_CHI2_MCS_MODULE
0019 
0020 #include "RooAbsMCStudyModule.h"
0021 
0022 class RooChi2MCSModule : public RooAbsMCStudyModule {
0023 public:
0024 
0025   RooChi2MCSModule() ;
0026   RooChi2MCSModule(const RooChi2MCSModule& other) ;
0027   ~RooChi2MCSModule() override ;
0028 
0029   bool initializeInstance() override ;
0030   bool initializeRun(Int_t /*numSamples*/) override ;
0031   RooDataSet* finalizeRun() override ;
0032   bool processAfterFit(Int_t /*sampleNum*/) override  ;
0033 
0034 private:
0035 
0036   RooDataSet* _data = nullptr;    // Summary dataset to store results
0037   RooRealVar* _chi2 = nullptr;    // Chi^2 of function w.r.t. data
0038   RooRealVar* _ndof = nullptr;    // Number of degrees of freedom
0039   RooRealVar* _chi2red = nullptr; // Reduced Chi^2 w.r.t data
0040   RooRealVar* _prob = nullptr;    // Probability of chi^2,nDOF combination
0041 
0042   ClassDefOverride(RooChi2MCSModule,0) // MCStudy module to calculate chi2 between binned data and fit
0043 } ;
0044 
0045 
0046 #endif
0047