Logo ROOT   6.12/07
Reference Guide
IntervalCalculator.h
Go to the documentation of this file.
1 // @(#)root/roostats:$Id$
2 // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
3 /*************************************************************************
4  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOSTATS_IntervalCalculator
12 #define ROOSTATS_IntervalCalculator
13 
14 
15 
16 #include "Rtypes.h"
17 
18 //#include "TNamed.h"
19 
20 class RooAbsData;
21 class RooWorkspace;
22 
23 namespace RooStats {
24 
25  class ConfInterval;
26 
27  class ModelConfig;
28 
29 /** \class IntervalCalculator
30  \ingroup Roostats
31 
32 IntervalCalculator is an interface class for a tools which produce RooStats
33 ConfIntervals. The interface currently assumes that any interval calculator can
34 be configured by specifying:
35 
36  - a model,
37  - a data set,
38  - a set of parameters of interest,
39  - a set of nuisance parameters (eg. parameters on which the model depends, but are not of interest), and
40  - a confidence level or size of the test (eg. rate of Type I error).
41 
42 The interface allows one to pass the model, data, and parameters via a workspace
43 and then specify them with names. The interface will be extended so that one does
44 not need to use a workspace.
45 
46 After configuring the calculator, one only needs to ask GetInterval, which will
47 return a ConfInterval pointer.
48 
49 The concrete implementations of this interface should deal with the details of
50 how the nuisance parameters are dealt with (eg. integration vs. profiling) and
51 which test-statistic is used (perhaps this should be added to the interface).
52 
53 The motivation for this interface is that we hope to be able to specify the
54 problem in a common way for several concrete calculators.
55 
56 */
57 
58 
60 
61  public:
62 
63  virtual ~IntervalCalculator() {}
64 
65  /// Main interface to get a ConfInterval, pure virtual
66  virtual ConfInterval* GetInterval() const = 0;
67 
68  /// Get the size of the test (eg. rate of Type I error)
69  virtual Double_t Size() const = 0;
70 
71  /// Get the Confidence level for the test
72  virtual Double_t ConfidenceLevel() const = 0;
73 
74  /// Set the DataSet ( add to the the workspace if not already there ?)
75  virtual void SetData(RooAbsData&) = 0;
76 
77  /// Set the Model
78  virtual void SetModel(const ModelConfig & /* model */) = 0;
79 
80  /// set the size of the test (rate of Type I error) ( e.g. 0.05 for a 95% Confidence Interval)
81  virtual void SetTestSize(Double_t size) = 0;
82 
83  /// set the confidence level for the interval (e.g. 0.95 for a 95% Confidence Interval)
84  virtual void SetConfidenceLevel(Double_t cl) = 0;
85 
86  protected:
87  ClassDef(IntervalCalculator,1) // Interface for tools setting limits (producing confidence intervals)
88  };
89 }
90 
91 
92 #endif
virtual void SetModel(const ModelConfig &)=0
Set the Model.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
Definition: ModelConfig.h:30
IntervalCalculator is an interface class for a tools which produce RooStats ConfIntervals.
virtual Double_t ConfidenceLevel() const =0
Get the Confidence level for the test.
virtual void SetData(RooAbsData &)=0
Set the DataSet ( add to the the workspace if not already there ?)
virtual Double_t Size() const =0
Get the size of the test (eg. rate of Type I error)
#define ClassDef(name, id)
Definition: Rtypes.h:320
RooAbsData is the common abstract base class for binned and unbinned datasets.
Definition: RooAbsData.h:37
virtual void SetTestSize(Double_t size)=0
set the size of the test (rate of Type I error) ( e.g. 0.05 for a 95% Confidence Interval) ...
ConfInterval is an interface class for a generic interval in the RooStats framework.
Definition: ConfInterval.h:35
Namespace for the RooStats classes.
Definition: Asimov.h:20
double Double_t
Definition: RtypesCore.h:55
virtual ConfInterval * GetInterval() const =0
Main interface to get a ConfInterval, pure virtual.
virtual void SetConfidenceLevel(Double_t cl)=0
set the confidence level for the interval (e.g. 0.95 for a 95% Confidence Interval) ...
The RooWorkspace is a persistable container for RooFit projects.
Definition: RooWorkspace.h:42