1#ifndef OBSERVABLE_IDS_H
2#define OBSERVABLE_IDS_H
57 observable_flha_mapping
185 std::vector<std::string> aliases,
186 std::optional<LhaID> ext,
193 std::vector<std::string> aliases,
194 std::optional<LhaID> ext,
195 Decays parent_decay_enum);
201 std::vector<std::string> aliases,
202 std::optional<LhaID> ext,
203 std::string_view parent_decay_str);
Lightweight representation of LHAPDF / SLHA-style identifiers.
const std::map< Observables, std::string > & observable_mapping()
Returns the mapping between Observables and their string names.
const std::map< Observables, LhaID > & observable_flha_mapping()
Returns the mapping between Observables and their FLHA identifiers.
Static mappings between enum classes and string (or FLHA) identifiers.
Generic enum↔string mapper with external keys and dynamic aliases.
static void init_builtins()
Explicitly initializes builtin entries.
static std::vector< IdOf< ObservableTag > > list_all()
Lists all distinct identifiers currently registered.
static std::optional< LhaID > external_of(const IdOf< ObservableTag > &id)
Returns the external key associated with a given identifier.
static std::optional< Observables > enum_of(const IdOf< ObservableTag > &id)
Attempts to recover the enum value associated with an identifier.
static IdOf< ObservableTag > enum_elt(std::string_view s)
Alias for id_of(), kept for compatibility.
static std::optional< IdOf< ObservableTag > > from_external(const LhaID &k)
Resolves an external key into an identifier.
static IdOf< ObservableTag > to_id(Observables e)
Converts an enum value to an IdOf<Tag>.
static bool set_external(const IdOf< ObservableTag > &id, const LhaID &k)
Sets or updates the external key of an existing identifier.
static IdOf< ObservableTag > id_of(std::string_view s)
Resolves a string into an IdOf<Tag> via the registry.
static std::string str(const IdOf< ObservableTag > &id)
Returns the string representation of an identifier.
High-level mapper for observable names, FLHA ids and parent decays.
static std::optional< ObservableId > from_flha(const LhaID &ext)
Resolve a FLHA id to a dynamic observable id.
static BinnedObservableId binned_from_flha(const LhaID &ext)
Throwing variant of from_binned_flha().
static std::optional< LhaID > flha_of(const ObservableId &id)
Return the FLHA id attached to an observable id, if any.
static std::optional< LhaID > binned_flha_of(const BinnedObservableId &id)
Encode a binned observable id into its FLHA representation.
static LhaID flha(const Observables &id)
Return the FLHA id associated with a builtin enum value.
static Observables enum_elt(const LhaID &ext)
Legacy builtin-only lookup from FLHA id to enum.
static bool register_custom(const std::string &canonical, std::vector< std::string > aliases, std::optional< LhaID > ext, const DecayId &parent_decay)
Register a custom observable and attach it to a parent decay.
static Observables enum_elt_legacy(std::string_view s)
Legacy builtin-only lookup from string to enum.
static std::optional< BinnedObservableId > from_binned_flha(const LhaID &ext)
Decode a binned FLHA id into a binned observable id.
Runtime graph linking decay identifiers to observable identifiers.
Generic enum↔string (and optional external key) mappers built on DynamicRegistry.
Identifies an observable together with a numerical bin.
Represents an identifier of a LHA element, possibly containing several sub-ids.