ROOT logo
// @(#)root/roostats:$Id: IntervalCalculator.h 39391 2011-05-26 09:51:59Z moneta $
// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
/*************************************************************************
 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOSTATS_IntervalCalculator
#define ROOSTATS_IntervalCalculator

//_________________________________________________
/*
BEGIN_HTML
<p>
IntervalCalculator is an interface class for a tools which produce RooStats ConfIntervals.  
The interface currently assumes that any interval calculator can be configured by specifying:
<ul>
 <li>a model,</li>
 <li>a data set, </li>
 <li>a set of parameters of interest,</li>
 <li>a set of nuisance parameters (eg. parameters on which the model depends, but are not of interest), and </li>
 <li>a confidence level or size of the test (eg. rate of Type I error).</li>
</ul>
The interface allows one to pass the model, data, and parameters via a workspace and then specify them with names.
The interface will be extended so that one does not need to use a workspace.
</p>
<p>
After configuring the calculator, one only needs to ask GetInterval, which will return a ConfInterval pointer.
</p>
<p>
The concrete implementations of this interface should deal with the details of how the nuisance parameters are
dealt with (eg. integration vs. profiling) and which test-statistic is used (perhaps this should be added to the interface).
</p>
<p>
The motivation for this interface is that we hope to be able to specify the problem in a common way for several concrete calculators.
</p>
END_HTML
*/
//

#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif
//#include "TNamed.h"

class RooAbsData; 
class RooWorkspace; 

namespace RooStats {

   class ConfInterval; 

   class ModelConfig; 

   class IntervalCalculator { 

   public:

      virtual ~IntervalCalculator() {}
    
      // Main interface to get a ConfInterval, pure virtual
      virtual ConfInterval* GetInterval() const = 0; 

      // Get the size of the test (eg. rate of Type I error)
      virtual Double_t Size() const = 0;

      // Get the Confidence level for the test
      virtual Double_t ConfidenceLevel()  const = 0;  

      // Set the DataSet ( add to the the workspace if not already there ?)
      virtual void SetData(RooAbsData&) = 0;

      // Set the Model 
      virtual void SetModel(const ModelConfig & /* model */) = 0; 

      // set the size of the test (rate of Type I error) ( e.g. 0.05 for a 95% Confidence Interval)
      virtual void SetTestSize(Double_t size) = 0;

      // set the confidence level for the interval (e.g. 0.95 for a 95% Confidence Interval)
      virtual void SetConfidenceLevel(Double_t cl) = 0;
      
   protected:
      ClassDef(IntervalCalculator,1)   // Interface for tools setting limits (producing confidence intervals)
   };
}


#endif
 IntervalCalculator.h:1
 IntervalCalculator.h:2
 IntervalCalculator.h:3
 IntervalCalculator.h:4
 IntervalCalculator.h:5
 IntervalCalculator.h:6
 IntervalCalculator.h:7
 IntervalCalculator.h:8
 IntervalCalculator.h:9
 IntervalCalculator.h:10
 IntervalCalculator.h:11
 IntervalCalculator.h:12
 IntervalCalculator.h:13
 IntervalCalculator.h:14
 IntervalCalculator.h:15
 IntervalCalculator.h:16
 IntervalCalculator.h:17
 IntervalCalculator.h:18
 IntervalCalculator.h:19
 IntervalCalculator.h:20
 IntervalCalculator.h:21
 IntervalCalculator.h:22
 IntervalCalculator.h:23
 IntervalCalculator.h:24
 IntervalCalculator.h:25
 IntervalCalculator.h:26
 IntervalCalculator.h:27
 IntervalCalculator.h:28
 IntervalCalculator.h:29
 IntervalCalculator.h:30
 IntervalCalculator.h:31
 IntervalCalculator.h:32
 IntervalCalculator.h:33
 IntervalCalculator.h:34
 IntervalCalculator.h:35
 IntervalCalculator.h:36
 IntervalCalculator.h:37
 IntervalCalculator.h:38
 IntervalCalculator.h:39
 IntervalCalculator.h:40
 IntervalCalculator.h:41
 IntervalCalculator.h:42
 IntervalCalculator.h:43
 IntervalCalculator.h:44
 IntervalCalculator.h:45
 IntervalCalculator.h:46
 IntervalCalculator.h:47
 IntervalCalculator.h:48
 IntervalCalculator.h:49
 IntervalCalculator.h:50
 IntervalCalculator.h:51
 IntervalCalculator.h:52
 IntervalCalculator.h:53
 IntervalCalculator.h:54
 IntervalCalculator.h:55
 IntervalCalculator.h:56
 IntervalCalculator.h:57
 IntervalCalculator.h:58
 IntervalCalculator.h:59
 IntervalCalculator.h:60
 IntervalCalculator.h:61
 IntervalCalculator.h:62
 IntervalCalculator.h:63
 IntervalCalculator.h:64
 IntervalCalculator.h:65
 IntervalCalculator.h:66
 IntervalCalculator.h:67
 IntervalCalculator.h:68
 IntervalCalculator.h:69
 IntervalCalculator.h:70
 IntervalCalculator.h:71
 IntervalCalculator.h:72
 IntervalCalculator.h:73
 IntervalCalculator.h:74
 IntervalCalculator.h:75
 IntervalCalculator.h:76
 IntervalCalculator.h:77
 IntervalCalculator.h:78
 IntervalCalculator.h:79
 IntervalCalculator.h:80
 IntervalCalculator.h:81
 IntervalCalculator.h:82
 IntervalCalculator.h:83
 IntervalCalculator.h:84
 IntervalCalculator.h:85
 IntervalCalculator.h:86
 IntervalCalculator.h:87
 IntervalCalculator.h:88
 IntervalCalculator.h:89
 IntervalCalculator.h:90
 IntervalCalculator.h:91