Logo ROOT   6.08/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 #ifndef ROOT_Rtypes
17 #include "Rtypes.h"
18 #endif
19 
20 //#include "TNamed.h"
21 
22 class RooAbsData;
23 class RooWorkspace;
24 
25 namespace RooStats {
26 
27  class ConfInterval;
28 
29  class ModelConfig;
30 
31 /**
32 
33 \ingroup Roostats
34 
35 IntervalCalculator is an interface class for a tools which produce RooStats
36 ConfIntervals. The interface currently assumes that any interval calculator can
37 be configured by specifying:
38 
39 * a model,
40 * a data set,
41 * a set of parameters of interest,
42 * a set of nuisance parameters (eg. parameters on which the model depends, but are not of interest), and
43 * a confidence level or size of the test (eg. rate of Type I error).
44 
45 The interface allows one to pass the model, data, and parameters via a workspace
46 and then specify them with names. The interface will be extended so that one does
47 not need to use a workspace.
48 
49 After configuring the calculator, one only needs to ask GetInterval, which will
50 return a ConfInterval pointer.
51 
52 The concrete implementations of this interface should deal with the details of
53 how the nuisance parameters are dealt with (eg. integration vs. profiling) and
54 which test-statistic is used (perhaps this should be added to the interface).
55 
56 The motivation for this interface is that we hope to be able to specify the
57 problem in a common way for several concrete calculators.
58 
59 */
60 
61 
63 
64  public:
65 
66  virtual ~IntervalCalculator() {}
67 
68  /// Main interface to get a ConfInterval, pure virtual
69  virtual ConfInterval* GetInterval() const = 0;
70 
71  /// Get the size of the test (eg. rate of Type I error)
72  virtual Double_t Size() const = 0;
73 
74  /// Get the Confidence level for the test
75  virtual Double_t ConfidenceLevel() const = 0;
76 
77  /// Set the DataSet ( add to the the workspace if not already there ?)
78  virtual void SetData(RooAbsData&) = 0;
79 
80  /// Set the Model
81  virtual void SetModel(const ModelConfig & /* model */) = 0;
82 
83  /// set the size of the test (rate of Type I error) ( e.g. 0.05 for a 95% Confidence Interval)
84  virtual void SetTestSize(Double_t size) = 0;
85 
86  /// set the confidence level for the interval (e.g. 0.95 for a 95% Confidence Interval)
87  virtual void SetConfidenceLevel(Double_t cl) = 0;
88 
89  protected:
90  ClassDef(IntervalCalculator,1) // Interface for tools setting limits (producing confidence intervals)
91  };
92 }
93 
94 
95 #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:52
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:254
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:44
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