Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
KlnuDecay.cpp
Go to the documentation of this file.
1#include "KlnuDecay.h"
2
6 cache.calc_K = PlnuCalculator(321, 13, C_A_K, C_P_K, p);
7
10 cache.calc_pi = PlnuCalculator(211, 13, C_A_pi, C_P_pi, p);
11
12 double f_K = (*p)({ParameterType::FLAVOR, "FCONST", {321, 1}}, DataType::VALUE);
13 double f_pi = (*p)({ParameterType::FLAVOR, "FCONST", {211, 1}}, DataType::VALUE);
14 double f_K__f_pi = (*p)({ParameterType::FLAVOR, "FCONSTRATIO", {321, 211, 1, 1}}, DataType::VALUE);
15
16 cache.f_corr = std::pow(f_K__f_pi * f_pi / f_K, 2);
17 cache.delta_em = (*p)({ParameterType::DECAY, "K_lnu", 1}, DataType::VALUE);
18}
19
21 double BR_K = cache.calc_K.BR_0_SM() * cache.calc_K.R_SM_BSM();
22 double BR_pi = cache.calc_pi.BR_0_SM() * cache.calc_pi.R_SM_BSM();
23 return BR_K / BR_pi * (1 - cache.delta_em) * cache.f_corr;
24}
25
27 return std::sqrt(cache.calc_K.R_SM_BSM() / cache.calc_pi.R_SM_BSM());
28}
29
30std::vector<ObservableValue> KlnuDecay::compute_observable(Observables obs) {
31 double value;
32 switch (obs) {
34 value = BR_K_BR_pi();
35 break;
37 value = R_mu23();
38 break;
39 default:
40 LOG_ERROR("IndexError", "Observable", ObservableMapper::str(obs), "doesn't belong to the decay", DecayMapper::str(this->id));
41 }
42
43 return {ObservableValue(ObservableMapper::to_id(obs), value)};
44}
45
46
47std::vector<ObservableValue> KlnuDecay::compute_observable(ObservableId obs) {
49}
Observables
Definition GeneralEnum.h:4
@ BR_K__MU_NU__BR_PI__MU_NU
#define LOG_ERROR(type,...)
Macro for logging error messages and terminating the application.
Definition Logger.h:41
std::complex< double > complex_t
Convenience alias for std::complex<double>.
Definition Utils.h:35
std::shared_ptr< IObsParameterProxy< ParamId, DataType, std::string, LhaID > > p
Parameter proxy for SM-like quantities used by the decay (may be SM/BSM depending on wiring).
std::shared_ptr< IObsWilsonProxy > w_proxy
Wilson proxy used at compute-time to query coefficients (matching/run).
Definition DecayParent.h:99
static std::optional< Observables > enum_of(const IdOf< ObservableTag > &id)
Attempts to recover the enum value associated with an identifier.
static IdOf< ObservableTag > to_id(Observables e)
Converts an enum value to an IdOf<Tag>.
static std::string str(const IdOf< ObservableTag > &id)
Returns the string representation of an identifier.
std::vector< ObservableValue > compute_observable(Observables obs) override
Compute an observable given a public observable enum.
Definition KlnuDecay.cpp:30
double BR_K_BR_pi()
Definition KlnuDecay.cpp:20
void load_params() override
Load and cache parameters needed by this decay.
Definition KlnuDecay.cpp:3
double R_mu23()
Definition KlnuDecay.cpp:26
PlnuCalculator calc_pi
Definition KlnuDecay.h:14
double f_corr
Definition KlnuDecay.h:11
PlnuCalculator calc_K
Definition KlnuDecay.h:13
double delta_em
Definition KlnuDecay.h:10
Container for a computed observable value, optionally binned.