CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Asymptotic.h
Go to the documentation of this file.
1 #ifndef HiggsAnalysis_CombinedLimit_Asymptotic_h
2 #define HiggsAnalysis_CombinedLimit_Asymptotic_h
3 
11 #include "../interface/LimitAlgo.h"
12 #include "../interface/utils.h"
13 #include <memory>
14 class RooRealVar;
15 #include <RooAbsReal.h>
16 #include <RooArgSet.h>
17 #include <RooFitResult.h>
18 
19 class Asymptotic : public LimitAlgo {
20 public:
21  Asymptotic() ;
22  virtual void applyOptions(const boost::program_options::variables_map &vm) ;
23  virtual void applyDefaultOptions() ;
24 
25  virtual bool run(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint);
26  virtual bool runLimit(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint);
27  std::vector<std::pair<float,float> > runLimitExpected(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint) ;
28 
29  float findExpectedLimitFromCrossing(RooAbsReal &nll, RooRealVar *r, double rMin, double rMax, double nll0, double quantile) ;
30 
31  virtual const std::string& name() const { static std::string name_ = "Asymptotic"; return name_; }
32 private:
33  static double rAbsAccuracy_, rRelAccuracy_;
34  static std::string what_;
35  static bool qtilde_;
36  static bool picky_;
37  static bool noFitAsimov_;
38  static bool newExpected_;
39  static std::string minosAlgo_;
40  static std::string minimizerAlgo_;
41  static float minimizerTolerance_;
42  static int minimizerStrategy_;
43 
44  static double rValue_;
45 
47  mutable std::auto_ptr<RooArgSet> params_;
48  mutable std::auto_ptr<RooAbsReal> nllD_, nllA_;
49  //mutable std::auto_ptr<RooFitResult> fitFreeD_, fitFreeA_;
50  //mutable std::auto_ptr<RooFitResult> fitFixD_, fitFixA_;
52 
53  mutable double minNllD_, minNllA_;
55 
56  RooAbsData *asimovDataset(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data);
57  double getCLs(RooRealVar &r, double rVal, bool getAlsoExpected=false, double *limit=0, double *limitErr=0);
58 };
59 
60 #endif
std::auto_ptr< RooArgSet > params_
Definition: Asymptotic.h:47
double minNllD_
Definition: Asymptotic.h:53
static std::string minimizerAlgo_
Definition: Asymptotic.h:40
static std::string minosAlgo_
Definition: Asymptotic.h:39
static bool newExpected_
Definition: Asymptotic.h:38
RooArgSet snapGlobalObsAsimov
Definition: Asymptotic.h:54
static int minimizerStrategy_
Definition: Asymptotic.h:42
float findExpectedLimitFromCrossing(RooAbsReal &nll, RooRealVar *r, double rMin, double rMax, double nll0, double quantile)
Definition: Asymptotic.cc:349
virtual bool run(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint)
Definition: Asymptotic.cc:74
static float minimizerTolerance_
Definition: Asymptotic.h:41
utils::CheapValueSnapshot fitFixD_
Definition: Asymptotic.h:51
virtual void applyOptions(const boost::program_options::variables_map &vm)
Definition: Asymptotic.cc:55
utils::CheapValueSnapshot fitFixA_
Definition: Asymptotic.h:51
static bool noFitAsimov_
Definition: Asymptotic.h:37
std::auto_ptr< RooAbsReal > nllA_
Definition: Asymptotic.h:48
static double rRelAccuracy_
Definition: Asymptotic.h:33
static double rValue_
Definition: Asymptotic.h:44
RooAbsData * asimovDataset(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data)
Definition: Asymptotic.cc:542
static bool qtilde_
Definition: Asymptotic.h:35
static double rAbsAccuracy_
Definition: Asymptotic.h:33
virtual void applyDefaultOptions()
Definition: Asymptotic.cc:70
static bool picky_
Definition: Asymptotic.h:36
static std::string what_
Definition: Asymptotic.h:34
utils::CheapValueSnapshot fitFreeA_
Definition: Asymptotic.h:51
std::auto_ptr< RooAbsReal > nllD_
Definition: Asymptotic.h:48
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
bool hasFloatParams_
Definition: Asymptotic.h:46
virtual bool runLimit(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint)
Definition: Asymptotic.cc:103
utils::CheapValueSnapshot fitFreeD_
Definition: Asymptotic.h:51
double minNllA_
Definition: Asymptotic.h:53
RooArgSet snapGlobalObsData
Definition: Asymptotic.h:54
virtual const std::string & name() const
Definition: Asymptotic.h:31
std::vector< std::pair< float, float > > runLimitExpected(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint)
Definition: Asymptotic.cc:263
T w() const
double getCLs(RooRealVar &r, double rVal, bool getAlsoExpected=false, double *limit=0, double *limitErr=0)
Definition: Asymptotic.cc:203