Beispiel #1
0
class FF(CORE):
    """
    upol FF for positive pi,k. Use charge conj to get negative FF
    """

    def __init__(self,hadron):
        self.hadron=hadron
        self.aux = conf['aux']
        self.set_default_params()
        self.setup()
        if   hadron=='pi': self.ff = INTERPOLATOR('dsspipLO_0000')
        elif hadron=='k':  self.ff = INTERPOLATOR('dssKpLO_0000')
        elif hadron=='h':
            self.ffpi = INTERPOLATOR('dsspipLO_0000')
            self.ffk = INTERPOLATOR('dssKpLO_0000')

    def set_default_params(self):

        # free parameters
        self._widths1_fav   = 0.12
        self._widths1_ufav  = 0.15
        self._widths2_fav   = 0
        self._widths2_ufav  = 0

        # internal parameters
        self.widths1 = np.ones(11)
        self.widths2 = np.ones(11)

    def setup(self):
        # 1,  2,  3,  4,  5,  6,  7,  8,  9, 10
        # u, ub,  d, db,  s, sb,  c, cb,  b, bb
        if self.hadron=='pi':
            for i in range(1, 11):
                if   i == 1 or i==4: self.widths1[i] = self._widths1_fav
                else:                  self.widths1[i] = self._widths1_ufav
                if   i == 1 or i==4: self.widths2[i] = self._widths2_fav
                else:                  self.widths2[i] = self._widths2_ufav
        elif self.hadron=='k':
            for i in range(1, 11):
                if   i == 1 or i==6: self.widths1[i] = self._widths1_fav
                else:                  self.widths1[i] = self._widths1_ufav
                if   i == 1 or i==6: self.widths2[i] = self._widths2_fav
                else:                  self.widths2[i] = self._widths2_ufav
        elif self.hadron=='h':
            for i in range(1, 11):
                if   i == 1 or i==4 or i==6: self.widths1[i] = self._widths1_fav
                else:                  self.widths1[i] = self._widths1_ufav
                if   i == 1 or i==4 or i==6: self.widths2[i] = self._widths2_fav
                else:                  self.widths2[i] = self._widths2_ufav

    def get_C(self, z, Q2):
        if self.hadron == 'pi' or self.hadron == 'k': return self.ff.get_f(z, Q2)
        elif self.hadron == 'h': return self.ffpi.get_f(z, Q2) + self.ffk.get_f(z, Q2)

    def get_state(self):
        return self.widths1,self.widths2

    def set_state(self, state):
        self.widths1 = state[0]
        self.widths2 = state[1]
Beispiel #2
0
 def __init__(self, hadron):
     self.hadron = hadron
     self.aux = conf['aux']
     self.set_default_params()
     self.setup()
     if hadron == 'pi': self.ff = INTERPOLATOR('dsspipLO_0000')
     elif hadron == 'k': self.ff = INTERPOLATOR('dssKpLO_0000')
Beispiel #3
0
class PPDF(CORE):
    """
    polarized (helicity) PDF for proton. Use SU2 symetry to get for n
    """

    def __init__(self,hadron='p'):
        self.aux = conf['aux']
        self.set_default_params(hadron)
        self.setup(hadron)
        if hadron=='p': self.pdf=INTERPOLATOR('NNPDFpol11_100_0000')

    def set_default_params(self,hadron):

        # free params
        if hadron=='p':
            self._widths1_uv  = 0.3
            self._widths1_dv  = 0.3
            self._widths1_sea = 0.3

            self._widths2_uv  = 0
            self._widths2_dv = 0
            self._widths2_sea = 0

        if hadron=='pi-':
            self._widths1_ubv  = 0.3
            self._widths1_dv  = 0.3
            self._widths1_sea = 0.3

            self._widths2_ubv  = 0
            self._widths2_dv = 0
            self._widths2_sea = 0

        # internal
        self.widths1 = np.ones(11)
        self.widths2 = np.ones(11)

    def setup(self,hadron):
        if hadron=='p':
            for i in range(11):
                if   i == 1: self.widths1[i] = self._widths1_uv
                elif i == 3: self.widths1[i] = self._widths1_dv
                else:        self.widths1[i] = self._widths1_sea
            for i in range(11):
                if   i == 1: self.widths2[i] = self._widths2_uv
                elif i == 3: self.widths2[i] = self._widths2_dv
                else:        self.widths2[i] = self._widths2_sea

    def get_C(self, x, Q2):
        return self.pdf.get_f(x,Q2)

    def get_state(self):
        return self.widths1,self.widths2

    def set_state(self, state):
        self.widths1 = state[0]
        self.widths2 = state[1]
