ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SimpleInterval.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_SimpleInterval
12 #define RooStats_SimpleInterval
13 
14 #ifndef ROO_ARG_SET
15 #include "RooArgSet.h"
16 #endif
17 #ifndef RooStats_ConfInterval
18 #include "RooStats/ConfInterval.h"
19 #endif
20 
21 class RooRealVar;
22 
23 namespace RooStats {
24  class SimpleInterval : public ConfInterval {
25 
26  public:
27  // default constructors
28  explicit SimpleInterval(const char* name = 0);
29 
30  SimpleInterval(const SimpleInterval& other, const char* name);
31 
32  SimpleInterval& operator=(const SimpleInterval& other) ;
33 
34  // constructor from name, the Parameter of interest and lower/upper bound values
35  SimpleInterval(const char* name, const RooRealVar & var, Double_t lower, Double_t upper, Double_t cl);
36 
37  // destructor
38  virtual ~SimpleInterval();
39 
40  // check if parameter is in the interval
41  virtual Bool_t IsInInterval(const RooArgSet&) const;
42 
43  // set the confidence level for the interval. Simple interval is defined at construction time so this function
44  // has no effect
45  virtual void SetConfidenceLevel(Double_t ) {}
46 
47  // return the confidence interval
48  virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;}
49 
50  // return the interval lower limit
51  virtual Double_t LowerLimit() {return fLowerLimit;}
52  // return the interval upper limit
53  virtual Double_t UpperLimit() {return fUpperLimit;}
54 
55  // return a cloned list with the parameter of interest
56  virtual RooArgSet* GetParameters() const;
57 
58  // check if parameters are correct (i.e. they are the POI of this interval)
59  Bool_t CheckParameters(const RooArgSet&) const ;
60 
61 
62 
63  protected:
64 
65  ClassDef(SimpleInterval,1) // Concrete implementation of ConfInterval for simple 1-D intervals in the form [a,b]
66 
67  RooArgSet fParameters; // set containing the parameter of interest
68  Double_t fLowerLimit; // lower interval limit
69  Double_t fUpperLimit; // upper interval limit
70  Double_t fConfidenceLevel; // confidence level
71 
72  };
73 }
74 
75 #endif
virtual Double_t ConfidenceLevel() const
return confidence level
SimpleInterval(const char *name=0)
Default constructor.
bool Bool_t
Definition: RtypesCore.h:59
SimpleInterval & operator=(const SimpleInterval &other)
virtual void SetConfidenceLevel(Double_t)
used to set confidence level. Keep pure virtual
virtual Double_t LowerLimit()
RooRealVar represents a fundamental (non-derived) real valued object.
Definition: RooRealVar.h:37
Bool_t CheckParameters(const RooArgSet &) const
check if parameters are correct (i.e. they are the POI of this interval)
virtual ~SimpleInterval()
Destructor.
ConfInterval is an interface class for a generic interval in the RooStats framework.
Definition: ConfInterval.h:44
double Double_t
Definition: RtypesCore.h:55
virtual Bool_t IsInInterval(const RooArgSet &) const
check if given point is in the interval
ClassDef(SimpleInterval, 1) RooArgSet fParameters
virtual Double_t UpperLimit()
virtual RooArgSet * GetParameters() const
return cloned list of parameters