ROOT   Reference Guide
Searching...
No Matches
ConfInterval.h
Go to the documentation of this file.
1// @(#)root/roostats:$Id$
2// Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
3/*************************************************************************
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#include "TNamed.h"
15
16#include "RooArgSet.h"
17
18namespace RooStats {
19
20
21/** \class ConfInterval
22 \ingroup Roostats
23
24ConfInterval is an interface class for a generic interval in the RooStats framework.
25Any tool inheriting from IntervalCalculator can return a ConfInterval.
26There are many types of intervals, they may be a simple range [a,b] in 1 dimension,
27or they may be disconnected regions in multiple dimensions.
28So the common interface is simply to ask the interval if a given point "IsInInterval".
29The Interval also knows what confidence level it was constructed at and the space of
30parameters for which it was constructed.
31Note, one could use the same class for a Bayesian "credible interval".
32
33*/
34
35 class ConfInterval : public TNamed {
36
37 public:
38
39 /// constructor given name and title
40 explicit ConfInterval(const char *name = nullptr) : TNamed(name,name) {}
41
42 /// operator=
44 if (&other==this) { return *this; }
45 TNamed::operator=(other);
46 return *this;
47 }
48
49 /// check if given point is in the interval
50 virtual bool IsInInterval(const RooArgSet&) const = 0;
51
52 /// used to set confidence level. Keep pure virtual
53 virtual void SetConfidenceLevel(double cl) = 0;
54
55 /// return confidence level
56 virtual double ConfidenceLevel() const = 0;
57
58 /// return list of parameters of interest defining this interval (return a new cloned list)
59 virtual RooArgSet* GetParameters() const = 0;
60
61 /// check if parameters are correct (i.e. they are the POI of this interval)
62 virtual bool CheckParameters(const RooArgSet&) const = 0;
63
64
65 protected:
66
67 ClassDefOverride(ConfInterval,1) // Interface for Confidence Intervals
68
69 };
70}
71
72
73#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
ConfInterval is an interface class for a generic interval in the RooStats framework.
virtual double ConfidenceLevel() const =0
return confidence level
virtual bool IsInInterval(const RooArgSet &) const =0
check if given point is in the interval
ConfInterval & operator=(const ConfInterval &other)
operator=
virtual bool CheckParameters(const RooArgSet &) const =0
check if parameters are correct (i.e. they are the POI of this interval)
virtual void SetConfidenceLevel(double cl)=0
used to set confidence level. Keep pure virtual
virtual RooArgSet * GetParameters() const =0
return list of parameters of interest defining this interval (return a new cloned list)
ConfInterval(const char *name=nullptr)
constructor given name and title
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Definition TNamed.cxx:51
Namespace for the RooStats classes.
Definition Asimov.h:19