EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dsigma.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file dsigma.F
1 
2 C **********************************************************************
3 
4  FUNCTION dsigma(XP)
5 
6  IMPLICIT NONE
7 
8 C...Differential cross section for first order QCD processes.
9 
10 *
11 * to avoid variable conflictions, a second keep element is necessary
12 * with the same common block name (see LPTOU2)
13 *
14  COMMON /leptou/ cut(14),lst(40),parl(30),
15  & x,y,w2,q2,u
16  REAL cut,parl,x,y,w2,q2,u
17  INTEGER lst
18  SAVE /leptou/
19 
20  COMMON /linter/ pari(50),ewqc(2,2,8),qc(8),zl(2,4),zq(2,8),pq(17)
21  REAL pari,ewqc,qc,zl,zq,pq
22  SAVE /linter/
23 
24  COMMON /lintrl/ psave(3,4,5),ksave(4),xmin,xmax,ymin,ymax,
25  &q2min,q2max,w2min,w2max,ilep,inu,ig,iz
26  REAL psave,xmin,xmax,ymin,ymax,q2min,q2max,w2min,w2max
27  INTEGER ksave,ilep,inu,ig,iz
28  SAVE /lintrl/
29 
30  INTEGER nlupdm,nplbuf
31  parameter(nlupdm=4000,nplbuf=5)
32  common/lujets/n,k(nlupdm,5),p(nlupdm,nplbuf),v(nlupdm,5)
33  INTEGER n,k
34  REAL p,v
35  SAVE /lujets/
36 
37  common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
38  INTEGER mstu,mstj
39  REAL paru,parj
40  SAVE /ludat1/
41 
42 
44  INTEGER i,ih,il,iu,ip
45  REAL pqh,amu,xi,zpmin,zpmax,xpq,wq,wqb,tq,tqb,t1,s13,sgn,sig
46  dimension xpq(-6:6),pqh(17,2)
47 
48 *PEPSI>>
49  IF (lst(40).NE.0) THEN
50  dsigma = poldsigma(xp)
51  RETURN
52  ENDIF
53 *PEPSI<<
54 
55 
56  dsigma=0.
57  DO 10 i=1,17
58  pqh(i,1)=0.
59  pqh(i,2)=0.
60  10 pq(i)=0.
61 
62  mstj(93)=1
63  amu=ulmass(2)
64  IF(lst(32).EQ.1.AND.lst(19).GE.0.AND.lst(17).EQ.1) THEN
65  il=lst(32)
66  iu=lst(32)
67  ELSE
68  il=1
69  iu=3
70  IF(lst(23).EQ.1.OR.lst(24).EQ.3) iu=2
71  ENDIF
72  xi=x/xp
73 C...Scheme for ME cutoff: W2, Q2, mixed
74  IF(lst(20).LE.1) THEN
75  zpmin=(1.-x)*xp/(xp-x)*parl(27)
76  ELSEIF(lst(20).EQ.2) THEN
77  zpmin=x*xp/(xp-x)*parl(27)
78  ELSEIF(lst(20).GE.3.AND.lst(20).LE.5) THEN
79  zpmin=parl(27)
80  ELSEIF(lst(20).GE.6) THEN
81  zpmin=parl(8)
82  ENDIF
83 
84  IF(zpmin.LE.0..OR.zpmin.GE.0.5) RETURN
85  zpmax=1.d0-dble(zpmin)
86  CALL lnstrf(xi,q2,xpq)
87  IF(lst(24).EQ.3) goto 3000
88 
89 C...Gluon bremsstrahlung process, i.e. qg-event.
90  2000 DO 2500 ip=il,iu
91  sig=dqcdi(1,ip,xp,zpmin,zpmax)
92  sgn=sign(1.,5.-2.*ip)
93  DO 2300 ih=1,2
94  IF(ih.EQ.1) THEN
95  IF(parl(6).GT.0.99) goto 2300
96  IF(lst(32).EQ.0.AND.lst(30).NE.-1) goto 2300
97  ELSEIF(ih.EQ.2) THEN
98  IF(parl(6).LT.-0.99) goto 2300
99  IF(lst(32).EQ.0.AND.lst(30).NE.1) goto 2300
100  ENDIF
101  IF(lst(32).NE.0) lst(30)=sign(1.,ih-1.5)
102  IF(lst(23).NE.2) THEN
103  DO 2100 i=1,lst(12)
104  wq=xpq(i)*sig*(ewqc(1,ih,i)+sgn*ewqc(2,ih,i))
105  wqb=xpq(-i)*sig*sgn*(ewqc(1,ih,i)+sgn*ewqc(2,ih,i))
106 C...Include y-dependence.
107  wq=wq*pari(23+ip)
108  wqb=wqb*pari(23+ip)
109  pqh(i,ih)=pqh(i,ih)+wq
110  pqh(i+lst(12),ih)=pqh(i+lst(12),ih)+wqb
111  pqh(17,ih)=pqh(17,ih)+wq+wqb
112  2100 CONTINUE
113  ELSEIF(lst(23).EQ.2) THEN
114 C...Zero CC cross-section for one helicity state.
115  IF(ksave(1).LT.0.AND.ih.EQ.1
116  & .OR.ksave(1).GT.0.AND.ih.EQ.2) goto 2300
117  IF(ip.EQ.3) THEN
118  tq=-lst(30)
119  tqb=-tq
120  ELSE
121  tq=1.
122  tqb=1.
123  ENDIF
124  DO 2200 i=1,lst(12)
125  t1=-k(3,2)*qc(i)
126  IF(t1.GT.0) THEN
127  wq=xpq(i)*sig*tq
128  wqb=0.
129  ELSE
130  wqb=xpq(-i)*sig*tqb
131  wq=0.
132  ENDIF
133 C...Include y-dependence.
134  wq=wq*pari(23+ip)
135  wqb=wqb*pari(23+ip)
136  pqh(i,ih)=pqh(i,ih)+wq
137  pqh(i+lst(12),ih)=pqh(i+lst(12),ih)+wqb
138  pqh(17,ih)=pqh(17,ih)+wq+wqb
139  2200 CONTINUE
140  ENDIF
141  2300 CONTINUE
142  2500 CONTINUE
143  DO 2600 i=1,17
144  2600 pq(i)=(1.-parl(6))/2.*pqh(i,1)+(1.+parl(6))/2.*pqh(i,2)
145  ih=1
146  IF(lst(30).EQ.1) ih=2
147  IF(lst(32).EQ.0) THEN
148 C...Simulation: cross section for chosen helicity state only.
149  dsigma=pqh(17,ih)
150  ELSEIF(lst(19).EQ.-1) THEN
151 C...Integration event-by-event: normalize and include alpha_s*1/(1-xp)
152  dsigma=pqh(17,ih)/pari(20)*parl(25)/(1.-xp)
153 C...Max of dsigma/dxp for L- and R-handed lepton.
154  IF(pqh(17,1).GT.pari(15)) pari(15)=pqh(17,1)
155  IF(pqh(17,2).GT.pari(16)) pari(16)=pqh(17,2)
156  ELSE
157 C...Integration for grid: normalize and include alpha_s*1/(1-xp)
158  dsigma=pq(17)/pari(20)*parl(25)/(1.-xp)
159  IF(lst(17).EQ.0) THEN
160 C...Fixed beam energy, max of dsigma/dxp for L- and R-handed lepton.
161  IF(pqh(17,1).GT.pari(15)) pari(15)=pqh(17,1)
162  IF(pqh(17,2).GT.pari(16)) pari(16)=pqh(17,2)
163  ELSE
164 C...Variable beam energy, max of dsigma/dxp for S, T, I contributions.
165  IF(pq(17)/pari(23+lst(32)).GT.pari(14+lst(32)))
166  & pari(14+lst(32))=pq(17)/pari(23+lst(32))
167  ENDIF
168  ENDIF
169  RETURN
170 
171 C...Boson-gluon fusion, i.e. qq-event.
172  3000 s13=q2*(1.-xp)/xp
173  IF(s13.LT.4.*amu**2) RETURN
174  DO 3500 ip=il,iu
175  sig=xpq(0)*dqcdi(2,ip,xp,zpmin,zpmax)
176  DO 3300 ih=1,2
177  IF(ih.EQ.1) THEN
178  IF(parl(6).GT.0.99) goto 3300
179  IF(lst(32).EQ.0.AND.lst(30).NE.-1) goto 3300
180  ELSEIF(ih.EQ.2) THEN
181  IF(parl(6).LT.-0.99) goto 3300
182  IF(lst(32).EQ.0.AND.lst(30).NE.1) goto 3300
183  ENDIF
184  IF(lst(32).NE.0) lst(30)=sign(1.,ih-1.5)
185  IF(lst(23).NE.2) THEN
186  DO 3100 i=1,lst(13)
187  mstj(93)=1
188  IF(s13.LT.4.*ulmass(i)**2) goto 3100
189  wq=sig/2.*(ewqc(1,ih,i)+ewqc(2,ih,i))
190  wqb=wq
191 C...Include y-dependence.
192  wq=wq*pari(23+ip)
193  wqb=wqb*pari(23+ip)
194  pqh(i,ih)=pqh(i,ih)+wq
195  pqh(i+lst(13),ih)=pqh(i+lst(13),ih)+wqb
196  pqh(17,ih)=pqh(17,ih)+wq+wqb
197  3100 CONTINUE
198  ELSEIF(lst(23).EQ.2) THEN
199 C...Zero CC cross-section for one helicity state.
200  IF(ksave(1).LT.0.AND.ih.EQ.1
201  & .OR.ksave(1).GT.0.AND.ih.EQ.2) goto 3300
202  DO 3200 i=1,lst(13)
203  mstj(93)=1
204  IF(s13.LT.(amu+ulmass(i))**2) goto 3200
205  IF(k(3,2)*qc(i).LT.0) THEN
206  wq=sig
207  wqb=0.
208  ELSE
209  wqb=sig
210  wq=0.
211  ENDIF
212 C...Include y-dependence.
213  wq=wq*pari(23+ip)
214  wqb=wqb*pari(23+ip)
215  pqh(i,ih)=pqh(i,ih)+wq
216  pqh(i+lst(13),ih)=pqh(i+lst(13),ih)+wqb
217  pqh(17,ih)=pqh(17,ih)+wq+wqb
218  3200 CONTINUE
219  ENDIF
220  3300 CONTINUE
221  3500 CONTINUE
222  DO 3600 i=1,17
223  3600 pq(i)=(1.-parl(6))/2.*pqh(i,1)+(1.+parl(6))/2.*pqh(i,2)
224  ih=1
225  IF(lst(30).EQ.1) ih=2
226  IF(lst(32).EQ.0) THEN
227 C...Simulation: cross section for chosen helicity state only.
228  dsigma=pqh(17,ih)
229  ELSEIF(lst(19).EQ.-1) THEN
230 C...Integration event-by-event: normalize and include alpha_s*1/(1-xp)
231  dsigma=pqh(17,ih)/pari(20)*parl(25)/(1.-xp)
232 C...Max of dsigma/dxp for L- and R-handed lepton.
233  IF(pqh(17,1).GT.pari(18)) pari(18)=pqh(17,1)
234  IF(pqh(17,2).GT.pari(19)) pari(19)=pqh(17,2)
235  ELSE
236 C...Integration for grid: normalize and include alpha_s*1/(1-xp)
237  dsigma=pq(17)/pari(20)*parl(25)/(1.-xp)
238  IF(lst(17).EQ.0) THEN
239 C...Fixed beam energy, max of dsigma/dxp for L- and R-handed lepton.
240  IF(pqh(17,1).GT.pari(18)) pari(18)=pqh(17,1)
241  IF(pqh(17,2).GT.pari(19)) pari(19)=pqh(17,2)
242  ELSE
243 C...Variable beam energy, max of dsigma/dxp for S, T, I contributions.
244  IF(pq(17)/pari(23+lst(32)).GT.pari(17+lst(32)))
245  & pari(17+lst(32))=pq(17)/pari(23+lst(32))
246  ENDIF
247  ENDIF
248  RETURN
249  END