Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
GroupDefinition.h File Reference

Declarative registry describing Wilson coefficient groups, their sources, and setup hooks. More...

#include <unordered_map>
#include <map>
#include <vector>
#include <functional>
#include <stdexcept>
#include "WilsonGroup.h"
#include "IMartyWilsonPathProxy.h"
Include dependency graph for GroupDefinition.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BuildContext
 Build-time context passed to group setup hooks. More...
 
struct  GroupDefinition
 Declarative description of a Wilson coefficient group. More...
 

Namespaces

namespace  GroupDefinitions
 Registry/factory of built-in and custom GroupDefinition objects.
 

Enumerations

enum class  Backend { Builtin , Marty }
 

Functions

const GroupDefinitionGroupDefinitions::B ()
 Built-in group definition accessors.
 
const GroupDefinitionGroupDefinitions::BPrime ()
 
const GroupDefinitionGroupDefinitions::BScalar ()
 
const GroupDefinitionGroupDefinitions::CC_bc ()
 
const GroupDefinitionGroupDefinitions::CC_bu ()
 
const GroupDefinitionGroupDefinitions::CC_cs ()
 
const GroupDefinitionGroupDefinitions::CC_cd ()
 
const GroupDefinitionGroupDefinitions::CC_su ()
 
const GroupDefinitionGroupDefinitions::CC_du ()
 
const GroupDefinitionGroupDefinitions::MesonMixing ()
 
const GroupDefinitionGroupDefinitions::K ()
 
const GroupDefinitionGroupDefinitions::get (WGroupId g)
 Returns the definition for a given group id.
 
void GroupDefinitions::register_custom (const GroupDefinition &def)
 Registers a custom group definition at runtime.
 
bool GroupDefinitions::has_custom (WGroupId id)
 Checks if a custom group definition is registered.
 
const GroupDefinitionGroupDefinitions::get_custom (WGroupId id)
 Retrieves a previously registered custom group definition.
 

Variables

constexpr const char * MATCHING_BLOCK_PLACEHOLDER = "$MATCHING_BLOCK$"
 Placeholder string used in GroupDefinition sources to refer to the matching block.
 

Detailed Description

Declarative registry describing Wilson coefficient groups, their sources, and setup hooks.

This header introduces a declarative layer used to describe Wilson coefficient groups (e.g. B, B', BScalar, charged currents, meson mixing, K, …) without hard-coding construction logic everywhere.

A GroupDefinition contains:

  • a group id (WGroupId),
  • the list of coefficients belonging to the group (members),
  • per-basis/per-order source specifications (see CoefficientGroupSources),
  • optional common and model-specific "setup hooks" executed during group build time (see SetupHook).

It also provides the GroupDefinitions namespace which acts as a registry / factory for built-in group definitions and user-registered custom ones.

Key concept: MATCHING block placeholder

Many group definitions are written generically and refer to the matching block by using the string placeholder MATCHING_BLOCK_PLACEHOLDER instead of a concrete block name.

A builder can then replace it with the actual block: GroupMapper::str(ctx.group_id, ScaleType::MATCHING) when instantiating a concrete CoefficientGroup.

Built-in vs custom groups

The main lookup entry point is: GroupDefinitions::get(WGroupId) which returns the built-in definition if the id is known by GroupMapper, otherwise falls back to the custom registry.

See also
CoefficientGroup
CoefficientGroupSources
WilsonGroupAdapterConfig
GroupMapper, WCoefMapper

Definition in file GroupDefinition.h.

Enumeration Type Documentation

◆ Backend

enum class Backend
strong
Enumerator
Builtin 
Marty 

Definition at line 66 of file GroupDefinition.h.

Variable Documentation

◆ MATCHING_BLOCK_PLACEHOLDER

constexpr const char* MATCHING_BLOCK_PLACEHOLDER = "$MATCHING_BLOCK$"
inlineconstexpr

Placeholder string used in GroupDefinition sources to refer to the matching block.

Many built-in definitions describe their sources using a placeholder instead of a concrete block name. During instantiation, a builder should replace this placeholder with: GroupMapper::str(ctx.group_id, ScaleType::MATCHING).

This keeps definitions reusable and avoids duplicating block naming logic.

Definition at line 117 of file GroupDefinition.h.