Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
ParameterProvider.h
Go to the documentation of this file.
1#ifndef PARAMETERPROVIDER_H
2#define PARAMETERPROVIDER_H
3
4#include "IDataProvider.h"
5#include "Include.h"
6#include "Parameters.h"
7
53class ParameterProvider : public IDataProvider<ParameterProvider> {
54public:
62 ParameterProvider() = default;
63
72 inline ParameterProvider(ParameterType p_type) : p_type(p_type) { Parameters::GetInstance(p_type); }
73
83 scalar_t operator()(const ParamId& pid, DataType d_type=DataType::VALUE) const;
84
97 scalar_t operator()(const std::string& block, const LhaID& id, DataType d_type=DataType::VALUE) const;
98
105 bool exists(const ParamId& pid) const;
106
113 bool exists(const std::string& block, const LhaID& id) const;
114
125 double get_scale(const std::string& block) const;
126
135 ParameterType get_type() const;
136
143 std::shared_ptr<Parameter> get_parameter(const ParamId& pid) const;
144
145private:
147 std::optional<ParameterType> p_type;
148
162 scalar_t get_value(const ParamId& pid, DataType d_type) const;
163};
164
165
166#endif // PARAMETERPROVIDER_H
ParameterType
DataType
Model-dependent parameter repository and initialization strategies.
Generic interface for providing data through callable and exist methods.
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.
std::shared_ptr< Parameter > get_parameter(const ParamId &pid) const
Retrieves the actual Parameter object corresponding to the given ParamId.
scalar_t operator()(const ParamId &pid, DataType d_type=DataType::VALUE) const
Retrieves a parameter value based on ParamId and requested data type.
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.
ParameterProvider()=default
Default constructor (untyped provider).
ParameterProvider(ParameterType p_type)
Constructs a provider bound to a specific ParameterType.
static std::shared_ptr< Parameters > GetInstance(ParameterType id=ParameterType::SM)
Returns the singleton-like repository for a given parameter type.
Represents an identifier of a LHA element, possibly containing several sub-ids.
Definition LhaID.h:56
Composite identifier for a single parameter.
Definition ParamID.h:57