Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
GroupDefinition.h
Go to the documentation of this file.
1#ifndef GROUP_DEFINITION_H
2#define GROUP_DEFINITION_H
3
4#include <unordered_map>
5#include <map>
6#include <vector>
7#include <functional>
8#include <stdexcept>
9
10#include "WilsonGroup.h"
12
66enum class Backend { Builtin, Marty };
67
107
117inline constexpr const char* MATCHING_BLOCK_PLACEHOLDER = "$MATCHING_BLOCK$";
118
148
150 std::vector<WCoef> members;
151
162 std::unordered_map<WilsonBasis, std::map<QCDOrder, CoefficientGroupSources>> sources;
163
175 using SetupHook = std::function<void(const BuildContext&, CoefficientGroup&)>;
176
183 std::vector<SetupHook> common_setup;
184
193 std::unordered_map<Model, std::vector<SetupHook>> setup;
194
199 std::vector<SetupHook> hooks_for(Model model) const;
200};
201
223namespace GroupDefinitions {
224
226 const GroupDefinition& B();
227 const GroupDefinition& BPrime();
228 const GroupDefinition& BScalar();
229 const GroupDefinition& CC_bc();
230 const GroupDefinition& CC_bu();
231 const GroupDefinition& CC_cs();
232 const GroupDefinition& CC_cd();
233 const GroupDefinition& CC_su();
234 const GroupDefinition& CC_du();
236 const GroupDefinition& K();
237
249
258 void register_custom(const GroupDefinition& def);
259
265 bool has_custom(WGroupId id);
266
274
275}
276
277#endif
Model
ContributionType
constexpr const char * MATCHING_BLOCK_PLACEHOLDER
Placeholder string used in GroupDefinition sources to refer to the matching block.
Backend
Port used by the Wilson layer to access MARTY-generated output paths.
Domain container grouping related Wilson coefficients with matching and running access.
Polymorphic container of WilsonCoefficient objects representing a coefficient group.
Returns an uppercase copy of the input string.
constexpr double g
Registry/factory of built-in and custom GroupDefinition objects.
Definition GroupDef_B.cpp:6
const GroupDefinition & CC_bu()
bool has_custom(WGroupId id)
Checks if a custom group definition is registered.
const GroupDefinition & BPrime()
const GroupDefinition & B()
Built-in group definition accessors.
Definition GroupDef_B.cpp:7
const GroupDefinition & CC_bc()
const GroupDefinition & BScalar()
const GroupDefinition & CC_cs()
const GroupDefinition & CC_cd()
const GroupDefinition & K()
Definition GroupDef_K.cpp:7
const GroupDefinition & get_custom(WGroupId id)
Retrieves a previously registered custom group definition.
const GroupDefinition & CC_du()
void register_custom(const GroupDefinition &def)
Registers a custom group definition at runtime.
const GroupDefinition & MesonMixing()
const GroupDefinition & get(WGroupId g)
Returns the definition for a given group id.
const GroupDefinition & CC_su()
Build-time context passed to group setup hooks.
Backend backend
Backend selection used to compute or fetch coefficients.
WGroupId group_id
Identifier of the group being built.
ContributionType contrib
Contribution type used for this build (SM/BSM/TOTAL, etc.).
WilsonGroupAdapterConfig adapters
Adapter bundle used by domain objects (storage proxy, composer, core APIs, optional MARTY proxy).
std::string group_name
Optional name for diagnostics / display.
Model model
Active model used by the core (SM / SUSY / THDM / MARTY).
std::shared_ptr< IMartyWilsonPathProxy > marty_paths
Optional path provider used by MARTY-backed Wilson coefficients.
Declarative description of a Wilson coefficient group.
WGroupId id
Identifier for this group.
std::unordered_map< Model, std::vector< SetupHook > > setup
Model-specific setup hooks to run during group construction.
std::vector< SetupHook > hooks_for(Model model) const
Returns hooks applicable to model, including common hooks and the explicit Marty -> SM compatibility ...
std::unordered_map< WilsonBasis, std::map< QCDOrder, CoefficientGroupSources > > sources
Running-block sources and computation functions.
std::function< void(const BuildContext &, CoefficientGroup &)> SetupHook
Setup hook signature.
std::vector< WCoef > members
Members (coefficient enums) belonging to this group.
std::vector< SetupHook > common_setup
Setup hooks to run for every model/backend during group construction.
Dependency injection bundle for CoefficientGroup.