Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
Observable.h
Go to the documentation of this file.
1#ifndef HYPERISO_OBSERVABLE_H
2#define HYPERISO_OBSERVABLE_H
3
4#include "Include.h"
5#include "DecayParent.h"
6
47protected:
50
52 std::shared_ptr<DecayParent> decay_parent;
53
63 std::unordered_set<ParamId> dependences;
64
72 std::shared_ptr<IObsParameterProxy<ParamId, DataType, std::string, LhaID>> iobspp_obs;
73
74public:
83
87 ObservableId getId() const { return id; }
88
99 scalar_t get_exp_val(std::pair<double, double> bins = {0.,0.}, std::string exp = "DEFAULT") const;
100
112 scalar_t get_exp_uncertainty(std::pair<double, double> bins = {0.,0.}, std::string exp = "DEFAULT", UncertaintyType u_type=UncertaintyType::COMBINED) const;
113
122 std::vector<ObservableValue> compute() const;
123
128 void add_dependence(const ParamId& param_name);
129
137 void add_dependences(const std::unordered_set<ParamId>& param_names);
138
143 const std::unordered_set<ParamId>& get_dependences() const;
144};
145
146
147#endif // HYPERISO_OBSERVABLE_H
Base class for observable/decay computation modules.
UncertaintyType
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
const ObservableId id
Identifier of this observable (used for experimental lookup and theory computation routing).
Definition Observable.h:49
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.
ObservableId getId() const
Return the observable id.
Definition Observable.h:87
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
Observable(ObservableId id, std::shared_ptr< DecayParent > decay_parent, std::shared_ptr< IObsParameterProxy< ParamId, DataType, std::string, LhaID > > iobspp_obs)
Construct an Observable.
Definition Observable.h:82
Composite identifier for a single parameter.
Definition ParamID.h:57