Module flavio.physics.bdecays.formfactors.b_v.bsz_parameters

Functions

def bsz_load(version, fit, transitions, constraints)
Expand source code
def bsz_load(version, fit, transitions, constraints):
    """Load the form factor parameters given in arXiv:1503.05534"""
    for tr in transitions:
        for m, v in resonance_masses_bsz[tr].items():
            constraints.set_constraint('{} BCL {}'.format(tr, m), v)
        filename = 'data/arXiv-1503-05534{}/{}_{}.json'.format(version, transition_filename(tr), fit)
        load_parameters(filename, tr, constraints)

Load the form factor parameters given in arXiv:1503.05534

def bsz_load_v1_combined(constraints)
Expand source code
def bsz_load_v1_combined(constraints):
    bsz_load('v1', 'LCSR-Lattice', ('B->K*', 'Bs->phi', 'Bs->K*'), constraints)
def bsz_load_v1_lcsr(constraints)
Expand source code
def bsz_load_v1_lcsr(constraints):
    bsz_load('v1', 'LCSR', ('B->K*', 'B->omega', 'B->rho', 'Bs->phi', 'Bs->K*'), constraints)
def bsz_load_v2_combined(constraints)
Expand source code
def bsz_load_v2_combined(constraints):
    bsz_load('v2', 'LCSR-Lattice', ('B->K*', 'Bs->phi', 'Bs->K*'), constraints)
def bsz_load_v2_lcsr(constraints)
Expand source code
def bsz_load_v2_lcsr(constraints):
    bsz_load('v2', 'LCSR', ('B->K*', 'B->omega', 'B->rho', 'Bs->phi', 'Bs->K*'), constraints)
def get_ffpar(filename)
Expand source code
def get_ffpar(filename):
    f = pkgutil.get_data('flavio.physics', filename)
    data = json.loads(f.decode('utf-8'))
    central = np.array([data['central'][ff].get(a, np.nan) for ff, a in ff_a])
    unc = np.array([data['uncertainty'][ff].get(a, np.nan) for ff, a in ff_a])
    corr = np.array([[data['correlation'][ff1 + ff2].get(a1 + a2, np.nan) for ff1, a1 in ff_a] for ff2, a2 in ff_a])
    # delete the parameters a0_A12 and a0_T1, which are instead fixed
    # using the exact kinematical relations, cf. eq. (16) of arXiv:1503.05534
    pos_a0_A12 = ff_a.index(('A12', 'a0'))
    pos_a0_T2 = ff_a.index(('T2', 'a0'))
    central = np.delete(central, [pos_a0_A12, pos_a0_T2])
    unc = np.delete(unc, [pos_a0_A12, pos_a0_T2])
    corr = np.delete(corr, [pos_a0_A12, pos_a0_T2], axis=0)
    corr = np.delete(corr, [pos_a0_A12, pos_a0_T2], axis=1)
    return [central, unc, corr]
def gkvd_load(version, fit, transitions, constraints)
Expand source code
def gkvd_load(version, fit, transitions, constraints):
    """Load the form factor parameters given in arXiv:1811.00983"""
    for tr in transitions:
        for m, v in resonance_masses_gkvd[tr].items():
            constraints.set_constraint('{} BCL {}'.format(tr, m), v)
        filename = 'data/arXiv-1811-00983{}/{}_{}.json'.format(version, transition_filename(tr), fit)
        load_parameters(filename, tr, constraints)

Load the form factor parameters given in arXiv:1811.00983

def load_parameters(filename, process, constraints)
Expand source code
def load_parameters(filename, process, constraints):
    implementation_name = process + ' BSZ'
    parameter_names = [implementation_name + ' ' + coeff_name for coeff_name in a_ff_string]
    # a0_A0 and a0_T2 are not treated as independent parameters!
    parameter_names.remove(implementation_name + ' a0_A12')
    parameter_names.remove(implementation_name + ' a0_T2')
    for parameter_name in parameter_names:
        try:  # check if parameter object already exists
            p = Parameter[parameter_name]
        except KeyError:  # if not, create a new one
            p = Parameter(parameter_name)
            # get LaTeX representation of coefficient and form factor names
            _tex_a = tex_a[parameter_name.split(' ')[-1].split('_')[0]]
            _tex_ff = tex_ff[parameter_name.split(' ')[-1].split('_')[-1]]
            p.tex = r'$' + _tex_a + r'^{' + _tex_ff + r'}$'
            p.description = r'BSZ form factor parametrization coefficient $' + _tex_a + r'$ of $' + _tex_ff + r'$'
        else:  # if parameter exists, remove existing constraints
            constraints.remove_constraint(parameter_name)
    [central, unc, corr] = get_ffpar(filename)
    constraints.add_constraint(parameter_names,
        MultivariateNormalDistribution(central_value=central, covariance=np.outer(unc, unc)*corr))
def transition_filename(tr)
Expand source code
def transition_filename(tr):
    """Get the part of the filename specifying the transition (e.g. BKstar)
    from a transition string (e.g. B->K*)."""
    return tr.replace('->', '').replace('*', 'star')

Get the part of the filename specifying the transition (e.g. BKstar) from a transition string (e.g. B->K*).