Module flavio.physics.bdecays.bvlnu
Functions for exclusive $B\to V\ell\nu$ decays.
Functions
def AFB_tot_function(B, V, lep)-
Expand source code
def AFB_tot_function(B, V, lep): def f(wc_obj, par): def fct_J(J): return 3 / 8 * (2 * J['6s'] + J['6c']) return Itot_norm(fct_J, wc_obj, par, B, V, lep) return f def BR_binned(q2min, q2max, wc_obj, par, B, V, lep, A)-
Expand source code
def BR_binned(q2min, q2max, wc_obj, par, B, V, lep, A): def integrand(q2): return dBRdq2(q2, wc_obj, par, B, V, lep, A) return flavio.math.integrate.nintegrate(integrand, q2min, q2max) def BR_binned_costhV(cVmin, cVmax, wc_obj, par, B, V, lep)-
Expand source code
def BR_binned_costhV(cVmin, cVmax, wc_obj, par, B, V, lep): def fct(q2): return dBR_dq2_dcosthV_binned(q2, cVmin, cVmax, wc_obj, par, B, V, lep) return obs_q2int(fct, wc_obj, par, B, V, lep) def BR_binned_costhV_function(B, V, lep)-
Expand source code
def BR_binned_costhV_function(B, V, lep): if lep == 'l': return lambda wc_obj, par, cVmin, cVmax: ( BR_binned_costhV(cVmin, cVmax, wc_obj, par, B, V, 'e') + BR_binned_costhV(cVmin, cVmax, wc_obj, par, B, V, 'mu'))/2. return lambda wc_obj, par, cVmin, cVmax: BR_binned_costhV(cVmin, cVmax, wc_obj, par, B, V, lep) def BR_binned_costhl(clmin, clmax, wc_obj, par, B, V, lep)-
Expand source code
def BR_binned_costhl(clmin, clmax, wc_obj, par, B, V, lep): def fct(q2): return dBR_dq2_dcosthl_binned(q2, clmin, clmax, wc_obj, par, B, V, lep) return obs_q2int(fct, wc_obj, par, B, V, lep) def BR_binned_costhl_function(B, V, lep)-
Expand source code
def BR_binned_costhl_function(B, V, lep): if lep == 'l': return lambda wc_obj, par, clmin, clmax: ( BR_binned_costhl(clmin, clmax, wc_obj, par, B, V, 'e') + BR_binned_costhl(clmin, clmax, wc_obj, par, B, V, 'mu'))/2. return lambda wc_obj, par, clmin, clmax: BR_binned_costhl(clmin, clmax, wc_obj, par, B, V, lep) def BR_binned_function(B, V, lep, A)-
Expand source code
def BR_binned_function(B, V, lep, A): return lambda wc_obj, par, q2min, q2max: BR_binned(q2min, q2max, wc_obj, par, B, V, lep, A) def BR_binned_leptonflavour(q2min, q2max, wc_obj, par, B, V, lnum, lden, A)-
Expand source code
def BR_binned_leptonflavour(q2min, q2max, wc_obj, par, B, V, lnum, lden, A): num = BR_binned(q2min, q2max, wc_obj, par, B, V, lnum, A) if num == 0: return 0 den = BR_binned(q2min, q2max, wc_obj, par, B, V, lden, A) return num/den def BR_binned_leptonflavour_function(B, V, lnum, lden, A)-
Expand source code
def BR_binned_leptonflavour_function(B, V, lnum, lden, A): return lambda wc_obj, par, q2min, q2max: BR_binned_leptonflavour(q2min, q2max, wc_obj, par, B, V, lnum, lden, A) def BR_binned_phi(phimin, phimax, wc_obj, par, B, V, lep)-
Expand source code
def BR_binned_phi(phimin, phimax, wc_obj, par, B, V, lep): def fct(q2): return dBR_dq2_dphi_binned(q2, phimin, phimax, wc_obj, par, B, V, lep) return obs_q2int(fct, wc_obj, par, B, V, lep) def BR_binned_phi_function(B, V, lep)-
Expand source code
def BR_binned_phi_function(B, V, lep): if lep == 'l': return lambda wc_obj, par, phimin, phimax: ( BR_binned_phi(phimin, phimax, wc_obj, par, B, V, 'e') + BR_binned_phi(phimin, phimax, wc_obj, par, B, V, 'mu'))/2. return lambda wc_obj, par, phimin, phimax: BR_binned_phi(phimin, phimax, wc_obj, par, B, V, lep) def BR_binned_tot_function(B, V, lep, A)-
Expand source code
def BR_binned_tot_function(B, V, lep, A): def f(wc_obj, par, q2min, q2max): num = BR_binned(q2min, q2max, wc_obj, par, B, V, lep, A) if num == 0: return 0 den = BR_tot(wc_obj, par, B, V, lep, A) return num / den return f def BR_tot(wc_obj, par, B, V, lep, A)-
Expand source code
def BR_tot(wc_obj, par, B, V, lep, A): if lep == 'l': # average of e and mu! return (_BR_tot(wc_obj, par, B, V, 'e', A)+_BR_tot(wc_obj, par, B, V, 'mu', A))/2. else: return _BR_tot(wc_obj, par, B, V, lep, A) def BR_tot_function(B, V, lep, A)-
Expand source code
def BR_tot_function(B, V, lep, A): return lambda wc_obj, par: BR_tot(wc_obj, par, B, V, lep, A) def BR_tot_leptonflavour(wc_obj, par, B, V, lnum, lden, A)-
Expand source code
def BR_tot_leptonflavour(wc_obj, par, B, V, lnum, lden, A): num = BR_tot(wc_obj, par, B, V, lnum, A) if num == 0: return 0 den = BR_tot(wc_obj, par, B, V, lden, A) return num/den def BR_tot_leptonflavour_function(B, V, lnum, lden, A)-
Expand source code
def BR_tot_leptonflavour_function(B, V, lnum, lden, A): return lambda wc_obj, par: BR_tot_leptonflavour(wc_obj, par, B, V, lnum, lden, A) def BRfac(V)-
Expand source code
def BRfac(V): if V == 'rho0' or V == 'omega': # factor of 1/2 for neutral rho due to rho = (uubar-ddbar)/sqrt(2) # and also for omega = (uubar+ddbar)/sqrt(2) return 1/2. else: return 1 def FL_binned(q2min, q2max, wc_obj, par, B, V, lep)-
Expand source code
def FL_binned(q2min, q2max, wc_obj, par, B, V, lep): num = flavio.math.integrate.nintegrate(lambda q2: dBRdq2(q2, wc_obj, par, B, V, lep, A='L'), q2min, q2max) if num == 0: return 0 denom = flavio.math.integrate.nintegrate(lambda q2: dBRdq2(q2, wc_obj, par, B, V, lep, A=None), q2min, q2max) return num / denom def FL_binned_function(B, V, lep)-
Expand source code
def FL_binned_function(B, V, lep): return lambda wc_obj, par, q2min, q2max: FL_binned(q2min, q2max, wc_obj, par, B, V, lep) def FL_diff(q2, wc_obj, par, B, V, lep)-
Expand source code
def FL_diff(q2, wc_obj, par, B, V, lep): if not kinem_allowed(q2, par, B, V, lep): return 0 J = get_angularcoeff(q2, wc_obj, par, B, V, lep) return dGdq2_L(J) / dGdq2(J) def FL_function(B, V, lep)-
Expand source code
def FL_function(B, V, lep): return lambda wc_obj, par, q2: FL_diff(q2, wc_obj, par, B, V, lep) def FL_tot_function(B, V, lep)-
Expand source code
def FL_tot_function(B, V, lep): def f(wc_obj, par): mB = par['m_'+B] mV = par['m_'+V] ml = par['m_'+lep] q2max = (mB-mV)**2 q2min = ml**2 return FL_binned(q2min, q2max, wc_obj, par, B, V, lep) return f def FLt_tot_function(B, V, lep)-
Expand source code
def FLt_tot_function(B, V, lep): def f(wc_obj, par): def fct_J(J): return -J['2c'] return Itot_norm(fct_J, wc_obj, par, B, V, lep) return f def I3_tot_function(B, V, lep)-
Expand source code
def I3_tot_function(B, V, lep): def f(wc_obj, par): def fct_J(J): return J[3] return Itot_norm(fct_J, wc_obj, par, B, V, lep) return f def Itot_norm(fct_J, wc_obj, par, B, V, lep)-
Expand source code
def Itot_norm(fct_J, wc_obj, par, B, V, lep): def fct(q2): J = get_angularcoeff(q2, wc_obj, par, B, V, lep) return fct_J(J) num = obs_q2int(fct, wc_obj, par, B, V, lep) def fct_den(q2): J = get_angularcoeff(q2, wc_obj, par, B, V, lep) return dGdq2(J) den = obs_q2int(fct_den, wc_obj, par, B, V, lep) return num / den def dBR_dcosthV(cV, wc_obj, par, B, V, lep)-
Expand source code
def dBR_dcosthV(cV, wc_obj, par, B, V, lep): def fct(q2): return dBR_dq2_dcosthV(q2, cV, wc_obj, par, B, V, lep) return obs_q2int(fct, wc_obj, par, B, V, lep) def dBR_dcosthV_function(B, V, lep)-
Expand source code
def dBR_dcosthV_function(B, V, lep): if lep == 'l': return lambda wc_obj, par, cV: ( dBR_dcosthV(cV, wc_obj, par, B, V, 'e') + dBR_dcosthV(cV, wc_obj, par, B, V, 'mu'))/2. return lambda wc_obj, par, cV: dBR_dcosthV(cV, wc_obj, par, B, V, lep) def dBR_dcosthl(cl, wc_obj, par, B, V, lep)-
Expand source code
def dBR_dcosthl(cl, wc_obj, par, B, V, lep): def fct(q2): return dBR_dq2_dcosthl(q2, cl, wc_obj, par, B, V, lep) return obs_q2int(fct, wc_obj, par, B, V, lep) def dBR_dcosthl_function(B, V, lep)-
Expand source code
def dBR_dcosthl_function(B, V, lep): if lep == 'l': return lambda wc_obj, par, cl: ( dBR_dcosthl(cl, wc_obj, par, B, V, 'e') + dBR_dcosthl(cl, wc_obj, par, B, V, 'mu'))/2. return lambda wc_obj, par, cl: dBR_dcosthl(cl, wc_obj, par, B, V, lep) def dBR_dphi(phi, wc_obj, par, B, V, lep)-
Expand source code
def dBR_dphi(phi, wc_obj, par, B, V, lep): def fct(q2): return dBR_dq2_dphi(q2, phi, wc_obj, par, B, V, lep) return obs_q2int(fct, wc_obj, par, B, V, lep) def dBR_dphi_function(B, V, lep)-
Expand source code
def dBR_dphi_function(B, V, lep): if lep == 'l': return lambda wc_obj, par, phi: ( dBR_dphi(phi, wc_obj, par, B, V, 'e') + dBR_dphi(phi, wc_obj, par, B, V, 'mu'))/2. return lambda wc_obj, par, phi: dBR_dphi(phi, wc_obj, par, B, V, lep) def dBR_dq2_dcosthV(q2, cV, wc_obj, par, B, V, lep)-
Expand source code
def dBR_dq2_dcosthV(q2, cV, wc_obj, par, B, V, lep): if not kinem_allowed(q2, par, B, V, lep): return 0 tauB = par['tau_'+B] J = get_angularcoeff(q2, wc_obj, par, B, V, lep) dG = dG_dq2_dcosthV(J) ang = _cos_angle_diff(cV) return BRfac(V) * tauB * sum( [y * ang[a] for a, y in dG.items()]) def dBR_dq2_dcosthV_binned(q2, cVmin, cVmax, wc_obj, par, B, V, lep)-
Expand source code
def dBR_dq2_dcosthV_binned(q2, cVmin, cVmax, wc_obj, par, B, V, lep): if not kinem_allowed(q2, par, B, V, lep): return 0 tauB = par['tau_'+B] J = get_angularcoeff(q2, wc_obj, par, B, V, lep) dG = dG_dq2_dcosthV(J) ang_min = _cos_angle_int(cVmin) ang_max = _cos_angle_int(cVmax) return BRfac(V) * tauB * sum( [y * (ang_max[a] - ang_min[a]) for a, y in dG.items()]) def dBR_dq2_dcosthl(q2, cl, wc_obj, par, B, V, lep)-
Expand source code
def dBR_dq2_dcosthl(q2, cl, wc_obj, par, B, V, lep): if not kinem_allowed(q2, par, B, V, lep): return 0 tauB = par['tau_'+B] J = get_angularcoeff(q2, wc_obj, par, B, V, lep) dG = dG_dq2_dcosthl(J) ang = _cos_angle_diff(cl) return BRfac(V) * tauB * sum( [y * ang[a] for a, y in dG.items()]) def dBR_dq2_dcosthl_binned(q2, clmin, clmax, wc_obj, par, B, V, lep)-
Expand source code
def dBR_dq2_dcosthl_binned(q2, clmin, clmax, wc_obj, par, B, V, lep): if not kinem_allowed(q2, par, B, V, lep): return 0 tauB = par['tau_'+B] J = get_angularcoeff(q2, wc_obj, par, B, V, lep) dG = dG_dq2_dcosthl(J) ang_min = _cos_angle_int(clmin) ang_max = _cos_angle_int(clmax) return BRfac(V) * tauB * sum( [y * (ang_max[a] - ang_min[a]) for a, y in dG.items()]) def dBR_dq2_dphi(q2, phi, wc_obj, par, B, V, lep)-
Expand source code
def dBR_dq2_dphi(q2, phi, wc_obj, par, B, V, lep): if not kinem_allowed(q2, par, B, V, lep): return 0 tauB = par['tau_'+B] J = get_angularcoeff(q2, wc_obj, par, B, V, lep) dG = dG_dq2_dphi(J) ang = _angle_diff(phi) return BRfac(V) * tauB * sum( [y * ang[a] for a, y in dG.items()]) def dBR_dq2_dphi_binned(q2, phimin, phimax, wc_obj, par, B, V, lep)-
Expand source code
def dBR_dq2_dphi_binned(q2, phimin, phimax, wc_obj, par, B, V, lep): if not kinem_allowed(q2, par, B, V, lep): return 0 tauB = par['tau_'+B] J = get_angularcoeff(q2, wc_obj, par, B, V, lep) dG = dG_dq2_dphi(J) ang_min = _angle_int(phimin) ang_max = _angle_int(phimax) return BRfac(V) * tauB * sum( [y * (ang_max[a] - ang_min[a]) for a, y in dG.items()]) def dBRdq2(q2, wc_obj, par, B, V, lep, A)-
Expand source code
def dBRdq2(q2, wc_obj, par, B, V, lep, A): if lep == 'l': # average of e and mu! return (dBRdq2_lep(q2, wc_obj, par, B, V, 'e', A) + dBRdq2_lep(q2, wc_obj, par, B, V, 'mu', A))/2 else: return dBRdq2_lep(q2, wc_obj, par, B, V, lep, A) def dBRdq2_function(B, V, lep, A)-
Expand source code
def dBRdq2_function(B, V, lep, A): return lambda wc_obj, par, q2: dBRdq2(q2, wc_obj, par, B, V, lep, A) def dBRdq2_lep(q2, wc_obj, par, B, V, lep, A)-
Expand source code
def dBRdq2_lep(q2, wc_obj, par, B, V, lep, A): if not kinem_allowed(q2, par, B, V, lep): return 0 tauB = par['tau_'+B] J = get_angularcoeff(q2, wc_obj, par, B, V, lep) if A is None: return tauB * dGdq2(J) * BRfac(V) elif A == 'L': return tauB * dGdq2_L(J) * BRfac(V) elif A == 'T': return tauB * dGdq2_T(J) * BRfac(V) def dG_dq2_dcosthV(J)-
Expand source code
def dG_dq2_dcosthV(J): r"""$\cos\theta_V$-differential branching ratio in terms of angular coefficients, as dictionary of coefficients of trigonometric functions of $\theta_V$.""" return {'c^2': -3/8. * (-3*J['1c'] + J['2c']), 's^2': -3/8. * (-3*J['1s'] + J['2s']) }$\cos\theta_V$-differential branching ratio in terms of angular coefficients, as dictionary of coefficients of trigonometric functions of $\theta_V$.
def dG_dq2_dcosthl(J)-
Expand source code
def dG_dq2_dcosthl(J): r"""$\cos\theta_\ell$-differential branching ratio in terms of angular coefficients, as dictionary of coefficients of trigonometric functions of $\theta_\ell$.""" return {'1': 3/8. * (J['1c'] + 2*J['1s']), 'c': 3/8. * (J['6c'] + 2*J['6s']), 'c2': 3/8. * (J['2c'] + 2*J['2s']) }$\cos\theta_\ell$-differential branching ratio in terms of angular coefficients, as dictionary of coefficients of trigonometric functions of $\theta_\ell$.
def dG_dq2_dphi(J)-
Expand source code
def dG_dq2_dphi(J): r"""$\phi$-differential branching ratio in terms of angular coefficients, as dictionary of coefficients of trigonometric functions of $\phi$.""" return {'1': 1/(8*pi) * (3*J['1c'] + 6*J['1s'] - J['2c'] - 2*J['2s']), 'c2': 1/(2*pi) * J[3], 's2': 1/(2*pi) * J[9] }$\phi$-differential branching ratio in terms of angular coefficients, as dictionary of coefficients of trigonometric functions of $\phi$.
def dGdq2(J)-
Expand source code
def dGdq2(J): r"""$q^2$-differential branching ratio in terms of angular coefficients.""" return 3/4. * (2 * J['1s'] + J['1c']) - 1/4. * (2 * J['2s'] + J['2c'])$q^2$-differential branching ratio in terms of angular coefficients.
def dGdq2_L(J)-
Expand source code
def dGdq2_L(J): r"""$q^2$-differential branching ratio to longitudinally polarized vector meson in terms of angular coefficients.""" return 3/4. * J['1c'] - 1/4. * J['2c']$q^2$-differential branching ratio to longitudinally polarized vector meson in terms of angular coefficients.
def dGdq2_T(J)-
Expand source code
def dGdq2_T(J): r"""$q^2$-differential branching ratio to transversely polarized vector meson in terms of angular coefficients.""" return 3/2. * J['1s'] - 1/2. * J['2s']$q^2$-differential branching ratio to transversely polarized vector meson in terms of angular coefficients.
def get_angularcoeff(q2, wc_obj, par, B, V, lep)-
Expand source code
def get_angularcoeff(q2, wc_obj, par, B, V, lep): Jlist = [_get_angularcoeff(q2, wc_obj, par, B, V, lep, nu) for nu in ['e', 'mu', 'tau']] J = {} J['1s'] = sum([JJ['1s'] for JJ in Jlist]) J['1c'] = sum([JJ['1c'] for JJ in Jlist]) J['2s'] = sum([JJ['2s'] for JJ in Jlist]) J['2c'] = sum([JJ['2c'] for JJ in Jlist]) J['6s'] = sum([JJ['6s'] for JJ in Jlist]) J['6c'] = sum([JJ['6c'] for JJ in Jlist]) J[3] = sum([JJ[3] for JJ in Jlist]) J[4] = sum([JJ[4] for JJ in Jlist]) J[5] = sum([JJ[5] for JJ in Jlist]) J[7] = sum([JJ[7] for JJ in Jlist]) J[8] = sum([JJ[8] for JJ in Jlist]) J[9] = sum([JJ[9] for JJ in Jlist]) return J def get_ff(q2, par, B, V)-
Expand source code
def get_ff(q2, par, B, V): """Return the form factors""" ff_name = meson_ff[(B,V)] + ' form factor' return AuxiliaryQuantity[ff_name].prediction(par_dict=par, wc_obj=None, q2=q2)Return the form factors
def kinem_allowed(q2, par, B, V, lep)-
Expand source code
def kinem_allowed(q2, par, B, V, lep): """True if q2 is in the kinematically allowed region""" ml = par['m_'+lep] mB = par['m_'+B] mV = par['m_'+V] if q2 < ml**2 or q2 > (mB-mV)**2: return False else: return TrueTrue if q2 is in the kinematically allowed region
def obs_q2int(fct, wc_obj, par, B, V, lep)-
Expand source code
def obs_q2int(fct, wc_obj, par, B, V, lep): """q2-integrated observable""" mB = par['m_'+B] mV = par['m_'+V] ml = par['m_'+lep] q2max = (mB-mV)**2 q2min = ml**2 def integrand(q2): return fct(q2) return flavio.math.integrate.nintegrate(integrand, q2min, q2max)q2-integrated observable
def prefactor(q2, par, B, V, lep)-
Expand source code
def prefactor(q2, par, B, V, lep): """Return the prefactor including constants and CKM elements""" GF = par['GF'] scale = config['renormalization scale']['bvll'] ml = par['m_'+lep] mB = par['m_'+B] mV = par['m_'+V] tauB = par['tau_'+B] laB = lambda_K(mB**2, mV**2, q2) laGa = lambda_K(q2, ml**2, 0.) qi_qj = meson_quark[(B, V)] if qi_qj == 'bu': Vij = ckm.get_ckm(par)[0,2] # V_{ub} for b->u transitions if qi_qj == 'bc': Vij = ckm.get_ckm(par)[1,2] # V_{cb} for b->c transitions if q2 <= ml**2: return 0 return 4*GF/sqrt(2)*VijReturn the prefactor including constants and CKM elements