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

Concrete read-only proxy used by the statistics layer. More...

#include <StatParameterProxy.h>

Inheritance diagram for StatParameterProxy:
Collaboration diagram for StatParameterProxy:

Public Member Functions

 StatParameterProxy (ParameterType type=ParameterType::SM)
 Constructs a proxy optionally bound to a parameter type.
 
std::shared_ptr< Parameterget_param (const ParamId &) const override
 Returns the parameter object identified by a typed ParamId.
 
std::shared_ptr< Parameterget_param (const std::string &block, const LhaID &id) const override
 Returns the parameter object identified by block and LHA id.
 
scalar_t operator() (const ParamId &, DataType d_type=DataType::VALUE) const override
 Returns a scalar quantity for a typed parameter.
 
std::map< ExperimentObs, double > operator() (const ObservableId &, DataType d_type=DataType::VALUE) const override
 Returns a scalar quantity for an observable entry.
 
std::map< ExperimentObs, double > operator() (const BinnedObservableId &, DataType d_type=DataType::VALUE) const override
 Returns a scalar quantity for a binned observable entry.
 
scalar_t operator() (const std::string &block, const LhaID &id, DataType d_type=DataType::VALUE) const override
 Returns a scalar quantity for a parameter identified by block and LHA id.
 
std::map< ExperimentObs, std::shared_ptr< Parameter > > get_obs_param (const BinnedObservableId &) const override
 Returns the parameter object associated with a binned observable.
 
- Public Member Functions inherited from IStatParameterProxy
virtual ~IStatParameterProxy ()=default
 Virtual destructor.
 

Detailed Description

Concrete read-only proxy used by the statistics layer.

The proxy enforces a whitelist of parameter types accessible from the statistics/business layer:

  • SM
  • BSM
  • WILSON
  • FLAVOR
  • DECAY
  • OBSERVABLE

It can be constructed either:

  • untyped in practice through the generic provider, while still exposing typed ParamId access,
  • or bound to a given ParameterType for block-based queries.

Definition at line 60 of file StatParameterProxy.h.

Constructor & Destructor Documentation

◆ StatParameterProxy()

StatParameterProxy::StatParameterProxy ( ParameterType  type = ParameterType::SM)

Constructs a proxy optionally bound to a parameter type.

Constructs the statistics parameter proxy.

If type is not allowed by the statistics layer, a ValueError is logged.

Parameters
typeParameter namespace handled by block-based access.

Initializes:

  • a generic provider (pp) for typed ParamId access,
  • a typed provider (pp_with_type) bound to type for (block, LhaID) access.
Parameters
typeParameter namespace used by block-based queries.

Definition at line 12 of file StatParameterProxy.cpp.

Member Function Documentation

◆ get_obs_param()

std::map< ExperimentObs, std::shared_ptr< Parameter > > StatParameterProxy::get_obs_param ( const BinnedObservableId id) const
overridevirtual

Returns the parameter object associated with a binned observable.

Returns a vector of the underlying parameter objects for a binned observable entry.

The binned observable is resolved to the FOBS observable block.

Parameters
idBinned observable identifier.
Returns
a map of shared pointer to the corresponding observable Parameter.

This is useful when the caller needs access to the full parameter metadata associated with a binned observable, such as uncertainties or binning info.

Parameters
idBinned observable identifier.
Returns
Map of shared pointer to the corresponding Parameter.

Implements IStatParameterProxy.

Definition at line 100 of file StatParameterProxy.cpp.

◆ get_param() [1/2]

std::shared_ptr< Parameter > StatParameterProxy::get_param ( const ParamId pid) const
overridevirtual

Returns the parameter object identified by a typed ParamId.

Returns the underlying parameter object identified by a typed ParamId.

Parameters
pidFully typed parameter identifier.
Returns
Shared pointer to the corresponding Parameter.
Parameters
pidFully typed parameter identifier.
Returns
Shared pointer to the corresponding Parameter.

Implements IStatParameterProxy.

Definition at line 23 of file StatParameterProxy.cpp.

◆ get_param() [2/2]

