12 &q2min,q2max,w2min,w2max,ilep,inu,ig,iz
14 INTEGER ksave,ilep,inu,ig,iz
21 COMMON /leptou/ cut(14),lst(40),parl(30),
23 REAL cut,parl,
x,
y,w2,q2,u
27 COMMON /linter/ pari(50),ewqc(2,2,8),qc(8),zl(2,4),zq(2,8),pq(17)
28 REAL pari,ewqc,qc,zl,zq,pq
31 COMMON /loptim/ optx(4),opty(4),optq2(4),optw2(4),comfac
32 REAL optx,opty,optq2,optw2,comfac
36 COMMON /flinfo/ rflq,rflg,rflm,rflt
37 REAL rflq,rflg,rflm,rflt
42 common/lujets/
n,
k(nlupdm,5),
p(nlupdm,nplbuf),
v(nlupdm,5)
47 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
54 INTEGER lqcd,ltm,lht,
lkinem
55 REAL w2low,w2upp,ylow,yupp,q2low,q2upp,pnt,pqh,
s,pm2,
56 +xpq,gfq2,aemcor,
ulalem,zlep,a,b,flg,flq,
57 +flm,flt,f2em,pqh17,weight,hx,xfact,q2fact,hy,yfact,hq2,
58 +w2fact,sigl,sigr,sigma,viol,yq,yqb,fyq,hw2,which
61 dimension pqh(17,2),pnt(2,2),xpq(-6:6)
67 DOUBLE PRECISION dari27,dari28
68 DATA dari27,dari28/2*0.d0/
69 DATA w2low,w2upp,ylow,yupp,q2low,q2upp/6*0./
72 IF (lst(40).NE.0)
THEN
102 & (w2min-pm2)/
max(
s*(1.-
x),1.e-22))
104 & (w2max-pm2)/
max(
s*(1.-
x),1.e-22))
110 IF(pari(28).LT.0.5)
THEN
115 100 dari28=dari28+1.d0
123 which=(optx(1)+optx(2)+optx(3)+optx(4))*
rlu(0)
124 IF(which.LE.optx(1))
THEN
126 ELSEIF(which.LE.(optx(1)+optx(2)))
THEN
128 ELSEIF(which.LE.(optx(1)+optx(2)+optx(3)))
THEN
133 IF(lst(31).EQ.1)
THEN
141 IF(q2upp.LT.q2low) goto 101
142 which=(optq2(1)+optq2(2)+optq2(3)+optq2(4))*
rlu(0)
143 IF(which.LE.optq2(1))
THEN
144 q2=q2low+
rlu(0)*(q2upp-q2low)
145 ELSEIF(which.LE.(optq2(1)+optq2(2)))
THEN
146 q2=q2low*(q2upp/q2low)**
rlu(0)
147 ELSEIF(which.LE.(optq2(1)+optq2(2)+optq2(3)))
THEN
148 q2=q2low*q2upp/(q2upp+
rlu(0)*(q2low-q2upp))
150 q2=sqrt((q2low*q2upp)**2/(q2upp**2+
rlu(0)*(q2low**2-q2upp**2)))
154 ELSEIF(lst(31).EQ.2)
THEN
162 IF(yupp.LT.ylow) goto 101
163 which=(opty(1)+opty(2)+opty(3)+opty(4))*
rlu(0)
164 IF(which.LE.opty(1))
THEN
165 y=ylow+
rlu(0)*(yupp-ylow)
166 ELSEIF(which.LE.(opty(1)+opty(2)))
THEN
167 y=ylow*(yupp/ylow)**
rlu(0)
168 ELSEIF(which.LE.(opty(1)+opty(2)+opty(3)))
THEN
169 y=ylow*yupp/(yupp+
rlu(0)*(yupp-ylow))
171 y=sqrt((ylow*yupp)**2/(yupp**2+
rlu(0)*(ylow**2-yupp**2)))
174 IF(q2.LT.q2min.OR.q2.GT.q2max) goto 100
175 ELSEIF(lst(31).EQ.3)
THEN
181 w2low=
max(w2min,(1.-
x)*
ymin*
s+pm2,q2min*(1.-
x)/
x+pm2)
182 w2upp=
min(w2max,(1.-
x)*
ymax*
s+pm2,q2max*(1.-
x)/
x+pm2)
183 IF(w2upp.LT.w2low) goto 101
184 which=(optw2(1)+optw2(2)+optw2(3)+optw2(4))*
rlu(0)
185 IF(which.LE.optw2(1))
THEN
186 w2=w2low+
rlu(0)*(w2upp-w2low)
187 ELSEIF(which.LE.(optw2(1)+optw2(2)))
THEN
188 w2=w2low*(w2upp/w2low)**
rlu(0)
189 ELSEIF(which.LE.(optw2(1)+optw2(2)+optw2(3)))
THEN
190 w2=w2low*w2upp/(w2upp+
rlu(0)*(w2low-w2upp))
192 w2=sqrt((w2low*w2upp)**2/(w2upp**2+
rlu(0)*(w2low**2-w2upp**2)))
194 y=(w2-pm2)/((1.-
x)*parl(21))
197 IF(q2.LT.q2min.OR.q2.GT.q2max) goto 100
200 110
IF(
lkinem(lst(2)).NE.0)
THEN
203 IF(ncut.LE.9999) goto 100
204 IF(lst(3).GE.1)
WRITE(6,1200)
209 pari(24)=(1.+(1.-
y)**2)/2.
211 pari(26)=(1.-(1.-
y)**2)/2.
215 IF(parl(6).GT.+0.99) ih=2
216 200 lst(30)=
sign(1.,ih-1.5)
230 IF(lst(23).EQ.2)
THEN
232 IF(ksave(1).LT.0.AND.ih.EQ.1
233 & .OR.ksave(1).GT.0.AND.ih.EQ.2) goto 240
234 yq=pari(24)-lst(30)*pari(26)
235 yqb=pari(24)+lst(30)*pari(26)
236 IF(pari(11).GT.1.e-06)
THEN
238 pnt(1,ih)=(1.-pari(11))*pari(13)*yq
239 pnt(2,ih)=pari(11)*pari(12)*yq
241 pntdu(1,2,ih)=pari(13)*yq
242 pntdu(2,2,ih)=pari(12)*yq
244 pntdus(1,2,ih)=pari(43)*yq
245 pntdus(2,2,ih)=pari(42)*yq
247 pnt(1,ih)=(1.-pari(11))*pari(12)*yq
248 pnt(2,ih)=pari(11)*pari(13)*yq
250 pntdu(1,1,ih)=pari(12)*yq
251 pntdu(2,1,ih)=pari(13)*yq
253 pntdus(1,1,ih)=pari(42)*yq
254 pntdus(2,1,ih)=pari(43)*yq
258 IF(
k(3,2)*qc(i).LT.0)
THEN
261 pqh(i+lst(12),ih)=xpq(-i)*yqb
266 gfq2=q2/(pmas(23,1)**2+q2)*sqrt(2.)*parl(17)*pmas(23,1)**2/
267 & (3.1415927*parl(16))
270 IF(lst(18).GE.2) aemcor=
ulalem(q2)/parl(16)
272 zlep=zl(ih,ilep+2*inu)
273 DO 230 i=1,
max(lst(12),lst(13))
274 a=(-ig*qc(i)*aemcor+iz*gfq2*zlep*zq(ih,i))**2
275 b=(-ig*qc(i)*aemcor+iz*gfq2*zlep*zq(ii,i))**2
279 IF(i.GT.lst(12)) goto 230
280 fyq=(a+b)*pari(24)+(a-b)*pari(26)
282 IF(i.LE.2.AND.pari(11).GT.1.e-06)
THEN
283 pnt(1,ih)=pnt(1,ih)+(1.-pari(11))*pari(11+i)*fyq
284 pnt(2,ih)=pnt(2,ih)+pari(11)*pari(14-i)*fyq
286 pntdu(1,i,ih)=pari(11+i)*fyq
287 pntdu(2,i,ih)=pari(14-i)*fyq
289 pntdus(1,i,ih)=pari(41+i)*fyq
290 pntdus(2,i,ih)=pari(44-i)*fyq
292 pqh(i+lst(12),ih)=xpq(-i)*((a+b)*pari(24)-(a-b)*pari(26))
297 300 pqh(17,ih)=pqh(17,ih)+pqh(i,ih)+pqh(i+lst(12),ih)
299 IF(abs(parl(6)).LT.0.99.AND.ih.EQ.1)
THEN
308 IF(lst(11).NE.0.AND.(lst(23).EQ.1.OR.lst(23).EQ.4)
309 &.AND.lst(2).NE.-3)
THEN
312 ltm=mod(lst(11)/10,10)
316 IF(lqcd.EQ.1.OR.ltm.EQ.1) CALL
flipol(flq,flg,flm)
319 & (lqcd.EQ.2.OR.ltm.EQ.2)) CALL
flintg(flq,flg,flm)
320 IF(ltm.GE.1.OR.lht.GE.1)
THEN
323 301 f2em=f2em+qc(i)**2*(xpq(i)+xpq(-i))
324 IF(ltm.GE.1) flm=flm-2.*
x**2*psave(3,2,5)**2/q2*f2em
325 IF(lht.GE.1) flt=8.*parl(19)/q2*f2em
330 pqh(17,ih)=pqh(17,ih)-
y**2*(flq+flg+flm+flt)
332 305 pqh(i,ih)=pqh(i,ih)*pqh(17,ih)/pqh17
336 310 pq(i)=(1.-parl(6))/2.*pqh(i,1)+(1.+parl(6))/2.*pqh(i,2)
339 rflq=-
y**2*flq/
max(pq(17),1.e-33)
340 rflg=-
y**2*flg/
max(pq(17),1.e-33)
341 rflm=-
y**2*flm/
max(pq(17),1.e-33)
342 rflt=-
y**2*flt/
max(pq(17),1.e-33)
345 IF(lst(31).EQ.1)
THEN
346 IF(lst(23).EQ.2)
THEN
347 comfac=1./
x/(1.+q2/pmas(24,1)**2)**2
351 ELSEIF(lst(31).EQ.2)
THEN
352 IF(lst(23).EQ.2)
THEN
353 comfac=1./(1.+q2/pmas(24,1)**2)**2*parl(21)
355 comfac=1./q2**2*parl(21)
357 ELSEIF(lst(31).EQ.3)
THEN
358 IF(lst(23).EQ.2)
THEN
359 comfac=1./
x/(1.+q2/pmas(24,1)**2)**2 *
x/(1.-
x)
361 comfac=1./
x/q2**2 *
x/(1.-
x)
369 IF(lst(2).LE.-2)
RETURN
373 xfact=optx(1)+optx(2)+optx(3)+optx(4)
374 IF(lst(31).EQ.1)
THEN
375 hq2=optq2(1)/(q2upp-q2low)
376 & +1./alog(q2upp/q2low)*optq2(2)/q2
377 & +q2low*q2upp/(q2upp-q2low)*optq2(3)/q2**2
378 & +2*(q2low*q2upp)**2/(q2upp**2-q2low**2)*optq2(4)/q2**3
379 q2fact=optq2(1)+optq2(2)+optq2(3)+optq2(4)
380 comfac=comfac*xfact*q2fact/hx/hq2
381 ELSEIF(lst(31).EQ.2)
THEN
382 hy=opty(1)/(yupp-ylow)+1./alog(yupp/ylow)*opty(2)/
y
383 & +ylow*yupp/(yupp-ylow)*opty(3)/
y**2
384 & +2*(ylow*yupp)**2/(yupp**2-ylow**2)*opty(4)/
y**3
385 yfact=opty(1)+opty(2)+opty(3)+opty(4)
386 comfac=comfac*xfact*yfact/hx/hy
387 ELSEIF(lst(31).EQ.3)
THEN
388 hw2=optw2(1)/(w2upp-w2low)
389 & +1./alog(w2upp/w2low)*optw2(2)/w2
390 & +w2low*w2upp/(w2upp-w2low)*optw2(3)/w2**2
391 & +2*(w2low*w2upp)**2/(w2upp**2-w2low**2)*optw2(4)/w2**3
392 w2fact=optw2(1)+optw2(2)+optw2(3)+optw2(4)
393 comfac=comfac*xfact*w2fact/hx/hw2
395 IF(lst(2).LE.0)
RETURN
398 sigl=(1.-parl(6))/2.*pqh(17,1)
399 sigr=(1.+parl(6))/2.*pqh(17,2)
404 dari27=dari27+dble(sigma)*dble(comfac)*weight
406 viol=sigma*comfac/pari(lst(23))
407 IF(viol.GT.pari(32))
THEN
409 IF(pari(32).GT.1.)
THEN
410 pari(lst(23))=pari(lst(23))*pari(32)
411 IF(lst(3).GE.1)
WRITE(6,1300) pari(32),int(pari(30)+1),
412 & pari(lst(23)),
x,
y,q2,w2
416 IF(viol.LT.
rlu(0)) goto 100
417 parl(24)=pari(31)*dari27/dari28
420 IF(abs(parl(6)).LT.0.99)
THEN
423 IF(
rlu(0)*sigma.GT.sigl) ih=2
425 lst(30)=
sign(1.,ih-1.5)
433 IF(pari(11).GT.1.e-06)
THEN
434 IF(
rlu(0).LT.(pari(11)*(pqh(17,ih)-pnt(1,ih)-pnt(2,ih))+
435 & pnt(2,ih))/pqh(17,ih))
THEN
441 pq(17)=pq(17)-pq(1)-pq(2)-pq(1+lst(12))-pq(2+lst(12))
442 pq(1)=pntdu(lst(22),1,ih)
443 pq(2)=pntdu(lst(22),2,ih)
444 pq(1+lst(12))=pntdus(lst(22),1,ih)
445 pq(2+lst(12))=pntdus(lst(22),2,ih)
446 pq(17)=pq(17)+pq(1)+pq(2)+pq(1+lst(12))+pq(2+lst(12))
450 1200
FORMAT(
' Warning: LEPTOX is looping, cannot find allowed ',
451 &
'phase space point due to cuts,',/,
452 &10
x,
'check, in particular, CUT(11) to CUT(14)')
453 1300
FORMAT(
' Warning: maximum violated by a factor ',f7.3,
454 &
' in event ',i7,/,
' maximum increased by this factor to ',e12.3,
455 &/,
' Point of violation: x, y, Q**2, W**2 = ',4g10.3)