12#ifndef RooStats_MCMCInterval
13#define RooStats_MCMCInterval
232 coutE(InputArguments) <<
"MCMCInterval::SetEpsilon will not allow "
233 <<
"negative epsilon value" << std::endl;
267 coutE(InputArguments) <<
"MCMCInterval::SetDelta will not allow "
268 <<
"negative delta value" << std::endl;
345 inline virtual double CalcConfLevel(
double cutoff,
double full);
#define ClassDefOverride(name, id)
virtual RooAbsArg * addClone(const RooAbsArg &var, bool silent=false)
Add a clone of the specified argument to list.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Container class to hold N-dimensional binned data.
Container class to hold unbinned data.
Generic N-dimensional implementation of a kernel estimation p.d.f.
Represents the product of a given set of RooAbsReal objects.
Variable that can be changed from the outside.
ConfInterval is an interface class for a generic interval in the RooStats framework.
Represents the Heaviside function.
MCMCInterval is a concrete implementation of the RooStats::ConfInterval interface.
virtual void CreateDataHist()
virtual bool GetUseKeys()
get whether we used kernel estimation to determine the interval
virtual void DetermineByDataHist()
virtual void DetermineShortestInterval()
virtual double GetActualConfidenceLevel()
virtual double GetKeysPdfCutoff() { return fKeysCutoff; }
double fKeysConfLevel
the actual conf level determined by keys
virtual void CreateVector(RooRealVar *param)
RooDataHist * fDataHist
the binned Markov Chain data
static constexpr const double DEFAULT_EPSILON
virtual double LowerLimitByDataHist(RooRealVar ¶m)
determine lower limit using histogram
double fDelta
topCutoff (a) considered == bottomCutoff (b) iff (std::abs(a - b) < std::abs(fDelta * (a + b)/2)); Th...
double fConfidenceLevel
Requested confidence level (eg. 0.95 for 95% CL)
TH1 * fHist
the binned Markov Chain data
virtual double UpperLimitBySparseHist(RooRealVar ¶m)
determine upper limit using histogram
virtual void SetUseSparseHist(bool useSparseHist)
set whether to use a sparse histogram.
enum IntervalType fIntervalType
virtual double UpperLimit(RooRealVar ¶m)
get the highest value of param that is within the confidence interval
RooRealVar * fCutoffVar
cutoff variable to use for integrating keys pdf
virtual void SetDelta(double delta)
kbelasco: The inner-workings of the class really should not be exposed like this in a comment,...
virtual RooFit::OwningPtr< RooDataSet > GetChainAsDataSet(RooArgSet *whichVars=nullptr)
Get a clone of the markov chain on which this interval is based as a RooDataSet.
virtual const RooDataSet * GetChainAsConstDataSet()
Get the markov chain on which this interval is based as a RooDataSet.
virtual enum IntervalType GetIntervalType()
Return the type of this interval.
virtual void SetAxes(RooArgList &axes)
Set which parameters go on which axis.
virtual void DetermineByKeys()
double fTFLower
lower limit of the tail-fraction interval
bool fUseSparseHist
whether to use sparse hist (vs. RooDataHist)
double fVecWeight
sum of weights of all entries in fVector
double fLeftSideTF
left side tail-fraction for interval
bool AcceptableConfLevel(double confLevel)
virtual void DetermineBySparseHist()
double GetKeysMax()
Determine the approximate maximum value of the Keys PDF.
RooProduct * fProduct
the (keysPdf * heaviside) product
virtual double LowerLimitBySparseHist(RooRealVar ¶m)
determine lower limit using histogram
bool WithinDeltaFraction(double a, double b)
double fKeysCutoff
cutoff keys pdf value to be in interval
virtual double LowerLimitShortest(RooRealVar ¶m)
get the lower limit of param in the shortest confidence interval Note that this works better for some...
virtual double LowerLimitTailFraction(RooRealVar ¶m)
determine lower limit of the lower confidence interval
virtual TH1 * GetPosteriorHist()
set the number of bins to use (same for all axes, for now) virtual void SetNumBins(Int_t numBins);
Int_t fDimension
number of variables
void SetConfidenceLevel(double cl) override
set the desired confidence level (see GetActualConfidenceLevel()) Note: calling this function trigger...
RooRealVar ** fAxes
array of pointers to RooRealVars representing the axes of the histogram fAxes[0] represents x-axis,...
virtual RooArgList * GetAxes()
return a list of RooRealVars representing the axes you own the returned RooArgList
virtual RooRealVar * GetWeightVar() const
Get a clone of the weight variable from the markov chain.
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 DetermineTailFractionInterval()
double fTFConfLevel
the actual conf level of tail-fraction interval
double fHistConfLevel
the actual conf level determined by hist
virtual void CreateSparseHist()
Heaviside * fHeaviside
the Heaviside function
double fFull
Value of intergral of fProduct.
virtual Int_t GetNumBurnInSteps()
get the number of steps in the chain to discard as burn-in,
virtual double UpperLimitByDataHist(RooRealVar ¶m)
determine upper limit using histogram
virtual void DetermineInterval()
virtual RooRealVar * GetNLLVar() const
Get a clone of the NLL variable from the markov chain.
virtual void SetUseKeys(bool useKeys)
set whether to use kernel estimation to determine the interval
virtual void SetEpsilon(double epsilon)
set the acceptable level or error for Keys interval determination
virtual const MarkovChain * GetChain()
Get the markov chain on which this interval is based You do not own the returned MarkovChain*.
virtual double CalcConfLevel(double cutoff, double full)
virtual double LowerLimitByHist(RooRealVar ¶m)
determine lower limit using histogram
static constexpr const double DEFAULT_DELTA
virtual double LowerLimit(RooRealVar ¶m)
get the lowest value of param that is within the confidence interval
virtual double UpperLimitShortest(RooRealVar ¶m)
get the upper limit of param in the confidence interval Note that this works better for some distribu...
THnSparse * fSparseHist
the binned Markov Chain data
virtual void SetIntervalType(enum IntervalType intervalType)
Set the type of interval to find.
virtual void SetHistStrict(bool isHistStrict)
whether the specified confidence level is a floor for the actual confidence level (strict),...
bool CheckParameters(const RooArgSet &point) const override
check if parameters are correct. (dummy implementation to start)
std::vector< Int_t > fVector
vector containing the Markov chain data
virtual double LowerLimitByKeys(RooRealVar ¶m)
determine lower limit in the shortest interval by using keys pdf
virtual RooProduct * GetPosteriorKeysProduct()
Get a clone of the (keyspdf * heaviside) product of the posterior.
double fTFUpper
upper limit of the tail-fraction interval
double fHistCutoff
cutoff bin size to be in interval
virtual void SetLeftSideTailFraction(double a)
set the left-side tail fraction for a tail-fraction interval
MarkovChain * fChain
the markov chain
RooArgSet * GetParameters() const override
return a set containing the parameters of this interval the caller owns the returned RooArgSet*
virtual double UpperLimitTailFraction(RooRealVar ¶m)
determine upper limit of the lower confidence interval
bool fIsHistStrict
whether the specified confidence level is a floor for the actual confidence level (strict),...
virtual RooNDKeysPdf * GetPosteriorKeysPdf()
Get a clone of the keys pdf of the posterior.
virtual double UpperLimitByHist(RooRealVar ¶m)
determine upper limit using histogram
virtual void CreateKeysPdf()
virtual double UpperLimitByKeys(RooRealVar ¶m)
determine upper limit in the shortest interval by using keys pdf
Int_t fNumBurnInSteps
number of steps to discard as burn in, starting from the first
virtual void CreateHist()
bool fUseKeys
whether to use kernel estimation
RooDataHist * fKeysDataHist
data hist representing product
virtual void SetShortestInterval()
RooArgSet fParameters
parameters of interest for this interval
bool IsInInterval(const RooArgSet &point) const override
determine whether this point is in the confidence interval
virtual void DetermineByHist()
double ConfidenceLevel() const override
get the desired confidence level (see GetActualConfidenceLevel())
virtual void SetChain(MarkovChain &chain)
Set the MarkovChain that this interval is based on.
virtual void SetParameters(const RooArgSet ¶meters)
Set the parameters of interest for this interval and change other internal data members accordingly.
virtual Int_t GetDimension() const
Get the number of parameters of interest in this interval.
virtual void CreateKeysDataHist()
RooNDKeysPdf * fKeysPdf
the kernel estimation pdf
virtual THnSparse * GetChainAsSparseHist(RooArgSet *whichVars=nullptr)
Get a clone of the markov chain on which this interval is based as a THnSparse.
virtual RooFit::OwningPtr< RooDataHist > GetChainAsDataHist(RooArgSet *whichVars=nullptr)
Get a clone of the markov chain on which this interval is based as a RooDataHist.
double fEpsilon
acceptable error for Keys interval determination
virtual double GetKeysPdfCutoff()
get the cutoff RooNDKeysPdf value for being considered in the confidence interval
virtual double GetHistCutoff()
get the cutoff bin height for being considered in the confidence interval
Stores the steps in a Markov Chain of points.
virtual RooRealVar * GetWeightVar() const
get a clone of the weight variable
virtual RooFit::OwningPtr< RooDataHist > GetAsDataHist(RooArgSet *whichVars=nullptr) const
get this MarkovChain as a RooDataHist whose entries contain the values of whichVars.
virtual RooFit::OwningPtr< RooDataSet > GetAsDataSet(RooArgSet *whichVars=nullptr) const
get this MarkovChain as a RooDataSet whose entries contain the values of whichVars.
virtual THnSparse * GetAsSparseHist(RooAbsCollection *whichVars=nullptr) const
Get a clone of the markov chain on which this interval is based as a sparse histogram.
virtual RooRealVar * GetNLLVar() const
get a clone of the NLL variable
virtual const RooDataSet * GetAsConstDataSet() const
TH1 is the base class of all histogram classes in ROOT.
Efficient multidimensional histogram.
T * OwningPtr
An alias for raw pointers for indicating that the return type of a RooFit function is an owning point...
Namespace for the RooStats classes.