Exemplo n.º 1
0
class WilsonCoefficients(object):
    """
    """
    def __init__(self):
        self.initial = {}
        self.coefficients = coefficients
        self.all_wc = [c for v in self.coefficients.values()
                       for c in v]  # list of all coeffs

    rge_derivative = {}
    for sector in coefficients.keys():
        rge_derivative[sector] = running.make_wilson_rge_derivative(
            adm[sector])

    def set_initial(self, dict, scale):
        for name, value in dict.items():
            if name not in self.all_wc:
                raise KeyError("Wilson coefficient " + name + " not known")
            self.initial[name] = (scale, value)

    def get_wc(self, sector, scale, par, nf_out=None):
        # intialize with complex zeros
        values_in = np.zeros(len(self.coefficients[sector]), dtype=complex)
        # see if an initial value exists
        scale_in = None
        for idx, name in enumerate(self.coefficients[sector]):
            if name in self.initial.keys():
                scale_in_new = self.initial[name][0]
                # make sure that if there are several initial values, they are at the same scale
                if scale_in is not None and scale_in_new != scale_in:
                    raise ValueError(
                        "You cannot define initial values at different scales for Wilson coefficients that mix under renormalization"
                    )
                else:
                    scale_in = scale_in_new
                values_in[idx] = self.initial[name][1]
        if scale_in is None:
            # if no initial values have been given, no need to run anyway!
            return dict(zip(self.coefficients[sector],
                            values_in))  # these are all zero
        if self.rge_derivative[sector] is None:
            # if the sector has vanishing anomalous dimensions, nno need to run!
            return dict(zip(self.coefficients[sector],
                            values_in))  # these are just the initial values
        # otherwise, run
        values_out = running.get_wilson(par,
                                        values_in,
                                        self.rge_derivative[sector],
                                        scale_in,
                                        scale,
                                        nf_out=nf_out)
        return dict(zip(self.coefficients[sector], values_out))
Exemplo n.º 2
0
def run_wc_df1(par, c_in, scale_in, scale_out):
    adm = gamma_all
    return running.get_wilson(par, c_in,
                              running.make_wilson_rge_derivative(adm),
                              scale_in, scale_out)
Exemplo n.º 3
0
    # Basis: 0: VLL, 1: SLL, 2: TLL, 3: VRR, 4: SRR, 5: TRR, 6: VLR, 7: SLR
    gamma = np.zeros((8, 8))
    gamma[0, 0] = gamma_dict_nlo['VLL']
    gamma[1, 1] = gamma_dict_nlo['SLL'][0, 0]  # SLL
    gamma[2, 2] = gamma_dict_nlo['SLL'][1, 1]  # TLL
    gamma[1, 2] = gamma_dict_nlo['SLL'][0, 1]  # SLL-TLL
    gamma[2, 1] = gamma_dict_nlo['SLL'][1, 0]  # TLL-SLL
    gamma[6, 6] = gamma_dict_nlo['LR'][0, 0]  # VLR
    gamma[7, 7] = gamma_dict_nlo['LR'][1, 1]  # SLR
    gamma[6, 7] = gamma_dict_nlo['LR'][0, 1]  # VLR-SLR
    gamma[7, 6] = gamma_dict_nlo['LR'][1, 0]  # SLR-VLR
    # and due to QCD parity invariance:
    gamma[3:6, 3:6] = gamma[0:3, 0:3]  # XRR = XLL
    return gamma


def gamma_df2(c, alpha_s, mu, nf):
    r"""RHS of the RGE for $\Delta F=2$ Wilson coefficients written in the form
    $$\frac{d}{d\mu} \vec C = \gamma^T \vec C / \mu \equiv \vec R$$
    """
    gamma = gamma_df2_array(nf, alpha_s)
    return np.dot(gamma.T, c) / mu


df2_rge_derivative = running.make_wilson_rge_derivative(gamma_df2_array)


def run_wc_df2(par, c_in, scale_in, scale_out):
    return running.get_wilson(par, c_in, df2_rge_derivative, scale_in,
                              scale_out)
Exemplo n.º 4
0
def run_wc_df1(par, c_in, scale_in, scale_out):
    adm = gamma_all
    return running.get_wilson(par, c_in, running.make_wilson_rge_derivative(adm), scale_in, scale_out)
Exemplo n.º 5
0
Arquivo: rge.py Projeto: nsahoo/flavio
def run_wc_df2(par, c_in, scale_in, scale_out):
    adm = lambda nf, alpha_s, alpha_e: gamma_df2_array(nf, alpha_s)
    return running.get_wilson(par, c_in, running.make_wilson_rge_derivative(adm), scale_in, scale_out)
Exemplo n.º 6
0
    a =  alpha_s/(4.*pi)
    # C = alpha_s/(4pi) * ( C^0 + alpha_s/(4pi) * C^1 )
    gamma_dict_nlo = {k: a*c[0]+a**2*c[1] for k,c in gamma_dict.items()}
    # Basis: 0: VLL, 1: SLL, 2: TLL, 3: VRR, 4: SRR, 5: TRR, 6: VLR, 7: SLR
    gamma=np.zeros((8,8))
    gamma[0,0] = gamma_dict_nlo['VLL']
    gamma[1,1] = gamma_dict_nlo['SLL'][0,0] # SLL
    gamma[2,2] = gamma_dict_nlo['SLL'][1,1] # TLL
    gamma[1,2] = gamma_dict_nlo['SLL'][0,1] # SLL-TLL
    gamma[2,1] = gamma_dict_nlo['SLL'][1,0] # TLL-SLL
    gamma[6,6] = gamma_dict_nlo['LR'][0,0] # VLR
    gamma[7,7] = gamma_dict_nlo['LR'][1,1] # SLR
    gamma[6,7] = gamma_dict_nlo['LR'][0,1] # VLR-SLR
    gamma[7,6] = gamma_dict_nlo['LR'][1,0] # SLR-VLR
    # and due to QCD parity invariance:
    gamma[3:6,3:6] = gamma[0:3,0:3] # XRR = XLL
    return gamma


def gamma_df2(c, alpha_s, mu, nf):
    r"""RHS of the RGE for $\Delta F=2$ Wilson coefficients written in the form
    $$\frac{d}{d\mu} \vec C = \gamma^T \vec C / \mu \equiv \vec R$$
    """
    gamma = gamma_df2_array(nf, alpha_s)
    return np.dot(gamma.T, c)/mu

df2_rge_derivative = running.make_wilson_rge_derivative(gamma_df2_array)

def run_wc_df2(par, c_in, scale_in, scale_out):
    return running.get_wilson(par, c_in, df2_rge_derivative, scale_in, scale_out)
Exemplo n.º 7
0
def run_wc_df2(par, c_in, scale_in, scale_out):
    adm = lambda nf, alpha_s, alpha_e: gamma_df2_array(nf, alpha_s)
    return running.get_wilson(par, c_in,
                              running.make_wilson_rge_derivative(adm),
                              scale_in, scale_out)