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

#include <Observable.h>

Collaboration diagram for Observable:

Public Member Functions

 Observable (ObservableId id, std::shared_ptr< DecayParent > decay_parent, std::shared_ptr< IObsParameterProxy< ParamId, DataType, std::string, LhaID > > iobspp_obs)
 Construct an Observable.
 
ObservableId getId () const
 Return the observable id.
 
scalar_t get_exp_val (std::pair< double, double > bins={0., 0.}, std::string exp="DEFAULT") const
 Get the experimental central value for this observable.
 
scalar_t get_exp_uncertainty (std::pair< double, double > bins={0., 0.}, std::string exp="DEFAULT", UncertaintyType u_type=UncertaintyType::COMBINED) const
 Get the experimental uncertainty for this observable.
 
std::vector< ObservableValuecompute () const
 Compute the theory prediction for this observable.
 
void add_dependence (const ParamId &param_name)
 Add a single parameter dependence.
 
void add_dependences (const std::unordered_set< ParamId > &param_names)
 Add many parameter dependences.
 
const std::unordered_set< ParamId > & get_dependences () const
 Access the dependency set (read-only).
 

Protected Attributes

const ObservableId id
 Identifier of this observable (used for experimental lookup and theory computation routing).
 
std::shared_ptr< DecayParentdecay_parent
 Physics backend that computes the theory prediction for this observable.
 
std::unordered_set< ParamIddependences
 Set of parameter identifiers the observable depends on.
 
std::shared_ptr< IObsParameterProxy< ParamId, DataType, std::string, LhaID > > iobspp_obs
 Proxy to experimental/observable parameters (typically ParameterType::OBSERVABLE).
 

Detailed Description

Definition at line 46 of file Observable.h.

Constructor & Destructor Documentation

◆ Observable()

Observable::Observable ( ObservableId  id,
std::shared_ptr< DecayParent decay_parent,
std::shared_ptr< IObsParameterProxy< ParamId, DataType, std::string, LhaID > >  iobspp_obs 
)
inline

Construct an Observable.

Parameters
idObservable identifier.
decay_parentDecay/physics backend used to compute theory prediction.
iobspp_obsProxy used to read experimental values/uncertainties.

Definition at line 82 of file Observable.h.

Member Function Documentation

◆ add_dependence()

void Observable::add_dependence ( const ParamId param_name)

Add a single parameter dependence.

Parameters
param_nameParameter id to add to the dependency set.

Definition at line 15 of file Observable.cpp.

◆ add_dependences()

void Observable::add_dependences ( const std::unordered_set< ParamId > &  param_names)

Add many parameter dependences.

Performs a set union with the existing dependency set.

Parameters
param_namesSet of parameter ids to add.

Definition at line 19 of file Observable.cpp.

◆ compute()

std::vector< ObservableValue > Observable::compute ( ) const

Compute the theory prediction for this observable.

This method ensures the underlying DecayParent is enabled before computing. Enabling typically triggers Wilson group building (via ObsWilsonHelper) and parameter loading.

Returns
A vector of observable values (binned or multi-component outputs supported).

Definition at line 11 of file Observable.cpp.

◆ get_dependences()

const std::unordered_set< ParamId > & Observable::get_dependences ( ) const

Access the dependency set (read-only).

Returns
Reference to internal dependency set.

Definition at line 24 of file Observable.cpp.

◆ get_exp_uncertainty()

scalar_t Observable::get_exp_uncertainty ( std::pair< double, double >  bins = {0.,0.},
std::string  exp = "DEFAULT",
UncertaintyType  u_type = UncertaintyType::COMBINED 
) const

Get the experimental uncertainty for this observable.

The uncertainty type is mapped to a DataType via UncertaintyTypeMapper::d_type. Typical values include combined/stat/sys depending on your implementation.

Parameters
binsExperimental bins of the observable
expExperiment for the observable
u_typeWhich uncertainty component to request (default: combined).
Returns
Experimental uncertainty (as scalar_t).

Definition at line 7 of file Observable.cpp.

◆ get_exp_val()

scalar_t Observable::get_exp_val ( std::pair< double, double >  bins = {0.,0.},
std::string  exp = "DEFAULT" 
) const

Get the experimental central value for this observable.

Reads from the observable parameter proxy using:

Parameters
binsExperimental bins of the observable
expExperiment for the observable
Returns
Experimental central value (as scalar_t).

Definition at line 3 of file Observable.cpp.

◆ getId()

ObservableId Observable::getId ( ) const
inline

Return the observable id.

Definition at line 87 of file Observable.h.

Member Data Documentation

◆ decay_parent

std::shared_ptr<DecayParent> Observable::decay_parent
protected

Physics backend that computes the theory prediction for this observable.

Definition at line 52 of file Observable.h.

◆ dependences

std::unordered_set<ParamId> Observable::dependences
protected

Set of parameter identifiers the observable depends on.

This is intended for external tooling:

  • dependency tracking / invalidation,
  • sensitivity studies,
  • fit engines (knowing which parameters to vary),
  • caching layers.

Definition at line 63 of file Observable.h.

◆ id

const ObservableId Observable::id
protected

Identifier of this observable (used for experimental lookup and theory computation routing).

Definition at line 49 of file Observable.h.

◆ iobspp_obs

std::shared_ptr<IObsParameterProxy<ParamId, DataType, std::string, LhaID> > Observable::iobspp_obs
protected

Proxy to experimental/observable parameters (typically ParameterType::OBSERVABLE).

Expected block usage in current implementation:

  • block: "FOBS"
  • code : ObservableMapper::flha_of(id)

Definition at line 72 of file Observable.h.


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