Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
BVQCDfCalculator.cpp
Go to the documentation of this file.
1#include "BVQCDfCalculator.h"
2
3BVQCDfCalculator::BVQCDfCalculator(int B_id, int V_id, double mu_b, const std::map<WCoef, complex_t> &C, std::shared_ptr<BVFFCalculator> ff_calculator, B_FF_Type ff_tp,
5 std::shared_ptr<IObsQCDProxy> iobs_qcdp) :
6 BaseQCDfCalculator(B_id, V_id, mu_b, C, ff_tp, p, iobs_qcdp)
7{
8 this->ff_calculator = ff_calculator;
9}
10
11double BVQCDfCalculator::F_perp(double s) {
12 if (fpeq(s, 0.0))
13 return 1.0 + this->a_1_perp + this->a_2_perp;
14
15 double d = s - 1.;
16 double d2 = d * d;
17 double d3 = d2 * d;
18 double d4 = d3 * d;
19 double d5 = d4 * d;
20 double s2 = s * s;
21 double ls = std::log(s);
22 double f0 = (s + 1.) / d2 - 2. * s * ls / d3;
23 double f1 = -(s2 + 10. * s + 1.) / d3 + 6. * s * (s + 1) * ls / d4;
24 double f2 = (s + 1.) * (s2 + 28. * s + 1.) / d4 - 12. * s * (s2 + 3. * s + 1.) * ls / d5;
25 return f0 + this->a_1_perp * f1 + this->a_2_perp * f2;
26}
27
28double BVQCDfCalculator::X_perp(double s) {
29 double u0 = 1 - this->Lambda_h / this->m_B;
30 double u02 = u0 * u0;
31 double u03 = u02 * u0;
32
33 if (fpeq(s, 0.0)) {
34 double x0 = -2 * u0 - 2 * std::log(1 - u0);
35 double x1 = -6*u02 - 6*u0 - 6*std::log(1 - u0);
36 double x2 = -20*u03 - 12*u0 - 12*log(1 - u0);
37 return F_perp(s) + x0 + x1 * this->a_1_perp + x2 * this->a_2_perp;
38 }
39
40 double t = u0 * (s - 1) + 1;
41 double t2 = t *t;
42 double t3 = t2 * t;
43 double x0 = 2*u02*(t + 2*u0 - 1)*std::log(t)/std::pow(t - 1, 3) - 2*u02*(t*(u0 + 1) + u0 - 1)/(t*std::pow(t - 1, 2));
44 double x1 = -6*u02*(t2 + t*(6*u0 - 2) + 6*u02 - 6*u0 + 1)*std::log(t)/std::pow(t - 1, 4) - 6*u02*(t2*(u02 - 3*u0 - 1) + t*(2 - 5*u02) - 2*u02 + 3*u0 - 1)/(t*std::pow(t - 1, 3));
45 double x2 = 12*u02*(t + 2*u0 - 1)*(t2 + t*(10*u0 - 2) + 10*u02 - 10*u0 + 1)*std::log(t)/std::pow(t - 1, 5) - 4*u02*(t3*(5*u03 - 15*u02 + 18*u0 + 3) + t2*(-25*u03 + 90*u02 - 18*u0 - 9) + t*(65*u03 - 45*u02 - 18*u0 + 9) + 15*u03 - 30*u02 + 18*u0 - 3)/(t*std::pow(t - 1, 4));
46 return F_perp(s) + x0 + x1 * this->a_1_perp + x2 * this->a_2_perp;
47
48
49 // if (fpeq(s, 0.0)) {
50 // double cutoff = this->Lambda_h / this->m_B;
51 // return -2 * (1 + 3 * this->a_1_perp + 6 * this->a_2_perp) * std::log(cutoff) - (1 + 11 * this->a_1_perp + 31 * this->a_2_perp) + 12 * cutoff * (this->a_1_perp + 5 * this->a_2_perp);
52 // }
53
54 // double d = s - 1;
55 // double d2 = d * d;
56 // double d3 = d2 * d;
57 // double d4 = d3 * d;
58 // double d5 = d4 * d;
59 // double s2 = s * s;
60 // double s3 = s2 * s;
61 // double s4 = s3 * s;
62 // double ls = std::std::log(s);
63 // double f0 = (s2 - 4 * s + 3 + 2. * ls) / d3;
64 // double f1 = -(s3 - 9 * s2 - 9. * s + 17. + 6. * (3. * s + 1.) * ls) / d4;
65 // double f2 = (-s4 + 16 * s3 + 108. * s2 - 80. * s - 43. - 12. * (6. * s2 + 8. * s + 1.) * ls) / d5;
66 // return f0 + this->a_1_perp * f1 + this->a_2_perp * f2;
67}
68
70 auto iG_perp = [this] (double x) {
71 double xbar = 1 - x;
72 return phi_X(x, this->a_1_perp, this->a_2_perp) * BV::G(xbar, this->z_c_IA) / (3 * xbar);
73 };
74
75 return c_integrate(iG_perp, 0, 1, 1e-3);
76}
77
79 auto iH_perp = [this] (double x) {
80 return gv_dga_4(x) * BV::G(1 - x, this->z_c_IA);
81 };
82 return c_integrate(iH_perp, 0, 1, 1e-3);
83}
84
86 auto iH2_perp = [this] (double x) {
87 return BV::hard_kernel(1 - x, this->z_c_IA) * phi_X(x, this->a_1_perp, this->a_2_perp);
88 };
89
90 // printf("T1(0) = %.4e\n", ff_calculator->get(BV_FF::T1, 0.0));
91 // printf("lambda_B = %.4e\n", lambda_B_p);
92
93 double Nc = iobs_qcdp->get_constants()->Nc;
94 return -2 * PI2 * f_B * f_X_perp_b / (3 * Nc * m_B * lambda_B_p * ff_calculator->get(BV_FF::T1, 0.0)) * c_integrate(iH2_perp, 0, 1, 1e-4);
95}
96
98 double Nc = iobs_qcdp->get_constants()->Nc;
99 return 4. * PI2 * f_B * f_X_perp_b / (Nc * m_B * lambda_B_p * ff_calculator->get(BV_FF::T1, 0.0)) * (1 - a_1_perp + a_2_perp);
100}
101
103 complex_t C_perp_p = C_perp_0(q2, 1, bar) + this->loop_f_mu_b * (C_perp_f(q2, 1, bar) + C_perp_nf(q2, bar));
104
105 // printf("C_perp_p_0 (q2 = %.3f) = %.4e + %.4e i\n", q2, C_perp_0(q2, 1, bar).real(), C_perp_0(q2, 1, bar).imag());
106 // printf("C_perp_p_f (q2 = %.3f) = %.4e + %.4e i\n", q2, C_perp_f(q2, 1, bar).real(), C_perp_f(q2, 1, bar).imag());
107 // printf("C_perp_p_nf (q2 = %.3f) = %.4e + %.4e i\n", q2, C_perp_nf(q2, bar).real(), C_perp_nf(q2, bar).imag());
108
109 // printf("C_perp_p = %.4e + %.4e i\n", C_perp_p.real(), C_perp_p.imag());
110 // printf("xi_perp = %.4e\n", this->ff_calculator->get(BV_FF::XI_PERP, q2));
111 // printf("I_perp_p = %.4e + %.4e i\n", I_perp_p(q2, bar).real(), I_perp_p(q2, bar).imag());
112 // printf("delta_T_perp_WA = %.4e + %.4e i\n", delta_T_perp_WA(q2, bar).real(), delta_T_perp_WA(q2, bar).imag());
113 // printf("delta_T_perp_HSA = %.4e + %.4e i\n", delta_T_perp_HSA(q2, bar).real(), delta_T_perp_HSA(q2, bar).imag());
114
115 double xi_perp;
116 if (fpeq(q2, 0.0)) {
117 // Eq. (8) of BFS 0412400
118 // xi_perp = this->ff_calculator->get(BV_FF::T1, 0.0) * (1 - this->loop_f_mu_b)
119 // + this->loop_f_mu_f * 12 * PI2 * this->f_B * this->f_X_perp / (iobs_qcdp->get_constants()->Nc * this->m_B * this->lambda_B_p) * F_perp(0.0);
120 xi_perp = this->ff_calculator->get(BV_FF::T1, q2);
121 } else {
122 xi_perp = this->ff_calculator->get(BV_FF::XI_PERP, q2);
123 }
124
125 // printf("pref_perp = %.4e\n", this->pref_perp);
126 // printf("T1(0) = %.4e\n", this->ff_calculator->get(BV_FF::T1, 0.0));
127
128 return xi_perp * C_perp_p + this->pref_perp * I_perp_p(q2, bar) + delta_T_perp_WA(q2, bar) + delta_T_perp_HSA(q2, bar);
129}
130
132 complex_t C_perp_m = C_perp_0(q2, -1, bar) + this->loop_f_mu_b * (C_perp_f(q2, -1, bar) + C_perp_nf(q2, bar));
133
134 // printf("C_perp_m = %.4e + %.4e i\n", C_perp_m.real(), C_perp_m.imag());
135 // printf("I_perp_m = %.4e + %.4e i\n", I_perp_m(q2, bar).real(), I_perp_m(q2, bar).imag());
136
137 double xi_perp;
138 if (fpeq(q2, 0.0)) {
139 // xi_perp = this->ff_calculator->get(BV_FF::T1, 0.0) * (1 - this->alpha_s_mu_b * iobs_qcdp->get_constants()->C_F / (4 * PI))
140 // + this->alpha_s_mu_f * iobs_qcdp->get_constants()->C_F / (4 * PI) * 4 * PI2 * this->f_B * this->f_X_perp / (iobs_qcdp->get_constants()->Nc * this->m_B * this->lambda_B_p) * 3 * F_perp(0.0);
141 xi_perp = this->ff_calculator->get(BV_FF::T1, q2);
142 } else {
143 xi_perp = this->ff_calculator->get(BV_FF::XI_PERP, q2);
144 }
145
146 return xi_perp * C_perp_m + this->pref_perp * I_perp_m(q2, bar) + delta_T_perp_WA(q2, bar) + delta_T_perp_HSA(q2, bar);
147}
148
150 complex_t C_par_p = C_par_0(q2, 1, bar) + this->loop_f_mu_b * (C_par_f(q2, 1, bar) + C_par_nf(q2, bar));
151 return this->ff_calculator->get(BV_FF::XI_PAR, q2) * C_par_p + this->pref_par * this->m_X / this->E(q2) * I_par_p(q2, bar);
152}
153
155 complex_t C_par_m = C_par_0(q2, -1, bar) + this->loop_f_mu_b * (C_par_f(q2, -1, bar) + C_par_nf(q2, bar));
156
157 // printf("C_par_m_0 = %.4e + %.4e i\n", C_par_0(q2, -1, bar).real(), C_par_0(q2, -1, bar).imag());
158 // printf("C_par_m_f = %.4e + %.4e i\n", C_par_f(q2, -1, bar).real(), C_par_f(q2, -1, bar).imag());
159 // printf("C_par_m_nf = %.4e + %.4e i\n", C_par_nf(q2, bar).real(), C_par_nf(q2, bar).imag());
160
161 // printf("C_par_m = %.4e + %.4e i\n", C_par_m.real(), C_par_m.imag());
162 // printf("xi_par = %.4e\n", this->ff_calculator->get(BV_FF::XI_PAR, q2));
163 // printf("I_par_m = %.4e + %.4e i\n", I_par_m(q2, bar).real(), I_par_m(q2, bar).imag());
164
165 return this->ff_calculator->get(BV_FF::XI_PAR, q2) * C_par_m + this->pref_par * this->m_X / this->E(q2) * I_par_m(q2, bar);
166}
167
169 return 1. + 2 * this->loop_f_mu_b * (
170 L(q2) - 1 - 3. * PI2 * q2 * this->f_B * this->f_X_par * this->m_X / (iobs_qcdp->get_constants()->Nc * this->m_B * this->lambda_B_p * this->ff_calculator->get(BV_FF::XI_PAR, q2) * std::pow(this->E(q2), 3)) * F_perp(0.0)
171 );
172}
173
175 auto f = [q2, bar, this] (double u) {
176 double phi_u = phi_X(u, this->a_1_perp, this->a_2_perp);
177 double v = this->m_B * this->m_B * (1 - u) + u * q2;
178 return phi_u * this->m_B * this->m_B / v * F_V(v, bar);
179 };
180
181 return c_integrate(f, 0, 1, 1e-3);
182}
183
185 auto f = [q2, bar, this] (double u) {
186 double int_phi_par = gv_dga_4(u);
187 double v = this->m_B * this->m_B * (1 - u) + u * q2;
188 return int_phi_par * F_V(v, bar);
189 };
190
191 return c_integrate(f, 0, 1, 1e-2);
192}
193
195 double pref = this->e_q * 2. * PI2 * this->f_B / (this->m_b_PS * this->m_B);
196 complex_t l_u = fpeq(q2, 0.0) ? 0.0 : bar ? std::conj(this->lambda_hat_u) : this->lambda_hat_u;
197 complex_t W_perp = this->C[WCoef::C3] + 4. / 3. * (this->C[WCoef::C4] + 3. * this->C[WCoef::C5] + 4. * this->C[WCoef::C6]);
198 complex_t W_par = this->C[WCoef::C3] + 4. / 3. * this->C[WCoef::C4] + 16. * this->C[WCoef::C5] + 64. / 3. * this->C[WCoef::C6];
199
200 // printf("delta_qu = %.4e\n", delta_qu);
201
202 W_par += delta_qu * l_u * -3. * this->C[WCoef::C2];
203 if (this->src_block == "B_phi") {
204 W_par += -l_u * (4. / 3 * this->C[WCoef::C1] + this->C[WCoef::C2]);
205 W_par += 12. * (this->C[WCoef::C3] + 10. * this->C[WCoef::C5]);
206 }
207
208 double s_hat = q2 / (this->m_B * this->m_B);
209
210 // printf("pref_1(s = %.3f) = %.4e\n", q2, pref * -2. * this->f_X_perp);
211 // printf("W_perp(s = %.3f) = %.4e + %.4e i\n", q2, real(W_perp), imag(W_perp));
212 // printf("W_par(s = %.3f) = %.4e + %.4e i\n", q2, real(W_par), imag(W_par));
213 // printf("F_perp(s = %.3f) = %.4e\n", q2, F_perp(s_hat));
214
215 return pref * (
216 -2. * this->f_X_perp * W_perp * F_perp(s_hat)
217 + this->f_X_par * this->m_X * W_par / (3. * (1 - s_hat) * this->lambda_B_p)
218 );
219}
220
222 double pref = this->e_q * this->loop_f_mu_f * 4 * PI2 * this->f_B / (iobs_qcdp->get_constants()->Nc * this->m_b_PS * this->m_B);
223 double s_hat = q2 / (this->m_B * this->m_B);
224
225 // printf("X_perp = %.4e + %.4e i\n", std::real(X_perp(s_hat)), std::imag(X_perp(s_hat)));
226 // printf("I_HSA_1 = %.4e + %.4e i\n", std::real(I_HSA_1(q2, bar)), std::imag(I_HSA_1(q2, bar)));
227 // printf("I_HSA_2 = %.4e + %.4e i\n", std::real(I_HSA_2(q2, bar)), std::imag(I_HSA_2(q2, bar)));
228 // printf("pref_C8_Xperp = %.4e\n", pref * 3. * this->m_b_PS / this->m_B * this->f_X_perp);
229 // printf("pref_I1 = %.4e\n", pref * 2. * this->f_X_perp);
230 // printf("pref_I2 = %.4e\n", -pref * this->m_X * this->f_X_par / ((1 - s_hat) * this->lambda_B_p));
231
232 return pref * (
233 3. * this->C[WCoef::C8] * this->m_b_PS / this->m_B * this->f_X_perp * X_perp(s_hat)
234 + 2. * this->f_X_perp * I_HSA_1(q2, bar)
235 - this->m_X * this->f_X_par / ((1 - s_hat) * this->lambda_B_p) * I_HSA_2(q2, bar)
236 );
237}
std::complex< double > complex_t
Convenience alias for std::complex<double>.
Definition Utils.h:35
complex_t T_par_p(double q2, bool bar)
complex_t delta_T_perp_WA(double q2, bool bar)
double X_perp(double s_hat)
complex_t delta_T_perp_HSA(double q2, bool bar)
complex_t I_HSA_1(double q2, bool bar)
complex_t T_par_m(double q2, bool bar)
complex_t T_perp_m(double q2, bool bar)
double F_perp(double s_hat)
complex_t T_perp_p(double q2, bool bar)
complex_t Delta_par(double q2)
BVQCDfCalculator()=default
complex_t I_HSA_2(double q2, bool bar)
complex_t I_perp_m(double q2, bool bar)
complex_t C_par_0(double q2, double sign, bool bar)
double phi_X(double u, double a1, double a2)
complex_t C_par_nf(double q2, bool bar)
std::shared_ptr< IObsQCDProxy > iobs_qcdp
double gv_dga_4(double u)
complex_t C_perp_0(double q2, double sign, bool bar)
complex_t I_par_p(double q2, bool bar)
complex_t F_V(double v, bool bar)
complex_t C_perp_nf(double q2, bool bar)
complex_t C_par_f(double q2, double sign, bool bar)
complex_t I_par_m(double q2, bool bar)
std::map< WCoef, complex_t > C
complex_t I_perp_p(double q2, bool bar)
complex_t C_perp_f(double q2, double sign, bool bar)
constexpr double PI2
Definition constants.h:8
constexpr double E
Definition constants.h:13
scalar_t c_integrate(ComplexValuedFunction f, double l, double u, double prec)
Performs numerical integration of a complex-valued function of a real variable.
complex_t G(double x_bar, double z)
complex_t hard_kernel(double u, double z)
std::enable_if_t< not std::numeric_limits< T >::is_integer, bool > fpeq(T, T, std::size_t n=10)
Compares two floating point numbers with a given precision.
double f(double x)
Wilson special function f depending on x.