Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-16 09:54:50

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_IntervalCalculator
0012 #define ROOSTATS_IntervalCalculator
0013 
0014 #include "Rtypes.h"
0015 
0016 class RooAbsData;
0017 class RooWorkspace;
0018 
0019 namespace RooStats {
0020 
0021    class ConfInterval;
0022 
0023    class ModelConfig;
0024 
0025 /** \class IntervalCalculator
0026     \ingroup Roostats
0027 
0028 IntervalCalculator is an interface class for a tools which produce RooStats
0029 ConfIntervals. The interface currently assumes that any interval calculator can
0030 be configured by specifying:
0031 
0032   - a model,
0033   - a data set,
0034   - a set of parameters of interest,
0035   - a set of nuisance parameters (eg. parameters on which the model depends, but are not of interest), and
0036   - a confidence level or size of the test (eg. rate of Type I error).
0037 
0038 The interface allows one to pass the model, data, and parameters via a workspace
0039 and then specify them with names. The interface will be extended so that one does
0040 not need to use a workspace.
0041 
0042 After configuring the calculator, one only needs to ask GetInterval, which will
0043 return a ConfInterval pointer.
0044 
0045 The concrete implementations of this interface should deal with the details of
0046 how the nuisance parameters are dealt with (eg. integration vs. profiling) and
0047 which test-statistic is used (perhaps this should be added to the interface).
0048 
0049 The motivation for this interface is that we hope to be able to specify the
0050 problem in a common way for several concrete calculators.
0051 
0052 */
0053 
0054 
0055    class IntervalCalculator {
0056 
0057    public:
0058 
0059       virtual ~IntervalCalculator() {}
0060 
0061       /// Main interface to get a ConfInterval, pure virtual
0062       virtual ConfInterval* GetInterval() const = 0;
0063 
0064       /// Get the size of the test (eg. rate of Type I error)
0065       virtual double Size() const = 0;
0066 
0067       /// Get the Confidence level for the test
0068       virtual double ConfidenceLevel()  const = 0;
0069 
0070       /// Set the DataSet ( add to the workspace if not already there ?)
0071       virtual void SetData(RooAbsData&) = 0;
0072 
0073       /// Set the Model
0074       virtual void SetModel(const ModelConfig & /* model */) = 0;
0075 
0076       /// set the size of the test (rate of Type I error) ( e.g. 0.05 for a 95% Confidence Interval)
0077       virtual void SetTestSize(double size) = 0;
0078 
0079       /// set the confidence level for the interval (e.g. 0.95 for a 95% Confidence Interval)
0080       virtual void SetConfidenceLevel(double cl) = 0;
0081 
0082    protected:
0083       ClassDef(IntervalCalculator,1)   // Interface for tools setting limits (producing confidence intervals)
0084    };
0085 }
0086 
0087 
0088 #endif