#include <HybridNew.h>
Classes | |
struct | Setup |
Public Types | |
enum | WorkingMode { MakeLimit, MakeSignificance, MakePValues, MakeTestStatistics, MakeSignificanceTestStatistics } |
Public Member Functions | |
virtual void | applyDefaultOptions () |
virtual void | applyOptions (const boost::program_options::variables_map &vm) |
HybridNew () | |
virtual const std::string & | name () const |
virtual bool | run (RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint) |
virtual bool | runLimit (RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint) |
virtual bool | runSignificance (RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint) |
virtual bool | runSinglePoint (RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint) |
virtual bool | runTestStatistics (RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint) |
Public Member Functions inherited from LimitAlgo | |
LimitAlgo () | |
LimitAlgo (const char *desc) | |
const boost::program_options::options_description & | options () const |
virtual void | setNToys (const int) |
virtual void | setToyNumber (const int) |
virtual | ~LimitAlgo () |
Private Member Functions | |
void | applyClsQuantile (RooStats::HypoTestResult &hcres) |
void | applyExpectedQuantile (RooStats::HypoTestResult &hcres) |
void | applySignalQuantile (RooStats::HypoTestResult &hcres) |
void | clearGrid () |
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 More... | |
std::auto_ptr < RooStats::HybridCalculator > | create (RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double rVal, Setup &setup) |
specific version used in unidimensional searches (calls the generic one) More... | |
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 More... | |
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) |
specific version used in unidimensional searches (calls the generic one) More... | |
std::pair< double, double > | eval (RooStats::HybridCalculator &hc, const RooAbsCollection &rVals, bool adaptive=false, double clsTarget=-1) |
std::pair< double, double > | eval (const RooStats::HypoTestResult &hcres, const RooAbsCollection &rVals) |
std::pair< double, double > | eval (const RooStats::HypoTestResult &hcres, double rVal) |
RooStats::HypoTestResult * | evalGeneric (RooStats::HybridCalculator &hc, bool forceNoFork=false) |
RooStats::HypoTestResult * | evalWithFork (RooStats::HybridCalculator &hc) |
void | readGrid (TDirectory *directory, double rMin, double rMax) |
RooStats::HypoTestResult * | readToysFromFile (const RooAbsCollection &rVals) |
void | setupPOI (RooStats::ModelConfig *mc_s) |
void | updateGridData (RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, bool smart, double clsTarget) |
void | updateGridDataFC (RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, bool smart, double clsTarget) |
std::pair< double, double > | updateGridPoint (RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, std::map< double, RooStats::HypoTestResult * >::iterator point) |
void | useGrid () |
void | validateOptions () |
Private Attributes | |
std::map< double, RooStats::HypoTestResult * > | grid_ |
std::auto_ptr< TGraphErrors > | limitPlot_ |
float | mass_ |
unsigned int | perf_totalToysRun_ |
Static Private Attributes | |
static std::string | algo_ = "logSecant" |
static bool | CLs_ = false |
static double | clsAccuracy_ = 0.005 |
static bool | clsQuantiles_ = true |
static bool | expectedFromGrid_ = false |
static bool | fitNuisances_ = false |
static unsigned int | fork_ = 1 |
static bool | fullBToys_ = false |
static bool | fullGrid_ = false |
static bool | genGlobalObs_ = false |
static bool | genNuisances_ = true |
static std::string | gridFile_ = "" |
static bool | importanceSamplingAlt_ = false |
static bool | importanceSamplingNull_ = false |
static double | interpAccuracy_ = 0.2 |
static unsigned int | iterations_ = 1 |
static std::string | minimizerAlgo_ = "Minuit2" |
static float | minimizerTolerance_ = 1e-2 |
static unsigned int | nCpu_ = 0 |
static bool | newToyMCSampler_ = true |
static bool | noUpdateGrid_ = false |
static unsigned int | nToys_ = 500 |
static bool | optimizeProductPdf_ = true |
static bool | optimizeTestStatistics_ = true |
static std::string | plot_ |
static float | quantileForExpectedFromGrid_ = 0.5 |
static double | rAbsAccuracy_ = 0.1 |
static bool | readHybridResults_ = false |
static bool | reportPVal_ = false |
static bool | rMaxSet_ = false |
static bool | rMinSet_ = false |
static double | rRelAccuracy_ = 0.05 |
static std::string | rule_ = "CLs" |
static std::string | rValue_ = "1.0" |
static RooArgSet | rValues_ |
static bool | saveGrid_ = false |
static bool | saveHybridResult_ = false |
static std::string | testStat_ = "LEP" |
static WorkingMode | workingMode_ = MakeLimit |
Additional Inherited Members | |
Protected Attributes inherited from LimitAlgo | |
boost::program_options::options_description | options_ |
Module to compute limits by tossing toys (CLs, CLs+b, Feldman-Cousins), and related significances
Definition at line 21 of file HybridNew.h.
Enumerator | |
---|---|
MakeLimit | |
MakeSignificance | |
MakePValues | |
MakeTestStatistics | |
MakeSignificanceTestStatistics |
Definition at line 38 of file HybridNew.h.
HybridNew::HybridNew | ( | ) |
Definition at line 89 of file HybridNew.cc.
References algo_, clsAccuracy_, clsQuantiles_, fitNuisances_, fork_, genGlobalObs_, genNuisances_, gridFile_, interpAccuracy_, iterations_, minimizerAlgo_, minimizerTolerance_, nCpu_, newToyMCSampler_, nToys_, optimizeProductPdf_, optimizeTestStatistics_, LimitAlgo::options_, plot_, quantileForExpectedFromGrid_, rAbsAccuracy_, rRelAccuracy_, rule_, rValue_, and testStat_.
|
private |
New test implementation, scales as N*log(N)
Definition at line 1084 of file HybridNew.cc.
References CLs_, gather_cfg::cout, GOODCOLL_filter_cfg::cut, i, getHLTprescales::index, match(), n, quantileForExpectedFromGrid_, edm::second(), python.multivaluedict::sort(), and makeHLTPrescaleTable::values.
Referenced by applyExpectedQuantile().
|
virtual |
Reimplemented from LimitAlgo.
Definition at line 180 of file HybridNew.cc.
References MakeLimit, validateOptions(), and workingMode_.
|
private |
Definition at line 1068 of file HybridNew.cc.
References applyClsQuantile(), applySignalQuantile(), clsQuantiles_, gather_cfg::cout, expectedFromGrid_, MakeSignificance, MakeSignificanceTestStatistics, quantileForExpectedFromGrid_, python.multivaluedict::sort(), and workingMode_.
Referenced by eval(), runSignificance(), runTestStatistics(), and updateGridPoint().
|
virtual |
Reimplemented from LimitAlgo.
Definition at line 135 of file HybridNew.cc.
References dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, doSignificance_, expectedFromGrid_, fitNuisances_, fullBToys_, fullGrid_, g_quantileExpected_, genGlobalObs_, genNuisances_, MakeLimit, MakePValues, MakeSignificance, MakeSignificanceTestStatistics, MakeTestStatistics, mass_, noUpdateGrid_, quantileForExpectedFromGrid_, readHybridResults_, reportPVal_, rMaxSet_, rMinSet_, rValue_, saveGrid_, saveHybridResult_, testStat_, validateOptions(), withSystematics, and workingMode_.
|
private |
Definition at line 1162 of file HybridNew.cc.
References gather_cfg::cout, quantileForExpectedFromGrid_, and python.multivaluedict::sort().
Referenced by applyExpectedQuantile().
|
private |
Definition at line 1509 of file HybridNew.cc.
References grid_.
Referenced by readGrid().
|
private |
generic version
Background-only fit. In 1D case, can use model_s with POI set to zero, but in nD must use model_b.
Definition at line 639 of file HybridNew.cc.
References dtNoiseDBValidation_cfg::cerr, HybridNew::Setup::cleanupList, CLs_, createBeamHaloJobs::constraints, gather_cfg::cout, dqm::qstatus::ERROR, expectedFromGrid_, utils::factorizePdf(), fitNuisances_, fullBToys_, genGlobalObs_, genNuisances_, i, importanceSamplingAlt_, importanceSamplingNull_, instance, testEve_cfg::level, utils::makeNuisancePdf(), MakeSignificance, MakeSignificanceTestStatistics, HybridNew::Setup::modelConfig, HybridNew::Setup::modelConfig_bonly, nCpu_, newToyMCSampler_, nToys_, ProfiledLikelihoodTestStatOpt::oneSidedDef, optimizeProductPdf_, optimizeTestStatistics_, HybridNew::Setup::pc, quantileForExpectedFromGrid_, HybridNew::Setup::qvar, alignCSCRings::r, utils::setAllConstant(), ProfiledLikelihoodTestStatOpt::signFlipDef, testStat_, HybridNew::Setup::toymcsampler, ProfiledLikelihoodTestStatOpt::twoSidedDef, validate_alignment_devdb10_cfg::verbose, withSystematics, and workingMode_.
Referenced by create(), eval(), runSignificance(), runTestStatistics(), updateGridDataFC(), and updateGridPoint().
|
private |
specific version used in unidimensional searches (calls the generic one)
Definition at line 630 of file HybridNew.cc.
References create(), and alignCSCRings::r.
|
private |
generic version
Definition at line 587 of file HybridNew.cc.
References applyExpectedQuantile(), gather_cfg::cout, create(), EPS, expectedFromGrid_, limitPlot_, HybridNew::Setup::modelConfig_bonly, noUpdateGrid_, HybridNew::Setup::qvar, alignCSCRings::r, readHybridResults_, readToysFromFile(), query::result, run_regression::ret, HcalObjRepresent::setup(), and testStat_.
Referenced by eval(), runLimit(), runSinglePoint(), updateGridPoint(), and useGrid().
|
private |
specific version used in unidimensional searches (calls the generic one)
Definition at line 578 of file HybridNew.cc.
References eval(), and alignCSCRings::r.
|
private |
Definition at line 935 of file HybridNew.cc.
References applyExpectedQuantile(), alignmentValidation::c1, dtNoiseDBValidation_cfg::cerr, CLs_, clsAccuracy_, gather_cfg::cout, EPS, eval(), evalGeneric(), expectedFromGrid_, i, if(), iterations_, MakeLimit, mass_, max(), name(), nToys_, perf_totalToysRun_, plotResiduals::plot(), plot_, quantileForExpectedFromGrid_, saveHybridResult_, testStat_, workingMode_, and writeToysHere.
|
private |
Definition at line 1014 of file HybridNew.cc.
References eval().
|
private |
Definition at line 1020 of file HybridNew.cc.
References CLs_, data, EPS, i, max(), minimizerTolerance_, n, query::result, rule_, and testStat_.
|
private |
Definition at line 1170 of file HybridNew.cc.
References gather_cfg::cout, evalWithFork(), fork_, runtimedef::get(), and run_regression::ret.
Referenced by eval(), evalWithFork(), and runSignificance().
|
private |
Definition at line 1180 of file HybridNew.cc.
References gather_cfg::cout, evalGeneric(), f, fork_, max(), NULL, query::result, run_regression::ret, and createPayload::tmpfile.
Referenced by evalGeneric().
|
inlinevirtual |
Implements LimitAlgo.
Definition at line 32 of file HybridNew.h.
Referenced by eval(), readGrid(), and runSignificance().
|
private |
Definition at line 1345 of file HybridNew.cc.
References clearGrid(), gather_cfg::cout, grid_, gen::k, mass_, relval_steps::merge(), name(), GetRecoTauVFromDQM_MC_cff::next, point, and rValues_.
Referenced by runLimit().
|
private |
Definition at line 1293 of file HybridNew.cc.
References alignmentValidation::c1, gather_cfg::cout, gen::k, MakeLimit, mass_, GetRecoTauVFromDQM_MC_cff::next, plotResiduals::plot(), plot_, readToysFromHere, run_regression::ret, and workingMode_.
Referenced by eval(), runSignificance(), and runTestStatistics().
|
virtual |
Implements LimitAlgo.
Definition at line 251 of file HybridNew.cc.
References DEBUG, MakeLimit, MakePValues, MakeSignificance, MakeSignificanceTestStatistics, MakeTestStatistics, minimizerAlgo_, minimizerTolerance_, perf_totalToysRun_, runLimit(), runSignificance(), runSinglePoint(), runTestStatistics(), rValues_, setupPOI(), dqm::qstatus::WARNING, and workingMode_.
|
virtual |
Definition at line 318 of file HybridNew.cc.
References algo_, alignmentValidation::c1, dtNoiseDBValidation_cfg::cerr, cl, CLs_, Combine::commitPoint(), gather_cfg::cout, run_regression::done, eval(), fullGrid_, grid_, gridFile_, i, interpAccuracy_, j, MessageLogger_cff::limit, limitPlot_, geometryCSVtoXML::line, create_public_lumi_plots::log, lowerLimit_, max(), min, n, noUpdateGrid_, perf_totalToysRun_, plot_, alignCSCRings::r, rAbsAccuracy_, readGrid(), readHybridResults_, rMaxSet_, rMinSet_, rRelAccuracy_, rule_, saveGrid_, testStat_, updateGridData(), updateGridDataFC(), useGrid(), vdt::x, and detailsBasic3DVector::y.
Referenced by run().
|
virtual |
Definition at line 267 of file HybridNew.cc.
References applyExpectedQuantile(), dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, create(), EPS, evalGeneric(), expectedFromGrid_, i, iterations_, mass_, max(), name(), readHybridResults_, readToysFromFile(), reportPVal_, rValues_, saveHybridResult_, HcalObjRepresent::setup(), and writeToysHere.
Referenced by run().
|
virtual |
Definition at line 546 of file HybridNew.cc.
References CLs_, clsAccuracy_, gather_cfg::cout, eval(), if(), perf_totalToysRun_, query::result, and rValues_.
Referenced by run().
|
virtual |
Probably useless, but should double-check before deleting this.
Definition at line 556 of file HybridNew.cc.
References applyExpectedQuantile(), gather_cfg::cout, create(), expectedFromGrid_, MessageLogger_cff::limit, HybridNew::Setup::modelConfig_bonly, HybridNew::Setup::qvar, readHybridResults_, readToysFromFile(), query::result, rValues_, HcalObjRepresent::setup(), and testStat_.
Referenced by run().
|
private |
Definition at line 220 of file HybridNew.cc.
References NULL, rValue_, and rValues_.
Referenced by run().
|
private |
Definition at line 1379 of file HybridNew.cc.
References gather_cfg::cout, first, grid_, i, max(), n, point, updateGridPoint(), and makeHLTPrescaleTable::values.
Referenced by runLimit().
|
private |
Definition at line 1441 of file HybridNew.cc.
References gather_cfg::cout, create(), EPS, grid_, i, minimizerTolerance_, HybridNew::Setup::modelConfig_bonly, n, point, HybridNew::Setup::qvar, and HcalObjRepresent::setup().
Referenced by runLimit().
|
private |
Definition at line 1462 of file HybridNew.cc.
References applyExpectedQuantile(), CLs_, gather_cfg::cout, create(), EPS, eval(), expectedFromGrid_, HybridNew::Setup::modelConfig_bonly, HybridNew::Setup::qvar, alignCSCRings::r, HcalObjRepresent::setup(), and testStat_.
Referenced by updateGridData().
|
private |
Definition at line 1489 of file HybridNew.cc.
References CLs_, eval(), grid_, i, limitPlot_, and n.
Referenced by runLimit().
|
private |
Definition at line 185 of file HybridNew.cc.
References CLs_, gather_cfg::cout, fitNuisances_, fork_, MakeSignificance, MakeSignificanceTestStatistics, MakeTestStatistics, nToys_, readHybridResults_, reportPVal_, rule_, testStat_, and workingMode_.
Referenced by applyDefaultOptions(), and applyOptions().
|
staticprivate |
Definition at line 60 of file HybridNew.h.
Referenced by HybridNew(), and runLimit().
|
staticprivate |
Definition at line 43 of file HybridNew.h.
Referenced by applyClsQuantile(), create(), eval(), runLimit(), runSinglePoint(), updateGridPoint(), useGrid(), and validateOptions().
|
staticprivate |
Definition at line 42 of file HybridNew.h.
Referenced by eval(), HybridNew(), and runSinglePoint().
|
staticprivate |
Definition at line 52 of file HybridNew.h.
Referenced by applyExpectedQuantile(), and HybridNew().
|
staticprivate |
Definition at line 52 of file HybridNew.h.
Referenced by applyExpectedQuantile(), applyOptions(), create(), eval(), runSignificance(), runTestStatistics(), and updateGridPoint().
|
staticprivate |
Definition at line 46 of file HybridNew.h.
Referenced by applyOptions(), create(), HybridNew(), and validateOptions().
|
staticprivate |
Definition at line 58 of file HybridNew.h.
Referenced by evalGeneric(), evalWithFork(), HybridNew(), and validateOptions().
|
staticprivate |
Definition at line 54 of file HybridNew.h.
Referenced by applyOptions(), and create().
|
staticprivate |
Definition at line 55 of file HybridNew.h.
Referenced by applyOptions(), and runLimit().
|
staticprivate |
Definition at line 46 of file HybridNew.h.
Referenced by applyOptions(), create(), and HybridNew().
|
staticprivate |
Definition at line 46 of file HybridNew.h.
Referenced by applyOptions(), create(), and HybridNew().
|
private |
Definition at line 119 of file HybridNew.h.
Referenced by clearGrid(), readGrid(), runLimit(), updateGridData(), updateGridDataFC(), and useGrid().
|
staticprivate |
Definition at line 51 of file HybridNew.h.
Referenced by HybridNew(), and runLimit().
|
staticprivate |
Definition at line 59 of file HybridNew.h.
Referenced by create().
|
staticprivate |
Definition at line 59 of file HybridNew.h.
Referenced by create().
|
staticprivate |
Definition at line 42 of file HybridNew.h.
Referenced by HybridNew(), and runLimit().
|
staticprivate |
Definition at line 49 of file HybridNew.h.
Referenced by eval(), HybridNew(), and runSignificance().
|
private |
Definition at line 73 of file HybridNew.h.
Referenced by eval(), runLimit(), and useGrid().
|
private |
Definition at line 70 of file HybridNew.h.
Referenced by applyOptions(), eval(), readGrid(), readToysFromFile(), and runSignificance().
|
staticprivate |
Definition at line 62 of file HybridNew.h.
Referenced by HybridNew(), and run().
|
staticprivate |
Definition at line 63 of file HybridNew.h.
Referenced by eval(), HybridNew(), run(), and updateGridDataFC().
|
staticprivate |
Definition at line 58 of file HybridNew.h.
Referenced by create(), and HybridNew().
|
staticprivate |
Definition at line 67 of file HybridNew.h.
Referenced by create(), and HybridNew().
|
staticprivate |
Definition at line 57 of file HybridNew.h.
Referenced by applyOptions(), eval(), and runLimit().
|
staticprivate |
Definition at line 41 of file HybridNew.h.
Referenced by create(), eval(), HybridNew(), and validateOptions().
|
staticprivate |
Definition at line 65 of file HybridNew.h.
Referenced by create(), and HybridNew().
|
staticprivate |
Definition at line 66 of file HybridNew.h.
Referenced by create(), and HybridNew().
|
private |
Definition at line 76 of file HybridNew.h.
Referenced by eval(), run(), runLimit(), and runSinglePoint().
|
staticprivate |
Definition at line 61 of file HybridNew.h.
Referenced by eval(), HybridNew(), readToysFromFile(), and runLimit().
|
staticprivate |
Definition at line 53 of file HybridNew.h.
Referenced by applyClsQuantile(), applyExpectedQuantile(), applyOptions(), applySignalQuantile(), create(), eval(), and HybridNew().
|
staticprivate |
Definition at line 42 of file HybridNew.h.
Referenced by HybridNew(), and runLimit().
|
staticprivate |
Definition at line 50 of file HybridNew.h.
Referenced by applyOptions(), eval(), runLimit(), runSignificance(), runTestStatistics(), and validateOptions().
|
staticprivate |
Definition at line 45 of file HybridNew.h.
Referenced by applyOptions(), runSignificance(), and validateOptions().
|
staticprivate |
Definition at line 69 of file HybridNew.h.
Referenced by applyOptions(), and runLimit().
|
staticprivate |
Definition at line 68 of file HybridNew.h.
Referenced by applyOptions(), and runLimit().
|
staticprivate |
Definition at line 42 of file HybridNew.h.
Referenced by HybridNew(), and runLimit().
|
staticprivate |
Definition at line 44 of file HybridNew.h.
Referenced by eval(), HybridNew(), runLimit(), and validateOptions().
|
staticprivate |
Definition at line 47 of file HybridNew.h.
Referenced by applyOptions(), HybridNew(), and setupPOI().
|
staticprivate |
Definition at line 48 of file HybridNew.h.
Referenced by readGrid(), run(), runSignificance(), runSinglePoint(), runTestStatistics(), and setupPOI().
|
staticprivate |
Definition at line 56 of file HybridNew.h.
Referenced by applyOptions(), and runLimit().
|
staticprivate |
Definition at line 50 of file HybridNew.h.
Referenced by applyOptions(), eval(), and runSignificance().
|
staticprivate |
Definition at line 44 of file HybridNew.h.
Referenced by applyOptions(), create(), eval(), HybridNew(), runLimit(), runTestStatistics(), updateGridPoint(), and validateOptions().
|
staticprivate |
Definition at line 40 of file HybridNew.h.
Referenced by applyDefaultOptions(), applyExpectedQuantile(), applyOptions(), create(), eval(), readToysFromFile(), run(), and validateOptions().