Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyggam.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pyggam.f
1 
2 C*********************************************************************
3 
4 C...PYGGAM
5 C...Constructs the F2 and parton distributions of the photon
6 C...by summing homogeneous (VMD) and inhomogeneous (anomalous) terms.
7 C...For F2, c and b are included by the Bethe-Heitler formula;
8 C...in the 'MSbar' scheme additionally a Cgamma term is added.
9 C...Contains the SaS sets 1D, 1M, 2D and 2M.
10 C...Adapted from SaSgam library, authors G.A. Schuler and T. Sjostrand.
11 
12  SUBROUTINE pyggam(ISET,X,Q2,P2,IP2,F2GM,XPDFGM)
13 
14 C...Double precision and integer declarations.
15  IMPLICIT DOUBLE PRECISION(a-h, o-z)
16  IMPLICIT INTEGER(i-n)
17  INTEGER pyk,pychge,pycomp
18 C...Commonblocks.
19  common/pyint8/xpvmd(-6:6),xpanl(-6:6),xpanh(-6:6),xpbeh(-6:6),
20  &xpdir(-6:6)
21  common/pyint9/vxpvmd(-6:6),vxpanl(-6:6),vxpanh(-6:6),vxpdgm(-6:6)
22  SAVE /pyint8/,/pyint9/
23 C...Local arrays.
24  dimension xpdfgm(-6:6),xpga(-6:6), vxpga(-6:6)
25 C...Charm and bottom masses (low to compensate for J/psi etc.).
26  DATA pmc/1.3d0/, pmb/4.6d0/
27 C...alpha_em and alpha_em/(2*pi).
28  DATA aem/0.007297d0/, aem2pi/0.0011614d0/
29 C...Lambda value for 4 flavours.
30  DATA alam/0.20d0/
31 C...Mixture u/(u+d), = 0.5 for incoherent and = 0.8 for coherent sum.
32  DATA fracu/0.8d0/
33 C...VMD couplings f_V**2/(4*pi).
34  DATA frho/2.20d0/, fomega/23.6d0/, fphi/18.4d0/
35 C...Masses for rho (=omega) and phi.
36  DATA pmrho/0.770d0/, pmphi/1.020d0/
37 C...Number of points in integration for IP2=1.
38  DATA nstep/100/
39 
40 C...Reset output.
41  f2gm=0d0
42  DO 100 kfl=-6,6
43  xpdfgm(kfl)=0d0
44  xpvmd(kfl)=0d0
45  xpanl(kfl)=0d0
46  xpanh(kfl)=0d0
47  xpbeh(kfl)=0d0
48  xpdir(kfl)=0d0
49  vxpvmd(kfl)=0d0
50  vxpanl(kfl)=0d0
51  vxpanh(kfl)=0d0
52  vxpdgm(kfl)=0d0
53  100 CONTINUE
54 
55 C...Set Q0 cut-off parameter as function of set used.
56  IF(iset.LE.2) THEN
57  q0=0.6d0
58  ELSE
59  q0=2d0
60  ENDIF
61  q02=q0**2
62 
63 C...Scale choice for off-shell photon; common factors.
64  q2a=q2
65  facnor=1d0
66  IF(ip2.EQ.1) THEN
67  p2mx=p2+q02
68  q2a=q2+p2*q02/max(q02,q2)
69  facnor=log(q2/q02)/nstep
70  ELSEIF(ip2.EQ.2) THEN
71  p2mx=max(p2,q02)
72  ELSEIF(ip2.EQ.3) THEN
73  p2mx=p2+q02
74  q2a=q2+p2*q02/max(q02,q2)
75  ELSEIF(ip2.EQ.4) THEN
76  p2mx=q2*(q02+p2)/(q2+p2)*exp(p2*(q2-q02)/
77  & ((q2+p2)*(q02+p2)))
78  ELSEIF(ip2.EQ.5) THEN
79  p2mxa=q2*(q02+p2)/(q2+p2)*exp(p2*(q2-q02)/
80  & ((q2+p2)*(q02+p2)))
81  p2mx=q0*sqrt(p2mxa)
82  facnor=log(q2/p2mxa)/log(q2/p2mx)
83  ELSEIF(ip2.EQ.6) THEN
84  p2mx=q2*(q02+p2)/(q2+p2)*exp(p2*(q2-q02)/
85  & ((q2+p2)*(q02+p2)))
86  p2mx=max(0d0,1d0-p2/q2)*p2mx+min(1d0,p2/q2)*max(p2,q02)
87  ELSE
88  p2mxa=q2*(q02+p2)/(q2+p2)*exp(p2*(q2-q02)/
89  & ((q2+p2)*(q02+p2)))
90  p2mx=q0*sqrt(p2mxa)
91  p2mxb=p2mx
92  p2mx=max(0d0,1d0-p2/q2)*p2mx+min(1d0,p2/q2)*max(p2,q02)
93  p2mxb=max(0d0,1d0-p2/q2)*p2mxb+min(1d0,p2/q2)*p2mxa
94  IF(abs(q2-q02).GT.1d-6) THEN
95  facnor=log(q2/p2mxa)/log(q2/p2mxb)
96  ELSEIF(p2.LT.q02) THEN
97  facnor=q02**3/(q02+p2)/(q02**2-p2**2/2d0)
98  ELSE
99  facnor=1d0
100  ENDIF
101  ENDIF
102 
103 C...Call VMD parametrization for d quark and use to give rho, omega,
104 C...phi. Note dipole dampening for off-shell photon.
105  CALL pygvmd(iset,1,x,q2a,p2mx,alam,xpga,vxpga)
106  xfval=vxpga(1)
107  xpga(1)=xpga(2)
108  xpga(-1)=xpga(-2)
109  facud=aem*(1d0/frho+1d0/fomega)*(pmrho**2/(pmrho**2+p2))**2
110  facs=aem*(1d0/fphi)*(pmphi**2/(pmphi**2+p2))**2
111  DO 110 kfl=-5,5
112  xpvmd(kfl)=(facud+facs)*xpga(kfl)
113  110 CONTINUE
114  xpvmd(1)=xpvmd(1)+(1d0-fracu)*facud*xfval
115  xpvmd(2)=xpvmd(2)+fracu*facud*xfval
116  xpvmd(3)=xpvmd(3)+facs*xfval
117  xpvmd(-1)=xpvmd(-1)+(1d0-fracu)*facud*xfval
118  xpvmd(-2)=xpvmd(-2)+fracu*facud*xfval
119  xpvmd(-3)=xpvmd(-3)+facs*xfval
120  vxpvmd(1)=(1d0-fracu)*facud*xfval
121  vxpvmd(2)=fracu*facud*xfval
122  vxpvmd(3)=facs*xfval
123  vxpvmd(-1)=(1d0-fracu)*facud*xfval
124  vxpvmd(-2)=fracu*facud*xfval
125  vxpvmd(-3)=facs*xfval
126 
127  IF(ip2.NE.1) THEN
128 C...Anomalous parametrizations for different strategies
129 C...for off-shell photons; except full integration.
130 
131 C...Call anomalous parametrization for d + u + s.
132  CALL pygano(-3,x,q2a,p2mx,alam,xpga,vxpga)
133  DO 120 kfl=-5,5
134  xpanl(kfl)=facnor*xpga(kfl)
135  vxpanl(kfl)=facnor*vxpga(kfl)
136  120 CONTINUE
137 
138 C...Call anomalous parametrization for c and b.
139  CALL pygano(4,x,q2a,p2mx,alam,xpga,vxpga)
140  DO 130 kfl=-5,5
141  xpanh(kfl)=facnor*xpga(kfl)
142  vxpanh(kfl)=facnor*vxpga(kfl)
143  130 CONTINUE
144  CALL pygano(5,x,q2a,p2mx,alam,xpga,vxpga)
145  DO 140 kfl=-5,5
146  xpanh(kfl)=xpanh(kfl)+facnor*xpga(kfl)
147  vxpanh(kfl)=vxpanh(kfl)+facnor*vxpga(kfl)
148  140 CONTINUE
149 
150  ELSE
151 C...Special option: loop over flavours and integrate over k2.
152  DO 170 kf=1,5
153  DO 160 istep=1,nstep
154  q2step=q02*(q2/q02)**((istep-0.5d0)/nstep)
155  IF((kf.EQ.4.AND.q2step.LT.pmc**2).OR.
156  & (kf.EQ.5.AND.q2step.LT.pmb**2)) goto 160
157  CALL pygvmd(0,kf,x,q2,q2step,alam,xpga,vxpga)
158  facq=aem2pi*(q2step/(q2step+p2))**2*facnor
159  IF(mod(kf,2).EQ.0) facq=facq*(8d0/9d0)
160  IF(mod(kf,2).EQ.1) facq=facq*(2d0/9d0)
161  DO 150 kfl=-5,5
162  IF(kf.LE.3) xpanl(kfl)=xpanl(kfl)+facq*xpga(kfl)
163  IF(kf.GE.4) xpanh(kfl)=xpanh(kfl)+facq*xpga(kfl)
164  IF(kf.LE.3) vxpanl(kfl)=vxpanl(kfl)+facq*vxpga(kfl)
165  IF(kf.GE.4) vxpanh(kfl)=vxpanh(kfl)+facq*vxpga(kfl)
166  150 CONTINUE
167  160 CONTINUE
168  170 CONTINUE
169  ENDIF
170 
171 C...Call Bethe-Heitler term expression for charm and bottom.
172  CALL pygbeh(4,x,q2,p2,pmc**2,xpbh)
173  xpbeh(4)=xpbh
174  xpbeh(-4)=xpbh
175  CALL pygbeh(5,x,q2,p2,pmb**2,xpbh)
176  xpbeh(5)=xpbh
177  xpbeh(-5)=xpbh
178 
179 C...For MSbar subtraction call C^gamma term expression for d, u, s.
180  IF(iset.EQ.2.OR.iset.EQ.4) THEN
181  CALL pygdir(x,q2,p2,q02,xpga)
182  DO 180 kfl=-5,5
183  xpdir(kfl)=xpga(kfl)
184  180 CONTINUE
185  ENDIF
186 
187 C...Store result in output array.
188  DO 190 kfl=-5,5
189  chsq=1d0/9d0
190  IF(iabs(kfl).EQ.2.OR.iabs(kfl).EQ.4) chsq=4d0/9d0
191  xpf2=xpvmd(kfl)+xpanl(kfl)+xpbeh(kfl)+xpdir(kfl)
192  IF(kfl.NE.0) f2gm=f2gm+chsq*xpf2
193  xpdfgm(kfl)=xpvmd(kfl)+xpanl(kfl)+xpanh(kfl)
194  vxpdgm(kfl)=vxpvmd(kfl)+vxpanl(kfl)+vxpanh(kfl)
195  190 CONTINUE
196 
197  RETURN
198  END