16 SUBROUTINE lu1ent(IP,KF,PE,THE,PHI)
19 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
21 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
23 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
28 IF(mstu(12).GE.1)
CALL lulist(0)
30 IF(ipa.GT.mstu(4))
CALL luerrm(21,
31 &
'(LU1ENT:) writing outside LUJETS memory')
33 IF(kc.EQ.0)
CALL luerrm(12,
'(LU1ENT:) unknown flavour code')
37 IF(mstu(10).EQ.1) pm=p(ipa,5)
38 IF(mstu(10).GE.2) pm=
ulmass(kf)
46 IF(ip.LT.0) k(ipa,1)=2
50 pa=sqrt(p(ipa,4)**2-p(ipa,5)**2)
51 p(ipa,1)=pa*sin(the)*cos(phi)
52 p(ipa,2)=pa*sin(the)*sin(phi)
64 SUBROUTINE lu2ent(IP,KF1,KF2,PECM)
68 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
70 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
72 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
77 IF(mstu(12).GE.1)
CALL lulist(0)
79 IF(ipa.GT.mstu(4)-1)
CALL luerrm(21,
80 &
'(LU2ENT:) writing outside LUJETS memory')
83 IF(kc1.EQ.0.OR.kc2.EQ.0)
CALL luerrm(12,
84 &
'(LU2ENT:) unknown flavour code')
88 IF(mstu(10).EQ.1) pm1=p(ipa,5)
89 IF(mstu(10).GE.2) pm1=
ulmass(kf1)
91 IF(mstu(10).EQ.1) pm2=p(ipa+1,5)
92 IF(mstu(10).GE.2) pm2=
ulmass(kf2)
100 kq1=kchg(kc1,2)*isign(1,kf1)
101 kq2=kchg(kc2,2)*isign(1,kf2)
102 IF(kq1+kq2.NE.0.AND.kq1+kq2.NE.4)
CALL luerrm(2,
103 &
'(LU2ENT:) unphysical flavour combination')
110 IF(kq1.NE.0.AND.kq2.NE.0) k(ipa,1)=2
115 IF(kq1.EQ.0.OR.kq2.EQ.0)
CALL luerrm(2,
116 &
'(LU2ENT:) requested flavours can not develop parton shower')
119 k(ipa,4)=mstu(5)*(ipa+1)
121 k(ipa+1,4)=mstu(5)*ipa
122 k(ipa+1,5)=k(ipa+1,4)
126 IF(pecm.LE.pm1+pm2)
CALL luerrm(13,
127 &
'(LU2ENT:) energy smaller than sum of masses')
128 pa=sqrt(
max(0.,(pecm**2-pm1**2-pm2**2)**2-(2.*pm1*pm2)**2))/
131 p(ipa,4)=sqrt(pm1**2+pa**2)
134 p(ipa+1,4)=sqrt(pm2**2+pa**2)
146 SUBROUTINE lu3ent(IP,KF1,KF2,KF3,PECM,X1,X3)
151 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
153 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
155 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
160 IF(mstu(12).GE.1)
CALL lulist(0)
162 IF(ipa.GT.mstu(4)-2)
CALL luerrm(21,
163 &
'(LU3ENT:) writing outside LUJETS memory')
167 IF(kc1.EQ.0.OR.kc2.EQ.0.OR.kc3.EQ.0)
CALL luerrm(12,
168 &
'(LU3ENT:) unknown flavour code')
172 IF(mstu(10).EQ.1) pm1=p(ipa,5)
173 IF(mstu(10).GE.2) pm1=
ulmass(kf1)
175 IF(mstu(10).EQ.1) pm2=p(ipa+1,5)
176 IF(mstu(10).GE.2) pm2=
ulmass(kf2)
178 IF(mstu(10).EQ.1) pm3=p(ipa+2,5)
179 IF(mstu(10).GE.2) pm3=
ulmass(kf3)
187 kq1=kchg(kc1,2)*isign(1,kf1)
188 kq2=kchg(kc2,2)*isign(1,kf2)
189 kq3=kchg(kc3,2)*isign(1,kf3)
190 IF(kq1.EQ.0.AND.kq2.EQ.0.AND.kq3.EQ.0)
THEN 191 ELSEIF(kq1.NE.0.AND.kq2.EQ.2.AND.(kq1+kq3.EQ.0.OR.kq1+kq3.EQ.4))
194 CALL luerrm(2,
'(LU3ENT:) unphysical flavour combination')
203 IF(kq1.NE.0.AND.(kq2.NE.0.OR.kq3.NE.0)) k(ipa,1)=2
205 IF(kq2.NE.0.AND.kq3.NE.0) k(ipa+1,1)=2
210 IF(kq1.EQ.0.OR.kq2.EQ.0.OR.kq3.EQ.0)
CALL luerrm(2,
211 &
'(LU3ENT:) requested flavours can not develop parton shower')
217 k(ipa,kcs)=mstu(5)*(ipa+1)
218 k(ipa,9-kcs)=mstu(5)*(ipa+2)
219 k(ipa+1,kcs)=mstu(5)*(ipa+2)
220 k(ipa+1,9-kcs)=mstu(5)*ipa
221 k(ipa+2,kcs)=mstu(5)*ipa
222 k(ipa+2,9-kcs)=mstu(5)*(ipa+1)
227 IF(0.5*
x1*pecm.LE.pm1.OR.0.5*(2.-
x1-x3)*pecm.LE.pm2.OR.
228 &0.5*x3*pecm.LE.pm3) mkerr=1
229 pa1=sqrt(
max(0.,(0.5*
x1*pecm)**2-pm1**2))
230 pa2=sqrt(
max(0.,(0.5*(2.-
x1-x3)*pecm)**2-pm2**2))
231 pa3=sqrt(
max(0.,(0.5*x3*pecm)**2-pm3**2))
232 cthe2=(pa3**2-pa1**2-pa2**2)/(2.*pa1*pa2)
233 cthe3=(pa2**2-pa1**2-pa3**2)/(2.*pa1*pa3)
234 IF(abs(cthe2).GE.1.001.OR.abs(cthe3).GE.1.001) mkerr=1
235 cthe3=
max(-1.,
min(1.,cthe3))
236 IF(mkerr.NE.0)
CALL luerrm(13,
237 &
'(LU3ENT:) unphysical kinematical variable setup')
241 p(ipa,4)=sqrt(pa1**2+pm1**2)
243 p(ipa+2,1)=pa3*sqrt(1.-cthe3**2)
245 p(ipa+2,4)=sqrt(pa3**2+pm3**2)
247 p(ipa+1,1)=-p(ipa+2,1)
248 p(ipa+1,3)=-p(ipa,3)-p(ipa+2,3)
249 p(ipa+1,4)=sqrt(p(ipa+1,1)**2+p(ipa+1,3)**2+pm2**2)
261 SUBROUTINE lu4ent(IP,KF1,KF2,KF3,KF4,PECM,X1,X2,X4,X12,X14)
266 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
268 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
270 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
275 IF(mstu(12).GE.1)
CALL lulist(0)
277 IF(ipa.GT.mstu(4)-3)
CALL luerrm(21,
278 &
'(LU4ENT:) writing outside LUJETS momory')
283 IF(kc1.EQ.0.OR.kc2.EQ.0.OR.kc3.EQ.0.OR.kc4.EQ.0)
CALL luerrm(12,
284 &
'(LU4ENT:) unknown flavour code')
288 IF(mstu(10).EQ.1) pm1=p(ipa,5)
289 IF(mstu(10).GE.2) pm1=
ulmass(kf1)
291 IF(mstu(10).EQ.1) pm2=p(ipa+1,5)
292 IF(mstu(10).GE.2) pm2=
ulmass(kf2)
294 IF(mstu(10).EQ.1) pm3=p(ipa+2,5)
295 IF(mstu(10).GE.2) pm3=
ulmass(kf3)
297 IF(mstu(10).EQ.1) pm4=p(ipa+3,5)
298 IF(mstu(10).GE.2) pm4=
ulmass(kf4)
306 kq1=kchg(kc1,2)*isign(1,kf1)
307 kq2=kchg(kc2,2)*isign(1,kf2)
308 kq3=kchg(kc3,2)*isign(1,kf3)
309 kq4=kchg(kc4,2)*isign(1,kf4)
310 IF(kq1.EQ.0.AND.kq2.EQ.0.AND.kq3.EQ.0.AND.kq4.EQ.0)
THEN 311 ELSEIF(kq1.NE.0.AND.kq2.EQ.2.AND.kq3.EQ.2.AND.(kq1+kq4.EQ.0.OR.
313 ELSEIF(kq1.NE.0.AND.kq1+kq2.EQ.0.AND.kq3.NE.0.AND.kq3+kq4.EQ.0.)
316 CALL luerrm(2,
'(LU4ENT:) unphysical flavour combination')
326 IF(kq1.NE.0.AND.(kq2.NE.0.OR.kq3.NE.0.OR.kq4.NE.0)) k(ipa,1)=2
328 IF(kq2.NE.0.AND.kq1+kq2.NE.0.AND.(kq3.NE.0.OR.kq4.NE.0))
331 IF(kq3.NE.0.AND.kq4.NE.0) k(ipa+2,1)=2
336 ELSEIF(kq1+kq2.NE.0)
THEN 337 IF(kq1.EQ.0.OR.kq2.EQ.0.OR.kq3.EQ.0.OR.kq4.EQ.0)
CALL luerrm(2,
338 &
'(LU4ENT:) requested flavours can not develop parton shower')
345 k(ipa,kcs)=mstu(5)*(ipa+1)
346 k(ipa,9-kcs)=mstu(5)*(ipa+3)
347 k(ipa+1,kcs)=mstu(5)*(ipa+2)
348 k(ipa+1,9-kcs)=mstu(5)*ipa
349 k(ipa+2,kcs)=mstu(5)*(ipa+3)
350 k(ipa+2,9-kcs)=mstu(5)*(ipa+1)
351 k(ipa+3,kcs)=mstu(5)*ipa
352 k(ipa+3,9-kcs)=mstu(5)*(ipa+2)
356 IF(kq1.EQ.0.OR.kq2.EQ.0.OR.kq3.EQ.0.OR.kq4.EQ.0)
CALL luerrm(2,
357 &
'(LU4ENT:) requested flavours can not develop parton shower')
362 k(ipa,4)=mstu(5)*(ipa+1)
364 k(ipa+1,4)=mstu(5)*ipa
365 k(ipa+1,5)=k(ipa+1,4)
366 k(ipa+2,4)=mstu(5)*(ipa+3)
367 k(ipa+2,5)=k(ipa+2,4)
368 k(ipa+3,4)=mstu(5)*(ipa+2)
369 k(ipa+3,5)=k(ipa+3,4)
374 IF(0.5*
x1*pecm.LE.pm1.OR.0.5*
x2*pecm.LE.pm2.OR.0.5*(2.-
x1-
x2-x4)*
375 &pecm.LE.pm3.OR.0.5*x4*pecm.LE.pm4) mkerr=1
376 pa1=sqrt(
max(0.,(0.5*
x1*pecm)**2-pm1**2))
377 pa2=sqrt(
max(0.,(0.5*
x2*pecm)**2-pm2**2))
378 pa3=sqrt(
max(0.,(0.5*(2.-
x1-
x2-x4)*pecm)**2-pm3**2))
379 pa4=sqrt(
max(0.,(0.5*x4*pecm)**2-pm4**2))
380 x24=
x1+
x2+x4-1.-x12-x14+(pm3**2-pm1**2-pm2**2-pm4**2)/pecm**2
381 cthe4=(
x1*x4-2.*x14)*pecm**2/(4.*pa1*pa4)
382 IF(abs(cthe4).GE.1.002) mkerr=1
383 cthe4=
max(-1.,
min(1.,cthe4))
384 sthe4=sqrt(1.-cthe4**2)
385 cthe2=(
x1*
x2-2.*x12)*pecm**2/(4.*pa1*pa2)
386 IF(abs(cthe2).GE.1.002) mkerr=1
387 cthe2=
max(-1.,
min(1.,cthe2))
388 sthe2=sqrt(1.-cthe2**2)
389 cphi2=((
x2*x4-2.*x24)*pecm**2-4.*pa2*cthe2*pa4*cthe4)/
390 &(4.*pa2*sthe2*pa4*sthe4)
391 IF(abs(cphi2).GE.1.05) mkerr=1
392 cphi2=
max(-1.,
min(1.,cphi2))
393 IF(mkerr.EQ.1)
CALL luerrm(13,
394 &
'(LU4ENT:) unphysical kinematical variable setup')
398 p(ipa,4)=sqrt(pa1**2+pm1**2)
402 p(ipa+3,4)=sqrt(pa4**2+pm4**2)
404 p(ipa+1,1)=pa2*sthe2*cphi2
405 p(ipa+1,2)=pa2*sthe2*sqrt(1.-cphi2**2)*(-1.)**int(
rlu(0)+0.5)
407 p(ipa+1,4)=sqrt(pa2**2+pm2**2)
409 p(ipa+2,1)=-p(ipa+1,1)-p(ipa+3,1)
410 p(ipa+2,2)=-p(ipa+1,2)
411 p(ipa+2,3)=-p(ipa,3)-p(ipa+1,3)-p(ipa+3,3)
412 p(ipa+2,4)=sqrt(p(ipa+2,1)**2+p(ipa+2,2)**2+p(ipa+2,3)**2+pm3**2)
424 SUBROUTINE lujoin(NJOIN,IJOIN)
428 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
430 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
432 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
437 IF(njoin.LT.2)
GOTO 120
441 IF(i.LE.0.OR.i.GT.
n)
GOTO 120
442 IF(k(i,1).LT.1.OR.k(i,1).GT.3)
GOTO 120
445 kq=kchg(kc,2)*isign(1,k(i,2))
447 IF(ijn.NE.1.AND.ijn.NE.njoin.AND.kq.NE.2)
GOTO 120
448 IF(kq.NE.2) kqsum=kqsum+kq
449 100
IF(ijn.EQ.1) kqs=kq
450 IF(kqsum.NE.0)
GOTO 120
454 IF(kqs.EQ.2) kcs=int(4.5+
rlu(0))
458 IF(ijn.NE.1) ip=ijoin(ijn-1)
459 IF(ijn.EQ.1) ip=ijoin(njoin)
460 IF(ijn.NE.njoin)
in=ijoin(ijn+1)
461 IF(ijn.EQ.njoin)
in=ijoin(1)
463 k(i,9-kcs)=mstu(5)*ip
464 IF(ijn.EQ.1.AND.kqs.NE.2) k(i,9-kcs)=0
465 110
IF(ijn.EQ.njoin.AND.kqs.NE.2) k(i,kcs)=0
470 &
'(LUJOIN:) given entries can not be joined by one string')
480 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
482 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
484 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
486 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
491 CHARACTER CHIN*(*),CHFIX*104,CHBIT*104,CHOLD*8,CHNEW*8,
492 &chnam*4,chvar(17)*4,chalp(2)*26,chind*8,chini*10,chinr*16
493 DATA chvar/
'N',
'K',
'P',
'V',
'MSTU',
'PARU',
'MSTJ',
'PARJ',
'KCHG',
494 &
'PMAS',
'PARF',
'VCKM',
'MDCY',
'MDME',
'BRAT',
'KFDP',
'CHAF'/
495 DATA chalp/
'abcdefghijklmnopqrstuvwxyz',
496 &
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
499 IF(mstu(12).GE.1)
CALL lulist(0)
503 IF(chbit(lbit:lbit).EQ.
' ')
GOTO 100
506 IF(chbit(lcom:lcom).EQ.
' ')
GOTO 110
508 chfix(ltot:ltot)=chbit(lcom:lcom)
513 IF(lhig.LE.ltot.AND.chfix(lhig:lhig).NE.
';')
GOTO 130
515 chbit(1:lbit)=chfix(llow+1:lhig-1)
520 IF(chbit(lnam:lnam).NE.
'('.AND.chbit(lnam:lnam).NE.
'='.AND.
522 chnam=chbit(1:lnam-1)//
' ' 525 150
IF(chnam(lcom:lcom).EQ.chalp(1)(lalp:lalp)) chnam(lcom:lcom)=
529 160
IF(chnam.EQ.chvar(iv)) ivar=iv
531 CALL luerrm(18,
'(LUGIVE:) do not recognize variable '//chnam)
533 IF(llow.LT.ltot)
GOTO 120
540 IF(chbit(lnam:lnam).EQ.
'(')
THEN 543 IF(chbit(lind:lind).NE.
')'.AND.chbit(lind:lind).NE.
',')
GOTO 170
545 IF((chbit(lnam+1:lnam+1).EQ.
'C'.OR.chbit(lnam+1:lnam+1).EQ.
'c').
547 chind(lnam-lind+11:8)=chbit(lnam+2:lind-1)
548 READ(chind,
'(I8)') i1
551 chind(lnam-lind+10:8)=chbit(lnam+1:lind-1)
555 IF(chbit(lnam:lnam).EQ.
')') lnam=lnam+1
557 IF(chbit(lnam:lnam).EQ.
',')
THEN 560 IF(chbit(lind:lind).NE.
')'.AND.chbit(lind:lind).NE.
',')
GOTO 180
562 chind(lnam-lind+10:8)=chbit(lnam+1:lind-1)
569 IF(chbit(lnam:lnam).NE.
'=')
GOTO 190
571 IF(i.NE.0.OR.j.NE.0)
GOTO 190
573 ELSEIF(ivar.EQ.2)
THEN 574 IF(i.LT.1.OR.i.GT.mstu(4).OR.j.LT.1.OR.j.GT.5)
GOTO 190
576 ELSEIF(ivar.EQ.3)
THEN 577 IF(i.LT.1.OR.i.GT.mstu(4).OR.j.LT.1.OR.j.GT.5)
GOTO 190
579 ELSEIF(ivar.EQ.4)
THEN 580 IF(i.LT.1.OR.i.GT.mstu(4).OR.j.LT.1.OR.j.GT.5)
GOTO 190
582 ELSEIF(ivar.EQ.5)
THEN 583 IF(i.LT.1.OR.i.GT.200.OR.j.NE.0)
GOTO 190
585 ELSEIF(ivar.EQ.6)
THEN 586 IF(i.LT.1.OR.i.GT.200.OR.j.NE.0)
GOTO 190
588 ELSEIF(ivar.EQ.7)
THEN 589 IF(i.LT.1.OR.i.GT.200.OR.j.NE.0)
GOTO 190
591 ELSEIF(ivar.EQ.8)
THEN 592 IF(i.LT.1.OR.i.GT.200.OR.j.NE.0)
GOTO 190
594 ELSEIF(ivar.EQ.9)
THEN 595 IF(i.LT.1.OR.i.GT.mstu(6).OR.j.LT.1.OR.j.GT.3)
GOTO 190
597 ELSEIF(ivar.EQ.10)
THEN 598 IF(i.LT.1.OR.i.GT.mstu(6).OR.j.LT.1.OR.j.GT.4)
GOTO 190
600 ELSEIF(ivar.EQ.11)
THEN 601 IF(i.LT.1.OR.i.GT.2000.OR.j.NE.0)
GOTO 190
603 ELSEIF(ivar.EQ.12)
THEN 604 IF(i.LT.1.OR.i.GT.4.OR.j.LT.1.OR.j.GT.4)
GOTO 190
606 ELSEIF(ivar.EQ.13)
THEN 607 IF(i.LT.1.OR.i.GT.mstu(6).OR.j.LT.1.OR.j.GT.3)
GOTO 190
609 ELSEIF(ivar.EQ.14)
THEN 610 IF(i.LT.1.OR.i.GT.mstu(7).OR.j.LT.1.OR.j.GT.2)
GOTO 190
612 ELSEIF(ivar.EQ.15)
THEN 613 IF(i.LT.1.OR.i.GT.mstu(7).OR.j.NE.0)
GOTO 190
615 ELSEIF(ivar.EQ.16)
THEN 616 IF(i.LT.1.OR.i.GT.mstu(7).OR.j.LT.1.OR.j.GT.5)
GOTO 190
618 ELSEIF(ivar.EQ.17)
THEN 619 IF(i.LT.1.OR.i.GT.mstu(6).OR.j.NE.0)
GOTO 190
623 190
IF(ierr.EQ.1)
THEN 624 CALL luerrm(18,
'(LUGIVE:) unallowed indices for '//
627 IF(llow.LT.ltot)
GOTO 120
632 IF(lnam.GE.lbit)
THEN 634 chbit(15:60)=
' has the value ' 635 IF(ivar.EQ.1.OR.ivar.EQ.2.OR.ivar.EQ.5.OR.ivar.EQ.7.OR.
636 & ivar.EQ.9.OR.ivar.EQ.13.OR.ivar.EQ.14.OR.ivar.EQ.16)
THEN 637 WRITE(chbit(51:60),
'(I10)') iold
638 ELSEIF(ivar.NE.17)
THEN 639 WRITE(chbit(47:60),
'(F14.5)') rold
643 IF(mstu(13).GE.1)
WRITE(mstu(11),1000) chbit(1:60)
645 IF(llow.LT.ltot)
GOTO 120
650 IF(ivar.EQ.1.OR.ivar.EQ.2.OR.ivar.EQ.5.OR.ivar.EQ.7.OR.
651 &ivar.EQ.9.OR.ivar.EQ.13.OR.ivar.EQ.14.OR.ivar.EQ.16)
THEN 653 chini(lnam-lbit+11:10)=chbit(lnam+1:lbit)
654 READ(chini,
'(I10)') inew
655 ELSEIF(ivar.NE.17)
THEN 657 chinr(lnam-lbit+17:16)=chbit(lnam+1:lbit)
658 READ(chinr,
'(F16.2)') rnew
660 chnew=chbit(lnam+1:lbit)//
' ' 666 ELSEIF(ivar.EQ.2)
THEN 668 ELSEIF(ivar.EQ.3)
THEN 670 ELSEIF(ivar.EQ.4)
THEN 672 ELSEIF(ivar.EQ.5)
THEN 674 ELSEIF(ivar.EQ.6)
THEN 676 ELSEIF(ivar.EQ.7)
THEN 678 ELSEIF(ivar.EQ.8)
THEN 680 ELSEIF(ivar.EQ.9)
THEN 682 ELSEIF(ivar.EQ.10)
THEN 684 ELSEIF(ivar.EQ.11)
THEN 686 ELSEIF(ivar.EQ.12)
THEN 688 ELSEIF(ivar.EQ.13)
THEN 690 ELSEIF(ivar.EQ.14)
THEN 692 ELSEIF(ivar.EQ.15)
THEN 694 ELSEIF(ivar.EQ.16)
THEN 696 ELSEIF(ivar.EQ.17)
THEN 702 chbit(15:60)=
' changed from to ' 703 IF(ivar.EQ.1.OR.ivar.EQ.2.OR.ivar.EQ.5.OR.ivar.EQ.7.OR.
704 &ivar.EQ.9.OR.ivar.EQ.13.OR.ivar.EQ.14.OR.ivar.EQ.16)
THEN 705 WRITE(chbit(33:42),
'(I10)') iold
706 WRITE(chbit(51:60),
'(I10)') inew
707 ELSEIF(ivar.NE.17)
THEN 708 WRITE(chbit(29:42),
'(F14.5)') rold
709 WRITE(chbit(47:60),
'(F14.5)') rnew
714 IF(mstu(13).GE.1)
WRITE(mstu(11),1000) chbit(1:60)
716 IF(llow.LT.ltot)
GOTO 120
729 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
731 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
733 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
735 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
741 IF(mstu(12).GE.1)
CALL lulist(0)
754 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 120
756 110 ps(1,j)=ps(1,j)+p(i,j)
757 ps(1,6)=ps(1,6)+
luchge(k(i,2))
770 IF(k(ip,1).GT.0.AND.k(ip,1).LE.10) kc=
lucomp(k(ip,2))
775 ELSEIF(kchg(kc,2).EQ.0)
THEN 776 IF(mstj(21).GE.1.AND.mdcy(kc,1).GE.1.AND.(mstj(51).LE.0.OR.mbe.
777 & eq.2.OR.pmas(kc,2).GE.parj(91).OR.iabs(k(ip,2)).EQ.311))
781 IF(mstj(92).GT.0)
THEN 783 qmax=sqrt(
max(0.,(p(ip1,4)+p(ip1+1,4))**2-(p(ip1,1)+p(ip1+1,
784 & 1))**2-(p(ip1,2)+p(ip1+1,2))**2-(p(ip1,3)+p(ip1+1,3))**2))
785 CALL lushow(ip1,ip1+1,qmax)
788 ELSEIF(mstj(92).LT.0)
THEN 790 CALL lushow(ip1,-3,p(ip,5))
796 ELSEIF(k(ip,1).EQ.1.OR.k(ip,1).EQ.2)
THEN 798 IF(mfrag.GE.1.AND.k(ip,1).EQ.1) mfrag=2
799 IF(mstj(21).GE.2.AND.k(ip,1).EQ.2.AND.
n.GT.ip)
THEN 800 IF(k(ip+1,1).EQ.1.AND.k(ip+1,3).EQ.k(ip,3).AND.
801 & k(ip,3).GT.0.AND.k(ip,3).LT.ip)
THEN 802 IF(kchg(
lucomp(k(k(ip,3),2)),2).EQ.0) mfrag=
min(1,mfrag)
805 IF(mfrag.EQ.1)
CALL lustrf(ip)
806 IF(mfrag.EQ.2)
CALL luindf(ip)
807 IF(mfrag.EQ.2.AND.k(ip,1).EQ.1) mcons=0
808 IF(mfrag.EQ.2.AND.(mstj(3).LE.0.OR.mod(mstj(3),5).EQ.0)) mcons=0
812 IF(mstu(24).NE.0.AND.mstu(21).GE.2)
THEN 813 ELSEIF(ip.LT.
n.AND.
n.LT.mstu(4)-20-mstu(32))
THEN 816 CALL luerrm(11,
'(LUEXEC:) no more memory left in LUJETS')
820 IF(mbe.EQ.1.AND.mstj(51).GE.1)
THEN 827 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 160
829 150 ps(2,j)=ps(2,j)+p(i,j)
830 ps(2,6)=ps(2,6)+
luchge(k(i,2))
832 pdev=(abs(ps(2,1)-ps(1,1))+abs(ps(2,2)-ps(1,2))+abs(ps(2,3)-
833 &ps(1,3))+abs(ps(2,4)-ps(1,4)))/(1.+abs(ps(2,4))+abs(ps(1,4)))
834 IF(mcons.EQ.1.AND.pdev.GT.paru(11))
CALL luerrm(15,
835 &
'(LUEXEC:) four-momentum was not conserved')
836 IF(mcons.EQ.1.AND.abs(ps(2,6)-ps(1,6)).GT.0.1)
CALL luerrm(15,
837 &
'(LUEXEC:) charge was not conserved')
848 IMPLICIT DOUBLE PRECISION(
d)
849 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
851 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
853 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
855 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
857 dimension dps(5),dpc(5),ue(3)
863 IF(k(i,1).NE.3)
GOTO 120
867 IF(kq.EQ.0.OR.(mqgst.EQ.1.AND.kq.EQ.2))
GOTO 120
871 IF(kq*isign(1,k(i,2)).LT.0) kcs=5
876 CALL luerrm(14,
'(LUPREP:) caught in infinite loop')
881 IF(k(ia,1).EQ.3)
THEN 882 IF(i1.GE.mstu(4)-mstu(32)-5)
THEN 883 CALL luerrm(11,
'(LUPREP:) no more memory left in LUJETS')
888 IF(nstp.GE.2.AND.iabs(k(ia,2)).NE.21) k(i1,1)=1
897 IF(k(i1,1).EQ.1)
GOTO 120
902 IF(mod(k(ib,kcs)/mstu(5)**2,2).EQ.0.AND.mod(k(ib,kcs),mstu(5)).
904 ia=mod(k(ib,kcs),mstu(5))
905 k(ib,kcs)=k(ib,kcs)+mstu(5)**2
908 IF(k(ib,kcs).GE.2*mstu(5)**2.OR.mod(k(ib,kcs)/mstu(5),mstu(5)).
910 ia=mod(k(ib,kcs)/mstu(5),mstu(5))
911 k(ib,kcs)=k(ib,kcs)+2*mstu(5)**2
914 IF(ia.LE.0.OR.ia.GT.
n)
THEN 915 CALL luerrm(12,
'(LUPREP:) colour rearrangement failed')
918 IF(mod(k(ia,4)/mstu(5),mstu(5)).EQ.ib.OR.mod(k(ia,5)/mstu(5),
919 &mstu(5)).EQ.ib)
THEN 920 IF(mrev.EQ.1) kcs=9-kcs
921 IF(mod(k(ia,kcs)/mstu(5),mstu(5)).NE.ib) kcs=9-kcs
922 k(ia,kcs)=k(ia,kcs)+2*mstu(5)**2
924 IF(mrev.EQ.0) kcs=9-kcs
925 IF(mod(k(ia,kcs),mstu(5)).NE.ib) kcs=9-kcs
926 k(ia,kcs)=k(ia,kcs)+mstu(5)**2
935 IF(mstj(14).LE.0)
GOTO 320
940 DO 190 i=
max(1,ip),
ns 941 IF(k(i,1).NE.1.AND.k(i,1).NE.2)
THEN 942 ELSEIF(k(i,1).EQ.2.AND.ic.EQ.0)
THEN 949 ELSEIF(k(i,1).EQ.2)
THEN 951 160 dps(j)=dps(j)+p(i,j)
952 ELSEIF(ic.NE.0.AND.kchg(
lucomp(k(i,2)),2).NE.0)
THEN 954 170 dps(j)=dps(j)+p(i,j)
956 dps(5)=dps(5)+
ulmass(k(i,2))
957 pd=sqrt(
max(0d0,dps(4)**2-dps(1)**2-dps(2)**2-dps(3)**2))-dps(5)
970 IF(pdm.GE.parj(32))
GOTO 320
974 pecm=sqrt(
max(0d0,dpc(4)**2-dpc(1)**2-dpc(2)**2-dpc(3)**2))
989 IF(mstu(16).NE.2)
THEN 1000 IF(iabs(k(ic1,2)).NE.21)
THEN 1003 IF(kc1.EQ.0.OR.kc2.EQ.0)
GOTO 320
1004 kq1=kchg(kc1,2)*isign(1,k(ic1,2))
1005 kq2=kchg(kc2,2)*isign(1,k(ic2,2))
1006 IF(kq1+kq2.NE.0)
GOTO 320
1007 200
CALL lukfdi(k(ic1,2),0,kfln,k(
n+2,2))
1008 CALL lukfdi(k(ic2,2),-kfln,kfldmp,k(
n+3,2))
1009 IF(k(
n+2,2).EQ.0.OR.k(
n+3,2).EQ.0)
GOTO 200
1011 IF(iabs(k(ic2,2)).NE.21)
GOTO 320
1012 210
CALL lukfdi(1+int((2.+parj(2))*
rlu(0)),0,kfln,kfdmp)
1013 CALL lukfdi(kfln,0,kflm,k(
n+2,2))
1014 CALL lukfdi(-kfln,-kflm,kfldmp,k(
n+3,2))
1015 IF(k(
n+2,2).EQ.0.OR.k(
n+3,2).EQ.0)
GOTO 210
1019 IF(p(
n+2,5)+p(
n+3,5)+parj(64).GE.pecm.AND.nsin.EQ.1)
GOTO 320
1020 IF(p(
n+2,5)+p(
n+3,5)+parj(64).GE.pecm)
GOTO 260
1023 IF(pecm.GE.0.02*dpc(4))
THEN 1024 pa=sqrt((pecm**2-(p(
n+2,5)+p(
n+3,5))**2)*(pecm**2-
1025 & (p(
n+2,5)-p(
n+3,5))**2))/(2.*pecm)
1028 ue(1)=sqrt(1.-ue(3)**2)*cos(phi)
1029 ue(2)=sqrt(1.-ue(3)**2)*sin(phi)
1032 220 p(
n+3,j)=-pa*ue(j)
1033 p(
n+2,4)=sqrt(pa**2+p(
n+2,5)**2)
1034 p(
n+3,4)=sqrt(pa**2+p(
n+3,5)**2)
1035 CALL ludbrb(
n+2,
n+3,0.,0.,dpc(1)/dpc(4),dpc(2)/dpc(4),
1040 230
IF(k(i,1).EQ.1.OR.k(i,1).EQ.2) np=np+1
1041 ha=p(ic1,4)*p(ic2,4)-p(ic1,1)*p(ic2,1)-p(ic1,2)*p(ic2,2)-
1043 IF(np.GE.3.OR.
ha.LE.1.25*p(ic1,5)*p(ic2,5))
GOTO 260
1044 hd1=0.5*(p(
n+2,5)**2-p(ic1,5)**2)
1045 hd2=0.5*(p(
n+3,5)**2-p(ic2,5)**2)
1046 hr=sqrt(
max(0.,((
ha-hd1-hd2)**2-(p(
n+2,5)*p(
n+3,5))**2)/
1047 & (
ha**2-(p(ic1,5)*p(ic2,5))**2)))-1.
1048 hc=p(ic1,5)**2+2.*
ha+p(ic2,5)**2
1049 hk1=((p(ic2,5)**2+
ha)*hr+hd1-hd2)/hc
1050 hk2=((p(ic1,5)**2+
ha)*hr+hd2-hd1)/hc
1052 p(
n+2,j)=(1.+hk1)*p(ic1,j)-hk2*p(ic2,j)
1053 240 p(
n+3,j)=(1.+hk2)*p(ic2,j)-hk1*p(ic1,j)
1058 250 v(
n+3,j)=v(ic2,j)
1067 IF(iabs(k(ic1,2)).GT.100.AND.iabs(k(ic2,2)).GT.100)
THEN 1069 ELSEIF(iabs(k(ic1,2)).NE.21)
THEN 1070 CALL lukfdi(k(ic1,2),k(ic2,2),kfldmp,k(
n+2,2))
1072 kfln=1+int((2.+parj(2))*
rlu(0))
1073 CALL lukfdi(kfln,-kfln,kfldmp,k(
n+2,2))
1075 IF(k(
n+2,2).EQ.0)
GOTO 260
1082 IF(ir.NE.0)
GOTO 280
1083 DO 270 i=
max(1,ip),
n 1084 IF(k(i,1).LE.0.OR.k(i,1).GT.10.OR.(i.GE.ic1.AND.i.LE.ic2.
1085 &and.k(i,1).GE.1.AND.k(i,1).LE.2))
GOTO 270
1086 IF(mcomb.EQ.1) kci=
lucomp(k(i,2))
1087 IF(mcomb.EQ.1.AND.kci.EQ.0)
GOTO 270
1088 IF(mcomb.EQ.1.AND.kchg(kci,2).EQ.0.AND.i.LE.
ns)
GOTO 270
1089 IF(mcomb.EQ.2.AND.iabs(k(i,2)).GT.10.AND.iabs(k(i,2)).LE.100)
1091 hcr=dpc(4)*p(i,4)-dpc(1)*p(i,1)-dpc(2)*p(i,2)-dpc(3)*p(i,3)
1105 IF(
ha**2-(pecm*p(ir,5))**2.EQ.0.0.OR.hb+hd.EQ.0.0)
GO TO 285
1107 hk2=0.5*(hb*sqrt(((hb+hc)**2-4.*(hb+hd)*p(
n+2,5)**2)/
1108 &(
ha**2-(pecm*p(ir,5))**2))-(hb+hc))/(hb+hd)
1109 285 hk1=(0.5*(p(
n+2,5)**2-pecm**2)+hd*hk2)/hb
1111 p(
n+2,j)=(1.+hk1)*dpc(j)-hk2*p(ir,j)
1112 p(ir,j)=(1.+hk2)*p(ir,j)-hk1*dpc(j)
1114 290 v(
n+2,j)=v(ic1,j)
1120 300
DO 310 i=ic1,ic2
1121 IF((k(i,1).EQ.1.OR.k(i,1).EQ.2).AND.kchg(
lucomp(k(i,2)),2).NE.0)
1124 IF(mstu(16).NE.2)
THEN 1133 IF(
n.LT.mstu(4)-mstu(32)-5)
GOTO 140
1141 DO 360 i=
max(1,ip),
n 1142 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 360
1144 IF(kc.EQ.0)
GOTO 360
1145 kq=kchg(kc,2)*isign(1,k(i,2))
1146 IF(kq.EQ.0)
GOTO 360
1152 dps(5)=dps(5)+
ulmass(k(i,2))
1155 340 dps(j)=dps(j)+p(i,j)
1156 IF(k(i,1).EQ.1)
THEN 1157 IF(np.NE.1.AND.(kfn.EQ.1.OR.kfn.GE.3.OR.kqs.NE.0))
CALL 1158 &
luerrm(2,
'(LUPREP:) unphysical flavour combination')
1159 IF(np.NE.1.AND.dps(4)**2-dps(1)**2-dps(2)**2-dps(3)**2.LT.
1160 & (0.9*parj(32)+dps(5))**2)
CALL luerrm(3,
1161 &
'(LUPREP:) too small mass in jet system')
1178 IMPLICIT DOUBLE PRECISION(
d)
1179 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
1181 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
1183 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
1185 dimension dps(5),kfl(3),pmq(3),px(3),py(3),gam(3),ie(2),pr(2),
1186 &
in(9),dhm(4),dhg(4),dp(5,5),irank(2),mju(4),iju(3),pju(5,5),
1187 &tju(5),kfjh(2),njs(2),kfjs(2),pjs(4,5)
1190 four(i,j)=p(i,4)*p(j,4)-p(i,1)*p(j,1)-p(i,2)*p(j,2)-p(i,3)*p(j,3)
1191 dfour(i,j)=dp(i,4)*dp(j,4)-dp(i,1)*dp(j,1)-dp(i,2)*dp(j,2)-
1205 IF(i.GT.
min(
n,mstu(4)-mstu(32)))
THEN 1206 CALL luerrm(12,
'(LUSTRF:) failed to reconstruct jet system')
1207 IF(mstu(21).GE.1)
RETURN 1209 IF(k(i,1).NE.1.AND.k(i,1).NE.2.AND.k(i,1).NE.41)
GOTO 110
1211 IF(kc.EQ.0)
GOTO 110
1212 kq=kchg(kc,2)*isign(1,k(i,2))
1213 IF(kq.EQ.0)
GOTO 110
1214 IF(
n+5*np+11.GT.mstu(4)-mstu(32)-5)
THEN 1215 CALL luerrm(11,
'(LUSTRF:) no more memory left in LUJETS')
1216 IF(mstu(21).GE.1)
RETURN 1224 120 dps(j)=dps(j)+p(i,j)
1226 IF(p(
n+np,4)**2.LT.p(
n+np,1)**2+p(
n+np,2)**2+p(
n+np,3)**2)
THEN 1227 p(
n+np,4)=sqrt(p(
n+np,1)**2+p(
n+np,2)**2+p(
n+np,3)**2+
1229 dps(4)=dps(4)+
max(0.,p(
n+np,4)-p(i,4))
1231 IF(kq.NE.2) kqsum=kqsum+kq
1232 IF(k(i,1).EQ.41)
THEN 1234 IF(kqsum.EQ.kq) mju(1)=
n+np
1235 IF(kqsum.NE.kq) mju(2)=
n+np
1237 IF(k(i,1).EQ.2.OR.k(i,1).EQ.41)
GOTO 110
1239 CALL luerrm(12,
'(LUSTRF:) unphysical flavour combination')
1240 IF(mstu(21).GE.1)
RETURN 1244 CALL ludbrb(
n+1,
n+np,0.,0.,-dps(1)/dps(4),-dps(2)/dps(4),
1254 130
IF(nr.GE.3)
THEN 1257 IF(i.EQ.
n+nr.AND.iabs(k(
n+1,2)).NE.21)
GOTO 140
1259 IF(i.EQ.
n+nr) i1=
n+1
1260 IF(k(i,1).EQ.41.OR.k(i1,1).EQ.41)
GOTO 140
1261 IF(mju(1).NE.0.AND.i1.LT.mju(1).AND.iabs(k(i1,2)).NE.21)
1263 IF(mju(2).NE.0.AND.i.GT.mju(2).AND.iabs(k(i,2)).NE.21)
GOTO 140
1264 pap=sqrt((p(i,1)**2+p(i,2)**2+p(i,3)**2)*(p(i1,1)**2+
1265 & p(i1,2)**2+p(i1,3)**2))
1266 pvp=p(i,1)*p(i1,1)+p(i,2)*p(i1,2)+p(i,3)*p(i1,3)
1267 pdr=4.*(pap-pvp)**2/(paru13**2*pap+2.*(pap-pvp))
1268 IF(pdr.LT.pdrmin)
THEN 1275 IF(pdrmin.LT.paru12.AND.ir.EQ.
n+nr)
THEN 1277 150 p(
n+1,j)=p(
n+1,j)+p(
n+nr,j)
1278 p(
n+1,5)=sqrt(
max(0.,p(
n+1,4)**2-p(
n+1,1)**2-p(
n+1,2)**2-
1282 ELSEIF(pdrmin.LT.paru12)
THEN 1284 160 p(ir,j)=p(ir,j)+p(ir+1,j)
1285 p(ir,5)=sqrt(
max(0.,p(ir,4)**2-p(ir,1)**2-p(ir,2)**2-
1287 DO 170 i=ir+1,
n+nr-1
1291 IF(ir.EQ.
n+nr-1) k(ir,2)=k(
n+nr,2)
1293 IF(mju(1).GT.ir) mju(1)=mju(1)-1
1294 IF(mju(2).GT.ir) mju(2)=mju(2)-1
1305 IF(ntry.GT.100.AND.ntryr.LE.4)
THEN 1309 ELSEIF(ntry.GT.100)
THEN 1310 CALL luerrm(14,
'(LUSTRF:) caught in infinite loop')
1311 IF(mstu(21).GE.1)
RETURN 1314 IF(mju(1).EQ.0.AND.mju(2).EQ.0)
GOTO 500
1317 IF(mju(jt).EQ.0)
GOTO 490
1326 DO 200 i1=
n+1+(jt-1)*(nr-1),
n+nr+(jt-1)*(1-nr),js
1327 IF(k(i1,2).NE.21.AND.iu.LE.2)
THEN 1332 200 pju(iu,j)=pju(iu,j)+p(i1,j)
1334 210 pju(iu,5)=sqrt(pju(iu,1)**2+pju(iu,2)**2+pju(iu,3)**2)
1335 IF(k(iju(3),2)/100.NE.10*k(iju(1),2)+k(iju(2),2).AND.
1336 &k(iju(3),2)/100.NE.10*k(iju(2),2)+k(iju(1),2))
THEN 1337 CALL luerrm(12,
'(LUSTRF:) unphysical flavour combination')
1338 IF(mstu(21).GE.1)
RETURN 1342 t12=(pju(1,1)*pju(2,1)+pju(1,2)*pju(2,2)+pju(1,3)*pju(2,3))/
1343 &(pju(1,5)*pju(2,5))
1344 t13=(pju(1,1)*pju(3,1)+pju(1,2)*pju(3,2)+pju(1,3)*pju(3,3))/
1345 &(pju(1,5)*pju(3,5))
1346 t23=(pju(2,1)*pju(3,1)+pju(2,2)*pju(3,2)+pju(2,3)*pju(3,3))/
1347 &(pju(2,5)*pju(3,5))
1348 t11=sqrt((2./3.)*(1.-t12)*(1.-t13)/(1.-t23))
1349 t22=sqrt((2./3.)*(1.-t12)*(1.-t23)/(1.-t13))
1350 tsq=sqrt((2.*t11*t22+t12-1.)*(1.+t12))
1351 t1f=(tsq-t22*(1.+t12))/(1.-t12**2)
1352 t2f=(tsq-t11*(1.+t12))/(1.-t12**2)
1354 220 tju(j)=-(t1f*pju(1,j)/pju(1,5)+t2f*pju(2,j)/pju(2,5))
1355 tju(4)=sqrt(1.+tju(1)**2+tju(2)**2+tju(3)**2)
1357 230 pju(iu,5)=tju(4)*pju(iu,4)-tju(1)*pju(iu,1)-tju(2)*pju(iu,2)-
1361 IF(pju(1,5)+pju(2,5).GT.pju(1,4)+pju(2,4))
THEN 1373 ns=iju(iu+1)-iju(iu)
1380 dp(1,j)=0.5*p(is1,j)
1381 IF(is.EQ.1) dp(1,j)=p(is1,j)
1382 dp(2,j)=0.5*p(is2,j)
1383 250
IF(is.EQ.
ns) dp(2,j)=-pju(iu,j)
1384 IF(is.EQ.
ns) dp(2,4)=sqrt(pju(iu,1)**2+pju(iu,2)**2+pju(iu,3)**2)
1385 IF(is.EQ.
ns) dp(2,5)=0.
1389 IF(dp(3,5)+2.*dhkc+dp(4,5).LE.0.)
THEN 1390 dp(1,4)=sqrt(dp(1,1)**2+dp(1,2)**2+dp(1,3)**2)
1391 dp(2,4)=sqrt(dp(2,1)**2+dp(2,2)**2+dp(2,3)**2)
1396 dhks=sqrt(dhkc**2-dp(3,5)*dp(4,5))
1397 dhk1=0.5*((dp(4,5)+dhkc)/dhks-1.)
1398 dhk2=0.5*((dp(3,5)+dhkc)/dhks-1.)
1400 p(in1,5)=sqrt(dp(3,5)+2.*dhkc+dp(4,5))
1402 p(in1,j)=(1.+dhk1)*dp(1,j)-dhk2*dp(2,j)
1403 260 p(in1+1,j)=(1.+dhk2)*dp(2,j)-dhk1*dp(1,j)
1408 IF(ntry.GT.100.AND.ntryr.LE.4)
THEN 1412 ELSEIF(ntry.GT.100)
THEN 1413 CALL luerrm(14,
'(LUSTRF:) caught in infinite loop')
1414 IF(mstu(21).GE.1)
RETURN 1418 ie(1)=k(
n+1+(jt/2)*(np-1),3)
1423 DO 280 in1=
n+nr+2+jq,
n+nr+4*
ns-2+jq,4
1437 dp(2,j)=p(
in(4)+1,j)
1440 dp(1,4)=sqrt(dp(1,1)**2+dp(1,2)**2+dp(1,3)**2)
1441 dp(2,4)=sqrt(dp(2,1)**2+dp(2,2)**2+dp(2,3)**2)
1442 dp(5,1)=dp(1,1)/dp(1,4)-dp(2,1)/dp(2,4)
1443 dp(5,2)=dp(1,2)/dp(1,4)-dp(2,2)/dp(2,4)
1444 dp(5,3)=dp(1,3)/dp(1,4)-dp(2,3)/dp(2,4)
1445 IF(dp(5,1)**2.LE.dp(5,2)**2+dp(5,3)**2) dp(3,1)=1.
1446 IF(dp(5,1)**2.GT.dp(5,2)**2+dp(5,3)**2) dp(3,3)=1.
1447 IF(dp(5,2)**2.LE.dp(5,1)**2+dp(5,3)**2) dp(4,2)=1.
1448 IF(dp(5,2)**2.GT.dp(5,1)**2+dp(5,3)**2) dp(4,3)=1.
1450 dhcx1=dfour(3,1)/dhc12
1451 dhcx2=dfour(3,2)/dhc12
1452 dhcxx=1d0/sqrt(1d0+2d0*dhcx1*dhcx2*dhc12)
1453 dhcy1=dfour(4,1)/dhc12
1454 dhcy2=dfour(4,2)/dhc12
1455 dhcyx=dhcxx*(dhcx1*dhcy2+dhcx2*dhcy1)*dhc12
1456 dhcyy=1d0/sqrt(1d0+2d0*dhcy1*dhcy2*dhc12-dhcyx**2)
1458 dp(3,j)=dhcxx*(dp(3,j)-dhcx2*dp(1,j)-dhcx1*dp(2,j))
1460 310 p(
in(6)+1,j)=dhcyy*(dp(4,j)-dhcy2*dp(1,j)-dhcy1*dp(2,j)-
1465 IF(2*i-nsav.GE.mstu(4)-mstu(32)-5)
THEN 1466 CALL luerrm(11,
'(LUSTRF:) no more memory left in LUJETS')
1467 IF(mstu(21).GE.1)
RETURN 1476 330
CALL lukfdi(kfl(1),0,kfl(3),k(i,2))
1477 IF(k(i,2).EQ.0)
GOTO 270
1478 IF(mstj(12).GE.3.AND.irankj.EQ.1.AND.iabs(kfl(1)).LE.10.AND.
1479 &iabs(kfl(3)).GT.10)
THEN 1480 IF(
rlu(0).GT.parj(19))
GOTO 330
1483 CALL luptdi(kfl(1),px(3),py(3))
1484 pr(1)=p(i,5)**2+(px(1)+px(3))**2+(py(1)+py(3))**2
1485 CALL luzdis(kfl(1),kfl(3),pr(1),
z)
1486 gam(3)=(1.-
z)*(gam(1)+pr(1)/
z)
1491 IF(
in(1)+1.EQ.
in(2).AND.
z*p(
in(1)+2,3)*p(
in(2)+2,3)*
1492 &p(
in(1),5)**2.GE.pr(1))
THEN 1493 p(
in(1)+2,4)=
z*p(
in(1)+2,3)
1494 p(
in(2)+2,4)=pr(1)/(p(
in(1)+2,4)*p(
in(1),5)**2)
1496 350 p(i,j)=(px(1)+px(3))*p(
in(3),j)+(py(1)+py(3))*p(
in(3)+1,j)
1498 ELSEIF(
in(1)+1.EQ.
in(2))
THEN 1499 p(
in(2)+2,4)=p(
in(2)+2,3)
1502 IF(
in(2).GT.
n+nr+4*
ns)
GOTO 270
1503 IF(four(
in(1),
in(2)).LE.1
e-2)
THEN 1504 p(
in(1)+2,4)=p(
in(1)+2,3)
1511 360
IF(
in(1).GT.
n+nr+4*
ns.OR.
in(2).GT.
n+nr+4*
ns.OR.
1512 &
in(1).GT.
in(2))
GOTO 270
1513 IF(
in(1).NE.
in(4).OR.
in(2).NE.
in(5))
THEN 1519 dp(1,4)=sqrt(dp(1,1)**2+dp(1,2)**2+dp(1,3)**2)
1520 dp(2,4)=sqrt(dp(2,1)**2+dp(2,2)**2+dp(2,3)**2)
1522 IF(dhc12.LE.1
e-2)
THEN 1523 p(
in(1)+2,4)=p(
in(1)+2,3)
1529 dp(5,1)=dp(1,1)/dp(1,4)-dp(2,1)/dp(2,4)
1530 dp(5,2)=dp(1,2)/dp(1,4)-dp(2,2)/dp(2,4)
1531 dp(5,3)=dp(1,3)/dp(1,4)-dp(2,3)/dp(2,4)
1532 IF(dp(5,1)**2.LE.dp(5,2)**2+dp(5,3)**2) dp(3,1)=1.
1533 IF(dp(5,1)**2.GT.dp(5,2)**2+dp(5,3)**2) dp(3,3)=1.
1534 IF(dp(5,2)**2.LE.dp(5,1)**2+dp(5,3)**2) dp(4,2)=1.
1535 IF(dp(5,2)**2.GT.dp(5,1)**2+dp(5,3)**2) dp(4,3)=1.
1536 dhcx1=dfour(3,1)/dhc12
1537 dhcx2=dfour(3,2)/dhc12
1538 dhcxx=1d0/sqrt(1d0+2d0*dhcx1*dhcx2*dhc12)
1539 dhcy1=dfour(4,1)/dhc12
1540 dhcy2=dfour(4,2)/dhc12
1541 dhcyx=dhcxx*(dhcx1*dhcy2+dhcx2*dhcy1)*dhc12
1542 dhcyy=1d0/sqrt(1d0+2d0*dhcy1*dhcy2*dhc12-dhcyx**2)
1544 dp(3,j)=dhcxx*(dp(3,j)-dhcx2*dp(1,j)-dhcx1*dp(2,j))
1546 380 p(
in(3)+1,j)=dhcyy*(dp(4,j)-dhcy2*dp(1,j)-dhcy1*dp(2,j)-
1549 pxp=-(px(3)*four(
in(6),
in(3))+py(3)*four(
in(6)+1,
in(3)))
1550 pyp=-(px(3)*four(
in(6),
in(3)+1)+py(3)*four(
in(6)+1,
in(3)+1))
1551 IF(abs(pxp**2+pyp**2-px(3)**2-py(3)**2).LT.0.01)
THEN 1560 p(i,j)=px(1)*p(
in(6),j)+py(1)*p(
in(6)+1,j)+px(3)*p(
in(3),j)+
1562 DO 390 in1=
in(4),
in(1)-4,4
1563 390 p(i,j)=p(i,j)+p(in1+2,3)*p(in1,j)
1564 DO 400 in2=
in(5),
in(2)-4,4
1565 400 p(i,j)=p(i,j)+p(in2+2,3)*p(in2,j)
1567 dhm(2)=2.*four(i,
in(1))
1568 dhm(3)=2.*four(i,
in(2))
1569 dhm(4)=2.*four(
in(1),
in(2))
1572 DO 410 in2=
in(1)+1,
in(2),4
1573 DO 410 in1=
in(1),in2-1,4
1574 dhc=2.*four(in1,in2)
1575 dhg(1)=dhg(1)+p(in1+2,1)*p(in2+2,1)*dhc
1576 IF(in1.EQ.
in(1)) dhg(2)=dhg(2)-p(in2+2,1)*dhc
1577 IF(in2.EQ.
in(2)) dhg(3)=dhg(3)+p(in1+2,1)*dhc
1578 410
IF(in1.EQ.
in(1).AND.in2.EQ.
in(2)) dhg(4)=dhg(4)-dhc
1581 dhs1=dhm(3)*dhg(4)-dhm(4)*dhg(3)
1582 IF(abs(dhs1).LT.1
e-4)
GOTO 270
1583 dhs2=dhm(4)*(gam(3)-dhg(1))-dhm(2)*dhg(3)-dhg(4)*
1584 &(p(i,5)**2-dhm(1))+dhg(2)*dhm(3)
1585 dhs3=dhm(2)*(gam(3)-dhg(1))-dhg(2)*(p(i,5)**2-dhm(1))
1586 p(
in(2)+2,4)=0.5*(sqrt(
max(0d0,dhs2**2-4.*dhs1*dhs3))/abs(dhs1)-
1588 IF(dhm(2)+dhm(4)*p(
in(2)+2,4).LE.0.)
GOTO 270
1589 p(
in(1)+2,4)=(p(i,5)**2-dhm(1)-dhm(3)*p(
in(2)+2,4))/
1590 &(dhm(2)+dhm(4)*p(
in(2)+2,4))
1593 IF(p(
in(2)+2,4).GT.p(
in(2)+2,3))
THEN 1594 p(
in(2)+2,4)=p(
in(2)+2,3)
1597 IF(
in(2).GT.
n+nr+4*
ns)
GOTO 270
1598 IF(four(
in(1),
in(2)).LE.1
e-2)
THEN 1599 p(
in(1)+2,4)=p(
in(1)+2,3)
1604 ELSEIF(p(
in(1)+2,4).GT.p(
in(1)+2,3))
THEN 1605 p(
in(1)+2,4)=p(
in(1)+2,3)
1613 p(i,j)=p(i,j)+p(
in(1)+2,4)*p(
in(1),j)+p(
in(2)+2,4)*p(
in(2),j)
1614 430 pju(iu+3,j)=pju(iu+3,j)+p(i,j)
1615 IF(p(i,4).LE.0.)
GOTO 270
1616 pju(iu+3,5)=tju(4)*pju(iu+3,4)-tju(1)*pju(iu+3,1)-
1617 &tju(2)*pju(iu+3,2)-tju(3)*pju(iu+3,3)
1618 IF(pju(iu+3,5).LT.pju(iu,5))
THEN 1623 IF(
in(3).NE.
in(6))
THEN 1625 p(
in(6),j)=p(
in(3),j)
1626 440 p(
in(6)+1,j)=p(
in(3)+1,j)
1630 p(
in(jq)+2,3)=p(
in(jq)+2,3)-p(
in(jq)+2,4)
1631 450 p(
in(jq)+2,1)=p(
in(jq)+2,1)-(3-2*jq)*p(
in(jq)+2,4)
1636 IF(iabs(kfl(1)).GT.10)
GOTO 270
1640 460 pju(iu+3,j)=pju(iu+3,j)-p(i+1,j)
1645 kfjs(jt)=k(k(mju(jt+2),3),2)
1646 kfls=2*int(
rlu(0)+3.*parj(4)/(1.+3.*parj(4)))+1
1647 IF(kfjh(1).EQ.kfjh(2)) kfls=3
1648 IF(ista.NE.i) kfjs(jt)=isign(1000*
max(iabs(kfjh(1)),
1649 &iabs(kfjh(2)))+100*
min(iabs(kfjh(1)),iabs(kfjh(2)))+
1652 pjs(jt,j)=pju(1,j)+pju(2,j)+p(mju(jt),j)
1653 480 pjs(jt+2,j)=pju(4,j)+pju(5,j)
1654 pjs(jt,5)=sqrt(
max(0.,pjs(jt,4)**2-pjs(jt,1)**2-pjs(jt,2)**2-
1659 500
IF(mju(1).NE.0.AND.mju(2).NE.0)
THEN 1662 ELSEIF(mju(1).NE.0)
THEN 1665 ELSEIF(mju(2).NE.0)
THEN 1668 ELSEIF(iabs(k(
n+1,2)).NE.21)
THEN 1675 p(
n+nr+is,1)=0.5*four(
n+is,
n+is+1-nr*(is/nr))
1676 510 w2sum=w2sum+p(
n+nr+is,1)
1680 w2sum=w2sum-p(
n+nr+nb,1)
1681 IF(w2sum.GT.w2ran.AND.nb.LT.nr)
GOTO 520
1686 is1=
n+is+nb-1-nr*((is+nb-2)/nr)
1687 is2=
n+is+nb-nr*((is+nb-1)/nr)
1690 IF(iabs(k(is1,2)).EQ.21) dp(1,j)=0.5*dp(1,j)
1691 IF(is1.EQ.mju(1)) dp(1,j)=pjs(1,j)-pjs(3,j)
1693 IF(iabs(k(is2,2)).EQ.21) dp(2,j)=0.5*dp(2,j)
1694 530
IF(is2.EQ.mju(2)) dp(2,j)=pjs(2,j)-pjs(4,j)
1698 IF(dp(3,5)+2.*dhkc+dp(4,5).LE.0.)
THEN 1701 dp(1,4)=sqrt(dp(1,1)**2+dp(1,2)**2+dp(1,3)**2+dp(1,5)**2)
1702 dp(2,4)=sqrt(dp(2,1)**2+dp(2,2)**2+dp(2,3)**2+dp(2,5)**2)
1705 dhks=sqrt(dhkc**2-dp(3,5)*dp(4,5))
1706 dhk1=0.5*((dp(4,5)+dhkc)/dhks-1.)
1707 dhk2=0.5*((dp(3,5)+dhkc)/dhks-1.)
1709 p(in1,5)=sqrt(dp(3,5)+2.*dhkc+dp(4,5))
1711 p(in1,j)=(1.+dhk1)*dp(1,j)-dhk2*dp(2,j)
1712 540 p(in1+1,j)=(1.+dhk2)*dp(2,j)-dhk1*dp(1,j)
1717 IF(ntry.GT.100.AND.ntryr.LE.4)
THEN 1721 ELSEIF(ntry.GT.100)
THEN 1722 CALL luerrm(14,
'(LUSTRF:) caught in infinite loop')
1723 IF(mstu(21).GE.1)
RETURN 1729 560 p(
n+nrs,j)=p(
n+nrs,j)+p(
n+is,j)
1732 IF(mju(jt).NE.0) irank(jt)=njs(jt)
1733 IF(
ns.GT.nr) irank(jt)=1
1734 ie(jt)=k(
n+1+(jt/2)*(np-1),3)
1735 in(3*jt+1)=
n+nr+1+4*(jt/2)*(
ns-1)
1736 in(3*jt+2)=
in(3*jt+1)+1
1737 in(3*jt+3)=
n+nr+4*
ns+2*jt-1
1738 DO 570 in1=
n+nr+2+jt,
n+nr+4*
ns-2+jt,4
1747 IF(
ns.EQ.1.AND.mju(1)+mju(2).EQ.0)
CALL luptdi(0,px(1),py(1))
1752 IF(mju(jt).NE.0) kfl(jt)=kfjs(jt)
1759 kfl(3)=int(1.+(2.+parj(2))*
rlu(0))*(-1)**int(
rlu(0)+0.5)
1760 CALL lukfdi(kfl(3),0,kfl(1),kdump)
1762 IF(iabs(kfl(1)).GT.10.AND.
rlu(0).GT.0.5)
THEN 1763 kfl(2)=-(kfl(1)+isign(10000,kfl(1)))
1764 ELSEIF(iabs(kfl(1)).GT.10)
THEN 1765 kfl(1)=-(kfl(2)+isign(10000,kfl(2)))
1767 CALL luptdi(kfl(1),px(1),py(1))
1770 pr3=
min(25.,0.1*p(
n+nr+1,5)**2)
1771 590
CALL luzdis(kfl(1),kfl(2),pr3,
z)
1772 zr=pr3/(
z*p(
n+nr+1,5)**2)
1773 IF(zr.GE.1.)
GOTO 590
1777 gam(jt)=pr3*(1.-
z)/
z 1778 in1=
n+nr+3+4*(jt/2)*(
ns-1)
1781 p(in1,3)=(2-jt)*(1.-
z)+(jt-1)*
z 1784 600 p(in1+1,3)=(2-jt)*(1.-zr)+(jt-1)*zr
1789 IF(jt.EQ.1.OR.
ns.EQ.nr-1)
THEN 1797 dp(1,4)=sqrt(dp(1,1)**2+dp(1,2)**2+dp(1,3)**2)
1798 dp(2,4)=sqrt(dp(2,1)**2+dp(2,2)**2+dp(2,3)**2)
1799 dp(5,1)=dp(1,1)/dp(1,4)-dp(2,1)/dp(2,4)
1800 dp(5,2)=dp(1,2)/dp(1,4)-dp(2,2)/dp(2,4)
1801 dp(5,3)=dp(1,3)/dp(1,4)-dp(2,3)/dp(2,4)
1802 IF(dp(5,1)**2.LE.dp(5,2)**2+dp(5,3)**2) dp(3,1)=1.
1803 IF(dp(5,1)**2.GT.dp(5,2)**2+dp(5,3)**2) dp(3,3)=1.
1804 IF(dp(5,2)**2.LE.dp(5,1)**2+dp(5,3)**2) dp(4,2)=1.
1805 IF(dp(5,2)**2.GT.dp(5,1)**2+dp(5,3)**2) dp(4,3)=1.
1807 dhcx1=dfour(3,1)/dhc12
1808 dhcx2=dfour(3,2)/dhc12
1809 dhcxx=1d0/sqrt(1d0+2d0*dhcx1*dhcx2*dhc12)
1810 dhcy1=dfour(4,1)/dhc12
1811 dhcy2=dfour(4,2)/dhc12
1812 dhcyx=dhcxx*(dhcx1*dhcy2+dhcx2*dhcy1)*dhc12
1813 dhcyy=1d0/sqrt(1d0+2d0*dhcy1*dhcy2*dhc12-dhcyx**2)
1815 dp(3,j)=dhcxx*(dp(3,j)-dhcx2*dp(1,j)-dhcx1*dp(2,j))
1817 620 p(in3+1,j)=dhcyy*(dp(4,j)-dhcy2*dp(1,j)-dhcy1*dp(2,j)-
1822 630 p(in3+3,j)=p(in3+1,j)
1827 IF(mju(1)+mju(2).GT.0)
THEN 1829 IF(njs(jt).EQ.0)
GOTO 660
1831 650 p(
n+nrs,j)=p(
n+nrs,j)-pjs(jt+2,j)
1837 IF(2*i-nsav.GE.mstu(4)-mstu(32)-5)
THEN 1838 CALL luerrm(11,
'(LUSTRF:) no more memory left in LUJETS')
1839 IF(mstu(21).GE.1)
RETURN 1842 IF(iabs(kfl(3-jt)).GT.10) jt=3-jt
1845 irank(jt)=irank(jt)+1
1852 680
CALL lukfdi(kfl(jt),0,kfl(3),k(i,2))
1853 IF(k(i,2).EQ.0)
GOTO 550
1854 IF(mstj(12).GE.3.AND.irank(jt).EQ.1.AND.iabs(kfl(jt)).LE.10.AND.
1855 &iabs(kfl(3)).GT.10)
THEN 1856 IF(
rlu(0).GT.parj(19))
GOTO 680
1859 CALL luptdi(kfl(jt),px(3),py(3))
1860 pr(jt)=p(i,5)**2+(px(jt)+px(3))**2+(py(jt)+py(3))**2
1865 wmin=parj(32+mstj(11))+pmq(1)+pmq(2)+parj(36)*pmq(3)
1866 IF(iabs(kfl(jt)).GT.10.AND.iabs(kfl(3)).GT.10) wmin=
1867 &wmin-0.5*parj(36)*pmq(3)
1868 wrem2=four(
n+nrs,
n+nrs)
1869 IF(wrem2.LT.0.10)
GOTO 550
1870 IF(wrem2.LT.
max(wmin*(1.+(2.*
rlu(0)-1.)*parj(37)),
1871 &parj(32)+pmq(1)+pmq(2))**2)
GOTO 810
1874 CALL luzdis(kfl(jt),kfl(3),pr(jt),
z)
1877 IF(
max(mod(kfl1a,10),mod(kfl1a/1000,10),mod(kfl2a,10),
1878 &mod(kfl2a/1000,10)).GE.4)
THEN 1879 pr(jr)=(pmq(jr)+pmq(3))**2+(px(jr)-px(3))**2+(py(jr)-py(3))**2
1880 pw12=sqrt(
max(0.,(wrem2-pr(1)-pr(2))**2-4.*pr(1)*pr(2)))
1881 z=(wrem2+pr(jt)-pr(jr)+pw12*(2.*
z-1.))/(2.*wrem2)
1882 pr(jr)=(pmq(jr)+parj(32+mstj(11)))**2+(px(jr)-px(3))**2+
1884 IF((1.-
z)*(wrem2-pr(jt)/
z).LT.pr(jr))
GOTO 810
1886 gam(3)=(1.-
z)*(gam(jt)+pr(jt)/
z)
1888 690
in(j)=
in(3*jt+j)
1891 IF(
in(1)+1.EQ.
in(2).AND.
z*p(
in(1)+2,3)*p(
in(2)+2,3)*
1892 &p(
in(1),5)**2.GE.pr(jt))
THEN 1893 p(
in(jt)+2,4)=
z*p(
in(jt)+2,3)
1894 p(
in(jr)+2,4)=pr(jt)/(p(
in(jt)+2,4)*p(
in(1),5)**2)
1896 700 p(i,j)=(px(jt)+px(3))*p(
in(3),j)+(py(jt)+py(3))*p(
in(3)+1,j)
1898 ELSEIF(
in(1)+1.EQ.
in(2))
THEN 1899 p(
in(jr)+2,4)=p(
in(jr)+2,3)
1902 IF(js*
in(jr).GT.js*
in(4*jr))
GOTO 550
1903 IF(four(
in(1),
in(2)).LE.1
e-2)
THEN 1904 p(
in(jt)+2,4)=p(
in(jt)+2,3)
1911 710
IF(js*
in(1).GT.js*
in(3*jr+1).OR.js*
in(2).GT.js*
in(3*jr+2).OR.
1912 &
in(1).GT.
in(2))
GOTO 550
1913 IF(
in(1).NE.
in(3*jt+1).OR.
in(2).NE.
in(3*jt+2))
THEN 1919 dp(1,4)=sqrt(dp(1,1)**2+dp(1,2)**2+dp(1,3)**2)
1920 dp(2,4)=sqrt(dp(2,1)**2+dp(2,2)**2+dp(2,3)**2)
1922 IF(dhc12.LE.1
e-2)
THEN 1923 p(
in(jt)+2,4)=p(
in(jt)+2,3)
1929 dp(5,1)=dp(1,1)/dp(1,4)-dp(2,1)/dp(2,4)
1930 dp(5,2)=dp(1,2)/dp(1,4)-dp(2,2)/dp(2,4)
1931 dp(5,3)=dp(1,3)/dp(1,4)-dp(2,3)/dp(2,4)
1932 IF(dp(5,1)**2.LE.dp(5,2)**2+dp(5,3)**2) dp(3,1)=1.
1933 IF(dp(5,1)**2.GT.dp(5,2)**2+dp(5,3)**2) dp(3,3)=1.
1934 IF(dp(5,2)**2.LE.dp(5,1)**2+dp(5,3)**2) dp(4,2)=1.
1935 IF(dp(5,2)**2.GT.dp(5,1)**2+dp(5,3)**2) dp(4,3)=1.
1936 dhcx1=dfour(3,1)/dhc12
1937 dhcx2=dfour(3,2)/dhc12
1938 dhcxx=1d0/sqrt(1d0+2d0*dhcx1*dhcx2*dhc12)
1939 dhcy1=dfour(4,1)/dhc12
1940 dhcy2=dfour(4,2)/dhc12
1941 dhcyx=dhcxx*(dhcx1*dhcy2+dhcx2*dhcy1)*dhc12
1942 dhcyy=1d0/sqrt(1d0+2d0*dhcy1*dhcy2*dhc12-dhcyx**2)
1944 dp(3,j)=dhcxx*(dp(3,j)-dhcx2*dp(1,j)-dhcx1*dp(2,j))
1946 730 p(
in(3)+1,j)=dhcyy*(dp(4,j)-dhcy2*dp(1,j)-dhcy1*dp(2,j)-
1949 pxp=-(px(3)*four(
in(3*jt+3),
in(3))+py(3)*
1950 & four(
in(3*jt+3)+1,
in(3)))
1951 pyp=-(px(3)*four(
in(3*jt+3),
in(3)+1)+py(3)*
1952 & four(
in(3*jt+3)+1,
in(3)+1))
1953 IF(abs(pxp**2+pyp**2-px(3)**2-py(3)**2).LT.0.01)
THEN 1962 p(i,j)=px(jt)*p(
in(3*jt+3),j)+py(jt)*p(
in(3*jt+3)+1,j)+
1963 &px(3)*p(
in(3),j)+py(3)*p(
in(3)+1,j)
1964 DO 740 in1=
in(3*jt+1),
in(1)-4*js,4*js
1965 740 p(i,j)=p(i,j)+p(in1+2,3)*p(in1,j)
1966 DO 750 in2=
in(3*jt+2),
in(2)-4*js,4*js
1967 750 p(i,j)=p(i,j)+p(in2+2,3)*p(in2,j)
1969 dhm(2)=2.*four(i,
in(1))
1970 dhm(3)=2.*four(i,
in(2))
1971 dhm(4)=2.*four(
in(1),
in(2))
1974 DO 760 in2=
in(1)+1,
in(2),4
1975 DO 760 in1=
in(1),in2-1,4
1976 dhc=2.*four(in1,in2)
1977 dhg(1)=dhg(1)+p(in1+2,jt)*p(in2+2,jt)*dhc
1978 IF(in1.EQ.
in(1)) dhg(2)=dhg(2)-js*p(in2+2,jt)*dhc
1979 IF(in2.EQ.
in(2)) dhg(3)=dhg(3)+js*p(in1+2,jt)*dhc
1980 760
IF(in1.EQ.
in(1).AND.in2.EQ.
in(2)) dhg(4)=dhg(4)-dhc
1983 dhs1=dhm(jr+1)*dhg(4)-dhm(4)*dhg(jr+1)
1984 IF(abs(dhs1).LT.1
e-4)
GOTO 550
1985 dhs2=dhm(4)*(gam(3)-dhg(1))-dhm(jt+1)*dhg(jr+1)-dhg(4)*
1986 &(p(i,5)**2-dhm(1))+dhg(jt+1)*dhm(jr+1)
1987 dhs3=dhm(jt+1)*(gam(3)-dhg(1))-dhg(jt+1)*(p(i,5)**2-dhm(1))
1988 p(
in(jr)+2,4)=0.5*(sqrt(
max(0d0,dhs2**2-4.*dhs1*dhs3))/abs(dhs1)-
1990 IF(dhm(jt+1)+dhm(4)*p(
in(jr)+2,4).LE.0.)
GOTO 550
1991 p(
in(jt)+2,4)=(p(i,5)**2-dhm(1)-dhm(jr+1)*p(
in(jr)+2,4))/
1992 &(dhm(jt+1)+dhm(4)*p(
in(jr)+2,4))
1995 IF(p(
in(jr)+2,4).GT.p(
in(jr)+2,3))
THEN 1996 p(
in(jr)+2,4)=p(
in(jr)+2,3)
1999 IF(js*
in(jr).GT.js*
in(4*jr))
GOTO 550
2000 IF(four(
in(1),
in(2)).LE.1
e-2)
THEN 2001 p(
in(jt)+2,4)=p(
in(jt)+2,3)
2006 ELSEIF(p(
in(jt)+2,4).GT.p(
in(jt)+2,3))
THEN 2007 p(
in(jt)+2,4)=p(
in(jt)+2,3)
2015 p(i,j)=p(i,j)+p(
in(1)+2,4)*p(
in(1),j)+p(
in(2)+2,4)*p(
in(2),j)
2016 780 p(
n+nrs,j)=p(
n+nrs,j)-p(i,j)
2017 IF(p(i,4).LE.0.)
GOTO 550
2023 IF(
in(3).NE.
in(3*jt+3))
THEN 2025 p(
in(3*jt+3),j)=p(
in(3),j)
2026 790 p(
in(3*jt+3)+1,j)=p(
in(3)+1,j)
2030 p(
in(jq)+2,3)=p(
in(jq)+2,3)-p(
in(jq)+2,4)
2031 800 p(
in(jq)+2,jt)=p(
in(jq)+2,jt)-js*(3-2*jq)*p(
in(jq)+2,4)
2040 CALL lukfdi(kfl(jr),-kfl(3),kfldmp,k(i,2))
2041 IF(k(i,2).EQ.0)
GOTO 550
2043 pr(jr)=p(i,5)**2+(px(jr)-px(3))**2+(py(jr)-py(3))**2
2047 IF(p(
in(4)+2,3)*p(
in(5)+2,3)*four(
in(4),
in(5)).LT.p(
in(7),3)*
2048 &p(
in(8),3)*four(
in(7),
in(8))) jq=2
2049 dhc12=four(
in(3*jq+1),
in(3*jq+2))
2050 dhr1=four(
n+nrs,
in(3*jq+2))/dhc12
2051 dhr2=four(
n+nrs,
in(3*jq+1))/dhc12
2052 IF(
in(4).NE.
in(7).OR.
in(5).NE.
in(8))
THEN 2053 px(3-jq)=-four(
n+nrs,
in(3*jq+3))-px(jq)
2054 py(3-jq)=-four(
n+nrs,
in(3*jq+3)+1)-py(jq)
2055 pr(3-jq)=p(i+(jt+jq-3)**2-1,5)**2+(px(3-jq)+(2*jq-3)*js*
2056 & px(3))**2+(py(3-jq)+(2*jq-3)*js*py(3))**2
2060 wrem2=wrem2+(px(1)+px(2))**2+(py(1)+py(2))**2
2061 fd=(sqrt(pr(1))+sqrt(pr(2)))/sqrt(wrem2)
2062 IF(mju(1)+mju(2).NE.0.AND.i.EQ.isav+2.AND.fd.GE.1.)
GOTO 180
2063 IF(fd.GE.1.)
GOTO 550
2064 fa=wrem2+pr(jt)-pr(jr)
2065 IF(mstj(11).EQ.2) prev=0.5*fd**parj(37+mstj(11))
2066 IF(mstj(11).NE.2) prev=0.5*exp(
max(-100.,log(fd)*
2067 &parj(37+mstj(11))*(pr(1)+pr(2))**2))
2068 fb=sign(sqrt(
max(0.,
fa**2-4.*wrem2*pr(jt))),js*(
rlu(0)-prev))
2071 IF(
max(mod(kfl1a,10),mod(kfl1a/1000,10),mod(kfl2a,10),
2072 &mod(kfl2a/1000,10)).GE.6)
fb=sign(sqrt(
max(0.,
fa**2-
2073 &4.*wrem2*pr(jt))),float(js))
2075 p(i-1,j)=(px(jt)+px(3))*p(
in(3*jq+3),j)+(py(jt)+py(3))*
2076 &p(
in(3*jq+3)+1,j)+0.5*(dhr1*(
fa+
fb)*p(
in(3*jq+1),j)+
2077 &dhr2*(
fa-
fb)*p(
in(3*jq+2),j))/wrem2
2078 820 p(i,j)=p(
n+nrs,j)-p(i-1,j)
2082 DO 830 i=nsav+1,nsav+np
2085 IF(mstu(16).NE.2)
THEN 2103 840 v(nsav,j)=v(ip,j)
2104 p(nsav,5)=sqrt(
max(0d0,dps(4)**2-dps(1)**2-dps(2)**2-dps(3)**2))
2115 k(i-nsav+
n,j)=k(i,j)
2116 860 p(i-nsav+
n,j)=p(i,j)
2118 DO 880 i=
n+1,2*
n-nsav
2119 IF(k(i,3).NE.ie(1))
GOTO 880
2124 IF(mstu(16).NE.2) k(i1,3)=nsav
2126 DO 900 i=2*
n-nsav,
n+1,-1
2127 IF(k(i,3).EQ.ie(1))
GOTO 900
2132 IF(mstu(16).NE.2) k(i1,3)=nsav
2136 CALL ludbrb(nsav+1,
n,0.,0.,dps(1)/dps(4),dps(2)/dps(4),
2151 IMPLICIT DOUBLE PRECISION(
d)
2152 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
2154 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
2156 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
2158 dimension dps(5),psi(4),nfi(3),nfl(3),ifet(3),kflf(3),
2159 &kflo(2),pxo(2),pyo(2),wo(2)
2169 IF(i.GT.
min(
n,mstu(4)-mstu(32)))
THEN 2170 CALL luerrm(12,
'(LUINDF:) failed to reconstruct jet system')
2171 IF(mstu(21).GE.1)
RETURN 2173 IF(k(i,1).NE.1.AND.k(i,1).NE.2)
GOTO 110
2175 IF(kc.EQ.0)
GOTO 110
2176 kq=kchg(kc,2)*isign(1,k(i,2))
2177 IF(kq.EQ.0)
GOTO 110
2179 IF(kq.NE.2) kqsum=kqsum+kq
2181 k(nsav+njet,j)=k(i,j)
2182 p(nsav+njet,j)=p(i,j)
2183 120 dps(j)=dps(j)+p(i,j)
2185 IF(k(i,1).EQ.2.OR.(mstj(3).LE.5.AND.
n.GT.i.AND.
2186 &k(i+1,1).EQ.2))
GOTO 110
2187 IF(njet.NE.1.AND.kqsum.NE.0)
THEN 2188 CALL luerrm(12,
'(LUINDF:) unphysical flavour combination')
2189 IF(mstu(21).GE.1)
RETURN 2193 IF(njet.NE.1)
CALL ludbrb(nsav+1,nsav+njet,0.,0.,-dps(1)/dps(4),
2194 &-dps(2)/dps(4),-dps(3)/dps(4))
2198 DO 140 i=nsav+1,nsav+njet
2202 nfi(kfa)=nfi(kfa)+isign(1,k(i,2))
2203 ELSEIF(kfa.GT.1000)
THEN 2204 kfla=mod(kfa/1000,10)
2205 kflb=mod(kfa/100,10)
2206 IF(kfla.LE.3) nfi(kfla)=nfi(kfla)+isign(1,k(i,2))
2207 IF(kflb.LE.3) nfi(kflb)=nfi(kflb)+isign(1,k(i,2))
2215 IF(ntry.GT.200)
THEN 2216 CALL luerrm(14,
'(LUINDF:) caught in infinite loop')
2217 IF(mstu(21).GE.1)
RETURN 2225 DO 230 ip1=nsav+1,nsav+njet
2231 IF(kflh.GT.10) kflh=mod(kflh/1000,10)
2233 wf=p(ip1,4)+sqrt(p(ip1,1)**2+p(ip1,2)**2+p(ip1,3)**2)
2236 170
IF(iabs(k(ip1,2)).NE.21)
THEN 2239 CALL luptdi(0,pxo(1),pyo(1))
2243 ELSEIF(mstj(2).LE.2)
THEN 2245 IF(mstj(2).EQ.2) mstj(91)=1
2246 kflo(1)=int(1.+(2.+parj(2))*
rlu(0))*(-1)**int(
rlu(0)+0.5)
2247 CALL luptdi(0,pxo(1),pyo(1))
2254 IF(mstj(2).EQ.4) mstj(91)=1
2255 kflo(1)=int(1.+(2.+parj(2))*
rlu(0))*(-1)**int(
rlu(0)+0.5)
2257 CALL luptdi(0,pxo(1),pyo(1))
2260 wo(1)=wf*
rlu(0)**(1./3.)
2275 IF(i.GE.mstu(4)-mstu(32)-njet-5)
THEN 2276 CALL luerrm(11,
'(LUINDF:) no more memory left in LUJETS')
2277 IF(mstu(21).GE.1)
RETURN 2284 200
CALL lukfdi(kfl1,0,kfl2,k(i,2))
2285 IF(k(i,2).EQ.0)
GOTO 180
2286 IF(mstj(12).GE.3.AND.irank.EQ.1.AND.iabs(kfl1).LE.10.AND.
2287 &iabs(kfl2).GT.10)
THEN 2288 IF(
rlu(0).GT.parj(19))
GOTO 200
2293 CALL luptdi(kfl1,px2,py2)
2296 pr=p(i,5)**2+p(i,1)**2+p(i,2)**2
2298 p(i,3)=0.5*(
z*
w-pr/(
z*
w))
2299 p(i,4)=0.5*(
z*
w+pr/(
z*
w))
2300 IF(mstj(3).GE.1.AND.irank.EQ.1.AND.kflh.GE.4.AND.
2301 &p(i,3).LE.0.001)
THEN 2302 IF(
w.GE.p(i,5)+0.5*parj(32))
GOTO 180
2317 IF(mstj(3).GE.0.AND.p(i,3).LT.0.) i=i-1
2318 IF(
w.GT.parj(31))
GOTO 190
2320 IF(mod(mstj(3),5).EQ.4.AND.
n.EQ.nsav1) wf=wf+0.1*parj(32)
2321 IF(mod(mstj(3),5).EQ.4.AND.
n.EQ.nsav1)
GOTO 170
2324 the=
ulangl(p(ip1,3),sqrt(p(ip1,1)**2+p(ip1,2)**2))
2325 phi=
ulangl(p(ip1,1),p(ip1,2))
2326 CALL ludbrb(nsav1+1,
n,the,phi,0d0,0d0,0d0)
2327 k(k(ip1,3),4)=nsav1+1
2332 IF(njet.EQ.1.OR.mstj(3).LE.0)
GOTO 470
2333 IF(mod(mstj(3),5).NE.0.AND.
n-nsav-njet.LT.2)
GOTO 150
2336 DO 240 i=nsav+njet+1,
n 2338 kfla=mod(kfa/1000,10)
2339 kflb=mod(kfa/100,10)
2342 IF(kflb.LE.3) nfl(kflb)=nfl(kflb)-isign(1,k(i,2))*(-1)**kflb
2343 IF(kflc.LE.3) nfl(kflc)=nfl(kflc)+isign(1,k(i,2))*(-1)**kflb
2345 IF(kfla.LE.3) nfl(kfla)=nfl(kfla)-isign(1,k(i,2))
2346 IF(kflb.LE.3) nfl(kflb)=nfl(kflb)-isign(1,k(i,2))
2347 IF(kflc.LE.3) nfl(kflc)=nfl(kflc)-isign(1,k(i,2))
2350 nreq=(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3))-iabs(nfl(1)+
2351 &nfl(2)+nfl(3)))/2+iabs(nfl(1)+nfl(2)+nfl(3))/3
2352 IF(nreq.EQ.0)
GOTO 320
2358 DO 260 i=nsav+njet+1,
n 2359 p2=p(i,1)**2+p(i,2)**2+p(i,3)**2
2360 IF(k(i,1).EQ.1.AND.p2.LT.p2min) irem=i
2361 260
IF(k(i,1).EQ.1.AND.p2.LT.p2min) p2min=p2
2362 IF(irem.EQ.0)
GOTO 150
2365 kfla=mod(kfa/1000,10)
2366 kflb=mod(kfa/100,10)
2368 IF(kfla.GE.4.OR.kflb.GE.4) k(irem,1)=8
2369 IF(k(irem,1).EQ.8)
GOTO 250
2371 isgn=isign(1,k(irem,2))*(-1)**kflb
2372 IF(kflb.LE.3) nfl(kflb)=nfl(kflb)+isgn
2373 IF(kflc.LE.3) nfl(kflc)=nfl(kflc)-isgn
2375 IF(kfla.LE.3) nfl(kfla)=nfl(kfla)+isign(1,k(irem,2))
2376 IF(kflb.LE.3) nfl(kflb)=nfl(kflb)+isign(1,k(irem,2))
2377 IF(kflc.LE.3) nfl(kflc)=nfl(kflc)+isign(1,k(irem,2))
2380 nreq=(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3))-iabs(nfl(1)+
2381 &nfl(2)+nfl(3)))/2+iabs(nfl(1)+nfl(2)+nfl(3))/3
2382 IF(nreq.GT.nrem)
GOTO 250
2383 DO 270 i=nsav+njet+1,
n 2384 270
IF(k(i,1).EQ.8) k(i,1)=1
2388 IF(nfl(1)+nfl(2)+nfl(3).NE.0) nfet=3
2389 IF(nreq.LT.nrem) nfet=1
2390 IF(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3)).EQ.0) nfet=0
2392 ifet(j)=1+(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3)))*
rlu(0)
2393 kflf(j)=isign(1,nfl(1))
2394 IF(ifet(j).GT.iabs(nfl(1))) kflf(j)=isign(2,nfl(2))
2395 290
IF(ifet(j).GT.iabs(nfl(1))+iabs(nfl(2))) kflf(j)=isign(3,nfl(3))
2396 IF(nfet.EQ.2.AND.(ifet(1).EQ.ifet(2).OR.kflf(1)*kflf(2).GT.0))
2398 IF(nfet.EQ.3.AND.(ifet(1).EQ.ifet(2).OR.ifet(1).EQ.ifet(3).OR.
2399 &ifet(2).EQ.ifet(3).OR.kflf(1)*kflf(2).LT.0.OR.kflf(1)*kflf(3).
2400 <.0.OR.kflf(1)*(nfl(1)+nfl(2)+nfl(3)).LT.0))
GOTO 280
2401 IF(nfet.EQ.0) kflf(1)=1+int((2.+parj(2))*
rlu(0))
2402 IF(nfet.EQ.0) kflf(2)=-kflf(1)
2403 IF(nfet.EQ.1) kflf(2)=isign(1+int((2.+parj(2))*
rlu(0)),-kflf(1))
2404 IF(nfet.LE.2) kflf(3)=0
2405 IF(kflf(3).NE.0)
THEN 2406 kflfc=isign(1000*
max(iabs(kflf(1)),iabs(kflf(3)))+
2407 & 100*
min(iabs(kflf(1)),iabs(kflf(3)))+1,kflf(1))
2408 IF(kflf(1).EQ.kflf(3).OR.(1.+3.*parj(4))*
rlu(0).GT.1.)
2409 & kflfc=kflfc+isign(2,kflfc)
2413 CALL lukfdi(kflfc,kflf(2),kfldmp,kf)
2414 IF(kf.EQ.0)
GOTO 280
2415 DO 300 j=1,
max(2,nfet)
2416 300 nfl(iabs(kflf(j)))=nfl(iabs(kflf(j)))-isign(1,kflf(j))
2419 npos=
min(1+int(
rlu(0)*nrem),nrem)
2420 DO 310 i=nsav+njet+1,
n 2421 IF(k(i,1).EQ.7) npos=npos-1
2422 IF(k(i,1).EQ.1.OR.npos.NE.0)
GOTO 310
2426 p(i,4)=sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2+p(i,5)**2)
2429 nreq=(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3))-iabs(nfl(1)+
2430 &nfl(2)+nfl(3)))/2+iabs(nfl(1)+nfl(2)+nfl(3))/3
2431 IF(nrem.GT.0)
GOTO 280
2434 320
IF(mod(mstj(3),5).NE.0.AND.mod(mstj(3),5).NE.4)
THEN 2437 DO 330 i=nsav+njet+1,
n 2438 330 psi(j)=psi(j)+p(i,j)
2439 psi(4)=psi(1)**2+psi(2)**2+psi(3)**2
2441 DO 340 i=nsav+njet+1,
n 2442 IF(mod(mstj(3),5).EQ.1) pws=pws+p(i,4)
2443 IF(mod(mstj(3),5).EQ.2) pws=pws+sqrt(p(i,5)**2+(psi(1)*p(i,1)+
2444 & psi(2)*p(i,2)+psi(3)*p(i,3))**2/psi(4))
2445 340
IF(mod(mstj(3),5).EQ.3) pws=pws+1.
2446 DO 360 i=nsav+njet+1,
n 2447 IF(mod(mstj(3),5).EQ.1) pw=p(i,4)
2448 IF(mod(mstj(3),5).EQ.2) pw=sqrt(p(i,5)**2+(psi(1)*p(i,1)+
2449 & psi(2)*p(i,2)+psi(3)*p(i,3))**2/psi(4))
2450 IF(mod(mstj(3),5).EQ.3) pw=1.
2452 350 p(i,j)=p(i,j)-psi(j)*pw/pws
2453 360 p(i,4)=sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2+p(i,5)**2)
2456 ELSEIF(mod(mstj(3),5).EQ.4)
THEN 2461 DO 390 i=nsav+njet+1,
n 2465 pls=(p(i,1)*p(ir1,1)+p(i,2)*p(ir1,2)+p(i,3)*p(ir1,3))/
2466 & (p(ir1,1)**2+p(ir1,2)**2+p(ir1,3)**2)
2468 380 p(ir2,j)=p(ir2,j)+p(i,j)-pls*p(ir1,j)
2469 p(ir2,4)=p(ir2,4)+p(i,4)
2470 390 p(ir2,5)=p(ir2,5)+pls
2473 400
IF(k(i,1).NE.0) pss=pss+p(i,4)/(pecm*(0.8*p(i,5)+0.2))
2474 DO 420 i=nsav+njet+1,
n 2477 pls=(p(i,1)*p(ir1,1)+p(i,2)*p(ir1,2)+p(i,3)*p(ir1,3))/
2478 & (p(ir1,1)**2+p(ir1,2)**2+p(ir1,3)**2)
2480 410 p(i,j)=p(i,j)-p(ir2,j)/k(ir2,1)+(1./(p(ir2,5)*pss)-1.)*pls*
2482 420 p(i,4)=sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2+p(i,5)**2)
2486 IF(mod(mstj(3),5).NE.0)
THEN 2490 DO 430 i=nsav+njet+1,
n 2493 430 pqs=pqs+p(i,5)**2/p(i,4)
2494 IF(pms.GE.pecm)
GOTO 150
2497 pfac=(pecm-pqs)/(pes-pqs)
2500 DO 460 i=nsav+njet+1,
n 2502 450 p(i,j)=pfac*p(i,j)
2503 p(i,4)=sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2+p(i,5)**2)
2505 460 pqs=pqs+p(i,5)**2/p(i,4)
2506 IF(neco.LT.10.AND.abs(pecm-pes).GT.2
e-6*pecm)
GOTO 440
2510 470
DO 480 i=nsav+njet+1,
n 2511 IF(mstu(16).NE.2) k(i,3)=nsav+1
2512 480
IF(mstu(16).EQ.2) k(i,3)=k(k(i,3),3)
2513 DO 490 i=nsav+1,nsav+njet
2516 IF(mstu(16).NE.2)
THEN 2520 k(i1,4)=k(i1,4)-njet+1
2521 k(i1,5)=k(i1,5)-njet+1
2522 IF(k(i1,5).LT.k(i1,4))
THEN 2538 500 v(nsav,j)=v(ip,j)
2539 p(nsav,5)=sqrt(
max(0d0,dps(4)**2-dps(1)**2-dps(2)**2-dps(3)**2))
2541 DO 510 i=nsav+njet,
n 2543 k(i-njet+1,j)=k(i,j)
2544 p(i-njet+1,j)=p(i,j)
2545 510 v(i-njet+1,j)=v(i,j)
2549 IF(njet.NE.1)
CALL ludbrb(nsav+1,
n,0.,0.,dps(1)/dps(4),
2550 &dps(2)/dps(4),dps(3)/dps(4))
2563 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
2565 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
2567 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
2569 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
2571 dimension vdcy(4),kflo(4),kfl1(4),pv(10,5),rord(10),ue(3),be(3),
2573 DATA wtcor/2.,5.,15.,60.,250.,1500.,1.2
e4,1.2e5,150.,16./
2577 pawt(
a,b,c)=sqrt((
a**2-(b+c)**2)*(
a**2-(b-c)**2))/(2.*
a)
2578 four(i,j)=p(i,4)*p(j,4)-p(i,1)*p(j,1)-p(i,2)*p(j,2)-p(i,3)*p(j,3)
2579 hmeps(
ha)=((1.-hrq-
ha)**2+3.*
ha*(1.+hrq-
ha))*
2580 &sqrt((1.-hrq-
ha)**2-4.*hrq*
ha)
2586 kfs=isign(1,k(ip,2))
2591 IF(k(ip,1).EQ.5)
THEN 2593 ELSEIF(k(ip,1).NE.4)
THEN 2594 v(ip,5)=-pmas(kc,4)*log(
rlu(0))
2597 100 vdcy(j)=v(ip,j)+v(ip,5)*p(ip,j)/p(ip,5)
2601 IF(mstj(22).EQ.2)
THEN 2602 IF(pmas(kc,4).GT.parj(71)) mout=1
2603 ELSEIF(mstj(22).EQ.3)
THEN 2604 IF(vdcy(1)**2+vdcy(2)**2+vdcy(3)**2.GT.parj(72)**2) mout=1
2605 ELSEIF(mstj(22).EQ.4)
THEN 2606 IF(vdcy(1)**2+vdcy(2)**2.GT.parj(73)**2) mout=1
2607 IF(abs(vdcy(3)).GT.parj(74)) mout=1
2609 IF(mout.EQ.1.AND.k(ip,1).NE.5)
THEN 2616 IF(mdcy(kc,2).GT.0)
THEN 2617 mdmdcy=mdme(mdcy(kc,2),2)
2618 IF(mdmdcy.GT.80.AND.mdmdcy.LE.90) kca=mdmdcy
2620 IF(mdcy(kca,2).LE.0.OR.mdcy(kca,3).LE.0)
THEN 2621 CALL luerrm(9,
'(LUDECY:) no decay channel defined')
2624 IF(mod(kfa/1000,10).EQ.0.AND.(kca.EQ.85.OR.kca.EQ.87)) kfs=-kfs
2625 IF(kchg(kc,3).EQ.0)
THEN 2628 IF(
rlu(0).GT.0.5) kfs=-kfs
2629 ELSEIF(kfs.GT.0)
THEN 2640 DO 120 idl=mdcy(kca,2),mdcy(kca,2)+mdcy(kca,3)-1
2641 IF(mdme(idl,1).NE.1.AND.kfsp*mdme(idl,1).NE.2.AND.
2642 &kfsn*mdme(idl,1).NE.3)
GOTO 120
2643 IF(mdme(idl,2).GT.100)
GOTO 120
2648 CALL luerrm(2,
'(LUDECY:) all decay channels closed by user')
2656 IF(mdme(idl,1).NE.1.AND.kfsp*mdme(idl,1).NE.2.AND.
2657 &kfsn*mdme(idl,1).NE.3)
THEN 2658 IF(idl.LT.mdcy(kca,2)+mdcy(kca,3)-1)
GOTO 140
2659 ELSEIF(mdme(idl,2).GT.100)
THEN 2660 IF(idl.LT.mdcy(kca,2)+mdcy(kca,3)-1)
GOTO 140
2664 IF(idl.LT.mdcy(kca,2)+mdcy(kca,3)-1.AND.rbr.GT.0.)
GOTO 140
2670 IF(ntry.GT.1000)
THEN 2671 CALL luerrm(14,
'(LUDECY:) caught in infinite loop')
2672 IF(mstu(21).GE.1)
RETURN 2678 IF(mmat.GE.11.AND.mmat.NE.46.AND.p(ip,4).GT.20.*p(ip,5)) mbst=1
2681 160
IF(mbst.EQ.0) pv(1,j)=p(ip,j)
2682 IF(mbst.EQ.1) pv(1,4)=p(ip,5)
2690 IF(mdme(idc+1,2).EQ.101) jtmax=10
2692 IF(jt.LE.5) kp=kfdp(idc,jt)
2693 IF(jt.GE.6) kp=kfdp(idc+1,jt-5)
2694 IF(kp.EQ.0)
GOTO 170
2697 IF(kchg(kcp,3).EQ.0.AND.kpa.NE.81.AND.kpa.NE.82)
THEN 2699 ELSEIF(kpa.NE.81.AND.kpa.NE.82)
THEN 2701 ELSEIF(kpa.EQ.81.AND.mod(kfa/1000,10).EQ.0)
THEN 2702 kfp=-kfs*mod(kfa/10,10)
2703 ELSEIF(kpa.EQ.81.AND.mod(kfa/100,10).GE.mod(kfa/10,10))
THEN 2704 kfp=kfs*(100*mod(kfa/10,100)+3)
2705 ELSEIF(kpa.EQ.81)
THEN 2706 kfp=kfs*(1000*mod(kfa/10,10)+100*mod(kfa/100,10)+1)
2707 ELSEIF(kp.EQ.82)
THEN 2708 CALL lukfdi(-kfs*int(1.+(2.+parj(2))*
rlu(0)),0,kfp,kdump)
2709 IF(kfp.EQ.0)
GOTO 150
2711 IF(pv(1,5).LT.parj(32)+2.*
ulmass(kfp))
GOTO 150
2712 ELSEIF(kp.EQ.-82)
THEN 2714 IF(iabs(kfp).GT.10) kfp=kfp+isign(10000,kfp)
2716 IF(kpa.EQ.81.OR.kpa.EQ.82) kcp=
lucomp(kfp)
2721 IF(mmat.GE.11.AND.mmat.LE.30.AND.kqp.NE.0)
THEN 2726 ELSEIF(mmat.GE.42.AND.mmat.LE.43.AND.np.EQ.3.AND.mod(nq,2).EQ.1)
2732 CALL lukfdi(kfp,kfi,kfldmp,k(i,2))
2733 IF(k(i,2).EQ.0)
GOTO 150
2740 IF(mmat.NE.33.AND.kqp.NE.0) nq=nq+1
2741 IF(mmat.EQ.33.AND.kqp.NE.0.AND.kqp.NE.2) nq=nq+1
2743 IF(mmat.EQ.4.AND.jt.LE.2.AND.kfp.EQ.21) k(i,1)=2
2744 IF(mmat.EQ.4.AND.jt.EQ.3) k(i,1)=1
2750 IF(mmat.EQ.45.AND.kfpa.EQ.89) p(i,5)=parj(32)
2756 180
IF(mmat.GE.11.AND.mmat.LE.30)
THEN 2758 cnde=parj(61)*log(
max((pv(1,5)-ps-psq)/parj(62),1.1))
2759 IF(mmat.EQ.12) cnde=cnde+parj(63)
2761 IF(ntry.GT.1000)
THEN 2762 CALL luerrm(14,
'(LUDECY:) caught in infinite loop')
2763 IF(mstu(21).GE.1)
RETURN 2767 & sin(paru(2)*
rlu(0))
2768 nd=0.5+0.5*np+0.25*nq+cnde+
gauss 2769 IF(nd.LT.np+nq/2.OR.nd.LT.2.OR.nd.GT.10)
GOTO 190
2770 IF(mmat.EQ.13.AND.nd.EQ.2)
GOTO 190
2771 IF(mmat.EQ.14.AND.nd.LE.3)
GOTO 190
2772 IF(mmat.EQ.15.AND.nd.LE.4)
GOTO 190
2779 200 kfl1(jt)=kflo(jt)
2780 IF(nd.EQ.np+nq/2)
GOTO 220
2781 DO 210 i=
n+np+1,
n+nd-nq/2
2782 jt=1+int((nq-1)*
rlu(0))
2783 CALL lukfdi(kfl1(jt),0,kfl2,k(i,2))
2784 IF(k(i,2).EQ.0)
GOTO 190
2789 IF(nq.EQ.4.AND.
rlu(0).LT.parj(66)) jt=4
2790 IF(jt.EQ.4.AND.isign(1,kfl1(1)*(10-iabs(kfl1(1))))*
2791 & isign(1,kfl1(jt)*(10-iabs(kfl1(jt)))).GT.0) jt=3
2794 CALL lukfdi(kfl1(1),kfl1(jt),kfldmp,k(
n+nd-nq/2+1,2))
2795 IF(k(
n+nd-nq/2+1,2).EQ.0)
GOTO 190
2796 IF(nq.EQ.4)
CALL lukfdi(kfl1(jt2),kfl1(jt3),kfldmp,k(
n+nd,2))
2797 IF(nq.EQ.4.AND.k(
n+nd,2).EQ.0)
GOTO 190
2801 DO 230 i=
n+np+1,
n+nd
2808 IF(ps+parj(64).GT.pv(1,5))
GOTO 190
2811 ELSEIF((mmat.EQ.31.OR.mmat.EQ.33.OR.mmat.EQ.44.OR.mmat.EQ.45).
2814 pqt=(p(
n+np,5)+parj(65))/pv(1,5)
2816 p(
n+np,j)=pqt*pv(1,j)
2817 240 pv(1,j)=(1.-pqt)*pv(1,j)
2818 IF(ps+parj(64).GT.pv(1,5))
GOTO 150
2823 ELSEIF(mmat.EQ.46)
THEN 2828 IF(
max(ps,psmc)+parj(32).GT.pv(1,5))
GOTO 130
2829 hr1=(p(
n+1,5)/pv(1,5))**2
2830 hr2=(p(
n+2,5)/pv(1,5))**2
2831 IF((1.-hr1-hr2)*(2.+hr1+hr2)*sqrt((1.-hr1-hr2)**2-4.*hr1*hr2).
2832 & lt.2.*
rlu(0))
GOTO 130
2837 IF(np.GE.2.AND.ps+parj(64).GT.pv(1,5))
GOTO 150
2842 IF(mmat.EQ.45.AND.mstj(25).LE.0)
THEN 2843 hlq=(parj(32)/pv(1,5))**2
2844 huq=(1.-(p(
n+2,5)+parj(64))/pv(1,5))**2
2845 hrq=(p(
n+2,5)/pv(1,5))**2
2846 250 hw=hlq+
rlu(0)*(huq-hlq)
2847 IF(hmeps(hw).LT.
rlu(0))
GOTO 250
2848 p(
n+1,5)=pv(1,5)*sqrt(hw)
2851 ELSEIF(mmat.EQ.45)
THEN 2852 hqw=(pv(1,5)/pmas(24,1))**2
2853 hlw=(parj(32)/pmas(24,1))**2
2854 huw=((pv(1,5)-p(
n+2,5)-parj(64))/pmas(24,1))**2
2855 hrq=(p(
n+2,5)/pv(1,5))**2
2856 hg=pmas(24,2)/pmas(24,1)
2857 hatl=atan((hlw-1.)/hg)
2858 hm=
min(1.,huw-0.001)
2859 hmv1=hmeps(hm/hqw)/((hm-1.)**2+hg**2)
2861 hmv2=hmeps(hm/hqw)/((hm-1.)**2+hg**2)
2863 hsav2=1./((hm-1.)**2+hg**2)
2864 IF(hmv2.GT.hmv1.AND.hm-hg.GT.hlw)
THEN 2868 hmv=
min(2.*hmv1,hmeps(hm/hqw)/hg**2)
2869 hm1=1.-sqrt(1./hmv-hg**2)
2870 IF(hm1.GT.hlw.AND.hm1.LT.hm)
THEN 2872 ELSEIF(hmv2.LE.hmv1)
THEN 2873 hm=
max(hlw,hm-
min(0.1,1.-hm))
2875 hatm=atan((hm-1.)/hg)
2877 hwt2=hmv*(
min(1.,huw)-hm)
2880 hatu=atan((huw-1.)/hg)
2886 270 hreg=
rlu(0)*(hwt1+hwt2+hwt3)
2887 IF(hreg.LE.hwt1)
THEN 2888 hw=1.+hg*tan(hatl+
rlu(0)*(hatm-hatl))
2890 ELSEIF(hreg.LE.hwt1+hwt2)
THEN 2891 hw=hm+
rlu(0)*(
min(1.,huw)-hm)
2892 hacc=hmeps(hw/hqw)/((hw-1.)**2+hg**2)/hmv
2894 hw=1.+hg*tan(
rlu(0)*hatu)
2895 hacc=hmeps(hw/hqw)/hmp1
2897 IF(hacc.LT.
rlu(0))
GOTO 270
2898 p(
n+1,5)=pmas(24,1)*sqrt(hw)
2904 IF(mmat.EQ.3.OR.mmat.EQ.46)
THEN 2906 IF(im.LT.0.OR.im.GE.ip) im=0
2907 IF(im.NE.0) kfam=iabs(k(im,2))
2908 IF(im.NE.0.AND.mmat.EQ.3)
THEN 2909 DO 280 il=
max(ip-2,im+1),
min(ip+2,
n)
2910 280
IF(k(il,3).EQ.im)
nm=
nm+1
2911 IF(
nm.NE.2.OR.kfam.LE.100.OR.mod(kfam,10).NE.1.OR.
2912 & mod(kfam/1000,10).NE.0)
nm=0
2913 ELSEIF(im.NE.0.AND.mmat.EQ.46)
THEN 2914 msgn=isign(1,k(im,2)*k(ip,2))
2915 IF(kfam.GT.100.AND.mod(kfam/1000,10).EQ.0) msgn=
2916 & msgn*(-1)**mod(kfam/100,10)
2923 290 p(
n+1,j)=p(ip,j)
2930 wtmax=1./wtcor(nd-2)
2931 pmax=pv(1,5)-ps+p(
n+nd,5)
2935 pmin=pmin+p(
n+il+1,5)
2936 300 wtmax=wtmax*pawt(pmax,pmin,p(
n+il,5))
2940 310
IF(nd.EQ.2)
THEN 2941 ELSEIF(mmat.EQ.2)
THEN 2942 pmes=4.*pmas(11,1)**2
2943 pmrho2=pmas(131,1)**2
2944 pgrho2=pmas(131,2)**2
2945 320 pmst=pmes*(p(ip,5)**2/pmes)**
rlu(0)
2946 wt=(1+0.5*pmes/pmst)*sqrt(
max(0.,1.-pmes/pmst))*
2947 & (1.-pmst/p(ip,5)**2)**3*(1.+pgrho2/pmrho2)/
2948 & ((1.-pmst/pmrho2)**2+pgrho2/pmrho2)
2949 IF(wt.LT.
rlu(0))
GOTO 320
2950 pv(2,5)=
max(2.00001*pmas(11,1),sqrt(pmst))
2957 DO 340 il2=il1-1,1,-1
2958 IF(rsav.LE.rord(il2))
GOTO 350
2959 340 rord(il2+1)=rord(il2)
2960 350 rord(il2+1)=rsav
2964 pv(il,5)=pv(il+1,5)+p(
n+il,5)+(rord(il)-rord(il+1))*(pv(1,5)-ps)
2966 IF(wt.LT.
rlu(0)*wtmax)
GOTO 330
2970 370
DO 390 il=1,nd-1
2971 pa=pawt(pv(il,5),pv(il+1,5),p(
n+il,5))
2974 ue(1)=sqrt(1.-ue(3)**2)*cos(phi)
2975 ue(2)=sqrt(1.-ue(3)**2)*sin(phi)
2978 380 pv(il+1,j)=-pa*ue(j)
2979 p(
n+il,4)=sqrt(pa**2+p(
n+il,5)**2)
2980 390 pv(il+1,4)=sqrt(pa**2+pv(il+1,5)**2)
2984 400 p(
n+nd,j)=pv(nd,j)
2987 410 be(j)=pv(il,j)/pv(il,4)
2988 ga=pv(il,4)/pv(il,5)
2990 bep=be(1)*p(i,1)+be(2)*p(i,2)+be(3)*p(i,3)
2992 420 p(i,j)=p(i,j)+ga*(ga*bep/(1.+ga)+p(i,4))*be(j)
2993 430 p(i,4)=ga*(p(i,4)+bep)
2997 wt=(p(
n+1,5)*p(
n+2,5)*p(
n+3,5))**2-(p(
n+1,5)*four(
n+2,
n+3))**2
2998 & -(p(
n+2,5)*four(
n+1,
n+3))**2-(p(
n+3,5)*four(
n+1,
n+2))**2
2999 & +2.*four(
n+1,
n+2)*four(
n+1,
n+3)*four(
n+2,
n+3)
3000 IF(
max(wt*wtcor(9)/p(ip,5)**6,0.001).LT.
rlu(0))
GOTO 310
3003 ELSEIF(mmat.EQ.2)
THEN 3004 four12=four(
n+1,
n+2)
3005 four13=four(
n+1,
n+3)
3006 four23=0.5*pmst-0.25*pmes
3007 wt=(pmst-0.5*pmes)*(four12**2+four13**2)+
3008 & pmes*(four12*four13+four12**2+four13**2)
3009 IF(wt.LT.
rlu(0)*0.25*pmst*(p(ip,5)**2-pmst)**2)
GOTO 370
3013 ELSEIF(mmat.EQ.3.AND.
nm.EQ.2)
THEN 3014 IF((p(ip,5)**2*four(im,
n+1)-four(ip,im)*four(ip,
n+1))**2.LE.
3015 &
rlu(0)*(four(ip,im)**2-(p(ip,5)*p(im,5))**2)*(four(ip,
n+1)**2-
3016 & (p(ip,5)*p(
n+1,5))**2))
GOTO 370
3019 ELSEIF(mmat.EQ.4)
THEN 3020 hx1=2.*four(ip,
n+1)/p(ip,5)**2
3021 hx2=2.*four(ip,
n+2)/p(ip,5)**2
3022 hx3=2.*four(ip,
n+3)/p(ip,5)**2
3023 wt=((1.-hx1)/(hx2*hx3))**2+((1.-hx2)/(hx1*hx3))**2+
3024 & ((1.-hx3)/(hx1*hx2))**2
3025 IF(wt.LT.2.*
rlu(0))
GOTO 310
3026 IF(k(ip+1,2).EQ.22.AND.(1.-hx1)*p(ip,5)**2.LT.4.*parj(32)**2)
3030 ELSEIF(mmat.EQ.41)
THEN 3031 hx1=2.*four(ip,
n+1)/p(ip,5)**2
3032 IF(8.*hx1*(3.-2.*hx1)/9..LT.
rlu(0))
GOTO 310
3035 ELSEIF(mmat.GE.42.AND.mmat.LE.44.AND.nd.EQ.3)
THEN 3036 IF(mbst.EQ.0) wt=four(ip,
n+1)*four(
n+2,
n+3)
3037 IF(mbst.EQ.1) wt=p(ip,5)*p(
n+1,4)*four(
n+2,
n+3)
3038 IF(wt.LT.
rlu(0)*p(ip,5)*pv(1,5)**3/wtcor(10))
GOTO 310
3039 ELSEIF(mmat.GE.42.AND.mmat.LE.44)
THEN 3043 440 p(
n+np+1,j)=p(
n+np+1,j)+p(is,j)
3044 IF(mbst.EQ.0) wt=four(ip,
n+1)*four(
n+2,
n+np+1)
3045 IF(mbst.EQ.1) wt=p(ip,5)*p(
n+1,4)*four(
n+2,
n+np+1)
3046 IF(wt.LT.
rlu(0)*p(ip,5)*pv(1,5)**3/wtcor(10))
GOTO 310
3049 ELSEIF(mmat.EQ.46.AND.msgn.NE.0)
THEN 3050 IF(msgn.GT.0) wt=four(im,
n+1)*four(
n+2,ip+1)
3051 IF(msgn.LT.0) wt=four(im,
n+2)*four(
n+1,ip+1)
3052 IF(wt.LT.
rlu(0)*p(im,5)**4/wtcor(10))
GOTO 370
3058 450 pv(1,j)=pv(1,j)/(1.-pqt)
3065 IF((mmat.EQ.31.OR.mmat.EQ.45).AND.nd.EQ.3)
THEN 3070 IF(p(
n+2,5)**2+p(
n+3,5)**2+2.*four(
n+2,
n+3).GE.
3071 & (parj(32)+pm2+pm3)**2)
GOTO 510
3074 CALL lukfdi(kftemp,k(
n+3,2),kfldmp,k(
n+2,2))
3075 IF(k(
n+2,2).EQ.0)
GOTO 150
3077 ps=p(
n+1,5)+p(
n+2,5)
3082 ELSEIF(mmat.EQ.44)
THEN 3087 IF(p(
n+3,5)**2+p(
n+4,5)**2+2.*four(
n+3,
n+4).GE.
3088 & (parj(32)+pm3+pm4)**2)
GOTO 480
3091 CALL lukfdi(kftemp,k(
n+4,2),kfldmp,k(
n+3,2))
3092 IF(k(
n+3,2).EQ.0)
GOTO 150
3095 460 p(
n+3,j)=p(
n+3,j)+p(
n+4,j)
3096 p(
n+3,4)=sqrt(p(
n+3,1)**2+p(
n+3,2)**2+p(
n+3,3)**2+p(
n+3,5)**2)
3097 ha=p(
n+1,4)**2-p(
n+2,4)**2
3098 hb=
ha-(p(
n+1,5)**2-p(
n+2,5)**2)
3099 hc=(p(
n+1,1)-p(
n+2,1))**2+(p(
n+1,2)-p(
n+2,2))**2+
3100 & (p(
n+1,3)-p(
n+2,3))**2
3101 hd=(pv(1,4)-p(
n+3,4))**2
3102 he=
ha**2-2.*hd*(p(
n+1,4)**2+p(
n+2,4)**2)+hd**2
3105 hh=(sqrt(hg**2+he*hf)-hg)/(2.*hf)
3107 pcor=
hh*(p(
n+1,j)-p(
n+2,j))
3108 p(
n+1,j)=p(
n+1,j)+pcor
3109 470 p(
n+2,j)=p(
n+2,j)-pcor
3110 p(
n+1,4)=sqrt(p(
n+1,1)**2+p(
n+1,2)**2+p(
n+1,3)**2+p(
n+1,5)**2)
3111 p(
n+2,4)=sqrt(p(
n+2,1)**2+p(
n+2,2)**2+p(
n+2,3)**2+p(
n+2,5)**2)
3116 480
IF(mmat.GE.42.AND.mmat.LE.44.AND.iabs(k(
n+1,2)).LT.10)
THEN 3117 pmr=sqrt(
max(0.,p(
n+1,5)**2+p(
n+2,5)**2+2.*four(
n+1,
n+2)))
3122 IF(pmr.GT.parj(32)+pm1+pm2)
GOTO 490
3123 kfldum=int(1.5+
rlu(0))
3124 CALL lukfdi(k(
n+1,2),-isign(kfldum,k(
n+1,2)),kfldmp,kf1)
3125 CALL lukfdi(k(
n+2,2),-isign(kfldum,k(
n+2,2)),kfldmp,kf2)
3126 IF(kf1.EQ.0.OR.kf2.EQ.0)
GOTO 150
3128 IF(mmat.EQ.42.AND.pmr.GT.parj(64)+psm)
GOTO 490
3129 IF(mmat.GE.43.AND.pmr.GT.0.2*parj(32)+psm)
GOTO 490
3130 IF(nd.EQ.4.OR.kfa.EQ.15)
GOTO 150
3133 CALL lukfdi(kftemp,k(
n+2,2),kfldmp,k(
n+1,2))
3134 IF(k(
n+1,2).EQ.0)
GOTO 150
3138 ps=p(
n+1,5)+p(
n+2,5)
3146 490
IF(mmat.EQ.42.AND.iabs(k(
n+1,2)).LT.10)
THEN 3152 pv(1,j)=p(
n+1,j)+p(
n+2,j)
3153 500 p(
n+1,j)=p(
n+3,j)
3171 520 be(j)=p(ip,j)/p(ip,4)
3174 bep=be(1)*p(i,1)+be(2)*p(i,2)+be(3)*p(i,3)
3176 530 p(i,j)=p(i,j)+ga*(ga*bep/(1.+ga)+p(i,4))*be(j)
3177 540 p(i,4)=ga*(p(i,4)+bep)
3187 IF(mstj(23).GE.1.AND.mmat.EQ.4.AND.k(nsav+1,2).EQ.21)
THEN 3191 k(nsav+1,4)=mstu(5)*(nsav+2)
3192 k(nsav+1,5)=mstu(5)*(nsav+3)
3193 k(nsav+2,4)=mstu(5)*(nsav+3)
3194 k(nsav+2,5)=mstu(5)*(nsav+1)
3195 k(nsav+3,4)=mstu(5)*(nsav+1)
3196 k(nsav+3,5)=mstu(5)*(nsav+2)
3198 ELSEIF(mstj(23).GE.1.AND.mmat.EQ.4)
THEN 3201 k(nsav+2,4)=mstu(5)*(nsav+3)
3202 k(nsav+2,5)=mstu(5)*(nsav+3)
3203 k(nsav+3,4)=mstu(5)*(nsav+2)
3204 k(nsav+3,5)=mstu(5)*(nsav+2)
3206 ELSEIF(mstj(23).GE.1.AND.(mmat.EQ.32.OR.mmat.EQ.44.OR.mmat.EQ.46).
3210 k(nsav+1,4)=mstu(5)*(nsav+2)
3211 k(nsav+1,5)=mstu(5)*(nsav+2)
3212 k(nsav+2,4)=mstu(5)*(nsav+1)
3213 k(nsav+2,5)=mstu(5)*(nsav+1)
3215 ELSEIF(mstj(23).GE.1.AND.mmat.EQ.33.AND.iabs(k(nsav+2,2)).EQ.21)
3221 kqp=kchg(kcp,2)*isign(1,k(nsav+1,2))
3224 k(nsav+1,jcon)=mstu(5)*(nsav+2)
3225 k(nsav+2,9-jcon)=mstu(5)*(nsav+1)
3226 k(nsav+2,jcon)=mstu(5)*(nsav+3)
3227 k(nsav+3,9-jcon)=mstu(5)*(nsav+2)
3229 ELSEIF(mstj(23).GE.1.AND.mmat.EQ.33)
THEN 3232 k(nsav+1,4)=mstu(5)*(nsav+3)
3233 k(nsav+1,5)=mstu(5)*(nsav+3)
3234 k(nsav+3,4)=mstu(5)*(nsav+1)
3235 k(nsav+3,5)=mstu(5)*(nsav+1)
3240 IF(k(ip,1).EQ.5) k(ip,1)=15
3241 IF(k(ip,1).LE.10) k(ip,1)=11
3250 SUBROUTINE lukfdi(KFL1,KFL2,KFL3,KF)
3253 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
3255 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
3263 IF(kf1a.EQ.0)
RETURN 3265 IF(kf1a.LE.10.AND.kf2a.LE.10.AND.kfl1*kfl2.GT.0)
RETURN 3266 IF(kf1a.GT.10.AND.kf2a.GT.10)
RETURN 3267 IF((kf1a.GT.10.OR.kf2a.GT.10).AND.kfl1*kfl2.LT.0)
RETURN 3271 IF(mstj(15).EQ.1)
THEN 3273 IF(kf1a.GE.1.AND.kf1a.LE.6) ktab1=kf1a
3274 kfl1a=mod(kf1a/1000,10)
3275 kfl1b=mod(kf1a/100,10)
3277 IF(kfl1a.GE.1.AND.kfl1a.LE.4.AND.kfl1b.GE.1.AND.kfl1b.LE.4)
3278 & ktab1=6+kfl1a*(kfl1a-2)+2*kfl1b+(kfl1s-1)/2
3279 IF(kfl1a.GE.1.AND.kfl1a.LE.4.AND.kfl1a.EQ.kfl1b) ktab1=ktab1-1
3280 IF(kf1a.GE.1.AND.kf1a.LE.6) kfl1a=kf1a
3284 IF(kf2a.GE.1.AND.kf2a.LE.6) ktab2=kf2a
3285 kfl2a=mod(kf2a/1000,10)
3286 kfl2b=mod(kf2a/100,10)
3288 IF(kfl2a.GE.1.AND.kfl2a.LE.4.AND.kfl2b.GE.1.AND.kfl2b.LE.4)
3289 & ktab2=6+kfl2a*(kfl2a-2)+2*kfl2b+(kfl2s-1)/2
3290 IF(kfl2a.GE.1.AND.kfl2a.LE.4.AND.kfl2a.EQ.kfl2b) ktab2=ktab2-1
3292 IF(ktab1.GE.0.AND.ktab2.GE.0)
GOTO 140
3299 IF(mstj(12).GE.2)
THEN 3301 par4m=1./(3.*sqrt(parj(4)))
3302 pardm=parj(7)/(parj(7)+par3m*parj(6))
3303 pars0=parj(5)*(2.+(1.+par2*par3m*parj(7))*(1.+par4m))
3304 pars1=parj(7)*pars0/(2.*par3m)+parj(5)*(parj(6)*(1.+par4m)+
3305 & par2*par3m*parj(6)*parj(7))
3306 pars2=parj(5)*2.*parj(6)*parj(7)*(par2*parj(7)+(1.+par4m)/par3m)
3315 IF(kf2a.EQ.0.AND.mstj(12).GE.1.AND.(1.+parj(1))*
rlu(0).GT.1.)
3317 IF(kf2a.GT.10) mbary=2
3318 IF(kf2a.GT.10.AND.kf2a.LE.10000) kfda=kf2a
3321 IF(kf1a.LE.10000) kfda=kf1a
3325 IF(kfda.NE.0.AND.mstj(12).GE.2)
THEN 3326 kflda=mod(kfda/1000,10)
3327 kfldb=mod(kfda/100,10)
3330 IF(
max(kflda,kfldb).EQ.3) wtdq=pars1
3331 IF(
min(kflda,kfldb).EQ.3) wtdq=pars2
3332 IF(kflds.EQ.1) wtdq=wtdq/(3.*par4m)
3333 IF((1.+wtdq)*
rlu(0).GT.1.) mbary=-1
3334 IF(mbary.EQ.-1.AND.kf2a.NE.0)
RETURN 3341 IF(kf2a.EQ.0) kfl3=isign(1+int((2.+par2)*
rlu(0)),-kfl1)
3342 kfla=
max(kf1a,kf2a+iabs(kfl3))
3343 kflb=
min(kf1a,kf2a+iabs(kfl3))
3344 IF(kfla.NE.kf1a) kfs=-kfs
3348 kfl1a=mod(kf1a/1000,10)
3349 kfl1b=mod(kf1a/100,10)
3350 110 kfl1d=kfl1a+int(
rlu(0)+0.5)*(kfl1b-kfl1a)
3351 kfl1e=kfl1a+kfl1b-kfl1d
3352 IF((kfl1d.EQ.3.AND.
rlu(0).GT.pardm).OR.(kfl1e.EQ.3.AND.
3353 &
rlu(0).LT.pardm))
THEN 3354 kfl1d=kfl1a+kfl1b-kfl1d
3355 kfl1e=kfl1a+kfl1b-kfl1e
3357 kfl3a=1+int((2.+par2*par3m*parj(7))*
rlu(0))
3358 IF((kfl1e.NE.kfl3a.AND.
rlu(0).GT.(1.+par4m)/
max(2.,1.+par4m)).
3362 IF(kfl1e.NE.kfl3a) kflds=2*int(
rlu(0)+1./(1.+par4m))+1
3363 kfl3=isign(10000+1000*
max(kfl1e,kfl3a)+100*
min(kfl1e,kfl3a)+
3365 kfla=
max(kfl1d,kfl3a)
3366 kflb=
min(kfl1d,kfl3a)
3367 IF(kfla.NE.kfl1d) kfs=-kfs
3371 IF(kfla.LE.2) kmul=int(parj(11)+
rlu(0))
3372 IF(kfla.EQ.3) kmul=int(parj(12)+
rlu(0))
3373 IF(kfla.GE.4) kmul=int(parj(13)+
rlu(0))
3374 IF(kmul.EQ.0.AND.parj(14).GT.0.)
THEN 3375 IF(
rlu(0).LT.parj(14)) kmul=2
3376 ELSEIF(kmul.EQ.1.AND.parj(15)+parj(16)+parj(17).GT.0.)
THEN 3378 IF(rmul.LT.parj(15)) kmul=3
3379 IF(kmul.EQ.1.AND.rmul.LT.parj(15)+parj(16)) kmul=4
3380 IF(kmul.EQ.1.AND.rmul.LT.parj(15)+parj(16)+parj(17)) kmul=5
3383 IF(kmul.EQ.0.OR.kmul.EQ.3) kfls=1
3384 IF(kmul.EQ.5) kfls=5
3385 IF(kfla.NE.kflb)
THEN 3386 kf=(100*kfla+10*kflb+kfls)*kfs*(-1)**kfla
3390 IF(kfla.LE.3) kf=110*(1+int(rmix+parf(imix-1))+
3391 & int(rmix+parf(imix)))+kfls
3392 IF(kfla.GE.4) kf=110*kfla+kfls
3394 IF(kmul.EQ.2.OR.kmul.EQ.3) kf=kf+isign(10000,kf)
3395 IF(kmul.EQ.4) kf=kf+isign(20000,kf)
3399 120
IF(kf1a.LE.10.AND.kf2a.EQ.0)
THEN 3401 130 kflb=1+int((2.+par2*par3)*
rlu(0))
3402 kflc=1+int((2.+par2*par3)*
rlu(0))
3404 IF(kflb.GE.kflc) kflds=3
3405 IF(kflds.EQ.1.AND.par4*
rlu(0).GT.1.)
GOTO 130
3406 IF(kflds.EQ.3.AND.par4.LT.
rlu(0))
GOTO 130
3407 kfl3=isign(1000*
max(kflb,kflc)+100*
min(kflb,kflc)+kflds,kfl1)
3410 ELSEIF(kf1a.LE.10)
THEN 3412 kflb=mod(kf2a/1000,10)
3413 kflc=mod(kf2a/100,10)
3418 IF(kf2a.EQ.0) kfl3=isign(1+int((2.+par2)*
rlu(0)),kfl1)
3419 kfla=kf2a+iabs(kfl3)
3420 kflb=mod(kf1a/1000,10)
3421 kflc=mod(kf1a/100,10)
3427 IF(kflds.EQ.3.AND.kflb.NE.kflc) kbary=5
3428 IF(kfla.NE.kflb.AND.kfla.NE.kflc) kbary=kbary+1
3429 wt=parf(60+kbary)+parj(18)*parf(70+kbary)
3430 IF(mbary.EQ.1.AND.mstj(12).GE.2)
THEN 3432 IF(
max(kflb,kflc).EQ.3) wtdq=pars1
3433 IF(
min(kflb,kflc).EQ.3) wtdq=pars2
3434 IF(kflds.EQ.1) wtdq=wtdq/(3.*par4m)
3435 IF(kflds.EQ.1) wt=wt*(1.+wtdq)/(1.+parsm/(3.*par4m))
3436 IF(kflds.EQ.3) wt=wt*(1.+wtdq)/(1.+parsm)
3438 IF(kf2a.EQ.0.AND.wt.LT.
rlu(0))
GOTO 120
3441 kfld=
max(kfla,kflb,kflc)
3442 kflf=
min(kfla,kflb,kflc)
3443 kfle=kfla+kflb+kflc-kfld-kflf
3445 IF((parf(60+kbary)+parj(18)*parf(70+kbary))*
rlu(0).GT.
3446 & parf(60+kbary)) kfls=4
3448 IF(kfls.EQ.2.AND.kfld.GT.kfle.AND.kfle.GT.kflf)
THEN 3449 IF(kflds.EQ.1.AND.kfla.EQ.kfld) kfll=1
3450 IF(kflds.EQ.1.AND.kfla.NE.kfld) kfll=int(0.25+
rlu(0))
3451 IF(kflds.EQ.3.AND.kfla.NE.kfld) kfll=int(0.75+
rlu(0))
3453 IF(kfll.EQ.0) kf=isign(1000*kfld+100*kfle+10*kflf+kfls,kfl1)
3454 IF(kfll.EQ.1) kf=isign(1000*kfld+100*kflf+10*kfle+kfls,kfl1)
3459 140
IF(ktab2.EQ.0.AND.mstj(12).LE.0)
THEN 3462 ELSEIF(ktab2.EQ.0.AND.ktab1.GE.7.AND.mstj(12).LE.1)
THEN 3465 ELSEIF(ktab2.EQ.0)
THEN 3474 DO 150 kt3=kt3l,kt3u
3475 rfl=rfl+parf(120+80*ktab1+25*kts+kt3)
3480 DO 160 kt3=kt3l,kt3u
3482 rfl=rfl-parf(120+80*ktab1+25*kts+kt3)
3483 160
IF(rfl.LE.0.)
GOTO 170
3490 kfl3=isign(kfl3a,kfl1*(2*ktab1-13))
3493 IF(ktab3.GE.8) kfl3a=2
3494 IF(ktab3.GE.11) kfl3a=3
3495 IF(ktab3.GE.16) kfl3a=4
3496 kfl3b=(ktab3-6-kfl3a*(kfl3a-2))/2
3497 kfl3=1000*kfl3a+100*kfl3b+1
3498 IF(kfl3a.EQ.kfl3b.OR.ktab3.NE.6+kfl3a*(kfl3a-2)+2*kfl3b) kfl3=
3500 kfl3=isign(kfl3,kfl1*(13-2*ktab1))
3504 IF(kfl3a.EQ.kfl1a.AND.kfl3b.EQ.kfl1b.AND.(kfl3a.LE.3.OR.
3506 rfl=
rlu(0)*(parf(143+80*ktab1+25*ktabs)+parf(144+80*ktab1+
3507 & 25*ktabs)+parf(145+80*ktab1+25*ktabs))
3509 IF(rfl.GT.parf(143+80*ktab1+25*ktabs)) kf=220+2*ktabs+1
3510 IF(rfl.GT.parf(143+80*ktab1+25*ktabs)+parf(144+80*ktab1+
3511 & 25*ktabs)) kf=330+2*ktabs+1
3512 ELSEIF(ktab1.LE.6.AND.ktab3.LE.6)
THEN 3513 kfla=
max(ktab1,ktab3)
3514 kflb=
min(ktab1,ktab3)
3516 IF(kfla.NE.kf1a) kfs=-kfs
3517 kf=(100*kfla+10*kflb+2*ktabs+1)*kfs*(-1)**kfla
3518 ELSEIF(ktab1.GE.7.AND.ktab3.GE.7)
THEN 3520 IF(kfl1a.EQ.kfl3a)
THEN 3521 kfla=
max(kfl1b,kfl3b)
3522 kflb=
min(kfl1b,kfl3b)
3523 IF(kfla.NE.kfl1b) kfs=-kfs
3524 ELSEIF(kfl1a.EQ.kfl3b)
THEN 3528 ELSEIF(kfl1b.EQ.kfl3a)
THEN 3531 ELSEIF(kfl1b.EQ.kfl3b)
THEN 3532 kfla=
max(kfl1a,kfl3a)
3533 kflb=
min(kfl1a,kfl3a)
3534 IF(kfla.NE.kfl1a) kfs=-kfs
3536 CALL luerrm(2,
'(LUKFDI:) no matching flavours for qq -> qq')
3539 kf=(100*kfla+10*kflb+2*ktabs+1)*kfs*(-1)**kfla
3552 kfld=
max(kfla,kflb,kflc)
3553 kflf=
min(kfla,kflb,kflc)
3554 kfle=kfla+kflb+kflc-kfld-kflf
3555 IF(ktabs.EQ.0) kf=isign(1000*kfld+100*kflf+10*kfle+2,kfl1)
3556 IF(ktabs.GE.1) kf=isign(1000*kfld+100*kfle+10*kflf+2*ktabs,kfl1)
3560 IF(kfl2.NE.0) kfl3=0
3563 CALL luerrm(2,
'(LUKFDI:) user-defined flavour probabilities '//
3573 SUBROUTINE luptdi(KFL,PX,PY)
3576 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
3581 pt=parj(21)*sqrt(-log(
max(1
e-10,
rlu(0))))
3582 IF(mstj(91).EQ.1)
pt=parj(22)*
pt 3583 IF(kfla.EQ.0.AND.mstj(13).LE.0)
pt=0.
3593 SUBROUTINE luzdis(KFL1,KFL2,PR,Z)
3596 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
3603 IF(kfla.GE.10) kflh=mod(kfla/1000,10)
3606 IF(mstj(11).EQ.1.OR.(mstj(11).EQ.3.AND.kflh.LE.3))
THEN 3608 IF(mstj(91).EQ.1)
fa=parj(43)
3609 IF(kflb.GE.10)
fa=
fa+parj(45)
3611 IF(mstj(91).EQ.1)
fb=parj(44)*pr
3613 IF(kfla.GE.10) fc=fc-parj(45)
3614 IF(kflb.GE.10) fc=fc+parj(45)
3616 IF(abs(fc-1.).GT.0.01) mc=2
3622 IF(fc.GT.
fb) zmax=
fb/fc
3623 ELSEIF(abs(fc-
fa).LT.0.01)
THEN 3628 zmax=0.5*(
fb+fc-sqrt((
fb-fc)**2+4.*
fa*
fb))/(fc-
fa)
3629 IF(zmax.GT.0.99.AND.
fb.GT.100.) zmax=1.-
fa/
fb 3634 IF(zmax.LT.0.1)
THEN 3641 fint=1.+(1.-1./zdivc)/(fc-1.)
3643 ELSEIF(zmax.GT.0.85.AND.
fb.GT.1.)
THEN 3645 fscb=sqrt(4.+(fc/
fb)**2)
3646 zdiv=fscb-1./zmax-(fc/
fb)*log(zmax*0.5*(fscb+fc/
fb))
3647 IF(ma.GE.2) zdiv=zdiv+(
fa/
fb)*log(1.-zmax)
3648 zdiv=
min(zmax,
max(0.,zdiv))
3649 fint=1.+
fb*(1.-zdiv)
3656 IF(fint*
rlu(0).LE.1.)
THEN 3658 ELSEIF(mc.EQ.1)
THEN 3662 z=1./(zdivc+
z*(1.-zdivc))**(1./(1.-fc))
3665 ELSEIF(mmax.EQ.3)
THEN 3666 IF(fint*
rlu(0).LE.1.)
THEN 3668 fpre=exp(
fb*(
z-zdiv))
3675 IF(
z.LE.
fb/(50.+
fb).OR.
z.GE.1.)
GOTO 100
3676 fval=(zmax/
z)**fc*exp(
fb*(1./zmax-1./
z))
3677 IF(ma.GE.2) fval=((1.-
z)/(1.-zmax))**
fa*fval
3678 IF(fval.LT.
rlu(0)*fpre)
GOTO 100
3682 fc=parj(50+
max(1,kflh))
3683 IF(mstj(91).EQ.1) fc=parj(59)
3685 IF(fc.GE.0..AND.fc.LE.1.)
THEN 3686 IF(fc.GT.
rlu(0))
z=1.-
z**(1./3.)
3687 ELSEIF(fc.GT.-1.)
THEN 3688 IF(-4.*fc*
z*(1.-
z)**2.LT.
rlu(0)*((1.-
z)**2-fc*
z)**2)
GOTO 110
3690 IF(fc.GT.0.)
z=1.-
z**(1./fc)
3691 IF(fc.LT.0.)
z=
z**(-1./fc)
3700 SUBROUTINE lushow(IP1,IP2,QMAX)
3703 IMPLICIT DOUBLE PRECISION(
d)
3704 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
3706 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
3708 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
3710 dimension pmth(5,40),ps(5),pma(4),pmsd(4),iep(4),ipa(4),
3711 &kfla(4),kfld(4),kfl(4),itry(4),isi(4),isl(4),dp(4),dpt(5,4)
3714 IF(mstj(41).LE.0.OR.(mstj(41).EQ.1.AND.qmax.LE.parj(82)).OR.
3715 &qmax.LE.
min(parj(82),parj(83)).OR.mstj(41).GE.3)
RETURN 3717 pmth(2,21)=sqrt(pmth(1,21)**2+0.25*parj(82)**2)
3718 pmth(3,21)=2.*pmth(2,21)
3719 pmth(4,21)=pmth(3,21)
3720 pmth(5,21)=pmth(3,21)
3722 pmth(2,22)=sqrt(pmth(1,22)**2+0.25*parj(83)**2)
3723 pmth(3,22)=2.*pmth(2,22)
3724 pmth(4,22)=pmth(3,22)
3725 pmth(5,22)=pmth(3,22)
3727 IF(mstj(41).EQ.2) pmqth1=
min(parj(82),parj(83))
3729 IF(mstj(41).EQ.2) pmqth2=
min(pmth(2,21),pmth(2,22))
3732 pmth(2,
if)=sqrt(pmth(1,
if)**2+0.25*pmqth1**2)
3733 pmth(3,
if)=pmth(2,
if)+pmqth2
3734 pmth(4,
if)=sqrt(pmth(1,
if)**2+0.25*parj(82)**2)+pmth(2,21)
3735 100 pmth(5,
if)=sqrt(pmth(1,
if)**2+0.25*parj(83)**2)+pmth(2,22)
3736 pt2min=
max(0.5*parj(82),1.1*parj(81))**2
3738 alfm=log(pt2min/alams)
3742 IF(ip1.GT.0.AND.ip1.LE.
min(
n,mstu(4)-mstu(32)).AND.ip2.EQ.0)
THEN 3745 ELSEIF(
min(ip1,ip2).GT.0.AND.
max(ip1,ip2).LE.
min(
n,mstu(4)-
3750 ELSEIF(ip1.GT.0.AND.ip1.LE.
min(
n,mstu(4)-mstu(32)).AND.ip2.LT.0.
3751 &and.ip2.GE.-3)
THEN 3757 &
'(LUSHOW:) failed to reconstruct showering system')
3758 IF(mstu(21).GE.1)
RETURN 3767 kfla(i)=iabs(k(ipa(i),2))
3769 IF(kfla(i).NE.0.AND.(kfla(i).LE.8.OR.kfla(i).EQ.21))
3770 &pma(i)=pmth(3,kfla(i))
3772 IF(kfla(i).EQ.0.OR.(kfla(i).GT.8.AND.kfla(i).NE.21).OR.
3773 &pma(i).GT.qmax) irej=irej+1
3775 130 ps(j)=ps(j)+p(ipa(i),j)
3776 IF(irej.EQ.npa)
RETURN 3777 ps(5)=sqrt(
max(0.,ps(4)**2-ps(1)**2-ps(2)**2-ps(3)**2))
3778 IF(npa.EQ.1) ps(5)=ps(4)
3779 IF(ps(5).LE.pm+pmqth1)
RETURN 3780 IF(npa.EQ.2.AND.mstj(47).GE.1)
THEN 3781 IF(kfla(1).GE.1.AND.kfla(1).LE.8.AND.kfla(2).GE.1.AND.
3782 & kfla(2).LE.8) m3jc=1
3783 IF(mstj(47).GE.2) m3jc=1
3788 IF(
n.GT.mstu(4)-mstu(32)-5)
THEN 3789 CALL luerrm(11,
'(LUSHOW:) no more memory left in LUJETS')
3790 IF(mstu(21).GE.1)
RETURN 3810 IF(npa.EQ.1) im=
ns-1
3813 IF(im.GT.
n)
GOTO 380
3815 IF(kflm.EQ.0.OR.(kflm.GT.8.AND.kflm.NE.21))
GOTO 140
3816 IF(p(im,5).LT.pmth(2,kflm))
GOTO 140
3821 IF(
n+nep.GT.mstu(4)-mstu(32)-5)
THEN 3822 CALL luerrm(11,
'(LUSHOW:) no more memory left in LUJETS')
3823 IF(mstu(21).GE.1)
RETURN 3830 IF(k(im-1,3).EQ.igm) iau=im-1
3831 IF(
n.GE.im+1.AND.k(im+1,3).EQ.igm) iau=im+1
3842 160 k(
n+i,2)=k(ipa(i),2)
3843 ELSEIF(kflm.NE.21)
THEN 3846 ELSEIF(k(im,5).EQ.21)
THEN 3859 kfld(ip)=iabs(k(
n+ip,2))
3863 170
IF(kfld(ip).GT.0.AND.(kfld(ip).LE.8.OR.kfld(ip).EQ.21)) isi(ip)=1
3869 IF(npa.GE.3) p(
n+i,4)=(ps(4)*p(ipa(i),4)-ps(1)*p(ipa(i),1)-
3870 & ps(2)*p(ipa(i),2)-ps(3)*p(ipa(i),3))/ps(5)
3871 p(
n+i,5)=
min(qmax,ps(5))
3872 IF(npa.GE.3) p(
n+i,5)=
min(p(
n+i,5),p(
n+i,4))
3873 180
IF(isi(i).EQ.0) p(
n+i,5)=p(ipa(i),5)
3875 IF(mstj(43).LE.2) pem=v(im,2)
3876 IF(mstj(43).GE.3) pem=p(im,4)
3877 p(
n+1,5)=
min(p(im,5),v(im,1)*pem)
3878 p(
n+2,5)=
min(p(im,5),(1.-v(im,1))*pem)
3879 IF(k(
n+2,2).EQ.22) p(
n+2,5)=pmth(1,22)
3883 IF(isi(i).EQ.1)
THEN 3884 IF(p(
n+i,5).LE.pmth(3,kfld(i))) p(
n+i,5)=pmth(1,kfld(i))
3886 190 v(
n+i,5)=p(
n+i,5)**2
3892 210
IF(inum.EQ.0.AND.isl(i).EQ.1) inum=i
3894 IF(inum.EQ.0.AND.itry(i).EQ.0.AND.isi(i).EQ.1)
THEN 3895 IF(p(
n+i,5).GE.pmth(2,kfld(i))) inum=i
3901 IF(isi(i).EQ.1.AND.pmsd(i).GE.pmqth2)
THEN 3902 rpm=p(
n+i,5)/pmsd(i)
3903 IF(rpm.GT.rmax.AND.p(
n+i,5).GE.pmth(2,kfld(i)))
THEN 3916 240
IF(iep(i).GT.
n+nep) iep(i)=
n+1
3918 250 kfl(i)=iabs(k(iep(i),2))
3919 itry(inum)=itry(inum)+1
3920 IF(itry(inum).GT.200)
THEN 3921 CALL luerrm(14,
'(LUSHOW:) caught in infinite loop')
3922 IF(mstu(21).GE.1)
RETURN 3925 IF(kfl(1).EQ.0.OR.(kfl(1).GT.8.AND.kfl(1).NE.21))
GOTO 300
3926 IF(p(iep(1),5).LT.pmth(2,kfl(1)))
GOTO 300
3931 ELSEIF(igm.EQ.0.OR.mstj(43).LE.2)
THEN 3934 IF(inum.EQ.1) pmed=v(im,1)*pem
3935 IF(inum.EQ.2) pmed=(1.-v(im,1))*pem
3937 IF(mod(mstj(43),2).EQ.1)
THEN 3941 zc=0.5*(1.-sqrt(
max(0.,1.-(2.*pmth(2,21)/pmed)**2)))
3942 IF(zc.LT.1
e-4) zc=(pmth(2,21)/pmed)**2
3943 zce=0.5*(1.-sqrt(
max(0.,1.-(2.*pmth(2,22)/pmed)**2)))
3944 IF(zce.LT.1
e-4) zce=(pmth(2,22)/pmed)**2
3948 IF((mstj(41).EQ.1.AND.zc.GT.0.49).OR.(mstj(41).EQ.2.AND.
3949 &
min(zc,zce).GT.0.49))
THEN 3950 p(iep(1),5)=pmth(1,kfl(1))
3951 v(iep(1),5)=p(iep(1),5)**2
3956 IF(mstj(49).EQ.0.AND.kfl(1).EQ.21)
THEN 3957 fbr=6.*log((1.-zc)/zc)+mstj(45)*(0.5-zc)
3958 ELSEIF(mstj(49).EQ.0)
THEN 3959 fbr=(8./3.)*log((1.-zc)/zc)
3962 ELSEIF(mstj(49).EQ.1.AND.kfl(1).EQ.21)
THEN 3963 fbr=(parj(87)+mstj(45)*parj(88))*(1.-2.*zc)
3964 ELSEIF(mstj(49).EQ.1)
THEN 3966 IF(igm.EQ.0.AND.m3jc.EQ.1) fbr=4.*fbr
3969 ELSEIF(kfl(1).EQ.21)
THEN 3970 fbr=6.*mstj(45)*(0.5-zc)
3972 fbr=2.*log((1.-zc)/zc)
3976 IF(mstj(41).EQ.2.AND.kfl(1).GE.1.AND.kfl(1).LE.8)
3977 &fbre=(kchg(kfl(1),1)/3.)**2*2.*log((1.-zce)/zce)
3985 IF(kfl(i).GT.0.AND.(kfl(i).LE.8.OR.kfl(i).EQ.21)) pm=
3988 pms=
min(pms,(p(im,5)-pm2)**2)
3993 DO 280
if=4,mstj(45)
3994 280
IF(pms.GT.4.*pmth(2,
if)**2)
b0=(33.-2.*
if)/6.
3995 IF(mstj(44).LE.0)
THEN 3996 pmsqcd=pms*exp(
max(-100.,log(
rlu(0))*paru(2)/(paru(111)*fbr)))
3997 ELSEIF(mstj(44).EQ.1)
THEN 3998 pmsqcd=4.*alams*(0.25*pms/alams)**(
rlu(0)**(
b0/fbr))
4000 pmsqcd=pms*
rlu(0)**(alfm*
b0/fbr)
4002 IF(zc.GT.0.49.OR.pmsqcd.LE.pmth(4,kfl(1))**2) pmsqcd=
4008 IF(mstj(41).EQ.2.AND.kfl(1).GE.1.AND.kfl(1).LE.8)
THEN 4009 pmsqed=pms*exp(
max(-100.,log(
rlu(0))*paru(2)/(paru(101)*fbre)))
4010 IF(zce.GT.0.49.OR.pmsqed.LE.pmth(5,kfl(1))**2) pmsqed=
4012 IF(pmsqed.GT.pmsqcd)
THEN 4019 p(iep(1),5)=sqrt(v(iep(1),5))
4020 IF(p(iep(1),5).LE.pmth(3,kfl(1)))
THEN 4021 p(iep(1),5)=pmth(1,kfl(1))
4022 v(iep(1),5)=p(iep(1),5)**2
4028 z=1.-(1.-zce)*(zce/(1.-zce))**
rlu(0)
4029 IF(1.+
z**2.LT.2.*
rlu(0))
GOTO 260
4033 ELSEIF(mstj(49).NE.1.AND.kfl(1).NE.21)
THEN 4034 z=1.-(1.-zc)*(zc/(1.-zc))**
rlu(0)
4035 IF(1.+
z**2.LT.2.*
rlu(0))
GOTO 260
4037 ELSEIF(mstj(49).EQ.0.AND.mstj(45)*(0.5-zc).LT.
rlu(0)*fbr)
THEN 4038 z=(1.-zc)*(zc/(1.-zc))**
rlu(0)
4039 IF(
rlu(0).GT.0.5)
z=1.-
z 4040 IF((1.-
z*(1.-
z))**2.LT.
rlu(0))
GOTO 260
4042 ELSEIF(mstj(49).NE.1)
THEN 4043 z=zc+(1.-2.*zc)*
rlu(0)
4044 IF(
z**2+(1.-
z)**2.LT.
rlu(0))
GOTO 260
4045 kflb=1+int(mstj(45)*
rlu(0))
4046 pmq=4.*pmth(2,kflb)**2/v(iep(1),5)
4047 IF(pmq.GE.1.)
GOTO 260
4048 pmq0=4.*pmth(2,21)**2/v(iep(1),5)
4049 IF(mod(mstj(43),2).EQ.0.AND.(1.+0.5*pmq)*sqrt(1.-pmq).LT.
4050 &
rlu(0)*(1.+0.5*pmq0)*sqrt(1.-pmq0))
GOTO 260
4054 ELSEIF(kfl(1).NE.21)
THEN 4055 z=1.-sqrt(zc**2+
rlu(0)*(1.-2.*zc))
4057 ELSEIF(
rlu(0)*(parj(87)+mstj(45)*parj(88)).LE.parj(87))
THEN 4058 z=zc+(1.-2.*zc)*
rlu(0)
4061 z=zc+(1.-2.*zc)*
rlu(0)
4062 kflb=1+int(mstj(45)*
rlu(0))
4063 pmq=4.*pmth(2,kflb)**2/v(iep(1),5)
4064 IF(pmq.GE.1.)
GOTO 260
4067 IF(mce.EQ.1.AND.mstj(44).GE.2)
THEN 4068 IF(
z*(1.-
z)*v(iep(1),5).LT.pt2min)
GOTO 260
4069 IF(alfm/log(v(iep(1),5)*
z*(1.-
z)/alams).LT.
rlu(0))
GOTO 260
4073 IF(kfl(1).EQ.21)
THEN 4074 kflgd1=iabs(k(iep(1),5))
4078 kflgd2=iabs(k(iep(1),5))
4082 ELSEIF(nep.GE.3)
THEN 4084 ELSEIF(igm.EQ.0.OR.mstj(43).LE.2)
THEN 4085 ped=0.5*(v(im,5)+v(iep(1),5)-pm2**2)/p(im,5)
4087 IF(iep(1).EQ.
n+1) ped=v(im,1)*pem
4088 IF(iep(1).EQ.
n+2) ped=(1.-v(im,1))*pem
4090 IF(mod(mstj(43),2).EQ.1)
THEN 4092 IF(kflgd2.EQ.22) pmqth3=0.5*parj(83)
4093 pmq1=(pmth(1,kflgd1)**2+pmqth3**2)/v(iep(1),5)
4094 pmq2=(pmth(1,kflgd2)**2+pmqth3**2)/v(iep(1),5)
4095 zd=sqrt(
max(0.,(1.-v(iep(1),5)/ped**2)*((1.-pmq1-pmq2)**2-
4099 zd=sqrt(
max(0.,1.-v(iep(1),5)/ped**2))
4104 IF(
z.LT.zl.OR.
z.GT.zu)
GOTO 260
4105 IF(kfl(1).EQ.21) v(iep(1),3)=log(zu*(1.-zl)/
max(1
e-20,zl*
4107 IF(kfl(1).NE.21) v(iep(1),3)=log((1.-zl)/
max(1
e-10,1.-zu))
4110 IF(igm.EQ.0.AND.m3jc.EQ.1)
THEN 4111 x1=
z*(1.+v(iep(1),5)/v(
ns+1,5))
4112 x2=1.-v(iep(1),5)/v(
ns+1,5)
4116 ki2=k(ipa(3-inum),2)
4117 qf1=kchg(iabs(ki1),1)*isign(1,ki1)/3.
4118 qf2=kchg(iabs(ki2),1)*isign(1,ki2)/3.
4119 wshow=qf1**2*(1.-
x1)/x3*(1.+(
x1/(2.-
x2))**2)+
4120 & qf2**2*(1.-
x2)/x3*(1.+(
x2/(2.-
x1))**2)
4121 wme=(qf1*(1.-
x1)/x3-qf2*(1.-
x2)/x3)**2*(
x1**2+
x2**2)
4122 ELSEIF(mstj(49).NE.1)
THEN 4123 wshow=1.+(1.-
x1)/x3*(
x1/(2.-
x2))**2+
4124 & (1.-
x2)/x3*(
x2/(2.-
x1))**2
4127 wshow=4.*x3*((1.-
x1)/(2.-
x2)**2+(1.-
x2)/(2.-
x1)**2)
4130 IF(wme.LT.
rlu(0)*wshow)
GOTO 260
4133 ELSEIF(mce.EQ.1.AND.igm.GT.0.AND.mstj(42).GE.2)
THEN 4136 IF(iep(1).EQ.
n+2) zm=1.-v(im,1)
4137 the2id=
z*(1.-
z)*(zm*p(im,4))**2/v(iep(1),5)
4139 290
IF(k(iaom,5).EQ.22)
THEN 4141 IF(k(iaom,3).LE.
ns) maom=0
4142 IF(maom.EQ.1)
GOTO 290
4145 the2im=v(iaom,1)*(1.-v(iaom,1))*p(iaom,4)**2/v(iaom,5)
4146 IF(the2id.LT.the2im)
GOTO 260
4151 IF(mstj(48).EQ.1)
THEN 4152 IF(nep.EQ.1.AND.im.EQ.
ns)
THEN 4153 the2id=
z*(1.-
z)*ps(4)**2/v(iep(1),5)
4154 IF(the2id.LT.1./parj(85)**2)
GOTO 260
4155 ELSEIF(nep.EQ.2.AND.iep(1).EQ.
ns+2)
THEN 4156 the2id=
z*(1.-
z)*(0.5*p(im,4))**2/v(iep(1),5)
4157 IF(the2id.LT.1./parj(85)**2)
GOTO 260
4158 ELSEIF(nep.EQ.2.AND.iep(1).EQ.
ns+3)
THEN 4159 the2id=
z*(1.-
z)*(0.5*p(im,4))**2/v(iep(1),5)
4160 IF(the2id.LT.1./parj(86)**2)
GOTO 260
4168 IF(nep.EQ.1)
GOTO 330
4169 IF(nep.EQ.2.AND.p(iep(1),5)+p(iep(2),5).GE.p(im,5))
GOTO 200
4171 IF(itry(i).EQ.0.AND.kfld(i).GT.0.AND.(kfld(i).LE.8.OR.kfld(i).EQ.
4173 IF(p(
n+i,5).GE.pmth(2,kfld(i)))
GOTO 200
4179 pa1s=(p(
n+1,4)+p(
n+1,5))*(p(
n+1,4)-p(
n+1,5))
4180 pa2s=(p(
n+2,4)+p(
n+2,5))*(p(
n+2,4)-p(
n+2,5))
4181 pa3s=(p(
n+3,4)+p(
n+3,5))*(p(
n+3,4)-p(
n+3,5))
4182 pts=0.25*(2.*pa1s*pa2s+2.*pa1s*pa3s+2.*pa2s*pa3s-
4183 & pa1s**2-pa2s**2-pa3s**2)/pa1s
4184 IF(pts.LE.0.)
GOTO 200
4185 ELSEIF(igm.EQ.0.OR.mstj(43).LE.2.OR.mod(mstj(43),2).EQ.0)
THEN 4188 IF(kflda.EQ.0.OR.(kflda.GT.8.AND.kflda.NE.21))
GOTO 320
4189 IF(p(i1,5).LT.pmth(2,kflda))
GOTO 320
4190 IF(kflda.EQ.21)
THEN 4191 kflgd1=iabs(k(i1,5))
4195 kflgd2=iabs(k(i1,5))
4198 IF(igm.EQ.0.OR.mstj(43).LE.2)
THEN 4199 ped=0.5*(v(im,5)+v(i1,5)-v(i2,5))/p(im,5)
4201 IF(i1.EQ.
n+1) zm=v(im,1)
4202 IF(i1.EQ.
n+2) zm=1.-v(im,1)
4203 pml=sqrt((v(im,5)-v(
n+1,5)-v(
n+2,5))**2-
4204 & 4.*v(
n+1,5)*v(
n+2,5))
4205 ped=pem*(0.5*(v(im,5)-pml+v(i1,5)-v(i2,5))+pml*zm)/v(im,5)
4207 IF(mod(mstj(43),2).EQ.1)
THEN 4209 IF(kflgd2.EQ.22) pmqth3=0.5*parj(83)
4210 pmq1=(pmth(1,kflgd1)**2+pmqth3**2)/v(i1,5)
4211 pmq2=(pmth(1,kflgd2)**2+pmqth3**2)/v(i1,5)
4212 zd=sqrt(
max(0.,(1.-v(i1,5)/ped**2)*((1.-pmq1-pmq2)**2-
4216 zd=sqrt(
max(0.,1.-v(i1,5)/ped**2))
4221 IF(i1.EQ.
n+1.AND.(v(i1,1).LT.zl.OR.v(i1,1).GT.zu)) isl(1)=1
4222 IF(i1.EQ.
n+2.AND.(v(i1,1).LT.zl.OR.v(i1,1).GT.zu)) isl(2)=1
4223 IF(kflda.EQ.21) v(i1,4)=log(zu*(1.-zl)/
max(1
e-20,zl*(1.-zu)))
4224 IF(kflda.NE.21) v(i1,4)=log((1.-zl)/
max(1
e-10,1.-zu))
4226 IF(isl(1).EQ.1.AND.isl(2).EQ.1.AND.islm.NE.0)
THEN 4229 ELSEIF(isl(1).EQ.1.AND.isl(2).EQ.1)
THEN 4230 zdr1=
max(0.,v(
n+1,3)/v(
n+1,4)-1.)
4231 zdr2=
max(0.,v(
n+2,3)/v(
n+2,4)-1.)
4232 IF(zdr2.GT.
rlu(0)*(zdr1+zdr2)) isl(1)=0
4233 IF(isl(1).EQ.1) isl(2)=0
4234 IF(isl(1).EQ.0) islm=1
4235 IF(isl(2).EQ.0) islm=2
4237 IF(isl(1).EQ.1.OR.isl(2).EQ.1)
GOTO 200
4239 IF(igm.GT.0.AND.mod(mstj(43),2).EQ.1.AND.(p(
n+1,5).GE.
4240 &pmth(2,kfld(1)).OR.p(
n+2,5).GE.pmth(2,kfld(2))))
THEN 4241 pmq1=v(
n+1,5)/v(im,5)
4242 pmq2=v(
n+2,5)/v(im,5)
4243 zd=sqrt(
max(0.,(1.-v(im,5)/pem**2)*((1.-pmq1-pmq2)**2-
4248 IF(v(im,1).LT.zl.OR.v(im,1).GT.zu)
GOTO 200
4257 p(
n+1,3)=sqrt(
max(0.,(p(ipa(1),4)+p(
n+1,5))*(p(ipa(1),4)-
4259 p(
n+1,4)=p(ipa(1),4)
4261 ELSEIF(igm.EQ.0.AND.nep.EQ.2)
THEN 4262 ped1=0.5*(v(im,5)+v(
n+1,5)-v(
n+2,5))/p(im,5)
4265 p(
n+1,3)=sqrt(
max(0.,(ped1+p(
n+1,5))*(ped1-p(
n+1,5))))
4270 p(
n+2,4)=p(im,5)-ped1
4273 ELSEIF(nep.EQ.3)
THEN 4276 p(
n+1,3)=sqrt(
max(0.,pa1s))
4279 p(
n+2,3)=0.5*(pa3s-pa2s-pa1s)/p(
n+1,3)
4282 p(
n+3,3)=-(p(
n+1,3)+p(
n+2,3))
4290 pzm=sqrt(
max(0.,(pem+p(im,5))*(pem-p(im,5))))
4291 pmls=(v(im,5)-v(
n+1,5)-v(
n+2,5))**2-4.*v(
n+1,5)*v(
n+2,5)
4294 ELSEIF(mod(mstj(43),2).EQ.1)
THEN 4295 pts=(pem**2*(zm*(1.-zm)*v(im,5)-(1.-zm)*v(
n+1,5)-
4296 & zm*v(
n+2,5))-0.25*pmls)/pzm**2
4298 pts=pmls*(zm*(1.-zm)*pem**2/v(im,5)-0.25)/pzm**2
4300 pt=sqrt(
max(0.,pts))
4304 IF(mstj(49).NE.1.AND.mod(mstj(46),2).EQ.1.AND.k(im,2).EQ.21.
4305 & and.iau.NE.0)
THEN 4306 IF(k(igm,3).NE.0) mazip=1
4308 IF(iau.EQ.im+1) zau=1.-v(igm,1)
4309 IF(mazip.EQ.0) zau=0.
4310 IF(k(igm,2).NE.21)
THEN 4311 hazip=2.*zau/(1.+zau**2)
4313 hazip=(zau/(1.-zau*(1.-zau)))**2
4315 IF(k(
n+1,2).NE.21)
THEN 4316 hazip=hazip*(-2.*zm*(1.-zm))/(1.-2.*zm*(1.-zm))
4318 hazip=hazip*(zm*(1.-zm)/(1.-zm*(1.-zm)))**2
4325 IF(mstj(46).GE.2.AND.(k(
n+1,2).EQ.21.OR.k(
n+2,2).EQ.21).
4326 & and.iau.NE.0)
THEN 4327 IF(k(igm,3).NE.0) mazic=
n+1
4328 IF(k(igm,3).NE.0.AND.k(
n+1,2).NE.21) mazic=
n+2
4329 IF(k(igm,3).NE.0.AND.k(
n+1,2).EQ.21.AND.k(
n+2,2).EQ.21.AND.
4330 & zm.GT.0.5) mazic=
n+2
4331 IF(k(iau,2).EQ.22) mazic=0
4333 IF(mazic.EQ.
n+2) zs=1.-zm
4335 IF(iau.EQ.im-1) zgm=1.-v(igm,1)
4336 IF(mazic.EQ.0) zgm=1.
4337 hazic=(p(im,5)/p(igm,5))*sqrt((1.-zs)*(1.-zgm)/(zs*zgm))
4338 hazic=
min(0.95,hazic)
4343 340
IF(nep.EQ.2.AND.igm.GT.0)
THEN 4344 IF(mod(mstj(43),2).EQ.1)
THEN 4345 p(
n+1,4)=pem*v(im,1)
4347 p(
n+1,4)=pem*(0.5*(v(im,5)-sqrt(pmls)+v(
n+1,5)-v(
n+2,5))+
4348 & sqrt(pmls)*zm)/v(im,5)
4351 p(
n+1,1)=
pt*cos(phi)
4352 p(
n+1,2)=
pt*sin(phi)
4354 p(
n+1,3)=0.5*(v(
n+2,5)-v(
n+1,5)-v(im,5)+2.*pem*p(
n+1,4))/pzm
4360 p(
n+2,3)=pzm-p(
n+1,3)
4361 p(
n+2,4)=pem-p(
n+1,4)
4362 IF(mstj(43).LE.2)
THEN 4363 v(
n+1,2)=(pem*p(
n+1,4)-pzm*p(
n+1,3))/p(im,5)
4364 v(
n+2,2)=(pem*p(
n+2,4)-pzm*p(
n+2,3))/p(im,5)
4370 IF(mstj(43).LE.2)
THEN 4371 bex=p(igm,1)/p(igm,4)
4372 bey=p(igm,2)/p(igm,4)
4373 bez=p(igm,3)/p(igm,4)
4374 ga=p(igm,4)/p(igm,5)
4375 gabep=ga*(ga*(bex*p(im,1)+bey*p(im,2)+bez*p(im,3))/(1.+ga)-
4384 the=
ulangl(p(im,3)+gabep*bez,sqrt((p(im,1)+gabep*bex)**2+
4385 & (p(im,2)+gabep*bey)**2))
4386 phi=
ulangl(p(im,1)+gabep*bex,p(im,2)+gabep*bey)
4388 dp(1)=cos(the)*cos(phi)*p(i,1)-sin(phi)*p(i,2)+
4389 & sin(the)*cos(phi)*p(i,3)
4390 dp(2)=cos(the)*sin(phi)*p(i,1)+cos(phi)*p(i,2)+
4391 & sin(the)*sin(phi)*p(i,3)
4392 dp(3)=-sin(the)*p(i,1)+cos(the)*p(i,3)
4394 dbp=bex*dp(1)+bey*dp(2)+bez*dp(3)
4395 dgabp=ga*(ga*dbp/(1d0+ga)+dp(4))
4396 p(i,1)=dp(1)+dgabp*bex
4397 p(i,2)=dp(2)+dgabp*bey
4398 p(i,3)=dp(3)+dgabp*bez
4399 350 p(i,4)=ga*(dp(4)+dbp)
4403 IF(mazip.NE.0.OR.mazic.NE.0)
THEN 4407 360 dpt(3,j)=p(
n+1,j)
4408 dpma=dpt(1,1)*dpt(2,1)+dpt(1,2)*dpt(2,2)+dpt(1,3)*dpt(2,3)
4409 dpmd=dpt(1,1)*dpt(3,1)+dpt(1,2)*dpt(3,2)+dpt(1,3)*dpt(3,3)
4410 dpmm=dpt(1,1)**2+dpt(1,2)**2+dpt(1,3)**2
4412 dpt(4,j)=dpt(2,j)-dpma*dpt(1,j)/dpmm
4413 370 dpt(5,j)=dpt(3,j)-dpmd*dpt(1,j)/dpmm
4414 dpt(4,4)=sqrt(dpt(4,1)**2+dpt(4,2)**2+dpt(4,3)**2)
4415 dpt(5,4)=sqrt(dpt(5,1)**2+dpt(5,2)**2+dpt(5,3)**2)
4416 IF(
min(dpt(4,4),dpt(5,4)).GT.0.1*parj(82))
THEN 4417 cad=(dpt(4,1)*dpt(5,1)+dpt(4,2)*dpt(5,2)+
4418 & dpt(4,3)*dpt(5,3))/(dpt(4,4)*dpt(5,4))
4420 IF(1.+hazip*(2.*cad**2-1.).LT.
rlu(0)*(1.+abs(hazip)))
4424 IF(mazic.EQ.
n+2) cad=-cad
4425 IF((1.-hazic)*(1.-hazic*cad)/(1.+hazic**2-2.*hazic*cad).
4426 & lt.
rlu(0))
GOTO 340
4432 IF(igm.GE.0) k(im,1)=14
4435 IF(
n.GT.mstu(4)-mstu(32)-5)
THEN 4436 CALL luerrm(11,
'(LUSHOW:) no more memory left in LUJETS')
4437 IF(mstu(21).GE.1)
n=
ns 4438 IF(mstu(21).GE.1)
RETURN 4443 380
IF(npa.GE.2)
THEN 4447 IF(ip2.GT.0.AND.ip2.LT.ip1) k(
ns+1,3)=ip2
4457 IF(k(i,1).LE.10.AND.k(i,2).EQ.22)
THEN 4459 ELSEIF(k(i,1).LE.10)
THEN 4460 k(i,4)=mstu(5)*(k(i,4)/mstu(5))
4461 k(i,5)=mstu(5)*(k(i,5)/mstu(5))
4462 ELSEIF(k(mod(k(i,4),mstu(5))+1,2).NE.22)
THEN 4463 id1=mod(k(i,4),mstu(5))
4464 IF(k(i,2).GE.1.AND.k(i,2).LE.8) id1=mod(k(i,4),mstu(5))+1
4465 id2=2*mod(k(i,4),mstu(5))+1-id1
4466 k(i,4)=mstu(5)*(k(i,4)/mstu(5))+id1
4467 k(i,5)=mstu(5)*(k(i,5)/mstu(5))+id2
4468 k(id1,4)=k(id1,4)+mstu(5)*i
4469 k(id1,5)=k(id1,5)+mstu(5)*id2
4470 k(id2,4)=k(id2,4)+mstu(5)*id1
4471 k(id2,5)=k(id2,5)+mstu(5)*i
4473 id1=mod(k(i,4),mstu(5))
4475 k(i,4)=mstu(5)*(k(i,4)/mstu(5))+id1
4476 k(i,5)=mstu(5)*(k(i,5)/mstu(5))+id1
4477 k(id1,4)=k(id1,4)+mstu(5)*i
4478 k(id1,5)=k(id1,5)+mstu(5)*i
4490 gabep=ga*(ga*(bex*p(ipa(1),1)+bey*p(ipa(1),2)+bez*p(ipa(1),3))
4491 & /(1.+ga)-p(ipa(1),4))
4498 the=
ulangl(p(ipa(1),3)+gabep*bez,sqrt((p(ipa(1),1)
4499 &+gabep*bex)**2+(p(ipa(1),2)+gabep*bey)**2))
4500 phi=
ulangl(p(ipa(1),1)+gabep*bex,p(ipa(1),2)+gabep*bey)
4502 chi=
ulangl(cos(the)*cos(phi)*(p(ipa(2),1)+gabep*bex)+cos(the)*
4503 & sin(phi)*(p(ipa(2),2)+gabep*bey)-sin(the)*(p(ipa(2),3)+gabep*
4504 & bez),-sin(phi)*(p(ipa(2),1)+gabep*bex)+cos(phi)*(p(ipa(2),2)+
4506 CALL ludbrb(
ns+1,
n,0.,chi,0d0,0d0,0d0)
4511 CALL ludbrb(
ns+1,
n,the,phi,dbex,dbey,dbez)
4519 IF(
n.EQ.
ns+npa+iim)
THEN 4524 k(ipa(ip),4)=k(ipa(ip),4)+
ns+iim+ip
4525 k(ipa(ip),5)=k(ipa(ip),5)+
ns+iim+ip
4526 k(
ns+iim+ip,3)=ipa(ip)
4527 IF(iim.EQ.1.AND.mstu(16).NE.2) k(
ns+iim+ip,3)=
ns+1
4528 k(
ns+iim+ip,4)=mstu(5)*ipa(ip)+k(
ns+iim+ip,4)
4529 410 k(
ns+iim+ip,5)=mstu(5)*ipa(ip)+k(
ns+iim+ip,5)
4542 IMPLICIT DOUBLE PRECISION(
d)
4543 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
4545 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4547 dimension dps(4),kfbe(9),nbe(0:9),bei(100)
4548 DATA kfbe/211,-211,111,321,-321,130,310,221,331/
4551 IF((mstj(51).NE.1.AND.mstj(51).NE.2).OR.
n-nsav.LE.1)
RETURN 4555 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 120
4557 110 dps(j)=dps(j)+p(i,j)
4559 CALL ludbrb(0,0,0.,0.,-dps(1)/dps(4),-dps(2)/dps(4),
4563 130
IF(k(i,1).GE.1.AND.k(i,1).LE.10) pecm=pecm+p(i,4)
4567 DO 160 ibe=1,
min(9,mstj(51))
4570 IF(k(i,2).NE.kfbe(ibe))
GOTO 150
4571 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 150
4572 IF(nbe(ibe).GE.mstu(4)-mstu(32)-5)
THEN 4573 CALL luerrm(11,
'(LUBOEI:) no more memory left in LUJETS')
4579 140 p(nbe(ibe),j)=0.
4584 DO 210 ibe=1,
min(9,mstj(51))
4585 IF(ibe.NE.1.AND.ibe.NE.4.AND.ibe.LE.7)
GOTO 180
4586 IF(ibe.EQ.1.AND.
max(nbe(1)-nbe(0),nbe(2)-nbe(1),nbe(3)-nbe(2)).
4588 IF(ibe.EQ.4.AND.
max(nbe(4)-nbe(3),nbe(5)-nbe(4),nbe(6)-nbe(5),
4589 &nbe(7)-nbe(6)).LE.1)
GOTO 180
4590 IF(ibe.GE.8.AND.nbe(ibe)-nbe(ibe-1).LE.1)
GOTO 180
4591 IF(ibe.EQ.1) pmhq=2.*
ulmass(211)
4592 IF(ibe.EQ.4) pmhq=2.*
ulmass(321)
4593 IF(ibe.EQ.8) pmhq=2.*
ulmass(221)
4594 IF(ibe.EQ.9) pmhq=2.*
ulmass(331)
4595 qdel=0.1*
min(pmhq,parj(93))
4596 IF(mstj(51).EQ.1)
THEN 4597 nbin=
min(100,nint(9.*parj(93)/qdel))
4598 beex=exp(0.5*qdel/parj(93))
4599 bert=exp(-qdel/parj(93))
4601 nbin=
min(100,nint(3.*parj(93)/qdel))
4604 qbin=qdel*(ibin-0.5)
4605 bei(ibin)=qdel*(qbin**2+qdel**2/12.)/sqrt(qbin**2+pmhq**2)
4606 IF(mstj(51).EQ.1)
THEN 4608 bei(ibin)=bei(ibin)*beex
4610 bei(ibin)=bei(ibin)*exp(-(qbin/parj(93))**2)
4612 170
IF(ibin.GE.2) bei(ibin)=bei(ibin)+bei(ibin-1)
4615 180
DO 200 i1m=nbe(ibe-1)+1,nbe(ibe)-1
4617 DO 200 i2m=i1m+1,nbe(ibe)
4619 q2old=
max(0.,(p(i1,4)+p(i2,4))**2-(p(i1,1)+p(i2,1))**2-(p(i1,2)+
4620 &p(i2,2))**2-(p(i1,3)+p(i2,3))**2-(p(i1,5)+p(i2,5))**2)
4624 IF(qold.LT.0.5*qdel)
THEN 4626 ELSEIF(qold.LT.(nbin-0.1)*qdel)
THEN 4629 rinp=(rbin**3-ibin**3)/(3*ibin*(ibin+1)+1)
4630 qmov=(bei(ibin)+rinp*(bei(ibin+1)-bei(ibin)))*
4631 & sqrt(q2old+pmhq**2)/q2old
4633 qmov=bei(nbin)*sqrt(q2old+pmhq**2)/q2old
4635 q2new=q2old*(qold/(qold+3.*parj(92)*qmov))**(2./3.)
4638 hc1=(p(i1,4)+p(i2,4))**2-(q2old-q2new)
4639 hc2=(q2old-q2new)*(p(i1,4)-p(i2,4))**2
4640 ha=0.5*(1.-sqrt(hc1*q2new/(hc1*q2old-hc2)))
4642 pd=
ha*(p(i2,j)-p(i1,j))
4643 p(i1m,j)=p(i1m,j)+pd
4644 190 p(i2m,j)=p(i2m,j)-pd
4649 DO 230 im=nbe(0)+1,nbe(
min(9,mstj(51)))
4652 220 p(i,j)=p(i,j)+p(im,j)
4653 230 p(i,4)=sqrt(p(i,5)**2+p(i,1)**2+p(i,2)**2+p(i,3)**2)
4659 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 240
4661 pqs=pqs+p(i,5)**2/p(i,4)
4663 fac=(pecm-pqs)/(pes-pqs)
4665 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 260
4667 250 p(i,j)=
fac*p(i,j)
4668 p(i,4)=sqrt(p(i,5)**2+p(i,1)**2+p(i,2)**2+p(i,3)**2)
4672 CALL ludbrb(0,0,0.,0.,dps(1)/dps(4),dps(2)/dps(4),dps(3)/dps(4))
4682 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4684 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4697 IF((mstj(93).EQ.1.OR.mstj(93).EQ.2).AND.kfa.LE.10)
THEN 4702 ELSEIF(kfa.LE.100.OR.kc.LE.80.OR.kc.GT.100)
THEN 4707 kfla=mod(kfa/1000,10)
4708 kflb=mod(kfa/100,10)
4711 kflr=mod(kfa/10000,10)
4717 IF(kfla.EQ.0.AND.kflr.EQ.0.AND.kfls.LE.3)
THEN 4718 IF(kfls.EQ.1) pmspl=-3./(pmb*pmc)
4719 IF(kfls.GE.3) pmspl=1./(pmb*pmc)
4720 ulmass=parf(111)+pmb+pmc+parf(113)*parf(101)**2*pmspl
4721 ELSEIF(kfla.EQ.0)
THEN 4723 IF(kfls.EQ.1) kmul=3
4724 IF(kflr.EQ.2) kmul=4
4725 IF(kfls.EQ.5) kmul=5
4726 ulmass=parf(113+kmul)+pmb+pmc
4727 ELSEIF(kflc.EQ.0)
THEN 4728 IF(kfls.EQ.1) pmspl=-3./(pma*pmb)
4729 IF(kfls.EQ.3) pmspl=1./(pma*pmb)
4730 ulmass=2.*parf(112)/3.+pma+pmb+parf(114)*parf(101)**2*pmspl
4731 IF(mstj(93).EQ.1)
ulmass=pma+pmb
4735 IF(kfls.EQ.2.AND.kfla.EQ.kflb)
THEN 4736 pmspl=1./(pma*pmb)-2./(pma*pmc)-2./(pmb*pmc)
4737 ELSEIF(kfls.EQ.2.AND.kflb.GE.kflc)
THEN 4738 pmspl=-2./(pma*pmb)-2./(pma*pmc)+1./(pmb*pmc)
4739 ELSEIF(kfls.EQ.2)
THEN 4742 pmspl=1./(pma*pmb)+1./(pma*pmc)+1./(pmb*pmc)
4744 ulmass=parf(112)+pma+pmb+pmc+parf(114)*parf(101)**2*pmspl
4750 IF(mstj(24).GE.1.AND.pmas(kc,2).GT.1
e-4)
THEN 4751 IF(mstj(24).EQ.1.OR.(mstj(24).EQ.2.AND.kfa.GT.100))
THEN 4753 & atan(2.*pmas(kc,3)/pmas(kc,2)))
4756 pmlow=atan((
max(0.,pm0-pmas(kc,3))**2-pm0**2)/
4758 pmupp=atan((pm0+pmas(kc,3))**2-pm0**2)/(pm0*pmas(kc,2))
4759 ulmass=sqrt(
max(0.,pm0**2+pm0*pmas(kc,2)*tan(pmlow+
4760 & (pmupp-pmlow)*
rlu(0))))
4770 SUBROUTINE luname(KF,CHAU)
4773 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4775 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4788 kfla=mod(kfa/1000,10)
4789 kflb=mod(kfa/100,10)
4792 kflr=mod(kfa/10000,10)
4795 IF(kfa.LE.100.OR.(kfa.GT.100.AND.kc.GT.100))
THEN 4799 100
IF(chau(lem:lem).NE.
' ') len=lem
4802 ELSEIF(kflc.EQ.0)
THEN 4803 chau(1:2)=chaf(kfla)(1:1)//chaf(kflb)(1:1)
4804 IF(kfls.EQ.1) chau(3:4)=
'_0' 4805 IF(kfls.EQ.3) chau(3:4)=
'_1' 4809 ELSEIF(kfla.EQ.0)
THEN 4810 IF(kflb.EQ.5) chau(1:1)=
'B' 4811 IF(kflb.EQ.6) chau(1:1)=
'T' 4812 IF(kflb.EQ.7) chau(1:1)=
'L' 4813 IF(kflb.EQ.8) chau(1:1)=
'H' 4815 IF(kflr.EQ.0.AND.kfls.EQ.1)
THEN 4816 ELSEIF(kflr.EQ.0.AND.kfls.EQ.3)
THEN 4819 ELSEIF(kflr.EQ.1.AND.kfls.EQ.3)
THEN 4822 ELSEIF(kflr.EQ.1.AND.kfls.EQ.1)
THEN 4825 ELSEIF(kflr.EQ.2)
THEN 4828 ELSEIF(kfls.EQ.5)
THEN 4832 IF(kflc.GE.3.AND.kflr.EQ.0.AND.kfls.LE.3)
THEN 4833 chau(len+1:len+2)=
'_'//chaf(kflc)(1:1)
4835 ELSEIF(kflc.GE.3)
THEN 4836 chau(len+1:len+1)=chaf(kflc)(1:1)
4842 IF(kflb.LE.2.AND.kflc.LE.2)
THEN 4844 IF(kflc.GT.kflb) chau=
'Lambda' 4845 IF(kfls.EQ.4) chau=
'Sigma*' 4847 IF(chau(6:6).NE.
' ') len=6
4848 ELSEIF(kflb.LE.2.OR.kflc.LE.2)
THEN 4850 IF(kfla.GT.kflb.AND.kflb.GT.kflc) chau=
'Xi''' 4851 IF(kfls.EQ.4) chau=
'Xi*' 4853 IF(chau(3:3).NE.
' ') len=3
4856 IF(kfla.GT.kflb.AND.kflb.GT.kflc) chau=
'Omega''' 4857 IF(kfls.EQ.4) chau=
'Omega*' 4859 IF(chau(6:6).NE.
' ') len=6
4863 chau(len+1:len+2)=
'_'//chaf(kfla)(1:1)
4865 IF(kflb.GE.kflc.AND.kflc.GE.4)
THEN 4866 chau(len+1:len+2)=chaf(kflb)(1:1)//chaf(kflc)(1:1)
4868 ELSEIF(kflb.GE.kflc.AND.kflb.GE.4)
THEN 4869 chau(len+1:len+1)=chaf(kflb)(1:1)
4871 ELSEIF(kflc.GT.kflb.AND.kflb.GE.4)
THEN 4872 chau(len+1:len+2)=chaf(kflc)(1:1)//chaf(kflb)(1:1)
4874 ELSEIF(kflc.GT.kflb.AND.kflc.GE.4)
THEN 4875 chau(len+1:len+1)=chaf(kflc)(1:1)
4881 IF(kf.GT.0.OR.len.EQ.0)
THEN 4882 ELSEIF(kfa.GT.10.AND.kfa.LE.40.AND.kq.NE.0)
THEN 4883 ELSEIF(kfa.EQ.89.OR.(kfa.GE.91.AND.kfa.LE.99))
THEN 4884 ELSEIF(kfa.GT.100.AND.kfla.EQ.0.AND.kq.NE.0)
THEN 4885 ELSEIF(mstu(15).LE.1)
THEN 4886 chau(len+1:len+1)=
'~' 4889 chau(len+1:len+3)=
'bar' 4894 IF(kq.EQ.6) chau(len+1:len+2)=
'++' 4895 IF(kq.EQ.-6) chau(len+1:len+2)=
'--' 4896 IF(kq.EQ.3) chau(len+1:len+1)=
'+' 4897 IF(kq.EQ.-3) chau(len+1:len+1)=
'-' 4898 IF(kq.EQ.0.AND.(kfa.LE.22.OR.len.EQ.0))
THEN 4899 ELSEIF(kq.EQ.0.AND.(kfa.GE.81.AND.kfa.LE.100))
THEN 4900 ELSEIF(kfa.GT.100.AND.kfla.EQ.0.AND.kflb.EQ.kflc.AND.
4902 ELSEIF(kq.EQ.0)
THEN 4903 chau(len+1:len+1)=
'0' 4914 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4922 ELSEIF(kfa.LE.100.OR.kc.LE.80.OR.kc.GT.100)
THEN 4926 ELSEIF(mod(kfa/1000,10).EQ.0)
THEN 4927 luchge=(kchg(mod(kfa/100,10),1)-kchg(mod(kfa/10,10),1))*
4928 & (-1)**mod(kfa/100,10)
4929 ELSEIF(mod(kfa/10,10).EQ.0)
THEN 4930 luchge=kchg(mod(kfa/1000,10),1)+kchg(mod(kfa/100,10),1)
4932 luchge=kchg(mod(kfa/1000,10),1)+kchg(mod(kfa/100,10),1)+
4933 & kchg(mod(kfa/10,10),1)
4948 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4954 kfla=mod(kfa/1000,10)
4955 kflb=mod(kfa/100,10)
4958 kflr=mod(kfa/10000,10)
4961 IF(kfa.EQ.0.OR.kfa.GE.100000)
THEN 4962 ELSEIF(kfa.LE.100)
THEN 4964 IF(kf.LT.0.AND.kchg(kfa,3).EQ.0)
lucomp=0
4965 ELSEIF(kfls.EQ.0)
THEN 4968 IF(kfa.EQ.210)
lucomp=281
4969 IF(kfa.EQ.2110)
lucomp=282
4970 IF(kfa.EQ.2210)
lucomp=283
4973 ELSEIF(kfa-10000*kflr.LT.1000)
THEN 4974 IF(kflb.EQ.0.OR.kflb.EQ.9.OR.kflc.EQ.0.OR.kflc.EQ.9)
THEN 4975 ELSEIF(kflb.LT.kflc)
THEN 4976 ELSEIF(kf.LT.0.AND.kflb.EQ.kflc)
THEN 4977 ELSEIF(kflb.EQ.kflc)
THEN 4978 IF(kflr.EQ.0.AND.kfls.EQ.1)
THEN 4980 ELSEIF(kflr.EQ.0.AND.kfls.EQ.3)
THEN 4982 ELSEIF(kflr.EQ.1.AND.kfls.EQ.3)
THEN 4984 ELSEIF(kflr.EQ.1.AND.kfls.EQ.1)
THEN 4986 ELSEIF(kflr.EQ.2.AND.kfls.EQ.3)
THEN 4988 ELSEIF(kflr.EQ.0.AND.kfls.EQ.5)
THEN 4991 ELSEIF(kflb.LE.5.AND.kflc.LE.3)
THEN 4992 IF(kflr.EQ.0.AND.kfls.EQ.1)
THEN 4993 lucomp=100+((kflb-1)*(kflb-2))/2+kflc
4994 ELSEIF(kflr.EQ.0.AND.kfls.EQ.3)
THEN 4995 lucomp=120+((kflb-1)*(kflb-2))/2+kflc
4996 ELSEIF(kflr.EQ.1.AND.kfls.EQ.3)
THEN 4997 lucomp=140+((kflb-1)*(kflb-2))/2+kflc
4998 ELSEIF(kflr.EQ.1.AND.kfls.EQ.1)
THEN 4999 lucomp=160+((kflb-1)*(kflb-2))/2+kflc
5000 ELSEIF(kflr.EQ.2.AND.kfls.EQ.3)
THEN 5001 lucomp=180+((kflb-1)*(kflb-2))/2+kflc
5002 ELSEIF(kflr.EQ.0.AND.kfls.EQ.5)
THEN 5003 lucomp=200+((kflb-1)*(kflb-2))/2+kflc
5005 ELSEIF((kfls.EQ.1.AND.kflr.LE.1).OR.(kfls.EQ.3.AND.kflr.LE.2).
5006 & or.(kfls.EQ.5.AND.kflr.EQ.0))
THEN 5011 ELSEIF((kflr.EQ.0.OR.kflr.EQ.1).AND.kflc.EQ.0)
THEN 5012 IF(kfls.NE.1.AND.kfls.NE.3)
THEN 5013 ELSEIF(kfla.EQ.9.OR.kflb.EQ.0.OR.kflb.EQ.9)
THEN 5014 ELSEIF(kfla.LT.kflb)
THEN 5015 ELSEIF(kfls.EQ.1.AND.kfla.EQ.kflb)
THEN 5021 ELSEIF(kflr.EQ.0.AND.kfls.EQ.2)
THEN 5022 IF(kfla.EQ.9.OR.kflb.EQ.0.OR.kflb.EQ.9.OR.kflc.EQ.9)
THEN 5023 ELSEIF(kfla.LE.kflc.OR.kfla.LT.kflb)
THEN 5024 ELSEIF(kfla.GE.6.OR.kflb.GE.4.OR.kflc.GE.4)
THEN 5026 ELSEIF(kflb.LT.kflc)
THEN 5027 lucomp=300+((kfla+1)*kfla*(kfla-1))/6+(kflc*(kflc-1))/2+kflb
5029 lucomp=330+((kfla+1)*kfla*(kfla-1))/6+(kflb*(kflb-1))/2+kflc
5033 ELSEIF(kflr.EQ.0.AND.kfls.EQ.4)
THEN 5034 IF(kfla.EQ.9.OR.kflb.EQ.0.OR.kflb.EQ.9.OR.kflc.EQ.9)
THEN 5035 ELSEIF(kfla.LT.kflb.OR.kflb.LT.kflc)
THEN 5036 ELSEIF(kfla.GE.6.OR.kflb.GE.4)
THEN 5039 lucomp=360+((kfla+1)*kfla*(kfla-1))/6+(kflb*(kflb-1))/2+kflc
5048 SUBROUTINE luerrm(MERR,CHMESS)
5051 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
5053 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5055 CHARACTER CHMESS*(*)
5061 IF(mstu(25).EQ.1.AND.mstu(27).LE.mstu(26))
WRITE(mstu(11),1000)
5062 & merr,mstu(31),chmess
5065 ELSEIF(merr.LE.20)
THEN 5068 IF(mstu(21).GE.1.AND.mstu(23).LE.mstu(22))
WRITE(mstu(11),1100)
5069 & merr-10,mstu(31),chmess
5070 IF(mstu(21).GE.2.AND.mstu(23).GT.mstu(22))
THEN 5071 WRITE(mstu(11),1100) merr-10,mstu(31),chmess
5072 WRITE(mstu(11),1200)
5073 IF(merr.NE.17)
CALL lulist(2)
5079 WRITE(mstu(11),1300) merr-20,mstu(31),chmess
5084 1000
FORMAT(/5
x,
'Advisory warning type',i2,
' given after',i6,
5085 &
' LUEXEC calls:'/5
x,
a)
5086 1100
FORMAT(/5
x,
'Error type',i2,
' has occured after',i6,
5087 &
' LUEXEC calls:'/5
x,
a)
5088 1200
FORMAT(5
x,
'Execution will be stopped after listing of last ',
5090 1300
FORMAT(/5
x,
'Fatal error type',i2,
' has occured after',i6,
5091 &
' LUEXEC calls:'/5
x,
a/5
x,
'Execution will now be stopped!')
5101 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5103 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
5107 IF(mstu(111).LE.0)
THEN 5117 IF(mstu(115).GE.2) q2eff=
max(q2,paru(114))
5120 100
IF(nf.GT.
max(2,mstu(113)))
THEN 5121 q2thr=paru(113)*pmas(nf,1)**2
5122 IF(q2eff.LT.q2thr)
THEN 5124 alam2=alam2*(q2thr/alam2)**(2./(33.-2.*nf))
5128 110
IF(nf.LT.
min(8,mstu(114)))
THEN 5129 q2thr=paru(113)*pmas(nf+1,1)**2
5130 IF(q2eff.GT.q2thr)
THEN 5132 alam2=alam2*(alam2/q2thr)**(2./(33.-2.*nf))
5136 IF(mstu(115).EQ.1) q2eff=q2eff+alam2
5137 paru(117)=sqrt(alam2)
5141 algq=log(q2eff/alam2)
5142 IF(mstu(111).EQ.1)
THEN 5146 ulalps=paru(2)/(
b0*algq)*(1.-
b1*log(algq)/(
b0**2*algq))
5159 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5164 IF(
r.LT.1
e-20)
RETURN 5165 IF(abs(
x)/
r.LT.0.8)
THEN 5169 IF(
x.LT.0..AND.
ulangl.GE.0.)
THEN 5171 ELSEIF(
x.LT.0.)
THEN 5185 common/ludatr/mrlu(6),rrlu(100)
5187 equivalence(mrlu1,mrlu(1)),(mrlu2,mrlu(2)),(mrlu3,mrlu(3)),
5188 &(mrlu4,mrlu(4)),(mrlu5,mrlu(5)),(mrlu6,mrlu(6)),
5189 &(rrlu98,rrlu(98)),(rrlu99,rrlu(99)),(rrlu00,rrlu(100))
5193 ij=mod(mrlu1/30082,31329)
5203 m=mod(mod(i*j,179)*k,179)
5208 IF(mod(l*
m,64).GE.32)
s=
s+t
5213 120 twom24=0.5*twom24
5214 rrlu98=362436.*twom24
5215 rrlu99=7654321.*twom24
5216 rrlu00=16777213.*twom24
5224 130 runi=rrlu(mrlu4)-rrlu(mrlu5)
5225 IF(runi.LT.0.) runi=runi+1.
5228 IF(mrlu4.EQ.0) mrlu4=97
5230 IF(mrlu5.EQ.0) mrlu5=97
5231 rrlu98=rrlu98-rrlu99
5232 IF(rrlu98.LT.0.) rrlu98=rrlu98+rrlu00
5234 IF(runi.LT.0.) runi=runi+1.
5235 IF(runi.LE.0.OR.runi.GE.1.)
GOTO 130
5239 IF(mrlu3.EQ.1000000000)
THEN 5250 SUBROUTINE rluget(LFN,MOVE)
5254 common/ludatr/mrlu(6),rrlu(100)
5260 nbck=
min(mrlu(6),-move)
5262 100 backspace(lfn,err=110,iostat=ierr)
5263 mrlu(6)=mrlu(6)-nbck
5267 WRITE(lfn,err=110,iostat=ierr) (mrlu(i1),i1=1,5),
5268 &(rrlu(i2),i2=1,100)
5273 110
WRITE(cherr,
'(I8)') ierr
5274 CALL luerrm(18,
'(RLUGET:) error when accessing file, IOSTAT ='//
5282 SUBROUTINE rluset(LFN,MOVE)
5286 common/ludatr/mrlu(6),rrlu(100)
5292 nbck=
min(mrlu(6),-move)
5294 100 backspace(lfn,err=120,iostat=ierr)
5295 mrlu(6)=mrlu(6)-nbck
5301 110
READ(lfn,err=120,iostat=ierr) (mrlu(i1),i1=1,5),
5302 &(rrlu(i2),i2=1,100)
5303 mrlu(6)=mrlu(6)+nfor
5307 120
WRITE(cherr,
'(I8)') ierr
5308 CALL luerrm(18,
'(RLUSET:) error when accessing file, IOSTAT ='//
5316 SUBROUTINE lurobo(THE,PHI,BEX,BEY,BEZ)
5319 IMPLICIT DOUBLE PRECISION(
d)
5320 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
5322 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5324 dimension rot(3,3),pr(3),vr(3),dp(4),dv(4)
5328 IF(mstu(1).GT.0) imin=mstu(1)
5330 IF(mstu(2).GT.0)
imax=mstu(2)
5337 entry ludbrb(imi,ima,the,phi,dbex,dbey,dbez)
5339 IF(imin.LE.0) imin=1
5347 100
IF(imin.GT.mstu(4).OR.
imax.GT.mstu(4))
THEN 5348 CALL luerrm(11,
'(LUROBO:) range outside LUJETS memory')
5353 IF(the**2+phi**2.GT.1
e-20)
THEN 5354 rot(1,1)=cos(the)*cos(phi)
5356 rot(1,3)=sin(the)*cos(phi)
5357 rot(2,1)=cos(the)*sin(phi)
5359 rot(2,3)=sin(the)*sin(phi)
5364 IF(k(i,1).LE.0)
GOTO 130
5369 p(i,j)=rot(j,1)*pr(1)+rot(j,2)*pr(2)+rot(j,3)*pr(3)
5370 120 v(i,j)=rot(j,1)*vr(1)+rot(j,2)*vr(2)+rot(j,3)*vr(3)
5375 IF(dbx**2+dby**2+dbz**2.GT.1
e-20)
THEN 5376 db=sqrt(dbx**2+dby**2+dbz**2)
5377 IF(db.GT.0.99999999d0)
THEN 5379 CALL luerrm(3,
'(LUROBO:) boost vector too large')
5380 dbx=dbx*(0.99999999d0/db)
5381 dby=dby*(0.99999999d0/db)
5382 dbz=dbz*(0.99999999d0/db)
5385 dga=1d0/sqrt(1d0-db**2)
5387 IF(k(i,1).LE.0)
GOTO 150
5391 dbp=dbx*dp(1)+dby*dp(2)+dbz*dp(3)
5392 dgabp=dga*(dga*dbp/(1d0+dga)+dp(4))
5393 p(i,1)=dp(1)+dgabp*dbx
5394 p(i,2)=dp(2)+dgabp*dby
5395 p(i,3)=dp(3)+dgabp*dbz
5396 p(i,4)=dga*(dp(4)+dbp)
5397 dbv=dbx*dv(1)+dby*dv(2)+dbz*dv(3)
5398 dgabv=dga*(dga*dbv/(1d0+dga)+dv(4))
5399 v(i,1)=dv(1)+dgabv*dbx
5400 v(i,2)=dv(2)+dgabv*dby
5401 v(i,3)=dv(3)+dgabv*dbz
5402 v(i,4)=dga*(dv(4)+dbv)
5414 SUBROUTINE hirobo(THE,PHI,BEX,BEY,BEZ)
5417 IMPLICIT DOUBLE PRECISION(
d)
5418 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
5420 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5422 dimension rot(3,3),pr(3),vr(3),dp(4),dv(4)
5426 IF(mstu(1).GT.0) imin=mstu(1)
5428 IF(mstu(2).GT.0)
imax=mstu(2)
5434 IF(imin.GT.mstu(4).OR.
imax.GT.mstu(4))
THEN 5435 CALL luerrm(11,
'(LUROBO:) range outside LUJETS memory')
5440 IF(the**2+phi**2.GT.1
e-20)
THEN 5441 rot(1,1)=cos(the)*cos(phi)
5443 rot(1,3)=sin(the)*cos(phi)
5444 rot(2,1)=cos(the)*sin(phi)
5446 rot(2,3)=sin(the)*sin(phi)
5451 IF(k(i,1).LE.0)
GOTO 130
5455 120 p(i,j)=rot(j,1)*pr(1)+rot(j,2)*pr(2)+rot(j,3)*pr(3)
5460 IF(dbx**2+dby**2+dbz**2.GT.1
e-20)
THEN 5461 db=sqrt(dbx**2+dby**2+dbz**2)
5462 IF(db.GT.0.99999999d0)
THEN 5464 CALL luerrm(3,
'(LUROBO:) boost vector too large')
5465 dbx=dbx*(0.99999999d0/db)
5466 dby=dby*(0.99999999d0/db)
5467 dbz=dbz*(0.99999999d0/db)
5470 dga=1d0/sqrt(1d0-db**2)
5472 IF(k(i,1).LE.0)
GOTO 150
5475 dbp=dbx*dp(1)+dby*dp(2)+dbz*dp(3)
5476 dgabp=dga*(dga*dbp/(1d0+dga)+dp(4))
5477 p(i,1)=dp(1)+dgabp*dbx
5478 p(i,2)=dp(2)+dgabp*dby
5479 p(i,3)=dp(3)+dgabp*dbz
5480 p(i,4)=dga*(dp(4)+dbp)
5493 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
5495 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5497 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
5499 dimension
ns(2),pts(2),pls(2)
5502 IF((medit.GE.0.AND.medit.LE.3).OR.medit.EQ.5)
THEN 5504 IF(mstu(2).GT.0)
imax=mstu(2)
5507 IF(k(i,1).EQ.0.OR.k(i,1).GT.20)
GOTO 110
5509 IF(k(i,1).GT.10)
GOTO 110
5510 ELSEIF(medit.EQ.2)
THEN 5511 IF(k(i,1).GT.10)
GOTO 110
5513 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.kc.EQ.18)
5515 ELSEIF(medit.EQ.3)
THEN 5516 IF(k(i,1).GT.10)
GOTO 110
5518 IF(kc.EQ.0)
GOTO 110
5519 IF(kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
GOTO 110
5520 ELSEIF(medit.EQ.5)
THEN 5521 IF(k(i,1).EQ.13.OR.k(i,1).EQ.14)
GOTO 110
5523 IF(kc.EQ.0)
GOTO 110
5524 IF(k(i,1).GE.11.AND.kchg(kc,2).EQ.0)
GOTO 110
5538 ELSEIF(medit.GE.11.AND.medit.LE.15)
THEN 5541 k(i,3)=mod(k(i,3),mstu(5))
5542 IF(medit.EQ.11.AND.k(i,1).LT.0)
GOTO 120
5543 IF(medit.EQ.12.AND.k(i,1).EQ.0)
GOTO 120
5544 IF(medit.EQ.13.AND.(k(i,1).EQ.11.OR.k(i,1).EQ.12.OR.
5545 & k(i,1).EQ.15).AND.k(i,2).NE.94)
GOTO 120
5546 IF(medit.EQ.14.AND.(k(i,1).EQ.13.OR.k(i,1).EQ.14.OR.
5547 & k(i,2).EQ.94))
GOTO 120
5548 IF(medit.EQ.15.AND.k(i,1).GE.21)
GOTO 120
5550 k(i,3)=k(i,3)+mstu(5)*i1
5555 IF(k(i,1).LE.0.OR.k(i,1).GT.20.OR.k(i,3)/mstu(5).EQ.0)
GOTO 140
5557 130 im=mod(k(id,3),mstu(5))
5558 IF(medit.EQ.13.AND.im.GT.0.AND.im.LE.
n)
THEN 5559 IF((k(im,1).EQ.11.OR.k(im,1).EQ.12.OR.k(im,1).EQ.15).AND.
5560 & k(im,2).NE.94)
THEN 5564 ELSEIF(medit.EQ.14.AND.im.GT.0.AND.im.LE.
n)
THEN 5565 IF(k(im,1).EQ.13.OR.k(im,1).EQ.14.OR.k(im,2).EQ.94)
THEN 5570 k(i,3)=mstu(5)*(k(i,3)/mstu(5))
5571 IF(im.NE.0) k(i,3)=k(i,3)+k(im,3)/mstu(5)
5572 IF(k(i,1).NE.3.AND.k(i,1).NE.13.AND.k(i,1).NE.14)
THEN 5573 IF(k(i,4).GT.0.AND.k(i,4).LE.mstu(4)) k(i,4)=
5574 & k(k(i,4),3)/mstu(5)
5575 IF(k(i,5).GT.0.AND.k(i,5).LE.mstu(4)) k(i,5)=
5576 & k(k(i,5),3)/mstu(5)
5578 kcm=mod(k(i,4)/mstu(5),mstu(5))
5579 IF(kcm.GT.0.AND.kcm.LE.mstu(4)) kcm=k(kcm,3)/mstu(5)
5580 kcd=mod(k(i,4),mstu(5))
5581 IF(kcd.GT.0.AND.kcd.LE.mstu(4)) kcd=k(kcd,3)/mstu(5)
5582 k(i,4)=mstu(5)**2*(k(i,4)/mstu(5)**2)+mstu(5)*kcm+kcd
5583 kcm=mod(k(i,5)/mstu(5),mstu(5))
5584 IF(kcm.GT.0.AND.kcm.LE.mstu(4)) kcm=k(kcm,3)/mstu(5)
5585 kcd=mod(k(i,5),mstu(5))
5586 IF(kcd.GT.0.AND.kcd.LE.mstu(4)) kcd=k(kcd,3)/mstu(5)
5587 k(i,5)=mstu(5)**2*(k(i,5)/mstu(5)**2)+mstu(5)*kcm+kcd
5594 IF(k(i,3)/mstu(5).EQ.0)
GOTO 160
5600 k(i1,3)=mod(k(i1,3),mstu(5))
5605 ELSEIF(medit.EQ.21)
THEN 5606 IF(2*
n.GE.mstu(4))
THEN 5607 CALL luerrm(11,
'(LUEDIT:) no more memory left in LUJETS')
5612 k(mstu(4)-i,j)=k(i,j)
5613 p(mstu(4)-i,j)=p(i,j)
5614 170 v(mstu(4)-i,j)=v(i,j)
5618 ELSEIF(medit.EQ.22)
THEN 5621 k(i,j)=k(mstu(4)-i,j)
5622 p(i,j)=p(mstu(4)-i,j)
5623 180 v(i,j)=v(mstu(4)-i,j)
5627 ELSEIF(medit.EQ.23)
THEN 5632 IF(k(kh,1).GT.20) kh=0
5634 IF(kh.NE.0)
GOTO 200
5636 190
IF(k(i,1).GT.10.AND.k(i,1).LE.20) k(i,1)=k(i,1)-10
5640 ELSEIF(medit.EQ.31.OR.medit.EQ.32)
THEN 5641 CALL ludbrb(1,
n+mstu(3),0.,-
ulangl(p(mstu(61),1),
5642 & p(mstu(61),2)),0d0,0d0,0d0)
5643 CALL ludbrb(1,
n+mstu(3),-
ulangl(p(mstu(61),3),
5644 & p(mstu(61),1)),0.,0d0,0d0,0d0)
5645 CALL ludbrb(1,
n+mstu(3),0.,-
ulangl(p(mstu(61)+1,1),
5646 & p(mstu(61)+1,2)),0d0,0d0,0d0)
5647 IF(medit.EQ.31)
RETURN 5655 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 220
5656 IF(mstu(41).GE.2)
THEN 5658 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
5659 & kc.EQ.18)
GOTO 220
5660 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
5663 is=2.-sign(0.5,p(i,3))
5665 pts(is)=pts(is)+sqrt(p(i,1)**2+p(i,2)**2)
5667 IF(
ns(1)*pts(2)**2.LT.
ns(2)*pts(1)**2)
5668 &
CALL ludbrb(1,
n+mstu(3),paru(1),0.,0d0,0d0,0d0)
5672 IF(p(i,3).GE.0.)
GOTO 230
5673 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 230
5674 IF(mstu(41).GE.2)
THEN 5676 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
5677 & kc.EQ.18)
GOTO 230
5678 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
5681 is=2.-sign(0.5,p(i,1))
5682 pls(is)=pls(is)-p(i,3)
5684 IF(pls(2).GT.pls(1))
CALL ludbrb(1,
n+mstu(3),0.,paru(1),
5697 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
5699 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5701 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
5703 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
5705 CHARACTER CHAP*16,CHAC*16,CHAN*16,CHAD(5)*16,CHMO(12)*3,CHDL(7)*4
5707 DATA chmo/
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
5708 &
'Oct',
'Nov',
'Dec'/,chdl/
'(())',
' ',
'()',
'!!',
'<>',
'==',
'(==)'/
5719 IF(mlist.GE.1.AND.mlist.LE.3)
THEN 5720 IF(mlist.EQ.1)
WRITE(mstu(11),1100)
5721 IF(mlist.EQ.2)
WRITE(mstu(11),1200)
5722 IF(mlist.EQ.3)
WRITE(mstu(11),1300)
5724 IF(mlist.GE.2) lmx=16
5727 IF(mstu(2).GT.0)
imax=mstu(2)
5729 IF((i.GT.
imax.AND.i.LE.
n).OR.k(i,1).LT.0)
GOTO 120
5735 100
IF(chap(lem:lem).NE.
' ') len=lem
5738 IF(mdl.EQ.2.OR.mdl.GE.8)
THEN 5740 IF(len.GT.lmx) chac(lmx:lmx)=
'?' 5743 IF(mdl.EQ.1.OR.mdl.EQ.7) ldl=2
5745 chac=chdl(mdl)(1:2*ldl)//
' ' 5747 chac=chdl(mdl)(1:ldl)//chap(1:
min(len,lmx-2*ldl))//
5748 & chdl(mdl)(ldl+1:2*ldl)//
' ' 5749 IF(len+2*ldl.GT.lmx) chac(lmx:lmx)=
'?' 5754 IF(k(i,1).EQ.1.OR.k(i,1).EQ.2.OR.k(i,1).EQ.11.OR.k(i,1).EQ.12)
5758 IF(kc.NE.0) kcc=kchg(kc,2)
5759 IF(kcc.NE.0.AND.istr.EQ.0)
THEN 5761 IF(len+2*ldl+3.LE.lmx) chac(lmx-1:lmx-1)=
'A' 5762 ELSEIF(kcc.NE.0.AND.(k(i,1).EQ.2.OR.k(i,1).EQ.12))
THEN 5763 IF(len+2*ldl+3.LE.lmx) chac(lmx-1:lmx-1)=
'I' 5764 ELSEIF(kcc.NE.0)
THEN 5766 IF(len+2*ldl+3.LE.lmx) chac(lmx-1:lmx-1)=
'V' 5771 IF(mlist.EQ.1.AND.abs(p(i,4)).LT.9999.)
THEN 5772 WRITE(mstu(11),1400) i,chac(1:12),(k(i,j1),j1=1,3),
5774 ELSEIF(mlist.EQ.1.AND.abs(p(i,4)).LT.99999.)
THEN 5775 WRITE(mstu(11),1500) i,chac(1:12),(k(i,j1),j1=1,3),
5777 ELSEIF(mlist.EQ.1)
THEN 5778 WRITE(mstu(11),1600) i,chac(1:12),(k(i,j1),j1=1,3),
5780 ELSEIF(mstu(5).EQ.10000.AND.(k(i,1).EQ.3.OR.k(i,1).EQ.13.OR.
5781 & k(i,1).EQ.14))
THEN 5782 WRITE(mstu(11),1700) i,chac,(k(i,j1),j1=1,3),
5783 & k(i,4)/100000000,mod(k(i,4)/10000,10000),mod(k(i,4),10000),
5784 & k(i,5)/100000000,mod(k(i,5)/10000,10000),mod(k(i,5),10000),
5787 WRITE(mstu(11),1800) i,chac,(k(i,j1),j1=1,5),(p(i,j2),j2=1,5)
5789 IF(mlist.EQ.3)
WRITE(mstu(11),1900) (v(i,j),j=1,5)
5792 IF(mstu(70).GE.1)
THEN 5794 DO 110 j=1,
min(10,mstu(70))
5795 110
IF(i.EQ.mstu(70+j)) isep=1
5796 IF(isep.EQ.1.AND.mlist.EQ.1)
WRITE(mstu(11),2000)
5797 IF(isep.EQ.1.AND.mlist.GE.2)
WRITE(mstu(11),2100)
5804 IF(mlist.EQ.1.AND.abs(ps(4)).LT.9999.)
THEN 5805 WRITE(mstu(11),2200) ps(6),(ps(j),j=1,5)
5806 ELSEIF(mlist.EQ.1.AND.abs(ps(4)).LT.99999.)
THEN 5807 WRITE(mstu(11),2300) ps(6),(ps(j),j=1,5)
5808 ELSEIF(mlist.EQ.1)
THEN 5809 WRITE(mstu(11),2400) ps(6),(ps(j),j=1,5)
5811 WRITE(mstu(11),2500) ps(6),(ps(j),j=1,5)
5815 ELSEIF(mlist.EQ.11)
THEN 5816 WRITE(mstu(11),2600)
5820 IF(chap.NE.
' '.AND.chan.EQ.
' ')
WRITE(mstu(11),2700) kf,chap
5821 140
IF(chan.NE.
' ')
WRITE(mstu(11),2700) kf,chap,-kf,chan
5824 DO 150 kflb=1,kfla-(3-kfls)/2
5825 kf=1000*kfla+100*kflb+kfls
5828 150
WRITE(mstu(11),2700) kf,chap,-kf,chan
5831 IF(kmul.EQ.0.OR.kmul.EQ.3) kfls=1
5832 IF(kmul.EQ.5) kfls=5
5834 IF(kmul.EQ.2.OR.kmul.EQ.3) kflr=1
5835 IF(kmul.EQ.4) kflr=2
5837 DO 160 kflc=1,kflb-1
5838 kf=10000*kflr+100*kflb+10*kflc+kfls
5841 160
WRITE(mstu(11),2700) kf,chap,-kf,chan
5842 kf=10000*kflr+110*kflb+kfls
5844 170
WRITE(mstu(11),2700) kf,chap
5847 WRITE(mstu(11),2700) kf,chap
5850 WRITE(mstu(11),2700) kf,chap
5856 IF(kflsp.EQ.1.AND.(kfla.EQ.kflb.OR.kflb.EQ.kflc))
GOTO 180
5857 IF(kflsp.EQ.2.AND.kfla.EQ.kflc)
GOTO 180
5858 IF(kflsp.EQ.1) kf=1000*kfla+100*kflc+10*kflb+kfls
5859 IF(kflsp.GE.2) kf=1000*kfla+100*kflb+10*kflc+kfls
5862 WRITE(mstu(11),2700) kf,chap,-kf,chan
5867 ELSEIF(mlist.EQ.12)
THEN 5868 WRITE(mstu(11),2800)
5872 IF(mstu(2).NE.0) kfmax=mstu(2)
5873 DO 220 kf=
max(1,mstu(1)),kfmax
5875 IF(kc.EQ.0)
GOTO 220
5876 IF(mstu(14).EQ.0.AND.kf.GT.100.AND.kc.LE.100)
GOTO 220
5877 IF(mstu(14).GT.0.AND.kf.GT.100.AND.
max(mod(kf/1000,10),
5878 & mod(kf/100,10)).GT.mstu(14))
GOTO 220
5882 IF(kf.LE.100.AND.chap.EQ.
' '.AND.mdcy(kc,2).EQ.0)
GOTO 220
5885 WRITE(mstu(11),2900) kf,kc,chap,chan,kchg(kc,1),kchg(kc,2),
5886 & kchg(kc,3),pm,pmas(kc,2),pmas(kc,3),pmas(kc,4),mdcy(kc,1)
5890 IF(kf.GT.100.AND.kc.LE.100)
GOTO 220
5891 DO 210 idc=mdcy(kc,2),mdcy(kc,2)+mdcy(kc,3)-1
5893 200
CALL luname(kfdp(idc,j),chad(j))
5894 210
WRITE(mstu(11),3000) idc,mdme(idc,1),mdme(idc,2),brat(idc),
5900 ELSEIF(mlist.EQ.13)
THEN 5901 WRITE(mstu(11),3100)
5903 230
WRITE(mstu(11),3200) i,mstu(i),paru(i),mstj(i),parj(i),parf(i)
5907 1000
FORMAT(///20
x,
'The Lund Monte Carlo - JETSET version ',i1,
'.',i1/
5908 &20
x,
'** Last date of change: ',i2,1
x,
a3,1
x,i4,
' **'/)
5909 1100
FORMAT(///28
x,
'Event listing (summary)'//4
x,
'I particle/jet KS',
5910 &5
x,
'KF orig p_x p_y p_z E m'/)
5911 1200
FORMAT(///28
x,
'Event listing (standard)'//4
x,
'I particle/jet',
5912 &
' K(I,1) K(I,2) K(I,3) K(I,4) K(I,5) P(I,1)',
5913 &
' P(I,2) P(I,3) P(I,4) P(I,5)'/)
5914 1300
FORMAT(///28
x,
'Event listing (with vertices)'//4
x,
'I particle/j',
5915 'et K(I,1) K(I,2) K(I,3) K(I,4) K(I,5) P(I,1)',
5916 &
' P(I,2) P(I,3) P(I,4) P(I,5)'/73
x,
5917 &
'V(I,1) V(I,2) V(I,3) V(I,4) V(I,5)'/)
5918 1400
FORMAT(1
x,i4,2
x,a12,1
x,i2,1
x,i6,1
x,i4,5f9.3)
5919 1500
FORMAT(1
x,i4,2
x,a12,1
x,i2,1
x,i6,1
x,i4,5f9.2)
5920 1600
FORMAT(1
x,i4,2
x,a12,1
x,i2,1
x,i6,1
x,i4,5f9.1)
5921 1700
FORMAT(1
x,i4,2
x,a16,1
x,i3,1
x,i8,2
x,i4,2(3
x,i1,2i4),5f13.5)
5922 1800
FORMAT(1
x,i4,2
x,a16,1
x,i3,1
x,i8,2
x,i4,2(3
x,i9),5f13.5)
5923 1900
FORMAT(66
x,5(1
x,f12.3))
5924 2000
FORMAT(1
x,78(
'='))
5925 2100
FORMAT(1
x,130(
'='))
5926 2200
FORMAT(19
x,
'sum:',f6.2,5
x,5f9.3)
5927 2300
FORMAT(19
x,
'sum:',f6.2,5
x,5f9.2)
5928 2400
FORMAT(19
x,
'sum:',f6.2,5
x,5f9.1)
5929 2500
FORMAT(19
x,
'sum charge:',f6.2,3
x,
'sum momentum and inv. mass:',
5931 2600
FORMAT(///20
x,
'List of KF codes in program'/)
5932 2700
FORMAT(4
x,i6,4
x,a16,6
x,i6,4
x,a16)
5933 2800
FORMAT(///30
x,
'Particle/parton data table'//5
x,
'KF',5
x,
'KC',4
x,
5934 &
'particle',8
x,
'antiparticle',6
x,
'chg col anti',8
x,
'mass',7
x,
5935 &
'width',7
x,
'w-cut',5
x,
'lifetime',1
x,
'decay'/11
x,
'IDC',1
x,
'on/off',
5936 'ME',3
x,
'Br.rat.',4
x,
'decay products')
5937 2900
FORMAT(/1
x,i6,3
x,i4,4
x,a16,a16,3i5,1
x,f12.5,2(1
x,f11.5),
5939 3000
FORMAT(10
x,i4,2
x,i3,2
x,i3,2
x,f8.5,4
x,5a16)
5940 3100
FORMAT(///20
x,
'Parameter value table'//4
x,
'I',3
x,
'MSTU(I)',
5941 &8
x,
'PARU(I)',3
x,
'MSTJ(I)',8
x,
'PARJ(I)',8
x,
'PARF(I)')
5942 3200
FORMAT(1
x,i4,1
x,i9,1
x,f14.5,1
x,i9,1
x,f14.5,1
x,f14.5)
5949 SUBROUTINE luupda(MUPDA,LFN)
5952 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5954 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
5956 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
5961 CHARACTER CHINL*80,CHKC*4,CHVAR(19)*9,CHLIN*72,
5962 &chblk(20)*72,chold*12,chtmp*12,chnew*12,chcom*12
5963 DATA chvar/
'KCHG(I,1)',
'KCHG(I,2)',
'KCHG(I,3)',
'PMAS(I,1)',
5964 &
'PMAS(I,2)',
'PMAS(I,3)',
'PMAS(I,4)',
'MDCY(I,1)',
'MDCY(I,2)',
5965 &
'MDCY(I,3)',
'MDME(I,1)',
'MDME(I,2)',
'BRAT(I) ',
'KFDP(I,1)',
5966 &
'KFDP(I,2)',
'KFDP(I,3)',
'KFDP(I,4)',
'KFDP(I,5)',
'CHAF(I) '/
5969 IF(mstu(12).GE.1)
CALL lulist(0)
5972 WRITE(lfn,1000) kc,chaf(kc),(kchg(kc,j1),j1=1,3),
5973 & (pmas(kc,j2),j2=1,4),mdcy(kc,1)
5974 DO 100 idc=mdcy(kc,2),mdcy(kc,2)+mdcy(kc,3)-1
5975 100
WRITE(lfn,1100) mdme(idc,1),mdme(idc,2),brat(idc),
5976 & (kfdp(idc,j),j=1,5)
5980 ELSEIF(mupda.EQ.2)
THEN 5990 130
READ(lfn,1200,end=140) chinl
5991 IF(chinl(2:5).NE.
' ')
THEN 5995 IF(ndc.NE.0) mdcy(kc,2)=idc+1-ndc
5999 IF(kc.LE.0.OR.kc.GT.mstu(6))
CALL luerrm(27,
6000 &
'(LUUPDA:) Read KC code illegal, KC ='//chkc)
6001 READ(chinl,1000) kcr,chaf(kc),(kchg(kc,j1),j1=1,3),
6002 & (pmas(kc,j2),j2=1,4),mdcy(kc,1)
6007 IF(idc.GE.mstu(7))
CALL luerrm(27,
6008 &
'(LUUPDA:) Decay data arrays full by KC ='//chkc)
6009 READ(chinl,1100) mdme(idc,1),mdme(idc,2),brat(idc),
6010 & (kfdp(idc,j),j=1,5)
6014 IF(ndc.NE.0) mdcy(kc,2)=idc+1-ndc
6022 IF(
min(pmas(kc,1),pmas(kc,2),pmas(kc,3),pmas(kc,1)-pmas(kc,3),
6023 & pmas(kc,4)).LT.0..OR.mdcy(kc,3).LT.0)
CALL luerrm(17,
6024 &
'(LUUPDA:) Mass/width/life/(# channels) wrong for KC ='//chkc)
6026 DO 160 idc=mdcy(kc,2),mdcy(kc,2)+mdcy(kc,3)-1
6027 IF(mdme(idc,2).GT.80)
GOTO 160
6029 pms=pmas(kc,1)-pmas(kc,3)-parj(64)
6033 IF(kp.EQ.0.OR.kp.EQ.81.OR.iabs(kp).EQ.82)
THEN 6034 ELSEIF(
lucomp(kp).EQ.0)
THEN 6041 IF(kq.NE.0) merr=
max(2,merr)
6042 IF(kfdp(idc,2).NE.0.AND.(kc.LE.20.OR.kc.GT.40).AND.
6043 & (kc.LE.80.OR.kc.GT.100).AND.mdme(idc,2).NE.34.AND.
6044 & mdme(idc,2).NE.61.AND.pms.LT.0.) merr=
max(1,merr)
6045 IF(merr.EQ.3)
CALL luerrm(17,
6046 &
'(LUUPDA:) Unknown particle code in decay of KC ='//chkc)
6047 IF(merr.EQ.2)
CALL luerrm(17,
6048 &
'(LUUPDA:) Charge not conserved in decay of KC ='//chkc)
6049 IF(merr.EQ.1)
CALL luerrm(7,
6050 &
'(LUUPDA:) Kinematically unallowed decay of KC ='//chkc)
6051 brsum=brsum+brat(idc)
6053 WRITE(chtmp,1500) brsum
6054 IF(abs(brsum).GT.0.0005.AND.abs(brsum-1.).GT.0.0005)
CALL 6055 &
luerrm(7,
'(LUUPDA:) Sum of branching ratios is '//chtmp(5:12)//
6056 &
' for KC ='//chkc)
6061 ELSEIF(mupda.EQ.3)
THEN 6064 IF(ivar.GE.11.AND.ivar.LE.18) ndim=mstu(7)
6067 chlin(7:35)=
'DATA ('//chvar(ivar)//
',I= 1, )/' 6073 IF(ivar.EQ.1)
WRITE(chtmp,1400) kchg(idim,1)
6074 IF(ivar.EQ.2)
WRITE(chtmp,1400) kchg(idim,2)
6075 IF(ivar.EQ.3)
WRITE(chtmp,1400) kchg(idim,3)
6076 IF(ivar.EQ.4)
WRITE(chtmp,1500) pmas(idim,1)
6077 IF(ivar.EQ.5)
WRITE(chtmp,1500) pmas(idim,2)
6078 IF(ivar.EQ.6)
WRITE(chtmp,1500) pmas(idim,3)
6079 IF(ivar.EQ.7)
WRITE(chtmp,1500) pmas(idim,4)
6080 IF(ivar.EQ.8)
WRITE(chtmp,1400) mdcy(idim,1)
6081 IF(ivar.EQ.9)
WRITE(chtmp,1400) mdcy(idim,2)
6082 IF(ivar.EQ.10)
WRITE(chtmp,1400) mdcy(idim,3)
6083 IF(ivar.EQ.11)
WRITE(chtmp,1400) mdme(idim,1)
6084 IF(ivar.EQ.12)
WRITE(chtmp,1400) mdme(idim,2)
6085 IF(ivar.EQ.13)
WRITE(chtmp,1500) brat(idim)
6086 IF(ivar.EQ.14)
WRITE(chtmp,1400) kfdp(idim,1)
6087 IF(ivar.EQ.15)
WRITE(chtmp,1400) kfdp(idim,2)
6088 IF(ivar.EQ.16)
WRITE(chtmp,1400) kfdp(idim,3)
6089 IF(ivar.EQ.17)
WRITE(chtmp,1400) kfdp(idim,4)
6090 IF(ivar.EQ.18)
WRITE(chtmp,1400) kfdp(idim,5)
6091 IF(ivar.EQ.19) chtmp=chaf(idim)
6097 IF(chtmp(13-ll:13-ll).NE.
' ') llow=13-ll
6098 180
IF(chtmp(ll:ll).NE.
' ') lhig=ll
6099 chnew=chtmp(llow:lhig)//
' ' 6101 IF((ivar.GE.4.AND.ivar.LE.7).OR.ivar.EQ.13)
THEN 6104 IF(chnew(lnew:lnew).EQ.
'0')
GOTO 190
6105 IF(lnew.EQ.1) chnew(1:2)=
'0.' 6106 IF(lnew.EQ.1) lnew=2
6107 ELSEIF(ivar.EQ.19)
THEN 6109 IF(chnew(ll:ll).EQ.
'''')
THEN 6111 chnew=chtmp(1:ll)//
''''//chtmp(ll+1:11)
6116 chnew(1:lnew+2)=
''''//chtmp(1:lnew)//
'''' 6121 IF(chnew.NE.chold)
THEN 6128 IF(nrpt.GE.2) lrpt=lnew+3
6129 IF(nrpt.GE.10) lrpt=lnew+4
6130 IF(nrpt.GE.100) lrpt=lnew+5
6131 IF(nrpt.GE.1000) lrpt=lnew+6
6134 WRITE(chtmp,1400) nrpt
6136 IF(nrpt.GE.10) lrpt=2
6137 IF(nrpt.GE.100) lrpt=3
6138 IF(nrpt.GE.1000) lrpt=4
6139 chcom(1:lrpt+1+lnew)=chtmp(13-lrpt:12)//
'*'//chnew(1:lnew)
6145 IF(llin+lcom.LE.70)
THEN 6146 chlin(llin+1:llin+lcom+1)=chcom(1:lcom)//
',' 6148 ELSEIF(nlin.LE.19)
THEN 6149 chlin(llin+1:72)=
' ' 6152 chlin(6:6+lcom+1)=
'&'//chcom(1:lcom)//
',' 6155 chlin(llin:72)=
'/'//
' ' 6157 WRITE(chtmp,1400) idim-nrpt
6158 chblk(1)(30:33)=chtmp(9:12)
6160 210
WRITE(lfn,1600) chblk(ilin)
6163 chlin(7:35+lcom+1)=
'DATA ('//chvar(ivar)//
',I= , )/'//
6164 & chcom(1:lcom)//
',' 6165 WRITE(chtmp,1400) idim-nrpt+1
6166 chlin(25:28)=chtmp(9:12)
6172 chlin(llin:72)=
'/'//
' ' 6174 WRITE(chtmp,1400) ndim
6175 chblk(1)(30:33)=chtmp(9:12)
6177 230
WRITE(lfn,1600) chblk(ilin)
6182 1000
FORMAT(1
x,i4,2
x,a8,3i3,3f12.5,2
x,f12.5,i3)
6183 1100
FORMAT(5
x,2i5,f12.5,5i8)
6198 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
6200 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6202 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6208 IF(i.LT.0.OR.i.GT.mstu(4).OR.j.LE.0)
THEN 6209 ELSEIF(i.EQ.0.AND.j.EQ.1)
THEN 6211 ELSEIF(i.EQ.0.AND.(j.EQ.2.OR.j.EQ.6))
THEN 6213 IF(j.EQ.2.AND.k(i1,1).GE.1.AND.k(i1,1).LE.10)
klu=
klu+1
6214 IF(j.EQ.6.AND.k(i1,1).GE.1.AND.k(i1,1).LE.10)
klu=
klu+
6227 IF(k(i,1).GE.1.AND.k(i,1).LE.10)
klu=1
6228 IF(j.EQ.8)
klu=
klu*k(i,2)
6229 ELSEIF(j.LE.12)
THEN 6233 IF(kc.NE.0) kq=kchg(kc,2)
6234 IF(j.EQ.9.AND.kc.NE.0.AND.kq.NE.0)
klu=k(i,2)
6235 IF(j.EQ.10.AND.kc.NE.0.AND.kq.EQ.0)
klu=k(i,2)
6237 IF(j.EQ.12)
klu=kq*isign(1,k(i,2))
6240 ELSEIF(j.EQ.13)
THEN 6242 klu=mod(kfa/100,10)*(-1)**mod(kfa/100,10)
6243 IF(kfa.LT.10)
klu=kfa
6244 IF(mod(kfa/1000,10).NE.0)
klu=mod(kfa/1000,10)
6248 ELSEIF(j.LE.16)
THEN 6255 IF(i1.GT.0.AND.k(i1,1).GT.0.AND.k(i1,1).LE.20)
GOTO 110
6260 120
IF(k(i1,3).EQ.i2.AND.k(i1,1).GT.0.AND.k(i1,1).LE.20)
klu=
klu+1
6264 ELSEIF(j.EQ.17)
THEN 6271 IF(i1.EQ.0.OR.k(i0,1).LE.0.OR.k(i0,1).GT.20.OR.kc.EQ.0)
THEN 6276 IF(kchg(kc,2).EQ.0)
GOTO 130
6277 IF(k(i1,1).NE.12)
klu=0
6278 IF(k(i1,1).NE.12)
RETURN 6281 IF(i2.LT.
n.AND.k(i2,1).NE.11)
GOTO 140
6283 IF(k3m.GE.i1.AND.k3m.LE.i2)
klu=0
6285 IF(i3.LT.
n.AND.k3p.GE.i1.AND.k3p.LE.i2)
klu=0
6288 ELSEIF(j.EQ.18)
THEN 6289 IF(k(i,1).EQ.11.OR.k(i,1).EQ.12)
klu=
max(0,k(i,5)-k(i,4)+1)
6290 IF(k(i,4).EQ.0.OR.k(i,5).EQ.0)
klu=0
6291 ELSEIF(j.LE.22)
THEN 6292 IF(k(i,1).NE.3.AND.k(i,1).NE.13.AND.k(i,1).NE.14)
RETURN 6293 IF(j.EQ.19)
klu=mod(k(i,4)/mstu(5),mstu(5))
6294 IF(j.EQ.20)
klu=mod(k(i,5)/mstu(5),mstu(5))
6295 IF(j.EQ.21)
klu=mod(k(i,4),mstu(5))
6296 IF(j.EQ.22)
klu=mod(k(i,5),mstu(5))
6308 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
6310 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6312 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6319 IF(i.LT.0.OR.i.GT.mstu(4).OR.j.LE.0)
THEN 6320 ELSEIF(i.EQ.0.AND.j.LE.4)
THEN 6322 100
IF(k(i1,1).GT.0.AND.k(i1,1).LE.10)
plu=
plu+p(i1,j)
6323 ELSEIF(i.EQ.0.AND.j.EQ.5)
THEN 6327 110
IF(k(i1,1).GT.0.AND.k(i1,1).LE.10) psum(j1)=psum(j1)+p(i1,j1)
6328 plu=sqrt(
max(0.,psum(4)**2-psum(1)**2-psum(2)**2-psum(3)**2))
6329 ELSEIF(i.EQ.0.AND.j.EQ.6)
THEN 6331 120
IF(k(i1,1).GT.0.AND.k(i1,1).LE.10)
plu=
plu+
luchge(k(i1,2))/3.
6339 ELSEIF(j.LE.12)
THEN 6341 IF(j.EQ.7.OR.j.EQ.8)
plu=p(i,1)**2+p(i,2)**2+p(i,3)**2
6342 IF(j.EQ.9.OR.j.EQ.10)
plu=p(i,1)**2+p(i,2)**2
6343 IF(j.EQ.11.OR.j.EQ.12)
plu=p(i,5)**2+p(i,1)**2+p(i,2)**2
6344 IF(j.EQ.8.OR.j.EQ.10.OR.j.EQ.12)
plu=sqrt(
plu)
6347 ELSEIF(j.LE.16)
THEN 6348 IF(j.LE.14)
plu=
ulangl(p(i,3),sqrt(p(i,1)**2+p(i,2)**2))
6350 IF(j.EQ.14.OR.j.EQ.16)
plu=
plu*180./paru(1)
6353 ELSEIF(j.LE.19)
THEN 6355 IF(j.EQ.17) pmr=p(i,5)
6356 IF(j.EQ.18) pmr=
ulmass(211)
6357 pr=
max(1
e-20,pmr**2+p(i,1)**2+p(i,2)**2)
6358 plu=sign(log(
min((sqrt(pr+p(i,3)**2)+abs(p(i,3)))/sqrt(pr),
6362 ELSEIF(j.LE.25)
THEN 6363 IF(j.EQ.20)
plu=2.*sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2)/paru(21)
6364 IF(j.EQ.21)
plu=2.*p(i,3)/paru(21)
6365 IF(j.EQ.22)
plu=2.*sqrt(p(i,1)**2+p(i,2)**2)/paru(21)
6366 IF(j.EQ.23)
plu=2.*p(i,4)/paru(21)
6367 IF(j.EQ.24)
plu=(p(i,4)+p(i,3))/paru(21)
6368 IF(j.EQ.25)
plu=(p(i,4)-p(i,3))/paru(21)
6376 SUBROUTINE lusphe(SPH,APL)
6380 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
6382 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6384 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6386 dimension sm(3,3),sv(3,3)
6395 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 120
6396 IF(mstu(41).GE.2)
THEN 6398 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
6399 & kc.EQ.18)
GOTO 120
6400 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
6404 pa=sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2)
6406 IF(abs(paru(41)-2.).GT.0.001) pwt=
max(1
e-10,pa)**(paru(41)-2.)
6409 110 sm(j1,j2)=sm(j1,j2)+pwt*p(i,j1)*p(i,j2)
6415 CALL luerrm(8,
'(LUSPHE:) too few particles for analysis')
6422 130 sm(j1,j2)=sm(j1,j2)/ps
6425 sq=(sm(1,1)*sm(2,2)+sm(1,1)*sm(3,3)+sm(2,2)*sm(3,3)-sm(1,2)**2-
6426 &sm(1,3)**2-sm(2,3)**2)/3.-1./9.
6427 sr=-0.5*(sq+1./9.+sm(1,1)*sm(2,3)**2+sm(2,2)*sm(1,3)**2+sm(3,3)*
6428 &sm(1,2)**2-sm(1,1)*sm(2,2)*sm(3,3))+sm(1,2)*sm(1,3)*sm(2,3)+1./27.
6433 IF(p(
n+2,4).LT.1
e-5)
THEN 6434 CALL luerrm(8,
'(LUSPHE:) all particles back-to-back')
6443 sv(j1,j1)=sm(j1,j1)-p(
n+i,4)
6446 140 sv(j2,j1)=sm(j1,j2)
6450 IF(abs(sv(j1,j2)).LE.
smax)
GOTO 150
6458 rl=sv(j1,jb)/sv(ja,jb)
6460 sv(j1,j2)=sv(j1,j2)-rl*sv(ja,j2)
6461 IF(abs(sv(j1,j2)).LE.
smax)
GOTO 160
6466 jb2=jb+2-3*((jb+1)/3)
6467 p(
n+i,jb1)=-sv(jc,jb2)
6468 p(
n+i,jb2)=sv(jc,jb1)
6469 p(
n+i,jb)=-(sv(ja,jb1)*p(
n+i,jb1)+sv(ja,jb2)*p(
n+i,jb2))/
6471 pa=sqrt(p(
n+i,1)**2+p(
n+i,2)**2+p(
n+i,3)**2)
6472 sgn=(-1.)**int(
rlu(0)+0.5)
6474 170 p(
n+i,j)=sgn*p(
n+i,j)/pa
6477 sgn=(-1.)**int(
rlu(0)+0.5)
6478 p(
n+2,1)=sgn*(p(
n+1,2)*p(
n+3,3)-p(
n+1,3)*p(
n+3,2))
6479 p(
n+2,2)=sgn*(p(
n+1,3)*p(
n+3,1)-p(
n+1,1)*p(
n+3,3))
6480 p(
n+2,3)=sgn*(p(
n+1,1)*p(
n+3,2)-p(
n+1,2)*p(
n+3,1))
6494 IF(mstu(43).LE.1) mstu(3)=3
6495 IF(mstu(43).GE.2)
n=
n+3
6496 sph=1.5*(p(
n+2,4)+p(
n+3,4))
6504 SUBROUTINE luthru(THR,OBL)
6508 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
6510 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6512 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6514 dimension tdi(3),tpr(3)
6520 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 100
6521 IF(mstu(41).GE.2)
THEN 6523 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
6524 & kc.EQ.18)
GOTO 100
6525 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
6528 IF(
n+np+mstu(44)+15.GE.mstu(4)-mstu(32)-5)
THEN 6529 CALL luerrm(11,
'(LUTHRU:) no more memory left in LUJETS')
6539 p(
n+np,4)=sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2)
6541 IF(abs(paru(42)-1.).GT.0.001) p(
n+np,5)=p(
n+np,4)**(paru(42)-1.)
6542 ps=ps+p(
n+np,4)*p(
n+np,5)
6547 CALL luerrm(8,
'(LUTHRU:) too few particles for analysis')
6557 phi=
ulangl(p(
n+np+1,1),p(
n+np+1,2))
6558 CALL ludbrb(
n+1,
n+np+1,0.,-phi,0d0,0d0,0d0)
6559 the=
ulangl(p(
n+np+1,3),p(
n+np+1,1))
6560 CALL ludbrb(
n+1,
n+np+1,-the,0.,0d0,0d0,0d0)
6564 DO 110 ilf=
n+np+4,
n+np+mstu(44)+4
6567 IF(ild.EQ.2) p(i,4)=sqrt(p(i,1)**2+p(i,2)**2)
6568 DO 120 ilf=
n+np+mstu(44)+3,
n+np+4,-1
6569 IF(p(i,4).LE.p(ilf,4))
GOTO 130
6571 120 p(ilf+1,j)=p(ilf,j)
6574 140 p(ilf+1,j)=p(i,j)
6578 DO 160 ilg=
n+np+mstu(44)+5,
n+np+mstu(44)+15
6580 nc=2**(
min(mstu(44),np)-1)
6584 DO 180 ilf=1,
min(mstu(44),np)
6586 IF(2**ilf*((ilc+2**(ilf-1)-1)/2**ilf).GE.ilc) sgn=-sgn
6588 180 tdi(j)=tdi(j)+sgn*p(
n+np+ilf+3,j)
6589 tds=tdi(1)**2+tdi(2)**2+tdi(3)**2
6590 DO 190 ilg=
n+np+mstu(44)+
min(ilc,10)+4,
n+np+mstu(44)+5,-1
6591 IF(tds.LE.p(ilg,4))
GOTO 200
6593 190 p(ilg+1,j)=p(ilg,j)
6596 210 p(ilg+1,j)=tdi(j)
6607 IF(thp.LE.1
e-10) tdi(j)=p(
n+np+mstu(44)+4+ilg,j)
6608 IF(thp.GT.1
e-10) tdi(j)=tpr(j)
6611 sgn=sign(p(i,5),tdi(1)*p(i,1)+tdi(2)*p(i,2)+tdi(3)*p(i,3))
6613 260 tpr(j)=tpr(j)+sgn*p(i,j)
6614 thp=sqrt(tpr(1)**2+tpr(2)**2+tpr(3)**2)/ps
6615 IF(thp.GE.thps+paru(48))
GOTO 240
6618 IF(thp.LT.p(
n+np+ild,4)-paru(48).AND.ilg.LT.
min(10,nc))
GOTO 230
6619 IF(thp.GT.p(
n+np+ild,4)+paru(48))
THEN 6621 sgn=(-1.)**int(
rlu(0)+0.5)
6623 270 p(
n+np+ild,j)=sgn*tpr(j)/(ps*thp)
6628 280
IF(iagr.LT.mstu(45).AND.ilg.LT.
min(10,nc))
GOTO 230
6631 sgn=(-1.)**int(
rlu(0)+0.5)
6632 p(
n+np+3,1)=-sgn*p(
n+np+2,2)
6633 p(
n+np+3,2)=sgn*p(
n+np+2,1)
6637 290 thp=thp+p(i,5)*abs(p(
n+np+3,1)*p(i,1)+p(
n+np+3,2)*p(i,2))
6649 p(
n+ild,j)=p(
n+np+ild,j)
6651 CALL ludbrb(
n+1,
n+3,the,phi,0d0,0d0,0d0)
6656 IF(mstu(43).LE.1) mstu(3)=3
6657 IF(mstu(43).GE.2)
n=
n+3
6659 obl=p(
n+2,4)-p(
n+3,4)
6670 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
6672 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6674 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6677 SAVE nsav,np,ps,pss,rinit,npre,nrem
6680 r2t(i1,i2)=(p(i1,5)*p(i2,5)-p(i1,1)*p(i2,1)-p(i1,2)*p(i2,2)-
6681 &p(i1,3)*p(i2,3))*2.*p(i1,5)*p(i2,5)/(0.0001+p(i1,5)+p(i2,5))**2
6682 r2m(i1,i2)=2.*p(i1,4)*p(i2,4)*(1.-(p(i1,1)*p(i2,1)+p(i1,2)*
6683 &p(i2,2)+p(i1,3)*p(i2,3))/(p(i1,5)*p(i2,5)))
6686 IF(mstu(48).LE.0)
THEN 6693 IF(mstu(43).GE.2)
n=
n-njet
6695 110 p(i,5)=sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2)
6696 IF(mstu(46).LE.3) r2acc=paru(44)**2
6697 IF(mstu(46).GE.4) r2acc=paru(45)*ps(5)**2
6704 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 140
6705 IF(mstu(41).GE.2)
THEN 6707 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
6708 & kc.EQ.18)
GOTO 140
6709 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
6712 IF(
n+2*np.GE.mstu(4)-mstu(32)-5)
THEN 6713 CALL luerrm(11,
'(LUCLUS:) no more memory left in LUJETS')
6722 120 p(
n+np,j)=p(i,j)
6723 IF(mstu(42).EQ.0) p(
n+np,5)=0.
6724 IF(mstu(42).EQ.1.AND.k(i,2).NE.22) p(
n+np,5)=pmas(101,1)
6725 p(
n+np,4)=sqrt(p(
n+np,5)**2+p(i,1)**2+p(i,2)**2+p(i,3)**2)
6726 p(
n+np,5)=sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2)
6728 130 ps(j)=ps(j)+p(
n+np,j)
6734 150 p(i+np,j)=p(i,j)
6735 ps(5)=sqrt(
max(0.,ps(4)**2-ps(1)**2-ps(2)**2-ps(3)**2))
6738 IF(np.LT.mstu(47))
THEN 6739 CALL luerrm(8,
'(LUCLUS:) too few particles for analysis')
6746 IF(mstu(46).LE.3) r2acc=paru(44)**2
6747 IF(mstu(46).GE.4) r2acc=paru(45)*ps(5)**2
6749 IF(np.LE.mstu(47)+2) rinit=0.
6753 DO 170 i=
n+np+1,
n+2*np
6757 IF(mstu(46).LE.2)
THEN 6760 DO 200 i=
n+np+1,
n+2*np
6761 IF(p(i,5).GT.2.*rinit)
GOTO 200
6765 190 p(
n+1,j)=p(
n+1,j)+p(i,j)
6767 p(
n+1,5)=sqrt(p(
n+1,1)**2+p(
n+1,2)**2+p(
n+1,3)**2)
6768 IF(p(
n+1,5).GT.2.*rinit) npre=1
6769 IF(rinit.GE.0.2*paru(43).AND.npre+nrem.LT.mstu(47))
GOTO 160
6775 DO 220 i=
n+np+1,
n+2*np
6776 IF(k(i,4).NE.0.OR.p(i,5).LE.pmax)
GOTO 220
6781 230 p(
n+npre,j)=p(
imax,j)
6786 IF(mstu(46).LE.2)
THEN 6787 DO 250 i=
n+np+1,
n+2*np
6788 IF(k(i,4).NE.0)
GOTO 250
6790 IF(r2.GT.rinit**2)
GOTO 250
6794 240 p(
n+npre,j)=p(
n+npre,j)+p(i,j)
6796 p(
n+npre,5)=sqrt(p(
n+npre,1)**2+p(
n+npre,2)**2+p(
n+npre,3)**2)
6802 DO 270 i=
n+np+1,
n+2*np
6803 IF(k(i,4).NE.0)
GOTO 270
6805 IF(r2.GE.r2min)
GOTO 270
6811 280 p(
n+npre,j)=p(
n+npre,j)+p(imin,j)
6812 p(
n+npre,5)=sqrt(p(
n+npre,1)**2+p(
n+npre,2)**2+p(
n+npre,3)**2)
6820 IF(rinit.GE.0.2*paru(43).AND.npre+nrem.LT.mstu(47))
GOTO 160
6821 IF(nrem.GT.0)
GOTO 210
6827 300
IF(mstu(46).LE.1)
THEN 6831 DO 340 i=
n+np+1,
n+2*np
6833 DO 320 ijet=
n+1,
n+njet
6834 IF(p(ijet,5).LT.rinit)
GOTO 320
6836 IF(r2.GE.r2min)
GOTO 320
6842 330 v(imin,j)=v(imin,j)+p(i,j)
6848 p(i,5)=sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2)
6849 360 psjt=psjt+p(i,5)
6854 DO 370 itry1=
n+1,
n+njet-1
6855 DO 370 itry2=itry1+1,
n+njet
6856 IF(mstu(46).LE.2) r2=r2t(itry1,itry2)
6857 IF(mstu(46).GE.3) r2=r2m(itry1,itry2)
6858 IF(r2.GE.r2min)
GOTO 370
6865 IF(njet.GT.mstu(47).AND.r2min.LT.r2acc)
THEN 6866 irec=
min(imin1,imin2)
6867 idel=
max(imin1,imin2)
6869 380 p(irec,j)=p(imin1,j)+p(imin2,j)
6870 p(irec,5)=sqrt(p(irec,1)**2+p(irec,2)**2+p(irec,3)**2)
6871 DO 390 i=idel+1,
n+njet
6874 IF(mstu(46).GE.2)
THEN 6875 DO 400 i=
n+np+1,
n+2*np
6877 IF(iori.EQ.idel) k(i,4)=irec-
n 6878 400
IF(iori.GT.idel) k(i,4)=k(i,4)-1
6884 ELSEIF(njet.EQ.mstu(47).AND.mstu(46).LE.1.AND.nloop.LE.2)
THEN 6887 DO 420 i=
n+np+1,
n+2*np
6888 420 k(
n+k(i,4),5)=k(
n+k(i,4),5)+1
6891 430
IF(k(i,5).EQ.0) iemp=i
6896 DO 440 i=
n+np+1,
n+2*np
6897 IF(k(
n+k(i,4),5).LE.1.OR.p(i,5).LT.rinit)
GOTO 440
6900 IF(r2.LE.r2max)
GOTO 440
6908 450 p(ijet,j)=p(ijet,j)-p(ispl,j)
6910 p(ijet,5)=sqrt(p(ijet,1)**2+p(ijet,2)**2+p(ijet,3)**2)
6911 IF(nloop.LE.2)
GOTO 290
6917 IF(mstu(46).LE.1.AND.nloop.LE.2.AND.psjt/pss.GT.tsav+paru(48))
6927 DO 490 inew=
n+1,
n+njet
6929 DO 470 itry=
n+1,
n+njet
6930 IF(v(itry,4).LE.pemax)
GOTO 470
6939 480 p(inew,j)=v(
imax,j)
6944 DO 500 i=
n+np+1,
n+2*np
6947 IF(k(k(i,3),1).NE.3) k(k(i,3),4)=iori-
n 6948 k(iori,4)=k(iori,4)+1
6955 p(i,5)=sqrt(
max(p(i,4)**2-p(i,5)**2,0.))
6958 520
IF(k(i,4).EQ.0) iemp=i
6966 paru(63)=sqrt(r2min)
6967 IF(njet.LE.1) paru(63)=0.
6969 CALL luerrm(8,
'(LUCLUS:) failed to reconstruct as requested')
6972 IF(mstu(43).LE.1) mstu(3)=njet
6973 IF(mstu(43).GE.2)
n=
n+njet
6985 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
6987 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6989 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6993 nce2=2*mstu(51)*mstu(52)
6994 ptlrat=1./sinh(paru(51))**2
6998 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 110
6999 IF(p(i,1)**2+p(i,2)**2.LE.ptlrat*p(i,3)**2)
GOTO 110
7000 IF(mstu(41).GE.2)
THEN 7002 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
7003 & kc.EQ.18)
GOTO 110
7004 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
7008 pt=sqrt(p(i,1)**2+p(i,2)**2)
7009 eta=sign(log((sqrt(
pt**2+p(i,3)**2)+abs(p(i,3)))/
pt),p(i,3))
7010 ieta=
max(1,
min(mstu(51),1+int(mstu(51)*0.5*(eta/paru(51)+1.))))
7011 phi=
ulangl(p(i,1),p(i,2))
7012 iphi=
max(1,
min(mstu(52),1+int(mstu(52)*0.5*(phi/paru(1)+1.))))
7013 ietph=mstu(52)*ieta+iphi
7017 IF(ietph.EQ.k(ic,3))
THEN 7023 IF(nc.GE.mstu(4)-mstu(32)-5)
THEN 7024 CALL luerrm(11,
'(LUCELL:) no more memory left in LUJETS')
7032 p(nc,1)=(paru(51)/mstu(51))*(2*ieta-1-mstu(51))
7033 p(nc,2)=(paru(1)/mstu(52))*(2*iphi-1-mstu(52))
7038 IF(mstu(53).GE.1)
THEN 7041 IF(mstu(53).EQ.2) pei=p(ic,5)/cosh(p(ic,1))
7042 120 pef=pei+paru(55)*sqrt(-2.*log(
max(1
e-10,
rlu(0)))*pei)*
7043 & cos(paru(2)*
rlu(0))
7044 IF(pef.LT.0..OR.pef.GT.paru(56)*pei)
GOTO 120
7046 130
IF(mstu(53).EQ.2) p(ic,5)=pef*cosh(p(ic,1))
7053 IF(k(ic,5).NE.2)
GOTO 150
7054 IF(p(ic,5).LE.etmax)
GOTO 150
7060 IF(etmax.LT.paru(52))
GOTO 210
7061 IF(nj.GE.mstu(4)-mstu(32)-5)
THEN 7062 CALL luerrm(11,
'(LUCELL:) no more memory left in LUJETS')
7078 IF(k(ic,5).EQ.0)
GOTO 160
7079 IF(abs(p(ic,1)-eta).GT.paru(54))
GOTO 160
7080 dphia=abs(p(ic,2)-phi)
7081 IF(dphia.GT.paru(54).AND.dphia.LT.paru(2)-paru(54))
GOTO 160
7083 IF(dphia.GT.paru(1)) phic=phic+sign(paru(2),phi)
7084 IF((p(ic,1)-eta)**2+(phic-phi)**2.GT.paru(54)**2)
GOTO 160
7086 k(nj,4)=k(nj,4)+k(ic,4)
7087 p(nj,3)=p(nj,3)+p(ic,5)*p(ic,1)
7088 p(nj,4)=p(nj,4)+p(ic,5)*phic
7089 p(nj,5)=p(nj,5)+p(ic,5)
7093 IF(p(nj,5).LT.paru(53))
THEN 7096 170
IF(k(ic,5).LT.0) k(ic,5)=-k(ic,5)
7097 ELSEIF(mstu(54).LE.2)
THEN 7098 p(nj,3)=p(nj,3)/p(nj,5)
7099 p(nj,4)=p(nj,4)/p(nj,5)
7100 IF(abs(p(nj,4)).GT.paru(1)) p(nj,4)=p(nj,4)-sign(paru(2),
7103 180
IF(k(ic,1).LT.0) k(ic,1)=0
7108 IF(k(ic,5).GE.0)
GOTO 200
7109 p(nj,1)=p(nj,1)+p(ic,5)*cos(p(ic,2))
7110 p(nj,2)=p(nj,2)+p(ic,5)*sin(p(ic,2))
7111 p(nj,3)=p(nj,3)+p(ic,5)*sinh(p(ic,1))
7112 p(nj,4)=p(nj,4)+p(ic,5)*cosh(p(ic,1))
7119 210
DO 230 i=1,nj-nc
7122 IF(k(ij,5).EQ.0)
GOTO 220
7123 IF(p(ij,5).LT.etmax)
GOTO 220
7139 IF(mstu(54).EQ.2)
THEN 7142 p(i,1)=p(i,5)*cos(p(i,4))
7143 p(i,2)=p(i,5)*sin(p(i,4))
7144 p(i,3)=p(i,5)*sinh(eta)
7145 p(i,4)=p(i,5)*cosh(eta)
7147 ELSEIF(mstu(54).GE.3)
THEN 7149 250 p(i,5)=sqrt(
max(0.,p(i,4)**2-p(i,1)**2-p(i,2)**2-p(i,3)**2))
7156 IF(mstu(43).LE.1) mstu(3)=njet
7157 IF(mstu(43).GE.2)
n=
n+njet
7164 SUBROUTINE lujmas(PMH,PML)
7168 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
7170 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
7172 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
7174 dimension sm(3,3),sax(3),ps(3,5)
7187 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 150
7188 IF(mstu(41).GE.2)
THEN 7190 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
7191 & kc.EQ.18)
GOTO 150
7192 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
7195 IF(
n+np+1.GE.mstu(4)-mstu(32)-5)
THEN 7196 CALL luerrm(11,
'(LUJMAS:) no more memory left in LUJETS')
7203 120 p(
n+np,j)=p(i,j)
7204 IF(mstu(42).EQ.0) p(
n+np,5)=0.
7205 IF(mstu(42).EQ.1.AND.k(i,2).NE.22) p(
n+np,5)=pmas(101,1)
7206 p(
n+np,4)=sqrt(p(
n+np,5)**2+p(i,1)**2+p(i,2)**2+p(i,3)**2)
7211 130 sm(j1,j2)=sm(j1,j2)+p(i,j1)*p(i,j2)
7212 pss=pss+(p(i,1)**2+p(i,2)**2+p(i,3)**2)
7214 140 ps(3,j)=ps(3,j)+p(
n+np,j)
7219 CALL luerrm(8,
'(LUJMAS:) too few particles for analysis')
7224 paru(61)=sqrt(
max(0.,ps(3,4)**2-ps(3,1)**2-ps(3,2)**2-ps(3,3)**2))
7229 160 sm(j1,j2)=sm(j1,j2)/pss
7230 sq=(sm(1,1)*sm(2,2)+sm(1,1)*sm(3,3)+sm(2,2)*sm(3,3)-sm(1,2)**2-
7231 &sm(1,3)**2-sm(2,3)**2)/3.-1./9.
7232 sr=-0.5*(sq+1./9.+sm(1,1)*sm(2,3)**2+sm(2,2)*sm(1,3)**2+sm(3,3)*
7233 &sm(1,2)**2-sm(1,1)*sm(2,2)*sm(3,3))+sm(1,2)*sm(1,3)*sm(2,3)+1./27.
7239 sm(j1,j1)=sm(j1,j1)-sma
7241 170 sm(j2,j1)=sm(j1,j2)
7245 IF(abs(sm(j1,j2)).LE.
smax)
GOTO 180
7253 rl=sm(j1,jb)/sm(ja,jb)
7255 sm(j1,j2)=sm(j1,j2)-rl*sm(ja,j2)
7256 IF(abs(sm(j1,j2)).LE.
smax)
GOTO 190
7261 jb2=jb+2-3*((jb+1)/3)
7262 sax(jb1)=-sm(jc,jb2)
7264 sax(jb)=-(sm(ja,jb1)*sax(jb1)+sm(ja,jb2)*sax(jb2))/sm(ja,jb)
7268 psax=p(i,1)*sax(1)+p(i,2)*sax(2)+p(i,3)*sax(3)
7273 200 ps(is,j)=ps(is,j)+p(i,j)
7274 pms=(ps(1,4)**2-ps(1,1)**2-ps(1,2)**2-ps(1,3)**2)+
7275 &(ps(2,4)**2-ps(2,1)**2-ps(2,2)**2-ps(2,3)**2)
7281 220 ps(3,j)=ps(1,j)-ps(2,j)
7283 pps=p(i,4)*ps(3,4)-p(i,1)*ps(3,1)-p(i,2)*ps(3,2)-p(i,3)*ps(3,3)
7284 IF(k(i,3).EQ.1) pmdi=2.*(p(i,5)**2-pps)
7285 IF(k(i,3).EQ.2) pmdi=2.*(p(i,5)**2+pps)
7286 IF(pmdi.LT.pmd)
THEN 7293 IF(pmd.LT.-paru(48)*pms)
THEN 7297 ps(is,j)=ps(is,j)-p(im,j)
7298 240 ps(3-is,j)=ps(3-is,j)+p(im,j)
7306 ps(1,5)=sqrt(
max(0.,ps(1,4)**2-ps(1,1)**2-ps(1,2)**2-ps(1,3)**2))
7307 ps(2,5)=sqrt(
max(0.,ps(2,4)**2-ps(2,1)**2-ps(2,2)**2-ps(2,3)**2))
7308 pmh=
max(ps(1,5),ps(2,5))
7309 pml=
min(ps(1,5),ps(2,5))
7316 SUBROUTINE lufowo(H10,H20,H30,H40)
7319 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
7321 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
7323 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
7331 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 110
7332 IF(mstu(41).GE.2)
THEN 7334 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
7335 & kc.EQ.18)
GOTO 110
7336 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
7339 IF(
n+np.GE.mstu(4)-mstu(32)-5)
THEN 7340 CALL luerrm(11,
'(LUFOWO:) no more memory left in LUJETS')
7349 100 p(
n+np,j)=p(i,j)
7350 p(
n+np,4)=sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2)
7358 CALL luerrm(8,
'(LUFOWO:) too few particles for analysis')
7373 cthe=(p(i1,1)*p(i2,1)+p(i1,2)*p(i2,2)+p(i1,3)*p(i2,3))/
7375 h10=
h10+p(i1,4)*p(i2,4)*cthe
7376 h20=
h20+p(i1,4)*p(i2,4)*(1.5*cthe**2-0.5)
7377 h30=h30+p(i1,4)*p(i2,4)*(2.5*cthe**3-1.5*cthe)
7378 h40=h40+p(i1,4)*p(i2,4)*(4.375*cthe**4-3.75*cthe**2+0.375)
7399 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
7401 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
7403 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
7405 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
7407 dimension kfis(100,2),npis(100,0:10),kffs(400),npfs(400,4),
7408 &fevfm(10,4),fm1fm(3,10,4),fm2fm(3,10,4),fmoma(4),fmoms(4),
7409 &fevee(50),fe1ec(50),fe2ec(50),fe1ea(25),fe2ea(25),
7410 &kfdm(8),kfdc(200,0:8),npdc(200)
7411 SAVE nevis,nkfis,kfis,npis,nevfs,nprfs,nfifs,nchfs,nkffs,
7412 &kffs,npfs,nevfm,nmufm,fm1fm,fm2fm,nevee,fe1ec,fe2ec,fe1ea,
7413 &fe2ea,nevdc,nkfdc,nredc,kfdc,npdc
7414 CHARACTER CHAU*16,CHIS(2)*12,CHDC(8)*12
7415 DATA nevis/0/,nkfis/0/,nevfs/0/,nprfs/0/,nfifs/0/,nchfs/0/,
7416 &nkffs/0/,nevfm/0/,nmufm/0/,fm1fm/120*0./,fm2fm/120*0./,
7417 &nevee/0/,fe1ec/50*0./,fe2ec/50*0./,fe1ea/25*0./,fe2ea/25*0./,
7418 &nevdc/0/,nkfdc/0/,nredc/0/
7421 IF(mtabu.EQ.10)
THEN 7426 ELSEIF(mtabu.EQ.11)
THEN 7428 kfm1=2*iabs(mstu(161))
7429 IF(mstu(161).GT.0) kfm1=kfm1-1
7430 kfm2=2*iabs(mstu(162))
7431 IF(mstu(162).GT.0) kfm2=kfm2-1
7435 IF(kfmn.EQ.kfis(i,1).AND.kfmx.EQ.kfis(i,2))
THEN 7438 ELSEIF(kfmn.LT.kfis(i,1).OR.(kfmn.EQ.kfis(i,1).AND.
7439 & kfmx.LT.kfis(i,2)))
THEN 7445 110
IF(ikfis.LT.0)
THEN 7448 IF(nkfis.GE.100)
RETURN 7449 DO 120 i=nkfis,ikfis,-1
7450 kfis(i+1,1)=kfis(i,1)
7451 kfis(i+1,2)=kfis(i,2)
7453 120 npis(i+1,j)=npis(i,j)
7460 npis(ikfis,0)=npis(ikfis,0)+1
7465 IF(k(i,1).LE.0.OR.k(i,1).GT.12)
THEN 7466 ELSEIF(iabs(k(i,2)).GT.80.AND.iabs(k(i,2)).LE.100)
THEN 7467 ELSEIF(iabs(k(i,2)).GT.100.AND.mod(iabs(k(i,2))/10,10).NE.0)
7472 IF(im.LE.0.OR.im.GT.
n)
THEN 7474 ELSEIF(k(im,1).LE.0.OR.k(im,1).GT.20)
THEN 7476 ELSEIF(iabs(k(im,2)).GT.80.AND.iabs(k(im,2)).LE.100)
THEN 7477 ELSEIF(iabs(k(im,2)).GT.100.AND.mod(iabs(k(im,2))/10,10).NE.0)
7489 IF(np.GE.26) npco=10
7490 npis(ikfis,npco)=npis(ikfis,npco)+1
7494 ELSEIF(mtabu.EQ.12)
THEN 7496 WRITE(mstu(11),1000) nevis
7499 IF(kfmn.EQ.0) kfmn=kfis(i,2)
7501 IF(2*kfm1.EQ.kfmn) kfm1=-kfm1
7504 IF(chau(13:13).NE.
' ') chis(1)(12:12)=
'?' 7506 IF(kfis(i,1).EQ.0) kfmx=0
7508 IF(2*kfm2.EQ.kfmx) kfm2=-kfm2
7511 IF(chau(13:13).NE.
' ') chis(2)(12:12)=
'?' 7512 160
WRITE(mstu(11),1100) chis(1),chis(2),
fac*npis(i,0),
7513 & (npis(i,j)/float(npis(i,0)),j=1,10)
7516 ELSEIF(mtabu.EQ.13)
THEN 7520 IF(kfmn.EQ.0) kfmn=kfis(i,2)
7522 IF(2*kfm1.EQ.kfmn) kfm1=-kfm1
7524 IF(kfis(i,1).EQ.0) kfmx=0
7526 IF(2*kfm2.EQ.kfmx) kfm2=-kfm2
7533 p(i,j)=
fac*npis(i,j)
7534 170 v(i,j)=
fac*npis(i,j+5)
7546 ELSEIF(mtabu.EQ.20)
THEN 7554 ELSEIF(mtabu.EQ.21)
THEN 7558 IF(k(i,1).LE.0.OR.k(i,1).GT.20.OR.k(i,1).EQ.13)
GOTO 230
7562 IF(k(i,3).LE.0.OR.k(i,3).GT.
n)
THEN 7564 ELSEIF(k(k(i,3),1).LE.0.OR.k(k(i,3),1).GT.20)
THEN 7566 ELSEIF(kc.EQ.0)
THEN 7567 ELSEIF(k(k(i,3),1).EQ.13)
THEN 7569 IF(im.LE.0.OR.im.GT.
n)
THEN 7571 ELSEIF(k(im,1).LE.0.OR.k(im,1).GT.20)
THEN 7574 ELSEIF(kchg(kc,2).EQ.0)
THEN 7577 IF(kchg(kcm,2).NE.0) mpri=1
7580 IF(kc.NE.0.AND.mpri.EQ.1)
THEN 7581 IF(kchg(kc,2).EQ.0) nprfs=nprfs+1
7583 IF(k(i,1).LE.10)
THEN 7585 IF(
luchge(k(i,2)).NE.0) nchfs=nchfs+1
7590 kfs=3-isign(1,k(i,2))-mpri
7592 IF(kfa.EQ.kffs(ip))
THEN 7595 ELSEIF(kfa.LT.kffs(ip))
THEN 7601 200
IF(ikffs.LT.0)
THEN 7604 IF(nkffs.GE.400)
RETURN 7605 DO 210 ip=nkffs,ikffs,-1
7608 210 npfs(ip+1,j)=npfs(ip,j)
7614 npfs(ikffs,kfs)=npfs(ikffs,kfs)+1
7618 ELSEIF(mtabu.EQ.22)
THEN 7620 WRITE(mstu(11),1200) nevfs,
fac*nprfs,
fac*nfifs,
fac*nchfs
7622 CALL luname(kffs(i),chau)
7625 IF(kc.NE.0) mdcyf=mdcy(kc,1)
7626 240
WRITE(mstu(11),1300) kffs(i),chau,mdcyf,(
fac*npfs(i,j),j=1,4),
7627 &
fac*(npfs(i,1)+npfs(i,2)+npfs(i,3)+npfs(i,4))
7630 ELSEIF(mtabu.EQ.23)
THEN 7637 k(i,5)=npfs(i,1)+npfs(i,2)+npfs(i,3)+npfs(i,4)
7639 p(i,j)=
fac*npfs(i,j)
7657 ELSEIF(mtabu.EQ.30)
THEN 7664 280 fm2fm(im,ib,ip)=0.
7667 ELSEIF(mtabu.EQ.31)
THEN 7672 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 360
7673 IF(mstu(41).GE.2)
THEN 7675 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
7676 & kc.EQ.18)
GOTO 360
7677 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
7681 IF(mstu(42).EQ.1.AND.k(i,2).NE.22) pmr=
ulmass(211)
7682 IF(mstu(42).GE.2) pmr=p(i,5)
7683 pr=
max(1
e-20,pmr**2+p(i,1)**2+p(i,2)**2)
7684 yeta=sign(log(
min((sqrt(pr+p(i,3)**2)+abs(p(i,3)))/sqrt(pr),
7686 IF(abs(yeta).GT.paru(57))
GOTO 360
7687 phi=
ulangl(p(i,1),p(i,2))
7688 iyeta=512.*(yeta+paru(57))/(2.*paru(57))
7689 iyeta=
max(0,
min(511,iyeta))
7690 iphi=512.*(phi+paru(1))/paru(2)
7691 iphi=
max(0,
min(511,iphi))
7694 290 iyep=iyep+4**ib*(2*mod(iyeta/2**ib,2)+mod(iphi/2**ib,2))
7697 IF(nupp.GT.mstu(4)-5-mstu(32))
THEN 7698 CALL luerrm(11,
'(LUTABU:) no more memory left in LUJETS')
7702 IF(nupp.EQ.nlow+1)
THEN 7707 DO 300 i1=nupp-1,nlow+1,-1
7708 IF(iyeta.GE.k(i1,1))
GOTO 310
7709 300 k(i1+1,1)=k(i1,1)
7711 DO 320 i1=nupp-1,nlow+1,-1
7712 IF(iphi.GE.k(i1,2))
GOTO 330
7713 320 k(i1+1,2)=k(i1,2)
7715 DO 340 i1=nupp-1,nlow+1,-1
7716 IF(iyep.GE.k(i1,3))
GOTO 350
7717 340 k(i1+1,3)=k(i1,3)
7731 IF(im.LE.2) ibin=2**(10-ib)
7732 IF(im.EQ.3) ibin=4**(10-ib)
7733 iagr=k(nlow+1,im)/ibin
7735 DO 380 i=nlow+2,nupp+1
7737 IF(icut.EQ.iagr)
THEN 7741 ELSEIF(nagr.EQ.2)
THEN 7742 fevfm(ib,1)=fevfm(ib,1)+2.
7743 ELSEIF(nagr.EQ.3)
THEN 7744 fevfm(ib,1)=fevfm(ib,1)+6.
7745 fevfm(ib,2)=fevfm(ib,2)+6.
7746 ELSEIF(nagr.EQ.4)
THEN 7747 fevfm(ib,1)=fevfm(ib,1)+12.
7748 fevfm(ib,2)=fevfm(ib,2)+24.
7749 fevfm(ib,3)=fevfm(ib,3)+24.
7751 fevfm(ib,1)=fevfm(ib,1)+nagr*(nagr-1.)
7752 fevfm(ib,2)=fevfm(ib,2)+nagr*(nagr-1.)*(nagr-2.)
7753 fevfm(ib,3)=fevfm(ib,3)+nagr*(nagr-1.)*(nagr-2.)*(nagr-3.)
7754 fevfm(ib,4)=fevfm(ib,4)+nagr*(nagr-1.)*(nagr-2.)*(nagr-3.)*
7765 IF(fevfm(1,ip).LT.0.5)
THEN 7767 ELSEIF(im.LE.2)
THEN 7768 fevfm(ib,ip)=2**((ib-1)*ip)*fevfm(ib,ip)/fevfm(1,ip)
7770 fevfm(ib,ip)=4**((ib-1)*ip)*fevfm(ib,ip)/fevfm(1,ip)
7772 fm1fm(im,ib,ip)=fm1fm(im,ib,ip)+fevfm(ib,ip)
7773 390 fm2fm(im,ib,ip)=fm2fm(im,ib,ip)+fevfm(ib,ip)**2
7775 nmufm=nmufm+(nupp-nlow)
7779 ELSEIF(mtabu.EQ.32)
THEN 7781 IF(mstu(42).LE.0)
WRITE(mstu(11),1400) nevfm,
'eta' 7782 IF(mstu(42).EQ.1)
WRITE(mstu(11),1400) nevfm,
'ypi' 7783 IF(mstu(42).GE.2)
WRITE(mstu(11),1400) nevfm,
'y ' 7785 WRITE(mstu(11),1500)
7788 IF(im.NE.2) byeta=byeta/2**(ib-1)
7790 IF(im.NE.1) bphi=bphi/2**(ib-1)
7791 IF(im.LE.2) bnave=
fac*nmufm/float(2**(ib-1))
7792 IF(im.EQ.3) bnave=
fac*nmufm/float(4**(ib-1))
7794 fmoma(ip)=
fac*fm1fm(im,ib,ip)
7795 410 fmoms(ip)=sqrt(
max(0.,
fac*(
fac*fm2fm(im,ib,ip)-fmoma(ip)**2)))
7796 420
WRITE(mstu(11),1600) byeta,bphi,bnave,(fmoma(ip),fmoms(ip),
7800 ELSEIF(mtabu.EQ.33)
THEN 7808 IF(im.NE.2) k(i,3)=2**(ib-1)
7810 IF(im.NE.1) k(i,4)=2**(ib-1)
7812 p(i,1)=2.*paru(57)/k(i,3)
7813 v(i,1)=paru(2)/k(i,4)
7815 p(i,ip+1)=
fac*fm1fm(im,ib,ip)
7816 430 v(i,ip+1)=sqrt(
max(0.,
fac*(
fac*fm2fm(im,ib,ip)-p(i,ip+1)**2)))
7828 ELSEIF(mtabu.EQ.40)
THEN 7839 ELSEIF(mtabu.EQ.41)
THEN 7845 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 460
7846 IF(mstu(41).GE.2)
THEN 7848 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
7849 & kc.EQ.18)
GOTO 460
7850 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
7854 IF(mstu(42).EQ.1.AND.k(i,2).NE.22) pmr=
ulmass(211)
7855 IF(mstu(42).GE.2) pmr=p(i,5)
7856 IF(nupp.GT.mstu(4)-5-mstu(32))
THEN 7857 CALL luerrm(11,
'(LUTABU:) no more memory left in LUJETS')
7864 p(nupp,4)=sqrt(pmr**2+p(i,1)**2+p(i,2)**2+p(i,3)**2)
7865 p(nupp,5)=
max(1
e-10,sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2))
7868 IF(nupp.EQ.nlow)
RETURN 7871 fac=(2./ecm**2)*50./paru(1)
7874 DO 480 i1=nlow+2,nupp
7875 DO 480 i2=nlow+1,i1-1
7876 cthe=(p(i1,1)*p(i2,1)+p(i1,2)*p(i2,2)+p(i1,3)*p(i2,3))/
7878 the=acos(
max(-1.,
min(1.,cthe)))
7879 ithe=
max(1,
min(50,1+int(50.*the/paru(1))))
7880 480 fevee(ithe)=fevee(ithe)+
fac*p(i1,4)*p(i2,4)
7882 fe1ec(j)=fe1ec(j)+fevee(j)
7883 fe2ec(j)=fe2ec(j)+fevee(j)**2
7884 fe1ec(51-j)=fe1ec(51-j)+fevee(51-j)
7885 fe2ec(51-j)=fe2ec(51-j)+fevee(51-j)**2
7886 fe1ea(j)=fe1ea(j)+(fevee(51-j)-fevee(j))
7887 490 fe2ea(j)=fe2ea(j)+(fevee(51-j)-fevee(j))**2
7891 ELSEIF(mtabu.EQ.42)
THEN 7893 WRITE(mstu(11),1700) nevee
7896 fees1=sqrt(
max(0.,
fac*(
fac*fe2ec(j)-feec1**2)))
7897 feec2=
fac*fe1ec(51-j)
7898 fees2=sqrt(
max(0.,
fac*(
fac*fe2ec(51-j)-feec2**2)))
7900 feesa=sqrt(
max(0.,
fac*(
fac*fe2ea(j)-feeca**2)))
7901 500
WRITE(mstu(11),1800) 3.6*(j-1),3.6*j,feec1,fees1,feec2,fees2,
7905 ELSEIF(mtabu.EQ.43)
THEN 7914 v(i,1)=sqrt(
max(0.,
fac*(
fac*fe2ec(i)-p(i,1)**2)))
7915 p(i,2)=
fac*fe1ec(51-i)
7916 v(i,2)=sqrt(
max(0.,
fac*(
fac*fe2ec(51-i)-p(i,2)**2)))
7918 v(i,3)=sqrt(
max(0.,
fac*(
fac*fe2ea(i)-p(i,3)**2)))
7919 p(i,4)=paru(1)*(i-1)/50.
7920 p(i,5)=paru(1)*i/50.
7934 ELSEIF(mtabu.EQ.50)
THEN 7940 ELSEIF(mtabu.EQ.51)
THEN 7944 IF(k(i,1).LE.0.OR.k(i,1).GE.6)
GOTO 550
7951 IF(k(i,2).LT.0) kfm=kfm-1
7952 DO 530 ids=nds-1,1,-1
7954 IF(kfm.LT.kfdm(ids))
GOTO 540
7955 530 kfdm(ids+1)=kfdm(ids)
7962 IF(nds.LT.kfdc(idc,0))
THEN 7965 ELSEIF(nds.EQ.kfdc(idc,0))
THEN 7967 IF(kfdm(i).LT.kfdc(idc,i))
THEN 7970 ELSEIF(kfdm(i).GT.kfdc(idc,i))
THEN 7979 580
IF(ikfdc.LT.0)
THEN 7981 ELSEIF(nkfdc.GE.200)
THEN 7985 DO 590 idc=nkfdc,ikfdc,-1
7986 npdc(idc+1)=npdc(idc)
7988 590 kfdc(idc+1,i)=kfdc(idc,i)
7992 600 kfdc(ikfdc,i)=kfdm(i)
7995 npdc(ikfdc)=npdc(ikfdc)+1
7998 ELSEIF(mtabu.EQ.52)
THEN 8000 WRITE(mstu(11),1900) nevdc
8002 DO 610 i=1,kfdc(idc,0)
8005 IF(2*kf.NE.kfm) kf=-kf
8008 610
IF(chau(13:13).NE.
' ') chdc(i)(12:12)=
'?' 8009 620
WRITE(mstu(11),2000)
fac*npdc(idc),(chdc(i),i=1,kfdc(idc,0))
8010 IF(nredc.NE.0)
WRITE(mstu(11),2100)
fac*nredc
8013 ELSEIF(mtabu.EQ.53)
THEN 8020 k(idc,5)=kfdc(idc,0)
8024 DO 640 i=1,kfdc(idc,0)
8027 IF(2*kf.NE.kfm) kf=-kf
8028 IF(i.LE.5) p(idc,i)=kf
8029 640
IF(i.GE.6) v(idc,i-5)=kf
8030 650 v(idc,5)=
fac*npdc(idc)
8044 1000
FORMAT(///20
x,
'Event statistics - initial state'/
8045 &20
x,
'based on an analysis of ',i6,
' events'//
8046 &3
x,
'Main flavours after',8
x,
'Fraction',4
x,
'Subfractions ',
8047 &
'according to fragmenting system multiplicity'/
8048 &4
x,
'hard interaction',24
x,
'1',7
x,
'2',7
x,
'3',7
x,
'4',7
x,
'5',
8049 &6
x,
'6-7',5
x,
'8-10',3
x,
'11-15',3
x,
'16-25',4
x,
'>25'/)
8050 1100
FORMAT(3
x,a12,1
x,a12,f10.5,1
x,10f8.4)
8051 1200
FORMAT(///20
x,
'Event statistics - final state'/
8052 &20
x,
'based on an analysis of ',i6,
' events'//
8053 &5
x,
'Mean primary multiplicity =',f8.3/
8054 &5
x,
'Mean final multiplicity =',f8.3/
8055 &5
x,
'Mean charged multiplicity =',f8.3//
8056 &5
x,
'Number of particles produced per event (directly and via ',
8057 &
'decays/branchings)'/
8058 &5
x,
'KF Particle/jet MDCY',8
x,
'Particles',9
x,
'Antiparticles',
8059 &5
x,
'Total'/34
x,
'prim seco prim seco'/)
8060 1300
FORMAT(1
x,i6,4
x,a16,i2,5(1
x,f9.4))
8061 1400
FORMAT(///20
x,
'Factorial moments analysis of multiplicity'/
8062 &20
x,
'based on an analysis of ',i6,
' events'//
8063 &3
x,
'delta-',
a3,
' delta-phi <n>/bin',10
x,
'<F2>',18
x,
'<F3>',
8064 &18
x,
'<F4>',18
x,
'<F5>'/35
x,4(
' value error '))
8066 1600
FORMAT(2
x,2f10.4,f12.4,4(f12.4,f10.4))
8067 1700
FORMAT(///20
x,
'Energy-Energy Correlation and Asymmetry'/
8068 &20
x,
'based on an analysis of ',i6,
' events'//
8069 &2
x,
'theta range',8
x,
'EEC(theta)',8
x,
'EEC(180-theta)',7
x,
8070 &
'EECA(theta)'/2
x,
'in degrees ',3(
' value error')/)
8071 1800
FORMAT(2
x,
f4.1,
' - ',
f4.1,3(f11.4,f9.4))
8072 1900
FORMAT(///20
x,
'Decay channel analysis - final state'/
8073 &20
x,
'based on an analysis of ',i6,
' events'//
8074 &2
x,
'Probability',10
x,
'Complete final state'/)
8075 2000
FORMAT(2
x,f9.5,5
x,8(a12,1
x))
8076 2100
FORMAT(2
x,f9.5,5
x,
'into other channels (more than 8 particles ',
8077 &
'or table overflow)')
8084 SUBROUTINE lueevt(KFL,ECM)
8087 IMPLICIT DOUBLE PRECISION(
d)
8088 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
8090 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8092 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
8096 IF(mstu(12).GE.1)
CALL lulist(0)
8097 IF(kfl.LT.0.OR.kfl.GT.8)
THEN 8098 CALL luerrm(16,
'(LUEEVT:) called with unknown flavour code')
8099 IF(mstu(21).GE.1)
RETURN 8101 IF(kfl.LE.5) ecmmin=parj(127)+2.02*parf(100+
max(1,kfl))
8102 IF(kfl.GE.6) ecmmin=parj(127)+2.02*pmas(kfl,1)
8103 IF(ecm.LT.ecmmin)
THEN 8104 CALL luerrm(16,
'(LUEEVT:) called with too small CM energy')
8105 IF(mstu(21).GE.1)
RETURN 8109 IF(mstj(109).EQ.2.AND.mstj(110).NE.1)
THEN 8111 &
'(LUEEVT:) MSTJ(109) value requires MSTJ(110) = 1')
8114 IF(mstj(109).EQ.2.AND.mstj(111).NE.0)
THEN 8116 &
'(LUEEVT:) MSTJ(109) value requires MSTJ(111) = 0')
8122 IF(mstj(108).EQ.2.AND.(mstj(101).EQ.0.OR.mstj(101).EQ.1))
8125 IF(mstu(111).EQ.2) paru(112)=parj(122)
8126 IF(mstj(116).GT.0.AND.(mstj(116).GE.2.OR.abs(ecm-parj(151)).GE.
8127 &parj(139).OR.10*mstj(102)+kfl.NE.mstj(119)))
CALL luxtot(kfl,ecm,
8129 IF(mstj(116).GE.3) mstj(116)=1
8134 IF(ntry.GT.100)
THEN 8135 CALL luerrm(14,
'(LUEEVT:) caught in an infinite loop')
8139 IF(mstj(115).GE.2)
THEN 8141 CALL lu1ent(nc-1,11,0.5*ecm,0.,0.)
8143 CALL lu1ent(nc,-11,0.5*ecm,paru(1),0.)
8150 IF(mstj(107).GE.1.AND.mstj(116).GE.1)
CALL luradk(ecm,mk,pak,
8152 IF(mk.EQ.1) ecmc=sqrt(ecm*(ecm-2.*pak))
8153 IF(mstj(115).GE.1.AND.mk.EQ.1)
THEN 8155 CALL lu1ent(nc,22,pak,thek,phik)
8156 k(nc,3)=
min(mstj(115)/2,1)
8160 IF(mstj(115).GE.3)
THEN 8163 IF(mstj(102).EQ.2) kf=23
8167 CALL lu1ent(nc,kf,ecmc,0.,0.)
8174 CALL luxkfl(kfl,ecm,ecmc,kflc)
8175 IF(kflc.EQ.0)
GOTO 100
8176 CALL luxjet(ecmc,njet,cut)
8178 IF(njet.EQ.4)
CALL lux4jt(njet,cut,kflc,ecmc,kfln,
x1,
x2,x4,
8180 IF(njet.EQ.3)
CALL lux3jt(njet,cut,kflc,ecmc,
x1,x3)
8181 IF(njet.EQ.2) mstj(120)=1
8184 IF(njet.EQ.2.AND.mstj(101).NE.5)
CALL lu2ent(nc+1,kflc,-kflc,ecmc)
8185 IF(njet.EQ.2.AND.mstj(101).EQ.5)
CALL lu2ent(-(nc+1),kflc,-kflc,
8187 IF(njet.EQ.3)
CALL lu3ent(nc+1,kflc,21,-kflc,ecmc,
x1,x3)
8188 IF(njet.EQ.4.AND.kfln.EQ.21)
CALL lu4ent(nc+1,kflc,kfln,kfln,
8189 &-kflc,ecmc,
x1,
x2,x4,x12,x14)
8190 IF(njet.EQ.4.AND.kfln.NE.21)
CALL lu4ent(nc+1,kflc,-kfln,kfln,
8191 &-kflc,ecmc,
x1,
x2,x4,x12,x14)
8193 110 k(ip,3)=k(ip,3)+
min(mstj(115)/2,1)+(mstj(115)/3)*(nc-1)
8196 IF(mstj(106).EQ.1)
THEN 8197 CALL luxdif(nc,njet,kflc,ecmc,chi,the,phi)
8198 CALL ludbrb(nc+1,
n,0.,chi,0d0,0d0,0d0)
8199 CALL ludbrb(nc+1,
n,the,phi,0d0,0d0,0d0)
8205 nmin=nc+1-mstj(115)/3
8206 CALL ludbrb(nmin,
n,0.,-phik,0d0,0d0,0d0)
8207 CALL ludbrb(nmin,
n,alpk,0.,dbek*sin(thek),0d0,dbek*cos(thek))
8208 CALL ludbrb(nmin,
n,0.,phik,0d0,0d0,0d0)
8212 IF(mstj(101).EQ.5)
THEN 8215 IF(mstj(105).EQ.-1) mstj(14)=0
8216 IF(mstj(105).GE.0) mstu(28)=0
8219 IF(mstj(105).GE.0.AND.mstu(28).NE.0)
GOTO 100
8223 IF(mstj(105).EQ.1)
CALL luexec 8232 SUBROUTINE luxtot(KFL,ECM,XTOT)
8236 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8238 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
8243 mstj(119)=10*mstj(102)+kfl
8244 IF(mstj(111).EQ.0)
THEN 8246 ELSEIF(mstu(111).EQ.0)
THEN 8247 parj(168)=
min(1.,
max(parj(128),exp(-12.*paru(1)/
8248 & ((33.-2.*mstu(112))*paru(111)))))
8249 q2r=parj(168)*ecm**2
8251 parj(168)=
min(1.,
max(parj(128),paru(112)/ecm,
8252 & (2.*paru(112)/ecm)**2))
8253 q2r=parj(168)*ecm**2
8255 alspi=
ulalps(q2r)/paru(1)
8258 IF(mstj(101).EQ.0.OR.mstj(109).EQ.1)
THEN 8260 ELSEIF(iabs(mstj(101)).EQ.1.AND.mstj(109).EQ.0)
THEN 8262 ELSEIF(mstj(109).EQ.0)
THEN 8263 rqcd=1.+alspi+(1.986-0.115*mstu(118))*alspi**2
8264 IF(mstj(111).EQ.1) rqcd=
max(1.,rqcd+(33.-2.*mstu(112))/12.*
8265 & log(parj(168))*alspi**2)
8266 ELSEIF(iabs(mstj(101)).EQ.1)
THEN 8267 rqcd=1.+(3./4.)*alspi
8269 rqcd=1.+(3./4.)*alspi-(3./32.+0.519*mstu(118))*alspi**2
8273 IF(mstj(102).GE.3)
THEN 8274 rva=3.*(3.+(4.*paru(102)-1.)**2)+6.*rqcd*(2.+(1.-8.*paru(102)/
8275 & 3.)**2+(4.*paru(102)/3.-1.)**2)
8278 IF(mod(mstj(103),2).EQ.1) vq=sqrt(
max(0.,1.-(2.*
ulmass(kflc)/
8280 IF(kflc.EQ.5) vf=4.*paru(102)/3.-1.
8281 IF(kflc.EQ.6) vf=1.-8.*paru(102)/3.
8282 100 rva=rva+3.*rqcd*(0.5*vq*(3.-vq**2)*vf**2+vq**3)
8283 parj(124)=paru(101)*parj(123)*rva/(48.*paru(102)*(1.-paru(102)))
8287 poll=1.-parj(131)*parj(132)
8288 IF(mstj(102).GE.2)
THEN 8289 sff=1./(16.*paru(102)*(1.-paru(102)))
8290 sfw=ecm**4/((ecm**2-parj(123)**2)**2+(parj(123)*parj(124))**2)
8291 sfi=sfw*(1.-(parj(123)/ecm)**2)
8293 sf1i=sff*(ve*poll+parj(132)-parj(131))
8294 sf1w=sff**2*((ve**2+1.)*poll+2.*ve*(parj(132)-parj(131)))
8304 DO 110 kflc=1,
max(mstj(104),kfl)
8305 IF(kfl.GT.0.AND.kflc.NE.kfl)
GOTO 110
8308 IF(ecm.LT.2.*pmq+parj(127))
GOTO 110
8311 IF(mod(mstj(103),2).EQ.1) vq=sqrt(1.-(2.*pmq/ecm)**2)
8314 rqq=rqq+3.*qf**2*poll
8315 IF(mstj(102).LE.1)
THEN 8316 rtot=rtot+3.*0.5*vq*(3.-vq**2)*qf**2*poll
8318 vf=sign(1.,qf)-4.*qf*paru(102)
8319 rqv=rqv-6.*qf*vf*sf1i
8320 rva=rva+3.*(vf**2+1.)*sf1w
8321 rtot=rtot+3.*(0.5*vq*(3.-vq**2)*(qf**2*poll-2.*qf*vf*hf1i+
8322 & vf**2*hf1w)+vq**3*hf1w)
8326 IF(mstj(102).GE.2) rsum=rqq+sfi*rqv+sfw*rva
8333 parj(145)=parj(141)*86.8/ecm**2
8334 parj(146)=parj(142)*86.8/ecm**2
8335 parj(147)=parj(143)*86.8/ecm**2
8341 IF(mstj(107).LE.0)
RETURN 8345 xku=
min(parj(136),1.-(2.*parj(127)/ecm)**2)
8346 ale=2.*log(ecm/
ulmass(11))-1.
8347 sigv=ale/3.+2.*log(ecm**2/(
ulmass(13)*
ulmass(15)))/3.-4./3.+
8348 &1.526*log(ecm**2/0.932)
8351 IF(mstj(102).LE.1)
THEN 8352 sigv=1.5*ale-0.5+paru(1)**2/3.+2.*sigv
8353 sigs=ale*(2.*log(xkl)-log(1.-xkl)-xkl)
8354 sigh=ale*(2.*log(xku/xkl)-log((1.-xku)/(1.-xkl))-(xku-xkl))
8358 szm=1.-(parj(123)/ecm)**2
8359 szw=parj(123)*parj(124)/ecm**2
8361 parj(162)=-(rqq+rqv+rva)/rsum
8362 parj(163)=(rqv*(1.-0.5*szm-sfi)+rva*(1.5-szm-sfw))/rsum
8363 parj(164)=(rqv*szw**2*(1.-2.*sfw)+rva*(2.*sfi+szw**2-4.+3.*szm-
8364 & szm**2))/(szw*rsum)
8365 sigv=1.5*ale-0.5+paru(1)**2/3.+((2.*rqq+sfi*rqv)/rsum)*sigv+
8366 & (szw*sfw*rqv/rsum)*paru(1)*20./9.
8367 sigs=ale*(2.*log(xkl)+parj(161)*log(1.-xkl)+parj(162)*xkl+
8368 & parj(163)*log(((xkl-szm)**2+szw**2)/(szm**2+szw**2))+
8369 & parj(164)*(atan((xkl-szm)/szw)-atan(-szm/szw)))
8370 sigh=ale*(2.*log(xku/xkl)+parj(161)*log((1.-xku)/(1.-xkl))+
8371 & parj(162)*(xku-xkl)+parj(163)*log(((xku-szm)**2+szw**2)/
8372 & ((xkl-szm)**2+szw**2))+parj(164)*(atan((xku-szm)/szw)-
8373 & atan((xkl-szm)/szw)))
8377 parj(160)=sigh/(paru(1)/paru(101)+sigv+sigs+sigh)
8378 parj(157)=rsum*(1.+(paru(101)/paru(1))*(sigv+sigs+sigh))*rqcd
8380 parj(148)=parj(144)*86.8/ecm**2
8388 SUBROUTINE luradk(ECM,MK,PAK,THEK,PHIK,ALPK)
8391 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8395 fxk(
xx)=2.*log(
xx)+parj(161)*log(1.-
xx)+parj(162)*
xx+
8396 &parj(163)*log((
xx-szm)**2+szw**2)+parj(164)*atan((
xx-szm)/szw)
8401 IF(parj(160).LT.
rlu(0))
RETURN 8406 xku=
min(parj(136),1.-(2.*parj(127)/ecm)**2)
8407 IF(mstj(102).LE.1)
THEN 8408 100 xk=1./(1.+(1./xkl-1.)*((1./xku-1.)/(1./xkl-1.))**
rlu(0))
8409 IF(1.+(1.-xk)**2.LT.2.*
rlu(0))
GOTO 100
8413 szm=1.-(parj(123)/ecm)**2
8414 szw=parj(123)*parj(124)/ecm**2
8417 fxkd=1
e-4*(fxku-fxkl)
8418 fxkr=fxkl+
rlu(0)*(fxku-fxkl)
8423 IF(fxkv.GT.fxkr)
THEN 8430 IF(nxk.LT.15.AND.fxku-fxkl.GT.fxkd)
GOTO 110
8431 xk=xkl+(xku-xkl)*(fxkr-fxkl)/(fxku-fxkl)
8436 pme=2.*(
ulmass(11)/ecm)**2
8437 120 cthm=pme*(2./pme)**
rlu(0)
8438 IF(1.-(xk**2*cthm*(1.-0.5*cthm)+2.*(1.-xk)*pme/
max(pme,
8439 &cthm*(1.-0.5*cthm)))/(1.+(1.-xk)**2).LT.
rlu(0))
GOTO 120
8441 IF(
rlu(0).GT.0.5) cthe=-cthe
8442 sthe=sqrt(
max(0.,(cthm-pme)*(2.-cthm)))
8448 IF(0.5*(2.-xk*(1.-cthe))**2/((2.-xk)**2+(xk*cthe)**2).GT.
8450 alpk=asin(sgn*sthe*(xk-sgn*(2.*sqrt(1.-xk)-2.+xk)*cthe)/
8451 &(2.-xk*(1.-sgn*cthe)))
8458 SUBROUTINE luxkfl(KFL,ECM,ECMC,KFLC)
8461 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8463 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
8467 IF(mstj(102).LE.1)
THEN 8470 poll=1.-parj(131)*parj(132)
8471 sff=1./(16.*paru(102)*(1.-paru(102)))
8472 sfw=ecmc**4/((ecmc**2-parj(123)**2)**2+(parj(123)*parj(124))**2)
8485 IF(ntry.GT.100)
THEN 8486 CALL luerrm(14,
'(LUXKFL:) caught in an infinite loop')
8491 IF(kfl.LE.0) kflc=1+int(mstj(104)*
rlu(0))
8494 IF(ecm.LT.2.*pmq+parj(127))
GOTO 100
8497 IF(mod(mstj(103),2).EQ.1) vq=sqrt(
max(0.,1.-(2.*pmq/ecmc)**2))
8500 IF(mstj(102).LE.1)
THEN 8502 rfv=0.5*vq*(3.-vq**2)*qf**2
8504 vf=sign(1.,qf)-4.*qf*paru(102)
8505 rf=qf**2*poll-2.*qf*vf*hf1i+(vf**2+1.)*hf1w
8506 rfv=0.5*vq*(3.-vq**2)*(qf**2*poll-2.*qf*vf*hf1i+vf**2*hf1w)+
8511 IF(kfl.LE.0.AND.rf.LT.
rlu(0)*rfmax)
GOTO 100
8512 parj(158)=parj(158)+1.
8513 IF(ecmc.LT.2.*pmq+parj(127).OR.rfv.LT.
rlu(0)*rf) kflc=0
8514 IF(mstj(107).LE.0.AND.kflc.EQ.0)
GOTO 100
8515 IF(kflc.NE.0) parj(159)=parj(159)+1.
8516 parj(144)=parj(157)*parj(159)/parj(158)
8517 parj(148)=parj(144)*86.8/ecm**2
8524 SUBROUTINE luxjet(ECM,NJET,CUT)
8527 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8532 DATA zhut/3.0922, 6.2291, 7.4782, 7.8440, 8.2560/
8535 IF(mstj(101).EQ.0.OR.mstj(101).EQ.5)
THEN 8539 ELSEIF(mstj(109).EQ.0.OR.mstj(109).EQ.2)
THEN 8541 IF(mstj(109).EQ.2) cf=1.
8542 IF(mstj(111).EQ.0)
THEN 8545 ELSEIF(mstu(111).EQ.0)
THEN 8546 parj(169)=
min(1.,parj(129))
8548 parj(168)=
min(1.,
max(parj(128),exp(-12.*paru(1)/
8549 & ((33.-2.*mstu(112))*paru(111)))))
8550 q2r=parj(168)*ecm**2
8552 parj(169)=
min(1.,
max(parj(129),(2.*paru(112)/ecm)**2))
8554 parj(168)=
min(1.,
max(parj(128),paru(112)/ecm,
8555 & (2.*paru(112)/ecm)**2))
8556 q2r=parj(168)*ecm**2
8560 alspi=(3./4.)*cf*
ulalps(q2r)/paru(1)
8561 IF(iabs(mstj(101)).EQ.1)
THEN 8563 ELSEIF(mstj(109).EQ.0)
THEN 8564 rqcd=1.+alspi+(1.986-0.115*mstu(118))*alspi**2
8565 IF(mstj(111).EQ.1) rqcd=
max(1.,rqcd+(33.-2.*mstu(112))/12.*
8566 & log(parj(168))*alspi**2)
8568 rqcd=1.+alspi-(3./32.+0.519*mstu(118))*(4.*alspi/3.)**2
8572 alspi=(3./4.)*cf*
ulalps(q2)/paru(1)
8573 cut=
max(0.001,parj(125),(parj(126)/ecm)**2)
8574 IF(iabs(mstj(101)).LE.1.OR.(mstj(109).EQ.0.AND.mstj(111).EQ.0))
8575 & cut=
max(cut,exp(-sqrt(0.75/alspi))/2.)
8576 IF(mstj(110).EQ.2) cut=
max(0.01,
min(0.05,cut))
8579 100
IF(mstj(101).EQ.0.OR.cut.GE.0.25)
THEN 8582 parj(152)=(2.*alspi/3.)*((3.-6.*cut+2.*log(cut))*
8583 & log(cut/(1.-2.*cut))+(2.5+1.5*cut-6.571)*(1.-3.*cut)+
8584 & 5.833*(1.-3.*cut)**2-3.894*(1.-3.*cut)**3+
8585 & 1.342*(1.-3.*cut)**4)/rqcd
8586 IF(mstj(109).EQ.2.AND.(mstj(101).EQ.2.OR.mstj(101).LE.-2))
8591 IF(iabs(mstj(101)).LE.1.OR.mstj(101).EQ.3.OR.mstj(109).EQ.2.OR.
8594 ELSEIF(mstj(110).LE.1)
THEN 8596 parj(153)=alspi**2*ct**2*(2.419+0.5989*ct+0.6782*ct**2-
8597 & 0.2661*ct**3+0.01159*ct**4)/rqcd
8600 ELSEIF(mstj(110).EQ.2)
THEN 8603 110
IF(abs(cut-0.01*iy).LT.0.0001) iza=iy
8608 zhurat=zhut(
iz)+(100.*cut-
iz)*(zhut(
iz+1)-zhut(
iz))
8610 parj(153)=alspi*parj(152)*zhurat
8614 IF(mstj(111).EQ.1.AND.iabs(mstj(101)).GE.2.AND.mstj(101).NE.3.
8615 & and.cut.LT.0.25) parj(153)=parj(153)+(33.-2.*mstu(112))/12.*
8616 & log(parj(169))*alspi*parj(152)
8619 IF(iabs(mstj(101)).LE.1.OR.cut.GE.0.125)
THEN 8623 IF(cut.LE.0.018)
THEN 8624 xqqgg=6.349-4.330*ct+0.8304*ct**2
8625 IF(mstj(109).EQ.2) xqqgg=(4./3.)**2*(3.035-2.091*ct+
8627 xqqqq=1.25*(-0.1080+0.01486*ct+0.009364*ct**2)
8628 IF(mstj(109).EQ.2) xqqqq=8.*xqqqq
8630 xqqgg=-0.09773+0.2959*ct-0.2764*ct**2+0.08832*ct**3
8631 IF(mstj(109).EQ.2) xqqgg=(4./3.)**2*(-0.04079+0.1340*ct-
8632 & 0.1326*ct**2+0.04365*ct**3)
8633 xqqqq=1.25*(0.003661-0.004888*ct-0.001081*ct**2+0.002093*
8635 IF(mstj(109).EQ.2) xqqqq=8.*xqqqq
8637 parj(154)=alspi**2*ct**2*(xqqgg+xqqqq)/rqcd
8638 parj(155)=xqqqq/(xqqgg+xqqqq)
8642 IF(mstj(111).EQ.1.AND.parj(152)+parj(153).LT.0..AND.
8643 & parj(169).LT.0.99)
THEN 8644 parj(169)=
min(1.,1.2*parj(169))
8646 alspi=(3./4.)*cf*
ulalps(q2)/paru(1)
8651 IF(parj(152)+parj(153)+parj(154).GE.1)
THEN 8652 IF(mstj(110).EQ.2.AND.cut.GT.0.0499.AND.mstj(111).EQ.1.AND.
8653 & parj(169).LT.0.99)
THEN 8654 parj(169)=
min(1.,1.2*parj(169))
8656 alspi=(3./4.)*cf*
ulalps(q2)/paru(1)
8658 ELSEIF(mstj(110).EQ.2.AND.cut.GT.0.0499)
THEN 8660 &
'(LUXJET:) no allowed y cut value for Zhu parametrization')
8662 cut=0.26*(4.*cut)**(parj(152)+parj(153)+parj(154))**(-1./3.)
8663 IF(mstj(110).EQ.2) cut=
max(0.01,
min(0.05,cut))
8669 alspi=
ulalps(ecm**2)/paru(1)
8670 cut=
max(0.001,parj(125),(parj(126)/ecm)**2,exp(-3./alspi))
8672 IF(cut.LT.0.25) parj(152)=(alspi/3.)*((1.-2.*cut)*
8673 & log((1.-2.*cut)/cut)+0.5*(9.*cut**2-1.))
8680 IF(mstj(101).EQ.0.OR.mstj(101).EQ.5)
THEN 8682 ELSEIF(mstj(101).LE.0)
THEN 8683 njet=
min(4,2-mstj(101))
8687 IF(parj(152)+parj(153)+parj(154).GT.rnj) njet=3
8688 IF(parj(154).GT.rnj) njet=4
8696 SUBROUTINE lux3jt(NJET,CUT,KFL,ECM,X1,X2)
8699 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8701 dimension zhup(5,12)
8704 DATA ((zhup(ic1,ic2),ic2=1,12),ic1=1,5)/
8705 & 18.29, 89.56, 4.541, -52.09, -109.8, 24.90,
8706 & 11.63, 3.683, 17.50, 0.002440, -1.362, -0.3537,
8707 & 11.42, 6.299, -22.55, -8.915, 59.25, -5.855,
8708 & -32.85, -1.054, -16.90, 0.006489, -0.8156, 0.01095,
8709 & 7.847, -3.964, -35.83, 1.178, 29.39, 0.2806,
8710 & 47.82, -12.36, -56.72, 0.04054, -0.4365, 0.6062,
8711 & 5.441, -56.89, -50.27, 15.13, 114.3, -18.19,
8712 & 97.05, -1.890, -139.9, 0.08153, -0.4984, 0.9439,
8713 & -17.65, 51.44, -58.32, 70.95, -255.7, -78.99,
8714 & 476.9, 29.65, -239.3, 0.4745, -1.174, 6.081/
8717 dilog(
x)=
x+
x**2/4.+
x**3/9.+
x**4/16.+
x**5/25.+
x**6/36.+
x**7/49.
8724 IF(mstj(109).NE.1)
THEN 8727 IF(mstj(109).EQ.0)
THEN 8731 wtmx=
min(20.,37.-6.*cutd)
8732 IF(mstj(110).EQ.2) wtmx=2.*(7.5+80.*cut)
8741 als2pi=paru(118)/paru(2)
8743 IF(mstj(111).EQ.1) wtopt=(33.-2.*mstu(112))/6.*log(parj(169))*
8745 wtmax=
max(0.,1.+wtopt+als2pi*wtmx)
8749 110 y13l=cutl+cutd*
rlu(0)
8750 y23l=cutl+cutd*
rlu(0)
8754 IF(y12.LE.cut)
GOTO 110
8755 IF(y13**2+y23**2+2.*y12.LE.2.*
rlu(0))
GOTO 110
8758 IF(mstj(101).EQ.2.AND.mstj(110).LE.1)
THEN 8763 IF(y13.LE.0.5) y13i=dilog(y13)
8764 IF(y13.GE.0.5) y13i=1.644934-y13l*y13m-dilog(1.-y13)
8765 IF(y23.LE.0.5) y23i=dilog(y23)
8766 IF(y23.GE.0.5) y23i=1.644934-y23l*y23m-dilog(1.-y23)
8767 IF(y12.LE.0.5) y12i=dilog(y12)
8768 IF(y12.GE.0.5) y12i=1.644934-y12l*y12m-dilog(1.-y12)
8769 wt1=(y13**2+y23**2+2.*y12)/(y13*y23)
8770 wt2=cf*(-2.*(cutl-y12l)**2-3.*cutl-1.+3.289868+
8771 & 2.*(2.*cutl-y12l)*cut/y12)+
8772 & cn*((cutl-y12l)**2-(cutl-y13l)**2-(cutl-y23l)**2-11.*cutl/6.+
8773 & 67./18.+1.644934-(2.*cutl-y12l)*cut/y12+(2.*cutl-y13l)*
8774 & cut/y13+(2.*cutl-y23l)*cut/y23)+
8775 & tr*(2.*cutl/3.-10./9.)+
8776 & cf*(y12/(y12+y13)+y12/(y12+y23)+(y12+y23)/y13+(y12+y13)/y23+
8777 & y13l*(4.*y12**2+2.*y12*y13+4.*y12*y23+y13*y23)/(y12+y23)**2+
8778 & y23l*(4.*y12**2+2.*y12*y23+4.*y12*y13+y13*y23)/(y12+y13)**2)/
8780 & cn*(y13l*y13/(y12+y23)+y23l*y23/(y12+y13))/wt1+
8781 & (cn-2.*cf)*((y12**2+(y12+y13)**2)*(y12l*y23l-y12l*y12m-y23l*
8782 & y23m+1.644934-y12i-y23i)/(y13*y23)+(y12**2+(y12+y23)**2)*
8783 & (y12l*y13l-y12l*y12m-y13l*y13m+1.644934-y12i-y13i)/
8784 & (y13*y23)+(y13**2+y23**2)/(y13*y23*(y13+y23))-
8785 & 2.*y12l*y12**2/(y13+y23)**2-4.*y12l*y12/(y13+y23))/wt1-
8786 & cn*(y13l*y23l-y13l*y13m-y23l*y23m+1.644934-y13i-y23i)
8787 IF(1.+wtopt+als2pi*wt2.LE.0.) mstj(121)=1
8788 IF(1.+wtopt+als2pi*wt2.LE.wtmax*
rlu(0))
GOTO 110
8789 parj(156)=(wtopt+als2pi*wt2)/(1.+wtopt+als2pi*wt2)
8791 ELSEIF(mstj(101).EQ.2.AND.mstj(110).EQ.2)
THEN 8797 120
IF(abs(cut-0.01*iy).LT.0.0001) iza=iy
8800 wt2=zhup(
iz,1)+zhup(
iz,2)*zx+zhup(
iz,3)*zx**2+(zhup(
iz,4)+
8801 & zhup(
iz,5)*zx)*zy+(zhup(
iz,6)+zhup(
iz,7)*zx)*zy**2+
8802 & (zhup(
iz,8)+zhup(
iz,9)*zx)*zy**3+zhup(
iz,10)/(zx-zy**2)+
8803 & zhup(
iz,11)/(1.-zy)+zhup(
iz,12)/zy
8806 wtl=zhup(
iz,1)+zhup(
iz,2)*zx+zhup(
iz,3)*zx**2+(zhup(
iz,4)+
8807 & zhup(
iz,5)*zx)*zy+(zhup(
iz,6)+zhup(
iz,7)*zx)*zy**2+
8808 & (zhup(
iz,8)+zhup(
iz,9)*zx)*zy**3+zhup(
iz,10)/(zx-zy**2)+
8809 & zhup(
iz,11)/(1.-zy)+zhup(
iz,12)/zy
8811 wtu=zhup(
iz,1)+zhup(
iz,2)*zx+zhup(
iz,3)*zx**2+(zhup(
iz,4)+
8812 & zhup(
iz,5)*zx)*zy+(zhup(
iz,6)+zhup(
iz,7)*zx)*zy**2+
8813 & (zhup(
iz,8)+zhup(
iz,9)*zx)*zy**3+zhup(
iz,10)/(zx-zy**2)+
8814 & zhup(
iz,11)/(1.-zy)+zhup(
iz,12)/zy
8815 wt2=wtl+(wtu-wtl)*(100.*cut+1.-
iz)
8817 IF(1.+wtopt+2.*als2pi*wt2.LE.0.) mstj(121)=1
8818 IF(1.+wtopt+2.*als2pi*wt2.LE.wtmax*
rlu(0))
GOTO 110
8819 parj(156)=(wtopt+2.*als2pi*wt2)/(1.+wtopt+2.*als2pi*wt2)
8826 IF(4.*y23*y13*y12/x3**2.LE.qme) njet=2
8827 IF(mod(mstj(103),4).GE.2.AND.iabs(mstj(101)).LE.1.AND.qme*x3+
8828 & 0.5*qme**2+(0.5*qme+0.25*qme**2)*((1.-
x2)/(1.-
x1)+
8829 & (1.-
x1)/(1.-
x2)).GT.(
x1**2+
x2**2)*
rlu(0)) njet=2
8830 IF(mstj(101).EQ.-1.AND.njet.EQ.2)
GOTO 100
8835 140 y12=sqrt(4.*cut**2+
rlu(0)*((1.-cut)**2-4.*cut**2))
8836 IF(log((y12-cut)/cut).LE.
rlu(0)*log((1.-2.*cut)/cut))
GOTO 140
8837 yd=sign(2.*cut*((y12-cut)/cut)**
rlu(0)-y12,
rlu(0)-0.5)
8840 IF(4.*(1.-
x1)*(1.-
x2)*y12/(1.-y12)**2.LE.qme) njet=2
8841 IF(mstj(101).EQ.-1.AND.njet.EQ.2)
GOTO 130
8849 SUBROUTINE lux4jt(NJET,CUT,KFL,ECM,KFLN,X1,X2,X4,X12,X14)
8852 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8854 dimension wta(4),wtb(4),wtc(4),wtd(4),wte(4)
8860 IF(mstj(109).EQ.0)
THEN 8873 IF(parj(155).GT.
rlu(0)) it=2
8874 IF(mstj(101).LE.-3) it=-mstj(101)-2
8875 IF(it.EQ.1) wtmx=0.7/cut**2
8876 IF(it.EQ.1.AND.mstj(109).EQ.2) wtmx=0.6/cut**2
8877 IF(it.EQ.2) wtmx=0.1125*cf*tr/cut**2
8881 110 y134=3.*cut+(1.-6.*cut)*
rlu(0)
8882 y234=3.*cut+(1.-6.*cut)*
rlu(0)
8883 IF(it.EQ.1) y34=(1.-5.*cut)*exp(-ct*
rlu(0))
8884 IF(it.EQ.2) y34=cut+(1.-6.*cut)*
rlu(0)
8885 IF(y34.LE.y134+y234-1..OR.y34.GE.y134*y234)
GOTO 110
8887 cp=cos(paru(1)*
rlu(0))
8890 vb=y34*(1.-y134-y234+y34)/((y134-y34)*(y234-y34))
8891 y24=0.5*(y234-y34)*(1.-4.*sqrt(
max(0.,vt*(1.-vt)*vb*(1.-vb)))*
8892 &
cp-(1.-2.*vt)*(1.-2.*vb))
8895 IF(
min(y12,y13,y14,y23,y24).LE.cut)
GOTO 110
8904 wta(ic)=(y12*y34**2-y13*y24*y34+y14*y23*y34+3.*y12*y23*y34+
8905 & 3.*y12*y14*y34+4.*y12**2*y34-y13*y23*y24+2.*y12*y23*y24-
8906 & y13*y14*y24-2.*y12*y13*y24+2.*y12**2*y24+y14*y23**2+2.*y12*
8907 & y23**2+y14**2*y23+4.*y12*y14*y23+4.*y12**2*y23+2.*y12*y14**2+
8908 & 2.*y12*y13*y14+4.*y12**2*y14+2.*y12**2*y13+2.*y12**3)/(2.*y13*
8909 & y134*y234*y24)+(y24*y34+y12*y34+y13*y24-y14*y23+y12*y13)/(y13*
8910 & y134**2)+2.*y23*(1.-y13)/(y13*y134*y24)+y34/(2.*y13*y24)
8911 wtb(ic)=(y12*y24*y34+y12*y14*y34-y13*y24**2+y13*y14*y24+2.*y12*
8912 & y14*y24)/(y13*y134*y23*y14)+y12*(1.+y34)*y124/(y134*y234*y14*
8913 & y24)-(2.*y13*y24+y14**2+y13*y23+2.*y12*y13)/(y13*y134*y14)+
8914 & y12*y123*y124/(2.*y13*y14*y23*y24)
8915 wtc(ic)=-(5.*y12*y34**2+2.*y12*y24*y34+2.*y12*y23*y34+2.*y12*
8916 & y14*y34+2.*y12*y13*y34+4.*y12**2*y34-y13*y24**2+y14*y23*y24+
8917 & y13*y23*y24+y13*y14*y24-y12*y14*y24-y13**2*y24-3.*y12*y13*y24-
8918 & y14*y23**2-y14**2*y23+y13*y14*y23-3.*y12*y14*y23-y12*y13*y23)/
8919 & (4.*y134*y234*y34**2)+(3.*y12*y34**2-3.*y13*y24*y34+3.*y12*y24*
8920 & y34+3.*y14*y23*y34-y13*y24**2-y12*y23*y34+6.*y12*y14*y34+2.*y12*
8941 wtd(ic)=(y13*y23*y34+y12*y23*y34-y12**2*y34+y13*y23*y24+2.*y12*
8942 & y23*y24-y14*y23**2+y12*y13*y24+y12*y14*y23+y12*y13*y14)/(y13**2*
8962 130
IF(ic.EQ.1.OR.ic.EQ.3.OR.id.EQ.2.OR.id.EQ.3)
THEN 8973 IF(ic.EQ.2.OR.ic.EQ.4.OR.id.EQ.3.OR.id.EQ.4)
THEN 8984 IF(ic.LE.3)
GOTO 120
8985 IF(id.EQ.1.AND.wttot.LT.
rlu(0)*wtmx)
GOTO 110
8990 IF(mstj(109).EQ.0.AND.id.EQ.1)
THEN 8991 parj(156)=y34*(2.*(wta(1)+wta(2)+wta(3)+wta(4))+4.*(wtc(1)+
8992 & wtc(2)+wtc(3)+wtc(4)))/(9.*wttot)
8993 IF(wta(2)+wta(4)+2.*(wtc(2)+wtc(4)).GT.
rlu(0)*(wta(1)+wta(2)+
8994 & wta(3)+wta(4)+2.*(wtc(1)+wtc(2)+wtc(3)+wtc(4)))) id=2
8995 IF(id.EQ.2)
GOTO 130
8996 ELSEIF(mstj(109).EQ.2.AND.id.EQ.1)
THEN 8997 parj(156)=y34*(wta(1)+wta(2)+wta(3)+wta(4))/(8.*wttot)
8998 IF(wta(2)+wta(4).GT.
rlu(0)*(wta(1)+wta(2)+wta(3)+wta(4))) id=2
8999 IF(id.EQ.2)
GOTO 130
9002 IF(mstj(109).EQ.0.AND.0.5*y34*(wtc(1)+wtc(2)+wtc(3)+wtc(4)).GT.
9003 &
rlu(0)*wttot) mstj(120)=4
9007 IF(y12.LE.cut+qme) njet=2
9008 IF(njet.EQ.2)
GOTO 150
9009 q12=0.5*(1.-sqrt(1.-qme/y12))
9010 x1=1.-(1.-q12)*y234-q12*y134
9011 x4=1.-(1.-q12)*y134-q12*y234
9013 x12=(1.-q12)*y13+q12*y23
9015 IF(y134*y234/((1.-
x1)*(1.-x4)).LE.
rlu(0)) njet=2
9020 wtr=
rlu(0)*(wtd(1)+wtd(2)+wtd(3)+wtd(4))
9021 IF(wtr.LT.wtd(2)+wtd(3)+wtd(4)) id=2
9022 IF(wtr.LT.wtd(3)+wtd(4)) id=3
9023 IF(wtr.LT.wtd(4)) id=4
9024 IF(id.GE.2)
GOTO 130
9027 parj(156)=cf*tr*(wtd(1)+wtd(2)+wtd(3)+wtd(4))/(16.*wttot)
9028 140 kfln=1+int(5.*
rlu(0))
9029 IF(kfln.NE.kfl.AND.0.2*parj(156).LE.
rlu(0))
GOTO 140
9030 IF(kfln.EQ.kfl.AND.1.-0.8*parj(156).LE.
rlu(0))
GOTO 140
9031 IF(kfln.GT.mstj(104)) njet=2
9033 qmen=(2.*pmqn/ecm)**2
9036 IF(y24.LE.cut+qme.OR.y13.LE.1.1*qmen) njet=2
9037 IF(njet.EQ.2)
GOTO 150
9038 q24=0.5*(1.-sqrt(1.-qme/y24))
9039 q13=0.5*(1.-sqrt(1.-qmen/y13))
9040 x1=1.-(1.-q24)*y123-q24*y134
9041 x4=1.-(1.-q24)*y134-q24*y123
9042 x2=1.-(1.-q13)*y234-q13*y124
9043 x12=(1.-q24)*((1.-q13)*y14+q13*y34)+q24*((1.-q13)*y12+q13*y23)
9045 x34=(1.-q24)*((1.-q13)*y23+q13*y12)+q24*((1.-q13)*y34+q13*y14)
9046 IF(pmq**2+pmqn**2+
min(x12,x34)*ecm**2.LE.
9047 & (parj(127)+pmq+pmqn)**2) njet=2
9048 IF(y123*y134/((1.-
x1)*(1.-x4)).LE.
rlu(0)) njet=2
9050 150
IF(mstj(101).LE.-2.AND.njet.EQ.2)
GOTO 100
9057 SUBROUTINE luxdif(NC,NJET,KFL,ECM,CHI,THE,PHI)
9060 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
9062 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9064 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
9069 poll=1.-parj(131)*parj(132)
9070 pold=parj(132)-parj(131)
9071 IF(mstj(102).LE.1.OR.mstj(109).EQ.1)
THEN 9079 sff=1./(16.*paru(102)*(1.-paru(102)))
9080 sfw=ecm**4/((ecm**2-parj(123)**2)**2+(parj(123)*parj(124))**2)
9081 sfi=sfw*(1.-(parj(123)/ecm)**2)
9085 vf=af-4.*qf*paru(102)
9086 hf1=qf**2*poll-2.*qf*vf*sfi*sff*(ve*poll-ae*pold)+
9087 & (vf**2+af**2)*sfw*sff**2*((ve**2+ae**2)*poll-2.*ve*ae*pold)
9088 hf2=-2.*qf*af*sfi*sff*(ae*poll-ve*pold)+2.*vf*af*sfw*sff**2*
9089 & (2.*ve*ae*poll-(ve**2+ae**2)*pold)
9090 hf3=parj(133)**2*(qf**2-2.*qf*vf*sfi*sff*ve+(vf**2+af**2)*
9091 & sfw*sff**2*(ve**2-ae**2))
9092 hf4=-parj(133)**2*2.*qf*vf*sfw*(parj(123)*parj(124)/ecm**2)*
9099 IF(mstj(103).GE.4.AND.iabs(mstj(101)).LE.1.AND.mstj(102).LE.1.AND.
9102 sigu=4.*sqrt(1.-qme)
9103 sigl=2.*qme*sqrt(1.-qme)
9115 ecmr=p(nc+1,4)+p(nc+4,4)+sqrt((p(nc+2,1)+p(nc+3,1))**2+
9116 & (p(nc+2,2)+p(nc+3,2))**2+(p(nc+2,3)+p(nc+3,3))**2)
9117 x1=2.*p(nc+1,4)/ecmr
9118 x2=2.*p(nc+4,4)/ecmr
9123 ct12=(
x1*
x2-2.*
x1-2.*
x2+2.+qme)/sqrt((
x1**2-qme)*(
x2**2-qme))
9124 st12=sqrt(1.-ct12**2)
9125 IF(mstj(109).NE.1)
THEN 9126 sigu=2.*
x1**2+
x2**2*(1.+ct12**2)-qme*(3.+ct12**2-
x1-
x2)-
9127 & qme*
x1/xq+0.5*qme*((
x2**2-qme)*st12**2-2.*
x2)*xq
9128 sigl=(
x2*st12)**2-qme*(3.-ct12**2-2.5*(
x1+
x2)+
x1*
x2+qme)+
9129 & 0.5*qme*(
x1**2-
x1-qme)/xq+0.5*qme*((
x2**2-qme)*ct12**2-
x2)*xq
9130 sigt=0.5*(
x2**2-qme-0.5*qme*(
x2**2-qme)/xq)*st12**2
9131 sigi=((1.-0.5*qme*xq)*(
x2**2-qme)*st12*ct12+qme*(1.-
x1-
x2+
9132 & 0.5*
x1*
x2+0.5*qme)*st12/ct12)/sq2
9134 sigp=2.*(
x1**2-
x2**2*ct12)
9138 sigu=2.*(2.-
x1-
x2)**2-(
x2*st12)**2
9141 sigi=-(2.-
x1-
x2)*
x2*st12/sq2
9152 sigmax=(2.*hf1a+hf3a+hf4a)*abs(sigu)+2.*(hf1a+hf3a+hf4a)*
9153 &abs(sigl)+2.*(hf1a+2.*hf3a+2.*hf4a)*abs(sigt)+2.*sq2*
9154 &(hf1a+2.*hf3a+2.*hf4a)*abs(sigi)+4.*sq2*hf2a*abs(siga)+
9158 100 chi=paru(2)*
rlu(0)
9167 c2phi=cos(2.*(phi-parj(134)))
9168 s2phi=sin(2.*(phi-parj(134)))
9169 sig=((1.+cthe**2)*hf1+sthe**2*(c2phi*hf3-s2phi*hf4))*sigu+
9170 &2.*(sthe**2*hf1-sthe**2*(c2phi*hf3-s2phi*hf4))*sigl+
9171 &2.*(sthe**2*c2chi*hf1+((1.+cthe**2)*c2chi*c2phi-2.*cthe*s2chi*
9172 &s2phi)*hf3-((1.+cthe**2)*c2chi*s2phi+2.*cthe*s2chi*c2phi)*hf4)*
9173 &sigt-2.*sq2*(2.*sthe*cthe*cchi*hf1-2.*sthe*(cthe*cchi*c2phi-
9174 &schi*s2phi)*hf3+2.*sthe*(cthe*cchi*s2phi+schi*c2phi)*hf4)*sigi+
9175 &4.*sq2*sthe*cchi*hf2*siga+2.*cthe*hf2*sigp
9176 IF(sig.LT.sigmax*
rlu(0))
GOTO 100
9183 SUBROUTINE luonia(KFL,ECM)
9187 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
9189 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9191 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
9195 IF(mstu(12).GE.1)
CALL lulist(0)
9196 IF(kfl.LT.0.OR.kfl.GT.8)
THEN 9197 CALL luerrm(16,
'(LUONIA:) called with unknown flavour code')
9198 IF(mstu(21).GE.1)
RETURN 9200 IF(ecm.LT.parj(127)+2.02*parf(101))
THEN 9201 CALL luerrm(16,
'(LUONIA:) called with too small CM energy')
9202 IF(mstu(21).GE.1)
RETURN 9207 IF(mstj(115).GE.2)
THEN 9209 CALL lu1ent(nc-1,11,0.5*ecm,0.,0.)
9211 CALL lu1ent(nc,-11,0.5*ecm,paru(1),0.)
9215 IF(mstj(115).GE.3.AND.kflc.GE.5)
THEN 9221 CALL lu1ent(nc,kf,ecm,0.,0.)
9232 IF(x3.GE.1..OR.((1.-
x1)/(
x2*x3))**2+((1.-
x2)/(
x1*x3))**2+
9233 &((1.-x3)/(
x1*
x2))**2.LE.2.*
rlu(0))
GOTO 100
9236 IF(mstj(101).LE.4)
CALL lu3ent(nc+1,21,21,21,ecm,
x1,x3)
9237 IF(mstj(101).GE.5)
CALL lu3ent(-(nc+1),21,21,21,ecm,
x1,x3)
9241 IF(mstj(108).EQ.2.AND.(mstj(101).EQ.0.OR.mstj(101).EQ.1))
9244 IF(mstu(111).EQ.2) paru(112)=parj(122)
9246 IF(kflc.NE.0) qf=kchg(kflc,1)/3.
9247 rgam=7.2*qf**2*paru(101)/
ulalps(ecm**2)
9250 IF(
rlu(0).GT.rgam/(1.+rgam))
THEN 9251 IF(1.-
max(
x1,
x2,x3).LE.
max((parj(126)/ecm)**2,parj(125)))
9253 IF(njet.EQ.2.AND.mstj(101).LE.4)
CALL lu2ent(nc+1,21,21,ecm)
9254 IF(njet.EQ.2.AND.mstj(101).GE.5)
CALL lu2ent(-(nc+1),21,21,ecm)
9257 ecmc=sqrt(1.-
x1)*ecm
9258 IF(ecmc.LT.2.*parj(127))
GOTO 100
9263 IF(mstj(101).GE.5) k(nc+2,4)=mstu(5)*(nc+3)
9264 IF(mstj(101).GE.5) k(nc+2,5)=mstu(5)*(nc+3)
9265 IF(mstj(101).GE.5) k(nc+3,4)=mstu(5)*(nc+2)
9266 IF(mstj(101).GE.5) k(nc+3,5)=mstu(5)*(nc+2)
9268 IF(ecmc.LT.4.*parj(127))
THEN 9272 CALL lu1ent(nc+2,83,0.5*(
x2+x3)*ecm,paru(1),0.)
9278 110 k(ip,3)=k(ip,3)+(mstj(115)/2)+(kflc/5)*(mstj(115)/3)*(nc-1)
9281 IF(mstj(106).EQ.1)
THEN 9283 hf1=1.-parj(131)*parj(132)
9285 ct13=(
x1*x3-2.*
x1-2.*x3+2.)/(
x1*x3)
9286 st13=sqrt(1.-ct13**2)
9287 sigl=0.5*x3**2*((1.-
x2)**2+(1.-x3)**2)*st13**2
9288 sigu=(
x1*(1.-
x1))**2+(
x2*(1.-
x2))**2+(x3*(1.-x3))**2-sigl
9290 sigi=(sigl*ct13/st13+0.5*
x1*x3*(1.-
x2)**2*st13)/sq2
9291 sigmax=(2.*hf1+hf3)*abs(sigu)+2.*(hf1+hf3)*abs(sigl)+2.*(hf1+
9292 & 2.*hf3)*abs(sigt)+2.*sq2*(hf1+2.*hf3)*abs(sigi)
9295 120 chi=paru(2)*
rlu(0)
9304 c2phi=cos(2.*(phi-parj(134)))
9305 s2phi=sin(2.*(phi-parj(134)))
9306 sig=((1.+cthe**2)*hf1+sthe**2*c2phi*hf3)*sigu+2.*(sthe**2*hf1-
9307 & sthe**2*c2phi*hf3)*sigl+2.*(sthe**2*c2chi*hf1+((1.+cthe**2)*
9308 & c2chi*c2phi-2.*cthe*s2chi*s2phi)*hf3)*sigt-2.*sq2*(2.*sthe*cthe*
9310 IF(sig.LT.sigmax*
rlu(0))
GOTO 120
9311 CALL ludbrb(nc+1,
n,0.,chi,0d0,0d0,0d0)
9312 CALL ludbrb(nc+1,
n,the,phi,0d0,0d0,0d0)
9316 IF(mstj(101).GE.5.AND.njet.GE.2)
THEN 9317 CALL lushow(nc+mk+1,-njet,ecmc)
9319 IF(mstj(105).EQ.-1) mstj(14)=0
9320 IF(mstj(105).GE.0) mstu(28)=0
9323 IF(mstj(105).GE.0.AND.mstu(28).NE.0)
GOTO 100
9327 IF(mstj(105).EQ.1)
CALL luexec 9328 mstu(161)=110*kflc+3
9340 parameter(nmxhep=9000)
9341 common/
hepevt/nevhep,nhep,isthep(nmxhep),idhep(nmxhep),
9342 &jmohep(2,nmxhep),jdahep(2,nmxhep),phep(5,nmxhep),vhep(4,nmxhep)
9344 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
9346 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9348 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
9354 IF(
n.GT.nmxhep)
CALL luerrm(8,
9355 &
'(LUHEPC:) no more space in /HEPEVT/')
9359 IF(k(i,1).GE.1.AND.k(i,1).LE.10) isthep(i)=1
9360 IF(k(i,1).GE.11.AND.k(i,1).LE.20) isthep(i)=2
9361 IF(k(i,1).GE.21.AND.k(i,1).LE.30) isthep(i)=3
9362 IF(k(i,1).GE.31.AND.k(i,1).LE.100) isthep(i)=k(i,1)
9366 IF(k(i,1).NE.3.AND.k(i,1).NE.13.AND.k(i,1).NE.14)
THEN 9374 100 phep(j,i)=p(i,j)
9376 110 vhep(j,i)=v(i,j)
9379 IF(k(i,2).GE.91.AND.k(i,2).LE.93)
THEN 9382 IF(i1.GE.i)
CALL luerrm(8,
9383 &
'(LUHEPC:) translation of inconsistent event history')
9384 IF(i1.LT.i.AND.k(i1,1).NE.1.AND.k(i1,1).NE.11)
GOTO 120
9386 IF(i1.LT.i.AND.kc.EQ.0)
GOTO 120
9387 IF(i1.LT.i.AND.kchg(kc,2).EQ.0)
GOTO 120
9389 ELSEIF(k(i,2).EQ.94)
THEN 9391 IF(nhep.GE.i+3.AND.k(i+3,3).LE.i) njet=3
9392 IF(nhep.GE.i+4.AND.k(i+4,3).LE.i) njet=4
9393 jmohep(2,i)=mod(k(i+njet,4)/mstu(5),mstu(5))
9394 IF(jmohep(2,i).EQ.jmohep(1,i)) jmohep(2,i)=
9395 & mod(k(i+1,4)/mstu(5),mstu(5))
9399 IF(k(i,2).EQ.94.AND.mstu(16).NE.2)
THEN 9400 DO 130 i1=jdahep(1,i),jdahep(2,i)
9401 i2=mod(k(i1,4)/mstu(5),mstu(5))
9404 IF(k(i,2).GE.91.AND.k(i,2).LE.94)
GOTO 140
9406 IF(i1.LE.0.OR.i1.GT.nhep)
GOTO 140
9407 IF(k(i1,1).NE.13.AND.k(i1,1).NE.14)
GOTO 140
9408 IF(jdahep(1,i1).EQ.0)
THEN 9415 IF(k(i,1).NE.13.AND.k(i,1).NE.14)
GOTO 150
9416 IF(jdahep(2,i).EQ.0) jdahep(2,i)=jdahep(1,i)
9421 IF(nhep.GT.mstu(4))
CALL luerrm(8,
9422 &
'(LUHEPC:) no more space in /LUJETS/')
9428 IF(isthep(i).EQ.1) k(i,1)=1
9429 IF(isthep(i).EQ.2) k(i,1)=11
9430 IF(isthep(i).EQ.3) k(i,1)=21
9436 160 p(i,j)=phep(j,i)
9438 170 v(i,j)=vhep(j,i)
9440 IF(isthep(i).EQ.2.AND.phep(4,i).GT.phep(5,i))
THEN 9442 IF(i1.GT.0.AND.i1.LE.nhep) v(i,5)=(vhep(4,i1)-vhep(4,i))*
9443 & phep(5,i)/phep(4,i)
9447 IF(isthep(i).EQ.1)
THEN 9450 IF(kc.NE.0) kq=kchg(kc,2)*isign(1,k(i,2))
9451 IF(kq.NE.0) nkq=nkq+1
9452 IF(kq.NE.2) kqsum=kqsum+kq
9453 IF(kq.NE.0.AND.kqsum.NE.0)
THEN 9455 ELSEIF(kq.EQ.2.AND.i.LT.
n)
THEN 9456 IF(k(i+1,2).EQ.21) k(i,1)=2
9460 IF(nkq.EQ.1.OR.kqsum.NE.0)
CALL luerrm(8,
9461 &
'(LUHEPC:) input parton configuration not colour singlet')
9472 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
9474 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9476 dimension psum(5),pini(6),pfin(6)
9479 IF(mtest.GE.1)
CALL lutabu(20)
9498 IF(iev.EQ.301.OR.iev.EQ.351.OR.iev.EQ.401) mstj(116)=3
9504 IF(ity.EQ.3.OR.ity.EQ.4) mstj(11)=2
9505 IF(ity.EQ.1)
CALL lu1ent(1,1,15.,0.,0.)
9506 IF(ity.EQ.2)
CALL lu1ent(1,3101,15.,0.,0.)
9507 IF(ity.EQ.3)
CALL lu1ent(1,-2203,15.,0.,0.)
9508 IF(ity.EQ.4)
CALL lu1ent(1,-4,30.,0.,0.)
9509 IF(ity.EQ.5)
CALL lu1ent(1,21,15.,0.,0.)
9512 ELSEIF(iev.LE.130)
THEN 9514 IF(ity.EQ.1)
CALL lu2ent(1,1,-1,40.)
9515 IF(ity.EQ.2)
CALL lu2ent(1,4,-4,30.)
9516 IF(ity.EQ.3)
CALL lu2ent(1,2,2103,100.)
9517 IF(ity.EQ.4)
CALL lu2ent(1,21,21,40.)
9518 IF(ity.EQ.5)
CALL lu3ent(1,2101,21,-3203,30.,0.6,0.8)
9519 IF(ity.EQ.6)
CALL lu3ent(1,5,21,-5,40.,0.9,0.8)
9520 IF(ity.EQ.7)
CALL lu3ent(1,21,21,21,60.,0.7,0.5)
9521 IF(ity.EQ.8)
CALL lu4ent(1,2,21,21,-2,40.,0.4,0.64,0.6,0.12,0.2)
9524 ELSEIF(iev.LE.200)
THEN 9526 mstj(2)=1+mod(iev-131,4)
9527 mstj(3)=1+mod((iev-131)/4,4)
9528 IF(ity.EQ.1)
CALL lu2ent(1,4,-5,40.)
9529 IF(ity.EQ.2)
CALL lu3ent(1,3,21,-3,40.,0.9,0.4)
9530 IF(ity.EQ.3)
CALL lu4ent(1,2,21,21,-2,40.,0.4,0.64,0.6,0.12,0.2)
9531 IF(ity.GE.4)
CALL lu4ent(1,2,-3,3,-2,40.,0.4,0.64,0.6,0.12,0.2)
9534 ELSEIF(iev.LE.300)
THEN 9540 IF(i.EQ.1) kfl=int(1.+4.*
rlu(0))
9541 IF(i.EQ.njet) kfl=-int(1.+4.*
rlu(0))
9543 theta=acos(2.*
rlu(0)-1.)
9545 IF(i.LT.njet)
CALL lu1ent(-i,kfl,ejet,theta,phi)
9546 IF(i.EQ.njet)
CALL lu1ent(i,kfl,ejet,theta,phi)
9547 IF(i.EQ.1.OR.i.EQ.njet) psum(5)=psum(5)+
ulmass(kfl)
9549 120 psum(j)=psum(j)+p(i,j)
9550 IF(psum(4)**2-psum(1)**2-psum(2)**2-psum(3)**2.LT.
9551 & (psum(5)+parj(32))**2)
GOTO 100
9554 ELSEIF(iev.LE.350)
THEN 9559 ELSEIF(iev.LE.400)
THEN 9560 mstj(42)=1+mod(iev,2)
9561 mstj(43)=1+mod(iev/2,4)
9562 mstj(44)=mod(iev/8,3)
9566 ELSEIF(iev.LE.450)
THEN 9571 ELSEIF(iev.LE.500)
THEN 9575 ELSEIF(iev.LE.560)
THEN 9579 kflc=kflb-mod(ity,5)
9580 CALL lu1ent(1,100*kflb+10*kflc+kfls,0.,0.,0.)
9583 ELSEIF(iev.LE.600)
THEN 9587 kflb=kfla-mod(ity,5)
9589 CALL lu1ent(1,1000*kfla+100*kflb+10*kflc+kfls,0.,0.,0.)
9594 130 pini(j)=
plu(0,j)
9598 140 pfin(j)=
plu(0,j)
9605 IF((pfin(1)-pini(1))**2+(pfin(2)-pini(2))**2.GE.4.) merr=merr+1
9606 epzrem=pini(4)+pini(3)-pfin(4)-pfin(3)
9607 IF(epzrem.LT.0..OR.epzrem.GT.2.*parj(31)) merr=merr+1
9608 IF(abs(pfin(6)-pini(6)).GT.2.1) merr=merr+1
9611 150
IF(abs(pfin(j)-pini(j)).GT.0001*pini(4)) merr=merr+1
9612 IF(abs(pfin(6)-pini(6)).GT.0.1) merr=merr+1
9614 IF(merr.NE.0)
WRITE(mstu(11),1000) (pini(j),j=1,4),pini(6),
9615 &(pfin(j),j=1,4),pfin(6)
9620 IF(k(i,1).GT.20)
GOTO 160
9621 IF(
lucomp(k(i,2)).EQ.0)
THEN 9622 WRITE(mstu(11),1100) i
9625 pd=p(i,4)**2-p(i,1)**2-p(i,2)**2-p(i,3)**2-p(i,5)**2
9626 IF(abs(pd).GT.
max(0.1,0.001*p(i,4)**2).OR.p(i,4).LT.0.)
THEN 9627 WRITE(mstu(11),1200) i
9631 IF(mtest.GE.1)
CALL lutabu(21)
9634 IF(merr.NE.0.OR.mstu(24).NE.0.OR.mstu(28).NE.0)
THEN 9636 ELSEIF(mtest.GE.1.AND.mod(iev-5,100).EQ.0)
THEN 9641 IF(merr.NE.0) nerr=nerr+1
9643 WRITE(mstu(11),1300) iev
9647 IF(mtest.GE.1)
CALL lutabu(22)
9648 WRITE(mstu(11),1400) nerr
9660 1000
FORMAT(/
' Momentum, energy and/or charge were not conserved ',
9661 &
'in following event'/
' sum of',9
x,
'px',11
x,
'py',11
x,
'pz',11
x,
9662 &
'E',8
x,
'charge'/
' before',2
x,4(1
x,f12.5),1
x,f8.2/
' after',3
x,
9663 &4(1
x,f12.5),1
x,f8.2)
9664 1100
FORMAT(/5
x,
'Entry no.',i4,
' in following event not known code')
9665 1200
FORMAT(/5
x,
'Entry no.',i4,
' in following event has faulty ',
9667 1300
FORMAT(/5
x,
'Ten errors experienced by event ',i3/
9668 &5
x,
'Something is seriously wrong! Execution stopped now!')
9669 1400
FORMAT(/5
x,
'Number of erroneous or suspect events in run:',i3/
9670 &5
x,
'(0 fine, 1 acceptable if a single jet, ',
9671 &
'>=2 something is wrong)')
9682 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9684 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
9686 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
9691 common/ludatr/mrlu(6),rrlu(100)
9696 & 0, 0, 0, 9000,10000, 500, 2000, 0, 0, 2,
9697 1 6, 1, 1, 0, 1, 1, 0, 0, 0, 0,
9698 2 2, 10, 0, 0, 1, 10, 0, 0, 0, 0,
9699 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
9700 4 2, 2, 1, 4, 2, 1, 1, 0, 0, 0,
9701 5 25, 24, 0, 1, 0, 0, 0, 0, 0, 0,
9702 6 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
9704 1 1, 5, 3, 5, 0, 0, 0, 0, 0, 0,
9706 8 7, 2, 1989, 11, 25, 0, 0, 0, 0, 0,
9707 9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0/
9709 & 3.1415927, 6.2831854, 0.1973, 5.068, 0.3894, 2.568, 4*0.,
9710 1 0.001, 0.09, 0.01, 0., 0., 0., 0., 0., 0., 0.,
9711 2 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9712 3 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9713 4 2.0, 1.0, 0.25, 2.5, 0.05, 0., 0., 0.0001, 0., 0.,
9714 5 2.5, 1.5, 7.0, 1.0, 0.5, 2.0, 3.2, 0., 0., 0.,
9716 & 0.0072974, 0.230, 0., 0., 0., 0., 0., 0., 0., 0.,
9717 1 0.20, 0.25, 1.0, 4.0, 0., 0., 0., 0., 0., 0.,
9718 2 1.0, 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9721 & 1, 3, 0, 0, 0, 0, 0, 0, 0, 0,
9722 1 1, 2, 0, 1, 0, 0, 0, 0, 0, 0,
9723 2 2, 1, 1, 2, 1, 0, 0, 0, 0, 0,
9724 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
9725 4 1, 2, 4, 2, 5, 0, 1, 0, 0, 0,
9726 5 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
9728 & 5, 2, 7, 5, 1, 1, 0, 2, 0, 1,
9729 1 0, 0, 0, 0, 1, 1, 0, 0, 0, 0,
9732 & 0.10, 0.30, 0.40, 0.05, 0.50, 0.50, 0.50, 0., 0., 0.,
9733 1 0.50, 0.60, 0.75, 0., 0., 0., 0., 1.0, 1.0, 0.,
9734 2 0.35, 1.0, 0., 0., 0., 0., 0., 0., 0., 0.,
9735 3 0.10, 1.0, 0.8, 1.5, 0.8, 2.0, 0.2, 2.5, 0.6, 2.5,
9736 4 0.5, 0.9, 0.5, 0.9, 0.5, 0., 0., 0., 0., 0.,
9737 5 0.77, 0.77, 0.77, 0., 0., 0., 0., 0., 1.0, 0.,
9738 6 4.5, 0.7, 0., 0.003, 0.5, 0.5, 0., 0., 0., 0.,
9739 7 10., 1000., 100., 1000., 0., 0., 0., 0., 0., 0.,
9740 8 0.4, 1.0, 1.0, 0., 10., 10., 0., 0., 0., 0.,
9741 9 0.02, 1.0, 0.2, 0., 0., 0., 0., 0., 0., 0.,
9742 & 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9743 1 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9744 2 1.5, 0.5, 91.2, 2.40, 0.02, 2.0, 1.0, 0.25,0.002, 0.,
9745 3 0., 0., 0., 0., 0.01, 0.99, 0., 0., 0.2, 0.,
9749 DATA (kchg(i,1),i= 1, 500)/-1,2,-1,2,-1,2,-1,2,2*0,-3,0,-3,0,
9750 &-3,0,-3,6*0,3,9*0,3,2*0,3,46*0,2,-1,2,-1,2,3,11*0,3,0,2*3,
9751 &0,3,0,3,12*0,3,0,2*3,0,3,0,3,12*0,3,0,2*3,0,3,0,3,12*0,3,0,2*3,0,
9752 &3,0,3,12*0,3,0,2*3,0,3,0,3,12*0,3,0,2*3,0,3,0,3,72*0,3,0,3,28*0,
9753 &3,2*0,3,8*0,-3,8*0,3,0,-3,0,3,-3,3*0,3,6,0,3,5*0,-3,0,3,-3,0,-3,
9754 &4*0,-3,0,3,6,-3,0,3,-3,0,-3,0,3,6,0,3,5*0,-3,0,3,-3,0,-3,114*0/
9755 DATA (kchg(i,2),i= 1, 500)/8*1,12*0,2,68*0,-1,410*0/
9756 DATA (kchg(i,3),i= 1, 500)/8*1,2*0,8*1,5*0,1,9*0,1,2*0,1,2*0,1,
9757 &41*0,1,0,7*1,10*0,9*1,11*0,9*1,11*0,9*1,11*0,9*1,11*0,9*1,
9758 &11*0,9*1,71*0,3*1,22*0,1,5*0,1,0,2*1,6*0,1,0,2*1,6*0,2*1,0,5*1,
9759 &0,6*1,4*0,6*1,4*0,16*1,4*0,6*1,114*0/
9760 DATA (pmas(i,1),i= 1, 500)/.0099,.0056,.199,1.35,5.,90.,120.,
9761 &200.,2*0.,.00051,0.,.1057,0.,1.7841,0.,60.,5*0.,91.2,80.,15.,
9762 &6*0.,300.,900.,600.,300.,900.,300.,2*0.,5000.,60*0.,.1396,.4977,
9763 &.4936,1.8693,1.8645,1.9693,5.2794,5.2776,5.47972,0.,.135,.5488,
9764 &.9575,2.9796,9.4,117.99,238.,397.,2*0.,.7669,.8962,.8921,
9765 &2.0101,2.0071,2.1127,2*5.3354,5.5068,0.,.77,.782,1.0194,3.0969,
9766 &9.4603,118.,238.,397.,2*0.,1.233,2*1.3,2*2.322,2.51,2*5.73,5.97,
9767 &0.,1.233,1.17,1.41,3.46,9.875,118.42,238.42,397.42,2*0.,
9768 &.983,2*1.429,2*2.272,2.46,2*5.68,5.92,0.,.983,1.,1.4,3.4151,
9769 &9.8598,118.4,238.4,397.4,2*0.,1.26,2*1.401,2*2.372,
9770 &2.56,2*5.78,6.02,0.,1.26,1.283,1.422,3.5106,9.8919,118.5,238.5,
9771 &397.5,2*0.,1.318,2*1.426,2*2.422,2.61,2*5.83,6.07,0.,1.318,1.274,
9772 &1.525,3.5563,9.9132,118.45,238.45,397.45,2*0.,2*.4977,
9773 &83*0.,1.1156,5*0.,2.2849,0.,2*2.46,6*0.,5.62,0.,2*5.84,6*0.,
9774 &.9396,.9383,0.,1.1974,1.1926,1.1894,1.3213,1.3149,0.,2.454,
9775 &2.4529,2.4522,2*2.55,2.73,4*0.,3*5.8,2*5.96,6.12,4*0.,1.234,
9776 &1.233,1.232,1.231,1.3872,1.3837,1.3828,1.535,1.5318,1.6724,3*2.5,
9777 &2*2.63,2.8,4*0.,3*5.81,2*5.97,6.13,114*0./
9778 DATA (pmas(i,2),i= 1, 500)/22*0.,2.4,2.3,88*0.,.0002,.001,
9779 &6*0.,.149,.0505,.0513,7*0.,.153,.0085,.0044,7*0.,.15,2*.09,2*.06,
9780 &.04,3*.1,0.,.15,.335,.08,2*.01,5*0.,.057,2*.287,2*.06,.04,3*.1,
9781 &0.,.057,0.,.25,.0135,6*0.,.4,2*.184,2*.06,.04,3*.1,0.,.4,.025,
9782 &.055,.0135,6*0.,.11,.115,.099,2*.06,4*.1,0.,.11,.185,.076,.0026,
9783 &146*0.,4*.115,.039,2*.036,.0099,.0091,131*0./
9784 DATA (pmas(i,3),i= 1, 500)/22*0.,2*20.,88*0.,.002,.005,6*0.,.4,
9785 &2*.2,7*0.,.4,.1,.015,7*0.,.25,2*.01,3*.08,2*.2,.12,0.,.25,.2,
9786 &.001,2*.02,5*0.,.05,2*.4,3*.08,2*.2,.12,0.,.05,0.,.35,.05,6*0.,
9787 &3*.3,2*.08,.06,2*.2,.12,0.,.3,.05,.025,.001,6*0.,.25,4*.12,4*.2,
9788 &0.,.25,.17,.2,.01,146*0.,4*.14,.04,2*.035,2*.05,131*0./
9789 DATA (pmas(i,4),i= 1, 500)/12*0.,658650.,0.,.091,68*0.,.1,.43,
9790 &15*0.,7803.,0.,3709.,.32,.128,.131,3*.393,84*0.,.004,26*0.,
9791 &15540.,26.75,83*0.,78.88,5*0.,.054,0.,2*.13,6*0.,.393,0.,2*.393,
9792 &9*0.,44.3,0.,24.,49.1,86.9,6*0.,.13,9*0.,.393,13*0.,24.6,130*0./
9794 & 0.5, 0.25, 0.5, 0.25, 1., 0.5, 0., 0., 0., 0.,
9795 1 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
9796 2 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
9797 3 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
9798 4 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
9799 5 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
9800 6 0.75, 0.5, 0., 0.1667, 0.0833, 0.1667, 0., 0., 0., 0.,
9801 7 0., 0., 1., 0.3333, 0.6667, 0.3333, 0., 0., 0., 0.,
9802 8 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9803 9 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9804 & 0.325, 0.325, 0.5, 1.6, 5.0, 0., 0., 0., 0., 0.,
9805 1 0., 0.11, 0.16, 0.048, 0.50, 0.45, 0.55, 0.60, 0., 0.,
9806 2 0.2, 0.1, 0., 0., 0., 0., 0., 0., 0., 0.,
9808 DATA ((vckm(i,j),j=1,4),i=1,4)/
9809 1 0.95150, 0.04847, 0.00003, 0.00000,
9810 2 0.04847, 0.94936, 0.00217, 0.00000,
9811 3 0.00003, 0.00217, 0.99780, 0.00000,
9812 4 0.00000, 0.00000, 0.00000, 1.00000/
9815 DATA (mdcy(i,1),i= 1, 500)/14*0,1,0,1,5*0,3*1,6*0,1,4*0,1,2*0,
9816 &1,42*0,7*1,12*0,1,0,6*1,0,8*1,2*0,9*1,0,8*1,2*0,9*1,0,8*1,2*0,
9817 &9*1,0,8*1,2*0,9*1,0,8*1,2*0,9*1,0,8*1,3*0,1,83*0,1,5*0,1,0,2*1,
9818 &6*0,1,0,2*1,9*0,5*1,0,6*1,4*0,6*1,4*0,16*1,4*0,6*1,114*0/
9819 DATA (mdcy(i,2),i= 1, 500)/1,9,17,25,33,41,49,57,2*0,65,69,71,
9820 &76,78,118,120,125,2*0,127,136,149,166,186,6*0,203,4*0,219,2*0,
9821 &227,42*0,236,237,241,250,252,254,256,11*0,276,277,279,285,406,
9822 &574,606,607,608,0,609,611,617,623,624,625,626,627,2*0,628,629,
9823 &632,635,638,640,641,642,643,0,644,645,650,658,661,670,685,686,
9824 &2*0,687,688,693,698,700,702,703,705,707,0,709,710,713,717,718,
9825 &719,721,722,2*0,723,726,728,730,734,738,740,744,748,0,752,755,
9826 &759,763,765,767,769,770,2*0,771,773,775,777,779,781,784,786,788,
9827 &0,791,793,806,810,812,814,816,817,2*0,818,824,835,846,854,862,
9828 &867,875,883,0,888,895,903,905,907,909,911,912,2*0,913,921,83*0,
9829 &923,5*0,927,0,1001,1002,6*0,1003,0,1004,1005,9*0,1006,1008,1009,
9830 &1012,1013,0,1015,1016,1017,1018,1019,1020,4*0,1021,1022,1023,
9831 &1024,1025,1026,4*0,1027,1028,1031,1034,1035,1038,1041,1044,1046,
9832 &1048,1052,1053,1054,1055,1057,1059,4*0,1060,1061,1062,1063,1064,
9834 DATA (mdcy(i,3),i= 1, 500)/8*8,2*0,4,2,5,2,40,2,5,2,2*0,9,13,
9835 &17,20,17,6*0,16,4*0,8,2*0,9,42*0,1,4,9,3*2,20,11*0,1,2,6,121,168,
9836 &32,3*1,0,2,2*6,5*1,2*0,1,3*3,2,4*1,0,1,5,8,3,9,15,2*1,2*0,1,2*5,
9837 &2*2,1,3*2,0,1,3,4,2*1,2,2*1,2*0,3,2*2,2*4,2,3*4,0,3,2*4,3*2,2*1,
9838 &2*0,5*2,3,2*2,3,0,2,13,4,3*2,2*1,2*0,6,2*11,2*8,5,2*8,5,0,7,8,
9839 &4*2,2*1,2*0,8,2,83*0,4,5*0,74,0,2*1,6*0,1,0,2*1,9*0,2,1,3,1,2,0,
9840 &6*1,4*0,6*1,4*0,1,2*3,1,3*3,2*2,4,3*1,2*2,1,4*0,6*1,114*0/
9841 DATA (mdme(i,1),i= 1,2000)/6*1,-1,7*1,-1,7*1,-1,7*1,-1,7*1,-1,
9842 &7*1,-1,85*1,2*-1,7*1,2*-1,3*1,2*-1,6*1,2*-1,6*1,3*-1,3*1,-1,3*1,
9843 &-1,3*1,5*-1,3*1,-1,6*1,2*-1,3*1,-1,11*1,2*-1,6*1,2*-1,3*1,-1,3*1,
9844 &-1,4*1,2*-1,2*1,-1,488*1,2*0,1275*1/
9845 DATA (mdme(i,2),i= 1,2000)/70*102,42,6*102,2*42,2*0,7*41,2*0,
9846 &23*41,6*102,45,28*102,8*32,9*0,16*32,4*0,8*32,4*0,32,4*0,8*32,
9847 &8*0,4*32,4*0,6*32,3*0,12,2*42,2*11,9*42,6*45,20*46,7*0,34*42,
9848 &86*0,2*25,26,24*42,142*0,25,26,0,10*42,19*0,2*13,3*85,0,2,4*0,2,
9849 &8*0,2*32,87,88,3*3,0,2*3,0,2*3,0,3,5*0,3,1,0,3,2*0,2*3,3*0,1,4*0,
9850 &12,3*0,4*32,2*4,6*0,5*32,2*4,2*45,87,88,30*0,12,32,0,32,87,88,
9851 &41*0,12,0,32,0,32,87,88,40*0,12,0,32,0,32,87,88,88*0,12,0,32,0,
9852 &32,87,88,2*0,4*42,8*0,14*42,50*0,10*13,2*84,3*85,14*0,84,5*0,85,
9854 DATA (brat(i) ,i= 1, 525)/70*0.,1.,6*0.,2*.177,.108,.225,.003,
9855 &.06,.02,.025,.013,2*.004,.007,.014,2*.002,2*.001,.054,.014,.016,
9856 &.005,2*.012,5*.006,.002,2*.001,5*.002,6*0.,1.,28*0.,.143,.111,
9857 &.143,.111,.143,.085,2*0.,.03,.058,.03,.058,.03,.058,3*0.,.25,.01,
9858 &2*0.,.01,.25,4*0.,.24,5*0.,3*.08,3*0.,.01,.08,.82,5*0.,.09,6*0.,
9859 &.143,.111,.143,.111,.143,.085,2*0.,.03,.058,.03,.058,.03,.058,
9860 &4*0.,1.,5*0.,4*.215,2*0.,2*.07,0.,1.,2*.08,.76,.08,2*.112,.05,
9861 &.476,.08,.14,.01,.015,.005,1.,0.,1.,0.,1.,0.,.25,.01,2*0.,.01,
9862 &.25,4*0.,.24,5*0.,3*.08,0.,1.,2*.5,.635,.212,.056,.017,.048,.032,
9863 &.035,.03,2*.015,.044,2*.022,9*.001,.035,.03,2*.015,.044,2*.022,
9864 &9*.001,.028,.017,.066,.02,.008,2*.006,.003,.001,2*.002,.003,.001,
9865 &2*.002,.005,.002,.005,.006,.004,.012,2*.005,.008,2*.005,.037,
9866 &.004,.067,2*.01,2*.001,3*.002,.003,8*.002,.005,4*.004,.015,.005,
9867 &.027,2*.005,.007,.014,.007,.01,.008,.012,.015,11*.002,3*.004,
9868 &.002,.004,6*.002,2*.004,.005,.011,.005,.015,.02,2*.01,3*.004,
9869 &5*.002,.015,.02,2*.01,3*.004,5*.002,.038,.048,.082,.06,.028,.021,
9870 &2*.005,2*.002,.005,.018,.005,.01,.008,.005,3*.004,.001,3*.003,
9871 &.001,2*.002,.003,2*.002,2*.001,.002,.001,.002,.001,.005,4*.003,
9872 &.001,2*.002,.003,2*.001,.013,.03,.058,.055,3*.003,2*.01,.007,
9873 &.019,4*.005,.015,3*.005,8*.002,3*.001,.002,2*.001,.003,16*.001/
9874 DATA (brat(i) ,i= 526, 893)/.019,2*.003,.002,.005,.004,.008,
9875 &.003,.006,.003,.01,5*.002,2*.001,2*.002,11*.001,.002,14*.001,
9876 &.018,.005,.01,2*.015,.017,4*.015,.017,3*.015,.025,.08,2*.025,.04,
9877 &.001,2*.005,.02,.04,2*.06,.04,.01,4*.005,.25,.115,3*1.,.988,.012,
9878 &.389,.319,.237,.049,.005,.001,.441,.205,.301,.03,.022,.001,6*1.,
9879 &.665,.333,.002,.666,.333,.001,.49,.34,.17,.52,.48,5*1.,.893,.08,
9880 &.017,2*.005,.495,.343,3*.043,.019,.013,.001,2*.069,.862,3*.027,
9881 &.015,.045,.015,.045,.77,.029,6*.02,5*.05,.115,.015,.5,0.,3*1.,
9882 &.28,.14,.313,.157,.11,.28,.14,.313,.157,.11,.667,.333,.667,.333,
9883 &1.,.667,.333,.667,.333,2*.5,1.,.333,.334,.333,4*.25,2*1.,.3,.7,
9884 &2*1.,.8,2*.1,.667,.333,.667,.333,.6,.3,.067,.033,.6,.3,.067,.033,
9885 &2*.5,.6,.3,.067,.033,.6,.3,.067,.033,2*.4,2*.1,.8,2*.1,.52,.26,
9886 &2*.11,.62,.31,2*.035,.007,.993,.02,.98,.3,.7,2*1.,2*.5,.667,.333,
9887 &.667,.333,.667,.333,.667,.333,2*.35,.3,.667,.333,.667,.333,2*.35,
9888 &.3,2*.5,3*.14,.1,.05,4*.08,.028,.027,.028,.027,4*.25,.273,.727,
9889 &.35,.65,.3,.7,2*1.,2*.35,.144,.105,.048,.003,.332,.166,.168,.084,
9890 &.086,.043,.059,2*.029,2*.002,.332,.166,.168,.084,.086,.043,.059,
9891 &2*.029,2*.002,.3,.15,.16,.08,.13,.06,.08,.04,.3,.15,.16,.08,.13,
9892 &.06,.08,.04,2*.4,.1,2*.05,.3,.15,.16,.08,.13,.06,.08,.04,.3,.15,
9893 &.16,.08,.13,.06,.08,.04,2*.4,.1,2*.05,2*.35,.144,.105,2*.024/
9894 DATA (brat(i) ,i= 894,2000)/.003,.573,.287,.063,.028,2*.021,
9895 &.004,.003,2*.5,.15,.85,.22,.78,.3,.7,2*1.,.217,.124,2*.193,
9896 &2*.135,.002,.001,.686,.314,.641,.357,2*.001,.018,2*.005,.003,
9897 &.002,2*.006,.018,2*.005,.003,.002,2*.006,.005,.025,.015,.006,
9898 &2*.005,.004,.005,5*.004,2*.002,2*.004,.003,.002,2*.003,3*.002,
9899 &2*.001,.002,2*.001,2*.002,5*.001,4*.003,2*.005,2*.002,2*.001,
9900 &2*.002,2*.001,.255,.057,2*.035,.15,2*.075,.03,2*.015,5*1.,.999,
9901 &.001,1.,.516,.483,.001,1.,.995,.005,13*1.,.331,.663,.006,.663,
9902 &.331,.006,1.,.88,2*.06,.88,2*.06,.88,2*.06,.667,2*.333,.667,.676,
9903 &.234,.085,.005,3*1.,4*.5,7*1.,935*0./
9904 DATA (kfdp(i,1),i= 1, 499)/21,22,23,4*-24,25,21,22,23,4*24,25,
9905 &21,22,23,4*-24,25,21,22,23,4*24,25,21,22,23,4*-24,25,21,22,23,
9906 &4*24,25,21,22,23,4*-24,25,21,22,23,4*24,25,22,23,-24,25,23,24,
9907 &-12,22,23,-24,25,23,24,-12,-14,34*16,22,23,-24,25,23,24,-89,22,
9908 &23,-24,25,23,24,1,2,3,4,5,6,7,8,21,1,2,3,4,5,6,7,8,11,13,15,17,
9909 &37,1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,37,4*-1,4*-3,4*-5,
9910 &4*-7,-11,-13,-15,-17,1,2,3,4,5,6,7,8,11,13,15,17,21,2*22,23,24,1,
9911 &2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,-1,-3,-5,-7,-11,-13,-15,
9912 &-17,1,2,3,4,5,6,11,13,15,82,-11,-13,2*2,-12,-14,-16,2*-2,2*-4,-2,
9913 &-4,2*89,2*-89,2*89,4*-1,4*-3,4*-5,4*-7,-11,-13,-15,-17,-13,130,
9914 &310,-13,3*211,12,14,16*-11,16*-13,-311,-313,-311,-313,-311,-313,
9915 &-311,-313,2*111,2*221,2*331,2*113,2*223,2*333,-311,-313,2*-311,
9916 &-313,3*-311,-321,-323,-321,2*211,2*213,-213,113,3*213,3*211,
9917 &2*213,2*-311,-313,-321,2*-311,-313,-311,-313,4*-311,-321,-323,
9918 &2*-321,3*211,213,2*211,213,5*211,213,4*211,3*213,211,213,321,311,
9919 &3,2*2,12*-11,12*-13,-321,-323,-321,-323,-311,-313,-311,-313,-311,
9920 &-313,-311,-313,-311,-313,-311,-321,-323,-321,-323,211,213,211,
9921 &213,111,221,331,113,223,333,221,331,113,223,113,223,113,223,333,
9922 &223,333,321,323,321,323,311,313,-321,-323,3*-321,-323,2*-321,
9923 &-323,-321,-311,-313,3*-311,-313,2*-311,-313,-321,-323,3*-321/
9924 DATA (kfdp(i,1),i= 500, 873)/-323,2*-321,-311,2*333,211,213,
9925 &2*211,2*213,4*211,10*111,-321,-323,5*-321,-323,2*-321,-311,-313,
9926 &4*-311,-313,4*-311,-321,-323,2*-321,-323,-321,-313,-311,-313,
9927 &-311,211,213,2*211,213,4*211,111,221,113,223,113,223,2*3,-15,
9928 &5*-11,5*-13,221,331,333,221,331,333,211,213,211,213,321,323,321,
9929 &323,2212,221,331,333,221,2*2,3*0,3*22,111,211,2*22,2*211,111,
9930 &3*22,111,3*21,2*0,211,321,3*311,2*321,421,2*411,2*421,431,511,
9931 &521,531,2*211,22,211,2*111,321,130,-213,113,213,211,22,111,11,13,
9932 &82,11,13,15,1,2,3,4,21,22,11,12,13,14,15,16,1,2,3,4,5,21,22,2*89,
9933 &2*0,223,321,311,323,313,2*311,321,313,323,321,421,2*411,421,433,
9934 &521,2*511,521,523,513,223,213,113,-213,313,-313,323,-323,82,21,
9935 &663,21,2*0,221,213,113,321,2*311,321,421,411,423,413,411,421,413,
9936 &423,431,433,521,511,523,513,511,521,513,523,521,511,531,533,221,
9937 &213,-213,211,111,321,130,211,111,321,130,443,82,553,21,663,21,
9938 &2*0,113,213,323,2*313,323,423,2*413,423,421,411,433,523,2*513,
9939 &523,521,511,533,213,-213,10211,10111,-10211,2*221,213,2*113,-213,
9940 &2*321,2*311,313,-313,323,-323,443,82,553,21,663,21,2*0,213,113,
9941 &221,223,321,211,321,311,323,313,323,313,321,5*311,321,313,323,
9942 &313,323,311,4*321,421,411,423,413,423,413,421,2*411,421,413,423,
9943 &413,423,411,2*421,411,433,2*431,521,511,523,513,523,513,521/
9944 DATA (kfdp(i,1),i= 874,2000)/2*511,521,513,523,513,523,511,2*521,
9945 &511,533,2*531,213,-213,221,223,321,130,111,211,111,2*211,321,130,
9946 &221,111,321,130,443,82,553,21,663,21,2*0,111,211,-12,12,-14,14,
9947 &211,111,211,111,2212,2*2112,-12,7*-11,7*-13,2*2224,2*2212,2*2214,
9948 &2*3122,2*3212,2*3214,5*3222,4*3224,2*3322,3324,2*2224,5*2212,
9949 &5*2214,2*2112,2*2114,2*3122,2*3212,2*3214,2*3222,2*3224,4*2,3,
9950 &2*2,1,2*2,5*0,2112,-12,3122,2212,2112,2212,3*3122,3*4122,4132,
9951 &4232,0,3*5122,5132,5232,0,2112,2212,2*2112,2212,2112,2*2212,3122,
9952 &3212,3112,3122,3222,3112,3122,3222,3212,3322,3312,3322,3312,3122,
9953 &3322,3312,-12,3*4122,2*4132,2*4232,4332,3*5122,5132,5232,5332,
9955 DATA (kfdp(i,2),i= 1, 496)/3*1,2,4,6,8,1,3*2,1,3,5,7,2,3*3,2,4,
9956 &6,8,3,3*4,1,3,5,7,4,3*5,2,4,6,8,5,3*6,1,3,5,7,6,3*7,2,4,6,8,7,
9957 &3*8,1,3,5,7,8,2*11,12,11,12,2*11,2*13,14,13,14,13,11,13,-211,
9958 &-213,-211,-213,-211,-213,3*-211,-321,-323,-321,-323,2*-321,
9959 &4*-211,-213,-211,-213,-211,-213,-211,-213,-211,-213,6*-211,2*15,
9960 &16,15,16,15,18,2*17,18,17,18,17,-1,-2,-3,-4,-5,-6,-7,-8,21,-1,-2,
9961 &-3,-4,-5,-6,-7,-8,-11,-13,-15,-17,-37,-1,-2,-3,-4,-5,-6,-7,-8,
9962 &-11,-12,-13,-14,-15,-16,-17,-18,-37,2,4,6,8,2,4,6,8,2,4,6,8,2,4,
9963 &6,8,12,14,16,18,-1,-2,-3,-4,-5,-6,-7,-8,-11,-13,-15,-17,21,22,
9964 &2*23,-24,-1,-2,-3,-4,-5,-6,-7,-8,-11,-12,-13,-14,-15,-16,-17,-18,
9965 &2,4,6,8,12,14,16,18,-3,-4,-5,-6,-7,-8,-13,-15,-17,-82,12,14,-1,
9966 &-3,11,13,15,1,4,3,4,1,3,5,3,6,4,7,5,2,4,6,8,2,4,6,8,2,4,6,8,2,4,
9967 &6,8,12,14,16,18,14,2*0,14,111,211,111,-11,-13,16*12,16*14,2*211,
9968 &2*213,2*321,2*323,211,213,211,213,211,213,211,213,211,213,211,
9969 &213,2*211,213,7*211,213,211,111,211,111,2*211,-213,213,2*113,223,
9970 &2*113,221,321,2*311,321,313,4*211,213,113,213,-213,2*211,213,113,
9971 &111,221,331,111,113,223,4*113,223,6*211,213,4*211,-321,-311,3*-1,
9972 &12*12,12*14,2*211,2*213,2*111,2*221,2*331,2*113,2*223,333,2*321,
9973 &2*323,2*-211,2*-213,6*111,4*221,2*331,3*113,2*223,2*-211,2*-213,
9974 &113,111,2*211,213,6*211,321,2*211,213,211,2*111,113,2*223,2*321/
9975 DATA (kfdp(i,2),i= 497, 863)/323,321,2*311,313,2*311,111,211,
9976 &2*-211,-213,-211,-213,-211,-213,3*-211,5*111,2*113,223,113,223,
9977 &2*211,213,5*211,213,3*211,213,2*211,2*111,221,113,223,3*321,323,
9978 &2*321,323,311,313,311,313,3*211,2*-211,-213,3*-211,4*111,2*113,
9979 &2*-1,16,5*12,5*14,3*211,3*213,2*111,2*113,2*-311,2*-313,-2112,
9980 &3*321,323,2*-1,3*0,22,11,22,111,-211,211,11,2*-211,111,113,223,
9981 &22,111,3*21,2*0,111,-211,111,22,211,111,22,211,111,22,111,5*22,
9982 &2*-211,111,-211,2*111,-321,310,211,111,2*-211,221,22,-11,-13,-82,
9983 &-11,-13,-15,-1,-2,-3,-4,2*21,-11,-12,-13,-14,-15,-16,-1,-2,-3,-4,
9984 &-5,2*21,5,3,2*0,211,-213,113,-211,111,223,211,111,211,111,223,
9985 &211,111,-211,2*111,-211,111,211,111,-321,-311,111,-211,111,211,
9986 &-311,311,-321,321,-82,21,22,21,2*0,211,111,211,-211,111,211,111,
9987 &211,111,211,111,-211,111,-211,3*111,-211,111,-211,111,211,111,
9988 &211,111,-321,-311,3*111,-211,211,-211,111,-321,310,-211,111,-321,
9989 &310,22,-82,22,21,22,21,2*0,211,111,-211,111,211,111,211,111,-211,
9990 &111,321,311,111,-211,111,211,111,-321,-311,111,-211,211,-211,111,
9991 &2*211,111,-211,211,111,211,-321,2*-311,-321,-311,311,-321,321,22,
9992 &-82,22,21,22,21,2*0,111,3*211,-311,22,-211,111,-211,111,-211,211,
9993 &-213,113,223,221,22,211,111,211,111,2*211,213,113,223,221,22,211,
9994 &111,211,111,4*211,-211,111,-211,111,-211,211,-211,211,321,311/
9995 DATA (kfdp(i,2),i= 864,2000)/2*111,211,-211,111,-211,111,-211,
9996 &211,-211,2*211,111,211,111,4*211,-321,-311,2*111,211,-211,211,
9997 &111,211,-321,310,22,-211,111,2*-211,-321,310,221,111,-321,310,22,
9998 &-82,22,21,22,21,2*0,111,-211,11,-11,13,-13,-211,111,-211,111,
9999 &-211,111,22,11,7*12,7*14,-321,-323,-311,-313,-311,-313,211,213,
10000 &211,213,211,213,111,221,331,113,223,111,221,113,223,321,323,321,
10001 &-211,-213,111,221,331,113,223,111,221,331,113,223,211,213,211,
10002 &213,321,323,321,323,321,323,311,313,311,313,2*-1,-3,-1,2203,
10003 &2*3201,2203,2101,2103,5*0,-211,11,22,111,211,22,-211,111,22,-211,
10004 &111,211,2*22,0,-211,111,211,2*22,0,2*-211,111,22,111,211,22,211,
10005 &2*-211,2*111,-211,2*211,111,211,-211,2*111,211,-321,-211,111,11,
10006 &-211,111,211,111,22,111,2*22,-211,111,211,3*22,935*0/
10007 DATA (kfdp(i,3),i= 1, 918)/70*0,14,6*0,2*16,2*0,5*111,310,130,
10008 &2*0,2*111,310,130,113,211,223,221,2*113,2*211,2*223,2*221,2*113,
10009 &221,113,2*213,-213,123*0,4*3,4*4,1,4,3,2*2,6*81,25*0,-211,3*111,
10010 &-311,-313,-311,2*-321,2*-311,111,221,331,113,223,211,111,211,111,
10011 &-311,-313,-311,2*-321,2*-311,111,221,331,113,223,211,111,211,111,
10012 &20*0,3*111,2*221,331,113,223,3*211,-211,111,-211,111,211,111,211,
10013 &-211,111,113,111,223,2*111,-311,4*211,2*111,2*211,111,7*211,
10014 &7*111,113,221,2*223,2*-211,-213,4*-211,-213,-211,-213,-211,2*211,
10015 &2,2*0,-321,-323,-311,-321,-311,2*-321,-211,-213,2*-211,211,-321,
10016 &-323,-311,-321,-311,2*-321,-211,-213,2*-211,211,46*0,3*111,113,
10017 &2*221,331,2*223,-311,3*-211,-213,8*111,113,3*211,213,2*111,-211,
10018 &3*111,113,111,2*113,221,331,223,111,221,331,113,223,113,2*223,
10019 &2*221,3*111,221,113,223,4*211,3*-211,-213,-211,5*111,-321,3*211,
10020 &3*111,2*211,2*111,2*-211,-213,3*111,221,113,223,6*111,3*0,221,
10021 &331,333,321,311,221,331,333,321,311,19*0,3,5*0,-11,0,2*111,-211,
10022 &-11,11,2*221,3*0,111,22*0,111,2*0,22,111,5*0,111,12*0,2*21,11*0,
10023 &2*21,2*-6,111*0,-211,2*111,-211,3*111,-211,111,211,15*0,111,6*0,
10024 &111,-211,9*0,111,-211,9*0,111,-211,111,-211,4*0,111,-211,111,
10025 &-211,4*0,-211,4*0,111,-211,111,-211,4*0,111,-211,111,-211,4*0,
10026 &-211,3*0,-211,5*0,111,211,3*0,111,10*0,2*111,211,-211,211,-211/
10027 DATA (kfdp(i,3),i= 919,2000)/7*0,2212,3122,3212,3214,2112,2114,
10028 &2212,2112,3122,3212,3214,2112,2114,2212,2112,50*0,3*3,1,12*0,
10029 &2112,43*0,3322,949*0/
10030 DATA (kfdp(i,4),i= 1,2000)/83*0,3*111,9*0,-211,3*0,111,2*-211,
10031 &0,111,0,2*111,113,221,111,-213,-211,211,123*0,13*81,37*0,111,
10032 &3*211,111,5*0,-211,111,-211,111,2*0,111,3*211,111,5*0,-211,111,
10033 &-211,111,50*0,2*111,2*-211,2*111,-211,211,3*111,211,14*111,221,
10034 &113,223,2*111,2*113,223,2*111,-1,4*0,-211,111,-211,211,111,2*0,
10035 &2*111,-211,2*0,-211,111,-211,211,111,2*0,2*111,-211,96*0,6*111,
10036 &3*-211,-213,4*111,113,6*111,3*-211,3*111,2*-211,2*111,3*-211,
10037 &12*111,6*0,-321,-311,3*0,-321,-311,19*0,-3,11*0,-11,280*0,111,
10038 &-211,3*0,111,29*0,-211,111,5*0,-211,111,50*0,2101,2103,2*2101,
10040 DATA (kfdp(i,5),i= 1,2000)/85*0,111,15*0,111,7*0,111,0,2*111,
10041 &175*0,111,-211,111,7*0,2*111,4*0,111,-211,111,7*0,2*111,93*0,111,
10042 &-211,111,3*0,111,-211,4*0,111,-211,111,3*0,111,-211,1571*0/
10045 DATA (chaf(i) ,i= 1, 331)/
'd',
'u',
's',
'c',
'b',
't',
'l',
'h',
10046 &2*
' ',
'e',
'nu_e',
'mu',
'nu_mu',
'tau',
'nu_tau',
'chi',
'nu_chi',
10047 &2*
' ',
'g',
'gamma',
'Z',
'W',
'H',6*
' ',
'Z''',
'Z"',
'W''',
'H''',
'H"',
10048 &
'H',2*
' ',
'R',40*
' ',
'specflav',
'rndmflav',
'phasespa',
'c-hadron',
10049 &
'b-hadron',
't-hadron',
'l-hadron',
'h-hadron',
'Wvirt',
'diquark',
10050 &
'cluster',
'string',
'indep.',
'CMshower',
'SPHEaxis',
'THRUaxis',
10051 &
'CLUSjet',
'CELLjet',
'table',
' ',
'pi',2*
'K',2*
'D',
'D_s',2*
'B',
10052 &
'B_s',
' ',
'pi',
'eta',
'eta''',
'eta_c',
'eta_b',
'eta_t',
'eta_l',
10053 &
'eta_h',2*
' ',
'rho',2*
'K*',2*
'D*',
'D*_s',2*
'B*',
'B*_s',
' ',
'rho',
10054 &
'omega',
'phi',
'J/psi',
'Upsilon',
'Theta',
'Theta_l',
'Theta_h',
10055 &2*
' ',
'b_1',2*
'K_1',2*
'D_1',
'D_1s',2*
'B_1',
'B_1s',
' ',
'b_1',
10056 &
'h_1',
'h''_1',
'h_1c',
'h_1b',
'h_1t',
'h_1l',
'h_1h',2*
' ',
'a_0',
10057 &2*
'K*_0',2*
'D*_0',
'D*_0s',2*
'B*_0',
'B*_0s',
' ',
'a_0',
'f_0',
10058 &
'f''_0',
'chi_0c',
'chi_0b',
'chi_0t',
'chi_0l',
'chi_0h',2*
' ',
'a_1',
10059 &2*
'K*_1',2*
'D*_1',
'D*_1s',2*
'B*_1',
'B*_1s',
' ',
'a_1',
'f_1',
10060 &
'f''_1',
'chi_1c',
'chi_1b',
'chi_1t',
'chi_1l',
'chi_1h',2*
' ',
'a_2',
10061 &2*
'K*_2',2*
'D*_2',
'D*_2s',2*
'B*_2',
'B*_2s',
' ',
'a_2',
'f_2',
10062 &
'f''_2',
'chi_2c',
'chi_2b',
'chi_2t',
'chi_2l',
'chi_2h',2*
' ',
'K_L',
10063 &
'K_S',58*
' ',
'pi_diffr',
'n_diffr',
'p_diffr',22*
' ',
'Lambda',5*
' ',
10064 'Lambda_c',
' ',2*
'Xi_c',6*
' ',
'Lambda_b',
' ',2*
'Xi_b',6*
' '/
10065 DATA (chaf(i) ,i= 332, 500)/
'n',
'p',
' ',3*
'Sigma',2*
'Xi',
' ',
10066 &3*
'Sigma_c',2*
'Xi''_c',
'Omega_c',
10067 &4*
' ',3*
'Sigma_b',2*
'Xi''_b',
'Omega_b',4*
' ',4*
'Delta',
10068 &3*
'Sigma*',2*
'Xi*',
'Omega',3*
'Sigma*_c',2*
'Xi*_c',
'Omega*_c',
10069 &4*
' ',3*
'Sigma*_b',2*
'Xi*_b',
'Omega*_b',114*
' '/
10072 DATA mrlu/19780503,0,0,97,33,0/
10075 SUBROUTINE pyinit(FRAME,BEAM,TARGET,WIN)
10079 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10081 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
10083 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
10088 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
10090 common/pypars/mstp(200),parp(200),msti(200),pari(200)
10092 common/pyint1/mint(400),vint(400)
10094 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
10096 common/pyint5/ngen(0:200,3),xsec(0:200,3)
10098 CHARACTER*(*) FRAME,BEAM,
TARGET 10099 CHARACTER CHFRAM*8,CHBEAM*8,CHTARG*8,CHMO(12)*3,CHLH(2)*6
10100 DATA chmo/
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
10101 &
'Oct',
'Nov',
'Dec'/, chlh/
'lepton',
'hadron'/
10113 CALL pyinki(chfram,chbeam,chtarg,win)
10120 IF(mint(43).EQ.1.AND.(msel.EQ.1.OR.msel.EQ.2))
THEN 10122 IF(mint(11)+mint(12).EQ.0) msub(1)=1
10123 IF(mint(11)+mint(12).NE.0) msub(2)=1
10124 ELSEIF(msel.EQ.1)
THEN 10132 IF(mstp(82).LE.1.AND.ckin(3).LT.parp(81)) msub(95)=1
10133 IF(mstp(82).GE.2.AND.ckin(3).LT.parp(82)) msub(95)=1
10134 ELSEIF(msel.EQ.2)
THEN 10146 ELSEIF(msel.GE.4.AND.msel.LE.8)
THEN 10150 DO 110 j=1,
min(8,mdcy(21,3))
10151 110 mdme(mdcy(21,2)+j-1,1)=0
10152 mdme(mdcy(21,2)+msel-1,1)=1
10153 ELSEIF(msel.EQ.10)
THEN 10158 ELSEIF(msel.EQ.11)
THEN 10161 ELSEIF(msel.EQ.12)
THEN 10164 ELSEIF(msel.EQ.13)
THEN 10168 ELSEIF(msel.EQ.14)
THEN 10172 ELSEIF(msel.EQ.15)
THEN 10179 ELSEIF(msel.EQ.16)
THEN 10185 ELSEIF(msel.EQ.17)
THEN 10189 ELSEIF(msel.EQ.21)
THEN 10192 ELSEIF(msel.EQ.22)
THEN 10195 ELSEIF(msel.EQ.23)
THEN 10203 IF(mint(43).LT.4.AND.isub.GE.91.AND.isub.LE.96.AND.
10204 &msub(isub).EQ.1)
THEN 10205 WRITE(mstu(11),1200) isub,chlh(mint(41)),chlh(mint(42))
10207 ELSEIF(msub(isub).EQ.1.AND.iset(isub).EQ.-1)
THEN 10208 WRITE(mstu(11),1300) isub
10210 ELSEIF(msub(isub).EQ.1.AND.iset(isub).LE.-2)
THEN 10211 WRITE(mstu(11),1400) isub
10213 ELSEIF(msub(isub).EQ.1)
THEN 10214 mint(44)=mint(44)+1
10217 IF(mint(44).EQ.0)
THEN 10218 WRITE(mstu(11),1500)
10221 mint(45)=mint(44)-msub(91)-msub(92)-msub(93)-msub(94)
10224 mstp(1)=
min(4,mstp(1))
10225 mstu(114)=
min(mstu(114),2*mstp(1))
10226 mstp(54)=
min(mstp(54),2*mstp(1))
10232 IF(ia.GE.1.AND.ia.LE.2*mstp(1))
THEN 10235 ipm=(5-isign(1,i))/2
10237 130
IF(mdme(idc,1).EQ.1.OR.mdme(idc,1).EQ.ipm) vint(180+i)=
10238 & vint(180+i)+vckm((ia+1)/2,(ib+1)/2)
10239 ELSEIF(ia.GE.11.AND.ia.LE.10+2*mstp(1))
THEN 10246 IF(mstp(3).GE.1)
THEN 10248 IF(mstp(51).EQ.1) alam=0.2
10249 IF(mstp(51).EQ.2) alam=0.29
10250 IF(mstp(51).EQ.3) alam=0.2
10251 IF(mstp(51).EQ.4) alam=0.4
10252 IF(mstp(51).EQ.11) alam=0.16
10253 IF(mstp(51).EQ.12) alam=0.26
10254 IF(mstp(51).EQ.13) alam=0.36
10272 IF(mint(43).EQ.4)
CALL pyxtot 10275 IF(mstp(121).LE.0)
CALL pymaxi 10278 IF(mstp(131).NE.0)
CALL pyovly(1)
10281 IF(mint(43).EQ.4.AND.(mint(45).NE.0.OR.mstp(131).NE.0).AND.
10282 &mstp(82).GE.2)
CALL pymult(1)
10286 1000
FORMAT(///20
x,
'The Lund Monte Carlo - PYTHIA version ',i1,
'.',i1/
10287 &20
x,
'** Last date of change: ',i2,1
x,
a3,1
x,i4,
' **'/)
10288 1100
FORMAT(
'1',18(
'*'),1
x,
'PYINIT: initialization of PYTHIA ',
10289 &
'routines',1
x,17(
'*'))
10290 1200
FORMAT(1
x,
'Error: process number ',i3,
' not meaningful for ',a6,
10291 &
'-',a6,
' interactions.'/1
x,
'Execution stopped!')
10292 1300
FORMAT(1
x,
'Error: requested subprocess',i4,
' not implemented.'/
10293 &1
x,
'Execution stopped!')
10294 1400
FORMAT(1
x,
'Error: requested subprocess',i4,
' not existing.'/
10295 &1
x,
'Execution stopped!')
10296 1500
FORMAT(1
x,
'Error: no subprocess switched on.'/
10297 &1
x,
'Execution stopped.')
10298 1600
FORMAT(/1
x,22(
'*'),1
x,
'PYINIT: initialization completed',1
x,
10310 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
10312 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10314 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
10316 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
10318 common/pypars/mstp(200),parp(200),msti(200),pari(200)
10320 common/pyint1/mint(400),vint(400)
10322 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
10324 common/pyint5/ngen(0:200,3),xsec(0:200,3)
10331 IF(mstp(131).NE.0)
CALL pyovly(2)
10332 IF(mstp(131).NE.0) novl=mint(81)
10337 IF(mint(84)+100.GE.mstu(4))
THEN 10339 &
'(PYTHIA:) no more space in LUJETS for overlayed events')
10340 IF(mstu(21).GE.1)
GOTO 200
10346 IF(iovl.EQ.1) ngen(0,2)=ngen(0,2)+1
10352 ngen(isub,2)=ngen(isub,2)+1
10368 IF(isub.NE.95)
THEN 10370 120 pari(j)=vint(30+j)
10373 pari(35)=pari(33)-pari(34)
10381 IF(mstp(111).EQ.-1)
GOTO 160
10382 IF(isub.LE.90.OR.isub.GE.95)
THEN 10386 IF(mint(51).EQ.1)
GOTO 100
10391 IF(mstp(61).GE.1.AND.mint(43).NE.1.AND.isub.NE.95)
10392 &
CALL pysspa(ipu1,ipu2)
10396 IF(mstp(81).GE.1.AND.mint(43).EQ.4.AND.isub.NE.95)
10403 IF(mint(51).EQ.1)
GOTO 100
10409 IF(mstp(71).GE.1.AND.isub.NE.95.AND.k(ipu3,1).GT.0.AND.
10410 & k(ipu3,1).LE.10.AND.k(ipu4,1).GT.0.AND.k(ipu4,1).LE.10)
THEN 10411 qmax=sqrt(parp(71)*vint(52))
10412 IF(isub.EQ.5) qmax=sqrt(pmas(23,1)**2)
10413 IF(isub.EQ.8) qmax=sqrt(pmas(24,1)**2)
10414 CALL lushow(ipu3,ipu4,qmax)
10419 pari(65)=2.*pari(17)
10420 DO 130 i=mstp(126)+1,
n 10421 IF(k(i,1).LE.0.OR.k(i,1).GT.10)
GOTO 130
10422 pt=sqrt(p(i,1)**2+p(i,2)**2)
10423 pari(69)=pari(69)+
pt 10424 IF(i.LE.nsav1.OR.i.GT.nsav3) pari(66)=pari(66)+
pt 10425 IF(i.GT.nsav1.AND.i.LE.nsav2) pari(68)=pari(68)+
pt 10435 IF(mstp(41).GE.1.AND.isub.NE.95)
CALL pyresd 10441 pari(65)=2.*pari(17)
10448 IF(mstp(113).GE.1)
THEN 10449 DO 140 i=mint(83)+1,
n 10450 140
IF(k(i,1).GT.0.AND.k(i,1).LE.10) p(i,4)=sqrt(p(i,1)**2+
10451 & p(i,2)**2+p(i,3)**2+p(i,5)**2)
10457 IF(mstp(112).EQ.1.AND.mstu(28).EQ.3)
GOTO 100
10458 IF(mstp(125).EQ.0.OR.mstp(125).EQ.1)
THEN 10459 DO 150 i=mint(84)+1,
n 10460 IF(k(i,2).NE.94)
GOTO 150
10461 k(i+1,3)=mod(k(i+1,4)/mstu(5),mstu(5))
10462 k(i+2,3)=mod(k(i+2,4)/mstu(5),mstu(5))
10466 IF(mstp(125).EQ.0)
CALL luedit(15)
10467 IF(mstp(125).EQ.0) mint(4)=0
10471 IF(iovl.EQ.1.AND.mstp(125).LE.0)
THEN 10474 ELSEIF(iovl.EQ.1)
THEN 10482 IF(mstp(111).GE.1)
CALL luexec 10483 IF(mstp(125).EQ.0.OR.mstp(125).EQ.1)
CALL luedit(14)
10486 160
IF(iovl.EQ.1)
THEN 10487 IF(mstp(111).NE.-1) ngen(isub,3)=ngen(isub,3)+1
10488 ngen(0,3)=ngen(0,3)+1
10493 ELSEIF(msub(95).EQ.1.AND.(i.EQ.11.OR.i.EQ.12.OR.i.EQ.13.OR.
10494 & i.EQ.28.OR.i.EQ.53.OR.i.EQ.68))
THEN 10495 xsec(i,3)=xsec(96,2)*ngen(i,3)/
max(1.,float(ngen(96,1))*
10496 & float(ngen(96,2)))
10497 ELSEIF(ngen(i,1).EQ.0)
THEN 10499 ELSEIF(ngen(i,2).EQ.0)
THEN 10500 xsec(i,3)=xsec(i,2)*ngen(0,3)/(float(ngen(i,1))*
10501 & float(ngen(0,2)))
10503 xsec(i,3)=xsec(i,2)*ngen(i,3)/(float(ngen(i,1))*
10504 & float(ngen(i,2)))
10506 170 xsec(0,3)=xsec(0,3)+xsec(i,3)
10507 IF(msub(95).EQ.1)
THEN 10508 ngens=ngen(91,3)+ngen(92,3)+ngen(93,3)+ngen(94,3)+ngen(95,3)
10509 xsecs=xsec(91,3)+xsec(92,3)+xsec(93,3)+xsec(94,3)+xsec(95,3)
10511 IF(msub(91).EQ.1) xmaxs=xmaxs+xsec(91,1)
10512 IF(msub(92).EQ.1) xmaxs=xmaxs+xsec(92,1)
10513 IF(msub(93).EQ.1) xmaxs=xmaxs+xsec(93,1)
10514 IF(msub(94).EQ.1) xmaxs=xmaxs+xsec(94,1)
10516 IF(ngens.LT.ngen(0,3))
fac=(xmaxs-xsecs)/(xsec(0,3)-xsecs)
10517 xsec(11,3)=
fac*xsec(11,3)
10518 xsec(12,3)=
fac*xsec(12,3)
10519 xsec(13,3)=
fac*xsec(13,3)
10520 xsec(28,3)=
fac*xsec(28,3)
10521 xsec(53,3)=
fac*xsec(53,3)
10522 xsec(68,3)=
fac*xsec(68,3)
10523 xsec(0,3)=xsec(91,3)+xsec(92,3)+xsec(93,3)+xsec(94,3)+
10545 pari(2)=xsec(0,3)/mint(5)
10548 IF(isub.NE.95.AND.mint(7)*mint(8).NE.0)
THEN 10549 pari(42)=2.*vint(47)/vint(1)
10551 pari(36+is)=p(mint(is),3)/vint(1)
10552 pari(38+is)=p(mint(is),4)/vint(1)
10554 pr=
max(1
e-20,p(i,5)**2+p(i,1)**2+p(i,2)**2)
10555 pari(40+is)=sign(log(
min((sqrt(pr+p(i,3)**2)+abs(p(i,3)))/
10556 & sqrt(pr),1e20)),p(i,3))
10557 pr=
max(1
e-20,p(i,1)**2+p(i,2)**2)
10558 pari(42+is)=sign(log(
min((sqrt(pr+p(i,3)**2)+abs(p(i,3)))/
10559 & sqrt(pr),1e20)),p(i,3))
10560 pari(44+is)=p(i,3)/sqrt(p(i,1)**2+p(i,2)**2+p(i,3)**2)
10561 pari(46+is)=
ulangl(p(i,3),sqrt(p(i,1)**2+p(i,2)**2))
10562 pari(48+is)=
ulangl(p(i,1),p(i,2))
10566 IF(iset(isub).EQ.1.OR.iset(isub).EQ.3)
THEN 10577 IF(iovl.GE.2.AND.iovl.LE.10) msti(40+iovl)=isub
10578 IF(mstu(70).LT.10)
THEN 10579 mstu(70)=mstu(70)+1
10580 mstu(70+mstu(70))=
n 10583 mint(84)=
n+mstp(126)
10587 IF(mstp(131).EQ.1.AND.mstp(133).GE.1)
THEN 10591 IF(mstp(133).EQ.2) pari(93)=pari(93)*xsec(0,3)/vint(131)
10595 200
CALL pyfram(mstp(124))
10602 SUBROUTINE pystat(MSTAT)
10606 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10608 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
10610 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
10612 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
10614 common/pypars/mstp(200),parp(200),msti(200),pari(200)
10616 common/pyint1/mint(400),vint(400)
10618 common/pyint4/widp(21:40,0:40),wide(21:40,0:40),wids(21:40,3)
10620 common/pyint5/ngen(0:200,3),xsec(0:200,3)
10622 common/pyint6/proc(0:200)
10625 CHARACTER CHAU*16,CHPA(-40:40)*12,CHIN(2)*12,
10626 &state(-1:5)*4,chkin(21)*18
10627 DATA state/
'----',
'off ',
'on ',
'on/+',
'on/-',
'on/1',
'on/2'/,
10628 &chkin/
' m_hard (GeV/c^2) ',
' p_T_hard (GeV/c) ',
10629 &
'm_finite (GeV/c^2)',
' y*_subsystem ',
' y*_large ',
10630 &
' y*_small ',
' eta*_large ',
' eta*_small ',
10631 &
'cos(theta*)_large ',
'cos(theta*)_small ',
' x_1 ',
10632 &
' x_2 ',
' x_F ',
' cos(theta_hard) ',
10633 &
'm''_hard (GeV/c^2) ',
' tau ',
' y* ',
10634 &
'cos(theta_hard^-) ',
'cos(theta_hard^+) ',
' x_T^2 ',
10638 IF(mstat.LE.1)
THEN 10639 WRITE(mstu(11),1000)
10640 WRITE(mstu(11),1100)
10641 WRITE(mstu(11),1200) 0,proc(0),ngen(0,3),ngen(0,1),xsec(0,3)
10643 IF(msub(i).NE.1)
GOTO 100
10644 WRITE(mstu(11),1200) i,proc(i),ngen(i,3),ngen(i,1),xsec(i,3)
10646 WRITE(mstu(11),1300) 1.-float(ngen(0,3))/
10647 &
max(1.,float(ngen(0,2)))
10650 ELSEIF(mstat.EQ.2)
THEN 10653 110 chpa(kf)=chau(1:12)
10654 WRITE(mstu(11),1400)
10655 WRITE(mstu(11),1500)
10661 WRITE(mstu(11),1600) chpa(kc),0.,0.,state(mdcy(kc,1)),0.
10662 DO 120 j=1,mdcy(kc,3)
10664 120
IF(mdme(idc,2).EQ.102)
WRITE(mstu(11),1700) chpa(kfdp(idc,1)),
10665 & chpa(kfdp(idc,2)),0.,0.,state(mdme(idc,1)),0.
10673 IF(wide(kc,0).GT.0.)
THEN 10674 WRITE(mstu(11),1600) chpa(kc),widp(kc,0),1.,
10675 & state(mdcy(kc,1)),1.
10676 DO 140 j=1,mdcy(kc,3)
10678 140
WRITE(mstu(11),1700) chpa(kfdp(idc,1)),chpa(kfdp(idc,2)),
10679 & widp(kc,j),widp(kc,j)/widp(kc,0),state(mdme(idc,1)),
10680 & wide(kc,j)/wide(kc,0)
10682 WRITE(mstu(11),1600) chpa(kc),widp(kc,0),1.,
10683 & state(mdcy(kc,1)),0.
10686 WRITE(mstu(11),1800)
10689 ELSEIF(mstat.EQ.3)
THEN 10690 WRITE(mstu(11),1900)
10691 CALL luname(mint(11),chau)
10693 CALL luname(mint(12),chau)
10695 WRITE(mstu(11),2000) chin(1),chin(2)
10698 160 chpa(kf)=chau(1:12)
10699 IF(mint(43).EQ.1)
THEN 10700 WRITE(mstu(11),2100) chpa(mint(11)),state(kfin(1,mint(11))),
10701 & chpa(mint(12)),state(kfin(2,mint(12)))
10702 ELSEIF(mint(43).EQ.2)
THEN 10703 WRITE(mstu(11),2100) chpa(mint(11)),state(kfin(1,mint(11))),
10704 & chpa(-mstp(54)),state(kfin(2,-mstp(54)))
10705 DO 170 i=-mstp(54)+1,-1
10706 170
WRITE(mstu(11),2200) chpa(i),state(kfin(2,i))
10707 DO 180 i=1,mstp(54)
10708 180
WRITE(mstu(11),2200) chpa(i),state(kfin(2,i))
10709 WRITE(mstu(11),2200) chpa(21),state(kfin(2,21))
10710 ELSEIF(mint(43).EQ.3)
THEN 10711 WRITE(mstu(11),2100) chpa(-mstp(54)),state(kfin(1,-mstp(54))),
10713 DO 190 i=-mstp(54)+1,-1
10714 190
WRITE(mstu(11),2300) chpa(i),state(kfin(1,i))
10715 DO 200 i=1,mstp(54)
10716 200
WRITE(mstu(11),2300) chpa(i),state(kfin(1,i))
10717 WRITE(mstu(11),2300) chpa(21),state(kfin(1,21))
10718 ELSEIF(mint(43).EQ.4)
THEN 10719 DO 210 i=-mstp(54),-1
10720 210
WRITE(mstu(11),2100) chpa(i),state(kfin(1,i)),chpa(i),
10722 DO 220 i=1,mstp(54)
10723 220
WRITE(mstu(11),2100) chpa(i),state(kfin(1,i)),chpa(i),
10725 WRITE(mstu(11),2100) chpa(21),state(kfin(1,21)),chpa(21),
10726 & state(kfin(2,21))
10728 WRITE(mstu(11),2400)
10731 ELSEIF(mstat.EQ.4)
THEN 10732 WRITE(mstu(11),2500)
10733 WRITE(mstu(11),2600)
10735 IF(shrmax.LT.0.) shrmax=vint(1)
10736 WRITE(mstu(11),2700) ckin(1),chkin(1),shrmax
10737 pthmin=
max(ckin(3),ckin(5))
10739 IF(pthmax.LT.0.) pthmax=0.5*shrmax
10740 WRITE(mstu(11),2800) ckin(3),pthmin,chkin(2),pthmax
10741 WRITE(mstu(11),2900) chkin(3),ckin(6)
10743 230
WRITE(mstu(11),2700) ckin(2*i-1),chkin(i),ckin(2*i)
10745 IF(sprmax.LT.0.) sprmax=vint(1)
10746 WRITE(mstu(11),2700) ckin(31),chkin(13),sprmax
10747 WRITE(mstu(11),3000)
10748 WRITE(mstu(11),3100)
10749 WRITE(mstu(11),2600)
10751 240
WRITE(mstu(11),2700) vint(i-5),chkin(i),vint(i+15)
10752 WRITE(mstu(11),3000)
10755 ELSEIF(mstat.EQ.5)
THEN 10756 WRITE(mstu(11),3200)
10757 WRITE(mstu(11),3300)
10759 250
WRITE(mstu(11),3400) i,mstp(i),parp(i),100+i,mstp(100+i),
10764 1000
FORMAT(
'1',9(
'*'),1
x,
'PYSTAT: Statistics on Number of ',
10765 &
'Events and Cross-sections',1
x,9(
'*'))
10766 1100
FORMAT(/1
x,78(
'=')/1
x,
'I',34
x,
'I',28
x,
'I',12
x,
'I'/1
x,
'I',12
x,
10767 &
'Subprocess',12
x,
'I',6
x,
'Number of points',6
x,
'I',4
x,
'Sigma',3
x,
10768 &
'I'/1
x,
'I',34
x,
'I',28
x,
'I',12
x,
'I'/1
x,
'I',34(
'-'),
'I',28(
'-'),
10769 &
'I',4
x,
'(mb)',4
x,
'I'/1
x,
'I',34
x,
'I',28
x,
'I',12
x,
'I'/1
x,
'I',1
x,
10770 &
'N:o',1
x,
'Type',25
x,
'I',4
x,
'Generated',9
x,
'Tried',1
x,
'I',12
x,
10771 &
'I'/1
x,
'I',34
x,
'I',28
x,
'I',12
x,
'I'/1
x,78(
'=')/1
x,
'I',34
x,
'I',28
x,
10773 1200
FORMAT(1
x,
'I',1
x,i3,1
x,a28,1
x,
'I',1
x,i12,1
x,i13,1
x,
'I',1
x,1p,
10775 1300
FORMAT(1
x,
'I',34
x,
'I',28
x,
'I',12
x,
'I'/1
x,78(
'=')//
10776 &1
x,
'********* Fraction of events that fail fragmentation ',
10777 &
'cuts =',1
x,f8.5,
' *********'/)
10778 1400
FORMAT(
'1',17(
'*'),1
x,
'PYSTAT: Decay Widths and Branching ',
10779 &
'Ratios',1
x,17(
'*'))
10780 1500
FORMAT(/1
x,78(
'=')/1
x,
'I',29
x,
'I',13
x,
'I',12
x,
'I',6
x,
'I',12
x,
'I'/
10781 &1
x,
'I',1
x,
'Branching/Decay Channel',5
x,
'I',1
x,
'Width (GeV)',1
x,
10782 &
'I',7
x,
'B.R.',1
x,
'I',1
x,
'Stat',1
x,
'I',2
x,
'Eff. B.R.',1
x,
'I'/1
x,
10783 &
'I',29
x,
'I',13
x,
'I',12
x,
'I',6
x,
'I',12
x,
'I'/1
x,78(
'='))
10784 1600
FORMAT(1
x,
'I',29
x,
'I',13
x,
'I',12
x,
'I',6
x,
'I',12
x,
'I'/1
x,
'I',1
x,
10785 &a12,1
x,
'->',13
x,
'I',2
x,1p,e10.3,0p,1
x,
'I',1
x,1p,e10.3,0p,1
x,
'I',
10786 &1
x,
a4,1
x,
'I',1
x,1p,e10.3,0p,1
x,
'I')
10787 1700
FORMAT(1
x,
'I',1
x,a12,1
x,
'+',1
x,a12,1
x,
'I',2
x,1p,e10.3,0p,1
x,
'I',
10788 &1
x,1p,e10.3,0p,1
x,
'I',1
x,
a4,1
x,
'I',1
x,1p,e10.3,0p,1
x,
'I')
10789 1800
FORMAT(1
x,
'I',29
x,
'I',13
x,
'I',12
x,
'I',6
x,
'I',12
x,
'I'/1
x,78(
'='))
10790 1900
FORMAT(
'1',7(
'*'),1
x,
'PYSTAT: Allowed Incoming Partons/',
10791 &
'Particles at Hard Interaction',1
x,7(
'*'))
10792 2000
FORMAT(/1
x,78(
'=')/1
x,
'I',38
x,
'I',37
x,
'I'/1
x,
'I',1
x,
10793 &
'Beam particle:',1
x,
a,10
x,
'I',1
x,
'Target particle:',1
x,
a,7
x,
10794 &
'I'/1
x,
'I',38
x,
'I',37
x,
'I'/1
x,
'I',1
x,
'Content',9
x,
'State',16
x,
10795 &
'I',1
x,
'Content',9
x,
'State',15
x,
'I'/1
x,
'I',38
x,
'I',37
x,
'I'/1
x,
10796 &78(
'=')/1
x,
'I',38
x,
'I',37
x,
'I')
10797 2100
FORMAT(1
x,
'I',1
x,
a,5
x,
a,16
x,
'I',1
x,
a,5
x,
a,15
x,
'I')
10798 2200
FORMAT(1
x,
'I',38
x,
'I',1
x,
a,5
x,
a,15
x,
'I')
10799 2300
FORMAT(1
x,
'I',1
x,
a,5
x,
a,16
x,
'I',37
x,
'I')
10800 2400
FORMAT(1
x,
'I',38
x,
'I',37
x,
'I'/1
x,78(
'='))
10801 2500
FORMAT(
'1',12(
'*'),1
x,
'PYSTAT: User-Defined Limits on ',
10802 &
'Kinematical Variables',1
x,12(
'*'))
10803 2600
FORMAT(/1
x,78(
'=')/1
x,
'I',76
x,
'I')
10804 2700
FORMAT(1
x,
'I',16
x,1p,e10.3,0p,1
x,
'<',1
x,
a,1
x,
'<',1
x,1p,e10.3,0p,
10806 2800
FORMAT(1
x,
'I',3
x,1p,e10.3,0p,1
x,
'(',1p,e10.3,0p,
')',1
x,
'<',1
x,
a,
10807 &1
x,
'<',1
x,1p,e10.3,0p,16
x,
'I')
10808 2900
FORMAT(1
x,
'I',29
x,
a,1
x,
'=',1
x,1p,e10.3,0p,16
x,
'I')
10809 3000
FORMAT(1
x,
'I',76
x,
'I'/1
x,78(
'='))
10810 3100
FORMAT(////1
x,5(
'*'),1
x,
'PYSTAT: Derived Limits on Kinematical ',
10811 &
'Variables Used in Generation',1
x,5(
'*'))
10812 3200
FORMAT(
'1',12(
'*'),1
x,
'PYSTAT: Summary of Status Codes and ',
10813 &
'Parameter Values',1
x,12(
'*'))
10814 3300
FORMAT(/3
x,
'I',4
x,
'MSTP(I)',9
x,
'PARP(I)',20
x,
'I',4
x,
'MSTP(I)',9
x,
10816 3400
FORMAT(1
x,i3,5
x,i6,6
x,1p,e10.3,0p,18
x,i3,5
x,i6,6
x,1p,e10.3)
10823 SUBROUTINE pyinki(CHFRAM,CHBEAM,CHTARG,WIN)
10827 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
10829 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10831 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
10833 common/pypars/mstp(200),parp(200),msti(200),pari(200)
10835 common/pyint1/mint(400),vint(400)
10837 CHARACTER CHFRAM*8,CHBEAM*8,CHTARG*8,CHCOM(3)*8,CHALP(2)*26,
10838 &chidnt(3)*8,chtemp*8,chcde(18)*8,chinit*76
10839 dimension len(3),kcde(18)
10840 DATA chalp/
'abcdefghijklmnopqrstuvwxyz',
10841 &
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
10842 DATA chcde/
'e- ',
'e+ ',
'nue ',
'nue~ ',
10843 &
'mu- ',
'mu+ ',
'numu ',
'numu~ ',
'tau- ',
10844 &
'tau+ ',
'nutau ',
'nutau~ ',
'pi+ ',
'pi- ',
10845 &
'n ',
'n~ ',
'p ',
'p~ '/
10846 DATA kcde/11,-11,12,-12,13,-13,14,-14,15,-15,16,-16,
10847 &211,-211,2112,-2112,2212,-2212/
10856 IF(len(i).EQ.ll.AND.chcom(i)(ll:ll).EQ.
' ') len(i)=ll-1
10858 100
IF(chcom(i)(ll:ll).EQ.chalp(2)(la:la)) chcom(i)(ll:ll)=
10862 IF(chidnt(i)(ll:ll+2).EQ.
'bar')
THEN 10864 chidnt(i)=chtemp(1:ll-1)//
'~'//chtemp(ll+3:8)//
' ' 10868 IF(chidnt(i)(ll:ll).EQ.
'_')
THEN 10870 chidnt(i)=chtemp(1:ll-1)//chtemp(ll+1:8)//
' ' 10879 130
IF(chidnt(i+1).EQ.chcde(j)) k(i,2)=kcde(j)
10882 IF(iabs(k(i,2)).GT.100) mint(40+i)=2
10885 IF(k(1,2).EQ.0)
WRITE(mstu(11),1000) chbeam(1:len(2))
10886 IF(k(2,2).EQ.0)
WRITE(mstu(11),1100) chtarg(1:len(3))
10887 IF(k(1,2).EQ.0.OR.k(2,2).EQ.0) stop
10893 IF(chcom(1)(1:2).EQ.
'cm')
THEN 10894 IF(chcom(2)(1:1).NE.
'e')
THEN 10895 loffs=(34-(len(2)+len(3)))/2
10896 chinit(loffs+1:76)=
'PYTHIA will be initialized for a '//
10897 & chcom(2)(1:len(2))//
'-'//chcom(3)(1:len(3))//
' collider'//
' ' 10899 loffs=(33-(len(2)+len(3)))/2
10900 chinit(loffs+1:76)=
'PYTHIA will be initialized for an '//
10901 & chcom(2)(1:len(2))//
'-'//chcom(3)(1:len(3))//
' collider'//
' ' 10910 p(1,3)=sqrt(((
s-p(1,5)**2-p(2,5)**2)**2-(2.*p(1,5)*p(2,5))**2)/
10913 p(1,4)=sqrt(p(1,3)**2+p(1,5)**2)
10914 p(2,4)=sqrt(p(2,3)**2+p(2,5)**2)
10917 ELSEIF(chcom(1)(1:3).EQ.
'fix')
THEN 10918 loffs=(29-(len(2)+len(3)))/2
10919 chinit(loffs+1:76)=
'PYTHIA will be initialized for '//
10920 & chcom(2)(1:len(2))//
' on '//chcom(3)(1:len(3))//
10921 &
' fixed target'//
' ' 10929 p(1,4)=sqrt(p(1,3)**2+p(1,5)**2)
10932 s=p(1,5)**2+p(2,5)**2+2.*p(2,4)*p(1,4)
10933 vint(10)=p(1,3)/(p(1,4)+p(2,4))
10934 CALL lurobo(0.,0.,0.,0.,-vint(10))
10938 ELSEIF(chcom(1)(1:3).EQ.
'use')
THEN 10939 loffs=(13-(len(1)+len(2)))/2
10940 chinit(loffs+1:76)=
'PYTHIA will be initialized for '//
10941 & chcom(2)(1:len(2))//
' on '//chcom(3)(1:len(3))//
10942 &
'user-specified configuration'//
' ' 10947 p(1,4)=sqrt(p(1,1)**2+p(1,2)**2+p(1,3)**2+p(1,5)**2)
10948 p(2,4)=sqrt(p(2,1)**2+p(2,2)**2+p(2,3)**2+p(2,5)**2)
10950 160 vint(7+j)=(dble(p(1,j))+dble(p(2,j)))/dble(p(1,4)+p(2,4))
10951 CALL lurobo(0.,0.,-vint(8),-vint(9),-vint(10))
10952 vint(7)=
ulangl(p(1,1),p(1,2))
10953 CALL lurobo(0.,-vint(7),0.,0.,0.)
10954 vint(6)=
ulangl(p(1,3),p(1,1))
10955 CALL lurobo(-vint(6),0.,0.,0.,0.)
10956 s=p(1,5)**2+p(2,5)**2+2.*(p(1,4)*p(2,4)-p(1,3)*p(2,3))
10961 WRITE(mstu(11),1800) chfram(1:len(1))
10964 IF(
s.LT.parp(2)**2)
THEN 10965 WRITE(mstu(11),1900) sqrt(
s)
10972 mint(43)=2*mint(41)+mint(42)-2
10980 IF(mstp(82).LE.1) vint(149)=4.*parp(81)**2/
s 10981 IF(mstp(82).GE.2) vint(149)=4.*parp(82)**2/
s 10984 1000
FORMAT(1
x,
'Error: unrecognized beam particle ''',
a,
'''.'/
10985 &1
x,
'Execution stopped!')
10986 1100
FORMAT(1
x,
'Error: unrecognized target particle ''',
a,
'''.'/
10987 &1
x,
'Execution stopped!')
10988 1200
FORMAT(/1
x,78(
'=')/1
x,
'I',76
x,
'I'/1
x,
'I',a76,
'I')
10989 1300
FORMAT(1
x,
'I',18
x,
'at',1
x,f10.3,1
x,
'GeV center-of-mass energy',
10990 &19
x,
'I'/1
x,
'I',76
x,
'I'/1
x,78(
'='))
10991 1400
FORMAT(1
x,
'I',22
x,
'at',1
x,f10.3,1
x,
'GeV/c lab-momentum',22
x,
'I')
10992 1500
FORMAT(1
x,
'I',76
x,
'I'/1
x,
'I',11
x,
'corresponding to',1
x,f10.3,1
x,
10993 &
'GeV center-of-mass energy',12
x,
'I'/1
x,
'I',76
x,
'I'/1
x,78(
'='))
10994 1600
FORMAT(1
x,
'I',76
x,
'I'/1
x,
'I',24
x,
'px (GeV/c)',3
x,
'py (GeV/c)',3
x,
10995 &
'pz (GeV/c)',16
x,
'I')
10996 1700
FORMAT(1
x,
'I',15
x,a8,3(2
x,f10.3,1
x),15
x,
'I')
10997 1800
FORMAT(1
x,
'Error: unrecognized coordinate frame ''',
a,
'''.'/
10998 &1
x,
'Execution stopped!')
10999 1900
FORMAT(1
x,
'Error: too low CM energy,',f8.3,
' GeV for event ',
11000 &
'generation.'/1
x,
'Execution stopped!')
11012 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
11014 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
11016 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
11018 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
11020 common/pypars/mstp(200),parp(200),msti(200),pari(200)
11022 common/pyint1/mint(400),vint(400)
11024 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
11026 common/pyint4/widp(21:40,0:40),wide(21:40,0:40),wids(21:40,3)
11028 common/pyint6/proc(0:200)
11031 dimension wdtp(0:40),wdte(0:40,0:5)
11043 wfac=aem/(24.*xw)*wmas
11044 CALL pywidt(24,wmas,wdtp,wdte)
11045 wids(24,1)=((wdte(0,1)+wdte(0,2))*(wdte(0,1)+wdte(0,3))+
11046 &(wdte(0,1)+wdte(0,2)+wdte(0,1)+wdte(0,3))*(wdte(0,4)+wdte(0,5))+
11047 &2.*wdte(0,4)*wdte(0,5))/wdtp(0)**2
11048 wids(24,2)=(wdte(0,1)+wdte(0,2)+wdte(0,4))/wdtp(0)
11049 wids(24,3)=(wdte(0,1)+wdte(0,3)+wdte(0,4))/wdtp(0)
11051 widp(24,i)=wfac*wdtp(i)
11052 110 wide(24,i)=wfac*wdte(i,0)
11056 hcfac=aem/(8.*xw)*(hcmas/wmas)**2*hcmas
11057 CALL pywidt(37,hcmas,wdtp,wdte)
11058 wids(37,1)=((wdte(0,1)+wdte(0,2))*(wdte(0,1)+wdte(0,3))+
11059 &(wdte(0,1)+wdte(0,2)+wdte(0,1)+wdte(0,3))*(wdte(0,4)+wdte(0,5))+
11060 &2.*wdte(0,4)*wdte(0,5))/wdtp(0)**2
11061 wids(37,2)=(wdte(0,1)+wdte(0,2)+wdte(0,4))/wdtp(0)
11062 wids(37,3)=(wdte(0,1)+wdte(0,3)+wdte(0,4))/wdtp(0)
11064 widp(37,i)=hcfac*wdtp(i)
11065 120 wide(37,i)=hcfac*wdte(i,0)
11069 zfac=aem/(48.*xw*(1.-xw))*zmas
11070 CALL pywidt(23,zmas,wdtp,wdte)
11071 wids(23,1)=((wdte(0,1)+wdte(0,2))**2+
11072 &2.*(wdte(0,1)+wdte(0,2))*(wdte(0,4)+wdte(0,5))+
11073 &2.*wdte(0,4)*wdte(0,5))/wdtp(0)**2
11074 wids(23,2)=(wdte(0,1)+wdte(0,2)+wdte(0,4))/wdtp(0)
11077 widp(23,i)=zfac*wdtp(i)
11078 130 wide(23,i)=zfac*wdte(i,0)
11082 hfac=aem/(8.*xw)*(hmas/wmas)**2*hmas
11083 CALL pywidt(25,hmas,wdtp,wdte)
11084 wids(25,1)=((wdte(0,1)+wdte(0,2))**2+
11085 &2.*(wdte(0,1)+wdte(0,2))*(wdte(0,4)+wdte(0,5))+
11086 &2.*wdte(0,4)*wdte(0,5))/wdtp(0)**2
11087 wids(25,2)=(wdte(0,1)+wdte(0,2)+wdte(0,4))/wdtp(0)
11090 widp(25,i)=hfac*wdtp(i)
11091 140 wide(25,i)=hfac*wdte(i,0)
11095 zpfac=aem/(48.*xw*(1.-xw))*zpmas
11096 CALL pywidt(32,zpmas,wdtp,wdte)
11097 wids(32,1)=((wdte(0,1)+wdte(0,2)+wdte(0,3))**2+
11098 &2.*(wdte(0,1)+wdte(0,2))*(wdte(0,4)+wdte(0,5))+
11099 &2.*wdte(0,4)*wdte(0,5))/wdtp(0)**2
11100 wids(32,2)=(wdte(0,1)+wdte(0,2)+wdte(0,4))/wdtp(0)
11103 widp(32,i)=zpfac*wdtp(i)
11104 150 wide(32,i)=zpfac*wdte(i,0)
11108 rfac=0.08*rmas/((mstp(1)-1)*(1.+6.*(1.+
ulalps(rmas**2)/paru(1))))
11109 CALL pywidt(40,rmas,wdtp,wdte)
11110 wids(40,1)=((wdte(0,1)+wdte(0,2))*(wdte(0,1)+wdte(0,3))+
11111 &(wdte(0,1)+wdte(0,2)+wdte(0,1)+wdte(0,3))*(wdte(0,4)+wdte(0,5))+
11112 &2.*wdte(0,4)*wdte(0,5))/wdtp(0)**2
11113 wids(40,2)=(wdte(0,1)+wdte(0,2)+wdte(0,4))/wdtp(0)
11114 wids(40,3)=(wdte(0,1)+wdte(0,3)+wdte(0,4))/wdtp(0)
11116 widp(40,i)=wfac*wdtp(i)
11117 160 wide(40,i)=wfac*wdte(i,0)
11121 DO 170 i=1,
min(8,mdcy(21,3))
11123 IF(mdme(idc,1).LE.0)
GOTO 170
11138 pmas(kc,2)=widp(kc,0)
11139 pmas(kc,3)=
min(0.9*pmas(kc,1),10.*pmas(kc,2))
11140 DO 180 j=1,mdcy(kc,3)
11142 brat(idc)=wide(kc,j)/wide(kc,0)
11146 IF(mstp(43).EQ.1)
THEN 11147 proc(1)=
'f + fb -> gamma*' 11148 ELSEIF(mstp(43).EQ.2)
THEN 11149 proc(1)=
'f + fb -> Z0' 11150 ELSEIF(mstp(43).EQ.3)
THEN 11151 proc(1)=
'f + fb -> gamma*/Z0' 11155 IF(mstp(44).EQ.1)
THEN 11156 proc(141)=
'f + fb -> gamma*' 11157 ELSEIF(mstp(44).EQ.2)
THEN 11158 proc(141)=
'f + fb -> Z0' 11159 ELSEIF(mstp(44).EQ.3)
THEN 11160 proc(141)=
'f + fb -> Z''0' 11161 ELSEIF(mstp(44).EQ.4)
THEN 11162 proc(141)=
'f + fb -> gamma*/Z0' 11163 ELSEIF(mstp(44).EQ.5)
THEN 11164 proc(141)=
'f + fb -> gamma*/Z''0' 11165 ELSEIF(mstp(44).EQ.6)
THEN 11166 proc(141)=
'f + fb -> Z0/Z''0' 11167 ELSEIF(mstp(44).EQ.7)
THEN 11168 proc(141)=
'f + fb -> gamma*/Z0/Z''0' 11180 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
11182 common/pypars/mstp(200),parp(200),msti(200),pari(200)
11184 common/pyint1/mint(400),vint(400)
11186 common/pyint5/ngen(0:200,3),xsec(0:200,3)
11188 dimension bcs(5,8),bcb(2,5),bcc(3)
11193 DATA ((bcs(i,j),j=1,8),i=1,5)/
11194 1 41.74, 0.66, 0.0000, 337., 0.0, 0.0, -39.3, 0.48,
11195 2 41.66, 0.60, 0.0000, 306., 0.0, 0.0, -34.6, 0.51,
11196 3 41.36, 0.63, 0.0000, 299., 7.3, 0.5, -40.4, 0.47,
11197 4 41.68, 0.63, 0.0083, 330., 0.0, 0.0, -39.0, 0.48,
11198 5 41.13, 0.59, 0.0074, 278., 10.5, 0.5, -41.2, 0.46/
11199 DATA ((bcb(i,j),j=1,5),i=1,2)/
11200 1 10.79, -0.049, 0.040, 21.5, 1.23,
11201 2 9.92, -0.027, 0.013, 18.9, 1.07/
11202 DATA bcc/2.0164346,-0.5590311,0.0376279/
11205 nfit=
min(5,
max(1,mstp(31)))
11206 sigp=bcs(nfit,1)+bcs(nfit,2)*(-0.25*paru(1)**2*
11207 &(1.-0.25*bcs(nfit,3)*paru(1)**2)+(1.+0.5*bcs(nfit,3)*paru(1)**2)*
11208 &(log(vint(2)/bcs(nfit,4)))**2+bcs(nfit,3)*
11209 &(log(vint(2)/bcs(nfit,4)))**4)/
11210 &((1.-0.25*bcs(nfit,3)*paru(1)**2)**2+2.*bcs(nfit,3)*
11211 &(1.+0.25*bcs(nfit,3)*paru(1)**2)*(log(vint(2)/bcs(nfit,4)))**2+
11212 &bcs(nfit,3)**2*(log(vint(2)/bcs(nfit,4)))**4)+bcs(nfit,5)*
11213 &vint(2)**(bcs(nfit,6)-1.)*sin(0.5*paru(1)*bcs(nfit,6))
11214 sigm=-bcs(nfit,7)*vint(2)**(bcs(nfit,8)-1.)*
11215 &cos(0.5*paru(1)*bcs(nfit,8))
11216 refp=bcs(nfit,2)*paru(1)*log(vint(2)/bcs(nfit,4))/
11217 &((1.-0.25*bcs(nfit,3)*paru(1)**2)**2+2.*bcs(nfit,3)*
11218 &(1.+0.25*bcs(nfit,3)*paru(1)**2)+(log(vint(2)/bcs(nfit,4)))**2+
11219 &bcs(nfit,3)**2*(log(vint(2)/bcs(nfit,4)))**4)-bcs(nfit,5)*
11220 &vint(2)**(bcs(nfit,6)-1.)*cos(0.5*paru(1)*bcs(nfit,6))
11221 refm=-bcs(nfit,7)*vint(2)**(bcs(nfit,8)-1.)*
11222 &sin(0.5*paru(1)*bcs(nfit,8))
11223 sigma=sigp-isign(1,mint(11)*mint(12))*sigm
11224 rho=(refp-isign(1,mint(11)*mint(12))*refm)/sigma
11228 IF(mstp(31).GE.4) nfit=2
11229 bp=bcb(nfit,1)+bcb(nfit,2)*log(vint(2))+
11230 &bcb(nfit,3)*(log(vint(2)))**2
11231 bm=bcb(nfit,4)+bcb(nfit,5)*log(vint(2))
11232 b=
bp-isign(1,mint(11)*mint(12))*sigm/sigp*(bm-
bp)
11234 c=-0.5*bcc(2)/bcc(3)*(1.-sqrt(
max(0.,1.+4.*bcc(3)/bcc(2)**2*
11235 &(1.
e-03*vint(1)-bcc(1)))))
11239 sigel=sigma**2*(1.+rho**2)/(16.*paru(1)*paru(5)*b)
11242 sigsd=2.*0.68*(1.+36./vint(2))*log(0.6+0.1*vint(2))
11246 sigdd=sigsd**2/(3.*sigel)
11249 signd=sigma-sigdd-sigsd-sigel
11252 IF(iabs(mint(11)).EQ.211.AND.iabs(mint(12)).EQ.211)
THEN 11258 ELSEIF(iabs(mint(11)).EQ.211.OR.iabs(mint(12)).EQ.211)
THEN 11284 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
11286 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
11288 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
11290 common/pypars/mstp(200),parp(200),msti(200),pari(200)
11292 common/pyint1/mint(400),vint(400)
11294 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
11296 common/pyint3/xsfx(2,-40:40),isig(1000,3),sigh(1000)
11298 common/pyint4/widp(21:40,0:40),wide(21:40,0:40),wids(21:40,3)
11300 common/pyint5/ngen(0:200,3),xsec(0:200,3)
11302 common/pyint6/proc(0:200)
11305 CHARACTER CVAR(4)*4
11306 dimension npts(4),mvarpt(200,4),vintpt(200,30),sigspt(200),
11307 &narel(6),wtrel(6),wtmat(6,6),coefu(6),iaccmx(4),sigsmx(4),
11309 DATA cvar/
'tau ',
'tau''',
'y* ',
'cth '/
11316 IF(isub.GE.91.AND.isub.LE.95)
THEN 11317 xsec(isub,1)=vint(isub+11)
11318 IF(msub(isub).NE.1)
GOTO 350
11320 ELSEIF(isub.EQ.96)
THEN 11321 IF(mint(43).NE.4)
GOTO 350
11322 IF(msub(95).NE.1.AND.mstp(81).LE.0.AND.mstp(131).LE.0)
GOTO 350
11323 ELSEIF(isub.EQ.11.OR.isub.EQ.12.OR.isub.EQ.13.OR.isub.EQ.28.OR.
11324 &isub.EQ.53.OR.isub.EQ.68)
THEN 11325 IF(msub(isub).NE.1.OR.msub(95).EQ.1)
GOTO 350
11327 IF(msub(isub).NE.1)
GOTO 350
11331 IF(isub.EQ.96) istsb=2
11332 IF(mstp(122).GE.2)
WRITE(mstu(11),1000) isub
11337 IF(istsb.EQ.1.OR.istsb.EQ.3)
THEN 11339 ELSEIF(isub.GE.71.AND.isub.LE.77)
THEN 11343 taur1=pmas(kfr1,1)**2/vint(2)
11344 gamr1=pmas(kfr1,1)*pmas(kfr1,2)/vint(2)
11350 IF(isub.EQ.141)
THEN 11352 taur2=pmas(kfr2,1)**2/vint(2)
11353 gamr2=pmas(kfr2,1)*pmas(kfr2,2)/vint(2)
11365 IF(istsb.EQ.2.OR.istsb.EQ.4)
THEN 11366 IF(kfpr(isub,1).NE.0) sqm3=pmas(kfpr(isub,1),1)**2
11367 IF(kfpr(isub,2).NE.0) sqm4=pmas(kfpr(isub,2),1)**2
11368 IF(
min(sqm3,sqm4).LT.ckin(6)**2) mint(71)=1
11369 IF(mint(71).EQ.1) vint(71)=
max(ckin(3),ckin(5))
11370 IF(isub.EQ.96.AND.mstp(82).LE.1) vint(71)=parp(81)
11371 IF(isub.EQ.96.AND.mstp(82).GE.2) vint(71)=0.08*parp(82)
11377 npts(1)=2+2*mint(72)
11378 IF(mint(43).EQ.1.AND.(istsb.EQ.1.OR.istsb.EQ.2)) npts(1)=1
11380 IF(mint(43).GE.2.AND.(istsb.EQ.3.OR.istsb.EQ.4)) npts(2)=2
11382 IF(mint(43).EQ.4) npts(3)=3
11384 IF(istsb.EQ.2.OR.istsb.EQ.4) npts(4)=5
11385 ntry=npts(1)*npts(2)*npts(3)*npts(4)
11389 100 coef(isub,j)=0.
11406 IF(mod(itry-1,npts(2)*npts(3)*npts(4)).EQ.0)
THEN 11407 mtau=1+(itry-1)/(npts(2)*npts(3)*npts(4))
11409 IF(istsb.EQ.3.OR.istsb.EQ.4)
CALL pyklim(4)
11411 IF((istsb.EQ.3.OR.istsb.EQ.4).AND.mod(itry-1,npts(3)*npts(4)).
11413 mtaup=1+mod((itry-1)/(npts(3)*npts(4)),npts(2))
11414 CALL pykmap(4,mtaup,0.5)
11416 IF(mod(itry-1,npts(3)*npts(4)).EQ.0)
CALL pyklim(2)
11417 IF(mod(itry-1,npts(4)).EQ.0)
THEN 11418 myst=1+mod((itry-1)/npts(4),npts(3))
11422 IF(istsb.EQ.2.OR.istsb.EQ.4)
THEN 11423 mcth=1+mod(itry-1,npts(4))
11426 IF(isub.EQ.96) vint(25)=vint(21)*(1.-vint(23)**2)
11431 IF(mint(51).EQ.1)
GOTO 120
11433 mvarpt(nacc,1)=mtau
11434 mvarpt(nacc,2)=mtaup
11435 mvarpt(nacc,3)=myst
11436 mvarpt(nacc,4)=mcth
11438 110 vintpt(nacc,j)=vint(10+j)
11441 IF(sigs.GT.sigsam) sigsam=sigs
11442 IF(mstp(122).GE.2)
WRITE(mstu(11),1100) mtau,mtaup,myst,mcth,
11443 &vint(21),vint(22),vint(23),vint(26),sigs
11445 IF(sigsam.EQ.0.)
THEN 11446 WRITE(mstu(11),1200) isub
11453 atau1=log(taumax/taumin)
11454 atau2=(taumax-taumin)/(taumax*taumin)
11455 IF(npts(1).GE.3)
THEN 11456 atau3=log(taumax/taumin*(taumin+taur1)/(taumax+taur1))/taur1
11457 atau4=(atan((taumax-taur1)/gamr1)-atan((taumin-taur1)/gamr1))/
11460 IF(npts(1).GE.5)
THEN 11461 atau5=log(taumax/taumin*(taumin+taur2)/(taumax+taur2))/taur2
11462 atau6=(atan((taumax-taur2)/gamr2)-atan((taumin-taur2)/gamr2))/
11465 ystmin=0.5*log(taumin)
11467 ayst0=ystmax-ystmin
11468 ayst1=0.5*(ystmax-ystmin)**2
11469 ayst3=2.*(atan(exp(ystmax))-atan(exp(ystmin)))
11473 IF(npts(ivar).EQ.1)
GOTO 230
11474 IF(isub.EQ.96.AND.ivar.EQ.4)
GOTO 230
11481 130 wtmat(j1,j2)=0.
11483 ibin=mvarpt(iacc,ivar)
11484 narel(ibin)=narel(ibin)+1
11485 wtrel(ibin)=wtrel(ibin)+sigspt(iacc)
11489 tau=vintpt(iacc,11)
11490 wtmat(ibin,1)=wtmat(ibin,1)+1.
11491 wtmat(ibin,2)=wtmat(ibin,2)+(atau1/atau2)/tau
11493 wtmat(ibin,3)=wtmat(ibin,3)+(atau1/atau3)/(tau+taur1)
11494 wtmat(ibin,4)=wtmat(ibin,4)+(atau1/atau4)*tau/
11495 & ((tau-taur1)**2+gamr1**2)
11498 wtmat(ibin,5)=wtmat(ibin,5)+(atau1/atau5)/(tau+taur2)
11499 wtmat(ibin,6)=wtmat(ibin,6)+(atau1/atau6)*tau/
11500 & ((tau-taur2)**2+gamr2**2)
11504 ELSEIF(ivar.EQ.2)
THEN 11505 tau=vintpt(iacc,11)
11506 taup=vintpt(iacc,16)
11507 taupmn=vintpt(iacc,6)
11508 taupmx=vintpt(iacc,26)
11509 ataup1=log(taupmx/taupmn)
11510 ataup2=((1.-tau/taupmx)**4-(1.-tau/taupmn)**4)/(4.*tau)
11511 wtmat(ibin,1)=wtmat(ibin,1)+1.
11512 wtmat(ibin,2)=wtmat(ibin,2)+(ataup1/ataup2)*(1.-tau/taup)**3/
11516 ELSEIF(ivar.EQ.3)
THEN 11517 yst=vintpt(iacc,12)
11518 wtmat(ibin,1)=wtmat(ibin,1)+(ayst0/ayst1)*(yst-ystmin)
11519 wtmat(ibin,2)=wtmat(ibin,2)+(ayst0/ayst1)*(ystmax-yst)
11520 wtmat(ibin,3)=wtmat(ibin,3)+(ayst0/ayst3)/cosh(yst)
11522 rm34=2.*sqm3*sqm4/(vintpt(iacc,11)*vint(2))**2
11524 cthmax=sqrt(1.-4.*vint(71)**2/(taumax*vint(2)))
11526 IF(cthmax.GT.0.9999) rm34=
max(rm34,2.*vint(71)**2/
11527 & (taumax*vint(2)))
11528 acth1=cthmax-cthmin
11529 acth2=log(
max(rm34,rsqm-cthmin)/
max(rm34,rsqm-cthmax))
11530 acth3=log(
max(rm34,rsqm+cthmax)/
max(rm34,rsqm+cthmin))
11531 acth4=1./
max(rm34,rsqm-cthmax)-1./
max(rm34,rsqm-cthmin)
11532 acth5=1./
max(rm34,rsqm+cthmin)-1./
max(rm34,rsqm+cthmax)
11533 cth=vintpt(iacc,13)
11534 wtmat(ibin,1)=wtmat(ibin,1)+1.
11535 wtmat(ibin,2)=wtmat(ibin,2)+(acth1/acth2)/
max(rm34,rsqm-cth)
11536 wtmat(ibin,3)=wtmat(ibin,3)+(acth1/acth3)/
max(rm34,rsqm+cth)
11537 wtmat(ibin,4)=wtmat(ibin,4)+(acth1/acth4)/
max(rm34,rsqm-cth)**2
11538 wtmat(ibin,5)=wtmat(ibin,5)+(acth1/acth5)/
max(rm34,rsqm+cth)**2
11543 IF(mstp(122).GE.2)
WRITE(mstu(11),1300) cvar(ivar)
11546 IF(mstp(122).GE.2)
WRITE(mstu(11),1400) (wtmat(ibin,ired),
11547 &ired=1,nbin),wtrel(ibin)
11548 150
IF(narel(ibin).EQ.0) msolv=0
11549 IF(msolv.EQ.0)
THEN 11555 DO 170 ired=1,nbin-1
11556 DO 170 ibin=ired+1,nbin
11557 rqt=wtmat(ibin,ired)/wtmat(ired,ired)
11558 wtrel(ibin)=wtrel(ibin)-rqt*wtrel(ired)
11559 DO 170 icoe=ired,nbin
11560 170 wtmat(ibin,icoe)=wtmat(ibin,icoe)-rqt*wtmat(ired,icoe)
11561 DO 190 ired=nbin,1,-1
11562 DO 180 icoe=ired+1,nbin
11563 180 wtrel(ired)=wtrel(ired)-wtmat(ired,icoe)*coefu(icoe)
11564 190 coefu(ired)=wtrel(ired)/wtmat(ired,ired)
11570 coefu(ibin)=
max(0.,coefu(ibin))
11571 200 coefsu=coefsu+coefu(ibin)
11572 IF(ivar.EQ.1) ioff=0
11573 IF(ivar.EQ.2) ioff=14
11574 IF(ivar.EQ.3) ioff=6
11575 IF(ivar.EQ.4) ioff=9
11576 IF(coefsu.GT.0.)
THEN 11578 210 coef(isub,ioff+ibin)=parp(121)/nbin+(1.-parp(121))*coefu(ibin)/
11582 220 coef(isub,ioff+ibin)=1./nbin
11584 IF(mstp(122).GE.2)
WRITE(mstu(11),1500) cvar(ivar),
11585 &(coef(isub,ioff+ibin),ibin=1,nbin)
11595 250 vint(10+j)=vintpt(iacc,j)
11599 260
IF(abs(sigs-sigsmx(imv)).LT.1
e-4*(sigs+sigsmx(imv))) ieq=imv
11601 DO 270 imv=
nmax,1,-1
11603 IF(sigs.LE.sigsmx(imv))
GOTO 280
11604 iaccmx(imv+1)=iaccmx(imv)
11605 270 sigsmx(imv+1)=sigsmx(imv)
11607 280 iaccmx(iin)=iacc
11614 IF(mstp(122).GE.2)
WRITE(mstu(11),1600)
11618 mtau=mvarpt(iacc,1)
11619 mtaup=mvarpt(iacc,2)
11620 myst=mvarpt(iacc,3)
11621 mcth=mvarpt(iacc,4)
11630 IF(npts(ivar).EQ.1)
GOTO 310
11631 IF(ivar.EQ.1) vvar=vtau
11632 IF(ivar.EQ.2) vvar=vtaup
11633 IF(ivar.EQ.3) vvar=vyst
11634 IF(ivar.EQ.4) vvar=vcth
11635 IF(ivar.EQ.1) mvar=mtau
11636 IF(ivar.EQ.2) mvar=mtaup
11637 IF(ivar.EQ.3) mvar=myst
11638 IF(ivar.EQ.4) mvar=mcth
11639 IF(irpt.EQ.1) vdel=0.1
11640 IF(irpt.EQ.2) vdel=
max(0.01,
min(0.05,vvar-0.02,0.98-vvar))
11641 IF(irpt.EQ.1) vmar=0.02
11642 IF(irpt.EQ.2) vmar=0.002
11644 IF(irpt.EQ.1.AND.ivar.EQ.1) imov0=0
11645 DO 300 imov=imov0,8
11651 ELSEIF(imov.EQ.1)
THEN 11654 ELSEIF(imov.EQ.2)
THEN 11657 ELSEIF(sigssm(3).GE.
max(sigssm(1),sigssm(2)).AND.
11658 &vvar+2.*vdel.LT.1.-vmar)
THEN 11660 sigssm(1)=sigssm(2)
11661 sigssm(2)=sigssm(3)
11664 ELSEIF(sigssm(1).GE.
max(sigssm(2),sigssm(3)).AND.
11665 &vvar-2.*vdel.GT.vmar)
THEN 11667 sigssm(3)=sigssm(2)
11668 sigssm(2)=sigssm(1)
11671 ELSEIF(sigssm(3).GE.sigssm(1))
THEN 11674 sigssm(1)=sigssm(2)
11680 sigssm(3)=sigssm(2)
11688 CALL pykmap(1,mtau,vtau)
11689 IF(istsb.EQ.3.OR.istsb.EQ.4)
CALL pyklim(4)
11691 IF(ivar.LE.2.AND.(istsb.EQ.3.OR.istsb.EQ.4))
THEN 11692 IF(ivar.EQ.2) vtaup=vnew
11693 CALL pykmap(4,mtaup,vtaup)
11695 IF(ivar.LE.2)
CALL pyklim(2)
11697 IF(ivar.EQ.3) vyst=vnew
11698 CALL pykmap(2,myst,vyst)
11701 IF(istsb.EQ.2.OR.istsb.EQ.4)
THEN 11702 IF(ivar.EQ.4) vcth=vnew
11703 CALL pykmap(3,mcth,vcth)
11705 IF(isub.EQ.96) vint(25)=vint(21)*(1.-vint(23)**2)
11710 IF(sigs.GT.sigsam) sigsam=sigs
11711 IF(mstp(122).GE.2)
WRITE(mstu(11),1700)
imax,ivar,mvar,imov,
11712 &vnew,vint(21),vint(22),vint(23),vint(26),sigs
11716 IF(
imax.EQ.1) sigs11=sigsam
11718 xsec(isub,1)=1.05*sigsam
11719 340
IF(isub.NE.96) xsec(0,1)=xsec(0,1)+xsec(isub,1)
11723 IF(mstp(122).GE.1)
THEN 11724 WRITE(mstu(11),1800)
11725 WRITE(mstu(11),1900)
11727 IF(msub(isub).NE.1.AND.isub.NE.96)
GOTO 360
11728 IF(isub.EQ.96.AND.mint(43).NE.4)
GOTO 360
11729 IF(isub.EQ.96.AND.msub(95).NE.1.AND.mstp(81).LE.0)
GOTO 360
11730 IF(msub(95).EQ.1.AND.(isub.EQ.11.OR.isub.EQ.12.OR.isub.EQ.13.OR.
11732 WRITE(mstu(11),2000) isub,proc(isub),xsec(isub,1)
11734 WRITE(mstu(11),2100)
11738 1000
FORMAT(/1
x,
'Coefficient optimization and maximum search for ',
11739 &
'subprocess no',i4/1
x,
'Coefficient modes tau',10
x,
'y*',9
x,
11740 &
'cth',9
x,
'tau''',7
x,
'sigma')
11741 1100
FORMAT(1
x,4i4,f12.8,f12.6,f12.7,f12.8,1p,e12.4)
11742 1200
FORMAT(1
x,
'Error: requested subprocess ',i3,
' has vanishing ',
11743 &
'cross-section.'/1
x,
'Execution stopped!')
11744 1300
FORMAT(1
x,
'Coefficients of equation system to be solved for ',
a4)
11745 1400
FORMAT(1
x,1p,7e11.3)
11746 1500
FORMAT(1
x,
'Result for ',
a4,
':',6f9.4)
11747 1600
FORMAT(1
x,
'Maximum search for given coefficients'/2
x,
'MAX VAR ',
11748 &
'MOD MOV VNEW',7
x,
'tau',7
x,
'y*',8
x,
'cth',7
x,
'tau''',7
x,
'sigma')
11749 1700
FORMAT(1
x,4i4,f8.4,f11.7,f9.3,f11.6,f11.7,1p,e12.4)
11750 1800
FORMAT(/1
x,8(
'*'),1
x,
'PYMAXI: summary of differential ',
11751 &
'cross-section maximum search',1
x,8(
'*'))
11752 1900
FORMAT(/11
x,58(
'=')/11
x,
'I',38
x,
'I',17
x,
'I'/11
x,
'I ISUB ',
11753 &
'Subprocess name',15
x,
'I Maximum value I'/11
x,
'I',38
x,
'I',
11754 &17
x,
'I'/11
x,58(
'=')/11
x,
'I',38
x,
'I',17
x,
'I')
11755 2000
FORMAT(11
x,
'I',2
x,i3,3
x,a28,2
x,
'I',2
x,1p,e12.4,3
x,
'I')
11756 2100
FORMAT(11
x,
'I',38
x,
'I',17
x,
'I'/11
x,58(
'='))
11763 SUBROUTINE pyovly(MOVLY)
11768 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
11770 common/pypars/mstp(200),parp(200),msti(200),pari(200)
11772 common/pyint1/mint(400),vint(400)
11774 dimension wti(0:100)
11778 IF(movly.EQ.1)
THEN 11779 vint(131)=vint(106)
11780 IF(mstp(132).GE.2) vint(131)=vint(131)+vint(104)
11781 IF(mstp(132).GE.3) vint(131)=vint(131)+vint(103)
11782 IF(mstp(132).GE.4) vint(131)=vint(131)+vint(102)
11785 IF(mstp(133).EQ.1)
THEN 11786 xnave=vint(131)*parp(131)
11787 IF(xnave.GT.40.)
WRITE(mstu(11),1000) xnave
11788 wti(0)=exp(-
min(50.,xnave))
11792 wti(i)=wti(i-1)*xnave/i
11793 IF(i-2.5.GT.xnave.AND.wti(i).LT.1
e-6)
GOTO 110
11797 110 vint(132)=xnave
11802 ELSEIF(mstp(133).EQ.2)
THEN 11803 xnave=vint(131)*parp(131)
11804 IF(xnave.GT.40.)
WRITE(mstu(11),1000) xnave
11805 wti(1)=exp(-
min(50.,xnave))*xnave
11809 wti(i)=wti(i-1)*xnave/(i-1)
11810 IF(i-2.5.GT.xnave.AND.wti(i).LT.1
e-6)
GOTO 130
11814 130 vint(132)=xnave
11821 IF(mstp(133).EQ.0)
THEN 11822 mint(81)=
max(1,mstp(134))
11828 IF(wtr.LE.0.)
GOTO 150
11835 1000
FORMAT(1
x,
'Warning: requested average number of events per bunch',
11836 'crossing too large, ',1p,e12.4)
11849 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
11851 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
11853 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
11855 common/pypars/mstp(200),parp(200),msti(200),pari(200)
11857 common/pyint1/mint(400),vint(400)
11859 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
11861 common/pyint3/xsfx(2,-40:40),isig(1000,3),sigh(1000)
11863 common/pyint4/widp(21:40,0:40),wide(21:40,0:40),wids(21:40,3)
11865 common/pyint5/ngen(0:200,3),xsec(0:200,3)
11873 IF(msub(95).EQ.1.OR.mint(82).GE.2)
CALL pymult(2)
11878 IF(mint(82).EQ.1.AND.(isub.LE.90.OR.isub.GT.96))
THEN 11879 rsub=xsec(0,1)*
rlu(0)
11881 IF(msub(i).NE.1)
GOTO 110
11883 rsub=rsub-xsec(i,1)
11884 IF(rsub.LE.0.)
GOTO 120
11886 120
IF(isub.EQ.95) isub=96
11889 ELSEIF(mint(82).GE.2.AND.isub.EQ.0)
THEN 11890 rsub=vint(131)*
rlu(0)
11892 IF(rsub.GT.vint(106)) isub=93
11893 IF(rsub.GT.vint(106)+vint(104)) isub=92
11894 IF(rsub.GT.vint(106)+vint(104)+vint(103)) isub=91
11896 IF(mint(82).EQ.1) ngen(0,1)=ngen(0,1)+1
11897 IF(mint(82).EQ.1) ngen(isub,1)=ngen(isub,1)+1
11903 IF(iset(isub).EQ.1.OR.iset(isub).EQ.3)
THEN 11905 ELSEIF(isub.GE.71.AND.isub.LE.77)
THEN 11909 taur1=pmas(kfr1,1)**2/vint(2)
11910 gamr1=pmas(kfr1,1)*pmas(kfr1,2)/vint(2)
11916 IF(isub.EQ.141)
THEN 11918 taur2=pmas(kfr2,1)**2/vint(2)
11919 gamr2=pmas(kfr2,1)*pmas(kfr2,2)/vint(2)
11932 IF(mint(82).GE.2) vint(71)=0.
11933 IF(iset(isub).EQ.2.OR.iset(isub).EQ.4)
THEN 11935 IF(kfpr(isub,i).EQ.0)
THEN 11936 ELSEIF(mstp(42).LE.0)
THEN 11937 vint(62+i)=pmas(kfpr(isub,i),1)**2
11939 vint(62+i)=
ulmass(kfpr(isub,i))**2
11942 IF(
min(vint(63),vint(64)).LT.ckin(6)**2) mint(71)=1
11943 IF(mint(71).EQ.1) vint(71)=
max(ckin(3),ckin(5))
11946 IF(iset(isub).EQ.0)
THEN 11950 vint(63)=vint(3)**2
11951 vint(64)=vint(4)**2
11952 IF(isub.EQ.92.OR.isub.EQ.93) vint(62+is)=parp(111)**2
11953 IF(isub.EQ.93) vint(65-is)=parp(111)**2
11959 sqla12=(sh-sqm1-sqm2)**2-4.*sqm1*sqm2
11960 sqla34=(sh-sqm3-sqm4)**2-4.*sqm3*sqm4
11961 thter1=sqm1+sqm2+sqm3+sqm4-(sqm1-sqm2)*(sqm3-sqm4)/sh-sh
11962 thter2=sqrt(
max(0.,sqla12))*sqrt(
max(0.,sqla34))/sh
11963 thl=0.5*(thter1-thter2)
11964 thu=0.5*(thter1+thter2)
11965 thm=
min(
max(thl,parp(101)),thu)
11967 IF(isub.EQ.92.OR.isub.EQ.93) jtmax=isub-91
11969 mint(13+3*jt-is*(2*jt-3))=1
11970 sqmmin=vint(59+3*jt-is*(2*jt-3))
11971 sqmi=vint(8-3*jt+is*(2*jt-3))**2
11972 sqmj=vint(3*jt-1-is*(2*jt-3))**2
11973 sqmf=vint(68-3*jt+is*(2*jt-3))
11974 squa=0.5*sh/sqmi*((1.+(sqmi-sqmj)/sh)*thm+sqmi-sqmf-
11975 & sqmj**2/sh+(sqmi+sqmj)*sqmf/sh+(sqmi-sqmj)**2/sh**2*sqmf)
11976 quar=sh/sqmi*(thm*(thm+sh-sqmi-sqmj-sqmf*(1.-(sqmi-sqmj)/sh))+
11977 & sqmi*sqmj-sqmj*sqmf*(1.+(sqmi-sqmj-sqmf)/sh))
11978 sqmmax=squa+sqrt(
max(0.,squa**2-quar))
11979 IF(abs(quar/squa**2).LT.1.
e-06) sqmmax=0.5*quar/squa
11980 sqmmax=
min(sqmmax,(vint(1)-sqrt(sqmf))**2)
11981 vint(59+3*jt-is*(2*jt-3))=sqmmin*(sqmmax/sqmmin)**
rlu(0)
11986 sqla34=(sh-sqm3-sqm4)**2-4.*sqm3*sqm4
11987 thter1=sqm1+sqm2+sqm3+sqm4-(sqm1-sqm2)*(sqm3-sqm4)/sh-sh
11988 thter2=sqrt(
max(0.,sqla12))*sqrt(
max(0.,sqla34))/sh
11989 thl=0.5*(thter1-thter2)
11990 thu=0.5*(thter1+thter2)
11993 IF(isub.EQ.92.OR.isub.EQ.93)
THEN 11997 thm=
min(
max(thl,parp(101)),thu)
12000 IF(tharg.GT.-20.) expth=exp(tharg)
12001 150 th=thu+log(expth+(1.-expth)*
rlu(0))/b
12003 ratlog=
min((b+c*(th+thm))*(th-thm),(b+c*(th+thu))*(th-thu))
12004 IF(ratlog.LT.log(
rlu(0)))
GOTO 150
12007 vint(23)=
min(1.,
max(-1.,(2.*th-thter1)/thter2))
12017 ELSEIF(iset(isub).GE.1.AND.iset(isub).LE.4)
THEN 12019 IF(mint(51).NE.0)
GOTO 100
12022 IF(rtau.GT.coef(isub,1)) mtau=2
12023 IF(rtau.GT.coef(isub,1)+coef(isub,2)) mtau=3
12024 IF(rtau.GT.coef(isub,1)+coef(isub,2)+coef(isub,3)) mtau=4
12025 IF(rtau.GT.coef(isub,1)+coef(isub,2)+coef(isub,3)+coef(isub,4))
12027 IF(rtau.GT.coef(isub,1)+coef(isub,2)+coef(isub,3)+coef(isub,4)+
12028 & coef(isub,5)) mtau=6
12035 IF(iset(isub).EQ.3.OR.iset(isub).EQ.4)
THEN 12037 IF(mint(51).NE.0)
GOTO 100
12040 IF(rtaup.GT.coef(isub,15)) mtaup=2
12048 IF(mint(51).NE.0)
GOTO 100
12051 IF(ryst.GT.coef(isub,7)) myst=2
12052 IF(ryst.GT.coef(isub,7)+coef(isub,8)) myst=3
12062 IF(mint(51).NE.0)
GOTO 100
12063 IF(iset(isub).EQ.2.OR.iset(isub).EQ.4)
THEN 12066 IF(rcth.GT.coef(isub,10)) mcth=2
12067 IF(rcth.GT.coef(isub,10)+coef(isub,11)) mcth=3
12068 IF(rcth.GT.coef(isub,10)+coef(isub,11)+coef(isub,12)) mcth=4
12069 IF(rcth.GT.coef(isub,10)+coef(isub,11)+coef(isub,12)+
12070 & coef(isub,13)) mcth=5
12075 ELSEIF(iset(isub).EQ.5)
THEN 12081 vint(24)=paru(2)*
rlu(0)
12085 IF(isub.LE.90.OR.isub.GT.100)
CALL pyklim(0)
12086 IF(mint(51).NE.0)
GOTO 100
12087 IF(mint(82).EQ.1.AND.mstp(141).GE.1)
THEN 12089 IF(msub(91)+msub(92)+msub(93)+msub(94)+msub(95).EQ.0)
12091 IF(mcut.NE.0)
GOTO 100
12098 IF(mint(82).EQ.1.AND.isub.LE.90.OR.isub.GE.96)
THEN 12099 xsec(isub,2)=xsec(isub,2)+sigs
12100 ELSEIF(mint(82).EQ.1)
THEN 12101 xsec(isub,2)=xsec(isub,2)+xsec(isub,1)
12105 IF(mint(43).EQ.4.AND.mstp(82).GE.3)
THEN 12111 viol=sigs/xsec(isub,1)
12112 IF(viol.LT.
rlu(0))
GOTO 100
12116 IF(mstp(123).LE.0)
THEN 12117 IF(viol.GT.1.)
THEN 12118 WRITE(mstu(11),1000) viol,ngen(0,3)+1
12119 WRITE(mstu(11),1100) isub,vint(21),vint(22),vint(23),vint(26)
12122 ELSEIF(mstp(123).EQ.1)
THEN 12123 IF(viol.GT.vint(108))
THEN 12131 ELSEIF(viol.GT.vint(108))
THEN 12133 IF(viol.GT.1.)
THEN 12134 xdif=xsec(isub,1)*(viol-1.)
12135 xsec(isub,1)=xsec(isub,1)+xdif
12136 IF(msub(isub).EQ.1.AND.(isub.LE.90.OR.isub.GT.96))
12137 & xsec(0,1)=xsec(0,1)+xdif
12153 IF(mint(43).EQ.4.AND.(isub.LE.90.OR.isub.GE.96).AND.mstp(82).GE.3)
12156 IF(vint(150).LT.
rlu(0))
GOTO 100
12158 IF(mint(82).EQ.1.AND.msub(95).EQ.1)
THEN 12159 IF(isub.LE.90.OR.isub.GE.95) ngen(95,1)=ngen(95,1)+1
12160 IF(isub.LE.90.OR.isub.GE.96) ngen(96,2)=ngen(96,2)+1
12162 IF(isub.LE.90.OR.isub.GE.96) mint(31)=mint(31)+1
12167 rqqbar=parp(87)*(1.-(qt2/(qt2+(parp(88)*parp(82))**2))**2)
12168 IF(isub.NE.95.AND.(isub.NE.96.OR.mstp(82).LE.1.OR.
12169 &
rlu(0).GT.rqqbar))
THEN 12173 mint(2)=isig(ichn,3)
12174 rsigs=rsigs-sigh(ichn)
12175 IF(rsigs.LE.0.)
GOTO 210
12179 ELSEIF(isub.EQ.96)
THEN 12180 CALL pyspli(mint(11),21,kfl1,kfldum)
12181 CALL pyspli(mint(12),21,kfl2,kfldum)
12184 IF(kfl1.EQ.kfl2.AND.
rlu(0).LT.0.5) mint(2)=2
12192 IF(rsigs.GT.1.) mint(2)=2
12193 IF(rsigs.GT.2.) mint(2)=3
12197 210
IF(mint(2).GT.10)
THEN 12199 mint(2)=mod(mint(2),10)
12209 1000
FORMAT(1
x,
'Error: maximum violated by',1p,e11.3,1
x,
12210 &
'in event',1
x,i7,
'.'/1
x,
'Execution stopped!')
12211 1100
FORMAT(1
x,
'ISUB = ',i3,
'; Point of violation:'/1
x,
'tau =',1p,
12212 &e11.3,
', y* =',e11.3,
', cthe = ',0p,f11.7,
', tau'' =',1p,e11.3)
12213 1200
FORMAT(1
x,
'Warning: maximum violated by',1p,e11.3,1
x,
12215 1300
FORMAT(1
x,
'XSEC(',i1,
',1) increased to',1p,e11.3)
12216 1400
FORMAT(1
x,
'XSEC(',i2,
',1) increased to',1p,e11.3)
12217 1500
FORMAT(1
x,
'XSEC(',i3,
',1) increased to',1p,e11.3)
12228 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
12230 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
12232 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
12234 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
12236 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
12238 common/pypars/mstp(200),parp(200),msti(200),pari(200)
12240 common/pyint1/mint(400),vint(400)
12242 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
12244 common/pyint3/xsfx(2,-40:40),isig(1000,3),sigh(1000)
12246 common/pyint4/widp(21:40,0:40),wide(21:40,0:40),wids(21:40,3)
12248 common/pyint5/ngen(0:200,3),xsec(0:200,3)
12250 dimension wdtp(0:40),wdte(0:40,0:5),pmq(2),
z(2),cthe(2),phi(2)
12255 IF(isub.EQ.95) idoc=8
12257 IF(idoc.GE.9) idoc=idoc+2
12267 DO 100 jt=1,mstp(126)+10
12280 p(i,3)=vint(5)*(-1)**(jt+1)
12281 110 p(i,4)=sqrt(p(i,3)**2+p(i,5)**2)
12288 shp=vint(26)*vint(2)
12291 IF(iset(isub).GE.3) shuser=shpr
12296 k(i,3)=mint(83)+2+jt
12297 120 p(i,5)=
ulmass(k(i,2))
12298 IF(p(ipu1,5)+p(ipu2,5).GE.shuser)
THEN 12302 p(ipu1,4)=0.5*(shuser+(p(ipu1,5)**2-p(ipu2,5)**2)/shuser)
12303 p(ipu1,3)=sqrt(
max(0.,p(ipu1,4)**2-p(ipu1,5)**2))
12304 p(ipu2,4)=shuser-p(ipu1,4)
12305 p(ipu2,3)=-p(ipu1,3)
12315 130 p(i1,j)=p(i2,j)
12318 IF(isub.EQ.12.OR.isub.EQ.53)
THEN 12319 CALL pywidt(21,shr,wdtp,wdte)
12320 rkfl=(wdte(0,1)+wdte(0,2)+wdte(0,4))*
rlu(0)
12321 DO 140 i=1,2*mstp(1)
12323 rkfl=rkfl-(wdte(i,1)+wdte(i,2)+wdte(i,4))
12324 IF(rkfl.LE.0.)
GOTO 150
12336 kcs=isign(1,mint(15))
12338 IF(isub.LE.10)
THEN 12343 ELSEIF(isub.EQ.2)
THEN 12345 kch1=kchg(iabs(mint(15)),1)*isign(1,mint(15))
12346 kch2=kchg(iabs(mint(16)),1)*isign(1,mint(16))
12347 kfres=isign(24,kch1+kch2)
12349 ELSEIF(isub.EQ.3)
THEN 12353 ELSEIF(isub.EQ.4)
THEN 12356 ELSEIF(isub.EQ.5)
THEN 12363 240 jt=int(1.5+
rlu(0))
12364 zmin=2.*pmq(jt)/shpr
12365 zmax=1.-pmq(3-jt)/shpr-(sh-pmq(jt)**2)/(shpr*(shpr-pmq(3-jt)))
12366 zmax=
min(1.-xh,zmax)
12367 z(jt)=zmin+(zmax-zmin)*
rlu(0)
12368 IF(-1.+(1.+xh)/(1.-
z(jt))-xh/(1.-
z(jt))**2.LT.
12369 & (1.-xh)**2/(4.*xh)*
rlu(0))
GOTO 240
12370 sqc1=1.-4.*pmq(jt)**2/(
z(jt)**2*shp)
12371 IF(sqc1.LT.1.
e-8)
GOTO 240
12373 c2=1.+2.*(pmas(23,1)**2-pmq(jt)**2)/(
z(jt)*shp)
12375 cthe(jt)=
min(1.,
max(-1.,cthe(jt)))
12376 z(3-jt)=1.-xh/(1.-
z(jt))
12377 sqc1=1.-4.*pmq(3-jt)**2/(
z(3-jt)**2*shp)
12378 IF(sqc1.LT.1.
e-8)
GOTO 240
12380 c2=1.+2.*(pmas(23,1)**2-pmq(3-jt)**2)/(
z(3-jt)*shp)
12382 cthe(3-jt)=
min(1.,
max(-1.,cthe(3-jt)))
12383 phir=paru(2)*
rlu(0)
12385 ang=cthe(1)*cthe(2)-sqrt(1.-cthe(1)**2)*sqrt(1.-cthe(2)**2)*cphi
12394 IF(
z(3-jt).LT.zmin.OR.
z(3-jt).GT.zmax)
GOTO 240
12398 ELSEIF(isub.EQ.6)
THEN 12401 ELSEIF(isub.EQ.7)
THEN 12404 ELSEIF(isub.EQ.8)
THEN 12411 rvckm=vint(180+i)*
rlu(0)
12414 ipm=(5-isign(1,i))/2
12416 IF(mdme(idc,1).NE.1.AND.mdme(idc,1).NE.ipm)
GOTO 270
12417 mint(20+jt)=isign(ib,i)
12418 rvckm=rvckm-vckm((ia+1)/2,(ib+1)/2)
12419 IF(rvckm.LE.0.)
GOTO 280
12422 ib=2*((ia+1)/2)-1+mod(ia,2)
12423 mint(20+jt)=isign(ib,i)
12425 280 pmq(jt)=
ulmass(mint(20+jt))
12427 zmin=2.*pmq(jt)/shpr
12428 zmax=1.-pmq(3-jt)/shpr-(sh-pmq(jt)**2)/(shpr*(shpr-pmq(3-jt)))
12429 zmax=
min(1.-xh,zmax)
12430 z(jt)=zmin+(zmax-zmin)*
rlu(0)
12431 IF(-1.+(1.+xh)/(1.-
z(jt))-xh/(1.-
z(jt))**2.LT.
12432 & (1.-xh)**2/(4.*xh)*
rlu(0))
GOTO 250
12433 sqc1=1.-4.*pmq(jt)**2/(
z(jt)**2*shp)
12434 IF(sqc1.LT.1.
e-8)
GOTO 250
12436 c2=1.+2.*(pmas(24,1)**2-pmq(jt)**2)/(
z(jt)*shp)
12438 cthe(jt)=
min(1.,
max(-1.,cthe(jt)))
12439 z(3-jt)=1.-xh/(1.-
z(jt))
12440 sqc1=1.-4.*pmq(3-jt)**2/(
z(3-jt)**2*shp)
12441 IF(sqc1.LT.1.
e-8)
GOTO 250
12443 c2=1.+2.*(pmas(24,1)**2-pmq(3-jt)**2)/(
z(3-jt)*shp)
12445 cthe(3-jt)=
min(1.,
max(-1.,cthe(3-jt)))
12446 phir=paru(2)*
rlu(0)
12448 ang=cthe(1)*cthe(2)-sqrt(1.-cthe(1)**2)*sqrt(1.-cthe(2)**2)*cphi
12457 IF(
z(3-jt).LT.zmin.OR.
z(3-jt).GT.zmax)
GOTO 250
12462 ELSEIF(isub.LE.20)
THEN 12463 IF(isub.EQ.11)
THEN 12466 IF(mint(15)*mint(16).LT.0) kcc=kcc+2
12468 ELSEIF(isub.EQ.12)
THEN 12470 mint(21)=isign(kflq,mint(15))
12474 ELSEIF(isub.EQ.13)
THEN 12480 ELSEIF(isub.EQ.14)
THEN 12482 IF(
rlu(0).GT.0.5) js=2
12487 ELSEIF(isub.EQ.15)
THEN 12489 IF(
rlu(0).GT.0.5) js=2
12494 ELSEIF(isub.EQ.16)
THEN 12496 kch1=kchg(iabs(mint(15)),1)*isign(1,mint(15))
12497 kch2=kchg(iabs(mint(16)),1)*isign(1,mint(16))
12498 IF(mint(15)*(kch1+kch2).LT.0) js=2
12500 mint(23-js)=isign(24,kch1+kch2)
12503 ELSEIF(isub.EQ.17)
THEN 12505 IF(
rlu(0).GT.0.5) js=2
12510 ELSEIF(isub.EQ.18)
THEN 12515 ELSEIF(isub.EQ.19)
THEN 12517 IF(
rlu(0).GT.0.5) js=2
12521 ELSEIF(isub.EQ.20)
THEN 12523 kch1=kchg(iabs(mint(15)),1)*isign(1,mint(15))
12524 kch2=kchg(iabs(mint(16)),1)*isign(1,mint(16))
12525 IF(mint(15)*(kch1+kch2).LT.0) js=2
12527 mint(23-js)=isign(24,kch1+kch2)
12530 ELSEIF(isub.LE.30)
THEN 12531 IF(isub.EQ.21)
THEN 12533 IF(
rlu(0).GT.0.5) js=2
12537 ELSEIF(isub.EQ.22)
THEN 12542 ELSEIF(isub.EQ.23)
THEN 12544 kch1=kchg(iabs(mint(15)),1)*isign(1,mint(15))
12545 kch2=kchg(iabs(mint(16)),1)*isign(1,mint(16))
12546 IF(mint(15)*(kch1+kch2).LT.0) js=2
12548 mint(23-js)=isign(24,kch1+kch2)
12550 ELSEIF(isub.EQ.24)
THEN 12552 IF(
rlu(0).GT.0.5) js=2
12556 ELSEIF(isub.EQ.25)
THEN 12558 mint(21)=-isign(24,mint(15))
12561 ELSEIF(isub.EQ.26)
THEN 12563 kch1=kchg(iabs(mint(15)),1)*isign(1,mint(15))
12564 kch2=kchg(iabs(mint(16)),1)*isign(1,mint(16))
12565 IF(mint(15)*(kch1+kch2).GT.0) js=2
12566 mint(20+js)=isign(24,kch1+kch2)
12569 ELSEIF(isub.EQ.27)
THEN 12572 ELSEIF(isub.EQ.28)
THEN 12575 IF(mint(15).EQ.21) kcc=kcc+2
12576 IF(mint(15).NE.21) kcs=isign(1,mint(15))
12577 IF(mint(16).NE.21) kcs=isign(1,mint(16))
12579 ELSEIF(isub.EQ.29)
THEN 12581 IF(mint(15).EQ.21) js=2
12584 kcs=isign(1,mint(14+js))
12586 ELSEIF(isub.EQ.30)
THEN 12588 IF(mint(15).EQ.21) js=2
12591 kcs=isign(1,mint(14+js))
12594 ELSEIF(isub.LE.40)
THEN 12595 IF(isub.EQ.31)
THEN 12597 IF(mint(15).EQ.21) js=2
12600 mint(23-js)=isign(24,kchg(ia,1)*i)
12601 rvckm=vint(180+i)*
rlu(0)
12604 ipm=(5-isign(1,i))/2
12606 IF(mdme(idc,1).NE.1.AND.mdme(idc,1).NE.ipm)
GOTO 220
12607 mint(20+js)=isign(ib,i)
12608 rvckm=rvckm-vckm((ia+1)/2,(ib+1)/2)
12609 IF(rvckm.LE.0.)
GOTO 230
12612 kcs=isign(1,mint(14+js))
12614 ELSEIF(isub.EQ.32)
THEN 12616 IF(mint(15).EQ.21) js=2
12619 kcs=isign(1,mint(14+js))
12621 ELSEIF(isub.EQ.33)
THEN 12624 ELSEIF(isub.EQ.34)
THEN 12627 ELSEIF(isub.EQ.35)
THEN 12630 ELSEIF(isub.EQ.36)
THEN 12633 ELSEIF(isub.EQ.37)
THEN 12636 ELSEIF(isub.EQ.38)
THEN 12639 ELSEIF(isub.EQ.39)
THEN 12642 ELSEIF(isub.EQ.40)
THEN 12646 ELSEIF(isub.LE.50)
THEN 12647 IF(isub.EQ.41)
THEN 12650 ELSEIF(isub.EQ.42)
THEN 12653 ELSEIF(isub.EQ.43)
THEN 12656 ELSEIF(isub.EQ.44)
THEN 12659 ELSEIF(isub.EQ.45)
THEN 12662 ELSEIF(isub.EQ.46)
THEN 12665 ELSEIF(isub.EQ.47)
THEN 12668 ELSEIF(isub.EQ.48)
THEN 12671 ELSEIF(isub.EQ.49)
THEN 12674 ELSEIF(isub.EQ.50)
THEN 12678 ELSEIF(isub.LE.60)
THEN 12679 IF(isub.EQ.51)
THEN 12682 ELSEIF(isub.EQ.52)
THEN 12685 ELSEIF(isub.EQ.53)
THEN 12687 kcs=(-1)**int(1.5+
rlu(0))
12688 mint(21)=isign(kflq,kcs)
12692 ELSEIF(isub.EQ.54)
THEN 12695 ELSEIF(isub.EQ.55)
THEN 12698 ELSEIF(isub.EQ.56)
THEN 12701 ELSEIF(isub.EQ.57)
THEN 12704 ELSEIF(isub.EQ.58)
THEN 12707 ELSEIF(isub.EQ.59)
THEN 12710 ELSEIF(isub.EQ.60)
THEN 12714 ELSEIF(isub.LE.70)
THEN 12715 IF(isub.EQ.61)
THEN 12718 ELSEIF(isub.EQ.62)
THEN 12721 ELSEIF(isub.EQ.63)
THEN 12724 ELSEIF(isub.EQ.64)
THEN 12727 ELSEIF(isub.EQ.65)
THEN 12730 ELSEIF(isub.EQ.66)
THEN 12733 ELSEIF(isub.EQ.67)
THEN 12736 ELSEIF(isub.EQ.68)
THEN 12739 kcs=(-1)**int(1.5+
rlu(0))
12741 ELSEIF(isub.EQ.69)
THEN 12744 ELSEIF(isub.EQ.70)
THEN 12748 ELSEIF(isub.LE.80)
THEN 12749 IF(isub.EQ.71.OR.isub.EQ.72)
THEN 12756 290 jt=int(1.5+
rlu(0))
12757 zmin=2.*pmq(jt)/shpr
12758 zmax=1.-pmq(3-jt)/shpr-(sh-pmq(jt)**2)/(shpr*(shpr-pmq(3-jt)))
12759 zmax=
min(1.-xh,zmax)
12760 z(jt)=zmin+(zmax-zmin)*
rlu(0)
12761 IF(-1.+(1.+xh)/(1.-
z(jt))-xh/(1.-
z(jt))**2.LT.
12762 & (1.-xh)**2/(4.*xh)*
rlu(0))
GOTO 290
12763 sqc1=1.-4.*pmq(jt)**2/(
z(jt)**2*shp)
12764 IF(sqc1.LT.1.
e-8)
GOTO 290
12766 c2=1.+2.*(pmas(23,1)**2-pmq(jt)**2)/(
z(jt)*shp)
12768 cthe(jt)=
min(1.,
max(-1.,cthe(jt)))
12769 z(3-jt)=1.-xh/(1.-
z(jt))
12770 sqc1=1.-4.*pmq(3-jt)**2/(
z(3-jt)**2*shp)
12771 IF(sqc1.LT.1.
e-8)
GOTO 290
12773 c2=1.+2.*(pmas(23,1)**2-pmq(3-jt)**2)/(
z(3-jt)*shp)
12775 cthe(3-jt)=
min(1.,
max(-1.,cthe(3-jt)))
12776 phir=paru(2)*
rlu(0)
12778 ang=cthe(1)*cthe(2)-sqrt(1.-cthe(1)**2)*sqrt(1.-cthe(2)**2)*cphi
12787 IF(
z(3-jt).LT.zmin.OR.
z(3-jt).GT.zmax)
GOTO 290
12790 ELSEIF(isub.EQ.73)
THEN 12793 300 jt=int(1.5+
rlu(0))
12797 rvckm=vint(180+i)*
rlu(0)
12800 ipm=(5-isign(1,i))/2
12802 IF(mdme(idc,1).NE.1.AND.mdme(idc,1).NE.ipm)
GOTO 320
12803 mint(20+jt)=isign(ib,i)
12804 rvckm=rvckm-vckm((ia+1)/2,(ib+1)/2)
12805 IF(rvckm.LE.0.)
GOTO 330
12808 ib=2*((ia+1)/2)-1+mod(ia,2)
12809 mint(20+jt)=isign(ib,i)
12811 330 pmq(jt)=
ulmass(mint(20+jt))
12812 mint(23-jt)=mint(17-jt)
12813 pmq(3-jt)=
ulmass(mint(23-jt))
12815 zmin=2.*pmq(jt)/shpr
12816 zmax=1.-pmq(3-jt)/shpr-(sh-pmq(jt)**2)/(shpr*(shpr-pmq(3-jt)))
12817 zmax=
min(1.-xh,zmax)
12818 z(jt)=zmin+(zmax-zmin)*
rlu(0)
12819 IF(-1.+(1.+xh)/(1.-
z(jt))-xh/(1.-
z(jt))**2.LT.
12820 & (1.-xh)**2/(4.*xh)*
rlu(0))
GOTO 300
12821 sqc1=1.-4.*pmq(jt)**2/(
z(jt)**2*shp)
12822 IF(sqc1.LT.1.
e-8)
GOTO 300
12824 c2=1.+2.*(pmas(23,1)**2-pmq(jt)**2)/(
z(jt)*shp)
12826 cthe(jt)=
min(1.,
max(-1.,cthe(jt)))
12827 z(3-jt)=1.-xh/(1.-
z(jt))
12828 sqc1=1.-4.*pmq(3-jt)**2/(
z(3-jt)**2*shp)
12829 IF(sqc1.LT.1.
e-8)
GOTO 300
12831 c2=1.+2.*(pmas(23,1)**2-pmq(3-jt)**2)/(
z(3-jt)*shp)
12833 cthe(3-jt)=
min(1.,
max(-1.,cthe(3-jt)))
12834 phir=paru(2)*
rlu(0)
12836 ang=cthe(1)*cthe(2)-sqrt(1.-cthe(1)**2)*sqrt(1.-cthe(2)**2)*cphi
12845 IF(
z(3-jt).LT.zmin.OR.
z(3-jt).GT.zmax)
GOTO 300
12848 ELSEIF(isub.EQ.74)
THEN 12851 ELSEIF(isub.EQ.75)
THEN 12854 ELSEIF(isub.EQ.76.OR.isub.EQ.77)
THEN 12861 rvckm=vint(180+i)*
rlu(0)
12864 ipm=(5-isign(1,i))/2
12866 IF(mdme(idc,1).NE.1.AND.mdme(idc,1).NE.ipm)
GOTO 360
12867 mint(20+jt)=isign(ib,i)
12868 rvckm=rvckm-vckm((ia+1)/2,(ib+1)/2)
12869 IF(rvckm.LE.0.)
GOTO 370
12872 ib=2*((ia+1)/2)-1+mod(ia,2)
12873 mint(20+jt)=isign(ib,i)
12875 370 pmq(jt)=
ulmass(mint(20+jt))
12877 zmin=2.*pmq(jt)/shpr
12878 zmax=1.-pmq(3-jt)/shpr-(sh-pmq(jt)**2)/(shpr*(shpr-pmq(3-jt)))
12879 zmax=
min(1.-xh,zmax)
12880 z(jt)=zmin+(zmax-zmin)*
rlu(0)
12881 IF(-1.+(1.+xh)/(1.-
z(jt))-xh/(1.-
z(jt))**2.LT.
12882 & (1.-xh)**2/(4.*xh)*
rlu(0))
GOTO 340
12883 sqc1=1.-4.*pmq(jt)**2/(
z(jt)**2*shp)
12884 IF(sqc1.LT.1.
e-8)
GOTO 340
12886 c2=1.+2.*(pmas(24,1)**2-pmq(jt)**2)/(
z(jt)*shp)
12888 cthe(jt)=
min(1.,
max(-1.,cthe(jt)))
12889 z(3-jt)=1.-xh/(1.-
z(jt))
12890 sqc1=1.-4.*pmq(3-jt)**2/(
z(3-jt)**2*shp)
12891 IF(sqc1.LT.1.
e-8)
GOTO 340
12893 c2=1.+2.*(pmas(24,1)**2-pmq(3-jt)**2)/(
z(3-jt)*shp)
12895 cthe(3-jt)=
min(1.,
max(-1.,cthe(3-jt)))
12896 phir=paru(2)*
rlu(0)
12898 ang=cthe(1)*cthe(2)-sqrt(1.-cthe(1)**2)*sqrt(1.-cthe(2)**2)*cphi
12907 IF(
z(3-jt).LT.zmin.OR.
z(3-jt).GT.zmax)
GOTO 340
12910 ELSEIF(isub.EQ.78)
THEN 12913 ELSEIF(isub.EQ.79)
THEN 12917 ELSEIF(isub.LE.90)
THEN 12918 IF(isub.EQ.81)
THEN 12920 mint(21)=isign(mint(46),mint(15))
12924 ELSEIF(isub.EQ.82)
THEN 12926 kcs=(-1)**int(1.5+
rlu(0))
12927 mint(21)=isign(mint(46),kcs)
12932 ELSEIF(isub.LE.100)
THEN 12933 IF(isub.EQ.95)
THEN 12936 kcs=(-1)**int(1.5+
rlu(0))
12938 ELSEIF(isub.EQ.96)
THEN 12942 ELSEIF(isub.LE.110)
THEN 12943 IF(isub.EQ.101)
THEN 12948 ELSEIF(isub.EQ.102)
THEN 12954 ELSEIF(isub.LE.120)
THEN 12955 IF(isub.EQ.111)
THEN 12957 IF(
rlu(0).GT.0.5) js=2
12962 ELSEIF(isub.EQ.112)
THEN 12964 IF(mint(15).EQ.21) js=2
12967 kcs=isign(1,mint(14+js))
12969 ELSEIF(isub.EQ.113)
THEN 12971 IF(
rlu(0).GT.0.5) js=2
12974 kcs=(-1)**int(1.5+
rlu(0))
12976 ELSEIF(isub.EQ.114)
THEN 12978 IF(
rlu(0).GT.0.5) js=2
12983 ELSEIF(isub.EQ.115)
THEN 12986 ELSEIF(isub.EQ.116)
THEN 12989 ELSEIF(isub.EQ.117)
THEN 12993 ELSEIF(isub.LE.140)
THEN 12994 IF(isub.EQ.121)
THEN 12998 ELSEIF(isub.LE.160)
THEN 12999 IF(isub.EQ.141)
THEN 13003 ELSEIF(isub.EQ.142)
THEN 13005 kch1=kchg(iabs(mint(15)),1)*isign(1,mint(15))
13006 kch2=kchg(iabs(mint(16)),1)*isign(1,mint(16))
13007 kfres=isign(37,kch1+kch2)
13009 ELSEIF(isub.EQ.143)
THEN 13011 kfres=isign(40,mint(15)+mint(16))
13015 IF(isub.EQ.161)
THEN 13017 IF(mint(16).EQ.21) js=2
13018 ia=iabs(mint(17-js))
13019 mint(20+js)=isign(37,kchg(ia,1)*mint(17-js))
13020 ja=ia+mod(ia,2)-mod(ia+1,2)
13021 mint(23-js)=isign(ja,mint(17-js))
13023 IF(mint(15).NE.21) kcs=isign(1,mint(15))
13024 IF(mint(16).NE.21) kcs=isign(1,mint(16))
13048 ELSEIF(idoc.EQ.8)
THEN 13053 IF(iabs(mint(20+jt)).LE.10.OR.mint(20+jt).EQ.21) k(i,1)=3
13055 k(i,3)=mint(83)+idoc+jt-2
13056 IF(iabs(k(i,2)).LE.10.OR.k(i,2).EQ.21)
THEN 13059 p(i,5)=sqrt(vint(63+mod(js+jt,2)))
13062 IF(p(ipu3,5)+p(ipu4,5).GE.shr)
THEN 13063 kfa1=iabs(mint(21))
13064 kfa2=iabs(mint(22))
13065 IF((kfa1.GT.3.AND.kfa1.NE.21).OR.(kfa2.GT.3.AND.kfa2.NE.21))
13073 p(ipu3,4)=0.5*(shr+(p(ipu3,5)**2-p(ipu4,5)**2)/shr)
13074 p(ipu3,3)=sqrt(
max(0.,p(ipu3,4)**2-p(ipu3,5)**2))
13075 p(ipu4,4)=shr-p(ipu3,4)
13076 p(ipu4,3)=-p(ipu3,3)
13082 CALL ludbrb(ipu3,ipu4,acos(vint(23)),vint(24),0d0,0d0,0d0)
13084 ELSEIF(idoc.EQ.9)
THEN 13087 ELSEIF(idoc.EQ.11)
THEN 13089 phi(1)=paru(2)*
rlu(0)
13094 IF(iabs(mint(20+jt)).LE.10.OR.mint(20+jt).EQ.21) k(i,1)=3
13096 k(i,3)=mint(83)+idoc+jt-2
13098 IF(0.5*shpr*
z(jt).LE.p(i,5)) p(i,5)=0.
13099 pabs=sqrt(
max(0.,(0.5*shpr*
z(jt))**2-p(i,5)**2))
13100 ptabs=pabs*sqrt(
max(0.,1.-cthe(jt)**2))
13101 p(i,1)=ptabs*cos(phi(jt))
13102 p(i,2)=ptabs*sin(phi(jt))
13103 p(i,3)=pabs*cthe(jt)*(-1)**(jt+1)
13104 p(i,4)=0.5*shpr*
z(jt)
13108 IF(isub.EQ.8) k(izw,2)=isign(24,
luchge(mint(14+jt)))
13112 p(izw,3)=(0.5*shpr-pabs*cthe(jt))*(-1)**(jt+1)
13113 p(izw,4)=0.5*shpr*(1.-
z(jt))
13114 400 p(izw,5)=-sqrt(
max(0.,p(izw,3)**2+ptabs**2-p(izw,4)**2))
13120 p(ipu5,1)=-p(ipu3,1)-p(ipu4,1)
13121 p(ipu5,2)=-p(ipu3,2)-p(ipu4,2)
13122 p(ipu5,3)=-p(ipu3,3)-p(ipu4,3)
13123 p(ipu5,4)=shpr-p(ipu3,4)-p(ipu4,4)
13127 410 p(i,j)=p(ipu5,j)
13131 ELSEIF(idoc.EQ.12)
THEN 13133 phi(1)=paru(2)*
rlu(0)
13138 IF(iabs(mint(20+jt)).LE.10.OR.mint(20+jt).EQ.21) k(i,1)=3
13140 k(i,3)=mint(83)+idoc+jt-2
13142 IF(0.5*shpr*
z(jt).LE.p(i,5)) p(i,5)=0.
13143 pabs=sqrt(
max(0.,(0.5*shpr*
z(jt))**2-p(i,5)**2))
13144 ptabs=pabs*sqrt(
max(0.,1.-cthe(jt)**2))
13145 p(i,1)=ptabs*cos(phi(jt))
13146 p(i,2)=ptabs*sin(phi(jt))
13147 p(i,3)=pabs*cthe(jt)*(-1)**(jt+1)
13148 p(i,4)=0.5*shpr*
z(jt)
13151 IF(mint(14+jt).EQ.mint(20+jt))
THEN 13154 k(izw,2)=isign(24,
luchge(mint(14+jt))-
luchge(mint(20+jt)))
13159 p(izw,3)=(0.5*shpr-pabs*cthe(jt))*(-1)**(jt+1)
13160 p(izw,4)=0.5*shpr*(1.-
z(jt))
13161 p(izw,5)=-sqrt(
max(0.,p(izw,3)**2+ptabs**2-p(izw,4)**2))
13164 k(ipu,2)=kfpr(isub,jt)
13165 k(ipu,3)=mint(83)+8+jt
13166 IF(iabs(k(ipu,2)).LE.10.OR.k(ipu,2).EQ.21)
THEN 13167 p(ipu,5)=
ulmass(k(ipu,2))
13169 p(ipu,5)=sqrt(vint(63+mod(js+jt,2)))
13171 mint(22+jt)=k(izw,2)
13173 IF(isub.EQ.72) k(mint(84)+4+int(1.5+
rlu(0)),2)=-24
13177 bexcm=(p(i1,1)+p(i2,1))/(p(i1,4)+p(i2,4))
13178 beycm=(p(i1,2)+p(i2,2))/(p(i1,4)+p(i2,4))
13179 bezcm=(p(i1,3)+p(i2,3))/(p(i1,4)+p(i2,4))
13180 gamcm=(p(i1,4)+p(i2,4))/shr
13181 bepcm=bexcm*p(i1,1)+beycm*p(i1,2)+bezcm*p(i1,3)
13182 px=p(i1,1)+gamcm*(gamcm/(1.+gamcm)*bepcm-p(i1,4))*bexcm
13183 py=p(i1,2)+gamcm*(gamcm/(1.+gamcm)*bepcm-p(i1,4))*beycm
13184 pz=p(i1,3)+gamcm*(gamcm/(1.+gamcm)*bepcm-p(i1,4))*bezcm
13185 thecm=
ulangl(pz,sqrt(px**2+py**2))
13188 sqlam=(sh-p(ipu5,5)**2-p(ipu6,5)**2)**2-4.*p(ipu5,5)**2*
13190 pabs=sqrt(
max(0.,sqlam/(4.*sh)))
13192 sthwz=sqrt(
max(0.,1.-cthwz**2))
13193 phiwz=vint(24)-phicm
13194 p(ipu5,1)=pabs*sthwz*cos(phiwz)
13195 p(ipu5,2)=pabs*sthwz*sin(phiwz)
13196 p(ipu5,3)=pabs*cthwz
13197 p(ipu5,4)=sqrt(pabs**2+p(ipu5,5)**2)
13198 p(ipu6,1)=-p(ipu5,1)
13199 p(ipu6,2)=-p(ipu5,2)
13200 p(ipu6,3)=-p(ipu5,3)
13201 p(ipu6,4)=sqrt(pabs**2+p(ipu6,5)**2)
13202 CALL ludbrb(ipu5,ipu6,thecm,phicm,dble(bexcm),dble(beycm),
13210 430 p(i1,j)=p(i2,j)
13213 mint(8)=mint(83)+10
13220 IF(kcs.EQ.-1) jc=3-j
13221 IF(icol(kcc,1,jc).NE.0.AND.k(ipu1,1).EQ.14) k(ipu1,j+3)=
13222 & k(ipu1,j+3)+mint(84)+icol(kcc,1,jc)
13223 IF(icol(kcc,2,jc).NE.0.AND.k(ipu2,1).EQ.14) k(ipu2,j+3)=
13224 & k(ipu2,j+3)+mint(84)+icol(kcc,2,jc)
13225 IF(icol(kcc,3,jc).NE.0.AND.k(ipu3,1).EQ.3) k(ipu3,j+3)=
13226 & mstu(5)*(mint(84)+icol(kcc,3,jc))
13227 440
IF(icol(kcc,4,jc).NE.0.AND.k(ipu4,1).EQ.3) k(ipu4,j+3)=
13228 & mstu(5)*(mint(84)+icol(kcc,4,jc))
13232 i1=mint(83)+idoc-2+i
13236 IF(idoc.LE.9) k(i1,3)=0
13237 IF(idoc.GE.11) k(i1,3)=mint(83)+2+i
13239 450 p(i1,j)=p(i2,j)
13244 IF(isub.EQ.95)
THEN 13245 k(ipu3,1)=k(ipu3,1)+10
13246 k(ipu4,1)=k(ipu4,1)+10
13249 DO 470 i=mint(83)+5,mint(83)+8
13259 SUBROUTINE pysspa(IPU1,IPU2)
13262 IMPLICIT DOUBLE PRECISION(
d)
13263 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
13265 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
13267 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
13269 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
13271 common/pypars/mstp(200),parp(200),msti(200),pari(200)
13273 common/pyint1/mint(400),vint(400)
13275 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
13277 common/pyint3/xsfx(2,-40:40),isig(1000,3),sigh(1000)
13279 dimension kfls(4),is(2),xs(2),zs(2),q2s(2),tevs(2),robo(5),
13280 &xfs(2,-6:6),xfa(-6:6),xfb(-6:6),xfn(-6:6),wtap(-6:6),wtsf(-6:6),
13281 &the2(2),alam(2),dq2(3),dpc(3),dpd(4),dpb(4)
13288 IF(iset(isub).EQ.1)
THEN 13290 ELSEIF(iset(isub).EQ.3.OR.iset(isub).EQ.4)
THEN 13292 IF(isub.EQ.8.OR.isub.EQ.76.OR.isub.EQ.77) q2e=pmas(24,1)**2
13294 tmax=log(parp(67)*parp(63)*q2e/parp(61)**2)
13295 IF(parp(67)*q2e.LT.
max(parp(62)**2,2.*parp(61)**2).OR.
13296 &tmax.LT.0.2)
RETURN 13299 xe0=2.*parp(65)/vint(1)
13305 kfls(jt)=mint(14+jt)
13306 kfls(jt+2)=kfls(jt)
13309 q2s(jt)=parp(67)*q2e
13314 110 xfs(jt,kfl)=xsfx(jt,kfl)
13316 IF(iset(isub).EQ.3.OR.iset(isub).EQ.4) dsh=vint(26)*vint(2)
13321 IF(
n.GT.
ns+1.AND.q2s(2).GT.q2s(1)) jt=2
13325 130 xfb(kfl)=xfs(jt,kfl)
13327 dshz=dsh/dble(zs(jt))
13328 xe=
max(xe0,xb*(1./(1.-parp(66))-1.))
13329 IF(xb+xe.GE.0.999)
THEN 13335 IF(mstp(62).LE.1)
THEN 13336 q2b=0.5*(1./zs(jt)+1.)*q2s(jt)+0.5*(1./zs(jt)-1.)*(q2s(3-jt)-
13337 & sngl(dsh)+sqrt((sngl(dsh)+q2s(1)+q2s(2))**2+8.*q2s(1)*q2s(2)*
13338 & zs(jt)/(1.-zs(jt))))
13339 tevb=log(parp(63)*q2b/alam(jt)**2)
13344 alsdum=
ulalps(parp(63)*q2b)
13345 tevb=tevb+2.*log(alam(jt)/paru(117))
13348 b0=(33.-2.*mstu(118))/6.
13354 IF(kflb.EQ.21)
THEN 13355 wtapq=16.*(1.-sqrt(xb+xe))/(3.*sqrt(xb))
13356 DO 150 kfl=-mstp(54),mstp(54)
13357 IF(kfl.EQ.0) wtap(kfl)=6.*log((1.-xb)/xe)
13358 150
IF(kfl.NE.0) wtap(kfl)=wtapq
13360 wtap(0)=0.5*xb*(1./(xb+xe)-1.)
13361 wtap(kflb)=8.*log((1.-xb)*(xb+xe)/xe)/3.
13364 IF(kflb.NE.21) xfbo=xfb(kflb)
13365 IF(kflb.EQ.21) xfbo=xfb(0)
13368 IF(xfbo.EQ.0.0)
THEN 13369 WRITE(mstu(11),1000)
13370 WRITE(mstu(11),1001) kflb,xfb(kflb)
13374 DO 170 kfl=-mstp(54),mstp(54)
13375 wtsf(kfl)=xfb(kfl)/xfbo
13376 170 wtsum=wtsum+wtap(kfl)*wtsf(kfl)
13377 wtsum=
max(0.0001,wtsum)
13380 180
IF(mstp(64).LE.0)
THEN 13381 tevb=tevb+log(
rlu(0))*paru(2)/(paru(111)*wtsum)
13382 ELSEIF(mstp(64).EQ.1)
THEN 13383 tevb=tevb*exp(
max(-100.,log(
rlu(0))*
b0/wtsum))
13385 tevb=tevb*exp(
max(-100.,log(
rlu(0))*
b0/(5.*wtsum)))
13387 190 q2ref=alam(jt)**2*exp(tevb)
13391 IF(q2b.LT.parp(62)**2)
THEN 13397 wtran=wtran-wtap(kfla)*wtsf(kfla)
13398 IF(kfla.LT.mstp(54).AND.wtran.GT.0.)
GOTO 200
13399 IF(kfla.EQ.0) kfla=21
13402 IF(kflb.EQ.21.AND.kfla.EQ.21)
THEN 13403 z=1./(1.+((1.-xb)/xb)*(xe/(1.-xb))**
rlu(0))
13404 wtz=(1.-
z*(1.-
z))**2
13405 ELSEIF(kflb.EQ.21)
THEN 13406 z=xb/(1.-
rlu(0)*(1.-sqrt(xb+xe)))**2
13407 wtz=0.5*(1.+(1.-
z)**2)*sqrt(
z)
13408 ELSEIF(kfla.EQ.21)
THEN 13409 z=xb*(1.+
rlu(0)*(1./(xb+xe)-1.))
13412 z=1.-(1.-xb)*(xe/((xb+xe)*(1.-xb)))**
rlu(0)
13417 IF(mstp(65).GE.1)
THEN 13419 IF(kflb.NE.21) rsoft=8./3.
13420 z=
z*(tevb/tevs(jt))**(rsoft*xe/((xb+xe)*
b0))
13421 IF(
z.LE.xb)
GOTO 180
13425 IF(mstp(64).GE.2)
THEN 13426 IF((1.-
z)*q2b.LT.parp(62)**2)
GOTO 180
13427 alprat=tevb/(tevb+log(1.-
z))
13428 IF(alprat.LT.5.*
rlu(0))
GOTO 180
13429 IF(alprat.GT.5.) wtz=wtz*alprat/5.
13433 IF(mstp(62).GE.3)
THEN 13434 the2t=(4.*
z**2*q2b)/(vint(2)*(1.-
z)*xb**2)
13435 IF(the2t.GT.the2(jt))
GOTO 180
13439 CALL pystfu(mint(10+jt),xb,q2ref,xfn,jt)
13440 IF(kflb.NE.21) xfbn=xfn(kflb)
13441 IF(kflb.EQ.21) xfbn=xfn(0)
13442 IF(xfbn.LT.1
e-20)
THEN 13443 IF(kfla.EQ.kflb)
THEN 13447 ELSEIF(tevbsv-tevb.GT.0.2)
THEN 13448 tevb=0.5*(tevbsv+tevb)
13454 DO 210 kfl=-mstp(54),mstp(54)
13455 210 xfb(kfl)=xfn(kfl)
13457 CALL pystfu(mint(10+jt),xa,q2ref,xfa,jt)
13458 IF(kfla.NE.21) xfan=xfa(kfla)
13459 IF(kfla.EQ.21) xfan=xfa(0)
13460 IF(xfan.LT.1
e-20)
GOTO 160
13461 IF(kfla.NE.21) wtsfa=wtsf(kfla)
13462 IF(kfla.EQ.21) wtsfa=wtsf(0)
13463 IF(wtz*xfan/xfbn.LT.
rlu(0)*wtsfa)
GOTO 160
13467 220
IF(
n.EQ.
ns+2)
THEN 13469 dplcm=sqrt((dsh+dq2(1)+dq2(2))**2-4d0*dq2(1)*dq2(2))/dshr
13472 IF(jr.EQ.1) ipo=ipus1
13473 IF(jr.EQ.2) ipo=ipus2
13482 p(i,3)=dplcm*(-1)**(jr+1)
13483 p(i,4)=(dsh+dq2(3-jr)-dq2(jr))/dshr
13484 p(i,5)=-sqrt(sngl(dq2(jr)))
13487 k(ipo,4)=mod(k(ipo,4),mstu(5))+mstu(5)*i
13488 240 k(ipo,5)=mod(k(ipo,5),mstu(5))+mstu(5)*i
13491 ELSEIF(
n.GT.
ns+2)
THEN 13496 dpc(3)=0.5*(abs(p(is(1),3))+abs(p(is(2),3)))
13497 dpd(1)=dsh+dq2(jr)+dq2(jt)
13498 dpd(2)=dshz+dq2(jr)+dq2(3)
13499 dpd(3)=sqrt(dpd(1)**2-4d0*dq2(jr)*dq2(jt))
13500 dpd(4)=sqrt(dpd(2)**2-4d0*dq2(jr)*dq2(3))
13502 IF(q2s(jr).GE.(0.5*parp(62))**2.AND.dpd(1)-dpd(3).GE.
13503 & 1
d-10*dpd(1)) ikin=1
13504 IF(ikin.EQ.0) dmsma=(dq2(jt)/dble(zs(jt))-dq2(3))*(dsh/
13505 & (dsh+dq2(jt))-dsh/(dshz+dq2(3)))
13506 IF(ikin.EQ.1) dmsma=(dpd(1)*dpd(2)-dpd(3)*dpd(4))/(2.*
13507 & dq2(jr))-dq2(jt)-dq2(3)
13517 IF(kflb.EQ.21.AND.kfls(jt+2).NE.21) k(it,2)=-kfls(jt+2)
13518 IF(kflb.NE.21.AND.kfls(jt+2).EQ.21) k(it,2)=kflb
13520 IF(sngl(dmsma).LE.p(it,5)**2)
GOTO 100
13521 IF(mstp(63).GE.1)
THEN 13522 p(it,4)=(dshz-dsh-p(it,5)**2)/dshr
13523 p(it,3)=sqrt(p(it,4)**2-p(it,5)**2)
13524 IF(mstp(63).EQ.1)
THEN 13526 ELSEIF(mstp(63).EQ.2)
THEN 13527 q2tim=
min(sngl(dmsma),parp(71)*q2s(jt))
13532 CALL lushow(it,0,sqrt(q2tim))
13533 IF(
n.GE.it+1) p(it,5)=p(it+1,5)
13538 IF(ikin.EQ.0) dpt2=(dmsma-dms)*(dshz+dq2(3))/(dsh+dq2(jt))
13539 IF(ikin.EQ.1) dpt2=(dmsma-dms)*(0.5*dpd(1)*dpd(2)+0.5*dpd(3)*
13540 & dpd(4)-dq2(jr)*(dq2(jt)+dq2(3)+dms))/(4.*dsh*dpc(3)**2)
13541 IF(dpt2.LT.0.)
GOTO 100
13542 dpb(1)=(0.5*dpd(2)-dpc(jr)*(dshz+dq2(jr)-dq2(jt)-dms)/
13543 & dshr)/dpc(3)-dpc(3)
13544 p(it,1)=sqrt(sngl(dpt2))
13545 p(it,3)=dpb(1)*(-1)**(jt+1)
13546 p(it,4)=(dshz-dsh-dms)/dshr
13548 dpb(1)=sqrt(dpb(1)**2+dpt2)
13549 dpb(2)=sqrt(dpb(1)**2+dms)
13551 dpb(4)=sqrt(dpb(3)**2+dms)
13552 dbez=(dpb(4)*dpb(1)-dpb(3)*dpb(2))/(dpb(4)*dpb(2)-dpb(3)*
13554 CALL ludbrb(it+1,
n,0.,0.,0d0,0d0,dbez)
13555 the=
ulangl(p(it,3),p(it,1))
13556 CALL ludbrb(it+1,
n,the,0.,0d0,0d0,0d0)
13567 p(
n+1,3)=p(it,3)+p(is(jt),3)
13568 p(
n+1,4)=p(it,4)+p(is(jt),4)
13569 p(
n+1,5)=-sqrt(sngl(dq2(3)))
13575 IF((k(
n+1,2).GT.0.AND.k(
n+1,2).NE.21.AND.k(id1,2).GT.0.AND.
13576 & k(id1,2).NE.21).OR.(k(
n+1,2).LT.0.AND.k(id1,2).EQ.21).OR.
13577 & (k(
n+1,2).EQ.21.AND.k(id1,2).EQ.21.AND.
rlu(0).GT.0.5).OR.
13578 & (k(
n+1,2).EQ.21.AND.k(id1,2).LT.0)) id1=is(jt)
13580 k(
n+1,4)=k(
n+1,4)+id1
13581 k(
n+1,5)=k(
n+1,5)+id2
13582 k(id1,4)=k(id1,4)+mstu(5)*(
n+1)
13583 k(id1,5)=k(id1,5)+mstu(5)*id2
13584 k(id2,4)=k(id2,4)+mstu(5)*id1
13585 k(id2,5)=k(id2,5)+mstu(5)*(
n+1)
13589 CALL ludbrb(
ns+1,
n,0.,0.,-dble((p(
n,1)+p(is(jr),1))/(p(
n,4)+
13590 & p(is(jr),4))),0d0,-dble((p(
n,3)+p(is(jr),3))/(p(
n,4)+
13592 ir=
n+(jt-1)*(is(1)-
n)
13593 CALL ludbrb(
ns+1,
n,-
ulangl(p(ir,3),p(ir,1)),paru(2)*
rlu(0),
13601 IF(mstp(62).GE.3) the2(jt)=the2t
13603 IF(q2b.GE.(0.5*parp(62))**2)
THEN 13604 kfls(jt+2)=kfls(jt)
13609 270 xfs(jt,kfl)=xfa(kfl)
13615 IF(
n.GT.mstu(4)-mstu(32)-10)
THEN 13616 CALL luerrm(11,
'(PYSSPA:) no more memory left in LUJETS')
13617 IF(mstu(21).GE.1)
n=
ns 13618 IF(mstu(21).GE.1)
RETURN 13620 IF(
max(q2s(1),q2s(2)).GE.(0.5*parp(62))**2.OR.
n.LE.
ns+1)
GOTO 120
13624 280 robo(j+2)=(p(
ns+1,j)+p(
ns+2,j))/(p(
ns+1,4)+p(
ns+2,4))
13626 290 p(
n+2,j)=p(
ns+1,j)
13627 robot=robo(3)**2+robo(4)**2+robo(5)**2
13628 IF(robot.GE.0.999999)
THEN 13629 robot=1.00001*sqrt(robot)
13630 robo(3)=robo(3)/robot
13631 robo(4)=robo(4)/robot
13632 robo(5)=robo(5)/robot
13634 CALL ludbrb(
n+2,
n+2,0.,0.,-dble(robo(3)),-dble(robo(4)),
13637 robo(1)=
ulangl(p(
n+2,3),sqrt(p(
n+2,1)**2+p(
n+2,2)**2))
13638 CALL ludbrb(mint(83)+5,
ns,robo(1),robo(2),dble(robo(3)),
13639 &dble(robo(4)),dble(robo(5)))
13642 k(ipu1,3)=mint(83)+3
13643 k(ipu2,3)=mint(83)+4
13645 mint(12+jt)=kfls(jt)
13646 300 vint(140+jt)=xs(jt)
13648 1000
FORMAT(5
x,
'structure function has a zero point here')
13649 1001
FORMAT(5
x,
'xf(x,i=',i5,
')=',f10.5)
13661 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
13663 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
13665 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
13667 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
13669 common/pypars/mstp(200),parp(200),msti(200),pari(200)
13671 common/pyint1/mint(400),vint(400)
13673 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
13675 common/pyint3/xsfx(2,-40:40),isig(1000,3),sigh(1000)
13677 common/pyint5/ngen(0:200,3),xsec(0:200,3)
13679 dimension nmul(20),sigm(20),kstr(500,2)
13680 SAVE xt2,xt2fac,xc2,xts,irbin,rbin,nmul,sigm
13684 IF(mstp(122).GE.1)
WRITE(mstu(11),1000) mstp(82)
13695 nmul(ixt2)=mstp(83)
13697 DO 110 itry=1,mstp(83)
13698 rsca=0.05*((21-ixt2)-
rlu(0))
13699 xt2=vint(149)*(1.+vint(149))/(vint(149)+rsca)-vint(149)
13700 xt2=
max(0.01*vint(149),xt2)
13704 IF(
rlu(0).LE.coef(isub,1))
THEN 13705 taup=(2.*(1.+sqrt(1.-xt2))/xt2-1.)**
rlu(0)
13706 tau=xt2*(1.+taup)**2/(4.*taup)
13708 tau=xt2*(1.+tan(
rlu(0)*atan(sqrt(1./xt2-1.)))**2)
13714 IF(ryst.GT.coef(isub,7)) myst=2
13715 IF(ryst.GT.coef(isub,7)+coef(isub,8)) myst=3
13717 vint(23)=sqrt(
max(0.,1.-xt2/tau))*(-1)**int(1.5+
rlu(0))
13720 vint(71)=0.5*vint(1)*sqrt(xt2)
13722 110 sigm(ixt2)=sigm(ixt2)+sigs
13723 120 sigsum=sigsum+sigm(ixt2)
13724 sigsum=sigsum/(20.*mstp(83))
13727 IF(sigsum.LT.1.1*vint(106))
THEN 13728 IF(mstp(122).GE.1)
WRITE(mstu(11),1100) parp(82),sigsum
13729 parp(82)=0.9*parp(82)
13730 vint(149)=4.*parp(82)**2/vint(2)
13733 IF(mstp(122).GE.1)
WRITE(mstu(11),1200) parp(82), sigsum
13736 yke=sigsum/vint(106)
13742 130
IF(iit.EQ.0)
THEN 13744 ELSEIF(iit.EQ.1)
THEN 13747 xk=xi+(yke-yi)*(xf-xi)/(yf-yi)
13751 IF(mstp(82).EQ.2)
THEN 13752 sp=0.5*paru(1)*(1.-exp(-xk))
13755 IF(mstp(82).EQ.3) deltab=0.02
13756 IF(mstp(82).EQ.4) deltab=
min(0.01,0.05*parp(84))
13761 IF(mstp(82).EQ.3)
THEN 13762 ov=exp(-b**2)/paru(2)
13765 ov=((1.-parp(83))**2*exp(-
min(100.,b**2))+2.*parp(83)*
13766 & (1.-parp(83))*2./(1.+cq2)*exp(-
min(100.,b**2*2./(1.+cq2)))+
13767 & parp(83)**2/cq2*exp(-
min(100.,b**2/cq2)))/paru(2)
13769 pacc=1.-exp(-
min(100.,paru(1)*xk*ov))
13770 sp=sp+paru(2)*b*deltab*pacc
13771 sop=sop+paru(2)*b*deltab*ov*pacc
13772 IF(b.LT.1..OR.b*pacc.GT.1
e-6)
GOTO 140
13774 yk=paru(1)*xk*so/sp
13786 IF(abs(yk-yke).GE.1
e-5*yke)
GOTO 130
13794 ELSEIF(mmul.EQ.2)
THEN 13795 IF(mstp(82).LE.0)
THEN 13796 ELSEIF(mstp(82).EQ.1)
THEN 13798 xt2fac=xsec(96,1)/vint(106)*vint(149)/(1.-vint(149))
13799 ELSEIF(mstp(82).EQ.2)
THEN 13801 xt2fac=vint(146)*xsec(96,1)/vint(106)*vint(149)*(1.+vint(149))
13803 xc2=4.*ckin(3)**2/vint(2)
13804 IF(ckin(3).LE.ckin(5).OR.mint(82).GE.2) xc2=0.
13807 ELSEIF(mmul.EQ.3)
THEN 13812 IF(mstp(82).LE.0)
THEN 13814 ELSEIF(mstp(82).EQ.1)
THEN 13815 xt2=xt2fac*xt2/(xt2fac-xt2*log(
rlu(0)))
13816 ELSEIF(mstp(82).EQ.2)
THEN 13817 IF(xt2.LT.1..AND.exp(-xt2fac*xt2/(vint(149)*(xt2+
13818 & vint(149)))).GT.
rlu(0)) xt2=1.
13820 xt2=(1.+vint(149))*xt2fac/(xt2fac-(1.+vint(149))*log(1.-
13821 &
rlu(0)*(1.-exp(-xt2fac/(vint(149)*(1.+vint(149)))))))-
13824 xt2=-xt2fac/log(exp(-xt2fac/(xt2+vint(149)))+
rlu(0)*
13825 & (exp(-xt2fac/vint(149))-exp(-xt2fac/(xt2+vint(149)))))-
13828 xt2=
max(0.01*vint(149),xt2)
13830 xt2=(xc2+vint(149))*(1.+vint(149))/(1.+vint(149)-
13831 &
rlu(0)*(1.-xc2))-vint(149)
13832 xt2=
max(0.01*vint(149),xt2)
13837 IF(mstp(82).LE.1.AND.xt2.LT.vint(149))
THEN 13838 IF(mint(82).EQ.1) ngen(0,1)=ngen(0,1)-1
13839 IF(mint(82).EQ.1) ngen(isub,1)=ngen(isub,1)-1
13842 vint(21)=0.01*vint(149)
13845 vint(25)=0.01*vint(149)
13850 IF(
rlu(0).LE.coef(isub,1))
THEN 13851 taup=(2.*(1.+sqrt(1.-xt2))/xt2-1.)**
rlu(0)
13852 tau=xt2*(1.+taup)**2/(4.*taup)
13854 tau=xt2*(1.+tan(
rlu(0)*atan(sqrt(1./xt2-1.)))**2)
13860 IF(ryst.GT.coef(isub,7)) myst=2
13861 IF(ryst.GT.coef(isub,7)+coef(isub,8)) myst=3
13863 vint(23)=sqrt(
max(0.,1.-xt2/tau))*(-1)**int(1.5+
rlu(0))
13865 vint(71)=0.5*vint(1)*sqrt(vint(25))
13868 ELSEIF(mmul.EQ.4)
THEN 13871 IF(iset(isub).EQ.1) xts=vint(21)
13872 IF(iset(isub).EQ.2) xts=(4.*vint(48)+2.*vint(63)+2.*vint(64))/
13874 IF(iset(isub).EQ.3.OR.iset(isub).EQ.4) xts=vint(26)
13875 rbin=
max(0.000001,
min(0.999999,xts*(1.+vint(149))/
13876 & (xts+vint(149))))
13877 irbin=int(1.+20.*rbin)
13878 IF(isub.EQ.96) nmul(irbin)=nmul(irbin)+1
13879 IF(isub.EQ.96) sigm(irbin)=sigm(irbin)+vint(153)
13882 ELSEIF(mmul.EQ.5)
THEN 13883 IF(mstp(82).EQ.3)
THEN 13884 vint(148)=
rlu(0)/(paru(2)*vint(147))
13888 IF(rtype.LT.(1.-parp(83))**2)
THEN 13890 ELSEIF(rtype.LT.1.-parp(83)**2)
THEN 13891 b2=-0.5*(1.+cq2)*log(
rlu(0))
13893 b2=-cq2*log(
rlu(0))
13895 vint(148)=((1.-parp(83))**2*exp(-
min(100.,
b2))+2.*parp(83)*
13896 & (1.-parp(83))*2./(1.+cq2)*exp(-
min(100.,
b2*2./(1.+cq2)))+
13897 & parp(83)**2/cq2*exp(-
min(100.,
b2/cq2)))/(paru(2)*vint(147))
13902 rncor=(irbin-20.*rbin)*nmul(irbin)
13903 sigcor=(irbin-20.*rbin)*sigm(irbin)
13904 DO 150 ibin=irbin+1,20
13905 rncor=rncor+nmul(ibin)
13906 150 sigcor=sigcor+sigm(ibin)
13907 sigabv=(sigcor/rncor)*vint(149)*(1.-xts)/(xts+vint(149))
13908 vint(150)=exp(-
min(100.,vint(146)*vint(148)*sigabv/vint(106)))
13911 ELSEIF(mmul.EQ.6)
THEN 13916 IF(iset(isub).EQ.1)
nmax=mint(84)+2
13918 DO 170 i=mint(84)+1,
nmax 13919 kcs=kchg(
lucomp(k(i,2)),2)*isign(1,k(i,2))
13920 IF(kcs.EQ.0)
GOTO 170
13922 IF(kcs.EQ.1.AND.(j.EQ.2.OR.j.EQ.4))
GOTO 160
13923 IF(kcs.EQ.-1.AND.(j.EQ.1.OR.j.EQ.3))
GOTO 160
13925 ist=mod(k(i,j+3)/mstu(5),mstu(5))
13927 ist=mod(k(i,j+1),mstu(5))
13929 IF(ist.LT.mint(84).OR.ist.GT.i)
GOTO 160
13930 IF(kchg(
lucomp(k(ist,2)),2).EQ.0)
GOTO 160
13932 IF(j.EQ.1.OR.j.EQ.4)
THEN 13944 IF(iset(isub).EQ.1) xt2=vint(21)
13945 IF(iset(isub).EQ.2) xt2=(4.*vint(48)+2.*vint(63)+2.*vint(64))/
13947 IF(iset(isub).EQ.3.OR.iset(isub).EQ.4) xt2=vint(26)
13950 IF(mstp(82).LE.1)
THEN 13951 xt2fac=xsec(isub,1)*vint(149)/((1.-vint(149))*vint(106))
13953 xt2fac=vint(146)*vint(148)*xsec(isub,1)/vint(106)*
13954 & vint(149)*(1.+vint(149))
13960 vint(143)=1.-vint(141)
13961 vint(144)=1.-vint(142)
13964 180
IF(mstp(82).LE.1)
THEN 13965 xt2=xt2fac*xt2/(xt2fac-xt2*log(
rlu(0)))
13966 IF(xt2.LT.vint(149))
GOTO 220
13968 IF(xt2.LE.0.01*vint(149))
GOTO 220
13969 xt2=xt2fac*(xt2+vint(149))/(xt2fac-(xt2+vint(149))*
13970 & log(
rlu(0)))-vint(149)
13971 IF(xt2.LE.0.)
GOTO 220
13972 xt2=
max(0.01*vint(149),xt2)
13977 IF(
rlu(0).LE.coef(isub,1))
THEN 13978 taup=(2.*(1.+sqrt(1.-xt2))/xt2-1.)**
rlu(0)
13979 tau=xt2*(1.+taup)**2/(4.*taup)
13981 tau=xt2*(1.+tan(
rlu(0)*atan(sqrt(1./xt2-1.)))**2)
13987 IF(ryst.GT.coef(isub,7)) myst=2
13988 IF(ryst.GT.coef(isub,7)+coef(isub,8)) myst=3
13990 vint(23)=sqrt(
max(0.,1.-xt2/tau))*(-1)**int(1.5+
rlu(0))
13993 x1m=sqrt(tau)*exp(vint(22))
13994 x2m=sqrt(tau)*exp(-vint(22))
13995 IF(vint(143)-x1m.LT.0.01.OR.vint(144)-x2m.LT.0.01)
GOTO 180
13996 vint(71)=0.5*vint(1)*sqrt(xt2)
13998 IF(sigs.LT.xsec(isub,1)*
rlu(0))
GOTO 180
14007 pt=0.5*vint(1)*sqrt(xt2)
14014 IF(rflav.GE.
max(parp(85),parp(86))) k(
n+1,2)=
14015 & 1+int((2.+parj(2))*
rlu(0))
14016 p(
n+1,1)=
pt*cos(phi)
14017 p(
n+1,2)=
pt*sin(phi)
14018 p(
n+1,3)=0.25*vint(1)*(vint(41)*(1.+cth)-vint(42)*(1.-cth))
14019 p(
n+1,4)=0.25*vint(1)*(vint(41)*(1.+cth)+vint(42)*(1.-cth))
14025 IF(k(
n+1,2).NE.21) k(
n+2,2)=-k(
n+1,2)
14028 p(
n+2,3)=0.25*vint(1)*(vint(41)*(1.-cth)-vint(42)*(1.+cth))
14029 p(
n+2,4)=0.25*vint(1)*(vint(41)*(1.-cth)+vint(42)*(1.+cth))
14032 IF(rflav.LT.parp(85).AND.nstr.GE.1)
THEN 14039 dist=(p(i,4)*p(i1,4)-p(i,1)*p(i1,1)-p(i,2)*p(i1,2)-
14040 & p(i,3)*p(i1,3))*(p(i,4)*p(i2,4)-p(i,1)*p(i2,1)-
14041 & p(i,2)*p(i2,2)-p(i,3)*p(i2,3))/
max(1.,p(i1,4)*p(i2,4)-
14042 & p(i1,1)*p(i2,1)-p(i1,2)*p(i2,2)-p(i1,3)*p(i2,3))
14043 IF(istr.EQ.1.OR.dist.LT.dmin)
THEN 14052 IF(k(ist1,4)/mstu(5).EQ.ist2) k(ist1,4)=mstu(5)*i+
14053 & mod(k(ist1,4),mstu(5))
14054 IF(mod(k(ist1,5),mstu(5)).EQ.ist2) k(ist1,5)=
14055 & mstu(5)*(k(ist1,5)/mstu(5))+i
14056 k(i,5)=mstu(5)*ist1
14057 k(i,4)=mstu(5)*ist2
14058 IF(k(ist2,5)/mstu(5).EQ.ist1) k(ist2,5)=mstu(5)*i+
14059 & mod(k(ist2,5),mstu(5))
14060 IF(mod(k(ist2,4),mstu(5)).EQ.ist1) k(ist2,4)=
14061 & mstu(5)*(k(ist2,4)/mstu(5))+i
14064 kstr(nstr+1,2)=ist2
14068 ELSEIF(k(
n+1,2).EQ.21)
THEN 14069 k(
n+1,4)=mstu(5)*(
n+2)
14070 k(
n+1,5)=mstu(5)*(
n+2)
14071 k(
n+2,4)=mstu(5)*(
n+1)
14072 k(
n+2,5)=mstu(5)*(
n+1)
14081 k(
n+1,4)=mstu(5)*(
n+2)
14082 k(
n+2,5)=mstu(5)*(
n+1)
14090 IF(
n.GT.mstu(4)-mstu(32)-10)
THEN 14091 CALL luerrm(11,
'(PYMULT:) no more memory left in LUJETS')
14092 IF(mstu(21).GE.1)
RETURN 14094 mint(31)=mint(31)+1
14095 vint(151)=vint(151)+vint(41)
14096 vint(152)=vint(152)+vint(42)
14097 vint(143)=vint(143)-vint(41)
14098 vint(144)=vint(144)-vint(42)
14099 IF(mint(31).LT.240)
GOTO 180
14104 1000
FORMAT(/1
x,
'****** PYMULT: initialization of multiple inter',
14105 &
'actions for MSTP(82) =',i2,
' ******')
14106 1100
FORMAT(8
x,
'pT0 =',f5.2,
' GeV gives sigma(parton-parton) =',1p,
14107 &e9.2,
' mb: rejected')
14108 1200
FORMAT(8
x,
'pT0 =',f5.2,
' GeV gives sigma(parton-parton) =',1p,
14109 &e9.2,
' mb: accepted')
14116 SUBROUTINE pyremn(IPU1,IPU2)
14120 common/hiparnt/hipr1(100),ihpr2(50),hint1(100),ihnt2(50)
14122 common/histrng/nfp(300,15),pphi(300,15),nft(300,15),pthi(300,15)
14125 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
14127 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
14129 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
14131 common/pypars/mstp(200),parp(200),msti(200),pari(200)
14133 common/pyint1/mint(400),vint(400)
14135 dimension kflch(2),kflsp(2),chi(2),pms(6),is(2),robo(5)
14138 IF(mint(43).EQ.1)
THEN 14145 100 p(i,j)=p(i-2,j)
14149 IF(ipu1.EQ.0.AND.ipu2.EQ.0)
RETURN 14152 IF(ipu1.EQ.0) ilep=1
14153 IF(ipu2.EQ.0) ilep=2
14154 IF(isub.EQ.95) ilep=-1
14155 IF(ilep.EQ.1) iq=mint(84)+1
14156 IF(ilep.EQ.2) iq=mint(84)+2
14158 ilepr=mint(83)+5-ilep
14164 IF(jt.EQ.1) ipu=ipu1
14165 IF(jt.EQ.2) ipu=ipu2
14168 IF(isub.EQ.95)
THEN 14171 ELSEIF(mint(40+jt).EQ.1.AND.ipu.NE.0)
THEN 14177 ELSEIF(ipu.NE.0)
THEN 14187 ss_w2=(pphi(ihnt2(11),4)+pthi(ihnt2(12),4))**2
14188 & -(pphi(ihnt2(11),1)+pthi(ihnt2(12),1))**2
14189 & -(pphi(ihnt2(11),2)+pthi(ihnt2(12),2))**2
14190 & -(pphi(ihnt2(11),3)+pthi(ihnt2(12),3))**2
14193 IF(ss_w2.LE.4.0*parp(93)**2)
GOTO 1211
14195 IF(ihpr2(5).LE.0)
THEN 14196 120
IF(mstp(91).LE.0)
THEN 14198 ELSEIF(mstp(91).EQ.1)
THEN 14199 pt=parp(91)*sqrt(-log(
rlu(0)))
14203 pt=-parp(92)*log(rpt1*rpt2)
14205 IF(
pt.GT.parp(93))
GOTO 120
14209 ELSE IF(ihpr2(5).EQ.1)
THEN 14210 IF(jt.EQ.1) jpt=nfp(ihnt2(11),11)
14211 IF(jt.EQ.2) jpt=nft(ihnt2(12),11)
14212 1205 ptgs=parp(91)*sqrt(-log(
rlu(0)))
14213 IF(ptgs.GT.parp(93))
GO TO 1205
14214 phi=2.0*hipr1(40)*
rlu(0)
14217 DO 1210 i_int=1,jpt-1
14218 pkcsq=parp(91)*sqrt(-log(
rlu(0)))
14219 phi=2.0*hipr1(40)*
rlu(0)
14220 rpt1=rpt1+pkcsq*cos(phi)
14221 rpt2=rpt2+pkcsq*sin(phi)
14223 IF(rpt1**2+rpt2**2.GE.ss_w2/4.0)
GO TO 1205
14233 pms(jt)=p(i,5)**2+p(i,1)**2+p(i,2)**2
14239 shs=(1.-vint(43-jt))*q2/vint(43-jt)+vint(5-jt)**2
14246 IF(ilep.EQ.0) shs=vint(141)*vint(142)*vint(2)+
14247 &(p(i1,1)+p(i2,1))**2+(p(i1,2)+p(i2,2))**2
14248 shr=sqrt(
max(0.,shs))
14250 IF((shs-pms(1)-pms(2))**2-4.*pms(1)*pms(2).LE.0.)
GOTO 110
14251 p(i1,4)=0.5*(shr+(pms(1)-pms(2))/shr)
14252 p(i1,3)=sqrt(
max(0.,p(i1,4)**2-pms(1)))
14253 p(i2,4)=shr-p(i1,4)
14255 ELSEIF(ilep.EQ.1)
THEN 14260 ELSEIF(ilep.EQ.2)
THEN 14266 IF(mint(43).EQ.1)
RETURN 14270 robo(3)=(p(i1,1)+p(i2,1))/shr
14271 robo(4)=(p(i1,2)+p(i2,2))/shr
14272 CALL ludbrb(i1,i2,0.,0.,-dble(robo(3)),-dble(robo(4)),0d0)
14273 robo(2)=
ulangl(p(i1,1),p(i1,2))
14274 CALL ludbrb(i1,i2,0.,-robo(2),0d0,0d0,0d0)
14275 robo(1)=
ulangl(p(i1,3),p(i1,1))
14276 CALL ludbrb(i1,i2,-robo(1),0.,0d0,0d0,0d0)
14278 CALL ludbrb(i1,
nmax,robo(1),robo(2),dble(robo(3)),dble(robo(4)),
14282 CALL ludbrb(i1,
nmax,0.,0.,0d0,0d0,dble(robo(5)))
14288 IF(mstp(81).LE.0.OR.mstp(82).LE.0.OR.isub.EQ.95)
THEN 14292 peh=p(i1,4)+p(i2,4)+0.5*vint(1)*(vint(151)+vint(152))
14293 pzh=p(i1,3)+p(i2,3)+0.5*vint(1)*(vint(151)-vint(152))
14294 shh=(vint(1)-peh)**2-(p(i1,1)+p(i2,1))**2-(p(i1,2)+p(i2,2))**2-
14296 pmmin=p(mint(83)+1,5)+p(mint(83)+2,5)+
ulmass(k(i1,2))+
14298 IF(shr.GE.vint(1).OR.shh.LE.(pmmin+parp(111))**2)
THEN 14302 shr=sqrt(shh+(p(i1,1)+p(i2,1))**2+(p(i1,2)+p(i2,2))**2)
14304 pei=p(iq,4)+p(ip,4)
14305 pzi=p(iq,3)+p(ip,3)
14306 pms(ilep)=
max(0.,pei**2-pzi**2)
14307 pmmin=p(ilepr-2,5)+
ulmass(k(ilepr,2))+sqrt(pms(ilep))
14308 IF(shr.LE.pmmin+parp(111))
THEN 14317 IF(jt.EQ.ilep)
GOTO 190
14318 IF(jt.EQ.1) ipu=ipu1
14319 IF(jt.EQ.2) ipu=ipu2
14320 CALL pyspli(mint(10+jt),mint(12+jt),kflch(jt),kflsp(jt))
14333 kfls=(3-kchg(
lucomp(kflsp(jt)),2)*isign(1,kflsp(jt)))/2
14335 k(ipu,6-kfls)=mod(k(ipu,6-kfls),mstu(5))+mstu(5)*i
14336 IF(kflch(jt).EQ.0)
THEN 14337 p(i,1)=-p(mint(83)+jt+2,1)
14338 p(i,2)=-p(mint(83)+jt+2,2)
14339 pms(jt)=p(i,5)**2+p(i,1)**2+p(i,2)**2
14343 CALL luptdi(1,p(i,1),p(i,2))
14344 pms(jt+2)=p(i,5)**2+p(i,1)**2+p(i,2)**2
14354 p(i,1)=-p(mint(83)+jt+2,1)-p(i-1,1)
14355 p(i,2)=-p(mint(83)+jt+2,2)-p(i-1,2)
14356 pms(jt+4)=p(i,5)**2+p(i,1)**2+p(i,2)**2
14359 IF(mod(mint(10+jt)/1000,10).NE.0) imb=2
14360 IF(iabs(kflch(jt)).LE.10.OR.kflch(jt).EQ.21)
THEN 14361 chik=parp(92+2*imb)
14362 IF(mstp(92).LE.1)
THEN 14363 IF(imb.EQ.1) chi(jt)=
rlu(0)
14364 IF(imb.EQ.2) chi(jt)=1.-sqrt(
rlu(0))
14365 ELSEIF(mstp(92).EQ.2)
THEN 14366 chi(jt)=1.-
rlu(0)**(1./(1.+chik))
14367 ELSEIF(mstp(92).EQ.3)
THEN 14369 170 chi(jt)=
rlu(0)**2
14370 IF((chi(jt)**2/(chi(jt)**2+cut**2))**0.25*(1.-chi(jt))**chik
14374 cutr=(1.+sqrt(1.+cut**2))/cut
14375 180 chir=cut*cutr**
rlu(0)
14376 chi(jt)=(chir**2-cut**2)/(2.*chir)
14377 IF((1.-chi(jt))**chik.LT.
rlu(0))
GOTO 180
14381 IF(mstp(92).LE.1)
THEN 14382 IF(imb.EQ.1) chi(jt)=
rlu(0)
14383 IF(imb.EQ.2) chi(jt)=1.-sqrt(
rlu(0))
14385 chi(jt)=1.-
rlu(0)**(1./(1.+parp(93+2*imb)))
14387 IF(mod(kflch(jt)/1000,10).NE.0) chi(jt)=1.-chi(jt)
14389 pms(jt)=pms(jt+4)/chi(jt)+pms(jt+2)/(1.-chi(jt))
14390 kfls=kchg(
lucomp(kflch(jt)),2)*isign(1,kflch(jt))
14395 k(ipu,6-kfls)=mod(k(ipu,6-kfls),mstu(5))+mstu(5)*i
14399 IF(shr.LE.sqrt(pms(1))+sqrt(pms(2)))
GOTO 140
14404 IF(jt.EQ.ilep)
GOTO 200
14405 pe=0.5*(shr+(pms(jt)-pms(3-jt))/shr)
14406 pz=sqrt(pe**2-pms(jt))
14407 IF(kflch(jt).EQ.0)
THEN 14409 p(is(jt),3)=pz*(-1)**(jt-1)
14411 pw1=chi(jt)*(pe+pz)
14412 p(is(jt)+1,4)=0.5*(pw1+pms(jt+4)/pw1)
14413 p(is(jt)+1,3)=0.5*(pw1-pms(jt+4)/pw1)*(-1)**(jt-1)
14414 p(is(jt),4)=pe-p(is(jt)+1,4)
14415 p(is(jt),3)=pz*(-1)**(jt-1)-p(is(jt)+1,3)
14421 CALL ludbrb(
ns+1,
n,0.,0.,0d0,0d0,-dble(pzh/(vint(1)-peh)))
14426 pzf=pz*(-1)**(ilep-1)
14427 pt2=p(ilepr,1)**2+p(ilepr,2)**2
14428 phipt=
ulangl(p(ilepr,1),p(ilepr,2))
14429 CALL ludbrb(mint(84)+1,
nmax,0.,-phipt,0d0,0d0,0d0)
14430 rqp=p(iq,3)*(pt2+pei**2)-p(iq,4)*pei*pzi
14431 sinth=p(iq,4)*sqrt(pt2*(pt2+pei**2)/(rqp**2+pt2*
14432 & p(iq,4)**2*pzi**2))*sign(1.,-rqp)
14433 CALL ludbrb(mint(84)+1,
nmax,asin(sinth),0.,0d0,0d0,0d0)
14434 betax=(-pei*pzi*sinth+sqrt(pt2*(pt2+pei**2-(pzi*sinth)**2)))/
14436 CALL ludbrb(mint(84)+1,
nmax,0.,0.,dble(betax),0d0,0d0)
14437 CALL ludbrb(mint(84)+1,
nmax,0.,phipt,0d0,0d0,0d0)
14438 pem=p(iq,4)+p(ip,4)
14439 pzm=p(iq,3)+p(ip,3)
14440 betaz=(-pem*pzm+pzf*sqrt(pzf**2+pem**2-pzm**2))/(pzf**2+pem**2)
14441 CALL ludbrb(mint(84)+1,
nmax,0.,0.,0d0,0d0,dble(betaz))
14442 CALL ludbrb(i1,i2,asin(sinth),0.,dble(betax),0d0,0d0)
14443 CALL ludbrb(i1,i2,0.,phipt,0d0,0d0,dble(betaz))
14455 IMPLICIT DOUBLE PRECISION(
d)
14456 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
14458 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
14460 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
14462 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
14464 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
14466 common/pypars/mstp(200),parp(200),msti(200),pari(200)
14468 common/pyint1/mint(400),vint(400)
14470 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
14472 common/pyint4/widp(21:40,0:40),wide(21:40,0:40),wids(21:40,3)
14474 dimension iref(10,6),kdcy(2),kfl1(2),kfl2(2),nsd(2),ilin(6),
14475 &coup(6,4),pk(6,4),pkk(6,6),cthe(2),phi(2),wdtp(0:40),
14477 COMPLEX FGK,HA(6,6),HC(6,6)
14481 fgk(i1,i2,i3,i4,i5,i6)=4.*ha(i1,i3)*hc(i2,i6)*(ha(i1,i5)*
14482 &hc(i1,i4)+ha(i3,i5)*hc(i3,i4))
14483 digk(dt,du)=-4.*d34*d56+dt*(3.*dt+4.*du)+dt**2*(dt*du/(d34*d56)-
14484 &2.*(1./d34+1./d56)*(dt+du)+2.*(d34/d56+d56/d34))
14485 djgk(dt,du)=8.*(d34+d56)**2-8.*(d34+d56)*(dt+du)-6.*dt*du-
14486 &2.*dt*du*(dt*du/(d34*d56)-2.*(1./d34+1./d56)*(dt+du)+
14487 &2.*(d34/d56+d56/d34))
14494 IF(iset(isub).EQ.1.OR.iset(isub).EQ.3)
THEN 14495 iref(1,1)=mint(84)+2+iset(isub)
14497 iref(1,3)=mint(83)+6+iset(isub)
14499 ELSEIF(iset(isub).EQ.2.OR.iset(isub).EQ.4)
THEN 14500 iref(1,1)=mint(84)+1+iset(isub)
14501 iref(1,2)=mint(84)+2+iset(isub)
14502 iref(1,3)=mint(83)+5+iset(isub)
14503 iref(1,4)=mint(83)+6+iset(isub)
14512 IF(ip.EQ.1.AND.(iset(isub).EQ.1.OR.iset(isub).EQ.3)) jtmax=1
14517 nsd(jt)=iref(ip,jt)
14519 IF(id.EQ.0)
GOTO 140
14521 IF(kfa.LT.23.OR.kfa.GT.40)
GOTO 140
14522 IF(mdcy(kfa,1).NE.0)
THEN 14523 IF(isub.EQ.1.OR.isub.EQ.141) mint(61)=1
14524 CALL pywidt(kfa,p(id,5),wdtp,wdte)
14525 IF(kchg(kfa,3).EQ.0)
THEN 14528 ipm=(5+isign(1,k(id,2)))/2
14530 IF(jtmax.EQ.1.OR.iabs(k(iref(ip,1),2)).NE.iabs(k(iref(ip,2),2)))
14534 IF(jt.EQ.1) i12=int(4.5+
rlu(0))
14537 rkfl=(wdte(0,1)+wdte(0,ipm)+wdte(0,i12))*
rlu(0)
14538 DO 120 i=1,mdcy(kfa,3)
14539 idc=i+mdcy(kfa,2)-1
14540 kfl1(jt)=kfdp(idc,1)*isign(1,k(id,2))
14541 kfl2(jt)=kfdp(idc,2)*isign(1,k(id,2))
14542 rkfl=rkfl-(wdte(i,1)+wdte(i,ipm)+wdte(i,i12))
14543 IF(rkfl.LE.0.)
GOTO 130
14549 IF((kfa.EQ.23.OR.kfa.EQ.24).AND.kfl1(jt).EQ.0) ninh=ninh+1
14550 IF(kfl1(jt).EQ.0)
GOTO 140
14552 IF(iabs(kfl1(jt)).LE.10.OR.kfl1(jt).EQ.21) kdcy(jt)=1
14553 IF((iabs(kfl1(jt)).GE.23.AND.iabs(kfl1(jt)).LE.25).OR.
14554 &(iabs(kfl1(jt)).EQ.37)) kdcy(jt)=3
14558 IF(kdcy(jt).EQ.1)
THEN 14559 CALL lu2ent(-(
n+1),kfl1(jt),kfl2(jt),p(id,5))
14561 CALL lu2ent(
n+1,kfl1(jt),kfl2(jt),p(id,5))
14563 IF(jtmax.EQ.1)
THEN 14564 cthe(jt)=vint(13)+(vint(33)-vint(13)+vint(34)-vint(14))*
rlu(0)
14565 IF(cthe(jt).GT.vint(33)) cthe(jt)=cthe(jt)+vint(14)-vint(33)
14568 cthe(jt)=2.*
rlu(0)-1.
14569 phi(jt)=paru(2)*
rlu(0)
14572 IF(mint(3).EQ.1.AND.ip.EQ.1)
THEN 14576 IF(jtmax.EQ.1.AND.kdcy(1).EQ.0)
GOTO 530
14577 IF(jtmax.EQ.2.AND.kdcy(1).EQ.0.AND.kdcy(2).EQ.0)
GOTO 530
14578 IF(mstp(45).LE.0.OR.iref(ip,2).EQ.0.OR.ninh.GE.1)
GOTO 500
14579 IF(k(iref(1,1),2).EQ.25.AND.ip.EQ.1)
GOTO 500
14580 IF(k(iref(1,1),2).EQ.25.AND.kdcy(1)*kdcy(2).EQ.0)
GOTO 500
14584 IF(k(mint(84)+1,2).GT.0) ilin(1)=mint(84)+2
14585 IF(k(ilin(1),2).EQ.21) ilin(1)=2*mint(84)+3-ilin(1)
14586 ilin(2)=2*mint(84)+3-ilin(1)
14588 IF(iref(ip,5).EQ.25) imin=3
14591 IF(k(iref(ip,1),2).EQ.23) iord=2
14592 IF(k(iref(ip,1),2).EQ.24.AND.k(iref(ip,2),2).EQ.-24) iord=2
14593 IF(iabs(k(iref(ip,iord),2)).EQ.25) iord=3-iord
14594 IF(kdcy(iord).EQ.0) iord=3-iord
14597 DO 390 jt=iord,3-iord,3-2*iord
14598 IF(kdcy(jt).EQ.0)
THEN 14599 ilin(
imax+1)=nsd(jt)
14601 ELSEIF(k(nsd(jt)+1,2).GT.0)
THEN 14602 ilin(
imax+1)=
n+2*jt-1
14603 ilin(
imax+2)=
n+2*jt
14605 k(
n+2*jt-1,2)=k(nsd(jt)+1,2)
14606 k(
n+2*jt,2)=k(nsd(jt)+2,2)
14608 ilin(
imax+1)=
n+2*jt
14609 ilin(
imax+2)=
n+2*jt-1
14611 k(
n+2*jt-1,2)=k(nsd(jt)+1,2)
14612 k(
n+2*jt,2)=k(nsd(jt)+2,2)
14621 kfa=iabs(k(ilin(i),2))
14622 IF(kfa.GT.20)
GOTO 410
14623 coup(i,1)=
luchge(kfa)/3.
14624 coup(i,2)=(-1)**mod(kfa,2)
14625 coup(i,4)=-2.*coup(i,1)*xw
14626 coup(i,3)=coup(i,2)+coup(i,4)
14629 gzmz=pmas(23,1)*pmas(23,2)
14631 gzmw=pmas(24,1)*pmas(24,2)
14632 sqmzp=pmas(32,1)**2
14633 gzmzp=pmas(32,1)*pmas(32,2)
14636 420
DO 430 i=
n+1,
n+4
14641 IF(kdcy(jt).EQ.0)
GOTO 440
14643 p(
n+2*jt-1,3)=0.5*p(id,5)
14644 p(
n+2*jt-1,4)=0.5*p(id,5)
14645 p(
n+2*jt,3)=-0.5*p(id,5)
14646 p(
n+2*jt,4)=0.5*p(id,5)
14647 cthe(jt)=2.*
rlu(0)-1.
14648 phi(jt)=paru(2)*
rlu(0)
14649 CALL ludbrb(
n+2*jt-1,
n+2*jt,acos(cthe(jt)),phi(jt),
14650 &dble(p(id,1)/p(id,4)),dble(p(id,2)/p(id,4)),dble(p(id,3)/p(id,4)))
14657 p(
n+4+i,4)=sqrt(p(ilin(i),1)**2+p(ilin(i),2)**2+p(ilin(i),3)**2+
14659 p(
n+4+i,5)=p(ilin(i),5)
14661 450 p(
n+4+i,j)=p(ilin(i),j)
14662 therr=acos(2.*
rlu(0)-1.)
14663 phirr=paru(2)*
rlu(0)
14664 CALL ludbrb(
n+5,
n+4+
imax,therr,phirr,0d0,0d0,0d0)
14667 460 pk(i,j)=p(
n+4+i,j)
14670 IF(isub.EQ.22.OR.isub.EQ.23.OR.isub.EQ.25)
THEN 14671 DO 470 i1=imin,
imax-1
14672 DO 470 i2=i1+1,
imax 14673 ha(i1,i2)=sqrt((pk(i1,4)-pk(i1,3))*(pk(i2,4)+pk(i2,3))/
14674 & (1
e-20+pk(i1,1)**2+pk(i1,2)**2))*cmplx(pk(i1,1),pk(i1,2))-
14675 & sqrt((pk(i1,4)+pk(i1,3))*(pk(i2,4)-pk(i2,3))/
14676 & (1
e-20+pk(i2,1)**2+pk(i2,2)**2))*cmplx(pk(i2,1),pk(i2,2))
14677 hc(i1,i2)=conjg(ha(i1,i2))
14678 IF(i1.LE.2) ha(i1,i2)=cmplx(0.,1.)*ha(i1,i2)
14679 IF(i1.LE.2) hc(i1,i2)=cmplx(0.,1.)*hc(i1,i2)
14680 ha(i2,i1)=-ha(i1,i2)
14681 470 hc(i2,i1)=-hc(i1,i2)
14685 480 pk(i,j)=-pk(i,j)
14686 DO 490 i1=imin,
imax-1
14687 DO 490 i2=i1+1,
imax 14688 pkk(i1,i2)=2.*(pk(i1,4)*pk(i2,4)-pk(i1,1)*pk(i2,1)-
14689 &pk(i1,2)*pk(i2,2)-pk(i1,3)*pk(i2,3))
14690 490 pkk(i2,i1)=pkk(i1,i2)
14692 IF(iref(ip,5).EQ.25)
THEN 14694 wt=16.*pkk(3,5)*pkk(4,6)
14695 IF(ip.EQ.1) wtmax=sh**2
14696 IF(ip.GE.2) wtmax=p(iref(ip,6),5)**4
14698 ELSEIF(isub.EQ.1)
THEN 14701 ei=kchg(iabs(mint(15)),1)/3.
14708 gz=1./(8.*xw*(1.-xw))*sh*(sh-sqmz)/((sh-sqmz)**2+gzmz**2)
14709 zz=1./(16.*xw*(1.-xw))**2*sh**2/((sh-sqmz)**2+gzmz**2)
14710 IF(mstp(43).EQ.1)
THEN 14714 ELSEIF(mstp(43).EQ.2)
THEN 14719 asym=2.*(ei*ai*gz*ef*af+4.*vi*ai*
zz*vf*af)/(ei**2*gg*ef**2+
14720 & ei*vi*gz*ef*vf+(vi**2+ai**2)*
zz*(vf**2+af**2))
14721 wt=1.+asym*cthe(jt)+cthe(jt)**2
14729 ELSEIF(isub.EQ.2)
THEN 14731 wt=(1.+cthe(jt))**2
14734 ELSEIF(isub.EQ.15.OR.isub.EQ.19)
THEN 14737 wt=((coup(1,3)*coup(3,3))**2+(coup(1,4)*coup(3,4))**2)*
14738 & (pkk(1,3)**2+pkk(2,4)**2)+((coup(1,3)*coup(3,4))**2+
14739 & (coup(1,4)*coup(3,3))**2)*(pkk(1,4)**2+pkk(2,3)**2)
14740 wtmax=(coup(1,3)**2+coup(1,4)**2)*(coup(3,3)**2+coup(3,4)**2)*
14741 & ((pkk(1,3)+pkk(1,4))**2+(pkk(2,3)+pkk(2,4))**2)
14743 ELSEIF(isub.EQ.16.OR.isub.EQ.20)
THEN 14746 wt=pkk(1,3)**2+pkk(2,4)**2
14747 wtmax=(pkk(1,3)+pkk(1,4))**2+(pkk(2,3)+pkk(2,4))**2
14749 ELSEIF(isub.EQ.22)
THEN 14751 s34=p(iref(ip,iord),5)**2
14752 s56=p(iref(ip,3-iord),5)**2
14753 ti=pkk(1,3)+pkk(1,4)+s34
14754 ui=pkk(1,5)+pkk(1,6)+s56
14755 wt=coup(1,3)**4*((coup(3,3)*coup(5,3)*abs(fgk(1,2,3,4,5,6)/
14756 & ti+fgk(1,2,5,6,3,4)/ui))**2+(coup(3,4)*coup(5,3)*abs(
14757 & fgk(1,2,4,3,5,6)/ti+fgk(1,2,5,6,4,3)/ui))**2+(coup(3,3)*
14758 & coup(5,4)*abs(fgk(1,2,3,4,6,5)/ti+fgk(1,2,6,5,3,4)/ui))**2+
14759 & (coup(3,4)*coup(5,4)*abs(fgk(1,2,4,3,6,5)/ti+fgk(1,2,6,5,4,3)/
14760 & ui))**2)+coup(1,4)**4*((coup(3,3)*coup(5,3)*abs(
14761 & fgk(2,1,5,6,3,4)/ti+fgk(2,1,3,4,5,6)/ui))**2+(coup(3,4)*
14762 & coup(5,3)*abs(fgk(2,1,6,5,3,4)/ti+fgk(2,1,3,4,6,5)/ui))**2+
14763 & (coup(3,3)*coup(5,4)*abs(fgk(2,1,5,6,4,3)/ti+fgk(2,1,4,3,5,6)/
14764 & ui))**2+(coup(3,4)*coup(5,4)*abs(fgk(2,1,6,5,4,3)/ti+
14765 & fgk(2,1,4,3,6,5)/ui))**2)
14766 wtmax=4.*s34*s56*(coup(1,3)**4+coup(1,4)**4)*(coup(3,3)**2+
14767 & coup(3,4)**2)*(coup(5,3)**2+coup(5,4)**2)*4.*(ti/ui+ui/ti+
14768 & 2.*sh*(s34+s56)/(ti*ui)-s34*s56*(1./ti**2+1./ui**2))
14770 ELSEIF(isub.EQ.23)
THEN 14772 d34=p(iref(ip,iord),5)**2
14773 d56=p(iref(ip,3-iord),5)**2
14774 dt=pkk(1,3)+pkk(1,4)+d34
14775 du=pkk(1,5)+pkk(1,6)+d56
14776 cawz=coup(2,3)/sngl(dt)-2.*(1.-xw)*coup(1,2)/(sh-sqmw)
14777 cbwz=coup(1,3)/sngl(du)+2.*(1.-xw)*coup(1,2)/(sh-sqmw)
14778 wt=coup(5,3)**2*abs(cawz*fgk(1,2,3,4,5,6)+cbwz*
14779 & fgk(1,2,5,6,3,4))**2+coup(5,4)**2*abs(cawz*
14780 & fgk(1,2,3,4,6,5)+cbwz*fgk(1,2,6,5,3,4))**2
14781 wtmax=4.*d34*d56*(coup(5,3)**2+coup(5,4)**2)*(cawz**2*
14782 & digk(dt,du)+cbwz**2*digk(du,dt)+cawz*cbwz*djgk(dt,du))
14784 ELSEIF(isub.EQ.24)
THEN 14786 wt=((coup(1,3)*coup(3,3))**2+(coup(1,4)*coup(3,4))**2)*
14787 & pkk(1,3)*pkk(2,4)+((coup(1,3)*coup(3,4))**2+(coup(1,4)*
14788 & coup(3,3))**2)*pkk(1,4)*pkk(2,3)
14789 wtmax=(coup(1,3)**2+coup(1,4)**2)*(coup(3,3)**2+coup(3,4)**2)*
14790 & (pkk(1,3)+pkk(1,4))*(pkk(2,3)+pkk(2,4))
14792 ELSEIF(isub.EQ.25)
THEN 14794 d34=p(iref(ip,iord),5)**2
14795 d56=p(iref(ip,3-iord),5)**2
14796 dt=pkk(1,3)+pkk(1,4)+d34
14797 du=pkk(1,5)+pkk(1,6)+d56
14798 cdww=(coup(1,3)*sqmz/(sh-sqmz)+coup(1,2))/sh
14799 caww=cdww+0.5*(coup(1,2)+1.)/sngl(dt)
14800 cbww=cdww+0.5*(coup(1,2)-1.)/sngl(du)
14801 ccww=coup(1,4)*sqmz/(sh-sqmz)/sh
14802 wt=abs(caww*fgk(1,2,3,4,5,6)-cbww*fgk(1,2,5,6,3,4))**2+
14803 & ccww**2*abs(fgk(2,1,5,6,3,4)-fgk(2,1,3,4,5,6))**2
14804 wtmax=4.*d34*d56*(caww**2*digk(dt,du)+cbww**2*digk(du,dt)-caww*
14805 & cbww*djgk(dt,du)+ccww**2*(digk(dt,du)+digk(du,dt)-djgk(dt,du)))
14807 ELSEIF(isub.EQ.26)
THEN 14809 wt=pkk(1,3)*pkk(2,4)
14810 wtmax=(pkk(1,3)+pkk(1,4))*(pkk(2,3)+pkk(2,4))
14812 ELSEIF(isub.EQ.30)
THEN 14814 IF(k(ilin(1),2).GT.0) wt=((coup(1,3)*coup(3,3))**2+
14815 & (coup(1,4)*coup(3,4))**2)*(pkk(1,4)**2+pkk(3,5)**2)+
14816 & ((coup(1,3)*coup(3,4))**2+(coup(1,4)*coup(3,3))**2)*
14817 & (pkk(1,3)**2+pkk(4,5)**2)
14818 IF(k(ilin(1),2).LT.0) wt=((coup(1,3)*coup(3,3))**2+
14819 & (coup(1,4)*coup(3,4))**2)*(pkk(1,3)**2+pkk(4,5)**2)+
14820 & ((coup(1,3)*coup(3,4))**2+(coup(1,4)*coup(3,3))**2)*
14821 & (pkk(1,4)**2+pkk(3,5)**2)
14822 wtmax=(coup(1,3)**2+coup(1,4)**2)*(coup(3,3)**2+coup(3,4)**2)*
14823 & ((pkk(1,3)+pkk(1,4))**2+(pkk(3,5)+pkk(4,5))**2)
14825 ELSEIF(isub.EQ.31)
THEN 14827 IF(k(ilin(1),2).GT.0) wt=pkk(1,4)**2+pkk(3,5)**2
14828 IF(k(ilin(1),2).LT.0) wt=pkk(1,3)**2+pkk(4,5)**2
14829 wtmax=(pkk(1,3)+pkk(1,4))**2+(pkk(3,5)+pkk(4,5))**2
14831 ELSEIF(isub.EQ.141)
THEN 14833 ei=kchg(iabs(mint(15)),1)/3.
14836 api=sign(1.,ei+0.1)
14841 apf=sign(1.,ef+0.1)
14844 gz=1./(8.*xw*(1.-xw))*sh*(sh-sqmz)/((sh-sqmz)**2+gzmz**2)
14845 gzp=1./(8.*xw*(1.-xw))*sh*(sh-sqmzp)/((sh-sqmzp)**2+gzmzp**2)
14846 zz=1./(16.*xw*(1.-xw))**2*sh**2/((sh-sqmz)**2+gzmz**2)
14847 zzp=2./(16.*xw*(1.-xw))**2*
14848 & sh**2*((sh-sqmz)*(sh-sqmzp)+gzmz*gzmzp)/
14849 & (((sh-sqmz)**2+gzmz**2)*((sh-sqmzp)**2+gzmzp**2))
14850 zpzp=1./(16.*xw*(1.-xw))**2*sh**2/((sh-sqmzp)**2+gzmzp**2)
14851 IF(mstp(44).EQ.1)
THEN 14858 ELSEIF(mstp(44).EQ.2)
THEN 14865 ELSEIF(mstp(44).EQ.3)
THEN 14872 ELSEIF(mstp(44).EQ.4)
THEN 14877 ELSEIF(mstp(44).EQ.5)
THEN 14882 ELSEIF(mstp(44).EQ.6)
THEN 14888 asym=2.*(ei*ai*gz*ef*af+ei*api*gzp*ef*apf+4.*vi*ai*
zz*vf*af+
14889 & (vi*api+vpi*ai)*zzp*(vf*apf+vpf*af)+4.*vpi*api*zpzp*vpf*apf)/
14890 & (ei**2*gg*ef**2+ei*vi*gz*ef*vf+ei*vpi*gzp*ef*vpf+
14891 & (vi**2+ai**2)*
zz*(vf**2+af**2)+(vi*vpi+ai*api)*zzp*
14892 & (vf*vpf+af*apf)+(vpi**2+api**2)*zpzp*(vpf**2+apf**2))
14893 wt=1.+asym*cthe(jt)+cthe(jt)**2
14901 IF(wt.LT.
rlu(0)*wtmax)
GOTO 420
14905 500
DO 520 jt=1,jtmax
14906 IF(kdcy(jt).EQ.0)
GOTO 520
14908 CALL ludbrb(nsd(jt)+1,nsd(jt)+2,acos(cthe(jt)),phi(jt),
14909 &dble(p(id,1)/p(id,4)),dble(p(id,2)/p(id,4)),dble(p(id,3)/p(id,4)))
14914 DO 510 i=nsd(jt)+1,nsd(jt)+2
14916 i1=mint(83)+mint(4)
14920 k(i1,3)=iref(ip,jt+2)
14923 IF(jtmax.EQ.1)
THEN 14924 mint(7)=mint(83)+6+2*iset(isub)
14925 mint(8)=mint(83)+7+2*iset(isub)
14927 IF(mstp(71).GE.1.AND.kdcy(jt).EQ.1)
CALL lushow(nsd(jt)+1,
14928 &nsd(jt)+2,p(id,5))
14931 IF(kdcy(jt).NE.3)
GOTO 520
14933 iref(np,1)=nsd(jt)+1
14934 iref(np,2)=nsd(jt)+2
14937 iref(np,5)=k(iref(ip,jt),2)
14938 iref(np,6)=iref(ip,jt)
14940 530
IF(ip.LT.np)
GOTO 100
14950 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
14952 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
14954 common/pypars/mstp(200),parp(200),msti(200),pari(200)
14956 common/pyint1/mint(400),vint(400)
14960 DO 100 jt=1,mstp(126)+10
14978 p(i,3)=vint(5)*(-1)**(jt+1)
14979 110 p(i,4)=sqrt(p(i,3)**2+p(i,5)**2)
14984 sqlam=(vint(2)-vint(63)-vint(64))**2-4.*vint(63)*vint(64)
14985 pz=sqrt(sqlam)/(2.*vint(1))
14988 pe=(vint(2)+vint(62+jt)-vint(65-jt))/(2.*vint(1))
14991 IF(mint(16+jt).LE.0)
THEN 14996 p(
n,3)=pz*(-1)**(jt+1)
15001 ELSEIF(mstp(101).EQ.1)
THEN 15007 CALL pyspli(k(i,2),21,k(
n,2),k(
n-1,2))
15010 sqlam=(vint(62+jt)-p(
n-1,5)**2-p(
n,5)**2)**2-
15011 & 4.*p(
n-1,5)**2*p(
n,5)**2
15012 p(
n-1,3)=(pe*sqrt(sqlam)+pz*(vint(62+jt)+p(
n-1,5)**2-
15013 & p(
n,5)**2))/(2.*vint(62+jt))*(-1)**(jt+1)
15014 p(
n-1,4)=sqrt(p(
n-1,3)**2+p(
n-1,5)**2)
15015 p(
n,3)=pz*(-1)**(jt+1)-p(
n-1,3)
15016 p(
n,4)=sqrt(p(
n,3)**2+p(
n,5)**2)
15027 CALL pyspli(k(i,2),21,k(
n,2),k(
n-2,2))
15034 IF(mod(k(i,2)/1000,10).NE.0) imb=2
15035 chik=parp(92+2*imb)
15036 IF(mstp(92).LE.1)
THEN 15037 IF(imb.EQ.1) chi=
rlu(0)
15038 IF(imb.EQ.2) chi=1.-sqrt(
rlu(0))
15039 ELSEIF(mstp(92).EQ.2)
THEN 15040 chi=1.-
rlu(0)**(1./(1.+chik))
15041 ELSEIF(mstp(92).EQ.3)
THEN 15044 IF((chi**2/(chi**2+cut**2))**0.25*(1.-chi)**chik.LT.
15048 cutr=(1.+sqrt(1.+cut**2))/cut
15049 140 chir=cut*cutr**
rlu(0)
15050 chi=(chir**2-cut**2)/(2.*chir)
15051 IF((1.-chi)**chik.LT.
rlu(0))
GOTO 140
15053 IF(chi.LT.p(
n,5)**2/vint(62+jt).OR.chi.GT.1.-p(
n-2,5)**2/
15054 & vint(62+jt))
GOTO 120
15055 sqm=p(
n-2,5)**2/(1.-chi)+p(
n,5)**2/chi
15056 IF((sqrt(sqm)+parj(32))**2.GE.vint(62+jt))
GOTO 120
15057 pzi=(pe*(vint(62+jt)-sqm)+pz*(vint(62+jt)+sqm))/
15059 pei=sqrt(pzi**2+sqm)
15060 pqqp=(1.-chi)*(pei+pzi)
15061 p(
n-2,3)=0.5*(pqqp-p(
n-2,5)**2/pqqp)*(-1)**(jt+1)
15062 p(
n-2,4)=sqrt(p(
n-2,3)**2+p(
n-2,5)**2)
15063 p(
n-1,3)=(pz-pzi)*(-1)**(jt+1)
15064 p(
n-1,4)=abs(p(
n-1,3))
15065 p(
n,3)=pzi*(-1)**(jt+1)-p(
n-2,3)
15066 p(
n,4)=sqrt(p(
n,3)**2+p(
n,5)**2)
15071 IF(mint(16+jt).EQ.0) k(i+2,2)=mint(10+jt)
15072 IF(mint(16+jt).NE.0) k(i+2,2)=10*(mint(10+jt)/10)
15074 p(i+2,3)=pz*(-1)**(jt+1)
15076 p(i+2,5)=sqrt(vint(62+jt))
15080 CALL ludbrb(mint(83)+3,
n,acos(vint(23)),vint(24),0d0,0d0,0d0)
15087 SUBROUTINE pyfram(IFRAME)
15090 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
15092 common/pypars/mstp(200),parp(200),msti(200),pari(200)
15094 common/pyint1/mint(400),vint(400)
15097 IF(iframe.LT.1.OR.iframe.GT.2)
THEN 15098 WRITE(mstu(11),1000) iframe,mint(6)
15101 IF(iframe.EQ.mint(6))
RETURN 15103 IF(mint(6).EQ.1)
THEN 15106 CALL lurobo(0.,0.,-vint(8),-vint(9),-vint(10))
15107 CALL lurobo(0.,-vint(7),0.,0.,0.)
15108 CALL lurobo(-vint(6),0.,0.,0.,0.)
15114 CALL lurobo(vint(6),vint(7),vint(8),vint(9),vint(10))
15119 1000
FORMAT(1
x,
'Error: illegal values in subroutine PYFRAM.',1
x,
15120 &
'No transformation performed.'/1
x,
'IFRAME =',1
x,i5,
'; MINT(6) =',
15128 SUBROUTINE pywidt(KFLR,RMAS,WDTP,WDTE)
15131 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
15133 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
15135 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
15137 common/pypars/mstp(200),parp(200),msti(200),pari(200)
15139 common/pyint1/mint(400),vint(400)
15141 common/pyint4/widp(21:40,0:40),wide(21:40,0:40),wids(21:40,3)
15143 dimension wdtp(0:40),wdte(0:40,0:5)
15159 IF(kfla.EQ.21)
THEN 15161 DO 110 i=1,mdcy(21,3)
15163 rm1=(pmas(iabs(kfdp(idc,1)),1)/rmas)**2
15164 rm2=(pmas(iabs(kfdp(idc,2)),1)/rmas)**2
15165 IF(sqrt(rm1)+sqrt(rm2).GT.1..OR.mdme(idc,1).LT.0)
GOTO 110
15168 wdtp(i)=(1.+2.*rm1)*sqrt(
max(0.,1.-4.*rm1))
15171 wdtp(0)=wdtp(0)+wdtp(i)
15172 IF(mdme(idc,1).GT.0)
THEN 15173 wdte(i,mdme(idc,1))=wdtp(i)*wid2
15174 wdte(0,mdme(idc,1))=wdte(0,mdme(idc,1))+wdte(i,mdme(idc,1))
15175 wdte(i,0)=wdte(i,mdme(idc,1))
15176 wdte(0,0)=wdte(0,0)+wdte(i,0)
15180 ELSEIF(kfla.EQ.23)
THEN 15182 IF(mint(61).EQ.1)
THEN 15183 ei=kchg(iabs(mint(15)),1)/3.
15187 gzmz=pmas(23,2)*pmas(23,1)
15189 gzi=ei*vi/(8.*xw*(1.-xw))*sqm*(sqm-sqmz)/
15190 & ((sqm-sqmz)**2+gzmz**2)
15191 zzi=(vi**2+ai**2)/(16.*xw*(1.-xw))**2*sqm**2/
15192 & ((sqm-sqmz)**2+gzmz**2)
15193 IF(mstp(43).EQ.1)
THEN 15197 ELSEIF(mstp(43).EQ.2)
THEN 15202 ELSEIF(mint(61).EQ.2)
THEN 15207 DO 120 i=1,mdcy(23,3)
15209 rm1=(pmas(iabs(kfdp(idc,1)),1)/rmas)**2
15210 rm2=(pmas(iabs(kfdp(idc,2)),1)/rmas)**2
15211 IF(sqrt(rm1)+sqrt(rm2).GT.1..OR.mdme(idc,1).LT.0)
GOTO 120
15217 IF(mint(61).EQ.0)
THEN 15218 wdtp(i)=3.*(vf**2*(1.+2.*rm1)+af**2*(1.-4.*rm1))*
15219 & sqrt(
max(0.,1.-4.*rm1))*radc
15220 ELSEIF(mint(61).EQ.1)
THEN 15221 wdtp(i)=3.*((ggi*ef**2+gzi*ef*vf+zzi*vf**2)*
15222 & (1.+2.*rm1)+zzi*af**2*(1.-4.*rm1))*
15223 & sqrt(
max(0.,1.-4.*rm1))*radc
15224 ELSEIF(mint(61).EQ.2)
THEN 15225 ggf=3.*ef**2*(1.+2.*rm1)*sqrt(
max(0.,1.-4.*rm1))*radc
15226 gzf=3.*ef*vf*(1.+2.*rm1)*sqrt(
max(0.,1.-4.*rm1))*radc
15227 zzf=3.*(vf**2*(1.+2.*rm1)+af**2*(1.-4.*rm1))*
15228 & sqrt(
max(0.,1.-4.*rm1))*radc
15231 ELSEIF(i.LE.16)
THEN 15236 wdtp(i)=(vf**2*(1.+2.*rm1)+af**2*(1.-4.*rm1))*
15237 & sqrt(
max(0.,1.-4.*rm1))
15238 IF(mint(61).EQ.0)
THEN 15239 wdtp(i)=(vf**2*(1.+2.*rm1)+af**2*(1.-4.*rm1))*
15240 & sqrt(
max(0.,1.-4.*rm1))
15241 ELSEIF(mint(61).EQ.1)
THEN 15242 wdtp(i)=((ggi*ef**2+gzi*ef*vf+zzi*vf**2)*
15243 & (1.+2.*rm1)+zzi*af**2*(1.-4.*rm1))*
15244 & sqrt(
max(0.,1.-4.*rm1))
15245 ELSEIF(mint(61).EQ.2)
THEN 15246 ggf=ef**2*(1.+2.*rm1)*sqrt(
max(0.,1.-4.*rm1))
15247 gzf=ef*vf*(1.+2.*rm1)*sqrt(
max(0.,1.-4.*rm1))
15248 zzf=(vf**2*(1.+2.*rm1)+af**2*(1.-4.*rm1))*
15249 & sqrt(
max(0.,1.-4.*rm1))
15255 IF(mint(61).EQ.0)
THEN 15256 wdtp(i)=0.25*cf**2*(1.-4.*rm1)*sqrt(
max(0.,1.-4.*rm1))
15257 ELSEIF(mint(61).EQ.1)
THEN 15258 wdtp(i)=0.25*(ggi+gzi*cf+zzi*cf**2)*(1.-4.*rm1)*
15259 & sqrt(
max(0.,1.-4.*rm1))
15260 ELSEIF(mint(61).EQ.2)
THEN 15261 ggf=0.25*(1.-4.*rm1)*sqrt(
max(0.,1.-4.*rm1))
15262 gzf=0.25*cf*(1.-4.*rm1)*sqrt(
max(0.,1.-4.*rm1))
15263 zzf=0.25*cf**2*(1.-4.*rm1)*sqrt(
max(0.,1.-4.*rm1))
15267 wdtp(0)=wdtp(0)+wdtp(i)
15268 IF(mdme(idc,1).GT.0)
THEN 15269 wdte(i,mdme(idc,1))=wdtp(i)*wid2
15270 wdte(0,mdme(idc,1))=wdte(0,mdme(idc,1))+wdte(i,mdme(idc,1))
15271 wdte(i,0)=wdte(i,mdme(idc,1))
15272 wdte(0,0)=wdte(0,0)+wdte(i,0)
15273 vint(111)=vint(111)+ggf*wid2
15274 vint(112)=vint(112)+gzf*wid2
15275 vint(114)=vint(114)+zzf*wid2
15278 IF(mstp(43).EQ.1)
THEN 15282 ELSEIF(mstp(43).EQ.2)
THEN 15288 ELSEIF(kfla.EQ.24)
THEN 15290 DO 130 i=1,mdcy(24,3)
15292 rm1=(pmas(iabs(kfdp(idc,1)),1)/rmas)**2
15293 rm2=(pmas(iabs(kfdp(idc,2)),1)/rmas)**2
15294 IF(sqrt(rm1)+sqrt(rm2).GT.1..OR.mdme(idc,1).LT.0)
GOTO 130
15297 wdtp(i)=3.*(2.-rm1-rm2-(rm1-rm2)**2)*
15298 & sqrt(
max(0.,(1.-rm1-rm2)**2-4.*rm1*rm2))*
15299 & vckm((i-1)/4+1,mod(i-1,4)+1)*radc
15303 wdtp(i)=(2.-rm1-rm2-(rm1-rm2)**2)*
15304 & sqrt(
max(0.,(1.-rm1-rm2)**2-4.*rm1*rm2))
15307 wdtp(0)=wdtp(0)+wdtp(i)
15308 IF(mdme(idc,1).GT.0)
THEN 15309 wdte(i,mdme(idc,1))=wdtp(i)*wid2
15310 wdte(0,mdme(idc,1))=wdte(0,mdme(idc,1))+wdte(i,mdme(idc,1))
15311 wdte(i,0)=wdte(i,mdme(idc,1))
15312 wdte(0,0)=wdte(0,0)+wdte(i,0)
15316 ELSEIF(kfla.EQ.25)
THEN 15318 DO 170 i=1,mdcy(25,3)
15320 rm1=(pmas(iabs(kfdp(idc,1)),1)/rmas)**2
15321 rm2=(pmas(iabs(kfdp(idc,2)),1)/rmas)**2
15322 IF(sqrt(rm1)+sqrt(rm2).GT.1..OR.mdme(idc,1).LT.0)
GOTO 170
15325 wdtp(i)=3.*rm1*(1.-4.*rm1)*sqrt(
max(0.,1.-4.*rm1))*radc
15327 ELSEIF(i.LE.12)
THEN 15329 wdtp(i)=rm1*(1.-4.*rm1)*sqrt(
max(0.,1.-4.*rm1))
15331 ELSEIF(i.EQ.13)
THEN 15335 DO 140 j=1,2*mstp(1)
15336 eps=(2.*pmas(j,1)/rmas)**2
15338 IF(
eps.GT.1.
e-4)
THEN 15340 rln=log((1.+root)/(1.-root))
15344 phire=0.25*(rln**2-paru(1)**2)
15345 phiim=0.5*paru(1)*rln
15347 phire=-(asin(1./sqrt(
eps)))**2
15350 etare=etare+0.5*
eps*(1.+(
eps-1.)*phire)
15351 etaim=etaim+0.5*
eps*(
eps-1.)*phiim
15353 eta2=etare**2+etaim**2
15354 wdtp(i)=(as/paru(1))**2*eta2
15356 ELSEIF(i.EQ.14)
THEN 15360 DO 150 j=1,3*mstp(1)+1
15361 IF(j.LE.2*mstp(1))
THEN 15363 eps=(2.*pmas(j,1)/rmas)**2
15364 ELSEIF(j.LE.3*mstp(1))
THEN 15365 jl=2*(j-2*mstp(1))-1
15366 ej=kchg(10+jl,1)/3.
15367 eps=(2.*pmas(10+jl,1)/rmas)**2
15369 eps=(2.*pmas(24,1)/rmas)**2
15372 IF(
eps.GT.1.
e-4)
THEN 15374 rln=log((1.+root)/(1.-root))
15378 phire=0.25*(rln**2-paru(1)**2)
15379 phiim=0.5*paru(1)*rln
15381 phire=-(asin(1./sqrt(
eps)))**2
15384 IF(j.LE.2*mstp(1))
THEN 15385 etare=etare+0.5*3.*ej**2*
eps*(1.+(
eps-1.)*phire)
15386 etaim=etaim+0.5*3.*ej**2*
eps*(
eps-1.)*phiim
15387 ELSEIF(j.LE.3*mstp(1))
THEN 15388 etare=etare+0.5*ej**2*
eps*(1.+(
eps-1.)*phire)
15389 etaim=etaim+0.5*ej**2*
eps*(
eps-1.)*phiim
15391 etare=etare-0.5-0.75*
eps*(1.+(
eps-2.)*phire)
15392 etaim=etaim+0.75*
eps*(
eps-2.)*phiim
15395 eta2=etare**2+etaim**2
15396 wdtp(i)=(aem/paru(1))**2*0.5*eta2
15398 ELSEIF(i.EQ.15)
THEN 15402 DO 160 j=1,3*mstp(1)+1
15403 IF(j.LE.2*mstp(1))
THEN 15407 eps=(2.*pmas(j,1)/rmas)**2
15408 epsp=(2.*pmas(j,1)/pmas(23,1))**2
15409 ELSEIF(j.LE.3*mstp(1))
THEN 15410 jl=2*(j-2*mstp(1))-1
15411 ej=kchg(10+jl,1)/3.
15414 eps=(2.*pmas(10+jl,1)/rmas)**2
15415 epsp=(2.*pmas(10+jl,1)/pmas(23,1))**2
15417 eps=(2.*pmas(24,1)/rmas)**2
15418 epsp=(2.*pmas(24,1)/pmas(23,1))**2
15422 IF(
eps.GT.1.
e-4)
THEN 15423 rln=log((1.+root)/(1.-root))
15427 phire=0.25*(rln**2-paru(1)**2)
15428 phiim=0.5*paru(1)*rln
15429 psire=-(1.+0.5*root*rln)
15430 psiim=0.5*paru(1)*root
15432 phire=-(asin(1./sqrt(
eps)))**2
15434 psire=-(1.+sqrt(
eps-1.)*asin(1./sqrt(
eps)))
15437 IF(epsp.LE.1.)
THEN 15439 IF(epsp.GT.1.
e-4)
THEN 15440 rln=log((1.+root)/(1.-root))
15442 rln=log(4./epsp-2.)
15444 phirep=0.25*(rln**2-paru(1)**2)
15445 phiimp=0.5*paru(1)*rln
15446 psirep=-(1.+0.5*root*rln)
15447 psiimp=0.5*paru(1)*root
15449 phirep=-(asin(1./sqrt(epsp)))**2
15451 psirep=-(1.+sqrt(epsp-1.)*asin(1./sqrt(epsp)))
15454 fxyre=
eps*epsp/(8.*(
eps-epsp))*(1.-
eps*epsp/(
eps-epsp)*(phire-
15460 IF(j.LE.2*mstp(1))
THEN 15461 etare=etare-3.*ej*vj*(fxyre-0.25*f1re)
15462 etaim=etaim-3.*ej*vj*(fxyim-0.25*f1im)
15463 ELSEIF(j.LE.3*mstp(1))
THEN 15464 etare=etare-ej*vj*(fxyre-0.25*f1re)
15465 etaim=etaim-ej*vj*(fxyim-0.25*f1im)
15467 etare=etare-sqrt(1.-xw)*(((1.+2./
eps)*xw/sqrt(1.-xw)-
15468 & (5.+2./
eps))*fxyre+(3.-xw/sqrt(1.-xw))*f1re)
15469 etaim=etaim-sqrt(1.-xw)*(((1.+2./
eps)*xw/sqrt(1.-xw)-
15470 & (5.+2./
eps))*fxyim+(3.-xw/sqrt(1.-xw))*f1im)
15473 eta2=etare**2+etaim**2
15474 wdtp(i)=(aem/paru(1))**2*(1.-(pmas(23,1)/rmas)**2)**3/xw*eta2
15478 wdtp(i)=(1.-4.*rm1+12.*rm1**2)*sqrt(
max(0.,1.-4.*rm1))/
15482 wdtp(0)=wdtp(0)+wdtp(i)
15483 IF(mdme(idc,1).GT.0)
THEN 15484 wdte(i,mdme(idc,1))=wdtp(i)*wid2
15485 wdte(0,mdme(idc,1))=wdte(0,mdme(idc,1))+wdte(i,mdme(idc,1))
15486 wdte(i,0)=wdte(i,mdme(idc,1))
15487 wdte(0,0)=wdte(0,0)+wdte(i,0)
15491 ELSEIF(kfla.EQ.32)
THEN 15493 IF(mint(61).EQ.1)
THEN 15494 ei=kchg(iabs(mint(15)),1)/3.
15498 gzmz=pmas(23,2)*pmas(23,1)
15501 sqmzp=pmas(32,1)**2
15502 gzpmzp=pmas(32,2)*pmas(32,1)
15504 gzi=ei*vi/(8.*xw*(1.-xw))*sqm*(sqm-sqmz)/
15505 & ((sqm-sqmz)**2+gzmz**2)
15506 gzpi=ei*vpi/(8.*xw*(1.-xw))*sqm*(sqm-sqmzp)/
15507 & ((sqm-sqmzp)**2+gzpmzp**2)
15508 zzi=(vi**2+ai**2)/(16.*xw*(1.-xw))**2*sqm**2/
15509 & ((sqm-sqmz)**2+gzmz**2)
15510 zzpi=2.*(vi*vpi+ai*api)/(16.*xw*(1.-xw))**2*
15511 & sqm**2*((sqm-sqmz)*(sqm-sqmzp)+gzmz*gzpmzp)/
15512 & (((sqm-sqmz)**2+gzmz**2)*((sqm-sqmzp)**2+gzpmzp**2))
15513 zpzpi=(vpi**2+api**2)/(16.*xw*(1.-xw))**2*sqm**2/
15514 & ((sqm-sqmzp)**2+gzpmzp**2)
15515 IF(mstp(44).EQ.1)
THEN 15522 ELSEIF(mstp(44).EQ.2)
THEN 15529 ELSEIF(mstp(44).EQ.3)
THEN 15536 ELSEIF(mstp(44).EQ.4)
THEN 15541 ELSEIF(mstp(44).EQ.5)
THEN 15546 ELSEIF(mstp(44).EQ.6)
THEN 15552 ELSEIF(mint(61).EQ.2)
THEN 15560 DO 180 i=1,mdcy(32,3)
15562 rm1=(pmas(iabs(kfdp(idc,1)),1)/rmas)**2
15563 rm2=(pmas(iabs(kfdp(idc,2)),1)/rmas)**2
15564 IF(sqrt(rm1)+sqrt(rm2).GT.1..OR.mdme(idc,1).LT.0)
GOTO 180
15570 apf=sign(1.,ef+0.1)
15572 IF(mint(61).EQ.0)
THEN 15573 wdtp(i)=3.*(vpf**2*(1.+2.*rm1)+apf**2*(1.-4.*rm1))*
15574 & sqrt(
max(0.,1.-4.*rm1))*radc
15575 ELSEIF(mint(61).EQ.1)
THEN 15576 wdtp(i)=3.*((ggi*ef**2+gzi*ef*vf+gzpi*ef*vpf+zzi*vf**2+
15577 & zzpi*vf*vpf+zpzpi*vpf**2)*(1.+2.*rm1)+(zzi*af**2+
15578 & zzpi*af*apf+zpzpi*apf**2)*(1.-4.*rm1))*
15579 & sqrt(
max(0.,1.-4.*rm1))*radc
15580 ELSEIF(mint(61).EQ.2)
THEN 15581 ggf=3.*ef**2*(1.+2.*rm1)*sqrt(
max(0.,1.-4.*rm1))*radc
15582 gzf=3.*ef*vf*(1.+2.*rm1)*sqrt(
max(0.,1.-4.*rm1))*radc
15583 gzpf=3.*ef*vpf*(1.+2.*rm1)*sqrt(
max(0.,1.-4.*rm1))*radc
15584 zzf=3.*(vf**2*(1.+2.*rm1)+af**2*(1.-4.*rm1))*
15585 & sqrt(
max(0.,1.-4.*rm1))*radc
15586 zzpf=3.*(vf*vpf*(1.+2.*rm1)+af*apf*(1.-4.*rm1))*
15587 & sqrt(
max(0.,1.-4.*rm1))*radc
15588 zpzpf=3.*(vpf**2*(1.+2.*rm1)+apf**2*(1.-4.*rm1))*
15589 & sqrt(
max(0.,1.-4.*rm1))*radc
15597 apf=sign(1.,ef+0.1)
15599 IF(mint(61).EQ.0)
THEN 15600 wdtp(i)=(vpf**2*(1.+2.*rm1)+apf**2*(1.-4.*rm1))*
15601 & sqrt(
max(0.,1.-4.*rm1))
15602 ELSEIF(mint(61).EQ.1)
THEN 15603 wdtp(i)=((ggi*ef**2+gzi*ef*vf+gzpi*ef*vpf+zzi*vf**2+
15604 & zzpi*vf*vpf+zpzpi*vpf**2)*(1.+2.*rm1)+(zzi*af**2+
15605 & zzpi*af*apf+zpzpi*apf**2)*(1.-4.*rm1))*
15606 & sqrt(
max(0.,1.-4.*rm1))
15607 ELSEIF(mint(61).EQ.2)
THEN 15608 ggf=ef**2*(1.+2.*rm1)*sqrt(
max(0.,1.-4.*rm1))
15609 gzf=ef*vf*(1.+2.*rm1)*sqrt(
max(0.,1.-4.*rm1))
15610 gzpf=ef*vpf*(1.+2.*rm1)*sqrt(
max(0.,1.-4.*rm1))
15611 zzf=(vf**2*(1.+2.*rm1)+af**2*(1.-4.*rm1))*
15612 & sqrt(
max(0.,1.-4.*rm1))
15613 zzpf=(vf*vpf*(1.+2.*rm1)+af*apf*(1.-4.*rm1))*
15614 & sqrt(
max(0.,1.-4.*rm1))
15615 zpzpf=(vpf**2*(1.+2.*rm1)+apf**2*(1.-4.*rm1))*
15616 & sqrt(
max(0.,1.-4.*rm1))
15620 wdtp(0)=wdtp(0)+wdtp(i)
15621 IF(mdme(idc,1).GT.0)
THEN 15622 wdte(i,mdme(idc,1))=wdtp(i)*wid2
15623 wdte(0,mdme(idc,1))=wdte(0,mdme(idc,1))+wdte(i,mdme(idc,1))
15624 wdte(i,0)=wdte(i,mdme(idc,1))
15625 wdte(0,0)=wdte(0,0)+wdte(i,0)
15626 vint(111)=vint(111)+ggf
15627 vint(112)=vint(112)+gzf
15628 vint(113)=vint(113)+gzpf
15629 vint(114)=vint(114)+zzf
15630 vint(115)=vint(115)+zzpf
15631 vint(116)=vint(116)+zpzpf
15634 IF(mstp(44).EQ.1)
THEN 15641 ELSEIF(mstp(44).EQ.2)
THEN 15648 ELSEIF(mstp(44).EQ.3)
THEN 15655 ELSEIF(mstp(44).EQ.4)
THEN 15660 ELSEIF(mstp(44).EQ.5)
THEN 15665 ELSEIF(mstp(44).EQ.6)
THEN 15672 ELSEIF(kfla.EQ.37)
THEN 15674 DO 190 i=1,mdcy(37,3)
15676 rm1=(pmas(iabs(kfdp(idc,1)),1)/rmas)**2
15677 rm2=(pmas(iabs(kfdp(idc,2)),1)/rmas)**2
15678 IF(sqrt(rm1)+sqrt(rm2).GT.1..OR.mdme(idc,1).LT.0)
GOTO 190
15681 wdtp(i)=3.*((rm1*paru(121)+rm2/paru(121))*
15682 & (1.-rm1-rm2)-4.*rm1*rm2)*
15683 & sqrt(
max(0.,(1.-rm1-rm2)**2-4.*rm1*rm2))*radc
15687 wdtp(i)=((rm1*paru(121)+rm2/paru(121))*
15688 & (1.-rm1-rm2)-4.*rm1*rm2)*
15689 & sqrt(
max(0.,(1.-rm1-rm2)**2-4.*rm1*rm2))
15692 wdtp(0)=wdtp(0)+wdtp(i)
15693 IF(mdme(idc,1).GT.0)
THEN 15694 wdte(i,mdme(idc,1))=wdtp(i)*wid2
15695 wdte(0,mdme(idc,1))=wdte(0,mdme(idc,1))+wdte(i,mdme(idc,1))
15696 wdte(i,0)=wdte(i,mdme(idc,1))
15697 wdte(0,0)=wdte(0,0)+wdte(i,0)
15701 ELSEIF(kfla.EQ.40)
THEN 15703 DO 200 i=1,mdcy(40,3)
15705 rm1=(pmas(iabs(kfdp(idc,1)),1)/rmas)**2
15706 rm2=(pmas(iabs(kfdp(idc,2)),1)/rmas)**2
15707 IF(sqrt(rm1)+sqrt(rm2).GT.1..OR.mdme(idc,1).LT.0)
GOTO 200
15717 wdtp(0)=wdtp(0)+wdtp(i)
15718 IF(mdme(idc,1).GT.0)
THEN 15719 wdte(i,mdme(idc,1))=wdtp(i)*wid2
15720 wdte(0,mdme(idc,1))=wdte(0,mdme(idc,1))+wdte(i,mdme(idc,1))
15721 wdte(i,0)=wdte(i,mdme(idc,1))
15722 wdte(0,0)=wdte(0,0)+wdte(i,0)
15738 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
15740 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
15742 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
15744 common/pypars/mstp(200),parp(200),msti(200),pari(200)
15746 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
15748 common/pyint1/mint(400),vint(400)
15750 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
15755 IF(isub.EQ.96)
GOTO 110
15760 rm3=sqm3/(tau*vint(2))
15761 rm4=sqm4/(tau*vint(2))
15762 be34=sqrt((1.-
rm3-rm4)**2-4.*
rm3*rm4)
15765 IF(
min(sqm3,sqm4).LT.ckin(6)**2) pthmin=
max(ckin(3),ckin(5))
15773 IF(iset(isub).LE.2)
THEN 15774 x1=sqrt(tau)*exp(yst)
15775 x2=sqrt(tau)*exp(-yst)
15777 x1=sqrt(taup)*exp(yst)
15778 x2=sqrt(taup)*exp(-yst)
15781 IF(tau*vint(2).LT.ckin(1)**2) mint(51)=1
15782 IF(ckin(2).GE.0..AND.tau*vint(2).GT.ckin(2)**2) mint(51)=1
15783 IF(
x1.LT.ckin(21).OR.
x1.GT.ckin(22)) mint(51)=1
15784 IF(
x2.LT.ckin(23).OR.
x2.GT.ckin(24)) mint(51)=1
15785 IF(xf.LT.ckin(25).OR.xf.GT.ckin(26)) mint(51)=1
15786 IF(yst.LT.ckin(7).OR.yst.GT.ckin(8)) mint(51)=1
15787 IF(iset(isub).EQ.2.OR.iset(isub).EQ.4)
THEN 15788 pth=0.5*be34*sqrt(tau*vint(2)*(1.-cth**2))
15789 y3=yst+0.5*log((1.+
rm3-rm4+be34*cth)/(1.+
rm3-rm4-be34*cth))
15790 y4=yst+0.5*log((1.+rm4-
rm3-be34*cth)/(1.+rm4-
rm3+be34*cth))
15795 sth=sqrt(1.-cth**2)
15796 IF(sth.LT.1.
e-6)
GOTO 100
15797 expet3=((1.+
rm3-rm4)*sinh(yst)+be34*cosh(yst)*cth+
15798 & sqrt(((1.+
rm3-rm4)*cosh(yst)+be34*sinh(yst)*cth)**2-4.*
rm3))/
15800 expet4=((1.-
rm3+rm4)*sinh(yst)-be34*cosh(yst)*cth+
15801 & sqrt(((1.-
rm3+rm4)*cosh(yst)-be34*sinh(yst)*cth)**2-4.*rm4))/
15803 eta3=log(
min(1.e10,
max(1.
e-10,expet3)))
15804 eta4=log(
min(1.e10,
max(1.
e-10,expet4)))
15805 etalar=
max(eta3,eta4)
15806 etasma=
min(eta3,eta4)
15807 100 cts3=((1.+
rm3-rm4)*sinh(yst)+be34*cosh(yst)*cth)/
15808 & sqrt(((1.+
rm3-rm4)*cosh(yst)+be34*sinh(yst)*cth)**2-4.*
rm3)
15809 cts4=((1.-
rm3+rm4)*sinh(yst)-be34*cosh(yst)*cth)/
15810 & sqrt(((1.-
rm3+rm4)*cosh(yst)-be34*sinh(yst)*cth)**2-4.*rm4)
15811 ctslar=
max(cts3,cts4)
15812 ctssma=
min(cts3,cts4)
15813 IF(pth.LT.pthmin) mint(51)=1
15814 IF(ckin(4).GE.0..AND.pth.GT.ckin(4)) mint(51)=1
15815 IF(ylarge.LT.ckin(9).OR.ylarge.GT.ckin(10)) mint(51)=1
15816 IF(ysmall.LT.ckin(11).OR.ysmall.GT.ckin(12)) mint(51)=1
15817 IF(etalar.LT.ckin(13).OR.etalar.GT.ckin(14)) mint(51)=1
15818 IF(etasma.LT.ckin(15).OR.etasma.GT.ckin(16)) mint(51)=1
15819 IF(ctslar.LT.ckin(17).OR.ctslar.GT.ckin(18)) mint(51)=1
15820 IF(ctssma.LT.ckin(19).OR.ctssma.GT.ckin(20)) mint(51)=1
15821 IF(cth.LT.ckin(27).OR.cth.GT.ckin(28)) mint(51)=1
15823 IF(iset(isub).EQ.3.OR.iset(isub).EQ.4)
THEN 15824 IF(taup*vint(2).LT.ckin(31)**2) mint(51)=1
15825 IF(ckin(32).GE.0..AND.taup*vint(2).GT.ckin(32)**2) mint(51)=1
15828 ELSEIF(ilim.EQ.1)
THEN 15834 taumn1=ckin(1)**2/vint(2)
15836 IF(ckin(2).GE.0.) taumx1=ckin(2)**2/vint(2)
15838 tm3=sqrt(sqm3+pthmin**2)
15839 tm4=sqrt(sqm4+pthmin**2)
15841 IF(ckin(9).GT.ckin(12)) ydcosh=cosh(ckin(9)-ckin(12))
15842 taumn2=(tm3**2+2.*tm3*tm4*ydcosh+tm4**2)/vint(2)
15845 cth2mn=
min(ckin(27)**2,ckin(28)**2)
15846 cth2mx=
max(ckin(27)**2,ckin(28)**2)
15848 IF(ckin(27)*ckin(28).GT.0.) taumn3=
15849 & (sqrt(sqm3+pthmin**2/(1.-cth2mn))+
15850 & sqrt(sqm4+pthmin**2/(1.-cth2mn)))**2/vint(2)
15852 IF(ckin(4).GE.0..AND.cth2mx.LT.1.) taumx3=
15853 & (sqrt(sqm3+ckin(4)**2/(1.-cth2mx))+
15854 & sqrt(sqm4+ckin(4)**2/(1.-cth2mx)))**2/vint(2)
15856 taumn4=ckin(21)*ckin(23)
15857 taumx4=ckin(22)*ckin(24)
15860 taumx5=
max(1.-ckin(25),1.+ckin(26))
15861 vint(11)=
max(taumn0,taumn1,taumn2,taumn3,taumn4,taumn5)
15862 vint(31)=
min(taumx0,taumx1,taumx2,taumx3,taumx4,taumx5)
15863 IF(mint(43).EQ.1.AND.(iset(isub).EQ.1.OR.iset(isub).EQ.2))
THEN 15867 IF(vint(31).LE.vint(11)) mint(51)=1
15869 ELSEIF(ilim.EQ.2)
THEN 15871 IF(iset(isub).EQ.3.OR.iset(isub).EQ.4) tau=vint(26)
15880 ystmn2=log(
max(tau,ckin(21))/taurt)
15881 ystmx2=log(
max(tau,ckin(22))/taurt)
15883 ystmn3=-log(
max(tau,ckin(24))/taurt)
15884 ystmx3=-log(
max(tau,ckin(23))/taurt)
15886 yepmn4=0.5*abs(ckin(25))/taurt
15887 ystmn4=sign(log(sqrt(1.+yepmn4**2)+yepmn4),ckin(25))
15888 yepmx4=0.5*abs(ckin(26))/taurt
15889 ystmx4=sign(log(sqrt(1.+yepmx4**2)+yepmx4),ckin(26))
15891 yepsmn=(
rm3-rm4)*sinh(ckin(9)-ckin(11))
15892 yepsmx=(
rm3-rm4)*sinh(ckin(10)-ckin(12))
15893 ydifmn=abs(log(sqrt(1.+yepsmn**2)-yepsmn))
15894 ydifmx=abs(log(sqrt(1.+yepsmx**2)-yepsmx))
15895 ystmn5=0.5*(ckin(9)+ckin(11)-ydifmn)
15896 ystmx5=0.5*(ckin(10)+ckin(12)+ydifmx)
15899 cthlim=sqrt(1.-4.*pthmin**2/(be34*tau*vint(2)))
15900 rzmn=be34*
max(ckin(27),-cthlim)
15901 rzmx=be34*
min(ckin(28),cthlim)
15902 yex3mx=(1.+
rm3-rm4+rzmx)/
max(1
e-10,1.+
rm3-rm4-rzmx)
15903 yex4mx=(1.+rm4-
rm3-rzmn)/
max(1
e-10,1.+rm4-
rm3+rzmn)
15904 yex3mn=
max(1
e-10,1.+
rm3-rm4+rzmn)/(1.+
rm3-rm4-rzmn)
15905 yex4mn=
max(1
e-10,1.+rm4-
rm3-rzmx)/(1.+rm4-
rm3+rzmx)
15906 ystmn6=ckin(9)-0.5*log(
max(yex3mx,yex4mx))
15907 ystmx6=ckin(12)-0.5*log(
min(yex3mn,yex4mn))
15908 vint(12)=
max(ystmn0,ystmn1,ystmn2,ystmn3,ystmn4,ystmn5,ystmn6)
15909 vint(32)=
min(ystmx0,ystmx1,ystmx2,ystmx3,ystmx4,ystmx5,ystmx6)
15910 IF(mint(43).EQ.1)
THEN 15913 ELSEIF(mint(43).EQ.2)
THEN 15914 vint(12)=0.99999*ystmx0
15915 vint(32)=1.00001*ystmx0
15916 ELSEIF(mint(43).EQ.3)
THEN 15917 vint(12)=-1.00001*ystmx0
15918 vint(32)=-0.99999*ystmx0
15920 IF(vint(32).LE.vint(12)) mint(51)=1
15922 ELSEIF(ilim.EQ.3)
THEN 15931 ctnmn1=
min(0.,ckin(27))
15932 ctnmx1=
min(0.,ckin(28))
15933 ctpmn1=
max(0.,ckin(27))
15934 ctpmx1=
max(0.,ckin(28))
15936 ctnmn2=-sqrt(1.-4.*pthmin**2/(be34**2*tau*vint(2)))
15940 IF(ckin(4).GE.0.)
THEN 15941 ctnmx2=-sqrt(
max(0.,1.-4.*ckin(4)**2/(be34**2*tau*vint(2))))
15945 ctnmn3=
min(0.,
max((1.+
rm3-rm4)/be34*tanh(ckin(11)-yst),
15946 & -(1.-
rm3+rm4)/be34*tanh(ckin(10)-yst)))
15947 ctnmx3=
min(0.,(1.+
rm3-rm4)/be34*tanh(ckin(12)-yst),
15948 & -(1.-
rm3+rm4)/be34*tanh(ckin(9)-yst))
15949 ctpmn3=
max(0.,(1.+
rm3-rm4)/be34*tanh(ckin(9)-yst),
15950 & -(1.-
rm3+rm4)/be34*tanh(ckin(12)-yst))
15951 ctpmx3=
max(0.,
min((1.+
rm3-rm4)/be34*tanh(ckin(10)-yst),
15952 & -(1.-
rm3+rm4)/be34*tanh(ckin(11)-yst)))
15953 vint(13)=
max(ctnmn0,ctnmn1,ctnmn2,ctnmn3)
15954 vint(33)=
min(ctnmx0,ctnmx1,ctnmx2,ctnmx3)
15955 vint(14)=
max(ctpmn0,ctpmn1,ctpmn2,ctpmn3)
15956 vint(34)=
min(ctpmx0,ctpmx1,ctpmx2,ctpmx3)
15957 IF(vint(33).LE.vint(13).AND.vint(34).LE.vint(14)) mint(51)=1
15959 ELSEIF(ilim.EQ.4)
THEN 15965 tapmn1=ckin(31)**2/vint(2)
15967 IF(ckin(32).GE.0.) tapmx1=ckin(32)**2/vint(2)
15968 vint(16)=
max(tapmn0,tapmn1)
15969 vint(36)=
min(tapmx0,tapmx1)
15970 IF(mint(43).EQ.1)
THEN 15974 IF(vint(36).LE.vint(16)) mint(51)=1
15981 110
IF(ilim.EQ.0)
THEN 15982 ELSEIF(ilim.EQ.1)
THEN 15983 IF(mstp(82).LE.1) vint(11)=4.*parp(81)**2/vint(2)
15984 IF(mstp(82).GE.2) vint(11)=parp(82)**2/vint(2)
15986 ELSEIF(ilim.EQ.2)
THEN 15987 vint(12)=0.5*log(vint(21))
15989 ELSEIF(ilim.EQ.3)
THEN 15990 IF(mstp(82).LE.1) st2eff=4.*parp(81)**2/(vint(21)*vint(2))
15991 IF(mstp(82).GE.2) st2eff=0.01*parp(82)**2/(vint(21)*vint(2))
15992 vint(13)=-sqrt(
max(0.,1.-st2eff))
16003 SUBROUTINE pykmap(IVAR,MVAR,VVAR)
16008 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
16010 common/pyint1/mint(400),vint(400)
16012 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
16020 IF(mvar.EQ.3.OR.mvar.EQ.4)
THEN 16023 ELSEIF(mvar.EQ.5.OR.mvar.EQ.6)
THEN 16027 IF(mint(43).EQ.1.AND.(iset(isub).EQ.1.OR.iset(isub).EQ.2))
THEN 16029 ELSEIF(mvar.EQ.1)
THEN 16030 tau=taumin*(taumax/taumin)**vvar
16031 ELSEIF(mvar.EQ.2)
THEN 16032 tau=taumax*taumin/(taumin+(taumax-taumin)*vvar)
16033 ELSEIF(mvar.EQ.3.OR.mvar.EQ.5)
THEN 16034 ratgen=(taure+taumax)/(taure+taumin)*taumin/taumax
16035 tau=taure*taumin/((taure+taumin)*ratgen**vvar-taumin)
16037 aupp=atan((taumax-taure)/gamre)
16038 alow=atan((taumin-taure)/gamre)
16039 tau=taure+gamre*tan(alow+(aupp-alow)*vvar)
16041 vint(21)=
min(taumax,
max(taumin,tau))
16044 ELSEIF(ivar.EQ.2)
THEN 16047 IF(mint(43).EQ.1)
THEN 16049 ELSEIF(mint(43).EQ.2)
THEN 16050 IF(iset(isub).LE.2) yst=-0.5*log(vint(21))
16051 IF(iset(isub).GE.3) yst=-0.5*log(vint(26))
16052 ELSEIF(mint(43).EQ.3)
THEN 16053 IF(iset(isub).LE.2) yst=0.5*log(vint(21))
16054 IF(iset(isub).GE.3) yst=0.5*log(vint(26))
16055 ELSEIF(mvar.EQ.1)
THEN 16056 yst=ystmin+(ystmax-ystmin)*sqrt(vvar)
16057 ELSEIF(mvar.EQ.2)
THEN 16058 yst=ystmax-(ystmax-ystmin)*sqrt(1.-vvar)
16060 aupp=atan(exp(ystmax))
16061 alow=atan(exp(ystmin))
16062 yst=log(tan(alow+(aupp-alow)*vvar))
16064 vint(22)=
min(ystmax,
max(ystmin,yst))
16067 ELSEIF(ivar.EQ.3)
THEN 16068 rm34=2.*vint(63)*vint(64)/(vint(21)*vint(2))**2
16070 IF(2.*vint(71)**2/(vint(21)*vint(2)).LT.0.0001) rm34=
max(rm34,
16071 & 2.*vint(71)**2/(vint(21)*vint(2)))
16079 IF(aneg.GT.0..AND.vvar*(aneg+apos).LE.aneg)
THEN 16080 vctn=vvar*(aneg+apos)/aneg
16081 cth=ctnmin+(ctnmax-ctnmin)*vctn
16083 vctp=(vvar*(aneg+apos)-aneg)/apos
16084 cth=ctpmin+(ctpmax-ctpmin)*vctp
16086 ELSEIF(mvar.EQ.2)
THEN 16087 rmnmin=
max(rm34,rsqm-ctnmin)
16088 rmnmax=
max(rm34,rsqm-ctnmax)
16089 rmpmin=
max(rm34,rsqm-ctpmin)
16090 rmpmax=
max(rm34,rsqm-ctpmax)
16091 aneg=log(rmnmin/rmnmax)
16092 apos=log(rmpmin/rmpmax)
16093 IF(aneg.GT.0..AND.vvar*(aneg+apos).LE.aneg)
THEN 16094 vctn=vvar*(aneg+apos)/aneg
16095 cth=rsqm-rmnmin*(rmnmax/rmnmin)**vctn
16097 vctp=(vvar*(aneg+apos)-aneg)/apos
16098 cth=rsqm-rmpmin*(rmpmax/rmpmin)**vctp
16100 ELSEIF(mvar.EQ.3)
THEN 16101 rmnmin=
max(rm34,rsqm+ctnmin)
16102 rmnmax=
max(rm34,rsqm+ctnmax)
16103 rmpmin=
max(rm34,rsqm+ctpmin)
16104 rmpmax=
max(rm34,rsqm+ctpmax)
16105 aneg=log(rmnmax/rmnmin)
16106 apos=log(rmpmax/rmpmin)
16107 IF(aneg.GT.0..AND.vvar*(aneg+apos).LE.aneg)
THEN 16108 vctn=vvar*(aneg+apos)/aneg
16109 cth=rmnmin*(rmnmax/rmnmin)**vctn-rsqm
16111 vctp=(vvar*(aneg+apos)-aneg)/apos
16112 cth=rmpmin*(rmpmax/rmpmin)**vctp-rsqm
16114 ELSEIF(mvar.EQ.4)
THEN 16115 rmnmin=
max(rm34,rsqm-ctnmin)
16116 rmnmax=
max(rm34,rsqm-ctnmax)
16117 rmpmin=
max(rm34,rsqm-ctpmin)
16118 rmpmax=
max(rm34,rsqm-ctpmax)
16119 aneg=1./rmnmax-1./rmnmin
16120 apos=1./rmpmax-1./rmpmin
16121 IF(aneg.GT.0..AND.vvar*(aneg+apos).LE.aneg)
THEN 16122 vctn=vvar*(aneg+apos)/aneg
16123 cth=rsqm-1./(1./rmnmin+aneg*vctn)
16125 vctp=(vvar*(aneg+apos)-aneg)/apos
16126 cth=rsqm-1./(1./rmpmin+apos*vctp)
16128 ELSEIF(mvar.EQ.5)
THEN 16129 rmnmin=
max(rm34,rsqm+ctnmin)
16130 rmnmax=
max(rm34,rsqm+ctnmax)
16131 rmpmin=
max(rm34,rsqm+ctpmin)
16132 rmpmax=
max(rm34,rsqm+ctpmax)
16133 aneg=1./rmnmin-1./rmnmax
16134 apos=1./rmpmin-1./rmpmax
16135 IF(aneg.GT.0..AND.vvar*(aneg+apos).LE.aneg)
THEN 16136 vctn=vvar*(aneg+apos)/aneg
16137 cth=1./(1./rmnmin-aneg*vctn)-rsqm
16139 vctp=(vvar*(aneg+apos)-aneg)/apos
16140 cth=1./(1./rmpmin-apos*vctp)-rsqm
16143 IF(cth.LT.0.) cth=
min(ctnmax,
max(ctnmin,cth))
16144 IF(cth.GT.0.) cth=
min(ctpmax,
max(ctpmin,cth))
16148 ELSEIF(ivar.EQ.4)
THEN 16152 IF(mint(43).EQ.1)
THEN 16154 ELSEIF(mvar.EQ.1)
THEN 16155 taup=taupmn*(taupmx/taupmn)**vvar
16157 aupp=(1.-tau/taupmx)**4
16158 alow=(1.-tau/taupmn)**4
16159 taup=tau/(1.-(alow+(aupp-alow)*vvar)**0.25)
16161 vint(26)=
min(taupmx,
max(taupmn,taup))
16169 SUBROUTINE pysigh(NCHN,SIGS)
16180 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
16182 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
16184 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
16186 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
16188 common/pypars/mstp(200),parp(200),msti(200),pari(200)
16190 common/pyint1/mint(400),vint(400)
16192 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
16194 common/pyint3/xsfx(2,-40:40),isig(1000,3),sigh(1000)
16196 common/pyint4/widp(21:40,0:40),wide(21:40,0:40),wids(21:40,3)
16198 common/pyint5/ngen(0:200,3),xsec(0:200,3)
16200 dimension
x(2),xpq(-6:6),kfac(2,-40:40),wdtp(0:40),wdte(0:40,0:5)
16227 IF(iset(isub).LE.2.OR.iset(isub).EQ.5)
THEN 16228 x(1)=sqrt(tau)*exp(yst)
16229 x(2)=sqrt(tau)*exp(-yst)
16231 x(1)=sqrt(taup)*exp(yst)
16232 x(2)=sqrt(taup)*exp(-yst)
16234 IF(mint(43).EQ.4.AND.iset(isub).GE.1.AND.
16235 &(
x(1).GT.0.999.OR.
x(2).GT.0.999))
RETURN 16241 be34=sqrt((1.-
rm3-rm4)**2-4.*
rm3*rm4)
16242 rpts=4.*vint(71)**2/sh
16243 be34l=sqrt(
max(0.,(1.-
rm3-rm4)**2-4.*
rm3*rm4-rpts))
16246 rthm=(4.*
rm3*rm4+rpts)/(1.-
rm3-rm4+be34l)
16247 th=-0.5*sh*
max(rthm,1.-
rm3-rm4-be34*cth)
16248 uh=-0.5*sh*
max(rthm,1.-
rm3-rm4+be34*cth)
16249 sqpth=0.25*sh*be34**2*(1.-cth**2)
16255 IF(iset(isub).EQ.1.OR.iset(isub).EQ.3)
THEN 16257 ELSEIF(mod(iset(isub),2).EQ.0.OR.iset(isub).EQ.5)
THEN 16258 IF(mstp(32).EQ.1)
THEN 16259 q2=2.*sh*th*uh/(sh**2+th**2+uh**2)
16260 ELSEIF(mstp(32).EQ.2)
THEN 16261 q2=sqpth+0.5*(sqm3+sqm4)
16262 ELSEIF(mstp(32).EQ.3)
THEN 16264 ELSEIF(mstp(32).EQ.4)
THEN 16267 IF(iset(isub).EQ.5.AND.mstp(82).GE.2) q2=q2+parp(82)**2
16278 vint(47)=sqrt(sqpth)
16279 vint(50)=taup*vint(2)
16280 vint(49)=sqrt(
max(0.,vint(50)))
16285 IF(iset(isub).LE.0)
GOTO 145
16286 IF(mint(43).GE.2)
THEN 16288 IF(iset(isub).EQ.3.OR.iset(isub).EQ.4)
THEN 16290 IF(isub.EQ.8.OR.isub.EQ.76.OR.isub.EQ.77) q2sf=pmas(24,1)**2
16292 DO 100 i=3-mint(41),mint(42)
16294 IF(iset(isub).EQ.5) xsf=
x(i)/vint(142+i)
16295 CALL pystfu(mint(10+i),xsf,q2sf,xpq,i)
16297 100 xsfx(i,kfl)=xpq(kfl)
16301 IF(mstp(33).NE.3) as=
ulalps(q2)
16304 IF(mstp(33).EQ.1)
THEN 16306 ELSEIF(mstp(33).EQ.2)
THEN 16308 faca=parp(32)/parp(31)
16309 ELSEIF(mstp(33).EQ.3)
THEN 16311 IF(iset(isub).EQ.5.AND.mstp(82).GE.2) q2as=q2as+
16312 & paru(112)*parp(82)
16321 IF(mint(40+i).EQ.1)
THEN 16322 kfac(i,mint(10+i))=1
16325 kfac(i,j)=kfin(i,j)
16326 IF(abs(j).GT.mstp(54).AND.j.NE.21) kfac(i,j)=0
16327 IF(abs(j).LE.6)
THEN 16328 IF(xsfx(i,j).LT.1.
e-10) kfac(i,j)=0
16329 ELSEIF(j.EQ.21)
THEN 16330 IF(xsfx(i,0).LT.1.
e-10) kfac(i,21)=0
16342 IF(kfac(1,-j).EQ.1) min1=-j
16343 IF(kfac(1,j).EQ.1) max1=j
16344 IF(kfac(2,-j).EQ.1) min2=-j
16345 IF(kfac(2,j).EQ.1) max2=j
16347 mina=
min(min1,min2)
16348 maxa=
max(max1,max2)
16352 gmmz=pmas(23,1)*pmas(23,2)
16354 gmmw=pmas(24,1)*pmas(24,2)
16356 gmmh=pmas(25,1)*pmas(25,2)
16357 sqmzp=pmas(32,1)**2
16358 gmmzp=pmas(32,1)*pmas(32,2)
16359 sqmhc=pmas(37,1)**2
16360 gmmhc=pmas(37,1)*pmas(37,2)
16362 gmmr=pmas(40,1)*pmas(40,2)
16367 comfac=paru(1)*paru(5)/vint(2)
16368 IF(mint(43).EQ.4) comfac=comfac*fack
16369 IF((mint(43).GE.2.OR.iset(isub).EQ.3.OR.iset(isub).EQ.4).AND.
16370 &iset(isub).NE.5)
THEN 16371 atau0=log(taumax/taumin)
16372 atau1=(taumax-taumin)/(taumax*taumin)
16373 h1=coef(isub,1)+(atau0/atau1)*coef(isub,2)/tau
16374 IF(mint(72).GE.1)
THEN 16377 atau2=log(taumax/taumin*(taumin+taur1)/(taumax+taur1))/taur1
16378 atau3=(atan((taumax-taur1)/gamr1)-atan((taumin-taur1)/gamr1))/
16383 IF(mint(72).EQ.2)
THEN 16386 atau4=log(taumax/taumin*(taumin+taur2)/(taumax+taur2))/taur2
16387 atau5=(atan((taumax-taur2)/gamr2)-atan((taumin-taur2)/gamr2))/
16392 comfac=comfac*atau0/(tau*
h1)
16394 IF(mint(43).EQ.4.AND.iset(isub).NE.5)
THEN 16395 ayst0=ystmax-ystmin
16396 ayst1=0.5*(ystmax-ystmin)**2
16398 ayst3=2.*(atan(exp(ystmax))-atan(exp(ystmin)))
16399 h2=(ayst0/ayst1)*coef(isub,7)*(yst-ystmin)+(ayst0/ayst2)*
16400 & coef(isub,8)*(ystmax-yst)+(ayst0/ayst3)*coef(isub,9)/cosh(yst)
16401 comfac=comfac*ayst0/
h2 16406 acth0=ctnmax-ctnmin+ctpmax-ctpmin
16407 IF((iset(isub).EQ.1.OR.iset(isub).EQ.3).AND.
16408 &mdcy(kfpr(isub,1),1).EQ.1)
THEN 16409 IF(kfpr(isub,1).EQ.25.OR.kfpr(isub,1).EQ.37)
THEN 16410 comfac=comfac*0.5*acth0
16412 comfac=comfac*0.125*(3.*acth0+ctnmax**3-ctnmin**3+
16413 & ctpmax**3-ctpmin**3)
16417 ELSEIF(iset(isub).EQ.2.OR.iset(isub).EQ.4)
THEN 16418 acth1=log((
max(rm34,rsqm-ctnmin)*
max(rm34,rsqm-ctpmin))/
16419 & (
max(rm34,rsqm-ctnmax)*
max(rm34,rsqm-ctpmax)))
16420 acth2=log((
max(rm34,rsqm+ctnmax)*
max(rm34,rsqm+ctpmax))/
16421 & (
max(rm34,rsqm+ctnmin)*
max(rm34,rsqm+ctpmin)))
16422 acth3=1./
max(rm34,rsqm-ctnmax)-1./
max(rm34,rsqm-ctnmin)+
16423 & 1./
max(rm34,rsqm-ctpmax)-1./
max(rm34,rsqm-ctpmin)
16424 acth4=1./
max(rm34,rsqm+ctnmin)-1./
max(rm34,rsqm+ctnmax)+
16425 & 1./
max(rm34,rsqm+ctpmin)-1./
max(rm34,rsqm+ctpmax)
16427 & (acth0/acth1)*coef(isub,11)/
max(rm34,rsqm-cth)+
16428 & (acth0/acth2)*coef(isub,12)/
max(rm34,rsqm+cth)+
16429 & (acth0/acth3)*coef(isub,13)/
max(rm34,rsqm-cth)**2+
16430 & (acth0/acth4)*coef(isub,14)/
max(rm34,rsqm+cth)**2
16431 comfac=comfac*acth0*0.5*be34/
h3 16435 IF(mint(43).GE.2.AND.(iset(isub).EQ.3.OR.iset(isub).EQ.4))
THEN 16436 ataup0=log(taupmx/taupmn)
16437 ataup1=((1.-tau/taupmx)**4-(1.-tau/taupmn)**4)/(4.*tau)
16439 & ataup0/ataup1*coef(isub,16)/taup*(1.-tau/taup)**3
16440 IF(1.-tau/taup.GT.1.
e-4)
THEN 16441 fzw=(1.+tau/taup)*log(taup/tau)-2.*(1.-tau/taup)
16443 fzw=1./6.*(1.-tau/taup)**3*tau/taup
16445 comfac=comfac*ataup0*fzw/h4
16449 IF(iset(isub).EQ.5)
THEN 16450 comfac=paru(1)*paru(5)*fack*0.5*vint(2)/sh2
16451 atau0=log(2.*(1.+sqrt(1.-xt2))/xt2-1.)
16452 atau1=2.*atan(1./xt2-1.)/sqrt(xt2)
16453 h1=coef(isub,1)+(atau0/atau1)*coef(isub,2)/sqrt(tau)
16454 comfac=comfac*atau0/
h1 16455 ayst0=ystmax-ystmin
16456 ayst1=0.5*(ystmax-ystmin)**2
16457 ayst3=2.*(atan(exp(ystmax))-atan(exp(ystmin)))
16458 h2=(ayst0/ayst1)*coef(isub,7)*(yst-ystmin)+(ayst0/ayst1)*
16459 & coef(isub,8)*(ystmax-yst)+(ayst0/ayst3)*coef(isub,9)/cosh(yst)
16460 comfac=comfac*ayst0/
h2 16461 IF(mstp(82).LE.1) comfac=comfac*xt2**2*(1./vint(149)-1.)
16464 IF(mstp(82).GE.2) comfac=comfac*xt2**2/(vint(149)*
16470 145
IF(isub.LE.10)
THEN 16474 CALL pywidt(23,sqrt(sh),wdtp,wdte)
16475 facz=comfac*aem**2*4./3.
16477 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 150
16478 ei=kchg(iabs(i),1)/3.
16482 IF(iabs(i).LE.10) facf=faca/3.
16487 sigh(nchn)=facf*facz*(ei**2*vint(111)+ei*vi/(8.*xw*(1.-xw))*
16488 & sh*(sh-sqmz)/((sh-sqmz)**2+gmmz**2)*vint(112)+(vi**2+ai**2)/
16489 & (16.*xw*(1.-xw))**2*sh2/((sh-sqmz)**2+gmmz**2)*vint(114))
16492 ELSEIF(isub.EQ.2)
THEN 16494 CALL pywidt(24,sqrt(sh),wdtp,wdte)
16495 facw=comfac*(aem/xw)**2*1./24*sh2/((sh-sqmw)**2+gmmw**2)
16497 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 170
16500 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 160
16502 IF(i*j.GT.0.OR.mod(ia+ja,2).EQ.0)
GOTO 160
16503 IF((ia.LE.10.AND.ja.GT.10).OR.(ia.GT.10.AND.ja.LE.10))
GOTO 160
16504 kchw=(kchg(ia,1)*isign(1,i)+kchg(ja,1)*isign(1,j))/3
16506 IF(ia.LE.10) facf=vckm((ia+1)/2,(ja+1)/2)*faca/3.
16511 sigh(nchn)=facf*facw*(wdte(0,1)+wdte(0,(5-kchw)/2)+wdte(0,4))
16515 ELSEIF(isub.EQ.3)
THEN 16517 CALL pywidt(25,sqrt(sh),wdtp,wdte)
16518 fach=comfac*(aem/xw)**2*1./48.*(sh/sqmw)**2*
16519 & sh2/((sh-sqmh)**2+gmmh**2)*(wdte(0,1)+wdte(0,2)+wdte(0,4))
16521 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 180
16522 rmq=pmas(iabs(i),1)**2/sh
16527 sigh(nchn)=fach*rmq*sqrt(
max(0.,1.-4.*rmq))
16530 ELSEIF(isub.EQ.4)
THEN 16533 ELSEIF(isub.EQ.5)
THEN 16535 CALL pywidt(25,sqrt(sh),wdtp,wdte)
16536 fach=comfac*1./(128.*paru(1)**2*16.*(1.-xw)**3)*(aem/xw)**4*
16537 & (sh/sqmw)**2*sh2/((sh-sqmh)**2+gmmh**2)*
16538 & (wdte(0,1)+wdte(0,2)+wdte(0,4))
16540 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 200
16542 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 190
16543 ei=kchg(iabs(i),1)/3.
16546 ej=kchg(iabs(j),1)/3.
16553 sigh(nchn)=fach*(vi**2+ai**2)*(vj**2+aj**2)
16557 ELSEIF(isub.EQ.6)
THEN 16560 ELSEIF(isub.EQ.7)
THEN 16563 ELSEIF(isub.EQ.8)
THEN 16565 CALL pywidt(25,sqrt(sh),wdtp,wdte)
16566 fach=comfac*1./(128*paru(1)**2)*(aem/xw)**4*(sh/sqmw)**2*
16567 & sh2/((sh-sqmh)**2+gmmh**2)*(wdte(0,1)+wdte(0,2)+wdte(0,4))
16569 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 220
16570 ei=sign(1.,float(i))*kchg(iabs(i),1)
16572 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 210
16573 ej=sign(1.,float(j))*kchg(iabs(j),1)
16574 IF(ei*ej.GT.0.)
GOTO 210
16579 sigh(nchn)=fach*vint(180+i)*vint(180+j)
16586 ELSEIF(isub.LE.20)
THEN 16587 IF(isub.EQ.11)
THEN 16589 facqq1=comfac*as**2*4./9.*(sh2+uh2)/th2
16590 facqqb=comfac*as**2*4./9.*((sh2+uh2)/th2*faca-
16591 & mstp(34)*2./3.*uh2/(sh*th))
16592 facqq2=comfac*as**2*4./9.*((sh2+th2)/uh2-
16593 & mstp(34)*2./3.*sh2/(th*uh))
16595 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 240
16597 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 230
16603 IF(i.EQ.-j) sigh(nchn)=facqqb
16605 sigh(nchn)=0.5*sigh(nchn)
16610 sigh(nchn)=0.5*facqq2
16615 ELSEIF(isub.EQ.12)
THEN 16617 CALL pywidt(21,sqrt(sh),wdtp,wdte)
16618 facqqb=comfac*as**2*4./9.*(th2+uh2)/sh2*(wdte(0,1)+wdte(0,2)+
16619 & wdte(0,3)+wdte(0,4))
16621 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 250
16629 ELSEIF(isub.EQ.13)
THEN 16631 facgg1=comfac*as**2*32./27.*(uh/th-(2.+mstp(34)*1./4.)*uh2/sh2)
16632 facgg2=comfac*as**2*32./27.*(th/uh-(2.+mstp(34)*1./4.)*th2/sh2)
16634 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 260
16639 sigh(nchn)=0.5*facgg1
16644 sigh(nchn)=0.5*facgg2
16647 ELSEIF(isub.EQ.14)
THEN 16649 facgg=comfac*as*aem*8./9.*(th2+uh2)/(th*uh)
16651 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 270
16652 ei=kchg(iabs(i),1)/3.
16657 sigh(nchn)=facgg*ei**2
16660 ELSEIF(isub.EQ.15)
THEN 16662 faczg=comfac*as*aem/(xw*(1.-xw))*1./18.*
16663 & (th2+uh2+2.*sqm4*sh)/(th*uh)
16664 faczg=faczg*wids(23,2)
16666 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 280
16667 ei=kchg(iabs(i),1)/3.
16674 sigh(nchn)=faczg*(vi**2+ai**2)
16677 ELSEIF(isub.EQ.16)
THEN 16679 facwg=comfac*as*aem/xw*2./9.*(th2+uh2+2.*sqm4*sh)/(th*uh)
16681 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 300
16684 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 290
16686 IF(i*j.GT.0.OR.mod(ia+ja,2).EQ.0)
GOTO 290
16687 kchw=(kchg(ia,1)*isign(1,i)+kchg(ja,1)*isign(1,j))/3
16689 IF(mint(43).EQ.4) fckm=vckm((ia+1)/2,(ja+1)/2)
16694 sigh(nchn)=facwg*fckm*wids(24,(5-kchw)/2)
16698 ELSEIF(isub.EQ.17)
THEN 16701 ELSEIF(isub.EQ.18)
THEN 16703 facgg=comfac*faca*aem**2*1./3.*(th2+uh2)/(th*uh)
16705 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 310
16706 ei=kchg(iabs(i),1)/3.
16711 sigh(nchn)=facgg*ei**4
16714 ELSEIF(isub.EQ.19)
THEN 16716 facgz=comfac*faca*aem**2/(xw*(1.-xw))*1./24.*
16717 & (th2+uh2+2.*sqm4*sh)/(th*uh)
16718 facgz=facgz*wids(23,2)
16720 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 320
16721 ei=kchg(iabs(i),1)/3.
16728 sigh(nchn)=facgz*ei**2*(vi**2+ai**2)
16731 ELSEIF(isub.EQ.20)
THEN 16733 facgw=comfac*faca*aem**2/xw*1./6.*
16734 & ((2.*uh-th)/(3.*(sh-sqm4)))**2*(th2+uh2+2.*sqm4*sh)/(th*uh)
16736 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 340
16739 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 330
16741 IF(i*j.GT.0.OR.mod(ia+ja,2).EQ.0)
GOTO 330
16742 kchw=(kchg(ia,1)*isign(1,i)+kchg(ja,1)*isign(1,j))/3
16744 IF(mint(43).EQ.4) fckm=vckm((ia+1)/2,(ja+1)/2)
16749 sigh(nchn)=facgw*fckm*wids(24,(5-kchw)/2)
16754 ELSEIF(isub.LE.30)
THEN 16755 IF(isub.EQ.21)
THEN 16758 ELSEIF(isub.EQ.22)
THEN 16760 faczz=comfac*faca*(aem/(xw*(1.-xw)))**2*1./768.*
16761 & (uh/th+th/uh+2.*(sqm3+sqm4)*sh/(th*uh)-
16762 & sqm3*sqm4*(1./th2+1./uh2))
16763 faczz=faczz*wids(23,1)
16765 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 350
16766 ei=kchg(iabs(i),1)/3.
16773 sigh(nchn)=faczz*(vi**4+6.*vi**2*ai**2+ai**4)
16776 ELSEIF(isub.EQ.23)
THEN 16778 faczw=comfac*faca*(aem/xw)**2*1./6.
16779 faczw=faczw*wids(23,2)
16780 thuh=
max(th*uh-sqm3*sqm4,sh*ckin(3)**2)
16782 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 370
16785 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 360
16787 IF(i*j.GT.0.OR.mod(ia+ja,2).EQ.0)
GOTO 360
16788 kchw=(kchg(ia,1)*isign(1,i)+kchg(ja,1)*isign(1,j))/3
16795 IF(vi+ai.GT.0)
THEN 16804 IF(mint(43).EQ.4) fckm=vckm((ia+1)/2,(ja+1)/2)
16809 sigh(nchn)=faczw*fckm*(1./(sh-sqmw)**2*
16810 & ((9.-8.*xw)/4.*thuh+(8.*xw-6.)/4.*sh*(sqm3+sqm4))+
16811 & (thuh-sh*(sqm3+sqm4))/(2.*(sh-sqmw))*((vj+aj)/th-(vi+ai)/uh)+
16812 & thuh/(16.*(1.-xw))*((vj+aj)**2/th2+(vi+ai)**2/uh2)+
16813 & sh*(sqm3+sqm4)/(8.*(1.-xw))*(vi+ai)*(vj+aj)/(th*uh))*
16814 & wids(24,(5-kchw)/2)
16818 ELSEIF(isub.EQ.24)
THEN 16820 thuh=
max(th*uh-sqm3*sqm4,sh*ckin(3)**2)
16821 fachz=comfac*faca*(aem/(xw*(1.-xw)))**2*1./96.*
16822 & (thuh+2.*sh*sqmz)/(sh-sqmz)**2
16823 fachz=fachz*wids(23,2)*wids(25,2)
16825 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 380
16826 ei=kchg(iabs(i),1)/3.
16833 sigh(nchn)=fachz*(vi**2+ai**2)
16836 ELSEIF(isub.EQ.25)
THEN 16838 facww=comfac*faca*(aem/xw)**2*1./12.
16839 facww=facww*wids(24,1)
16840 thuh=
max(th*uh-sqm3*sqm4,sh*ckin(3)**2)
16842 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 390
16843 ei=kchg(iabs(i),1)/3.
16846 dsigww=thuh/sh2*(3.-(sh-3.*(sqm3+sqm4))/(sh-sqmz)*
16847 & (vi+ai)/(2.*ai*(1.-xw))+(sh/(sh-sqmz))**2*
16848 & (1.-2.*(sqm3+sqm4)/sh+12.*sqm3*sqm4/sh2)*(vi**2+ai**2)/
16849 & (8.*(1.-xw)**2))-2.*sqmz/(sh-sqmz)*(vi+ai)/ai+
16850 & sqmz*sh/(sh-sqmz)**2*(1.-2.*(sqm3+sqm4)/sh)*(vi**2+ai**2)/
16852 IF(kchg(iabs(i),1).LT.0)
THEN 16853 dsigww=dsigww+2.*(1.+sqmz/(sh-sqmz)*(vi+ai)/(2.*ai))*
16854 & (thuh/(sh*th)-(sqm3+sqm4)/th)+thuh/th2
16856 dsigww=dsigww+2.*(1.+sqmz/(sh-sqmz)*(vi+ai)/(2.*ai))*
16857 & (thuh/(sh*uh)-(sqm3+sqm4)/uh)+thuh/uh2
16863 sigh(nchn)=facww*dsigww
16866 ELSEIF(isub.EQ.26)
THEN 16868 thuh=
max(th*uh-sqm3*sqm4,sh*ckin(3)**2)
16869 fachw=comfac*faca*(aem/xw)**2*1./24.*(thuh+2.*sh*sqmw)/
16871 fachw=fachw*wids(25,2)
16873 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 410
16876 IF(j.EQ.0.OR.kfac(1,j).EQ.0)
GOTO 400
16878 IF(i*j.GT.0.OR.mod(ia+ja,2).EQ.0)
GOTO 400
16879 kchw=(kchg(ia,1)*isign(1,i)+kchg(ja,1)*isign(1,j))/3
16881 IF(mint(43).EQ.4) fckm=vckm((ia+1)/2,(ja+1)/2)
16886 sigh(nchn)=fachw*fckm*wids(24,(5-kchw)/2)
16890 ELSEIF(isub.EQ.27)
THEN 16893 ELSEIF(isub.EQ.28)
THEN 16895 facqg1=comfac*as**2*4./9.*((2.+mstp(34)*1./4.)*uh2/th2-uh/sh)*
16897 facqg2=comfac*as**2*4./9.*((2.+mstp(34)*1./4.)*sh2/th2-sh/uh)
16899 IF(i.EQ.0)
GOTO 430
16901 IF(isde.EQ.1.AND.kfac(1,i)*kfac(2,21).EQ.0)
GOTO 420
16902 IF(isde.EQ.2.AND.kfac(1,21)*kfac(2,i).EQ.0)
GOTO 420
16905 isig(nchn,3-isde)=21
16910 isig(nchn,3-isde)=21
16916 ELSEIF(isub.EQ.29)
THEN 16918 fgq=comfac*faca*as*aem*1./3.*(sh2+uh2)/(-sh*uh)
16920 IF(i.EQ.0)
GOTO 450
16921 ei=kchg(iabs(i),1)/3.
16924 IF(isde.EQ.1.AND.kfac(1,i)*kfac(2,21).EQ.0)
GOTO 440
16925 IF(isde.EQ.2.AND.kfac(1,21)*kfac(2,i).EQ.0)
GOTO 440
16928 isig(nchn,3-isde)=21
16934 ELSEIF(isub.EQ.30)
THEN 16936 fzq=comfac*faca*as*aem/(xw*(1.-xw))*1./48.*
16937 & (sh2+uh2+2.*sqm4*th)/(-sh*uh)
16940 IF(i.EQ.0)
GOTO 470
16941 ei=kchg(iabs(i),1)/3.
16944 faczq=fzq*(vi**2+ai**2)
16946 IF(isde.EQ.1.AND.kfac(1,i)*kfac(2,21).EQ.0)
GOTO 460
16947 IF(isde.EQ.2.AND.kfac(1,21)*kfac(2,i).EQ.0)
GOTO 460
16950 isig(nchn,3-isde)=21
16957 ELSEIF(isub.LE.40)
THEN 16958 IF(isub.EQ.31)
THEN 16960 facwq=comfac*faca*as*aem/xw*1./12.*
16961 & (sh2+uh2+2.*sqm4*th)/(-sh*uh)
16963 IF(i.EQ.0)
GOTO 490
16965 kchw=isign(1,kchg(ia,1)*isign(1,i))
16967 IF(isde.EQ.1.AND.kfac(1,i)*kfac(2,21).EQ.0)
GOTO 480
16968 IF(isde.EQ.2.AND.kfac(1,21)*kfac(2,i).EQ.0)
GOTO 480
16971 isig(nchn,3-isde)=21
16973 sigh(nchn)=facwq*vint(180+i)*wids(24,(5-kchw)/2)
16977 ELSEIF(isub.EQ.32)
THEN 16980 ELSEIF(isub.EQ.33)
THEN 16983 ELSEIF(isub.EQ.34)
THEN 16986 ELSEIF(isub.EQ.35)
THEN 16989 ELSEIF(isub.EQ.36)
THEN 16992 ELSEIF(isub.EQ.37)
THEN 16995 ELSEIF(isub.EQ.38)
THEN 16998 ELSEIF(isub.EQ.39)
THEN 17001 ELSEIF(isub.EQ.40)
THEN 17005 ELSEIF(isub.LE.50)
THEN 17006 IF(isub.EQ.41)
THEN 17009 ELSEIF(isub.EQ.42)
THEN 17012 ELSEIF(isub.EQ.43)
THEN 17015 ELSEIF(isub.EQ.44)
THEN 17018 ELSEIF(isub.EQ.45)
THEN 17021 ELSEIF(isub.EQ.46)
THEN 17024 ELSEIF(isub.EQ.47)
THEN 17027 ELSEIF(isub.EQ.48)
THEN 17030 ELSEIF(isub.EQ.49)
THEN 17033 ELSEIF(isub.EQ.50)
THEN 17037 ELSEIF(isub.LE.60)
THEN 17038 IF(isub.EQ.51)
THEN 17041 ELSEIF(isub.EQ.52)
THEN 17044 ELSEIF(isub.EQ.53)
THEN 17046 CALL pywidt(21,sqrt(sh),wdtp,wdte)
17047 facqq1=comfac*as**2*1./6.*(uh/th-(2.+mstp(34)*1./4.)*uh2/sh2)*
17048 & (wdte(0,1)+wdte(0,2)+wdte(0,3)+wdte(0,4))*faca
17049 facqq2=comfac*as**2*1./6.*(th/uh-(2.+mstp(34)*1./4.)*th2/sh2)*
17050 & (wdte(0,1)+wdte(0,2)+wdte(0,3)+wdte(0,4))*faca
17051 IF(kfac(1,21)*kfac(2,21).EQ.0)
GOTO 500
17064 ELSEIF(isub.EQ.54)
THEN 17067 ELSEIF(isub.EQ.55)
THEN 17070 ELSEIF(isub.EQ.56)
THEN 17073 ELSEIF(isub.EQ.57)
THEN 17076 ELSEIF(isub.EQ.58)
THEN 17079 ELSEIF(isub.EQ.59)
THEN 17082 ELSEIF(isub.EQ.60)
THEN 17086 ELSEIF(isub.LE.70)
THEN 17087 IF(isub.EQ.61)
THEN 17090 ELSEIF(isub.EQ.62)
THEN 17093 ELSEIF(isub.EQ.63)
THEN 17096 ELSEIF(isub.EQ.64)
THEN 17099 ELSEIF(isub.EQ.65)
THEN 17102 ELSEIF(isub.EQ.66)
THEN 17105 ELSEIF(isub.EQ.67)
THEN 17108 ELSEIF(isub.EQ.68)
THEN 17110 facgg1=comfac*as**2*9./4.*(sh2/th2+2.*sh/th+3.+2.*th/sh+
17112 facgg2=comfac*as**2*9./4.*(uh2/sh2+2.*uh/sh+3.+2.*sh/uh+
17114 facgg3=comfac*as**2*9./4.*(th2/uh2+2.*th/uh+3+2.*uh/th+uh2/th2)
17115 IF(kfac(1,21)*kfac(2,21).EQ.0)
GOTO 510
17120 sigh(nchn)=0.5*facgg1
17125 sigh(nchn)=0.5*facgg2
17130 sigh(nchn)=0.5*facgg3
17133 ELSEIF(isub.EQ.69)
THEN 17136 ELSEIF(isub.EQ.70)
THEN 17140 ELSEIF(isub.LE.80)
THEN 17141 IF(isub.EQ.71)
THEN 17144 th=-0.5*sh*be2*(1.-cth)
17145 uh=-0.5*sh*be2*(1.+cth)
17146 shang=1./(1.-xw)*sqmw/sqmz*(1.+be2)**2
17147 ashre=(sh-sqmh)/((sh-sqmh)**2+gmmh**2)*shang
17148 ashim=-gmmh/((sh-sqmh)**2+gmmh**2)*shang
17149 thang=1./(1.-xw)*sqmw/sqmz*(be2-cth)**2
17150 athre=(th-sqmh)/((th-sqmh)**2+gmmh**2)*thang
17151 athim=-gmmh/((th-sqmh)**2+gmmh**2)*thang
17152 uhang=1./(1.-xw)*sqmw/sqmz*(be2+cth)**2
17153 auhre=(uh-sqmh)/((uh-sqmh)**2+gmmh**2)*uhang
17154 auhim=-gmmh/((uh-sqmh)**2+gmmh**2)*uhang
17155 fach=0.5*comfac*1./(4096.*paru(1)**2*16.*(1.-xw)**2)*
17156 & (aem/xw)**4*(sh/sqmw)**2*((ashre+athre+auhre)**2+
17157 & (ashim+athim+auhim)**2)*sqmz/sqmw
17159 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 530
17160 ei=kchg(iabs(i),1)/3.
17165 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 520
17166 ej=kchg(iabs(j),1)/3.
17174 sigh(nchn)=fach*avi*avj
17178 ELSEIF(isub.EQ.72)
THEN 17180 be2=sqrt((1.-4.*sqmw/sh)*(1.-4.*sqmz/sh))
17182 th=-0.5*sh*(1.-2.*(sqmw+sqmz)/sh-be2*cth)
17183 uh=-0.5*sh*(1.-2.*(sqmw+sqmz)/sh+be2*cth)
17184 shang=4.*sqrt(sqmw/(sqmz*(1.-xw)))*(1.-2.*sqmw/sh)*
17186 ashre=(sh-sqmh)/((sh-sqmh)**2+gmmh**2)*shang
17187 ashim=-gmmh/((sh-sqmh)**2+gmmh**2)*shang
17188 atwre=(1.-xw)/sqmz*sh/(th-sqmw)*((cth-be2)**2*(3./2.+be2/2.*cth-
17204 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 550
17205 ei=kchg(iabs(i),1)/3.
17210 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 540
17211 ej=kchg(iabs(j),1)/3.
17219 sigh(nchn)=fach*avi*avj
17223 ELSEIF(isub.EQ.73)
THEN 17225 be2=1.-2.*(sqmz+sqmw)/sh+((sqmz-sqmw)/sh)**2
17226 ep1=1.+(sqmz-sqmw)/sh
17227 ep2=1.-(sqmz-sqmw)/sh
17228 th=-0.5*sh*be2*(1.-cth)
17229 uh=(sqmz-sqmw)**2/sh-0.5*sh*be2*(1.+cth)
17230 thang=sqrt(sqmw/(sqmz*(1.-xw)))*(be2-ep1*cth)*(be2-ep2*cth)
17231 athre=(th-sqmh)/((th-sqmh)**2+gmmh**2)*thang
17232 athim=-gmmh/((th-sqmh)**2+gmmh**2)*thang
17233 aswre=(1.-xw)/sqmz*sh/(sh-sqmw)*(-be2*(ep1+ep2)**4*cth+
17234 & 1./4.*(be2+ep1*ep2)**2*((ep1-ep2)**2-4.*be2*cth)+
17235 & 2.*be2*(be2+ep1*ep2)*(ep1+ep2)**2*cth-
17236 & 1./16.*sh/sqmw*(ep1**2-ep2**2)**2*(be2+ep1*ep2)**2)
17238 auwre=(1.-xw)/sqmz*sh/(uh-sqmw)*(-be2*(ep2+ep1*cth)*
17239 & (ep1+ep2*cth)*(be2+ep1*ep2)+be2*(ep2+ep1*cth)*
17240 & (be2+ep1*ep2*cth)*(2.*ep2-ep2*cth+ep1)-be2*(ep2+ep1*cth)**2*
17241 & (be2-ep2**2*cth)-1./8.*(be2+ep1*ep2*cth)**2*((ep1+ep2)**2+
17242 & 2.*be2*(1.-cth))+1./32.*sh/sqmw*(be2+ep1*ep2*cth)**2*
17243 & (ep1**2-ep2**2)**2-be2*(ep1+ep2*cth)*(ep2+ep1*cth)*
17244 & (be2+ep1*ep2)+be2*(ep1+ep2*cth)*(be2+ep1*ep2*cth)*
17245 & (2.*ep1-ep1*cth+ep2)-be2*(ep1+ep2*cth)**2*(be2-ep1**2*cth)-
17246 & 1./8.*(be2+ep1*ep2*cth)**2*((ep1+ep2)**2+2.*be2*(1.-cth))+
17247 & 1./32.*sh/sqmw*(be2+ep1*ep2*cth)**2*(ep1**2-ep2**2)**2)
17249 a4re=(1.-xw)/sqmz*(ep1**2*ep2**2*(cth**2-1.)-
17250 & 2.*be2*(ep1**2+ep2**2+ep1*ep2)*cth-2.*be2*ep1*ep2)
17252 fach=comfac*1./(4096.*paru(1)**2*4.*(1.-xw))*(aem/xw)**4*
17253 & (sh/sqmw)**2*((athre+aswre+auwre+a4re)**2+
17254 & (athim+aswim+auwim+a4im)**2)*sqrt(sqmz/sqmw)
17256 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 570
17257 ei=kchg(iabs(i),1)/3.
17262 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 560
17263 ej=kchg(iabs(j),1)/3.
17271 sigh(nchn)=fach*(avi*vint(180+j)+vint(180+i)*avj)
17275 ELSEIF(isub.EQ.75)
THEN 17278 ELSEIF(isub.EQ.76)
THEN 17280 be2=sqrt((1.-4.*sqmw/sh)*(1.-4.*sqmz/sh))
17282 th=-0.5*sh*(1.-2.*(sqmw+sqmz)/sh-be2*cth)
17283 uh=-0.5*sh*(1.-2.*(sqmw+sqmz)/sh+be2*cth)
17284 shang=4.*sqrt(sqmw/(sqmz*(1.-xw)))*(1.-2.*sqmw/sh)*
17286 ashre=(sh-sqmh)/((sh-sqmh)**2+gmmh**2)*shang
17287 ashim=-gmmh/((sh-sqmh)**2+gmmh**2)*shang
17288 atwre=(1.-xw)/sqmz*sh/(th-sqmw)*((cth-be2)**2*(3./2.+be2/2.*cth-
17303 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 590
17304 ei=sign(1.,float(i))*kchg(iabs(i),1)
17306 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 580
17307 ej=sign(1.,float(j))*kchg(iabs(j),1)
17308 IF(ei*ej.GT.0.)
GOTO 580
17313 sigh(nchn)=fach*vint(180+i)*vint(180+j)
17317 ELSEIF(isub.EQ.77)
THEN 17323 th=-0.5*sh*be2*(1.-cth)
17324 uh=-0.5*sh*be2*(1.+cth)
17326 ashre=(sh-sqmh)/((sh-sqmh)**2+gmmh**2)*shang
17327 ashim=-gmmh/((sh-sqmh)**2+gmmh**2)*shang
17329 athre=(th-sqmh)/((th-sqmh)**2+gmmh**2)*thang
17330 athim=-gmmh/((th-sqmh)**2+gmmh**2)*thang
17331 sgzang=1./sqmw*be2*(3.-be2)**2*cth
17334 aszre=(1.-xw)*sh/(sh-sqmz)*sgzang
17336 tgzang=1./sqmw*(be2*(4.-2.*be2+be4)+be2*(4.-10.*be2+be4)*cth+
17337 & (2.-11.*be2+10.*be4)*cth2+be2*cth3)
17338 atgre=0.5*xw*sh/th*tgzang
17340 atzre=0.5*(1.-xw)*sh/(th-sqmz)*tgzang
17342 a4re=1./sqmw*(1.+2.*be2-6.*be2*cth-cth2)
17344 fach=comfac*1./(4096.*paru(1)**2)*(aem/xw)**4*(sh/sqmw)**2*
17345 & ((ashre+athre+asgre+aszre+atgre+atzre+a4re)**2+
17346 & (ashim+athim+asgim+aszim+atgim+atzim+a4im)**2)
17348 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 610
17349 ei=sign(1.,float(i))*kchg(iabs(i),1)
17351 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 600
17352 ej=sign(1.,float(j))*kchg(iabs(j),1)
17353 IF(ei*ej.GT.0.)
GOTO 600
17358 sigh(nchn)=fach*vint(180+i)*vint(180+j)
17362 ELSEIF(isub.EQ.78)
THEN 17365 ELSEIF(isub.EQ.79)
THEN 17372 ELSEIF(isub.LE.90)
THEN 17373 IF(isub.EQ.81)
THEN 17375 facqqb=comfac*as**2*4./9.*(((th-sqm3)**2+
17376 & (uh-sqm3)**2)/sh2+2.*sqm3/sh)
17377 IF(mstp(35).GE.1)
THEN 17378 IF(mstp(35).EQ.1)
THEN 17383 q2bn=sqrt(sqm3*((sqrt(sh)-2.*sqrt(sqm3))**2+parp(36)**2))
17387 xrepu=paru(1)*alssg/(6.*sqrt(
max(1
e-20,1.-4.*sqm3/sh)))
17388 frepu=xrepu/(exp(
min(100.,xrepu))-1.)
17390 facqqb=facqqb*frepu
17393 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 620
17401 ELSEIF(isub.EQ.82)
THEN 17403 facqq1=comfac*faca*as**2*1./6.*((uh-sqm3)/(th-sqm3)-
17404 & 2.*(uh-sqm3)**2/sh2+4.*sqm3/sh*(th*uh-sqm3**2)/(th-sqm3)**2)
17405 facqq2=comfac*faca*as**2*1./6.*((th-sqm3)/(uh-sqm3)-
17406 & 2.*(th-sqm3)**2/sh2+4.*sqm3/sh*(th*uh-sqm3**2)/(uh-sqm3)**2)
17407 IF(mstp(35).GE.1)
THEN 17408 IF(mstp(35).EQ.1)
THEN 17413 q2bn=sqrt(sqm3*((sqrt(sh)-2.*sqrt(sqm3))**2+parp(36)**2))
17417 xattr=4.*paru(1)*alssg/(3.*sqrt(
max(1
e-20,1.-4.*sqm3/sh)))
17418 fattr=xattr/(1.-exp(-
min(100.,xattr)))
17419 xrepu=paru(1)*alssg/(6.*sqrt(
max(1
e-20,1.-4.*sqm3/sh)))
17420 frepu=xrepu/(exp(
min(100.,xrepu))-1.)
17421 fatre=(2.*fattr+5.*frepu)/7.
17423 facqq1=facqq1*fatre
17424 facqq2=facqq2*fatre
17426 IF(kfac(1,21)*kfac(2,21).EQ.0)
GOTO 630
17443 ELSEIF(isub.LE.100)
THEN 17444 IF(isub.EQ.91)
THEN 17448 ELSEIF(isub.EQ.92)
THEN 17452 ELSEIF(isub.EQ.93)
THEN 17456 ELSEIF(isub.EQ.94)
THEN 17460 ELSEIF(isub.EQ.95)
THEN 17464 ELSEIF(isub.EQ.96)
THEN 17466 CALL pywidt(21,sqrt(sh),wdtp,wdte)
17469 facqq1=comfac*as**2*4./9.*(sh2+uh2)/th2
17470 facqqb=comfac*as**2*4./9.*((sh2+uh2)/th2*faca-
17471 & mstp(34)*2./3.*uh2/(sh*th))
17472 facqq2=comfac*as**2*4./9.*((sh2+th2)/uh2-
17473 & mstp(34)*2./3.*sh2/(th*uh))
17475 IF(i.EQ.0)
GOTO 650
17477 IF(j.EQ.0)
GOTO 640
17483 IF(i.EQ.-j) sigh(nchn)=facqqb
17485 sigh(nchn)=0.5*sigh(nchn)
17490 sigh(nchn)=0.5*facqq2
17496 facqqb=comfac*as**2*4./9.*(th2+uh2)/sh2*(wdte(0,1)+wdte(0,2)+
17497 & wdte(0,3)+wdte(0,4))
17498 facgg1=comfac*as**2*32./27.*(uh/th-(2.+mstp(34)*1./4.)*uh2/sh2)
17499 facgg2=comfac*as**2*32./27.*(th/uh-(2.+mstp(34)*1./4.)*th2/sh2)
17501 IF(i.EQ.0)
GOTO 660
17511 sigh(nchn)=0.5*facgg1
17516 sigh(nchn)=0.5*facgg2
17520 facqg1=comfac*as**2*4./9.*((2.+mstp(34)*1./4.)*uh2/th2-uh/sh)*
17522 facqg2=comfac*as**2*4./9.*((2.+mstp(34)*1./4.)*sh2/th2-sh/uh)
17524 IF(i.EQ.0)
GOTO 680
17528 isig(nchn,3-isde)=21
17533 isig(nchn,3-isde)=21
17540 facqq1=comfac*as**2*1./6.*(uh/th-(2.+mstp(34)*1./4.)*uh2/sh2)*
17541 & (wdte(0,1)+wdte(0,2)+wdte(0,3)+wdte(0,4))*faca
17542 facqq2=comfac*as**2*1./6.*(th/uh-(2.+mstp(34)*1./4.)*th2/sh2)*
17543 & (wdte(0,1)+wdte(0,2)+wdte(0,3)+wdte(0,4))*faca
17544 facgg1=comfac*as**2*9./4.*(sh2/th2+2.*sh/th+3.+2.*th/sh+
17546 facgg2=comfac*as**2*9./4.*(uh2/sh2+2.*uh/sh+3.+2.*sh/uh+
17548 facgg3=comfac*as**2*9./4.*(th2/uh2+2.*th/uh+3+2.*uh/th+uh2/th2)
17563 sigh(nchn)=0.5*facgg1
17568 sigh(nchn)=0.5*facgg2
17573 sigh(nchn)=0.5*facgg3
17578 ELSEIF(isub.LE.110)
THEN 17579 IF(isub.EQ.101)
THEN 17582 ELSEIF(isub.EQ.102)
THEN 17584 CALL pywidt(25,sqrt(sh),wdtp,wdte)
17587 DO 690 i=1,2*mstp(1)
17588 eps=4.*pmas(i,1)**2/sh
17590 IF(
eps.GT.1.
e-4)
THEN 17592 rln=log((1.+root)/(1.-root))
17596 phire=0.25*(rln**2-paru(1)**2)
17597 phiim=0.5*paru(1)*rln
17599 phire=-(asin(1./sqrt(
eps)))**2
17602 etare=etare+0.5*
eps*(1.+(
eps-1.)*phire)
17603 etaim=etaim+0.5*
eps*(
eps-1.)*phiim
17605 eta2=etare**2+etaim**2
17606 fach=comfac*faca*(as/paru(1)*aem/xw)**2*1./512.*
17607 & (sh/sqmw)**2*eta2*sh2/((sh-sqmh)**2+gmmh**2)*
17608 & (wdte(0,1)+wdte(0,2)+wdte(0,4))
17609 IF(kfac(1,21)*kfac(2,21).EQ.0)
GOTO 700
17621 ELSEIF(isub.LE.120)
THEN 17622 IF(isub.EQ.111)
THEN 17626 DO 710 i=1,2*mstp(1)
17630 a5stur=a5stur+sqmq/sqmh*(4.+4.*sh/(th+uh)*(
pyw1au(epss,1)-
17631 &
pyw1au(epsh,1))+(1.-4.*sqmq/(th+uh))*(
pyw2au(epss,1)-
17633 a5stui=a5stui+sqmq/sqmh*(4.*sh/(th+uh)*(
pyw1au(epss,2)-
17634 &
pyw1au(epsh,2))+(1.-4.*sqmq/(th+uh))*(
pyw2au(epss,2)-
17637 facgh=comfac*faca/(144.*paru(1)**2)*aem/xw*as**3*sqmh/sqmw*
17638 & sqmh/sh*(uh**2+th**2)/(uh+th)**2*(a5stur**2+a5stui**2)
17639 facgh=facgh*wids(25,2)
17641 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 720
17649 ELSEIF(isub.EQ.112)
THEN 17653 DO 730 i=1,2*mstp(1)
17657 a5tsur=a5tsur+sqmq/sqmh*(4.+4.*th/(sh+uh)*(
pyw1au(epst,1)-
17658 &
pyw1au(epsh,1))+(1.-4.*sqmq/(sh+uh))*(
pyw2au(epst,1)-
17660 a5tsui=a5tsui+sqmq/sqmh*(4.*th/(sh+uh)*(
pyw1au(epst,2)-
17661 &
pyw1au(epsh,2))+(1.-4.*sqmq/(sh+uh))*(
pyw2au(epst,2)-
17664 facqh=comfac*faca/(384.*paru(1)**2)*aem/xw*as**3*sqmh/sqmw*
17665 & sqmh/(-th)*(uh**2+sh**2)/(uh+sh)**2*(a5tsur**2+a5tsui**2)
17666 facqh=facqh*wids(25,2)
17668 IF(i.EQ.0)
GOTO 750
17670 IF(isde.EQ.1.AND.kfac(1,i)*kfac(2,21).EQ.0)
GOTO 740
17671 IF(isde.EQ.2.AND.kfac(1,21)*kfac(2,i).EQ.0)
GOTO 740
17674 isig(nchn,3-isde)=21
17680 ELSEIF(isub.EQ.113)
THEN 17690 DO 760 i=6,2*mstp(1)
17697 IF(epsh.LT.1.
e-6)
GOTO 760
17698 bestu=0.5*(1.+sqrt(1.+epss*th/uh))
17699 beust=0.5*(1.+sqrt(1.+epsu*sh/th))
17700 betus=0.5*(1.+sqrt(1.+epst*uh/sh))
17728 b2stur=sqmq/sqmh**2*(sh*(uh-sh)/(sh+uh)+2.*th*uh*(uh+2.*sh)/
17729 & (sh+uh)**2*(
pyw1au(epst,1)-
pyw1au(epsh,1))+(sqmq-sh/4.)*
17731 & sh**2*(2.*sqmq/(sh+uh)**2-0.5/(sh+uh))*(
pyw2au(epst,1)-
17821 facgh=comfac*faca*3./(128.*paru(1)**2)*aem/xw*as**3*
17822 & sqmh/sqmw*sqmh**3/(sh*th*uh)*(a2stur**2+a2stui**2+a2ustr**2+
17823 & a2usti**2+a2tusr**2+a2tusi**2+a4stur**2+a4stui**2)
17824 facgh=facgh*wids(25,2)
17825 IF(kfac(1,21)*kfac(2,21).EQ.0)
GOTO 770
17833 ELSEIF(isub.EQ.114)
THEN 17837 DO 780 i=1,2*mstp(1)
17838 ei=kchg(iabs(i),1)/3.
17843 IF(epss+abs(epst)+abs(epsu).LT.3.
e-6)
THEN 17844 a0stur=1.+(th-uh)/sh*log(th/uh)+0.5*(th2+uh2)/sh2*
17845 & (log(th/uh)**2+paru(1)**2)
17847 a0tsur=1.+(sh-uh)/th*log(-sh/uh)+0.5*(sh2+uh2)/th2*
17849 a0tsui=-paru(1)*((sh-uh)/th+(sh2+uh2)/th2*log(-sh/uh))
17850 a0utsr=1.+(th-sh)/uh*log(-th/sh)+0.5*(th2+sh2)/uh2*
17852 a0utsi=paru(1)*((th-sh)/uh+(th2+sh2)/uh2*log(-th/sh))
17858 bestu=0.5*(1.+sqrt(1.+epss*th/uh))
17859 beust=0.5*(1.+sqrt(1.+epsu*sh/th))
17860 betus=0.5*(1.+sqrt(1.+epst*uh/sh))
17864 a0stur=1.+(1.+2.*th/sh)*
pyw1au(epst,1)+(1.+2.*uh/sh)*
17865 &
pyw1au(epsu,1)+0.5*((th2+uh2)/sh2-epss)*(
pyw2au(epst,1)+
17866 &
pyw2au(epsu,1))-0.25*epst*(1.-0.5*epss)*(
pyi3au(besut,epss,1)+
17927 asre=asre+ei**2*(a0stur+a0tsur+a0utsr+4.*a1stur+a2stur)
17928 asim=asim+ei**2*(a0stui+a0tsui+a0utsi+4.*a1stui+a2stui)
17930 facgg=comfac*faca/(8.*paru(1)**2)*as**2*aem**2*(asre**2+asim**2)
17931 IF(kfac(1,21)*kfac(2,21).EQ.0)
GOTO 790
17939 ELSEIF(isub.EQ.115)
THEN 17942 ELSEIF(isub.EQ.116)
THEN 17945 ELSEIF(isub.EQ.117)
THEN 17952 ELSEIF(isub.LE.140)
THEN 17953 IF(isub.EQ.121)
THEN 17960 ELSEIF(isub.LE.160)
THEN 17961 IF(isub.EQ.141)
THEN 17964 CALL pywidt(32,sqrt(sh),wdtp,wdte)
17965 faczp=comfac*aem**2*4./9.
17967 IF(i.EQ.0.OR.kfac(1,i)*kfac(2,-i).EQ.0)
GOTO 800
17968 ei=kchg(iabs(i),1)/3.
17977 sigh(nchn)=faczp*(ei**2*vint(111)+ei*vi/(8.*xw*(1.-xw))*
17978 & sh*(sh-sqmz)/((sh-sqmz)**2+gmmz**2)*vint(112)+ei*vpi/(8.*xw*
17979 & (1.-xw))*sh*(sh-sqmzp)/((sh-sqmzp)**2+gmmzp**2)*vint(113)+
17980 & (vi**2+ai**2)/(16.*xw*(1.-xw))**2*sh2/((sh-sqmz)**2+gmmz**2)*
17981 & vint(114)+2.*(vi*vpi+ai*api)/(16.*xw*(1.-xw))**2*sh2*
17982 & ((sh-sqmz)*(sh-sqmzp)+gmmz*gmmzp)/(((sh-sqmz)**2+gmmz**2)*
17983 & ((sh-sqmzp)**2+gmmzp**2))*vint(115)+(vpi**2+api**2)/
17984 & (16.*xw*(1.-xw))**2*sh2/((sh-sqmzp)**2+gmmzp**2)*vint(116))
17987 ELSEIF(isub.EQ.142)
THEN 17989 CALL pywidt(37,sqrt(sh),wdtp,wdte)
17990 fhc=comfac*(aem/xw)**2*1./48.*(sh/sqmw)**2*sh2/
17991 & ((sh-sqmhc)**2+gmmhc**2)
17993 DO 840 i=1,mstp(54)/2
17996 rmql=pmas(il,1)**2/sh
17997 rmqu=pmas(iu,1)**2/sh
17998 fachc=fhc*((rmql*paru(121)+rmqu/paru(121))*(1.-rmql-rmqu)-
17999 & 4.*rmql*rmqu)/sqrt(
max(0.,(1.-rmql-rmqu)**2-4.*rmql*rmqu))
18000 IF(kfac(1,il)*kfac(2,-iu).EQ.0)
GOTO 810
18001 kchhc=(kchg(il,1)-kchg(iu,1))/3
18006 sigh(nchn)=fachc*(wdte(0,1)+wdte(0,(5-kchhc)/2)+wdte(0,4))
18007 810
IF(kfac(1,-il)*kfac(2,iu).EQ.0)
GOTO 820
18008 kchhc=(-kchg(il,1)+kchg(iu,1))/3
18013 sigh(nchn)=fachc*(wdte(0,1)+wdte(0,(5-kchhc)/2)+wdte(0,4))
18014 820
IF(kfac(1,iu)*kfac(2,-il).EQ.0)
GOTO 830
18015 kchhc=(kchg(iu,1)-kchg(il,1))/3
18020 sigh(nchn)=fachc*(wdte(0,1)+wdte(0,(5-kchhc)/2)+wdte(0,4))
18021 830
IF(kfac(1,-iu)*kfac(2,il).EQ.0)
GOTO 840
18022 kchhc=(-kchg(iu,1)+kchg(il,1))/3
18027 sigh(nchn)=fachc*(wdte(0,1)+wdte(0,(5-kchhc)/2)+wdte(0,4))
18030 ELSEIF(isub.EQ.143)
THEN 18032 CALL pywidt(40,sqrt(sh),wdtp,wdte)
18033 facr=comfac*(aem/xw)**2*1./9.*sh2/((sh-sqmr)**2+gmmr**2)
18035 IF(i.EQ.0.OR.kfac(1,i).EQ.0)
GOTO 860
18038 IF(j.EQ.0.OR.kfac(2,j).EQ.0)
GOTO 850
18040 IF(i*j.GT.0.OR.iabs(ia-ja).NE.2)
GOTO 850
18045 sigh(nchn)=facr*(wdte(0,1)+wdte(0,(10-(i+j))/4)+wdte(0,4))
18054 IF(isub.EQ.161)
THEN 18056 fhcq=comfac*faca*as*aem/xw*1./24
18057 DO 900 i=1,mstp(54)
18060 fachcq=fhcq/paru(121)*sqmq/sqmw*(sh/(sqmq-uh)+
18061 & 2.*sqmq*(sqmhc-uh)/(sqmq-uh)**2+(sqmq-uh)/sh+
18062 & 2.*sqmq/(sqmq-uh)+2.*(sqmhc-uh)/(sqmq-uh)*(sqmhc-sqmq-sh)/sh)
18063 IF(kfac(1,-i)*kfac(2,21).EQ.0)
GOTO 870
18064 kchhc=isign(1,-kchg(i,1))
18069 sigh(nchn)=fachcq*(wdte(0,1)+wdte(0,(5-kchhc)/2)+wdte(0,4))
18070 870
IF(kfac(1,i)*kfac(2,21).EQ.0)
GOTO 880
18071 kchhc=isign(1,kchg(i,1))
18076 sigh(nchn)=fachcq*(wdte(0,1)+wdte(0,(5-kchhc)/2)+wdte(0,4))
18077 880
IF(kfac(1,21)*kfac(2,-i).EQ.0)
GOTO 890
18078 kchhc=isign(1,-kchg(i,1))
18083 sigh(nchn)=fachcq*(wdte(0,1)+wdte(0,(5-kchhc)/2)+wdte(0,4))
18084 890
IF(kfac(1,21)*kfac(2,i).EQ.0)
GOTO 900
18085 kchhc=isign(1,kchg(i,1))
18090 sigh(nchn)=fachcq*(wdte(0,1)+wdte(0,(5-kchhc)/2)+wdte(0,4))
18097 IF(isub.LE.90.OR.isub.GE.96)
THEN 18099 IF(mint(41).EQ.2)
THEN 18101 IF(kfl1.EQ.21) kfl1=0
18102 sigh(ichn)=sigh(ichn)*xsfx(1,kfl1)
18104 IF(mint(42).EQ.2)
THEN 18106 IF(kfl2.EQ.21) kfl2=0
18107 sigh(ichn)=sigh(ichn)*xsfx(2,kfl2)
18109 910 sigs=sigs+sigh(ichn)
18117 SUBROUTINE pystfu(KF,X,Q2,XPQ,JBT)
18123 common/hiparnt/hipr1(100),ihpr2(50),hint1(100),ihnt2(50)
18125 common/hijcrdn/yp(3,300),yt(3,300)
18128 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
18130 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
18132 common/pypars/mstp(200),parp(200),msti(200),pari(200)
18134 common/pyint1/mint(400),vint(400)
18136 dimension xpq(-6:6),xq(6),tx(6),tt(6),ts(6),nehlq(8,2),
18137 &cehlq(6,6,2,8,2),cdo(3,6,5,2),cow(3,5,4,2)
18143 DATA nehlq/3,4,7,5,7,7,7,7,3,4,7,6,7,7,7,7/
18145 DATA (((cehlq(ix,it,nx,1,1),ix=1,6),it=1,6),nx=1,2)/
18146 1 7.677
e-01,-2.087
e-01,-3.303
e-01,-2.517
e-02,-1.570
e-02,-1.000
e-04,
18158 DATA (((cehlq(ix,it,nx,1,2),ix=1,6),it=1,6),nx=1,2)/
18159 1 7.237
e-01,-2.189
e-01,-2.995
e-01,-1.909
e-02,-1.477
e-02, 2.500
e-04,
18172 DATA (((cehlq(ix,it,nx,2,1),ix=1,6),it=1,6),nx=1,2)/
18173 1 3.813
e-01,-8.090
e-02,-1.634
e-01,-2.185
e-02,-8.430
e-03,-6.200
e-04,
18185 DATA (((cehlq(ix,it,nx,2,2),ix=1,6),it=1,6),nx=1,2)/
18186 1 3.578
e-01,-8.622
e-02,-1.480
e-01,-1.840
e-02,-7.820
e-03,-4.500
e-04,
18199 DATA (((cehlq(ix,it,nx,3,1),ix=1,6),it=1,6),nx=1,2)/
18200 1 6.870
e-02,-6.861
e-02, 2.973
e-02,-5.400
e-03, 3.780
e-03,-9.700
e-04,
18212 DATA (((cehlq(ix,it,nx,3,2),ix=1,6),it=1,6),nx=1,2)/
18213 1 1.008
e-01,-7.100
e-02, 1.973
e-02,-5.710
e-03, 2.930
e-03,-9.900
e-04,
18226 DATA (((cehlq(ix,it,nx,4,1),ix=1,6),it=1,6),nx=1,2)/
18227 1 9.482
e-01,-9.578
e-01, 1.009
e-01,-1.051
e-01, 3.456
e-02,-3.054
e-02,
18239 DATA (((cehlq(ix,it,nx,4,2),ix=1,6),it=1,6),nx=1,2)/
18240 1 2.367
e+00, 4.453
e-01, 3.660
e-01, 9.467
e-02, 1.341
e-01, 1.661
e-02,
18253 DATA (((cehlq(ix,it,nx,5,1),ix=1,6),it=1,6),nx=1,2)/
18254 1 4.968
e-02,-4.173
e-02, 2.102
e-02,-3.270
e-03, 3.240
e-03,-6.700
e-04,
18266 DATA (((cehlq(ix,it,nx,5,2),ix=1,6),it=1,6),nx=1,2)/
18267 1 6.478
e-02,-4.537
e-02, 1.643
e-02,-3.490
e-03, 2.710
e-03,-6.700
e-04,
18280 DATA (((cehlq(ix,it,nx,6,1),ix=1,6),it=1,6),nx=1,2)/
18281 1 9.270
e-03,-1.817
e-02, 9.590
e-03,-6.390
e-03, 1.690
e-03,-1.540
e-03,
18293 DATA (((cehlq(ix,it,nx,6,2),ix=1,6),it=1,6),nx=1,2)/
18294 1 9.980
e-03,-1.945
e-02, 1.055
e-02,-6.870
e-03, 1.860
e-03,-1.560
e-03,
18307 DATA (((cehlq(ix,it,nx,7,1),ix=1,6),it=1,6),nx=1,2)/
18308 1 9.010
e-03,-1.401
e-02, 7.150
e-03,-4.130
e-03, 1.260
e-03,-1.040
e-03,
18320 DATA (((cehlq(ix,it,nx,7,2),ix=1,6),it=1,6),nx=1,2)/
18321 1 8.980
e-03,-1.459
e-02, 7.510
e-03,-4.410
e-03, 1.310
e-03,-1.070
e-03,
18334 DATA (((cehlq(ix,it,nx,8,1),ix=1,6),it=1,6),nx=1,2)/
18335 1 4.410
e-03,-7.480
e-03, 3.770
e-03,-2.580
e-03, 7.300
e-04,-7.100
e-04,
18347 DATA (((cehlq(ix,it,nx,8,2),ix=1,6),it=1,6),nx=1,2)/
18348 1 4.260
e-03,-7.530
e-03, 3.830
e-03,-2.680
e-03, 7.600
e-04,-7.300
e-04,
18364 DATA ((cdo(ip,is,1,1),is=1,6),ip=1,3)/
18365 1 4.190
e-01, 3.460
e+00, 4.400
e+00, 0.000
e+00, 0.000
e+00, 0.000
e+00,
18368 DATA ((cdo(ip,is,1,2),is=1,6),ip=1,3)/
18369 1 3.740
e-01, 3.330
e+00, 6.030
e+00, 0.000
e+00, 0.000
e+00, 0.000
e+00,
18373 DATA ((cdo(ip,is,2,1),is=1,6),ip=1,3)/
18374 1 7.630
e-01, 4.000
e+00, 0.000
e+00, 0.000
e+00, 0.000
e+00, 0.000
e+00,
18377 DATA ((cdo(ip,is,2,2),is=1,6),ip=1,3)/
18378 1 7.610
e-01, 3.830
e+00, 0.000
e+00, 0.000
e+00, 0.000
e+00, 0.000
e+00,
18382 DATA ((cdo(ip,is,3,1),is=1,6),ip=1,3)/
18383 1 1.265
e+00, 0.000
e+00, 8.050
e+00, 0.000
e+00, 0.000
e+00, 0.000
e+00,
18386 DATA ((cdo(ip,is,3,2),is=1,6),ip=1,3)/
18387 1 1.670
e+00, 0.000
e+00, 9.150
e+00, 0.000
e+00, 0.000
e+00, 0.000
e+00,
18391 DATA ((cdo(ip,is,4,1),is=1,6),ip=1,3)/
18392 1 0.000
e+00,-3.600
e-02, 6.350
e+00, 0.000
e+00, 0.000
e+00, 0.000
e+00,
18395 DATA ((cdo(ip,is,4,2),is=1,6),ip=1,3)/
18396 1 0.000
e+00,-1.200
e-01, 3.510
e+00, 0.000
e+00, 0.000
e+00, 0.000
e+00,
18400 DATA ((cdo(ip,is,5,1),is=1,6),ip=1,3)/
18401 1 1.560
e+00, 0.000
e+00, 6.000
e+00, 9.000
e+00, 0.000
e+00, 0.000
e+00,
18404 DATA ((cdo(ip,is,5,2),is=1,6),ip=1,3)/
18405 1 8.790
e-01, 0.000
e+00, 4.000
e+00, 9.000
e+00, 0.000
e+00, 0.000
e+00,
18412 DATA ((cow(ip,is,1,1),is=1,5),ip=1,3)/
18413 1 4.0000
e-01, 7.0000
e-01, 0.0000
e+00, 0.0000
e+00, 0.0000
e+00,
18414 2 -6.2120
e-02, 6.4780
e-01, 0.0000
e+00, 0.0000
e+00, 0.0000
e+00,
18415 3 -7.1090
e-03, 1.3350
e-02, 0.0000
e+00, 0.0000
e+00, 0.0000
e+00/
18416 DATA ((cow(ip,is,1,2),is=1,5),ip=1,3)/
18417 1 4.0000
e-01, 6.2800
e-01, 0.0000
e+00, 0.0000
e+00, 0.0000
e+00,
18418 2 -5.9090
e-02, 6.4360
e-01, 0.0000
e+00, 0.0000
e+00, 0.0000
e+00,
18419 3 -6.5240
e-03, 1.4510
e-02, 0.0000
e+00, 0.0000
e+00, 0.0000
e+00/
18421 DATA ((cow(ip,is,2,1),is=1,5),ip=1,3)/
18422 1 8.8800
e-01, 0.0000
e+00, 3.1100
e+00, 6.0000
e+00, 0.0000
e+00,
18423 2 -1.8020
e+00, -1.5760
e+00, -1.3170
e-01, 2.8010
e+00, -1.7280
e+01,
18424 3 1.8120
e+00, 1.2000
e+00, 5.0680
e-01, -1.2160
e+01, 2.0490
e+01/
18425 DATA ((cow(ip,is,2,2),is=1,5),ip=1,3)/
18426 1 7.9400
e-01, 0.0000
e+00, 2.8900
e+00, 6.0000
e+00, 0.0000
e+00,
18427 2 -9.1440
e-01, -1.2370
e+00, 5.9660
e-01, -3.6710
e+00, -8.1910
e+00,
18428 3 5.9660
e-01, 6.5820
e-01, -2.5500
e-01, -2.3040
e+00, 7.7580
e+00/
18430 DATA ((cow(ip,is,3,1),is=1,5),ip=1,3)/
18431 1 9.0000
e-01, 0.0000
e+00, 5.0000
e+00, 0.0000
e+00, 0.0000
e+00,
18432 2 -2.4280
e-01, -2.1200
e-01, 8.6730
e-01, 1.2660
e+00, 2.3820
e+00,
18433 3 1.3860
e-01, 3.6710
e-03, 4.7470
e-02, -2.2150
e+00, 3.4820
e-01/
18434 DATA ((cow(ip,is,3,2),is=1,5),ip=1,3)/
18435 1 9.0000
e-01, 0.0000
e+00, 5.0000
e+00, 0.0000
e+00, 0.0000
e+00,
18436 2 -1.4170
e-01, -1.6970
e-01, -2.4740
e+00, -2.5340
e+00, 5.6210
e-01,
18437 3 -1.7400
e-01, -9.6230
e-02, 1.5750
e+00, 1.3780
e+00, -2.7010
e-01/
18439 DATA ((cow(ip,is,4,1),is=1,5),ip=1,3)/
18440 1 0.0000
e+00, -2.2120
e-02, 2.8940
e+00, 0.0000
e+00, 0.0000
e+00,
18441 2 7.9280
e-02, -3.7850
e-01, 9.4330
e+00, 5.2480
e+00, 8.3880
e+00,
18442 3 -6.1340
e-02, -1.0880
e-01, -1.0852
e+01, -7.1870
e+00, -1.1610
e+01/
18443 DATA ((cow(ip,is,4,2),is=1,5),ip=1,3)/
18444 1 0.0000
e+00, -8.8200
e-02, 1.9240
e+00, 0.0000
e+00, 0.0000
e+00,
18445 2 6.2290
e-02, -2.8920
e-01, 2.4240
e-01, -4.4630
e+00, -8.3670
e-01,
18446 3 -4.0990
e-02, -1.0820
e-01, 2.0360
e+00, 5.2090
e+00, -4.8400
e-02/
18455 IF(
x.LT.0..OR.
x.GT.1.)
THEN 18456 WRITE(mstu(11),1000)
x 18460 IF(kfa.NE.211.AND.kfa.NE.2212.AND.kfa.NE.2112)
THEN 18461 WRITE(mstu(11),1100) kf
18466 IF(mstp(51).EQ.0.OR.mstp(52).GE.2)
THEN 18468 IF(kfa.EQ.2112) kfe=2212
18472 IF(kfa.EQ.211)
GOTO 200
18474 IF(mstp(51).EQ.1.OR.mstp(51).EQ.2)
THEN 18480 IF(nset.EQ.1) alam=0.2
18481 IF(nset.EQ.2) alam=0.29
18482 tmin=log(5./alam**2)
18483 tmax=log(1e8/alam**2)
18484 IF(mstp(52).EQ.0)
THEN 18489 vt=
max(-1.,
min(1.,(2.*t-tmax-tmin)/(tmax-tmin)))
18492 IF(nx.EQ.1) vx=(2.*
x-1.1)/0.9
18493 IF(nx.EQ.2) vx=
max(-1.,(2.*log(
x)+11.51293)/6.90776)
18495 IF(
x.LT.1
e-4.AND.abs(parp(51)-1.).GT.0.01) cxs=
18496 & (1
e-4/
x)**(parp(51)-1.)
18502 tx(4)=4.*vx**3-3.*vx
18503 tx(5)=8.*vx**4-8.*vx**2+1.
18504 tx(6)=16.*vx**5-20.*vx**3+5.*vx
18508 tt(4)=4.*vt**3-3.*vt
18509 tt(5)=8.*vt**4-8.*vt**2+1.
18510 tt(6)=16.*vt**5-20.*vt**3+5.*vt
18517 110 xqsum=xqsum+cehlq(ix,it,nx,kfl,nset)*tx(ix)*tt(it)
18518 120 xq(kfl)=xqsum*(1.-
x)**nehlq(kfl,nset)*cxs
18532 IF(mstp(54).GE.5)
THEN 18533 IF(nset.EQ.1) tmin=8.1905
18534 IF(nset.EQ.2) tmin=7.4474
18535 IF(t.LE.tmin)
GOTO 140
18536 vt=
max(-1.,
min(1.,(2.*t-tmax-tmin)/(tmax-tmin)))
18540 tt(4)=4.*vt**3-3.*vt
18541 tt(5)=8.*vt**4-8.*vt**2+1.
18542 tt(6)=16.*vt**5-20.*vt**3+5.*vt
18546 130 xqsum=xqsum+cehlq(ix,it,nx,7,nset)*tx(ix)*tt(it)
18547 xpq(5)=xqsum*(1.-
x)**nehlq(7,nset)
18553 IF(mstp(54).GE.6)
THEN 18554 IF(nset.EQ.1) tmin=11.5528
18555 IF(nset.EQ.2) tmin=10.8097
18556 tmin=tmin+2.*log(pmas(6,1)/30.)
18557 tmax=tmax+2.*log(pmas(6,1)/30.)
18558 IF(t.LE.tmin)
GOTO 160
18559 vt=
max(-1.,
min(1.,(2.*t-tmax-tmin)/(tmax-tmin)))
18563 tt(4)=4.*vt**3-3.*vt
18564 tt(5)=8.*vt**4-8.*vt**2+1.
18565 tt(6)=16.*vt**5-20.*vt**3+5.*vt
18569 150 xqsum=xqsum+cehlq(ix,it,nx,8,nset)*tx(ix)*tt(it)
18570 xpq(6)=xqsum*(1.-
x)**nehlq(8,nset)
18575 ELSEIF(mstp(51).EQ.3.OR.mstp(51).EQ.4)
THEN 18581 IF(nset.EQ.1) alam=0.2
18582 IF(nset.EQ.2) alam=0.4
18583 IF(mstp(52).LE.0)
THEN 18586 sd=log(log(
max(q2,4.)/alam**2)/log(4./alam**2))
18592 170 ts(is)=cdo(1,is,kfl,nset)+cdo(2,is,kfl,nset)*sd+
18593 & cdo(3,is,kfl,nset)*sd**2
18595 xq(kfl)=
x**ts(1)*(1.-
x)**ts(2)*(1.+ts(3)*
x)/(eulbet(ts(1),
18596 & ts(2)+1.)*(1.+ts(3)*ts(1)/(ts(1)+ts(2)+1.)))
18598 xq(kfl)=ts(1)*
x**ts(2)*(1.-
x)**ts(3)*(1.+ts(4)*
x+ts(5)*
x**2+
18605 xpq(1)=xq(2)+xq(3)/6.
18606 xpq(2)=3.*xq(1)-xq(2)+xq(3)/6.
18617 ELSEIF(mstp(51).GE.11.AND.mstp(51).LE.13)
THEN 18622 WRITE(mstu(11),1200) mstp(51)
18626 200
IF((mstp(51).GE.1.AND.mstp(51).LE.4).OR.
18627 &(mstp(51).GE.11.AND.mstp(51).LE.13))
THEN 18633 IF(mstp(51).EQ.2.OR.mstp(51).EQ.4.OR.mstp(51).EQ.13) nset=2
18634 IF(nset.EQ.1) alam=0.2
18635 IF(nset.EQ.2) alam=0.4
18636 IF(mstp(52).LE.0)
THEN 18639 sd=log(log(
max(q2,4.)/alam**2)/log(4./alam**2))
18645 210 ts(is)=cow(1,is,kfl,nset)+cow(2,is,kfl,nset)*sd+
18646 & cow(3,is,kfl,nset)*sd**2
18648 xq(kfl)=
x**ts(1)*(1.-
x)**ts(2)/eulbet(ts(1),ts(2)+1.)
18650 xq(kfl)=ts(1)*
x**ts(2)*(1.-
x)**ts(3)*(1.+ts(4)*
x+ts(5)*
x**2)
18657 xpq(2)=xq(1)+xq(3)/6.
18660 xpq(-1)=xq(1)+xq(3)/6.
18667 WRITE(mstu(11),1200) mstp(51)
18671 230
IF(kfa.EQ.2112)
THEN 18688 xpq(kfl)=
max(0.,xpq(kfl))
18689 250
IF(iabs(kfl).GT.mstp(54)) xpq(kfl)=0.
18692 IF((jbt.NE.1.AND.jbt.NE.2).OR.ihpr2(6).EQ.0
18693 & .OR.ihnt2(16).EQ.1)
GO TO 400
18694 atnm=ihnt2(2*jbt-1)
18695 IF(atnm.LE.1.0)
GO TO 400
18697 bbr2=(yp(1,ihnt2(11))**2+yp(2,ihnt2(11))**2)/1.44/atnm**0.66666
18698 ELSEIF(jbt.EQ.2)
THEN 18699 bbr2=(yt(1,ihnt2(12))**2+yt(2,ihnt2(12))**2)/1.44/atnm**0.66666
18702 abx=(atnm**0.33333333-1.0)
18703 apx=hipr1(6)*4.0/3.0*abx*sqrt(1.0-bbr2)
18704 aax=1.192*alog(atnm)**0.1666666
18705 rrx=aax*(
x**3-1.2*
x**2+0.21*
x)+1.0
18706 & -(apx-1.079*abx*sqrt(
x)/alog(atnm+1.0))*exp(-
x**2.0/0.01)
18708 xpq(kfl)=xpq(kfl)*rrx
18716 1000
FORMAT(
' Error: x value outside physical range, x =',1p,e12.3)
18717 1100
FORMAT(
' Error: illegal particle code for structure function,',
18719 1200
FORMAT(
' Error: bad value of parameter MSTP(51) in PYSTFU,',
18727 SUBROUTINE pyspli(KF,KFLIN,KFLCH,KFLSP)
18736 kfl(1)=mod(kfa/1000,10)
18737 kfl(2)=mod(kfa/100,10)
18738 kfl(3)=mod(kfa/10,10)
18743 IF(kfl(1).EQ.0)
THEN 18744 kfl(2)=kfl(2)*(-1)**kfl(2)
18745 kfl(3)=-kfl(3)*(-1)**iabs(kfl(2))
18746 IF(kflr.EQ.kfl(2))
THEN 18748 ELSEIF(kflr.EQ.kfl(3))
THEN 18750 ELSEIF(iabs(kflr).EQ.21.AND.
rlu(0).GT.0.5)
THEN 18753 ELSEIF(iabs(kflr).EQ.21)
THEN 18756 ELSEIF(kflr*kfl(2).GT.0)
THEN 18757 CALL lukfdi(-kflr,kfl(2),kfdump,kflch)
18760 CALL lukfdi(-kflr,kfl(3),kfdump,kflch)
18768 100
IF(kflr.EQ.kfl(j)) nagr=nagr+1
18770 ragr=0.00001+(nagr-0.00002)*
rlu(0)
18773 IF(kflr.EQ.kfl(j)) ragr=ragr-1.
18774 110
IF(iagr.EQ.0.AND.ragr.LE.0.) iagr=j
18776 iagr=1.00001+2.99998*
rlu(0)
18779 IF(iagr.EQ.1) id1=2
18780 IF(iagr.EQ.1.AND.kfl(3).GT.kfl(2)) id1=3
18783 IF(mod(kfa,10).EQ.2.AND.kfl(1).EQ.kfl(2))
THEN 18784 IF(iagr.NE.3.AND.
rlu(0).GT.0.25) ksp=1
18785 ELSEIF(mod(kfa,10).EQ.2.AND.kfl(2).GE.kfl(3))
THEN 18786 IF(iagr.NE.1.AND.
rlu(0).GT.0.25) ksp=1
18787 ELSEIF(mod(kfa,10).EQ.2)
THEN 18788 IF(iagr.EQ.1) ksp=1
18789 IF(iagr.NE.1.AND.
rlu(0).GT.0.75) ksp=1
18791 kflsp=1000*kfl(id1)+100*kfl(id2)+ksp
18792 IF(kflin.EQ.21)
THEN 18794 ELSEIF(nagr.EQ.0.AND.kflr.GT.0)
THEN 18795 CALL lukfdi(-kflr,kfl(iagr),kfdump,kflch)
18796 ELSEIF(nagr.EQ.0)
THEN 18797 CALL lukfdi(10000+kflsp,-kflr,kfdump,kflch)
18817 DATA b/-0.577191652,0.988205891,-0.897056937,0.918206857,
18818 &-0.756704078,0.482199394,-0.193527818,0.035868343/
18838 FUNCTION pyw1au(EPS,IREIM)
18843 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
18846 asinh(
x)=log(
x+sqrt(
x**2+1.))
18847 acosh(
x)=log(
x+sqrt(
x**2-1.))
18850 w1re=2.*sqrt(1.-
eps)*asinh(sqrt(-1./
eps))
18852 ELSEIF(
eps.LT.1.)
THEN 18853 w1re=2.*sqrt(1.-
eps)*acosh(sqrt(1./
eps))
18854 w1im=-paru(1)*sqrt(1.-
eps)
18856 w1re=2.*sqrt(
eps-1.)*asin(sqrt(1./
eps))
18860 IF(ireim.EQ.1)
pyw1au=w1re
18861 IF(ireim.EQ.2)
pyw1au=w1im
18868 FUNCTION pyw2au(EPS,IREIM)
18873 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
18876 asinh(
x)=log(
x+sqrt(
x**2+1.))
18877 acosh(
x)=log(
x+sqrt(
x**2-1.))
18880 w2re=4.*(asinh(sqrt(-1./
eps)))**2
18882 ELSEIF(
eps.LT.1.)
THEN 18883 w2re=4.*(acosh(sqrt(1./
eps)))**2-paru(1)**2
18884 w2im=-4.*paru(1)*acosh(sqrt(1./
eps))
18886 w2re=-4.*(asin(sqrt(1./
eps)))**2
18890 IF(ireim.EQ.1)
pyw2au=w2re
18891 IF(ireim.EQ.2)
pyw2au=w2im
18898 FUNCTION pyi3au(BE,EPS,IREIM)
18903 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
18906 IF(
eps.LT.1.) ga=0.5*(1.+sqrt(1.-
eps))
18909 f3re=
pyspen((ga-1.)/(ga+be-1.),0.,1)-
pyspen(ga/(ga+be-1.),0.,1)+
18914 ELSEIF(
eps.LT.1.)
THEN 18915 f3re=
pyspen((ga-1.)/(ga+be-1.),0.,1)-
pyspen(ga/(ga+be-1.),0.,1)+
18920 rsq=
eps/(
eps-1.+(2.*be-1.)**2)
18921 rcthe=rsq*(1.-2.*be/
eps)
18922 rsthe=sqrt(rsq-rcthe**2)
18923 rcphi=rsq*(1.+2.*(be-1.)/
eps)
18924 rsphi=sqrt(rsq-rcphi**2)
18930 & (phi-the)*(phi+the-paru(1))
18935 IF(ireim.EQ.1)
pyi3au=2./(2.*be-1.)*f3re
18936 IF(ireim.EQ.2)
pyi3au=2./(2.*be-1.)*f3im
18943 FUNCTION pyspen(XREIN,XIMIN,IREIM)
18947 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
18952 & 1.000000
e+00, -5.000000
e-01, 1.666667
e-01,
18953 & 0.000000
e+00, -3.333333
e-02, 0.000000
e+00,
18954 & 2.380952
e-02, 0.000000
e+00, -3.333333
e-02,
18955 & 0.000000
e+00, 7.575757
e-02, 0.000000
e+00,
18956 &-2.531135
e-01, 0.000000
e+00, 1.166667
e+00/
18960 IF(abs(1.-xre).LT.1.
e-6.AND.abs(xim).LT.1.
e-6)
THEN 18961 IF(ireim.EQ.1)
pyspen=paru(1)**2/6.
18962 IF(ireim.EQ.2)
pyspen=0.
18966 xmod=sqrt(xre**2+xim**2)
18967 IF(xmod.LT.1.
e-6)
THEN 18968 IF(ireim.EQ.1)
pyspen=0.
18969 IF(ireim.EQ.2)
pyspen=0.
18973 xarg=sign(acos(xre/xmod),xim)
18977 IF(xmod.GT.1.)
THEN 18979 algxim=xarg-sign(paru(1),xarg)
18980 sp0re=-paru(1)**2/6.-(algxre**2-algxim**2)/2.
18981 sp0im=-algxre*algxim
18988 IF(xre.GT.0.5)
THEN 18993 xmod=sqrt(xre**2+xim**2)
18994 xarg=sign(acos(xre/xmod),xim)
18997 sp0re=sp0re+sgn*(paru(1)**2/6.-(algxre*algyre-algxim*algyim))
18998 sp0im=sp0im-sgn*(algxre*algyim+algxim*algyre)
19004 xmod=sqrt(xre**2+xim**2)
19005 xarg=sign(acos(xre/xmod),xim)
19014 termre=(savere*zre-saveim*zim)/float(i+1)
19015 termim=(savere*zim+saveim*zre)/float(i+1)
19018 spre=spre+b(i)*termre
19019 100 spim=spim+b(i)*termim
19021 IF(ireim.EQ.1)
pyspen=sp0re+sgn*spre
19022 IF(ireim.EQ.2)
pyspen=sp0im+sgn*spim
19029 SUBROUTINE pytest(MTEST)
19033 common/lujets/
n,k(9000,5),p(9000,5),v(9000,5)
19035 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
19037 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
19039 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
19041 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
19043 common/pypars/mstp(200),parp(200),msti(200),pari(200)
19048 IF(mtest.LE.0) mstp(122)=0
19069 IF(iproc.EQ.1)
THEN 19075 CALL pyinit(
'FIXT',
'pi+',
'p',pzsum)
19078 ELSEIF(iproc.EQ.2)
THEN 19084 CALL pyinit(
'CMS',
'p',
'p',pesum)
19087 ELSEIF(iproc.EQ.3)
THEN 19096 CALL pyinit(
'CMS',
'p',
'pbar',pesum)
19099 ELSEIF(iproc.EQ.4)
THEN 19111 CALL pyinit(
'CMS',
'p',
'pbar',pesum)
19114 ELSEIF(iproc.EQ.5)
THEN 19123 CALL pyinit(
'CMS',
'p',
'pbar',pesum)
19126 ELSEIF(iproc.EQ.6)
THEN 19135 CALL pyinit(
'CMS',
'p',
'pbar',pesum)
19138 ELSEIF(iproc.EQ.7)
THEN 19143 CALL pyinit(
'CMS',
'e+',
'e-',pesum)
19150 IF(iproc.EQ.4) pesumm=msti(41)*pesum
19154 deve=abs(
plu(0,4)-pesumm)+abs(
plu(0,3)-pzsum)
19155 devt=abs(
plu(0,1))+abs(
plu(0,2))
19156 devq=abs(
plu(0,6)-pqsum)
19157 IF(deve.GT.1
e-3*pesum.OR.devt.GT.
max(0.01,1
e-5*pesum).OR.
19158 &devq.GT.0.1) merr=1
19159 IF(merr.NE.0)
WRITE(mstu(11),1000) iproc,iev
19164 IF(k(i,1).GT.20)
GOTO 110
19165 IF(
lucomp(k(i,2)).EQ.0)
THEN 19166 WRITE(mstu(11),1100) i
19169 pd=p(i,4)**2-p(i,1)**2-p(i,2)**2-p(i,3)**2-p(i,5)**2*
19171 IF(abs(pd).GT.
max(0.1,0.002*p(i,4)**2,0.002*p(i,5)**2).OR.
19172 &(p(i,5).GE.0..AND.p(i,4).LT.0.))
THEN 19173 WRITE(mstu(11),1200) i
19179 IF(merr.GE.1) nerr=nerr+1
19180 IF(nerr.GE.10)
THEN 19181 WRITE(mstu(11),1300)
19185 IF(mtest.GE.1.AND.(merr.GE.1.OR.iev.EQ.1))
THEN 19186 IF(merr.GE.1)
WRITE(mstu(11),1400)
19192 IF(mtest.GE.1)
CALL pystat(1)
19196 IF(nerr.EQ.0)
WRITE(mstu(11),1500)
19197 IF(nerr.GT.0)
WRITE(mstu(11),1600) nerr
19201 1000
FORMAT(/5
x,
'Energy/momentum/flavour nonconservation for process',
19203 1100
FORMAT(/5
x,
'Entry no.',i4,
' in following event not known code')
19204 1200
FORMAT(/5
x,
'Entry no.',i4,
' in following event has faulty ',
19206 1300
FORMAT(/5
x,
'This is the tenth error experienced! Something is ',
19207 &
'wrong.'/5
x,
'Execution will be stopped after listing of event.')
19208 1400
FORMAT(5
x,
'Faulty event follows:')
19209 1500
FORMAT(//5
x,
'End result of run: no errors detected.')
19210 1600
FORMAT(//5
x,
'End result of run:',i2,
' errors detected.'/
19211 &5
x,
'This should not have happened!')
19219 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
19221 common/pypars/mstp(200),parp(200),msti(200),pari(200)
19223 common/pyint1/mint(400),vint(400)
19225 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
19227 common/pyint3/xsfx(2,-40:40),isig(1000,3),sigh(1000)
19229 common/pyint4/widp(21:40,0:40),wide(21:40,0:40),wids(21:40,3)
19231 common/pyint5/ngen(0:200,3),xsec(0:200,3)
19233 common/pyint6/proc(0:200)
19240 DATA ((kfin(i,j),j=-40,40),i=1,2)/40*1,0,80*1,0,40*1/
19242 & 2.0, -1.0, 0.0, -1.0, 1.0, 1.0, -10., 10., -10., 10.,
19243 1 -10., 10., -10., 10., -10., 10., -1.0, 1.0, -1.0, 1.0,
19244 2 0.0, 1.0, 0.0, 1.0, -1.0, 1.0, -1.0, 1.0, 0., 0.,
19245 3 2.0, -1.0, 0., 0., 0., 0., 0., 0., 0., 0.,
19249 DATA (mstp(i),i=1,100)/
19250 & 3, 1, 2, 0, 0, 0, 0, 0, 0, 0,
19251 1 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19252 2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19253 3 1, 2, 0, 0, 0, 2, 0, 0, 0, 0,
19254 4 1, 0, 3, 7, 1, 0, 0, 0, 0, 0,
19255 5 1, 1, 20, 6, 0, 0, 0, 0, 0, 0,
19256 6 1, 2, 2, 2, 1, 0, 0, 0, 0, 0,
19257 7 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19258 8 1, 1, 100, 0, 0, 0, 0, 0, 0, 0,
19259 9 1, 4, 0, 0, 0, 0, 0, 0, 0, 0/
19260 DATA (mstp(i),i=101,200)/
19261 & 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19262 1 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
19263 2 0, 1, 2, 1, 1, 20, 0, 0, 0, 0,
19264 3 0, 4, 0, 1, 0, 0, 0, 0, 0, 0,
19265 4 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19266 5 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19267 6 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19268 7 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19269 8 5, 3, 1989, 11, 24, 0, 0, 0, 0, 0,
19270 9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0/
19271 DATA (parp(i),i=1,100)/
19272 & 0.25, 10., 0., 0., 0., 0., 0., 0., 0., 0.,
19273 1 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19274 2 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19275 3 1.5, 2.0, 0.075, 0., 0.2, 0., 0., 0., 0., 0.,
19276 4 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19277 5 1.0, 2.26, 1.
e4, 1.
e-4, 0., 0., 0., 0., 0., 0.,
19278 6 0.25, 1.0, 0.25, 1.0, 2.0, 1.
e-3, 4.0, 0., 0., 0.,
19279 7 4.0, 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19280 8 1.6, 1.85, 0.5, 0.2, 0.33, 0.66, 0.7, 0.5, 0., 0.,
19281 9 0.44, 0.44, 2.0, 1.0, 0., 3.0, 1.0, 0.75, 0., 0./
19282 DATA (parp(i),i=101,200)/
19283 & -0.02, 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19284 1 2.0, 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19285 2 0.4, 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19286 3 0.01, 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19287 4 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19288 5 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19289 6 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19290 7 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19291 8 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
19292 9 0., 0., 0., 0., 0., 0., 0., 0., 0., 0./
19299 DATA (iset(i),i=1,100)/
19300 & 1, 1, 1, -1, 3, -1, -1, 3, -2, -2,
19301 1 2, 2, 2, 2, 2, 2, -1, 2, 2, 2,
19302 2 -1, 2, 2, 2, 2, 2, -1, 2, 2, 2,
19303 3 2, -1, -1, -1, -1, -1, -1, -1, -1, -1,
19304 4 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
19305 5 -1, -1, 2, -1, -1, -1, -1, -1, -1, -1,
19306 6 -1, -1, -1, -1, -1, -1, -1, 2, -1, -1,
19307 7 4, 4, 4, -1, -1, 4, 4, -1, -1, -2,
19308 8 2, 2, -2, -2, -2, -2, -2, -2, -2, -2,
19309 9 0, 0, 0, -1, 0, 5, -2, -2, -2, -2/
19310 DATA (iset(i),i=101,200)/
19311 & -1, 1, -2, -2, -2, -2, -2, -2, -2, -2,
19312 1 2, 2, 2, 2, -1, -1, -1, -2, -2, -2,
19313 2 -1, -2, -2, -2, -2, -2, -2, -2, -2, -2,
19314 3 -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
19315 4 1, 1, 1, -2, -2, -2, -2, -2, -2, -2,
19316 5 -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
19317 6 2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
19318 7 -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
19319 8 -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
19320 9 -2, -2, -2, -2, -2, -2, -2, -2, -2, -2/
19321 DATA ((kfpr(i,j),j=1,2),i=1,50)/
19322 & 23, 0, 24, 0, 25, 0, 24, 0, 25, 0,
19323 & 24, 0, 23, 0, 25, 0, 0, 0, 0, 0,
19324 1 0, 0, 0, 0, 21, 21, 21, 22, 21, 23,
19325 1 21, 24, 21, 25, 22, 22, 22, 23, 22, 24,
19326 2 22, 25, 23, 23, 23, 24, 23, 25, 24, 24,
19327 2 24, 25, 25, 25, 0, 21, 0, 22, 0, 23,
19328 3 0, 24, 0, 25, 0, 21, 0, 22, 0, 23,
19329 3 0, 24, 0, 25, 0, 21, 0, 22, 0, 23,
19330 4 0, 24, 0, 25, 0, 21, 0, 22, 0, 23,
19331 4 0, 24, 0, 25, 0, 21, 0, 22, 0, 23/
19332 DATA ((kfpr(i,j),j=1,2),i=51,100)/
19333 5 0, 24, 0, 25, 0, 0, 0, 0, 0, 0,
19334 5 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19335 6 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19336 6 0, 0, 0, 0, 21, 21, 24, 24, 22, 24,
19337 7 23, 23, 24, 24, 23, 24, 23, 25, 22, 22,
19338 7 23, 23, 24, 24, 24, 25, 25, 25, 0, 0,
19339 8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19340 8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19341 9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19342 9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0/
19343 DATA ((kfpr(i,j),j=1,2),i=101,150)/
19344 & 23, 0, 25, 0, 0, 0, 0, 0, 0, 0,
19345 & 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19346 1 21, 25, 0, 25, 21, 25, 22, 22, 22, 23,
19347 1 23, 23, 24, 24, 0, 0, 0, 0, 0, 0,
19348 2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19349 2 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19350 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19351 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19352 4 32, 0, 37, 0, 40, 0, 0, 0, 0, 0,
19353 4 0, 0, 0, 0, 0, 0, 0, 0, 0, 0/
19354 DATA ((kfpr(i,j),j=1,2),i=151,200)/
19355 5 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19356 5 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19357 6 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
19358 6 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19359 7 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19360 7 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19361 8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19362 8 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19363 9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
19364 9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0/
19366 DATA (((icol(i,j,k),k=1,2),j=1,4),i=1,40)/
19367 1 4,0,3,0,2,0,1,0,3,0,4,0,1,0,2,0,2,0,0,1,4,0,0,3,3,0,0,4,1,0,0,2,
19368 2 3,0,0,4,1,4,3,2,4,0,0,3,4,2,1,3,2,0,4,1,4,0,2,3,4,0,3,4,2,0,1,2,
19369 3 3,2,1,0,1,4,3,0,4,3,3,0,2,1,1,0,3,2,1,4,1,0,0,2,2,4,3,1,2,0,0,1,
19370 4 3,2,1,4,1,4,3,2,4,2,1,3,4,2,1,3,3,4,4,3,1,2,2,1,2,0,3,1,2,0,0,0,
19371 5 4,2,1,0,0,0,1,0,3,0,0,3,1,2,0,0,4,0,0,4,0,0,1,2,2,0,0,1,4,4,3,3,
19372 6 2,2,1,1,4,4,3,3,3,3,4,4,1,1,2,2,3,2,1,3,1,2,0,0,4,2,1,4,0,0,1,2,
19373 7 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
19374 8 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
19375 9 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
19376 & 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0/
19379 DATA proc(0)/
'All included subprocesses '/
19380 DATA (proc(i),i=1,20)/
19381 1
'f + fb -> gamma*/Z0 ',
'f + fb'' -> W+/- ',
19382 2
'f + fb -> H0 ',
'gamma + W+/- -> W+/- ',
19383 3
'Z0 + Z0 -> H0 ',
'Z0 + W+/- -> W+/- ',
19384 4
' ',
'W+ + W- -> H0 ',
19386 6
'f + f'' -> f + f'' ',
'f + fb -> f'' + fb'' ',
19387 'f + fb -> g + g ',
'f + fb -> g + gamma ',
19388 8
'f + fb -> g + Z0 ',
'f + fb'' -> g + W+/- ',
19389 9
'f + fb -> g + H0 ',
'f + fb -> gamma + gamma ',
19390 &
'f + fb -> gamma + Z0 ',
'f + fb'' -> gamma + W+/- '/
19391 DATA (proc(i),i=21,40)/
19392 1
'f + fb -> gamma + H0 ',
'f + fb -> Z0 + Z0 ',
19393 2
'f + fb'' -> Z0 + W+/- ',
'f + fb -> Z0 + H0 ',
19394 3
'f + fb -> W+ + W- ',
'f + fb'' -> W+/- + H0 ',
19395 4
'f + fb -> H0 + H0 ',
'f + g -> f + g ',
19396 5
'f + g -> f + gamma ',
'f + g -> f + Z0 ',
19397 6
'f + g -> f'' + W+/- ',
'f + g -> f + H0 ',
19398 7
'f + gamma -> f + g ',
'f + gamma -> f + gamma ',
19399 8
'f + gamma -> f + Z0 ',
'f + gamma -> f'' + W+/- ',
19400 9
'f + gamma -> f + H0 ',
'f + Z0 -> f + g ',
19401 &
'f + Z0 -> f + gamma ',
'f + Z0 -> f + Z0 '/
19402 DATA (proc(i),i=41,60)/
19403 1
'f + Z0 -> f'' + W+/- ',
'f + Z0 -> f + H0 ',
19404 2
'f + W+/- -> f'' + g ',
'f + W+/- -> f'' + gamma ',
19405 3
'f + W+/- -> f'' + Z0 ',
'f + W+/- -> f'' + W+/- ',
19406 4
'f + W+/- -> f'' + H0 ',
'f + H0 -> f + g ',
19407 5
'f + H0 -> f + gamma ',
'f + H0 -> f + Z0 ',
19408 6
'f + H0 -> f'' + W+/- ',
'f + H0 -> f + H0 ',
19409 7
'g + g -> f + fb ',
'g + gamma -> f + fb ',
19410 8
'g + Z0 -> f + fb ',
'g + W+/- -> f + fb'' ',
19411 9
'g + H0 -> f + fb ',
'gamma + gamma -> f + fb ',
19412 &
'gamma + Z0 -> f + fb ',
'gamma + W+/- -> f + fb'' '/
19413 DATA (proc(i),i=61,80)/
19414 1
'gamma + H0 -> f + fb ',
'Z0 + Z0 -> f + fb ',
19415 2
'Z0 + W+/- -> f + fb'' ',
'Z0 + H0 -> f + fb ',
19416 3
'W+ + W- -> f + fb ',
'W+/- + H0 -> f + fb'' ',
19417 4
'H0 + H0 -> f + fb ',
'g + g -> g + g ',
19418 5
'gamma + gamma -> W+ + W- ',
'gamma + W+/- -> gamma + W+/-',
19419 6
'Z0 + Z0 -> Z0 + Z0 ',
'Z0 + Z0 -> W+ + W- ',
19420 7
'Z0 + W+/- -> Z0 + W+/- ',
'Z0 + Z0 -> Z0 + H0 ',
19421 8
'W+ + W- -> gamma + gamma ',
'W+ + W- -> Z0 + Z0 ',
19422 9
'W+/- + W+/- -> W+/- + W+/- ',
'W+/- + H0 -> W+/- + H0 ',
19423 &
'H0 + H0 -> H0 + H0 ',
' '/
19424 DATA (proc(i),i=81,100)/
19425 1
'q + qb -> Q + QB, massive ',
'g + g -> Q + QB, massive ',
19430 6
'Elastic scattering ',
'Single diffractive ',
19431 7
'Double diffractive ',
'Central diffractive ',
19432 8
'Low-pT scattering ',
'Semihard QCD 2 -> 2 ',
19435 DATA (proc(i),i=101,120)/
19436 1
'g + g -> gamma*/Z0 ',
'g + g -> H0 ',
19441 6
'f + fb -> g + H0 ',
'q + g -> q + H0 ',
19442 7
'g + g -> g + H0 ',
'g + g -> gamma + gamma ',
19443 8
'g + g -> gamma + Z0 ',
'g + g -> Z0 + Z0 ',
19444 9
'g + g -> W+ + W- ',
' ',
19446 DATA (proc(i),i=121,140)/
19447 1
'g + g -> f + fb + H0 ',
' ',
19457 DATA (proc(i),i=141,160)/
19458 1
'f + fb -> gamma*/Z0/Z''0 ',
'f + fb'' -> H+/- ',
19459 2
'f + fb -> R ',
' ',
19468 DATA (proc(i),i=161,180)/
19469 1
'f + g -> f'' + H+/- ',
' ',
19479 DATA (proc(i),i=181,200)/ 20*
' '/
19493 common/pypars/mstp(200),parp(200),msti(200),pari(200)
19503 SUBROUTINE pystfe(KF,X,Q2,XPQ)
19532 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
19534 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
19536 common/pypars/mstp(200),parp(200),msti(200),pari(200)
19538 dimension xpq(-6:6),xfdflm(9)
19539 CHARACTER CHDFLM(9)*5,HEADER*40
19540 DATA chdflm/
'UPVAL',
'DOVAL',
'GLUON',
'QBAR ',
'UBAR ',
'SBAR ',
19541 &
'CBAR ',
'BBAR ',
'TBAR '/
19542 DATA header/
'Tung evolution package has been invoked'/
19547 IF(mstp(51).GE.11.AND.mstp(51).LE.13.AND.mstp(52).LE.1)
THEN 19548 xdflm=
max(0.51
e-4,
x)
19549 q2dflm=
max(10.,
min(1e8,q2))
19550 IF(mstp(52).EQ.0) q2dflm=10.
19552 IF(mstp(52).EQ.1.AND.j.EQ.9)
THEN 19553 q2dflm=q2dflm*(40./pmas(6,1))**2
19554 q2dflm=
max(10.,
min(1e8,q2))
19562 IF(
x.LT.0.51
e-4.AND.abs(parp(51)-1.).GT.0.01)
THEN 19563 cxs=(0.51
e-4/
x)**(parp(51)-1.)
19565 110 xfdflm(j)=xfdflm(j)*cxs
19568 xpq(1)=xfdflm(2)+xfdflm(5)
19569 xpq(2)=xfdflm(1)+xfdflm(5)
19587 IF(mstp(52).EQ.4) i1=1
19591 IF(mstp(51).GE.11) i2=mstp(51)-3
19593 IF(mstp(52).EQ.3) i3=1
subroutine pysspa(IPU1, IPU2)
subroutine luthru(THR, OBL)
subroutine rluget(LFN, MOVE)
function pyw1au(EPS, IREIM)
subroutine lusphe(SPH, APL)
subroutine pyinit(FRAME, BEAM, TARGET, WIN)
subroutine rluset(LFN, MOVE)
subroutine lueevt(KFL, ECM)
subroutine pystfu(KF, X, Q2, XPQ, JBT)
subroutine luxtot(KFL, ECM, XTOT)
subroutine pystfe(KF, X, Q2, XPQ)
subroutine lujoin(NJOIN, IJOIN)
subroutine pyinki(CHFRAM, CHBEAM, CHTARG, WIN)
static const G4double eps
static int FASTCALL common(PROLOG_STATE *state, int tok)
subroutine lu4ent(IP, KF1, KF2, KF3, KF4, PECM, X1, X2, X4, X12, X14)
subroutine luxdif(NC, NJET, KFL, ECM, CHI, THE, PHI)
subroutine luname(KF, CHAU)
subroutine lu1ent(IP, KF, PE, THE, PHI)
subroutine pyremn(IPU1, IPU2)
subroutine lushow(IP1, IP2, QMAX)
subroutine lurobo(THE, PHI, BEX, BEY, BEZ)
function pyspen(XREIN, XIMIN, IREIM)
subroutine lu3ent(IP, KF1, KF2, KF3, PECM, X1, X3)
subroutine pyfram(IFRAME)
subroutine pyspli(KF, KFLIN, KFLCH, KFLSP)
subroutine luzdis(KFL1, KFL2, PR, Z)
subroutine luptdi(KFL, PX, PY)
subroutine luerrm(MERR, CHMESS)
subroutine pysigh(NCHN, SIGS)
subroutine luradk(ECM, MK, PAK, THEK, PHIK, ALPK)
subroutine lufowo(H10, H20, H30, H40)
subroutine lux4jt(NJET, CUT, KFL, ECM, KFLN, X1, X2, X4, X12, X14)
static const double gauss
subroutine lukfdi(KFL1, KFL2, KFL3, KF)
subroutine hirobo(THE, PHI, BEX, BEY, BEZ)
subroutine pykmap(IVAR, MVAR, VVAR)
subroutine lux3jt(NJET, CUT, KFL, ECM, X1, X2)
subroutine luonia(KFL, ECM)
subroutine luxjet(ECM, NJET, CUT)
static const G4double fac
subroutine lujmas(PMH, PML)
subroutine luupda(MUPDA, LFN)
function pyw2au(EPS, IREIM)
subroutine luxkfl(KFL, ECM, ECMC, KFLC)
function pyi3au(BE, EPS, IREIM)
subroutine pywidt(KFLR, RMAS, WDTP, WDTE)
subroutine lu2ent(IP, KF1, KF2, PECM)