Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
M0_Mixing.cpp
Go to the documentation of this file.
1#include "M0_Mixing.h"
2
4 cache.G_F = (*p)(ParamId{ParameterType::SM, "SMINPUTS", 2}, DataType::VALUE);
5 cache.m_W = (*p)(ParamId{ParameterType::SM, "MASS", 24}, DataType::VALUE);
6 cache.mu_W = (*p)(ParamId{ParameterType::WILSON, "EW_SCALE", 1}, DataType::VALUE);
7 cache.x_c = pow((*p)(ParamId{ParameterType::SM, "MASS", 4}, DataType::VALUE) / cache.m_W, 2);
8 cache.x_t = std::pow((*iobs_qcdp)(MassConfig{6, cache.mu_W, MassType::POLE, MassType::POLE}) / cache.m_W, 2);
9 cache.lambda_c = std::conj((*p)(ParamId{ParameterType::SM, "VCKM", {1, 0}}, DataType::VALUE)) * (*p)(ParamId{ParameterType::SM, "VCKM", {1, 1}}, DataType::VALUE);
10 cache.lambda_t = std::conj((*p)(ParamId{ParameterType::SM, "VCKM", {2, 0}}, DataType::VALUE)) * (*p)(ParamId{ParameterType::SM, "VCKM", {2, 1}}, DataType::VALUE);
11
12 cache.m_Bd = (*p)(ParamId{ParameterType::FLAVOR, "FMASS", 511}, DataType::VALUE);
13 cache.m_Bs = (*p)(ParamId{ParameterType::FLAVOR, "FMASS", 531}, DataType::VALUE);
14 cache.m_K = (*p)(ParamId{ParameterType::FLAVOR, "FMASS", 311}, DataType::VALUE);
15 cache.m_D = (*p)(ParamId{ParameterType::FLAVOR, "FMASS", 421}, DataType::VALUE);
16 cache.tau_D = (*p)(ParamId{ParameterType::FLAVOR, "FLIFE", 421}, DataType::VALUE);
17 cache.G12_s = (*p)(ParamId{ParameterType::DECAY, "M0_Mix", {5, 1}}, DataType::VALUE) * std::exp(I * (*p)(ParamId{ParameterType::DECAY, "M0_Mix", {5, 2}}, DataType::VALUE));
18 cache.delta_G_s = (*p)(ParamId{ParameterType::DECAY, "M0_Mix", 6}, DataType::VALUE);
19 cache.kappa_e = (*p)(ParamId{ParameterType::DECAY, "M0_Mix", 7}, DataType::VALUE);
20 cache.eta_cc = (*p)(ParamId{ParameterType::DECAY, "M0_Mix", 11}, DataType::VALUE);
21 cache.eta_ct = (*p)(ParamId{ParameterType::DECAY, "M0_Mix", 12}, DataType::VALUE);
22 cache.alpha_s_mu_W = (*iobs_qcdp)(AlphasConfig{cache.mu_W, MassType::POLE, MassType::POLE});
25
26 std::array<double, 5> B {
27 (*p)(ParamId{ParameterType::FLAVOR, "FBAG", LhaID(511, 1)}, DataType::VALUE),
32 };
33 double mf2 = pow(cache.m_Bd * (*p)(ParamId{ParameterType::FLAVOR, "FCONST", {511, 1}}, DataType::VALUE), 2);
34 populate_Q_from_bag(cache.Q_Bd, B, (*p)(ParamId{ParameterType::DECAY, "M0_Mix", 1}, DataType::VALUE), mf2, true);
35
36 B = {
37 (*p)(ParamId{ParameterType::FLAVOR, "FBAG", LhaID(531, 1)}, DataType::VALUE),
38 (*p)(ParamId{ParameterType::FLAVOR, "FBAG", LhaID(531, 2)}, DataType::VALUE),
39 (*p)(ParamId{ParameterType::FLAVOR, "FBAG", LhaID(531, 3)}, DataType::VALUE),
40 (*p)(ParamId{ParameterType::FLAVOR, "FBAG", LhaID(531, 4)}, DataType::VALUE),
41 (*p)(ParamId{ParameterType::FLAVOR, "FBAG", LhaID(531, 5)}, DataType::VALUE),
42 };
43 mf2 = pow(cache.m_Bs * (*p)(ParamId{ParameterType::FLAVOR, "FCONST", {531, 1}}, DataType::VALUE), 2);
44 populate_Q_from_bag(cache.Q_Bs, B, (*p)(ParamId{ParameterType::DECAY, "M0_Mix", 2}, DataType::VALUE), mf2, true);
45
46 B = {
47 (*p)(ParamId{ParameterType::FLAVOR, "FBAG", LhaID(311, 1)}, DataType::VALUE),
48 (*p)(ParamId{ParameterType::FLAVOR, "FBAG", LhaID(311, 2)}, DataType::VALUE),
49 (*p)(ParamId{ParameterType::FLAVOR, "FBAG", LhaID(311, 3)}, DataType::VALUE),
50 (*p)(ParamId{ParameterType::FLAVOR, "FBAG", LhaID(311, 4)}, DataType::VALUE),
51 (*p)(ParamId{ParameterType::FLAVOR, "FBAG", LhaID(311, 5)}, DataType::VALUE),
52 };
53 double f_K = (*p)(ParamId{ParameterType::FLAVOR, "FCONST", {211, 1}}, DataType::VALUE) * (*p)(ParamId{ParameterType::FLAVOR, "FCONSTRATIO", {321, 211, 1, 1}}, DataType::VALUE);
54 mf2 = pow(cache.m_K * f_K, 2);
55 populate_Q_from_bag(cache.Q_K, B, (*p)(ParamId{ParameterType::DECAY, "M0_Mix", 3}, DataType::VALUE), mf2, true);
56
57 cache.Q_D = {
58 (*p)(ParamId{ParameterType::DECAY, "M0_Mix", LhaID(4, 1)}, DataType::VALUE),
59 (*p)(ParamId{ParameterType::DECAY, "M0_Mix", LhaID(4, 2)}, DataType::VALUE),
60 (*p)(ParamId{ParameterType::DECAY, "M0_Mix", LhaID(4, 3)}, DataType::VALUE),
61 (*p)(ParamId{ParameterType::DECAY, "M0_Mix", LhaID(4, 4)}, DataType::VALUE),
62 (*p)(ParamId{ParameterType::DECAY, "M0_Mix", LhaID(4, 5)}, DataType::VALUE),
63 };
64
65 populate_C(cache.C_Bd, (*p)(ParamId{ParameterType::DECAY, "M0_Mix", 8}, DataType::VALUE), 0);
66 populate_C(cache.C_Bs, (*p)(ParamId{ParameterType::DECAY, "M0_Mix", 8}, DataType::VALUE), 8);
67 populate_C(cache.C_K, (*p)(ParamId{ParameterType::DECAY, "M0_Mix", 9}, DataType::VALUE), 16);
68 populate_C(cache.C_D, (*p)(ParamId{ParameterType::DECAY, "M0_Mix", 10}, DataType::VALUE), 24);
69
70 cache.C1_Bd_SM = std::pow(cache.G_F * cache.m_W * std::conj((*p)(ParamId{ParameterType::SM, "VCKM", {2, 0}}, DataType::VALUE)) * (*p)(ParamId{ParameterType::SM, "VCKM", {2, 2}}, DataType::VALUE), 2) * S0(cache.x_t) / (4 * PI2);
71 cache.C1_Bs_SM = std::pow(cache.G_F * cache.m_W * std::conj((*p)(ParamId{ParameterType::SM, "VCKM", {2, 1}}, DataType::VALUE)) * (*p)(ParamId{ParameterType::SM, "VCKM", {2, 2}}, DataType::VALUE), 2) * S0(cache.x_t) / (4 * PI2);
72}
73
74double M0Mixing::S_18(double x) {
75 return -(64.-68.*x-17.*x*x+11.*x*x*x)/(4.*pow(1.-x,2.)) + (32.-68.*x+32.*x*x-28.*x*x*x+3.*pow(x,4.))/(2.*pow(1.-x,3.))*log(x) + x*x*(4.-7.*x+7.*x*x-2.*x*x*x)/(2.*pow(1.-x,4.))*pow(log(x),2.) + 2.*x*(4. - 7.*x - 7.*x*x + x*x*x) / pow(1.-x,3.) * Li2(1.-x) + 16./x*(PI2/6. - Li2(1.-x));
76}
77
78double M0Mixing::S_11(double x) {
79 return -x*(4.-39.*x+168.*x*x+11.*x*x*x)/(4.*pow(1.-x,3.)) - 3.*x*(4.-24.*x+36.*x*x+7.*x*x*x+pow(x,4.))/(2.*pow(1.-x,4.))*log(x) + 3.*x*x*x*(13.+4.*x+x*x)/(2.*pow(1.-x,4.))*pow(log(x),2.) - 3*x*x*x*(5.+x)/pow(1.-x,3.)*Li2(1.-x);
80}
81
82double M0Mixing::S_1t(double x) {
83 return (S_18(x) + 4. * S_11(x)) / 3.;
84}
85
86double M0Mixing::dS0_dx(double x) {
87 return 3.*x*x/(2.*pow(x-1.,3.)) + x*(-11.+2.*x)/(4.*pow(x-1.,2.)) + (4.-11.*x+x*x)/(4.*pow(x-1.,2.)) - x*(4.-11.*x+x*x)/(2.*pow(x-1.,3.)) + 9.*x*x*log(x)/(2.*pow(x-1.,3.)) - 9.*x*x*x*log(x)/(2.*pow(x-1.,4.));
88}
89
90double M0Mixing::S0_ct(double x_c, double x_t) {
91 return x_c*(std::log(x_t/x_c) - 3.*x_t/(4.*(1-x_t)) -3*x_t*x_t*std::log(x_t)/(4.*std::pow(1.-x_t,2.)));
92}
93
94double M0Mixing::F_S1(double x, double m_W, double mu_W, double mu_t) {
95 return 8 * x * dS0_dx(x) * std::log(std::pow(mu_t / m_W, 2)) + 2 * S0(x) * std::log(std::pow(mu_W / m_W, 2));
96}
97
98double M0Mixing::Q_i(int i, double B_i, double r_chi, double mf2, bool is_B) {
99 double Q_i = N_i.at(i) * mf2 * B_i;
100 if (i > 1) {
101 Q_i *= is_B ? r_chi + d_i.at(i) : r_chi;
102 }
103 return Q_i;
104}
105
106void M0Mixing::populate_Q_from_bag(std::array<double, 5>& Q, const std::array<double, 5>& B, double r_chi, double mf2, bool is_B) {
107 for (size_t i = 0; i < 5; i++) {
108 Q[i] = Q_i(i, B[i], r_chi, mf2, is_B);
109 }
110}
111
112void M0Mixing::populate_C(std::array<complex_t, 8>& C, double hadronic_scale, size_t offset) {
113 ObsParameterMutator().set(ParamId{ParameterType::WILSON, "B_SCALE", 1}, hadronic_scale);
115 for (size_t i = 0; i < 8; i++) {
116 C[i] = this->w_proxy->getFR(WGroup::MESON_MIXING, ids[i + offset], this->w_config.order, ContributionType::BSM);
117 }
118}
119
120complex_t M0Mixing::M_12_NP(const std::array<complex_t, 8>& C, const std::array<double, 5>& Q, double m_M) {
121 complex_t M_12 {0.0};
122 for (size_t i = 0; i < 8; i++) {
123 M_12 += C[i] * Q[i % 5];
124 }
125
126 return M_12 / (2 * m_M);
127}
128
130 double eta_2B = std::pow(cache.alpha_s_mu_W, 6./23) * (1 + cache.alpha_s_mu_W / (4 * PI) * ((S_1t(cache.x_t) + F_S1(cache.x_t, cache.m_W, cache.mu_W, cache.mu_W)) / S0(cache.x_t) + B_t - J_5));
131 double c_RGI_B = std::pow(cache.alpha_s_mu_b, -6./23) * (1 + cache.alpha_s_mu_b * J_5 / (4 * PI));
132
133 // NF : Ad-hoc shift from 1912.07621 to match HI (TODO : Ask Nazila or Siavash why needed ?)
134 double shift = (gen == 1 ? 0.06e12 : 2.7e12) / 2 * HBAR;
135
136 return gen == 1 ? (cache.C1_Bd_SM * eta_2B * c_RGI_B * cache.Q_Bd[0] / (2. * cache.m_Bd) + shift) : (cache.C1_Bs_SM * eta_2B * c_RGI_B * cache.Q_Bs[0] / (2 * cache.m_Bs) + shift);
137}
138
140 double eta_tt = std::pow(cache.alpha_s_mu_c, 2./9.)*std::pow(cache.alpha_s_mu_b/cache.alpha_s_mu_c, 6./25.)*std::pow(cache.alpha_s_mu_W/cache.alpha_s_mu_b, 6./23.)*( 1. + cache.alpha_s_mu_c/4./PI*(J_4-J_3) + cache.alpha_s_mu_b/4./PI*(J_5-J_4) +cache.alpha_s_mu_W/4./PI*( (S_1t(cache.x_t) + F_S1(cache.x_t, cache.m_W, cache.mu_W, cache.mu_W))/S0(cache.x_t) + B_t - J_5));
141 complex_t C_1_sd = std::pow(cache.lambda_c, 2) * cache.eta_cc * cache.x_c + std::pow(cache.lambda_t, 2) * eta_tt * S0(cache.x_t) + 2. * cache.lambda_t * cache.lambda_c * cache.eta_ct * S0_ct(cache.x_c, cache.x_t);
142 double c_RGI_K = std::pow(cache.alpha_s_mu_c, -2./9) * (1 + cache.alpha_s_mu_c * J_3 / (4 * PI));
143 return std::pow(cache.G_F * cache.m_W / (2 * PI), 2) / (2 * cache.m_K) * c_RGI_K * C_1_sd * cache.Q_K[0];
144}
145
146// B mixing observables
147
148double M0Mixing::delta_M_B(int gen) {
149 complex_t M_12 = gen == 1 ? M_12_NP(cache.C_Bd, cache.Q_Bd, cache.m_Bd) : M_12_NP(cache.C_Bs, cache.Q_Bs, cache.m_Bs);
150 M_12 += M_12_B_SM(gen);
151 return 2 * std::abs(M_12) * GEV_TO_INV_PS;
152}
153
154double M0Mixing::phi_q(int gen) {
155 complex_t M_12 = gen == 1 ? M_12_NP(cache.C_Bd, cache.Q_Bd, cache.m_Bd) : M_12_NP(cache.C_Bs, cache.Q_Bs, cache.m_Bs);
156 M_12 += M_12_B_SM(gen);
157 return std::arg(M_12);
158}
159
160// B_s specific observables
161
163 complex_t M_12 = M_12_NP(cache.C_Bs, cache.Q_Bs, cache.m_Bs) + M_12_B_SM(2);
164 return std::tan(std::arg(-M_12 / cache.G12_s)) * cache.delta_G_s / (2 * std::abs(M_12) / HBAR * 1e-12);
165}
166
167// K mixing observables
168
170 complex_t M_12 = M_12_NP(cache.C_K, cache.Q_K, cache.m_K) + M_12_K_SM();
171 return cache.kappa_e / (2 * RT2) * std::abs(std::imag(M_12) / std::real(M_12));
172}
173
175 complex_t M_12 = M_12_NP(cache.C_K, cache.Q_K, cache.m_K) + M_12_K_SM();
176 return 2. * std::real(M_12) * GEV_TO_INV_PS;
177}
178
179// D mixing observables
180
182 complex_t M_12 = M_12_NP(cache.C_D, cache.Q_D, cache.m_D);
183 return 2 * cache.tau_D * std::abs(M_12) * GEV_TO_INV_S;
184}
185
186std::vector<ObservableValue> M0Mixing::compute_observable(Observables obs) {
187 double value;
188 switch (obs) {
189 case Observables::PHI_D:
190 value = phi_q(1);
191 break;
193 value = delta_M_B(1);
194 break;
195 case Observables::PHI_S:
196 value = phi_q(2);
197 break;
199 value = delta_M_B(2);
200 break;
201 case Observables::A_FS:
202 value = a_fs();
203 break;
205 value = delta_M_K();
206 break;
208 value = epsilon_K();
209 break;
210 case Observables::X_D:
211 value = x_D();
212 break;
213 default:
214 LOG_ERROR("IndexError", "Observable", ObservableMapper::str(obs), "doesn't belong to the decay", DecayMapper::str(this->id));
215 }
216
217 return {ObservableValue(ObservableMapper::to_id(obs), value)};
218}
219
220std::vector<ObservableValue> M0Mixing::compute_observable(ObservableId obs) {
222}
Observables
Definition GeneralEnum.h:4
@ MESON_MIXING
#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
WilsonBuildConfig w_config
Wilson build configuration used when enabling this decay (scales, order, groups).
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
std::shared_ptr< IObsQCDProxy > iobs_qcdp
QCD proxy (alpha_s, running masses, constants...).
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.
double S0_ct(double x_c, double x_t)
Definition M0_Mixing.cpp:90
double delta_M_K()
double Q_i(int i, double B_i, double r_chi, double mf2, bool is_B=false)
Definition M0_Mixing.cpp:98
complex_t M_12_K_SM()
double delta_M_B(int gen)
complex_t M_12_B_SM(int gen)
double phi_q(int gen)
double a_fs()
double S_18(double x)
Definition M0_Mixing.cpp:74
double dS0_dx(double x)
Definition M0_Mixing.cpp:86
double F_S1(double x, double m_W, double mu_W, double mu_t)
Definition M0_Mixing.cpp:94
double x_D()
void load_params() override
Load and cache parameters needed by this decay.
Definition M0_Mixing.cpp:3
void populate_C(std::array< complex_t, 8 > &C, double hadronic_scale, size_t offset=0)
std::vector< ObservableValue > compute_observable(Observables obs) override
Compute an observable given a public observable enum.
double epsilon_K()
complex_t M_12_NP(const std::array< complex_t, 8 > &C, const std::array< double, 5 > &Q, double m_M)
void populate_Q_from_bag(std::array< double, 5 > &Q, const std::array< double, 5 > &B, double r_chi, double mf2, bool is_B)
double S_1t(double x)
Definition M0_Mixing.cpp:82
double S_11(double x)
Definition M0_Mixing.cpp:78
void set(const ParamId &, scalar_t) override
Assigns an absolute value to a parameter.
static std::vector< WCoef > get_group(WGroup g)
Returns the list of Wilson coefficients belonging to a WGroup.
constexpr double PI
Definition constants.h:7
constexpr double HBAR
Definition constants.h:23
constexpr double GEV_TO_INV_S
Definition constants.h:30
constexpr std::complex< double > I
Definition constants.h:20
constexpr double PI2
Definition constants.h:8
constexpr double GEV_TO_INV_PS
Definition constants.h:29
constexpr double RT2
Definition constants.h:15
double Li2(double x)
Computes the dilogarithm function Li2(x).
Definition polylog.cpp:1257
scalar_t pow(const scalar_t &base, const scalar_t &exp)
Definition scalar.cpp:75
double S0(double x)
Wilson special function S0 depending on xt.
Configuration for evaluating the strong coupling constant .
Definition Configs.h:206
Represents an identifier of a LHA element, possibly containing several sub-ids.
Definition LhaID.h:56
double alpha_s_mu_b
Definition M0_Mixing.h:19
std::array< double, 5 > Q_D
Definition M0_Mixing.h:24
complex_t C1_Bs_SM
Definition M0_Mixing.h:30
std::array< double, 5 > Q_Bd
Definition M0_Mixing.h:21
double mu_W
Definition M0_Mixing.h:11
std::array< double, 5 > Q_K
Definition M0_Mixing.h:23
double m_Bd
Definition M0_Mixing.h:14
std::array< double, 5 > Q_Bs
Definition M0_Mixing.h:22
double tau_D
Definition M0_Mixing.h:15
double eta_cc
Definition M0_Mixing.h:18
double alpha_s_mu_W
Definition M0_Mixing.h:19
std::array< complex_t, 8 > C_D
Definition M0_Mixing.h:28
complex_t lambda_c
Definition M0_Mixing.h:13
std::array< complex_t, 8 > C_Bs
Definition M0_Mixing.h:26
complex_t G12_s
Definition M0_Mixing.h:16
double alpha_s_mu_c
Definition M0_Mixing.h:19
complex_t C1_Bd_SM
Definition M0_Mixing.h:29
double kappa_e
Definition M0_Mixing.h:18
std::array< complex_t, 8 > C_K
Definition M0_Mixing.h:27
double delta_G_s
Definition M0_Mixing.h:17
double eta_ct
Definition M0_Mixing.h:18
complex_t lambda_t
Definition M0_Mixing.h:13
double m_Bs
Definition M0_Mixing.h:14
std::array< complex_t, 8 > C_Bd
Definition M0_Mixing.h:25
Configuration for computing a particle mass at a given scale.
Definition Configs.h:242
Container for a computed observable value, optionally binned.
Composite identifier for a single parameter.
Definition ParamID.h:57
QCDOrder order
Perturbative QCD order used for the evolution and matching of Wilson coefficients....
Definition Configs.h:54