Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
Observable.cpp
Go to the documentation of this file.
1#include "Observable.h"
2
3scalar_t Observable::get_exp_val(std::pair<double, double> bins, std::string exp) const {
4 return (*iobspp_obs)(ParamId(ParameterType::OBSERVABLE, "FOBS_" + exp, BinnedObservableId(this->id, bins).flha()), DataType::VALUE);
5}
6
7scalar_t Observable::get_exp_uncertainty(std::pair<double, double> bins, std::string exp, UncertaintyType u_type) const {
8 return (*iobspp_obs)(ParamId(ParameterType::OBSERVABLE, "FOBS_" + exp, BinnedObservableId(this->id, bins).flha()), UncertaintyTypeMapper::d_type(u_type));
9}
10
11std::vector<ObservableValue> Observable::compute() const {
12 return decay_parent->compute_observable(id);
13}
14
18
19void Observable::add_dependences(const std::unordered_set<ParamId> &param_names) {
20 LOG_DEBUG("Adding parameter list to compound");
21 dependences.insert(param_names.begin(), param_names.end());
22}
23
24const std::unordered_set<ParamId> &Observable::get_dependences() const {
25 return dependences;
26}
UncertaintyType
#define LOG_DEBUG(...)
Macro for logging debug messages.
Definition Logger.h:45
High-level observable wrapper (user-facing) that connects experimental inputs to theory predictions.
std::string param_name(const ParamId &pid)
std::shared_ptr< IObsParameterProxy< ParamId, DataType, std::string, LhaID > > iobspp_obs
Proxy to experimental/observable parameters (typically ParameterType::OBSERVABLE).
Definition Observable.h:72
void add_dependences(const std::unordered_set< ParamId > &param_names)
Add many parameter dependences.
std::unordered_set< ParamId > dependences
Set of parameter identifiers the observable depends on.
Definition Observable.h:63
const std::unordered_set< ParamId > & get_dependences() const
Access the dependency set (read-only).
void add_dependence(const ParamId &param_name)
Add a single parameter dependence.
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.
Definition Observable.cpp:3
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.
Definition Observable.cpp:7
std::vector< ObservableValue > compute() const
Compute the theory prediction for this observable.
std::shared_ptr< DecayParent > decay_parent
Physics backend that computes the theory prediction for this observable.
Definition Observable.h:52
static DataType d_type(UncertaintyType t)
Returns the DataType corresponding to a given uncertainty type.
Identifies an observable together with a numerical bin.
Composite identifier for a single parameter.
Definition ParamID.h:57