Beispiel #4
0
class PPDF(CORE):
    """
    polarized (helicity) PDF for proton. Use SU2 symetry to get for n
    """
    def __init__(self, hadron='p', file='NNPDFpol11_100_0000'):
        self.aux = conf['aux']
        if hadron == 'p': self.pdf = INTERPOLATOR(file)

    def get_C(self, x, Q2):
        return self.pdf.get_f(x, Q2)
Beispiel #5
0
class PDF(CORE):
    """
    upol PDF for proton. Use SU2 symetry to get for n
    """
    def __init__(self, hadron='p', file='CJ15lo_0000'):
        self.aux = conf['aux']
        if hadron == 'p': self.pdf = INTERPOLATOR(file)

    def get_C(self, x, Q2):
        return self.pdf.get_f(x, Q2)
Beispiel #6
0
 def __init__(self):
     conf['alphaSmode'] = 'backward'
     conf['order'] = 'NLO'
     conf['Q20'] = 1
     conf['alphaS'] = ALPHAS()
     self.aux = conf['aux']
     self.CF = self.aux.CF
     self.TR = self.aux.TR
     self.CA = self.aux.CA
     self.eU2 = 4.0 / 9.0
     self.eD2 = 1.0 / 9.0
     self.storage = {}
     conf['cpdf'] = INTERPOLATOR('CJ15lo_0000')
Beispiel #7
0
 def __init__(self, hadron='p'):
     self.aux = conf['aux']
     self.set_default_params(hadron)
     self.setup(hadron)
     if hadron == 'p': self.pdf = INTERPOLATOR('CJ15lo_0000')
     if hadron == 'pi-': self.pdf = INTERPOLATOR('JAM18PionPDFnlo_0000')
Beispiel #8
0
            return L
        elif verb == 1:
            for l in L:
                print(l)


if __name__ == '__main__':

    from qcdlib.interpolator import INTERPOLATOR
    from qcdlib.ff0 import FF
    from qcdlib.ff1 import FF as COLLINS
    from qcdlib.aux import AUX
    from obslib.sia import collins0 as stfuncs

    conf['aux'] = AUX()
    conf['cpipff'] = INTERPOLATOR('dsspipNLO_0000')
    conf['cpimff'] = INTERPOLATOR('dsspimNLO_0000')
    conf['cKpff'] = INTERPOLATOR('dssKpNLO_0000')
    conf['cKmff'] = INTERPOLATOR('dssKmNLO_0000')

    conf['lam2'] = 0.4
    conf['Q02'] = 1.0
    conf['ffpi'] = FF('pi')
    conf['ffk'] = FF('k')
    conf['collinspi'] = COLLINS('pi')
    conf['collinsk'] = COLLINS('k')
    conf['sia stfuncs'] = stfuncs

    conf['datasets'] = {}
    conf['datasets']['sia'] = {}
    conf['datasets']['sia']['xlsx'] = {}
Beispiel #9
0
 def __init__(self,hadron='p'):
     self.aux = conf['aux']
     self.set_default_params(hadron)
     self.setup(hadron)
     if hadron=='p': self.pdf=INTERPOLATOR('NNPDFpol11_100_0000')
Beispiel #10
0
 def __init__(self, hadron='p', file='NNPDFpol11_100_0000'):
     self.aux = conf['aux']
     if hadron == 'p': self.pdf = INTERPOLATOR(file)
Beispiel #11
0
 def __init__(self, hadron='p', file='CJ15lo_0000'):
     self.aux = conf['aux']
     if hadron == 'p': self.pdf = INTERPOLATOR(file)