11#ifndef ROOSTATS_BayesianCalculator
12#define ROOSTATS_BayesianCalculator
48 const RooArgSet* nuisanceParameters =
nullptr );
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
int Int_t
Signed integer 4 bytes (int).
#define ClassDefOverride(name, id)
Abstract base class for binned and unbinned datasets.
Abstract interface for all probability density functions.
Abstract base class for objects that represent a real value and implements functionality common to al...
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Plot frame and a container for graphics objects within that frame.
void SetShortestInterval()
set the Bayesian calculator to compute the shortest interval (default is central interval) to switch ...
void SetTestSize(double size) override
set the size of the test (rate of Type I error) ( Eg. 0.05 for a 95% Confidence Interval)
void SetBrfPrecision(double precision)
set the precision of the Root Finder
void ForceNuisancePdf(RooAbsPdf &pdf)
void SetConfidenceLevel(double cl) override
set the confidence level for the interval (eg. 0.95 for a 95% Confidence Interval)
ROOT::Math::IGenFunction * fPosteriorFunction
function representing the posterior
RooAbsReal * fLikelihood
internal pointer to likelihood function
virtual void SetConditionalObservables(const RooArgSet &set)
set the conditional observables which will be used when creating the NLL so the pdf's will not be nor...
double fNLLMin
minimum value of Nll
int fNumIterations
number of iterations (when using ToyMC)
RooAbsPdf * GetPosteriorPdf() const
return posterior pdf (object is managed by the user)
RooAbsData * fData
data set
RooPlot * GetPosteriorPlot(bool norm=false, double precision=0.01) const
get the plot with option to get it normalized
int fNScanBins
number of bins to scan, if = -1 no scan is done (default)
void ClearAll() const
clear all cached pdf objects
void SetScanOfPosterior(int nbin=100)
use directly the approximate posterior function obtained by binning it in nbins by default the cdf is...
void ComputeShortestInterval() const
compute the shortest interval from the histogram representing the posterior
RooAbsPdf * fNuisancePdf
nuisance pdf (needed when using nuisance sampling technique)
RooArgSet fConditionalObs
conditional observables
double fBrfPrecision
root finder precision
RooAbsReal * fIntegratedLikelihood
integrated likelihood function, i.e - unnormalized posterior function
void ApproximatePosterior() const
approximate posterior in nbins using a TF1 scan the poi values and evaluate the posterior at each poi...
double fSize
size used for getting the interval
void SetData(RooAbsData &data) override
Set the DataSet ( add to the workspace if not already there ?).
RooArgSet fNuisanceParameters
nuisance parameters
double fLeftSideFraction
fraction of probability content on left side of interval
RooArgSet fGlobalObs
global observables
virtual void SetNuisanceParameters(const RooArgSet &set)
specify the nuisance parameters (eg. the rest of the parameters)
double GetMode() const
return the mode (most probable value of the posterior function)
void SetLeftSideTailFraction(double leftSideFraction)
set the fraction of probability content on the left tail Central limits use 0.5 (default case) for up...
RooAbsPdf * fPdf
model pdf (could contain the nuisance pdf as constraint term)
virtual void SetGlobalObservables(const RooArgSet &set)
set the global observables which will be used when creating the NLL so the constraint pdf's will be n...
virtual void SetNumIters(Int_t numIters)
set the number of iterations when running a MC integration algorithm If not set use default algorithm...
double Size() const override
Get the size of the test (eg. rate of Type I error).
SimpleInterval * GetInterval() const override
compute the interval.
RooAbsPdf * fProductPdf
internal pointer to model * prior
virtual void SetPriorPdf(RooAbsPdf &pdf)
Set only the Prior Pdf.
TF1 * fApproxPosterior
TF1 representing the scanned posterior function.
RooAbsReal * GetPosteriorFunction() const
return posterior function (object is managed by the BayesianCalculator class)
virtual void SetParameters(const RooArgSet &set)
specify the parameters of interest in the interval
void SetIntegrationType(const char *type)
set the integration type (possible type are) :
RooAbsPdf * fPosteriorPdf
normalized (on the poi) posterior pdf
double fUpper
upper interval bound
double fLower
computer lower interval bound
TH1 * GetPosteriorHistogram() const
return the approximate posterior as histogram (TH1 object). Note the object is managed by the Bayesia...
void ComputeIntervalFromApproxPosterior(double c1, double c2) const
compute the interval using the approximate posterior function
BayesianCalculator()
constructor
void SetModel(const ModelConfig &model) override
set the model via the ModelConfig
RooAbsPdf * fPriorPdf
prior pdf (typically for the POI)
std::unique_ptr< RooAbsReal > fLogLike
internal pointer to log likelihood function
double ConfidenceLevel() const override
Get the Confidence level for the test.
~BayesianCalculator() override
destructor
void ComputeIntervalFromCdf(double c1, double c2) const
internal function compute the interval using Cdf integration
IntervalCalculator is an interface class for a tools which produce RooStats ConfIntervals.
< A class that holds configuration information for a model using a workspace as a store
SimpleInterval is a concrete implementation of the ConfInterval interface.
TH1 is the base class of all histogram classes in ROOT.
IBaseFunctionOneDim IGenFunction
Namespace for the RooStats classes.