CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/HiggsAnalysis/CombinedLimit/interface/BestFitSigmaTestStat.h

Go to the documentation of this file.
00001 #ifndef HiggsAnalysis_CombinedLimit_BestFitSigmaTestStat
00002 #define HiggsAnalysis_CombinedLimit_BestFitSigmaTestStat
00003 
00004 #include <memory>
00005 #include <vector>
00006 
00007 class RooMinimizer;
00008 #include <RooAbsPdf.h>
00009 #include <RooAbsData.h>
00010 #include <RooArgSet.h>
00011 #include <RooStats/TestStatistic.h>
00012 #include "../interface/RooSimultaneousOpt.h"
00013 #include "../interface/CachingNLL.h"
00014 
00015 class BestFitSigmaTestStat : public RooStats::TestStatistic {
00016     public:
00017         BestFitSigmaTestStat(const RooArgSet & observables,
00018                 RooAbsPdf &pdf, 
00019                 const RooArgSet *nuisances, 
00020                 const RooArgSet & params, int verbosity=0) ; 
00021 
00022         virtual Double_t Evaluate(RooAbsData& data, RooArgSet& nullPOI) ;
00023 
00024         virtual const TString GetVarName() const { return "mu-hat`"; }
00025 
00026         // Verbosity (default: 0)
00027         void setPrintLevel(Int_t level) { verbosity_ = level; }
00028     private:
00029 
00030         RooAbsPdf *pdf_;
00031         RooArgSet snap_, poi_, nuisances_; 
00032         std::auto_ptr<RooArgSet> params_;
00033         std::auto_ptr<RooAbsReal> nll_;
00034         Int_t verbosity_;
00035 
00036         // create NLL. if returns true, it can be kept, if false it should be deleted at the end of Evaluate
00037         bool createNLL(RooAbsPdf &pdf, RooAbsData &data) ;
00038         double minNLL(bool constrained, RooRealVar *r=0) ;
00039 }; // TestSimpleStatistics
00040 
00041 
00042 #endif