Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pygano.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pygano.f
1 
2 C*********************************************************************
3 
4 C...PYGANO
5 C...Evaluates the parton distributions of the anomalous photon,
6 C...inhomogeneously evolved from a scale P2 (where it vanishes) to Q2.
7 C...KF=0 gives the sum over (up to) 5 flavours,
8 C...KF<0 limits to flavours up to abs(KF),
9 C...KF>0 is for flavour KF only.
10 C...ALAM is the 4-flavour Lambda, which is automatically converted
11 C...to 3- and 5-flavour equivalents as needed.
12 C...Adapted from SaSgam library, authors G.A. Schuler and T. Sjostrand.
13 
14  SUBROUTINE pygano(KF,X,Q2,P2,ALAM,XPGA,VXPGA)
15 
16 C...Double precision and integer declarations.
17  IMPLICIT DOUBLE PRECISION(a-h, o-z)
18  IMPLICIT INTEGER(i-n)
19  INTEGER pyk,pychge,pycomp
20 C...Local arrays and data.
21  dimension xpga(-6:6), vxpga(-6:6), alamsq(3:5)
22  DATA pmc/1.3d0/, pmb/4.6d0/, aem/0.007297d0/, aem2pi/0.0011614d0/
23 
24 C...Reset output.
25  DO 100 kfl=-6,6
26  xpga(kfl)=0d0
27  vxpga(kfl)=0d0
28  100 CONTINUE
29  IF(q2.LE.p2) RETURN
30  kfa=iabs(kf)
31 
32 C...Calculate Lambda; protect against unphysical Q2 and P2 input.
33  alamsq(3)=(alam*(pmc/alam)**(2d0/27d0))**2
34  alamsq(4)=alam**2
35  alamsq(5)=(alam*(alam/pmb)**(2d0/23d0))**2
36  p2eff=max(p2,1.2d0*alamsq(3))
37  IF(kf.EQ.4) p2eff=max(p2eff,pmc**2)
38  IF(kf.EQ.5) p2eff=max(p2eff,pmb**2)
39  q2eff=max(q2,p2eff)
40  xl=-log(x)
41 
42 C...Find number of flavours at lower and upper scale.
43  nfp=4
44  IF(p2eff.LT.pmc**2) nfp=3
45  IF(p2eff.GT.pmb**2) nfp=5
46  nfq=4
47  IF(q2eff.LT.pmc**2) nfq=3
48  IF(q2eff.GT.pmb**2) nfq=5
49 
50 C...Define range of flavour loop.
51  IF(kf.EQ.0) THEN
52  kflmn=1
53  kflmx=5
54  ELSEIF(kf.LT.0) THEN
55  kflmn=1
56  kflmx=kfa
57  ELSE
58  kflmn=kfa
59  kflmx=kfa
60  ENDIF
61 
62 C...Loop over flavours the photon can branch into.
63  DO 110 kfl=kflmn,kflmx
64 
65 C...Light flavours: calculate t range and (approximate) s range.
66  IF(kfl.LE.3.AND.(kfl.EQ.1.OR.kfl.EQ.kf)) THEN
67  tdiff=log(q2eff/p2eff)
68  s=(6d0/(33d0-2d0*nfq))*log(log(q2eff/alamsq(nfq))/
69  & log(p2eff/alamsq(nfq)))
70  IF(nfq.GT.nfp) THEN
71  q2div=pmb**2
72  IF(nfq.EQ.4) q2div=pmc**2
73  snfq=(6d0/(33d0-2d0*nfq))*log(log(q2div/alamsq(nfq))/
74  & log(p2eff/alamsq(nfq)))
75  snfp=(6d0/(33d0-2d0*(nfq-1)))*log(log(q2div/alamsq(nfq-1))/
76  & log(p2eff/alamsq(nfq-1)))
77  s=s+(log(q2div/p2eff)/log(q2eff/p2eff))*(snfp-snfq)
78  ENDIF
79  IF(nfq.EQ.5.AND.nfp.EQ.3) THEN
80  q2div=pmc**2
81  snf4=(6d0/(33d0-2d0*4))*log(log(q2div/alamsq(4))/
82  & log(p2eff/alamsq(4)))
83  snf3=(6d0/(33d0-2d0*3))*log(log(q2div/alamsq(3))/
84  & log(p2eff/alamsq(3)))
85  s=s+(log(q2div/p2eff)/log(q2eff/p2eff))*(snf3-snf4)
86  ENDIF
87 
88 C...u and s quark do not need a separate treatment when d has been done.
89  ELSEIF(kfl.EQ.2.OR.kfl.EQ.3) THEN
90 
91 C...Charm: as above, but only include range above c threshold.
92  ELSEIF(kfl.EQ.4) THEN
93  IF(q2.LE.pmc**2) goto 110
94  p2eff=max(p2eff,pmc**2)
95  q2eff=max(q2eff,p2eff)
96  tdiff=log(q2eff/p2eff)
97  s=(6d0/(33d0-2d0*nfq))*log(log(q2eff/alamsq(nfq))/
98  & log(p2eff/alamsq(nfq)))
99  IF(nfq.EQ.5.AND.nfp.EQ.4) THEN
100  q2div=pmb**2
101  snfq=(6d0/(33d0-2d0*nfq))*log(log(q2div/alamsq(nfq))/
102  & log(p2eff/alamsq(nfq)))
103  snfp=(6d0/(33d0-2d0*(nfq-1)))*log(log(q2div/alamsq(nfq-1))/
104  & log(p2eff/alamsq(nfq-1)))
105  s=s+(log(q2div/p2eff)/log(q2eff/p2eff))*(snfp-snfq)
106  ENDIF
107 
108 C...Bottom: as above, but only include range above b threshold.
109  ELSEIF(kfl.EQ.5) THEN
110  IF(q2.LE.pmb**2) goto 110
111  p2eff=max(p2eff,pmb**2)
112  q2eff=max(q2,p2eff)
113  tdiff=log(q2eff/p2eff)
114  s=(6d0/(33d0-2d0*nfq))*log(log(q2eff/alamsq(nfq))/
115  & log(p2eff/alamsq(nfq)))
116  ENDIF
117 
118 C...Evaluate flavour-dependent prefactor (charge^2 etc.).
119  chsq=1d0/9d0
120  IF(kfl.EQ.2.OR.kfl.EQ.4) chsq=4d0/9d0
121  fac=aem2pi*2d0*chsq*tdiff
122 
123 C...Evaluate parton distributions (normalized to unit momentum sum).
124  IF(kfl.EQ.1.OR.kfl.EQ.4.OR.kfl.EQ.5.OR.kfl.EQ.kf) THEN
125  xval= ((1.5d0+2.49d0*s+26.9d0*s**2)/(1d0+32.3d0*s**2)*x**2 +
126  & (1.5d0-0.49d0*s+7.83d0*s**2)/(1d0+7.68d0*s**2)*(1d0-x)**2 +
127  & 1.5d0*s/(1d0-3.2d0*s+7d0*s**2)*x*(1d0-x)) *
128  & x**(1d0/(1d0+0.58d0*s)) * (1d0-x**2)**(2.5d0*s/(1d0+10d0*s))
129  xglu= 2d0*s/(1d0+4d0*s+7d0*s**2) *
130  & x**(-1.67d0*s/(1d0+2d0*s)) * (1d0-x**2)**(1.2d0*s) *
131  & ((4d0*x**2+7d0*x+4d0)*(1d0-x)/3d0 - 2d0*x*(1d0+x)*xl)
132  xsea= 0.333d0*s**2/(1d0+4.90d0*s+4.69d0*s**2+21.4d0*s**3) *
133  & x**(-1.18d0*s/(1d0+1.22d0*s)) * (1d0-x)**(1.2d0*s) *
134  & ((8d0-73d0*x+62d0*x**2)*(1d0-x)/9d0 +
135  & (3d0-8d0*x**2/3d0)*x*xl + (2d0*x-1d0)*x*xl**2)
136 
137 C...Threshold factors for c and b sea.
138  sll=log(log(q2eff/alam**2)/log(p2eff/alam**2))
139  xchm=0d0
140  IF(q2.GT.pmc**2.AND.q2.GT.1.001d0*p2eff) THEN
141  sch=max(0d0,log(log(pmc**2/alam**2)/log(p2eff/alam**2)))
142  xchm=xsea*(1d0-(sch/sll)**3)
143  ENDIF
144  xbot=0d0
145  IF(q2.GT.pmb**2.AND.q2.GT.1.001d0*p2eff) THEN
146  sbt=max(0d0,log(log(pmb**2/alam**2)/log(p2eff/alam**2)))
147  xbot=xsea*(1d0-(sbt/sll)**3)
148  ENDIF
149  ENDIF
150 
151 C...Add contribution of each valence flavour.
152  xpga(0)=xpga(0)+fac*xglu
153  xpga(1)=xpga(1)+fac*xsea
154  xpga(2)=xpga(2)+fac*xsea
155  xpga(3)=xpga(3)+fac*xsea
156  xpga(4)=xpga(4)+fac*xchm
157  xpga(5)=xpga(5)+fac*xbot
158  xpga(kfl)=xpga(kfl)+fac*xval
159  vxpga(kfl)=vxpga(kfl)+fac*xval
160  110 CONTINUE
161  DO 120 kfl=1,5
162  xpga(-kfl)=xpga(kfl)
163  vxpga(-kfl)=vxpga(kfl)
164  120 CONTINUE
165 
166  RETURN
167  END