How to use the flavio.physics.ckm.get_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 / bxlnu.py View on Github external
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
    r_WC = (   g(xc, xl)      * (abs(wc['VL'])**2 + abs(wc['VR'])**2)
             - gLR(xc, xl)    * (wc['VL']*wc['VR']).real
             + g(xc, xl)/4.   * (abs(wc['SR'])**2 + abs(wc['SL'])**2)
             + gLR(xc, xl)/2. * (wc['SR']*wc['SL']).real
             + 12*g(xc, xl)   * abs(wc['T'])**2
             # the following terms vanish for vanishing lepton mass
             + gVS(xc, xl)    * ((wc['VL']*wc['SR']).real
                                       + (wc['VR']*wc['SL']).real)
             + gVSp(xc, xl)   * ((wc['VL']*wc['SL']).real
                                       + (wc['VR']*wc['SR']).real)
             - 12*gVSp(xc, xl)* (wc['VL']*wc['T']).real
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 / taudecays / taupnu.py View on Github external
def _br_taupnu(wc_obj, par, P, lep):
    r"""Branching ratio of $\tau^+\to P^+\bar\nu_\ell$."""
    # CKM element
    scale = flavio.config['renormalization scale']['taudecays']
    if P == 'pi+':
        Vij = flavio.physics.ckm.get_ckm(par)[0, 0]  # Vud
        qqlnu = 'dutaunu' + lep
        mq1 = flavio.physics.running.running.get_md(par, scale)
        mq2 = flavio.physics.running.running.get_mu(par, scale)
    elif P == 'K+':
        Vij = flavio.physics.ckm.get_ckm(par)[0, 1]  # Vus
        qqlnu = 'sutaunu' + lep
        mq1 = flavio.physics.running.running.get_ms(par, scale)
        mq2 = flavio.physics.running.running.get_mu(par, scale)
    # Wilson coefficients
    wc = wc_obj.get_wc(qqlnu, scale, par, nf_out=4)
    # add SM contribution to Wilson coefficient
    if lep == 'tau':
        # for the SM contribution, need the Fermi constant with possible
        # NP effects in mu->enunu subtracted, not the measured one
        r_GF = GFeff(wc_obj, par) / par['GF']
        wc['CVL_' + qqlnu] += get_CVLSM(par, scale, nf=4) * r_GF
github flav-io / flavio / flavio / physics / kdecays / kpilnu.py View on Github external
def _get_angularcoeff(q2, wc_obj, par, K, P, lep, nu):
    GF = par['GF']
    ml = par['m_'+lep]
    mK = par['m_'+K]
    mP = par['m_'+P]
    Vus = flavio.physics.ckm.get_ckm(par)[0,1]
    # renormalization scale is m_rho
    scale = par['m_rho0']
    ms = flavio.physics.running.running.get_ms(par, scale)
    wc = flavio.physics.bdecays.wilsoncoefficients.get_wceff_fccc(wc_obj, par, 'su', lep, nu, ms, scale, nf=3)
    N = 4*GF/sqrt(2)*Vus
    ff = get_ff(q2, par, K)
    h = flavio.physics.bdecays.angular.helicity_amps_p(q2, mK, mP, ms, 0, ml, 0, ff, wc, N)
    J = flavio.physics.bdecays.angular.angularcoeffs_general_p(h, q2, mK, mP, ms, 0, ml, 0)
    return J
github flav-io / flavio / flavio / physics / bdecays / blnu.py View on Github external
def _br_blnu(wc_obj, par, B, lep, nu):
    r"""Branching ratio of $B_q\to\ell^+\nu_\ell$."""
    bq = meson_quark[B]
    # CKM element
    if bq == 'bc':
        Vxb = flavio.physics.ckm.get_ckm(par)[1,2]
    elif bq == 'bu':
        Vxb = flavio.physics.ckm.get_ckm(par)[0,2]
    # renormalization scale
    scale = flavio.config['renormalization scale']['bll']
    # Wilson coefficients
    wc = wc_obj.get_wc(bq + lep + 'nu' + nu, scale, par)
    # add SM contribution to Wilson coefficient
    if lep == nu:
        wc['CVL_'+bq+lep+'nu'+nu] += flavio.physics.bdecays.wilsoncoefficients.get_CVLSM(par, scale, nf=5)
    mb = flavio.physics.running.running.get_mb(par, scale)
    if B == 'B+':
        mq = 0  # neglecting up quark mass
    elif B == 'Bc':
        mq = flavio.physics.running.running.get_mc(par, scale)
    return br_plnu_general(wc, par, Vxb, B, bq, lep, nu, mb, mq, delta=0)
github flav-io / flavio / flavio / physics / bdecays / bxgamma.py View on Github external
def BRBXgamma(wc_obj, par, q, E0):
    r"""Branching ratio of $B\to X_q\gamma$ ($q=s$ or $d$) normalized to
    $B\to X_c\ell\nu$ taken from experiment. `E0` is the photon energy
    cutoff $E_0$ in GeV
    (currently works only for `E0=1.6`).
    See arXiv:1503.01789 and references therein."""
    scale = flavio.config['renormalization scale']['bxgamma']
    alphaem = 1/137.035999139 # this is alpha_e(0), a constant for our purposes
    bq = 'b' + q
    xi_t = flavio.physics.ckm.xi('t',bq)(par)
    Vcb = flavio.physics.ckm.get_ckm(par)[1,2]
    C = par['C_BXlnu']
    BRSL = par['BR(B->Xcenu)_exp']
    # these are the b->qee Wilson coefficients - they contain the b->qgamma ones as a subset
    wc = flavio.physics.bdecays.wilsoncoefficients.wctot_dict(wc_obj, bq+'ee', scale, par, nf_out=5)
    PE0 = PE0_BR_BXgamma(wc, par, q, E0)
    # uncertainty due to higher order contributions, interpolation, and nonperturbative effects
    P_uncertainty = 0.1249 * par['delta_BX'+q+'gamma'] # PE0_NLO * delta
    # central value of non-perturbative correction (M. Misiak, private communication)
    P_nonpert = 0.00381745
    # eq. (2.1) of hep-ph/0609241
    return BRSL * abs(xi_t)**2/abs(Vcb)**2 * 6*alphaem/pi/C * (PE0 + P_nonpert + P_uncertainty)