Back to home page

EIC code displayed by LXR

 
 

    


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

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_SimpleInterval
0012 #define RooStats_SimpleInterval
0013 
0014 #include "RooArgSet.h"
0015 #include "RooStats/ConfInterval.h"
0016 
0017 class RooRealVar;
0018 
0019 namespace RooStats {
0020  class SimpleInterval : public ConfInterval {
0021 
0022   public:
0023     /// default constructor
0024     explicit SimpleInterval(const char *name = nullptr);
0025 
0026     /// default constructor
0027     SimpleInterval(const SimpleInterval& other, const char* name);
0028 
0029     /// default constructor
0030     SimpleInterval& operator=(const SimpleInterval& other) ;
0031 
0032     /// constructor from name, the Parameter of interest and lower/upper bound values
0033     SimpleInterval(const char* name, const RooRealVar & var, double lower, double upper, double cl);
0034 
0035     /// check if parameter is in the interval
0036     bool IsInInterval(const RooArgSet&) const override;
0037 
0038     /// set the confidence level for the interval. Simple interval is defined at construction time so this function
0039     /// has no effect
0040     void SetConfidenceLevel(double ) override {}
0041 
0042     /// return the confidence interval
0043     double ConfidenceLevel() const override {return fConfidenceLevel;}
0044 
0045     /// return the interval lower limit
0046     virtual double LowerLimit() {return fLowerLimit;}
0047     /// return the interval upper limit
0048     virtual double UpperLimit() {return fUpperLimit;}
0049 
0050     /// return a cloned list with the parameter of interest
0051     RooArgSet* GetParameters() const override;
0052 
0053     /// check if parameters are correct (i.e. they are the POI of this interval)
0054     bool CheckParameters(const RooArgSet&) const override ;
0055 
0056 
0057 
0058   protected:
0059 
0060     ClassDefOverride(SimpleInterval,1)  // Concrete implementation of ConfInterval for simple 1-D intervals in the form [a,b]
0061 
0062     RooArgSet fParameters;      ///< set containing the parameter of interest
0063     double  fLowerLimit;      ///< lower interval limit
0064     double  fUpperLimit;      ///< upper interval limit
0065     double  fConfidenceLevel; ///< confidence level
0066 
0067   };
0068 }
0069 
0070 #endif