Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:29:44

0001 // @(#)root/roostats:$Id$
0002 // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
0003 /*************************************************************************
0004  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
0005  * All rights reserved.                                                  *
0006  *                                                                       *
0007  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0008  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0009  *************************************************************************/
0010 
0011 #ifndef ROOSTATS_ConfInterval
0012 #define ROOSTATS_ConfInterval
0013 
0014 #include "TNamed.h"
0015 
0016 #include "RooArgSet.h"
0017 
0018 namespace RooStats {
0019 
0020 
0021 /** \class ConfInterval
0022     \ingroup Roostats
0023 
0024 ConfInterval is an interface class for a generic interval in the RooStats framework.
0025 Any tool inheriting from IntervalCalculator can return a ConfInterval.
0026 There are many types of intervals, they may be a simple range [a,b] in 1 dimension,
0027 or they may be disconnected regions in multiple dimensions.
0028 So the common interface is simply to ask the interval if a given point "IsInInterval".
0029 The Interval also knows what confidence level it was constructed at and the space of
0030 parameters for which it was constructed.
0031 Note, one could use the same class for a Bayesian "credible interval".
0032 
0033 */
0034 
0035    class ConfInterval : public TNamed {
0036 
0037    public:
0038 
0039       /// constructor given name and title
0040       explicit ConfInterval(const char *name = nullptr) : TNamed(name,name) {}
0041 
0042       /// operator=
0043       ConfInterval& operator=(const ConfInterval& other) {
0044          if (&other==this) { return *this; }
0045          TNamed::operator=(other);
0046          return *this;
0047       }
0048 
0049       /// check if given point is in the interval
0050       virtual bool IsInInterval(const RooArgSet&) const = 0;
0051 
0052       /// used to set confidence level.  Keep pure virtual
0053       virtual void SetConfidenceLevel(double cl) = 0;
0054 
0055       /// return confidence level
0056       virtual double ConfidenceLevel() const = 0;
0057 
0058       /// return list of parameters of interest defining this interval (return a new cloned list)
0059       virtual RooArgSet* GetParameters() const = 0;
0060 
0061       /// check if parameters are correct (i.e. they are the POI of this interval)
0062       virtual bool CheckParameters(const RooArgSet&) const = 0;
0063 
0064 
0065    protected:
0066 
0067       ClassDefOverride(ConfInterval,1) // Interface for Confidence Intervals
0068 
0069    };
0070 }
0071 
0072 
0073 #endif