91 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
92 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
93 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
94 SAVE /lujets/,/ludat1/,/ludat2/
98 IF(mstu(12).GE.1) CALL
lulist(0)
100 IF(ipa.GT.mstu(4)) CALL
luerrm(21,
101 &
'(LU1ENT:) writing outside LUJETS memory')
103 IF(kc.EQ.0) CALL
luerrm(12,
'(LU1ENT:) unknown flavour code')
107 IF(mstu(10).EQ.1) pm=
p(ipa,5)
108 IF(mstu(10).GE.2) pm=
ulmass(kf)
117 IF(
ip.LT.0)
k(ipa,1)=2
121 pa=sqrt(
p(ipa,4)**2-
p(ipa,5)**2)
123 p(ipa,2)=pa*sin(the)*sin(
phi)
139 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
140 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
141 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
142 SAVE /lujets/,/ludat1/,/ludat2/
146 IF(mstu(12).GE.1) CALL
lulist(0)
148 IF(ipa.GT.mstu(4)-1) CALL
luerrm(21,
149 &
'(LU2ENT:) writing outside LUJETS memory')
152 IF(kc1.EQ.0.OR.kc2.EQ.0) CALL
luerrm(12,
153 &
'(LU2ENT:) unknown flavour code')
157 IF(mstu(10).EQ.1) pm1=
p(ipa,5)
158 IF(mstu(10).GE.2) pm1=
ulmass(kf1)
160 IF(mstu(10).EQ.1) pm2=
p(ipa+1,5)
161 IF(mstu(10).GE.2) pm2=
ulmass(kf2)
171 kq1=kchg(kc1,2)*isign(1,kf1)
172 kq2=kchg(kc2,2)*isign(1,kf2)
173 IF(mstu(19).EQ.1)
THEN
176 IF(kq1+kq2.NE.0.AND.kq1+kq2.NE.4) CALL
luerrm(2,
177 &
'(LU2ENT:) unphysical flavour combination')
185 IF(kq1.NE.0.AND.kq2.NE.0)
k(ipa,1)=2
192 k(ipa,4)=mstu(5)*(ipa+1)
194 k(ipa+1,4)=mstu(5)*ipa
195 k(ipa+1,5)=
k(ipa+1,4)
199 IF(pecm.LE.pm1+pm2) CALL
luerrm(13,
200 &
'(LU2ENT:) energy smaller than sum of masses')
201 pa=sqrt(
max(0.,(pecm**2-pm1**2-pm2**2)**2-(2.*pm1*pm2)**2))/
204 p(ipa,4)=sqrt(pm1**2+pa**2)
207 p(ipa+1,4)=sqrt(pm2**2+pa**2)
219 SUBROUTINE lu3ent(IP,KF1,KF2,KF3,PECM,X1,X3)
224 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
225 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
226 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
227 SAVE /lujets/,/ludat1/,/ludat2/
231 IF(mstu(12).GE.1) CALL
lulist(0)
233 IF(ipa.GT.mstu(4)-2) CALL
luerrm(21,
234 &
'(LU3ENT:) writing outside LUJETS memory')
238 IF(kc1.EQ.0.OR.kc2.EQ.0.OR.kc3.EQ.0) CALL
luerrm(12,
239 &
'(LU3ENT:) unknown flavour code')
243 IF(mstu(10).EQ.1) pm1=
p(ipa,5)
244 IF(mstu(10).GE.2) pm1=
ulmass(kf1)
246 IF(mstu(10).EQ.1) pm2=
p(ipa+1,5)
247 IF(mstu(10).GE.2) pm2=
ulmass(kf2)
249 IF(mstu(10).EQ.1) pm3=
p(ipa+2,5)
250 IF(mstu(10).GE.2) pm3=
ulmass(kf3)
260 kq1=kchg(kc1,2)*isign(1,kf1)
261 kq2=kchg(kc2,2)*isign(1,kf2)
262 kq3=kchg(kc3,2)*isign(1,kf3)
263 IF(mstu(19).EQ.1)
THEN
265 ELSEIF(kq1.EQ.0.AND.kq2.EQ.0.AND.kq3.EQ.0)
THEN
266 ELSEIF(kq1.NE.0.AND.kq2.EQ.2.AND.(kq1+kq3.EQ.0.OR.
269 CALL
luerrm(2,
'(LU3ENT:) unphysical flavour combination')
278 IF(kq1.NE.0.AND.(kq2.NE.0.OR.kq3.NE.0))
k(ipa,1)=2
280 IF(kq2.NE.0.AND.kq3.NE.0)
k(ipa+1,1)=2
290 k(ipa,kcs)=mstu(5)*(ipa+1)
291 k(ipa,9-kcs)=mstu(5)*(ipa+2)
292 k(ipa+1,kcs)=mstu(5)*(ipa+2)
293 k(ipa+1,9-kcs)=mstu(5)*ipa
294 k(ipa+2,kcs)=mstu(5)*ipa
295 k(ipa+2,9-kcs)=mstu(5)*(ipa+1)
300 IF(0.5*x1*pecm.LE.pm1.OR.0.5*(2.-x1-
x3)*pecm.LE.pm2.OR.
301 &0.5*
x3*pecm.LE.pm3) mkerr=1
302 pa1=sqrt(
max(1e-10,(0.5*x1*pecm)**2-pm1**2))
303 pa2=sqrt(
max(1e-10,(0.5*(2.-x1-
x3)*pecm)**2-pm2**2))
304 pa3=sqrt(
max(1e-10,(0.5*
x3*pecm)**2-pm3**2))
305 cthe2=(pa3**2-pa1**2-pa2**2)/(2.*pa1*pa2)
306 cthe3=(pa2**2-pa1**2-pa3**2)/(2.*pa1*pa3)
307 IF(abs(cthe2).GE.1.001.OR.abs(cthe3).GE.1.001) mkerr=1
308 cthe3=
max(-1.,
min(1.,cthe3))
314 p(ipa,4)=sqrt(pa1**2+pm1**2)
316 p(ipa+2,1)=pa3*sqrt(1.-cthe3**2)
318 p(ipa+2,4)=sqrt(pa3**2+pm3**2)
320 p(ipa+1,1)=-
p(ipa+2,1)
321 p(ipa+1,3)=-
p(ipa,3)-
p(ipa+2,3)
322 p(ipa+1,4)=sqrt(
p(ipa+1,1)**2+
p(ipa+1,3)**2+pm2**2)
334 SUBROUTINE lu4ent(IP,KF1,KF2,KF3,KF4,PECM,X1,X2,X4,X12,X14)
339 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
340 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
341 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
342 SAVE /lujets/,/ludat1/,/ludat2/
346 IF(mstu(12).GE.1) CALL
lulist(0)
348 IF(ipa.GT.mstu(4)-3) CALL
luerrm(21,
349 &
'(LU4ENT:) writing outside LUJETS momory')
354 IF(kc1.EQ.0.OR.kc2.EQ.0.OR.kc3.EQ.0.OR.kc4.EQ.0) CALL
luerrm(12,
355 &
'(LU4ENT:) unknown flavour code')
359 IF(mstu(10).EQ.1) pm1=
p(ipa,5)
360 IF(mstu(10).GE.2) pm1=
ulmass(kf1)
362 IF(mstu(10).EQ.1) pm2=
p(ipa+1,5)
363 IF(mstu(10).GE.2) pm2=
ulmass(kf2)
365 IF(mstu(10).EQ.1) pm3=
p(ipa+2,5)
366 IF(mstu(10).GE.2) pm3=
ulmass(kf3)
368 IF(mstu(10).EQ.1) pm4=
p(ipa+3,5)
369 IF(mstu(10).GE.2) pm4=
ulmass(kf4)
379 kq1=kchg(kc1,2)*isign(1,kf1)
380 kq2=kchg(kc2,2)*isign(1,kf2)
381 kq3=kchg(kc3,2)*isign(1,kf3)
382 kq4=kchg(kc4,2)*isign(1,kf4)
383 IF(mstu(19).EQ.1)
THEN
385 ELSEIF(kq1.EQ.0.AND.kq2.EQ.0.AND.kq3.EQ.0.AND.kq4.EQ.0)
THEN
386 ELSEIF(kq1.NE.0.AND.kq2.EQ.2.AND.kq3.EQ.2.AND.(kq1+kq4.EQ.0.OR.
388 ELSEIF(kq1.NE.0.AND.kq1+kq2.EQ.0.AND.kq3.NE.0.AND.kq3+kq4.EQ.0.)
391 CALL
luerrm(2,
'(LU4ENT:) unphysical flavour combination')
401 IF(kq1.NE.0.AND.(kq2.NE.0.OR.kq3.NE.0.OR.kq4.NE.0))
k(ipa,1)=2
403 IF(kq2.NE.0.AND.kq1+kq2.NE.0.AND.(kq3.NE.0.OR.kq4.NE.0))
406 IF(kq3.NE.0.AND.kq4.NE.0)
k(ipa+2,1)=2
411 ELSEIF(kq1+kq2.NE.0)
THEN
418 k(ipa,kcs)=mstu(5)*(ipa+1)
419 k(ipa,9-kcs)=mstu(5)*(ipa+3)
420 k(ipa+1,kcs)=mstu(5)*(ipa+2)
421 k(ipa+1,9-kcs)=mstu(5)*ipa
422 k(ipa+2,kcs)=mstu(5)*(ipa+3)
423 k(ipa+2,9-kcs)=mstu(5)*(ipa+1)
424 k(ipa+3,kcs)=mstu(5)*ipa
425 k(ipa+3,9-kcs)=mstu(5)*(ipa+2)
433 k(ipa,4)=mstu(5)*(ipa+1)
435 k(ipa+1,4)=mstu(5)*ipa
436 k(ipa+1,5)=
k(ipa+1,4)
437 k(ipa+2,4)=mstu(5)*(ipa+3)
438 k(ipa+2,5)=
k(ipa+2,4)
439 k(ipa+3,4)=mstu(5)*(ipa+2)
440 k(ipa+3,5)=
k(ipa+3,4)
445 IF(0.5*x1*pecm.LE.pm1.OR.0.5*
x2*pecm.LE.pm2.OR.0.5*(2.-x1-
x2-x4)*
446 &pecm.LE.pm3.OR.0.5*x4*pecm.LE.pm4) mkerr=1
447 pa1=sqrt(
max(1e-10,(0.5*x1*pecm)**2-pm1**2))
448 pa2=sqrt(
max(1e-10,(0.5*
x2*pecm)**2-pm2**2))
449 pa4=sqrt(
max(1e-10,(0.5*x4*pecm)**2-pm4**2))
450 x24=x1+
x2+x4-1.-x12-x14+(pm3**2-pm1**2-pm2**2-pm4**2)/pecm**2
451 cthe4=(x1*x4-2.*x14)*pecm**2/(4.*pa1*pa4)
452 IF(abs(cthe4).GE.1.002) mkerr=1
453 cthe4=
max(-1.,
min(1.,cthe4))
454 sthe4=sqrt(1.-cthe4**2)
455 cthe2=(x1*
x2-2.*x12)*pecm**2/(4.*pa1*pa2)
456 IF(abs(cthe2).GE.1.002) mkerr=1
457 cthe2=
max(-1.,
min(1.,cthe2))
458 sthe2=sqrt(1.-cthe2**2)
459 cphi2=((
x2*x4-2.*x24)*pecm**2-4.*pa2*cthe2*pa4*cthe4)/
460 &
max(1e-8*pecm**2,4.*pa2*sthe2*pa4*sthe4)
461 IF(abs(cphi2).GE.1.05) mkerr=1
462 cphi2=
max(-1.,
min(1.,cphi2))
463 IF(mkerr.EQ.1) CALL
luerrm(13,
464 &
'(LU4ENT:) unphysical kinematical variable setup')
468 p(ipa,4)=sqrt(pa1**2+pm1**2)
472 p(ipa+3,4)=sqrt(pa4**2+pm4**2)
474 p(ipa+1,1)=pa2*sthe2*cphi2
475 p(ipa+1,2)=pa2*sthe2*sqrt(1.-cphi2**2)*(-1.)**int(
rlu(0)+0.5)
477 p(ipa+1,4)=sqrt(pa2**2+pm2**2)
479 p(ipa+2,1)=-
p(ipa+1,1)-
p(ipa+3,1)
480 p(ipa+2,2)=-
p(ipa+1,2)
481 p(ipa+2,3)=-
p(ipa,3)-
p(ipa+1,3)-
p(ipa+3,3)
482 p(ipa+2,4)=sqrt(
p(ipa+2,1)**2+
p(ipa+2,2)**2+
p(ipa+2,3)**2+pm3**2)
498 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
499 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
500 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
501 SAVE /lujets/,/ludat1/,/ludat2/
505 IF(njoin.LT.2) goto 120
509 IF(i.LE.0.OR.i.GT.
n) goto 120
510 IF(
k(i,1).LT.1.OR.
k(i,1).GT.3) goto 120
513 kq=kchg(kc,2)*isign(1,
k(i,2))
515 IF(ijn.NE.1.AND.ijn.NE.njoin.AND.kq.NE.2) goto 120
516 IF(kq.NE.2) kqsum=kqsum+kq
519 IF(kqsum.NE.0) goto 120
523 IF(kqs.EQ.2) kcs=int(4.5+
rlu(0))
527 IF(ijn.NE.1)
ip=ijoin(ijn-1)
528 IF(ijn.EQ.1)
ip=ijoin(njoin)
529 IF(ijn.NE.njoin)
in=ijoin(ijn+1)
530 IF(ijn.EQ.njoin)
in=ijoin(1)
532 k(i,9-kcs)=mstu(5)*
ip
533 IF(ijn.EQ.1.AND.kqs.NE.2)
k(i,9-kcs)=0
534 IF(ijn.EQ.njoin.AND.kqs.NE.2)
k(i,kcs)=0
540 &
'(LUJOIN:) given entries can not be joined by one string')
550 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
551 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
552 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
553 common/ludat3/
mdcy(500,3),
mdme(2000,2),
brat(2000),kfdp(2000,5)
554 common/ludat4/chaf(500)
556 common/ludatr/mrlu(6),rrlu(100)
557 common/pysubs/msel,msub(200),kfin(2,-40:40),ckin(200)
558 common/pypars/mstp(200),parp(200),msti(200),pari(200)
559 common/pyint1/mint(400),vint(400)
560 common/pyint2/iset(200),kfpr(200,2),coef(200,20),icol(40,4,2)
561 common/pyint3/xsfx(2,-40:40),isig(1000,3),sigh(1000)
562 common/pyint4/widp(21:40,0:40),wide(21:40,0:40),wids(21:40,3)
563 common/pyint5/ngen(0:200,3),xsec(0:200,3)
564 common/pyint6/proc(0:200)
565 common/pyint7/sigt(0:6,0:6,0:5)
567 SAVE /lujets/,/ludat1/,/ludat2/,/ludat3/,/ludat4/,/ludatr/
568 SAVE /pysubs/,/pypars/,/pyint1/,/pyint2/,/pyint3/,/pyint4/,
569 &/pyint5/,/pyint6/,/pyint7/
570 CHARACTER chin*(*),chfix*104,chbit*104,chold*8,chnew*8,chold2*28,
571 &chnew2*28,chnam*4,chvar(43)*4,chalp(2)*26,chind*8,chini*10,
573 dimension msvar(43,8)
577 DATA chvar/
'N',
'K',
'P',
'V',
'MSTU',
'PARU',
'MSTJ',
'PARJ',
'KCHG',
578 &
'PMAS',
'PARF',
'VCKM',
'MDCY',
'MDME',
'BRAT',
'KFDP',
'CHAF',
'MRLU',
579 &
'RRLU',
'MSEL',
'MSUB',
'KFIN',
'CKIN',
'MSTP',
'PARP',
'MSTI',
'PARI',
580 &
'MINT',
'VINT',
'ISET',
'KFPR',
'COEF',
'ICOL',
'XSFX',
'ISIG',
'SIGH',
581 &
'WIDP',
'WIDE',
'WIDS',
'NGEN',
'XSEC',
'PROC',
'SIGT'/
582 DATA ((msvar(i,j),j=1,8),i=1,43)/ 1,7*0, 1,2,1,4000,1,5,2*0,
583 & 2,2,1,4000,1,5,2*0, 2,2,1,4000,1,5,2*0, 1,1,1,200,4*0,
584 & 2,1,1,200,4*0, 1,1,1,200,4*0, 2,1,1,200,4*0,
585 & 1,2,1,500,1,3,2*0, 2,2,1,500,1,4,2*0, 2,1,1,2000,4*0,
586 & 2,2,1,4,1,4,2*0, 1,2,1,500,1,3,2*0, 1,2,1,2000,1,2,2*0,
587 & 2,1,1,2000,4*0, 1,2,1,2000,1,5,2*0, 3,1,1,500,4*0,
588 & 1,1,1,6,4*0, 2,1,1,100,4*0,
589 & 1,7*0, 1,1,1,200,4*0, 1,2,1,2,-40,40,2*0, 2,1,1,200,4*0,
590 & 1,1,1,200,4*0, 2,1,1,200,4*0, 1,1,1,200,4*0, 2,1,1,200,4*0,
591 & 1,1,1,400,4*0, 2,1,1,400,4*0, 1,1,1,200,4*0,
592 & 1,2,1,200,1,2,2*0, 2,2,1,200,1,20,2*0, 1,3,1,40,1,4,1,2,
593 & 2,2,1,2,-40,40,2*0, 1,2,1,1000,1,3,2*0, 2,1,1,1000,4*0,
594 & 2,2,21,40,0,40,2*0, 2,2,21,40,0,40,2*0, 2,2,21,40,1,3,2*0,
595 & 1,2,0,200,1,3,2*0, 2,2,0,200,1,3,2*0, 4,1,0,200,4*0,
597 DATA chalp/
'abcdefghijklmnopqrstuvwxyz',
598 &
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
601 IF(mstu(12).GE.1) CALL
lulist(0)
605 IF(chbit(lbit:lbit).EQ.
' ') goto 100
608 IF(chbit(lcom:lcom).EQ.
' ') goto 110
610 chfix(ltot:ltot)=chbit(lcom:lcom)
615 IF(lhig.LE.ltot.AND.chfix(lhig:lhig).NE.
';') goto 130
617 chbit(1:lbit)=chfix(llow+1:lhig-1)
622 IF(chbit(lnam:lnam).NE.
'('.AND.chbit(lnam:lnam).NE.
'='.AND.
624 chnam=chbit(1:lnam-1)//
' '
627 IF(chnam(lcom:lcom).EQ.chalp(1)(lalp:lalp)) chnam(lcom:lcom)=
633 IF(chnam.EQ.chvar(iv)) ivar=iv
636 CALL
luerrm(18,
'(LUGIVE:) do not recognize variable '//chnam)
638 IF(llow.LT.ltot) goto 120
647 IF(chbit(lnam:lnam).EQ.
'(')
THEN
650 IF(chbit(lind:lind).NE.
')'.AND.chbit(lind:lind).NE.
',') goto 180
652 IF((chbit(lnam+1:lnam+1).EQ.
'C'.OR.chbit(lnam+1:lnam+1).EQ.
'c').
653 & and.(ivar.EQ.9.OR.ivar.EQ.10.OR.ivar.EQ.13.OR.ivar.EQ.17))
THEN
654 chind(lnam-lind+11:8)=chbit(lnam+2:lind-1)
655 READ(chind,
'(I8)') kf
657 ELSEIF(chbit(lnam+1:lnam+1).EQ.
'C'.OR.chbit(lnam+1:lnam+1).EQ.
659 CALL
luerrm(18,
'(LUGIVE:) not allowed to use C index for '//
662 IF(llow.LT.ltot) goto 120
665 chind(lnam-lind+10:8)=chbit(lnam+1:lind-1)
666 READ(chind,
'(I8)') i1
669 IF(chbit(lnam:lnam).EQ.
')') lnam=lnam+1
672 IF(chbit(lnam:lnam).EQ.
',')
THEN
675 IF(chbit(lind:lind).NE.
')'.AND.chbit(lind:lind).NE.
',') goto 190
677 chind(lnam-lind+10:8)=chbit(lnam+1:lind-1)
678 READ(chind,
'(I8)') i2
680 IF(chbit(lnam:lnam).EQ.
')') lnam=lnam+1
683 IF(chbit(lnam:lnam).EQ.
',')
THEN
686 IF(chbit(lind:lind).NE.
')'.AND.chbit(lind:lind).NE.
',') goto 200
688 chind(lnam-lind+10:8)=chbit(lnam+1:lind-1)
689 READ(chind,
'(I8)') i3
696 IF(nindx.NE.msvar(ivar,2)) ierr=1
697 IF(nindx.GE.1.AND.(i1.LT.msvar(ivar,3).OR.i1.GT.msvar(ivar,4)))
699 IF(nindx.GE.2.AND.(i2.LT.msvar(ivar,5).OR.i2.GT.msvar(ivar,6)))
701 IF(nindx.EQ.3.AND.(i3.LT.msvar(ivar,7).OR.i3.GT.msvar(ivar,8)))
703 IF(chbit(lnam:lnam).NE.
'=') ierr=5
705 CALL
luerrm(18,
'(LUGIVE:) unallowed indices for '//
708 IF(llow.LT.ltot) goto 120
715 ELSEIF(ivar.EQ.2)
THEN
717 ELSEIF(ivar.EQ.3)
THEN
719 ELSEIF(ivar.EQ.4)
THEN
721 ELSEIF(ivar.EQ.5)
THEN
723 ELSEIF(ivar.EQ.6)
THEN
725 ELSEIF(ivar.EQ.7)
THEN
727 ELSEIF(ivar.EQ.8)
THEN
729 ELSEIF(ivar.EQ.9)
THEN
731 ELSEIF(ivar.EQ.10)
THEN
733 ELSEIF(ivar.EQ.11)
THEN
735 ELSEIF(ivar.EQ.12)
THEN
737 ELSEIF(ivar.EQ.13)
THEN
739 ELSEIF(ivar.EQ.14)
THEN
741 ELSEIF(ivar.EQ.15)
THEN
743 ELSEIF(ivar.EQ.16)
THEN
745 ELSEIF(ivar.EQ.17)
THEN
747 ELSEIF(ivar.EQ.18)
THEN
749 ELSEIF(ivar.EQ.19)
THEN
751 ELSEIF(ivar.EQ.20)
THEN
753 ELSEIF(ivar.EQ.21)
THEN
755 ELSEIF(ivar.EQ.22)
THEN
757 ELSEIF(ivar.EQ.23)
THEN
759 ELSEIF(ivar.EQ.24)
THEN
761 ELSEIF(ivar.EQ.25)
THEN
763 ELSEIF(ivar.EQ.26)
THEN
765 ELSEIF(ivar.EQ.27)
THEN
767 ELSEIF(ivar.EQ.28)
THEN
769 ELSEIF(ivar.EQ.29)
THEN
771 ELSEIF(ivar.EQ.30)
THEN
773 ELSEIF(ivar.EQ.31)
THEN
775 ELSEIF(ivar.EQ.32)
THEN
777 ELSEIF(ivar.EQ.33)
THEN
779 ELSEIF(ivar.EQ.34)
THEN
781 ELSEIF(ivar.EQ.35)
THEN
783 ELSEIF(ivar.EQ.36)
THEN
785 ELSEIF(ivar.EQ.37)
THEN
787 ELSEIF(ivar.EQ.38)
THEN
789 ELSEIF(ivar.EQ.39)
THEN
791 ELSEIF(ivar.EQ.40)
THEN
793 ELSEIF(ivar.EQ.41)
THEN
795 ELSEIF(ivar.EQ.42)
THEN
797 ELSEIF(ivar.EQ.43)
THEN
802 IF(lnam.GE.lbit)
THEN
804 chbit(15:60)=
' has the value '
805 IF(msvar(ivar,1).EQ.1)
THEN
806 WRITE(chbit(51:60),
'(I10)') iold
807 ELSEIF(msvar(ivar,1).EQ.2)
THEN
808 WRITE(chbit(47:60),
'(F14.5)') rold
809 ELSEIF(msvar(ivar,1).EQ.3)
THEN
814 IF(mstu(13).GE.1)
WRITE(mstu(11),5000) chbit(1:60)
816 IF(llow.LT.ltot) goto 120
821 IF(msvar(ivar,1).EQ.1)
THEN
823 chini(lnam-lbit+11:10)=chbit(lnam+1:lbit)
824 READ(chini,
'(I10)') inew
825 ELSEIF(msvar(ivar,1).EQ.2)
THEN
827 chinr(lnam-lbit+17:16)=chbit(lnam+1:lbit)
828 READ(chinr,
'(F16.2)') rnew
829 ELSEIF(msvar(ivar,1).EQ.3)
THEN
830 chnew=chbit(lnam+1:lbit)//
' '
832 chnew2=chbit(lnam+1:lbit)//
' '
838 ELSEIF(ivar.EQ.2)
THEN
840 ELSEIF(ivar.EQ.3)
THEN
842 ELSEIF(ivar.EQ.4)
THEN
844 ELSEIF(ivar.EQ.5)
THEN
846 ELSEIF(ivar.EQ.6)
THEN
848 ELSEIF(ivar.EQ.7)
THEN
850 ELSEIF(ivar.EQ.8)
THEN
852 ELSEIF(ivar.EQ.9)
THEN
854 ELSEIF(ivar.EQ.10)
THEN
856 ELSEIF(ivar.EQ.11)
THEN
858 ELSEIF(ivar.EQ.12)
THEN
860 ELSEIF(ivar.EQ.13)
THEN
862 ELSEIF(ivar.EQ.14)
THEN
864 ELSEIF(ivar.EQ.15)
THEN
866 ELSEIF(ivar.EQ.16)
THEN
868 ELSEIF(ivar.EQ.17)
THEN
870 ELSEIF(ivar.EQ.18)
THEN
872 ELSEIF(ivar.EQ.19)
THEN
874 ELSEIF(ivar.EQ.20)
THEN
876 ELSEIF(ivar.EQ.21)
THEN
878 ELSEIF(ivar.EQ.22)
THEN
880 ELSEIF(ivar.EQ.23)
THEN
882 ELSEIF(ivar.EQ.24)
THEN
884 ELSEIF(ivar.EQ.25)
THEN
886 ELSEIF(ivar.EQ.26)
THEN
888 ELSEIF(ivar.EQ.27)
THEN
890 ELSEIF(ivar.EQ.28)
THEN
892 ELSEIF(ivar.EQ.29)
THEN
894 ELSEIF(ivar.EQ.30)
THEN
896 ELSEIF(ivar.EQ.31)
THEN
898 ELSEIF(ivar.EQ.32)
THEN
900 ELSEIF(ivar.EQ.33)
THEN
902 ELSEIF(ivar.EQ.34)
THEN
904 ELSEIF(ivar.EQ.35)
THEN
906 ELSEIF(ivar.EQ.36)
THEN
908 ELSEIF(ivar.EQ.37)
THEN
910 ELSEIF(ivar.EQ.38)
THEN
912 ELSEIF(ivar.EQ.39)
THEN
914 ELSEIF(ivar.EQ.40)
THEN
916 ELSEIF(ivar.EQ.41)
THEN
918 ELSEIF(ivar.EQ.42)
THEN
920 ELSEIF(ivar.EQ.43)
THEN
926 chbit(15:60)=
' changed from to '
927 IF(msvar(ivar,1).EQ.1)
THEN
928 WRITE(chbit(33:42),
'(I10)') iold
929 WRITE(chbit(51:60),
'(I10)') inew
930 IF(mstu(13).GE.1)
WRITE(mstu(11),5000) chbit(1:60)
931 ELSEIF(msvar(ivar,1).EQ.2)
THEN
932 WRITE(chbit(29:42),
'(F14.5)') rold
933 WRITE(chbit(47:60),
'(F14.5)') rnew
934 IF(mstu(13).GE.1)
WRITE(mstu(11),5000) chbit(1:60)
935 ELSEIF(msvar(ivar,1).EQ.3)
THEN
938 IF(mstu(13).GE.1)
WRITE(mstu(11),5000) chbit(1:60)
940 chbit(15:88)=
' changed from '//chold2//
' to '//chnew2
941 IF(mstu(13).GE.1)
WRITE(mstu(11),5100) chbit(1:88)
944 IF(llow.LT.ltot) goto 120
958 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
959 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
960 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
961 common/ludat3/
mdcy(500,3),
mdme(2000,2),
brat(2000),kfdp(2000,5)
962 SAVE /lujets/,/ludat1/,/ludat2/,/ludat3/
967 IF(mstu(12).GE.1) CALL
lulist(0)
972 IF(mstu(17).LE.0) mstu(90)=0
983 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 130
985 ps(1,j)=ps(1,j)+
p(i,j)
1005 ELSEIF(kchg(kc,2).EQ.0)
THEN
1006 IF(mstj(21).GE.1.AND.
mdcy(kc,1).GE.1.AND.(mstj(51).LE.0.OR.mbe
1007 & .EQ.2.OR.pmas(kc,2).GE.parj(91).OR.iabs(
k(
ip,2)).EQ.311))
1011 IF(mstj(92).GT.0)
THEN
1013 qmax=sqrt(
max(0.,(
p(ip1,4)+
p(ip1+1,4))**2-(
p(ip1,1)+
p(ip1+1,
1014 & 1))**2-(
p(ip1,2)+
p(ip1+1,2))**2-(
p(ip1,3)+
p(ip1+1,3))**2))
1015 CALL
lushow(ip1,ip1+1,qmax)
1018 ELSEIF(mstj(92).LT.0)
THEN
1026 ELSEIF(
k(
ip,1).EQ.1.OR.
k(
ip,1).EQ.2)
THEN
1028 IF(mfrag.GE.1.AND.
k(
ip,1).EQ.1) mfrag=2
1029 IF(mstj(21).GE.2.AND.
k(
ip,1).EQ.2.AND.
n.GT.
ip)
THEN
1030 IF(
k(
ip+1,1).EQ.1.AND.
k(
ip+1,3).EQ.
k(
ip,3).AND.
1031 &
k(
ip,3).GT.0.AND.
k(
ip,3).LT.
ip)
THEN
1037 IF(mfrag.EQ.2.AND.
k(
ip,1).EQ.1) mcons=0
1038 IF(mfrag.EQ.2.AND.(mstj(3).LE.0.OR.mod(mstj(3),5).EQ.0)) mcons=0
1042 IF(mstu(24).NE.0.AND.mstu(21).GE.2)
THEN
1043 ELSEIF(
ip.LT.
n.AND.
n.LT.mstu(4)-20-mstu(32))
THEN
1045 ELSEIF(
ip.LT.
n)
THEN
1046 CALL
luerrm(11,
'(LUEXEC:) no more memory left in LUJETS')
1050 IF(mbe.EQ.1.AND.mstj(51).GE.1)
THEN
1057 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 170
1059 ps(2,j)=ps(2,j)+
p(i,j)
1061 ps(2,6)=ps(2,6)+
luchge(
k(i,2))
1063 pdev=(abs(ps(2,1)-ps(1,1))+abs(ps(2,2)-ps(1,2))+abs(ps(2,3)-
1064 &ps(1,3))+abs(ps(2,4)-ps(1,4)))/(1.+abs(ps(2,4))+abs(ps(1,4)))
1065 IF(mcons.EQ.1.AND.pdev.GT.paru(11)) CALL
luerrm(15,
1066 &
'(LUEXEC:) four-momentum was not conserved')
1067 IF(mcons.EQ.1.AND.abs(ps(2,6)-ps(1,6)).GT.0.1) CALL
luerrm(15,
1068 &
'(LUEXEC:) charge was not conserved')
1083 IMPLICIT DOUBLE PRECISION(
d)
1086 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
1087 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
1088 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
1089 common/ludat3/
mdcy(500,3),
mdme(2000,2),
brat(2000),kfdp(2000,5)
1090 SAVE /lujets/,/ludat1/,/ludat2/,/ludat3/
1092 dimension dps(5),dpc(5),ue(3),pg(5),
1093 &e1(3),e2(3),e3(3),e4(3),ecl(3)
1096 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)
1102 IF(
k(i,1).NE.3) goto 120
1104 IF(kc.EQ.0) goto 120
1106 IF(kq.EQ.0.OR.(mqgst.EQ.1.AND.kq.EQ.2)) goto 120
1110 IF(kq*isign(1,
k(i,2)).LT.0) kcs=5
1114 IF(nstp.GT.4*
n)
THEN
1115 CALL
luerrm(14,
'(LUPREP:) caught in infinite loop')
1120 IF(
k(ia,1).EQ.3)
THEN
1121 IF(i1.GE.mstu(4)-mstu(32)-5)
THEN
1122 CALL
luerrm(11,
'(LUPREP:) no more memory left in LUJETS')
1127 IF(nstp.GE.2.AND.kchg(
lucomp(
k(ia,2)),2).NE.2)
k(i1,1)=1
1137 IF(
k(i1,1).EQ.1) goto 120
1142 IF(mod(
k(ib,kcs)/mstu(5)**2,2).EQ.0.AND.mod(
k(ib,kcs),mstu(5))
1144 ia=mod(
k(ib,kcs),mstu(5))
1145 k(ib,kcs)=
k(ib,kcs)+mstu(5)**2
1148 IF(
k(ib,kcs).GE.2*mstu(5)**2.OR.mod(
k(ib,kcs)/mstu(5),
1149 & mstu(5)).EQ.0) kcs=9-kcs
1150 ia=mod(
k(ib,kcs)/mstu(5),mstu(5))
1151 k(ib,kcs)=
k(ib,kcs)+2*mstu(5)**2
1154 IF(ia.LE.0.OR.ia.GT.
n)
THEN
1155 CALL
luerrm(12,
'(LUPREP:) colour rearrangement failed')
1158 IF(mod(
k(ia,4)/mstu(5),mstu(5)).EQ.ib.OR.mod(
k(ia,5)/mstu(5),
1159 & mstu(5)).EQ.ib)
THEN
1160 IF(mrev.EQ.1) kcs=9-kcs
1161 IF(mod(
k(ia,kcs)/mstu(5),mstu(5)).NE.ib) kcs=9-kcs
1162 k(ia,kcs)=
k(ia,kcs)+2*mstu(5)**2
1164 IF(mrev.EQ.0) kcs=9-kcs
1165 IF(mod(
k(ia,kcs),mstu(5)).NE.ib) kcs=9-kcs
1166 k(ia,kcs)=
k(ia,kcs)+mstu(5)**2
1168 IF(ia.NE.i) goto 100
1175 IF(mstj(14).LT.0)
RETURN
1176 IF(mstj(14).EQ.0) goto 540
1184 IF(
k(i,1).NE.1.AND.
k(i,1).NE.2)
THEN
1185 ELSEIF(
k(i,1).EQ.2.AND.ic.EQ.0)
THEN
1193 ELSEIF(
k(i,1).EQ.2)
THEN
1195 dps(j)=dps(j)+
p(i,j)
1197 ELSEIF(ic.NE.0.AND.kchg(
lucomp(
k(i,2)),2).NE.0)
THEN
1199 dps(j)=dps(j)+
p(i,j)
1203 pd=sqrt(
max(0d0,dps(4)**2-dps(1)**2-dps(2)**2-dps(3)**2))-
1205 IF(pd.LT.pdmin)
THEN
1220 IF(pdmin.GE.parj(32)) goto 540
1224 pecm=sqrt(
max(0d0,dpc(4)**2-dpc(1)**2-dpc(2)**2-dpc(3)**2))
1240 IF(mstu(16).NE.2)
THEN
1259 IF(iabs(
k(ic1,2)).NE.21)
THEN
1262 IF(kc1.EQ.0.OR.kc2.EQ.0) goto 540
1263 kq1=kchg(kc1,2)*isign(1,
k(ic1,2))
1264 kq2=kchg(kc2,2)*isign(1,
k(ic2,2))
1265 IF(kq1+kq2.NE.0) goto 540
1268 IF(iabs(
k(ic2,2)).GT.10)
k1=
k(ic2,2)
1271 CALL
ludcyk(
k(ic1,2)+
k(ic2,2)-
k1,-kfln,kfldmp,
k(
n+3,2))
1272 IF(
k(
n+2,2).EQ.0.OR.
k(
n+3,2).EQ.0) goto 210
1275 IF(iabs(
k(ic2,2)).NE.21) goto 540
1278 220 CALL
ludcyk(1+int((2.+parj(2))*
rlu(0)),0,kfln,kfdmp)
1280 CALL
ludcyk(-kfln,-kflm,kfldmp,
k(
n+3,2))
1281 IF(
k(
n+2,2).EQ.0.OR.
k(
n+3,2).EQ.0) goto 220
1288 IF(
p(
n+2,5)+
p(
n+3,5)+parj(64).GE.pecm)
THEN
1289 IF(ntry.LT.mstj(17))
THEN
1291 ELSEIF(nsin.EQ.1)
THEN
1304 DO 250 i=ic1+1,ic2-1
1305 IF((
k(i,1).EQ.1.OR.
k(i,1).EQ.2).AND.
1306 & kchg(
lucomp(
k(i,2)),2).NE.0)
THEN
1309 p(
n+2,j)=
p(
n+2,j)+frac1*
p(i,j)
1313 CALL
pyrobo(
n+2,
n+2,0.,0.,-sngl(dpc(1)/dpc(4)),
1314 &-sngl(dpc(2)/dpc(4)),
1315 &-sngl(dpc(3)/dpc(4)))
1320 pa=sqrt((pecm**2-(
p(
n+2,5)+
p(
n+3,5))**2)*(pecm**2-
1321 &(
p(
n+2,5)-
p(
n+3,5))**2))/(2.*pecm)
1323 pt2=(1.-ue(3)**2)*pa**2
1324 IF(mstj(16).LE.0)
THEN
1327 IF(exp(-
pt2/(2.*parj(21)**2)).LT.
rlu(0)) goto 260
1330 alambd=sqrt(
max(0.,(pecm**2-pr1-pr2)**2-4.*pr1*pr2))
1332 IF(mstj(11).EQ.2) prevcf=parj(39)
1333 prev=1./(1.+exp(
min(50.,prevcf*alambd)))
1335 IF(
rlu(0).LT.
prev) ue(3)=-ue(3)
1337 ue(1)=sqrt(1.-ue(3)**2)*
cos(
phi)
1338 ue(2)=sqrt(1.-ue(3)**2)*sin(
phi)
1343 p(
n+2,4)=sqrt(pa**2+
p(
n+2,5)**2)
1344 p(
n+3,4)=sqrt(pa**2+
p(
n+3,5)**2)
1347 CALL
pyrobo(
n+2,
n+3,the1,phi1,sngl(dpc(1)/dpc(4)),
1348 &sngl(dpc(2)/dpc(4)),
1349 &sngl(dpc(3)/dpc(4)))
1367 310
IF(iabs(
k(ic1,2)).GT.100.AND.iabs(
k(ic2,2)).GT.100)
THEN
1369 ELSEIF(iabs(
k(ic1,2)).NE.21)
THEN
1370 CALL
lukfdi(
k(ic1,2),
k(ic2,2),kfldmp,
k(
n+2,2))
1372 kfln=1+int((2.+parj(2))*
rlu(0))
1373 CALL
lukfdi(kfln,-kfln,kfldmp,
k(
n+2,2))
1375 IF(
k(
n+2,2).EQ.0) goto 310
1379 IF (mstj(16).LE.0) goto 480
1387 IF(i1.GE.ic1-1.AND.i1.LE.ic2)
THEN
1389 ELSEIF(
k(i1,1).EQ.2)
THEN
1393 IF(
k(i2,1).GT.10) goto 320
1394 IF(kchg(
lucomp(
k(i2,2)),2).EQ.0) goto 320
1398 e1(j)=
p(i1,j)/
p(i1,4)
1399 e2(j)=
p(i2,j)/
p(i2,4)
1400 ecl(j)=
p(
n+1,j)/
p(
n+1,4)
1406 e3s=e3(1)**2+e3(2)**2+e3(3)**2
1407 e4s=e4(1)**2+e4(2)**2+e4(3)**2
1408 e34=e3(1)*e4(1)+e3(2)*e4(2)+e3(3)*e4(3)
1411 ELSEIF(e34.LT.e3s)
THEN
1412 ddmin=e4s-e34**2/e3s
1414 ddmin=e4s-2.*e34+e3s
1418 IF(ddmin.LT.dglomi)
THEN
1423 ELSEIF(
k(i1,1).EQ.1.AND.kchg(
lucomp(
k(i1,2)),2).NE.0)
THEN
1429 IF (ibeg.EQ.0) goto 480
1432 IF (
p(
n+1,5).GE.
p(
n+2,5))
THEN
1435 frac=
p(
n+2,5)/
p(
n+1,5)
1437 p(
n+2,j)=frac*
p(
n+1,j)
1438 pg(j)=(1.-frac)*
p(
n+1,j)
1445 IF(
k(i,1).NE.1.AND.
k(i,1).NE.2) goto 360
1446 IF(kchg(
lucomp(
k(i,2)),2).EQ.0) goto 360
1467 IF(
k(i,1).EQ.12) goto 360
1478 IF(
k(i,1).NE.1.AND.
k(i,1).NE.2) goto 390
1479 IF(kchg(
lucomp(
k(i,2)),2).EQ.0) goto 390
1491 IF(
k(i,1).EQ.12) goto 390
1496 p(nsav+2,j)=
p(nsav+1,j)
1500 420
IF(mstj(16).EQ.1)
THEN
1508 pg(j)=alpha*
p(i1,j)+beta*
p(i2,j)
1510 pg(5)=sqrt(
max(1e-20,pg(4)**2-pg(1)**2-pg(2)**2-pg(3)**2))
1513 pmscol=
p(nsav+2,4)**2-
p(nsav+2,1)**2-
p(nsav+2,2)**2-
1515 pclpg=(
p(nsav+2,4)*pg(4)-
p(nsav+2,1)*pg(1)-
1516 &
p(nsav+2,2)*pg(2)-
p(nsav+2,3)*pg(3))/pg(5)**2
1517 delta=sqrt(pclpg**2+(
p(nsav+2,5)**2-pmscol)/pg(5)**2)-pclpg
1521 IF(delta*alpha.GT.1..AND.i1.GT.nsav+3)
THEN
1524 p(nsav+2,j)=
p(nsav+2,j)+
p(i1,j)
1531 IF(delta*beta.GT.1..AND.i2.LT.
n)
THEN
1534 p(nsav+2,j)=
p(nsav+2,j)+
p(i2,j)
1541 IF(
iter.EQ.1) goto 420
1544 IF((1.-delta*alpha)*
p(i1,4).LT.
p(i1,5).OR.
1545 & (1.-delta*beta)*
p(i2,4).LT.
p(i2,5))
THEN
1558 p(nsav+2,j)=
p(nsav+2,j)+delta*pg(j)
1559 p(i1,j)=(1.-delta*alpha)*
p(i1,j)
1560 p(i2,j)=(1.-delta*beta)*
p(i2,j)
1562 p(i1,5)=(1.-delta*alpha)*
p(i1,5)
1563 p(i2,5)=(1.-delta*beta)*
p(i2,5)
1576 IF(
ir.NE.0) goto 500
1578 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10.OR.(i.GE.ic1.AND.i.LE.ic2
1579 & .AND.
k(i,1).GE.1.AND.
k(i,1).LE.2)) goto 490
1580 IF(mcomb.EQ.1) kci=
lucomp(
k(i,2))
1581 IF(mcomb.EQ.1.AND.kci.EQ.0) goto 490
1582 IF(mcomb.EQ.1.AND.kchg(kci,2).EQ.0.AND.i.LE.ns) goto 490
1583 IF(mcomb.EQ.2.AND.iabs(
k(i,2)).GT.10.AND.iabs(
k(i,2)).LE.100)
1585 hcr=dpc(4)*
p(i,4)-dpc(1)*
p(i,1)-dpc(2)*
p(i,2)-dpc(3)*
p(i,3)
1586 hsr=2.*hcr+pecm**2-
p(
n+2,5)**2-2.*
p(
n+2,5)*
p(i,5)
1600 hk2=0.5*(hb*sqrt(
max(0.,((hb+hc)**2-4.*(hb+hd)*
p(
n+2,5)**2)/
1601 & (ha**2-(pecm*
p(
ir,5))**2)))-(hb+hc))/(hb+hd)
1602 hk1=(0.5*(
p(
n+2,5)**2-pecm**2)+hd*hk2)/hb
1604 p(
n+2,j)=(1.+hk1)*dpc(j)-hk2*
p(
ir,j)
1605 p(
ir,j)=(1.+hk2)*
p(
ir,j)-hk1*dpc(j)
1609 CALL
luerrm(3,
'(LUPREP:) no match for collapsing cluster')
1614 520
DO 530 i=ic1,ic2
1615 IF((
k(i,1).EQ.1.OR.
k(i,1).EQ.2).AND.
1616 & kchg(
lucomp(
k(i,2)),2).NE.0)
THEN
1618 IF(mstu(16).NE.2)
THEN
1627 IF(
n.LT.mstu(4)-mstu(32)-5) goto 140
1637 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 580
1639 IF(kc.EQ.0) goto 580
1640 kq=kchg(kc,2)*isign(1,
k(i,2))
1641 IF(kq.EQ.0) goto 580
1650 dps(j)=dps(j)+
p(i,j)
1652 IF(
k(i,1).EQ.1)
THEN
1653 IF(
np.NE.1.AND.(kfn.EQ.1.OR.kfn.GE.3.OR.kqs.NE.0)) CALL
1654 &
luerrm(2,
'(LUPREP:) unphysical flavour combination')
1655 IF(
np.NE.1.AND.dps(4)**2-dps(1)**2-dps(2)**2-dps(3)**2.LT.
1656 & (0.9*parj(32)+dps(5))**2)
THEN
1657 CALL
luerrm(3,
'(LUPREP:) too small mass in jet system')
1676 IMPLICIT DOUBLE PRECISION(
d)
1677 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
1678 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
1679 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
1680 SAVE /lujets/,/ludat1/,/ludat2/
1681 dimension dps(5),kfl(3),pmq(3),px(3),py(3),gam(3),ie(2),pr(2),
1682 &
in(9),dhm(4),dhg(4),dp(5,5),irank(2),mju(4),iju(3),pju(5,5),
1683 &tju(5),kfjh(2),njs(2),kfjs(2),pjs(4,5),mstu9t(8),paru9t(8)
1686 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)
1687 dfour(i,j)=dp(i,4)*dp(j,4)-dp(i,1)*dp(j,1)-dp(i,2)*dp(j,2)-
1703 IF(i.GT.
min(
n,mstu(4)-mstu(32)))
THEN
1704 CALL
luerrm(12,
'(LUSTRF:) failed to reconstruct jet system')
1705 IF(mstu(21).GE.1)
RETURN
1707 IF(
k(i,1).NE.1.AND.
k(i,1).NE.2.AND.
k(i,1).NE.41) goto 110
1709 IF(kc.EQ.0) goto 110
1710 kq=kchg(kc,2)*isign(1,
k(i,2))
1711 IF(kq.EQ.0) goto 110
1712 IF(
n+5*
np+11.GT.mstu(4)-mstu(32)-5)
THEN
1713 CALL
luerrm(11,
'(LUSTRF:) no more memory left in LUJETS')
1714 IF(mstu(21).GE.1)
RETURN
1722 IF(j.NE.4) dps(j)=dps(j)+
p(i,j)
1724 dps(4)=dps(4)+sqrt(dble(
p(i,1))**2+dble(
p(i,2))**2+
1725 &dble(
p(i,3))**2+dble(
p(i,5))**2)
1727 IF(kq.NE.2) kqsum=kqsum+kq
1728 IF(
k(i,1).EQ.41)
THEN
1730 IF(kqsum.EQ.kq) mju(1)=
n+
np
1731 IF(kqsum.NE.kq) mju(2)=
n+
np
1733 IF(
k(i,1).EQ.2.OR.
k(i,1).EQ.41) goto 110
1735 CALL
luerrm(12,
'(LUSTRF:) unphysical flavour combination')
1736 IF(mstu(21).GE.1)
RETURN
1740 IF(abs(dps(3)).LT.0.99d0*dps(4))
THEN
1743 CALL ludbrb(
n+1,
n+
np,0.,0.,-dps(1)/dps(4),-dps(2)/dps(4),
1747 hhbz=sqrt(
max(1
d-6,dps(4)+dps(3))/
max(1
d-6,dps(4)-dps(3)))
1749 hhpmt=
p(i,1)**2+
p(i,2)**2+
p(i,5)**2
1750 IF(
p(i,3).GT.0.)
THEN
1751 hhpez=(
p(i,4)+
p(i,3))/hhbz
1752 p(i,3)=0.5*(hhpez-hhpmt/hhpez)
1753 p(i,4)=0.5*(hhpez+hhpmt/hhpez)
1755 hhpez=(
p(i,4)-
p(i,3))*hhbz
1756 p(i,3)=-0.5*(hhpez-hhpmt/hhpez)
1757 p(i,4)=0.5*(hhpez+hhpmt/hhpez)
1769 140
IF(nr.GE.3)
THEN
1772 IF(i.EQ.
n+nr.AND.iabs(
k(
n+1,2)).NE.21) goto 150
1774 IF(i.EQ.
n+nr) i1=
n+1
1775 IF(
k(i,1).EQ.41.OR.
k(i1,1).EQ.41) goto 150
1776 IF(mju(1).NE.0.AND.i1.LT.mju(1).AND.iabs(
k(i1,2)).NE.21)
1778 IF(mju(2).NE.0.AND.i.GT.mju(2).AND.iabs(
k(i,2)).NE.21) goto 150
1779 pap=sqrt((
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)*(
p(i1,1)**2+
1780 &
p(i1,2)**2+
p(i1,3)**2))
1781 pvp=
p(i,1)*
p(i1,1)+
p(i,2)*
p(i1,2)+
p(i,3)*
p(i1,3)
1782 pdr=4.*(pap-pvp)**2/
max(1e-6,paru13**2*pap+2.*(pap-pvp))
1783 IF(
pdr.LT.pdrmin)
THEN
1790 IF(pdrmin.LT.paru12.AND.
ir.EQ.
n+nr)
THEN
1792 p(
n+1,j)=
p(
n+1,j)+
p(
n+nr,j)
1794 p(
n+1,5)=sqrt(
max(0.,
p(
n+1,4)**2-
p(
n+1,1)**2-
p(
n+1,2)**2-
1798 ELSEIF(pdrmin.LT.paru12)
THEN
1804 DO 190 i=
ir+1,
n+nr-1
1812 IF(mju(1).GT.
ir) mju(1)=mju(1)-1
1813 IF(mju(2).GT.
ir) mju(2)=mju(2)-1
1824 IF(ntry.GT.100.AND.ntryr.LE.4)
THEN
1828 ELSEIF(ntry.GT.100)
THEN
1829 CALL
luerrm(14,
'(LUSTRF:) caught in infinite loop')
1830 IF(mstu(21).GE.1)
RETURN
1834 IF(mju(1).EQ.0.AND.mju(2).EQ.0) goto 580
1837 IF(mju(jt).EQ.0) goto 570
1848 DO 240 i1=
n+1+(jt-1)*(nr-1),
n+nr+(jt-1)*(1-nr),js
1849 IF(
k(i1,2).NE.21.AND.iu.LE.2)
THEN
1854 pju(iu,j)=pju(iu,j)+
p(i1,j)
1858 pju(iu,5)=sqrt(pju(iu,1)**2+pju(iu,2)**2+pju(iu,3)**2)
1860 IF(
k(iju(3),2)/100.NE.10*
k(iju(1),2)+
k(iju(2),2).AND.
1861 &
k(iju(3),2)/100.NE.10*
k(iju(2),2)+
k(iju(1),2))
THEN
1862 CALL
luerrm(12,
'(LUSTRF:) unphysical flavour combination')
1863 IF(mstu(21).GE.1)
RETURN
1867 t12=(pju(1,1)*pju(2,1)+pju(1,2)*pju(2,2)+pju(1,3)*pju(2,3))/
1868 &(pju(1,5)*pju(2,5))
1869 t13=(pju(1,1)*pju(3,1)+pju(1,2)*pju(3,2)+pju(1,3)*pju(3,3))/
1870 &(pju(1,5)*pju(3,5))
1871 t23=(pju(2,1)*pju(3,1)+pju(2,2)*pju(3,2)+pju(2,3)*pju(3,3))/
1872 &(pju(2,5)*pju(3,5))
1873 t11=sqrt((2./3.)*(1.-t12)*(1.-t13)/(1.-t23))
1874 t22=sqrt((2./3.)*(1.-t12)*(1.-t23)/(1.-t13))
1875 tsq=sqrt((2.*t11*t22+t12-1.)*(1.+t12))
1876 t1f=(tsq-t22*(1.+t12))/(1.-t12**2)
1877 t2f=(tsq-t11*(1.+t12))/(1.-t12**2)
1879 tju(j)=-(t1f*pju(1,j)/pju(1,5)+t2f*pju(2,j)/pju(2,5))
1881 tju(4)=sqrt(1.+tju(1)**2+tju(2)**2+tju(3)**2)
1883 pju(iu,5)=tju(4)*pju(iu,4)-tju(1)*pju(iu,1)-tju(2)*pju(iu,2)-
1888 IF(pju(1,5)+pju(2,5).GT.pju(1,4)+pju(2,4))
THEN
1901 ns=js*(iju(iu+1)-iju(iu))
1908 dp(1,j)=0.5*
p(is1,j)
1909 IF(
is.EQ.1) dp(1,j)=
p(is1,j)
1910 dp(2,j)=0.5*
p(is2,j)
1911 IF(
is.EQ.ns) dp(2,j)=-pju(iu,j)
1913 IF(
is.EQ.ns) dp(2,4)=sqrt(pju(iu,1)**2+pju(iu,2)**2+pju(iu,3)**2)
1914 IF(
is.EQ.ns) dp(2,5)=0.
1918 IF(dp(3,5)+2.*dhkc+dp(4,5).LE.0.)
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)
1925 dhks=sqrt(dhkc**2-dp(3,5)*dp(4,5))
1926 dhk1=0.5*((dp(4,5)+dhkc)/dhks-1.)
1927 dhk2=0.5*((dp(3,5)+dhkc)/dhks-1.)
1929 p(in1,5)=sqrt(dp(3,5)+2.*dhkc+dp(4,5))
1931 p(in1,j)=(1.+dhk1)*dp(1,j)-dhk2*dp(2,j)
1932 p(in1+1,j)=(1.+dhk2)*dp(2,j)-dhk1*dp(1,j)
1940 IF(ntry.GT.100.AND.ntryr.LE.4)
THEN
1944 ELSEIF(ntry.GT.100)
THEN
1945 CALL
luerrm(14,
'(LUSTRF:) caught in infinite loop')
1946 IF(mstu(21).GE.1)
RETURN
1951 ie(1)=
k(
n+1+(jt/2)*(
np-1),3)
1956 DO 330 in1=
n+nr+2+jq,
n+nr+4*ns-2+jq,4
1973 dp(2,j)=
p(
in(4)+1,j)
1977 dp(1,4)=sqrt(dp(1,1)**2+dp(1,2)**2+dp(1,3)**2)
1978 dp(2,4)=sqrt(dp(2,1)**2+dp(2,2)**2+dp(2,3)**2)
1979 dp(5,1)=dp(1,1)/dp(1,4)-dp(2,1)/dp(2,4)
1980 dp(5,2)=dp(1,2)/dp(1,4)-dp(2,2)/dp(2,4)
1981 dp(5,3)=dp(1,3)/dp(1,4)-dp(2,3)/dp(2,4)
1982 IF(dp(5,1)**2.LE.dp(5,2)**2+dp(5,3)**2) dp(3,1)=1.
1983 IF(dp(5,1)**2.GT.dp(5,2)**2+dp(5,3)**2) dp(3,3)=1.
1984 IF(dp(5,2)**2.LE.dp(5,1)**2+dp(5,3)**2) dp(4,2)=1.
1985 IF(dp(5,2)**2.GT.dp(5,1)**2+dp(5,3)**2) dp(4,3)=1.
1987 dhcx1=dfour(3,1)/dhc12
1988 dhcx2=dfour(3,2)/dhc12
1989 dhcxx=1d0/sqrt(1d0+2d0*dhcx1*dhcx2*dhc12)
1990 dhcy1=dfour(4,1)/dhc12
1991 dhcy2=dfour(4,2)/dhc12
1992 dhcyx=dhcxx*(dhcx1*dhcy2+dhcx2*dhcy1)*dhc12
1993 dhcyy=1d0/sqrt(1d0+2d0*dhcy1*dhcy2*dhc12-dhcyx**2)
1995 dp(3,j)=dhcxx*(dp(3,j)-dhcx2*dp(1,j)-dhcx1*dp(2,j))
1997 p(
in(6)+1,j)=dhcyy*(dp(4,j)-dhcy2*dp(1,j)-dhcy1*dp(2,j)-
2003 IF(2*i-nsav.GE.mstu(4)-mstu(32)-5)
THEN
2004 CALL
luerrm(11,
'(LUSTRF:) no more memory left in LUJETS')
2005 IF(mstu(21).GE.1)
RETURN
2014 390 CALL
lukfdi(kfl(1),0,kfl(3),
k(i,2))
2015 IF(
k(i,2).EQ.0) goto 320
2016 IF(mstj(12).GE.3.AND.irankj.EQ.1.AND.iabs(kfl(1)).LE.10.AND.
2017 &iabs(kfl(3)).GT.10)
THEN
2018 IF(
rlu(0).GT.parj(19)) goto 390
2021 CALL
luptdi(kfl(1),px(3),py(3))
2022 pr(1)=
p(i,5)**2+(px(1)+px(3))**2+(py(1)+py(3))**2
2023 CALL
luzdis(kfl(1),kfl(3),pr(1),
z)
2024 IF(iabs(kfl(1)).GE.4.AND.iabs(kfl(1)).LE.8.AND.
2025 &mstu(90).LT.8)
THEN
2030 gam(3)=(1.-
z)*(gam(1)+pr(1)/
z)
2036 IF(
in(1)+1.EQ.
in(2).AND.
z*
p(
in(1)+2,3)*
p(
in(2)+2,3)*
2037 &
p(
in(1),5)**2.GE.pr(1))
THEN
2039 p(
in(2)+2,4)=pr(1)/(
p(
in(1)+2,4)*
p(
in(1),5)**2)
2041 p(i,j)=(px(1)+px(3))*
p(
in(3),j)+(py(1)+py(3))*
p(
in(3)+1,j)
2044 ELSEIF(
in(1)+1.EQ.
in(2))
THEN
2045 p(
in(2)+2,4)=
p(
in(2)+2,3)
2048 IF(
in(2).GT.
n+nr+4*ns) goto 320
2050 p(
in(1)+2,4)=
p(
in(1)+2,3)
2057 420
IF(
in(1).GT.
n+nr+4*ns.OR.
in(2).GT.
n+nr+4*ns.OR.
2058 &
in(1).GT.
in(2)) goto 320
2059 IF(
in(1).NE.
in(4).OR.
in(2).NE.
in(5))
THEN
2066 dp(1,4)=sqrt(dp(1,1)**2+dp(1,2)**2+dp(1,3)**2)
2067 dp(2,4)=sqrt(dp(2,1)**2+dp(2,2)**2+dp(2,3)**2)
2069 IF(dhc12.LE.1e-2)
THEN
2070 p(
in(1)+2,4)=
p(
in(1)+2,3)
2076 dp(5,1)=dp(1,1)/dp(1,4)-dp(2,1)/dp(2,4)
2077 dp(5,2)=dp(1,2)/dp(1,4)-dp(2,2)/dp(2,4)
2078 dp(5,3)=dp(1,3)/dp(1,4)-dp(2,3)/dp(2,4)
2079 IF(dp(5,1)**2.LE.dp(5,2)**2+dp(5,3)**2) dp(3,1)=1.
2080 IF(dp(5,1)**2.GT.dp(5,2)**2+dp(5,3)**2) dp(3,3)=1.
2081 IF(dp(5,2)**2.LE.dp(5,1)**2+dp(5,3)**2) dp(4,2)=1.
2082 IF(dp(5,2)**2.GT.dp(5,1)**2+dp(5,3)**2) dp(4,3)=1.
2083 dhcx1=dfour(3,1)/dhc12
2084 dhcx2=dfour(3,2)/dhc12
2085 dhcxx=1d0/sqrt(1d0+2d0*dhcx1*dhcx2*dhc12)
2086 dhcy1=dfour(4,1)/dhc12
2087 dhcy2=dfour(4,2)/dhc12
2088 dhcyx=dhcxx*(dhcx1*dhcy2+dhcx2*dhcy1)*dhc12
2089 dhcyy=1d0/sqrt(1d0+2d0*dhcy1*dhcy2*dhc12-dhcyx**2)
2091 dp(3,j)=dhcxx*(dp(3,j)-dhcx2*dp(1,j)-dhcx1*dp(2,j))
2093 p(
in(3)+1,j)=dhcyy*(dp(4,j)-dhcy2*dp(1,j)-dhcy1*dp(2,j)-
2099 IF(abs(pxp**2+
pyp**2-px(3)**2-py(3)**2).LT.0.01)
THEN
2108 p(i,j)=px(1)*
p(
in(6),j)+py(1)*
p(
in(6)+1,j)+px(3)*
p(
in(3),j)+
2110 DO 450 in1=
in(4),
in(1)-4,4
2111 p(i,j)=
p(i,j)+
p(in1+2,3)*
p(in1,j)
2113 DO 460 in2=
in(5),
in(2)-4,4
2114 p(i,j)=
p(i,j)+
p(in2+2,3)*
p(in2,j)
2123 DO 490 in2=
in(1)+1,
in(2),4
2124 DO 480 in1=
in(1),in2-1,4
2125 dhc=2.*
four(in1,in2)
2126 dhg(1)=dhg(1)+
p(in1+2,1)*
p(in2+2,1)*dhc
2127 IF(in1.EQ.
in(1)) dhg(2)=dhg(2)-
p(in2+2,1)*dhc
2128 IF(in2.EQ.
in(2)) dhg(3)=dhg(3)+
p(in1+2,1)*dhc
2129 IF(in1.EQ.
in(1).AND.in2.EQ.
in(2)) dhg(4)=dhg(4)-dhc
2134 dhs1=dhm(3)*dhg(4)-dhm(4)*dhg(3)
2135 IF(abs(dhs1).LT.1e-4) goto 320
2136 dhs2=dhm(4)*(gam(3)-dhg(1))-dhm(2)*dhg(3)-dhg(4)*
2137 &(
p(i,5)**2-dhm(1))+dhg(2)*dhm(3)
2138 dhs3=dhm(2)*(gam(3)-dhg(1))-dhg(2)*(
p(i,5)**2-dhm(1))
2139 p(
in(2)+2,4)=0.5*(sqrt(
max(0d0,dhs2**2-4.*dhs1*dhs3))/abs(dhs1)-
2141 IF(dhm(2)+dhm(4)*
p(
in(2)+2,4).LE.0.) goto 320
2142 p(
in(1)+2,4)=(
p(i,5)**2-dhm(1)-dhm(3)*
p(
in(2)+2,4))/
2143 &(dhm(2)+dhm(4)*
p(
in(2)+2,4))
2146 IF(
p(
in(2)+2,4).GT.
p(
in(2)+2,3))
THEN
2147 p(
in(2)+2,4)=
p(
in(2)+2,3)
2150 IF(
in(2).GT.
n+nr+4*ns) goto 320
2152 p(
in(1)+2,4)=
p(
in(1)+2,3)
2157 ELSEIF(
p(
in(1)+2,4).GT.
p(
in(1)+2,3))
THEN
2158 p(
in(1)+2,4)=
p(
in(1)+2,3)
2167 pju(iu+3,j)=pju(iu+3,j)+
p(i,j)
2169 IF(
p(i,4).LT.
p(i,5)) goto 320
2170 pju(iu+3,5)=tju(4)*pju(iu+3,4)-tju(1)*pju(iu+3,1)-
2171 &tju(2)*pju(iu+3,2)-tju(3)*pju(iu+3,3)
2172 IF(pju(iu+3,5).LT.pju(iu,5))
THEN
2177 IF(
in(3).NE.
in(6))
THEN
2180 p(
in(6)+1,j)=
p(
in(3)+1,j)
2185 p(
in(jq)+2,3)=
p(
in(jq)+2,3)-
p(
in(jq)+2,4)
2186 p(
in(jq)+2,1)=
p(
in(jq)+2,1)-(3-2*jq)*
p(
in(jq)+2,4)
2192 IF(iabs(kfl(1)).GT.10) goto 320
2196 pju(iu+3,j)=pju(iu+3,j)-
p(i+1,j)
2202 kfjs(jt)=
k(
k(mju(jt+2),3),2)
2203 kfls=2*int(
rlu(0)+3.*parj(4)/(1.+3.*parj(4)))+1
2204 IF(kfjh(1).EQ.kfjh(2)) kfls=3
2205 IF(ista.NE.i) kfjs(jt)=isign(1000*
max(iabs(kfjh(1)),
2206 &iabs(kfjh(2)))+100*
min(iabs(kfjh(1)),iabs(kfjh(2)))+
2209 pjs(jt,j)=pju(1,j)+pju(2,j)+
p(mju(jt),j)
2210 pjs(jt+2,j)=pju(4,j)+pju(5,j)
2212 pjs(jt,5)=sqrt(
max(0.,pjs(jt,4)**2-pjs(jt,1)**2-pjs(jt,2)**2-
2217 580
IF(mju(1).NE.0.AND.mju(2).NE.0)
THEN
2220 ELSEIF(mju(1).NE.0)
THEN
2223 ELSEIF(mju(2).NE.0)
THEN
2226 ELSEIF(iabs(
k(
n+1,2)).NE.21)
THEN
2234 w2sum=w2sum+
p(
n+nr+
is,1)
2239 w2sum=w2sum-
p(
n+nr+nb,1)
2240 IF(w2sum.GT.w2ran.AND.nb.LT.nr) goto 600
2245 is1=
n+
is+nb-1-nr*((
is+nb-2)/nr)
2246 is2=
n+
is+nb-nr*((
is+nb-1)/nr)
2249 IF(iabs(
k(is1,2)).EQ.21) dp(1,j)=0.5*dp(1,j)
2250 IF(is1.EQ.mju(1)) dp(1,j)=pjs(1,j)-pjs(3,j)
2252 IF(iabs(
k(is2,2)).EQ.21) dp(2,j)=0.5*dp(2,j)
2253 IF(is2.EQ.mju(2)) dp(2,j)=pjs(2,j)-pjs(4,j)
2258 IF(dp(3,5)+2.*dhkc+dp(4,5).LE.0.)
THEN
2261 dp(1,4)=sqrt(dp(1,1)**2+dp(1,2)**2+dp(1,3)**2+dp(1,5)**2)
2262 dp(2,4)=sqrt(dp(2,1)**2+dp(2,2)**2+dp(2,3)**2+dp(2,5)**2)
2265 dhks=sqrt(dhkc**2-dp(3,5)*dp(4,5))
2266 dhk1=0.5*((dp(4,5)+dhkc)/dhks-1.)
2267 dhk2=0.5*((dp(3,5)+dhkc)/dhks-1.)
2269 p(in1,5)=sqrt(dp(3,5)+2.*dhkc+dp(4,5))
2271 p(in1,j)=(1.+dhk1)*dp(1,j)-dhk2*dp(2,j)
2272 p(in1+1,j)=(1.+dhk2)*dp(2,j)-dhk1*dp(1,j)
2280 IF(ntry.GT.100.AND.ntryr.LE.4)
THEN
2284 ELSEIF(ntry.GT.100)
THEN
2285 CALL
luerrm(14,
'(LUSTRF:) caught in infinite loop')
2286 IF(mstu(21).GE.1)
RETURN
2298 IF(mju(jt).NE.0) irank(jt)=njs(jt)
2299 IF(ns.GT.nr) irank(jt)=1
2300 ie(jt)=
k(
n+1+(jt/2)*(
np-1),3)
2301 in(3*jt+1)=
n+nr+1+4*(jt/2)*(ns-1)
2302 in(3*jt+2)=
in(3*jt+1)+1
2303 in(3*jt+3)=
n+nr+4*ns+2*jt-1
2304 DO 670 in1=
n+nr+2+jt,
n+nr+4*ns-2+jt,4
2315 IF(ns.EQ.1.AND.mju(1)+mju(2).EQ.0) CALL
luptdi(0,px(1),py(1))
2320 IF(mju(jt).NE.0) kfl(jt)=kfjs(jt)
2328 kfl(3)=int(1.+(2.+parj(2))*
rlu(0))*(-1)**int(
rlu(0)+0.5)
2329 CALL
lukfdi(kfl(3),0,kfl(1),kdump)
2331 IF(iabs(kfl(1)).GT.10.AND.
rlu(0).GT.0.5)
THEN
2332 kfl(2)=-(kfl(1)+isign(10000,kfl(1)))
2333 ELSEIF(iabs(kfl(1)).GT.10)
THEN
2334 kfl(1)=-(kfl(2)+isign(10000,kfl(2)))
2336 CALL
luptdi(kfl(1),px(1),py(1))
2339 pr3=
min(25.,0.1*
p(
n+nr+1,5)**2)
2340 700 CALL
luzdis(kfl(1),kfl(2),pr3,
z)
2341 zr=pr3/(
z*
p(
n+nr+1,5)**2)
2342 IF(zr.GE.1.) goto 700
2346 gam(jt)=pr3*(1.-
z)/
z
2347 in1=
n+nr+3+4*(jt/2)*(ns-1)
2350 p(in1,3)=(2-jt)*(1.-
z)+(jt-1)*
z
2353 p(in1+1,3)=(2-jt)*(1.-zr)+(jt-1)*zr
2359 IF(jt.EQ.1.OR.ns.EQ.nr-1)
THEN
2368 dp(1,4)=sqrt(dp(1,1)**2+dp(1,2)**2+dp(1,3)**2)
2369 dp(2,4)=sqrt(dp(2,1)**2+dp(2,2)**2+dp(2,3)**2)
2370 dp(5,1)=dp(1,1)/dp(1,4)-dp(2,1)/dp(2,4)
2371 dp(5,2)=dp(1,2)/dp(1,4)-dp(2,2)/dp(2,4)
2372 dp(5,3)=dp(1,3)/dp(1,4)-dp(2,3)/dp(2,4)
2373 IF(dp(5,1)**2.LE.dp(5,2)**2+dp(5,3)**2) dp(3,1)=1.
2374 IF(dp(5,1)**2.GT.dp(5,2)**2+dp(5,3)**2) dp(3,3)=1.
2375 IF(dp(5,2)**2.LE.dp(5,1)**2+dp(5,3)**2) dp(4,2)=1.
2376 IF(dp(5,2)**2.GT.dp(5,1)**2+dp(5,3)**2) dp(4,3)=1.
2378 dhcx1=dfour(3,1)/dhc12
2379 dhcx2=dfour(3,2)/dhc12
2380 dhcxx=1d0/sqrt(1d0+2d0*dhcx1*dhcx2*dhc12)
2381 dhcy1=dfour(4,1)/dhc12
2382 dhcy2=dfour(4,2)/dhc12
2383 dhcyx=dhcxx*(dhcx1*dhcy2+dhcx2*dhcy1)*dhc12
2384 dhcyy=1d0/sqrt(1d0+2d0*dhcy1*dhcy2*dhc12-dhcyx**2)
2386 dp(3,j)=dhcxx*(dp(3,j)-dhcx2*dp(1,j)-dhcx1*dp(2,j))
2388 p(in3+1,j)=dhcyy*(dp(4,j)-dhcy2*dp(1,j)-dhcy1*dp(2,j)-
2394 p(in3+3,j)=
p(in3+1,j)
2400 IF(mju(1)+mju(2).GT.0)
THEN
2402 IF(njs(jt).EQ.0) goto 770
2404 p(
n+nrs,j)=
p(
n+nrs,j)-pjs(jt+2,j)
2411 IF(2*i-nsav.GE.mstu(4)-mstu(32)-5)
THEN
2412 CALL
luerrm(11,
'(LUSTRF:) no more memory left in LUJETS')
2413 IF(mstu(21).GE.1)
RETURN
2416 IF(iabs(kfl(3-jt)).GT.10) jt=3-jt
2417 IF(iabs(kfl(3-jt)).GE.4.AND.iabs(kfl(3-jt)).LE.8) jt=3-jt
2420 irank(jt)=irank(jt)+1
2427 790 CALL
lukfdi(kfl(jt),0,kfl(3),
k(i,2))
2428 IF(
k(i,2).EQ.0) goto 640
2429 IF(mstj(12).GE.3.AND.irank(jt).EQ.1.AND.iabs(kfl(jt)).LE.10.AND.
2430 &iabs(kfl(3)).GT.10)
THEN
2431 IF(
rlu(0).GT.parj(19)) goto 790
2434 CALL
luptdi(kfl(jt),px(3),py(3))
2435 pr(jt)=
p(i,5)**2+(px(jt)+px(3))**2+(py(jt)+py(3))**2
2441 IF(mstj(11).EQ.2) parjst=parj(34)
2442 wmin=parjst+pmq(1)+pmq(2)+parj(36)*pmq(3)
2443 IF(iabs(kfl(jt)).GT.10.AND.iabs(kfl(3)).GT.10) wmin=
2444 &wmin-0.5*parj(36)*pmq(3)
2446 IF(wrem2.LT.0.10) goto 640
2447 IF(wrem2.LT.
max(wmin*(1.+(2.*
rlu(0)-1.)*parj(37)),
2448 &parj(32)+pmq(1)+pmq(2))**2) goto 940
2451 CALL
luzdis(kfl(jt),kfl(3),pr(jt),
z)
2452 IF(iabs(kfl(jt)).GE.4.AND.iabs(kfl(jt)).LE.8.AND.
2453 &mstu(90).LT.8)
THEN
2460 IF(
max(mod(kfl1a,10),mod(kfl1a/1000,10),mod(kfl2a,10),
2461 &mod(kfl2a/1000,10)).GE.4)
THEN
2462 pr(jr)=(pmq(jr)+pmq(3))**2+(px(jr)-px(3))**2+(py(jr)-py(3))**2
2463 pw12=sqrt(
max(0.,(wrem2-pr(1)-pr(2))**2-4.*pr(1)*pr(2)))
2464 z=(wrem2+pr(jt)-pr(jr)+pw12*(2.*
z-1.))/(2.*wrem2)
2465 pr(jr)=(pmq(jr)+parjst)**2+(px(jr)-px(3))**2+(py(jr)-py(3))**2
2466 IF((1.-
z)*(wrem2-pr(jt)/
z).LT.pr(jr)) goto 940
2468 gam(3)=(1.-
z)*(gam(jt)+pr(jt)/
z)
2474 IF(
in(1)+1.EQ.
in(2).AND.
z*
p(
in(1)+2,3)*
p(
in(2)+2,3)*
2475 &
p(
in(1),5)**2.GE.pr(jt))
THEN
2477 p(
in(jr)+2,4)=pr(jt)/(
p(
in(jt)+2,4)*
p(
in(1),5)**2)
2479 p(i,j)=(px(jt)+px(3))*
p(
in(3),j)+(py(jt)+py(3))*
p(
in(3)+1,j)
2482 ELSEIF(
in(1)+1.EQ.
in(2))
THEN
2483 p(
in(jr)+2,4)=
p(
in(jr)+2,3)
2486 IF(js*
in(jr).GT.js*
in(4*jr)) goto 640
2488 p(
in(jt)+2,4)=
p(
in(jt)+2,3)
2495 820
IF(js*
in(1).GT.js*
in(3*jr+1).OR.js*
in(2).GT.js*
in(3*jr+2).OR.
2496 &
in(1).GT.
in(2)) goto 640
2497 IF(
in(1).NE.
in(3*jt+1).OR.
in(2).NE.
in(3*jt+2))
THEN
2504 dp(1,4)=sqrt(dp(1,1)**2+dp(1,2)**2+dp(1,3)**2)
2505 dp(2,4)=sqrt(dp(2,1)**2+dp(2,2)**2+dp(2,3)**2)
2507 IF(dhc12.LE.1e-2)
THEN
2508 p(
in(jt)+2,4)=
p(
in(jt)+2,3)
2514 dp(5,1)=dp(1,1)/dp(1,4)-dp(2,1)/dp(2,4)
2515 dp(5,2)=dp(1,2)/dp(1,4)-dp(2,2)/dp(2,4)
2516 dp(5,3)=dp(1,3)/dp(1,4)-dp(2,3)/dp(2,4)
2517 IF(dp(5,1)**2.LE.dp(5,2)**2+dp(5,3)**2) dp(3,1)=1.
2518 IF(dp(5,1)**2.GT.dp(5,2)**2+dp(5,3)**2) dp(3,3)=1.
2519 IF(dp(5,2)**2.LE.dp(5,1)**2+dp(5,3)**2) dp(4,2)=1.
2520 IF(dp(5,2)**2.GT.dp(5,1)**2+dp(5,3)**2) dp(4,3)=1.
2521 dhcx1=dfour(3,1)/dhc12
2522 dhcx2=dfour(3,2)/dhc12
2523 dhcxx=1d0/sqrt(1d0+2d0*dhcx1*dhcx2*dhc12)
2524 dhcy1=dfour(4,1)/dhc12
2525 dhcy2=dfour(4,2)/dhc12
2526 dhcyx=dhcxx*(dhcx1*dhcy2+dhcx2*dhcy1)*dhc12
2527 dhcyy=1d0/sqrt(1d0+2d0*dhcy1*dhcy2*dhc12-dhcyx**2)
2529 dp(3,j)=dhcxx*(dp(3,j)-dhcx2*dp(1,j)-dhcx1*dp(2,j))
2531 p(
in(3)+1,j)=dhcyy*(dp(4,j)-dhcy2*dp(1,j)-dhcy1*dp(2,j)-
2535 pxp=-(px(3)*
four(
in(3*jt+3),
in(3))+py(3)*
2539 IF(abs(pxp**2+
pyp**2-px(3)**2-py(3)**2).LT.0.01)
THEN
2548 p(i,j)=px(jt)*
p(
in(3*jt+3),j)+py(jt)*
p(
in(3*jt+3)+1,j)+
2549 &px(3)*
p(
in(3),j)+py(3)*
p(
in(3)+1,j)
2550 DO 850 in1=
in(3*jt+1),
in(1)-4*js,4*js
2551 p(i,j)=
p(i,j)+
p(in1+2,3)*
p(in1,j)
2553 DO 860 in2=
in(3*jt+2),
in(2)-4*js,4*js
2554 p(i,j)=
p(i,j)+
p(in2+2,3)*
p(in2,j)
2563 DO 890 in2=
in(1)+1,
in(2),4
2564 DO 880 in1=
in(1),in2-1,4
2565 dhc=2.*
four(in1,in2)
2566 dhg(1)=dhg(1)+
p(in1+2,jt)*
p(in2+2,jt)*dhc
2567 IF(in1.EQ.
in(1)) dhg(2)=dhg(2)-js*
p(in2+2,jt)*dhc
2568 IF(in2.EQ.
in(2)) dhg(3)=dhg(3)+js*
p(in1+2,jt)*dhc
2569 IF(in1.EQ.
in(1).AND.in2.EQ.
in(2)) dhg(4)=dhg(4)-dhc
2574 dhs1=dhm(jr+1)*dhg(4)-dhm(4)*dhg(jr+1)
2575 IF(abs(dhs1).LT.1e-4) goto 640
2576 dhs2=dhm(4)*(gam(3)-dhg(1))-dhm(jt+1)*dhg(jr+1)-dhg(4)*
2577 &(
p(i,5)**2-dhm(1))+dhg(jt+1)*dhm(jr+1)
2578 dhs3=dhm(jt+1)*(gam(3)-dhg(1))-dhg(jt+1)*(
p(i,5)**2-dhm(1))
2579 p(
in(jr)+2,4)=0.5*(sqrt(
max(0d0,dhs2**2-4.*dhs1*dhs3))/abs(dhs1)-
2581 IF(dhm(jt+1)+dhm(4)*
p(
in(jr)+2,4).LE.0.) goto 640
2582 p(
in(jt)+2,4)=(
p(i,5)**2-dhm(1)-dhm(jr+1)*
p(
in(jr)+2,4))/
2583 &(dhm(jt+1)+dhm(4)*
p(
in(jr)+2,4))
2586 IF(
p(
in(jr)+2,4).GT.
p(
in(jr)+2,3))
THEN
2587 p(
in(jr)+2,4)=
p(
in(jr)+2,3)
2590 IF(js*
in(jr).GT.js*
in(4*jr)) goto 640
2592 p(
in(jt)+2,4)=
p(
in(jt)+2,3)
2597 ELSEIF(
p(
in(jt)+2,4).GT.
p(
in(jt)+2,3))
THEN
2598 p(
in(jt)+2,4)=
p(
in(jt)+2,3)
2607 p(
n+nrs,j)=
p(
n+nrs,j)-
p(i,j)
2609 IF(
p(i,4).LT.
p(i,5)) goto 640
2615 IF(
in(3).NE.
in(3*jt+3))
THEN
2617 p(
in(3*jt+3),j)=
p(
in(3),j)
2618 p(
in(3*jt+3)+1,j)=
p(
in(3)+1,j)
2623 p(
in(jq)+2,3)=
p(
in(jq)+2,3)-
p(
in(jq)+2,4)
2624 p(
in(jq)+2,jt)=
p(
in(jq)+2,jt)-js*(3-2*jq)*
p(
in(jq)+2,4)
2634 CALL
lukfdi(kfl(jr),-kfl(3),kfldmp,
k(i,2))
2635 IF(
k(i,2).EQ.0) goto 640
2637 pr(jr)=
p(i,5)**2+(px(jr)-px(3))**2+(py(jr)-py(3))**2
2644 dhr1=
four(
n+nrs,
in(3*jq+2))/dhc12
2645 dhr2=
four(
n+nrs,
in(3*jq+1))/dhc12
2646 IF(
in(4).NE.
in(7).OR.
in(5).NE.
in(8))
THEN
2647 px(3-jq)=-
four(
n+nrs,
in(3*jq+3))-px(jq)
2648 py(3-jq)=-
four(
n+nrs,
in(3*jq+3)+1)-py(jq)
2649 pr(3-jq)=
p(i+(jt+jq-3)**2-1,5)**2+(px(3-jq)+(2*jq-3)*js*
2650 & px(3))**2+(py(3-jq)+(2*jq-3)*js*py(3))**2
2654 wrem2=wrem2+(px(1)+px(2))**2+(py(1)+py(2))**2
2655 fd=(sqrt(pr(1))+sqrt(pr(2)))/sqrt(wrem2)
2656 IF(mju(1)+mju(2).NE.0.AND.i.EQ.isav+2.AND.
fd.GE.1.) goto 200
2657 IF(
fd.GE.1.) goto 640
2658 fa=wrem2+pr(jt)-pr(jr)
2659 IF(mstj(11).NE.2)
prev=0.5*exp(
max(-50.,
log(
fd)*parj(38)*
2661 IF(mstj(11).EQ.2)
prev=0.5*
fd**parj(39)
2665 IF(
max(mod(kfl1a,10),mod(kfl1a/1000,10),mod(kfl2a,10),
2666 &mod(kfl2a/1000,10)).GE.6) fb=
sign(sqrt(
max(0.,fa**2-
2667 &4.*wrem2*pr(jt))),float(js))
2669 p(i-1,j)=(px(jt)+px(3))*
p(
in(3*jq+3),j)+(py(jt)+py(3))*
2670 &
p(
in(3*jq+3)+1,j)+0.5*(dhr1*(fa+fb)*
p(
in(3*jq+1),j)+
2671 &dhr2*(fa-fb)*
p(
in(3*jq+2),j))/wrem2
2672 p(i,j)=
p(
n+nrs,j)-
p(i-1,j)
2674 IF(
p(i-1,4).LT.
p(i-1,5).OR.
p(i,4).LT.
p(i,5)) goto 640
2678 DO 960 i=nsav+1,nsav+
np
2681 IF(mstu(16).NE.2)
THEN
2701 p(nsav,5)=sqrt(
max(0d0,dps(4)**2-dps(1)**2-dps(2)**2-dps(3)**2))
2711 DO 1000 iz=mstu90+1,mstu91
2712 mstu9t(iz)=mstu(90+iz)-nrs+1-nsav+
n
2713 paru9t(iz)=paru(90+iz)
2720 k(i-nsav+
n,j)=
k(i,j)
2721 p(i-nsav+
n,j)=
p(i,j)
2725 DO 1050 i=
n+1,2*
n-nsav
2726 IF(
k(i,3).NE.ie(1)) goto 1050
2732 IF(mstu(16).NE.2)
k(i1,3)=nsav
2733 DO 1040 iz=mstu90+1,mstu91
2734 IF(mstu9t(iz).EQ.i)
THEN
2736 mstu(90+mstu(90))=i1
2737 paru(90+mstu(90))=paru9t(iz)
2741 DO 1080 i=2*
n-nsav,
n+1,-1
2742 IF(
k(i,3).EQ.ie(1)) goto 1080
2748 IF(mstu(16).NE.2)
k(i1,3)=nsav
2749 DO 1070 iz=mstu90+1,mstu91
2750 IF(mstu9t(iz).EQ.i)
THEN
2752 mstu(90+mstu(90))=i1
2753 paru(90+mstu(90))=paru9t(iz)
2761 CALL ludbrb(nsav+1,
n,0.,0.,dps(1)/dps(4),dps(2)/dps(4),
2765 hhpmt=
p(i,1)**2+
p(i,2)**2+
p(i,5)**2
2766 IF(
p(i,3).GT.0.)
THEN
2767 hhpez=(
p(i,4)+
p(i,3))*hhbz
2768 p(i,3)=0.5*(hhpez-hhpmt/hhpez)
2769 p(i,4)=0.5*(hhpez+hhpmt/hhpez)
2771 hhpez=(
p(i,4)-
p(i,3))/hhbz
2772 p(i,3)=-0.5*(hhpez-hhpmt/hhpez)
2773 p(i,4)=0.5*(hhpez+hhpmt/hhpez)
2792 IMPLICIT DOUBLE PRECISION(
d)
2793 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
2794 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
2795 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
2796 SAVE /lujets/,/ludat1/,/ludat2/
2797 dimension dps(5),psi(4),nfi(3),nfl(3),ifet(3),kflf(3),
2798 &kflo(2),pxo(2),pyo(2),wo(2)
2810 IF(i.GT.
min(
n,mstu(4)-mstu(32)))
THEN
2811 CALL
luerrm(12,
'(LUINDF:) failed to reconstruct jet system')
2812 IF(mstu(21).GE.1)
RETURN
2814 IF(
k(i,1).NE.1.AND.
k(i,1).NE.2) goto 110
2816 IF(kc.EQ.0) goto 110
2817 kq=kchg(kc,2)*isign(1,
k(i,2))
2818 IF(kq.EQ.0) goto 110
2820 IF(kq.NE.2) kqsum=kqsum+kq
2822 k(nsav+njet,j)=
k(i,j)
2823 p(nsav+njet,j)=
p(i,j)
2824 dps(j)=dps(j)+
p(i,j)
2827 IF(
k(i,1).EQ.2.OR.(mstj(3).LE.5.AND.
n.GT.i.AND.
2828 &
k(i+1,1).EQ.2)) goto 110
2829 IF(njet.NE.1.AND.kqsum.NE.0)
THEN
2830 CALL
luerrm(12,
'(LUINDF:) unphysical flavour combination')
2831 IF(mstu(21).GE.1)
RETURN
2837 CALL ludbrb(nsav+1,nsav+njet,0.,0.,-dps(1)/dps(4),
2838 & -dps(2)/dps(4),-dps(3)/dps(4))
2844 DO 140 i=nsav+1,nsav+njet
2848 nfi(kfa)=nfi(kfa)+isign(1,
k(i,2))
2849 ELSEIF(kfa.GT.1000)
THEN
2850 kfla=mod(kfa/1000,10)
2851 kflb=mod(kfa/100,10)
2852 IF(kfla.LE.3) nfi(kfla)=nfi(kfla)+isign(1,
k(i,2))
2853 IF(kflb.LE.3) nfi(kflb)=nfi(kflb)+isign(1,
k(i,2))
2860 IF(ntry.GT.200)
THEN
2861 CALL
luerrm(14,
'(LUINDF:) caught in infinite loop')
2862 IF(mstu(21).GE.1)
RETURN
2873 DO 230 ip1=nsav+1,nsav+njet
2880 IF(kflh.GT.10) kflh=mod(kflh/1000,10)
2882 wf=
p(ip1,4)+sqrt(
p(ip1,1)**2+
p(ip1,2)**2+
p(ip1,3)**2)
2885 170
IF(iabs(
k(ip1,2)).NE.21)
THEN
2888 CALL
luptdi(0,pxo(1),pyo(1))
2892 ELSEIF(mstj(2).LE.2)
THEN
2894 IF(mstj(2).EQ.2) mstj(91)=1
2895 kflo(1)=int(1.+(2.+parj(2))*
rlu(0))*(-1)**int(
rlu(0)+0.5)
2896 CALL
luptdi(0,pxo(1),pyo(1))
2903 IF(mstj(2).EQ.4) mstj(91)=1
2904 kflo(1)=int(1.+(2.+parj(2))*
rlu(0))*(-1)**int(
rlu(0)+0.5)
2906 CALL
luptdi(0,pxo(1),pyo(1))
2909 wo(1)=wf*
rlu(0)**(1./3.)
2925 IF(i.GE.mstu(4)-mstu(32)-njet-5)
THEN
2926 CALL
luerrm(11,
'(LUINDF:) no more memory left in LUJETS')
2927 IF(mstu(21).GE.1)
RETURN
2934 200 CALL
lukfdi(kfl1,0,kfl2,
k(i,2))
2935 IF(
k(i,2).EQ.0) goto 180
2936 IF(mstj(12).GE.3.AND.irank.EQ.1.AND.iabs(kfl1).LE.10.AND.
2937 &iabs(kfl2).GT.10)
THEN
2938 IF(
rlu(0).GT.parj(19)) goto 200
2943 CALL
luptdi(kfl1,px2,py2)
2946 pr=
p(i,5)**2+
p(i,1)**2+
p(i,2)**2
2949 IF(iabs(kfl1).GE.4.AND.iabs(kfl1).LE.8.AND.mstu(90).LT.8)
THEN
2955 p(i,3)=0.5*(
z*w-pr/
max(1e-4,
z*w))
2956 p(i,4)=0.5*(
z*w+pr/
max(1e-4,
z*w))
2957 IF(mstj(3).GE.1.AND.irank.EQ.1.AND.kflh.GE.4.AND.
2958 &
p(i,3).LE.0.001)
THEN
2959 IF(w.GE.
p(i,5)+0.5*parj(32)) goto 180
2975 IF(mstj(3).GE.0.AND.
p(i,3).LT.0.)
THEN
2977 IF(mzsav.EQ.1) mstu(90)=mstu(90)-1
2979 IF(w.GT.parj(31)) goto 190
2982 IF(mod(mstj(3),5).EQ.4.AND.
n.EQ.nsav1) wf=wf+0.1*parj(32)
2983 IF(mod(mstj(3),5).EQ.4.AND.
n.EQ.nsav1) goto 170
2986 the=
ulangl(
p(ip1,3),sqrt(
p(ip1,1)**2+
p(ip1,2)**2))
2989 CALL ludbrb(nsav1+1,
n,the,
phi,0d0,0d0,0d0)
2990 k(
k(ip1,3),4)=nsav1+1
2995 IF(njet.EQ.1.OR.mstj(3).LE.0) goto 490
2996 IF(mod(mstj(3),5).NE.0.AND.
n-nsav-njet.LT.2) goto 150
2999 DO 240 i=nsav+njet+1,
n
3001 kfla=mod(kfa/1000,10)
3002 kflb=mod(kfa/100,10)
3005 IF(kflb.LE.3) nfl(kflb)=nfl(kflb)-isign(1,
k(i,2))*(-1)**kflb
3006 IF(kflc.LE.3) nfl(kflc)=nfl(kflc)+isign(1,
k(i,2))*(-1)**kflb
3008 IF(kfla.LE.3) nfl(kfla)=nfl(kfla)-isign(1,
k(i,2))
3009 IF(kflb.LE.3) nfl(kflb)=nfl(kflb)-isign(1,
k(i,2))
3010 IF(kflc.LE.3) nfl(kflc)=nfl(kflc)-isign(1,
k(i,2))
3013 nreq=(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3))-iabs(nfl(1)+
3014 &nfl(2)+nfl(3)))/2+iabs(nfl(1)+nfl(2)+nfl(3))/3
3015 IF(nreq.EQ.0) goto 320
3021 DO 260 i=nsav+njet+1,
n
3022 p2=
p(i,1)**2+
p(i,2)**2+
p(i,3)**2
3023 IF(
k(i,1).EQ.1.AND.p2.LT.p2min) irem=i
3024 IF(
k(i,1).EQ.1.AND.p2.LT.p2min) p2min=p2
3026 IF(irem.EQ.0) goto 150
3029 kfla=mod(kfa/1000,10)
3030 kflb=mod(kfa/100,10)
3032 IF(kfla.GE.4.OR.kflb.GE.4)
k(irem,1)=8
3033 IF(
k(irem,1).EQ.8) goto 250
3035 isgn=isign(1,
k(irem,2))*(-1)**kflb
3036 IF(kflb.LE.3) nfl(kflb)=nfl(kflb)+isgn
3037 IF(kflc.LE.3) nfl(kflc)=nfl(kflc)-isgn
3039 IF(kfla.LE.3) nfl(kfla)=nfl(kfla)+isign(1,
k(irem,2))
3040 IF(kflb.LE.3) nfl(kflb)=nfl(kflb)+isign(1,
k(irem,2))
3041 IF(kflc.LE.3) nfl(kflc)=nfl(kflc)+isign(1,
k(irem,2))
3044 nreq=(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3))-iabs(nfl(1)+
3045 &nfl(2)+nfl(3)))/2+iabs(nfl(1)+nfl(2)+nfl(3))/3
3046 IF(nreq.GT.nrem) goto 250
3047 DO 270 i=nsav+njet+1,
n
3048 IF(
k(i,1).EQ.8)
k(i,1)=1
3053 IF(nfl(1)+nfl(2)+nfl(3).NE.0) nfet=3
3054 IF(nreq.LT.nrem) nfet=1
3055 IF(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3)).EQ.0) nfet=0
3057 ifet(j)=1+(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3)))*
rlu(0)
3058 kflf(j)=isign(1,nfl(1))
3059 IF(ifet(j).GT.iabs(nfl(1))) kflf(j)=isign(2,nfl(2))
3060 IF(ifet(j).GT.iabs(nfl(1))+iabs(nfl(2))) kflf(j)=isign(3,nfl(3))
3062 IF(nfet.EQ.2.AND.(ifet(1).EQ.ifet(2).OR.kflf(1)*kflf(2).GT.0))
3064 IF(nfet.EQ.3.AND.(ifet(1).EQ.ifet(2).OR.ifet(1).EQ.ifet(3).OR.
3065 &ifet(2).EQ.ifet(3).OR.kflf(1)*kflf(2).LT.0.OR.kflf(1)*kflf(3)
3066 &.LT.0.OR.kflf(1)*(nfl(1)+nfl(2)+nfl(3)).LT.0)) goto 280
3067 IF(nfet.EQ.0) kflf(1)=1+int((2.+parj(2))*
rlu(0))
3068 IF(nfet.EQ.0) kflf(2)=-kflf(1)
3069 IF(nfet.EQ.1) kflf(2)=isign(1+int((2.+parj(2))*
rlu(0)),-kflf(1))
3070 IF(nfet.LE.2) kflf(3)=0
3071 IF(kflf(3).NE.0)
THEN
3072 kflfc=isign(1000*
max(iabs(kflf(1)),iabs(kflf(3)))+
3073 & 100*
min(iabs(kflf(1)),iabs(kflf(3)))+1,kflf(1))
3074 IF(kflf(1).EQ.kflf(3).OR.(1.+3.*parj(4))*
rlu(0).GT.1.)
3075 & kflfc=kflfc+isign(2,kflfc)
3079 CALL
lukfdi(kflfc,kflf(2),kfldmp,kf)
3080 IF(kf.EQ.0) goto 280
3081 DO 300 j=1,
max(2,nfet)
3082 nfl(iabs(kflf(j)))=nfl(iabs(kflf(j)))-isign(1,kflf(j))
3086 npos=
min(1+int(
rlu(0)*nrem),nrem)
3087 DO 310 i=nsav+njet+1,
n
3088 IF(
k(i,1).EQ.7) npos=npos-1
3089 IF(
k(i,1).EQ.1.OR.npos.NE.0) goto 310
3093 p(i,4)=sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2+
p(i,5)**2)
3096 nreq=(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3))-iabs(nfl(1)+
3097 &nfl(2)+nfl(3)))/2+iabs(nfl(1)+nfl(2)+nfl(3))/3
3098 IF(nrem.GT.0) goto 280
3101 320
IF(mod(mstj(3),5).NE.0.AND.mod(mstj(3),5).NE.4)
THEN
3104 DO 330 i=nsav+njet+1,
n
3105 psi(j)=psi(j)+
p(i,j)
3108 psi(4)=psi(1)**2+psi(2)**2+psi(3)**2
3110 DO 350 i=nsav+njet+1,
n
3111 IF(mod(mstj(3),5).EQ.1) pws=pws+
p(i,4)
3112 IF(mod(mstj(3),5).EQ.2) pws=pws+sqrt(
p(i,5)**2+(psi(1)*
p(i,1)+
3113 & psi(2)*
p(i,2)+psi(3)*
p(i,3))**2/psi(4))
3114 IF(mod(mstj(3),5).EQ.3) pws=pws+1.
3116 DO 370 i=nsav+njet+1,
n
3117 IF(mod(mstj(3),5).EQ.1) pw=
p(i,4)
3118 IF(mod(mstj(3),5).EQ.2) pw=sqrt(
p(i,5)**2+(psi(1)*
p(i,1)+
3119 & psi(2)*
p(i,2)+psi(3)*
p(i,3))**2/psi(4))
3120 IF(mod(mstj(3),5).EQ.3) pw=1.
3122 p(i,j)=
p(i,j)-psi(j)*pw/pws
3124 p(i,4)=sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2+
p(i,5)**2)
3128 ELSEIF(mod(mstj(3),5).EQ.4)
THEN
3135 DO 410 i=nsav+njet+1,
n
3139 pls=(
p(i,1)*
p(ir1,1)+
p(i,2)*
p(ir1,2)+
p(i,3)*
p(ir1,3))/
3140 & (
p(ir1,1)**2+
p(ir1,2)**2+
p(ir1,3)**2)
3142 p(ir2,j)=
p(ir2,j)+
p(i,j)-pls*
p(ir1,j)
3144 p(ir2,4)=
p(ir2,4)+
p(i,4)
3145 p(ir2,5)=
p(ir2,5)+pls
3149 IF(
k(i,1).NE.0) pss=pss+
p(i,4)/(pecm*(0.8*
p(i,5)+0.2))
3151 DO 440 i=nsav+njet+1,
n
3154 pls=(
p(i,1)*
p(ir1,1)+
p(i,2)*
p(ir1,2)+
p(i,3)*
p(ir1,3))/
3155 & (
p(ir1,1)**2+
p(ir1,2)**2+
p(ir1,3)**2)
3157 p(i,j)=
p(i,j)-
p(ir2,j)/
k(ir2,1)+(1./(
p(ir2,5)*pss)-1.)*pls*
3160 p(i,4)=sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2+
p(i,5)**2)
3165 IF(mod(mstj(3),5).NE.0)
THEN
3169 DO 450 i=nsav+njet+1,
n
3172 pqs=pqs+
p(i,5)**2/
p(i,4)
3174 IF(pms.GE.pecm) goto 150
3177 pfac=(pecm-pqs)/(pes-pqs)
3180 DO 480 i=nsav+njet+1,
n
3184 p(i,4)=sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2+
p(i,5)**2)
3186 pqs=pqs+
p(i,5)**2/
p(i,4)
3188 IF(neco.LT.10.AND.abs(pecm-pes).GT.2e-6*pecm) goto 460
3192 490
DO 500 i=nsav+njet+1,
n
3193 IF(mstu(16).NE.2)
k(i,3)=nsav+1
3194 IF(mstu(16).EQ.2)
k(i,3)=
k(
k(i,3),3)
3196 DO 510 i=nsav+1,nsav+njet
3199 IF(mstu(16).NE.2)
THEN
3203 k(i1,4)=
k(i1,4)-njet+1
3204 k(i1,5)=
k(i1,5)-njet+1
3205 IF(
k(i1,5).LT.
k(i1,4))
THEN
3223 p(nsav,5)=sqrt(
max(0d0,dps(4)**2-dps(1)**2-dps(2)**2-dps(3)**2))
3225 DO 540 i=nsav+njet,
n
3227 k(i-njet+1,j)=
k(i,j)
3228 p(i-njet+1,j)=
p(i,j)
3229 v(i-njet+1,j)=
v(i,j)
3233 DO 550 iz=mstu90+1,mstu(90)
3234 mstu(90+iz)=mstu(90+iz)-njet+1
3238 IF(njet.NE.1) CALL ludbrb(nsav+1,
n,0.,0.,dps(1)/dps(4),
3239 &dps(2)/dps(4),dps(3)/dps(4))
3254 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
3255 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
3256 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
3257 common/ludat3/
mdcy(500,3),
mdme(2000,2),
brat(2000),kfdp(2000,5)
3258 SAVE /lujets/,/ludat1/,/ludat2/,/ludat3/
3259 dimension vdcy(4),kflo(4),kfl1(4),pv(10,5),rord(10),ue(3),be(3),
3260 &wtcor(10),ptau(4),pcmtau(4)
3261 DOUBLE PRECISION dbetau(3)
3262 DATA wtcor/2.,5.,15.,60.,250.,1500.,1.2e4,1.2e5,150.,16./
3266 pawt(a,b,
c)=sqrt((a**2-(b+
c)**2)*(a**2-(b-
c)**2))/(2.*a)
3267 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)
3268 hmeps(ha)=((1.-hrq-ha)**2+3.*ha*(1.+hrq-ha))*
3269 &sqrt((1.-hrq-ha)**2-4.*hrq*ha)
3275 kfs=isign(1,
k(
ip,2))
3280 IF(
k(
ip,1).EQ.5)
THEN
3282 ELSEIF(
k(
ip,1).NE.4)
THEN
3291 IF(mstj(22).EQ.2)
THEN
3292 IF(pmas(kc,4).GT.parj(71)) mout=1
3293 ELSEIF(mstj(22).EQ.3)
THEN
3294 IF(vdcy(1)**2+vdcy(2)**2+vdcy(3)**2.GT.parj(72)**2) mout=1
3295 ELSEIF(mstj(22).EQ.4)
THEN
3296 IF(vdcy(1)**2+vdcy(2)**2.GT.parj(73)**2) mout=1
3297 IF(abs(vdcy(3)).GT.parj(74)) mout=1
3299 IF(mout.EQ.1.AND.
k(
ip,1).NE.5)
THEN
3305 IF(kfa.EQ.15.AND.mstj(28).GE.1)
THEN
3316 120 imtau=
k(imtau,3)
3323 ELSEIF(
k(imtau,2).EQ.
k(itau,2))
THEN
3325 IF(
k(
k(imtau,4),2).EQ.22)
THEN
3327 pcmtau(j)=pcmtau(j)+
p(
k(imtau,4),j)
3329 ELSEIF(
k(
k(imtau,5),2).EQ.22)
THEN
3331 pcmtau(j)=pcmtau(j)+
p(
k(imtau,5),j)
3336 ELSEIF(iabs(
k(imtau,2)).GT.100)
THEN
3339 kforig=-isign(24,
k(itau,2))
3341 DO 160 ii=
k(imtau,4),
k(imtau,5)
3342 IF(
k(ii,2)*isign(1,
k(itau,2)).EQ.-16)
THEN
3344 pcmtau(j)=pcmtau(j)+
p(ii,j)
3354 DO 170 ii=imtau+1,
ip-1
3355 IF(
k(ii,2).EQ.kforig.AND.
k(ii,3).EQ.iorig.AND.
3356 & abs(
p(ii,5)-
p(iorig,5)).LT.1e-5*
p(iorig,5)) iorig=ii
3359 pcmtau(j)=
p(iorig,j)
3366 dbetau(j)=pcmtau(j)/pcmtau(4)
3368 IF(kforig.NE.0) CALL ludbrb(itau,itau,0.,0.,-dbetau(1),
3369 & -dbetau(2),-dbetau(3))
3371 CALL ludbrb(itau,itau,0.,-phitau,0d0,0d0,0d0)
3373 CALL ludbrb(itau,itau,-thetau,0.,0d0,0d0,0d0)
3376 IF(kforig.NE.0.OR.mstj(28).EQ.2)
THEN
3377 CALL
lutaud(itau,iorig,kforig,ndecay)
3378 DO 200 ii=nsav+1,nsav+ndecay
3391 IF(kforig.NE.0.OR.mstj(28).EQ.2)
THEN
3392 CALL ludbrb(nsav+1,
n,thetau,phitau,0d0,0d0,0d0)
3393 IF(kforig.NE.0) CALL ludbrb(nsav+1,
n,0.,0.,dbetau(1),
3394 & dbetau(2),dbetau(3))
3406 IF((kfa.EQ.511.OR.kfa.EQ.531).AND.mstj(26).GE.1)
THEN
3408 IF(kfa.EQ.531) xbbmix=parj(77)
3409 IF(sin(0.5*xbbmix*
v(
ip,5)/pmas(kc,4))**2.GT.
rlu(0)) mmix=1
3410 IF(mmix.EQ.1) kfs=-kfs
3415 IF(
mdcy(kc,2).GT.0)
THEN
3417 IF(mdmdcy.GT.80.AND.mdmdcy.LE.90) kca=mdmdcy
3419 IF(
mdcy(kca,2).LE.0.OR.
mdcy(kca,3).LE.0)
THEN
3420 CALL
luerrm(9,
'(LUDECY:) no decay channel defined')
3423 IF(mod(kfa/1000,10).EQ.0.AND.(kca.EQ.85.OR.kca.EQ.87)) kfs=-kfs
3424 IF(kchg(kc,3).EQ.0)
THEN
3427 IF(
rlu(0).GT.0.5) kfs=-kfs
3428 ELSEIF(kfs.GT.0)
THEN
3440 IF(
mdme(idl,1).NE.1.AND.kfsp*
mdme(idl,1).NE.2.AND.
3441 &kfsn*
mdme(idl,1).NE.3) goto 230
3442 IF(
mdme(idl,2).GT.100) goto 230
3447 CALL
luerrm(2,
'(LUDECY:) all decay channels closed by user')
3455 IF(
mdme(idl,1).NE.1.AND.kfsp*
mdme(idl,1).NE.2.AND.
3456 &kfsn*
mdme(idl,1).NE.3)
THEN
3457 IF(idl.LT.
mdcy(kca,2)+
mdcy(kca,3)-1) goto 250
3458 ELSEIF(
mdme(idl,2).GT.100)
THEN
3459 IF(idl.LT.
mdcy(kca,2)+
mdcy(kca,3)-1) goto 250
3463 IF(idl.LT.
mdcy(kca,2)+
mdcy(kca,3)-1.AND.rbr.GT.0.) goto 250
3469 IF(ntry.GT.1000)
THEN
3470 CALL
luerrm(14,
'(LUDECY:) caught in infinite loop')
3471 IF(mstu(21).GE.1)
RETURN
3477 IF(mmat.GE.11.AND.mmat.NE.46.AND.
p(
ip,4).GT.20.*
p(
ip,5)) mbst=1
3480 IF(mbst.EQ.0) pv(1,j)=
p(
ip,j)
3482 IF(mbst.EQ.1) pv(1,4)=
p(
ip,5)
3488 IF(kfa.GT.80) mhaddy=1
3492 IF(
mdme(idc+1,2).EQ.101) jtmax=10
3494 IF(jt.LE.5) kp=kfdp(idc,jt)
3495 IF(jt.GE.6) kp=kfdp(idc+1,jt-5)
3496 IF(kp.EQ.0) goto 280
3499 IF(kpa.GT.80) mhaddy=1
3500 IF(kchg(kcp,3).EQ.0.AND.kpa.NE.81.AND.kpa.NE.82)
THEN
3502 ELSEIF(kpa.NE.81.AND.kpa.NE.82)
THEN
3504 ELSEIF(kpa.EQ.81.AND.mod(kfa/1000,10).EQ.0)
THEN
3505 kfp=-kfs*mod(kfa/10,10)
3506 ELSEIF(kpa.EQ.81.AND.mod(kfa/100,10).GE.mod(kfa/10,10))
THEN
3507 kfp=kfs*(100*mod(kfa/10,100)+3)
3508 ELSEIF(kpa.EQ.81)
THEN
3509 kfp=kfs*(1000*mod(kfa/10,10)+100*mod(kfa/100,10)+1)
3510 ELSEIF(kp.EQ.82)
THEN
3511 CALL
lukfdi(-kfs*int(1.+(2.+parj(2))*
rlu(0)),0,kfp,kdump)
3512 IF(kfp.EQ.0) goto 260
3514 IF(pv(1,5).LT.parj(32)+2.*
ulmass(kfp)) goto 260
3515 ELSEIF(kp.EQ.-82)
THEN
3517 IF(iabs(kfp).GT.10) kfp=kfp+isign(10000,kfp)
3519 IF(kpa.EQ.81.OR.kpa.EQ.82) kcp=
lucomp(kfp)
3524 IF(mmat.GE.11.AND.mmat.LE.30.AND.kqp.NE.0)
THEN
3529 ELSEIF((mmat.EQ.42.OR.mmat.EQ.43.OR.mmat.EQ.48).AND.
np.EQ.3.AND.
3530 &mod(nq,2).EQ.1)
THEN
3535 CALL
lukfdi(kfp,kfi,kfldmp,
k(i,2))
3536 IF(
k(i,2).EQ.0) goto 260
3543 IF(mmat.NE.33.AND.kqp.NE.0) nq=nq+1
3544 IF(mmat.EQ.33.AND.kqp.NE.0.AND.kqp.NE.2) nq=nq+1
3546 IF(mmat.EQ.4.AND.jt.LE.2.AND.kfp.EQ.21)
k(i,1)=2
3547 IF(mmat.EQ.4.AND.jt.EQ.3)
k(i,1)=1
3553 IF(mmat.EQ.45.AND.kfpa.EQ.89)
p(i,5)=parj(32)
3559 IF(mhaddy.EQ.0)
THEN
3560 IF(ps+parj(64).GT.pv(1,5)) goto 240
3564 290
IF(mmat.GE.11.AND.mmat.LE.30)
THEN
3566 cnde=parj(61)*
log(
max((pv(1,5)-ps-psq)/parj(62),1.1))
3567 IF(mmat.EQ.12) cnde=cnde+parj(63)
3569 IF(ntry.GT.1000)
THEN
3570 CALL
luerrm(14,
'(LUDECY:) caught in infinite loop')
3571 IF(mstu(21).GE.1)
RETURN
3574 gauss=sqrt(-2.*cnde*
log(
max(1e-10,
rlu(0))))*
3575 & sin(paru(2)*
rlu(0))
3576 nd=0.5+0.5*
np+0.25*nq+cnde+gauss
3577 IF(nd.LT.
np+nq/2.OR.nd.LT.2.OR.nd.GT.10) goto 300
3578 IF(mmat.EQ.13.AND.nd.EQ.2) goto 300
3579 IF(mmat.EQ.14.AND.nd.LE.3) goto 300
3580 IF(mmat.EQ.15.AND.nd.LE.4) goto 300
3589 IF(nd.EQ.
np+nq/2) goto 330
3590 DO 320 i=
n+
np+1,
n+nd-nq/2
3591 jt=1+int((nq-1)*
rlu(0))
3592 CALL
lukfdi(kfl1(jt),0,kfl2,
k(i,2))
3593 IF(
k(i,2).EQ.0) goto 300
3599 IF(nq.EQ.4.AND.
rlu(0).LT.parj(66)) jt=4
3600 IF(jt.EQ.4.AND.isign(1,kfl1(1)*(10-iabs(kfl1(1))))*
3601 & isign(1,kfl1(jt)*(10-iabs(kfl1(jt)))).GT.0) jt=3
3604 CALL
lukfdi(kfl1(1),kfl1(jt),kfldmp,
k(
n+nd-nq/2+1,2))
3605 IF(
k(
n+nd-nq/2+1,2).EQ.0) goto 300
3606 IF(nq.EQ.4) CALL
lukfdi(kfl1(jt2),kfl1(jt3),kfldmp,
k(
n+nd,2))
3607 IF(nq.EQ.4.AND.
k(
n+nd,2).EQ.0) goto 300
3611 DO 340 i=
n+
np+1,
n+nd
3619 IF(ps+parj(64).GT.pv(1,5)) goto 300
3622 ELSEIF((mmat.EQ.31.OR.mmat.EQ.33.OR.mmat.EQ.44.OR.mmat.EQ.45)
3625 pqt=(
p(
n+
np,5)+parj(65))/pv(1,5)
3627 p(
n+
np,j)=pqt*pv(1,j)
3628 pv(1,j)=(1.-pqt)*pv(1,j)
3630 IF(ps+parj(64).GT.pv(1,5)) goto 260
3635 ELSEIF(mmat.EQ.46)
THEN
3640 IF(
max(ps,psmc)+parj(32).GT.pv(1,5)) goto 240
3641 hr1=(
p(
n+1,5)/pv(1,5))**2
3642 hr2=(
p(
n+2,5)/pv(1,5))**2
3643 IF((1.-hr1-hr2)*(2.+hr1+hr2)*sqrt((1.-hr1-hr2)**2-4.*hr1*hr2)
3644 & .LT.2.*
rlu(0)) goto 240
3649 IF(
np.GE.2.AND.ps+parj(64).GT.pv(1,5)) goto 260
3654 IF(mmat.EQ.45.AND.mstj(25).LE.0)
THEN
3655 hlq=(parj(32)/pv(1,5))**2
3656 huq=(1.-(
p(
n+2,5)+parj(64))/pv(1,5))**2
3657 hrq=(
p(
n+2,5)/pv(1,5))**2
3658 360 hw=hlq+
rlu(0)*(huq-hlq)
3659 IF(hmeps(hw).LT.
rlu(0)) goto 360
3660 p(
n+1,5)=pv(1,5)*sqrt(hw)
3663 ELSEIF(mmat.EQ.45)
THEN
3664 hqw=(pv(1,5)/pmas(24,1))**2
3665 hlw=(parj(32)/pmas(24,1))**2
3666 huw=((pv(1,5)-
p(
n+2,5)-parj(64))/pmas(24,1))**2
3667 hrq=(
p(
n+2,5)/pv(1,5))**2
3668 hg=pmas(24,2)/pmas(24,1)
3669 hatl=atan((hlw-1.)/hg)
3670 hm=
min(1.,huw-0.001)
3671 hmv1=hmeps(hm/hqw)/((hm-1.)**2+hg**2)
3673 hmv2=hmeps(hm/hqw)/((hm-1.)**2+hg**2)
3674 IF(hmv2.GT.hmv1.AND.hm-hg.GT.hlw)
THEN
3678 hmv=
min(2.*hmv1,hmeps(hm/hqw)/hg**2)
3679 hm1=1.-sqrt(1./hmv-hg**2)
3680 IF(hm1.GT.hlw.AND.hm1.LT.hm)
THEN
3682 ELSEIF(hmv2.LE.hmv1)
THEN
3683 hm=
max(hlw,hm-
min(0.1,1.-hm))
3685 hatm=atan((hm-1.)/hg)
3687 hwt2=hmv*(
min(1.,huw)-hm)
3690 hatu=atan((huw-1.)/hg)
3696 380 hreg=
rlu(0)*(hwt1+hwt2+hwt3)
3697 IF(hreg.LE.hwt1)
THEN
3698 hw=1.+hg*tan(hatl+
rlu(0)*(hatm-hatl))
3700 ELSEIF(hreg.LE.hwt1+hwt2)
THEN
3701 hw=hm+
rlu(0)*(
min(1.,huw)-hm)
3702 hacc=hmeps(hw/hqw)/((hw-1.)**2+hg**2)/hmv
3704 hw=1.+hg*tan(
rlu(0)*hatu)
3705 hacc=hmeps(hw/hqw)/hmp1
3707 IF(hacc.LT.
rlu(0)) goto 380
3708 p(
n+1,5)=pmas(24,1)*sqrt(hw)
3715 IF(mmat.EQ.3.OR.mmat.EQ.46)
THEN
3717 IF(im.LT.0.OR.im.GE.
ip) im=0
3718 IF(mmat.EQ.46.AND.mstj(27).EQ.1)
THEN
3720 ELSEIF(mmat.EQ.46.AND.mstj(27).GE.2.AND.im.NE.0)
THEN
3721 IF(
k(im,2).EQ.94)
THEN
3723 IF(im.LT.0.OR.im.GE.
ip) im=0
3726 IF(im.NE.0) kfam=iabs(
k(im,2))
3727 IF(im.NE.0.AND.mmat.EQ.3)
THEN
3729 IF(
k(il,3).EQ.im) nm=nm+1
3730 IF(
k(il,3).EQ.im.AND.il.NE.
ip) isis=il
3732 IF(nm.NE.2.OR.kfam.LE.100.OR.mod(kfam,10).NE.1.OR.
3733 & mod(kfam/1000,10).NE.0) nm=0
3735 kfas=iabs(
k(isis,2))
3736 IF((kfas.LE.100.OR.mod(kfas,10).NE.1.OR.
3737 & mod(kfas/1000,10).NE.0).AND.kfas.NE.22) nm=0
3739 ELSEIF(im.NE.0.AND.mmat.EQ.46)
THEN
3740 msgn=isign(1,
k(im,2)*
k(
ip,2))
3741 IF(kfam.GT.100.AND.mod(kfam/1000,10).EQ.0) msgn=
3742 & msgn*(-1)**mod(kfam/100,10)
3757 wtmax=1./wtcor(nd-2)
3758 pmax=pv(1,5)-ps+
p(
n+nd,5)
3762 pmin=pmin+
p(
n+il+1,5)
3763 wtmax=wtmax*pawt(pmax,pmin,
p(
n+il,5))
3768 420
IF(nd.EQ.2)
THEN
3769 ELSEIF(mmat.EQ.2)
THEN
3770 pmes=4.*pmas(11,1)**2
3771 pmrho2=pmas(131,1)**2
3772 pgrho2=pmas(131,2)**2
3773 430 pmst=pmes*(
p(
ip,5)**2/pmes)**
rlu(0)
3774 wt=(1+0.5*pmes/pmst)*sqrt(
max(0.,1.-pmes/pmst))*
3775 & (1.-pmst/
p(
ip,5)**2)**3*(1.+pgrho2/pmrho2)/
3776 & ((1.-pmst/pmrho2)**2+pgrho2/pmrho2)
3777 IF(wt.LT.
rlu(0)) goto 430
3778 pv(2,5)=
max(2.00001*pmas(11,1),sqrt(pmst))
3785 DO 450 il2=il1-1,1,-1
3786 IF(rsav.LE.rord(il2)) goto 460
3787 rord(il2+1)=rord(il2)
3789 460 rord(il2+1)=rsav
3794 pv(il,5)=pv(il+1,5)+
p(
n+il,5)+(rord(il)-rord(il+1))*(pv(1,5)-ps)
3795 wt=wt*pawt(pv(il,5),pv(il+1,5),
p(
n+il,5))
3797 IF(wt.LT.
rlu(0)*wtmax) goto 440
3801 490
DO 510 il=1,nd-1
3802 pa=pawt(pv(il,5),pv(il+1,5),
p(
n+il,5))
3805 ue(1)=sqrt(1.-ue(3)**2)*
cos(
phi)
3806 ue(2)=sqrt(1.-ue(3)**2)*sin(
phi)
3809 pv(il+1,j)=-pa*ue(j)
3811 p(
n+il,4)=sqrt(pa**2+
p(
n+il,5)**2)
3812 pv(il+1,4)=sqrt(pa**2+pv(il+1,5)**2)
3821 be(j)=pv(il,j)/pv(il,4)
3823 ga=pv(il,4)/pv(il,5)
3825 bep=be(1)*
p(i,1)+be(2)*
p(i,2)+be(3)*
p(i,3)
3827 p(i,j)=
p(i,j)+ga*(ga*bep/(1.+ga)+
p(i,4))*be(j)
3829 p(i,4)=ga*(
p(i,4)+bep)
3835 IF(ntry.GT.800) goto 590
3842 IF(
max(wt*wtcor(9)/
p(
ip,5)**6,0.001).LT.
rlu(0)) goto 420
3845 ELSEIF(mmat.EQ.2)
THEN
3848 wt=(pmst-0.5*pmes)*(four12**2+four13**2)+
3849 & pmes*(four12*four13+four12**2+four13**2)
3850 IF(wt.LT.
rlu(0)*0.25*pmst*(
p(
ip,5)**2-pmst)**2) goto 490
3855 ELSEIF(mmat.EQ.3.AND.nm.EQ.2)
THEN
3862 IF(kfas.NE.22) hnum=(four10*four12-pms1*four02)**2
3863 IF(kfas.EQ.22) hnum=pms1*(2.*four10*four12*four02-
3864 & pms1*four02**2-pms0*four12**2-pms2*four10**2+pms1*pms0*pms2)
3865 hnum=
max(1e-6*pms1**2*pms0*pms2,hnum)
3866 hden=(four10**2-pms1*pms0)*(four12**2-pms1*pms2)
3867 IF(hnum.LT.
rlu(0)*hden) goto 490
3870 ELSEIF(mmat.EQ.4)
THEN
3874 wt=((1.-hx1)/(hx2*hx3))**2+((1.-hx2)/(hx1*hx3))**2+
3875 & ((1.-hx3)/(hx1*hx2))**2
3876 IF(wt.LT.2.*
rlu(0)) goto 420
3877 IF(
k(
ip+1,2).EQ.22.AND.(1.-hx1)*
p(
ip,5)**2.LT.4.*parj(32)**2)
3881 ELSEIF(mmat.EQ.41)
THEN
3883 hxm=
min(0.75,2.*(1.-ps/
p(
ip,5)))
3884 IF(hx1*(3.-2.*hx1).LT.
rlu(0)*hxm*(3.-2.*hxm)) goto 420
3887 ELSEIF((mmat.EQ.42.OR.mmat.EQ.43.OR.mmat.EQ.44.OR.mmat.EQ.48)
3891 IF(wt.LT.
rlu(0)*
p(
ip,5)*pv(1,5)**3/wtcor(10)) goto 420
3892 ELSEIF(mmat.EQ.42.OR.mmat.EQ.43.OR.mmat.EQ.44.OR.mmat.EQ.48)
THEN
3901 IF(wt.LT.
rlu(0)*
p(
ip,5)*pv(1,5)**3/wtcor(10)) goto 420
3904 ELSEIF(mmat.EQ.46.AND.msgn.NE.0)
THEN
3907 IF(wt.LT.
rlu(0)*
p(im,5)**4/wtcor(10)) goto 490
3911 590
IF(mrem.EQ.1)
THEN
3913 pv(1,j)=pv(1,j)/(1.-pqt)
3921 IF((mmat.EQ.31.OR.mmat.EQ.45).AND.nd.EQ.3)
THEN
3926 IF(
p(
n+2,5)**2+
p(
n+3,5)**2+2.*
four(
n+2,
n+3).GE.
3927 & (parj(32)+pm2+pm3)**2) goto 660
3931 IF(
k(
n+2,2).EQ.0) goto 260
3933 ps=
p(
n+1,5)+
p(
n+2,5)
3938 ELSEIF(mmat.EQ.44)
THEN
3943 IF(
p(
n+3,5)**2+
p(
n+4,5)**2+2.*
four(
n+3,
n+4).GE.
3944 & (parj(32)+pm3+pm4)**2) goto 630
3948 IF(
k(
n+3,2).EQ.0) goto 260
3951 p(
n+3,j)=
p(
n+3,j)+
p(
n+4,j)
3953 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)
3954 ha=
p(
n+1,4)**2-
p(
n+2,4)**2
3955 hb=ha-(
p(
n+1,5)**2-
p(
n+2,5)**2)
3956 hc=(
p(
n+1,1)-
p(
n+2,1))**2+(
p(
n+1,2)-
p(
n+2,2))**2+
3957 & (
p(
n+1,3)-
p(
n+2,3))**2
3958 hd=(pv(1,4)-
p(
n+3,4))**2
3959 he=ha**2-2.*hd*(
p(
n+1,4)**2+
p(
n+2,4)**2)+hd**2
3962 hh=(sqrt(hg**2+he*hf)-hg)/(2.*hf)
3964 pcor=hh*(
p(
n+1,j)-
p(
n+2,j))
3965 p(
n+1,j)=
p(
n+1,j)+pcor
3966 p(
n+2,j)=
p(
n+2,j)-pcor
3968 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)
3969 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)
3974 630
IF((mmat.EQ.42.OR.mmat.EQ.43.OR.mmat.EQ.44.OR.mmat.EQ.48)
3975 &.AND.iabs(
k(
n+1,2)).LT.10)
THEN
3981 IF(pmr.GT.parj(32)+pm1+pm2) goto 640
3982 kfldum=int(1.5+
rlu(0))
3983 CALL
lukfdi(
k(
n+1,2),-isign(kfldum,
k(
n+1,2)),kfldmp,kf1)
3984 CALL
lukfdi(
k(
n+2,2),-isign(kfldum,
k(
n+2,2)),kfldmp,kf2)
3985 IF(kf1.EQ.0.OR.kf2.EQ.0) goto 260
3987 IF((mmat.EQ.42.OR.mmat.EQ.48).AND.pmr.GT.parj(64)+psm) goto 640
3988 IF(mmat.GE.43.AND.pmr.GT.0.2*parj(32)+psm) goto 640
3989 IF(mmat.EQ.48) goto 420
3990 IF(nd.EQ.4.OR.kfa.EQ.15) goto 260
3994 IF(
k(
n+1,2).EQ.0) goto 260
3998 ps=
p(
n+1,5)+
p(
n+2,5)
3999 IF(ps+parj(64).GT.pv(1,5)) goto 260
4007 640
IF((mmat.EQ.42.OR.mmat.EQ.48).AND.iabs(
k(
n+1,2)).LT.10)
THEN
4013 pv(1,j)=
p(
n+1,j)+
p(
n+2,j)
4037 bep=be(1)*
p(i,1)+be(2)*
p(i,2)+be(3)*
p(i,3)
4039 p(i,j)=
p(i,j)+ga*(ga*bep/(1.+ga)+
p(i,4))*be(j)
4041 p(i,4)=ga*(
p(i,4)+bep)
4054 IF(mstj(23).GE.1.AND.mmat.EQ.4.AND.
k(nsav+1,2).EQ.21)
THEN
4058 k(nsav+1,4)=mstu(5)*(nsav+2)
4059 k(nsav+1,5)=mstu(5)*(nsav+3)
4060 k(nsav+2,4)=mstu(5)*(nsav+3)
4061 k(nsav+2,5)=mstu(5)*(nsav+1)
4062 k(nsav+3,4)=mstu(5)*(nsav+1)
4063 k(nsav+3,5)=mstu(5)*(nsav+2)
4065 ELSEIF(mstj(23).GE.1.AND.mmat.EQ.4)
THEN
4068 k(nsav+2,4)=mstu(5)*(nsav+3)
4069 k(nsav+2,5)=mstu(5)*(nsav+3)
4070 k(nsav+3,4)=mstu(5)*(nsav+2)
4071 k(nsav+3,5)=mstu(5)*(nsav+2)
4073 ELSEIF(mstj(23).GE.1.AND.(mmat.EQ.32.OR.mmat.EQ.44.OR.mmat.EQ.46)
4074 &.AND.iabs(
k(nsav+1,2)).LE.10.AND.iabs(
k(nsav+2,2)).LE.10)
THEN
4077 k(nsav+1,4)=mstu(5)*(nsav+2)
4078 k(nsav+1,5)=mstu(5)*(nsav+2)
4079 k(nsav+2,4)=mstu(5)*(nsav+1)
4080 k(nsav+2,5)=mstu(5)*(nsav+1)
4082 ELSEIF(mstj(23).GE.1.AND.(mmat.EQ.32.OR.mmat.EQ.44.OR.mmat.EQ.46)
4083 &.AND.iabs(
k(nsav+1,2)).LE.20.AND.iabs(
k(nsav+2,2)).LE.20)
THEN
4085 ELSEIF(mstj(23).GE.1.AND.mmat.EQ.33.AND.iabs(
k(nsav+2,2)).EQ.21)
4091 kqp=kchg(kcp,2)*isign(1,
k(nsav+1,2))
4094 k(nsav+1,jcon)=mstu(5)*(nsav+2)
4095 k(nsav+2,9-jcon)=mstu(5)*(nsav+1)
4096 k(nsav+2,jcon)=mstu(5)*(nsav+3)
4097 k(nsav+3,9-jcon)=mstu(5)*(nsav+2)
4099 ELSEIF(mstj(23).GE.1.AND.mmat.EQ.33)
THEN
4102 k(nsav+1,4)=mstu(5)*(nsav+3)
4103 k(nsav+1,5)=mstu(5)*(nsav+3)
4104 k(nsav+3,4)=mstu(5)*(nsav+1)
4105 k(nsav+3,5)=mstu(5)*(nsav+1)
4109 ELSEIF(mstj(27).GE.1.AND.mmat.EQ.45.AND.nd.EQ.3)
THEN
4112 k(nsav+2,4)=mstu(5)*(nsav+3)
4113 k(nsav+2,5)=mstu(5)*(nsav+3)
4114 k(nsav+3,4)=mstu(5)*(nsav+2)
4115 k(nsav+3,5)=mstu(5)*(nsav+2)
4120 IF(
k(
ip,1).EQ.5)
k(
ip,1)=15
4121 IF(
k(
ip,1).LE.10)
k(
ip,1)=11
4122 IF(mmix.EQ.1.AND.mstj(26).EQ.2.AND.
k(
ip,1).EQ.11)
k(
ip,1)=12
4139 IMPLICIT DOUBLE PRECISION(
d)
4140 IMPLICIT INTEGER(i-
n)
4143 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4144 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4145 SAVE /ludat1/,/ludat2/
4149 IF(mstj(12).LT.2)
THEN
4150 CALL
lukfdi(kfl1,kfl2,kfl3,kf)
4157 IF(kfl1.EQ.0)
RETURN
4162 nmax=
min(mstu(125),10)
4166 IF(kf1a.GT.10.AND.kf1a.LT.10000) irank=0
4170 IF(mstu(121).GT.0)
THEN
4174 CALL
lukfdi(kfl1,kfl2,kfl3,kf)
4175 ELSEIF(kf1a.GT.10.AND.mstu(121).GT.0)
THEN
4177 kf=mstu(nsto+mstu(121))
4179 mstu(121)=mstu(121)-1
4182 100 CALL
lukfdi(kfl1,0,kfl3,kf)
4183 IF(mstu(121).EQ.-1) goto 100
4185 IF(kf.EQ.0.OR.iabs(kfl3).LE.10)
RETURN
4188 IF(mstj(12).LT.4)
THEN
4189 IF(mstu(121).EQ.0)
RETURN
4192 CALL
lukfdi(kfprev,0,kfl3,kfm)
4194 IF(iabs(kfl3).LE.10)
THEN
4206 IF(1.-parf(192)**gb.LT.
rlu(0))
THEN
4211 IF(mstu(121).EQ.0)
RETURN
4225 CALL
lukfdi(kfprev,0,kfl3,kfm)
4226 IF(mstu(121).EQ.-1) goto 100
4227 CALL
luptdi(kfl3,px3,py3)
4228 pm=
ulmass(kfm)**2+(px1+px3)**2+(py1+py3)**2
4236 IF(mstj(12).GT.4)
THEN
4237 popmn=sqrt((1.-
x)*(
g/
x-gb))
4239 ptst=exp((popm-popmn)*parf(193))
4244 gtst=(1.-parf(192)**popgn)/(1.-parf(192)**popg)
4247 IF(rtst.GT.ptst*gtst)
THEN
4249 IF(rtst.GT.ptst) mstu(121)=-1
4254 120
IF(nmes.LE.nmax) mstu(nsto+mstu(121)+1)=kfm
4255 IF(mstu(121).GT.0) goto 110
4258 IF(nmes.GT.nmax)
THEN
4274 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4275 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4276 SAVE /ludat1/,/ludat2/
4283 IF(kf1a.EQ.0)
RETURN
4285 IF(kf1a.LE.10.AND.kf2a.LE.10.AND.kfl1*kfl2.GT.0)
RETURN
4286 IF(kf1a.GT.10.AND.kf2a.GT.10)
RETURN
4287 IF((kf1a.GT.10.OR.kf2a.GT.10).AND.kfl1*kfl2.LT.0)
RETURN
4291 IF(mstj(15).EQ.1)
THEN
4293 IF(kf1a.GE.1.AND.kf1a.LE.6) ktab1=kf1a
4294 kfl1a=mod(kf1a/1000,10)
4295 kfl1b=mod(kf1a/100,10)
4297 IF(kfl1a.GE.1.AND.kfl1a.LE.4.AND.kfl1b.GE.1.AND.kfl1b.LE.4)
4298 & ktab1=6+kfl1a*(kfl1a-2)+2*kfl1b+(kfl1s-1)/2
4299 IF(kfl1a.GE.1.AND.kfl1a.LE.4.AND.kfl1a.EQ.kfl1b) ktab1=ktab1-1
4300 IF(kf1a.GE.1.AND.kf1a.LE.6) kfl1a=kf1a
4304 IF(kf2a.GE.1.AND.kf2a.LE.6) ktab2=kf2a
4305 kfl2a=mod(kf2a/1000,10)
4306 kfl2b=mod(kf2a/100,10)
4308 IF(kfl2a.GE.1.AND.kfl2a.LE.4.AND.kfl2b.GE.1.AND.kfl2b.LE.4)
4309 & ktab2=6+kfl2a*(kfl2a-2)+2*kfl2b+(kfl2s-1)/2
4310 IF(kfl2a.GE.1.AND.kfl2a.LE.4.AND.kfl2a.EQ.kfl2b) ktab2=ktab2-1
4312 IF(ktab1.GE.0.AND.ktab2.GE.0) goto 150
4319 IF(mstj(12).GE.2)
THEN
4321 par4m=1./(3.*sqrt(parj(4)))
4322 pardm=parj(7)/(parj(7)+par3m*parj(6))
4323 pars0=parj(5)*(2.+(1.+par2*par3m*parj(7))*(1.+par4m))
4324 pars1=parj(7)*pars0/(2.*par3m)+parj(5)*(parj(6)*(1.+par4m)+
4325 & par2*par3m*parj(6)*parj(7))
4326 pars2=parj(5)*2.*parj(6)*parj(7)*(par2*parj(7)+(1.+par4m)/par3m)
4327 parsm=
max(pars0,pars1,pars2)
4328 par4=par4*(1.+parsm)/(1.+parsm/(3.*par4m))
4335 IF(kf2a.EQ.0.AND.mstj(12).GE.1.AND.(1.+parj(1))*
rlu(0).GT.1.)
4337 IF(kf2a.GT.10) mbary=2
4338 IF(kf2a.GT.10.AND.kf2a.LE.10000) kfda=kf2a
4341 IF(kf1a.LE.10000) kfda=kf1a
4345 IF(kfda.NE.0.AND.mstj(12).GE.2)
THEN
4346 kflda=mod(kfda/1000,10)
4347 kfldb=mod(kfda/100,10)
4350 IF(
max(kflda,kfldb).EQ.3) wtdq=pars1
4351 IF(
min(kflda,kfldb).EQ.3) wtdq=pars2
4352 IF(kflds.EQ.1) wtdq=wtdq/(3.*par4m)
4353 IF((1.+wtdq)*
rlu(0).GT.1.) mbary=-1
4354 IF(mbary.EQ.-1.AND.kf2a.NE.0)
RETURN
4361 IF(kf2a.EQ.0) kfl3=isign(1+int((2.+par2)*
rlu(0)),-kfl1)
4362 kfla=
max(kf1a,kf2a+iabs(kfl3))
4363 kflb=
min(kf1a,kf2a+iabs(kfl3))
4364 IF(kfla.NE.kf1a) kfs=-kfs
4368 kfl1a=mod(kf1a/1000,10)
4369 kfl1b=mod(kf1a/100,10)
4370 120 kfl1d=kfl1a+int(
rlu(0)+0.5)*(kfl1b-kfl1a)
4371 kfl1e=kfl1a+kfl1b-kfl1d
4372 IF((kfl1d.EQ.3.AND.
rlu(0).GT.pardm).OR.(kfl1e.EQ.3.AND.
4373 &
rlu(0).LT.pardm))
THEN
4374 kfl1d=kfl1a+kfl1b-kfl1d
4375 kfl1e=kfl1a+kfl1b-kfl1e
4377 kfl3a=1+int((2.+par2*par3m*parj(7))*
rlu(0))
4378 IF((kfl1e.NE.kfl3a.AND.
rlu(0).GT.(1.+par4m)/
max(2.,1.+par4m))
4379 & .OR.(kfl1e.EQ.kfl3a.AND.
rlu(0).GT.2./
max(2.,1.+par4m)))
4382 IF(kfl1e.NE.kfl3a) kflds=2*int(
rlu(0)+1./(1.+par4m))+1
4383 kfl3=isign(10000+1000*
max(kfl1e,kfl3a)+100*
min(kfl1e,kfl3a)+
4385 kfla=
max(kfl1d,kfl3a)
4386 kflb=
min(kfl1d,kfl3a)
4387 IF(kfla.NE.kfl1d) kfs=-kfs
4391 IF(kfla.LE.2) kmul=int(parj(11)+
rlu(0))
4392 IF(kfla.EQ.3) kmul=int(parj(12)+
rlu(0))
4393 IF(kfla.GE.4) kmul=int(parj(13)+
rlu(0))
4394 IF(kmul.EQ.0.AND.parj(14).GT.0.)
THEN
4395 IF(
rlu(0).LT.parj(14)) kmul=2
4396 ELSEIF(kmul.EQ.1.AND.parj(15)+parj(16)+parj(17).GT.0.)
THEN
4398 IF(rmul.LT.parj(15)) kmul=3
4399 IF(kmul.EQ.1.AND.rmul.LT.parj(15)+parj(16)) kmul=4
4400 IF(kmul.EQ.1.AND.rmul.LT.parj(15)+parj(16)+parj(17)) kmul=5
4403 IF(kmul.EQ.0.OR.kmul.EQ.3) kfls=1
4404 IF(kmul.EQ.5) kfls=5
4405 IF(kfla.NE.kflb)
THEN
4406 kf=(100*kfla+10*kflb+kfls)*kfs*(-1)**kfla
4410 IF(kfla.LE.3) kf=110*(1+int(rmix+parf(imix-1))+
4411 & int(rmix+parf(imix)))+kfls
4412 IF(kfla.GE.4) kf=110*kfla+kfls
4414 IF(kmul.EQ.2.OR.kmul.EQ.3) kf=kf+isign(10000,kf)
4415 IF(kmul.EQ.4) kf=kf+isign(20000,kf)
4419 IF(
rlu(0).GT.parj(25)) goto 110
4420 ELSEIF(kf.EQ.331)
THEN
4421 IF(
rlu(0).GT.parj(26)) goto 110
4426 130
IF(kf1a.LE.10.AND.kf2a.EQ.0)
THEN
4428 140 kflb=1+int((2.+par2*par3)*
rlu(0))
4429 kflc=1+int((2.+par2*par3)*
rlu(0))
4431 IF(kflb.GE.kflc) kflds=3
4432 IF(kflds.EQ.1.AND.par4*
rlu(0).GT.1.) goto 140
4433 IF(kflds.EQ.3.AND.par4.LT.
rlu(0)) goto 140
4434 kfl3=isign(1000*
max(kflb,kflc)+100*
min(kflb,kflc)+kflds,kfl1)
4437 ELSEIF(kf1a.LE.10)
THEN
4439 kflb=mod(kf2a/1000,10)
4440 kflc=mod(kf2a/100,10)
4445 IF(kf2a.EQ.0) kfl3=isign(1+int((2.+par2)*
rlu(0)),kfl1)
4446 kfla=kf2a+iabs(kfl3)
4447 kflb=mod(kf1a/1000,10)
4448 kflc=mod(kf1a/100,10)
4454 IF(kflds.EQ.3.AND.kflb.NE.kflc) kbary=5
4455 IF(kfla.NE.kflb.AND.kfla.NE.kflc) kbary=kbary+1
4456 wt=parf(60+kbary)+parj(18)*parf(70+kbary)
4457 IF(mbary.EQ.1.AND.mstj(12).GE.2)
THEN
4459 IF(
max(kflb,kflc).EQ.3) wtdq=pars1
4460 IF(
min(kflb,kflc).EQ.3) wtdq=pars2
4461 IF(kflds.EQ.1) wtdq=wtdq/(3.*par4m)
4462 IF(kflds.EQ.1) wt=wt*(1.+wtdq)/(1.+parsm/(3.*par4m))
4463 IF(kflds.EQ.3) wt=wt*(1.+wtdq)/(1.+parsm)
4465 IF(kf2a.EQ.0.AND.wt.LT.
rlu(0)) goto 130
4468 kfld=
max(kfla,kflb,kflc)
4469 kflf=
min(kfla,kflb,kflc)
4470 kfle=kfla+kflb+kflc-kfld-kflf
4472 IF((parf(60+kbary)+parj(18)*parf(70+kbary))*
rlu(0).GT.
4473 & parf(60+kbary)) kfls=4
4475 IF(kfls.EQ.2.AND.kfld.GT.kfle.AND.kfle.GT.kflf)
THEN
4476 IF(kflds.EQ.1.AND.kfla.EQ.kfld) kfll=1
4477 IF(kflds.EQ.1.AND.kfla.NE.kfld) kfll=int(0.25+
rlu(0))
4478 IF(kflds.EQ.3.AND.kfla.NE.kfld) kfll=int(0.75+
rlu(0))
4480 IF(kfll.EQ.0) kf=isign(1000*kfld+100*kfle+10*kflf+kfls,kfl1)
4481 IF(kfll.EQ.1) kf=isign(1000*kfld+100*kflf+10*kfle+kfls,kfl1)
4486 150
IF(ktab2.EQ.0.AND.mstj(12).LE.0)
THEN
4489 ELSEIF(ktab2.EQ.0.AND.ktab1.GE.7.AND.mstj(12).LE.1)
THEN
4492 ELSEIF(ktab2.EQ.0)
THEN
4501 DO 160 kt3=kt3l,kt3u
4502 rfl=rfl+parf(120+80*ktab1+25*kts+kt3)
4508 DO 180 kt3=kt3l,kt3u
4510 rfl=rfl-parf(120+80*ktab1+25*kts+kt3)
4511 IF(rfl.LE.0.) goto 200
4520 kfl3=isign(kfl3a,kfl1*(2*ktab1-13))
4523 IF(ktab3.GE.8) kfl3a=2
4524 IF(ktab3.GE.11) kfl3a=3
4525 IF(ktab3.GE.16) kfl3a=4
4526 kfl3b=(ktab3-6-kfl3a*(kfl3a-2))/2
4527 kfl3=1000*kfl3a+100*kfl3b+1
4528 IF(kfl3a.EQ.kfl3b.OR.ktab3.NE.6+kfl3a*(kfl3a-2)+2*kfl3b) kfl3=
4530 kfl3=isign(kfl3,kfl1*(13-2*ktab1))
4534 IF(kfl3a.EQ.kfl1a.AND.kfl3b.EQ.kfl1b.AND.(kfl3a.LE.3.OR.
4536 rfl=
rlu(0)*(parf(143+80*ktab1+25*ktabs)+parf(144+80*ktab1+
4537 & 25*ktabs)+parf(145+80*ktab1+25*ktabs))
4539 IF(rfl.GT.parf(143+80*ktab1+25*ktabs)) kf=220+2*ktabs+1
4540 IF(rfl.GT.parf(143+80*ktab1+25*ktabs)+parf(144+80*ktab1+
4541 & 25*ktabs)) kf=330+2*ktabs+1
4542 ELSEIF(ktab1.LE.6.AND.ktab3.LE.6)
THEN
4543 kfla=
max(ktab1,ktab3)
4544 kflb=
min(ktab1,ktab3)
4546 IF(kfla.NE.kf1a) kfs=-kfs
4547 kf=(100*kfla+10*kflb+2*ktabs+1)*kfs*(-1)**kfla
4548 ELSEIF(ktab1.GE.7.AND.ktab3.GE.7)
THEN
4550 IF(kfl1a.EQ.kfl3a)
THEN
4551 kfla=
max(kfl1b,kfl3b)
4552 kflb=
min(kfl1b,kfl3b)
4553 IF(kfla.NE.kfl1b) kfs=-kfs
4554 ELSEIF(kfl1a.EQ.kfl3b)
THEN
4558 ELSEIF(kfl1b.EQ.kfl3a)
THEN
4561 ELSEIF(kfl1b.EQ.kfl3b)
THEN
4562 kfla=
max(kfl1a,kfl3a)
4563 kflb=
min(kfl1a,kfl3a)
4564 IF(kfla.NE.kfl1a) kfs=-kfs
4566 CALL
luerrm(2,
'(LUKFDI:) no matching flavours for qq -> qq')
4569 kf=(100*kfla+10*kflb+2*ktabs+1)*kfs*(-1)**kfla
4582 kfld=
max(kfla,kflb,kflc)
4583 kflf=
min(kfla,kflb,kflc)
4584 kfle=kfla+kflb+kflc-kfld-kflf
4585 IF(ktabs.EQ.0) kf=isign(1000*kfld+100*kflf+10*kfle+2,kfl1)
4586 IF(ktabs.GE.1) kf=isign(1000*kfld+100*kfle+10*kflf+2*ktabs,kfl1)
4590 IF(kfl2.NE.0) kfl3=0
4593 CALL
luerrm(2,
'(LUKFDI:) user-defined flavour probabilities '//
4606 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4612 IF(parj(23).GT.
rlu(0))
pt=parj(24)*
pt
4613 IF(mstj(91).EQ.1)
pt=parj(22)*
pt
4614 IF(kfla.EQ.0.AND.mstj(13).LE.0)
pt=0.
4627 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4628 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4629 SAVE /ludat1/,/ludat2/
4635 IF(kfla.GE.10) kflh=mod(kfla/1000,10)
4638 IF(mstj(11).EQ.1.OR.(mstj(11).EQ.3.AND.kflh.LE.3).OR.
4639 &mstj(11).GE.4)
THEN
4641 IF(mstj(91).EQ.1) fa=parj(43)
4642 IF(kflb.GE.10) fa=fa+parj(45)
4644 IF(mstj(91).EQ.1) fbb=parj(44)
4647 IF(kfla.GE.10) fc=fc-parj(45)
4648 IF(kflb.GE.10) fc=fc+parj(45)
4649 IF(mstj(11).GE.4.AND.kflh.GE.4.AND.kflh.LE.5)
THEN
4651 IF(mstj(11).EQ.5.AND.kflh.EQ.5) fred=parj(47)
4652 fc=fc+fred*fbb*parf(100+kflh)**2
4653 ELSEIF(mstj(11).GE.4.AND.kflh.GE.6.AND.kflh.LE.8)
THEN
4655 IF(mstj(11).EQ.5) fred=parj(48)
4656 fc=fc+fred*fbb*pmas(kflh,1)**2
4659 IF(abs(fc-1.).GT.0.01) mc=2
4665 IF(fc.GT.fb) zmax=fb/fc
4666 ELSEIF(abs(fc-fa).LT.0.01)
THEN
4671 zmax=0.5*(fb+fc-sqrt((fb-fc)**2+4.*fa*fb))/(fc-fa)
4672 IF(zmax.GT.0.9999.AND.fb.GT.100.) zmax=
min(zmax,1.-fa/fb)
4677 IF(zmax.LT.0.1)
THEN
4684 fint=1.+(1.-1./zdivc)/(fc-1.)
4686 ELSEIF(zmax.GT.0.85.AND.fb.GT.1.)
THEN
4688 fscb=sqrt(4.+(fc/fb)**2)
4689 zdiv=fscb-1./zmax-(fc/fb)*
log(zmax*0.5*(fscb+fc/fb))
4690 IF(ma.GE.2) zdiv=zdiv+(fa/fb)*
log(1.-zmax)
4691 zdiv=
min(zmax,
max(0.,zdiv))
4692 fint=1.+fb*(1.-zdiv)
4699 IF(fint*
rlu(0).LE.1.)
THEN
4701 ELSEIF(mc.EQ.1)
THEN
4705 z=(zdivc+
z*(1.-zdivc))**(1./(1.-fc))
4708 ELSEIF(mmax.EQ.3)
THEN
4709 IF(fint*
rlu(0).LE.1.)
THEN
4711 fpre=exp(fb*(
z-zdiv))
4718 IF(
z.LE.0..OR.
z.GE.1.) goto 100
4719 fexp=fc*
log(zmax/
z)+fb*(1./zmax-1./
z)
4720 IF(ma.GE.2) fexp=fexp+fa*
log((1.-
z)/(1.-zmax))
4721 fval=exp(
max(-50.,
min(50.,fexp)))
4722 IF(fval.LT.
rlu(0)*fpre) goto 100
4726 fc=parj(50+
max(1,kflh))
4727 IF(mstj(91).EQ.1) fc=parj(59)
4729 IF(fc.GE.0..AND.fc.LE.1.)
THEN
4730 IF(fc.GT.
rlu(0))
z=1.-
z**(1./3.)
4731 ELSEIF(fc.GT.-1.AND.fc.LT.0.)
THEN
4732 IF(-4.*fc*
z*(1.-
z)**2.LT.
rlu(0)*((1.-
z)**2-fc*
z)**2) goto 110
4734 IF(fc.GT.0.)
z=1.-
z**(1./fc)
4735 IF(fc.LT.0.)
z=
z**(-1./fc)
4747 IMPLICIT DOUBLE PRECISION(
d)
4748 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
4749 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4750 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4751 SAVE /lujets/,/ludat1/,/ludat2/
4752 dimension pmth(5,50),ps(5),pma(4),pmsd(4),iep(4),ipa(4),
4753 &kfla(4),kfld(4),kfl(4),itry(4),isi(4),isl(4),dp(4),dpt(5,4),
4754 &ksh(0:40),kcii(2),niis(2),iiis(2,2),theiis(2,2),phiiis(2,2),
4758 IF(mstj(41).LE.0.OR.(mstj(41).EQ.1.AND.qmax.LE.parj(82)).OR.
4759 &qmax.LE.
min(parj(82),parj(83)))
RETURN
4765 pmth(2,21)=sqrt(pmth(1,21)**2+0.25*parj(82)**2)
4766 pmth(3,21)=2.*pmth(2,21)
4767 pmth(4,21)=pmth(3,21)
4768 pmth(5,21)=pmth(3,21)
4770 pmth(2,22)=sqrt(pmth(1,22)**2+0.25*parj(83)**2)
4771 pmth(3,22)=2.*pmth(2,22)
4772 pmth(4,22)=pmth(3,22)
4773 pmth(5,22)=pmth(3,22)
4775 IF(mstj(41).GE.2) pmqth1=
min(parj(82),parj(83))
4777 IF(mstj(41).GE.2) pmqth2=
min(pmth(2,21),pmth(2,22))
4781 pmth(2,ifl)=sqrt(pmth(1,ifl)**2+0.25*pmqth1**2)
4782 pmth(3,ifl)=pmth(2,ifl)+pmqth2
4783 pmth(4,ifl)=sqrt(pmth(1,ifl)**2+0.25*parj(82)**2)+pmth(2,21)
4784 pmth(5,ifl)=sqrt(pmth(1,ifl)**2+0.25*parj(83)**2)+pmth(2,22)
4787 IF(mstj(41).GE.2) ksh(ifl)=1
4789 pmth(2,ifl)=sqrt(pmth(1,ifl)**2+0.25*parj(83)**2)
4790 pmth(3,ifl)=pmth(2,ifl)+pmth(2,22)
4791 pmth(4,ifl)=pmth(3,ifl)
4792 pmth(5,ifl)=pmth(3,ifl)
4794 pt2min=
max(0.5*parj(82),1.1*parj(81))**2
4796 alfm=
log(pt2min/alams)
4799 IF(ip1.GT.0.AND.ip1.LE.
min(
n,mstu(4)-mstu(32)).AND.ip2.EQ.0)
THEN
4802 ELSEIF(
min(ip1,ip2).GT.0.AND.
max(ip1,ip2).LE.
min(
n,mstu(4)-
4807 ELSEIF(ip1.GT.0.AND.ip1.LE.
min(
n,mstu(4)-mstu(32)).AND.ip2.LT.0
4808 &.AND.ip2.GE.-3)
THEN
4815 &
'(LUSHOW:) failed to reconstruct showering system')
4816 IF(mstu(21).GE.1)
RETURN
4826 kfla(i)=iabs(
k(ipa(i),2))
4830 IF(kfla(i).GE.6.AND.kfla(i).LE.8)
THEN
4831 ifla=37+kfla(i)+isign(2,
k(ipa(i),2))
4833 pmth(2,ifla)=sqrt(pmth(1,ifla)**2+0.25*pmqth1**2)
4834 pmth(3,ifla)=pmth(2,ifla)+pmqth2
4835 pmth(4,ifla)=sqrt(pmth(1,ifla)**2+0.25*parj(82)**2)+pmth(2,21)
4836 pmth(5,ifla)=sqrt(pmth(1,ifla)**2+0.25*parj(83)**2)+pmth(2,22)
4838 IF(kfla(i).LE.40)
THEN
4839 IF(ksh(kfla(i)).EQ.1) pma(i)=pmth(3,ifla)
4842 IF(kfla(i).GT.40)
THEN
4845 IF(ksh(kfla(i)).EQ.0.OR.pma(i).GT.qmax) irej=irej+1
4848 ps(j)=ps(j)+
p(ipa(i),j)
4851 IF(irej.EQ.npa)
RETURN
4852 ps(5)=sqrt(
max(0.,ps(4)**2-ps(1)**2-ps(2)**2-ps(3)**2))
4853 IF(npa.EQ.1) ps(5)=ps(4)
4854 IF(ps(5).LE.pm+pmqth1)
RETURN
4858 IF(npa.EQ.2.AND.mstj(47).GE.1)
THEN
4859 IF(kfla(1).GE.1.AND.kfla(1).LE.8.AND.kfla(2).GE.1.AND.
4860 & kfla(2).LE.8) m3jc=1
4861 IF((kfla(1).EQ.11.OR.kfla(1).EQ.13.OR.kfla(1).EQ.15.OR.
4862 & kfla(1).EQ.17).AND.kfla(2).EQ.kfla(1)) m3jc=1
4863 IF((kfla(1).EQ.11.OR.kfla(1).EQ.13.OR.kfla(1).EQ.15.OR.
4864 & kfla(1).EQ.17).AND.kfla(2).EQ.kfla(1)+1) m3jc=1
4865 IF((kfla(1).EQ.12.OR.kfla(1).EQ.14.OR.kfla(1).EQ.16.OR.
4866 & kfla(1).EQ.18).AND.kfla(2).EQ.kfla(1)-1) m3jc=1
4867 IF(mstj(47).EQ.2.OR.mstj(47).EQ.4) m3jc=1
4869 IF(m3jc.EQ.1.AND.mstj(47).GE.3.AND.kfla(1).EQ.kfla(2))
THEN
4871 qme=(2.*pmth(1,kfla(1))/ps(5))**2
4877 IF(mstj(50).GE.1.AND.mstj(50).LE.3.AND.npa.EQ.2) miis=mstj(50)
4882 IF(kca.NE.0) kcii(i)=kchg(kca,2)*isign(1,
k(ipa(i),2))
4884 IF(kcii(i).NE.0)
THEN
4886 icsi=mod(
k(ipa(i),3+j)/mstu(5),mstu(5))
4887 IF(icsi.GT.0.AND.icsi.NE.ipa(1).AND.icsi.NE.ipa(2).AND.
4888 & (kcii(i).EQ.(-1)**(j+1).OR.kcii(i).EQ.2))
THEN
4890 iiis(i,niis(i))=icsi
4895 IF(niis(1)+niis(2).EQ.0) miis=0
4903 k(
n+i,j)=
k(ipa(i),j)
4904 p(
n+i,j)=
p(ipa(i),j)
4908 DO 220 i=3,2+niis(1)
4910 k(
n+i,j)=
k(iiis(1,i-2),j)
4911 p(
n+i,j)=
p(iiis(1,i-2),j)
4915 DO 240 i=3+niis(1),2+niis(1)+niis(2)
4917 k(
n+i,j)=
k(iiis(2,i-2-niis(1)),j)
4918 p(
n+i,j)=
p(iiis(2,i-2-niis(1)),j)
4922 CALL ludbrb(
n+1,
n+2+niis(1)+niis(2),0.,0.,-dble(ps(1)/ps(4)),
4923 & -dble(ps(2)/ps(4)),-dble(ps(3)/ps(4)))
4925 CALL ludbrb(
n+1,
n+2+niis(1)+niis(2),0.,-
phi,0d0,0d0,0d0)
4927 CALL ludbrb(
n+1,
n+2+niis(1)+niis(2),-the,0.,0d0,0d0,0d0)
4928 DO 250 i=3,2+niis(1)
4929 theiis(1,i-2)=
ulangl(
p(
n+i,3),sqrt(
p(
n+i,1)**2+
p(
n+i,2)**2))
4932 DO 260 i=3+niis(1),2+niis(1)+niis(2)
4933 theiis(2,i-2-niis(1))=paru(1)-
ulangl(
p(
n+i,3),
4934 & sqrt(
p(
n+i,1)**2+
p(
n+i,2)**2))
4935 phiiis(2,i-2-niis(1))=
ulangl(
p(
n+i,1),
p(
n+i,2))
4941 IF(
n.GT.mstu(4)-mstu(32)-5)
THEN
4942 CALL
luerrm(11,
'(LUSHOW:) no more memory left in LUJETS')
4943 IF(mstu(21).GE.1)
RETURN
4963 IF(npa.EQ.1) im=ns-1
4966 IF(im.GT.
n) goto 510
4968 IF(kflm.GT.40) goto 270
4969 IF(ksh(kflm).EQ.0) goto 270
4971 IF(kflm.GE.6.AND.kflm.LE.8) iflm=37+kflm+isign(2,
k(im,2))
4972 IF(
p(im,5).LT.pmth(2,iflm)) goto 270
4977 IF(
n+nep.GT.mstu(4)-mstu(32)-5)
THEN
4978 CALL
luerrm(11,
'(LUSHOW:) no more memory left in LUJETS')
4979 IF(mstu(21).GE.1)
RETURN
4986 IF(
k(im-1,3).EQ.igm) iau=im-1
4987 IF(
n.GE.im+1.AND.
k(im+1,3).EQ.igm) iau=im+1
4999 k(
n+i,2)=
k(ipa(i),2)
5001 ELSEIF(kflm.NE.21)
THEN
5004 ELSEIF(
k(im,5).EQ.21)
THEN
5022 IF(kfld(
ip).LE.40)
THEN
5023 IF(ksh(kfld(
ip)).EQ.1) isi(
ip)=1
5031 IF(npa.GE.3)
p(
n+i,4)=(ps(4)*
p(ipa(i),4)-ps(1)*
p(ipa(i),1)-
5032 & ps(2)*
p(ipa(i),2)-ps(3)*
p(ipa(i),3))/ps(5)
5033 p(
n+i,5)=
min(qmax,ps(5))
5034 IF(npa.GE.3)
p(
n+i,5)=
min(
p(
n+i,5),
p(
n+i,4))
5035 IF(isi(i).EQ.0)
p(
n+i,5)=
p(ipa(i),5)
5038 IF(mstj(43).LE.2) pem=
v(im,2)
5039 IF(mstj(43).GE.3) pem=
p(im,4)
5040 p(
n+1,5)=
min(
p(im,5),
v(im,1)*pem)
5041 p(
n+2,5)=
min(
p(im,5),(1.-
v(im,1))*pem)
5042 IF(
k(
n+2,2).EQ.22)
p(
n+2,5)=pmth(1,22)
5046 IF(isi(i).EQ.1)
THEN
5048 IF(kfld(i).GE.6.AND.kfld(i).LE.8) ifld=37+kfld(i)+
5050 IF(
p(
n+i,5).LE.pmth(3,ifld))
p(
n+i,5)=pmth(1,ifld)
5052 v(
n+i,5)=
p(
n+i,5)**2
5059 IF(inum.EQ.0.AND.isl(i).EQ.1) inum=i
5062 IF(inum.EQ.0.AND.itry(i).EQ.0.AND.isi(i).EQ.1)
THEN
5064 IF(kfld(i).GE.6.AND.kfld(i).LE.8) ifld=37+kfld(i)+
5066 IF(
p(
n+i,5).GE.pmth(2,ifld)) inum=i
5072 IF(isi(i).EQ.1.AND.pmsd(i).GE.pmqth2)
THEN
5073 rpm=
p(
n+i,5)/pmsd(i)
5075 IF(kfld(i).GE.6.AND.kfld(i).LE.8) ifld=37+kfld(i)+
5077 IF(rpm.GT.
rmax.AND.
p(
n+i,5).GE.pmth(2,ifld))
THEN
5090 IF(iep(i).GT.
n+nep) iep(i)=
n+1
5093 kfl(i)=iabs(
k(iep(i),2))
5095 itry(inum)=itry(inum)+1
5096 IF(itry(inum).GT.200)
THEN
5097 CALL
luerrm(14,
'(LUSHOW:) caught in infinite loop')
5098 IF(mstu(21).GE.1)
RETURN
5101 IF(kfl(1).GT.40) goto 430
5102 IF(ksh(kfl(1)).EQ.0) goto 430
5104 IF(kfl(1).GE.6.AND.kfl(1).LE.8) ifl=37+kfl(1)+
5105 &isign(2,
k(iep(1),2))
5106 IF(
p(iep(1),5).LT.pmth(2,ifl)) goto 430
5109 IF(miis.GE.1.AND.iep(1).LE.ns+3)
THEN
5112 IF(iabs(kcii(iii)).EQ.1.AND.niis(iii).EQ.1)
THEN
5114 ELSEIF(kcii(iii).EQ.2.AND.niis(iii).EQ.1)
THEN
5115 IF(
rlu(0).GT.0.5) isii(iii)=1
5116 ELSEIF(kcii(iii).EQ.2.AND.niis(iii).EQ.2)
THEN
5118 IF(
rlu(0).GT.0.5) isii(iii)=2
5125 ELSEIF(igm.EQ.0.OR.mstj(43).LE.2)
THEN
5128 IF(inum.EQ.1) pmed=
v(im,1)*pem
5129 IF(inum.EQ.2) pmed=(1.-
v(im,1))*pem
5131 IF(mod(mstj(43),2).EQ.1)
THEN
5135 zc=0.5*(1.-sqrt(
max(0.,1.-(2.*pmth(2,21)/pmed)**2)))
5136 IF(zc.LT.1e-4) zc=(pmth(2,21)/pmed)**2
5137 zce=0.5*(1.-sqrt(
max(0.,1.-(2.*pmth(2,22)/pmed)**2)))
5138 IF(zce.LT.1e-4) zce=(pmth(2,22)/pmed)**2
5142 IF((mstj(41).EQ.1.AND.zc.GT.0.49).OR.(mstj(41).GE.2.AND.
5143 &
min(zc,zce).GT.0.49))
THEN
5144 p(iep(1),5)=pmth(1,ifl)
5145 v(iep(1),5)=
p(iep(1),5)**2
5150 IF(mstj(49).EQ.0.AND.kfl(1).EQ.21)
THEN
5151 fbr=6.*
log((1.-zc)/zc)+mstj(45)*(0.5-zc)
5152 ELSEIF(mstj(49).EQ.0)
THEN
5153 fbr=(8./3.)*
log((1.-zc)/zc)
5156 ELSEIF(mstj(49).EQ.1.AND.kfl(1).EQ.21)
THEN
5157 fbr=(parj(87)+mstj(45)*parj(88))*(1.-2.*zc)
5158 ELSEIF(mstj(49).EQ.1)
THEN
5160 IF(igm.EQ.0.AND.m3jc.EQ.1) fbr=4.*fbr
5163 ELSEIF(kfl(1).EQ.21)
THEN
5164 fbr=6.*mstj(45)*(0.5-zc)
5166 fbr=2.*
log((1.-zc)/zc)
5170 IF(kfl(1).GE.11.AND.kfl(1).LE.18) fbr=0.
5173 IF(mstj(41).GE.2.AND.kfl(1).GE.1.AND.kfl(1).LE.18)
THEN
5174 fbre=(kchg(kfl(1),1)/3.)**2*2.*
log((1.-zce)/zce)
5175 IF(mstj(41).EQ.10) fbre=parj(84)*fbre
5184 IF(kfl(i).LE.40)
THEN
5186 IF(kfl(i).GE.6.AND.kfl(i).LE.8) ifli=37+kfl(i)+
5187 & isign(2,
k(iep(i),2))
5188 IF(ksh(kfl(i)).EQ.1) pm=pmth(2,ifli)
5192 pms=
min(pms,(
p(im,5)-pm2)**2)
5197 DO 410 iff=4,mstj(45)
5198 IF(pms.GT.4.*pmth(2,iff)**2) b0=(33.-2.*iff)/6.
5200 IF(fbr.LT.1e-3)
THEN
5202 ELSEIF(mstj(44).LE.0)
THEN
5203 pmsqcd=pms*exp(
max(-50.,
log(
rlu(0))*paru(2)/(paru(111)*fbr)))
5204 ELSEIF(mstj(44).EQ.1)
THEN
5205 pmsqcd=4.*alams*(0.25*pms/alams)**(
rlu(0)**(b0/fbr))
5207 pmsqcd=pms*exp(
max(-50.,alfm*b0*
log(
rlu(0))/fbr))
5209 IF(zc.GT.0.49.OR.pmsqcd.LE.pmth(4,ifl)**2) pmsqcd=pmth(2,ifl)**2
5214 IF(mstj(41).GE.2.AND.kfl(1).GE.1.AND.kfl(1).LE.18)
THEN
5215 pmsqed=pms*exp(
max(-50.,
log(
rlu(0))*paru(2)/(paru(101)*fbre)))
5216 IF(zce.GT.0.49.OR.pmsqed.LE.pmth(5,ifl)**2) pmsqed=
5218 IF(pmsqed.GT.pmsqcd)
THEN
5225 p(iep(1),5)=sqrt(
v(iep(1),5))
5226 IF(
p(iep(1),5).LE.pmth(3,ifl))
THEN
5227 p(iep(1),5)=pmth(1,ifl)
5228 v(iep(1),5)=
p(iep(1),5)**2
5234 z=1.-(1.-zce)*(zce/(1.-zce))**
rlu(0)
5235 IF(1.+
z**2.LT.2.*
rlu(0)) goto 390
5239 ELSEIF(mstj(49).NE.1.AND.kfl(1).NE.21)
THEN
5240 z=1.-(1.-zc)*(zc/(1.-zc))**
rlu(0)
5241 IF(1.+
z**2.LT.2.*
rlu(0)) goto 390
5243 ELSEIF(mstj(49).EQ.0.AND.mstj(45)*(0.5-zc).LT.
rlu(0)*fbr)
THEN
5244 z=(1.-zc)*(zc/(1.-zc))**
rlu(0)
5245 IF(
rlu(0).GT.0.5)
z=1.-
z
5246 IF((1.-
z*(1.-
z))**2.LT.
rlu(0)) goto 390
5248 ELSEIF(mstj(49).NE.1)
THEN
5249 z=zc+(1.-2.*zc)*
rlu(0)
5250 IF(
z**2+(1.-
z)**2.LT.
rlu(0)) goto 390
5251 kflb=1+int(mstj(45)*
rlu(0))
5252 pmq=4.*pmth(2,kflb)**2/
v(iep(1),5)
5253 IF(pmq.GE.1.) goto 390
5254 pmq0=4.*pmth(2,21)**2/
v(iep(1),5)
5255 IF(mod(mstj(43),2).EQ.0.AND.(1.+0.5*pmq)*sqrt(1.-pmq).LT.
5256 &
rlu(0)*(1.+0.5*pmq0)*sqrt(1.-pmq0)) goto 390
5260 ELSEIF(kfl(1).NE.21)
THEN
5261 z=1.-sqrt(zc**2+
rlu(0)*(1.-2.*zc))
5263 ELSEIF(
rlu(0)*(parj(87)+mstj(45)*parj(88)).LE.parj(87))
THEN
5264 z=zc+(1.-2.*zc)*
rlu(0)
5267 z=zc+(1.-2.*zc)*
rlu(0)
5268 kflb=1+int(mstj(45)*
rlu(0))
5269 pmq=4.*pmth(2,kflb)**2/
v(iep(1),5)
5270 IF(pmq.GE.1.) goto 390
5273 IF(mce.EQ.1.AND.mstj(44).GE.2)
THEN
5274 IF(
z*(1.-
z)*
v(iep(1),5).LT.pt2min) goto 390
5275 IF(alfm/
log(
v(iep(1),5)*
z*(1.-
z)/alams).LT.
rlu(0)) goto 390
5279 IF(kfl(1).EQ.21)
THEN
5280 kflgd1=iabs(
k(iep(1),5))
5284 kflgd2=iabs(
k(iep(1),5))
5288 ELSEIF(nep.GE.3)
THEN
5290 ELSEIF(igm.EQ.0.OR.mstj(43).LE.2)
THEN
5291 ped=0.5*(
v(im,5)+
v(iep(1),5)-pm2**2)/
p(im,5)
5293 IF(iep(1).EQ.
n+1) ped=
v(im,1)*pem
5294 IF(iep(1).EQ.
n+2) ped=(1.-
v(im,1))*pem
5296 IF(mod(mstj(43),2).EQ.1)
THEN
5298 IF(kflgd1.GE.6.AND.kflgd1.LE.8) iflgd1=ifl
5300 IF(kflgd2.EQ.22) pmqth3=0.5*parj(83)
5301 pmq1=(pmth(1,iflgd1)**2+pmqth3**2)/
v(iep(1),5)
5302 pmq2=(pmth(1,kflgd2)**2+pmqth3**2)/
v(iep(1),5)
5303 zd=sqrt(
max(0.,(1.-
v(iep(1),5)/ped**2)*((1.-pmq1-pmq2)**2-
5307 zd=sqrt(
max(0.,1.-
v(iep(1),5)/ped**2))
5312 IF(
z.LT.zl.OR.
z.GT.zu) goto 390
5313 IF(kfl(1).EQ.21)
v(iep(1),3)=
log(zu*(1.-zl)/
max(1e-20,zl*
5315 IF(kfl(1).NE.21)
v(iep(1),3)=
log((1.-zl)/
max(1e-10,1.-zu))
5318 IF(mstj(40).NE.0.AND.kfl(1).NE.21)
THEN
5320 eglu=0.5*ps(5)*(1.-
z)*(1.+
v(iep(1),5)/
v(ns+1,5))
5324 chi=parj(89)**2/(parj(89)**2+eglu**2)
5325 IF(mstj(40).EQ.1)
THEN
5326 IF(chi.LT.
rlu(0)) goto 390
5327 ELSEIF(mstj(40).EQ.2)
THEN
5328 IF(1.-chi.LT.
rlu(0)) goto 390
5333 IF(igm.EQ.0.AND.m3jc.EQ.1)
THEN
5334 x1=
z*(1.+
v(iep(1),5)/
v(ns+1,5))
5335 x2=1.-
v(iep(1),5)/
v(ns+1,5)
5339 ki2=
k(ipa(3-inum),2)
5340 qf1=kchg(iabs(ki1),1)*isign(1,ki1)/3.
5341 qf2=kchg(iabs(ki2),1)*isign(1,ki2)/3.
5342 wshow=qf1**2*(1.-x1)/
x3*(1.+(x1/(2.-
x2))**2)+
5343 & qf2**2*(1.-
x2)/
x3*(1.+(
x2/(2.-x1))**2)
5344 wme=(qf1*(1.-x1)/
x3-qf2*(1.-
x2)/
x3)**2*(x1**2+
x2**2)
5345 ELSEIF(mstj(49).NE.1)
THEN
5346 wshow=1.+(1.-x1)/
x3*(x1/(2.-
x2))**2+
5347 & (1.-
x2)/
x3*(
x2/(2.-x1))**2
5349 IF(m3jcm.EQ.1) wme=wme-qme*
x3-0.5*qme**2-
5350 & (0.5*qme+0.25*qme**2)*((1.-
x2)/
max(1e-7,1.-x1)+
5351 & (1.-x1)/
max(1e-7,1.-
x2))
5353 wshow=4.*
x3*((1.-x1)/(2.-
x2)**2+(1.-
x2)/(2.-x1)**2)
5355 IF(mstj(102).GE.2) wme=
x3**2-2.*(1.+
x3)*(1.-x1)*(1.-
x2)*
5358 IF(wme.LT.
rlu(0)*wshow) goto 390
5361 ELSEIF(mce.EQ.1.AND.igm.GT.0.AND.mstj(42).GE.2)
THEN
5364 IF(iep(1).EQ.
n+2) zm=1.-
v(im,1)
5365 the2id=
z*(1.-
z)*(zm*
p(im,4))**2/
v(iep(1),5)
5367 420
IF(
k(iaom,5).EQ.22)
THEN
5369 IF(
k(iaom,3).LE.ns) maom=0
5370 IF(maom.EQ.1) goto 420
5373 the2im=
v(iaom,1)*(1.-
v(iaom,1))*
p(iaom,4)**2/
v(iaom,5)
5374 IF(the2id.LT.the2im) goto 390
5379 IF(mstj(48).EQ.1)
THEN
5380 IF(nep.EQ.1.AND.im.EQ.ns)
THEN
5381 the2id=
z*(1.-
z)*ps(4)**2/
v(iep(1),5)
5382 IF(the2id.LT.1./parj(85)**2) goto 390
5383 ELSEIF(nep.EQ.2.AND.iep(1).EQ.ns+2)
THEN
5384 the2id=
z*(1.-
z)*(0.5*
p(im,4))**2/
v(iep(1),5)
5385 IF(the2id.LT.1./parj(85)**2) goto 390
5386 ELSEIF(nep.EQ.2.AND.iep(1).EQ.ns+3)
THEN
5387 the2id=
z*(1.-
z)*(0.5*
p(im,4))**2/
v(iep(1),5)
5388 IF(the2id.LT.1./parj(86)**2) goto 390
5394 IF(miis.GE.2.AND.iep(1).LE.ns+3)
THEN
5395 the2d=
max((1.-
z)/
z,
z/(1.-
z))*
v(iep(1),5)/(0.5*
p(im,4))**2
5396 IF(iep(1).EQ.ns+2.AND.isii(1).GE.1)
THEN
5397 IF(the2d.GT.theiis(1,isii(1))**2) goto 390
5398 ELSEIF(iep(1).EQ.ns+3.AND.isii(2).GE.1)
THEN
5399 IF(the2d.GT.theiis(2,isii(2))**2) goto 390
5407 IF(nep.EQ.1) goto 460
5408 IF(nep.EQ.2.AND.
p(iep(1),5)+
p(iep(2),5).GE.
p(im,5)) goto 330
5410 IF(itry(i).EQ.0.AND.kfld(i).LE.40)
THEN
5411 IF(ksh(kfld(i)).EQ.1)
THEN
5413 IF(kfld(i).GE.6.AND.kfld(i).LE.8) ifld=37+kfld(i)+
5415 IF(
p(
n+i,5).GE.pmth(2,ifld)) goto 330
5422 pa1s=(
p(
n+1,4)+
p(
n+1,5))*(
p(
n+1,4)-
p(
n+1,5))
5423 pa2s=(
p(
n+2,4)+
p(
n+2,5))*(
p(
n+2,4)-
p(
n+2,5))
5424 pa3s=(
p(
n+3,4)+
p(
n+3,5))*(
p(
n+3,4)-
p(
n+3,5))
5425 pts=0.25*(2.*pa1s*pa2s+2.*pa1s*pa3s+2.*pa2s*pa3s-
5426 & pa1s**2-pa2s**2-pa3s**2)/pa1s
5427 IF(pts.LE.0.) goto 330
5428 ELSEIF(igm.EQ.0.OR.mstj(43).LE.2.OR.mod(mstj(43),2).EQ.0)
THEN
5431 IF(kflda.GT.40) goto 450
5432 IF(ksh(kflda).EQ.0) goto 450
5434 IF(kflda.GE.6.AND.kflda.LE.8) iflda=37+kflda+
5436 IF(
p(i1,5).LT.pmth(2,iflda)) goto 450
5437 IF(kflda.EQ.21)
THEN
5438 kflgd1=iabs(
k(i1,5))
5442 kflgd2=iabs(
k(i1,5))
5445 IF(igm.EQ.0.OR.mstj(43).LE.2)
THEN
5446 ped=0.5*(
v(im,5)+
v(i1,5)-
v(i2,5))/
p(im,5)
5448 IF(i1.EQ.
n+1) zm=
v(im,1)
5449 IF(i1.EQ.
n+2) zm=1.-
v(im,1)
5450 pml=sqrt((
v(im,5)-
v(
n+1,5)-
v(
n+2,5))**2-
5451 & 4.*
v(
n+1,5)*
v(
n+2,5))
5452 ped=pem*(0.5*(
v(im,5)-pml+
v(i1,5)-
v(i2,5))+pml*zm)/
v(im,5)
5454 IF(mod(mstj(43),2).EQ.1)
THEN
5456 IF(kflgd2.EQ.22) pmqth3=0.5*parj(83)
5458 IF(kflgd1.GE.6.AND.kflgd1.LE.8) iflgd1=iflda
5459 pmq1=(pmth(1,iflgd1)**2+pmqth3**2)/
v(i1,5)
5460 pmq2=(pmth(1,kflgd2)**2+pmqth3**2)/
v(i1,5)
5461 zd=sqrt(
max(0.,(1.-
v(i1,5)/ped**2)*((1.-pmq1-pmq2)**2-
5465 zd=sqrt(
max(0.,1.-
v(i1,5)/ped**2))
5470 IF(i1.EQ.
n+1.AND.(
v(i1,1).LT.zl.OR.
v(i1,1).GT.zu)) isl(1)=1
5471 IF(i1.EQ.
n+2.AND.(
v(i1,1).LT.zl.OR.
v(i1,1).GT.zu)) isl(2)=1
5472 IF(kflda.EQ.21)
v(i1,4)=
log(zu*(1.-zl)/
max(1e-20,zl*(1.-zu)))
5473 IF(kflda.NE.21)
v(i1,4)=
log((1.-zl)/
max(1e-10,1.-zu))
5475 IF(isl(1).EQ.1.AND.isl(2).EQ.1.AND.islm.NE.0)
THEN
5478 ELSEIF(isl(1).EQ.1.AND.isl(2).EQ.1)
THEN
5481 IF(zdr2.GT.
rlu(0)*(zdr1+zdr2)) isl(1)=0
5482 IF(isl(1).EQ.1) isl(2)=0
5483 IF(isl(1).EQ.0) islm=1
5484 IF(isl(2).EQ.0) islm=2
5486 IF(isl(1).EQ.1.OR.isl(2).EQ.1) goto 330
5489 IF(kfld(1).GE.6.AND.kfld(1).LE.8) ifld1=37+kfld(1)+
5492 IF(kfld(2).GE.6.AND.kfld(2).LE.8) ifld2=37+kfld(2)+
5494 IF(igm.GT.0.AND.mod(mstj(43),2).EQ.1.AND.(
p(
n+1,5).GE.
5495 &pmth(2,ifld1).OR.
p(
n+2,5).GE.pmth(2,ifld2)))
THEN
5496 pmq1=
v(
n+1,5)/
v(im,5)
5497 pmq2=
v(
n+2,5)/
v(im,5)
5498 zd=sqrt(
max(0.,(1.-
v(im,5)/pem**2)*((1.-pmq1-pmq2)**2-
5503 IF(
v(im,1).LT.zl.OR.
v(im,1).GT.zu) goto 330
5512 p(
n+1,3)=sqrt(
max(0.,(
p(ipa(1),4)+
p(
n+1,5))*(
p(ipa(1),4)-
5514 p(
n+1,4)=
p(ipa(1),4)
5516 ELSEIF(igm.EQ.0.AND.nep.EQ.2)
THEN
5517 ped1=0.5*(
v(im,5)+
v(
n+1,5)-
v(
n+2,5))/
p(im,5)
5520 p(
n+1,3)=sqrt(
max(0.,(ped1+
p(
n+1,5))*(ped1-
p(
n+1,5))))
5525 p(
n+2,4)=
p(im,5)-ped1
5528 ELSEIF(nep.EQ.3)
THEN
5531 p(
n+1,3)=sqrt(
max(0.,pa1s))
5534 p(
n+2,3)=0.5*(pa3s-pa2s-pa1s)/
p(
n+1,3)
5537 p(
n+3,3)=-(
p(
n+1,3)+
p(
n+2,3))
5545 pzm=sqrt(
max(0.,(pem+
p(im,5))*(pem-
p(im,5))))
5546 pmls=(
v(im,5)-
v(
n+1,5)-
v(
n+2,5))**2-4.*
v(
n+1,5)*
v(
n+2,5)
5549 ELSEIF(mod(mstj(43),2).EQ.1)
THEN
5550 pts=(pem**2*(zm*(1.-zm)*
v(im,5)-(1.-zm)*
v(
n+1,5)-
5551 & zm*
v(
n+2,5))-0.25*pmls)/pzm**2
5553 pts=pmls*(zm*(1.-zm)*pem**2/
v(im,5)-0.25)/pzm**2
5555 pt=sqrt(
max(0.,pts))
5559 IF(mstj(49).NE.1.AND.mod(mstj(46),2).EQ.1.AND.
k(im,2).EQ.21.
5560 & and.iau.NE.0)
THEN
5561 IF(
k(igm,3).NE.0) mazip=1
5563 IF(iau.EQ.im+1) zau=1.-
v(igm,1)
5564 IF(mazip.EQ.0) zau=0.
5565 IF(
k(igm,2).NE.21)
THEN
5566 hazip=2.*zau/(1.+zau**2)
5568 hazip=(zau/(1.-zau*(1.-zau)))**2
5570 IF(
k(
n+1,2).NE.21)
THEN
5571 hazip=hazip*(-2.*zm*(1.-zm))/(1.-2.*zm*(1.-zm))
5573 hazip=hazip*(zm*(1.-zm)/(1.-zm*(1.-zm)))**2
5580 IF(mstj(49).NE.2.AND.mstj(46).GE.2.AND.(
k(
n+1,2).EQ.21.OR.
5581 &
k(
n+2,2).EQ.21).AND.iau.NE.0)
THEN
5582 IF(
k(igm,3).NE.0) mazic=
n+1
5583 IF(
k(igm,3).NE.0.AND.
k(
n+1,2).NE.21) mazic=
n+2
5584 IF(
k(igm,3).NE.0.AND.
k(
n+1,2).EQ.21.AND.
k(
n+2,2).EQ.21.AND.
5585 & zm.GT.0.5) mazic=
n+2
5586 IF(
k(iau,2).EQ.22) mazic=0
5588 IF(mazic.EQ.
n+2) zs=1.-zm
5590 IF(iau.EQ.im-1) zgm=1.-
v(igm,1)
5591 IF(mazic.EQ.0) zgm=1.
5592 IF(mazic.NE.0) hazic=(
p(im,5)/
p(igm,5))*
5593 & sqrt((1.-zs)*(1.-zgm)/(zs*zgm))
5594 hazic=
min(0.95,hazic)
5599 470
IF(nep.EQ.2.AND.igm.GT.0)
THEN
5600 IF(mod(mstj(43),2).EQ.1)
THEN
5601 p(
n+1,4)=pem*
v(im,1)
5603 p(
n+1,4)=pem*(0.5*(
v(im,5)-sqrt(pmls)+
v(
n+1,5)-
v(
n+2,5))+
5604 & sqrt(pmls)*zm)/
v(im,5)
5610 p(
n+1,3)=0.5*(
v(
n+2,5)-
v(
n+1,5)-
v(im,5)+2.*pem*
p(
n+1,4))/pzm
5616 p(
n+2,3)=pzm-
p(
n+1,3)
5617 p(
n+2,4)=pem-
p(
n+1,4)
5618 IF(mstj(43).LE.2)
THEN
5619 v(
n+1,2)=(pem*
p(
n+1,4)-pzm*
p(
n+1,3))/
p(im,5)
5620 v(
n+2,2)=(pem*
p(
n+2,4)-pzm*
p(
n+2,3))/
p(im,5)
5626 IF(mstj(43).LE.2)
THEN
5627 bex=
p(igm,1)/
p(igm,4)
5628 bey=
p(igm,2)/
p(igm,4)
5629 bez=
p(igm,3)/
p(igm,4)
5630 ga=
p(igm,4)/
p(igm,5)
5631 gabep=ga*(ga*(bex*
p(im,1)+bey*
p(im,2)+bez*
p(im,3))/(1.+ga)-
5640 the=
ulangl(
p(im,3)+gabep*bez,sqrt((
p(im,1)+gabep*bex)**2+
5641 & (
p(im,2)+gabep*bey)**2))
5647 & sin(the)*sin(
phi)*
p(i,3)
5648 dp(3)=-sin(the)*
p(i,1)+
cos(the)*
p(i,3)
5650 dbp=bex*dp(1)+bey*dp(2)+bez*dp(3)
5651 dgabp=ga*(ga*dbp/(1d0+ga)+dp(4))
5652 p(i,1)=dp(1)+dgabp*bex
5653 p(i,2)=dp(2)+dgabp*bey
5654 p(i,3)=dp(3)+dgabp*bez
5655 p(i,4)=ga*(dp(4)+dbp)
5660 IF(mazip.NE.0.OR.mazic.NE.0)
THEN
5666 dpma=dpt(1,1)*dpt(2,1)+dpt(1,2)*dpt(2,2)+dpt(1,3)*dpt(2,3)
5667 dpmd=dpt(1,1)*dpt(3,1)+dpt(1,2)*dpt(3,2)+dpt(1,3)*dpt(3,3)
5668 dpmm=dpt(1,1)**2+dpt(1,2)**2+dpt(1,3)**2
5670 dpt(4,j)=dpt(2,j)-dpma*dpt(1,j)/dpmm
5671 dpt(5,j)=dpt(3,j)-dpmd*dpt(1,j)/dpmm
5673 dpt(4,4)=sqrt(dpt(4,1)**2+dpt(4,2)**2+dpt(4,3)**2)
5674 dpt(5,4)=sqrt(dpt(5,1)**2+dpt(5,2)**2+dpt(5,3)**2)
5675 IF(
min(dpt(4,4),dpt(5,4)).GT.0.1*parj(82))
THEN
5676 cad=(dpt(4,1)*dpt(5,1)+dpt(4,2)*dpt(5,2)+
5677 & dpt(4,3)*dpt(5,3))/(dpt(4,4)*dpt(5,4))
5679 IF(1.+hazip*(2.*cad**2-1.).LT.
rlu(0)*(1.+abs(hazip)))
5683 IF(mazic.EQ.
n+2) cad=-cad
5684 IF((1.-hazic)*(1.-hazic*cad)/(1.+hazic**2-2.*hazic*cad)
5685 & .LT.
rlu(0)) goto 470
5691 IF(mod(miis,2).EQ.1.AND.igm.EQ.ns+1.AND.(
k(
n+1,2).EQ.21.OR.
5692 &
k(
n+2,2).EQ.21))
THEN
5694 IF(isii(iii).GE.1)
THEN
5696 IF(
k(
n+1,2).NE.21) iaziid=
n+2
5697 IF(
k(
n+1,2).EQ.21.AND.
k(
n+2,2).EQ.21.AND.
5698 &
p(
n+1,4).GT.
p(
n+2,4)) iaziid=
n+2
5699 theiid=
ulangl(
p(iaziid,3),sqrt(
p(iaziid,1)**2+
p(iaziid,2)**2))
5700 IF(iii.EQ.2) theiid=paru(1)-theiid
5701 phiiid=
ulangl(
p(iaziid,1),
p(iaziid,2))
5702 hazii=
min(0.95,theiid/theiis(iii,isii(iii)))
5703 cad=
cos(phiiid-phiiis(iii,isii(iii)))
5704 phirel=abs(phiiid-phiiis(iii,isii(iii)))
5705 IF(phirel.GT.paru(1)) phirel=paru(2)-phirel
5706 IF((1.-hazii)*(1.-hazii*cad)/(1.+hazii**2-2.*hazii*cad)
5707 & .LT.
rlu(0)) goto 470
5712 IF(igm.GE.0)
k(im,1)=14
5715 IF(
n.GT.mstu(4)-mstu(32)-5)
THEN
5716 CALL
luerrm(11,
'(LUSHOW:) no more memory left in LUJETS')
5717 IF(mstu(21).GE.1)
n=ns
5718 IF(mstu(21).GE.1)
RETURN
5723 510
IF(npa.GE.2)
THEN
5727 IF(ip2.GT.0.AND.ip2.LT.ip1)
k(ns+1,3)=ip2
5737 IF(
k(i,1).LE.10.AND.
k(i,2).EQ.22)
THEN
5739 ELSEIF(
k(i,1).LE.10.AND.iabs(
k(i,2)).GE.11.AND.
5740 &iabs(
k(i,2)).LE.18)
THEN
5742 ELSEIF(
k(i,1).LE.10)
THEN
5743 k(i,4)=mstu(5)*(
k(i,4)/mstu(5))
5744 k(i,5)=mstu(5)*(
k(i,5)/mstu(5))
5745 ELSEIF(
k(mod(
k(i,4),mstu(5))+1,2).NE.22)
THEN
5746 id1=mod(
k(i,4),mstu(5))
5747 IF(
k(i,2).GE.1.AND.
k(i,2).LE.8) id1=mod(
k(i,4),mstu(5))+1
5748 id2=2*mod(
k(i,4),mstu(5))+1-id1
5749 k(i,4)=mstu(5)*(
k(i,4)/mstu(5))+id1
5750 k(i,5)=mstu(5)*(
k(i,5)/mstu(5))+id2
5751 k(id1,4)=
k(id1,4)+mstu(5)*i
5752 k(id1,5)=
k(id1,5)+mstu(5)*id2
5753 k(id2,4)=
k(id2,4)+mstu(5)*id1
5754 k(id2,5)=
k(id2,5)+mstu(5)*i
5756 id1=mod(
k(i,4),mstu(5))
5758 k(i,4)=mstu(5)*(
k(i,4)/mstu(5))+id1
5759 k(i,5)=mstu(5)*(
k(i,5)/mstu(5))+id1
5760 IF(iabs(
k(i,2)).LE.10.OR.
k(id1,1).GE.11)
THEN
5761 k(id1,4)=
k(id1,4)+mstu(5)*i
5762 k(id1,5)=
k(id1,5)+mstu(5)*i
5778 gabep=ga*(ga*(bex*
p(ipa(1),1)+bey*
p(ipa(1),2)+bez*
p(ipa(1),3))
5779 & /(1.+ga)-
p(ipa(1),4))
5786 the=
ulangl(
p(ipa(1),3)+gabep*bez,sqrt((
p(ipa(1),1)
5787 &+gabep*bex)**2+(
p(ipa(1),2)+gabep*bey)**2))
5788 phi=
ulangl(
p(ipa(1),1)+gabep*bex,
p(ipa(1),2)+gabep*bey)
5791 & sin(
phi)*(
p(ipa(2),2)+gabep*bey)-sin(the)*(
p(ipa(2),3)+gabep*
5792 & bez),-sin(
phi)*(
p(ipa(2),1)+gabep*bex)+
cos(
phi)*(
p(ipa(2),2)+
5795 CALL ludbrb(ns+1,
n,0.,chi,0d0,0d0,0d0)
5801 CALL ludbrb(ns+1,
n,the,
phi,dbex,dbey,dbez)
5811 IF(
n.EQ.ns+npa+iim)
THEN
5816 k(ipa(
ip),4)=
k(ipa(
ip),4)+ns+iim+
ip
5817 k(ipa(
ip),5)=
k(ipa(
ip),5)+ns+iim+
ip
5818 k(ns+iim+
ip,3)=ipa(
ip)
5819 IF(iim.EQ.1.AND.mstu(16).NE.2)
k(ns+iim+
ip,3)=ns+1
5820 IF(
k(ns+iim+
ip,1).NE.1)
THEN
5821 k(ns+iim+
ip,4)=mstu(5)*ipa(
ip)+
k(ns+iim+
ip,4)
5822 k(ns+iim+
ip,5)=mstu(5)*ipa(
ip)+
k(ns+iim+
ip,5)
5837 IMPLICIT DOUBLE PRECISION(
d)
5838 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
5839 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5840 SAVE /lujets/,/ludat1/
5841 dimension dps(4),kfbe(9),nbe(0:9),bei(100)
5842 DATA kfbe/211,-211,111,321,-321,130,310,221,331/
5845 IF((mstj(51).NE.1.AND.mstj(51).NE.2).OR.
n-nsav.LE.1)
RETURN
5851 IF(
k(i,1).LE.10.AND.((kfa.GT.10.AND.kfa.LE.20).OR.kfa.EQ.22).AND.
5853 kfma=iabs(
k(
k(i,3),2))
5854 IF(kfma.GT.10.AND.kfma.LE.80)
k(i,1)=-
k(i,1)
5855 ELSEIF(kfa.EQ.22.AND.
k(i,3).EQ.0)
THEN
5858 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 120
5860 dps(j)=dps(j)+
p(i,j)
5863 CALL ludbrb(0,0,0.,0.,-dps(1)/dps(4),-dps(2)/dps(4),
5867 IF(
k(i,1).GE.1.AND.
k(i,1).LE.10) pecm=pecm+
p(i,4)
5872 DO 160 ibe=1,
min(9,mstj(52))
5875 IF(
k(i,2).NE.kfbe(ibe)) goto 150
5876 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 150
5877 IF(nbe(ibe).GE.mstu(4)-mstu(32)-5)
THEN
5878 CALL
luerrm(11,
'(LUBOEI:) no more memory left in LUJETS')
5888 IF(nbe(
min(9,mstj(52)))-nbe(0).LE.1) goto 280
5891 DO 220 ibe=1,
min(9,mstj(52))
5892 IF(ibe.NE.1.AND.ibe.NE.4.AND.ibe.LE.7) goto 180
5893 IF(ibe.EQ.1.AND.
max(nbe(1)-nbe(0),nbe(2)-nbe(1),nbe(3)-nbe(2))
5895 IF(ibe.EQ.4.AND.
max(nbe(4)-nbe(3),nbe(5)-nbe(4),nbe(6)-nbe(5),
5896 &nbe(7)-nbe(6)).LE.1) goto 180
5897 IF(ibe.GE.8.AND.nbe(ibe)-nbe(ibe-1).LE.1) goto 180
5898 IF(ibe.EQ.1) pmhq=2.*
ulmass(211)
5899 IF(ibe.EQ.4) pmhq=2.*
ulmass(321)
5900 IF(ibe.EQ.8) pmhq=2.*
ulmass(221)
5901 IF(ibe.EQ.9) pmhq=2.*
ulmass(331)
5902 qdel=0.1*
min(pmhq,parj(93))
5903 IF(mstj(51).EQ.1)
THEN
5904 nbin=
min(100,nint(9.*parj(93)/qdel))
5905 beex=exp(0.5*qdel/parj(93))
5906 bert=exp(-qdel/parj(93))
5908 nbin=
min(100,nint(3.*parj(93)/qdel))
5911 qbin=qdel*(ibin-0.5)
5912 bei(ibin)=qdel*(qbin**2+qdel**2/12.)/sqrt(qbin**2+pmhq**2)
5913 IF(mstj(51).EQ.1)
THEN
5915 bei(ibin)=bei(ibin)*beex
5917 bei(ibin)=bei(ibin)*exp(-(qbin/parj(93))**2)
5919 IF(ibin.GE.2) bei(ibin)=bei(ibin)+bei(ibin-1)
5923 180
DO 210 i1m=nbe(ibe-1)+1,nbe(ibe)-1
5925 DO 200 i2m=i1m+1,nbe(ibe)
5927 q2old=
max(0.,(
p(i1,4)+
p(i2,4))**2-(
p(i1,1)+
p(i2,1))**2-(
p(i1,2)+
5928 &
p(i2,2))**2-(
p(i1,3)+
p(i2,3))**2-(
p(i1,5)+
p(i2,5))**2)
5932 IF(qold.LT.1e-3*qdel)
THEN
5934 ELSEIF(qold.LE.qdel)
THEN
5936 ELSEIF(qold.LT.(nbin-0.1)*qdel)
THEN
5939 rinp=(rbin**3-ibin**3)/(3*ibin*(ibin+1)+1)
5940 qmov=(bei(ibin)+rinp*(bei(ibin+1)-bei(ibin)))*
5941 & sqrt(q2old+pmhq**2)/q2old
5943 qmov=bei(nbin)*sqrt(q2old+pmhq**2)/q2old
5945 q2new=q2old*(qold/(qold+3.*parj(92)*qmov))**(2./3.)
5948 hc1=(
p(i1,4)+
p(i2,4))**2-(q2old-q2new)
5949 hc2=(q2old-q2new)*(
p(i1,4)-
p(i2,4))**2
5950 ha=0.5*(1.-sqrt(hc1*q2new/(hc1*q2old-hc2)))
5952 pd=ha*(
p(i2,j)-
p(i1,j))
5953 p(i1m,j)=
p(i1m,j)+pd
5954 p(i2m,j)=
p(i2m,j)-pd
5961 DO 240 im=nbe(0)+1,nbe(
min(9,mstj(52)))
5964 p(i,j)=
p(i,j)+
p(im,j)
5966 p(i,4)=sqrt(
p(i,5)**2+
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
5973 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 250
5975 pqs=pqs+
p(i,5)**2/
p(i,4)
5977 fac=(pecm-pqs)/(pes-pqs)
5979 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 270
5983 p(i,4)=sqrt(
p(i,5)**2+
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
5987 280 CALL ludbrb(0,0,0.,0.,dps(1)/dps(4),dps(2)/dps(4),dps(3)/dps(4))
5989 IF(
k(i,1).LT.0)
k(i,1)=-
k(i,1)
6000 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6001 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6002 SAVE /ludat1/,/ludat2/
6014 IF((mstj(93).EQ.1.OR.mstj(93).EQ.2).AND.kfa.LE.10)
THEN
6019 ELSEIF(kfa.LE.100.OR.kc.LE.80.OR.kc.GT.100)
THEN
6024 kfla=mod(kfa/1000,10)
6025 kflb=mod(kfa/100,10)
6028 kflr=mod(kfa/10000,10)
6034 IF(kfla.EQ.0.AND.kflr.EQ.0.AND.kfls.LE.3)
THEN
6035 IF(kfls.EQ.1) pmspl=-3./(pmb*pmc)
6036 IF(kfls.GE.3) pmspl=1./(pmb*pmc)
6037 ulmass=parf(111)+pmb+pmc+parf(113)*parf(101)**2*pmspl
6038 ELSEIF(kfla.EQ.0)
THEN
6040 IF(kfls.EQ.1) kmul=3
6041 IF(kflr.EQ.2) kmul=4
6042 IF(kfls.EQ.5) kmul=5
6043 ulmass=parf(113+kmul)+pmb+pmc
6044 ELSEIF(kflc.EQ.0)
THEN
6045 IF(kfls.EQ.1) pmspl=-3./(pma*pmb)
6046 IF(kfls.EQ.3) pmspl=1./(pma*pmb)
6047 ulmass=2.*parf(112)/3.+pma+pmb+parf(114)*parf(101)**2*pmspl
6048 IF(mstj(93).EQ.1)
ulmass=pma+pmb
6052 IF(kfls.EQ.2.AND.kfla.EQ.kflb)
THEN
6053 pmspl=1./(pma*pmb)-2./(pma*pmc)-2./(pmb*pmc)
6054 ELSEIF(kfls.EQ.2.AND.kflb.GE.kflc)
THEN
6055 pmspl=-2./(pma*pmb)-2./(pma*pmc)+1./(pmb*pmc)
6056 ELSEIF(kfls.EQ.2)
THEN
6059 pmspl=1./(pma*pmb)+1./(pma*pmc)+1./(pmb*pmc)
6061 ulmass=parf(112)+pma+pmb+pmc+parf(114)*parf(101)**2*pmspl
6067 IF(mstj(24).GE.1.AND.pmas(kc,2).GT.1e-4)
THEN
6068 IF(mstj(24).EQ.1.OR.(mstj(24).EQ.2.AND.kfa.GT.100))
THEN
6070 & atan(2.*pmas(kc,3)/pmas(kc,2)))
6073 pmlow=atan((
max(0.,pm0-pmas(kc,3))**2-pm0**2)/
6075 pmupp=atan(((pm0+pmas(kc,3))**2-pm0**2)/(pm0*pmas(kc,2)))
6076 ulmass=sqrt(
max(0.,pm0**2+pm0*pmas(kc,2)*tan(pmlow+
6077 & (pmupp-pmlow)*
rlu(0))))
6090 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6091 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6092 common/ludat4/chaf(500)
6094 SAVE /ludat1/,/ludat2/,/ludat4/
6103 kfla=mod(kfa/1000,10)
6104 kflb=mod(kfa/100,10)
6107 kflr=mod(kfa/10000,10)
6110 IF(kfa.LE.100.OR.(kfa.GT.100.AND.kc.GT.100))
THEN
6114 IF(chau(lem:lem).NE.
' ') len=lem
6118 ELSEIF(kflc.EQ.0)
THEN
6119 chau(1:2)=chaf(kfla)(1:1)//chaf(kflb)(1:1)
6120 IF(kfls.EQ.1) chau(3:4)=
'_0'
6121 IF(kfls.EQ.3) chau(3:4)=
'_1'
6125 ELSEIF(kfla.EQ.0)
THEN
6126 IF(kflb.EQ.5) chau(1:1)=
'B'
6127 IF(kflb.EQ.6) chau(1:1)=
'T'
6128 IF(kflb.EQ.7) chau(1:1)=
'L'
6129 IF(kflb.EQ.8) chau(1:1)=
'H'
6131 IF(kflr.EQ.0.AND.kfls.EQ.1)
THEN
6132 ELSEIF(kflr.EQ.0.AND.kfls.EQ.3)
THEN
6135 ELSEIF(kflr.EQ.1.AND.kfls.EQ.3)
THEN
6138 ELSEIF(kflr.EQ.1.AND.kfls.EQ.1)
THEN
6141 ELSEIF(kflr.EQ.2)
THEN
6144 ELSEIF(kfls.EQ.5)
THEN
6148 IF(kflc.GE.3.AND.kflr.EQ.0.AND.kfls.LE.3)
THEN
6149 chau(len+1:len+2)=
'_'//chaf(kflc)(1:1)
6151 ELSEIF(kflc.GE.3)
THEN
6152 chau(len+1:len+1)=chaf(kflc)(1:1)
6158 IF(kflb.LE.2.AND.kflc.LE.2)
THEN
6160 IF(kflc.GT.kflb) chau=
'Lambda'
6161 IF(kfls.EQ.4) chau=
'Sigma*'
6163 IF(chau(6:6).NE.
' ') len=6
6164 ELSEIF(kflb.LE.2.OR.kflc.LE.2)
THEN
6166 IF(kfla.GT.kflb.AND.kflb.GT.kflc) chau=
'Xi'''
6167 IF(kfls.EQ.4) chau=
'Xi*'
6169 IF(chau(3:3).NE.
' ') len=3
6172 IF(kfla.GT.kflb.AND.kflb.GT.kflc) chau=
'Omega'''
6173 IF(kfls.EQ.4) chau=
'Omega*'
6175 IF(chau(6:6).NE.
' ') len=6
6179 chau(len+1:len+2)=
'_'//chaf(kfla)(1:1)
6181 IF(kflb.GE.kflc.AND.kflc.GE.4)
THEN
6182 chau(len+1:len+2)=chaf(kflb)(1:1)//chaf(kflc)(1:1)
6184 ELSEIF(kflb.GE.kflc.AND.kflb.GE.4)
THEN
6185 chau(len+1:len+1)=chaf(kflb)(1:1)
6187 ELSEIF(kflc.GT.kflb.AND.kflb.GE.4)
THEN
6188 chau(len+1:len+2)=chaf(kflc)(1:1)//chaf(kflb)(1:1)
6190 ELSEIF(kflc.GT.kflb.AND.kflc.GE.4)
THEN
6191 chau(len+1:len+1)=chaf(kflc)(1:1)
6197 IF(kf.GT.0.OR.len.EQ.0)
THEN
6198 ELSEIF(kfa.GT.10.AND.kfa.LE.40.AND.kq.NE.0.AND.mod(kq,3).EQ.0)
6200 ELSEIF(kfa.EQ.89.OR.(kfa.GE.91.AND.kfa.LE.99))
THEN
6201 ELSEIF(kfa.GT.100.AND.kfla.EQ.0.AND.kq.NE.0)
THEN
6202 ELSEIF(mstu(15).LE.1)
THEN
6203 chau(len+1:len+1)=
'~'
6206 chau(len+1:len+3)=
'bar'
6211 IF(kq.EQ.6) chau(len+1:len+2)=
'++'
6212 IF(kq.EQ.-6) chau(len+1:len+2)=
'--'
6213 IF(kq.EQ.3) chau(len+1:len+1)=
'+'
6214 IF(kq.EQ.-3) chau(len+1:len+1)=
'-'
6215 IF(kq.EQ.0.AND.(kfa.LE.22.OR.len.EQ.0))
THEN
6216 ELSEIF(kq.EQ.0.AND.(kfa.GE.81.AND.kfa.LE.100))
THEN
6217 ELSEIF(kfa.EQ.28.OR.kfa.EQ.29)
THEN
6218 ELSEIF(kfa.GT.100.AND.kfla.EQ.0.AND.kflb.EQ.kflc.AND.
6220 ELSEIF(kq.EQ.0)
THEN
6221 chau(len+1:len+1)=
'0'
6232 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6240 ELSEIF(kfa.LE.100.OR.kc.LE.80.OR.kc.GT.100)
THEN
6244 ELSEIF(mod(kfa/1000,10).EQ.0)
THEN
6245 luchge=(kchg(mod(kfa/100,10),1)-kchg(mod(kfa/10,10),1))*
6246 & (-1)**mod(kfa/100,10)
6247 ELSEIF(mod(kfa/10,10).EQ.0)
THEN
6248 luchge=kchg(mod(kfa/1000,10),1)+kchg(mod(kfa/100,10),1)
6250 luchge=kchg(mod(kfa/1000,10),1)+kchg(mod(kfa/100,10),1)+
6251 & kchg(mod(kfa/10,10),1)
6266 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6268 dimension kftab(25),kctab(25)
6269 DATA kftab/211,111,221,311,321,130,310,213,113,223,
6270 &313,323,2112,2212,210,2110,2210,110,220,330,440,30443,30553,0,0/
6271 DATA kctab/101,111,112,102,103,221,222,121,131,132,
6272 &122,123,332,333,281,282,283,284,285,286,287,231,235,0,0/
6279 IF(kfa.EQ.0.OR.kfa.GE.100000)
THEN
6281 ELSEIF(kfa.LE.100)
THEN
6283 IF(kf.LT.0.AND.kchg(kfa,3).EQ.0)
lucomp=0
6287 IF(kfa.EQ.kftab(ikf))
THEN
6296 kfla=mod(kfa/1000,10)
6297 kflb=mod(kfa/100,10)
6300 kflr=mod(kfa/10000,10)
6303 IF(kfa-10000*kflr.LT.1000)
THEN
6304 IF(kflb.EQ.0.OR.kflb.EQ.9.OR.kflc.EQ.0.OR.kflc.EQ.9)
THEN
6305 ELSEIF(kflb.LT.kflc)
THEN
6306 ELSEIF(kf.LT.0.AND.kflb.EQ.kflc)
THEN
6307 ELSEIF(kflb.EQ.kflc)
THEN
6308 IF(kflr.EQ.0.AND.kfls.EQ.1)
THEN
6310 ELSEIF(kflr.EQ.0.AND.kfls.EQ.3)
THEN
6312 ELSEIF(kflr.EQ.1.AND.kfls.EQ.3)
THEN
6314 ELSEIF(kflr.EQ.1.AND.kfls.EQ.1)
THEN
6316 ELSEIF(kflr.EQ.2.AND.kfls.EQ.3)
THEN
6318 ELSEIF(kflr.EQ.0.AND.kfls.EQ.5)
THEN
6321 ELSEIF(kflb.LE.5)
THEN
6322 IF(kflr.EQ.0.AND.kfls.EQ.1)
THEN
6323 lucomp=100+((kflb-1)*(kflb-2))/2+kflc
6324 ELSEIF(kflr.EQ.0.AND.kfls.EQ.3)
THEN
6325 lucomp=120+((kflb-1)*(kflb-2))/2+kflc
6326 ELSEIF(kflr.EQ.1.AND.kfls.EQ.3)
THEN
6327 lucomp=140+((kflb-1)*(kflb-2))/2+kflc
6328 ELSEIF(kflr.EQ.1.AND.kfls.EQ.1)
THEN
6329 lucomp=160+((kflb-1)*(kflb-2))/2+kflc
6330 ELSEIF(kflr.EQ.2.AND.kfls.EQ.3)
THEN
6331 lucomp=180+((kflb-1)*(kflb-2))/2+kflc
6332 ELSEIF(kflr.EQ.0.AND.kfls.EQ.5)
THEN
6333 lucomp=200+((kflb-1)*(kflb-2))/2+kflc
6335 ELSEIF((kfls.EQ.1.AND.kflr.LE.1).OR.(kfls.EQ.3.AND.kflr.LE.2)
6336 & .OR.(kfls.EQ.5.AND.kflr.EQ.0))
THEN
6341 ELSEIF((kflr.EQ.0.OR.kflr.EQ.1).AND.kflc.EQ.0)
THEN
6342 IF(kfls.NE.1.AND.kfls.NE.3)
THEN
6343 ELSEIF(kfla.EQ.9.OR.kflb.EQ.0.OR.kflb.EQ.9)
THEN
6344 ELSEIF(kfla.LT.kflb)
THEN
6345 ELSEIF(kfls.EQ.1.AND.kfla.EQ.kflb)
THEN
6351 ELSEIF(kflr.EQ.0.AND.kfls.EQ.2)
THEN
6352 IF(kfla.EQ.9.OR.kflb.EQ.0.OR.kflb.EQ.9.OR.kflc.EQ.9)
THEN
6353 ELSEIF(kfla.LE.kflc.OR.kfla.LT.kflb)
THEN
6354 ELSEIF(kfla.GE.6.OR.kflb.GE.4.OR.kflc.GE.4)
THEN
6356 ELSEIF(kflb.LT.kflc)
THEN
6357 lucomp=300+((kfla+1)*kfla*(kfla-1))/6+(kflc*(kflc-1))/2+kflb
6359 lucomp=330+((kfla+1)*kfla*(kfla-1))/6+(kflb*(kflb-1))/2+kflc
6363 ELSEIF(kflr.EQ.0.AND.kfls.EQ.4)
THEN
6364 IF(kfla.EQ.9.OR.kflb.EQ.0.OR.kflb.EQ.9.OR.kflc.EQ.9)
THEN
6365 ELSEIF(kfla.LT.kflb.OR.kflb.LT.kflc)
THEN
6366 ELSEIF(kfla.GE.6.OR.kflb.GE.4)
THEN
6369 lucomp=360+((kfla+1)*kfla*(kfla-1))/6+(kflb*(kflb-1))/2+kflc
6381 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
6382 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6383 SAVE /lujets/,/ludat1/
6384 CHARACTER chmess*(*)
6390 IF(mstu(25).EQ.1.AND.mstu(27).LE.mstu(26))
WRITE(mstu(11),5000)
6391 & merr,mstu(31),chmess
6394 ELSEIF(merr.LE.20)
THEN
6397 IF(mstu(21).GE.1.AND.mstu(23).LE.mstu(22))
WRITE(mstu(11),5100)
6398 & merr-10,mstu(31),chmess
6399 IF(mstu(21).GE.2.AND.mstu(23).GT.mstu(22))
THEN
6400 WRITE(mstu(11),5100) merr-10,mstu(31),chmess
6401 WRITE(mstu(11),5200)
6402 IF(merr.NE.17) CALL
lulist(2)
6408 WRITE(mstu(11),5300) merr-20,mstu(31),chmess
6413 5000
FORMAT(/5
x,
'Advisory warning type',i2,
' given after',i6,
6414 &
' LUEXEC calls:'/5
x,a)
6415 5100
FORMAT(/5
x,
'Error type',i2,
' has occured after',i6,
6416 &
' LUEXEC calls:'/5
x,a)
6417 5200
FORMAT(5
x,
'Execution will be stopped after listing of last ',
6419 5300
FORMAT(/5
x,
'Fatal error type',i2,
' has occured after',i6,
6420 &
' LUEXEC calls:'/5
x,a/5
x,
'Execution will now be stopped!')
6430 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6437 aempi=paru(101)/(3.*paru(1))
6438 IF(mstu(101).LE.0.OR.q2.LT.2e-6)
THEN
6440 ELSEIF(mstu(101).EQ.2.AND.q2.LT.paru(104))
THEN
6442 ELSEIF(mstu(101).EQ.2)
THEN
6443 rpigg=1.-paru(101)/paru(103)
6444 ELSEIF(q2.LT.0.09)
THEN
6445 rpigg=aempi*(13.4916+
log(q2))+0.00835*
log(1.+q2)
6446 ELSEIF(q2.LT.9.)
THEN
6447 rpigg=aempi*(16.3200+2.*
log(q2))+0.00238*
log(1.+3.927*q2)
6448 ELSEIF(q2.LT.1e4)
THEN
6449 rpigg=aempi*(13.4955+3.*
log(q2))+0.00165+0.00299*
log(1.+q2)
6451 rpigg=aempi*(13.4955+3.*
log(q2))+0.00221+0.00293*
log(1.+q2)
6455 ulalem=paru(101)/(1.-rpigg)
6466 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6467 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6468 SAVE /ludat1/,/ludat2/
6471 IF(mstu(111).LE.0)
THEN
6481 IF(mstu(115).GE.2) q2eff=
max(q2,paru(114))
6484 100
IF(nf.GT.
max(2,mstu(113)))
THEN
6485 q2thr=paru(113)*pmas(nf,1)**2
6486 IF(q2eff.LT.q2thr)
THEN
6488 alam2=alam2*(q2thr/alam2)**(2./(33.-2.*nf))
6492 110
IF(nf.LT.
min(8,mstu(114)))
THEN
6493 q2thr=paru(113)*pmas(nf+1,1)**2
6494 IF(q2eff.GT.q2thr)
THEN
6496 alam2=alam2*(alam2/q2thr)**(2./(33.-2.*nf))
6500 IF(mstu(115).EQ.1) q2eff=q2eff+alam2
6501 paru(117)=sqrt(alam2)
6505 algq=
log(
max(1.0001,q2eff/alam2))
6506 IF(mstu(111).EQ.1)
THEN
6510 ulalps=
min(paru(115),paru(2)/(b0*algq)*(1.-b1*
log(algq)/
6524 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6529 IF(
r.LT.1e-20)
RETURN
6530 IF(abs(
x)/
r.LT.0.8)
THEN
6534 IF(
x.LT.0..AND.
ulangl.GE.0.)
THEN
6536 ELSEIF(
x.LT.0.)
THEN
6550 common/ludatr/mrlu(6),rrlu(100)
6552 equivalence(mrlu1,mrlu(1)),(mrlu2,mrlu(2)),(mrlu3,mrlu(3)),
6553 &(mrlu4,mrlu(4)),(mrlu5,mrlu(5)),(mrlu6,mrlu(6)),
6554 &(rrlu98,rrlu(98)),(rrlu99,rrlu(99)),(rrlu00,rrlu(100))
6558 ij=mod(mrlu1/30082,31329)
6568 m=mod(mod(i*j,179)*
k,179)
6573 IF(mod(l*m,64).GE.32)
s=
s+
t
6582 rrlu98=362436.*twom24
6583 rrlu99=7654321.*twom24
6584 rrlu00=16777213.*twom24
6592 130 runi=rrlu(mrlu4)-rrlu(mrlu5)
6593 IF(runi.LT.0.) runi=runi+1.
6596 IF(mrlu4.EQ.0) mrlu4=97
6598 IF(mrlu5.EQ.0) mrlu5=97
6599 rrlu98=rrlu98-rrlu99
6600 IF(rrlu98.LT.0.) rrlu98=rrlu98+rrlu00
6602 IF(runi.LT.0.) runi=runi+1.
6603 IF(runi.LE.0.OR.runi.GE.1.) goto 130
6607 IF(mrlu3.EQ.1000000000)
THEN
6622 common/ludatr/mrlu(6),rrlu(100)
6630 backspace(lfn,err=110,iostat=ierr)
6632 mrlu(6)=mrlu(6)-nbck
6636 WRITE(lfn,err=110,iostat=ierr) (mrlu(i1),i1=1,5),
6637 &(rrlu(i2),i2=1,100)
6642 110
WRITE(cherr,
'(I8)') ierr
6643 CALL
luerrm(18,
'(RLUGET:) error when accessing file, IOSTAT ='//
6655 common/ludatr/mrlu(6),rrlu(100)
6663 backspace(lfn,err=120,iostat=ierr)
6665 mrlu(6)=mrlu(6)-nbck
6671 READ(lfn,err=120,iostat=ierr) (mrlu(i1),i1=1,5),
6672 &(rrlu(i2),i2=1,100)
6674 mrlu(6)=mrlu(6)+nfor
6678 120
WRITE(cherr,
'(I8)') ierr
6679 CALL
luerrm(18,
'(RLUSET:) error when accessing file, IOSTAT ='//
6690 SUBROUTINE pyrobo(IMI,IMA,THE,PHI,BEX,BEY,BEZ)
6693 IMPLICIT DOUBLE PRECISION(
d)
6694 IMPLICIT INTEGER(i-
n)
6697 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
6698 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6699 SAVE /lujets/,/ludat1/
6701 dimension rot(3,3),pr(3),vr(3),dp(4),dv(4)
6705 IF(imin.LE.0) imin=1
6706 IF(mstu(1).GT.0) imin=mstu(1)
6708 IF(imax.LE.0) imax=
n
6709 IF(mstu(2).GT.0) imax=mstu(2)
6710 IF(imin.GT.mstu(4).OR.imax.GT.mstu(4))
THEN
6711 CALL
luerrm(11,
'(LUROBO:) range outside LUJETS memory')
6716 IF(mstu(33).NE.0)
THEN
6717 DO 110 i=
min(imin,mstu(4)),
min(imax,mstu(4))
6726 IF(the**2+
phi**2.GT.1
d-20)
THEN
6729 rot(1,3)=sin(the)*
cos(
phi)
6730 rot(2,1)=
cos(the)*sin(
phi)
6732 rot(2,3)=sin(the)*sin(
phi)
6737 IF(
k(i,1).LE.0) goto 140
6743 p(i,j)=rot(j,1)*pr(1)+rot(j,2)*pr(2)+rot(j,3)*pr(3)
6744 v(i,j)=rot(j,1)*vr(1)+rot(j,2)*vr(2)+rot(j,3)*vr(3)
6750 IF(bex**2+bey**2+bez**2.GT.1
d-20)
THEN
6754 db=sqrt(dbx**2+dby**2+dbz**2)
6756 IF(db.GT.deps1)
THEN
6758 CALL
luerrm(3,
'(LUROBO:) boost vector too large')
6764 dga=1d0/sqrt(1d0-db**2)
6766 IF(
k(i,1).LE.0) goto 160
6771 dbp=dbx*dp(1)+dby*dp(2)+dbz*dp(3)
6772 dgabp=dga*(dga*dbp/(1d0+dga)+dp(4))
6773 p(i,1)=dp(1)+dgabp*dbx
6774 p(i,2)=dp(2)+dgabp*dby
6775 p(i,3)=dp(3)+dgabp*dbz
6776 p(i,4)=dga*(dp(4)+dbp)
6777 dbv=dbx*dv(1)+dby*dv(2)+dbz*dv(3)
6778 dgabv=dga*(dga*dbv/(1d0+dga)+dv(4))
6779 v(i,1)=dv(1)+dgabv*dbx
6780 v(i,2)=dv(2)+dgabv*dby
6781 v(i,3)=dv(3)+dgabv*dbz
6782 v(i,4)=dga*(dv(4)+dbv)
6795 IMPLICIT DOUBLE PRECISION(
d)
6796 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
6797 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6798 SAVE /lujets/,/ludat1/
6799 dimension rot(3,3),pr(3),vr(3),dp(4),dv(4)
6803 IF(mstu(1).GT.0) imin=mstu(1)
6805 IF(mstu(2).GT.0) imax=mstu(2)
6812 entry ludbrb(imi,ima,the,
phi,dbex,dbey,dbez)
6814 IF(imin.LE.0) imin=1
6816 IF(imax.LE.0) imax=
n
6822 IF(mstu(33).NE.0)
THEN
6823 DO 110 i=
min(imin,mstu(4)),
min(imax,mstu(4))
6832 120
IF(imin.GT.mstu(4).OR.imax.GT.mstu(4))
THEN
6833 CALL
luerrm(11,
'(LUROBO:) range outside LUJETS memory')
6838 IF(the**2+
phi**2.GT.1e-20)
THEN
6841 rot(1,3)=sin(the)*
cos(
phi)
6842 rot(2,1)=
cos(the)*sin(
phi)
6844 rot(2,3)=sin(the)*sin(
phi)
6849 IF(
k(i,1).LE.0) goto 150
6855 p(i,j)=rot(j,1)*pr(1)+rot(j,2)*pr(2)+rot(j,3)*pr(3)
6856 v(i,j)=rot(j,1)*vr(1)+rot(j,2)*vr(2)+rot(j,3)*vr(3)
6862 IF(dbx**2+dby**2+dbz**2.GT.1e-20)
THEN
6863 db=sqrt(dbx**2+dby**2+dbz**2)
6864 IF(db.GT.0.99999999d0)
THEN
6866 CALL
luerrm(3,
'(LUROBO:) boost vector too large')
6867 dbx=dbx*(0.99999999d0/db)
6868 dby=dby*(0.99999999d0/db)
6869 dbz=dbz*(0.99999999d0/db)
6872 dga=1d0/sqrt(1d0-db**2)
6874 IF(
k(i,1).LE.0) goto 170
6879 dbp=dbx*dp(1)+dby*dp(2)+dbz*dp(3)
6880 dgabp=dga*(dga*dbp/(1d0+dga)+dp(4))
6881 p(i,1)=dp(1)+dgabp*dbx
6882 p(i,2)=dp(2)+dgabp*dby
6883 p(i,3)=dp(3)+dgabp*dbz
6884 p(i,4)=dga*(dp(4)+dbp)
6885 dbv=dbx*dv(1)+dby*dv(2)+dbz*dv(3)
6886 dgabv=dga*(dga*dbv/(1d0+dga)+dv(4))
6887 v(i,1)=dv(1)+dgabv*dbx
6888 v(i,2)=dv(2)+dgabv*dby
6889 v(i,3)=dv(3)+dgabv*dbz
6890 v(i,4)=dga*(dv(4)+dbv)
6903 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
6904 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6905 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6906 SAVE /lujets/,/ludat1/,/ludat2/
6907 dimension ns(2),pts(2),pls(2)
6910 IF((medit.GE.0.AND.medit.LE.3).OR.medit.EQ.5)
THEN
6912 IF(mstu(2).GT.0) imax=mstu(2)
6914 DO 110 i=
max(1,mstu(1)),imax
6915 IF(
k(i,1).EQ.0.OR.
k(i,1).GT.20) goto 110
6917 IF(
k(i,1).GT.10) goto 110
6918 ELSEIF(medit.EQ.2)
THEN
6919 IF(
k(i,1).GT.10) goto 110
6921 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.kc.EQ.18)
6923 ELSEIF(medit.EQ.3)
THEN
6924 IF(
k(i,1).GT.10) goto 110
6926 IF(kc.EQ.0) goto 110
6927 IF(kchg(kc,2).EQ.0.AND.
luchge(
k(i,2)).EQ.0) goto 110
6928 ELSEIF(medit.EQ.5)
THEN
6929 IF(
k(i,1).EQ.13.OR.
k(i,1).EQ.14) goto 110
6931 IF(kc.EQ.0) goto 110
6932 IF(
k(i,1).GE.11.AND.kchg(kc,2).EQ.0) goto 110
6944 IF(i1.LT.
n) mstu(3)=0
6945 IF(i1.LT.
n) mstu(70)=0
6949 ELSEIF(medit.GE.11.AND.medit.LE.15)
THEN
6952 k(i,3)=mod(
k(i,3),mstu(5))
6953 IF(medit.EQ.11.AND.
k(i,1).LT.0) goto 120
6954 IF(medit.EQ.12.AND.
k(i,1).EQ.0) goto 120
6955 IF(medit.EQ.13.AND.(
k(i,1).EQ.11.OR.
k(i,1).EQ.12.OR.
6956 &
k(i,1).EQ.15).AND.
k(i,2).NE.94) goto 120
6957 IF(medit.EQ.14.AND.(
k(i,1).EQ.13.OR.
k(i,1).EQ.14.OR.
6958 &
k(i,2).EQ.94)) goto 120
6959 IF(medit.EQ.15.AND.
k(i,1).GE.21) goto 120
6961 k(i,3)=
k(i,3)+mstu(5)*i1
6966 IF(
k(i,1).LE.0.OR.
k(i,1).GT.20.OR.
k(i,3)/mstu(5).EQ.0) goto 140
6968 130 im=mod(
k(
id,3),mstu(5))
6969 IF(medit.EQ.13.AND.im.GT.0.AND.im.LE.
n)
THEN
6970 IF((
k(im,1).EQ.11.OR.
k(im,1).EQ.12.OR.
k(im,1).EQ.15).AND.
6971 &
k(im,2).NE.94)
THEN
6975 ELSEIF(medit.EQ.14.AND.im.GT.0.AND.im.LE.
n)
THEN
6976 IF(
k(im,1).EQ.13.OR.
k(im,1).EQ.14.OR.
k(im,2).EQ.94)
THEN
6981 k(i,3)=mstu(5)*(
k(i,3)/mstu(5))
6982 IF(im.NE.0)
k(i,3)=
k(i,3)+
k(im,3)/mstu(5)
6983 IF(
k(i,1).NE.3.AND.
k(i,1).NE.13.AND.
k(i,1).NE.14)
THEN
6984 IF(
k(i,4).GT.0.AND.
k(i,4).LE.mstu(4))
k(i,4)=
6985 &
k(
k(i,4),3)/mstu(5)
6986 IF(
k(i,5).GT.0.AND.
k(i,5).LE.mstu(4))
k(i,5)=
6987 &
k(
k(i,5),3)/mstu(5)
6989 kcm=mod(
k(i,4)/mstu(5),mstu(5))
6990 IF(kcm.GT.0.AND.kcm.LE.mstu(4)) kcm=
k(kcm,3)/mstu(5)
6991 kcd=mod(
k(i,4),mstu(5))
6992 IF(kcd.GT.0.AND.kcd.LE.mstu(4)) kcd=
k(kcd,3)/mstu(5)
6993 k(i,4)=mstu(5)**2*(
k(i,4)/mstu(5)**2)+mstu(5)*kcm+kcd
6994 kcm=mod(
k(i,5)/mstu(5),mstu(5))
6995 IF(kcm.GT.0.AND.kcm.LE.mstu(4)) kcm=
k(kcm,3)/mstu(5)
6996 kcd=mod(
k(i,5),mstu(5))
6997 IF(kcd.GT.0.AND.kcd.LE.mstu(4)) kcd=
k(kcd,3)/mstu(5)
6998 k(i,5)=mstu(5)**2*(
k(i,5)/mstu(5)**2)+mstu(5)*kcm+kcd
7007 IF(
k(i,3)/mstu(5).EQ.0) goto 170
7014 k(i1,3)=mod(
k(i1,3),mstu(5))
7016 IF(i.EQ.mstu(90+iz))
THEN
7018 mstu(90+mstu(90))=i1
7019 paru(90+mstu(90))=paru(90+iz)
7023 IF(i1.LT.
n) mstu(3)=0
7024 IF(i1.LT.
n) mstu(70)=0
7028 ELSEIF(medit.EQ.16)
THEN
7030 IF(
k(i,1).LE.10.OR.
k(i,1).GT.20) goto 190
7031 IF(
k(i,4).NE.0.OR.
k(i,5).NE.0) goto 190
7034 IF(
k(i1,3).NE.i)
THEN
7035 ELSEIF(
k(i,4).EQ.0)
THEN
7041 IF(
k(i,5).EQ.0)
k(i,5)=
k(i,4)
7042 IF(
k(i,4).NE.0) goto 190
7045 IF(im.LE.0.OR.im.GE.i) goto 190
7046 IF(
k(im,1).LE.20.OR.
k(im,1).GT.30) goto 190
7047 IF(
k(im,2).NE.
k(i,2).OR.abs(
p(im,5)-
p(i,5)).GT.1e-2) goto 190
7049 IF(
k(i1,3).NE.im)
THEN
7050 ELSEIF(
k(i,4).EQ.0)
THEN
7056 IF(
k(i,5).EQ.0)
k(i,5)=
k(i,4)
7057 IF(
k(i,4).NE.0) goto 190
7063 IF(
k(i1,3).EQ.im.AND.
k(i1,1).GT.20.AND.
k(i1,1).LE.30)
THEN
7065 IF(id1.EQ.im) id1=i1
7069 IF(
k(i1,3).NE.id1.AND.
k(i1,3).NE.id2)
THEN
7070 ELSEIF(
k(i,4).EQ.0)
THEN
7076 IF(
k(i,5).EQ.0)
k(i,5)=
k(i,4)
7080 ELSEIF(medit.EQ.21)
THEN
7081 IF(2*
n.GE.mstu(4))
THEN
7082 CALL
luerrm(11,
'(LUEDIT:) no more memory left in LUJETS')
7087 k(mstu(4)-i,j)=
k(i,j)
7088 p(mstu(4)-i,j)=
p(i,j)
7089 v(mstu(4)-i,j)=
v(i,j)
7095 ELSEIF(medit.EQ.22)
THEN
7098 k(i,j)=
k(mstu(4)-i,j)
7099 p(i,j)=
p(mstu(4)-i,j)
7100 v(i,j)=
v(mstu(4)-i,j)
7106 ELSEIF(medit.EQ.23)
THEN
7111 IF(
k(kh,1).GT.20) kh=0
7113 IF(kh.NE.0) goto 250
7115 IF(
k(i,1).GT.10.AND.
k(i,1).LE.20)
k(i,1)=
k(i,1)-10
7120 ELSEIF(medit.EQ.31.OR.medit.EQ.32)
THEN
7121 CALL ludbrb(1,
n+mstu(3),0.,-
ulangl(
p(mstu(61),1),
7122 &
p(mstu(61),2)),0d0,0d0,0d0)
7123 CALL ludbrb(1,
n+mstu(3),-
ulangl(
p(mstu(61),3),
7124 &
p(mstu(61),1)),0.,0d0,0d0,0d0)
7125 CALL ludbrb(1,
n+mstu(3),0.,-
ulangl(
p(mstu(61)+1,1),
7126 &
p(mstu(61)+1,2)),0d0,0d0,0d0)
7127 IF(medit.EQ.31)
RETURN
7136 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 270
7137 IF(mstu(41).GE.2)
THEN
7139 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
7140 & kc.EQ.18) goto 270
7141 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(
k(i,2)).EQ.0)
7146 pts(
is)=pts(
is)+sqrt(
p(i,1)**2+
p(i,2)**2)
7148 IF(ns(1)*pts(2)**2.LT.ns(2)*pts(1)**2)
7149 & CALL ludbrb(1,
n+mstu(3),paru(1),0.,0d0,0d0,0d0)
7153 IF(
p(i,3).GE.0.) goto 280
7154 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 280
7155 IF(mstu(41).GE.2)
THEN
7157 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
7158 & kc.EQ.18) goto 280
7159 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(
k(i,2)).EQ.0)
7163 pls(
is)=pls(
is)-
p(i,3)
7165 IF(pls(2).GT.pls(1)) CALL ludbrb(1,
n+mstu(3),0.,paru(1),
7178 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
7179 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
7180 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
7181 common/ludat3/
mdcy(500,3),
mdme(2000,2),
brat(2000),kfdp(2000,5)
7182 SAVE /lujets/,/ludat1/,/ludat2/,/ludat3/
7183 CHARACTER chap*16,chac*16,chan*16,chad(5)*16,chdl(7)*4
7185 DATA chdl/
'(())',
' ',
'()',
'!!',
'<>',
'==',
'(==)'/
7188 IF(mlist.EQ.0.OR.mstu(12).EQ.1)
THEN
7191 IF(mlist.EQ.0)
RETURN
7195 IF(mlist.GE.1.AND.mlist.LE.3)
THEN
7196 IF(mlist.EQ.1)
WRITE(mstu(11),5100)
7197 IF(mlist.EQ.2)
WRITE(mstu(11),5200)
7198 IF(mlist.EQ.3)
WRITE(mstu(11),5300)
7200 IF(mlist.GE.2) lmx=16
7203 IF(mstu(2).GT.0) imax=mstu(2)
7204 DO 120 i=
max(1,mstu(1)),
max(imax,
n+
max(0,mstu(3)))
7205 IF((i.GT.imax.AND.i.LE.
n).OR.
k(i,1).LT.0) goto 120
7211 IF(chap(lem:lem).NE.
' ') len=lem
7215 IF(mdl.EQ.2.OR.mdl.GE.8)
THEN
7217 IF(len.GT.lmx) chac(lmx:lmx)=
'?'
7220 IF(mdl.EQ.1.OR.mdl.EQ.7) ldl=2
7222 chac=chdl(mdl)(1:2*ldl)//
' '
7224 chac=chdl(mdl)(1:ldl)//chap(1:
min(len,lmx-2*ldl))//
7225 & chdl(mdl)(ldl+1:2*ldl)//
' '
7226 IF(len+2*ldl.GT.lmx) chac(lmx:lmx)=
'?'
7231 IF(
k(i,1).EQ.1.OR.
k(i,1).EQ.2.OR.
k(i,1).EQ.11.OR.
k(i,1).EQ.12)
7235 IF(kc.NE.0) kcc=kchg(kc,2)
7236 IF(iabs(
k(i,2)).EQ.39)
THEN
7237 IF(len+2*ldl+3.LE.lmx) chac(lmx-1:lmx-1)=
'X'
7238 ELSEIF(kcc.NE.0.AND.istr.EQ.0)
THEN
7240 IF(len+2*ldl+3.LE.lmx) chac(lmx-1:lmx-1)=
'A'
7241 ELSEIF(kcc.NE.0.AND.(
k(i,1).EQ.2.OR.
k(i,1).EQ.12))
THEN
7242 IF(len+2*ldl+3.LE.lmx) chac(lmx-1:lmx-1)=
'I'
7243 ELSEIF(kcc.NE.0)
THEN
7245 IF(len+2*ldl+3.LE.lmx) chac(lmx-1:lmx-1)=
'V'
7250 IF(mlist.EQ.1.AND.abs(
p(i,4)).LT.9999.)
THEN
7251 WRITE(mstu(11),5400) i,chac(1:12),(
k(i,j1),j1=1,3),
7253 ELSEIF(mlist.EQ.1.AND.abs(
p(i,4)).LT.99999.)
THEN
7254 WRITE(mstu(11),5500) i,chac(1:12),(
k(i,j1),j1=1,3),
7256 ELSEIF(mlist.EQ.1)
THEN
7257 WRITE(mstu(11),5600) i,chac(1:12),(
k(i,j1),j1=1,3),
7259 ELSEIF(mstu(5).EQ.10000.AND.(
k(i,1).EQ.3.OR.
k(i,1).EQ.13.OR.
7260 &
k(i,1).EQ.14))
THEN
7261 WRITE(mstu(11),5700) i,chac,(
k(i,j1),j1=1,3),
7262 &
k(i,4)/100000000,mod(
k(i,4)/10000,10000),mod(
k(i,4),10000),
7263 &
k(i,5)/100000000,mod(
k(i,5)/10000,10000),mod(
k(i,5),10000),
7266 WRITE(mstu(11),5800) i,chac,(
k(i,j1),j1=1,5),(
p(i,j2),j2=1,5)
7268 IF(mlist.EQ.3)
WRITE(mstu(11),5900) (
v(i,j),j=1,5)
7271 IF(mstu(70).GE.1)
THEN
7273 DO 110 j=1,
min(10,mstu(70))
7274 IF(i.EQ.mstu(70+j)) isep=1
7276 IF(isep.EQ.1.AND.mlist.EQ.1)
WRITE(mstu(11),6000)
7277 IF(isep.EQ.1.AND.mlist.GE.2)
WRITE(mstu(11),6100)
7285 IF(mlist.EQ.1.AND.abs(ps(4)).LT.9999.)
THEN
7286 WRITE(mstu(11),6200) ps(6),(ps(j),j=1,5)
7287 ELSEIF(mlist.EQ.1.AND.abs(ps(4)).LT.99999.)
THEN
7288 WRITE(mstu(11),6300) ps(6),(ps(j),j=1,5)
7289 ELSEIF(mlist.EQ.1)
THEN
7290 WRITE(mstu(11),6400) ps(6),(ps(j),j=1,5)
7292 WRITE(mstu(11),6500) ps(6),(ps(j),j=1,5)
7296 ELSEIF(mlist.EQ.11)
THEN
7297 WRITE(mstu(11),6600)
7301 IF(chap.NE.
' '.AND.chan.EQ.
' ')
WRITE(mstu(11),6700) kf,chap
7302 IF(chan.NE.
' ')
WRITE(mstu(11),6700) kf,chap,-kf,chan
7306 DO 150 kflb=1,kfla-(3-kfls)/2
7307 kf=1000*kfla+100*kflb+kfls
7310 WRITE(mstu(11),6700) kf,chap,-kf,chan
7316 WRITE(mstu(11),6700) kf,chap
7319 WRITE(mstu(11),6700) kf,chap
7322 IF(kmul.EQ.0.OR.kmul.EQ.3) kfls=1
7323 IF(kmul.EQ.5) kfls=5
7325 IF(kmul.EQ.2.OR.kmul.EQ.3) kflr=1
7326 IF(kmul.EQ.4) kflr=2
7328 DO 180 kflc=1,kflb-1
7329 kf=10000*kflr+100*kflb+10*kflc+kfls
7332 WRITE(mstu(11),6700) kf,chap,-kf,chan
7334 kf=10000*kflr+110*kflb+kfls
7336 WRITE(mstu(11),6700) kf,chap
7341 WRITE(mstu(11),6700) kf,chap
7344 WRITE(mstu(11),6700) kf,chap
7350 IF(kflsp.EQ.1.AND.(kfla.EQ.kflb.OR.kflb.EQ.kflc)) goto 210
7351 IF(kflsp.EQ.2.AND.kfla.EQ.kflc) goto 210
7352 IF(kflsp.EQ.1) kf=1000*kfla+100*kflc+10*kflb+kfls
7353 IF(kflsp.GE.2) kf=1000*kfla+100*kflb+10*kflc+kfls
7356 WRITE(mstu(11),6700) kf,chap,-kf,chan
7363 ELSEIF(mlist.EQ.12)
THEN
7364 WRITE(mstu(11),6800)
7368 IF(mstu(2).NE.0) kfmax=mstu(2)
7369 DO 270 kf=
max(1,mstu(1)),kfmax
7371 IF(kc.EQ.0) goto 270
7372 IF(mstu(14).EQ.0.AND.kf.GT.100.AND.kc.LE.100) goto 270
7373 IF(mstu(14).GT.0.AND.kf.GT.100.AND.
max(mod(kf/1000,10),
7374 & mod(kf/100,10)).GT.mstu(14)) goto 270
7375 IF(mstu(14).GT.0.AND.kf.GT.100.AND.kc.EQ.90) goto 270
7379 IF(kf.LE.100.AND.chap.EQ.
' '.AND.
mdcy(kc,2).EQ.0) goto 270
7382 WRITE(mstu(11),6900) kf,kc,chap,chan,kchg(kc,1),kchg(kc,2),
7383 & kchg(kc,3),pm,pmas(kc,2),pmas(kc,3),pmas(kc,4),
mdcy(kc,1)
7387 IF(kf.GT.100.AND.kc.LE.100) goto 270
7390 CALL
luname(kfdp(idc,j),chad(j))
7392 WRITE(mstu(11),7000) idc,
mdme(idc,1),
mdme(idc,2),
brat(idc),
7399 ELSEIF(mlist.EQ.13)
THEN
7400 WRITE(mstu(11),7100)
7402 WRITE(mstu(11),7200) i,mstu(i),paru(i),mstj(i),parj(i),parf(i)
7407 5100
FORMAT(///28
x,
'Event listing (summary)'//4
x,
'I particle/jet KS',
7408 &5
x,
'KF orig p_x p_y p_z E m'/)
7409 5200
FORMAT(///28
x,
'Event listing (standard)'//4
x,
'I particle/jet',
7410 &
' K(I,1) K(I,2) K(I,3) K(I,4) K(I,5) P(I,1)',
7411 &
' P(I,2) P(I,3) P(I,4) P(I,5)'/)
7412 5300
FORMAT(///28
x,
'Event listing (with vertices)'//4
x,
'I particle/j',
7413 &
'et K(I,1) K(I,2) K(I,3) K(I,4) K(I,5) P(I,1)',
7414 &
' P(I,2) P(I,3) P(I,4) P(I,5)'/73
x,
7415 &
'V(I,1) V(I,2) V(I,3) V(I,4) V(I,5)'/)
7416 5400
FORMAT(1
x,i4,2
x,a12,1
x,i2,1
x,i6,1
x,i4,5f9.3)
7417 5500
FORMAT(1
x,i4,2
x,a12,1
x,i2,1
x,i6,1
x,i4,5f9.2)
7418 5600
FORMAT(1
x,i4,2
x,a12,1
x,i2,1
x,i6,1
x,i4,5f9.1)
7419 5700
FORMAT(1
x,i4,2
x,a16,1
x,i3,1
x,i8,2
x,i4,2(3
x,i1,2i4),5f13.5)
7420 5800
FORMAT(1
x,i4,2
x,a16,1
x,i3,1
x,i8,2
x,i4,2(3
x,i9),5f13.5)
7421 5900
FORMAT(66
x,5(1
x,f12.3))
7422 6000
FORMAT(1
x,78(
'='))
7423 6100
FORMAT(1
x,130(
'='))
7424 6200
FORMAT(19
x,
'sum:',f6.2,5
x,5f9.3)
7425 6300
FORMAT(19
x,
'sum:',f6.2,5
x,5f9.2)
7426 6400
FORMAT(19
x,
'sum:',f6.2,5
x,5f9.1)
7427 6500
FORMAT(19
x,
'sum charge:',f6.2,3
x,
'sum momentum and inv. mass:',
7429 6600
FORMAT(///20
x,
'List of KF codes in program'/)
7430 6700
FORMAT(4
x,i6,4
x,a16,6
x,i6,4
x,a16)
7431 6800
FORMAT(///30
x,
'Particle/parton data table'//5
x,
'KF',5
x,
'KC',4
x,
7432 &
'particle',8
x,
'antiparticle',6
x,
'chg col anti',8
x,
'mass',7
x,
7433 &
'width',7
x,
'w-cut',5
x,
'lifetime',1
x,
'decay'/11
x,
'IDC',1
x,
'on/off',
7434 &1
x,
'ME',3
x,
'Br.rat.',4
x,
'decay products')
7435 6900
FORMAT(/1
x,i6,3
x,i4,4
x,a16,a16,3i5,1
x,f12.5,2(1
x,f11.5),
7437 7000
FORMAT(10
x,i4,2
x,i3,2
x,i3,2
x,f8.5,4
x,5a16)
7438 7100
FORMAT(///20
x,
'Parameter value table'//4
x,
'I',3
x,
'MSTU(I)',
7439 &8
x,
'PARU(I)',3
x,
'MSTJ(I)',8
x,
'PARJ(I)',8
x,
'PARF(I)')
7440 7200
FORMAT(1
x,i4,1
x,i9,1
x,f14.5,1
x,i9,1
x,f14.5,1
x,f14.5)
7450 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
7451 common/pypars/mstp(200),parp(200),msti(200),pari(200)
7454 CHARACTER month(12)*3, logo(48)*32, refer(22)*36,
line*79,
7455 &vers*1, subv*3, date*2, year*4
7458 DATA month/
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
7460 DATA (logo(j),j=1,10)/
7461 &
'PPP Y Y TTTTT H H III A ',
7462 &
'P P Y Y T H H I A A ',
7463 &
'PPP Y T HHHHH I AAAAA',
7465 &
'P Y T H H III A A',
7466 &
'JJJJ EEEE TTTTT SSS EEEE TTTTT',
7468 &
' J EEE T SSS EEE T ',
7470 &
' JJ EEEE T SSS EEEE T '/
7471 DATA (logo(j),j=11,29)/
7473 &
' *:::!!:::::::::::* ',
7474 &
' *::::::!!::::::::::::::* ',
7475 &
' *::::::::!!::::::::::::::::* ',
7476 &
' *:::::::::!!:::::::::::::::::* ',
7477 &
' *:::::::::!!:::::::::::::::::* ',
7478 &
' *::::::::!!::::::::::::::::*! ',
7479 &
' *::::::!!::::::::::::::* !! ',
7480 &
' !! *:::!!:::::::::::* !! ',
7481 &
' !! !* -><- * !! ',
7491 DATA (logo(j),j=30,48)/
7492 &
'Welcome to the Lund Monte Carlo!',
7494 &
' This is PYTHIA version x.xxx ',
7495 &
'Last date of change: xx xxx 199x',
7497 &
' This is JETSET version x.xxx ',
7498 &
'Last date of change: xx xxx 199x',
7501 &
' Torbjorn Sjostrand ',
7502 &
' Dept. of theoretical physics 2 ',
7503 &
' University of Lund ',
7504 &
' Solvegatan 14A ',
7505 &
' S-223 62 Lund, Sweden ',
7506 &
' phone: +46 - 46 - 222 48 16 ',
7507 &
' E-mail: torbjorn@thep.lu.se ',
7509 &
' Copyright Torbjorn Sjostrand ',
7510 &
' and CERN, Geneva 1993 '/
7511 DATA (refer(j),j=1,6)/
7512 &
'The latest program versions and docu',
7513 &
'mentation is found on WWW address ',
7514 &
'http://thep.lu.se/tf2/staff/torbjorn',
7518 DATA (refer(j),j=7,22)/
7519 &
'When you cite these programs, priori',
7520 &
'ty should always be given to the ',
7521 &
'latest published description. Curren',
7523 &
'T. Sjostrand, Computer Physics Commu',
7524 &
'n. 82 (1994) 74. ',
7525 &
'The most recent long description (un',
7527 &
'T. Sjostrand, LU TP 95-20 and CERN-T',
7528 &
'H.7112/93 (revised August 1995). ',
7529 &
'Also remember that the programs, to ',
7530 &
'a large extent, represent original ',
7531 &
'physics research. Other publications',
7532 &
' of special relevance to your ',
7533 &
'studies may therefore deserve separa',
7537 IF(mstp(183)/10.NE.199)
THEN
7538 logo(32)=
' Warning: PYTHIA is not loaded! '
7539 logo(33)=
'Did you remember to link PYDATA?'
7541 WRITE(vers,
'(I1)') mstp(181)
7542 logo(32)(26:26)=vers
7543 WRITE(subv,
'(I3)') mstp(182)
7544 logo(32)(28:30)=subv
7545 WRITE(date,
'(I2)') mstp(185)
7546 logo(33)(22:23)=date
7547 logo(33)(25:27)=month(mstp(184))
7548 WRITE(year,
'(I4)') mstp(183)
7549 logo(33)(29:32)=year
7553 IF(mstu(183)/10.NE.199)
THEN
7554 logo(35)=
' Error: JETSET is not loaded! '
7555 logo(36)=
'Did you remember to link LUDATA?'
7557 WRITE(vers,
'(I1)') mstu(181)
7558 logo(35)(26:26)=vers
7559 WRITE(subv,
'(I3)') mstu(182)
7560 logo(35)(28:30)=subv
7561 WRITE(date,
'(I2)') mstu(185)
7562 logo(36)(22:23)=date
7563 logo(36)(25:27)=month(mstu(184))
7564 WRITE(year,
'(I4)') mstu(183)
7565 logo(36)(29:32)=year
7579 IF(ilin.EQ.2.OR.ilin.EQ.3.OR.ilin.EQ.47.OR.ilin.EQ.48)
THEN
7580 line(4:77)=
'***********************************************'//
7581 &
'***************************'
7582 ELSEIF(ilin.GE.6.AND.ilin.LE.10)
THEN
7583 line(6:37)=logo(ilin-5)
7584 line(44:75)=logo(ilin)
7585 ELSEIF(ilin.GE.13.AND.ilin.LE.31)
THEN
7586 line(6:37)=logo(ilin-2)
7587 line(44:75)=logo(ilin+17)
7588 ELSEIF(ilin.GE.34.AND.ilin.LE.44)
THEN
7589 line(5:40)=refer(2*ilin-67)
7590 line(41:76)=refer(2*ilin-66)
7594 IF(mstu(183)/10.EQ.199)
THEN
7595 WRITE(mstu(11),
'(A79)')
line
7597 WRITE(*,
'(A79)')
line
7602 IF(mstu(183)/10.EQ.199.AND.mstp(183)/10.EQ.199)
THEN
7603 IF(mstu(182).LT.mstp(186))
WRITE(mstu(11),
7604 &
'(/'' Warning: JETSET subversion too old for PYTHIA''/)')
7605 IF(mstp(182).LT.mstu(186))
WRITE(mstu(11),
7606 &
'(/'' Warning: PYTHIA subversion too old for JETSET''/)')
7617 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
7618 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
7619 common/ludat3/
mdcy(500,3),
mdme(2000,2),
brat(2000),kfdp(2000,5)
7620 common/ludat4/chaf(500)
7622 SAVE /ludat1/,/ludat2/,/ludat3/,/ludat4/
7623 CHARACTER chinl*80,chkc*4,chvar(19)*9,chlin*72,
7624 &chblk(20)*72,chold*12,chtmp*12,chnew*12,chcom*12
7625 DATA chvar/
'KCHG(I,1)',
'KCHG(I,2)',
'KCHG(I,3)',
'PMAS(I,1)',
7626 &
'PMAS(I,2)',
'PMAS(I,3)',
'PMAS(I,4)',
'MDCY(I,1)',
'MDCY(I,2)',
7627 &
'MDCY(I,3)',
'MDME(I,1)',
'MDME(I,2)',
'BRAT(I) ',
'KFDP(I,1)',
7628 &
'KFDP(I,2)',
'KFDP(I,3)',
'KFDP(I,4)',
'KFDP(I,5)',
'CHAF(I) '/
7631 IF(mstu(12).GE.1) CALL
lulist(0)
7634 WRITE(lfn,5000) kc,chaf(kc),(kchg(kc,j1),j1=1,3),
7635 & (pmas(kc,j2),j2=1,4),
mdcy(kc,1)
7638 & (kfdp(idc,j),j=1,5)
7643 ELSEIF(mupda.EQ.2)
THEN
7655 140
READ(lfn,5200,
end=150) chinl
7656 IF(chinl(2:5).NE.
' ')
THEN
7660 IF(ndc.NE.0)
mdcy(kc,2)=idc+1-ndc
7664 IF(kc.LE.0.OR.kc.GT.mstu(6)) CALL
luerrm(27,
7665 &
'(LUUPDA:) Read KC code illegal, KC ='//chkc)
7666 READ(chinl,5000) kcr,chaf(kc),(kchg(kc,j1),j1=1,3),
7667 & (pmas(kc,j2),j2=1,4),
mdcy(kc,1)
7672 IF(idc.GE.mstu(7)) CALL
luerrm(27,
7673 &
'(LUUPDA:) Decay data arrays full by KC ='//chkc)
7675 & (kfdp(idc,j),j=1,5)
7679 IF(ndc.NE.0)
mdcy(kc,2)=idc+1-ndc
7687 IF(
min(pmas(kc,1),pmas(kc,2),pmas(kc,3),pmas(kc,1)-pmas(kc,3),
7688 & pmas(kc,4)).LT.0..OR.
mdcy(kc,3).LT.0) CALL
luerrm(17,
7689 &
'(LUUPDA:) Mass/width/life/(# channels) wrong for KC ='//chkc)
7692 IF(
mdme(idc,2).GT.80) goto 170
7694 pms=pmas(kc,1)-pmas(kc,3)-parj(64)
7698 IF(kp.EQ.0.OR.kp.EQ.81.OR.iabs(kp).EQ.82)
THEN
7699 ELSEIF(
lucomp(kp).EQ.0)
THEN
7706 IF(kq.NE.0) merr=
max(2,merr)
7707 IF(kfdp(idc,2).NE.0.AND.(kc.LE.20.OR.kc.GT.40).AND.
7708 & (kc.LE.80.OR.kc.GT.100).AND.
mdme(idc,2).NE.34.AND.
7709 &
mdme(idc,2).NE.61.AND.pms.LT.0.) merr=
max(1,merr)
7710 IF(merr.EQ.3) CALL
luerrm(17,
7711 &
'(LUUPDA:) Unknown particle code in decay of KC ='//chkc)
7712 IF(merr.EQ.2) CALL
luerrm(17,
7713 &
'(LUUPDA:) Charge not conserved in decay of KC ='//chkc)
7714 IF(merr.EQ.1) CALL
luerrm(7,
7715 &
'(LUUPDA:) Kinematically unallowed decay of KC ='//chkc)
7716 brsum=brsum+
brat(idc)
7718 WRITE(chtmp,5500) brsum
7719 IF(abs(brsum).GT.0.0005.AND.abs(brsum-1.).GT.0.0005) CALL
7720 &
luerrm(7,
'(LUUPDA:) Sum of branching ratios is '//chtmp(5:12)//
7721 &
' for KC ='//chkc)
7726 ELSEIF(mupda.EQ.3)
THEN
7729 IF(ivar.GE.11.AND.ivar.LE.18) ndim=mstu(7)
7732 chlin(7:35)=
'DATA ('//chvar(ivar)//
',I= 1, )/'
7738 IF(ivar.EQ.1)
WRITE(chtmp,5400) kchg(idim,1)
7739 IF(ivar.EQ.2)
WRITE(chtmp,5400) kchg(idim,2)
7740 IF(ivar.EQ.3)
WRITE(chtmp,5400) kchg(idim,3)
7741 IF(ivar.EQ.4)
WRITE(chtmp,5500) pmas(idim,1)
7742 IF(ivar.EQ.5)
WRITE(chtmp,5500) pmas(idim,2)
7743 IF(ivar.EQ.6)
WRITE(chtmp,5500) pmas(idim,3)
7744 IF(ivar.EQ.7)
WRITE(chtmp,5500) pmas(idim,4)
7745 IF(ivar.EQ.8)
WRITE(chtmp,5400)
mdcy(idim,1)
7746 IF(ivar.EQ.9)
WRITE(chtmp,5400)
mdcy(idim,2)
7747 IF(ivar.EQ.10)
WRITE(chtmp,5400)
mdcy(idim,3)
7748 IF(ivar.EQ.11)
WRITE(chtmp,5400)
mdme(idim,1)
7749 IF(ivar.EQ.12)
WRITE(chtmp,5400)
mdme(idim,2)
7750 IF(ivar.EQ.13)
WRITE(chtmp,5500)
brat(idim)
7751 IF(ivar.EQ.14)
WRITE(chtmp,5400) kfdp(idim,1)
7752 IF(ivar.EQ.15)
WRITE(chtmp,5400) kfdp(idim,2)
7753 IF(ivar.EQ.16)
WRITE(chtmp,5400) kfdp(idim,3)
7754 IF(ivar.EQ.17)
WRITE(chtmp,5400) kfdp(idim,4)
7755 IF(ivar.EQ.18)
WRITE(chtmp,5400) kfdp(idim,5)
7756 IF(ivar.EQ.19) chtmp=chaf(idim)
7762 IF(chtmp(13-ll:13-ll).NE.
' ') llow=13-ll
7763 IF(chtmp(ll:ll).NE.
' ') lhig=ll
7765 chnew=chtmp(llow:lhig)//
' '
7767 IF((ivar.GE.4.AND.ivar.LE.7).OR.ivar.EQ.13)
THEN
7770 IF(chnew(lnew:lnew).EQ.
'0') goto 200
7771 IF(lnew.EQ.1) chnew(1:2)=
'0.'
7772 IF(lnew.EQ.1) lnew=2
7773 ELSEIF(ivar.EQ.19)
THEN
7775 IF(chnew(ll:ll).EQ.
'''')
THEN
7777 chnew=chtmp(1:ll)//
''''//chtmp(ll+1:11)
7782 chnew(1:lnew+2)=
''''//chtmp(1:lnew)//
''''
7787 IF(chnew.NE.chold)
THEN
7794 IF(nrpt.GE.2) lrpt=lnew+3
7795 IF(nrpt.GE.10) lrpt=lnew+4
7796 IF(nrpt.GE.100) lrpt=lnew+5
7797 IF(nrpt.GE.1000) lrpt=lnew+6
7800 WRITE(chtmp,5400) nrpt
7802 IF(nrpt.GE.10) lrpt=2
7803 IF(nrpt.GE.100) lrpt=3
7804 IF(nrpt.GE.1000) lrpt=4
7805 chcom(1:lrpt+1+lnew)=chtmp(13-lrpt:12)//
'*'//chnew(1:lnew)
7811 IF(llin+lcom.LE.70)
THEN
7812 chlin(llin+1:llin+lcom+1)=chcom(1:lcom)//
','
7814 ELSEIF(nlin.LE.19)
THEN
7815 chlin(llin+1:72)=
' '
7818 chlin(6:6+lcom+1)=
'&'//chcom(1:lcom)//
','
7821 chlin(llin:72)=
'/'//
' '
7823 WRITE(chtmp,5400) idim-nrpt
7824 chblk(1)(30:33)=chtmp(9:12)
7826 WRITE(lfn,5600) chblk(ilin)
7830 chlin(7:35+lcom+1)=
'DATA ('//chvar(ivar)//
',I= , )/'//
7831 & chcom(1:lcom)//
','
7832 WRITE(chtmp,5400) idim-nrpt+1
7833 chlin(25:28)=chtmp(9:12)
7839 chlin(llin:72)=
'/'//
' '
7841 WRITE(chtmp,5400) ndim
7842 chblk(1)(30:33)=chtmp(9:12)
7844 WRITE(lfn,5600) chblk(ilin)
7850 5000
FORMAT(1
x,i4,2
x,a8,3i3,3f12.5,2
x,f12.5,i3)
7851 5100
FORMAT(5
x,2i5,f12.5,5i8)
7866 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
7867 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
7868 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
7869 SAVE /lujets/,/ludat1/,/ludat2/
7874 IF(i.LT.0.OR.i.GT.mstu(4).OR.j.LE.0)
THEN
7875 ELSEIF(i.EQ.0.AND.j.EQ.1)
THEN
7877 ELSEIF(i.EQ.0.AND.(j.EQ.2.OR.j.EQ.6))
THEN
7879 IF(j.EQ.2.AND.
k(i1,1).GE.1.AND.
k(i1,1).LE.10)
klu=
klu+1
7880 IF(j.EQ.6.AND.
k(i1,1).GE.1.AND.
k(i1,1).LE.10)
klu=
klu+
7893 IF(
k(i,1).GE.1.AND.
k(i,1).LE.10)
klu=1
7895 ELSEIF(j.LE.12)
THEN
7899 IF(kc.NE.0) kq=kchg(kc,2)
7900 IF(j.EQ.9.AND.kc.NE.0.AND.kq.NE.0)
klu=
k(i,2)
7901 IF(j.EQ.10.AND.kc.NE.0.AND.kq.EQ.0)
klu=
k(i,2)
7903 IF(j.EQ.12)
klu=kq*isign(1,
k(i,2))
7906 ELSEIF(j.EQ.13)
THEN
7908 klu=mod(kfa/100,10)*(-1)**mod(kfa/100,10)
7909 IF(kfa.LT.10)
klu=kfa
7910 IF(mod(kfa/1000,10).NE.0)
klu=mod(kfa/1000,10)
7914 ELSEIF(j.LE.15)
THEN
7920 IF(i1.GT.0.AND.
k(i1,1).GT.0.AND.
k(i1,1).LE.20) goto 110
7922 ELSEIF(j.EQ.16)
THEN
7924 IF(
k(i,1).LE.20.AND.((kfa.GE.11.AND.kfa.LE.20).OR.kfa.EQ.22.OR.
7925 & (kfa.GT.100.AND.mod(kfa/10,10).NE.0)))
THEN
7932 IF(kfam.NE.0.AND.kfam.LE.10) ilp=0
7933 IF(kfam.EQ.21.OR.kfam.EQ.91.OR.kfam.EQ.92.OR.kfam.EQ.93)
7935 IF(kfam.GT.100.AND.mod(kfam/10,10).EQ.0) ilp=0
7936 IF(ilp.EQ.1) goto 120
7938 IF(
k(i1,1).EQ.12)
THEN
7940 IF(
k(i3,3).EQ.
k(i2,3).AND.
k(i3,2).NE.91.AND.
k(i3,2).NE.92
7941 & .AND.
k(i3,2).NE.93)
klu=
klu+1
7947 IF(i3.LT.
n.AND.
k(i3,3).EQ.
k(i2,3)) goto 140
7952 ELSEIF(j.EQ.17)
THEN
7959 IF(i1.EQ.0.OR.
k(i0,1).LE.0.OR.
k(i0,1).GT.20.OR.kc.EQ.0)
THEN
7964 IF(kchg(kc,2).EQ.0) goto 150
7965 IF(
k(i1,1).NE.12)
klu=0
7966 IF(
k(i1,1).NE.12)
RETURN
7969 IF(i2.LT.
n.AND.
k(i2,1).NE.11) goto 160
7971 IF(k3m.GE.i1.AND.k3m.LE.i2)
klu=0
7973 IF(i3.LT.
n.AND.k3p.GE.i1.AND.k3p.LE.i2)
klu=0
7976 ELSEIF(j.EQ.18)
THEN
7977 IF(
k(i,1).EQ.11.OR.
k(i,1).EQ.12)
klu=
max(0,
k(i,5)-
k(i,4)+1)
7978 IF(
k(i,4).EQ.0.OR.
k(i,5).EQ.0)
klu=0
7979 ELSEIF(j.LE.22)
THEN
7980 IF(
k(i,1).NE.3.AND.
k(i,1).NE.13.AND.
k(i,1).NE.14)
RETURN
7981 IF(j.EQ.19)
klu=mod(
k(i,4)/mstu(5),mstu(5))
7982 IF(j.EQ.20)
klu=mod(
k(i,5)/mstu(5),mstu(5))
7983 IF(j.EQ.21)
klu=mod(
k(i,4),mstu(5))
7984 IF(j.EQ.22)
klu=mod(
k(i,5),mstu(5))
7996 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
7997 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
7998 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
7999 SAVE /lujets/,/ludat1/,/ludat2/
8005 IF(i.LT.0.OR.i.GT.mstu(4).OR.j.LE.0)
THEN
8006 ELSEIF(i.EQ.0.AND.j.LE.4)
THEN
8008 IF(
k(i1,1).GT.0.AND.
k(i1,1).LE.10)
plu=
plu+
p(i1,j)
8010 ELSEIF(i.EQ.0.AND.j.EQ.5)
THEN
8014 IF(
k(i1,1).GT.0.AND.
k(i1,1).LE.10) psum(j1)=psum(j1)+
p(i1,j1)
8017 plu=sqrt(
max(0.,psum(4)**2-psum(1)**2-psum(2)**2-psum(3)**2))
8018 ELSEIF(i.EQ.0.AND.j.EQ.6)
THEN
8029 ELSEIF(j.LE.12)
THEN
8031 IF(j.EQ.7.OR.j.EQ.8)
plu=
p(i,1)**2+
p(i,2)**2+
p(i,3)**2
8032 IF(j.EQ.9.OR.j.EQ.10)
plu=
p(i,1)**2+
p(i,2)**2
8033 IF(j.EQ.11.OR.j.EQ.12)
plu=
p(i,5)**2+
p(i,1)**2+
p(i,2)**2
8034 IF(j.EQ.8.OR.j.EQ.10.OR.j.EQ.12)
plu=sqrt(
plu)
8037 ELSEIF(j.LE.16)
THEN
8038 IF(j.LE.14)
plu=
ulangl(
p(i,3),sqrt(
p(i,1)**2+
p(i,2)**2))
8040 IF(j.EQ.14.OR.j.EQ.16)
plu=
plu*180./paru(1)
8043 ELSEIF(j.LE.19)
THEN
8045 IF(j.EQ.17) pmr=
p(i,5)
8046 IF(j.EQ.18) pmr=
ulmass(211)
8047 pr=
max(1e-20,pmr**2+
p(i,1)**2+
p(i,2)**2)
8052 ELSEIF(j.LE.25)
THEN
8053 IF(j.EQ.20)
plu=2.*sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)/paru(21)
8054 IF(j.EQ.21)
plu=2.*
p(i,3)/paru(21)
8055 IF(j.EQ.22)
plu=2.*sqrt(
p(i,1)**2+
p(i,2)**2)/paru(21)
8056 IF(j.EQ.23)
plu=2.*
p(i,4)/paru(21)
8057 IF(j.EQ.24)
plu=(
p(i,4)+
p(i,3))/paru(21)
8058 IF(j.EQ.25)
plu=(
p(i,4)-
p(i,3))/paru(21)
8070 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
8071 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8072 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
8073 SAVE /lujets/,/ludat1/,/ludat2/
8074 dimension sm(3,3),sv(3,3)
8085 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 140
8086 IF(mstu(41).GE.2)
THEN
8088 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
8089 & kc.EQ.18) goto 140
8090 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(
k(i,2)).EQ.0)
8094 pa=sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
8096 IF(abs(paru(41)-2.).GT.0.001) pwt=
max(1e-10,pa)**(paru(41)-2.)
8099 sm(j1,j2)=sm(j1,j2)+pwt*
p(i,j1)*
p(i,j2)
8107 CALL
luerrm(8,
'(LUSPHE:) too few particles for analysis')
8114 sm(j1,j2)=sm(j1,j2)/ps
8119 sq=(sm(1,1)*sm(2,2)+sm(1,1)*sm(3,3)+sm(2,2)*sm(3,3)-sm(1,2)**2-
8120 &sm(1,3)**2-sm(2,3)**2)/3.-1./9.
8121 sr=-0.5*(sq+1./9.+sm(1,1)*sm(2,3)**2+sm(2,2)*sm(1,3)**2+sm(3,3)*
8122 &sm(1,2)**2-sm(1,1)*sm(2,2)*sm(3,3))+sm(1,2)*sm(1,3)*sm(2,3)+1./27.
8124 p(
n+1,4)=1./3.+sqrt(-sq)*
max(2.*
sp,sqrt(3.*(1.-
sp**2))-
sp)
8125 p(
n+3,4)=1./3.+sqrt(-sq)*
min(2.*
sp,-sqrt(3.*(1.-
sp**2))-
sp)
8126 p(
n+2,4)=1.-
p(
n+1,4)-
p(
n+3,4)
8127 IF(
p(
n+2,4).LT.1e-5)
THEN
8128 CALL
luerrm(8,
'(LUSPHE:) all particles back-to-back')
8137 sv(j1,j1)=sm(j1,j1)-
p(
n+i,4)
8146 IF(abs(sv(j1,j2)).LE.smax) goto 190
8155 rl=sv(j1,jb)/sv(ja,jb)
8157 sv(j1,j2)=sv(j1,j2)-rl*sv(ja,j2)
8158 IF(abs(sv(j1,j2)).LE.smax) goto 210
8164 jb2=jb+2-3*((jb+1)/3)
8165 p(
n+i,jb1)=-sv(jc,jb2)
8166 p(
n+i,jb2)=sv(jc,jb1)
8167 p(
n+i,jb)=-(sv(ja,jb1)*
p(
n+i,jb1)+sv(ja,jb2)*
p(
n+i,jb2))/
8169 pa=sqrt(
p(
n+i,1)**2+
p(
n+i,2)**2+
p(
n+i,3)**2)
8170 sgn=(-1.)**int(
rlu(0)+0.5)
8172 p(
n+i,j)=sgn*
p(
n+i,j)/pa
8177 sgn=(-1.)**int(
rlu(0)+0.5)
8178 p(
n+2,1)=sgn*(
p(
n+1,2)*
p(
n+3,3)-
p(
n+1,3)*
p(
n+3,2))
8179 p(
n+2,2)=sgn*(
p(
n+1,3)*
p(
n+3,1)-
p(
n+1,1)*
p(
n+3,3))
8180 p(
n+2,3)=sgn*(
p(
n+1,1)*
p(
n+3,2)-
p(
n+1,2)*
p(
n+3,1))
8194 sph=1.5*(
p(
n+2,4)+
p(
n+3,4))
8198 IF(mstu(43).LE.1) mstu(3)=3
8199 IF(mstu(43).GE.2)
n=
n+3
8210 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
8211 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8212 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
8213 SAVE /lujets/,/ludat1/,/ludat2/
8214 dimension tdi(3),tpr(3)
8220 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 100
8221 IF(mstu(41).GE.2)
THEN
8223 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
8224 & kc.EQ.18) goto 100
8225 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(
k(i,2)).EQ.0)
8228 IF(
n+
np+mstu(44)+15.GE.mstu(4)-mstu(32)-5)
THEN
8229 CALL
luerrm(11,
'(LUTHRU:) no more memory left in LUJETS')
8239 p(
n+
np,4)=sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
8241 IF(abs(paru(42)-1.).GT.0.001)
p(
n+
np,5)=
p(
n+
np,4)**(paru(42)-1.)
8247 CALL
luerrm(8,
'(LUTHRU:) too few particles for analysis')
8259 CALL ludbrb(
n+1,
n+
np+1,0.,-
phi,0d0,0d0,0d0)
8261 CALL ludbrb(
n+1,
n+
np+1,-the,0.,0d0,0d0,0d0)
8265 DO 110 ilf=
n+
np+4,
n+
np+mstu(44)+4
8269 IF(ild.EQ.2)
p(i,4)=sqrt(
p(i,1)**2+
p(i,2)**2)
8270 DO 130 ilf=
n+
np+mstu(44)+3,
n+
np+4,-1
8271 IF(
p(i,4).LE.
p(ilf,4)) goto 140
8283 DO 170 ilg=
n+
np+mstu(44)+5,
n+
np+mstu(44)+15
8286 nc=2**(
min(mstu(44),
np)-1)
8291 DO 200 ilf=1,
min(mstu(44),
np)
8293 IF(2**ilf*((ilc+2**(ilf-1)-1)/2**ilf).GE.ilc) sgn=-sgn
8295 tdi(j)=tdi(j)+sgn*
p(
n+
np+ilf+3,j)
8298 tds=tdi(1)**2+tdi(2)**2+tdi(3)**2
8299 DO 220 ilg=
n+
np+mstu(44)+
min(ilc,10)+4,
n+
np+mstu(44)+5,-1
8300 IF(tds.LE.
p(ilg,4)) goto 230
8319 IF(thp.LE.1e-10) tdi(j)=
p(
n+
np+mstu(44)+4+ilg,j)
8320 IF(thp.GT.1e-10) tdi(j)=tpr(j)
8324 sgn=
sign(
p(i,5),tdi(1)*
p(i,1)+tdi(2)*
p(i,2)+tdi(3)*
p(i,3))
8326 tpr(j)=tpr(j)+sgn*
p(i,j)
8329 thp=sqrt(tpr(1)**2+tpr(2)**2+tpr(3)**2)/ps
8330 IF(thp.GE.thps+paru(48)) goto 270
8333 IF(thp.LT.
p(
n+
np+ild,4)-paru(48).AND.ilg.LT.
min(10,nc)) goto 260
8334 IF(thp.GT.
p(
n+
np+ild,4)+paru(48))
THEN
8336 sgn=(-1.)**int(
rlu(0)+0.5)
8338 p(
n+
np+ild,j)=sgn*tpr(j)/(ps*thp)
8344 IF(iagr.LT.mstu(45).AND.ilg.LT.
min(10,nc)) goto 260
8348 sgn=(-1.)**int(
rlu(0)+0.5)
8354 thp=thp+
p(i,5)*abs(
p(
n+
np+3,1)*
p(i,1)+
p(
n+
np+3,2)*
p(i,2))
8371 CALL ludbrb(
n+1,
n+3,the,
phi,0d0,0d0,0d0)
8375 obl=
p(
n+2,4)-
p(
n+3,4)
8378 IF(mstu(43).LE.1) mstu(3)=3
8379 IF(mstu(43).GE.2)
n=
n+3
8390 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
8391 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8392 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
8393 SAVE /lujets/,/ludat1/,/ludat2/
8395 SAVE nsav,
np,ps,pss,rinit,npre,nrem
8398 r2t(i1,i2)=(
p(i1,5)*
p(i2,5)-
p(i1,1)*
p(i2,1)-
p(i1,2)*
p(i2,2)-
8399 &
p(i1,3)*
p(i2,3))*2.*
p(i1,5)*
p(i2,5)/(0.0001+
p(i1,5)+
p(i2,5))**2
8400 r2m(i1,i2)=2.*
p(i1,4)*
p(i2,4)*(1.-(
p(i1,1)*
p(i2,1)+
p(i1,2)*
8401 &
p(i2,2)+
p(i1,3)*
p(i2,3))/(
p(i1,5)*
p(i2,5)))
8402 r2d(i1,i2)=2.*
min(
p(i1,4),
p(i2,4))**2*(1.-(
p(i1,1)*
p(i2,1)+
8403 &
p(i1,2)*
p(i2,2)+
p(i1,3)*
p(i2,3))/(
p(i1,5)*
p(i2,5)))
8406 IF(mstu(48).LE.0)
THEN
8414 IF(mstu(43).GE.2)
n=
n-njet
8416 p(i,5)=sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
8418 IF(mstu(46).LE.3.OR.mstu(46).EQ.5)
THEN
8421 r2acc=paru(45)*ps(5)**2
8429 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 140
8430 IF(mstu(41).GE.2)
THEN
8432 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
8433 & kc.EQ.18) goto 140
8434 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(
k(i,2)).EQ.0)
8437 IF(
n+2*
np.GE.mstu(4)-mstu(32)-5)
THEN
8438 CALL
luerrm(11,
'(LUCLUS:) no more memory left in LUJETS')
8449 IF(mstu(42).EQ.0)
p(
n+
np,5)=0.
8450 IF(mstu(42).EQ.1.AND.
k(i,2).NE.22)
p(
n+
np,5)=pmas(101,1)
8451 p(
n+
np,4)=sqrt(
p(
n+
np,5)**2+
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
8452 p(
n+
np,5)=sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
8454 ps(j)=ps(j)+
p(
n+
np,j)
8464 ps(5)=sqrt(
max(0.,ps(4)**2-ps(1)**2-ps(2)**2-ps(3)**2))
8467 IF(
np.LT.mstu(47))
THEN
8468 CALL
luerrm(8,
'(LUCLUS:) too few particles for analysis')
8475 IF(mstu(46).LE.3.OR.mstu(46).EQ.5)
THEN
8478 r2acc=paru(45)*ps(5)**2
8481 IF(
np.LE.mstu(47)+2) rinit=0.
8490 IF(mstu(46).LE.2)
THEN
8495 IF(
p(i,5).GT.2.*rinit) goto 210
8499 p(
n+1,j)=
p(
n+1,j)+
p(i,j)
8502 p(
n+1,5)=sqrt(
p(
n+1,1)**2+
p(
n+1,2)**2+
p(
n+1,3)**2)
8503 IF(
p(
n+1,5).GT.2.*rinit) npre=1
8504 IF(rinit.GE.0.2*paru(43).AND.npre+nrem.LT.mstu(47)) goto 170
8505 IF(nrem.EQ.0) goto 170
8512 IF(
k(i,4).NE.0.OR.
p(i,5).LE.pmax) goto 230
8517 p(
n+npre,j)=
p(imax,j)
8523 IF(mstu(46).LE.2)
THEN
8525 IF(
k(i,4).NE.0) goto 260
8527 IF(
r2.GT.rinit**2) goto 260
8531 p(
n+npre,j)=
p(
n+npre,j)+
p(i,j)
8534 p(
n+npre,5)=sqrt(
p(
n+npre,1)**2+
p(
n+npre,2)**2+
p(
n+npre,3)**2)
8542 IF(
k(i,4).NE.0) goto 280
8543 IF(mstu(46).LE.4)
THEN
8548 IF(
r2.GE.r2min) goto 280
8554 p(
n+npre,j)=
p(
n+npre,j)+
p(imin,j)
8556 p(
n+npre,5)=sqrt(
p(
n+npre,1)**2+
p(
n+npre,2)**2+
p(
n+npre,3)**2)
8564 IF(rinit.GE.0.2*paru(43).AND.npre+nrem.LT.mstu(47)) goto 170
8565 IF(nrem.GT.0) goto 220
8571 310
IF(mstu(46).LE.1)
THEN
8579 DO 340 ijet=
n+1,
n+njet
8580 IF(
p(ijet,5).LT.rinit) goto 340
8582 IF(
r2.GE.r2min) goto 340
8588 v(imin,j)=
v(imin,j)+
p(i,j)
8596 p(i,5)=sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
8602 r2min=2.*
max(r2acc,ps(5)**2)
8603 DO 400 itry1=
n+1,
n+njet-1
8604 DO 390 itry2=itry1+1,
n+njet
8605 IF(mstu(46).LE.2)
THEN
8607 ELSEIF(mstu(46).LE.4)
THEN
8612 IF(
r2.GE.r2min) goto 390
8620 IF(njet.GT.mstu(47).AND.r2min.LT.r2acc)
THEN
8621 irec=
min(imin1,imin2)
8622 idel=
max(imin1,imin2)
8624 p(irec,j)=
p(imin1,j)+
p(imin2,j)
8626 p(irec,5)=sqrt(
p(irec,1)**2+
p(irec,2)**2+
p(irec,3)**2)
8627 DO 430 i=idel+1,
n+njet
8632 IF(mstu(46).GE.2)
THEN
8635 IF(iori.EQ.idel)
k(i,4)=irec-
n
8636 IF(iori.GT.idel)
k(i,4)=
k(i,4)-1
8643 ELSEIF(njet.EQ.mstu(47).AND.mstu(46).LE.1.AND.nloop.LE.2)
THEN
8648 k(
n+
k(i,4),5)=
k(
n+
k(i,4),5)+1
8652 IF(
k(i,5).EQ.0) iemp=i
8659 IF(
k(
n+
k(i,4),5).LE.1.OR.
p(i,5).LT.rinit) goto 480
8662 IF(
r2.LE.r2max) goto 480
8670 p(ijet,j)=
p(ijet,j)-
p(ispl,j)
8673 p(ijet,5)=sqrt(
p(ijet,1)**2+
p(ijet,2)**2+
p(ijet,3)**2)
8674 IF(nloop.LE.2) goto 300
8680 IF(mstu(46).LE.1.AND.nloop.LE.2.AND.psjt/pss.GT.tsav+paru(48))
8692 DO 540 inew=
n+1,
n+njet
8694 DO 520 itry=
n+1,
n+njet
8695 IF(
v(itry,4).LE.pemax) goto 520
8714 IF(
k(
k(i,3),1).NE.3)
k(
k(i,3),4)=iori-
n
8715 k(iori,4)=
k(iori,4)+1
8722 p(i,5)=sqrt(
max(
p(i,4)**2-
p(i,5)**2,0.))
8726 IF(
k(i,4).EQ.0) iemp=i
8735 paru(63)=sqrt(r2min)
8736 IF(njet.LE.1) paru(63)=0.
8738 CALL
luerrm(8,
'(LUCLUS:) failed to reconstruct as requested')
8741 IF(mstu(43).LE.1) mstu(3)=njet
8742 IF(mstu(43).GE.2)
n=
n+njet
8754 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
8755 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8756 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
8757 SAVE /lujets/,/ludat1/,/ludat2/
8760 ptlrat=1./sinh(paru(51))**2
8764 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 110
8765 IF(
p(i,1)**2+
p(i,2)**2.LE.ptlrat*
p(i,3)**2) goto 110
8766 IF(mstu(41).GE.2)
THEN
8768 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
8769 & kc.EQ.18) goto 110
8770 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(
k(i,2)).EQ.0)
8774 pt=sqrt(
p(i,1)**2+
p(i,2)**2)
8776 ieta=
max(1,
min(mstu(51),1+int(mstu(51)*0.5*(eta/paru(51)+1.))))
8778 iphi=
max(1,
min(mstu(52),1+int(mstu(52)*0.5*(
phi/paru(1)+1.))))
8779 ietph=mstu(52)*ieta+iphi
8783 IF(ietph.EQ.
k(ic,3))
THEN
8789 IF(nc.GE.mstu(4)-mstu(32)-5)
THEN
8790 CALL
luerrm(11,
'(LUCELL:) no more memory left in LUJETS')
8798 p(nc,1)=(paru(51)/mstu(51))*(2*ieta-1-mstu(51))
8799 p(nc,2)=(paru(1)/mstu(52))*(2*iphi-1-mstu(52))
8804 IF(mstu(53).GE.1)
THEN
8807 IF(mstu(53).EQ.2) pei=
p(ic,5)*cosh(
p(ic,1))
8808 120 pef=pei+paru(55)*sqrt(-2.*
log(
max(1e-10,
rlu(0)))*pei)*
8810 IF(pef.LT.0..OR.pef.GT.paru(56)*pei) goto 120
8812 IF(mstu(53).EQ.2)
p(ic,5)=pef/cosh(
p(ic,1))
8817 IF(paru(58).GT.0.)
THEN
8821 IF(
p(ic,5).GT.paru(58))
THEN
8837 IF(
k(ic,5).NE.2) goto 160
8838 IF(
p(ic,5).LE.etmax) goto 160
8844 IF(etmax.LT.paru(52)) goto 220
8845 IF(nj.GE.mstu(4)-mstu(32)-5)
THEN
8846 CALL
luerrm(11,
'(LUCELL:) no more memory left in LUJETS')
8862 IF(
k(ic,5).EQ.0) goto 170
8863 IF(abs(
p(ic,1)-eta).GT.paru(54)) goto 170
8864 dphia=abs(
p(ic,2)-
phi)
8865 IF(dphia.GT.paru(54).AND.dphia.LT.paru(2)-paru(54)) goto 170
8867 IF(dphia.GT.paru(1)) phic=phic+
sign(paru(2),
phi)
8868 IF((
p(ic,1)-eta)**2+(phic-
phi)**2.GT.paru(54)**2) goto 170
8870 k(nj,4)=
k(nj,4)+
k(ic,4)
8871 p(nj,3)=
p(nj,3)+
p(ic,5)*
p(ic,1)
8872 p(nj,4)=
p(nj,4)+
p(ic,5)*phic
8873 p(nj,5)=
p(nj,5)+
p(ic,5)
8877 IF(
p(nj,5).LT.paru(53))
THEN
8880 IF(
k(ic,5).LT.0)
k(ic,5)=-
k(ic,5)
8882 ELSEIF(mstu(54).LE.2)
THEN
8883 p(nj,3)=
p(nj,3)/
p(nj,5)
8884 p(nj,4)=
p(nj,4)/
p(nj,5)
8885 IF(abs(
p(nj,4)).GT.paru(1))
p(nj,4)=
p(nj,4)-
sign(paru(2),
8888 IF(
k(ic,5).LT.0)
k(ic,5)=0
8895 IF(
k(ic,5).GE.0) goto 210
8896 p(nj,1)=
p(nj,1)+
p(ic,5)*
cos(
p(ic,2))
8897 p(nj,2)=
p(nj,2)+
p(ic,5)*sin(
p(ic,2))
8898 p(nj,3)=
p(nj,3)+
p(ic,5)*sinh(
p(ic,1))
8899 p(nj,4)=
p(nj,4)+
p(ic,5)*cosh(
p(ic,1))
8906 220
DO 250 i=1,nj-nc
8909 IF(
k(ij,5).EQ.0) goto 230
8910 IF(
p(ij,5).LT.etmax) goto 230
8928 IF(mstu(54).EQ.2)
THEN
8931 p(i,1)=
p(i,5)*
cos(
p(i,4))
8932 p(i,2)=
p(i,5)*sin(
p(i,4))
8933 p(i,3)=
p(i,5)*sinh(eta)
8934 p(i,4)=
p(i,5)*cosh(eta)
8937 ELSEIF(mstu(54).GE.3)
THEN
8939 p(i,5)=sqrt(
max(0.,
p(i,4)**2-
p(i,1)**2-
p(i,2)**2-
p(i,3)**2))
8947 IF(mstu(43).LE.1) mstu(3)=njet
8948 IF(mstu(43).GE.2)
n=
n+njet
8959 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
8960 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8961 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
8962 SAVE /lujets/,/ludat1/,/ludat2/
8963 dimension sm(3,3),sax(3),ps(3,5)
8979 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 170
8980 IF(mstu(41).GE.2)
THEN
8982 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
8983 & kc.EQ.18) goto 170
8984 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(
k(i,2)).EQ.0)
8987 IF(
n+
np+1.GE.mstu(4)-mstu(32)-5)
THEN
8988 CALL
luerrm(11,
'(LUJMAS:) no more memory left in LUJETS')
8997 IF(mstu(42).EQ.0)
p(
n+
np,5)=0.
8998 IF(mstu(42).EQ.1.AND.
k(i,2).NE.22)
p(
n+
np,5)=pmas(101,1)
8999 p(
n+
np,4)=sqrt(
p(
n+
np,5)**2+
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
9004 sm(j1,j2)=sm(j1,j2)+
p(i,j1)*
p(i,j2)
9007 pss=pss+(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
9009 ps(3,j)=ps(3,j)+
p(
n+
np,j)
9015 CALL
luerrm(8,
'(LUJMAS:) too few particles for analysis')
9020 paru(61)=sqrt(
max(0.,ps(3,4)**2-ps(3,1)**2-ps(3,2)**2-ps(3,3)**2))
9025 sm(j1,j2)=sm(j1,j2)/pss
9028 sq=(sm(1,1)*sm(2,2)+sm(1,1)*sm(3,3)+sm(2,2)*sm(3,3)-sm(1,2)**2-
9029 &sm(1,3)**2-sm(2,3)**2)/3.-1./9.
9030 sr=-0.5*(sq+1./9.+sm(1,1)*sm(2,3)**2+sm(2,2)*sm(1,3)**2+sm(3,3)*
9031 &sm(1,2)**2-sm(1,1)*sm(2,2)*sm(3,3))+sm(1,2)*sm(1,3)*sm(2,3)+1./27.
9033 sma=1./3.+sqrt(-sq)*
max(2.*
sp,sqrt(3.*(1.-
sp**2))-
sp)
9037 sm(j1,j1)=sm(j1,j1)-sma
9045 IF(abs(sm(j1,j2)).LE.smax) goto 220
9054 rl=sm(j1,jb)/sm(ja,jb)
9056 sm(j1,j2)=sm(j1,j2)-rl*sm(ja,j2)
9057 IF(abs(sm(j1,j2)).LE.smax) goto 240
9063 jb2=jb+2-3*((jb+1)/3)
9064 sax(jb1)=-sm(jc,jb2)
9066 sax(jb)=-(sm(ja,jb1)*sax(jb1)+sm(ja,jb2)*sax(jb2))/sm(ja,jb)
9070 psax=
p(i,1)*sax(1)+
p(i,2)*sax(2)+
p(i,3)*sax(3)
9075 ps(
is,j)=ps(
is,j)+
p(i,j)
9078 pms=
max(1e-10,ps(1,4)**2-ps(1,1)**2-ps(1,2)**2-ps(1,3)**2)+
9079 &
max(1e-10,ps(2,4)**2-ps(2,1)**2-ps(2,2)**2-ps(2,3)**2)
9085 ps(3,j)=ps(1,j)-ps(2,j)
9088 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)
9089 IF(
k(i,3).EQ.1) pmdi=2.*(
p(i,5)**2-pps)
9090 IF(
k(i,3).EQ.2) pmdi=2.*(
p(i,5)**2+pps)
9091 IF(pmdi.LT.pmd)
THEN
9098 IF(pmd.LT.-paru(48)*pms)
THEN
9102 ps(
is,j)=ps(
is,j)-
p(im,j)
9103 ps(3-
is,j)=ps(3-
is,j)+
p(im,j)
9112 ps(1,5)=sqrt(
max(0.,ps(1,4)**2-ps(1,1)**2-ps(1,2)**2-ps(1,3)**2))
9113 ps(2,5)=sqrt(
max(0.,ps(2,4)**2-ps(2,1)**2-ps(2,2)**2-ps(2,3)**2))
9114 pmh=
max(ps(1,5),ps(2,5))
9115 pml=
min(ps(1,5),ps(2,5))
9125 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
9126 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9127 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
9128 SAVE /lujets/,/ludat1/,/ludat2/
9135 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 110
9136 IF(mstu(41).GE.2)
THEN
9138 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
9139 & kc.EQ.18) goto 110
9140 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(
k(i,2)).EQ.0)
9143 IF(
n+
np.GE.mstu(4)-mstu(32)-5)
THEN
9144 CALL
luerrm(11,
'(LUFOWO:) no more memory left in LUJETS')
9155 p(
n+
np,4)=sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
9163 CALL
luerrm(8,
'(LUFOWO:) too few particles for analysis')
9178 cthe=(
p(i1,1)*
p(i2,1)+
p(i1,2)*
p(i2,2)+
p(i1,3)*
p(i2,3))/
9180 h10=h10+
p(i1,4)*
p(i2,4)*cthe
9181 h20=h20+
p(i1,4)*
p(i2,4)*(1.5*cthe**2-0.5)
9182 h30=h30+
p(i1,4)*
p(i2,4)*(2.5*cthe**3-1.5*cthe)
9183 h40=h40+
p(i1,4)*
p(i2,4)*(4.375*cthe**4-3.75*cthe**2+0.375)
9205 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
9206 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9207 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
9208 common/ludat3/
mdcy(500,3),
mdme(2000,2),
brat(2000),kfdp(2000,5)
9209 SAVE /lujets/,/ludat1/,/ludat2/,/ludat3/
9210 dimension kfis(100,2),npis(100,0:10),kffs(400),npfs(400,4),
9211 &fevfm(10,4),fm1fm(3,10,4),fm2fm(3,10,4),fmoma(4),fmoms(4),
9212 &fevee(50),fe1ec(50),fe2ec(50),fe1ea(25),fe2ea(25),
9213 &kfdm(8),kfdc(200,0:8),npdc(200)
9214 SAVE nevis,nkfis,kfis,npis,nevfs,nprfs,nfifs,nchfs,nkffs,
9215 &kffs,npfs,nevfm,nmufm,fm1fm,fm2fm,nevee,fe1ec,fe2ec,fe1ea,
9216 &fe2ea,nevdc,nkfdc,nredc,kfdc,npdc
9217 CHARACTER chau*16,chis(2)*12,chdc(8)*12
9218 DATA nevis/0/,nkfis/0/,nevfs/0/,nprfs/0/,nfifs/0/,nchfs/0/,
9219 &nkffs/0/,nevfm/0/,nmufm/0/,fm1fm/120*0./,fm2fm/120*0./,
9220 &nevee/0/,fe1ec/50*0./,fe2ec/50*0./,fe1ea/25*0./,fe2ea/25*0./,
9221 &nevdc/0/,nkfdc/0/,nredc/0/
9224 IF(mtabu.EQ.10)
THEN
9229 ELSEIF(mtabu.EQ.11)
THEN
9231 kfm1=2*iabs(mstu(161))
9232 IF(mstu(161).GT.0) kfm1=kfm1-1
9233 kfm2=2*iabs(mstu(162))
9234 IF(mstu(162).GT.0) kfm2=kfm2-1
9238 IF(kfmn.EQ.kfis(i,1).AND.kfmx.EQ.kfis(i,2))
THEN
9241 ELSEIF(kfmn.LT.kfis(i,1).OR.(kfmn.EQ.kfis(i,1).AND.
9242 & kfmx.LT.kfis(i,2)))
THEN
9248 110
IF(ikfis.LT.0)
THEN
9251 IF(nkfis.GE.100)
RETURN
9252 DO 130 i=nkfis,ikfis,-1
9253 kfis(i+1,1)=kfis(i,1)
9254 kfis(i+1,2)=kfis(i,2)
9256 npis(i+1,j)=npis(i,j)
9266 npis(ikfis,0)=npis(ikfis,0)+1
9271 IF(
k(i,1).LE.0.OR.
k(i,1).GT.12)
THEN
9272 ELSEIF(iabs(
k(i,2)).GT.80.AND.iabs(
k(i,2)).LE.100)
THEN
9273 ELSEIF(iabs(
k(i,2)).GT.100.AND.mod(iabs(
k(i,2))/10,10).NE.0)
9278 IF(im.LE.0.OR.im.GT.
n)
THEN
9280 ELSEIF(
k(im,1).LE.0.OR.
k(im,1).GT.20)
THEN
9282 ELSEIF(iabs(
k(im,2)).GT.80.AND.iabs(
k(im,2)).LE.100)
THEN
9283 ELSEIF(iabs(
k(im,2)).GT.100.AND.mod(iabs(
k(im,2))/10,10).NE.0)
9295 IF(
np.GE.26) npco=10
9296 npis(ikfis,npco)=npis(ikfis,npco)+1
9300 ELSEIF(mtabu.EQ.12)
THEN
9302 WRITE(mstu(11),5000) nevis
9305 IF(kfmn.EQ.0) kfmn=kfis(i,2)
9307 IF(2*kfm1.EQ.kfmn) kfm1=-kfm1
9310 IF(chau(13:13).NE.
' ') chis(1)(12:12)=
'?'
9312 IF(kfis(i,1).EQ.0) kfmx=0
9314 IF(2*kfm2.EQ.kfmx) kfm2=-kfm2
9317 IF(chau(13:13).NE.
' ') chis(2)(12:12)=
'?'
9318 WRITE(mstu(11),5100) chis(1),chis(2),fac*npis(i,0),
9319 & (npis(i,j)/float(npis(i,0)),j=1,10)
9323 ELSEIF(mtabu.EQ.13)
THEN
9327 IF(kfmn.EQ.0) kfmn=kfis(i,2)
9329 IF(2*kfm1.EQ.kfmn) kfm1=-kfm1
9331 IF(kfis(i,1).EQ.0) kfmx=0
9333 IF(2*kfm2.EQ.kfmx) kfm2=-kfm2
9340 p(i,j)=fac*npis(i,j)
9341 v(i,j)=fac*npis(i,j+5)
9356 ELSEIF(mtabu.EQ.20)
THEN
9364 ELSEIF(mtabu.EQ.21)
THEN
9368 IF(
k(i,1).LE.0.OR.
k(i,1).GT.20.OR.
k(i,1).EQ.13) goto 260
9372 IF(
k(i,3).LE.0.OR.
k(i,3).GT.
n)
THEN
9374 ELSEIF(
k(
k(i,3),1).LE.0.OR.
k(
k(i,3),1).GT.20)
THEN
9376 ELSEIF(
k(
k(i,3),2).GE.91.AND.
k(
k(i,3),2).LE.93)
THEN
9378 ELSEIF(kc.EQ.0)
THEN
9379 ELSEIF(
k(
k(i,3),1).EQ.13)
THEN
9381 IF(im.LE.0.OR.im.GT.
n)
THEN
9383 ELSEIF(
k(im,1).LE.0.OR.
k(im,1).GT.20)
THEN
9386 ELSEIF(kchg(kc,2).EQ.0)
THEN
9389 IF(kchg(kcm,2).NE.0) mpri=1
9392 IF(kc.NE.0.AND.mpri.EQ.1)
THEN
9393 IF(kchg(kc,2).EQ.0) nprfs=nprfs+1
9395 IF(
k(i,1).LE.10)
THEN
9397 IF(
luchge(
k(i,2)).NE.0) nchfs=nchfs+1
9402 kfs=3-isign(1,
k(i,2))-mpri
9404 IF(kfa.EQ.kffs(
ip))
THEN
9407 ELSEIF(kfa.LT.kffs(
ip))
THEN
9413 220
IF(ikffs.LT.0)
THEN
9416 IF(nkffs.GE.400)
RETURN
9417 DO 240
ip=nkffs,ikffs,-1
9420 npfs(
ip+1,j)=npfs(
ip,j)
9429 npfs(ikffs,kfs)=npfs(ikffs,kfs)+1
9433 ELSEIF(mtabu.EQ.22)
THEN
9435 WRITE(mstu(11),5200) nevfs,fac*nprfs,fac*nfifs,fac*nchfs
9437 CALL
luname(kffs(i),chau)
9440 IF(kc.NE.0) mdcyf=
mdcy(kc,1)
9441 WRITE(mstu(11),5300) kffs(i),chau,mdcyf,(fac*npfs(i,j),j=1,4),
9442 & fac*(npfs(i,1)+npfs(i,2)+npfs(i,3)+npfs(i,4))
9446 ELSEIF(mtabu.EQ.23)
THEN
9453 k(i,5)=npfs(i,1)+npfs(i,2)+npfs(i,3)+npfs(i,4)
9455 p(i,j)=fac*npfs(i,j)
9476 ELSEIF(mtabu.EQ.30)
THEN
9489 ELSEIF(mtabu.EQ.31)
THEN
9494 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 410
9495 IF(mstu(41).GE.2)
THEN
9497 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
9498 & kc.EQ.18) goto 410
9499 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(
k(i,2)).EQ.0)
9503 IF(mstu(42).EQ.1.AND.
k(i,2).NE.22) pmr=
ulmass(211)
9504 IF(mstu(42).GE.2) pmr=
p(i,5)
9505 pr=
max(1e-20,pmr**2+
p(i,1)**2+
p(i,2)**2)
9506 yeta=
sign(
log(
min((sqrt(pr+
p(i,3)**2)+abs(
p(i,3)))/sqrt(pr),
9508 IF(abs(yeta).GT.paru(57)) goto 410
9510 iyeta=512.*(yeta+paru(57))/(2.*paru(57))
9511 iyeta=
max(0,
min(511,iyeta))
9512 iphi=512.*(
phi+paru(1))/paru(2)
9513 iphi=
max(0,
min(511,iphi))
9516 iyep=iyep+4**ib*(2*mod(iyeta/2**ib,2)+mod(iphi/2**ib,2))
9520 IF(nupp.GT.mstu(4)-5-mstu(32))
THEN
9521 CALL
luerrm(11,
'(LUTABU:) no more memory left in LUJETS')
9525 IF(nupp.EQ.nlow+1)
THEN
9530 DO 350 i1=nupp-1,nlow+1,-1
9531 IF(iyeta.GE.
k(i1,1)) goto 360
9535 DO 370 i1=nupp-1,nlow+1,-1
9536 IF(iphi.GE.
k(i1,2)) goto 380
9540 DO 390 i1=nupp-1,nlow+1,-1
9541 IF(iyep.GE.
k(i1,3)) goto 400
9559 IF(im.LE.2) ibin=2**(10-ib)
9560 IF(im.EQ.3) ibin=4**(10-ib)
9561 iagr=
k(nlow+1,im)/ibin
9563 DO 440 i=nlow+2,nupp+1
9565 IF(icut.EQ.iagr)
THEN
9569 ELSEIF(nagr.EQ.2)
THEN
9570 fevfm(ib,1)=fevfm(ib,1)+2.
9571 ELSEIF(nagr.EQ.3)
THEN
9572 fevfm(ib,1)=fevfm(ib,1)+6.
9573 fevfm(ib,2)=fevfm(ib,2)+6.
9574 ELSEIF(nagr.EQ.4)
THEN
9575 fevfm(ib,1)=fevfm(ib,1)+12.
9576 fevfm(ib,2)=fevfm(ib,2)+24.
9577 fevfm(ib,3)=fevfm(ib,3)+24.
9579 fevfm(ib,1)=fevfm(ib,1)+nagr*(nagr-1.)
9580 fevfm(ib,2)=fevfm(ib,2)+nagr*(nagr-1.)*(nagr-2.)
9581 fevfm(ib,3)=fevfm(ib,3)+nagr*(nagr-1.)*(nagr-2.)*(nagr-3.)
9582 fevfm(ib,4)=fevfm(ib,4)+nagr*(nagr-1.)*(nagr-2.)*(nagr-3.)*
9594 IF(fevfm(1,
ip).LT.0.5)
THEN
9596 ELSEIF(im.LE.2)
THEN
9597 fevfm(ib,
ip)=2.**((ib-1)*
ip)*fevfm(ib,
ip)/fevfm(1,
ip)
9599 fevfm(ib,
ip)=4.**((ib-1)*
ip)*fevfm(ib,
ip)/fevfm(1,
ip)
9601 fm1fm(im,ib,
ip)=fm1fm(im,ib,
ip)+fevfm(ib,
ip)
9602 fm2fm(im,ib,
ip)=fm2fm(im,ib,
ip)+fevfm(ib,
ip)**2
9606 nmufm=nmufm+(nupp-nlow)
9610 ELSEIF(mtabu.EQ.32)
THEN
9612 IF(mstu(42).LE.0)
WRITE(mstu(11),5400) nevfm,
'eta'
9613 IF(mstu(42).EQ.1)
WRITE(mstu(11),5400) nevfm,
'ypi'
9614 IF(mstu(42).GE.2)
WRITE(mstu(11),5400) nevfm,
'y '
9616 WRITE(mstu(11),5500)
9619 IF(im.NE.2) byeta=byeta/2**(ib-1)
9621 IF(im.NE.1) bphi=bphi/2**(ib-1)
9622 IF(im.LE.2) bnave=fac*nmufm/float(2**(ib-1))
9623 IF(im.EQ.3) bnave=fac*nmufm/float(4**(ib-1))
9625 fmoma(
ip)=fac*fm1fm(im,ib,
ip)
9626 fmoms(
ip)=sqrt(
max(0.,fac*(fac*fm2fm(im,ib,
ip)-fmoma(
ip)**2)))
9628 WRITE(mstu(11),5600) byeta,bphi,bnave,(fmoma(
ip),fmoms(
ip),
9634 ELSEIF(mtabu.EQ.33)
THEN
9642 IF(im.NE.2)
k(i,3)=2**(ib-1)
9644 IF(im.NE.1)
k(i,4)=2**(ib-1)
9646 p(i,1)=2.*paru(57)/
k(i,3)
9647 v(i,1)=paru(2)/
k(i,4)
9649 p(i,
ip+1)=fac*fm1fm(im,ib,
ip)
9650 v(i,
ip+1)=sqrt(
max(0.,fac*(fac*fm2fm(im,ib,
ip)-
p(i,
ip+1)**2)))
9666 ELSEIF(mtabu.EQ.40)
THEN
9678 ELSEIF(mtabu.EQ.41)
THEN
9684 IF(
k(i,1).LE.0.OR.
k(i,1).GT.10) goto 570
9685 IF(mstu(41).GE.2)
THEN
9687 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
9688 & kc.EQ.18) goto 570
9689 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(
k(i,2)).EQ.0)
9693 IF(mstu(42).EQ.1.AND.
k(i,2).NE.22) pmr=
ulmass(211)
9694 IF(mstu(42).GE.2) pmr=
p(i,5)
9695 IF(nupp.GT.mstu(4)-5-mstu(32))
THEN
9696 CALL
luerrm(11,
'(LUTABU:) no more memory left in LUJETS')
9703 p(nupp,4)=sqrt(pmr**2+
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
9704 p(nupp,5)=
max(1e-10,sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2))
9707 IF(nupp.EQ.nlow)
RETURN
9710 fac=(2./ecm**2)*50./paru(1)
9714 DO 600 i1=nlow+2,nupp
9715 DO 590 i2=nlow+1,i1-1
9716 cthe=(
p(i1,1)*
p(i2,1)+
p(i1,2)*
p(i2,2)+
p(i1,3)*
p(i2,3))/
9718 the=acos(
max(-1.,
min(1.,cthe)))
9719 ithe=
max(1,
min(50,1+int(50.*the/paru(1))))
9720 fevee(ithe)=fevee(ithe)+fac*
p(i1,4)*
p(i2,4)
9724 fe1ec(j)=fe1ec(j)+fevee(j)
9725 fe2ec(j)=fe2ec(j)+fevee(j)**2
9726 fe1ec(51-j)=fe1ec(51-j)+fevee(51-j)
9727 fe2ec(51-j)=fe2ec(51-j)+fevee(51-j)**2
9728 fe1ea(j)=fe1ea(j)+(fevee(51-j)-fevee(j))
9729 fe2ea(j)=fe2ea(j)+(fevee(51-j)-fevee(j))**2
9734 ELSEIF(mtabu.EQ.42)
THEN
9736 WRITE(mstu(11),5700) nevee
9739 fees1=sqrt(
max(0.,fac*(fac*fe2ec(j)-feec1**2)))
9740 feec2=fac*fe1ec(51-j)
9741 fees2=sqrt(
max(0.,fac*(fac*fe2ec(51-j)-feec2**2)))
9743 feesa=sqrt(
max(0.,fac*(fac*fe2ea(j)-feeca**2)))
9744 WRITE(mstu(11),5800) 3.6*(j-1),3.6*j,feec1,fees1,feec2,fees2,
9749 ELSEIF(mtabu.EQ.43)
THEN
9758 v(i,1)=sqrt(
max(0.,fac*(fac*fe2ec(i)-
p(i,1)**2)))
9759 p(i,2)=fac*fe1ec(51-i)
9760 v(i,2)=sqrt(
max(0.,fac*(fac*fe2ec(51-i)-
p(i,2)**2)))
9762 v(i,3)=sqrt(
max(0.,fac*(fac*fe2ea(i)-
p(i,3)**2)))
9763 p(i,4)=paru(1)*(i-1)/50.
9764 p(i,5)=paru(1)*i/50.
9780 ELSEIF(mtabu.EQ.50)
THEN
9786 ELSEIF(mtabu.EQ.51)
THEN
9790 IF(
k(i,1).LE.0.OR.
k(i,1).GE.6) goto 670
9797 IF(
k(i,2).LT.0) kfm=kfm-1
9798 DO 650 ids=nds-1,1,-1
9800 IF(kfm.LT.kfdm(ids)) goto 660
9801 kfdm(ids+1)=kfdm(ids)
9809 IF(nds.LT.kfdc(idc,0))
THEN
9812 ELSEIF(nds.EQ.kfdc(idc,0))
THEN
9814 IF(kfdm(i).LT.kfdc(idc,i))
THEN
9817 ELSEIF(kfdm(i).GT.kfdc(idc,i))
THEN
9826 700
IF(ikfdc.LT.0)
THEN
9828 ELSEIF(nkfdc.GE.200)
THEN
9832 DO 720 idc=nkfdc,ikfdc,-1
9833 npdc(idc+1)=npdc(idc)
9835 kfdc(idc+1,i)=kfdc(idc,i)
9841 kfdc(ikfdc,i)=kfdm(i)
9845 npdc(ikfdc)=npdc(ikfdc)+1
9848 ELSEIF(mtabu.EQ.52)
THEN
9850 WRITE(mstu(11),5900) nevdc
9852 DO 740 i=1,kfdc(idc,0)
9855 IF(2*kf.NE.kfm) kf=-kf
9858 IF(chau(13:13).NE.
' ') chdc(i)(12:12)=
'?'
9860 WRITE(mstu(11),6000) fac*npdc(idc),(chdc(i),i=1,kfdc(idc,0))
9862 IF(nredc.NE.0)
WRITE(mstu(11),6100) fac*nredc
9865 ELSEIF(mtabu.EQ.53)
THEN
9872 k(idc,5)=kfdc(idc,0)
9877 DO 770 i=1,kfdc(idc,0)
9880 IF(2*kf.NE.kfm) kf=-kf
9881 IF(i.LE.5)
p(idc,i)=kf
9882 IF(i.GE.6)
v(idc,i-5)=kf
9884 v(idc,5)=fac*npdc(idc)
9900 5000
FORMAT(///20
x,
'Event statistics - initial state'/
9901 &20
x,
'based on an analysis of ',i6,
' events'//
9902 &3
x,
'Main flavours after',8
x,
'Fraction',4
x,
'Subfractions ',
9903 &
'according to fragmenting system multiplicity'/
9904 &4
x,
'hard interaction',24
x,
'1',7
x,
'2',7
x,
'3',7
x,
'4',7
x,
'5',
9905 &6
x,
'6-7',5
x,
'8-10',3
x,
'11-15',3
x,
'16-25',4
x,
'>25'/)
9906 5100
FORMAT(3
x,a12,1
x,a12,f10.5,1
x,10f8.4)
9907 5200
FORMAT(///20
x,
'Event statistics - final state'/
9908 &20
x,
'based on an analysis of ',i7,
' events'//
9909 &5
x,
'Mean primary multiplicity =',f10.4/
9910 &5
x,
'Mean final multiplicity =',f10.4/
9911 &5
x,
'Mean charged multiplicity =',f10.4//
9912 &5
x,
'Number of particles produced per event (directly and via ',
9913 &
'decays/branchings)'/
9914 &5
x,
'KF Particle/jet MDCY',10
x,
'Particles',13
x,
'Antiparticles',
9915 &8
x,
'Total'/35
x,
'prim seco prim seco'/)
9916 5300
FORMAT(1
x,i6,4
x,a16,i2,5(1
x,f11.6))
9917 5400
FORMAT(///20
x,
'Factorial moments analysis of multiplicity'/
9918 &20
x,
'based on an analysis of ',i6,
' events'//
9919 &3
x,
'delta-',
a3,
' delta-phi <n>/bin',10
x,
'<F2>',18
x,
'<F3>',
9920 &18
x,
'<F4>',18
x,
'<F5>'/35
x,4(
' value error '))
9922 5600
FORMAT(2
x,2f10.4,f12.4,4(f12.4,f10.4))
9923 5700
FORMAT(///20
x,
'Energy-Energy Correlation and Asymmetry'/
9924 &20
x,
'based on an analysis of ',i6,
' events'//
9925 &2
x,
'theta range',8
x,
'EEC(theta)',8
x,
'EEC(180-theta)',7
x,
9926 &
'EECA(theta)'/2
x,
'in degrees ',3(
' value error')/)
9927 5800
FORMAT(2
x,f4.1,
' - ',f4.1,3(f11.4,f9.4))
9928 5900
FORMAT(///20
x,
'Decay channel analysis - final state'/
9929 &20
x,
'based on an analysis of ',i6,
' events'//
9930 &2
x,
'Probability',10
x,
'Complete final state'/)
9931 6000
FORMAT(2
x,f9.5,5
x,8(a12,1
x))
9932 6100
FORMAT(2
x,f9.5,5
x,
'into other channels (more than 8 particles ',
9933 &
'or table overflow)')
9943 IMPLICIT DOUBLE PRECISION(
d)
9944 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
9945 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9946 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
9947 SAVE /lujets/,/ludat1/,/ludat2/
9950 IF(mstu(12).GE.1) CALL
lulist(0)
9951 IF(kfl.LT.0.OR.kfl.GT.8)
THEN
9952 CALL
luerrm(16,
'(LUEEVT:) called with unknown flavour code')
9953 IF(mstu(21).GE.1)
RETURN
9955 IF(kfl.LE.5) ecmmin=parj(127)+2.02*parf(100+
max(1,kfl))
9956 IF(kfl.GE.6) ecmmin=parj(127)+2.02*pmas(kfl,1)
9957 IF(ecm.LT.ecmmin)
THEN
9958 CALL
luerrm(16,
'(LUEEVT:) called with too small CM energy')
9959 IF(mstu(21).GE.1)
RETURN
9963 IF(mstj(109).EQ.2.AND.mstj(110).NE.1)
THEN
9965 &
'(LUEEVT:) MSTJ(109) value requires MSTJ(110) = 1')
9968 IF(mstj(109).EQ.2.AND.mstj(111).NE.0)
THEN
9970 &
'(LUEEVT:) MSTJ(109) value requires MSTJ(111) = 0')
9976 IF(mstj(108).EQ.2.AND.(mstj(101).EQ.0.OR.mstj(101).EQ.1))
9979 IF(mstu(111).EQ.2) paru(112)=parj(122)
9980 IF(mstj(116).GT.0.AND.(mstj(116).GE.2.OR.abs(ecm-parj(151)).GE.
9981 &parj(139).OR.10*mstj(102)+kfl.NE.mstj(119))) CALL
luxtot(kfl,ecm,
9983 IF(mstj(116).GE.3) mstj(116)=1
9989 IF(ntry.GT.100)
THEN
9990 CALL
luerrm(14,
'(LUEEVT:) caught in an infinite loop')
9995 IF(mstj(115).GE.2)
THEN
9997 CALL
lu1ent(nc-1,11,0.5*ecm,0.,0.)
9999 CALL
lu1ent(nc,-11,0.5*ecm,paru(1),0.)
10006 IF(mstj(107).GE.1.AND.mstj(116).GE.1) CALL
luradk(ecm,mk,pak,
10008 IF(mk.EQ.1) ecmc=sqrt(ecm*(ecm-2.*pak))
10009 IF(mstj(115).GE.1.AND.mk.EQ.1)
THEN
10011 CALL
lu1ent(nc,22,pak,thek,phik)
10012 k(nc,3)=
min(mstj(115)/2,1)
10016 IF(mstj(115).GE.3)
THEN
10019 IF(mstj(102).EQ.2) kf=23
10023 CALL
lu1ent(nc,kf,ecmc,0.,0.)
10030 CALL
luxkfl(kfl,ecm,ecmc,kflc)
10031 IF(kflc.EQ.0) goto 100
10032 CALL
luxjet(ecmc,njet,cut)
10034 IF(njet.EQ.4) CALL
lux4jt(njet,cut,kflc,ecmc,kfln,x1,
x2,x4,
10036 IF(njet.EQ.3) CALL
lux3jt(njet,cut,kflc,ecmc,x1,
x3)
10037 IF(njet.EQ.2) mstj(120)=1
10040 IF(njet.EQ.2.AND.mstj(101).NE.5) CALL
lu2ent(nc+1,kflc,-kflc,ecmc)
10041 IF(njet.EQ.2.AND.mstj(101).EQ.5) CALL
lu2ent(-(nc+1),kflc,-kflc,
10043 IF(njet.EQ.3) CALL
lu3ent(nc+1,kflc,21,-kflc,ecmc,x1,
x3)
10044 IF(njet.EQ.4.AND.kfln.EQ.21) CALL
lu4ent(nc+1,kflc,kfln,kfln,
10045 &-kflc,ecmc,x1,
x2,x4,x12,x14)
10046 IF(njet.EQ.4.AND.kfln.NE.21) CALL
lu4ent(nc+1,kflc,-kfln,kfln,
10047 &-kflc,ecmc,x1,
x2,x4,x12,x14)
10048 IF(mstu(24).NE.0) goto 100
10050 k(
ip,3)=
k(
ip,3)+
min(mstj(115)/2,1)+(mstj(115)/3)*(nc-1)
10054 IF(mstj(106).EQ.1)
THEN
10055 CALL
luxdif(nc,njet,kflc,ecmc,chi,the,
phi)
10056 CALL ludbrb(nc+1,
n,0.,chi,0d0,0d0,0d0)
10057 CALL ludbrb(nc+1,
n,the,
phi,0d0,0d0,0d0)
10062 dbek=-pak/(ecm-pak)
10063 nmin=nc+1-mstj(115)/3
10064 CALL ludbrb(nmin,
n,0.,-phik,0d0,0d0,0d0)
10065 CALL ludbrb(nmin,
n,alpk,0.,dbek*sin(thek),0d0,dbek*
cos(thek))
10066 CALL ludbrb(nmin,
n,0.,phik,0d0,0d0,0d0)
10070 IF(mstj(101).EQ.5)
THEN
10073 IF(mstj(105).EQ.-1) mstj(14)=-1
10074 IF(mstj(105).GE.0) mstu(28)=0
10077 IF(mstj(105).GE.0.AND.mstu(28).NE.0) goto 100
10081 IF(mstj(105).EQ.1) CALL
luexec
10094 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10095 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
10096 SAVE /ludat1/,/ludat2/
10100 mstj(119)=10*mstj(102)+kfl
10101 IF(mstj(111).EQ.0)
THEN
10103 ELSEIF(mstu(111).EQ.0)
THEN
10104 parj(168)=
min(1.,
max(parj(128),exp(-12.*paru(1)/
10105 & ((33.-2.*mstu(112))*paru(111)))))
10106 q2r=parj(168)*ecm**2
10108 parj(168)=
min(1.,
max(parj(128),paru(112)/ecm,
10109 & (2.*paru(112)/ecm)**2))
10110 q2r=parj(168)*ecm**2
10112 alspi=
ulalps(q2r)/paru(1)
10115 IF(mstj(101).EQ.0.OR.mstj(109).EQ.1)
THEN
10117 ELSEIF(iabs(mstj(101)).EQ.1.AND.mstj(109).EQ.0)
THEN
10119 ELSEIF(mstj(109).EQ.0)
THEN
10120 rqcd=1.+alspi+(1.986-0.115*mstu(118))*alspi**2
10121 IF(mstj(111).EQ.1) rqcd=
max(1.,rqcd+(33.-2.*mstu(112))/12.*
10122 &
log(parj(168))*alspi**2)
10123 ELSEIF(iabs(mstj(101)).EQ.1)
THEN
10124 rqcd=1.+(3./4.)*alspi
10126 rqcd=1.+(3./4.)*alspi-(3./32.+0.519*mstu(118))*alspi**2
10130 IF(mstj(102).GE.3)
THEN
10131 rva=3.*(3.+(4.*paru(102)-1.)**2)+6.*rqcd*(2.+(1.-8.*paru(102)/
10132 & 3.)**2+(4.*paru(102)/3.-1.)**2)
10135 IF(mod(mstj(103),2).EQ.1) vq=sqrt(
max(0.,1.-(2.*
ulmass(kflc)/
10137 IF(kflc.EQ.5) vf=4.*paru(102)/3.-1.
10138 IF(kflc.EQ.6) vf=1.-8.*paru(102)/3.
10139 rva=rva+3.*rqcd*(0.5*vq*(3.-vq**2)*vf**2+vq**3)
10141 parj(124)=paru(101)*parj(123)*rva/(48.*paru(102)*(1.-paru(102)))
10145 poll=1.-parj(131)*parj(132)
10146 IF(mstj(102).GE.2)
THEN
10147 sff=1./(16.*paru(102)*(1.-paru(102)))
10148 sfw=ecm**4/((ecm**2-parj(123)**2)**2+(parj(123)*parj(124))**2)
10149 sfi=sfw*(1.-(parj(123)/ecm)**2)
10151 sf1i=sff*(ve*poll+parj(132)-parj(131))
10152 sf1w=sff**2*((ve**2+1.)*poll+2.*ve*(parj(132)-parj(131)))
10162 DO 110 kflc=1,
max(mstj(104),kfl)
10163 IF(kfl.GT.0.AND.kflc.NE.kfl) goto 110
10166 IF(ecm.LT.2.*pmq+parj(127)) goto 110
10169 IF(mod(mstj(103),2).EQ.1) vq=sqrt(1.-(2.*pmq/ecm)**2)
10172 rqq=rqq+3.*qf**2*poll
10173 IF(mstj(102).LE.1)
THEN
10174 rtot=rtot+3.*0.5*vq*(3.-vq**2)*qf**2*poll
10176 vf=
sign(1.,qf)-4.*qf*paru(102)
10177 rqv=rqv-6.*qf*vf*sf1i
10178 rva=rva+3.*(vf**2+1.)*sf1w
10179 rtot=rtot+3.*(0.5*vq*(3.-vq**2)*(qf**2*poll-2.*qf*vf*hf1i+
10180 & vf**2*hf1w)+vq**3*hf1w)
10184 IF(mstj(102).GE.2) rsum=rqq+sfi*rqv+sfw*rva
10189 parj(143)=rtot*rqcd
10190 parj(144)=parj(143)
10191 parj(145)=parj(141)*86.8/ecm**2
10192 parj(146)=parj(142)*86.8/ecm**2
10193 parj(147)=parj(143)*86.8/ecm**2
10194 parj(148)=parj(147)
10195 parj(157)=rsum*rqcd
10199 IF(mstj(107).LE.0)
RETURN
10203 xku=
min(parj(136),1.-(2.*parj(127)/ecm)**2)
10206 &1.526*
log(ecm**2/0.932)
10209 IF(mstj(102).LE.1)
THEN
10210 sigv=1.5*ale-0.5+paru(1)**2/3.+2.*sigv
10211 sigs=ale*(2.*
log(xkl)-
log(1.-xkl)-xkl)
10212 sigh=ale*(2.*
log(xku/xkl)-
log((1.-xku)/(1.-xkl))-(xku-xkl))
10216 szm=1.-(parj(123)/ecm)**2
10217 szw=parj(123)*parj(124)/ecm**2
10218 parj(161)=-rqq/rsum
10219 parj(162)=-(rqq+rqv+rva)/rsum
10220 parj(163)=(rqv*(1.-0.5*szm-sfi)+rva*(1.5-szm-sfw))/rsum
10221 parj(164)=(rqv*szw**2*(1.-2.*sfw)+rva*(2.*sfi+szw**2-4.+3.*szm-
10222 & szm**2))/(szw*rsum)
10223 sigv=1.5*ale-0.5+paru(1)**2/3.+((2.*rqq+sfi*rqv)/rsum)*sigv+
10224 & (szw*sfw*rqv/rsum)*paru(1)*20./9.
10225 sigs=ale*(2.*
log(xkl)+parj(161)*
log(1.-xkl)+parj(162)*xkl+
10226 & parj(163)*
log(((xkl-szm)**2+szw**2)/(szm**2+szw**2))+
10227 & parj(164)*(atan((xkl-szm)/szw)-atan(-szm/szw)))
10228 sigh=ale*(2.*
log(xku/xkl)+parj(161)*
log((1.-xku)/(1.-xkl))+
10229 & parj(162)*(xku-xkl)+parj(163)*
log(((xku-szm)**2+szw**2)/
10230 & ((xkl-szm)**2+szw**2))+parj(164)*(atan((xku-szm)/szw)-
10231 & atan((xkl-szm)/szw)))
10235 parj(160)=sigh/(paru(1)/paru(101)+sigv+sigs+sigh)
10236 parj(157)=rsum*(1.+(paru(101)/paru(1))*(sigv+sigs+sigh))*rqcd
10237 parj(144)=parj(157)
10238 parj(148)=parj(144)*86.8/ecm**2
10249 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10253 fxk(xx)=2.*
log(xx)+parj(161)*
log(1.-xx)+parj(162)*xx+
10254 &parj(163)*
log((xx-szm)**2+szw**2)+parj(164)*atan((xx-szm)/szw)
10259 IF(parj(160).LT.
rlu(0))
RETURN
10264 xku=
min(parj(136),1.-(2.*parj(127)/ecm)**2)
10265 IF(mstj(102).LE.1)
THEN
10266 100 xk=1./(1.+(1./xkl-1.)*((1./xku-1.)/(1./xkl-1.))**
rlu(0))
10267 IF(1.+(1.-xk)**2.LT.2.*
rlu(0)) goto 100
10271 szm=1.-(parj(123)/ecm)**2
10272 szw=parj(123)*parj(124)/ecm**2
10275 fxkd=1e-4*(fxku-fxkl)
10276 fxkr=fxkl+
rlu(0)*(fxku-fxkl)
10281 IF(fxkv.GT.fxkr)
THEN
10288 IF(nxk.LT.15.AND.fxku-fxkl.GT.fxkd) goto 110
10289 xk=xkl+(xku-xkl)*(fxkr-fxkl)/(fxku-fxkl)
10294 pme=2.*(
ulmass(11)/ecm)**2
10295 120 cthm=pme*(2./pme)**
rlu(0)
10296 IF(1.-(xk**2*cthm*(1.-0.5*cthm)+2.*(1.-xk)*pme/
max(pme,
10297 &cthm*(1.-0.5*cthm)))/(1.+(1.-xk)**2).LT.
rlu(0)) goto 120
10299 IF(
rlu(0).GT.0.5) cthe=-cthe
10300 sthe=sqrt(
max(0.,(cthm-pme)*(2.-cthm)))
10302 phik=paru(2)*
rlu(0)
10306 IF(0.5*(2.-xk*(1.-cthe))**2/((2.-xk)**2+(xk*cthe)**2).GT.
10308 alpk=asin(sgn*sthe*(xk-sgn*(2.*sqrt(1.-xk)-2.+xk)*cthe)/
10309 &(2.-xk*(1.-sgn*cthe)))
10319 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10320 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
10321 SAVE /ludat1/,/ludat2/
10324 IF(mstj(102).LE.1)
THEN
10327 poll=1.-parj(131)*parj(132)
10328 sff=1./(16.*paru(102)*(1.-paru(102)))
10329 sfw=ecmc**4/((ecmc**2-parj(123)**2)**2+(parj(123)*parj(124))**2)
10330 sfi=sfw*(1.-(parj(123)/ecmc)**2)
10332 hf1i=sfi*sff*(ve*poll+parj(132)-parj(131))
10333 hf1w=sfw*sff**2*((ve**2+1.)*poll+2.*ve*(parj(132)-parj(131)))
10334 rfmax=
max(4./9.*poll-4./3.*(1.-8.*paru(102)/3.)*hf1i+
10335 & ((1.-8.*paru(102)/3.)**2+1.)*hf1w,1./9.*poll+2./3.*
10336 & (-1.+4.*paru(102)/3.)*hf1i+((-1.+4.*paru(102)/3.)**2+1.)*hf1w)
10342 IF(ntry.GT.100)
THEN
10343 CALL
luerrm(14,
'(LUXKFL:) caught in an infinite loop')
10348 IF(kfl.LE.0) kflc=1+int(mstj(104)*
rlu(0))
10351 IF(ecm.LT.2.*pmq+parj(127)) goto 100
10354 IF(mod(mstj(103),2).EQ.1) vq=sqrt(
max(0.,1.-(2.*pmq/ecmc)**2))
10357 IF(mstj(102).LE.1)
THEN
10359 rfv=0.5*vq*(3.-vq**2)*qf**2
10361 vf=
sign(1.,qf)-4.*qf*paru(102)
10362 rf=qf**2*poll-2.*qf*vf*hf1i+(vf**2+1.)*hf1w
10363 rfv=0.5*vq*(3.-vq**2)*(qf**2*poll-2.*qf*vf*hf1i+vf**2*hf1w)+
10365 IF(rfv.GT.0.) parj(171)=
min(1.,vq**3*hf1w/rfv)
10369 IF(kfl.LE.0.AND.rf.LT.
rlu(0)*rfmax) goto 100
10370 parj(158)=parj(158)+1.
10371 IF(ecmc.LT.2.*pmq+parj(127).OR.rfv.LT.
rlu(0)*rf) kflc=0
10372 IF(mstj(107).LE.0.AND.kflc.EQ.0) goto 100
10373 IF(kflc.NE.0) parj(159)=parj(159)+1.
10374 parj(144)=parj(157)*parj(159)/parj(158)
10375 parj(148)=parj(144)*86.8/ecm**2
10385 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10390 DATA zhut/3.0922, 6.2291, 7.4782, 7.8440, 8.2560/
10393 IF(mstj(101).EQ.0.OR.mstj(101).EQ.5)
THEN
10397 ELSEIF(mstj(109).EQ.0.OR.mstj(109).EQ.2)
THEN
10399 IF(mstj(109).EQ.2) cf=1.
10400 IF(mstj(111).EQ.0)
THEN
10403 ELSEIF(mstu(111).EQ.0)
THEN
10404 parj(169)=
min(1.,parj(129))
10405 q2=parj(169)*ecm**2
10406 parj(168)=
min(1.,
max(parj(128),exp(-12.*paru(1)/
10407 & ((33.-2.*mstu(112))*paru(111)))))
10408 q2r=parj(168)*ecm**2
10410 parj(169)=
min(1.,
max(parj(129),(2.*paru(112)/ecm)**2))
10411 q2=parj(169)*ecm**2
10412 parj(168)=
min(1.,
max(parj(128),paru(112)/ecm,
10413 & (2.*paru(112)/ecm)**2))
10414 q2r=parj(168)*ecm**2
10418 alspi=(3./4.)*cf*
ulalps(q2r)/paru(1)
10419 IF(iabs(mstj(101)).EQ.1)
THEN
10421 ELSEIF(mstj(109).EQ.0)
THEN
10422 rqcd=1.+alspi+(1.986-0.115*mstu(118))*alspi**2
10423 IF(mstj(111).EQ.1) rqcd=
max(1.,rqcd+(33.-2.*mstu(112))/12.*
10424 &
log(parj(168))*alspi**2)
10426 rqcd=1.+alspi-(3./32.+0.519*mstu(118))*(4.*alspi/3.)**2
10430 alspi=(3./4.)*cf*
ulalps(q2)/paru(1)
10431 cut=
max(0.001,parj(125),(parj(126)/ecm)**2)
10432 IF(iabs(mstj(101)).LE.1.OR.(mstj(109).EQ.0.AND.mstj(111).EQ.0))
10433 & cut=
max(cut,exp(-sqrt(0.75/alspi))/2.)
10434 IF(mstj(110).EQ.2) cut=
max(0.01,
min(0.05,cut))
10437 100
IF(mstj(101).EQ.0.OR.cut.GE.0.25)
THEN
10440 parj(152)=(2.*alspi/3.)*((3.-6.*cut+2.*
log(cut))*
10441 &
log(cut/(1.-2.*cut))+(2.5+1.5*cut-6.571)*(1.-3.*cut)+
10442 & 5.833*(1.-3.*cut)**2-3.894*(1.-3.*cut)**3+
10443 & 1.342*(1.-3.*cut)**4)/rqcd
10444 IF(mstj(109).EQ.2.AND.(mstj(101).EQ.2.OR.mstj(101).LE.-2))
10449 IF(iabs(mstj(101)).LE.1.OR.mstj(101).EQ.3.OR.mstj(109).EQ.2.OR.
10450 & cut.GE.0.25)
THEN
10452 ELSEIF(mstj(110).LE.1)
THEN
10454 parj(153)=alspi**2*ct**2*(2.419+0.5989*ct+0.6782*ct**2-
10455 & 0.2661*ct**3+0.01159*ct**4)/rqcd
10458 ELSEIF(mstj(110).EQ.2)
THEN
10461 IF(abs(cut-0.01*iy).LT.0.0001) iza=iy
10467 zhurat=zhut(iz)+(100.*cut-iz)*(zhut(iz+1)-zhut(iz))
10469 parj(153)=alspi*parj(152)*zhurat
10473 IF(mstj(111).EQ.1.AND.iabs(mstj(101)).GE.2.AND.mstj(101).NE.3.
10474 & and.cut.LT.0.25) parj(153)=parj(153)+(33.-2.*mstu(112))/12.*
10475 &
log(parj(169))*alspi*parj(152)
10478 IF(iabs(mstj(101)).LE.1.OR.cut.GE.0.125)
THEN
10482 IF(cut.LE.0.018)
THEN
10483 xqqgg=6.349-4.330*ct+0.8304*ct**2
10484 IF(mstj(109).EQ.2) xqqgg=(4./3.)**2*(3.035-2.091*ct+
10486 xqqqq=1.25*(-0.1080+0.01486*ct+0.009364*ct**2)
10487 IF(mstj(109).EQ.2) xqqqq=8.*xqqqq
10489 xqqgg=-0.09773+0.2959*ct-0.2764*ct**2+0.08832*ct**3
10490 IF(mstj(109).EQ.2) xqqgg=(4./3.)**2*(-0.04079+0.1340*ct-
10491 & 0.1326*ct**2+0.04365*ct**3)
10492 xqqqq=1.25*(0.003661-0.004888*ct-0.001081*ct**2+0.002093*
10494 IF(mstj(109).EQ.2) xqqqq=8.*xqqqq
10496 parj(154)=alspi**2*ct**2*(xqqgg+xqqqq)/rqcd
10497 parj(155)=xqqqq/(xqqgg+xqqqq)
10501 IF(mstj(111).EQ.1.AND.parj(152)+parj(153).LT.0..AND.
10502 & parj(169).LT.0.99)
THEN
10503 parj(169)=
min(1.,1.2*parj(169))
10504 q2=parj(169)*ecm**2
10505 alspi=(3./4.)*cf*
ulalps(q2)/paru(1)
10510 IF(parj(152)+parj(153)+parj(154).GE.1)
THEN
10511 IF(mstj(110).EQ.2.AND.cut.GT.0.0499.AND.mstj(111).EQ.1.AND.
10512 & parj(169).LT.0.99)
THEN
10513 parj(169)=
min(1.,1.2*parj(169))
10514 q2=parj(169)*ecm**2
10515 alspi=(3./4.)*cf*
ulalps(q2)/paru(1)
10517 ELSEIF(mstj(110).EQ.2.AND.cut.GT.0.0499)
THEN
10519 &
'(LUXJET:) no allowed y cut value for Zhu parametrization')
10521 cut=0.26*(4.*cut)**(parj(152)+parj(153)+parj(154))**(-1./3.)
10522 IF(mstj(110).EQ.2) cut=
max(0.01,
min(0.05,cut))
10528 alspi=
ulalps(ecm**2)/paru(1)
10529 cut=
max(0.001,parj(125),(parj(126)/ecm)**2,exp(-3./alspi))
10531 IF(cut.LT.0.25) parj(152)=(alspi/3.)*((1.-2.*cut)*
10532 &
log((1.-2.*cut)/cut)+0.5*(9.*cut**2-1.))
10539 IF(mstj(101).EQ.0.OR.mstj(101).EQ.5)
THEN
10541 ELSEIF(mstj(101).LE.0)
THEN
10542 njet=
min(4,2-mstj(101))
10546 IF(parj(152)+parj(153)+parj(154).GT.rnj) njet=3
10547 IF(parj(154).GT.rnj) njet=4
10558 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10560 dimension zhup(5,12)
10563 DATA ((zhup(ic1,ic2),ic2=1,12),ic1=1,5)/
10564 & 18.29, 89.56, 4.541, -52.09, -109.8, 24.90,
10565 & 11.63, 3.683, 17.50, 0.002440, -1.362, -0.3537,
10566 & 11.42, 6.299, -22.55, -8.915, 59.25, -5.855,
10567 & -32.85, -1.054, -16.90, 0.006489, -0.8156, 0.01095,
10568 & 7.847, -3.964, -35.83, 1.178, 29.39, 0.2806,
10569 & 47.82, -12.36, -56.72, 0.04054, -0.4365, 0.6062,
10570 & 5.441, -56.89, -50.27, 15.13, 114.3, -18.19,
10571 & 97.05, -1.890, -139.9, 0.08153, -0.4984, 0.9439,
10572 & -17.65, 51.44, -58.32, 70.95, -255.7, -78.99,
10573 & 476.9, 29.65, -239.3, 0.4745, -1.174, 6.081/
10576 dilog(
x)=
x+
x**2/4.+
x**3/9.+
x**4/16.+
x**5/25.+
x**6/36.+
x**7/49.
10582 qme=(2.*pmq/ecm)**2
10583 IF(mstj(109).NE.1)
THEN
10585 cutd=
log(1./cut-2.)
10586 IF(mstj(109).EQ.0)
THEN
10590 wtmx=
min(20.,37.-6.*cutd)
10591 IF(mstj(110).EQ.2) wtmx=2.*(7.5+80.*cut)
10600 als2pi=paru(118)/paru(2)
10602 IF(mstj(111).EQ.1) wtopt=(33.-2.*mstu(112))/6.*
log(parj(169))*
10604 wtmax=
max(0.,1.+wtopt+als2pi*wtmx)
10608 110 y13l=cutl+cutd*
rlu(0)
10609 y23l=cutl+cutd*
rlu(0)
10613 IF(y12.LE.cut) goto 110
10614 IF(y13**2+y23**2+2.*y12.LE.2.*
rlu(0)) goto 110
10617 IF(mstj(101).EQ.2.AND.mstj(110).LE.1)
THEN
10622 IF(y13.LE.0.5) y13i=dilog(y13)
10623 IF(y13.GE.0.5) y13i=1.644934-y13l*y13m-dilog(1.-y13)
10624 IF(y23.LE.0.5) y23i=dilog(y23)
10625 IF(y23.GE.0.5) y23i=1.644934-y23l*y23m-dilog(1.-y23)
10626 IF(y12.LE.0.5) y12i=dilog(y12)
10627 IF(y12.GE.0.5) y12i=1.644934-y12l*y12m-dilog(1.-y12)
10628 wt1=(y13**2+y23**2+2.*y12)/(y13*y23)
10629 wt2=cf*(-2.*(cutl-y12l)**2-3.*cutl-1.+3.289868+
10630 & 2.*(2.*cutl-y12l)*cut/y12)+
10631 & cn*((cutl-y12l)**2-(cutl-y13l)**2-(cutl-y23l)**2-11.*cutl/6.+
10632 & 67./18.+1.644934-(2.*cutl-y12l)*cut/y12+(2.*cutl-y13l)*
10633 & cut/y13+(2.*cutl-y23l)*cut/y23)+
10634 & tr*(2.*cutl/3.-10./9.)+
10635 & cf*(y12/(y12+y13)+y12/(y12+y23)+(y12+y23)/y13+(y12+y13)/y23+
10636 & y13l*(4.*y12**2+2.*y12*y13+4.*y12*y23+y13*y23)/(y12+y23)**2+
10637 & y23l*(4.*y12**2+2.*y12*y23+4.*y12*y13+y13*y23)/(y12+y13)**2)/
10639 & cn*(y13l*y13/(y12+y23)+y23l*y23/(y12+y13))/wt1+
10640 & (cn-2.*cf)*((y12**2+(y12+y13)**2)*(y12l*y23l-y12l*y12m-y23l*
10641 & y23m+1.644934-y12i-y23i)/(y13*y23)+(y12**2+(y12+y23)**2)*
10642 & (y12l*y13l-y12l*y12m-y13l*y13m+1.644934-y12i-y13i)/
10643 & (y13*y23)+(y13**2+y23**2)/(y13*y23*(y13+y23))-
10644 & 2.*y12l*y12**2/(y13+y23)**2-4.*y12l*y12/(y13+y23))/wt1-
10645 & cn*(y13l*y23l-y13l*y13m-y23l*y23m+1.644934-y13i-y23i)
10646 IF(1.+wtopt+als2pi*wt2.LE.0.) mstj(121)=1
10647 IF(1.+wtopt+als2pi*wt2.LE.wtmax*
rlu(0)) goto 110
10648 parj(156)=(wtopt+als2pi*wt2)/(1.+wtopt+als2pi*wt2)
10650 ELSEIF(mstj(101).EQ.2.AND.mstj(110).EQ.2)
THEN
10656 IF(abs(cut-0.01*iy).LT.0.0001) iza=iy
10660 wt2=zhup(iz,1)+zhup(iz,2)*zx+zhup(iz,3)*zx**2+(zhup(iz,4)+
10661 & zhup(iz,5)*zx)*zy+(zhup(iz,6)+zhup(iz,7)*zx)*zy**2+
10662 & (zhup(iz,8)+zhup(iz,9)*zx)*zy**3+zhup(iz,10)/(zx-zy**2)+
10663 & zhup(iz,11)/(1.-zy)+zhup(iz,12)/zy
10666 wtl=zhup(iz,1)+zhup(iz,2)*zx+zhup(iz,3)*zx**2+(zhup(iz,4)+
10667 & zhup(iz,5)*zx)*zy+(zhup(iz,6)+zhup(iz,7)*zx)*zy**2+
10668 & (zhup(iz,8)+zhup(iz,9)*zx)*zy**3+zhup(iz,10)/(zx-zy**2)+
10669 & zhup(iz,11)/(1.-zy)+zhup(iz,12)/zy
10671 wtu=zhup(iz,1)+zhup(iz,2)*zx+zhup(iz,3)*zx**2+(zhup(iz,4)+
10672 & zhup(iz,5)*zx)*zy+(zhup(iz,6)+zhup(iz,7)*zx)*zy**2+
10673 & (zhup(iz,8)+zhup(iz,9)*zx)*zy**3+zhup(iz,10)/(zx-zy**2)+
10674 & zhup(iz,11)/(1.-zy)+zhup(iz,12)/zy
10675 wt2=wtl+(wtu-wtl)*(100.*cut+1.-iz)
10677 IF(1.+wtopt+2.*als2pi*wt2.LE.0.) mstj(121)=1
10678 IF(1.+wtopt+2.*als2pi*wt2.LE.wtmax*
rlu(0)) goto 110
10679 parj(156)=(wtopt+2.*als2pi*wt2)/(1.+wtopt+2.*als2pi*wt2)
10686 IF(4.*y23*y13*y12/
x3**2.LE.qme) njet=2
10687 IF(mod(mstj(103),4).GE.2.AND.iabs(mstj(101)).LE.1.AND.qme*
x3+
10688 & 0.5*qme**2+(0.5*qme+0.25*qme**2)*((1.-
x2)/(1.-x1)+
10689 & (1.-x1)/(1.-
x2)).GT.(x1**2+
x2**2)*
rlu(0)) njet=2
10690 IF(mstj(101).EQ.-1.AND.njet.EQ.2) goto 100
10695 140
x3=sqrt(4.*cut**2+
rlu(0)*((1.-cut)**2-4.*cut**2))
10696 IF(
log((
x3-cut)/cut).LE.
rlu(0)*
log((1.-2.*cut)/cut)) goto 140
10700 IF(4.*(1.-x1)*(1.-
x2)*(1.-
x3)/
x3**2.LE.qme) njet=2
10701 IF(mstj(102).GE.2)
THEN
10702 IF(
x3**2-2.*(1.+
x3)*(1.-x1)*(1.-
x2)*parj(171).LT.
10703 &
x3**2*
rlu(0)) njet=2
10705 IF(mstj(101).EQ.-1.AND.njet.EQ.2) goto 130
10713 SUBROUTINE lux4jt(NJET,CUT,KFL,ECM,KFLN,X1,X2,X4,X12,X14)
10716 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10718 dimension wta(4),wtb(4),wtc(4),wtd(4),wte(4)
10722 qme=(2.*pmq/ecm)**2
10724 IF(mstj(109).EQ.0)
THEN
10737 IF(parj(155).GT.
rlu(0))
it=2
10738 IF(mstj(101).LE.-3)
it=-mstj(101)-2
10739 IF(
it.EQ.1) wtmx=0.7/cut**2
10740 IF(
it.EQ.1.AND.mstj(109).EQ.2) wtmx=0.6/cut**2
10741 IF(
it.EQ.2) wtmx=0.1125*cf*tr/cut**2
10745 110 y134=3.*cut+(1.-6.*cut)*
rlu(0)
10746 y234=3.*cut+(1.-6.*cut)*
rlu(0)
10747 IF(
it.EQ.1) y34=(1.-5.*cut)*exp(-ct*
rlu(0))
10748 IF(
it.EQ.2) y34=cut+(1.-6.*cut)*
rlu(0)
10749 IF(y34.LE.y134+y234-1..OR.y34.GE.y134*y234) goto 110
10754 vb=y34*(1.-y134-y234+y34)/((y134-y34)*(y234-y34))
10755 y24=0.5*(y234-y34)*(1.-4.*sqrt(
max(0.,vt*(1.-vt)*vb*(1.-vb)))*
10756 &cp-(1.-2.*vt)*(1.-2.*vb))
10758 y12=1.-y134-y23-y24
10759 IF(
min(y12,y13,y14,y23,y24).LE.cut) goto 110
10768 wta(ic)=(y12*y34**2-y13*y24*y34+y14*y23*y34+3.*y12*y23*y34+
10769 & 3.*y12*y14*y34+4.*y12**2*y34-y13*y23*y24+2.*y12*y23*y24-
10770 & y13*y14*y24-2.*y12*y13*y24+2.*y12**2*y24+y14*y23**2+2.*y12*
10771 & y23**2+y14**2*y23+4.*y12*y14*y23+4.*y12**2*y23+2.*y12*y14**2+
10772 & 2.*y12*y13*y14+4.*y12**2*y14+2.*y12**2*y13+2.*y12**3)/(2.*y13*
10773 & y134*y234*y24)+(y24*y34+y12*y34+y13*y24-y14*y23+y12*y13)/(y13*
10774 & y134**2)+2.*y23*(1.-y13)/(y13*y134*y24)+y34/(2.*y13*y24)
10775 wtb(ic)=(y12*y24*y34+y12*y14*y34-y13*y24**2+y13*y14*y24+2.*y12*
10776 & y14*y24)/(y13*y134*y23*y14)+y12*(1.+y34)*y124/(y134*y234*y14*
10777 & y24)-(2.*y13*y24+y14**2+y13*y23+2.*y12*y13)/(y13*y134*y14)+
10778 & y12*y123*y124/(2.*y13*y14*y23*y24)
10779 wtc(ic)=-(5.*y12*y34**2+2.*y12*y24*y34+2.*y12*y23*y34+2.*y12*
10780 & y14*y34+2.*y12*y13*y34+4.*y12**2*y34-y13*y24**2+y14*y23*y24+
10781 & y13*y23*y24+y13*y14*y24-y12*y14*y24-y13**2*y24-3.*y12*y13*y24-
10782 & y14*y23**2-y14**2*y23+y13*y14*y23-3.*y12*y14*y23-y12*y13*y23)/
10783 & (4.*y134*y234*y34**2)+(3.*y12*y34**2-3.*y13*y24*y34+3.*y12*y24*
10784 & y34+3.*y14*y23*y34-y13*y24**2-y12*y23*y34+6.*y12*y14*y34+2.*y12*
10785 & y13*y34-2.*y12**2*y34+y14*y23*y24-3.*y13*y23*y24-2.*y13*y14*
10786 & y24+4.*y12*y14*y24+2.*y12*y13*y24+3.*y14*y23**2+2.*y14**2*y23+
10787 & 2.*y14**2*y12+2.*y12**2*y14+6.*y12*y14*y23-2.*y12*y13**2-
10788 & 2.*y12**2*y13)/(4.*y13*y134*y234*y34)
10789 wtc(ic)=wtc(ic)+(2.*y12*y34**2-2.*y13*y24*y34+y12*y24*y34+
10790 & 4.*y13*y23*y34+4.*y12*y14*y34+2.*y12*y13*y34+2.*y12**2*y34-
10791 & y13*y24**2+3.*y14*y23*y24+4.*y13*y23*y24-2.*y13*y14*y24+
10792 & 4.*y12*y14*y24+2.*y12*y13*y24+2.*y14*y23**2+4.*y13*y23**2+
10793 & 2.*y13*y14*y23+2.*y12*y14*y23+4.*y12*y13*y23+2.*y12*y14**2+4.*
10794 & y12**2*y13+4.*y12*y13*y14+2.*y12**2*y14)/(4.*y13*y134*y24*y34)-
10795 & (y12*y34**2-2.*y14*y24*y34-2.*y13*y24*y34-y14*y23*y34+y13*y23*
10796 & y34+y12*y14*y34+2.*y12*y13*y34-2.*y14**2*y24-4.*y13*y14*y24-
10797 & 4.*y13**2*y24-y14**2*y23-y13**2*y23+y12*y13*y14-y12*y13**2)/
10798 & (2.*y13*y34*y134**2)+(y12*y34**2-4.*y14*y24*y34-2.*y13*y24*y34-
10799 & 2.*y14*y23*y34-4.*y13*y23*y34-4.*y12*y14*y34-4.*y12*y13*y34-
10800 & 2.*y13*y14*y24+2.*y13**2*y24+2.*y14**2*y23-2.*y13*y14*y23-
10801 & y12*y14**2-6.*y12*y13*y14-y12*y13**2)/(4.*y34**2*y134**2)
10802 wttot=wttot+y34*cf*(cf*wta(ic)+(cf-0.5*cn)*wtb(ic)+cn*wtc(ic))/
10805 wtd(ic)=(y13*y23*y34+y12*y23*y34-y12**2*y34+y13*y23*y24+2.*y12*
10806 & y23*y24-y14*y23**2+y12*y13*y24+y12*y14*y23+y12*y13*y14)/(y13**2*
10807 & y123**2)-(y12*y34**2-y13*y24*y34+y12*y24*y34-y14*y23*y34-y12*
10808 & y23*y34-y13*y24**2+y14*y23*y24-y13*y23*y24-y13**2*y24+y14*
10809 & y23**2)/(y13**2*y123*y134)+(y13*y14*y12+y34*y14*y12-y34**2*y12+
10810 & y13*y14*y24+2.*y34*y14*y24-y23*y14**2+y34*y13*y24+y34*y23*y14+
10811 & y34*y13*y23)/(y13**2*y134**2)-(y34*y12**2-y13*y24*y12+y34*y24*
10812 & y12-y23*y14*y12-y34*y14*y12-y13*y24**2+y23*y14*y24-y13*y14*y24-
10813 & y13**2*y24+y23*y14**2)/(y13**2*y134*y123)
10814 wte(ic)=(y12*y34*(y23-y24+y14+y13)+y13*y24**2-y14*y23*y24+y13*
10815 & y23*y24+y13*y14*y24+y13**2*y24-y14*y23*(y14+y23+y13))/(y13*y23*
10816 & y123*y134)-y12*(y12*y34-y23*y24-y13*y24-y14*y23-y14*y13)/(y13*
10817 & y23*y123**2)-(y14+y13)*(y24+y23)*y34/(y13*y23*y134*y234)+
10818 & (y12*y34*(y14-y24+y23+y13)+y13*y24**2-y23*y14*y24+y13*y14*y24+
10819 & y13*y23*y24+y13**2*y24-y23*y14*(y14+y23+y13))/(y13*y14*y134*
10820 & y123)-y34*(y34*y12-y14*y24-y13*y24-y23*y14-y23*y13)/(y13*y14*
10821 & y134**2)-(y23+y13)*(y24+y14)*y12/(y13*y14*y123*y124)
10822 wttot=wttot+cf*(tr*wtd(ic)+(cf-0.5*cn)*wte(ic))/16.
10826 130
IF(ic.EQ.1.OR.ic.EQ.3.OR.
id.EQ.2.OR.
id.EQ.3)
THEN
10837 IF(ic.EQ.2.OR.ic.EQ.4.OR.
id.EQ.3.OR.
id.EQ.4)
THEN
10848 IF(ic.LE.3) goto 120
10849 IF(
id.EQ.1.AND.wttot.LT.
rlu(0)*wtmx) goto 110
10854 IF(mstj(109).EQ.0.AND.
id.EQ.1)
THEN
10855 parj(156)=y34*(2.*(wta(1)+wta(2)+wta(3)+wta(4))+4.*(wtc(1)+
10856 & wtc(2)+wtc(3)+wtc(4)))/(9.*wttot)
10857 IF(wta(2)+wta(4)+2.*(wtc(2)+wtc(4)).GT.
rlu(0)*(wta(1)+wta(2)+
10858 & wta(3)+wta(4)+2.*(wtc(1)+wtc(2)+wtc(3)+wtc(4))))
id=2
10859 IF(
id.EQ.2) goto 130
10860 ELSEIF(mstj(109).EQ.2.AND.
id.EQ.1)
THEN
10861 parj(156)=y34*(wta(1)+wta(2)+wta(3)+wta(4))/(8.*wttot)
10862 IF(wta(2)+wta(4).GT.
rlu(0)*(wta(1)+wta(2)+wta(3)+wta(4)))
id=2
10863 IF(
id.EQ.2) goto 130
10866 IF(mstj(109).EQ.0.AND.0.5*y34*(wtc(1)+wtc(2)+wtc(3)+wtc(4)).GT.
10867 &
rlu(0)*wttot) mstj(120)=4
10871 IF(y12.LE.cut+qme) njet=2
10872 IF(njet.EQ.2) goto 150
10873 q12=0.5*(1.-sqrt(1.-qme/y12))
10874 x1=1.-(1.-q12)*y234-q12*y134
10875 x4=1.-(1.-q12)*y134-q12*y234
10877 x12=(1.-q12)*y13+q12*y23
10879 IF(y134*y234/((1.-x1)*(1.-x4)).LE.
rlu(0)) njet=2
10884 wtr=
rlu(0)*(wtd(1)+wtd(2)+wtd(3)+wtd(4))
10885 IF(wtr.LT.wtd(2)+wtd(3)+wtd(4))
id=2
10886 IF(wtr.LT.wtd(3)+wtd(4))
id=3
10887 IF(wtr.LT.wtd(4))
id=4
10888 IF(
id.GE.2) goto 130
10891 parj(156)=cf*tr*(wtd(1)+wtd(2)+wtd(3)+wtd(4))/(16.*wttot)
10892 140 kfln=1+int(5.*
rlu(0))
10893 IF(kfln.NE.kfl.AND.0.2*parj(156).LE.
rlu(0)) goto 140
10894 IF(kfln.EQ.kfl.AND.1.-0.8*parj(156).LE.
rlu(0)) goto 140
10895 IF(kfln.GT.mstj(104)) njet=2
10897 qmen=(2.*pmqn/ecm)**2
10900 IF(y24.LE.cut+qme.OR.y13.LE.1.1*qmen) njet=2
10901 IF(njet.EQ.2) goto 150
10902 q24=0.5*(1.-sqrt(1.-qme/y24))
10903 q13=0.5*(1.-sqrt(1.-qmen/y13))
10904 x1=1.-(1.-q24)*y123-q24*y134
10905 x4=1.-(1.-q24)*y134-q24*y123
10906 x2=1.-(1.-q13)*y234-q13*y124
10907 x12=(1.-q24)*((1.-q13)*y14+q13*y34)+q24*((1.-q13)*y12+q13*y23)
10909 x34=(1.-q24)*((1.-q13)*y23+q13*y12)+q24*((1.-q13)*y34+q13*y14)
10910 IF(pmq**2+pmqn**2+
min(x12,x34)*ecm**2.LE.
10911 & (parj(127)+pmq+pmqn)**2) njet=2
10912 IF(y123*y134/((1.-x1)*(1.-x4)).LE.
rlu(0)) njet=2
10914 150
IF(mstj(101).LE.-2.AND.njet.EQ.2) goto 100
10924 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
10925 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10926 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
10927 SAVE /lujets/,/ludat1/,/ludat2/
10931 poll=1.-parj(131)*parj(132)
10932 pold=parj(132)-parj(131)
10933 IF(mstj(102).LE.1.OR.mstj(109).EQ.1)
THEN
10941 sff=1./(16.*paru(102)*(1.-paru(102)))
10942 sfw=ecm**4/((ecm**2-parj(123)**2)**2+(parj(123)*parj(124))**2)
10943 sfi=sfw*(1.-(parj(123)/ecm)**2)
10947 vf=af-4.*qf*paru(102)
10948 hf1=qf**2*poll-2.*qf*vf*sfi*sff*(ve*poll-ae*pold)+
10949 & (vf**2+af**2)*sfw*sff**2*((ve**2+ae**2)*poll-2.*ve*ae*pold)
10950 hf2=-2.*qf*af*sfi*sff*(ae*poll-ve*pold)+2.*vf*af*sfw*sff**2*
10951 & (2.*ve*ae*poll-(ve**2+ae**2)*pold)
10952 hf3=parj(133)**2*(qf**2-2.*qf*vf*sfi*sff*ve+(vf**2+af**2)*
10953 & sfw*sff**2*(ve**2-ae**2))
10954 hf4=-parj(133)**2*2.*qf*vf*sfw*(parj(123)*parj(124)/ecm**2)*
10961 IF(mstj(103).GE.4.AND.iabs(mstj(101)).LE.1.AND.mstj(102).LE.1.AND.
10962 &mstj(109).NE.1) qme=(2.*
ulmass(kfl)/ecm)**2
10964 sigu=4.*sqrt(1.-qme)
10965 sigl=2.*qme*sqrt(1.-qme)
10974 x1=2.*
p(nc+1,4)/ecm
10975 x2=2.*
p(nc+3,4)/ecm
10977 ecmr=
p(nc+1,4)+
p(nc+4,4)+sqrt((
p(nc+2,1)+
p(nc+3,1))**2+
10978 & (
p(nc+2,2)+
p(nc+3,2))**2+(
p(nc+2,3)+
p(nc+3,3))**2)
10979 x1=2.*
p(nc+1,4)/ecmr
10980 x2=2.*
p(nc+4,4)/ecmr
10985 ct12=(x1*
x2-2.*x1-2.*
x2+2.+qme)/sqrt((x1**2-qme)*(
x2**2-qme))
10986 st12=sqrt(1.-ct12**2)
10987 IF(mstj(109).NE.1)
THEN
10988 sigu=2.*x1**2+
x2**2*(1.+ct12**2)-qme*(3.+ct12**2-x1-
x2)-
10989 & qme*x1/xq+0.5*qme*((
x2**2-qme)*st12**2-2.*
x2)*xq
10990 sigl=(
x2*st12)**2-qme*(3.-ct12**2-2.5*(x1+
x2)+x1*
x2+qme)+
10991 & 0.5*qme*(x1**2-x1-qme)/xq+0.5*qme*((
x2**2-qme)*ct12**2-
x2)*xq
10992 sigt=0.5*(
x2**2-qme-0.5*qme*(
x2**2-qme)/xq)*st12**2
10993 sigi=((1.-0.5*qme*xq)*(
x2**2-qme)*st12*ct12+qme*(1.-x1-
x2+
10994 & 0.5*x1*
x2+0.5*qme)*st12/ct12)/sq2
10995 siga=
x2**2*st12/sq2
10996 sigp=2.*(x1**2-
x2**2*ct12)
11002 ct13=sqrt(
max(0.,1.-(xt/
x3)**2))
11003 sigu=(1.-parj(171))*(
x3**2-0.5*xt**2)+
11004 & parj(171)*(
x3**2-0.5*xt**2-4.*(1.-x1)*(1.-
x2)**2/x1)
11005 sigl=(1.-parj(171))*0.5*xt**2+
11006 & parj(171)*0.5*(1.-x1)**2*xt**2
11007 sigt=(1.-parj(171))*0.25*xt**2+
11008 & parj(171)*0.25*xt**2*(1.-2.*x1)
11009 sigi=-(0.5/sq2)*((1.-parj(171))*xt*
x3*ct13+
11010 & parj(171)*xt*((1.-2.*x1)*
x3*ct13-x1*(x1-
x2)))
11011 siga=(0.25/sq2)*xt*(2.*(1.-x1)-x1*
x3)
11021 sigmax=(2.*hf1a+hf3a+hf4a)*abs(sigu)+2.*(hf1a+hf3a+hf4a)*
11022 &abs(sigl)+2.*(hf1a+2.*hf3a+2.*hf4a)*abs(sigt)+2.*sq2*
11023 &(hf1a+2.*hf3a+2.*hf4a)*abs(sigi)+4.*sq2*hf2a*abs(siga)+
11027 100 chi=paru(2)*
rlu(0)
11036 c2phi=
cos(2.*(
phi-parj(134)))
11037 s2phi=sin(2.*(
phi-parj(134)))
11038 sig=((1.+cthe**2)*hf1+sthe**2*(c2phi*hf3-s2phi*hf4))*sigu+
11039 &2.*(sthe**2*hf1-sthe**2*(c2phi*hf3-s2phi*hf4))*sigl+
11040 &2.*(sthe**2*c2chi*hf1+((1.+cthe**2)*c2chi*c2phi-2.*cthe*s2chi*
11041 &s2phi)*hf3-((1.+cthe**2)*c2chi*s2phi+2.*cthe*s2chi*c2phi)*hf4)*
11042 &sigt-2.*sq2*(2.*sthe*cthe*cchi*hf1-2.*sthe*(cthe*cchi*c2phi-
11043 &schi*s2phi)*hf3+2.*sthe*(cthe*cchi*s2phi+schi*c2phi)*hf4)*sigi+
11044 &4.*sq2*sthe*cchi*hf2*siga+2.*cthe*hf2*
sigp
11045 IF(sig.LT.sigmax*
rlu(0)) goto 100
11056 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
11057 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
11058 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
11059 SAVE /lujets/,/ludat1/,/ludat2/
11062 IF(mstu(12).GE.1) CALL
lulist(0)
11063 IF(kfl.LT.0.OR.kfl.GT.8)
THEN
11064 CALL
luerrm(16,
'(LUONIA:) called with unknown flavour code')
11065 IF(mstu(21).GE.1)
RETURN
11067 IF(ecm.LT.parj(127)+2.02*parf(101))
THEN
11068 CALL
luerrm(16,
'(LUONIA:) called with too small CM energy')
11069 IF(mstu(21).GE.1)
RETURN
11074 IF(mstj(115).GE.2)
THEN
11076 CALL
lu1ent(nc-1,11,0.5*ecm,0.,0.)
11078 CALL
lu1ent(nc,-11,0.5*ecm,paru(1),0.)
11082 IF(mstj(115).GE.3.AND.kflc.GE.5)
THEN
11088 CALL
lu1ent(nc,kf,ecm,0.,0.)
11099 IF(
x3.GE.1..OR.((1.-x1)/(
x2*
x3))**2+((1.-
x2)/(x1*
x3))**2+
11100 &((1.-
x3)/(x1*
x2))**2.LE.2.*
rlu(0)) goto 100
11103 IF(mstj(101).LE.4) CALL
lu3ent(nc+1,21,21,21,ecm,x1,
x3)
11104 IF(mstj(101).GE.5) CALL
lu3ent(-(nc+1),21,21,21,ecm,x1,
x3)
11107 mstu(111)=mstj(108)
11108 IF(mstj(108).EQ.2.AND.(mstj(101).EQ.0.OR.mstj(101).EQ.1))
11110 paru(112)=parj(121)
11111 IF(mstu(111).EQ.2) paru(112)=parj(122)
11113 IF(kflc.NE.0) qf=kchg(kflc,1)/3.
11114 rgam=7.2*qf**2*paru(101)/
ulalps(ecm**2)
11117 IF(
rlu(0).GT.rgam/(1.+rgam))
THEN
11118 IF(1.-
max(x1,
x2,
x3).LE.
max((parj(126)/ecm)**2,parj(125)))
11120 IF(njet.EQ.2.AND.mstj(101).LE.4) CALL
lu2ent(nc+1,21,21,ecm)
11121 IF(njet.EQ.2.AND.mstj(101).GE.5) CALL
lu2ent(-(nc+1),21,21,ecm)
11124 ecmc=sqrt(1.-x1)*ecm
11125 IF(ecmc.LT.2.*parj(127)) goto 100
11130 IF(mstj(101).GE.5)
k(nc+2,4)=mstu(5)*(nc+3)
11131 IF(mstj(101).GE.5)
k(nc+2,5)=mstu(5)*(nc+3)
11132 IF(mstj(101).GE.5)
k(nc+3,4)=mstu(5)*(nc+2)
11133 IF(mstj(101).GE.5)
k(nc+3,5)=mstu(5)*(nc+2)
11135 IF(ecmc.LT.4.*parj(127))
THEN
11139 CALL
lu1ent(nc+2,83,0.5*(
x2+
x3)*ecm,paru(1),0.)
11145 k(
ip,3)=
k(
ip,3)+(mstj(115)/2)+(kflc/5)*(mstj(115)/3)*(nc-1)
11149 IF(mstj(106).EQ.1)
THEN
11151 hf1=1.-parj(131)*parj(132)
11153 ct13=(x1*
x3-2.*x1-2.*
x3+2.)/(x1*
x3)
11154 st13=sqrt(1.-ct13**2)
11155 sigl=0.5*
x3**2*((1.-
x2)**2+(1.-
x3)**2)*st13**2
11156 sigu=(x1*(1.-x1))**2+(
x2*(1.-
x2))**2+(
x3*(1.-
x3))**2-sigl
11158 sigi=(sigl*ct13/st13+0.5*x1*
x3*(1.-
x2)**2*st13)/sq2
11159 sigmax=(2.*hf1+hf3)*abs(sigu)+2.*(hf1+hf3)*abs(sigl)+2.*(hf1+
11160 & 2.*hf3)*abs(sigt)+2.*sq2*(hf1+2.*hf3)*abs(sigi)
11163 120 chi=paru(2)*
rlu(0)
11172 c2phi=
cos(2.*(
phi-parj(134)))
11173 s2phi=sin(2.*(
phi-parj(134)))
11174 sig=((1.+cthe**2)*hf1+sthe**2*c2phi*hf3)*sigu+2.*(sthe**2*hf1-
11175 & sthe**2*c2phi*hf3)*sigl+2.*(sthe**2*c2chi*hf1+((1.+cthe**2)*
11176 & c2chi*c2phi-2.*cthe*s2chi*s2phi)*hf3)*sigt-2.*sq2*(2.*sthe*cthe*
11177 & cchi*hf1-2.*sthe*(cthe*cchi*c2phi-schi*s2phi)*hf3)*sigi
11178 IF(sig.LT.sigmax*
rlu(0)) goto 120
11179 CALL ludbrb(nc+1,
n,0.,chi,0d0,0d0,0d0)
11180 CALL ludbrb(nc+1,
n,the,
phi,0d0,0d0,0d0)
11184 IF(mstj(101).GE.5.AND.njet.GE.2)
THEN
11185 CALL
lushow(nc+mk+1,-njet,ecmc)
11187 IF(mstj(105).EQ.-1) mstj(14)=-1
11188 IF(mstj(105).GE.0) mstu(28)=0
11191 IF(mstj(105).GE.0.AND.mstu(28).NE.0) goto 100
11195 IF(mstj(105).EQ.1) CALL
luexec
11196 mstu(161)=110*kflc+3
11210 common/hepevt/nevhep,nhep,isthep(nmxhep),idhep(nmxhep),
11211 &jmohep(2,nmxhep),jdahep(2,nmxhep),phep(5,nmxhep),vhep(4,nmxhep)
11212 DOUBLE PRECISION phep,vhep
11213 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
11214 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
11215 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
11217 SAVE /lujets/,/ludat1/,/ludat2/
11220 IF(mconv.EQ.1)
THEN
11222 IF(
n.GT.nmxhep) CALL
luerrm(8,
11223 &
'(LUHEPC:) no more space in /HEPEVT/')
11227 IF(
k(i,1).GE.1.AND.
k(i,1).LE.10) isthep(i)=1
11228 IF(
k(i,1).GE.11.AND.
k(i,1).LE.20) isthep(i)=2
11229 IF(
k(i,1).GE.21.AND.
k(i,1).LE.30) isthep(i)=3
11230 IF(
k(i,1).GE.31.AND.
k(i,1).LE.100) isthep(i)=
k(i,1)
11234 IF(
k(i,1).NE.3.AND.
k(i,1).NE.13.AND.
k(i,1).NE.14)
THEN
11252 IF(
k(i,1).EQ.21.AND.
k(i-1,1).NE.21) inew=i
11256 IF(i.GE.inew+2.AND.
k(i,1).EQ.21.AND.
k(i,3).EQ.0)
THEN
11258 IF(i.GE.inew+3.AND.
k(i-1,1).EQ.21.AND.
k(i-1,3).EQ.0)
11262 ELSEIF(
k(i,2).GE.91.AND.
k(i,2).LE.93)
THEN
11265 IF(i1.GE.i) CALL
luerrm(8,
11266 &
'(LUHEPC:) translation of inconsistent event history')
11267 IF(i1.LT.i.AND.
k(i1,1).NE.1.AND.
k(i1,1).NE.11) goto 120
11269 IF(i1.LT.i.AND.kc.EQ.0) goto 120
11270 IF(i1.LT.i.AND.kchg(kc,2).EQ.0) goto 120
11272 ELSEIF(
k(i,2).EQ.94)
THEN
11274 IF(nhep.GE.i+3.AND.
k(i+3,3).LE.i) njet=3
11275 IF(nhep.GE.i+4.AND.
k(i+4,3).LE.i) njet=4
11276 jmohep(2,i)=mod(
k(i+njet,4)/mstu(5),mstu(5))
11277 IF(jmohep(2,i).EQ.jmohep(1,i)) jmohep(2,i)=
11278 & mod(
k(i+1,4)/mstu(5),mstu(5))
11282 IF(
k(i,2).EQ.94.AND.mstu(16).NE.2)
THEN
11283 DO 130 i1=jdahep(1,i),jdahep(2,i)
11284 i2=mod(
k(i1,4)/mstu(5),mstu(5))
11288 IF(
k(i,2).GE.91.AND.
k(i,2).LE.94) goto 140
11290 IF(i1.LE.0.OR.i1.GT.nhep) goto 140
11291 IF(
k(i1,1).NE.13.AND.
k(i1,1).NE.14) goto 140
11292 IF(jdahep(1,i1).EQ.0)
THEN
11299 IF(
k(i,1).NE.13.AND.
k(i,1).NE.14) goto 150
11300 IF(jdahep(2,i).EQ.0) jdahep(2,i)=jdahep(1,i)
11305 IF(nhep.GT.mstu(4)) CALL
luerrm(8,
11306 &
'(LUHEPC:) no more space in /LUJETS/')
11307 n=
min(nhep,mstu(4))
11312 IF(isthep(i).EQ.1)
k(i,1)=1
11313 IF(isthep(i).EQ.2)
k(i,1)=11
11314 IF(isthep(i).EQ.3)
k(i,1)=21
11326 IF(isthep(i).EQ.2.AND.phep(4,i).GT.phep(5,i))
THEN
11328 IF(i1.GT.0.AND.i1.LE.nhep)
v(i,5)=(vhep(4,i1)-vhep(4,i))*
11329 & phep(5,i)/phep(4,i)
11333 IF(isthep(i).EQ.1)
THEN
11336 IF(kc.NE.0) kq=kchg(kc,2)*isign(1,
k(i,2))
11337 IF(kq.NE.0) nkq=nkq+1
11338 IF(kq.NE.2) kqsum=kqsum+kq
11339 IF(kq.NE.0.AND.kqsum.NE.0)
THEN
11341 ELSEIF(kq.EQ.2.AND.i.LT.
n)
THEN
11342 IF(
k(i+1,2).EQ.21)
k(i,1)=2
11346 IF(nkq.EQ.1.OR.kqsum.NE.0) CALL
luerrm(8,
11347 &
'(LUHEPC:) input parton configuration not colour singlet')
11358 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
11359 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
11360 SAVE /lujets/,/ludat1/
11361 dimension psum(5),pini(6),pfin(6)
11364 IF(mtest.GE.1) CALL
lutabu(20)
11383 IF(iev.EQ.301.OR.iev.EQ.351.OR.iev.EQ.401) mstj(116)=3
11389 IF(ity.EQ.3.OR.ity.EQ.4) mstj(11)=2
11390 IF(ity.EQ.1) CALL
lu1ent(1,1,15.,0.,0.)
11391 IF(ity.EQ.2) CALL
lu1ent(1,3101,15.,0.,0.)
11392 IF(ity.EQ.3) CALL
lu1ent(1,-2203,15.,0.,0.)
11393 IF(ity.EQ.4) CALL
lu1ent(1,-4,30.,0.,0.)
11394 IF(ity.EQ.5) CALL
lu1ent(1,21,15.,0.,0.)
11397 ELSEIF(iev.LE.130)
THEN
11399 IF(ity.EQ.1) CALL
lu2ent(1,1,-1,40.)
11400 IF(ity.EQ.2) CALL
lu2ent(1,4,-4,30.)
11401 IF(ity.EQ.3) CALL
lu2ent(1,2,2103,100.)
11402 IF(ity.EQ.4) CALL
lu2ent(1,21,21,40.)
11403 IF(ity.EQ.5) CALL
lu3ent(1,2101,21,-3203,30.,0.6,0.8)
11404 IF(ity.EQ.6) CALL
lu3ent(1,5,21,-5,40.,0.9,0.8)
11405 IF(ity.EQ.7) CALL
lu3ent(1,21,21,21,60.,0.7,0.5)
11406 IF(ity.EQ.8) CALL
lu4ent(1,2,21,21,-2,40.,0.4,0.64,0.6,0.12,0.2)
11409 ELSEIF(iev.LE.200)
THEN
11411 mstj(2)=1+mod(iev-131,4)
11412 mstj(3)=1+mod((iev-131)/4,4)
11413 IF(ity.EQ.1) CALL
lu2ent(1,4,-5,40.)
11414 IF(ity.EQ.2) CALL
lu3ent(1,3,21,-3,40.,0.9,0.4)
11415 IF(ity.EQ.3) CALL
lu4ent(1,2,21,21,-2,40.,0.4,0.64,0.6,0.12,0.2)
11416 IF(ity.GE.4) CALL
lu4ent(1,2,-3,3,-2,40.,0.4,0.64,0.6,0.12,0.2)
11419 ELSEIF(iev.LE.300)
THEN
11426 IF(i.EQ.1) kfl=int(1.+4.*
rlu(0))
11427 IF(i.EQ.njet) kfl=-int(1.+4.*
rlu(0))
11433 IF(i.EQ.1.OR.i.EQ.njet) mstj(93)=1
11434 IF(i.EQ.1.OR.i.EQ.njet) psum(5)=psum(5)+
ulmass(kfl)
11436 psum(j)=psum(j)+
p(i,j)
11439 IF(psum(4)**2-psum(1)**2-psum(2)**2-psum(3)**2.LT.
11440 & (psum(5)+parj(32))**2) goto 100
11443 ELSEIF(iev.LE.350)
THEN
11448 ELSEIF(iev.LE.400)
THEN
11449 mstj(42)=1+mod(iev,2)
11450 mstj(43)=1+mod(iev/2,4)
11451 mstj(44)=mod(iev/8,3)
11455 ELSEIF(iev.LE.450)
THEN
11460 ELSEIF(iev.LE.500)
THEN
11464 ELSEIF(iev.LE.560)
THEN
11467 kflb=8-mod(ity/5,4)
11468 kflc=kflb-mod(ity,5)
11469 CALL
lu1ent(1,100*kflb+10*kflc+kfls,0.,0.,0.)
11472 ELSEIF(iev.LE.600)
THEN
11475 kfla=8-mod(ity/5,4)
11476 kflb=kfla-mod(ity,5)
11478 CALL
lu1ent(1,1000*kfla+100*kflb+10*kflc+kfls,0.,0.,0.)
11496 IF((pfin(1)-pini(1))**2+(pfin(2)-pini(2))**2.GE.4.) merr=merr+1
11497 epzrem=pini(4)+pini(3)-pfin(4)-pfin(3)
11498 IF(epzrem.LT.0..OR.epzrem.GT.2.*parj(31)) merr=merr+1
11499 IF(abs(pfin(6)-pini(6)).GT.2.1) merr=merr+1
11502 IF(abs(pfin(j)-pini(j)).GT.0.0001*pini(4)) merr=merr+1
11504 IF(abs(pfin(6)-pini(6)).GT.0.1) merr=merr+1
11506 IF(merr.NE.0)
WRITE(mstu(11),5000) (pini(j),j=1,4),pini(6),
11507 &(pfin(j),j=1,4),pfin(6)
11512 IF(
k(i,1).GT.20) goto 170
11514 WRITE(mstu(11),5100) i
11517 pd=
p(i,4)**2-
p(i,1)**2-
p(i,2)**2-
p(i,3)**2-
p(i,5)**2
11518 IF(abs(pd).GT.
max(0.1,0.001*
p(i,4)**2).OR.
p(i,4).LT.0.)
THEN
11519 WRITE(mstu(11),5200) i
11523 IF(mtest.GE.1) CALL
lutabu(21)
11526 IF(merr.NE.0.OR.mstu(24).NE.0.OR.mstu(28).NE.0)
THEN
11528 ELSEIF(mtest.GE.1.AND.mod(iev-5,100).EQ.0)
THEN
11533 IF(merr.NE.0) nerr=nerr+1
11534 IF(nerr.GE.10)
THEN
11535 WRITE(mstu(11),5300) iev
11541 IF(mtest.GE.1) CALL
lutabu(22)
11542 IF(nerr.EQ.0)
WRITE(mstu(11),5400)
11543 IF(nerr.GT.0)
WRITE(mstu(11),5500) nerr
11555 5000
FORMAT(/
' Momentum, energy and/or charge were not conserved ',
11556 &
'in following event'/
' sum of',9
x,
'px',11
x,
'py',11
x,
'pz',11
x,
11557 &
'E',8
x,
'charge'/
' before',2
x,4(1
x,f12.5),1
x,f8.2/
' after',3
x,
11558 &4(1
x,f12.5),1
x,f8.2)
11559 5100
FORMAT(/5
x,
'Entry no.',i4,
' in following event not known code')
11560 5200
FORMAT(/5
x,
'Entry no.',i4,
' in following event has faulty ',
11562 5300
FORMAT(/5
x,
'Ten errors experienced by event ',i3/
11563 &5
x,
'Something is seriously wrong! Execution stopped now!')
11564 5400
FORMAT(//5
x,
'End result of LUTEST: no errors detected.')
11565 5500
FORMAT(//5
x,
'End result of LUTEST:',i2,
' errors detected.'/
11566 &5
x,
'This should not have happened!')
11577 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
11578 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
11579 common/ludat3/
mdcy(500,3),
mdme(2000,2),
brat(2000),kfdp(2000,5)
11580 common/ludat4/chaf(500)
11582 common/ludatr/mrlu(6),rrlu(100)
11583 SAVE /ludat1/,/ludat2/,/ludat3/,/ludat4/,/ludatr/
11587 & 0, 0, 0, 4000,10000, 500, 2000, 0, 0, 2,
11588 1 6, 1, 1, 0, 1, 1, 0, 0, 0, 0,
11589 2 2, 10, 0, 0, 1, 10, 0, 0, 0, 0,
11590 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11591 4 2, 2, 1, 4, 2, 1, 1, 0, 0, 0,
11592 5 25, 24, 0, 1, 0, 0, 0, 0, 0, 0,
11593 6 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11595 & 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11596 1 1, 5, 3, 5, 0, 0, 0, 0, 0, 0,
11598 8 7, 411, 1997, 01, 20, 700, 0, 0, 0, 0,
11599 9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0/
11601 & 3.1415927, 6.2831854, 0.1973, 5.068, 0.3894, 2.568, 4*0.,
11602 1 0.001, 0.09, 0.01, 0., 0., 0., 0., 0., 0., 0.,
11603 2 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
11604 3 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
11605 4 2.0, 1.0, 0.25, 2.5, 0.05, 0., 0., 0.0001, 0., 0.,
11606 5 2.5, 1.5, 7.0, 1.0, 0.5, 2.0, 3.2, 0., 0., 0.,
11608 & 0.00729735, 0.232, 0.007764, 1.0, 1.16639e-5, 0., 0., 0.,
11610 1 0.20, 0.25, 1.0, 4.0, 10., 0., 0., 0., 0., 0.,
11611 2 -0.693, -1.0, 0.387, 1.0, -0.08, -1.0, 1.0, 1.0, 1.0, 0.,
11612 3 1.0, -1.0, 1.0, -1.0, 1.0, 0., 0., 0., 0., 0.,
11613 4 5.0, 1.0, 1.0, 0., 1.0, 1.0, 0., 0., 0., 0.,
11614 5 1.0, 0., 0., 0., 1000., 1.0, 1.0, 1.0, 1.0, 0.,
11615 6 1.0, 1.0, 1.0, 1.0, 1.0, 0., 0., 0., 0., 0.,
11616 7 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0., 0., 0.,
11617 8 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.,
11618 9 0., 0., 0., 0., 1.0, 0., 0., 0., 0., 0./
11620 & 1, 3, 0, 0, 0, 0, 0, 0, 0, 0,
11621 1 4, 2, 0, 1, 0, 0, 0, 0, 0, 0,
11622 2 2, 1, 1, 2, 1, 2, 2, 0, 0, 0,
11623 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
11624 4 2, 2, 4, 2, 5, 3, 3, 0, 0, 3,
11625 5 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
11627 & 5, 2, 7, 5, 1, 1, 0, 2, 0, 2,
11628 1 0, 0, 0, 0, 1, 1, 0, 0, 0, 0,
11631 & 0.10, 0.30, 0.40, 0.05, 0.50, 0.50, 0.50, 0., 0., 0.,
11632 1 0.50, 0.60, 0.75, 0., 0., 0., 0., 1.0, 1.0, 0.,
11633 2 0.36, 1.0, 0.01, 2.0, 1.0, 0.4, 0., 0., 0., 0.,
11634 3 0.10, 1.0, 0.8, 1.5, 0., 2.0, 0.2, 2.5, 0.6, 0.,
11635 4 0.3, 0.58, 0.5, 0.9, 0.5, 1.0, 1.0, 1.0, 0., 0.,
11636 5 0.77,0.77,0.77,-0.05,-0.005,-0.00001,-0.00001,-0.00001,1.0,0.,
11637 6 4.5, 0.7, 0., 0.003, 0.5, 0.5, 0., 0., 0., 0.,
11638 7 10., 1000., 100., 1000., 0., 0.7, 10., 0., 0., 0.,
11639 8 0.29, 1.0, 1.0, 0., 10., 10., 0., 0., 0., 0.,
11640 9 0.02, 1.0, 0.2, 0., 0., 0., 0., 0., 0., 0.,
11641 & 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
11642 1 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
11643 2 1.0, 0.25,91.187,2.489, 0.01, 2.0, 1.0, 0.25,0.002, 0.,
11644 3 0., 0., 0., 0., 0.01, 0.99, 0., 0., 0.2, 0.,
11648 DATA (kchg(i,1),i= 1, 500)/-1,2,-1,2,-1,2,-1,2,2*0,-3,0,-3,0,
11649 &-3,0,-3,6*0,3,9*0,3,2*0,3,0,-1,44*0,2,-1,2,-1,2,3,11*0,3,0,2*3,0,
11650 &3,0,3,0,3,10*0,3,0,2*3,0,3,0,3,0,3,10*0,3,0,2*3,0,3,0,3,0,3,10*0,
11651 &3,0,2*3,0,3,0,3,0,3,10*0,3,0,2*3,0,3,0,3,0,3,10*0,3,0,2*3,0,3,0,
11652 &3,0,3,70*0,3,0,3,28*0,3,2*0,3,8*0,-3,8*0,3,0,-3,0,3,-3,3*0,3,6,0,
11653 &3,5*0,-3,0,3,-3,0,-3,4*0,-3,0,3,6,-3,0,3,-3,0,-3,0,3,6,0,3,5*0,
11654 &-3,0,3,-3,0,-3,114*0/
11655 DATA (kchg(i,2),i= 1, 500)/8*1,12*0,2,16*0,2,1,50*0,-1,410*0/
11656 DATA (kchg(i,3),i= 1, 500)/8*1,2*0,8*1,5*0,1,9*0,1,2*0,1,0,2*1,
11657 &41*0,1,0,7*1,10*0,10*1,10*0,10*1,10*0,10*1,10*0,10*1,10*0,10*1,
11658 &10*0,10*1,70*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,
11659 &0,6*1,4*0,6*1,4*0,16*1,4*0,6*1,114*0/
11660 DATA (pmas(i,1),i= 1, 500)/0.0099,0.0056,0.199,1.35,5.,160.,
11661 &2*250.,2*0.,0.00051,0.,0.1057,0.,1.777,0.,250.,5*0.,91.187,80.25,
11662 &80.,6*0.,500.,900.,500.,3*300.,350.,200.,5000.,60*0.,0.1396,
11663 &0.4977,0.4936,1.8693,1.8645,1.9688,5.2787,5.2786,5.47972,6.594,
11664 &0.135,0.5475,0.9578,2.9788,9.4,320.,2*500.,2*0.,0.7669,0.8961,
11665 &0.8916,2.0101,2.0071,2.11,2*5.325,5.5068,6.602,0.7683,0.782,
11666 &1.0194,3.0969,9.4603,320.,2*500.,2*0.,1.232,2*1.29,2*2.424,2.536,
11667 &2*5.73,5.97,7.3,1.232,1.17,1.4,3.46,9.875,320.,2*500.,2*0.,0.983,
11668 &2*1.429,2*2.272,2.5,2*5.68,5.92,7.25,0.9827,1.,1.4,3.4151,9.8598,
11669 &320.,2*500.,2*0.,1.26,2*1.402,2*2.372,2.56,2*5.78,6.02,7.3,1.26,
11670 &1.282,1.42,3.5106,9.8919,320.,2*500.,2*0.,1.318,1.432,1.425,
11671 &2*2.46,2.61,2*5.83,6.07,7.35,1.318,1.275,1.525,3.5562,9.9132,
11672 &320.,2*500.,2*0.,2*0.4977,8*0.,3.686,3*0.,10.0233,70*0.,1.1156,
11673 &5*0.,2.2849,0.,2.473,2.466,6*0.,5.641,0.,2*5.84,6*0.,0.9396,
11674 &0.9383,0.,1.1974,1.1926,1.1894,1.3213,1.3149,0.,2.4525,2.4529,
11675 &2.4527,2*2.55,2.73,4*0.,3*5.8,2*5.96,6.12,4*0.,1.234,1.233,1.232,
11676 &1.231,1.3872,1.3837,1.3828,1.535,1.5318,1.6724,3*2.5,2*2.63,2.8,
11677 &4*0.,3*5.81,2*5.97,6.13,114*0./
11678 DATA (pmas(i,2),i= 1, 500)/22*0.,2.489,2.066,88*0.,0.0002,
11679 &0.001,6*0.,0.149,0.0505,0.0498,7*0.,0.151,0.00843,0.0044,7*0.,
11680 &0.155,2*0.09,2*0.02,0.,4*0.05,0.155,0.36,0.08,2*0.01,5*0.,0.057,
11681 &2*0.287,7*0.05,0.057,0.,0.25,0.014,6*0.,0.4,2*0.174,7*0.05,0.4,
11682 &0.024,0.06,0.0009,6*0.,0.11,0.109,0.098,2*0.019,5*0.02,0.11,
11683 &0.185,0.076,0.002,146*0.,4*0.12,0.0394,0.036,0.0358,0.0099,
11685 DATA (pmas(i,3),i= 1, 500)/22*0.,2*20.,88*0.,0.002,0.005,6*0.,
11686 &0.4,2*0.2,7*0.,0.4,0.1,0.015,7*0.,0.25,0.005,0.01,2*0.08,0.,
11687 &4*0.1,0.25,0.2,0.001,2*0.02,5*0.,0.05,2*0.4,6*0.1,2*0.05,0.,0.35,
11688 &0.05,6*0.,3*0.3,2*0.1,0.03,4*0.1,0.3,0.05,0.02,0.001,6*0.,0.25,
11689 &4*0.12,5*0.05,0.25,0.17,0.2,0.01,146*0.,4*0.14,0.04,2*0.035,
11691 DATA (pmas(i,4),i= 1, 500)/12*0.,658650.,0.,0.0914,68*0.,0.1,
11692 &0.387,15*0.,7804.,0.,3709.,0.32,0.1259,0.135,3*0.387,0.15,110*0.,
11693 &15500.,26.75,83*0.,78.88,5*0.,0.057,0.,0.025,0.09,6*0.,0.387,0.,
11694 &2*0.387,9*0.,44.3,0.,23.95,49.1,86.9,6*0.,0.13,9*0.,0.387,13*0.,
11697 & 0.5, 0.25, 0.5, 0.25, 1., 0.5, 0., 0., 0., 0.,
11698 1 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
11699 2 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
11700 3 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
11701 4 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
11702 5 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
11703 6 0.75, 0.5, 0., 0.1667, 0.0833, 0.1667, 0., 0., 0., 0.,
11704 7 0., 0., 1., 0.3333, 0.6667, 0.3333, 0., 0., 0., 0.,
11705 8 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
11706 9 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
11707 & 0.325, 0.325, 0.5, 1.6, 5.0, 0., 0., 0., 0., 0.,
11708 1 0., 0.11, 0.16, 0.048, 0.50, 0.45, 0.55, 0.60, 0., 0.,
11709 2 0.2, 0.1, 0., 0., 0., 0., 0., 0., 0., 0.,
11711 DATA ((vckm(i,j),j=1,4),i=1,4)/
11712 1 0.95113, 0.04884, 0.00003, 0.00000,
11713 2 0.04884, 0.94940, 0.00176, 0.00000,
11714 3 0.00003, 0.00176, 0.99821, 0.00000,
11715 4 0.00000, 0.00000, 0.00000, 1.00000/
11718 DATA (
mdcy(i,1),i= 1, 500)/5*0,3*1,6*0,1,0,1,5*0,3*1,6*0,1,0,1,
11719 &2*0,4*1,42*0,7*1,12*0,1,0,15*1,2*0,18*1,2*0,18*1,2*0,18*1,2*0,
11720 &18*1,2*0,18*1,3*0,1,8*0,1,3*0,1,70*0,1,5*0,1,0,2*1,6*0,1,0,2*1,
11721 &9*0,5*1,0,6*1,4*0,6*1,4*0,16*1,4*0,6*1,114*0/
11722 DATA (
mdcy(i,2),i= 1, 500)/1,9,17,25,33,41,50,60,2*0,70,74,76,
11723 &81,83,124,126,132,2*0,135,144,156,172,192,6*0,209,0,231,254,274,
11724 &292,301,304,305,42*0,314,315,319,328,331,336,338,11*0,358,359,
11725 &361,367,430,491,524,560,596,635,666,668,675,681,682,683,684,685,
11726 &2*0,686,688,691,694,697,699,700,701,702,703,704,708,713,721,724,
11727 &733,734,735,2*0,736,737,742,747,749,751,753,755,757,759,761,762,
11728 &765,769,770,771,772,773,2*0,774,775,777,779,781,783,785,787,789,
11729 &791,793,794,799,804,806,808,809,810,2*0,811,813,815,817,819,821,
11730 &823,825,827,829,831,833,846,850,852,854,855,856,2*0,857,863,873,
11731 &884,892,900,904,912,920,924,928,936,945,951,953,955,956,957,2*0,
11732 &958,966,8*0,968,3*0,979,70*0,993,5*0,997,0,1073,1074,6*0,1075,0,
11733 &1092,1093,9*0,1094,1096,1097,1100,1101,0,1103,1104,1105,1106,
11734 &1107,1108,4*0,1109,1110,1111,1112,1113,1114,4*0,1115,1116,1119,
11735 &1122,1123,1126,1129,1132,1134,1136,1140,1141,1142,1143,1145,1147,
11736 &4*0,1148,1149,1150,1151,1152,1153,114*0/
11737 DATA (
mdcy(i,3),i= 1, 500)/5*8,9,2*10,2*0,4,2,5,2,41,2,6,3,2*0,
11738 &9,12,16,20,17,6*0,22,0,23,20,18,9,3,1,9,42*0,1,4,9,3,5,2,20,11*0,
11739 &1,2,6,63,61,33,2*36,39,31,2,7,6,5*1,2*0,2,3*3,2,5*1,4,5,8,3,9,
11740 &3*1,2*0,1,2*5,7*2,1,3,4,5*1,2*0,1,9*2,1,2*5,2*2,3*1,2*0,11*2,13,
11741 &4,2*2,3*1,2*0,6,10,11,2*8,4,2*8,2*4,8,9,6,2*2,3*1,2*0,8,2,8*0,11,
11742 &3*0,14,70*0,4,5*0,76,0,2*1,6*0,17,0,2*1,9*0,2,1,3,1,2,0,6*1,4*0,
11743 &6*1,4*0,1,2*3,1,3*3,2*2,4,3*1,2*2,1,4*0,6*1,114*0/
11744 DATA (
mdme(i,1),i= 1,2000)/6*1,-1,7*1,-1,7*1,-1,7*1,-1,7*1,-1,
11745 &7*1,-1,1,-1,8*1,2*-1,8*1,2*-1,61*1,-1,2*1,-1,6*1,2*-1,7*1,2*-1,
11746 &3*1,-1,6*1,2*-1,6*1,2*-1,3*1,-1,3*1,-1,3*1,5*-1,3*1,-1,6*1,2*-1,
11747 &3*1,-1,11*1,2*-1,6*1,8*-1,3*1,-1,3*1,-1,3*1,5*-1,3*1,4*-1,6*1,
11748 &2*-1,3*1,-1,5*1,-1,8*1,2*-1,3*1,-1,9*1,-1,3*1,-1,9*1,2*-1,2*1,-1,
11749 &16*1,-1,2*1,3*-1,1665*1/
11750 DATA (
mdme(i,2),i= 1,2000)/75*102,42,6*102,2*42,2*0,7*41,2*0,
11751 &24*41,6*102,45,29*102,8*32,8*0,16*32,4*0,8*32,4*0,32,4*0,8*32,
11752 &14*0,16*32,7*0,8*32,4*0,32,7*0,8*32,4*0,32,5*0,4*32,5*0,3*32,0,
11753 &6*32,3*0,12,2*42,2*11,9*42,2*45,31,2*45,2*33,31,2*45,20*46,7*0,
11754 &24*42,41*0,16*42,46*0,10*42,20*0,2*13,14*42,16*0,48,3*13,16*42,
11755 &16*0,48,3*13,16*42,19*0,48,3*13,2*42,0,2*11,28*42,0,2,4*0,2,8*0,
11756 &12,32,86,87,88,3,0,2*3,0,2*3,0,2*3,0,3,6*0,3,3*0,1,0,3,2*0,2*3,
11757 &3*0,1,4*0,12,3*0,4*32,2*4,86,87,88,33*0,12,32,86,87,88,31*0,12,0,
11758 &32,86,87,88,40*0,12,0,32,86,87,88,95*0,12,0,32,86,87,88,2*0,4*42,
11759 &6*0,12,11*0,4*32,2*4,9*0,14*42,52*0,10*13,2*84,3*42,8*0,48,3*13,
11760 &2*42,2*85,14*0,84,5*0,85,886*0/
11761 DATA (
brat(i) ,i= 1, 439)/75*0.,1.,6*0.,0.179,0.178,0.116,
11762 &0.235,0.005,0.056,0.018,0.023,0.011,2*0.004,0.0067,0.014,2*0.002,
11763 &2*0.001,0.0022,0.054,0.002,0.016,0.005,0.011,0.0101,5*0.006,
11764 &0.002,2*0.001,5*0.002,6*0.,1.,29*0.,0.15394,0.11936,0.15394,
11765 &0.11926,0.15254,3*0.,0.03368,0.06664,0.03368,0.06664,0.03368,
11766 &0.06664,2*0.,0.3214,0.0165,2*0.,0.0165,0.3207,2*0.,0.00001,
11767 &0.00059,6*0.,3*0.1081,3*0.,0.0003,0.048,0.8705,4*0.,0.0002,
11768 &0.0603,0.,0.0199,0.0008,3*0.,0.143,0.111,0.143,0.111,0.143,0.085,
11769 &2*0.,0.03,0.058,0.03,0.058,0.03,0.058,8*0.,0.25,0.01,2*0.,0.01,
11770 &0.25,4*0.,0.24,5*0.,3*0.08,6*0.,0.01,0.08,0.82,5*0.,0.09,11*0.,
11771 &0.01,0.08,0.82,5*0.,0.09,9*0.,1.,6*0.,0.01,0.98,0.01,1.,4*0.215,
11772 &2*0.,2*0.07,0.,1.,2*0.08,0.76,0.08,2*0.105,0.04,0.5,0.08,0.14,
11773 &0.01,0.015,0.005,1.,3*0.,1.,4*0.,1.,0.25,0.01,2*0.,0.01,0.25,
11774 &4*0.,0.24,5*0.,3*0.08,0.,1.,2*0.5,0.635,0.212,0.056,0.017,0.048,
11775 &0.032,0.07,0.065,2*0.005,2*0.011,5*0.001,0.07,0.065,2*0.005,
11776 &2*0.011,5*0.001,0.026,0.019,0.066,0.041,0.045,0.076,0.0073,
11777 &2*0.0047,0.026,0.001,0.0006,0.0066,0.005,2*0.003,2*0.0006,
11778 &2*0.001,0.006,0.005,0.012,0.0057,0.067,0.008,0.0022,0.027,0.004,
11779 &0.019,0.012,0.002,0.009,0.0218,0.001,0.022,0.087,0.001,0.0019,
11780 &0.0015,0.0028,0.034,0.027,2*0.002,2*0.004,2*0.002,0.034,0.027/
11781 DATA (
brat(i) ,i= 440, 655)/2*0.002,2*0.004,2*0.002,0.0365,
11782 &0.045,0.073,0.062,3*0.021,0.0061,0.015,0.025,0.0088,0.074,0.0109,
11783 &0.0041,0.002,0.0035,0.0011,0.001,0.0027,2*0.0016,0.0018,0.011,
11784 &0.0063,0.0052,0.018,0.016,0.0034,0.0036,0.0009,0.0006,0.015,
11785 &0.0923,0.018,0.022,0.0077,0.009,0.0075,0.024,0.0085,0.067,0.0511,
11786 &0.017,0.0004,0.0028,0.01,2*0.02,0.03,2*0.005,2*0.02,0.03,2*0.005,
11787 &0.015,0.037,0.028,0.079,0.095,0.052,0.0078,4*0.001,0.028,0.033,
11788 &0.026,0.05,0.01,4*0.005,0.25,0.0952,0.02,0.055,2*0.005,0.008,
11789 &0.012,0.02,0.055,2*0.005,0.008,0.012,0.01,0.03,0.0035,0.011,
11790 &0.0055,0.0042,0.009,0.018,0.015,0.0185,0.0135,0.025,0.0004,
11791 &0.0007,0.0008,0.0014,0.0019,0.0025,0.4291,0.08,0.07,0.02,0.015,
11792 &0.005,0.02,0.055,2*0.005,0.008,0.012,0.02,0.055,2*0.005,0.008,
11793 &0.012,0.01,0.03,0.0035,0.011,0.0055,0.0042,0.009,0.018,0.015,
11794 &0.0185,0.0135,0.025,0.0004,0.0007,0.0008,0.0014,0.0019,0.0025,
11795 &0.4291,0.08,0.07,0.02,0.015,0.005,0.02,0.055,2*0.005,0.008,0.012,
11796 &0.02,0.055,2*0.005,0.008,0.012,0.01,0.03,0.0035,0.011,0.0055,
11797 &0.0042,0.009,0.018,0.015,0.0185,0.0135,0.025,2*0.0002,0.0007,
11798 &2*0.0004,0.0014,0.001,0.0009,0.0025,0.4291,0.08,0.07,0.02,0.015,
11799 &0.005,0.047,0.122,0.006,0.012,0.035,0.012,0.035,0.003,0.007,0.15,
11800 &0.037,0.008,0.002,0.05,0.015,0.003,0.001,0.014,0.042,0.014,0.042/
11801 DATA (
brat(i) ,i= 656, 931)/0.24,0.065,0.012,0.003,0.001,0.002,
11802 &0.001,0.002,0.014,0.003,0.988,0.012,0.389,0.319,0.2367,0.049,
11803 &0.005,0.001,0.0003,0.441,0.206,0.3,0.03,0.022,0.001,5*1.,0.99955,
11804 &0.00045,0.665,0.333,0.002,0.666,0.333,0.001,0.65,0.3,0.05,0.56,
11805 &0.44,5*1.,0.99912,0.00079,0.00005,0.00004,0.888,0.085,0.021,
11806 &2*0.003,0.49,0.344,3*0.043,0.023,0.013,0.001,0.0627,0.0597,
11807 &0.8776,3*0.027,0.015,0.045,0.015,0.045,0.77,0.029,4*1.,0.28,0.14,
11808 &0.313,0.157,0.11,0.28,0.14,0.313,0.157,0.11,0.667,0.333,0.667,
11809 &0.333,2*0.5,0.667,0.333,0.667,0.333,4*0.5,1.,0.333,0.334,0.333,
11810 &4*0.25,6*1.,0.667,0.333,0.667,0.333,0.667,0.333,0.667,0.333,
11811 &2*0.5,0.667,0.333,0.667,0.333,4*0.5,1.,0.52,0.26,0.11,2*0.055,
11812 &0.62,0.31,0.035,2*0.0175,0.007,0.993,0.02,0.98,3*1.,2*0.5,0.667,
11813 &0.333,0.667,0.333,0.667,0.333,0.667,0.333,2*0.5,0.667,0.333,
11814 &0.667,0.333,6*0.5,3*0.12,0.097,0.043,4*0.095,4*0.03,4*0.25,0.273,
11815 &0.727,0.35,0.65,3*1.,2*0.35,0.144,0.105,0.048,0.003,0.333,0.166,
11816 &0.168,0.084,0.087,0.043,0.059,2*0.029,0.002,0.332,0.166,0.168,
11817 &0.084,0.086,0.043,0.059,2*0.029,2*0.002,0.3,0.15,0.16,0.08,0.13,
11818 &0.06,0.08,0.04,0.3,0.15,0.16,0.08,0.13,0.06,0.08,0.04,2*0.3,
11819 &2*0.2,0.3,0.15,0.16,0.08,0.13,0.06,0.08,0.04,0.3,0.15,0.16,0.08,
11820 &0.13,0.06,0.08,0.04,2*0.3,2*0.2,2*0.3,2*0.2,2*0.35,0.144,0.105/
11821 DATA (
brat(i) ,i= 932,2000)/0.024,2*0.012,0.003,0.566,0.283,
11822 &0.069,0.028,0.023,2*0.0115,0.005,0.003,0.356,2*0.178,0.28,
11823 &2*0.004,0.135,0.865,0.22,0.78,3*1.,0.217,0.124,2*0.193,2*0.135,
11824 &0.002,0.001,0.686,0.314,2*0.0083,0.1866,0.324,0.184,0.027,0.001,
11825 &0.093,0.087,0.078,0.0028,3*0.014,0.008,0.024,0.008,0.024,0.425,
11826 &0.02,0.185,0.088,0.043,0.067,0.066,0.641,0.357,2*0.001,0.018,
11827 &2*0.005,0.003,0.002,2*0.006,0.018,2*0.005,0.003,0.002,2*0.006,
11828 &0.0066,0.025,0.016,0.0088,2*0.005,0.0058,0.005,0.0055,4*0.004,
11829 &2*0.002,2*0.004,0.003,0.002,2*0.003,3*0.002,2*0.001,0.002,
11830 &2*0.001,2*0.002,0.0013,0.0018,5*0.001,4*0.003,2*0.005,2*0.002,
11831 &2*0.001,2*0.002,2*0.001,0.2432,0.057,2*0.035,0.15,2*0.075,0.03,
11832 &2*0.015,2*1.,2*0.105,0.04,0.0077,0.02,0.0235,0.0285,0.0435,
11833 &0.0011,0.0022,0.0044,0.4291,0.08,0.07,0.02,0.015,0.005,2*1.,
11834 &0.999,0.001,1.,0.516,0.483,0.001,1.,0.995,0.005,13*1.,0.331,
11835 &0.663,0.006,0.663,0.331,0.006,1.,0.88,2*0.06,0.88,2*0.06,0.88,
11836 &2*0.06,0.667,2*0.333,0.667,0.676,0.234,0.085,0.005,3*1.,4*0.5,
11838 DATA (kfdp(i,1),i= 1, 507)/21,22,23,4*-24,25,21,22,23,4*24,25,
11839 &21,22,23,4*-24,25,21,22,23,4*24,25,21,22,23,4*-24,25,21,22,23,
11840 &4*24,25,37,21,22,23,4*-24,25,2*-37,21,22,23,4*24,25,2*37,22,23,
11841 &-24,25,23,24,-12,22,23,-24,25,23,24,-12,-14,35*16,22,23,-24,25,
11842 &23,24,-89,22,23,-24,25,-37,23,24,37,1,2,3,4,5,6,7,8,21,1,2,3,4,5,
11843 &6,7,8,11,13,15,17,1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,4*-1,
11844 &4*-3,4*-5,4*-7,-11,-13,-15,-17,1,2,3,4,5,6,7,8,11,13,15,17,21,
11845 &2*22,23,24,1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,24,37,2*23,25,
11846 &35,4*-1,4*-3,4*-5,4*-7,-11,-13,-15,-17,3*24,1,2,3,4,5,6,7,8,11,
11847 &13,15,17,21,2*22,23,24,23,25,36,1,2,3,4,5,6,7,8,11,13,15,17,21,
11848 &2*22,23,24,23,-1,-3,-5,-7,-11,-13,-15,-17,24,5,6,21,2,1,2,3,4,5,
11849 &6,11,13,15,82,-11,-13,2*2,-12,-14,-16,2*-2,2*-4,-2,-4,2*89,37,
11850 &2*-89,2*5,-37,2*89,4*-1,4*-3,4*-5,4*-7,-11,-13,-15,-17,-13,130,
11851 &310,-13,3*211,12,14,11*-11,11*-13,-311,-313,-311,-313,-20313,
11852 &2*-311,-313,-311,-313,2*111,2*221,2*331,2*113,2*223,2*333,-311,
11853 &-313,2*-321,211,-311,-321,333,-311,-313,-321,211,2*-321,2*-311,
11854 &-321,211,113,8*-11,8*-13,-321,-323,-321,-323,-311,2*-313,-311,
11855 &-313,2*-311,-321,-10323,-321,-323,-321,-311,2*-313,211,111,333,
11856 &3*-321,-311,-313,-321,-313,310,333,211,2*-321,-311,-313,-311,211,
11857 &-321,3*-311,211,113,321,-15,5*-11,5*-13,221,331,333,221,331,333/
11858 DATA (kfdp(i,1),i= 508, 924)/10221,211,213,211,213,321,323,321,
11859 &323,2212,221,331,333,221,2*2,6*12,6*14,2*16,3*-411,3*-413,2*-411,
11860 &2*-413,2*441,2*443,2*20443,2*2,2*4,2,4,6*12,6*14,2*16,3*-421,
11861 &3*-423,2*-421,2*-423,2*441,2*443,2*20443,2*2,2*4,2,4,6*12,6*14,
11862 &2*16,3*-431,3*-433,2*-431,2*-433,3*441,3*443,3*20443,2*2,2*4,2,4,
11863 &16,2*4,2*12,2*14,2*16,4*2,4*4,2*-11,2*-13,2*-1,2*-3,2*-11,2*-13,
11864 &2*-1,3*22,111,211,2*22,211,22,211,111,3*22,111,82,21,3*0,2*211,
11865 &321,3*311,2*321,421,2*411,2*421,431,511,521,531,541,211,111,13,
11866 &11,211,22,211,2*111,321,130,-213,113,213,211,22,111,11,13,82,11,
11867 &13,15,1,2,3,4,21,22,3*0,223,321,311,323,313,2*311,321,313,323,
11868 &321,423,2*413,2*423,413,523,2*513,2*523,2*513,523,223,213,113,
11869 &-213,313,-313,323,-323,82,21,3*0,221,321,2*311,321,421,2*411,421,
11870 &411,421,521,2*511,2*521,2*511,521,221,211,111,321,130,310,211,
11871 &111,321,130,310,443,82,553,21,3*0,113,213,323,2*313,323,423,
11872 &2*413,2*423,413,523,2*513,2*523,2*513,523,213,-213,10211,10111,
11873 &-10211,2*221,213,2*113,-213,2*321,2*311,313,-313,323,-323,443,82,
11874 &553,21,3*0,213,113,221,223,321,211,321,311,323,313,323,313,321,
11875 &4*311,321,313,323,313,323,311,4*321,421,411,423,413,423,413,421,
11876 &2*411,421,413,423,413,423,411,2*421,411,423,413,521,511,523,513,
11877 &523,513,521,2*511,521,513,523,513,523,511,2*521,511,523,513,511/
11878 DATA (kfdp(i,1),i= 925,2000)/521,513,523,213,-213,221,223,321,
11879 &130,310,111,211,111,2*211,321,130,310,221,111,321,130,310,221,
11880 &211,111,443,82,553,21,3*0,111,211,-12,12,-14,14,211,111,211,111,
11881 &11,13,82,4*443,10441,20443,445,441,11,13,15,1,2,3,4,21,22,2*553,
11882 &10551,20553,555,2212,2*2112,-12,7*-11,7*-13,2*2224,2*2212,2*2214,
11883 &2*3122,2*3212,2*3214,5*3222,4*3224,2*3322,3324,2*2224,7*2212,
11884 &5*2214,2*2112,2*2114,2*3122,2*3212,2*3214,2*3222,2*3224,4*2,3,
11885 &2*2,1,2*2,2*0,-12,-14,-16,5*4122,441,443,20443,2*-2,2*-4,-2,-4,
11886 &2*0,2112,-12,3122,2212,2112,2212,3*3122,3*4122,4132,4232,0,
11887 &3*5122,5132,5232,0,2112,2212,2*2112,2212,2112,2*2212,3122,3212,
11888 &3112,3122,3222,3112,3122,3222,3212,3322,3312,3322,3312,3122,3322,
11889 &3312,-12,3*4122,2*4132,2*4232,4332,3*5122,5132,5232,5332,847*0/
11890 DATA (kfdp(i,2),i= 1, 476)/3*1,2,4,6,8,1,3*2,1,3,5,7,2,3*3,2,4,
11891 &6,8,3,3*4,1,3,5,7,4,3*5,2,4,6,8,5,3*6,1,3,5,7,6,5,3*7,2,4,6,8,7,
11892 &4,6,3*8,1,3,5,7,8,5,7,2*11,12,11,12,2*11,2*13,14,13,14,13,11,13,
11893 &-211,-213,-211,-213,-211,-213,3*-211,-321,-323,-321,-323,3*-321,
11894 &4*-211,-213,-211,-213,-211,-213,-211,-213,-211,-213,6*-211,2*15,
11895 &16,15,16,15,18,2*17,18,17,2*18,2*17,-1,-2,-3,-4,-5,-6,-7,-8,21,
11896 &-1,-2,-3,-4,-5,-6,-7,-8,-11,-13,-15,-17,-1,-2,-3,-4,-5,-6,-7,-8,
11897 &-11,-12,-13,-14,-15,-16,-17,-18,2,4,6,8,2,4,6,8,2,4,6,8,2,4,6,8,
11898 &12,14,16,18,-1,-2,-3,-4,-5,-6,-7,-8,-11,-13,-15,-17,21,22,2*23,
11899 &-24,-1,-2,-3,-4,-5,-6,-7,-8,-11,-12,-13,-14,-15,-16,-17,-18,-24,
11900 &-37,22,25,2*36,2,4,6,8,2,4,6,8,2,4,6,8,2,4,6,8,12,14,16,18,23,22,
11901 &25,-1,-2,-3,-4,-5,-6,-7,-8,-11,-13,-15,-17,21,22,2*23,-24,2*25,
11902 &36,-1,-2,-3,-4,-5,-6,-7,-8,-11,-13,-15,-17,21,22,2*23,-24,25,2,4,
11903 &6,8,12,14,16,18,25,-5,-6,21,11,-3,-4,-5,-6,-7,-8,-13,-15,-17,-82,
11904 &12,14,-1,-3,11,13,15,1,4,3,4,1,3,5,3,5,6,4,21,22,4,7,5,2,4,6,8,2,
11905 &4,6,8,2,4,6,8,2,4,6,8,12,14,16,18,14,2*0,14,111,211,111,-11,-13,
11906 &11*12,11*14,2*211,2*213,211,20213,2*321,2*323,211,213,211,213,
11907 &211,213,211,213,211,213,211,213,3*211,213,211,2*321,8*211,2*113,
11908 &2*211,8*12,8*14,2*211,2*213,2*111,221,2*113,223,333,20213,211,
11909 &2*321,323,2*311,313,-211,111,113,2*211,321,2*211,311,321,310,211/
11910 DATA (kfdp(i,2),i= 477, 857)/-211,4*211,321,4*211,113,2*211,-321,
11911 &16,5*12,5*14,3*211,3*213,211,2*111,2*113,2*-311,2*-313,-2112,
11912 &3*321,323,2*-1,6*-11,6*-13,2*-15,211,213,20213,211,213,20213,431,
11913 &433,431,433,311,313,311,313,311,313,-1,-4,-3,-4,-1,-3,6*-11,
11914 &6*-13,2*-15,211,213,20213,211,213,20213,431,433,431,433,321,323,
11915 &321,323,321,323,-1,-4,-3,-4,-1,-3,6*-11,6*-13,2*-15,211,213,
11916 &20213,211,213,20213,431,433,431,433,221,331,333,221,331,333,221,
11917 &331,333,-1,-4,-3,-4,-1,-3,-15,-3,-1,2*-11,2*-13,2*-15,-1,-4,-3,
11918 &-4,-3,-4,-1,-4,2*12,2*14,2,3,2,3,2*12,2*14,2,1,22,11,22,111,-211,
11919 &211,11,-211,13,-211,111,113,223,22,111,-82,21,3*0,111,22,-211,
11920 &111,22,211,111,22,211,111,22,111,6*22,-211,22,-13,-11,-211,111,
11921 &-211,2*111,-321,310,211,111,2*-211,221,22,-11,-13,-82,-11,-13,
11922 &-15,-1,-2,-3,-4,2*21,3*0,211,-213,113,-211,111,223,213,113,211,
11923 &111,223,211,111,-211,111,321,311,-211,111,211,111,-321,-311,411,
11924 &421,111,-211,111,211,-311,311,-321,321,-82,21,3*0,211,-211,111,
11925 &211,111,211,111,-211,111,311,321,-211,111,211,111,-321,-311,411,
11926 &421,111,-211,111,-321,130,310,-211,111,-321,130,310,22,-82,22,21,
11927 &3*0,211,111,-211,111,211,111,211,111,-211,111,321,311,-211,111,
11928 &211,111,-321,-311,411,421,-211,211,-211,111,2*211,111,-211,211,
11929 &111,211,-321,2*-311,-321,-311,311,-321,321,22,-82,22,21,3*0,111/
11930 DATA (kfdp(i,2),i= 858,2000)/3*211,-311,22,-211,111,-211,111,
11931 &-211,211,-213,113,223,221,211,111,211,111,2*211,213,113,223,221,
11932 &22,211,111,211,111,4*211,-211,111,-211,111,-211,211,-211,211,321,
11933 &311,321,311,-211,111,-211,111,-211,211,-211,2*211,111,211,111,
11934 &4*211,-321,-311,-321,-311,411,421,411,421,-211,211,111,211,-321,
11935 &130,310,22,-211,111,2*-211,-321,130,310,221,111,-321,130,310,221,
11936 &-211,111,22,-82,22,21,3*0,111,-211,11,-11,13,-13,-211,111,-211,
11937 &111,-11,-13,-82,211,111,221,111,4*22,-11,-13,-15,-1,-2,-3,-4,
11938 &2*21,211,111,3*22,-211,111,22,11,7*12,7*14,-321,-323,-311,-313,
11939 &-311,-313,211,213,211,213,211,213,111,221,331,113,223,111,221,
11940 &113,223,321,323,321,-211,-213,111,221,331,113,223,333,10221,111,
11941 &221,331,113,223,211,213,211,213,321,323,321,323,321,323,311,313,
11942 &311,313,2*-1,-3,-1,2203,3201,3203,2203,2101,2103,2*0,11,13,15,
11943 &-211,-213,-20213,-431,-433,3*3122,1,4,3,4,1,3,2*0,-211,11,22,111,
11944 &211,22,-211,111,22,-211,111,211,2*22,0,-211,111,211,2*22,0,
11945 &2*-211,111,22,111,211,22,211,2*-211,2*111,-211,2*211,111,211,
11946 &-211,2*111,211,-321,-211,111,11,-211,111,211,111,22,111,2*22,
11947 &-211,111,211,3*22,847*0/
11948 DATA (kfdp(i,3),i= 1, 944)/75*0,14,6*0,2*16,2*0,5*111,310,130,
11949 &2*0,2*111,310,130,321,113,211,223,221,2*113,2*211,2*223,2*221,
11950 &2*113,221,113,2*213,-213,195*0,4*3,4*4,1,4,3,2*2,10*81,25*0,-211,
11951 &3*111,-311,-313,-311,-321,-313,-323,111,221,331,113,223,-311,
11952 &-313,-311,-321,-313,-323,111,221,331,113,223,22*0,111,113,2*211,
11953 &-211,-311,211,111,3*211,-211,7*211,-321,-323,-311,-321,-313,-323,
11954 &-211,-213,-321,-323,-311,-321,-313,-323,-211,-213,22*0,111,113,
11955 &-311,2*-211,211,-211,310,-211,2*111,211,2*-211,-321,-211,2*211,
11956 &-211,111,-211,2*211,0,221,331,333,321,311,221,331,333,321,311,
11957 &20*0,3,0,-411,-413,-10413,-10411,-20413,-415,-411,-413,-10413,
11958 &-10411,-20413,-415,-411,-413,16*0,-4,-1,-4,-3,2*-2,-421,-423,
11959 &-10423,-10421,-20423,-425,-421,-423,-10423,-10421,-20423,-425,
11960 &-421,-423,16*0,-4,-1,-4,-3,2*-2,-431,-433,-10433,-10431,-20433,
11961 &-435,-431,-433,-10433,-10431,-20433,-435,-431,-433,19*0,-4,-1,-4,
11962 &-3,2*-2,3*0,441,443,441,443,441,443,-4,-1,-4,-3,-4,-3,-4,-1,531,
11963 &533,531,533,3,2,3,2,511,513,511,513,1,2,0,-11,0,2*111,-211,-11,
11964 &11,-13,2*221,3*0,111,27*0,111,2*0,22,111,5*0,111,12*0,2*21,103*0,
11965 &-211,2*111,-211,3*111,-211,111,211,14*0,111,6*0,111,-211,8*0,111,
11966 &-211,9*0,111,-211,111,-211,4*0,111,-211,111,-211,8*0,111,-211,
11967 &111,-211,4*0,111,-211,111,-211,11*0,-211,6*0,111,211,4*0,111/
11968 DATA (kfdp(i,3),i= 945,2000)/13*0,2*111,211,-211,211,-211,7*0,
11969 &-211,111,13*0,2*21,-211,111,6*0,2212,3122,3212,3214,2112,2114,
11970 &2212,2112,3122,3212,3214,2112,2114,2212,2112,52*0,3*3,1,8*0,
11971 &3*4122,8*0,4,1,4,3,2*2,3*0,2112,43*0,3322,861*0/
11972 DATA (kfdp(i,4),i= 1,2000)/88*0,3*111,8*0,-211,0,-211,3*0,111,
11973 &2*-211,0,111,0,2*111,113,221,111,-213,-211,211,195*0,13*81,41*0,
11974 &111,211,111,211,7*0,111,211,111,211,35*0,2*-211,2*111,211,111,
11975 &-211,2*211,2*-211,2*0,-211,111,-211,111,4*0,-211,111,-211,111,
11976 &34*0,111,-211,3*111,3*-211,2*111,3*-211,4*0,-321,-311,3*0,-321,
11977 &-311,20*0,-3,31*0,6*1,30*0,6*2,33*0,6*3,9*0,8*4,4*0,4*-5,4*0,
11978 &2*-5,7*0,-11,264*0,111,-211,4*0,111,57*0,-211,111,5*0,-211,111,
11979 &52*0,2101,2103,2*2101,19*0,6*2101,909*0/
11980 DATA (kfdp(i,5),i= 1,2000)/90*0,111,16*0,111,7*0,111,0,2*111,
11981 &303*0,-211,2*111,-211,111,-211,111,54*0,111,-211,3*111,-211,111,
11985 DATA (chaf(i) ,i= 1, 281)/
'd',
'u',
's',
'c',
'b',
't',
'l',
'h',
11986 &2*
' ',
'e',
'nu_e',
'mu',
'nu_mu',
'tau',
'nu_tau',
'chi',
'nu_chi',
11987 &2*
' ',
'g',
'gamma',
'Z',
'W',
'H',2*
' ',
'reggeon',
'pomeron',2*
' ',
11988 &
'Z''',
'Z"',
'W''',
'H''',
'A',
'H',
'eta_tech',
'LQ_ue',
'R',40*
' ',
11989 &
'specflav',
'rndmflav',
'phasespa',
'c-hadron',
'b-hadron',
11990 &
't-hadron',
'l-hadron',
'h-hadron',
'Wvirt',
'diquark',
'cluster',
11991 &
'string',
'indep.',
'CMshower',
'SPHEaxis',
'THRUaxis',
'CLUSjet',
11992 &
'CELLjet',
'table',
' ',
'pi',2*
'K',2*
'D',
'D_s',2*
'B',
'B_s',
'B_c',
11993 &
'pi',
'eta',
'eta''',
'eta_c',
'eta_b',
'eta_t',
'eta_l',
'eta_h',2*
' ',
11994 &
'rho',2*
'K*',2*
'D*',
'D*_s',2*
'B*',
'B*_s',
'B*_c',
'rho',
'omega',
11995 &
'phi',
'J/psi',
'Upsilon',
'Theta',
'Theta_l',
'Theta_h',2*
' ',
'b_1',
11996 &2*
'K_1',2*
'D_1',
'D_1s',2*
'B_1',
'B_1s',
'B_1c',
'b_1',
'h_1',
'h''_1',
11997 &
'h_1c',
'h_1b',
'h_1t',
'h_1l',
'h_1h',2*
' ',
'a_0',2*
'K*_0',2*
'D*_0',
11998 &
'D*_0s',2*
'B*_0',
'B*_0s',
'B*_0c',
'a_0',
'f_0',
'f''_0',
'chi_0c',
11999 &
'chi_0b',
'chi_0t',
'chi_0l',
'chi_0h',2*
' ',
'a_1',2*
'K*_1',
12000 &2*
'D*_1',
'D*_1s',2*
'B*_1',
'B*_1s',
'B*_1c',
'a_1',
'f_1',
'f''_1',
12001 &
'chi_1c',
'chi_1b',
'chi_1t',
'chi_1l',
'chi_1h',2*
' ',
'a_2',
12002 &2*
'K*_2',2*
'D*_2',
'D*_2s',2*
'B*_2',
'B*_2s',
'B*_2c',
'a_2',
'f_2',
12003 &
'f''_2',
'chi_2c',
'chi_2b',
'chi_2t',
'chi_2l',
'chi_2h',2*
' ',
'K_L',
12004 &
'K_S',8*
' ',
'psi''',3*
' ',
'Upsilon''',45*
' ',
'pi_diffr'/
12005 DATA (chaf(i) ,i= 282, 500)/
'n_diffr',
'p_diffr',
'rho_diff',
12006 &
'omega_di',
'phi_diff',
'J/psi_di',18*
' ',
'Lambda',5*
' ',
12007 &
'Lambda_c',
' ',2*
'Xi_c',6*
' ',
'Lambda_b',
' ',2*
'Xi_b',6*
' ',
'n',
12008 &
'p',
' ',3*
'Sigma',2*
'Xi',
' ',3*
'Sigma_c',2*
'Xi''_c',
'Omega_c',
12009 &4*
' ',3*
'Sigma_b',2*
'Xi''_b',
'Omega_b',4*
' ',4*
'Delta',
12010 &3*
'Sigma*',2*
'Xi*',
'Omega',3*
'Sigma*_c',2*
'Xi*_c',
'Omega*_c',
12011 &4*
' ',3*
'Sigma*_b',2*
'Xi*_b',
'Omega*_b',114*
' '/
12014 DATA mrlu/19780503,0,0,97,33,0/
12040 common/lujets/
n,
k(4000,5),
p(4000,5),
v(4000,5)
12041 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
12042 SAVE /lujets/,/ludat1/
12046 ndecay=itau+iorig+kforig
12047 WRITE(mstu(11),5000)
12051 5000
FORMAT(1
x,
'Error: you did not link your LUTAUD routine ',
12052 &
'correctly.'/1
x,
'Dummy routine in JETSET file called instead.'/
12053 &1
x,
'Execution stopped!')