|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Factory registry for creating concrete WilsonCoefficient objects by (coefficient, model, backend). More...
#include <functional>#include <memory>#include <unordered_map>#include "GroupDefinition.h"#include "Wilson.h"

Go to the source code of this file.
Classes | |
| class | CoefficientRegistry |
| Registry mapping (WCoef, Model, Backend) -> coefficient factory function. More... | |
Typedefs | |
| using | CoefPtr = std::shared_ptr< WilsonCoefficient > |
| Shared pointer type used to store coefficients in groups. | |
| using | CoefMaker = std::function< CoefPtr(const BuildContext &, WCoef)> |
| Factory signature for constructing a coefficient instance given a build context and enum id. | |
Functions | |
| void | register_B (CoefficientRegistry &) |
| Registers coefficient factories for the B group (C1..C10). | |
| void | register_BPrime (CoefficientRegistry &) |
| Registers coefficient factories for the B' group (CP1..CP10, CPQ1, CPQ2). | |
| void | register_BScalar (CoefficientRegistry &) |
| Registers coefficient factories for the scalar B group (CQ1, CQ2). | |
| void | register_CC_bc (CoefficientRegistry &) |
| Registers coefficient factories for charged-current b->c (C_V1_bc, ...). | |
| void | register_CC_bu (CoefficientRegistry &) |
| Registers coefficient factories for charged-current b->u (C_V1_bu, ...). | |
| void | register_CC_cs (CoefficientRegistry &) |
| Registers coefficient factories for charged-current c->s (C_V1_cs, ...). | |
| void | register_CC_cd (CoefficientRegistry &) |
| Registers coefficient factories for charged-current c->d (C_V1_cd, ...). | |
| void | register_CC_su (CoefficientRegistry &) |
| Registers coefficient factories for charged-current s->u (C_V1_su, ...). | |
| void | register_CC_du (CoefficientRegistry &) |
| Registers coefficient factories for charged-current d->u (C_V1_du, ...). | |
| void | register_MesonMixing (CoefficientRegistry &) |
| Registers coefficient factories for meson mixing coefficients. | |
| void | register_K (CoefficientRegistry ®) |
| Registers coefficient factories for the K group (CK9, CK10, ...). | |
Factory registry for creating concrete WilsonCoefficient objects by (coefficient, model, backend).
This header defines CoefficientRegistry, a lightweight runtime registry used to build the concrete WilsonCoefficient objects that populate a CoefficientGroup.
In the domain layer, a same Wilson coefficient (e.g. C1) can have multiple concrete implementations depending on:
Rather than hard-coding large switch statements in group builders, this registry provides:
create() entry point with well-defined fallback rules.When create(ctx, c) is called: 1) Try exact match (c, ctx.model, ctx.backend). 2) For a non-SM model using the MARTY backend, route supported SM/BSM requests through the registered SM/MARTY factory while preserving the original build context. The factory then instantiates the target model. 3) Otherwise, if backend is Marty, fallback to Builtin for the same model. 4) If model is not SM, fallback to SM for the same backend.
If none match, an exception is thrown.
Registration is typically done per group (see the free functions register_*) in a dedicated translation unit.
Definition in file WilsonCoefficientRegistry.h.
| using CoefMaker = std::function<CoefPtr(const BuildContext&, WCoef)> |
Factory signature for constructing a coefficient instance given a build context and enum id.
Definition at line 64 of file WilsonCoefficientRegistry.h.
| using CoefPtr = std::shared_ptr<WilsonCoefficient> |
Shared pointer type used to store coefficients in groups.
Definition at line 61 of file WilsonCoefficientRegistry.h.
| void register_B | ( | CoefficientRegistry & | reg | ) |
Registers coefficient factories for the B group (C1..C10).
Implementations typically register:
Definition at line 155 of file WilsonCoefficientRegistry.cpp.
| void register_BPrime | ( | CoefficientRegistry & | reg | ) |
| void register_BScalar | ( | CoefficientRegistry & | reg | ) |
Registers coefficient factories for the scalar B group (CQ1, CQ2).
Definition at line 272 of file WilsonCoefficientRegistry.cpp.
| void register_CC_bc | ( | CoefficientRegistry & | reg | ) |
Registers coefficient factories for charged-current b->c (C_V1_bc, ...).
Definition at line 306 of file WilsonCoefficientRegistry.cpp.
| void register_CC_bu | ( | CoefficientRegistry & | reg | ) |
Registers coefficient factories for charged-current b->u (C_V1_bu, ...).
Definition at line 333 of file WilsonCoefficientRegistry.cpp.
| void register_CC_cd | ( | CoefficientRegistry & | reg | ) |
Registers coefficient factories for charged-current c->d (C_V1_cd, ...).
Definition at line 387 of file WilsonCoefficientRegistry.cpp.
| void register_CC_cs | ( | CoefficientRegistry & | reg | ) |
Registers coefficient factories for charged-current c->s (C_V1_cs, ...).
Definition at line 360 of file WilsonCoefficientRegistry.cpp.
| void register_CC_du | ( | CoefficientRegistry & | reg | ) |
Registers coefficient factories for charged-current d->u (C_V1_du, ...).
Definition at line 441 of file WilsonCoefficientRegistry.cpp.
| void register_CC_su | ( | CoefficientRegistry & | reg | ) |
Registers coefficient factories for charged-current s->u (C_V1_su, ...).
Definition at line 414 of file WilsonCoefficientRegistry.cpp.
| void register_K | ( | CoefficientRegistry & | reg | ) |
Registers coefficient factories for the K group (CK9, CK10, ...).
Definition at line 512 of file WilsonCoefficientRegistry.cpp.
| void register_MesonMixing | ( | CoefficientRegistry & | reg | ) |
Registers coefficient factories for meson mixing coefficients.
Definition at line 469 of file WilsonCoefficientRegistry.cpp.