Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
MarginalConfigFactory Class Reference

Builds distribution-configuration objects from parameters or observables. More...

#include <MarginalConfigFactory.h>

Public Member Functions

 MarginalConfigFactory (std::shared_ptr< IStatParameterProxy > parameter_proxy)
 Constructs the factory with its parameter-access port.
 
MarginalConfig create (ParamId pid, MarginalType marginal) const
 Builds a marginal configuration from a parameter identifier.
 
MarginalConfig create (ParamId pid, MarginalType marginal, const NuisanceSpec &spec) const
 Builds a parameter marginal while honoring an explicit nuisance specification.
 
MarginalConfig create (ExperimentObs pid, MarginalType marginal) const
 Builds a vector of marginal configurations from a binned observable identifier.
 

Detailed Description

Builds distribution-configuration objects from parameters or observables.

This factory converts a statistical object description into a configuration suitable for a concrete marginal distribution.

Current implemented policies:

  • For a ParamId:
    • GAUSSIAN -> centered at parameter value, width = combined uncertainty
    • FLAT -> interval chosen so that the flat std matches the combined uncertainty
  • For a BinnedObservableId:
    • GAUSSIAN -> mean fixed to 0, width = combined observable uncertainty
    • FLAT -> symmetric interval around 0 with matching std

Current non-implemented cases:

  • HALF_GAUSSIAN
  • LIKELIHOOD

Those currently raise exceptions in the implementation.

Definition at line 74 of file MarginalConfigFactory.h.

Constructor & Destructor Documentation

◆ MarginalConfigFactory()

MarginalConfigFactory::MarginalConfigFactory ( std::shared_ptr< IStatParameterProxy parameter_proxy)
explicit

Constructs the factory with its parameter-access port.

The concrete adapter is selected by the composition root (typically StatisticInterface) and forwarded by StatisticManager. The factory therefore remains independent of parameter-storage infrastructure.

Parameters
parameter_proxyRead-only statistical parameter port.
Exceptions
std::invalid_argumentif parameter_proxy is null.

Definition at line 7 of file MarginalConfigFactory.cpp.

Member Function Documentation

◆ create() [1/3]

MarginalConfig MarginalConfigFactory::create ( ExperimentObs  pid,
MarginalType  marginal 
) const

Builds a vector of marginal configurations from a binned observable identifier.

Current convention for observables:

  • the marginal is centered at 0,
  • the spread is derived from the observable combined uncertainty.

This is useful when the marginal describes a fluctuation / nuisance-like variable rather than an absolute physical central value.

Parameters
pidExperimentObs observable identifier.
marginalRequested marginal family.
Returns
A MarginalConfig variant containing the matching config type.
Exceptions
std::runtime_errorfor currently unsupported marginals.
std::invalid_argumentif the marginal type is unknown.

Definition at line 68 of file MarginalConfigFactory.cpp.

◆ create() [2/3]

MarginalConfig MarginalConfigFactory::create ( ParamId  pid,
MarginalType  marginal 
) const

Builds a marginal configuration from a parameter identifier.

The parameter is queried through the injected IStatParameterProxy port.

Current behavior:

Parameters
pidParameter identifier.
marginalRequested marginal family.
Returns
A MarginalConfig variant containing the matching config type.
Exceptions
std::runtime_errorfor currently unsupported marginals.
std::invalid_argumentif the marginal type is unknown.

Definition at line 20 of file MarginalConfigFactory.cpp.

◆ create() [3/3]

MarginalConfig MarginalConfigFactory::create ( ParamId  pid,
MarginalType  marginal,
const NuisanceSpec spec 
) const

Builds a parameter marginal while honoring an explicit nuisance specification.

For a flat nuisance, the configured support is taken directly from spec.bounds instead of being reconstructed from the parameter standard deviation. Other marginal families retain the standard parameter-derived configuration.

Parameters
pidParameter identifier.
marginalEffective marginal family after default/user resolution.
specEffective nuisance specification associated with pid.
Returns
A marginal configuration compatible with MarginalFactory.
Exceptions
std::invalid_argumentif the specification block/code does not match pid, or if flat bounds are non-finite or not strictly ordered.

Definition at line 46 of file MarginalConfigFactory.cpp.


The documentation for this class was generated from the following files: