Logo ROOT  
Reference Guide
RooFit::TestStatistics Namespace Reference

Namespace for new RooFit test statistic calculation. More...

Classes

class  ConstantTermsOptimizer
 Analyzes a function given a dataset/observables for constant terms and caches those in the dataset. More...
 
struct  ConstrainedParameters
 Optional parameter used in buildLikelihood(), see documentation there. More...
 
struct  ExternalConstraints
 Optional parameter used in buildLikelihood(), see documentation there. More...
 
struct  GlobalObservables
 Optional parameter used in buildLikelihood(), see documentation there. More...
 
class  LikelihoodGradientWrapper
 Virtual base class for implementation of likelihood gradient calculation strategies. More...
 
class  LikelihoodSerial
 Serial likelihood calculation strategy implementation. More...
 
class  LikelihoodWrapper
 Virtual base class for implementation of likelihood calculation strategies. More...
 
class  MinuitFcnGrad
 Minuit-RooMinimizer interface which synchronizes parameter data and coordinates evaluation of likelihood (gradient) values. More...
 
class  RooAbsL
 
class  RooBinnedL
 
class  RooRealL
 RooAbsReal that wraps RooAbsL likelihoods for use in RooFit outside of the RooMinimizer context. More...
 
class  RooSubsidiaryL
 
class  RooSumL
 Likelihood class that sums over multiple -log components. More...
 
class  RooUnbinnedL
 
struct  WrapperCalculationCleanFlags
 For communication with wrappers, an instance of this struct must be shared between them and MinuitFcnGrad. More...
 

Enumerations

enum class  LikelihoodType { unbinned , binned , subsidiary , sum }
 
enum class  OffsettingMode { legacy , full }
 Previously, offsetting was only implemented for RooNLLVar components of a likelihood, not for RooConstraintSum terms. More...
 

Functions

std::shared_ptr< RooAbsLbuildLikelihood (RooAbsPdf *pdf, RooAbsData *data, ConstrainedParameters constrained_parameters)
 
std::shared_ptr< RooAbsLbuildLikelihood (RooAbsPdf *pdf, RooAbsData *data, ConstrainedParameters constrained_parameters, GlobalObservables global_observables)
 
std::shared_ptr< RooAbsLbuildLikelihood (RooAbsPdf *pdf, RooAbsData *data, ExternalConstraints external_constraints)
 
std::shared_ptr< RooAbsLbuildLikelihood (RooAbsPdf *pdf, RooAbsData *data, GlobalObservables global_observables)
 
std::shared_ptr< RooAbsLbuildLikelihood (RooAbsPdf *pdf, RooAbsData *data, RooAbsL::Extended extended=RooAbsL::Extended::Auto, ConstrainedParameters constrained_parameters={}, ExternalConstraints external_constraints={}, GlobalObservables global_observables={}, std::string global_observables_tag={})
 
std::shared_ptr< RooAbsLbuildLikelihood (RooAbsPdf *pdf, RooAbsData *data, std::string global_observables_tag)
 

Detailed Description

Namespace for new RooFit test statistic calculation.

RooFit::TestStatistics contains a major refactoring of the RooAbsTestStatistic-RooAbsOptTestStatistic-RooNLLVar inheritance tree into:

  1. statistics-based classes on the one hand;
  2. calculation/evaluation/optimization based classes on the other hand.

The likelihood is the central unit on the statistics side. The RooAbsL class is implemented for four kinds of likelihoods: binned, unbinned, "subsidiary" (an optimization for numerical stability that gathers components like global observables) and "sum" (over multiple components of the other types). These classes provide ways to compute their components in parallelizable chunks that can be used by the calculator classes as they see fit.

On top of the likelihood classes, we also provide for convenience a likelihood builder buildLikelihood, as a free function in the namespace. This function analyzes the pdf and automatically constructs the proper likelihood, built up from the available RooAbsL subclasses.

The calculator "Wrapper" classes are abstract interfaces. These can be implemented for different kinds of algorithms, or with different kinds of optimization "back-ends" in mind. In an upcoming PR, we will introduce the fork-based multi-processing implementation based on RooFit::MultiProcess. Other possible implementations could use the GPU or external tools like TensorFlow.

The coupling of all these classes to RooMinimizer is made via the MinuitFcnGrad class, which owns the Wrappers that calculate the likelihood components.

Enumeration Type Documentation

◆ LikelihoodType

Enumerator
unbinned 
binned 
subsidiary 
sum 

Definition at line 39 of file LikelihoodWrapper.h.

◆ OffsettingMode

Previously, offsetting was only implemented for RooNLLVar components of a likelihood, not for RooConstraintSum terms.

To emulate this behavior, use OffsettingMode::legacy. To also offset the RooSubsidiaryL component (equivalent of RooConstraintSum) of RooSumL likelihoods, use OffsettingMode::full.

Enumerator
legacy 
full 

Definition at line 50 of file LikelihoodWrapper.h.

Function Documentation

◆ buildLikelihood() [1/6]

std::shared_ptr< RooAbsL > RooFit::TestStatistics::buildLikelihood ( RooAbsPdf pdf,
RooAbsData data,
ConstrainedParameters  constrained_parameters 
)

Definition at line 385 of file buildLikelihood.cxx.

◆ buildLikelihood() [2/6]

std::shared_ptr< RooAbsL > RooFit::TestStatistics::buildLikelihood ( RooAbsPdf pdf,
RooAbsData data,
ConstrainedParameters  constrained_parameters,
GlobalObservables  global_observables 
)

Definition at line 405 of file buildLikelihood.cxx.

◆ buildLikelihood() [3/6]

std::shared_ptr< RooAbsL > RooFit::TestStatistics::buildLikelihood ( RooAbsPdf pdf,
RooAbsData data,
ExternalConstraints  external_constraints 
)

Definition at line 390 of file buildLikelihood.cxx.

◆ buildLikelihood() [4/6]

std::shared_ptr< RooAbsL > RooFit::TestStatistics::buildLikelihood ( RooAbsPdf pdf,
RooAbsData data,
GlobalObservables  global_observables 
)

Definition at line 395 of file buildLikelihood.cxx.

◆ buildLikelihood() [5/6]

std::shared_ptr< RooAbsL > RooFit::TestStatistics::buildLikelihood ( RooAbsPdf pdf,
RooAbsData data,
RooAbsL::Extended  extended = RooAbsL::Extended::Auto,
ConstrainedParameters  constrained_parameters = {},
ExternalConstraints  external_constraints = {},
GlobalObservables  global_observables = {},
std::string  global_observables_tag = {} 
)

Definition at line 354 of file buildLikelihood.cxx.

◆ buildLikelihood() [6/6]

std::shared_ptr< RooAbsL > RooFit::TestStatistics::buildLikelihood ( RooAbsPdf pdf,
RooAbsData data,
std::string  global_observables_tag 
)

Definition at line 400 of file buildLikelihood.cxx.