|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Identifies an observable together with a numerical bin. More...
#include <BinnedObservableId.h>

Public Member Functions | |
| BinnedObservableId ()=default | |
| Default constructor. | |
| BinnedObservableId (ObservableId id) | |
| Constructs an unbinned observable identifier. | |
| BinnedObservableId (ObservableId id, std::pair< double, double > bin) | |
| Constructs a binned observable identifier. | |
| BinnedObservableId (Observables id) | |
| Constructs an unbinned observable identifier. | |
| BinnedObservableId (Observables id, std::pair< double, double > bin) | |
| Constructs a binned observable identifier. | |
| bool | operator== (BinnedObservableId const &o) const noexcept |
| Equality comparison operator. | |
| bool | operator< (BinnedObservableId const &o) const noexcept |
| Strict weak ordering for binned observable identifiers. | |
| LhaID | flha () const |
| Converts this binned observable identifier to its FLHA encoding. | |
| std::string | str () const |
| Returns a human-readable representation of the binned observable. | |
Static Public Member Functions | |
| static BinnedObservableId | from_flha (LhaID const &id) |
| Reconstructs a binned observable identifier from an FLHA encoding. | |
Public Attributes | |
| ObservableId | s |
| std::pair< double, double > | p |
Identifies an observable together with a numerical bin.
A BinnedObservableId combines an ObservableId with a pair of bin boundaries, typically interpreted as the lower and upper edges of the bin. This is useful for observables whose experimental value is defined in a specific kinematic interval.
The bin is stored as a pair of doubles:
The type provides equality comparison, strict weak ordering, hashing, conversion to a robust FLHA/LhaID representation, reconstruction from that representation, and a human-readable string representation.
Definition at line 285 of file BinnedObservableId.h.
|
default |
Default constructor.
Leaves the observable identifier and bin boundaries default-initialized.
|
inline |
Constructs an unbinned observable identifier.
The observable is initialized from id and the bin boundaries are set to {0.0, 0.0}, which is used here as the default unbinned interval.
| id | Identifier of the observable. |
Definition at line 304 of file BinnedObservableId.h.
|
inline |
Constructs a binned observable identifier.
| id | Identifier of the observable. |
| bin | Pair containing the lower and upper bin boundaries. |
Definition at line 312 of file BinnedObservableId.h.
|
inline |
Constructs an unbinned observable identifier.
The observable is initialized from id and the bin boundaries are set to {0.0, 0.0}, which is used here as the default unbinned interval.
| id | Identifier of the observable. |
Definition at line 322 of file BinnedObservableId.h.
|
inline |
Constructs a binned observable identifier.
| id | Identifier of the observable. |
| bin | Pair containing the lower and upper bin boundaries. |
Definition at line 330 of file BinnedObservableId.h.
|
inline |
Converts this binned observable identifier to its FLHA encoding.
The underlying observable is first converted to its unbinned FLHA identifier using ObservableMapper::flha_of. The lower and upper bin boundaries are then encoded as six integer components and inserted into the resulting LhaID at kBinnedFlhaInsertPos.
| std::runtime_error | if no FLHA mapping is known for the underlying observable. |
| std::runtime_error | if one of the bin boundaries cannot be encoded, for example because it is not finite. |
Definition at line 384 of file BinnedObservableId.h.
|
inlinestatic |
Reconstructs a binned observable identifier from an FLHA encoding.
This function expects an LhaID containing the encoded bin information at kBinnedFlhaInsertPos. The six bin-related components are extracted, decoded into lower and upper bin boundaries, and removed before converting the remaining unbinned identifier back to an ObservableId.
| id | FLHA/LhaID representation of a binned observable. |
| std::runtime_error | if id does not contain enough components for the encoded bin. |
| std::runtime_error | if the unbinned FLHA identifier cannot be mapped back to an ObservableId. |
| std::runtime_error | if the encoded bin components are invalid. |
Definition at line 427 of file BinnedObservableId.h.
|
inlinenoexcept |
Strict weak ordering for binned observable identifiers.
Ordering is lexicographic on the observable identifier and the bitwise representation of the normalized bin edges. This allows the type to be used as a key in ordered containers such as std::map or std::set.
| o | Object to compare with. |
o. Definition at line 359 of file BinnedObservableId.h.
|
inlinenoexcept |
Equality comparison operator.
Two BinnedObservableId objects are equal if they refer to the same observable and have identical normalized bin boundaries. Positive and negative zero are treated as the same value.
| o | Object to compare with. |
Definition at line 343 of file BinnedObservableId.h.
|
inline |
Returns a human-readable representation of the binned observable.
The returned string contains the observable string representation followed by the bin boundaries.
Definition at line 468 of file BinnedObservableId.h.
| std::pair<double, double> BinnedObservableId::p |
Bin boundaries, usually {lower, upper}.
Definition at line 287 of file BinnedObservableId.h.
| ObservableId BinnedObservableId::s |
Identifier of the underlying observable.
Definition at line 286 of file BinnedObservableId.h.