Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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  LikelihoodGradientJob
 
class  LikelihoodGradientWrapper
 Virtual base class for implementation of likelihood gradient calculation strategies. More...
 
class  LikelihoodJob
 
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  LikelihoodGradientMode { multiprocess }
 
enum class  LikelihoodMode { serial , multiprocess }
 
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::unique_ptr< RooAbsLbuildLikelihood (RooAbsPdf *pdf, RooAbsData *data, ConstrainedParameters constrained_parameters)
 
std::unique_ptr< RooAbsLbuildLikelihood (RooAbsPdf *pdf, RooAbsData *data, ConstrainedParameters constrained_parameters, GlobalObservables global_observables)
 
std::unique_ptr< RooAbsLbuildLikelihood (RooAbsPdf *pdf, RooAbsData *data, ExternalConstraints external_constraints)
 
std::unique_ptr< RooAbsLbuildLikelihood (RooAbsPdf *pdf, RooAbsData *data, GlobalObservables global_observables)
 
std::unique_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::unique_ptr< RooAbsLbuildLikelihood (RooAbsPdf *pdf, RooAbsData *data, std::string global_observables_tag)
 
std::ostream & operator<< (std::ostream &out, const LikelihoodJob::update_state_mode value)
 

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

◆ LikelihoodGradientMode

Enumerator
multiprocess 

Definition at line 33 of file LikelihoodGradientWrapper.h.

◆ LikelihoodMode

Enumerator
serial 
multiprocess 

Definition at line 50 of file LikelihoodWrapper.h.

◆ LikelihoodType

Enumerator
unbinned 
binned 
subsidiary 
sum 

Definition at line 48 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 56 of file LikelihoodWrapper.h.

Function Documentation

◆ buildLikelihood() [1/6]

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

Definition at line 380 of file buildLikelihood.cxx.

◆ buildLikelihood() [2/6]

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

Definition at line 400 of file buildLikelihood.cxx.

◆ buildLikelihood() [3/6]

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

Definition at line 385 of file buildLikelihood.cxx.

◆ buildLikelihood() [4/6]

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

Definition at line 390 of file buildLikelihood.cxx.

◆ buildLikelihood() [5/6]

std::unique_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 349 of file buildLikelihood.cxx.

◆ buildLikelihood() [6/6]

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

Definition at line 395 of file buildLikelihood.cxx.

◆ operator<<()

std::ostream & RooFit::TestStatistics::operator<< ( std::ostream &  out,
const LikelihoodJob::update_state_mode  value 
)

Definition at line 233 of file LikelihoodJob.cxx.