22 COMMON /loptim/ optx(4),opty(4),optq2(4),optw2(4),comfac
23 REAL optx,opty,optq2,optw2,comfac
26 COMMON /lgrid/ nxx,nww,xx(31),ww(21),
pqg(31,21,3),pqqb(31,21,2),
27 &qgmax(31,21,3),qqbmax(31,21,2),ycut(31,21),xtot(31,21),
np
28 REAL xx,ww,
pqg,pqqb,qgmax,qqbmax,ycut,xtot
34 &q2min,q2max,w2min,w2max,ilep,inu,ig,iz
36 INTEGER ksave,ilep,inu,ig,iz
39 INTEGER lfile,ncall,lst2,ipmax,iw,ix,lw,lx,iycut,
ip
40 REAL wwi,xxi,wmax,pqcom,rqg,xpmin,xpmax,
eps,rq,
42 REAL ysplit,xsplit,rtot,
ulalps
44 REAL p27max,ycmin,ycmax
45 dimension wwi(21,4),xxi(31,4)
50 1 5.,6.,7.,8.,9.,10.,11.,12.,13.,14.,15.,16.,17.,18.,19.,
51 1 20.,21.,22.,23.,24.,25.,
52 2 5.,5.2,5.3,5.4,5.5,5.6,5.7,5.8,5.9,
53 2 6.,6.1,6.2,6.3,6.4,6.5,6.6,6.7,6.8,6.9,7.,7.3,
57 3 5.,7.,10.,15.,20.,25.,30.,40.,50.,75.,100.,125.,150.,175.,
58 3 200.,225.,250.,275.,300.,325.,350.,
59 4 5.,10.,15.,20.,30.,50.,75.,100.,150.,200.,250.,300.,400.,
60 4 500.,700.,900.,1200.,1500.,1800.,2100.,2500./
62 1 1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,8.e-3,
63 1 1.e-2,2.e-2,3.e-2,4.e-2,5.e-2,6.e-2,8.e-2,
64 1 .1,.15,.2,.25,.3,.35,.4,.45,.5,.55,.6,.65,.72,.8,.87,.94,.999,
68 2 1.e-3,2.e-3,3.e-3,4.e-3,5.e-3,6.e-3,8.e-3,
69 2 1.e-2,2.e-2,3.e-2,4.e-2,5.e-2,6.e-2,8.e-2,
70 2 .1,.15,.2,.25,.3,.35,.4,.45,.5,.55,.6,.65,.72,.8,.87,.94,.999,
71 3 1.e-5,2.e-5,4.e-5,6.e-5,8.e-5,1.e-4,2.e-4,4.e-4,6.e-4,8.e-4,
72 3 1.e-3,2.e-3,4.e-3,6.e-3,8.e-3,1.e-2,2.e-2,4.e-2,6.e-2,8.e-2,
73 3 .1,.2,.3,.4,.5,.6,.7,.8,.87,.94,.999,
74 4 1.e-5,2.e-5,4.e-5,6.e-5,8.e-5,1.e-4,2.e-4,4.e-4,6.e-4,8.e-4,
75 4 1.e-3,2.e-3,4.e-3,6.e-3,8.e-3,1.e-2,2.e-2,4.e-2,6.e-2,8.e-2,
76 4 .1,.2,.3,.4,.5,.6,.7,.8,.87,.94,.999/
77 DATA ncall/0/,xsplit/0.1/,ysplit/2./
84 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
85 &
WRITE(6,1000) parl(11),lst(13),mstu(112),paru(112),
86 &parl(8),parl(9),parl(12),parl(13)
90 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
WRITE(6,1010)
95 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
THEN
96 IF(lst(19).GE.0.AND.lst(19).LT.10)
WRITE(6,1020)
97 IF(lst(19).GE.10.OR.lst(19).EQ.-10)
WRITE(6,2020)
101 IF(lst(19).GE.0.AND.lst(19).LT.10)
THEN
106 READ(5,*) (ww(iw),iw=1,nww)
107 READ(5,*) (xx(ix),ix=1,nxx)
108 IF(xx(nxx).GT..99) xx(nxx)=.99
109 ELSEIF(lst(19).GE.1.AND.lst(19).LE.4)
THEN
112 10 ww(iw)=wwi(iw,lst(19))
114 20 xx(ix)=xxi(ix,lst(19))
116 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
117 &
WRITE(6,1030) lst(19),nxx,nww,xx,ww
118 IF(wmax.GT.ww(nww))
THEN
119 IF(lst(3).GE.1)
WRITE(6,1040) wmax,ww(nww)
125 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
WRITE(6,1100)
126 ELSEIF(lst(19).GE.10.OR.lst(19).EQ.-10)
THEN
130 IF(
xmin.GE.xsplit)
THEN
133 ELSEIF(
xmax.GT.xsplit)
THEN
137 & 10.**(log10(
xmin)+(log10(xsplit)-log10(
xmin))*(i-1)/float(nl)))
139 41 xx(i)=
min(0.999,xsplit+(
xmax-xsplit)*(i-nl-1)/float(nx-nl-1))
143 & 10.**(log10(
xmin)+(log10(
xmax)-log10(
xmin))*(i-1)/float(nx-1)))
146 IF(
ymin.GE.ysplit)
THEN
149 ELSEIF(
ymax.GT.ysplit)
THEN
153 & 10.**(log10(
ymin)+(log10(ysplit)-log10(
ymin))*(i-1)/float(nl)))
155 71 ww(i)=
min(0.999,ysplit+(
ymax-ysplit)*(i-nl-1)/float(ny-nl-1))
159 & 10.**(log10(
ymin)+(log10(
ymax)-log10(
ymin))*(i-1)/float(ny-1)))
161 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
162 &
WRITE(6,2030) lst(19),nxx,nww,xx,ww
163 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
WRITE(6,2100)
171 IF(lst(19).LT.10.AND.w.GT.wmax) lw=lw+1
175 IF(lst(19).GE.0.AND.lst(19).LT.10)
THEN
178 u=(w2-psave(3,2,5)**2)/(2.*psave(3,2,5)*(1.-
x))
179 q2=2.*psave(3,2,5)*u*
x
181 ELSEIF(lst(19).GE.10.OR.lst(19).EQ.-10)
THEN
185 u=parl(22)/(2.*psave(3,2,5))
186 w2=parl(22)*(1.-
x)+psave(3,2,5)**2
192 IF(lst(19).GE.0.AND.lst(19).LT.10.AND.
x.GT.1.-w2/wmax**2) lx=lx+1
194 pqcom=pari(31)*pq(17)*comfac
198 IF(lst(20).LE.1)
THEN
199 parl(27)=
max(parl(9)**2/w2,parl(8))
201 ELSEIF(lst(20).EQ.2)
THEN
202 parl(27)=
max(parl(9)**2/q2,parl(8))
204 ELSEIF(lst(20).EQ.3.OR.lst(20).EQ.4)
THEN
207 ELSEIF(lst(20).EQ.5)
THEN
210 ELSEIF(lst(20).EQ.6)
THEN
223 IF(lst(20).LE.1)
THEN
224 xpmin=dble(
x)/(1.d0-2.d0*(1.d0-dble(
x))*dble(parl(27)))
225 xpmax=dble(
x)/(dble(
x)+(1.d0-dble(
x))*dble(parl(27)))
226 ELSEIF(lst(20).EQ.2)
THEN
227 xpmin=dble(
x)/(1.d0-2.d0*dble(
x)*dble(parl(27)))
228 xpmax=1.d0/(1.d0+dble(parl(27)))
229 ELSEIF(lst(20).EQ.3.OR.lst(20).EQ.4)
THEN
231 xpmax=1.d0/(1.d0+dble(parl(9)))
232 ELSEIF(lst(20).EQ.5)
THEN
234 xpmax=q2/(q2+parl(9))
235 ELSEIF(lst(20).EQ.6)
THEN
237 xpmax=q2/(q2+parl(27))
239 WRITE(6,*)
'LWEITS: No such jet scheme!'
242 IF(xpmin.GE.xpmax.OR.xpmin.LE.0.) goto 210
244 IF(lst(17).EQ.0)
THEN
251 IF(
ip.LE.2) pari(17+
ip)=0.
259 pqg(ix,iw,
ip)=result/parl(25)
260 IF(lst(17).EQ.0)
THEN
261 qgmax(ix,iw,1)=pari(15)
262 qgmax(ix,iw,2)=pari(16)
264 pqg(ix,iw,
ip)=result*pari(20)/pari(23+
ip)/parl(25)
265 qgmax(ix,iw,
ip)=pari(14+
ip)
273 pqqb(ix,iw,
ip)=result/parl(25)
274 IF(lst(17).EQ.0)
THEN
275 qqbmax(ix,iw,1)=pari(18)
276 qqbmax(ix,iw,2)=pari(19)
278 pqqb(ix,iw,
ip)=result*pari(20)/pari(23+
ip)/parl(25)
279 qqbmax(ix,iw,
ip)=pari(17+
ip)
289 IF(rq.LT.0.AND.iycut.LT.10)
THEN
290 parl(27)=
min(1.1*exp(-2.0*rq)*parl(27),p27max)
293 ELSEIF(rq.LT.0.AND.iycut.GE.10)
THEN
295 WRITE(6,*)
'Warning! sigma>tot for x,q2,cut=',
x,q2,parl(27)
296 WRITE(6,*)
'Weights=',rq,rqg,rqqb
303 qgmax(ix,iw,
ip)=qgmax(ix,iw,
ip)/rtot
306 pqqb(ix,iw,
ip)=pqqb(ix,iw,
ip)/rtot
307 qqbmax(ix,iw,
ip)=qqbmax(ix,iw,
ip)/rtot
311 ELSEIF(iycut.GE.2.AND.rq.GT.parl(13))
THEN
314 parl(27)=(ycmin+ycmax)/2.
321 IF(rq.LT.0.AND.iycut.LT.100)
THEN
323 parl(27)=(ycmin+ycmax)/2.
324 ELSEIF(rq.GT.parl(13).AND.iycut.LT.100)
THEN
326 parl(27)=(ycmin+ycmax)/2.
327 ELSEIF(iycut.GE.100)
THEN
329 WRITE(6,*)
'LWEITS: Warning, PARL(27) not found.'
332 rqg=rqg/
max(1.0,rtot)
333 rqqb=rqqb/
max(1.0,rtot)
348 IF(lst(33).EQ.-91)
THEN
355 IF(lst(3).GE.4.OR.(lst(3).EQ.3.AND.ncall.EQ.1))
THEN
356 IF(lst(19).LT.10)
WRITE(6,1200) w,
x,
y,q2,parl(25),pqcom,
357 & parl(27),iycut,rq,rqg,rqqb,(qgmax(ix,iw,
ip),
ip=1,ipmax),
358 & (qqbmax(ix,iw,
ip),
ip=1,
min(2,ipmax))
359 IF(lst(19).GE.10)
WRITE(6,2200)
x,
y,q2,w,parl(25),pqcom,
360 & parl(27),iycut,rq,rqg,rqqb,(qgmax(ix,iw,
ip),
ip=1,ipmax),
361 & (qqbmax(ix,iw,
ip),
ip=1,
min(2,ipmax))
370 WRITE(iabs(lfile)) lst,parl,nxx,nww,
np,xx,ww
371 WRITE(iabs(lfile))(((
pqg(ix,iw,
ip),ix=1,nxx),iw=1,nww),
ip=1,
np),
372 & (((pqqb(ix,iw,
ip),ix=1,nxx),iw=1,nww),
ip=1,
np),
373 & (((qgmax(ix,iw,
ip),ix=1,nxx),iw=1,nww),
ip=1,ipmax),
374 & (((qqbmax(ix,iw,
ip),ix=1,nxx),iw=1,nww),
ip=1,
min(2,ipmax)),
376 IF(
np.NE.1)
WRITE(iabs(lfile)) xtot
381 1000
FORMAT(
'1',/,5
x,
'Integration of 1st order QCD matrix elements',
382 & /,5
x,
'============================================',
383 &/,
' for gluon radiation (qg-event) and boson-gluon fusion ',
384 &
'(qq-event) probability.',
385 &//,
' Required precision in integration, PARL(11) =',f8.4,
386 &//,
' Heaviest flavour produced in boson-gluon fusion, LST(13) =',
387 &i5,//,
' Alpha-strong parameters: # flavours, MSTU(112) =',i3,
388 &/,25
x,
' QCD lambda, PARU(112) =',f6.3,
' GeV',
389 &//,
' Cuts on matrix elements:',
390 &/,
' PARL(8), PARL(9), PARL(12), PARL(13) =',4f8.4,/)
391 1010
FORMAT(
' Lepton energy not allowed to vary in simulation.',/)
392 1020
FORMAT(
' Lepton energy allowed to vary in simulation, ',/,
393 &
' y in table below calculated assuming max energy.',/)
394 1030
FORMAT(
' Grid choice, LST(19) =',i3,5
x,
'# grid points in x, W =',
395 &2i5,/,
' x-values in array XX:',/,10f8.5,/,10f8.5,/,11f8.5,
396 & /,
' W-values in array WW:',/,10f7.1,/,11f7.1,/)
397 1040
FORMAT(
' Warning: max W outside grid, Wmax, grid-max =',2f12.1)
399 &9
x,
'cut',
' it',2
x,
'q-event',1
x,
'qg-event',
400 &1
x,
'qq-event',
' max of matrix elements qg & qq; L,R or T,S,I',
402 1200
FORMAT(f7.1,2f8.4,1pg10.3,0pf6.2,1pg11.3,0pf8.4,i3,3f9.4,1
p,5e9.2)
403 1900
FORMAT(
' Execution stopped ',/)
404 2020
FORMAT(
' Lepton energy allowed to vary in simulation, ',/,
405 &
' W in table below calculated assuming max energy.',/)
406 2030
FORMAT(
' Grid choice, LST(19) =',i3,5
x,
'# grid points in x, y =',
407 &2i5,/,
' x-values in array XX:',/,10f8.5,/,10f8.5,/,11f8.5,
408 & /,
' y-values in array WW:',/,10f7.4,/,11f7.4,/)
410 &9
x,
'cut',
' it',2
x,
'q-event',1
x,
'qg-event',
411 &1
x,
'qq-event',
' max of matrix elements qg & qq; L,R or T,S,I',
413 2200
FORMAT(2f8.5,1pg10.3,0pf7.1,f6.2,1pg11.3,0pf8.4,i3,3f9.4,1
p,5e9.2)