Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
ParameterProxy.cpp
Go to the documentation of this file.
1#include "ParameterProxy.h"
2
4 if (!ParameterProxy::ALLOWED.contains(type)) {
5 LOG_ERROR("ValueError", "PhysicalModel cannot access parameter type", ParameterTypeMapper::str(type));
6 }
7 this->pp = ParameterProvider(type);
8}
9
10scalar_t ParameterProxy::operator()(const std::string& block, const LhaID& id) const {
11 if (pp.get_type() == ParameterType::WILSON) {
12 return pp.exists(block, id) ? pp(block, id) : scalar_t();
13 }
14 LOG_INFO("Not WILSON");
15 return pp(block, id);
16};
17
18bool ParameterProxy::exist(const std::string& block, const LhaID& id) const {
19 return pp.exists(block, id);
20}
21
22double ParameterProxy::get_scale(const std::string& block) const {
23 return pp.get_scale(block);
24}
ParameterType
#define LOG_ERROR(type,...)
Macro for logging error messages and terminating the application.
Definition Logger.h:41
#define LOG_INFO(...)
Macro for logging informational messages.
Definition Logger.h:39
Concrete IParameterProxy backed by ParameterProvider / Parameters.
static std::string str(const IdOf< ParamTypeTag > &id)
Returns the string representation associated with an identifier.
Provides access to parameter values, errors, and existence checks.
double get_scale(const std::string &block) const
Checks if a parameter identified by block name and LHA ID exists.
ParameterType get_type() const
Retrieves the renormalization scale associated with a given block.
bool exists(const ParamId &pid) const
Checks if a parameter identified by ParamId exists.
scalar_t operator()(const std::string &block, const LhaID &id) const override
Retrieves a parameter value from (block, id).
bool exist(const std::string &block, const LhaID &id) const override
Checks whether a parameter exists.
double get_scale(const std::string &block) const override
Returns the block scale.
ParameterProxy(ParameterType type)
Constructs a proxy bound to a specific ParameterType.
Represents an identifier of a LHA element, possibly containing several sub-ids.
Definition LhaID.h:56