Logo ROOT  
Reference Guide
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 #include "RooArgSet.h"
15 #include "RooStats/ConfInterval.h"
16 
17 class RooRealVar;
18 
19 namespace RooStats {
20  class SimpleInterval : public ConfInterval {
21 
22  public:
23  // default constructors
24  explicit SimpleInterval(const char* name = 0);
25 
26  SimpleInterval(const SimpleInterval& other, const char* name);
27 
28  SimpleInterval& operator=(const SimpleInterval& other) ;
29 
30  // constructor from name, the Parameter of interest and lower/upper bound values
31  SimpleInterval(const char* name, const RooRealVar & var, Double_t lower, Double_t upper, Double_t cl);
32 
33  // destructor
34  virtual ~SimpleInterval();
35 
36  // check if parameter is in the interval
37  virtual Bool_t IsInInterval(const RooArgSet&) const;
38 
39  // set the confidence level for the interval. Simple interval is defined at construction time so this function
40  // has no effect
41  virtual void SetConfidenceLevel(Double_t ) {}
42 
43  // return the confidence interval
44  virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;}
45 
46  // return the interval lower limit
47  virtual Double_t LowerLimit() {return fLowerLimit;}
48  // return the interval upper limit
49  virtual Double_t UpperLimit() {return fUpperLimit;}
50 
51  // return a cloned list with the parameter of interest
52  virtual RooArgSet* GetParameters() const;
53 
54  // check if parameters are correct (i.e. they are the POI of this interval)
55  Bool_t CheckParameters(const RooArgSet&) const ;
56 
57 
58 
59  protected:
60 
61  ClassDef(SimpleInterval,1) // Concrete implementation of ConfInterval for simple 1-D intervals in the form [a,b]
62 
63  RooArgSet fParameters; // set containing the parameter of interest
64  Double_t fLowerLimit; // lower interval limit
65  Double_t fUpperLimit; // upper interval limit
66  Double_t fConfidenceLevel; // confidence level
67 
68  };
69 }
70 
71 #endif
RooStats::SimpleInterval::SimpleInterval
SimpleInterval(const char *name=0)
Default constructor.
Definition: SimpleInterval.cxx:44
RooStats::SimpleInterval::fLowerLimit
Double_t fLowerLimit
Definition: SimpleInterval.h:64
RooArgSet.h
RooStats::SimpleInterval::LowerLimit
virtual Double_t LowerLimit()
Definition: SimpleInterval.h:47
ConfInterval.h
RooStats::SimpleInterval::UpperLimit
virtual Double_t UpperLimit()
Definition: SimpleInterval.h:49
bool
RooStats::SimpleInterval
SimpleInterval is a concrete implementation of the ConfInterval interface.
Definition: SimpleInterval.h:20
RooStats::SimpleInterval::SetConfidenceLevel
virtual void SetConfidenceLevel(Double_t)
used to set confidence level. Keep pure virtual
Definition: SimpleInterval.h:41
RooStats::SimpleInterval::CheckParameters
Bool_t CheckParameters(const RooArgSet &) const
check if parameters are correct (i.e. they are the POI of this interval)
Definition: SimpleInterval.cxx:131
RooStats::SimpleInterval::ConfidenceLevel
virtual Double_t ConfidenceLevel() const
return confidence level
Definition: SimpleInterval.h:44
Double_t
double Double_t
Definition: RtypesCore.h:59
RooStats::SimpleInterval::operator=
SimpleInterval & operator=(const SimpleInterval &other)
Definition: SimpleInterval.cxx:66
RooStats
Namespace for the RooStats classes.
Definition: Asimov.h:19
RooStats::SimpleInterval::fUpperLimit
Double_t fUpperLimit
Definition: SimpleInterval.h:65
RooStats::SimpleInterval::IsInInterval
virtual Bool_t IsInInterval(const RooArgSet &) const
Method to determine if a parameter point is in the interval.
Definition: SimpleInterval.cxx:102
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
RooStats::SimpleInterval::GetParameters
virtual RooArgSet * GetParameters() const
return cloned list of parameters
Definition: SimpleInterval.cxx:124
name
char name[80]
Definition: TGX11.cxx:110
RooStats::SimpleInterval::fConfidenceLevel
Double_t fConfidenceLevel
Definition: SimpleInterval.h:66
RooStats::ConfInterval
ConfInterval is an interface class for a generic interval in the RooStats framework.
Definition: ConfInterval.h:35
RooStats::SimpleInterval::~SimpleInterval
virtual ~SimpleInterval()
Destructor.
Definition: SimpleInterval.cxx:95
RooRealVar
RooRealVar represents a variable that can be changed from the outside.
Definition: RooRealVar.h:39
RooStats::SimpleInterval::fParameters
RooArgSet fParameters
Definition: SimpleInterval.h:63
RooArgSet
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:29