class DISTRO(object): def __init__(self, root="./"): self.PDF = CT10(root + "PDF") self.FF = FragFuncs(root + "FF/tables/PILO.TAB") self.flavmap = {"u": 1, "ub": -1, "d": 2, "db": -2, "g": 0} def get_PDF(self, flav, x, Q): return self.PDF.get_pdf(self.flavmap[flav], x, Q) def get_FF(self, flav, x, Q): return self.FF.get_FF(x, Q ** 2, flav, +1)
class DISTRO(object): def __init__(self,root='./'): self.PDF=CT10(root+'PDF') self.FF=FragFuncs(root+'FF/tables/PILO.TAB') self.flavmap={'u':1,'ub':-1,'d':2,'db':-2,'g':0} def get_PDF(self,flav,x,Q): return self.PDF.get_pdf(self.flavmap[flav],x,Q) def get_FF(self,flav,x,Q): return self.FF.get_FF(x,Q**2,flav,+1)
def test_SIDIS_FO(): CPDF = Cteq6PDF('./') CFF = FragFuncs('FF/tables/PILO.TAB') Q2 = 15.0 z = 0.5 x = 0.15 s = 300.0 y = Q2 / x / s qT = 2.0 charge = 1 muR2 = Q2 muF2 = Q2 sidis = SIDIS_FO(CPDF, CFF) #print sidis.get_FO(x,y,z,Q2,qT**2,muR2,muF2,charge,method='quad') #print sidis.get_FO(x,y,z,Q2,qT**2,muR2,muF2,charge,method='gauss') for i in range(1000): print sidis.get_FO(x, y, z, Q2, qT**2, muR2, muF2, charge)
def test_SIDIS_ASY(): CPDF = Cteq6PDF('./') CFF = FragFuncs('FF/tables/PILO.TAB') Q2 = 2.0 z = 0.5 x = 0.005 s = 300.0 y = Q2 / x / s charge = 0 muR2 = Q2 muF2 = Q2 qTs = np.linspace(0.1, 1.4, 40) sidis = SIDIS_ASY(CPDF, CFF) #print sidis.get_ASY(x,y,z,Q2,qT**2,muR2,muF2,charge,method='quad') #print sidis.get_ASY(x,y,z,Q2,qT**2,muR2,muF2,charge,method='gauss') #for i in range(1000): print i,sidis.get_ASY(x,y,z,Q2,qT**2,muR2,muF2,charge) Y = [sidis.get_ASY(x, y, z, Q2, qT**2, muR2, muF2, charge) for qT in qTs] py.plot(qTs, Y) py.show()
def test_SIDIS_L(): #sidis=SIDIS() CPDF = Cteq6PDF('./') CFF = FragFuncs('FF/tables/PILO.TAB') Q2 = 15.0 z = 0.5 x = 0.15 s = 300.0 y = Q2 / x / s qT = 1.0 charge = 1 sidis = SIDIS_L(CPDF, CFF) #print sidis.get_L_bT_space(0.5,0.7,0.3,2.0,2.0,+1) def PDFNP(x, mu2, bT2): arg = -0.25 * (0.19 * np.log(Q2 / (1.0))) * bT2 arg += -1.0 * ((0.013 * (1 - x)**3) / x) * bT2 return np.exp(arg) def FFNP(z, mu2, bT2): arg = -0.25 * (0.19 * np.log(Q2 / (1.0))) * bT2 arg += -(0.2) * bT2 return np.exp(arg) sidis.TPDF.D['NP model'] = PDFNP sidis.TFF.D['NP model'] = FFNP #print sidis.get_L(x,y,z,Q2,qT,+1) mu2 = Q2 zetaF = Q2 zetaD = Q2 bT2 = 2.0 print sidis.get_L_bT_space(x, y, z, mu2, zetaF, zetaD, bT2, charge)
return tgral * qT / (2 * np.pi) def get_L_FFT(self, x, y, z, Q2, mu2, zetaF, zetaD, qT, charge): D = self.D L = lambda bT: self.get_L_bT_space(x, y, z, Q2, mu2, zetaF, zetaD, bT** 2, charge) / qT f = lambda z: z * L(z / qT) f = np.vectorize(f) return D['hankel'].transform(f, ret_err=False)[0] / qT / (2 * np.pi) if __name__ == "__main__": #sidis=SIDIS() CPDF = Cteq6PDF('./') CFF = FragFuncs('FF/tables/PILO.TAB') Q2 = 15.0 z = 0.5 x = 0.15 s = 300.0 y = Q2 / x / s qT = 1.0 charge = 1 sidis = SIDIS(CPDF, CFF) #print sidis.get_L_bT_space(0.5,0.7,0.3,2.0,2.0,+1) def PDFNP(x, mu2, bT2):
def __init__(self,root='./'): self.PDF=CT10(root+'PDF') self.FF=FragFuncs(root+'FF/tables/PILO.TAB') self.flavmap={'u':1,'ub':-1,'d':2,'db':-2,'g':0}
def __init__(self, root="./"): self.PDF = CT10(root + "PDF") self.FF = FragFuncs(root + "FF/tables/PILO.TAB") self.flavmap = {"u": 1, "ub": -1, "d": 2, "db": -2, "g": 0}