CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FitterAlgoBase.h
Go to the documentation of this file.
1 #ifndef HiggsAnalysis_CombinedLimit_FitterAlgoBase_h
2 #define HiggsAnalysis_CombinedLimit_FitterAlgoBase_h
3 
11 #include "../interface/LimitAlgo.h"
12 #include "../interface/ProfileLikelihood.h"
13 class RooFitResult;
14 class RooMinimizer;
15 class RooCmdArg;
16 class RooAbsReal;
17 class RooArgList;
18 class CascadeMinimizer;
19 
20 class FitterAlgoBase : public LimitAlgo {
21 public:
22  FitterAlgoBase(const char *title="<FillMe> specific options") ;
23 
24  void applyOptionsBase(const boost::program_options::variables_map &vm) ;
25 
26  // configures the minimizer and then calls runSpecific
27  virtual bool run(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint);
28 
29 protected:
33 
34  static float preFitValue_;
35 
36  static bool robustFit_, do95_;
37  static float stepSize_;
38  static int maxFailedSteps_;
39 
40  static bool saveNLL_, keepFailures_;
41  static float nllValue_;
42  std::auto_ptr<RooAbsReal> nll;
43  // method that is implemented in the subclass
44  virtual bool runSpecific(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint) = 0;
45 
46  // utilities
50  RooFitResult *doFit(RooAbsPdf &pdf, RooAbsData &data, RooRealVar &r, const RooCmdArg &constrain, bool doHesse=true, int ndim=1,bool reuseNLL=false) ;
51  RooFitResult *doFit(RooAbsPdf &pdf, RooAbsData &data, const RooArgList &rs, const RooCmdArg &constrain, bool doHesse=true, int ndim=1,bool reuseNLL=false) ;
52  double findCrossing(CascadeMinimizer &minim, RooAbsReal &nll, RooRealVar &r, double level, double rStart, double rBound) ;
53 };
54 
55 
56 #endif
void applyOptionsBase(const boost::program_options::variables_map &vm)
static bool saveNLL_
static std::string minimizerAlgoForMinos_
static bool do95_
static float minimizerTolerance_
static float nllValue_
RooFitResult * doFit(RooAbsPdf &pdf, RooAbsData &data, RooRealVar &r, const RooCmdArg &constrain, bool doHesse=true, int ndim=1, bool reuseNLL=false)
static bool keepFailures_
static float stepSize_
static bool robustFit_
double findCrossing(CascadeMinimizer &minim, RooAbsReal &nll, RooRealVar &r, double level, double rStart, double rBound)
static float preFitValue_
std::auto_ptr< RooAbsReal > nll
static std::string minimizerAlgo_
static int minimizerStrategy_
FitterAlgoBase(const char *title="<FillMe> specific options")
virtual bool runSpecific(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint)=0
virtual bool run(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint)
static float minimizerToleranceForMinos_
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
static int maxFailedSteps_
static int minimizerStrategyForMinos_
tuple level
Definition: testEve_cfg.py:34
T w() const