How to use the flavio.physics.ckm function in flavio

To help you get started, we’ve selected a few flavio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flav-io / flavio / flavio / physics / bdecays / bvgamma.py View on Github external
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 )
github flav-io / flavio / flavio / physics / bdecays / bxll.py View on Github external
def inclusive_wc(q2, wc_obj, par, q, lep, mb):
    r"""Returns a dictionary of "inclusive" Wilson coefficients (including
    SM contributions) where universal bremsstrahlung and virtual corrections
    have been absorbed, as well as the dictionary with the Wilson
    coefficients without these corrections."""
    scale = flavio.config['renormalization scale']['bxll']
    alphas = flavio.physics.running.running.get_alpha(par, scale)['alpha_s']
    # the "usual" WCs
    wc = flavio.physics.bdecays.wilsoncoefficients.wctot_dict(wc_obj, 'b' + q + lep + lep, scale, par, nf_out=5)
    xi_u = flavio.physics.ckm.xi('u','b'+q)(par)
    xi_t = flavio.physics.ckm.xi('t','b'+q)(par)
    # virtual corrections
    Yq2 =flavio.physics.bdecays. matrixelements.Y(q2, wc, par, scale, 'b'+q) + (xi_u/xi_t)*flavio.physics.bdecays.matrixelements.Yu(q2, wc, par, scale, 'b'+q)
    delta_C7 = flavio.physics.bdecays.matrixelements.delta_C7(par=par, wc=wc, q2=q2, scale=scale, qiqj='b'+q)
    delta_C9 = flavio.physics.bdecays.matrixelements.delta_C9(par=par, wc=wc, q2=q2, scale=scale, qiqj='b'+q)
    mb_MSbar = flavio.physics.running.running.get_mb(par, scale)
    ll = lep + lep
    wc_eff = {}
    # add the universal bremsstrahlung corrections to the effective WCs
    brems_7 = 1 + alphas/pi * sigma7(q2/mb**2, scale, mb)
    brems_9 = 1 + alphas/pi * sigma9(q2/mb**2)
    wc_eff['7']  = wc['C7eff_b'+q]  * brems_7      + delta_C7
    wc_eff['7p'] = wc['C7effp_b'+q] * brems_7
    wc_eff['v']  = wc['C9_b'+q+ll]  * brems_9      + delta_C9 + Yq2
    wc_eff['vp'] = wc['C9p_b'+q+ll] * brems_9
    wc_eff['a']  = wc['C10_b'+q+ll] * brems_9
github flav-io / flavio / flavio / physics / wdecays / gammaw.py View on Github external
def gWq_SM(f1, f2, par):
    i = smeftew._sectors['u'][f1]
    j = smeftew._sectors['d'][f2]
    V = flavio.physics.ckm.get_ckm(par)
    return V[i - 1, j - 1] / 2
github flav-io / flavio / flavio / physics / mesonmixing / observables.py View on Github external
def amplitude_BJpsiK(par):
    xi_c = ckm.xi('c', 'bd')(par) # V_cb V_cd*
    return xi_c
github flav-io / flavio / flavio / physics / bdecays / lambdablambdall.py View on Github external
def prefactor(q2, par, scale):
    xi_t = flavio.physics.ckm.xi('t','bs')(par)
    alphaem = flavio.physics.running.running.get_alpha(par, scale)['alpha_e']
    mLb = par['m_Lambdab']
    mL = par['m_Lambda']
    la_K = flavio.physics.bdecays.common.lambda_K(mLb**2, mL**2, q2)
    return par['GF'] * xi_t * alphaem * sqrt(q2) * la_K**(1/4.) / sqrt(3 * 2 * mLb**3 * pi**5) / 32.
github flav-io / flavio / flavio / physics / bdecays / bxgamma.py View on Github external
if E0 != 1.6:
        raise ValueError("BR(B->Xqgamma) is not implemented for E0 different from 1.6 GeV")
    P0 = abs(wc['C7eff_'+bq])**2 + abs(wc['C7effp_'+bq])**2
    scale = flavio.config['renormalization scale']['bxgamma']
    alphas = flavio.physics.running.running.get_alpha(par, scale, nf_out=5)['alpha_s']
    at = alphas/4./pi
    coeffs = ['C1_'+bq, 'C2_'+bq, 'C3_'+bq, 'C4_'+bq, 'C5_'+bq, 'C6_'+bq, 'C7eff_'+bq, 'C8eff_'+bq]
    coeffs_p = ['C1p_'+bq, 'C2p_'+bq, 'C3p_'+bq, 'C4p_'+bq, 'C5p_'+bq, 'C6p_'+bq, 'C7effp_'+bq, 'C8effp_'+bq]
    wc1_8 = np.array([wc[name] for name in coeffs])
    wc1p_8p = np.array([wc[name] for name in coeffs_p])
    P1 = at    * np.dot(wc1_8, np.dot(ka1_r, wc1_8.conj())).real
    P1_p = at    * np.dot(wc1p_8p, np.dot(ka1_r, wc1p_8p.conj())).real
    P2 = at**2 * np.dot(wc1_8, np.dot(ka2_r, wc1_8.conj())).real
    P2_p = at**2 * np.dot(wc1p_8p, np.dot(ka2_r, wc1p_8p.conj())).real
    Prest = P1 + P2 + P1_p + P2_p
    r_u = flavio.physics.ckm.xi('u',bq)(par)/flavio.physics.ckm.xi('t',bq)(par)
    PVub = -0.0296854 * r_u.real + 0.123411 * abs(r_u)**2
    return P0 + Prest + PVub
github flav-io / flavio / flavio / physics / bdecays / bvlnu.py View on Github external
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)*Vij
github flav-io / flavio / flavio / physics / ddecays / dplnu.py View on Github external
def prefactor(q2, par, D, P, lep):
    GF = par['GF']
    ml = par['m_'+lep]
    qi_qj = meson_quark[(D, P)]
    if qi_qj == 'cd':
        Vij = ckm.get_ckm(par)[1, 0] # V_{cd} for c->d transitions
    if qi_qj == 'cs':
        Vij = ckm.get_ckm(par)[1, 1] # V_{cs} for c->s transitions
    if q2 <= ml**2:
        return 0
    return 4 * GF / sqrt(2) * Vij
github flav-io / flavio / flavio / physics / bdecays / bplnu.py View on Github external
def prefactor(q2, par, B, P, lep):
    GF = par['GF']
    ml = par['m_'+lep]
    scale = config['renormalization scale']['bpll']
    alphaem = running.get_alpha(par, scale)['alpha_e']
    di_dj = meson_quark[(B,P)]
    qi_qj = meson_quark[(B, P)]
    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)*Vij
github flav-io / flavio / flavio / physics / bdecays / bvlnu.py View on Github external
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)*Vij