Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
param_mutation_example.cpp

Example usage of ParameterSetter and ParameterShifter.

Example usage of ParameterSetter and ParameterShifter.This example demonstrates how to modify parameter values either by setting them directly or by applying a shift.

#include "Parameters.h"
int main() {
// Assume the Parameters system is already initialized elsewhere
ParamId pid{ParameterType::SM, "MASS", 24}; // W boson mass
setter.mutate(pid, 80.385); // Set the value directly
setter.change_mode(pid, ParameterMode::SHIFTABLE); // Allow shifts
shifter.mutate(pid, 0.1); // Apply a +0.1 GeV shift to the W mass
return 0;
}
Concrete mutator that shifts parameter values.
@ SHIFTABLE
The parameter value is shifted by an additive offset.
Model-dependent parameter repository and initialization strategies.
Concrete mutator that directly sets the value of parameters.
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.
Concrete mutator that shifts parameter values rather than directly setting them.
void mutate(const ParamId &pid, scalar_t value) override
Shifts the value of a parameter by a given amount.
Composite identifier for a single parameter.
Definition ParamID.h:57