Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
ParameterSetter.cpp
Go to the documentation of this file.
1#include "ParameterSetter.h"
2
3void ParameterSetter::mutate(const ParamId &pid, scalar_t value) {
4 if (!pid.type.has_value()) {
5 LOG_ERROR("LogicError", "Use of incomplete ParamId to mutate parameter. Please specify a ParameterType.");
6 }
7
9 LOG_WARN("Cannot set matching scale when Wilson coefficients are user input.");
10 return;
11 }
12
13 Parameters::GetInstance(pid.type.value())->setBlockValue(pid.block, pid.code, value);
14}
15
17 if (!pid.type.has_value()) {
18 LOG_ERROR("LogicError", "Use of incomplete ParamId to mutate parameter. Please specify a ParameterType.");
19 }
20
21 Parameters::GetInstance(pid.type.value())->changeParameterMode(pid, mode);
22}
@ HAS_WILSON_INPUT
User provided Wilson coefficient input.
#define LOG_ERROR(type,...)
Macro for logging error messages and terminating the application.
Definition Logger.h:41
#define LOG_WARN(...)
Macro for logging warning messages.
Definition Logger.h:40
ParameterMode
Defines the modes in which a parameter can operate.
Definition Parameter.h:45
const MemoryCache & getMemoryCache()
Retrieves the current memory cache.
static MemoryManager * GetInstance()
Retrieves the singleton instance of MemoryManager.
void change_mode(const ParamId &pid, ParameterMode mode) override
Changes the mode of a parameter (e.g., from FIXED to SHIFTABLE).
void mutate(const ParamId &pid, scalar_t value) override
Sets the value of a parameter.
static std::shared_ptr< Parameters > GetInstance(ParameterType id=ParameterType::SM)
Returns the singleton-like repository for a given parameter type.
std::map< ExternalFlag, bool > flags
External flags describing the nature of the inputs.
Definition Config.h:26
HyperisoConfig config
Config struct for various flags and runtime information.
Composite identifier for a single parameter.
Definition ParamID.h:57
std::optional< ParameterType > type
Optional high-level parameter category.
Definition ParamID.h:65
BlockName block
Name of the block where the parameter is stored.
Definition ParamID.h:73
LhaID code
Index or multi-index of the parameter inside the block.
Definition ParamID.h:82