Logo ROOT   6.08/07
Reference Guide
ConfInterval.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_ConfInterval
12 #define ROOSTATS_ConfInterval
13 
14 #ifndef ROOT_TNamed
15 #include "TNamed.h"
16 #endif
17 
18 #ifndef ROO_ARG_SET
19 #include "RooArgSet.h"
20 #endif
21 
22 
23 
24 
25 
26 namespace RooStats {
27 
28 
29  /**
30 
31  ConfInterval is an interface class for a generic interval in the RooStats framework.
32  Any tool inheriting from IntervalCalculator can return a ConfInterval.
33  There are many types of intervals, they may be a simple range [a,b] in 1 dimension,
34  or they may be disconnected regions in multiple dimensions.
35  So the common interface is simply to ask the interval if a given point "IsInInterval".
36  The Interval also knows what confidence level it was constructed at and the space of
37  parameters for which it was constructed.
38  Note, one could use the same class for a Bayesian "credible interval".
39 
40  \ingroup Roostats
41 
42  */
43 
44  class ConfInterval : public TNamed {
45 
46  public:
47 
48  /// constructor given name and title
49  explicit ConfInterval(const char* name = 0) : TNamed(name,name) {}
50 
51  /// destructor
52  virtual ~ConfInterval() {}
53 
54  /// operator=
56  if (&other==this) { return *this; }
57  TNamed::operator=(other);
58  return *this;
59  }
60 
61  /// check if given point is in the interval
62  virtual Bool_t IsInInterval(const RooArgSet&) const = 0;
63 
64  /// used to set confidence level. Keep pure virtual
65  virtual void SetConfidenceLevel(Double_t cl) = 0;
66 
67  /// return confidence level
68  virtual Double_t ConfidenceLevel() const = 0;
69 
70  /// return list of parameters of interest defining this interval (return a new cloned list)
71  virtual RooArgSet* GetParameters() const = 0;
72 
73  /// check if parameters are correct (i.e. they are the POI of this interval)
74  virtual Bool_t CheckParameters(const RooArgSet&) const = 0;
75 
76 
77  protected:
78 
79  ClassDef(ConfInterval,1) // Interface for Confidence Intervals
80 
81  };
82 }
83 
84 
85 #endif
virtual ~ConfInterval()
destructor
Definition: ConfInterval.h:52
ConfInterval(const char *name=0)
constructor given name and title
Definition: ConfInterval.h:49
virtual RooArgSet * GetParameters() const =0
return list of parameters of interest defining this interval (return a new cloned list) ...
virtual Bool_t IsInInterval(const RooArgSet &) const =0
check if given point is in the interval
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:254
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
virtual Bool_t CheckParameters(const RooArgSet &) const =0
check if parameters are correct (i.e. they are the POI of this interval)
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Definition: TNamed.cxx:42
ConfInterval & operator=(const ConfInterval &other)
operator=
Definition: ConfInterval.h:55
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 void SetConfidenceLevel(Double_t cl)=0
used to set confidence level. Keep pure virtual
virtual Double_t ConfidenceLevel() const =0
return confidence level
char name[80]
Definition: TGX11.cxx:109