Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyxtee.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pyxtee.f
1 
2 C*********************************************************************
3 
4 C...PYXTEE
5 C...Calculates total cross-section, including initial state
6 C...radiation effects.
7 
8  SUBROUTINE pyxtee(KFL,ECM,XTOT)
9 
10 C...Double precision and integer declarations.
11  IMPLICIT DOUBLE PRECISION(a-h, o-z)
12  IMPLICIT INTEGER(i-n)
13  INTEGER pyk,pychge,pycomp
14 C...Commonblocks.
15  common/pydat1/mstu(200),paru(200),mstj(200),parj(200)
16  common/pydat2/kchg(500,4),pmas(500,4),parf(2000),vckm(4,4)
17  SAVE /pydat1/,/pydat2/
18 
19 C...Status, (optimized) Q^2 scale, alpha_strong.
20  parj(151)=ecm
21  mstj(119)=10*mstj(102)+kfl
22  IF(mstj(111).EQ.0) THEN
23  q2r=ecm**2
24  ELSEIF(mstu(111).EQ.0) THEN
25  parj(168)=min(1d0,max(parj(128),exp(-12d0*paru(1)/
26  & ((33d0-2d0*mstu(112))*paru(111)))))
27  q2r=parj(168)*ecm**2
28  ELSE
29  parj(168)=min(1d0,max(parj(128),paru(112)/ecm,
30  & (2d0*paru(112)/ecm)**2))
31  q2r=parj(168)*ecm**2
32  ENDIF
33  alspi=pyalps(q2r)/paru(1)
34 
35 C...QCD corrections factor in R.
36  IF(mstj(101).EQ.0.OR.mstj(109).EQ.1) THEN
37  rqcd=1d0
38  ELSEIF(iabs(mstj(101)).EQ.1.AND.mstj(109).EQ.0) THEN
39  rqcd=1d0+alspi
40  ELSEIF(mstj(109).EQ.0) THEN
41  rqcd=1d0+alspi+(1.986d0-0.115d0*mstu(118))*alspi**2
42  IF(mstj(111).EQ.1) rqcd=max(1d0,rqcd+(33d0-2d0*mstu(112))/12d0*
43  & log(parj(168))*alspi**2)
44  ELSEIF(iabs(mstj(101)).EQ.1) THEN
45  rqcd=1d0+(3d0/4d0)*alspi
46  ELSE
47  rqcd=1d0+(3d0/4d0)*alspi-(3d0/32d0+0.519d0*mstu(118))*alspi**2
48  ENDIF
49 
50 C...Calculate Z0 width if default value not acceptable.
51  IF(mstj(102).GE.3) THEN
52  rva=3d0*(3d0+(4d0*paru(102)-1d0)**2)+6d0*rqcd*(2d0+
53  & (1d0-8d0*paru(102)/3d0)**2+(4d0*paru(102)/3d0-1d0)**2)
54  DO 100 kflc=5,6
55  vq=1d0
56  IF(mod(mstj(103),2).EQ.1) vq=sqrt(max(0d0,1d0-
57  & (2d0*pymass(kflc)/ ecm)**2))
58  IF(kflc.EQ.5) vf=4d0*paru(102)/3d0-1d0
59  IF(kflc.EQ.6) vf=1d0-8d0*paru(102)/3d0
60  rva=rva+3d0*rqcd*(0.5d0*vq*(3d0-vq**2)*vf**2+vq**3)
61  100 CONTINUE
62  parj(124)=paru(101)*parj(123)*rva/(48d0*paru(102)*
63  & (1d0-paru(102)))
64  ENDIF
65 
66 C...Calculate propagator and related constants for QFD case.
67  poll=1d0-parj(131)*parj(132)
68  IF(mstj(102).GE.2) THEN
69  sff=1d0/(16d0*paru(102)*(1d0-paru(102)))
70  sfw=ecm**4/((ecm**2-parj(123)**2)**2+(parj(123)*parj(124))**2)
71  sfi=sfw*(1d0-(parj(123)/ecm)**2)
72  ve=4d0*paru(102)-1d0
73  sf1i=sff*(ve*poll+parj(132)-parj(131))
74  sf1w=sff**2*((ve**2+1d0)*poll+2d0*ve*(parj(132)-parj(131)))
75  hf1i=sfi*sf1i
76  hf1w=sfw*sf1w
77  ENDIF
78 
79 C...Loop over different flavours: charge, velocity.
80  rtot=0d0
81  rqq=0d0
82  rqv=0d0
83  rva=0d0
84  DO 110 kflc=1,max(mstj(104),kfl)
85  IF(kfl.GT.0.AND.kflc.NE.kfl) goto 110
86  mstj(93)=1
87  pmq=pymass(kflc)
88  IF(ecm.LT.2d0*pmq+parj(127)) goto 110
89  qf=kchg(kflc,1)/3d0
90  vq=1d0
91  IF(mod(mstj(103),2).EQ.1) vq=sqrt(1d0-(2d0*pmq/ecm)**2)
92 
93 C...Calculate R and sum of charges for QED or QFD case.
94  rqq=rqq+3d0*qf**2*poll
95  IF(mstj(102).LE.1) THEN
96  rtot=rtot+3d0*0.5d0*vq*(3d0-vq**2)*qf**2*poll
97  ELSE
98  vf=sign(1d0,qf)-4d0*qf*paru(102)
99  rqv=rqv-6d0*qf*vf*sf1i
100  rva=rva+3d0*(vf**2+1d0)*sf1w
101  rtot=rtot+3d0*(0.5d0*vq*(3d0-vq**2)*(qf**2*poll-
102  & 2d0*qf*vf*hf1i+vf**2*hf1w)+vq**3*hf1w)
103  ENDIF
104  110 CONTINUE
105  rsum=rqq
106  IF(mstj(102).GE.2) rsum=rqq+sfi*rqv+sfw*rva
107 
108 C...Calculate cross-section, including QCD corrections.
109  parj(141)=rqq
110  parj(142)=rtot
111  parj(143)=rtot*rqcd
112  parj(144)=parj(143)
113  parj(145)=parj(141)*86.8d0/ecm**2
114  parj(146)=parj(142)*86.8d0/ecm**2
115  parj(147)=parj(143)*86.8d0/ecm**2
116  parj(148)=parj(147)
117  parj(157)=rsum*rqcd
118  parj(158)=0d0
119  parj(159)=0d0
120  xtot=parj(147)
121  IF(mstj(107).LE.0) RETURN
122 
123 C...Virtual cross-section.
124  xkl=parj(135)
125  xku=min(parj(136),1d0-(2d0*parj(127)/ecm)**2)
126  ale=2d0*log(ecm/pymass(11))-1d0
127  sigv=ale/3d0+2d0*log(ecm**2/(pymass(13)*pymass(15)))/3d0-4d0/3d0+
128  &1.526d0*log(ecm**2/0.932d0)
129 
130 C...Soft and hard radiative cross-section in QED case.
131  IF(mstj(102).LE.1) THEN
132  sigv=1.5d0*ale-0.5d0+paru(1)**2/3d0+2d0*sigv
133  sigs=ale*(2d0*log(xkl)-log(1d0-xkl)-xkl)
134  sigh=ale*(2d0*log(xku/xkl)-log((1d0-xku)/(1d0-xkl))-(xku-xkl))
135 
136 C...Soft and hard radiative cross-section in QFD case.
137  ELSE
138  szm=1d0-(parj(123)/ecm)**2
139  szw=parj(123)*parj(124)/ecm**2
140  parj(161)=-rqq/rsum
141  parj(162)=-(rqq+rqv+rva)/rsum
142  parj(163)=(rqv*(1d0-0.5d0*szm-sfi)+rva*(1.5d0-szm-sfw))/rsum
143  parj(164)=(rqv*szw**2*(1d0-2d0*sfw)+rva*(2d0*sfi+szw**2-
144  & 4d0+3d0*szm-szm**2))/(szw*rsum)
145  sigv=1.5d0*ale-0.5d0+paru(1)**2/3d0+((2d0*rqq+sfi*rqv)/
146  & rsum)*sigv+(szw*sfw*rqv/rsum)*paru(1)*20d0/9d0
147  sigs=ale*(2d0*log(xkl)+parj(161)*log(1d0-xkl)+parj(162)*xkl+
148  & parj(163)*log(((xkl-szm)**2+szw**2)/(szm**2+szw**2))+
149  & parj(164)*(atan((xkl-szm)/szw)-atan(-szm/szw)))
150  sigh=ale*(2d0*log(xku/xkl)+parj(161)*log((1d0-xku)/
151  & (1d0-xkl))+parj(162)*(xku-xkl)+parj(163)*
152  & log(((xku-szm)**2+szw**2)/((xkl-szm)**2+szw**2))+
153  & parj(164)*(atan((xku-szm)/szw)-atan((xkl-szm)/szw)))
154  ENDIF
155 
156 C...Total cross-section and fraction of hard photon events.
157  parj(160)=sigh/(paru(1)/paru(101)+sigv+sigs+sigh)
158  parj(157)=rsum*(1d0+(paru(101)/paru(1))*(sigv+sigs+sigh))*rqcd
159  parj(144)=parj(157)
160  parj(148)=parj(144)*86.8d0/ecm**2
161  xtot=parj(148)
162 
163  RETURN
164  END