// @(#)root/roostats:$Id$
// 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_ConfInterval
#define ROOSTATS_ConfInterval

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

#ifndef ROO_ARG_SET
#include "RooArgSet.h"
#endif

//_________________________________________________________________
//
// BEGIN_HTML
// ConfInterval is an interface class for a generic interval in the RooStats framework.
// Any tool inheriting from IntervalCalculator can return a ConfInterval.
// There are many types of intervals, they may be a simple range [a,b] in 1 dimension,
// or they may be disconnected regions in multiple dimensions.
// So the common interface is simply to ask the interval if a given point "IsInInterval".
// The Interval also knows what confidence level it was constructed at and the space of 
// parameters for which it was constructed.
// Note, one could use the same class for a Bayesian "credible interval".
// END_HTML
//
//


namespace RooStats {

   class ConfInterval : public TNamed {

   public:

      // constructor given name and title 
      explicit ConfInterval(const char* name = 0) : TNamed(name,name) {} 

      // destructor
      virtual ~ConfInterval() {}

      // operator=
      ConfInterval& operator=(const ConfInterval& other) {
	if (&other==this) { return *this; }
	TNamed::operator=(other);
	return *this;
      }
    
      // check if given point is in the interval
      virtual Bool_t IsInInterval(const RooArgSet&) const = 0; 
    
      // used to set confidence level.  Keep pure virtual
      virtual void SetConfidenceLevel(Double_t cl) = 0;

      // return confidence level
      virtual Double_t ConfidenceLevel() const = 0;

      // return list of parameters of interest defining this interval (return a new cloned list)
      virtual RooArgSet* GetParameters() const = 0;

      // check if parameters are correct (i.e. they are the POI of this interval)
      virtual Bool_t CheckParameters(const RooArgSet&) const = 0;


   protected:

      ClassDef(ConfInterval,1) // Interface for Confidence Intervals

   };
}


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