17 #ifndef ROO_GLOBAL_FUNC
29 #ifndef ROOSTATS_ModelConfig
32 #ifndef RooStats_RooStatsUtils
35 #ifndef ROOSTATS_MCMCCalculator
38 #ifndef ROOSTATS_MetropolisHastings
41 #ifndef ROOSTATS_MarkovChain
44 #ifndef RooStats_MCMCInterval
47 #ifndef ROOT_TIterator
50 #ifndef ROOSTATS_UniformProposal
53 #ifndef ROOSTATS_PdfProposal
62 using namespace RooFit;
63 using namespace RooStats;
67 MCMCCalculator::MCMCCalculator() :
134 if (a < 0 || a > 1) {
136 <<
"Fraction must be in the range [0, 1]. "
137 << a <<
"is not allowed." << endl;
154 <<
"Test size/Confidence level not set. Returning NULL." << endl;
159 bool useDefaultPropFunc = (
fPropFunc == 0);
172 delete constrainedParams;
179 if (dynamic_cast<PdfProposal*>(
fPropFunc)) {
198 MCMCInterval* interval =
new MCMCInterval(name,
fPOI, *chain);
200 interval->SetAxes(*
fAxes);
211 interval->SetDelta(
fDelta);
212 interval->SetConfidenceLevel(1.0 -
fSize);
214 if (useDefaultPropFunc)
delete fPropFunc;
215 if (usePriorPdf)
delete prodPdf;
virtual RooAbsReal * createNLL(RooAbsData &data, const RooLinkedList &cmdList)
Construct representation of -log(L) of PDFwith given dataset.
virtual void SetSign(enum FunctionSign sign)
MCMCCalculator()
default constructor
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
RooAbsPdf * GetPdf() const
get model PDF (return NULL if pdf has not been specified or does not exist)
const RooArgSet * GetConditionalObservables() const
get RooArgSet for conditional observables (return NULL if not existing)
RooProdPdf is an efficient implementation of a product of PDFs of the form.
virtual void SetType(enum FunctionType type)
virtual MarkovChain * ConstructChain()
const RooArgSet * GetNuisanceParameters() const
get RooArgSet containing the nuisance parameters (return NULL if not existing)
This class uses the Metropolis-Hastings algorithm to construct a Markov Chain of data points using Mo...
virtual void SetParameters(const RooArgSet &set)
virtual void SetNumIters(Int_t numIters)
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
ClassImp(RooStats::MCMCCalculator)
RooArgSet * getParameters(const RooAbsData *data, Bool_t stripDisconnected=kTRUE) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
virtual void SetFunction(RooAbsReal &function)
virtual void SetProposalFunction(ProposalFunction &proposalFunction)
virtual MCMCInterval * GetInterval() const
Main interface to get a ConfInterval.
virtual void SetTestSize(Double_t size)
set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval) ...
virtual void SetChainParameters(const RooArgSet &set)
virtual const char * GetName() const
Returns name of object.
RooAbsData is the common abstract base class for binned and unbinned datasets.
Stores the steps in a Markov Chain of points.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooArgSet fConditionalObs
ProposalFunction * fPropFunc
enum MCMCInterval::IntervalType fIntervalType
PdfProposal is a concrete implementation of the ProposalFunction interface.
void RemoveConstantParameters(RooArgSet *set)
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual void SetLeftSideTailFraction(Double_t a)
Set the left side tail fraction.
const RooArgSet * GetParametersOfInterest() const
get RooArgSet containing the parameter of interest (return NULL if not existing)
void SetBins(const RooAbsCollection &coll, Int_t numBins) const
RooAbsPdf * GetPriorPdf() const
get parameters prior pdf (return NULL if not existing)
RooCmdArg ConditionalObservables(const RooArgSet &set)
Bayesian Calculator estimating an interval or a credible region using the Markov-Chain Monte Carlo me...
virtual void SetModel(const ModelConfig &model)
Set the Model.
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add element to non-owning set.
RooCmdArg Constrain(const RooArgSet ¶ms)