29 using namespace RooFit;
30 using namespace RooStats;
66 for (i = 0; i < dim; i++) {
71 char* mu_name =
Form(
"mu_x%d",i);
72 mu_x =
new RooRealVar(mu_name, mu_name, 0, -2,2);
77 for (i = 0; i < nPOI; i++) {
78 poi.
add(*muVec.
at(i));
83 for (i = 0; i < dim; i++) {
84 for (j = 0; j < dim; j++) {
85 if (i == j) cov(i,j) = 3.;
139 TCanvas*
c1 =
new TCanvas();
149 Double_t ll = mcInt->LowerLimit(*p);
150 Double_t ul = mcInt->UpperLimit(*p);
151 cout <<
"MCMC interval: [" << ll <<
", " << ul <<
"]" << endl;
157 TCanvas* scatter =
new TCanvas();
158 Double_t ll = mcInt->LowerLimit(*p0);
159 Double_t ul = mcInt->UpperLimit(*p0);
160 cout <<
"MCMC interval on p0: [" << ll <<
", " << ul <<
"]" << endl;
161 ll = mcInt->LowerLimit(*p0);
162 ul = mcInt->UpperLimit(*p0);
163 cout <<
"MCMC interval on p1: [" << ll <<
", " << ul <<
"]" << endl;
ProposalFunction is an interface for all proposal functions that would be used with a Markov Chain Mo...
void Print(Option_t *option="") const
Print the real and cpu time passed between the start and stop events.
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...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void Draw(const Option_t *options=0)
draw the likelihood interval or contour for the 1D case a RooPlot is drawn by default of the profiled...
This class provides simple and straightforward utilities to plot a MCMCInterval object.
const RooArgList & floatParsFinal() const
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
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 void SetNumBurnInSteps(Int_t numBurnInSteps)
set the number of steps in the chain to discard as burn-in, starting from the first ...
virtual void SetNumBins(Int_t numBins)
set the number of bins to create for each axis when constructing the interval
void Draw(const Option_t *options=NULL)
virtual LikelihoodInterval * GetInterval() const
Return a likelihood interval.
virtual void SetConfidenceLevel(Double_t cl)
set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval) ...
virtual void SetPdf(const RooAbsPdf &pdf)
Set the Pdf, add to the the workspace if not already there.
void MultivariateGaussianTest(Int_t dim=4, Int_t nPOI=2)
RooRealVar represents a fundamental (non-derived) real valued object.
virtual void SetNumIters(Int_t numIters)
set the number of iterations to run the metropolis algorithm
virtual MCMCInterval * GetInterval() const
Main interface to get a ConfInterval.
virtual void SetCacheSize(Int_t size)
char * Form(const char *fmt,...)
void SetLineColor(Color_t color)
const TMatrixDSym & covarianceMatrix() const
Return covariance matrix.
void SetLineWidth(Int_t width)
static double p1(double t, double a, double b)
RooDataSet is a container class to hold unbinned data.
Multivariate Gaussian p.d.f.
RooAbsArg * at(Int_t idx) const
virtual void SetProposalFunction(ProposalFunction &proposalFunction)
set the proposal function for suggesting new points for the MCMC
void DrawChainScatter(RooRealVar &xVar, RooRealVar &yVar)
virtual void SetCovMatrix(const TMatrixDSym &covMatrix)
virtual void SetConfidenceLevel(Double_t cl)
set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval) ...
RooCmdArg Save(Bool_t flag=kTRUE)
RooDataSet * generate(const RooArgSet &whatVars, Int_t nEvents, const RooCmdArg &arg1, const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none())
Generate a new dataset containing the specified variables with events sampled from our distribution...
virtual RooFitResult * fitTo(RooAbsData &data, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Fit PDF to given dataset.
virtual void SetParametersOfInterest(const RooArgSet &set)
virtual void SetVariables(RooArgList &vars)
Bayesian Calculator estimating an interval or a credible region using the Markov-Chain Monte Carlo me...
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add element to non-owning set.
The RooWorkspace is a persistable container for RooFit projects.