Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
BllDecay.cpp
Go to the documentation of this file.
1#include "BllDecay.h"
2#include "wcoef_ids.hpp"
3
4
6 cache.G_F = (*p)(ParamId{ParameterType::SM, "SMINPUTS", 2}, DataType::VALUE);
7 cache.alpha_em = (*p)(ParamId{ParameterType::SM, "EW", {1, 2}}, DataType::VALUE);
8 cache.m_e = (*p)(ParamId{ParameterType::SM, "MASS", 11}, DataType::VALUE);
9 cache.m_mu = (*p)(ParamId{ParameterType::SM, "MASS", 13}, DataType::VALUE);
10 cache.m_tau = (*p)(ParamId{ParameterType::SM, "MASS", 15}, DataType::VALUE);
11 cache.m_Bd = (*p)(ParamId{ParameterType::FLAVOR, "FMASS", 511}, DataType::VALUE);
12 cache.m_Bs = (*p)(ParamId{ParameterType::FLAVOR, "FMASS", 531}, DataType::VALUE);
13 cache.f_Bd = (*p)(ParamId{ParameterType::FLAVOR, "FCONST", {511, 1}}, DataType::VALUE);
14 cache.f_Bs = (*p)(ParamId{ParameterType::FLAVOR, "FCONST", {531, 1}}, DataType::VALUE);
15 cache.tau_Bd = (*p)(ParamId{ParameterType::FLAVOR, "FLIFE", 511}, DataType::VALUE) / HBAR;
16 cache.tau_Bs = (*p)(ParamId{ParameterType::FLAVOR, "FLIFE", 531}, DataType::VALUE) / HBAR;
17 cache.lambda_d = (*p)(ParamId{ParameterType::SM, "VCKM", {2, 2}}, DataType::VALUE) * std::conj((*p)(ParamId{ParameterType::SM, "VCKM", {2, 0}}, DataType::VALUE));
18 cache.lambda_s = (*p)(ParamId{ParameterType::SM, "VCKM", {2, 2}}, DataType::VALUE) * std::conj((*p)(ParamId{ParameterType::SM, "VCKM", {2, 1}}, DataType::VALUE));
19 cache.ys = (*p)(ParamId{ParameterType::DECAY, "B_ll", 1}, DataType::VALUE);
20 cache.eta_BBS = (*p)(ParamId{ParameterType::DECAY, "B_ll", 2}, DataType::VALUE);
21 cache.r_d = cache.m_Bd / ((*p)(ParamId{ParameterType::SM, "QCD", {5, 2}}, DataType::VALUE) + (*p)(ParamId{ParameterType::SM, "MASS", 1}, DataType::VALUE));
22 cache.r_s = cache.m_Bs / ((*p)(ParamId{ParameterType::SM, "QCD", {5, 2}}, DataType::VALUE) + (*p)(ParamId{ParameterType::SM, "MASS", 3}, DataType::VALUE));
23
25 cache.C10 = w_proxy->getFR(WGroup::B, WCoef::C10, w_config.order);
26 cache.CQ1 = w_proxy->getFR(WGroup::BScalar, WCoef::CQ1_MU, w_config.order); // muon default for legacy debug/cache
28 // cache.CQ1 = 0;
29 // cache.CQ2 = 0;
30 cache.C10_m = cache.C10 - w_proxy->getFR(WGroup::BPrime, WCoef::CP10, w_config.order);
33
34 // printf("f_Bs = %.5e\n", cache.f_Bs);
35 // printf("y_s = %.5e\n", cache.ys);
36 // printf("eta_BBs = %.5e\n", cache.eta_BBS);
37 // printf("r_s = %.5e\n", cache.r_s);
38 // printf("C10 = %.4e + %.4e I \n", std::real(cache.C10), std::imag(cache.C10));
39 // printf("Cp10 = %.4e + %.4e I \n", std::real(w_proxy->getFR(WGroup::BPrime, WCoef::CP10, w_config.order)), std::imag(w_proxy->getFR(WGroup::BPrime, WCoef::CP10, w_config.order)));
40 // printf("CQ1 = %.4e + %.4e I \n", std::real(cache.CQ1), std::imag(cache.CQ1));
41 // printf("CpQ1 = %.4e + %.4e I \n", std::real(w_proxy->getFR(WGroup::BPrime, WCoef::CPQ1_MU, w_config.order)), std::imag(w_proxy->getFR(WGroup::BPrime, WCoef::CPQ1_MU, w_config.order)));
42 // printf("CQ2 = %.4e + %.4e I \n", std::real(cache.CQ2), std::imag(cache.CQ2));
43 // printf("CpQ2 = %.4e + %.4e I \n", std::real(w_proxy->getFR(WGroup::BPrime, WCoef::CPQ2_MU, w_config.order)), std::imag(w_proxy->getFR(WGroup::BPrime, WCoef::CPQ2_MU, w_config.order)));
44}
45
46double BllDecay::BR_avg_Bq_ll(int q, int gen) {
47 if (q != 1 && q != 3) LOG_ERROR("ValueError", "In Bq > l l, q can only be d (1) or s (3), found", q);
48
49 double m_B, f_B, tau_B, r_q;
50 complex_t lambda_q;
51 if (q == 1) {
52 m_B = cache.m_Bd;
53 f_B = cache.f_Bd;
54 tau_B = cache.tau_Bd;
55 lambda_q = cache.lambda_d;
56 r_q = cache.r_d;
57 } else {
58 m_B = cache.m_Bs;
59 f_B = cache.f_Bs;
60 tau_B = cache.tau_Bs;
61 lambda_q = cache.lambda_s;
62 r_q = cache.r_s;
63 }
64
65 const int lepton_index = gen - 1;
70
71 double m_l = gen == 1 ? cache.m_e : gen == 2 ? cache.m_mu : cache.m_tau;
72 double x_l = m_l / m_B;
73 double beta_l = std::sqrt(1. - 4. * std::pow(x_l, 2));
74
75 double pref = std::pow(cache.G_F * cache.alpha_em, 2) / (64 * std::pow(M_PI, 3)) * cache.eta_BBS;
76 return pref * std::pow(f_B * std::abs(lambda_q), 2) * std::pow(m_B, 3) * tau_B * beta_l * (
77 std::pow(beta_l * std::abs(r_q * CQ1_m), 2)
78 + std::pow(std::abs(r_q * CQ2_m + 2 * x_l * cache.C10_m), 2)
79 );
80}
81
82double BllDecay::BR_untag_Bs_ll(int gen) {
83 const int lepton_index = gen - 1;
88
89 double m_l = gen == 1 ? cache.m_e : gen == 2 ? cache.m_mu : cache.m_tau;
90 double x_l = m_l / cache.m_Bs;
91 double beta_l = std::sqrt(1. - 4. * std::pow(x_l, 2));
92 double f = cache.r_s / (2. * x_l);
93 complex_t S = beta_l * f * CQ1_m / cache.C10_SM;
94 complex_t P = (cache.C10_m + f * CQ2_m) / cache.C10_SM;
95 double abs_S = std::pow(std::abs(S), 2);
96 double abs_P = std::pow(std::abs(P), 2);
97 double A = (abs_P * std::cos(2 * std::arg(P)) - abs_S * std::cos(2 * std::arg(S))) / (abs_P + abs_S);
98
99 double untag_factor = (1. + A * cache.ys) / (1. - std::pow(cache.ys, 2));
100 return untag_factor * BR_avg_Bq_ll(3, gen);
101}
102
103std::vector<ObservableValue> BllDecay::compute_observable(Observables obs) {
104 double value;
105 switch (obs) {
107 value = BR_avg_Bq_ll(1, 2);
108 break;
110 value = BR_avg_Bq_ll(3, 2);
111 break;
113 value = BR_untag_Bs_ll(2);
114 break;
116 value = BR_avg_Bq_ll(1, 1);
117 break;
119 value = BR_avg_Bq_ll(3, 1);
120 break;
122 value = BR_untag_Bs_ll(1);
123 break;
124 default:
125 LOG_ERROR("IndexError", "Observable", ObservableMapper::str(obs), "doesn't belong to the decay", DecayMapper::str(this->id));
126 }
127
128 return {ObservableValue(ObservableMapper::to_id(obs), value)};
129}
130
131std::vector<ObservableValue> BllDecay::compute_observable(ObservableId obs) {
133}
Observables
Definition GeneralEnum.h:4
#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
double BR_untag_Bs_ll(int gen)
Definition BllDecay.cpp:82
void load_params() override
Load and cache parameters needed by this decay.
Definition BllDecay.cpp:5
double BR_avg_Bq_ll(int q, int gen)
Definition BllDecay.cpp:46
std::vector< ObservableValue > compute_observable(Observables obs) override
Compute an observable given a public observable enum.
Definition BllDecay.cpp:103
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
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.
static WCoef cpq1_for_lepton_index(int lepton_index)
static WCoef cq1_for_lepton_index(int lepton_index)
static WCoef cq2_for_lepton_index(int lepton_index)
static WCoef cpq2_for_lepton_index(int lepton_index)
constexpr double HBAR
Definition constants.h:23
double f(double x)
Wilson special function f depending on x.
double f_Bs
Definition BllDecay.h:17
complex_t CQ2_m
Definition BllDecay.h:33
double eta_BBS
Definition BllDecay.h:23
double ys
Definition BllDecay.h:22
double tau_Bs
Definition BllDecay.h:19
complex_t lambda_s
Definition BllDecay.h:21
complex_t CQ2
Definition BllDecay.h:30
double G_F
Definition BllDecay.h:9
double tau_Bd
Definition BllDecay.h:18
double r_s
Definition BllDecay.h:25
complex_t C10
Definition BllDecay.h:28
double m_e
Definition BllDecay.h:12
double m_mu
Definition BllDecay.h:11
complex_t CQ1
Definition BllDecay.h:29
complex_t C10_SM
Definition BllDecay.h:27
double m_Bd
Definition BllDecay.h:14
complex_t lambda_d
Definition BllDecay.h:20
double r_d
Definition BllDecay.h:24
complex_t CQ1_m
Definition BllDecay.h:32
double m_tau
Definition BllDecay.h:13
double m_Bs
Definition BllDecay.h:15
complex_t C10_m
Definition BllDecay.h:31
double f_Bd
Definition BllDecay.h:16
double alpha_em
Definition BllDecay.h:10
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