Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:29:45

0001 // @(#)root/roostats:$Id$
0002 // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
0003 /*************************************************************************
0004  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
0005  * All rights reserved.                                                  *
0006  *                                                                       *
0007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0009  *************************************************************************/
0010 
0011 #ifndef ROOSTATS_HypoTestCalculator
0012 #define ROOSTATS_HypoTestCalculator
0013 
0014 #include "Rtypes.h"
0015 
0016 // class RooAbsPdf;
0017 class RooAbsData;
0018 // class RooArgSet;
0019 class RooWorkspace;
0020 
0021 
0022 namespace RooStats {
0023 
0024    class HypoTestResult;
0025 
0026    class ModelConfig;
0027 
0028 
0029 /** \class HypoTestCalculator
0030     \ingroup Roostats
0031 
0032 HypoTestCalculator is an interface class for a tools which produce RooStats
0033 HypoTestResults. The interface currently assumes that any hypothesis test
0034 calculator can be configured by specifying:
0035 
0036   - a model for the null,
0037   - a model for the alternate,
0038   - a data set,
0039   - a set of parameters of which specify the null (including values and const/non-const status), and
0040   - a set of parameters of which specify the alternate (including values and const/non-const status).
0041 
0042 The interface allows one to pass the model, data, and parameters via a workspace
0043 and then specify them with names. The interface will be extended so that one does
0044 not need to use a workspace.
0045 
0046 After configuring the calculator, one only needs to ask GetHypoTest, which will
0047 return a HypoTestResult pointer.
0048 
0049 The concrete implementations of this interface should deal with the details of
0050 how the nuisance parameters are dealt with (eg. integration vs. profiling) and
0051 which test-statistic is used (perhaps this should be added to the interface).
0052 
0053 The motivation for this interface is that we hope to be able to specify the
0054 problem in a common way for several concrete calculators.
0055 
0056 */
0057 
0058 
0059    class HypoTestCalculator {
0060 
0061    public:
0062 
0063 
0064       virtual ~HypoTestCalculator() {}
0065 
0066       /// main interface to get a HypoTestResult, pure virtual
0067       virtual HypoTestResult* GetHypoTest() const = 0;
0068 
0069       /// Set a common model for both the null and alternate, add to the workspace if not already there
0070       virtual void SetCommonModel(const ModelConfig& model) {
0071          SetNullModel(model);
0072          SetAlternateModel(model);
0073       }
0074 
0075       /// Set the model for the null hypothesis
0076       virtual void SetNullModel(const ModelConfig& model) = 0;
0077       /// Set the model for the alternate hypothesis
0078       virtual void SetAlternateModel(const ModelConfig& model) = 0;
0079       /// Set the DataSet
0080       virtual void SetData(RooAbsData& data) = 0;
0081 
0082 
0083    protected:
0084       ClassDef(HypoTestCalculator,1)  // Interface for tools doing hypothesis tests
0085    };
0086 }
0087 
0088 
0089 #endif