std::shared_ptr< Parameter > StatParameterProxy::get_param ( const std::string &  block,
const LhaID id 
) const
overridevirtual

Returns the parameter object identified by block and LHA id.

Returns the underlying parameter object identified by block and LHA id.

This uses the internal provider bound to the constructor-selected ParameterType.

Parameters
blockBlock name.
idLHA-like identifier.
Returns
Shared pointer to the corresponding Parameter.

This overload is intended for proxies already bound to a specific ParameterType.

Parameters
blockBlock name.
idLHA-like identifier inside the block.
Returns
Shared pointer to the corresponding Parameter.

Implements IStatParameterProxy.

Definition at line 30 of file StatParameterProxy.cpp.

◆ operator()() [1/4]

std::map< ExperimentObs, double > StatParameterProxy::operator() ( const BinnedObservableId id,
DataType  d_type = DataType::VALUE 
) const
overridevirtual

Returns a scalar quantity for a binned observable entry.

Returns a vector of scalar quantities (for each experiments) for a binned observable entry.

The binned observable is internally mapped to the observable block (FOBS) using its FLHA identifier.

Parameters
idBinned observable identifier.
d_typeRequested quantity type.
Returns
vector of the requested scalar quantities.

This overload is used when the observable is identified not only by its base observable id but also by a bin definition encoded in BinnedObservableId.

Parameters
idBinned observable identifier.
d_typeRequested quantity type.
Returns
Requested map of scalar quantities.

Implements IStatParameterProxy.

Definition at line 71 of file StatParameterProxy.cpp.

◆ operator()() [2/4]

std::map< ExperimentObs, double > StatParameterProxy::operator() ( const ObservableId id,
DataType  d_type = DataType::VALUE 
) const
overridevirtual

Returns a scalar quantity for an observable entry.

Returns a vector of scalar quantities (for each experiments) for an observable identified by ObservableId.

The observable is internally mapped to the observable block (FOBS) using its FLHA identifier.

Parameters
idObservable identifier.
d_typeRequested quantity type.
Returns
vector of the requested scalar quantities.

This is typically used for experimental observable entries stored in the observable parameter blocks.

Parameters
idObservable identifier.
d_typeRequested quantity type.
Returns
Requested map of scalar quantities.

Implements IStatParameterProxy.

Definition at line 55 of file StatParameterProxy.cpp.

◆ operator()() [3/4]

scalar_t StatParameterProxy::operator() ( const ParamId pid,
DataType  d_type = DataType::VALUE 
) const
overridevirtual

Returns a scalar quantity for a typed parameter.

Returns a scalar quantity for a typed parameter.

If the parameter has no type, a warning is emitted. If the type is not allowed, a ValueError is logged.

For Wilson parameters, missing entries return a default-constructed scalar_t.

Parameters
pidFully typed parameter identifier.
d_typeRequested quantity type.
Returns
Requested scalar quantity.

Depending on d_type, returns the central value or one of its uncertainties.

Parameters
pidFully typed parameter identifier.
d_typeRequested quantity type.
Returns
Requested scalar quantity.

Implements IStatParameterProxy.

Definition at line 37 of file StatParameterProxy.cpp.

◆ operator()() [4/4]

scalar_t StatParameterProxy::operator() ( const std::string &  block,
const LhaID id,
DataType  d_type = DataType::VALUE 
) const
overridevirtual

Returns a scalar quantity for a parameter identified by block and LHA id.

Returns a scalar quantity for a parameter identified by block and LHA id.

This overload uses the provider bound to the constructor-selected ParameterType.

For Wilson parameters, missing entries return a default-constructed scalar_t.

Parameters
blockBlock name.
idLHA-like identifier.
d_typeRequested quantity type.
Returns
Requested scalar quantity.

This overload is intended for proxies already bound to a specific ParameterType.

Parameters
blockBlock name.
idLHA-like identifier inside the block.
d_typeRequested quantity type.
Returns
Requested scalar quantity.

Implements IStatParameterProxy.

Definition at line 89 of file StatParameterProxy.cpp.


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