Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
ExperimentObs Struct Reference

Identifies an observable in the context of a specific experiment. More...

#include <ExperimentObs.h>

Collaboration diagram for ExperimentObs:

Public Member Functions

 ExperimentObs ()=default
 Default constructor.
 
 ExperimentObs (std::string exp, BinnedObservableId o)
 Constructs an experiment-specific binned observable.
 
 ExperimentObs (std::string exp, ObservableId o)
 Constructs an experiment-specific unbinned observable.
 
 ExperimentObs (std::string exp, Observables o)
 Constructs an experiment-specific observable from an enum value.
 
bool operator== (ExperimentObs const &other) const noexcept
 Equality comparison operator.
 
bool operator< (ExperimentObs const &other) const noexcept
 Strict weak ordering for experiment-specific observables.
 
std::string str () const
 Returns a human-readable representation of the object.
 

Public Attributes

std::string experiment
 
BinnedObservableId obs
 

Detailed Description

Identifies an observable in the context of a specific experiment.

ExperimentObs combines the name of an experiment with a binned observable identifier. It can distinguish measurements of the same observable performed by different experiments, or measurements belonging to different experimental contexts.

The observable part is stored as a BinnedObservableId. Convenience constructors are provided for already-binned observables, plain ObservableId values, and Observables enum values. In the latter two cases, the bin boundaries are initialized to {0.0, 0.0}.

The type supports equality comparison, lexicographic ordering, hashing, and human-readable string formatting.

Definition at line 32 of file ExperimentObs.h.

Constructor & Destructor Documentation

◆ ExperimentObs() [1/4]

Default constructor.

Leaves the experiment name and observable identifier default-initialized.

◆ ExperimentObs() [2/4]

ExperimentObs::ExperimentObs ( std::string  exp,
BinnedObservableId  o 
)
inline

Constructs an experiment-specific binned observable.

Parameters
expName or label of the experiment.
oBinned observable identifier.

Definition at line 49 of file ExperimentObs.h.

◆ ExperimentObs() [3/4]

ExperimentObs::ExperimentObs ( std::string  exp,
ObservableId  o 
)
inline

Constructs an experiment-specific unbinned observable.

The observable is wrapped into a BinnedObservableId with bin boundaries set to {0.0, 0.0}.

Parameters
expName or label of the experiment.
oObservable identifier.

Definition at line 61 of file ExperimentObs.h.

◆ ExperimentObs() [4/4]

ExperimentObs::ExperimentObs ( std::string  exp,
Observables  o 
)
inline

Constructs an experiment-specific observable from an enum value.

The observable enum value is converted to an ObservableId through ObservableMapper::to_id and wrapped into a BinnedObservableId with bin boundaries set to {0.0, 0.0}.

Parameters
expName or label of the experiment.
oObservable enum value.

Definition at line 74 of file ExperimentObs.h.

Member Function Documentation

◆ operator<()

bool ExperimentObs::operator< ( ExperimentObs const &  other) const
inlinenoexcept

Strict weak ordering for experiment-specific observables.

Ordering is lexicographic on the experiment label and then on the binned observable identifier. This allows the type to be used as a key in ordered containers such as std::map or std::set.

Parameters
otherObject to compare with.
Returns
true if this object is ordered before other.

Definition at line 102 of file ExperimentObs.h.

◆ operator==()

bool ExperimentObs::operator== ( ExperimentObs const &  other) const
inlinenoexcept

Equality comparison operator.

Two ExperimentObs objects are equal if and only if both their experiment labels and their binned observable identifiers are equal.

Parameters
otherObject to compare with.
Returns
true if both objects identify the same observable in the same experiment, false otherwise.

Definition at line 87 of file ExperimentObs.h.

◆ str()

std::string ExperimentObs::str ( ) const
inline

Returns a human-readable representation of the object.

Returns
String of the form "experiment :: observable [low, high]".

Definition at line 112 of file ExperimentObs.h.

Member Data Documentation

◆ experiment

std::string ExperimentObs::experiment

Name or label of the experiment.

Definition at line 33 of file ExperimentObs.h.

◆ obs

BinnedObservableId ExperimentObs::obs

Observable identifier, including optional bin information.

Definition at line 34 of file ExperimentObs.h.


The documentation for this struct was generated from the following files: