#include <MarkovChainMC.h>
Public Member Functions | |
virtual void | applyOptions (const boost::program_options::variables_map &vm) |
MarkovChainMC () | |
virtual const std::string & | name () const |
bool | run (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 | |
virtual void | applyDefaultOptions () |
LimitAlgo () | |
LimitAlgo (const char *desc) | |
const boost::program_options::options_description & | options () const |
virtual void | setNToys (const int) |
virtual void | setToyNumber (const int) |
Private Types | |
enum | ProposalType { FitP, UniformP, MultiGaussianP, TestP } |
Private Member Functions | |
int | guessBurnInSteps (const RooStats::MarkovChain &chain) const |
void | limitAndError (double &limit, double &limitErr, const std::vector< double > &limits) const |
void | limitFromChain (double &limit, double &limitErr, const RooArgSet &poi, RooStats::MarkovChain &chain, int burnInSteps=-1) |
RooStats::MarkovChain * | mergeChains (const RooArgSet &poi, const std::vector< double > &limits) const |
void | readChains (const RooArgSet &poi, std::vector< double > &limits) |
int | runOnce (RooWorkspace *w, RooStats::ModelConfig *mc_s, RooStats::ModelConfig *mc_b, RooAbsData &data, double &limit, double &limitErr, const double *hint) const |
RooStats::MarkovChain * | slimChain (const RooArgSet &poi, const RooStats::MarkovChain &chain) const |
int | stationarityTest (const RooStats::MarkovChain &chain, const RooArgSet &poi, int nchunks) const |
note: this is still being developed More... | |
Private Attributes | |
TList | chains_ |
float | mass_ |
Mass of the Higgs boson (goes into the name of the saved chains) More... | |
int | modelNDF_ |
Number of degrees of freedom of the problem, approximately. More... | |
Static Private Attributes | |
static bool | adaptiveBurnIn_ = false |
Adaptive burn-in (experimental!) More... | |
static bool | adaptiveTruncation_ = true |
do adaptive truncated mean More... | |
static bool | alwaysStepPoi_ = true |
static float | burnInFraction_ = 0.25 |
Discard these fraction of points. More... | |
static unsigned int | burnInSteps_ = 200 |
Discard these points. More... | |
static float | cropNSigmas_ = 0 |
static int | debugProposal_ = false |
static float | hintSafetyFactor_ = 5. |
Safety factor for hint (integrate up to this number of times the hinted limit) More... | |
static unsigned int | iterations_ = 10000 |
Propose this number of points for the chain. More... | |
static bool | mergeChains_ = false |
Merge chains instead of averaging limits. More... | |
static bool | noReset_ = false |
static bool | noSlimChain_ = false |
Leave all parameters in the markov chain, not just the POI. More... | |
static unsigned int | numberOfBins_ |
static unsigned int | proposalHelperCacheSize_ |
static float | proposalHelperUniformFraction_ = 0.0 |
static float | proposalHelperWidthRangeDivisor_ = 5. |
static ProposalType | proposalType_ = TestP |
static std::string | proposalTypeName_ = "ortho" |
static bool | readChains_ = false |
Read chains from file instead of running them. More... | |
static bool | runMinos_ = false |
static bool | saveChain_ = false |
Save Markov Chain in output file. More... | |
static unsigned int | tries_ = 10 |
compute the limit N times More... | |
static float | truncatedMeanFraction_ = 0.0 |
Ignore up to this fraction of results if they're too far from the median. More... | |
static bool | updateHint_ = false |
static bool | updateProposalParams_ = false |
Additional Inherited Members | |
Protected Attributes inherited from LimitAlgo | |
boost::program_options::options_description | options_ |
Interface to RooStats MCMC, with handing of multiple chains
Definition at line 16 of file MarkovChainMC.h.
|
private |
Enumerator | |
---|---|
FitP | |
UniformP | |
MultiGaussianP | |
TestP |
Definition at line 26 of file MarkovChainMC.h.
MarkovChainMC::MarkovChainMC | ( | ) |
Definition at line 56 of file MarkovChainMC.cc.
References adaptiveBurnIn_, adaptiveTruncation_, alwaysStepPoi_, burnInFraction_, burnInSteps_, cropNSigmas_, debugProposal_, hintSafetyFactor_, iterations_, LimitAlgo::options_, proposalHelperUniformFraction_, proposalHelperWidthRangeDivisor_, proposalTypeName_, tries_, truncatedMeanFraction_, and updateProposalParams_.
|
virtual |
Reimplemented from LimitAlgo.
Definition at line 100 of file MarkovChainMC.cc.
References dtNoiseDBValidation_cfg::cerr, chains_, FitP, mass_, mergeChains_, MultiGaussianP, noReset_, noSlimChain_, LimitAlgo::options_, proposalType_, proposalTypeName_, readChains_, runMinos_, saveChain_, TestP, UniformP, and updateHint_.
|
private |
Definition at line 457 of file MarkovChainMC.cc.
References i, modelNDF_, n, mathSSE::sqrt(), and errorMatrix2Lands_multiChannel::start.
Referenced by limitFromChain(), mergeChains(), and runOnce().
|
private |
Definition at line 298 of file MarkovChainMC.cc.
References abs, adaptiveTruncation_, gather_cfg::cout, end, QuantileCalculator::Jacknife, gen::k, MessageLogger_cff::limit, max(), min, QuantileCalculator::quantileAndError(), QuantileCalculator::Sectioning, QuantileCalculator::Simple, python.multivaluedict::sort(), mathSSE::sqrt(), errorMatrix2Lands_multiChannel::start, std::swap(), and truncatedMeanFraction_.
Referenced by run().
|
private |
Definition at line 415 of file MarkovChainMC.cc.
References adaptiveBurnIn_, burnInFraction_, burnInSteps_, cl, guessBurnInSteps(), MergeJob_cfg::interval, mergeChains_, QuantileCalculator::quantileAndError(), and QuantileCalculator::Simple.
Referenced by readChains(), and run().
|
private |
Definition at line 351 of file MarkovChainMC.cc.
References adaptiveBurnIn_, burnInFraction_, burnInSteps_, chains_, gather_cfg::cout, guessBurnInSteps(), i, getHLTprescales::index, n, point, python.multivaluedict::sort(), and CommonMethods::weight().
Referenced by run().
|
inlinevirtual |
Implements LimitAlgo.
Definition at line 21 of file MarkovChainMC.h.
Referenced by BeautifulSoup.Tag::_invert().
|
private |
Definition at line 384 of file MarkovChainMC.cc.
References chains_, gather_cfg::cout, runtimedef::get(), gen::k, limitFromChain(), mass_, GetRecoTauVFromDQM_MC_cff::next, prof2calltree::prefix, readToysFromHere, and stationarityTest().
Referenced by run().
|
virtual |
Implements LimitAlgo.
Definition at line 124 of file MarkovChainMC.cc.
References dtNoiseDBValidation_cfg::cerr, cl, CloseCoutSentry::clear(), gather_cfg::cout, i, dtDQMClient_cfg::INFO, iterations_, MessageLogger_cff::limit, limitAndError(), limitFromChain(), mergeChains(), mergeChains_, modelNDF_, MultiGaussianP, proposalType_, alignCSCRings::r, readChains(), readChains_, runOnce(), tries_, UniformP, updateHint_, dqm::qstatus::WARNING, and withSystematics.
|
private |
Definition at line 184 of file MarkovChainMC.cc.
References adaptiveBurnIn_, alwaysStepPoi_, burnInFraction_, burnInSteps_, dtNoiseDBValidation_cfg::cerr, chains_, cl, CloseCoutSentry::clear(), gather_cfg::cout, cropNSigmas_, data, debugProposal_, FitP, guessBurnInSteps(), hintSafetyFactor_, i, iterations_, mass_, max(), mergeChains_, min, MultiGaussianP, n, noReset_, proposalHelperUniformFraction_, proposalHelperWidthRangeDivisor_, proposalType_, alignCSCRings::r, runMinos_, saveChain_, slimChain(), TestP, UniformP, updateProposalParams_, v, withSystematics, and writeToysHere.
Referenced by run().
|
private |
Definition at line 441 of file MarkovChainMC.cc.
References i, n, noSlimChain_, run_regression::ret, and CommonMethods::weight().
Referenced by runOnce().
|
private |
note: this is still being developed
Definition at line 482 of file MarkovChainMC.cc.
References trackerHits::c, data, python.tagInventory::entries, i, timingPdfMaker::mean, n, alignCSCRings::r, and python.multivaluedict::sort().
Referenced by readChains().
|
staticprivate |
Adaptive burn-in (experimental!)
Definition at line 37 of file MarkovChainMC.h.
Referenced by limitFromChain(), MarkovChainMC(), mergeChains(), and runOnce().
|
staticprivate |
do adaptive truncated mean
Definition at line 43 of file MarkovChainMC.h.
Referenced by limitAndError(), and MarkovChainMC().
|
staticprivate |
Definition at line 61 of file MarkovChainMC.h.
Referenced by MarkovChainMC(), and runOnce().
|
staticprivate |
Discard these fraction of points.
Definition at line 35 of file MarkovChainMC.h.
Referenced by limitFromChain(), MarkovChainMC(), mergeChains(), and runOnce().
|
staticprivate |
Discard these points.
Definition at line 33 of file MarkovChainMC.h.
Referenced by limitFromChain(), MarkovChainMC(), mergeChains(), and runOnce().
|
mutableprivate |
Definition at line 66 of file MarkovChainMC.h.
Referenced by applyOptions(), mergeChains(), readChains(), and runOnce().
|
staticprivate |
Definition at line 63 of file MarkovChainMC.h.
Referenced by MarkovChainMC(), and runOnce().
|
staticprivate |
Definition at line 64 of file MarkovChainMC.h.
Referenced by MarkovChainMC(), and runOnce().
|
staticprivate |
Safety factor for hint (integrate up to this number of times the hinted limit)
Definition at line 45 of file MarkovChainMC.h.
Referenced by MarkovChainMC(), and runOnce().
|
staticprivate |
Propose this number of points for the chain.
Definition at line 31 of file MarkovChainMC.h.
Referenced by MarkovChainMC(), run(), and runOnce().
|
private |
Mass of the Higgs boson (goes into the name of the saved chains)
Definition at line 55 of file MarkovChainMC.h.
Referenced by applyOptions(), readChains(), and runOnce().
|
staticprivate |
Merge chains instead of averaging limits.
Definition at line 51 of file MarkovChainMC.h.
Referenced by applyOptions(), limitFromChain(), run(), and runOnce().
|
private |
Number of degrees of freedom of the problem, approximately.
Definition at line 57 of file MarkovChainMC.h.
Referenced by guessBurnInSteps(), and run().
|
staticprivate |
Definition at line 29 of file MarkovChainMC.h.
Referenced by applyOptions(), and runOnce().
|
staticprivate |
Leave all parameters in the markov chain, not just the POI.
Definition at line 49 of file MarkovChainMC.h.
Referenced by applyOptions(), and slimChain().
|
staticprivate |
Definition at line 59 of file MarkovChainMC.h.
|
staticprivate |
Definition at line 60 of file MarkovChainMC.h.
|
staticprivate |
Definition at line 62 of file MarkovChainMC.h.
Referenced by MarkovChainMC(), and runOnce().
|
staticprivate |
Definition at line 62 of file MarkovChainMC.h.
Referenced by MarkovChainMC(), and runOnce().
|
staticprivate |
Definition at line 28 of file MarkovChainMC.h.
Referenced by applyOptions(), run(), and runOnce().
|
staticprivate |
Definition at line 27 of file MarkovChainMC.h.
Referenced by applyOptions(), and MarkovChainMC().
|
staticprivate |
Read chains from file instead of running them.
Definition at line 53 of file MarkovChainMC.h.
Referenced by applyOptions(), and run().
|
staticprivate |
Definition at line 29 of file MarkovChainMC.h.
Referenced by applyOptions(), and runOnce().
|
staticprivate |
Save Markov Chain in output file.
Definition at line 47 of file MarkovChainMC.h.
Referenced by applyOptions(), and runOnce().
|
staticprivate |
compute the limit N times
Definition at line 39 of file MarkovChainMC.h.
Referenced by MarkovChainMC(), and run().
|
staticprivate |
Ignore up to this fraction of results if they're too far from the median.
Definition at line 41 of file MarkovChainMC.h.
Referenced by limitAndError(), and MarkovChainMC().
|
staticprivate |
Definition at line 29 of file MarkovChainMC.h.
Referenced by applyOptions(), and run().
|
staticprivate |
Definition at line 29 of file MarkovChainMC.h.
Referenced by MarkovChainMC(), and runOnce().