00001 // @(#)root/roostats:$Id: SimpleInterval.h 31285 2009-11-18 16:38:36Z moneta $ 00002 // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke 00003 /************************************************************************* 00004 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. * 00005 * All rights reserved. * 00006 * * 00007 * For the licensing terms see $ROOTSYS/LICENSE. * 00008 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00009 *************************************************************************/ 00010 00011 #ifndef RooStats_SimpleInterval 00012 #define RooStats_SimpleInterval 00013 00014 #ifndef ROO_ARG_SET 00015 #include "RooArgSet.h" 00016 #endif 00017 #ifndef RooStats_ConfInterval 00018 #include "RooStats/ConfInterval.h" 00019 #endif 00020 00021 class RooRealVar; 00022 00023 namespace RooStats { 00024 class SimpleInterval : public ConfInterval { 00025 00026 public: 00027 // default constructors 00028 explicit SimpleInterval(const char* name = 0); 00029 00030 // constructor from name, the Parameter of interest and lower/upper bound values 00031 SimpleInterval(const char* name, const RooRealVar & var, Double_t lower, Double_t upper, Double_t cl); 00032 00033 // destructor 00034 virtual ~SimpleInterval(); 00035 00036 // check if parameter is in the interval 00037 virtual Bool_t IsInInterval(const RooArgSet&) const; 00038 00039 // set the confidence level for the interval. Simple interval is defined at construction time so this function 00040 // has no effect 00041 virtual void SetConfidenceLevel(Double_t ) {} 00042 00043 // return the confidence interval 00044 virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;} 00045 00046 // return the interval lower limit 00047 virtual Double_t LowerLimit() {return fLowerLimit;} 00048 // return the interval upper limit 00049 virtual Double_t UpperLimit() {return fUpperLimit;} 00050 00051 // return a cloned list with the parameter of interest 00052 virtual RooArgSet* GetParameters() const; 00053 00054 // check if parameters are correct (i.e. they are the POI of this interval) 00055 Bool_t CheckParameters(const RooArgSet&) const ; 00056 00057 00058 00059 protected: 00060 00061 ClassDef(SimpleInterval,1) // Concrete implementation of ConfInterval for simple 1-D intervals in the form [a,b] 00062 00063 RooArgSet fParameters; // set containing the parameter of interest 00064 Double_t fLowerLimit; // lower interval limit 00065 Double_t fUpperLimit; // upper interval limit 00066 Double_t fConfidenceLevel; // confidence level 00067 00068 }; 00069 } 00070 00071 #endif