CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/HiggsAnalysis/CombinedLimit/interface/ProfileLikelihood.h

Go to the documentation of this file.
00001 #ifndef HiggsAnalysis_CombinedLimit_ProfileLikelihood_h
00002 #define HiggsAnalysis_CombinedLimit_ProfileLikelihood_h
00003 
00011 #include "../interface/LimitAlgo.h"
00012 
00013 class RooAbsPdf; class RooRealVar; class RooAbsData; class RooArgSet;
00014 
00015 class ProfileLikelihood : public LimitAlgo {
00016 public:
00017   ProfileLikelihood() ;
00018   virtual bool run(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint);
00019   virtual const std::string & name() const {
00020     static const std::string name("ProfileLikelihood");
00021     return name;
00022   }
00023   virtual void applyOptions(const boost::program_options::variables_map &vm) ;
00024 
00026   class MinimizerSentry {
00027      public:
00028         MinimizerSentry(const std::string &algo, double tolerance);
00029         ~MinimizerSentry();
00030      private:
00031         std::string minimizerTypeBackup, minimizerAlgoBackup;
00032         double minimizerTollBackup;
00033   };
00034 
00035 protected:
00036   static std::string minimizerAlgo_, minimizerAlgoForBF_,;
00037   static float       minimizerTolerance_, minimizerToleranceForBF_;
00038 
00039   static bool useMinos_, bruteForce_;
00040   static std::string bfAlgo_;
00041   static int  points_;
00042 
00043   // ----- options for handling cases where the likelihood fit misbihaves ------
00045   static int         tries_;
00047   static int         maxTries_;
00049   static float       maxRelDeviation_;
00051   static float       maxOutlierFraction_;
00053   static int         maxOutliers_;
00055   static bool        preFit_;
00056 
00058   static bool reportPVal_;
00059 
00060   static float signalForSignificance_;
00061   static float mass_;
00062 
00063   static std::string plot_;
00064 
00065   bool runSignificance(RooWorkspace *w, RooStats::ModelConfig *mc, RooAbsData &data, double &limit, double &limitErr);
00066   bool runLimit(RooWorkspace *w, RooStats::ModelConfig *mc, RooAbsData &data, double &limit, double &limitErr);
00067 
00068   double upperLimitWithMinos(RooAbsPdf &pdf, RooAbsData &data, RooRealVar &poi, const RooArgSet *nuisances, double tolerance, double cl) const ;
00069   std::pair<double,double> upperLimitBruteForce(RooAbsPdf &pdf, RooAbsData &data, RooRealVar &poi, const RooArgSet *nuisances, double tolerance, double cl) const ;
00070   double significanceBruteForce(RooAbsPdf &pdf, RooAbsData &data, RooRealVar &poi, const RooArgSet *nuisances, double tolerance) const ;
00071   double significanceFromScan(RooAbsPdf &pdf, RooAbsData &data, RooRealVar &poi, const RooArgSet *nuisances, double tolerance, int npoints) const ;
00072 };
00073 
00074 #endif