1 #ifndef HiggsAnalysis_CombinedLimit_HybridNew_h
2 #define HiggsAnalysis_CombinedLimit_HybridNew_h
11 #include "../interface/LimitAlgo.h"
13 #include <RooStats/ModelConfig.h>
14 #include <RooStats/HybridCalculator.h>
15 #include <RooStats/ToyMCSampler.h>
24 virtual void applyOptions(
const boost::program_options::variables_map &vm) ;
27 virtual bool run(RooWorkspace *
w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &
data,
double &
limit,
double &limitErr,
const double *hint);
28 virtual bool runLimit(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data,
double &limit,
double &limitErr,
const double *hint);
29 virtual bool runSignificance(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data,
double &limit,
double &limitErr,
const double *hint);
30 virtual bool runSinglePoint(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data,
double &limit,
double &limitErr,
const double *hint);
31 virtual bool runTestStatistics(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data,
double &limit,
double &limitErr,
const double *hint);
32 virtual const std::string &
name()
const {
33 static const std::string
name(
"HybridNew");
84 std::auto_ptr<RooStats::TestStatistic>
qvar;
86 std::auto_ptr<RooStats::ProofConfig>
pc;
93 void setupPOI(RooStats::ModelConfig *mc_s) ;
96 std::pair<double,double>
eval(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data,
const RooAbsCollection & rVals,
bool adaptive=
false,
double clsTarget=-1) ;
98 std::pair<double,double>
eval(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data,
double rVal,
bool adaptive=
false,
double clsTarget=-1) ;
101 std::auto_ptr<RooStats::HybridCalculator>
create(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data,
const RooAbsCollection & rVals,
Setup &
setup);
103 std::auto_ptr<RooStats::HybridCalculator>
create(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data,
double rVal,
Setup &
setup);
105 std::pair<double,double>
eval(RooStats::HybridCalculator &hc,
const RooAbsCollection & rVals,
bool adaptive=
false,
double clsTarget=-1) ;
108 std::pair<double,double>
eval(
const RooStats::HypoTestResult &hcres,
const RooAbsCollection & rVals) ;
109 std::pair<double,double>
eval(
const RooStats::HypoTestResult &hcres,
double rVal) ;
114 RooStats::HypoTestResult *
evalGeneric(RooStats::HybridCalculator &hc,
bool forceNoFork=
false);
115 RooStats::HypoTestResult *
evalWithFork(RooStats::HybridCalculator &hc);
119 std::map<double, RooStats::HypoTestResult *>
grid_;
123 void updateGridData(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data,
bool smart,
double clsTarget);
124 void updateGridDataFC(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data,
bool smart,
double clsTarget);
125 std::pair<double,double>
updateGridPoint(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, std::map<double, RooStats::HypoTestResult *>::iterator
point);
std::auto_ptr< RooStats::ProofConfig > pc
static unsigned int iterations_
static bool importanceSamplingNull_
static unsigned int fork_
std::auto_ptr< RooStats::ToyMCSampler > toymcsampler
RooStats::ModelConfig modelConfig
RooStats::HypoTestResult * evalGeneric(RooStats::HybridCalculator &hc, bool forceNoFork=false)
virtual bool runSignificance(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint)
void updateGridDataFC(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, bool smart, double clsTarget)
virtual bool runLimit(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint)
static std::string rValue_
static float minimizerTolerance_
static double interpAccuracy_
static std::string minimizerAlgo_
static WorkingMode workingMode_
void applySignalQuantile(RooStats::HypoTestResult &hcres)
static bool saveHybridResult_
virtual const std::string & name() const
static double rAbsAccuracy_
static float quantileForExpectedFromGrid_
void updateGridData(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, bool smart, double clsTarget)
virtual void applyOptions(const boost::program_options::variables_map &vm)
void applyExpectedQuantile(RooStats::HypoTestResult &hcres)
std::auto_ptr< RooStats::TestStatistic > qvar
virtual bool run(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint)
std::pair< double, double > eval(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, const RooAbsCollection &rVals, bool adaptive=false, double clsTarget=-1)
generic version
std::map< double, RooStats::HypoTestResult * > grid_
static unsigned int nCpu_
virtual bool runTestStatistics(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint)
static unsigned int nToys_
static bool genGlobalObs_
static std::string testStat_
static bool optimizeProductPdf_
static bool noUpdateGrid_
void setupPOI(RooStats::ModelConfig *mc_s)
RooStats::HypoTestResult * readToysFromFile(const RooAbsCollection &rVals)
static std::string gridFile_
unsigned int perf_totalToysRun_
std::auto_ptr< TGraphErrors > limitPlot_
char data[epos_bytes_allocation]
static bool optimizeTestStatistics_
std::pair< double, double > updateGridPoint(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, std::map< double, RooStats::HypoTestResult * >::iterator point)
static bool genNuisances_
static double rRelAccuracy_
RooStats::ModelConfig modelConfig_bonly
static bool expectedFromGrid_
static bool newToyMCSampler_
void applyClsQuantile(RooStats::HypoTestResult &hcres)
void readGrid(TDirectory *directory, double rMin, double rMax)
virtual void applyDefaultOptions()
static bool clsQuantiles_
virtual bool runSinglePoint(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint)
static bool importanceSamplingAlt_
RooStats::HypoTestResult * evalWithFork(RooStats::HybridCalculator &hc)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
static bool fitNuisances_
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
static bool readHybridResults_
static RooArgSet rValues_
static double clsAccuracy_
std::auto_ptr< RooStats::HybridCalculator > create(RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, const RooAbsCollection &rVals, Setup &setup)
generic version