4 if (!this->allowed_decays.contains({B_id, V_id})) {
5 LOG_ERROR(
"ValueError",
"Wrong meson PDG code in BVFFCalculator constructor:", B_id,
",", V_id);
9 LOG_WARN(
"GKvD formfactors are not available for Bs > phi decays. Defaulting to BFS formfactors.");
14 this->m_B2 = std::pow(this->m_B, 2);
15 this->m_B4 = std::pow(this->m_B2, 2);
17 this->m_V2 = std::pow(this->m_V, 2);
18 this->m_V4 = std::pow(this->m_V2, 2);
19 this->t_p = std::pow(this->m_B + this->m_V, 2);
20 this->t_m = std::pow(this->m_B - this->m_V, 2);
21 this->t_0 = src ==
BV_FF_Src::HLMW ? 12. : this->t_p * (1. - std::sqrt(1 - this->t_m / this->t_p));
22 this->z_0 = std::real(
z(0.0, this->t_p, this->t_0));
23 this->src_block = allowed_decays.at({B_id, V_id});
24 this->load_FF_params(src);
29 double a = std::sqrt(t_p - t);
30 double b = std::sqrt(t_p - t_0);
31 return (a - b) / (a + b);
41 return this->xi_perp(q2);
43 return this->xi_par(q2);
45 return this->f_perp(q2);
47 return this->f_par(q2);
51 return this->F_a(a, q2);
55void BVFFCalculator::load_FF_params(
BV_FF_Src src) {
56 int ff_id = (int)(src) + 1;
58 std::string src_block = this->src_block;
65 for (
int i = 1; i <= 7; i++) {
66 for (
int j = 0; j <= sse_order; j++) {
69 if (i == 3 && j == 0) {
71 this->alpha_ai[(
BV_FF)(i - 1)][j] = (*iobspp_sm)(PId,
DataType::VALUE) * (m_B2 - m_V2) / (8 * m_B * m_V);
73 }
else if (i == 6 && j == 0) {
86double BVFFCalculator::pole(
double q2,
double m_R) {
87 return 1. / (1 - q2 / std::pow(m_R, 2));
91 return (this->m_B2 + this->m_V2 - q2) / (2 * this->m_B);
94double BVFFCalculator::F_a(
BV_FF a,
double q2) {
95 auto ai = this->alpha_ai.at(a);
96 double P = pole(q2, this->m_R.at(a));
97 double Z = std::real(
z(q2, this->t_p, this->t_0)) - this->z_0;
100 return P * (ai[0] + Z * (ai[1] + Z * ai[2])) * (1 + this->syst_err);
103double BVFFCalculator::A_2(
double q2) {
106 return (this->t_p * (this->m_B2 - this->m_V2 - q2) * A_1 - 16. * this->m_B * this->m_V2 * (this->m_B + this->m_V) * A_12) / ((this->t_p - q2) * (this->t_m - q2));
109double BVFFCalculator::T_3(
double q2) {
112 return ((this->m_B2 - this->m_V2) * (this->m_B2 + 3. * this->m_V2 - q2) * T_2 - 8. * this->m_B * this->m_V2 * (this->m_B - this->m_V) * T_23) / ((this->t_p - q2) * (this->t_m - q2));
115double BVFFCalculator::xi_perp(
double q2) {
121 return this->m_B * F_a(
BV_FF::V, q2) / (this->m_B + this->m_V);
124double BVFFCalculator::xi_par(
double q2) {
125 return (this->m_B + this->m_V) * F_a(
BV_FF::A1, q2) / (2. *
E(q2)) - (this->m_B - this->m_V) * A_2(q2) / this->m_B;
128double BVFFCalculator::f_perp(
double q2) {
129 double lambda = this->m_B4 + this->m_V4 + q2 * q2 - 2 * (this->m_B2 * this->m_V2 + q2 * (this->m_B2 + this->m_V2));
130 return std::sqrt(2. * lambda) / (this->m_B + this->m_V) * F_a(
BV_FF::V, q2);
133double BVFFCalculator::f_par(
double q2) {
134 return RT2 * (this->m_B + this->m_V) * F_a(
BV_FF::A1, q2);
137double BVFFCalculator::f_0(
double q2) {
138 double lambda = this->m_B4 + this->m_V4 + q2 * q2 - 2 * (this->m_B2 * this->m_V2 + q2 * (this->m_B2 + this->m_V2));
139 return ((this->m_B * this->m_B - q2 - this->m_V * this->m_V) * this->t_p * F_a(
BV_FF::A1, q2) - lambda * A_2(q2)) / (2. * this->m_V * (this->m_B + this->m_V) *
sqrt(q2));
#define LOG_ERROR(type,...)
Macro for logging error messages and terminating the application.
#define LOG_WARN(...)
Macro for logging warning messages.
std::complex< double > complex_t
Convenience alias for std::complex<double>.
double get(BV_FF a, double q2) override
complex_t z(double t, double t_p, double t_0)
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.
Composite identifier for a single parameter.