Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def helicity_amps(q2, wc, par_dict, B, P, l1, l2):
par = par_dict.copy()
scale = config['renormalization scale']['bpll']
wc_eff = get_wceff_lfv(q2, wc, par, B, P, l1, l2, scale)
ml1 = par['m_'+l1]
ml2 = par['m_'+l2]
mB = par['m_'+B]
mP = par['m_'+P]
mb = running.get_mb(par, scale)
N = prefactor(q2, par, B, P)
ff = get_ff(q2, par, B, P)
h = angular.helicity_amps_p(q2, mB, mP, mb, 0, ml1, ml2, ff, wc_eff, N)
return h
def _BR_BXclnu(par, wc_obj, lep, nu):
GF = par['GF']
scale = flavio.config['renormalization scale']['bxlnu']
mb_MSbar = flavio.physics.running.running.get_mb(par, scale)
wc = get_wceff_fccc_std(wc_obj, par, 'bc', lep, nu, mb_MSbar, scale, nf=5)
if lep != nu and all(C == 0 for C in wc.values()):
return 0 # if all WCs vanish, so does the BR!
kinetic_cutoff = 1. # cutoff related to the kinetic definition of mb in GeV
# mb in the kinetic scheme
mb = flavio.physics.running.running.get_mb_KS(par, kinetic_cutoff)
xl = par['m_'+lep]**2/mb**2
# mc in MSbar at 3 GeV
mc = flavio.physics.running.running.get_mc(par, 3)
xc = mc**2/mb**2
Vcb = flavio.physics.ckm.get_ckm(par)[1, 2]
alpha_s = flavio.physics.running.running.get_alpha(par, scale, nf_out=5)['alpha_s']
# wc: NB this includes the EW correction already
# the b quark mass is MSbar here as it comes from the definition
# of the scalar operators
Gamma_LO = GF**2 * mb**5 / 192. / pi**3 * abs(Vcb)**2
def bvlilj_obs(function, q2, wc, par, B, V, l1, l2):
ml1 = par['m_'+l1]
ml2 = par['m_'+l2]
mB = par['m_'+B]
mV = par['m_'+V]
if q2 < (ml1+ml2)**2 or q2 > (mB-mV)**2:
return 0
scale = flavio.config['renormalization scale']['bvll']
mb = flavio.physics.running.running.get_mb(par, scale)
h = helicity_amps(q2, wc, par, B, V, l1, l2)
J = flavio.physics.bdecays.angular.angularcoeffs_general_v(h, q2, mB, mV, mb, 0, ml1, ml2)
return function(J)
- `l1` and `l2`: should be `'e'`, `'mu'`, or `'tau'`
Returns
-------
`(P, S)` where for the special case `l1 == l2` one has
- $P = \frac{2m_\ell}{m_{B_q}} (C_{10}-C_{10}') + m_{B_q} (C_P-C_P')$
- $S = m_{B_q} (C_S-C_S')$
"""
scale = config['renormalization scale']['bll']
# masses
ml1 = par['m_'+l1]
ml2 = par['m_'+l2]
mB = par['m_'+B]
mb = running.get_mb(par, scale, nf_out=5)
# get the mass of the spectator quark
if B=='Bs':
mspec = running.get_ms(par, scale, nf_out=5)
elif B=='B0':
mspec = running.get_md(par, scale, nf_out=5)
# Wilson coefficients
qqll = meson_quark[B] + l1 + l2
# For LFV expressions see arXiv:1602.00881 eq. (5)
C9m = wc['C9_'+qqll] - wc['C9p_'+qqll] # only relevant for l1 != l2!
C10m = wc['C10_'+qqll] - wc['C10p_'+qqll]
CPm = wc['CP_'+qqll] - wc['CPp_'+qqll]
CSm = wc['CS_'+qqll] - wc['CSp_'+qqll]
P = (ml2 + ml1)/mB * C10m + mB * mb/(mb + mspec) * CPm
S = (ml2 - ml1)/mB * C9m + mB * mb/(mb + mspec) * CSm
return P, S
def _get_angularcoeff(q2, wc_obj, par, B, P, lep, nu):
scale = config['renormalization scale']['bpll']
mb = running.get_mb(par, scale)
wc = get_wceff_fccc(wc_obj, par, meson_quark[(B,P)], lep, nu, mb, scale, nf=5)
if lep != nu and all(C == 0 for C in wc.values()):
return {'a': 0, 'b': 0, 'c': 0} # if all WCs vanish, so does the AC!
ml = par['m_'+lep]
mB = par['m_'+B]
mP = par['m_'+P]
N = prefactor(q2, par, B, P, lep)
ff = get_ff(q2, par, B, P)
qi_qj = meson_quark[(B, P)]
if qi_qj == 'bu':
mlight = 0. # neglecting the up quark mass
if qi_qj == 'bc':
mlight = running.get_mc(par, scale) # this is needed for scalar contributions
h = angular.helicity_amps_p(q2, mB, mP, mb, mlight, ml, 0, ff, wc, N)
J = angular.angularcoeffs_general_p(h, q2, mB, mP, mb, mlight, ml, 0)
return J
def helicity_amps_ff(q2, wc_obj, par_dict, B, P, lep, cp_conjugate):
par = par_dict.copy()
if cp_conjugate:
par = conjugate_par(par)
scale = config['renormalization scale']['bpll']
label = meson_quark[(B,P)] + lep + lep # e.g. bsmumu, bdtautau
wc = wctot_dict(wc_obj, label, scale, par)
if cp_conjugate:
wc = conjugate_wc(wc)
wc_eff = get_wceff(q2, wc, par, B, P, lep, scale)
ml = par['m_'+lep]
mB = par['m_'+B]
mP = par['m_'+P]
mb = running.get_mb(par, scale)
N = prefactor(q2, par, B, P)
ff = get_ff(q2, par, B, P)
h = angular.helicity_amps_p(q2, mB, mP, mb, 0, ml, ml, ff, wc_eff, N)
return h
def prefactor(par, B, V):
mB = par['m_'+B]
mV = par['m_'+V]
scale = config['renormalization scale']['bvgamma']
alphaem = running.get_alpha(par, scale)['alpha_e']
mb = running.get_mb(par, scale)
GF = par['GF']
bq = meson_quark[(B,V)]
xi_t = ckm.xi('t',bq)(par)
return ( sqrt((GF**2 * alphaem * mB**3 * mb**2)/(32 * pi**4)
* (1-mV**2/mB**2)**3) * xi_t )
def bpll_obs(function, q2, wc_obj, par, B, P, lep):
ml = par['m_'+lep]
mB = par['m_'+B]
mP = par['m_'+P]
if q2 <= (ml+ml)**2 or q2 > (mB-mP)**2:
return 0
scale = config['renormalization scale']['bpll']
mb = running.get_mb(par, scale)
h = helicity_amps(q2, wc_obj, par, B, P, lep)
J = angular.angularcoeffs_general_p(h, q2, mB, mP, mb, 0, ml, ml)
if lep == lep:
h_bar = helicity_amps_bar(q2, wc_obj, par, B, P, lep)
J_bar = angular.angularcoeffs_general_p(h_bar, q2, mB, mP, mb, 0, ml, ml)
else:
# for LFV decays, don't bother about the CP average. There is no strong phase.
J_bar = J
return function(J, J_bar)
def bsvll_obs(function, q2, wc_obj, par, B, V, lep):
ml = par['m_'+lep]
mB = par['m_'+B]
mV = par['m_'+V]
y = par['DeltaGamma/Gamma_'+B]/2.
if q2 < 4*ml**2 or q2 > (mB-mV)**2:
return 0
scale = flavio.config['renormalization scale']['bvll']
mb = flavio.physics.running.running.get_mb(par, scale)
ff = flavio.physics.bdecays.bvll.amplitudes.get_ff(q2, par, B, V)
h = flavio.physics.bdecays.bvll.amplitudes.helicity_amps(q2, ff, wc_obj, par, B, V, lep)
h_bar = flavio.physics.bdecays.bvll.amplitudes.helicity_amps_bar(q2, ff, wc_obj, par, B, V, lep)
J = flavio.physics.bdecays.angular.angularcoeffs_general_v(h, q2, mB, mV, mb, 0, ml, ml)
J_bar = flavio.physics.bdecays.angular.angularcoeffs_general_v(h_bar, q2, mB, mV, mb, 0, ml, ml)
h_tilde = h_bar.copy()
h_tilde[('pl', 'V')] = h_bar[('mi', 'V')]
h_tilde[('pl', 'A')] = h_bar[('mi', 'A')]
h_tilde[('mi', 'V')] = h_bar[('pl', 'V')]
h_tilde[('mi', 'A')] = h_bar[('pl', 'A')]
h_tilde['S'] = -h_bar['S']
q_over_p = flavio.physics.mesonmixing.observables.q_over_p(wc_obj, par, B)
phi = cmath.phase(-q_over_p) # the phase of -q/p
J_h = flavio.physics.bdecays.angular.angularcoeffs_h_v(phi, h, h_tilde, q2, mB, mV, mb, 0, ml, ml)
return function(y, J, J_bar, J_h)