00001 // @(#)root/roostats:$Id: PointSetInterval.h 31276 2009-11-18 15:06:42Z 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_PointSetInterval 00012 #define RooStats_PointSetInterval 00013 00014 #ifndef ROO_ARG_SET 00015 #include "RooArgSet.h" 00016 #endif 00017 #ifndef ROO_TREE_DATA 00018 #include "RooAbsData.h" 00019 #endif 00020 #ifndef RooStats_ConfInterval 00021 #include "RooStats/ConfInterval.h" 00022 #endif 00023 00024 00025 namespace RooStats { 00026 00027 class PointSetInterval : public ConfInterval { 00028 00029 public: 00030 00031 // default constructors 00032 explicit PointSetInterval(const char* name = 0); 00033 00034 // constructor from name and data set specifying the interval points 00035 PointSetInterval(const char* name, RooAbsData&); 00036 00037 // destructor 00038 virtual ~PointSetInterval(); 00039 00040 00041 // check if parameter is in the interval 00042 virtual Bool_t IsInInterval(const RooArgSet&) const; 00043 00044 // set the confidence level for the interval 00045 virtual void SetConfidenceLevel(Double_t cl) {fConfidenceLevel = cl;} 00046 00047 // return the confidence level for the interval 00048 virtual Double_t ConfidenceLevel() const {return fConfidenceLevel;} 00049 00050 // Method to return lower limit on a given parameter 00051 // Double_t LowerLimit(RooRealVar& param) ; // could provide, but misleading? 00052 // Double_t UpperLimit(RooRealVar& param) ; // could provide, but misleading? 00053 00054 // return a cloned list with the parameter of interest 00055 virtual RooArgSet* GetParameters() const; 00056 00057 // return a copy of the data set (points) defining this interval 00058 RooAbsData* GetParameterPoints() const {return (RooAbsData*)fParameterPointsInInterval->Clone();} 00059 00060 // return a cloned list with the parameter of interest 00061 Bool_t CheckParameters(const RooArgSet&) const ; 00062 00063 // return lower limit on a given parameter 00064 Double_t LowerLimit(RooRealVar& param) ; 00065 00066 // return upper limit on a given parameter 00067 Double_t UpperLimit(RooRealVar& param) ; 00068 00069 00070 protected: 00071 00072 ClassDef(PointSetInterval,1) // Concrete implementation of ConfInterval for simple 1-D intervals in the form [a,b] 00073 00074 private: 00075 00076 // RooArgSet* fParameters; // parameter of interest 00077 Double_t fConfidenceLevel; // confidence level 00078 RooAbsData* fParameterPointsInInterval; // either a histogram (RooDataHist) or a tree (RooDataSet) 00079 00080 00081 }; 00082 } 00083 00084 #endif