-
Notifications
You must be signed in to change notification settings - Fork 0
/
theory.py
executable file
·90 lines (64 loc) · 1.93 KB
/
theory.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/env python
import sys,os
import numpy as np
import pandas as pd
import copy
from scipy import interpolate
#--lhapdf
#import lhapdf
#pdf=lhapdf.mkPDF("CJ15nlo", 0)
#--pdflib
from pdflib import PDFLIB
pdf=PDFLIB('lhagrid/CJ15nlo_0000.dat','lhagrid/CJ15nlo.info')
def get_xsec(y3,y4,pT,rS,muR,muF,q=1,g=1):
xT=2.*pT/rS
x1=0.5*xT*(np.exp( y3)+np.exp( y4))
x2=0.5*xT*(np.exp(-y3)+np.exp(-y4))
s=x1*x2*rS**2
t=-x1*rS*pT*np.exp(-y3)
u=-x2*rS*pT*np.exp(+y3)
M2qqb = 8./9.*(t**2+u**2+2*s*(s+t+u))/t/u
M2gq = -1./9.*(s**2+u**2+2*t*(s+t+u))/s/u
eU=4./9.
eD=4./9.
gA=pdf.xfxQ(21,x1,muF)/x1
gB=pdf.xfxQ(21,x2,muF)/x2
dA=pdf.xfxQ( 1,x1,muF)/x1
uA=pdf.xfxQ( 2,x1,muF)/x1
sA=pdf.xfxQ( 3,x1,muF)/x1
cA=pdf.xfxQ( 4,x1,muF)/x1
bA=pdf.xfxQ( 5,x1,muF)/x1
dbA=pdf.xfxQ(-1,x1,muF)/x1
ubA=pdf.xfxQ(-2,x1,muF)/x1
sbA=pdf.xfxQ(-3,x1,muF)/x1
cbA=pdf.xfxQ(-4,x1,muF)/x1
bbA=pdf.xfxQ(-5,x1,muF)/x1
dB=pdf.xfxQ( 1,x2,muF)/x2
uB=pdf.xfxQ( 2,x2,muF)/x2
sB=pdf.xfxQ(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