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