57 void MultivariateGaussianTest(
Int_t dim = 4,
Int_t nPOI = 2)
71 for (i = 0; i < dim; i++) {
76 char* mu_name =
Form(
"mu_x%d",i);
77 mu_x =
new RooRealVar(mu_name, mu_name, 0, -2,2);
82 for (i = 0; i < nPOI; i++) {
83 poi.
add(*muVec.
at(i));
88 for (i = 0; i < dim; i++) {
89 for (j = 0; j < dim; j++) {
90 if (i == j) cov(i,j) = 3.;
105 modelConfig.SetPdf(mvg);
106 modelConfig.SetParametersOfInterest(poi);
124 mc.SetConfidenceLevel(0.95);
125 mc.SetNumBurnInSteps(100);
126 mc.SetNumIters(10000);
128 mc.SetProposalFunction(*pdfProp);
135 plc.SetConfidenceLevel(0.95);
143 mcPlot.SetLineColor(
kGreen);
144 mcPlot.SetLineWidth(2);
154 cout <<
"MCMC interval: [" << ll <<
", " << ul <<
"]" << endl;
163 cout <<
"MCMC interval on p0: [" << ll <<
", " << ul <<
"]" << endl;
166 cout <<
"MCMC interval on p1: [" << ll <<
", " << ul <<
"]" << endl;
171 mcPlot.DrawChainScatter(*p0, *p1);
ProposalFunction is an interface for all proposal functions that would be used with a Markov Chain Mo...
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
const RooArgList & floatParsFinal() const
virtual Bool_t add(const RooAbsCollection &col, Bool_t silent=kFALSE)
Add a collection of arguments to this collection by calling add() for each element in the source coll...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
This class provides simple and straightforward utilities to plot a MCMCInterval object.
void Print(Option_t *option="") const
Print the real and cpu time passed between the start and stop events.
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
const TMatrixDSym & covarianceMatrix() const
Return covariance matrix.
virtual ProposalFunction * GetProposalFunction()
virtual void SetUpdateProposalParameters(Bool_t updateParams)
This class provides simple and straightforward utilities to plot a LikelihoodInterval object...
ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface class f...
virtual RooArgList * GetAxes()
return a list of RooRealVars representing the axes you own the returned RooArgList ...
RooRealVar represents a fundamental (non-derived) real valued object.
RooAbsArg * at(Int_t idx) const
virtual void SetCacheSize(Int_t size)
char * Form(const char *fmt,...)
static double p1(double t, double a, double b)
virtual Double_t UpperLimit(RooRealVar ¶m)
get the highest value of param that is within the confidence interval
RooDataSet is a container class to hold unbinned data.
Multivariate Gaussian p.d.f.
Namespace for the RooStats classes.
virtual Double_t LowerLimit(RooRealVar ¶m)
get the lowest value of param that is within the confidence interval
virtual void SetCovMatrix(const TMatrixDSym &covMatrix)
RooCmdArg Save(Bool_t flag=kTRUE)
MCMCInterval is a concrete implementation of the RooStats::ConfInterval interface.
virtual void SetVariables(RooArgList &vars)
virtual void Update()
Update canvas pad buffers.
Bayesian Calculator estimating an interval or a credible region using the Markov-Chain Monte Carlo me...
The RooWorkspace is a persistable container for RooFit projects.