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

Registry mapping (WCoef, Model, Backend) -> coefficient factory function. More...

#include <WilsonCoefficientRegistry.h>

Public Member Functions

void register_creator (WCoef c, Model m, Backend b, CoefMaker mk)
 Registers a creator function for a given (coefficient, model, backend).
 
CoefPtr create (const BuildContext &ctx, WCoef c) const
 Creates a coefficient instance according to the provided build context.
 

Detailed Description

Registry mapping (WCoef, Model, Backend) -> coefficient factory function.

The registry stores creator functions keyed by:

  • WCoef : which coefficient to create,
  • Model : which physics model implementation to use,
  • Backend : built-in computations vs MARTY-generated backend.

This is primarily used during the construction of CoefficientGroup objects: each group definition provides membership lists (WCoef) and the registry resolves which concrete WilsonCoefficient subclass to instantiate.

Definition at line 80 of file WilsonCoefficientRegistry.h.

Member Function Documentation

◆ create()

CoefPtr CoefficientRegistry::create ( const BuildContext ctx,
WCoef  c 
) const

Creates a coefficient instance according to the provided build context.

The function attempts to find a registered factory using the fallback strategy:

  • exact match (c, ctx.model, ctx.backend),
  • non-SM MARTY requests through the SM/MARTY factory with the original context,
  • Marty -> Builtin fallback for the same model,
  • model -> SM fallback for the same backend.
Parameters
ctxBuild context providing model/backend information and adapter access.
cCoefficient identifier.
Returns
A newly created coefficient instance.
Exceptions
std::runtime_errorif no suitable factory is registered.

Definition at line 125 of file WilsonCoefficientRegistry.cpp.

◆ register_creator()

void CoefficientRegistry::register_creator ( WCoef  c,
Model  m,
Backend  b,
CoefMaker  mk 
)
inline

Registers a creator function for a given (coefficient, model, backend).

Parameters
cCoefficient identifier.
mPhysics model.
bBackend choice (Builtin / Marty).
mkFactory function returning a new coefficient instance.

Definition at line 90 of file WilsonCoefficientRegistry.h.


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