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)
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
303 pa2=
sqrt(
max(1
e-10,(0.5*(2.-
x1-x3)*pecm)**2-pm2**2))
304 pa3=
sqrt(
max(1
e-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))
309 IF(mkerr.NE.0) CALL
luerrm(13,
310 &
'(LU3ENT:) unphysical kinematical variable setup')
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
449 pa4=
sqrt(
max(1
e-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(1
e-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)
987 ps(1,6)=ps(1,6)+
luchge(k(i,2))
1000 IF(k(ip,1).GT.0.AND.k(ip,1).LE.10) kc=
lucomp(k(ip,2))
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
1032 IF(kchg(
lucomp(k(k(ip,3),2)),2).EQ.0) mfrag=
min(1,mfrag)
1035 IF(mfrag.EQ.1) CALL
lustrf(ip)
1036 IF(mfrag.EQ.2) CALL
luindf(ip)
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')
1079 IMPLICIT DOUBLE PRECISION(
d)
1080 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
1081 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
1082 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
1083 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
1084 SAVE /lujets/,/ludat1/,/ludat2/,/ludat3/
1085 dimension dps(5),dpc(5),ue(3)
1090 DO 120 i=
max(1,ip),
n
1091 IF(k(i,1).NE.3) goto 120
1093 IF(kc.EQ.0) goto 120
1095 IF(kq.EQ.0.OR.(mqgst.EQ.1.AND.kq.EQ.2)) goto 120
1099 IF(kq*isign(1,k(i,2)).LT.0) kcs=5
1103 IF(nstp.GT.4*
n)
THEN
1104 CALL
luerrm(14,
'(LUPREP:) caught in infinite loop')
1109 IF(k(ia,1).EQ.3)
THEN
1110 IF(i1.GE.mstu(4)-mstu(32)-5)
THEN
1111 CALL
luerrm(11,
'(LUPREP:) no more memory left in LUJETS')
1116 IF(nstp.GE.2.AND.iabs(k(ia,2)).NE.21) k(i1,1)=1
1126 IF(k(i1,1).EQ.1) goto 120
1131 IF(
mod(k(ib,kcs)/mstu(5)**2,2).EQ.0.AND.
mod(k(ib,kcs),mstu(5))
1133 ia=
mod(k(ib,kcs),mstu(5))
1134 k(ib,kcs)=k(ib,kcs)+mstu(5)**2
1137 IF(k(ib,kcs).GE.2*mstu(5)**2.OR.
mod(k(ib,kcs)/mstu(5),mstu(5))
1139 ia=
mod(k(ib,kcs)/mstu(5),mstu(5))
1140 k(ib,kcs)=k(ib,kcs)+2*mstu(5)**2
1143 IF(ia.LE.0.OR.ia.GT.
n)
THEN
1144 CALL
luerrm(12,
'(LUPREP:) colour rearrangement failed')
1147 IF(
mod(k(ia,4)/mstu(5),mstu(5)).EQ.ib.OR.
mod(k(ia,5)/mstu(5),
1148 &mstu(5)).EQ.ib)
THEN
1149 IF(mrev.EQ.1) kcs=9-kcs
1150 IF(
mod(k(ia,kcs)/mstu(5),mstu(5)).NE.ib) kcs=9-kcs
1151 k(ia,kcs)=k(ia,kcs)+2*mstu(5)**2
1153 IF(mrev.EQ.0) kcs=9-kcs
1154 IF(
mod(k(ia,kcs),mstu(5)).NE.ib) kcs=9-kcs
1155 k(ia,kcs)=k(ia,kcs)+mstu(5)**2
1157 IF(ia.NE.i) goto 100
1162 IF(mstj(14).LT.0)
RETURN
1165 IF(mstj(14).EQ.0) goto 320
1170 DO 190 i=
max(1,ip),
ns
1171 IF(k(i,1).NE.1.AND.k(i,1).NE.2)
THEN
1172 ELSEIF(k(i,1).EQ.2.AND.ic.EQ.0)
THEN
1180 ELSEIF(k(i,1).EQ.2)
THEN
1182 dps(j)=dps(j)+
p(i,j)
1184 ELSEIF(ic.NE.0.AND.kchg(
lucomp(k(i,2)),2).NE.0)
THEN
1186 dps(j)=dps(j)+
p(i,j)
1189 dps(5)=dps(5)+
ulmass(k(i,2))
1190 pd=
sqrt(
max(0d0,dps(4)**2-dps(1)**2-dps(2)**2-dps(3)**2))-dps(5)
1204 IF(pdm.GE.parj(32)) goto 320
1208 pecm=
sqrt(
max(0d0,dpc(4)**2-dpc(1)**2-dpc(2)**2-dpc(3)**2))
1223 IF(mstu(16).NE.2)
THEN
1234 IF(iabs(k(ic1,2)).NE.21)
THEN
1237 IF(kc1.EQ.0.OR.kc2.EQ.0) goto 320
1238 kq1=kchg(kc1,2)*isign(1,k(ic1,2))
1239 kq2=kchg(kc2,2)*isign(1,k(ic2,2))
1240 IF(kq1+kq2.NE.0) goto 320
1241 200 CALL
lukfdi(k(ic1,2),0,kfln,k(
n+2,2))
1242 CALL
lukfdi(k(ic2,2),-kfln,kfldmp,k(
n+3,2))
1243 IF(k(
n+2,2).EQ.0.OR.k(
n+3,2).EQ.0) goto 200
1245 IF(iabs(k(ic2,2)).NE.21) goto 320
1246 210 CALL
lukfdi(1+
int((2.+parj(2))*
rlu(0)),0,kfln,kfdmp)
1247 CALL
lukfdi(kfln,0,kflm,k(
n+2,2))
1248 CALL
lukfdi(-kfln,-kflm,kfldmp,k(
n+3,2))
1249 IF(k(
n+2,2).EQ.0.OR.k(
n+3,2).EQ.0) goto 210
1253 IF(
p(
n+2,5)+
p(
n+3,5)+parj(64).GE.pecm.AND.nsin.EQ.1) goto 320
1254 IF(
p(
n+2,5)+
p(
n+3,5)+parj(64).GE.pecm) goto 260
1257 IF(pecm.GE.0.02*dpc(4))
THEN
1258 pa=
sqrt((pecm**2-(
p(
n+2,5)+
p(
n+3,5))**2)*(pecm**2-
1259 & (
p(
n+2,5)-
p(
n+3,5))**2))/(2.*pecm)
1271 CALL ludbrb(
n+2,
n+3,0.,0.,dpc(1)/dpc(4),dpc(2)/dpc(4),
1276 IF(k(i,1).EQ.1.OR.k(i,1).EQ.2) np=np+1
1278 ha=
p(ic1,4)*
p(ic2,4)-
p(ic1,1)*
p(ic2,1)-
p(ic1,2)*
p(ic2,2)-
1280 IF(np.GE.3.OR.ha.LE.1.25*
p(ic1,5)*
p(ic2,5)) goto 260
1281 hd1=0.5*(
p(
n+2,5)**2-
p(ic1,5)**2)
1282 hd2=0.5*(
p(
n+3,5)**2-
p(ic2,5)**2)
1283 hr=
sqrt(
max(0.,((ha-hd1-hd2)**2-(
p(
n+2,5)*
p(
n+3,5))**2)/
1284 & (ha**2-(
p(ic1,5)*
p(ic2,5))**2)))-1.
1285 hc=
p(ic1,5)**2+2.*ha+
p(ic2,5)**2
1286 hk1=((
p(ic2,5)**2+ha)*hr+hd1-hd2)/hc
1287 hk2=((
p(ic1,5)**2+ha)*hr+hd2-hd1)/hc
1289 p(
n+2,j)=(1.+hk1)*
p(ic1,j)-hk2*
p(ic2,j)
1290 p(
n+3,j)=(1.+hk2)*
p(ic2,j)-hk1*
p(ic1,j)
1306 IF(iabs(k(ic1,2)).GT.100.AND.iabs(k(ic2,2)).GT.100)
THEN
1308 ELSEIF(iabs(k(ic1,2)).NE.21)
THEN
1309 CALL
lukfdi(k(ic1,2),k(ic2,2),kfldmp,k(
n+2,2))
1311 kfln=1+
int((2.+parj(2))*
rlu(0))
1312 CALL
lukfdi(kfln,-kfln,kfldmp,k(
n+2,2))
1314 IF(k(
n+2,2).EQ.0) goto 260
1322 IF(ir.NE.0) goto 280
1323 DO 270 i=
max(1,ip),
n
1324 IF(k(i,1).LE.0.OR.k(i,1).GT.10.OR.(i.GE.ic1.AND.i.LE.ic2
1325 &.AND.k(i,1).GE.1.AND.k(i,1).LE.2)) goto 270
1326 IF(mcomb.EQ.1) kci=
lucomp(k(i,2))
1327 IF(mcomb.EQ.1.AND.kci.EQ.0) goto 270
1328 IF(mcomb.EQ.1.AND.kchg(kci,2).EQ.0.AND.i.LE.
ns) goto 270
1329 IF(mcomb.EQ.2.AND.iabs(k(i,2)).GT.10.AND.iabs(k(i,2)).LE.100)
1331 hcr=dpc(4)*
p(i,4)-dpc(1)*
p(i,1)-dpc(2)*
p(i,2)-dpc(3)*
p(i,3)
1332 hsr=2.*hcr+pecm**2-
p(
n+2,5)**2-2.*
p(
n+2,5)*
p(i,5)
1346 hk2=0.5*(hb*
sqrt(
max(0.,((hb+hc)**2-4.*(hb+hd)*
p(
n+2,5)**2)/
1347 & (ha**2-(pecm*
p(ir,5))**2)))-(hb+hc))/(hb+hd)
1348 hk1=(0.5*(
p(
n+2,5)**2-pecm**2)+hd*hk2)/hb
1350 p(
n+2,j)=(1.+hk1)*dpc(j)-hk2*
p(ir,j)
1351 p(ir,j)=(1.+hk2)*
p(ir,j)-hk1*dpc(j)
1359 CALL
luerrm(3,
'(LUPREP:) no match for collapsing cluster')
1364 300
DO 310 i=ic1,ic2
1365 IF((k(i,1).EQ.1.OR.k(i,1).EQ.2).AND.kchg(
lucomp(k(i,2)),2).NE.0)
1368 IF(mstu(16).NE.2)
THEN
1377 IF(
n.LT.mstu(4)-mstu(32)-5) goto 140
1386 DO 360 i=
max(1,ip),
n
1387 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 360
1389 IF(kc.EQ.0) goto 360
1390 kq=kchg(kc,2)*isign(1,k(i,2))
1391 IF(kq.EQ.0) goto 360
1397 dps(5)=dps(5)+
ulmass(k(i,2))
1400 dps(j)=dps(j)+
p(i,j)
1402 IF(k(i,1).EQ.1)
THEN
1403 IF(np.NE.1.AND.(kfn.EQ.1.OR.kfn.GE.3.OR.kqs.NE.0)) CALL
1404 &
luerrm(2,
'(LUPREP:) unphysical flavour combination')
1405 IF(np.NE.1.AND.dps(4)**2-dps(1)**2-dps(2)**2-dps(3)**2.LT.
1406 & (0.9*parj(32)+dps(5))**2) CALL
luerrm(3,
1407 &
'(LUPREP:) too small mass in jet system')
1428 IMPLICIT DOUBLE PRECISION(
d)
1429 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
1430 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
1431 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
1432 SAVE /lujets/,/ludat1/,/ludat2/
1433 dimension dps(5),
psi(4),nfi(3),nfl(3),ifet(3),kflf(3),
1434 &kflo(2),pxo(2),pyo(2),wo(2)
1446 IF(i.GT.
min(
n,mstu(4)-mstu(32)))
THEN
1447 CALL
luerrm(12,
'(LUINDF:) failed to reconstruct jet system')
1448 IF(mstu(21).GE.1)
RETURN
1450 IF(k(i,1).NE.1.AND.k(i,1).NE.2) goto 110
1452 IF(kc.EQ.0) goto 110
1453 kq=kchg(kc,2)*isign(1,k(i,2))
1454 IF(kq.EQ.0) goto 110
1456 IF(kq.NE.2) kqsum=kqsum+kq
1458 k(nsav+njet,j)=k(i,j)
1459 p(nsav+njet,j)=
p(i,j)
1460 dps(j)=dps(j)+
p(i,j)
1463 IF(k(i,1).EQ.2.OR.(mstj(3).LE.5.AND.
n.GT.i.AND.
1464 &k(i+1,1).EQ.2)) goto 110
1465 IF(njet.NE.1.AND.kqsum.NE.0)
THEN
1466 CALL
luerrm(12,
'(LUINDF:) unphysical flavour combination')
1467 IF(mstu(21).GE.1)
RETURN
1473 CALL ludbrb(nsav+1,nsav+njet,0.,0.,-dps(1)/dps(4),
1474 & -dps(2)/dps(4),-dps(3)/dps(4))
1480 DO 140 i=nsav+1,nsav+njet
1484 nfi(kfa)=nfi(kfa)+isign(1,k(i,2))
1485 ELSEIF(kfa.GT.1000)
THEN
1486 kfla=
mod(kfa/1000,10)
1487 kflb=
mod(kfa/100,10)
1488 IF(kfla.LE.3) nfi(kfla)=nfi(kfla)+isign(1,k(i,2))
1489 IF(kflb.LE.3) nfi(kflb)=nfi(kflb)+isign(1,k(i,2))
1496 IF(ntry.GT.200)
THEN
1497 CALL
luerrm(14,
'(LUINDF:) caught in infinite loop')
1498 IF(mstu(21).GE.1)
RETURN
1509 DO 230 ip1=nsav+1,nsav+njet
1516 IF(kflh.GT.10) kflh=
mod(kflh/1000,10)
1518 wf=
p(ip1,4)+
sqrt(
p(ip1,1)**2+
p(ip1,2)**2+
p(ip1,3)**2)
1521 170
IF(iabs(k(ip1,2)).NE.21)
THEN
1524 CALL
luptdi(0,pxo(1),pyo(1))
1528 ELSEIF(mstj(2).LE.2)
THEN
1530 IF(mstj(2).EQ.2) mstj(91)=1
1531 kflo(1)=
int(1.+(2.+parj(2))*
rlu(0))*(-1)**
int(
rlu(0)+0.5)
1532 CALL
luptdi(0,pxo(1),pyo(1))
1539 IF(mstj(2).EQ.4) mstj(91)=1
1540 kflo(1)=
int(1.+(2.+parj(2))*
rlu(0))*(-1)**
int(
rlu(0)+0.5)
1542 CALL
luptdi(0,pxo(1),pyo(1))
1545 wo(1)=wf*
rlu(0)**(1./3.)
1561 IF(i.GE.mstu(4)-mstu(32)-njet-5)
THEN
1562 CALL
luerrm(11,
'(LUINDF:) no more memory left in LUJETS')
1563 IF(mstu(21).GE.1)
RETURN
1570 200 CALL
lukfdi(kfl1,0,kfl2,k(i,2))
1571 IF(k(i,2).EQ.0) goto 180
1572 IF(mstj(12).GE.3.AND.irank.EQ.1.AND.iabs(kfl1).LE.10.AND.
1573 &iabs(kfl2).GT.10)
THEN
1574 IF(
rlu(0).GT.parj(19)) goto 200
1579 CALL
luptdi(kfl1,px2,py2)
1582 pr=
p(i,5)**2+
p(i,1)**2+
p(i,2)**2
1585 IF(iabs(kfl1).GE.4.AND.iabs(kfl1).LE.8.AND.mstu(90).LT.8)
THEN
1593 IF(mstj(3).GE.1.AND.irank.EQ.1.AND.kflh.GE.4.AND.
1594 &
p(i,3).LE.0.001)
THEN
1595 IF(
w.GE.
p(i,5)+0.5*parj(32)) goto 180
1611 IF(mstj(3).GE.0.AND.
p(i,3).LT.0.)
THEN
1613 IF(mzsav.EQ.1) mstu(90)=mstu(90)-1
1615 IF(
w.GT.parj(31)) goto 190
1618 IF(
mod(mstj(3),5).EQ.4.AND.
n.EQ.nsav1) wf=wf+0.1*parj(32)
1619 IF(
mod(mstj(3),5).EQ.4.AND.
n.EQ.nsav1) goto 170
1625 CALL ludbrb(nsav1+1,
n,the,
phi,0d0,0d0,0d0)
1626 k(k(ip1,3),4)=nsav1+1
1631 IF(njet.EQ.1.OR.mstj(3).LE.0) goto 490
1632 IF(
mod(mstj(3),5).NE.0.AND.
n-nsav-njet.LT.2) goto 150
1635 DO 240 i=nsav+njet+1,
n
1637 kfla=
mod(kfa/1000,10)
1638 kflb=
mod(kfa/100,10)
1641 IF(kflb.LE.3) nfl(kflb)=nfl(kflb)-isign(1,k(i,2))*(-1)**kflb
1642 IF(kflc.LE.3) nfl(kflc)=nfl(kflc)+isign(1,k(i,2))*(-1)**kflb
1644 IF(kfla.LE.3) nfl(kfla)=nfl(kfla)-isign(1,k(i,2))
1645 IF(kflb.LE.3) nfl(kflb)=nfl(kflb)-isign(1,k(i,2))
1646 IF(kflc.LE.3) nfl(kflc)=nfl(kflc)-isign(1,k(i,2))
1649 nreq=(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3))-iabs(nfl(1)+
1650 &nfl(2)+nfl(3)))/2+iabs(nfl(1)+nfl(2)+nfl(3))/3
1651 IF(nreq.EQ.0) goto 320
1657 DO 260 i=nsav+njet+1,
n
1658 p2=
p(i,1)**2+
p(i,2)**2+
p(i,3)**2
1659 IF(k(i,1).EQ.1.AND.
p2.LT.p2min) irem=i
1660 IF(k(i,1).EQ.1.AND.
p2.LT.p2min) p2min=
p2
1662 IF(irem.EQ.0) goto 150
1665 kfla=
mod(kfa/1000,10)
1666 kflb=
mod(kfa/100,10)
1668 IF(kfla.GE.4.OR.kflb.GE.4) k(irem,1)=8
1669 IF(k(irem,1).EQ.8) goto 250
1671 isgn=isign(1,k(irem,2))*(-1)**kflb
1672 IF(kflb.LE.3) nfl(kflb)=nfl(kflb)+isgn
1673 IF(kflc.LE.3) nfl(kflc)=nfl(kflc)-isgn
1675 IF(kfla.LE.3) nfl(kfla)=nfl(kfla)+isign(1,k(irem,2))
1676 IF(kflb.LE.3) nfl(kflb)=nfl(kflb)+isign(1,k(irem,2))
1677 IF(kflc.LE.3) nfl(kflc)=nfl(kflc)+isign(1,k(irem,2))
1680 nreq=(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3))-iabs(nfl(1)+
1681 &nfl(2)+nfl(3)))/2+iabs(nfl(1)+nfl(2)+nfl(3))/3
1682 IF(nreq.GT.nrem) goto 250
1683 DO 270 i=nsav+njet+1,
n
1684 IF(k(i,1).EQ.8) k(i,1)=1
1689 IF(nfl(1)+nfl(2)+nfl(3).NE.0) nfet=3
1690 IF(nreq.LT.nrem) nfet=1
1691 IF(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3)).EQ.0) nfet=0
1693 ifet(j)=1+(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3)))*
rlu(0)
1694 kflf(j)=isign(1,nfl(1))
1695 IF(ifet(j).GT.iabs(nfl(1))) kflf(j)=isign(2,nfl(2))
1696 IF(ifet(j).GT.iabs(nfl(1))+iabs(nfl(2))) kflf(j)=isign(3,nfl(3))
1698 IF(nfet.EQ.2.AND.(ifet(1).EQ.ifet(2).OR.kflf(1)*kflf(2).GT.0))
1700 IF(nfet.EQ.3.AND.(ifet(1).EQ.ifet(2).OR.ifet(1).EQ.ifet(3).OR.
1701 &ifet(2).EQ.ifet(3).OR.kflf(1)*kflf(2).LT.0.OR.kflf(1)*kflf(3)
1702 &.LT.0.OR.kflf(1)*(nfl(1)+nfl(2)+nfl(3)).LT.0)) goto 280
1703 IF(nfet.EQ.0) kflf(1)=1+
int((2.+parj(2))*
rlu(0))
1704 IF(nfet.EQ.0) kflf(2)=-kflf(1)
1705 IF(nfet.EQ.1) kflf(2)=isign(1+
int((2.+parj(2))*
rlu(0)),-kflf(1))
1706 IF(nfet.LE.2) kflf(3)=0
1707 IF(kflf(3).NE.0)
THEN
1708 kflfc=isign(1000*
max(iabs(kflf(1)),iabs(kflf(3)))+
1709 & 100*
min(iabs(kflf(1)),iabs(kflf(3)))+1,kflf(1))
1710 IF(kflf(1).EQ.kflf(3).OR.(1.+3.*parj(4))*
rlu(0).GT.1.)
1711 & kflfc=kflfc+isign(2,kflfc)
1715 CALL
lukfdi(kflfc,kflf(2),kfldmp,kf)
1716 IF(kf.EQ.0) goto 280
1717 DO 300 j=1,
max(2,nfet)
1718 nfl(iabs(kflf(j)))=nfl(iabs(kflf(j)))-isign(1,kflf(j))
1723 DO 310 i=nsav+njet+1,
n
1724 IF(k(i,1).EQ.7) npos=npos-1
1725 IF(k(i,1).EQ.1.OR.npos.NE.0) goto 310
1729 p(i,4)=
sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2+
p(i,5)**2)
1732 nreq=(iabs(nfl(1))+iabs(nfl(2))+iabs(nfl(3))-iabs(nfl(1)+
1733 &nfl(2)+nfl(3)))/2+iabs(nfl(1)+nfl(2)+nfl(3))/3
1734 IF(nrem.GT.0) goto 280
1737 320
IF(
mod(mstj(3),5).NE.0.AND.
mod(mstj(3),5).NE.4)
THEN
1740 DO 330 i=nsav+njet+1,
n
1746 DO 350 i=nsav+njet+1,
n
1747 IF(
mod(mstj(3),5).EQ.1) pws=pws+
p(i,4)
1748 IF(
mod(mstj(3),5).EQ.2) pws=pws+
sqrt(
p(i,5)**2+(
psi(1)*
p(i,1)+
1750 IF(
mod(mstj(3),5).EQ.3) pws=pws+1.
1752 DO 370 i=nsav+njet+1,
n
1753 IF(
mod(mstj(3),5).EQ.1) pw=
p(i,4)
1754 IF(
mod(mstj(3),5).EQ.2) pw=
sqrt(
p(i,5)**2+(
psi(1)*
p(i,1)+
1756 IF(
mod(mstj(3),5).EQ.3) pw=1.
1758 p(i,j)=
p(i,j)-
psi(j)*pw/pws
1760 p(i,4)=
sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2+
p(i,5)**2)
1764 ELSEIF(
mod(mstj(3),5).EQ.4)
THEN
1771 DO 410 i=nsav+njet+1,
n
1775 pls=(
p(i,1)*
p(ir1,1)+
p(i,2)*
p(ir1,2)+
p(i,3)*
p(ir1,3))/
1776 & (
p(ir1,1)**2+
p(ir1,2)**2+
p(ir1,3)**2)
1778 p(ir2,j)=
p(ir2,j)+
p(i,j)-pls*
p(ir1,j)
1780 p(ir2,4)=
p(ir2,4)+
p(i,4)
1781 p(ir2,5)=
p(ir2,5)+pls
1785 IF(k(i,1).NE.0) pss=pss+
p(i,4)/(pecm*(0.8*
p(i,5)+0.2))
1787 DO 440 i=nsav+njet+1,
n
1790 pls=(
p(i,1)*
p(ir1,1)+
p(i,2)*
p(ir1,2)+
p(i,3)*
p(ir1,3))/
1791 & (
p(ir1,1)**2+
p(ir1,2)**2+
p(ir1,3)**2)
1793 p(i,j)=
p(i,j)-
p(ir2,j)/k(ir2,1)+(1./(
p(ir2,5)*pss)-1.)*pls*
1796 p(i,4)=
sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2+
p(i,5)**2)
1801 IF(
mod(mstj(3),5).NE.0)
THEN
1805 DO 450 i=nsav+njet+1,
n
1808 pqs=pqs+
p(i,5)**2/
p(i,4)
1810 IF(pms.GE.pecm) goto 150
1813 pfac=(pecm-pqs)/(pes-pqs)
1816 DO 480 i=nsav+njet+1,
n
1820 p(i,4)=
sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2+
p(i,5)**2)
1822 pqs=pqs+
p(i,5)**2/
p(i,4)
1824 IF(neco.LT.10.AND.abs(pecm-pes).GT.2
e-6*pecm) goto 460
1828 490
DO 500 i=nsav+njet+1,
n
1829 IF(mstu(16).NE.2) k(i,3)=nsav+1
1830 IF(mstu(16).EQ.2) k(i,3)=k(k(i,3),3)
1832 DO 510 i=nsav+1,nsav+njet
1835 IF(mstu(16).NE.2)
THEN
1839 k(i1,4)=k(i1,4)-njet+1
1840 k(i1,5)=k(i1,5)-njet+1
1841 IF(k(i1,5).LT.k(i1,4))
THEN
1859 p(nsav,5)=
sqrt(
max(0d0,dps(4)**2-dps(1)**2-dps(2)**2-dps(3)**2))
1861 DO 540 i=nsav+njet,
n
1863 k(i-njet+1,j)=k(i,j)
1864 p(i-njet+1,j)=
p(i,j)
1865 v(i-njet+1,j)=v(i,j)
1869 DO 550
iz=mstu90+1,mstu(90)
1870 mstu(90+
iz)=mstu(90+
iz)-njet+1
1874 IF(njet.NE.1) CALL ludbrb(nsav+1,
n,0.,0.,dps(1)/dps(4),
1875 &dps(2)/dps(4),dps(3)/dps(4))
1890 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
1891 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
1892 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
1893 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
1894 SAVE /lujets/,/ludat1/,/ludat2/,/ludat3/
1895 dimension vdcy(4),kflo(4),kfl1(4),pv(10,5),rord(10),ue(3),be(3),
1896 &wtcor(10),ptau(4),pcmtau(4)
1897 DOUBLE PRECISION dbetau(3)
1898 DATA wtcor/2.,5.,15.,60.,250.,1500.,1.2e4,1.2e5,150.,16./
1903 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)
1904 hmeps(ha)=((1.-hrq-ha)**2+3.*ha*(1.+hrq-ha))*
1905 &
sqrt((1.-hrq-ha)**2-4.*hrq*ha)
1911 kfs=isign(1,k(ip,2))
1916 IF(k(ip,1).EQ.5)
THEN
1918 ELSEIF(k(ip,1).NE.4)
THEN
1919 v(ip,5)=-pmas(kc,4)*
log(
rlu(0))
1922 vdcy(j)=v(ip,j)+v(ip,5)*
p(ip,j)/
p(ip,5)
1927 IF(mstj(22).EQ.2)
THEN
1928 IF(pmas(kc,4).GT.parj(71)) mout=1
1929 ELSEIF(mstj(22).EQ.3)
THEN
1930 IF(vdcy(1)**2+vdcy(2)**2+vdcy(3)**2.GT.parj(72)**2) mout=1
1931 ELSEIF(mstj(22).EQ.4)
THEN
1932 IF(vdcy(1)**2+vdcy(2)**2.GT.parj(73)**2) mout=1
1933 IF(abs(vdcy(3)).GT.parj(74)) mout=1
1935 IF(mout.EQ.1.AND.k(ip,1).NE.5)
THEN
1941 IF(kfa.EQ.15.AND.mstj(28).GE.1)
THEN
1952 120 imtau=k(imtau,3)
1959 ELSEIF(k(imtau,2).EQ.k(itau,2))
THEN
1961 IF(k(k(imtau,4),2).EQ.22)
THEN
1963 pcmtau(j)=pcmtau(j)+
p(k(imtau,4),j)
1965 ELSEIF(k(k(imtau,5),2).EQ.22)
THEN
1967 pcmtau(j)=pcmtau(j)+
p(k(imtau,5),j)
1972 ELSEIF(iabs(k(imtau,2)).GT.100)
THEN
1975 kforig=-isign(24,k(itau,2))
1977 DO 160 ii=k(imtau,4),k(imtau,5)
1978 IF(k(ii,2)*isign(1,k(itau,2)).EQ.-16)
THEN
1980 pcmtau(j)=pcmtau(j)+
p(ii,j)
1990 DO 170 ii=imtau+1,ip-1
1991 IF(k(ii,2).EQ.kforig.AND.k(ii,3).EQ.iorig.AND.
1992 & abs(
p(ii,5)-
p(iorig,5)).LT.1
e-5*
p(iorig,5)) iorig=ii
1995 pcmtau(j)=
p(iorig,j)
2002 dbetau(j)=pcmtau(j)/pcmtau(4)
2004 IF(kforig.NE.0) CALL ludbrb(itau,itau,0.,0.,-dbetau(1),
2005 & -dbetau(2),-dbetau(3))
2007 CALL ludbrb(itau,itau,0.,-phitau,0d0,0d0,0d0)
2009 CALL ludbrb(itau,itau,-thetau,0.,0d0,0d0,0d0)
2012 IF(kforig.NE.0.OR.mstj(28).EQ.2)
THEN
2013 CALL
lutaud(itau,iorig,kforig,ndecay)
2014 DO 200 ii=nsav+1,nsav+ndecay
2027 IF(kforig.NE.0.OR.mstj(28).EQ.2)
THEN
2028 CALL ludbrb(nsav+1,
n,thetau,phitau,0d0,0d0,0d0)
2029 IF(kforig.NE.0) CALL ludbrb(nsav+1,
n,0.,0.,dbetau(1),
2030 & dbetau(2),dbetau(3))
2042 IF((kfa.EQ.511.OR.kfa.EQ.531).AND.mstj(26).GE.1)
THEN
2044 IF(kfa.EQ.531) xbbmix=parj(77)
2045 IF(
sin(0.5*xbbmix*v(ip,5)/pmas(kc,4))**2.GT.
rlu(0)) mmix=1
2046 IF(mmix.EQ.1) kfs=-kfs
2051 IF(mdcy(kc,2).GT.0)
THEN
2052 mdmdcy=mdme(mdcy(kc,2),2)
2053 IF(mdmdcy.GT.80.AND.mdmdcy.LE.90) kca=mdmdcy
2055 IF(mdcy(kca,2).LE.0.OR.mdcy(kca,3).LE.0)
THEN
2056 CALL
luerrm(9,
'(LUDECY:) no decay channel defined')
2059 IF(
mod(kfa/1000,10).EQ.0.AND.(kca.EQ.85.OR.kca.EQ.87)) kfs=-kfs
2060 IF(kchg(kc,3).EQ.0)
THEN
2063 IF(
rlu(0).GT.0.5) kfs=-kfs
2064 ELSEIF(kfs.GT.0)
THEN
2075 DO 230 idl=mdcy(kca,2),mdcy(kca,2)+mdcy(kca,3)-1
2076 IF(mdme(idl,1).NE.1.AND.kfsp*mdme(idl,1).NE.2.AND.
2077 &kfsn*mdme(idl,1).NE.3) goto 230
2078 IF(mdme(idl,2).GT.100) goto 230
2083 CALL
luerrm(2,
'(LUDECY:) all decay channels closed by user')
2091 IF(mdme(idl,1).NE.1.AND.kfsp*mdme(idl,1).NE.2.AND.
2092 &kfsn*mdme(idl,1).NE.3)
THEN
2093 IF(idl.LT.mdcy(kca,2)+mdcy(kca,3)-1) goto 250
2094 ELSEIF(mdme(idl,2).GT.100)
THEN
2095 IF(idl.LT.mdcy(kca,2)+mdcy(kca,3)-1) goto 250
2099 IF(idl.LT.mdcy(kca,2)+mdcy(kca,3)-1.AND.rbr.GT.0.) goto 250
2105 IF(ntry.GT.1000)
THEN
2106 CALL
luerrm(14,
'(LUDECY:) caught in infinite loop')
2107 IF(mstu(21).GE.1)
RETURN
2113 IF(mmat.GE.11.AND.mmat.NE.46.AND.
p(ip,4).GT.20.*
p(ip,5)) mbst=1
2116 IF(mbst.EQ.0) pv(1,j)=
p(ip,j)
2118 IF(mbst.EQ.1) pv(1,4)=
p(ip,5)
2124 IF(kfa.GT.80) mhaddy=1
2128 IF(mdme(idc+1,2).EQ.101) jtmax=10
2130 IF(jt.LE.5) kp=kfdp(idc,jt)
2131 IF(jt.GE.6) kp=kfdp(idc+1,jt-5)
2132 IF(kp.EQ.0) goto 280
2135 IF(kpa.GT.80) mhaddy=1
2136 IF(kchg(kcp,3).EQ.0.AND.kpa.NE.81.AND.kpa.NE.82)
THEN
2138 ELSEIF(kpa.NE.81.AND.kpa.NE.82)
THEN
2140 ELSEIF(kpa.EQ.81.AND.
mod(kfa/1000,10).EQ.0)
THEN
2141 kfp=-kfs*
mod(kfa/10,10)
2142 ELSEIF(kpa.EQ.81.AND.
mod(kfa/100,10).GE.
mod(kfa/10,10))
THEN
2143 kfp=kfs*(100*
mod(kfa/10,100)+3)
2144 ELSEIF(kpa.EQ.81)
THEN
2145 kfp=kfs*(1000*
mod(kfa/10,10)+100*
mod(kfa/100,10)+1)
2146 ELSEIF(kp.EQ.82)
THEN
2147 CALL
lukfdi(-kfs*
int(1.+(2.+parj(2))*
rlu(0)),0,kfp,kdump)
2148 IF(kfp.EQ.0) goto 260
2150 IF(pv(1,5).LT.parj(32)+2.*
ulmass(kfp)) goto 260
2151 ELSEIF(kp.EQ.-82)
THEN
2153 IF(iabs(kfp).GT.10) kfp=kfp+isign(10000,kfp)
2155 IF(kpa.EQ.81.OR.kpa.EQ.82) kcp=
lucomp(kfp)
2160 IF(mmat.GE.11.AND.mmat.LE.30.AND.kqp.NE.0)
THEN
2165 ELSEIF((mmat.EQ.42.OR.mmat.EQ.43.OR.mmat.EQ.48).AND.np.EQ.3.AND.
2166 &
mod(nq,2).EQ.1)
THEN
2171 CALL
lukfdi(kfp,kfi,kfldmp,k(i,2))
2172 IF(k(i,2).EQ.0) goto 260
2179 IF(mmat.NE.33.AND.kqp.NE.0) nq=nq+1
2180 IF(mmat.EQ.33.AND.kqp.NE.0.AND.kqp.NE.2) nq=nq+1
2182 IF(mmat.EQ.4.AND.jt.LE.2.AND.kfp.EQ.21) k(i,1)=2
2183 IF(mmat.EQ.4.AND.jt.EQ.3) k(i,1)=1
2189 IF(mmat.EQ.45.AND.kfpa.EQ.89)
p(i,5)=parj(32)
2195 IF(mhaddy.EQ.0)
THEN
2196 IF(ps+parj(64).GT.pv(1,5)) goto 240
2200 290
IF(mmat.GE.11.AND.mmat.LE.30)
THEN
2202 cnde=parj(61)*
log(
max((pv(1,5)-ps-psq)/parj(62),1.1))
2203 IF(mmat.EQ.12) cnde=cnde+parj(63)
2205 IF(ntry.GT.1000)
THEN
2206 CALL
luerrm(14,
'(LUDECY:) caught in infinite loop')
2207 IF(mstu(21).GE.1)
RETURN
2212 nd=0.5+0.5*np+0.25*nq+cnde+gauss
2213 IF(nd.LT.np+nq/2.OR.nd.LT.2.OR.nd.GT.10) goto 300
2214 IF(mmat.EQ.13.AND.nd.EQ.2) goto 300
2215 IF(mmat.EQ.14.AND.nd.LE.3) goto 300
2216 IF(mmat.EQ.15.AND.nd.LE.4) goto 300
2225 IF(nd.EQ.np+nq/2) goto 330
2226 DO 320 i=
n+np+1,
n+nd-nq/2
2228 CALL
lukfdi(kfl1(jt),0,kfl2,k(i,2))
2229 IF(k(i,2).EQ.0) goto 300
2235 IF(nq.EQ.4.AND.
rlu(0).LT.parj(66)) jt=4
2236 IF(jt.EQ.4.AND.isign(1,kfl1(1)*(10-iabs(kfl1(1))))*
2237 & isign(1,kfl1(jt)*(10-iabs(kfl1(jt)))).GT.0) jt=3
2240 CALL
lukfdi(kfl1(1),kfl1(jt),kfldmp,k(
n+nd-nq/2+1,2))
2241 IF(k(
n+nd-nq/2+1,2).EQ.0) goto 300
2242 IF(nq.EQ.4) CALL
lukfdi(kfl1(jt2),kfl1(jt3),kfldmp,k(
n+nd,2))
2243 IF(nq.EQ.4.AND.k(
n+nd,2).EQ.0) goto 300
2247 DO 340 i=
n+np+1,
n+nd
2255 IF(ps+parj(64).GT.pv(1,5)) goto 300
2258 ELSEIF((mmat.EQ.31.OR.mmat.EQ.33.OR.mmat.EQ.44.OR.mmat.EQ.45)
2261 pqt=(
p(
n+np,5)+parj(65))/pv(1,5)
2263 p(
n+np,j)=pqt*pv(1,j)
2264 pv(1,j)=(1.-pqt)*pv(1,j)
2266 IF(ps+parj(64).GT.pv(1,5)) goto 260
2271 ELSEIF(mmat.EQ.46)
THEN
2276 IF(
max(ps,psmc)+parj(32).GT.pv(1,5)) goto 240
2277 hr1=(
p(
n+1,5)/pv(1,5))**2
2278 hr2=(
p(
n+2,5)/pv(1,5))**2
2279 IF((1.-hr1-hr2)*(2.+hr1+hr2)*
sqrt((1.-hr1-hr2)**2-4.*hr1*hr2)
2280 & .LT.2.*
rlu(0)) goto 240
2285 IF(np.GE.2.AND.ps+parj(64).GT.pv(1,5)) goto 260
2290 IF(mmat.EQ.45.AND.mstj(25).LE.0)
THEN
2291 hlq=(parj(32)/pv(1,5))**2
2292 huq=(1.-(
p(
n+2,5)+parj(64))/pv(1,5))**2
2293 hrq=(
p(
n+2,5)/pv(1,5))**2
2294 360 hw=hlq+
rlu(0)*(huq-hlq)
2295 IF(hmeps(hw).LT.
rlu(0)) goto 360
2296 p(
n+1,5)=pv(1,5)*
sqrt(hw)
2299 ELSEIF(mmat.EQ.45)
THEN
2300 hqw=(pv(1,5)/pmas(24,1))**2
2301 hlw=(parj(32)/pmas(24,1))**2
2302 huw=((pv(1,5)-
p(
n+2,5)-parj(64))/pmas(24,1))**2
2303 hrq=(
p(
n+2,5)/pv(1,5))**2
2304 hg=pmas(24,2)/pmas(24,1)
2305 hatl=atan((hlw-1.)/hg)
2306 hm=
min(1.,huw-0.001)
2307 hmv1=hmeps(hm/hqw)/((hm-1.)**2+hg**2)
2309 hmv2=hmeps(hm/hqw)/((hm-1.)**2+hg**2)
2310 IF(hmv2.GT.hmv1.AND.hm-hg.GT.hlw)
THEN
2314 hmv=
min(2.*hmv1,hmeps(hm/hqw)/hg**2)
2315 hm1=1.-
sqrt(1./hmv-hg**2)
2316 IF(hm1.GT.hlw.AND.hm1.LT.hm)
THEN
2318 ELSEIF(hmv2.LE.hmv1)
THEN
2319 hm=
max(hlw,hm-
min(0.1,1.-hm))
2321 hatm=atan((hm-1.)/hg)
2323 hwt2=hmv*(
min(1.,huw)-hm)
2326 hatu=atan((huw-1.)/hg)
2332 380 hreg=
rlu(0)*(hwt1+hwt2+hwt3)
2333 IF(hreg.LE.hwt1)
THEN
2334 hw=1.+hg*
tan(hatl+
rlu(0)*(hatm-hatl))
2336 ELSEIF(hreg.LE.hwt1+hwt2)
THEN
2337 hw=hm+
rlu(0)*(
min(1.,huw)-hm)
2338 hacc=hmeps(hw/hqw)/((hw-1.)**2+hg**2)/hmv
2340 hw=1.+hg*
tan(
rlu(0)*hatu)
2341 hacc=hmeps(hw/hqw)/hmp1
2343 IF(hacc.LT.
rlu(0)) goto 380
2344 p(
n+1,5)=pmas(24,1)*
sqrt(hw)
2351 IF(mmat.EQ.3.OR.mmat.EQ.46)
THEN
2353 IF(im.LT.0.OR.im.GE.ip) im=0
2354 IF(mmat.EQ.46.AND.mstj(27).EQ.1)
THEN
2356 ELSEIF(mmat.EQ.46.AND.mstj(27).GE.2.AND.im.NE.0)
THEN
2357 IF(k(im,2).EQ.94)
THEN
2359 IF(im.LT.0.OR.im.GE.ip) im=0
2362 IF(im.NE.0) kfam=iabs(k(im,2))
2363 IF(im.NE.0.AND.mmat.EQ.3)
THEN
2364 DO 390 il=
max(ip-2,im+1),
min(ip+2,
n)
2365 IF(k(il,3).EQ.im) nm=nm+1
2366 IF(k(il,3).EQ.im.AND.il.NE.ip) isis=il
2368 IF(nm.NE.2.OR.kfam.LE.100.OR.
mod(kfam,10).NE.1.OR.
2369 &
mod(kfam/1000,10).NE.0) nm=0
2371 kfas=iabs(k(isis,2))
2372 IF((kfas.LE.100.OR.
mod(kfas,10).NE.1.OR.
2373 &
mod(kfas/1000,10).NE.0).AND.kfas.NE.22) nm=0
2375 ELSEIF(im.NE.0.AND.mmat.EQ.46)
THEN
2376 msgn=isign(1,k(im,2)*k(ip,2))
2377 IF(kfam.GT.100.AND.
mod(kfam/1000,10).EQ.0) msgn=
2378 & msgn*(-1)**
mod(kfam/100,10)
2393 wtmax=1./wtcor(nd-2)
2394 pmax=pv(1,5)-ps+
p(
n+nd,5)
2398 pmin=pmin+
p(
n+il+1,5)
2399 wtmax=wtmax*pawt(pmax,pmin,
p(
n+il,5))
2404 420
IF(nd.EQ.2)
THEN
2405 ELSEIF(mmat.EQ.2)
THEN
2406 pmes=4.*pmas(11,1)**2
2407 pmrho2=pmas(131,1)**2
2408 pgrho2=pmas(131,2)**2
2409 430 pmst=pmes*(
p(ip,5)**2/pmes)**
rlu(0)
2410 wt=(1+0.5*pmes/pmst)*
sqrt(
max(0.,1.-pmes/pmst))*
2411 & (1.-pmst/
p(ip,5)**2)**3*(1.+pgrho2/pmrho2)/
2412 & ((1.-pmst/pmrho2)**2+pgrho2/pmrho2)
2413 IF(wt.LT.
rlu(0)) goto 430
2414 pv(2,5)=
max(2.00001*pmas(11,1),
sqrt(pmst))
2421 DO 450 il2=il1-1,1,-1
2422 IF(rsav.LE.rord(il2)) goto 460
2423 rord(il2+1)=rord(il2)
2425 460 rord(il2+1)=rsav
2430 pv(il,5)=pv(il+1,5)+
p(
n+il,5)+(rord(il)-rord(il+1))*(pv(1,5)-ps)
2431 wt=wt*pawt(pv(il,5),pv(il+1,5),
p(
n+il,5))
2433 IF(wt.LT.
rlu(0)*wtmax) goto 440
2437 490
DO 510 il=1,nd-1
2438 pa=pawt(pv(il,5),pv(il+1,5),
p(
n+il,5))
2445 pv(il+1,j)=-pa*ue(j)
2448 pv(il+1,4)=
sqrt(pa**2+pv(il+1,5)**2)
2457 be(j)=pv(il,j)/pv(il,4)
2459 ga=pv(il,4)/pv(il,5)
2461 bep=be(1)*
p(i,1)+be(2)*
p(i,2)+be(3)*
p(i,3)
2463 p(i,j)=
p(i,j)+ga*(ga*bep/(1.+ga)+
p(i,4))*be(j)
2465 p(i,4)=ga*(
p(i,4)+bep)
2471 IF(ntry.GT.800) goto 590
2475 wt=(
p(
n+1,5)*
p(
n+2,5)*
p(
n+3,5))**2-(
p(
n+1,5)*four(
n+2,
n+3))**2
2476 & -(
p(
n+2,5)*four(
n+1,
n+3))**2-(
p(
n+3,5)*four(
n+1,
n+2))**2
2477 & +2.*four(
n+1,
n+2)*four(
n+1,
n+3)*four(
n+2,
n+3)
2478 IF(
max(wt*wtcor(9)/
p(ip,5)**6,0.001).LT.
rlu(0)) goto 420
2481 ELSEIF(mmat.EQ.2)
THEN
2482 four12=four(
n+1,
n+2)
2483 four13=four(
n+1,
n+3)
2484 wt=(pmst-0.5*pmes)*(four12**2+four13**2)+
2485 & pmes*(four12*four13+four12**2+four13**2)
2486 IF(wt.LT.
rlu(0)*0.25*pmst*(
p(ip,5)**2-pmst)**2) goto 490
2491 ELSEIF(mmat.EQ.3.AND.nm.EQ.2)
THEN
2498 IF(kfas.NE.22) hnum=(four10*four12-pms1*four02)**2
2499 IF(kfas.EQ.22) hnum=pms1*(2.*four10*four12*four02-
2500 & pms1*four02**2-pms0*four12**2-pms2*four10**2+pms1*pms0*pms2)
2501 hnum=
max(1
e-6*pms1**2*pms0*pms2,hnum)
2502 hden=(four10**2-pms1*pms0)*(four12**2-pms1*pms2)
2503 IF(hnum.LT.
rlu(0)*hden) goto 490
2506 ELSEIF(mmat.EQ.4)
THEN
2507 hx1=2.*four(ip,
n+1)/
p(ip,5)**2
2508 hx2=2.*four(ip,
n+2)/
p(ip,5)**2
2509 hx3=2.*four(ip,
n+3)/
p(ip,5)**2
2510 wt=((1.-hx1)/(hx2*hx3))**2+((1.-hx2)/(hx1*hx3))**2+
2511 & ((1.-hx3)/(hx1*hx2))**2
2512 IF(wt.LT.2.*
rlu(0)) goto 420
2513 IF(k(ip+1,2).EQ.22.AND.(1.-hx1)*
p(ip,5)**2.LT.4.*parj(32)**2)
2517 ELSEIF(mmat.EQ.41)
THEN
2518 hx1=2.*four(ip,
n+1)/
p(ip,5)**2
2519 hxm=
min(0.75,2.*(1.-ps/
p(ip,5)))
2520 IF(hx1*(3.-2.*hx1).LT.
rlu(0)*hxm*(3.-2.*hxm)) goto 420
2523 ELSEIF((mmat.EQ.42.OR.mmat.EQ.43.OR.mmat.EQ.44.OR.mmat.EQ.48)
2525 IF(mbst.EQ.0) wt=four(ip,
n+1)*four(
n+2,
n+3)
2526 IF(mbst.EQ.1) wt=
p(ip,5)*
p(
n+1,4)*four(
n+2,
n+3)
2527 IF(wt.LT.
rlu(0)*
p(ip,5)*pv(1,5)**3/wtcor(10)) goto 420
2528 ELSEIF(mmat.EQ.42.OR.mmat.EQ.43.OR.mmat.EQ.44.OR.mmat.EQ.48)
THEN
2532 p(
n+np+1,j)=
p(
n+np+1,j)+
p(is,j)
2535 IF(mbst.EQ.0) wt=four(ip,
n+1)*four(
n+2,
n+np+1)
2536 IF(mbst.EQ.1) wt=
p(ip,5)*
p(
n+1,4)*four(
n+2,
n+np+1)
2537 IF(wt.LT.
rlu(0)*
p(ip,5)*pv(1,5)**3/wtcor(10)) goto 420
2540 ELSEIF(mmat.EQ.46.AND.msgn.NE.0)
THEN
2541 IF(msgn.GT.0) wt=four(im,
n+1)*four(
n+2,ip+1)
2542 IF(msgn.LT.0) wt=four(im,
n+2)*four(
n+1,ip+1)
2543 IF(wt.LT.
rlu(0)*
p(im,5)**4/wtcor(10)) goto 490
2547 590
IF(mrem.EQ.1)
THEN
2549 pv(1,j)=pv(1,j)/(1.-pqt)
2557 IF((mmat.EQ.31.OR.mmat.EQ.45).AND.nd.EQ.3)
THEN
2562 IF(
p(
n+2,5)**2+
p(
n+3,5)**2+2.*four(
n+2,
n+3).GE.
2563 & (parj(32)+pm2+pm3)**2) goto 660
2566 CALL
lukfdi(kftemp,k(
n+3,2),kfldmp,k(
n+2,2))
2567 IF(k(
n+2,2).EQ.0) goto 260
2569 ps=
p(
n+1,5)+
p(
n+2,5)
2574 ELSEIF(mmat.EQ.44)
THEN
2579 IF(
p(
n+3,5)**2+
p(
n+4,5)**2+2.*four(
n+3,
n+4).GE.
2580 & (parj(32)+pm3+pm4)**2) goto 630
2583 CALL
lukfdi(kftemp,k(
n+4,2),kfldmp,k(
n+3,2))
2584 IF(k(
n+3,2).EQ.0) goto 260
2587 p(
n+3,j)=
p(
n+3,j)+
p(
n+4,j)
2590 ha=
p(
n+1,4)**2-
p(
n+2,4)**2
2591 hb=ha-(
p(
n+1,5)**2-
p(
n+2,5)**2)
2592 hc=(
p(
n+1,1)-
p(
n+2,1))**2+(
p(
n+1,2)-
p(
n+2,2))**2+
2593 & (
p(
n+1,3)-
p(
n+2,3))**2
2594 hd=(pv(1,4)-
p(
n+3,4))**2
2595 he=ha**2-2.*hd*(
p(
n+1,4)**2+
p(
n+2,4)**2)+hd**2
2598 hh=(
sqrt(hg**2+he*hf)-hg)/(2.*hf)
2600 pcor=
hh*(
p(
n+1,j)-
p(
n+2,j))
2601 p(
n+1,j)=
p(
n+1,j)+pcor
2602 p(
n+2,j)=
p(
n+2,j)-pcor
2610 630
IF((mmat.EQ.42.OR.mmat.EQ.43.OR.mmat.EQ.44.OR.mmat.EQ.48)
2611 &.AND.iabs(k(
n+1,2)).LT.10)
THEN
2617 IF(pmr.GT.parj(32)+pm1+pm2) goto 640
2619 CALL
lukfdi(k(
n+1,2),-isign(kfldum,k(
n+1,2)),kfldmp,kf1)
2620 CALL
lukfdi(k(
n+2,2),-isign(kfldum,k(
n+2,2)),kfldmp,kf2)
2621 IF(kf1.EQ.0.OR.kf2.EQ.0) goto 260
2623 IF((mmat.EQ.42.OR.mmat.EQ.48).AND.pmr.GT.parj(64)+psm) goto 640
2624 IF(mmat.GE.43.AND.pmr.GT.0.2*parj(32)+psm) goto 640
2625 IF(mmat.EQ.48) goto 420
2626 IF(nd.EQ.4.OR.kfa.EQ.15) goto 260
2629 CALL
lukfdi(kftemp,k(
n+2,2),kfldmp,k(
n+1,2))
2630 IF(k(
n+1,2).EQ.0) goto 260
2634 ps=
p(
n+1,5)+
p(
n+2,5)
2635 IF(ps+parj(64).GT.pv(1,5)) goto 260
2643 640
IF((mmat.EQ.42.OR.mmat.EQ.48).AND.iabs(k(
n+1,2)).LT.10)
THEN
2649 pv(1,j)=
p(
n+1,j)+
p(
n+2,j)
2669 be(j)=
p(ip,j)/
p(ip,4)
2673 bep=be(1)*
p(i,1)+be(2)*
p(i,2)+be(3)*
p(i,3)
2675 p(i,j)=
p(i,j)+ga*(ga*bep/(1.+ga)+
p(i,4))*be(j)
2677 p(i,4)=ga*(
p(i,4)+bep)
2690 IF(mstj(23).GE.1.AND.mmat.EQ.4.AND.k(nsav+1,2).EQ.21)
THEN
2694 k(nsav+1,4)=mstu(5)*(nsav+2)
2695 k(nsav+1,5)=mstu(5)*(nsav+3)
2696 k(nsav+2,4)=mstu(5)*(nsav+3)
2697 k(nsav+2,5)=mstu(5)*(nsav+1)
2698 k(nsav+3,4)=mstu(5)*(nsav+1)
2699 k(nsav+3,5)=mstu(5)*(nsav+2)
2701 ELSEIF(mstj(23).GE.1.AND.mmat.EQ.4)
THEN
2704 k(nsav+2,4)=mstu(5)*(nsav+3)
2705 k(nsav+2,5)=mstu(5)*(nsav+3)
2706 k(nsav+3,4)=mstu(5)*(nsav+2)
2707 k(nsav+3,5)=mstu(5)*(nsav+2)
2709 ELSEIF(mstj(23).GE.1.AND.(mmat.EQ.32.OR.mmat.EQ.44.OR.mmat.EQ.46)
2710 &.AND.iabs(k(nsav+1,2)).LE.10.AND.iabs(k(nsav+2,2)).LE.10)
THEN
2713 k(nsav+1,4)=mstu(5)*(nsav+2)
2714 k(nsav+1,5)=mstu(5)*(nsav+2)
2715 k(nsav+2,4)=mstu(5)*(nsav+1)
2716 k(nsav+2,5)=mstu(5)*(nsav+1)
2718 ELSEIF(mstj(23).GE.1.AND.(mmat.EQ.32.OR.mmat.EQ.44.OR.mmat.EQ.46)
2719 &.AND.iabs(k(nsav+1,2)).LE.20.AND.iabs(k(nsav+2,2)).LE.20)
THEN
2721 ELSEIF(mstj(23).GE.1.AND.mmat.EQ.33.AND.iabs(k(nsav+2,2)).EQ.21)
2727 kqp=kchg(kcp,2)*isign(1,k(nsav+1,2))
2730 k(nsav+1,jcon)=mstu(5)*(nsav+2)
2731 k(nsav+2,9-jcon)=mstu(5)*(nsav+1)
2732 k(nsav+2,jcon)=mstu(5)*(nsav+3)
2733 k(nsav+3,9-jcon)=mstu(5)*(nsav+2)
2735 ELSEIF(mstj(23).GE.1.AND.mmat.EQ.33)
THEN
2738 k(nsav+1,4)=mstu(5)*(nsav+3)
2739 k(nsav+1,5)=mstu(5)*(nsav+3)
2740 k(nsav+3,4)=mstu(5)*(nsav+1)
2741 k(nsav+3,5)=mstu(5)*(nsav+1)
2745 ELSEIF(mstj(27).GE.1.AND.mmat.EQ.45.AND.nd.EQ.3)
THEN
2748 k(nsav+2,4)=mstu(5)*(nsav+3)
2749 k(nsav+2,5)=mstu(5)*(nsav+3)
2750 k(nsav+3,4)=mstu(5)*(nsav+2)
2751 k(nsav+3,5)=mstu(5)*(nsav+2)
2756 IF(k(ip,1).EQ.5) k(ip,1)=15
2757 IF(k(ip,1).LE.10) k(ip,1)=11
2758 IF(mmix.EQ.1.AND.mstj(26).EQ.2.AND.k(ip,1).EQ.11) k(ip,1)=12
2770 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
2771 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
2772 SAVE /ludat1/,/ludat2/
2779 IF(kf1a.EQ.0)
RETURN
2781 IF(kf1a.LE.10.AND.kf2a.LE.10.AND.kfl1*kfl2.GT.0)
RETURN
2782 IF(kf1a.GT.10.AND.kf2a.GT.10)
RETURN
2783 IF((kf1a.GT.10.OR.kf2a.GT.10).AND.kfl1*kfl2.LT.0)
RETURN
2787 IF(mstj(15).EQ.1)
THEN
2789 IF(kf1a.GE.1.AND.kf1a.LE.6) ktab1=kf1a
2790 kfl1a=
mod(kf1a/1000,10)
2791 kfl1b=
mod(kf1a/100,10)
2793 IF(kfl1a.GE.1.AND.kfl1a.LE.4.AND.kfl1b.GE.1.AND.kfl1b.LE.4)
2794 & ktab1=6+kfl1a*(kfl1a-2)+2*kfl1b+(kfl1s-1)/2
2795 IF(kfl1a.GE.1.AND.kfl1a.LE.4.AND.kfl1a.EQ.kfl1b) ktab1=ktab1-1
2796 IF(kf1a.GE.1.AND.kf1a.LE.6) kfl1a=kf1a
2800 IF(kf2a.GE.1.AND.kf2a.LE.6) ktab2=kf2a
2801 kfl2a=
mod(kf2a/1000,10)
2802 kfl2b=
mod(kf2a/100,10)
2804 IF(kfl2a.GE.1.AND.kfl2a.LE.4.AND.kfl2b.GE.1.AND.kfl2b.LE.4)
2805 & ktab2=6+kfl2a*(kfl2a-2)+2*kfl2b+(kfl2s-1)/2
2806 IF(kfl2a.GE.1.AND.kfl2a.LE.4.AND.kfl2a.EQ.kfl2b) ktab2=ktab2-1
2808 IF(ktab1.GE.0.AND.ktab2.GE.0) goto 150
2815 IF(mstj(12).GE.2)
THEN
2817 par4m=1./(3.*
sqrt(parj(4)))
2818 pardm=parj(7)/(parj(7)+par3m*parj(6))
2819 pars0=parj(5)*(2.+(1.+par2*par3m*parj(7))*(1.+par4m))
2820 pars1=parj(7)*pars0/(2.*par3m)+parj(5)*(parj(6)*(1.+par4m)+
2821 & par2*par3m*parj(6)*parj(7))
2822 pars2=parj(5)*2.*parj(6)*parj(7)*(par2*parj(7)+(1.+par4m)/par3m)
2823 parsm=
max(pars0,pars1,pars2)
2824 par4=par4*(1.+parsm)/(1.+parsm/(3.*par4m))
2831 IF(kf2a.EQ.0.AND.mstj(12).GE.1.AND.(1.+parj(1))*
rlu(0).GT.1.)
2833 IF(kf2a.GT.10) mbary=2
2834 IF(kf2a.GT.10.AND.kf2a.LE.10000) kfda=kf2a
2837 IF(kf1a.LE.10000) kfda=kf1a
2841 IF(kfda.NE.0.AND.mstj(12).GE.2)
THEN
2842 kflda=
mod(kfda/1000,10)
2843 kfldb=
mod(kfda/100,10)
2846 IF(
max(kflda,kfldb).EQ.3) wtdq=pars1
2847 IF(
min(kflda,kfldb).EQ.3) wtdq=pars2
2848 IF(kflds.EQ.1) wtdq=wtdq/(3.*par4m)
2849 IF((1.+wtdq)*
rlu(0).GT.1.) mbary=-1
2850 IF(mbary.EQ.-1.AND.kf2a.NE.0)
RETURN
2857 IF(kf2a.EQ.0) kfl3=isign(1+
int((2.+par2)*
rlu(0)),-kfl1)
2858 kfla=
max(kf1a,kf2a+iabs(kfl3))
2859 kflb=
min(kf1a,kf2a+iabs(kfl3))
2860 IF(kfla.NE.kf1a) kfs=-kfs
2864 kfl1a=
mod(kf1a/1000,10)
2865 kfl1b=
mod(kf1a/100,10)
2866 120 kfl1d=kfl1a+
int(
rlu(0)+0.5)*(kfl1b-kfl1a)
2867 kfl1e=kfl1a+kfl1b-kfl1d
2868 IF((kfl1d.EQ.3.AND.
rlu(0).GT.pardm).OR.(kfl1e.EQ.3.AND.
2869 &
rlu(0).LT.pardm))
THEN
2870 kfl1d=kfl1a+kfl1b-kfl1d
2871 kfl1e=kfl1a+kfl1b-kfl1e
2873 kfl3a=1+
int((2.+par2*par3m*parj(7))*
rlu(0))
2874 IF((kfl1e.NE.kfl3a.AND.
rlu(0).GT.(1.+par4m)/
max(2.,1.+par4m))
2875 & .OR.(kfl1e.EQ.kfl3a.AND.
rlu(0).GT.2./
max(2.,1.+par4m)))
2878 IF(kfl1e.NE.kfl3a) kflds=2*
int(
rlu(0)+1./(1.+par4m))+1
2879 kfl3=isign(10000+1000*
max(kfl1e,kfl3a)+100*
min(kfl1e,kfl3a)+
2881 kfla=
max(kfl1d,kfl3a)
2882 kflb=
min(kfl1d,kfl3a)
2883 IF(kfla.NE.kfl1d) kfs=-kfs
2887 IF(kfla.LE.2) kmul=
int(parj(11)+
rlu(0))
2888 IF(kfla.EQ.3) kmul=
int(parj(12)+
rlu(0))
2889 IF(kfla.GE.4) kmul=
int(parj(13)+
rlu(0))
2890 IF(kmul.EQ.0.AND.parj(14).GT.0.)
THEN
2891 IF(
rlu(0).LT.parj(14)) kmul=2
2892 ELSEIF(kmul.EQ.1.AND.parj(15)+parj(16)+parj(17).GT.0.)
THEN
2894 IF(rmul.LT.parj(15)) kmul=3
2895 IF(kmul.EQ.1.AND.rmul.LT.parj(15)+parj(16)) kmul=4
2896 IF(kmul.EQ.1.AND.rmul.LT.parj(15)+parj(16)+parj(17)) kmul=5
2899 IF(kmul.EQ.0.OR.kmul.EQ.3) kfls=1
2900 IF(kmul.EQ.5) kfls=5
2901 IF(kfla.NE.kflb)
THEN
2902 kf=(100*kfla+10*kflb+kfls)*kfs*(-1)**kfla
2906 IF(kfla.LE.3) kf=110*(1+
int(rmix+parf(imix-1))+
2907 &
int(rmix+parf(imix)))+kfls
2908 IF(kfla.GE.4) kf=110*kfla+kfls
2910 IF(kmul.EQ.2.OR.kmul.EQ.3) kf=kf+isign(10000,kf)
2911 IF(kmul.EQ.4) kf=kf+isign(20000,kf)
2915 IF(
rlu(0).GT.parj(25)) goto 110
2916 ELSEIF(kf.EQ.331)
THEN
2917 IF(
rlu(0).GT.parj(26)) goto 110
2922 130
IF(kf1a.LE.10.AND.kf2a.EQ.0)
THEN
2924 140 kflb=1+
int((2.+par2*par3)*
rlu(0))
2925 kflc=1+
int((2.+par2*par3)*
rlu(0))
2927 IF(kflb.GE.kflc) kflds=3
2928 IF(kflds.EQ.1.AND.par4*
rlu(0).GT.1.) goto 140
2929 IF(kflds.EQ.3.AND.par4.LT.
rlu(0)) goto 140
2930 kfl3=isign(1000*
max(kflb,kflc)+100*
min(kflb,kflc)+kflds,kfl1)
2933 ELSEIF(kf1a.LE.10)
THEN
2935 kflb=
mod(kf2a/1000,10)
2936 kflc=
mod(kf2a/100,10)
2941 IF(kf2a.EQ.0) kfl3=isign(1+
int((2.+par2)*
rlu(0)),kfl1)
2942 kfla=kf2a+iabs(kfl3)
2943 kflb=
mod(kf1a/1000,10)
2944 kflc=
mod(kf1a/100,10)
2950 IF(kflds.EQ.3.AND.kflb.NE.kflc) kbary=5
2951 IF(kfla.NE.kflb.AND.kfla.NE.kflc) kbary=kbary+1
2952 wt=parf(60+kbary)+parj(18)*parf(70+kbary)
2953 IF(mbary.EQ.1.AND.mstj(12).GE.2)
THEN
2955 IF(
max(kflb,kflc).EQ.3) wtdq=pars1
2956 IF(
min(kflb,kflc).EQ.3) wtdq=pars2
2957 IF(kflds.EQ.1) wtdq=wtdq/(3.*par4m)
2958 IF(kflds.EQ.1) wt=wt*(1.+wtdq)/(1.+parsm/(3.*par4m))
2959 IF(kflds.EQ.3) wt=wt*(1.+wtdq)/(1.+parsm)
2961 IF(kf2a.EQ.0.AND.wt.LT.
rlu(0)) goto 130
2964 kfld=
max(kfla,kflb,kflc)
2965 kflf=
min(kfla,kflb,kflc)
2966 kfle=kfla+kflb+kflc-kfld-kflf
2968 IF((parf(60+kbary)+parj(18)*parf(70+kbary))*
rlu(0).GT.
2969 & parf(60+kbary)) kfls=4
2971 IF(kfls.EQ.2.AND.kfld.GT.kfle.AND.kfle.GT.kflf)
THEN
2972 IF(kflds.EQ.1.AND.kfla.EQ.kfld) kfll=1
2973 IF(kflds.EQ.1.AND.kfla.NE.kfld) kfll=
int(0.25+
rlu(0))
2974 IF(kflds.EQ.3.AND.kfla.NE.kfld) kfll=
int(0.75+
rlu(0))
2976 IF(kfll.EQ.0) kf=isign(1000*kfld+100*kfle+10*kflf+kfls,kfl1)
2977 IF(kfll.EQ.1) kf=isign(1000*kfld+100*kflf+10*kfle+kfls,kfl1)
2982 150
IF(ktab2.EQ.0.AND.mstj(12).LE.0)
THEN
2985 ELSEIF(ktab2.EQ.0.AND.ktab1.GE.7.AND.mstj(12).LE.1)
THEN
2988 ELSEIF(ktab2.EQ.0)
THEN
2997 DO 160 kt3=kt3l,kt3u
2998 rfl=rfl+parf(120+80*ktab1+25*kts+kt3)
3004 DO 180 kt3=kt3l,kt3u
3006 rfl=rfl-parf(120+80*ktab1+25*kts+kt3)
3007 IF(rfl.LE.0.) goto 200
3016 kfl3=isign(kfl3a,kfl1*(2*ktab1-13))
3019 IF(ktab3.GE.8) kfl3a=2
3020 IF(ktab3.GE.11) kfl3a=3
3021 IF(ktab3.GE.16) kfl3a=4
3022 kfl3b=(ktab3-6-kfl3a*(kfl3a-2))/2
3023 kfl3=1000*kfl3a+100*kfl3b+1
3024 IF(kfl3a.EQ.kfl3b.OR.ktab3.NE.6+kfl3a*(kfl3a-2)+2*kfl3b) kfl3=
3026 kfl3=isign(kfl3,kfl1*(13-2*ktab1))
3030 IF(kfl3a.EQ.kfl1a.AND.kfl3b.EQ.kfl1b.AND.(kfl3a.LE.3.OR.
3032 rfl=
rlu(0)*(parf(143+80*ktab1+25*ktabs)+parf(144+80*ktab1+
3033 & 25*ktabs)+parf(145+80*ktab1+25*ktabs))
3035 IF(rfl.GT.parf(143+80*ktab1+25*ktabs)) kf=220+2*ktabs+1
3036 IF(rfl.GT.parf(143+80*ktab1+25*ktabs)+parf(144+80*ktab1+
3037 & 25*ktabs)) kf=330+2*ktabs+1
3038 ELSEIF(ktab1.LE.6.AND.ktab3.LE.6)
THEN
3039 kfla=
max(ktab1,ktab3)
3040 kflb=
min(ktab1,ktab3)
3042 IF(kfla.NE.kf1a) kfs=-kfs
3043 kf=(100*kfla+10*kflb+2*ktabs+1)*kfs*(-1)**kfla
3044 ELSEIF(ktab1.GE.7.AND.ktab3.GE.7)
THEN
3046 IF(kfl1a.EQ.kfl3a)
THEN
3047 kfla=
max(kfl1b,kfl3b)
3048 kflb=
min(kfl1b,kfl3b)
3049 IF(kfla.NE.kfl1b) kfs=-kfs
3050 ELSEIF(kfl1a.EQ.kfl3b)
THEN
3054 ELSEIF(kfl1b.EQ.kfl3a)
THEN
3057 ELSEIF(kfl1b.EQ.kfl3b)
THEN
3058 kfla=
max(kfl1a,kfl3a)
3059 kflb=
min(kfl1a,kfl3a)
3060 IF(kfla.NE.kfl1a) kfs=-kfs
3062 CALL
luerrm(2,
'(LUKFDI:) no matching flavours for qq -> qq')
3065 kf=(100*kfla+10*kflb+2*ktabs+1)*kfs*(-1)**kfla
3078 kfld=
max(kfla,kflb,kflc)
3079 kflf=
min(kfla,kflb,kflc)
3080 kfle=kfla+kflb+kflc-kfld-kflf
3081 IF(ktabs.EQ.0) kf=isign(1000*kfld+100*kflf+10*kfle+2,kfl1)
3082 IF(ktabs.GE.1) kf=isign(1000*kfld+100*kfle+10*kflf+2*ktabs,kfl1)
3086 IF(kfl2.NE.0) kfl3=0
3089 CALL
luerrm(2,
'(LUKFDI:) user-defined flavour probabilities '//
3102 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
3108 IF(parj(23).GT.
rlu(0))
pt=parj(24)*
pt
3109 IF(mstj(91).EQ.1)
pt=parj(22)*
pt
3110 IF(kfla.EQ.0.AND.mstj(13).LE.0)
pt=0.
3123 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
3124 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
3125 SAVE /ludat1/,/ludat2/
3131 IF(kfla.GE.10) kflh=
mod(kfla/1000,10)
3134 IF(mstj(11).EQ.1.OR.(mstj(11).EQ.3.AND.kflh.LE.3).OR.
3135 &mstj(11).GE.4)
THEN
3137 IF(mstj(91).EQ.1) fa=parj(43)
3138 IF(kflb.GE.10) fa=fa+parj(45)
3140 IF(mstj(91).EQ.1) fbb=parj(44)
3143 IF(kfla.GE.10) fc=fc-parj(45)
3144 IF(kflb.GE.10) fc=fc+parj(45)
3145 IF(mstj(11).GE.4.AND.kflh.GE.4.AND.kflh.LE.5)
THEN
3147 IF(mstj(11).EQ.5.AND.kflh.EQ.5) fred=parj(47)
3148 fc=fc+fred*fbb*parf(100+kflh)**2
3149 ELSEIF(mstj(11).GE.4.AND.kflh.GE.6.AND.kflh.LE.8)
THEN
3151 IF(mstj(11).EQ.5) fred=parj(48)
3152 fc=fc+fred*fbb*pmas(kflh,1)**2
3155 IF(abs(fc-1.).GT.0.01) mc=2
3161 IF(fc.GT.fb) zmax=fb/fc
3162 ELSEIF(abs(fc-fa).LT.0.01)
THEN
3167 zmax=0.5*(fb+fc-
sqrt((fb-fc)**2+4.*fa*fb))/(fc-fa)
3168 IF(zmax.GT.0.9999.AND.fb.GT.100.) zmax=
min(zmax,1.-fa/fb)
3173 IF(zmax.LT.0.1)
THEN
3180 fint=1.+(1.-1./zdivc)/(fc-1.)
3182 ELSEIF(zmax.GT.0.85.AND.fb.GT.1.)
THEN
3184 fscb=
sqrt(4.+(fc/fb)**2)
3185 zdiv=fscb-1./zmax-(fc/fb)*
log(zmax*0.5*(fscb+fc/fb))
3186 IF(ma.GE.2) zdiv=zdiv+(fa/fb)*
log(1.-zmax)
3187 zdiv=
min(zmax,
max(0.,zdiv))
3188 fint=1.+fb*(1.-zdiv)
3195 IF(fint*
rlu(0).LE.1.)
THEN
3197 ELSEIF(mc.EQ.1)
THEN
3201 z=1./(zdivc+
z*(1.-zdivc))**(1./(1.-fc))
3204 ELSEIF(mmax.EQ.3)
THEN
3205 IF(fint*
rlu(0).LE.1.)
THEN
3207 fpre=
exp(fb*(
z-zdiv))
3214 IF(
z.LE.0..OR.
z.GE.1.) goto 100
3218 IF(fval.LT.
rlu(0)*fpre) goto 100
3222 fc=parj(50+
max(1,kflh))
3223 IF(mstj(91).EQ.1) fc=parj(59)
3225 IF(fc.GE.0..AND.fc.LE.1.)
THEN
3226 IF(fc.GT.
rlu(0))
z=1.-
z**(1./3.)
3227 ELSEIF(fc.GT.-1.AND.fc.LT.0.)
THEN
3228 IF(-4.*fc*
z*(1.-
z)**2.LT.
rlu(0)*((1.-
z)**2-fc*
z)**2) goto 110
3230 IF(fc.GT.0.)
z=1.-
z**(1./fc)
3231 IF(fc.LT.0.)
z=
z**(-1./fc)
3243 IMPLICIT DOUBLE PRECISION(
d)
3244 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
3245 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
3246 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
3247 SAVE /lujets/,/ludat1/,/ludat2/
3248 dimension pmth(5,50),ps(5),pma(4),pmsd(4),iep(4),ipa(4),
3249 &kfla(4),kfld(4),kfl(4),itry(4),isi(4),isl(4),dp(4),dpt(5,4),
3250 &ksh(0:40),kcii(2),niis(2),iiis(2,2),theiis(2,2),phiiis(2,2),
3254 IF(mstj(41).LE.0.OR.(mstj(41).EQ.1.AND.qmax.LE.parj(82)).OR.
3255 &qmax.LE.
min(parj(82),parj(83)))
RETURN
3261 pmth(2,21)=
sqrt(pmth(1,21)**2+0.25*parj(82)**2)
3262 pmth(3,21)=2.*pmth(2,21)
3263 pmth(4,21)=pmth(3,21)
3264 pmth(5,21)=pmth(3,21)
3266 pmth(2,22)=
sqrt(pmth(1,22)**2+0.25*parj(83)**2)
3267 pmth(3,22)=2.*pmth(2,22)
3268 pmth(4,22)=pmth(3,22)
3269 pmth(5,22)=pmth(3,22)
3271 IF(mstj(41).GE.2) pmqth1=
min(parj(82),parj(83))
3273 IF(mstj(41).GE.2) pmqth2=
min(pmth(2,21),pmth(2,22))
3277 pmth(2,ifl)=
sqrt(pmth(1,ifl)**2+0.25*pmqth1**2)
3278 pmth(3,ifl)=pmth(2,ifl)+pmqth2
3279 pmth(4,ifl)=
sqrt(pmth(1,ifl)**2+0.25*parj(82)**2)+pmth(2,21)
3280 pmth(5,ifl)=
sqrt(pmth(1,ifl)**2+0.25*parj(83)**2)+pmth(2,22)
3283 IF(mstj(41).GE.2) ksh(ifl)=1
3285 pmth(2,ifl)=
sqrt(pmth(1,ifl)**2+0.25*parj(83)**2)
3286 pmth(3,ifl)=pmth(2,ifl)+pmth(2,22)
3287 pmth(4,ifl)=pmth(3,ifl)
3288 pmth(5,ifl)=pmth(3,ifl)
3290 pt2min=
max(0.5*parj(82),1.1*parj(81))**2
3292 alfm=
log(pt2min/alams)
3295 IF(ip1.GT.0.AND.ip1.LE.
min(
n,mstu(4)-mstu(32)).AND.ip2.EQ.0)
THEN
3298 ELSEIF(
min(ip1,ip2).GT.0.AND.
max(ip1,ip2).LE.
min(
n,mstu(4)-
3303 ELSEIF(ip1.GT.0.AND.ip1.LE.
min(
n,mstu(4)-mstu(32)).AND.ip2.LT.0
3304 &.AND.ip2.GE.-3)
THEN
3311 &
'(LUSHOW:) failed to reconstruct showering system')
3312 IF(mstu(21).GE.1)
RETURN
3322 kfla(i)=iabs(k(ipa(i),2))
3326 IF(kfla(i).GE.6.AND.kfla(i).LE.8)
THEN
3327 ifla=37+kfla(i)+isign(2,k(ipa(i),2))
3329 pmth(2,ifla)=
sqrt(pmth(1,ifla)**2+0.25*pmqth1**2)
3330 pmth(3,ifla)=pmth(2,ifla)+pmqth2
3331 pmth(4,ifla)=
sqrt(pmth(1,ifla)**2+0.25*parj(82)**2)+pmth(2,21)
3332 pmth(5,ifla)=
sqrt(pmth(1,ifla)**2+0.25*parj(83)**2)+pmth(2,22)
3334 IF(kfla(i).LE.40)
THEN
3335 IF(ksh(kfla(i)).EQ.1) pma(i)=pmth(3,ifla)
3338 IF(kfla(i).GT.40)
THEN
3341 IF(ksh(kfla(i)).EQ.0.OR.pma(i).GT.qmax) irej=irej+1
3344 ps(j)=ps(j)+
p(ipa(i),j)
3347 IF(irej.EQ.npa)
RETURN
3348 ps(5)=
sqrt(
max(0.,ps(4)**2-ps(1)**2-ps(2)**2-ps(3)**2))
3349 IF(npa.EQ.1) ps(5)=ps(4)
3350 IF(ps(5).LE.pm+pmqth1)
RETURN
3354 IF(npa.EQ.2.AND.mstj(47).GE.1)
THEN
3355 IF(kfla(1).GE.1.AND.kfla(1).LE.8.AND.kfla(2).GE.1.AND.
3356 & kfla(2).LE.8) m3jc=1
3357 IF((kfla(1).EQ.11.OR.kfla(1).EQ.13.OR.kfla(1).EQ.15.OR.
3358 & kfla(1).EQ.17).AND.kfla(2).EQ.kfla(1)) m3jc=1
3359 IF((kfla(1).EQ.11.OR.kfla(1).EQ.13.OR.kfla(1).EQ.15.OR.
3360 & kfla(1).EQ.17).AND.kfla(2).EQ.kfla(1)+1) m3jc=1
3361 IF((kfla(1).EQ.12.OR.kfla(1).EQ.14.OR.kfla(1).EQ.16.OR.
3362 & kfla(1).EQ.18).AND.kfla(2).EQ.kfla(1)-1) m3jc=1
3363 IF(mstj(47).EQ.2.OR.mstj(47).EQ.4) m3jc=1
3365 IF(m3jc.EQ.1.AND.mstj(47).GE.3.AND.kfla(1).EQ.kfla(2))
THEN
3367 qme=(2.*pmth(1,kfla(1))/ps(5))**2
3373 IF(mstj(50).GE.1.AND.mstj(50).LE.3.AND.npa.EQ.2) miis=mstj(50)
3378 IF(kca.NE.0) kcii(i)=kchg(kca,2)*isign(1,k(ipa(i),2))
3380 IF(kcii(i).NE.0)
THEN
3382 icsi=
mod(k(ipa(i),3+j)/mstu(5),mstu(5))
3383 IF(icsi.GT.0.AND.icsi.NE.ipa(1).AND.icsi.NE.ipa(2).AND.
3384 & (kcii(i).EQ.(-1)**(j+1).OR.kcii(i).EQ.2))
THEN
3386 iiis(i,niis(i))=icsi
3391 IF(niis(1)+niis(2).EQ.0) miis=0
3399 k(
n+i,j)=k(ipa(i),j)
3400 p(
n+i,j)=
p(ipa(i),j)
3404 DO 220 i=3,2+niis(1)
3406 k(
n+i,j)=k(iiis(1,i-2),j)
3407 p(
n+i,j)=
p(iiis(1,i-2),j)
3411 DO 240 i=3+niis(1),2+niis(1)+niis(2)
3413 k(
n+i,j)=k(iiis(2,i-2-niis(1)),j)
3414 p(
n+i,j)=
p(iiis(2,i-2-niis(1)),j)
3418 CALL ludbrb(
n+1,
n+2+niis(1)+niis(2),0.,0.,-dble(ps(1)/ps(4)),
3419 & -dble(ps(2)/ps(4)),-dble(ps(3)/ps(4)))
3421 CALL ludbrb(
n+1,
n+2+niis(1)+niis(2),0.,-
phi,0d0,0d0,0d0)
3423 CALL ludbrb(
n+1,
n+2+niis(1)+niis(2),-the,0.,0d0,0d0,0d0)
3424 DO 250 i=3,2+niis(1)
3428 DO 260 i=3+niis(1),2+niis(1)+niis(2)
3429 theiis(2,i-2-niis(1))=paru(1)-
ulangl(
p(
n+i,3),
3431 phiiis(2,i-2-niis(1))=
ulangl(
p(
n+i,1),
p(
n+i,2))
3437 IF(
n.GT.mstu(4)-mstu(32)-5)
THEN
3438 CALL
luerrm(11,
'(LUSHOW:) no more memory left in LUJETS')
3439 IF(mstu(21).GE.1)
RETURN
3459 IF(npa.EQ.1) im=
ns-1
3462 IF(im.GT.
n) goto 510
3464 IF(kflm.GT.40) goto 270
3465 IF(ksh(kflm).EQ.0) goto 270
3467 IF(kflm.GE.6.AND.kflm.LE.8) iflm=37+kflm+isign(2,k(im,2))
3468 IF(
p(im,5).LT.pmth(2,iflm)) goto 270
3473 IF(
n+nep.GT.mstu(4)-mstu(32)-5)
THEN
3474 CALL
luerrm(11,
'(LUSHOW:) no more memory left in LUJETS')
3475 IF(mstu(21).GE.1)
RETURN
3482 IF(k(im-1,3).EQ.igm) iau=im-1
3483 IF(
n.GE.im+1.AND.k(im+1,3).EQ.igm) iau=im+1
3495 k(
n+i,2)=k(ipa(i),2)
3497 ELSEIF(kflm.NE.21)
THEN
3500 ELSEIF(k(im,5).EQ.21)
THEN
3513 kfld(ip)=iabs(k(
n+ip,2))
3514 IF(kchg(
lucomp(kfld(ip)),2).EQ.0) k(
n+ip,1)=1
3518 IF(kfld(ip).LE.40)
THEN
3519 IF(ksh(kfld(ip)).EQ.1) isi(ip)=1
3527 IF(npa.GE.3)
p(
n+i,4)=(ps(4)*
p(ipa(i),4)-ps(1)*
p(ipa(i),1)-
3528 & ps(2)*
p(ipa(i),2)-ps(3)*
p(ipa(i),3))/ps(5)
3529 p(
n+i,5)=
min(qmax,ps(5))
3530 IF(npa.GE.3)
p(
n+i,5)=
min(
p(
n+i,5),
p(
n+i,4))
3531 IF(isi(i).EQ.0)
p(
n+i,5)=
p(ipa(i),5)
3534 IF(mstj(43).LE.2) pem=v(im,2)
3535 IF(mstj(43).GE.3) pem=
p(im,4)
3536 p(
n+1,5)=
min(
p(im,5),v(im,1)*pem)
3537 p(
n+2,5)=
min(
p(im,5),(1.-v(im,1))*pem)
3538 IF(k(
n+2,2).EQ.22)
p(
n+2,5)=pmth(1,22)
3542 IF(isi(i).EQ.1)
THEN
3544 IF(kfld(i).GE.6.AND.kfld(i).LE.8) ifld=37+kfld(i)+
3546 IF(
p(
n+i,5).LE.pmth(3,ifld))
p(
n+i,5)=pmth(1,ifld)
3548 v(
n+i,5)=
p(
n+i,5)**2
3555 IF(inum.EQ.0.AND.isl(i).EQ.1) inum=i
3558 IF(inum.EQ.0.AND.itry(i).EQ.0.AND.isi(i).EQ.1)
THEN
3560 IF(kfld(i).GE.6.AND.kfld(i).LE.8) ifld=37+kfld(i)+
3562 IF(
p(
n+i,5).GE.pmth(2,ifld)) inum=i
3568 IF(isi(i).EQ.1.AND.pmsd(i).GE.pmqth2)
THEN
3569 rpm=
p(
n+i,5)/pmsd(i)
3571 IF(kfld(i).GE.6.AND.kfld(i).LE.8) ifld=37+kfld(i)+
3573 IF(rpm.GT.rmax.AND.
p(
n+i,5).GE.pmth(2,ifld))
THEN
3586 IF(iep(i).GT.
n+nep) iep(i)=
n+1
3589 kfl(i)=iabs(k(iep(i),2))
3591 itry(inum)=itry(inum)+1
3592 IF(itry(inum).GT.200)
THEN
3593 CALL
luerrm(14,
'(LUSHOW:) caught in infinite loop')
3594 IF(mstu(21).GE.1)
RETURN
3597 IF(kfl(1).GT.40) goto 430
3598 IF(ksh(kfl(1)).EQ.0) goto 430
3600 IF(kfl(1).GE.6.AND.kfl(1).LE.8) ifl=37+kfl(1)+
3601 &isign(2,k(iep(1),2))
3602 IF(
p(iep(1),5).LT.pmth(2,ifl)) goto 430
3605 IF(miis.GE.1.AND.iep(1).LE.
ns+3)
THEN
3608 IF(iabs(kcii(iii)).EQ.1.AND.niis(iii).EQ.1)
THEN
3610 ELSEIF(kcii(iii).EQ.2.AND.niis(iii).EQ.1)
THEN
3611 IF(
rlu(0).GT.0.5) isii(iii)=1
3612 ELSEIF(kcii(iii).EQ.2.AND.niis(iii).EQ.2)
THEN
3614 IF(
rlu(0).GT.0.5) isii(iii)=2
3621 ELSEIF(igm.EQ.0.OR.mstj(43).LE.2)
THEN
3624 IF(inum.EQ.1) pmed=v(im,1)*pem
3625 IF(inum.EQ.2) pmed=(1.-v(im,1))*pem
3627 IF(
mod(mstj(43),2).EQ.1)
THEN
3631 zc=0.5*(1.-
sqrt(
max(0.,1.-(2.*pmth(2,21)/pmed)**2)))
3632 IF(zc.LT.1
e-4) zc=(pmth(2,21)/pmed)**2
3633 zce=0.5*(1.-
sqrt(
max(0.,1.-(2.*pmth(2,22)/pmed)**2)))
3634 IF(zce.LT.1
e-4) zce=(pmth(2,22)/pmed)**2
3638 IF((mstj(41).EQ.1.AND.zc.GT.0.49).OR.(mstj(41).GE.2.AND.
3639 &
min(zc,zce).GT.0.49))
THEN
3640 p(iep(1),5)=pmth(1,ifl)
3641 v(iep(1),5)=
p(iep(1),5)**2
3646 IF(mstj(49).EQ.0.AND.kfl(1).EQ.21)
THEN
3647 fbr=6.*
log((1.-zc)/zc)+mstj(45)*(0.5-zc)
3648 ELSEIF(mstj(49).EQ.0)
THEN
3649 fbr=(8./3.)*
log((1.-zc)/zc)
3652 ELSEIF(mstj(49).EQ.1.AND.kfl(1).EQ.21)
THEN
3653 fbr=(parj(87)+mstj(45)*parj(88))*(1.-2.*zc)
3654 ELSEIF(mstj(49).EQ.1)
THEN
3656 IF(igm.EQ.0.AND.m3jc.EQ.1) fbr=4.*fbr
3659 ELSEIF(kfl(1).EQ.21)
THEN
3660 fbr=6.*mstj(45)*(0.5-zc)
3662 fbr=2.*
log((1.-zc)/zc)
3666 IF(kfl(1).GE.11.AND.kfl(1).LE.18) fbr=0.
3669 IF(mstj(41).GE.2.AND.kfl(1).GE.1.AND.kfl(1).LE.18)
THEN
3670 fbre=(kchg(kfl(1),1)/3.)**2*2.*
log((1.-zce)/zce)
3671 IF(mstj(41).EQ.10) fbre=parj(84)*fbre
3680 IF(kfl(i).LE.40)
THEN
3682 IF(kfl(i).GE.6.AND.kfl(i).LE.8) ifli=37+kfl(i)+
3683 & isign(2,k(iep(i),2))
3684 IF(ksh(kfl(i)).EQ.1) pm=pmth(2,ifli)
3688 pms=
min(pms,(
p(im,5)-pm2)**2)
3693 DO 410 iff=4,mstj(45)
3694 IF(pms.GT.4.*pmth(2,iff)**2) b0=(33.-2.*iff)/6.
3696 IF(fbr.LT.1
e-3)
THEN
3698 ELSEIF(mstj(44).LE.0)
THEN
3699 pmsqcd=pms*
exp(
max(-50.,
log(
rlu(0))*paru(2)/(paru(111)*fbr)))
3700 ELSEIF(mstj(44).EQ.1)
THEN
3701 pmsqcd=4.*alams*(0.25*pms/alams)**(
rlu(0)**(b0/fbr))
3705 IF(zc.GT.0.49.OR.pmsqcd.LE.pmth(4,ifl)**2) pmsqcd=pmth(2,ifl)**2
3710 IF(mstj(41).GE.2.AND.kfl(1).GE.1.AND.kfl(1).LE.18)
THEN
3711 pmsqed=pms*
exp(
max(-50.,
log(
rlu(0))*paru(2)/(paru(101)*fbre)))
3712 IF(zce.GT.0.49.OR.pmsqed.LE.pmth(5,ifl)**2) pmsqed=
3714 IF(pmsqed.GT.pmsqcd)
THEN
3721 p(iep(1),5)=
sqrt(v(iep(1),5))
3722 IF(
p(iep(1),5).LE.pmth(3,ifl))
THEN
3723 p(iep(1),5)=pmth(1,ifl)
3724 v(iep(1),5)=
p(iep(1),5)**2
3730 z=1.-(1.-zce)*(zce/(1.-zce))**
rlu(0)
3731 IF(1.+
z**2.LT.2.*
rlu(0)) goto 390
3735 ELSEIF(mstj(49).NE.1.AND.kfl(1).NE.21)
THEN
3736 z=1.-(1.-zc)*(zc/(1.-zc))**
rlu(0)
3737 IF(1.+
z**2.LT.2.*
rlu(0)) goto 390
3739 ELSEIF(mstj(49).EQ.0.AND.mstj(45)*(0.5-zc).LT.
rlu(0)*fbr)
THEN
3740 z=(1.-zc)*(zc/(1.-zc))**
rlu(0)
3741 IF(
rlu(0).GT.0.5)
z=1.-
z
3742 IF((1.-
z*(1.-
z))**2.LT.
rlu(0)) goto 390
3744 ELSEIF(mstj(49).NE.1)
THEN
3745 z=zc+(1.-2.*zc)*
rlu(0)
3746 IF(
z**2+(1.-
z)**2.LT.
rlu(0)) goto 390
3747 kflb=1+
int(mstj(45)*
rlu(0))
3748 pmq=4.*pmth(2,kflb)**2/v(iep(1),5)
3749 IF(pmq.GE.1.) goto 390
3750 pmq0=4.*pmth(2,21)**2/v(iep(1),5)
3751 IF(
mod(mstj(43),2).EQ.0.AND.(1.+0.5*pmq)*
sqrt(1.-pmq).LT.
3752 &
rlu(0)*(1.+0.5*pmq0)*
sqrt(1.-pmq0)) goto 390
3756 ELSEIF(kfl(1).NE.21)
THEN
3759 ELSEIF(
rlu(0)*(parj(87)+mstj(45)*parj(88)).LE.parj(87))
THEN
3760 z=zc+(1.-2.*zc)*
rlu(0)
3763 z=zc+(1.-2.*zc)*
rlu(0)
3764 kflb=1+
int(mstj(45)*
rlu(0))
3765 pmq=4.*pmth(2,kflb)**2/v(iep(1),5)
3766 IF(pmq.GE.1.) goto 390
3769 IF(mce.EQ.1.AND.mstj(44).GE.2)
THEN
3770 IF(
z*(1.-
z)*v(iep(1),5).LT.pt2min) goto 390
3771 IF(alfm/
log(v(iep(1),5)*
z*(1.-
z)/alams).LT.
rlu(0)) goto 390
3775 IF(kfl(1).EQ.21)
THEN
3776 kflgd1=iabs(k(iep(1),5))
3780 kflgd2=iabs(k(iep(1),5))
3784 ELSEIF(nep.GE.3)
THEN
3786 ELSEIF(igm.EQ.0.OR.mstj(43).LE.2)
THEN
3787 ped=0.5*(v(im,5)+v(iep(1),5)-pm2**2)/
p(im,5)
3789 IF(iep(1).EQ.
n+1) ped=v(im,1)*pem
3790 IF(iep(1).EQ.
n+2) ped=(1.-v(im,1))*pem
3792 IF(
mod(mstj(43),2).EQ.1)
THEN
3794 IF(kflgd1.GE.6.AND.kflgd1.LE.8) iflgd1=ifl
3796 IF(kflgd2.EQ.22) pmqth3=0.5*parj(83)
3797 pmq1=(pmth(1,iflgd1)**2+pmqth3**2)/v(iep(1),5)
3798 pmq2=(pmth(1,kflgd2)**2+pmqth3**2)/v(iep(1),5)
3799 zd=
sqrt(
max(0.,(1.-v(iep(1),5)/ped**2)*((1.-pmq1-pmq2)**2-
3803 zd=
sqrt(
max(0.,1.-v(iep(1),5)/ped**2))
3808 IF(
z.LT.zl.OR.
z.GT.zu) goto 390
3809 IF(kfl(1).EQ.21) v(iep(1),3)=
log(zu*(1.-zl)/
max(1
e-20,zl*
3811 IF(kfl(1).NE.21) v(iep(1),3)=
log((1.-zl)/
max(1
e-10,1.-zu))
3814 IF(mstj(40).NE.0.AND.kfl(1).NE.21)
THEN
3816 eglu=0.5*ps(5)*(1.-
z)*(1.+v(iep(1),5)/v(
ns+1,5))
3820 chi=parj(89)**2/(parj(89)**2+eglu**2)
3821 IF(mstj(40).EQ.1)
THEN
3822 IF(chi.LT.
rlu(0)) goto 390
3823 ELSEIF(mstj(40).EQ.2)
THEN
3824 IF(1.-chi.LT.
rlu(0)) goto 390
3829 IF(igm.EQ.0.AND.m3jc.EQ.1)
THEN
3830 x1=
z*(1.+v(iep(1),5)/v(
ns+1,5))
3831 x2=1.-v(iep(1),5)/v(
ns+1,5)
3835 ki2=k(ipa(3-inum),2)
3836 qf1=kchg(iabs(ki1),1)*isign(1,ki1)/3.
3837 qf2=kchg(iabs(ki2),1)*isign(1,ki2)/3.
3838 wshow=qf1**2*(1.-
x1)/x3*(1.+(
x1/(2.-
x2))**2)+
3839 & qf2**2*(1.-
x2)/x3*(1.+(
x2/(2.-
x1))**2)
3840 wme=(qf1*(1.-
x1)/x3-qf2*(1.-
x2)/x3)**2*(
x1**2+
x2**2)
3841 ELSEIF(mstj(49).NE.1)
THEN
3842 wshow=1.+(1.-
x1)/x3*(
x1/(2.-
x2))**2+
3843 & (1.-
x2)/x3*(
x2/(2.-
x1))**2
3845 IF(m3jcm.EQ.1) wme=wme-qme*x3-0.5*qme**2-
3846 & (0.5*qme+0.25*qme**2)*((1.-
x2)/
max(1
e-7,1.-
x1)+
3849 wshow=4.*x3*((1.-
x1)/(2.-
x2)**2+(1.-
x2)/(2.-
x1)**2)
3851 IF(mstj(102).GE.2) wme=x3**2-2.*(1.+x3)*(1.-
x1)*(1.-
x2)*
3854 IF(wme.LT.
rlu(0)*wshow) goto 390
3857 ELSEIF(mce.EQ.1.AND.igm.GT.0.AND.mstj(42).GE.2)
THEN
3860 IF(iep(1).EQ.
n+2) zm=1.-v(im,1)
3861 the2id=
z*(1.-
z)*(zm*
p(im,4))**2/v(iep(1),5)
3863 420
IF(k(iaom,5).EQ.22)
THEN
3865 IF(k(iaom,3).LE.
ns) maom=0
3866 IF(maom.EQ.1) goto 420
3869 the2im=v(iaom,1)*(1.-v(iaom,1))*
p(iaom,4)**2/v(iaom,5)
3870 IF(the2id.LT.the2im) goto 390
3875 IF(mstj(48).EQ.1)
THEN
3876 IF(nep.EQ.1.AND.im.EQ.
ns)
THEN
3877 the2id=
z*(1.-
z)*ps(4)**2/v(iep(1),5)
3878 IF(the2id.LT.1./parj(85)**2) goto 390
3879 ELSEIF(nep.EQ.2.AND.iep(1).EQ.
ns+2)
THEN
3880 the2id=
z*(1.-
z)*(0.5*
p(im,4))**2/v(iep(1),5)
3881 IF(the2id.LT.1./parj(85)**2) goto 390
3882 ELSEIF(nep.EQ.2.AND.iep(1).EQ.
ns+3)
THEN
3883 the2id=
z*(1.-
z)*(0.5*
p(im,4))**2/v(iep(1),5)
3884 IF(the2id.LT.1./parj(86)**2) goto 390
3890 IF(miis.GE.2.AND.iep(1).LE.
ns+3)
THEN
3891 the2d=
max((1.-
z)/
z,
z/(1.-
z))*v(iep(1),5)/(0.5*
p(im,4))**2
3892 IF(iep(1).EQ.
ns+2.AND.isii(1).GE.1)
THEN
3893 IF(the2d.GT.theiis(1,isii(1))**2) goto 390
3894 ELSEIF(iep(1).EQ.
ns+3.AND.isii(2).GE.1)
THEN
3895 IF(the2d.GT.theiis(2,isii(2))**2) goto 390
3903 IF(nep.EQ.1) goto 460
3904 IF(nep.EQ.2.AND.
p(iep(1),5)+
p(iep(2),5).GE.
p(im,5)) goto 330
3906 IF(itry(i).EQ.0.AND.kfld(i).LE.40)
THEN
3907 IF(ksh(kfld(i)).EQ.1)
THEN
3909 IF(kfld(i).GE.6.AND.kfld(i).LE.8) ifld=37+kfld(i)+
3911 IF(
p(
n+i,5).GE.pmth(2,ifld)) goto 330
3918 pa1s=(
p(
n+1,4)+
p(
n+1,5))*(
p(
n+1,4)-
p(
n+1,5))
3919 pa2s=(
p(
n+2,4)+
p(
n+2,5))*(
p(
n+2,4)-
p(
n+2,5))
3920 pa3s=(
p(
n+3,4)+
p(
n+3,5))*(
p(
n+3,4)-
p(
n+3,5))
3921 pts=0.25*(2.*pa1s*pa2s+2.*pa1s*pa3s+2.*pa2s*pa3s-
3922 & pa1s**2-pa2s**2-pa3s**2)/pa1s
3923 IF(pts.LE.0.) goto 330
3924 ELSEIF(igm.EQ.0.OR.mstj(43).LE.2.OR.
mod(mstj(43),2).EQ.0)
THEN
3927 IF(kflda.GT.40) goto 450
3928 IF(ksh(kflda).EQ.0) goto 450
3930 IF(kflda.GE.6.AND.kflda.LE.8) iflda=37+kflda+
3932 IF(
p(i1,5).LT.pmth(2,iflda)) goto 450
3933 IF(kflda.EQ.21)
THEN
3934 kflgd1=iabs(k(i1,5))
3938 kflgd2=iabs(k(i1,5))
3941 IF(igm.EQ.0.OR.mstj(43).LE.2)
THEN
3942 ped=0.5*(v(im,5)+v(i1,5)-v(i2,5))/
p(im,5)
3944 IF(i1.EQ.
n+1) zm=v(im,1)
3945 IF(i1.EQ.
n+2) zm=1.-v(im,1)
3946 pml=
sqrt((v(im,5)-v(
n+1,5)-v(
n+2,5))**2-
3947 & 4.*v(
n+1,5)*v(
n+2,5))
3948 ped=pem*(0.5*(v(im,5)-pml+v(i1,5)-v(i2,5))+pml*zm)/v(im,5)
3950 IF(
mod(mstj(43),2).EQ.1)
THEN
3952 IF(kflgd2.EQ.22) pmqth3=0.5*parj(83)
3954 IF(kflgd1.GE.6.AND.kflgd1.LE.8) iflgd1=iflda
3955 pmq1=(pmth(1,iflgd1)**2+pmqth3**2)/v(i1,5)
3956 pmq2=(pmth(1,kflgd2)**2+pmqth3**2)/v(i1,5)
3957 zd=
sqrt(
max(0.,(1.-v(i1,5)/ped**2)*((1.-pmq1-pmq2)**2-
3961 zd=
sqrt(
max(0.,1.-v(i1,5)/ped**2))
3966 IF(i1.EQ.
n+1.AND.(v(i1,1).LT.zl.OR.v(i1,1).GT.zu)) isl(1)=1
3967 IF(i1.EQ.
n+2.AND.(v(i1,1).LT.zl.OR.v(i1,1).GT.zu)) isl(2)=1
3968 IF(kflda.EQ.21) v(i1,4)=
log(zu*(1.-zl)/
max(1
e-20,zl*(1.-zu)))
3969 IF(kflda.NE.21) v(i1,4)=
log((1.-zl)/
max(1
e-10,1.-zu))
3971 IF(isl(1).EQ.1.AND.isl(2).EQ.1.AND.islm.NE.0)
THEN
3974 ELSEIF(isl(1).EQ.1.AND.isl(2).EQ.1)
THEN
3975 zdr1=
max(0.,v(
n+1,3)/
max(1
e-6,v(
n+1,4))-1.)
3976 zdr2=
max(0.,v(
n+2,3)/
max(1
e-6,v(
n+2,4))-1.)
3977 IF(zdr2.GT.
rlu(0)*(zdr1+zdr2)) isl(1)=0
3978 IF(isl(1).EQ.1) isl(2)=0
3979 IF(isl(1).EQ.0) islm=1
3980 IF(isl(2).EQ.0) islm=2
3982 IF(isl(1).EQ.1.OR.isl(2).EQ.1) goto 330
3985 IF(kfld(1).GE.6.AND.kfld(1).LE.8) ifld1=37+kfld(1)+
3988 IF(kfld(2).GE.6.AND.kfld(2).LE.8) ifld2=37+kfld(2)+
3990 IF(igm.GT.0.AND.
mod(mstj(43),2).EQ.1.AND.(
p(
n+1,5).GE.
3991 &pmth(2,ifld1).OR.
p(
n+2,5).GE.pmth(2,ifld2)))
THEN
3992 pmq1=v(
n+1,5)/v(im,5)
3993 pmq2=v(
n+2,5)/v(im,5)
3994 zd=
sqrt(
max(0.,(1.-v(im,5)/pem**2)*((1.-pmq1-pmq2)**2-
3999 IF(v(im,1).LT.zl.OR.v(im,1).GT.zu) goto 330
4010 p(
n+1,4)=
p(ipa(1),4)
4012 ELSEIF(igm.EQ.0.AND.nep.EQ.2)
THEN
4013 ped1=0.5*(v(im,5)+v(
n+1,5)-v(
n+2,5))/
p(im,5)
4021 p(
n+2,4)=
p(im,5)-ped1
4024 ELSEIF(nep.EQ.3)
THEN
4030 p(
n+2,3)=0.5*(pa3s-pa2s-pa1s)/
p(
n+1,3)
4033 p(
n+3,3)=-(
p(
n+1,3)+
p(
n+2,3))
4041 pzm=
sqrt(
max(0.,(pem+
p(im,5))*(pem-
p(im,5))))
4042 pmls=(v(im,5)-v(
n+1,5)-v(
n+2,5))**2-4.*v(
n+1,5)*v(
n+2,5)
4045 ELSEIF(
mod(mstj(43),2).EQ.1)
THEN
4046 pts=(pem**2*(zm*(1.-zm)*v(im,5)-(1.-zm)*v(
n+1,5)-
4047 & zm*v(
n+2,5))-0.25*pmls)/pzm**2
4049 pts=pmls*(zm*(1.-zm)*pem**2/v(im,5)-0.25)/pzm**2
4055 IF(mstj(49).NE.1.AND.
mod(mstj(46),2).EQ.1.AND.k(im,2).EQ.21.
4056 & and.iau.NE.0)
THEN
4057 IF(k(igm,3).NE.0) mazip=1
4059 IF(iau.EQ.im+1) zau=1.-v(igm,1)
4060 IF(mazip.EQ.0) zau=0.
4061 IF(k(igm,2).NE.21)
THEN
4062 hazip=2.*zau/(1.+zau**2)
4064 hazip=(zau/(1.-zau*(1.-zau)))**2
4066 IF(k(
n+1,2).NE.21)
THEN
4067 hazip=hazip*(-2.*zm*(1.-zm))/(1.-2.*zm*(1.-zm))
4069 hazip=hazip*(zm*(1.-zm)/(1.-zm*(1.-zm)))**2
4076 IF(mstj(49).NE.2.AND.mstj(46).GE.2.AND.(k(
n+1,2).EQ.21.OR.
4077 & k(
n+2,2).EQ.21).AND.iau.NE.0)
THEN
4078 IF(k(igm,3).NE.0) mazic=
n+1
4079 IF(k(igm,3).NE.0.AND.k(
n+1,2).NE.21) mazic=
n+2
4080 IF(k(igm,3).NE.0.AND.k(
n+1,2).EQ.21.AND.k(
n+2,2).EQ.21.AND.
4081 & zm.GT.0.5) mazic=
n+2
4082 IF(k(iau,2).EQ.22) mazic=0
4084 IF(mazic.EQ.
n+2) zs=1.-zm
4086 IF(iau.EQ.im-1) zgm=1.-v(igm,1)
4087 IF(mazic.EQ.0) zgm=1.
4088 IF(mazic.NE.0) hazic=(
p(im,5)/
p(igm,5))*
4089 &
sqrt((1.-zs)*(1.-zgm)/(zs*zgm))
4090 hazic=
min(0.95,hazic)
4095 470
IF(nep.EQ.2.AND.igm.GT.0)
THEN
4096 IF(
mod(mstj(43),2).EQ.1)
THEN
4097 p(
n+1,4)=pem*v(im,1)
4099 p(
n+1,4)=pem*(0.5*(v(im,5)-
sqrt(pmls)+v(
n+1,5)-v(
n+2,5))+
4100 &
sqrt(pmls)*zm)/v(im,5)
4106 p(
n+1,3)=0.5*(v(
n+2,5)-v(
n+1,5)-v(im,5)+2.*pem*
p(
n+1,4))/pzm
4112 p(
n+2,3)=pzm-
p(
n+1,3)
4113 p(
n+2,4)=pem-
p(
n+1,4)
4114 IF(mstj(43).LE.2)
THEN
4115 v(
n+1,2)=(pem*
p(
n+1,4)-pzm*
p(
n+1,3))/
p(im,5)
4116 v(
n+2,2)=(pem*
p(
n+2,4)-pzm*
p(
n+2,3))/
p(im,5)
4122 IF(mstj(43).LE.2)
THEN
4123 bex=
p(igm,1)/
p(igm,4)
4124 bey=
p(igm,2)/
p(igm,4)
4125 bez=
p(igm,3)/
p(igm,4)
4126 ga=
p(igm,4)/
p(igm,5)
4127 gabep=ga*(ga*(bex*
p(im,1)+bey*
p(im,2)+bez*
p(im,3))/(1.+ga)-
4136 the=
ulangl(
p(im,3)+gabep*bez,
sqrt((
p(im,1)+gabep*bex)**2+
4137 & (
p(im,2)+gabep*bey)**2))
4144 dp(3)=-
sin(the)*
p(i,1)+
cos(the)*
p(i,3)
4146 dbp=bex*dp(1)+bey*dp(2)+bez*dp(3)
4147 dgabp=ga*(ga*dbp/(1d0+ga)+dp(4))
4148 p(i,1)=dp(1)+dgabp*bex
4149 p(i,2)=dp(2)+dgabp*bey
4150 p(i,3)=dp(3)+dgabp*bez
4151 p(i,4)=ga*(dp(4)+dbp)
4156 IF(mazip.NE.0.OR.mazic.NE.0)
THEN
4162 dpma=dpt(1,1)*dpt(2,1)+dpt(1,2)*dpt(2,2)+dpt(1,3)*dpt(2,3)
4163 dpmd=dpt(1,1)*dpt(3,1)+dpt(1,2)*dpt(3,2)+dpt(1,3)*dpt(3,3)
4164 dpmm=dpt(1,1)**2+dpt(1,2)**2+dpt(1,3)**2
4166 dpt(4,j)=dpt(2,j)-dpma*dpt(1,j)/dpmm
4167 dpt(5,j)=dpt(3,j)-dpmd*dpt(1,j)/dpmm
4169 dpt(4,4)=
sqrt(dpt(4,1)**2+dpt(4,2)**2+dpt(4,3)**2)
4170 dpt(5,4)=
sqrt(dpt(5,1)**2+dpt(5,2)**2+dpt(5,3)**2)
4171 IF(
min(dpt(4,4),dpt(5,4)).GT.0.1*parj(82))
THEN
4172 cad=(dpt(4,1)*dpt(5,1)+dpt(4,2)*dpt(5,2)+
4173 & dpt(4,3)*dpt(5,3))/(dpt(4,4)*dpt(5,4))
4175 IF(1.+hazip*(2.*cad**2-1.).LT.
rlu(0)*(1.+abs(hazip)))
4179 IF(mazic.EQ.
n+2) cad=-cad
4180 IF((1.-hazic)*(1.-hazic*cad)/(1.+hazic**2-2.*hazic*cad)
4181 & .LT.
rlu(0)) goto 470
4187 IF(
mod(miis,2).EQ.1.AND.igm.EQ.
ns+1.AND.(k(
n+1,2).EQ.21.OR.
4188 &k(
n+2,2).EQ.21))
THEN
4190 IF(isii(iii).GE.1)
THEN
4192 IF(k(
n+1,2).NE.21) iaziid=
n+2
4193 IF(k(
n+1,2).EQ.21.AND.k(
n+2,2).EQ.21.AND.
4194 &
p(
n+1,4).GT.
p(
n+2,4)) iaziid=
n+2
4195 theiid=
ulangl(
p(iaziid,3),
sqrt(
p(iaziid,1)**2+
p(iaziid,2)**2))
4196 IF(iii.EQ.2) theiid=paru(1)-theiid
4197 phiiid=
ulangl(
p(iaziid,1),
p(iaziid,2))
4198 hazii=
min(0.95,theiid/theiis(iii,isii(iii)))
4199 cad=
cos(phiiid-phiiis(iii,isii(iii)))
4200 phirel=abs(phiiid-phiiis(iii,isii(iii)))
4201 IF(phirel.GT.paru(1)) phirel=paru(2)-phirel
4202 IF((1.-hazii)*(1.-hazii*cad)/(1.+hazii**2-2.*hazii*cad)
4203 & .LT.
rlu(0)) goto 470
4208 IF(igm.GE.0) k(im,1)=14
4211 IF(
n.GT.mstu(4)-mstu(32)-5)
THEN
4212 CALL
luerrm(11,
'(LUSHOW:) no more memory left in LUJETS')
4213 IF(mstu(21).GE.1)
n=
ns
4214 IF(mstu(21).GE.1)
RETURN
4219 510
IF(npa.GE.2)
THEN
4223 IF(ip2.GT.0.AND.ip2.LT.ip1) k(
ns+1,3)=ip2
4233 IF(k(i,1).LE.10.AND.k(i,2).EQ.22)
THEN
4235 ELSEIF(k(i,1).LE.10.AND.iabs(k(i,2)).GE.11.AND.
4236 &iabs(k(i,2)).LE.18)
THEN
4238 ELSEIF(k(i,1).LE.10)
THEN
4239 k(i,4)=mstu(5)*(k(i,4)/mstu(5))
4240 k(i,5)=mstu(5)*(k(i,5)/mstu(5))
4241 ELSEIF(k(
mod(k(i,4),mstu(5))+1,2).NE.22)
THEN
4242 id1=
mod(k(i,4),mstu(5))
4243 IF(k(i,2).GE.1.AND.k(i,2).LE.8) id1=
mod(k(i,4),mstu(5))+1
4244 id2=2*
mod(k(i,4),mstu(5))+1-id1
4245 k(i,4)=mstu(5)*(k(i,4)/mstu(5))+id1
4246 k(i,5)=mstu(5)*(k(i,5)/mstu(5))+id2
4247 k(id1,4)=k(id1,4)+mstu(5)*i
4248 k(id1,5)=k(id1,5)+mstu(5)*id2
4249 k(id2,4)=k(id2,4)+mstu(5)*id1
4250 k(id2,5)=k(id2,5)+mstu(5)*i
4252 id1=
mod(k(i,4),mstu(5))
4254 k(i,4)=mstu(5)*(k(i,4)/mstu(5))+id1
4255 k(i,5)=mstu(5)*(k(i,5)/mstu(5))+id1
4256 IF(iabs(k(i,2)).LE.10.OR.k(id1,1).GE.11)
THEN
4257 k(id1,4)=k(id1,4)+mstu(5)*i
4258 k(id1,5)=k(id1,5)+mstu(5)*i
4274 gabep=ga*(ga*(bex*
p(ipa(1),1)+bey*
p(ipa(1),2)+bez*
p(ipa(1),3))
4275 & /(1.+ga)-
p(ipa(1),4))
4283 &+gabep*bex)**2+(
p(ipa(1),2)+gabep*bey)**2))
4284 phi=
ulangl(
p(ipa(1),1)+gabep*bex,
p(ipa(1),2)+gabep*bey)
4287 &
sin(
phi)*(
p(ipa(2),2)+gabep*bey)-
sin(the)*(
p(ipa(2),3)+gabep*
4291 CALL ludbrb(
ns+1,
n,0.,chi,0d0,0d0,0d0)
4297 CALL ludbrb(
ns+1,
n,the,
phi,dbex,dbey,dbez)
4307 IF(
n.EQ.
ns+npa+iim)
THEN
4312 k(ipa(ip),4)=k(ipa(ip),4)+
ns+iim+ip
4313 k(ipa(ip),5)=k(ipa(ip),5)+
ns+iim+ip
4314 k(
ns+iim+ip,3)=ipa(ip)
4315 IF(iim.EQ.1.AND.mstu(16).NE.2) k(
ns+iim+ip,3)=
ns+1
4316 IF(k(
ns+iim+ip,1).NE.1)
THEN
4317 k(
ns+iim+ip,4)=mstu(5)*ipa(ip)+k(
ns+iim+ip,4)
4318 k(
ns+iim+ip,5)=mstu(5)*ipa(ip)+k(
ns+iim+ip,5)
4333 IMPLICIT DOUBLE PRECISION(
d)
4334 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
4335 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4336 SAVE /lujets/,/ludat1/
4337 dimension dps(4),kfbe(9),nbe(0:9),bei(100)
4338 DATA kfbe/211,-211,111,321,-321,130,310,221,331/
4341 IF((mstj(51).NE.1.AND.mstj(51).NE.2).OR.
n-nsav.LE.1)
RETURN
4347 IF(k(i,1).LE.10.AND.((kfa.GT.10.AND.kfa.LE.20).OR.kfa.EQ.22).AND.
4349 kfma=iabs(k(k(i,3),2))
4350 IF(kfma.GT.10.AND.kfma.LE.80) k(i,1)=-k(i,1)
4352 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 120
4354 dps(j)=dps(j)+
p(i,j)
4357 CALL ludbrb(0,0,0.,0.,-dps(1)/dps(4),-dps(2)/dps(4),
4361 IF(k(i,1).GE.1.AND.k(i,1).LE.10) pecm=pecm+
p(i,4)
4366 DO 160 ibe=1,
min(9,mstj(52))
4369 IF(k(i,2).NE.kfbe(ibe)) goto 150
4370 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 150
4371 IF(nbe(ibe).GE.mstu(4)-mstu(32)-5)
THEN
4372 CALL
luerrm(11,
'(LUBOEI:) no more memory left in LUJETS')
4382 IF(nbe(
min(9,mstj(52)))-nbe(0).LE.1) goto 280
4385 DO 220 ibe=1,
min(9,mstj(52))
4386 IF(ibe.NE.1.AND.ibe.NE.4.AND.ibe.LE.7) goto 180
4387 IF(ibe.EQ.1.AND.
max(nbe(1)-nbe(0),nbe(2)-nbe(1),nbe(3)-nbe(2))
4389 IF(ibe.EQ.4.AND.
max(nbe(4)-nbe(3),nbe(5)-nbe(4),nbe(6)-nbe(5),
4390 &nbe(7)-nbe(6)).LE.1) goto 180
4391 IF(ibe.GE.8.AND.nbe(ibe)-nbe(ibe-1).LE.1) goto 180
4392 IF(ibe.EQ.1) pmhq=2.*
ulmass(211)
4393 IF(ibe.EQ.4) pmhq=2.*
ulmass(321)
4394 IF(ibe.EQ.8) pmhq=2.*
ulmass(221)
4395 IF(ibe.EQ.9) pmhq=2.*
ulmass(331)
4396 qdel=0.1*
min(pmhq,parj(93))
4397 IF(mstj(51).EQ.1)
THEN
4398 nbin=
min(100,
nint(9.*parj(93)/qdel))
4399 beex=
exp(0.5*qdel/parj(93))
4400 bert=
exp(-qdel/parj(93))
4402 nbin=
min(100,
nint(3.*parj(93)/qdel))
4405 qbin=qdel*(ibin-0.5)
4406 bei(ibin)=qdel*(qbin**2+qdel**2/12.)/
sqrt(qbin**2+pmhq**2)
4407 IF(mstj(51).EQ.1)
THEN
4409 bei(ibin)=bei(ibin)*beex
4411 bei(ibin)=bei(ibin)*
exp(-(qbin/parj(93))**2)
4413 IF(ibin.GE.2) bei(ibin)=bei(ibin)+bei(ibin-1)
4417 180
DO 210 i1m=nbe(ibe-1)+1,nbe(ibe)-1
4419 DO 200 i2m=i1m+1,nbe(ibe)
4421 q2old=
max(0.,(
p(i1,4)+
p(i2,4))**2-(
p(i1,1)+
p(i2,1))**2-(
p(i1,2)+
4422 &
p(i2,2))**2-(
p(i1,3)+
p(i2,3))**2-(
p(i1,5)+
p(i2,5))**2)
4426 IF(qold.LT.1
e-3*qdel)
THEN
4428 ELSEIF(qold.LE.qdel)
THEN
4430 ELSEIF(qold.LT.(nbin-0.1)*qdel)
THEN
4433 rinp=(rbin**3-ibin**3)/(3*ibin*(ibin+1)+1)
4434 qmov=(bei(ibin)+rinp*(bei(ibin+1)-bei(ibin)))*
4435 &
sqrt(q2old+pmhq**2)/q2old
4437 qmov=bei(nbin)*
sqrt(q2old+pmhq**2)/q2old
4439 q2new=q2old*(qold/(qold+3.*parj(92)*qmov))**(2./3.)
4442 hc1=(
p(i1,4)+
p(i2,4))**2-(q2old-q2new)
4443 hc2=(q2old-q2new)*(
p(i1,4)-
p(i2,4))**2
4444 ha=0.5*(1.-
sqrt(hc1*q2new/(hc1*q2old-hc2)))
4446 pd=ha*(
p(i2,j)-
p(i1,j))
4447 p(i1m,j)=
p(i1m,j)+pd
4448 p(i2m,j)=
p(i2m,j)-pd
4455 DO 240 im=nbe(0)+1,nbe(
min(9,mstj(52)))
4458 p(i,j)=
p(i,j)+
p(im,j)
4460 p(i,4)=
sqrt(
p(i,5)**2+
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
4467 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 250
4469 pqs=pqs+
p(i,5)**2/
p(i,4)
4471 fac=(pecm-pqs)/(pes-pqs)
4473 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 270
4477 p(i,4)=
sqrt(
p(i,5)**2+
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
4481 280 CALL ludbrb(0,0,0.,0.,dps(1)/dps(4),dps(2)/dps(4),dps(3)/dps(4))
4483 IF(k(i,1).LT.0) k(i,1)=-k(i,1)
4494 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4495 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4496 SAVE /ludat1/,/ludat2/
4508 IF((mstj(93).EQ.1.OR.mstj(93).EQ.2).AND.kfa.LE.10)
THEN
4513 ELSEIF(kfa.LE.100.OR.kc.LE.80.OR.kc.GT.100)
THEN
4518 kfla=
mod(kfa/1000,10)
4519 kflb=
mod(kfa/100,10)
4522 kflr=
mod(kfa/10000,10)
4528 IF(kfla.EQ.0.AND.kflr.EQ.0.AND.kfls.LE.3)
THEN
4529 IF(kfls.EQ.1) pmspl=-3./(pmb*pmc)
4530 IF(kfls.GE.3) pmspl=1./(pmb*pmc)
4531 ulmass=parf(111)+pmb+pmc+parf(113)*parf(101)**2*pmspl
4532 ELSEIF(kfla.EQ.0)
THEN
4534 IF(kfls.EQ.1) kmul=3
4535 IF(kflr.EQ.2) kmul=4
4536 IF(kfls.EQ.5) kmul=5
4537 ulmass=parf(113+kmul)+pmb+pmc
4538 ELSEIF(kflc.EQ.0)
THEN
4539 IF(kfls.EQ.1) pmspl=-3./(pma*pmb)
4540 IF(kfls.EQ.3) pmspl=1./(pma*pmb)
4541 ulmass=2.*parf(112)/3.+pma+pmb+parf(114)*parf(101)**2*pmspl
4542 IF(mstj(93).EQ.1)
ulmass=pma+pmb
4546 IF(kfls.EQ.2.AND.kfla.EQ.kflb)
THEN
4547 pmspl=1./(pma*pmb)-2./(pma*pmc)-2./(pmb*pmc)
4548 ELSEIF(kfls.EQ.2.AND.kflb.GE.kflc)
THEN
4549 pmspl=-2./(pma*pmb)-2./(pma*pmc)+1./(pmb*pmc)
4550 ELSEIF(kfls.EQ.2)
THEN
4553 pmspl=1./(pma*pmb)+1./(pma*pmc)+1./(pmb*pmc)
4555 ulmass=parf(112)+pma+pmb+pmc+parf(114)*parf(101)**2*pmspl
4561 IF(mstj(24).GE.1.AND.pmas(kc,2).GT.1
e-4)
THEN
4562 IF(mstj(24).EQ.1.OR.(mstj(24).EQ.2.AND.kfa.GT.100))
THEN
4564 & atan(2.*pmas(kc,3)/pmas(kc,2)))
4567 pmlow=atan((
max(0.,pm0-pmas(kc,3))**2-pm0**2)/
4569 pmupp=atan(((pm0+pmas(kc,3))**2-pm0**2)/(pm0*pmas(kc,2)))
4571 & (pmupp-pmlow)*
rlu(0))))
4584 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4585 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4586 common/ludat4/chaf(500)
4588 SAVE /ludat1/,/ludat2/,/ludat4/
4597 kfla=
mod(kfa/1000,10)
4598 kflb=
mod(kfa/100,10)
4601 kflr=
mod(kfa/10000,10)
4604 IF(kfa.LE.100.OR.(kfa.GT.100.AND.kc.GT.100))
THEN
4608 IF(chau(lem:lem).NE.
' ')
len=lem
4612 ELSEIF(kflc.EQ.0)
THEN
4613 chau(1:2)=chaf(kfla)(1:1)//chaf(kflb)(1:1)
4614 IF(kfls.EQ.1) chau(3:4)=
'_0'
4615 IF(kfls.EQ.3) chau(3:4)=
'_1'
4619 ELSEIF(kfla.EQ.0)
THEN
4620 IF(kflb.EQ.5) chau(1:1)=
'B'
4621 IF(kflb.EQ.6) chau(1:1)=
'T'
4622 IF(kflb.EQ.7) chau(1:1)=
'L'
4623 IF(kflb.EQ.8) chau(1:1)=
'H'
4625 IF(kflr.EQ.0.AND.kfls.EQ.1)
THEN
4626 ELSEIF(kflr.EQ.0.AND.kfls.EQ.3)
THEN
4629 ELSEIF(kflr.EQ.1.AND.kfls.EQ.3)
THEN
4632 ELSEIF(kflr.EQ.1.AND.kfls.EQ.1)
THEN
4635 ELSEIF(kflr.EQ.2)
THEN
4638 ELSEIF(kfls.EQ.5)
THEN
4642 IF(kflc.GE.3.AND.kflr.EQ.0.AND.kfls.LE.3)
THEN
4643 chau(
len+1:
len+2)=
'_'//chaf(kflc)(1:1)
4645 ELSEIF(kflc.GE.3)
THEN
4646 chau(
len+1:
len+1)=chaf(kflc)(1:1)
4652 IF(kflb.LE.2.AND.kflc.LE.2)
THEN
4654 IF(kflc.GT.kflb) chau=
'Lambda'
4655 IF(kfls.EQ.4) chau=
'Sigma*'
4657 IF(chau(6:6).NE.
' ')
len=6
4658 ELSEIF(kflb.LE.2.OR.kflc.LE.2)
THEN
4660 IF(kfla.GT.kflb.AND.kflb.GT.kflc) chau=
'Xi'''
4661 IF(kfls.EQ.4) chau=
'Xi*'
4663 IF(chau(3:3).NE.
' ')
len=3
4666 IF(kfla.GT.kflb.AND.kflb.GT.kflc) chau=
'Omega'''
4667 IF(kfls.EQ.4) chau=
'Omega*'
4669 IF(chau(6:6).NE.
' ')
len=6
4673 chau(
len+1:
len+2)=
'_'//chaf(kfla)(1:1)
4675 IF(kflb.GE.kflc.AND.kflc.GE.4)
THEN
4676 chau(
len+1:
len+2)=chaf(kflb)(1:1)//chaf(kflc)(1:1)
4678 ELSEIF(kflb.GE.kflc.AND.kflb.GE.4)
THEN
4679 chau(
len+1:
len+1)=chaf(kflb)(1:1)
4681 ELSEIF(kflc.GT.kflb.AND.kflb.GE.4)
THEN
4682 chau(
len+1:
len+2)=chaf(kflc)(1:1)//chaf(kflb)(1:1)
4684 ELSEIF(kflc.GT.kflb.AND.kflc.GE.4)
THEN
4685 chau(
len+1:
len+1)=chaf(kflc)(1:1)
4691 IF(kf.GT.0.OR.
len.EQ.0)
THEN
4692 ELSEIF(kfa.GT.10.AND.kfa.LE.40.AND.kq.NE.0.AND.
mod(kq,3).EQ.0)
4694 ELSEIF(kfa.EQ.89.OR.(kfa.GE.91.AND.kfa.LE.99))
THEN
4695 ELSEIF(kfa.GT.100.AND.kfla.EQ.0.AND.kq.NE.0)
THEN
4696 ELSEIF(mstu(15).LE.1)
THEN
4705 IF(kq.EQ.6) chau(
len+1:
len+2)=
'++'
4706 IF(kq.EQ.-6) chau(
len+1:
len+2)=
'--'
4707 IF(kq.EQ.3) chau(
len+1:
len+1)=
'+'
4708 IF(kq.EQ.-3) chau(
len+1:
len+1)=
'-'
4709 IF(kq.EQ.0.AND.(kfa.LE.22.OR.
len.EQ.0))
THEN
4710 ELSEIF(kq.EQ.0.AND.(kfa.GE.81.AND.kfa.LE.100))
THEN
4711 ELSEIF(kfa.EQ.28.OR.kfa.EQ.29)
THEN
4712 ELSEIF(kfa.GT.100.AND.kfla.EQ.0.AND.kflb.EQ.kflc.AND.
4714 ELSEIF(kq.EQ.0)
THEN
4726 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4734 ELSEIF(kfa.LE.100.OR.kc.LE.80.OR.kc.GT.100)
THEN
4738 ELSEIF(
mod(kfa/1000,10).EQ.0)
THEN
4739 luchge=(kchg(
mod(kfa/100,10),1)-kchg(
mod(kfa/10,10),1))*
4740 & (-1)**
mod(kfa/100,10)
4741 ELSEIF(
mod(kfa/10,10).EQ.0)
THEN
4742 luchge=kchg(
mod(kfa/1000,10),1)+kchg(
mod(kfa/100,10),1)
4744 luchge=kchg(
mod(kfa/1000,10),1)+kchg(
mod(kfa/100,10),1)+
4745 & kchg(
mod(kfa/10,10),1)
4760 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4762 dimension kftab(25),kctab(25)
4763 DATA kftab/211,111,221,311,321,130,310,213,113,223,
4764 &313,323,2112,2212,210,2110,2210,110,220,330,440,30443,30553,0,0/
4765 DATA kctab/101,111,112,102,103,221,222,121,131,132,
4766 &122,123,332,333,281,282,283,284,285,286,287,231,235,0,0/
4773 IF(kfa.EQ.0.OR.kfa.GE.100000)
THEN
4775 ELSEIF(kfa.LE.100)
THEN
4777 IF(kf.LT.0.AND.kchg(kfa,3).EQ.0)
lucomp=0
4781 IF(kfa.EQ.kftab(ikf))
THEN
4790 kfla=
mod(kfa/1000,10)
4791 kflb=
mod(kfa/100,10)
4794 kflr=
mod(kfa/10000,10)
4797 IF(kfa-10000*kflr.LT.1000)
THEN
4798 IF(kflb.EQ.0.OR.kflb.EQ.9.OR.kflc.EQ.0.OR.kflc.EQ.9)
THEN
4799 ELSEIF(kflb.LT.kflc)
THEN
4800 ELSEIF(kf.LT.0.AND.kflb.EQ.kflc)
THEN
4801 ELSEIF(kflb.EQ.kflc)
THEN
4802 IF(kflr.EQ.0.AND.kfls.EQ.1)
THEN
4804 ELSEIF(kflr.EQ.0.AND.kfls.EQ.3)
THEN
4806 ELSEIF(kflr.EQ.1.AND.kfls.EQ.3)
THEN
4808 ELSEIF(kflr.EQ.1.AND.kfls.EQ.1)
THEN
4810 ELSEIF(kflr.EQ.2.AND.kfls.EQ.3)
THEN
4812 ELSEIF(kflr.EQ.0.AND.kfls.EQ.5)
THEN
4815 ELSEIF(kflb.LE.5)
THEN
4816 IF(kflr.EQ.0.AND.kfls.EQ.1)
THEN
4817 lucomp=100+((kflb-1)*(kflb-2))/2+kflc
4818 ELSEIF(kflr.EQ.0.AND.kfls.EQ.3)
THEN
4819 lucomp=120+((kflb-1)*(kflb-2))/2+kflc
4820 ELSEIF(kflr.EQ.1.AND.kfls.EQ.3)
THEN
4821 lucomp=140+((kflb-1)*(kflb-2))/2+kflc
4822 ELSEIF(kflr.EQ.1.AND.kfls.EQ.1)
THEN
4823 lucomp=160+((kflb-1)*(kflb-2))/2+kflc
4824 ELSEIF(kflr.EQ.2.AND.kfls.EQ.3)
THEN
4825 lucomp=180+((kflb-1)*(kflb-2))/2+kflc
4826 ELSEIF(kflr.EQ.0.AND.kfls.EQ.5)
THEN
4827 lucomp=200+((kflb-1)*(kflb-2))/2+kflc
4829 ELSEIF((kfls.EQ.1.AND.kflr.LE.1).OR.(kfls.EQ.3.AND.kflr.LE.2)
4830 & .OR.(kfls.EQ.5.AND.kflr.EQ.0))
THEN
4835 ELSEIF((kflr.EQ.0.OR.kflr.EQ.1).AND.kflc.EQ.0)
THEN
4836 IF(kfls.NE.1.AND.kfls.NE.3)
THEN
4837 ELSEIF(kfla.EQ.9.OR.kflb.EQ.0.OR.kflb.EQ.9)
THEN
4838 ELSEIF(kfla.LT.kflb)
THEN
4839 ELSEIF(kfls.EQ.1.AND.kfla.EQ.kflb)
THEN
4845 ELSEIF(kflr.EQ.0.AND.kfls.EQ.2)
THEN
4846 IF(kfla.EQ.9.OR.kflb.EQ.0.OR.kflb.EQ.9.OR.kflc.EQ.9)
THEN
4847 ELSEIF(kfla.LE.kflc.OR.kfla.LT.kflb)
THEN
4848 ELSEIF(kfla.GE.6.OR.kflb.GE.4.OR.kflc.GE.4)
THEN
4850 ELSEIF(kflb.LT.kflc)
THEN
4851 lucomp=300+((kfla+1)*kfla*(kfla-1))/6+(kflc*(kflc-1))/2+kflb
4853 lucomp=330+((kfla+1)*kfla*(kfla-1))/6+(kflb*(kflb-1))/2+kflc
4857 ELSEIF(kflr.EQ.0.AND.kfls.EQ.4)
THEN
4858 IF(kfla.EQ.9.OR.kflb.EQ.0.OR.kflb.EQ.9.OR.kflc.EQ.9)
THEN
4859 ELSEIF(kfla.LT.kflb.OR.kflb.LT.kflc)
THEN
4860 ELSEIF(kfla.GE.6.OR.kflb.GE.4)
THEN
4863 lucomp=360+((kfla+1)*kfla*(kfla-1))/6+(kflb*(kflb-1))/2+kflc
4875 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
4876 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4877 SAVE /lujets/,/ludat1/
4878 CHARACTER chmess*(*)
4884 IF(mstu(25).EQ.1.AND.mstu(27).LE.mstu(26))
WRITE(mstu(11),5000)
4885 & merr,mstu(31),chmess
4888 ELSEIF(merr.LE.20)
THEN
4891 IF(mstu(21).GE.1.AND.mstu(23).LE.mstu(22))
WRITE(mstu(11),5100)
4892 & merr-10,mstu(31),chmess
4893 IF(mstu(21).GE.2.AND.mstu(23).GT.mstu(22))
THEN
4894 WRITE(mstu(11),5100) merr-10,mstu(31),chmess
4895 WRITE(mstu(11),5200)
4896 IF(merr.NE.17) CALL
lulist(2)
4902 WRITE(mstu(11),5300) merr-20,mstu(31),chmess
4907 5000
FORMAT(/5
x,
'Advisory warning type',i2,
' given after',i6,
4908 &
' LUEXEC calls:'/5
x,
a)
4909 5100
FORMAT(/5
x,
'Error type',i2,
' has occured after',i6,
4910 &
' LUEXEC calls:'/5
x,
a)
4911 5200
FORMAT(5
x,
'Execution will be stopped after listing of last ',
4913 5300
FORMAT(/5
x,
'Fatal error type',i2,
' has occured after',i6,
4914 &
' LUEXEC calls:'/5
x,
a/5
x,
'Execution will now be stopped!')
4924 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4931 aempi=paru(101)/(3.*paru(1))
4932 IF(mstu(101).LE.0.OR.q2.LT.2
e-6)
THEN
4934 ELSEIF(mstu(101).EQ.2.AND.q2.LT.paru(104))
THEN
4936 ELSEIF(mstu(101).EQ.2)
THEN
4937 rpigg=1.-paru(101)/paru(103)
4938 ELSEIF(q2.LT.0.09)
THEN
4939 rpigg=aempi*(13.4916+
log(q2))+0.00835*
log(1.+q2)
4940 ELSEIF(q2.LT.9.)
THEN
4941 rpigg=aempi*(16.3200+2.*
log(q2))+0.00238*
log(1.+3.927*q2)
4942 ELSEIF(q2.LT.1e4)
THEN
4943 rpigg=aempi*(13.4955+3.*
log(q2))+0.00165+0.00299*
log(1.+q2)
4945 rpigg=aempi*(13.4955+3.*
log(q2))+0.00221+0.00293*
log(1.+q2)
4949 ulalem=paru(101)/(1.-rpigg)
4960 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
4961 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
4962 SAVE /ludat1/,/ludat2/
4965 IF(mstu(111).LE.0)
THEN
4975 IF(mstu(115).GE.2) q2eff=
max(q2,paru(114))
4978 100
IF(nf.GT.
max(2,mstu(113)))
THEN
4979 q2thr=paru(113)*pmas(nf,1)**2
4980 IF(q2eff.LT.q2thr)
THEN
4982 alam2=alam2*(q2thr/alam2)**(2./(33.-2.*nf))
4986 110
IF(nf.LT.
min(8,mstu(114)))
THEN
4987 q2thr=paru(113)*pmas(nf+1,1)**2
4988 IF(q2eff.GT.q2thr)
THEN
4990 alam2=alam2*(alam2/q2thr)**(2./(33.-2.*nf))
4994 IF(mstu(115).EQ.1) q2eff=q2eff+alam2
4995 paru(117)=
sqrt(alam2)
4999 algq=
log(
max(1.0001,q2eff/alam2))
5000 IF(mstu(111).EQ.1)
THEN
5004 ulalps=
min(paru(115),paru(2)/(b0*algq)*(1.-b1*
log(algq)/
5018 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5023 IF(
r.LT.1
e-20)
RETURN
5024 IF(abs(
x)/
r.LT.0.8)
THEN
5028 IF(
x.LT.0..AND.
ulangl.GE.0.)
THEN
5030 ELSEIF(
x.LT.0.)
THEN
5046 common/ludatr/mrlu(6),rrlu(100)
5052 nbck=
min(mrlu(6),-move)
5054 backspace(lfn,err=110,iostat=ierr)
5056 mrlu(6)=mrlu(6)-nbck
5060 WRITE(lfn,err=110,iostat=ierr) (mrlu(i1),i1=1,5),
5061 &(rrlu(i2),i2=1,100)
5066 110
WRITE(cherr,
'(I8)') ierr
5067 CALL
luerrm(18,
'(RLUGET:) error when accessing file, IOSTAT ='//
5079 common/ludatr/mrlu(6),rrlu(100)
5085 nbck=
min(mrlu(6),-move)
5087 backspace(lfn,err=120,iostat=ierr)
5089 mrlu(6)=mrlu(6)-nbck
5095 READ(lfn,err=120,iostat=ierr) (mrlu(i1),i1=1,5),
5096 &(rrlu(i2),i2=1,100)
5098 mrlu(6)=mrlu(6)+nfor
5102 120
WRITE(cherr,
'(I8)') ierr
5103 CALL
luerrm(18,
'(RLUSET:) error when accessing file, IOSTAT ='//
5117 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
5118 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5119 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
5120 SAVE /lujets/,/ludat1/,/ludat2/
5121 dimension
ns(2),pts(2),pls(2)
5124 IF((medit.GE.0.AND.medit.LE.3).OR.medit.EQ.5)
THEN
5126 IF(mstu(2).GT.0) imax=mstu(2)
5128 DO 110 i=
max(1,mstu(1)),imax
5129 IF(k(i,1).EQ.0.OR.k(i,1).GT.20) goto 110
5131 IF(k(i,1).GT.10) goto 110
5132 ELSEIF(medit.EQ.2)
THEN
5133 IF(k(i,1).GT.10) goto 110
5135 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.kc.EQ.18)
5137 ELSEIF(medit.EQ.3)
THEN
5138 IF(k(i,1).GT.10) goto 110
5140 IF(kc.EQ.0) goto 110
5141 IF(kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0) goto 110
5142 ELSEIF(medit.EQ.5)
THEN
5143 IF(k(i,1).EQ.13.OR.k(i,1).EQ.14) goto 110
5145 IF(kc.EQ.0) goto 110
5146 IF(k(i,1).GE.11.AND.kchg(kc,2).EQ.0) goto 110
5158 IF(i1.LT.
n) mstu(3)=0
5159 IF(i1.LT.
n) mstu(70)=0
5163 ELSEIF(medit.GE.11.AND.medit.LE.15)
THEN
5166 k(i,3)=
mod(k(i,3),mstu(5))
5167 IF(medit.EQ.11.AND.k(i,1).LT.0) goto 120
5168 IF(medit.EQ.12.AND.k(i,1).EQ.0) goto 120
5169 IF(medit.EQ.13.AND.(k(i,1).EQ.11.OR.k(i,1).EQ.12.OR.
5170 & k(i,1).EQ.15).AND.k(i,2).NE.94) goto 120
5171 IF(medit.EQ.14.AND.(k(i,1).EQ.13.OR.k(i,1).EQ.14.OR.
5172 & k(i,2).EQ.94)) goto 120
5173 IF(medit.EQ.15.AND.k(i,1).GE.21) goto 120
5175 k(i,3)=k(i,3)+mstu(5)*i1
5180 IF(k(i,1).LE.0.OR.k(i,1).GT.20.OR.k(i,3)/mstu(5).EQ.0) goto 140
5182 130 im=
mod(k(id,3),mstu(5))
5183 IF(medit.EQ.13.AND.im.GT.0.AND.im.LE.
n)
THEN
5184 IF((k(im,1).EQ.11.OR.k(im,1).EQ.12.OR.k(im,1).EQ.15).AND.
5185 & k(im,2).NE.94)
THEN
5189 ELSEIF(medit.EQ.14.AND.im.GT.0.AND.im.LE.
n)
THEN
5190 IF(k(im,1).EQ.13.OR.k(im,1).EQ.14.OR.k(im,2).EQ.94)
THEN
5195 k(i,3)=mstu(5)*(k(i,3)/mstu(5))
5196 IF(im.NE.0) k(i,3)=k(i,3)+k(im,3)/mstu(5)
5197 IF(k(i,1).NE.3.AND.k(i,1).NE.13.AND.k(i,1).NE.14)
THEN
5198 IF(k(i,4).GT.0.AND.k(i,4).LE.mstu(4)) k(i,4)=
5199 & k(k(i,4),3)/mstu(5)
5200 IF(k(i,5).GT.0.AND.k(i,5).LE.mstu(4)) k(i,5)=
5201 & k(k(i,5),3)/mstu(5)
5203 kcm=
mod(k(i,4)/mstu(5),mstu(5))
5204 IF(kcm.GT.0.AND.kcm.LE.mstu(4)) kcm=k(kcm,3)/mstu(5)
5205 kcd=
mod(k(i,4),mstu(5))
5206 IF(kcd.GT.0.AND.kcd.LE.mstu(4)) kcd=k(kcd,3)/mstu(5)
5207 k(i,4)=mstu(5)**2*(k(i,4)/mstu(5)**2)+mstu(5)*kcm+kcd
5208 kcm=
mod(k(i,5)/mstu(5),mstu(5))
5209 IF(kcm.GT.0.AND.kcm.LE.mstu(4)) kcm=k(kcm,3)/mstu(5)
5210 kcd=
mod(k(i,5),mstu(5))
5211 IF(kcd.GT.0.AND.kcd.LE.mstu(4)) kcd=k(kcd,3)/mstu(5)
5212 k(i,5)=mstu(5)**2*(k(i,5)/mstu(5)**2)+mstu(5)*kcm+kcd
5221 IF(k(i,3)/mstu(5).EQ.0) goto 170
5228 k(i1,3)=
mod(k(i1,3),mstu(5))
5230 IF(i.EQ.mstu(90+
iz))
THEN
5232 mstu(90+mstu(90))=i1
5233 paru(90+mstu(90))=paru(90+
iz)
5237 IF(i1.LT.
n) mstu(3)=0
5238 IF(i1.LT.
n) mstu(70)=0
5242 ELSEIF(medit.EQ.16)
THEN
5244 IF(k(i,1).LE.10.OR.k(i,1).GT.20) goto 190
5245 IF(k(i,4).NE.0.OR.k(i,5).NE.0) goto 190
5248 IF(k(i1,3).NE.i)
THEN
5249 ELSEIF(k(i,4).EQ.0)
THEN
5255 IF(k(i,5).EQ.0) k(i,5)=k(i,4)
5256 IF(k(i,4).NE.0) goto 190
5259 IF(im.LE.0.OR.im.GE.i) goto 190
5260 IF(k(im,1).LE.20.OR.k(im,1).GT.30) goto 190
5261 IF(k(im,2).NE.k(i,2).OR.abs(
p(im,5)-
p(i,5)).GT.1
e-2) goto 190
5263 IF(k(i1,3).NE.im)
THEN
5264 ELSEIF(k(i,4).EQ.0)
THEN
5270 IF(k(i,5).EQ.0) k(i,5)=k(i,4)
5271 IF(k(i,4).NE.0) goto 190
5277 IF(k(i1,3).EQ.im.AND.k(i1,1).GT.20.AND.k(i1,1).LE.30)
THEN
5279 IF(id1.EQ.im) id1=i1
5283 IF(k(i1,3).NE.id1.AND.k(i1,3).NE.id2)
THEN
5284 ELSEIF(k(i,4).EQ.0)
THEN
5290 IF(k(i,5).EQ.0) k(i,5)=k(i,4)
5294 ELSEIF(medit.EQ.21)
THEN
5295 IF(2*
n.GE.mstu(4))
THEN
5296 CALL
luerrm(11,
'(LUEDIT:) no more memory left in LUJETS')
5301 k(mstu(4)-i,j)=k(i,j)
5302 p(mstu(4)-i,j)=
p(i,j)
5303 v(mstu(4)-i,j)=v(i,j)
5309 ELSEIF(medit.EQ.22)
THEN
5312 k(i,j)=k(mstu(4)-i,j)
5313 p(i,j)=
p(mstu(4)-i,j)
5314 v(i,j)=v(mstu(4)-i,j)
5320 ELSEIF(medit.EQ.23)
THEN
5325 IF(k(kh,1).GT.20) kh=0
5327 IF(kh.NE.0) goto 250
5329 IF(k(i,1).GT.10.AND.k(i,1).LE.20) k(i,1)=k(i,1)-10
5334 ELSEIF(medit.EQ.31.OR.medit.EQ.32)
THEN
5335 CALL ludbrb(1,
n+mstu(3),0.,-
ulangl(
p(mstu(61),1),
5336 &
p(mstu(61),2)),0d0,0d0,0d0)
5337 CALL ludbrb(1,
n+mstu(3),-
ulangl(
p(mstu(61),3),
5338 &
p(mstu(61),1)),0.,0d0,0d0,0d0)
5339 CALL ludbrb(1,
n+mstu(3),0.,-
ulangl(
p(mstu(61)+1,1),
5340 &
p(mstu(61)+1,2)),0d0,0d0,0d0)
5341 IF(medit.EQ.31)
RETURN
5350 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 270
5351 IF(mstu(41).GE.2)
THEN
5353 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
5354 & kc.EQ.18) goto 270
5355 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
5358 is=2.-sign(0.5,
p(i,3))
5360 pts(is)=pts(is)+
sqrt(
p(i,1)**2+
p(i,2)**2)
5362 IF(
ns(1)*pts(2)**2.LT.
ns(2)*pts(1)**2)
5363 & CALL ludbrb(1,
n+mstu(3),paru(1),0.,0d0,0d0,0d0)
5367 IF(
p(i,3).GE.0.) goto 280
5368 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 280
5369 IF(mstu(41).GE.2)
THEN
5371 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
5372 & kc.EQ.18) goto 280
5373 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
5376 is=2.-sign(0.5,
p(i,1))
5377 pls(is)=pls(is)-
p(i,3)
5379 IF(pls(2).GT.pls(1)) CALL ludbrb(1,
n+mstu(3),0.,paru(1),
5392 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
5393 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5394 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
5395 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
5396 SAVE /lujets/,/ludat1/,/ludat2/,/ludat3/
5397 CHARACTER chap*16,chac*16,chan*16,chad(5)*16,chdl(7)*4
5399 DATA chdl/
'(())',
' ',
'()',
'!!',
'<>',
'==',
'(==)'/
5402 IF(mlist.EQ.0.OR.mstu(12).EQ.1)
THEN
5405 IF(mlist.EQ.0)
RETURN
5409 IF(mlist.GE.1.AND.mlist.LE.3)
THEN
5410 IF(mlist.EQ.1)
WRITE(mstu(11),5100)
5411 IF(mlist.EQ.2)
WRITE(mstu(11),5200)
5412 IF(mlist.EQ.3)
WRITE(mstu(11),5300)
5414 IF(mlist.GE.2) lmx=16
5417 IF(mstu(2).GT.0) imax=mstu(2)
5418 DO 120 i=
max(1,mstu(1)),
max(imax,
n+
max(0,mstu(3)))
5419 IF((i.GT.imax.AND.i.LE.
n).OR.k(i,1).LT.0) goto 120
5425 IF(chap(lem:lem).NE.
' ')
len=lem
5429 IF(mdl.EQ.2.OR.mdl.GE.8)
THEN
5431 IF(
len.GT.lmx) chac(lmx:lmx)=
'?'
5434 IF(mdl.EQ.1.OR.mdl.EQ.7) ldl=2
5436 chac=chdl(mdl)(1:2*ldl)//
' '
5438 chac=chdl(mdl)(1:ldl)//chap(1:
min(
len,lmx-2*ldl))//
5439 & chdl(mdl)(ldl+1:2*ldl)//
' '
5440 IF(
len+2*ldl.GT.lmx) chac(lmx:lmx)=
'?'
5445 IF(k(i,1).EQ.1.OR.k(i,1).EQ.2.OR.k(i,1).EQ.11.OR.k(i,1).EQ.12)
5449 IF(kc.NE.0) kcc=kchg(kc,2)
5450 IF(iabs(k(i,2)).EQ.39)
THEN
5451 IF(
len+2*ldl+3.LE.lmx) chac(lmx-1:lmx-1)=
'X'
5452 ELSEIF(kcc.NE.0.AND.istr.EQ.0)
THEN
5454 IF(
len+2*ldl+3.LE.lmx) chac(lmx-1:lmx-1)=
'A'
5455 ELSEIF(kcc.NE.0.AND.(k(i,1).EQ.2.OR.k(i,1).EQ.12))
THEN
5456 IF(
len+2*ldl+3.LE.lmx) chac(lmx-1:lmx-1)=
'I'
5457 ELSEIF(kcc.NE.0)
THEN
5459 IF(
len+2*ldl+3.LE.lmx) chac(lmx-1:lmx-1)=
'V'
5464 IF(mlist.EQ.1.AND.abs(
p(i,4)).LT.9999.)
THEN
5465 WRITE(mstu(11),5400) i,chac(1:12),(k(i,j1),j1=1,3),
5467 ELSEIF(mlist.EQ.1.AND.abs(
p(i,4)).LT.99999.)
THEN
5468 WRITE(mstu(11),5500) i,chac(1:12),(k(i,j1),j1=1,3),
5470 ELSEIF(mlist.EQ.1)
THEN
5471 WRITE(mstu(11),5600) i,chac(1:12),(k(i,j1),j1=1,3),
5473 ELSEIF(mstu(5).EQ.10000.AND.(k(i,1).EQ.3.OR.k(i,1).EQ.13.OR.
5474 & k(i,1).EQ.14))
THEN
5475 WRITE(mstu(11),5700) i,chac,(k(i,j1),j1=1,3),
5476 & k(i,4)/100000000,
mod(k(i,4)/10000,10000),
mod(k(i,4),10000),
5477 & k(i,5)/100000000,
mod(k(i,5)/10000,10000),
mod(k(i,5),10000),
5480 WRITE(mstu(11),5800) i,chac,(k(i,j1),j1=1,5),(
p(i,j2),j2=1,5)
5482 IF(mlist.EQ.3)
WRITE(mstu(11),5900) (v(i,j),j=1,5)
5485 IF(mstu(70).GE.1)
THEN
5487 DO 110 j=1,
min(10,mstu(70))
5488 IF(i.EQ.mstu(70+j)) isep=1
5490 IF(isep.EQ.1.AND.mlist.EQ.1)
WRITE(mstu(11),6000)
5491 IF(isep.EQ.1.AND.mlist.GE.2)
WRITE(mstu(11),6100)
5499 IF(mlist.EQ.1.AND.abs(ps(4)).LT.9999.)
THEN
5500 WRITE(mstu(11),6200) ps(6),(ps(j),j=1,5)
5501 ELSEIF(mlist.EQ.1.AND.abs(ps(4)).LT.99999.)
THEN
5502 WRITE(mstu(11),6300) ps(6),(ps(j),j=1,5)
5503 ELSEIF(mlist.EQ.1)
THEN
5504 WRITE(mstu(11),6400) ps(6),(ps(j),j=1,5)
5506 WRITE(mstu(11),6500) ps(6),(ps(j),j=1,5)
5510 ELSEIF(mlist.EQ.11)
THEN
5511 WRITE(mstu(11),6600)
5515 IF(chap.NE.
' '.AND.chan.EQ.
' ')
WRITE(mstu(11),6700) kf,chap
5516 IF(chan.NE.
' ')
WRITE(mstu(11),6700) kf,chap,-kf,chan
5520 DO 150 kflb=1,kfla-(3-kfls)/2
5521 kf=1000*kfla+100*kflb+kfls
5524 WRITE(mstu(11),6700) kf,chap,-kf,chan
5530 WRITE(mstu(11),6700) kf,chap
5533 WRITE(mstu(11),6700) kf,chap
5536 IF(kmul.EQ.0.OR.kmul.EQ.3) kfls=1
5537 IF(kmul.EQ.5) kfls=5
5539 IF(kmul.EQ.2.OR.kmul.EQ.3) kflr=1
5540 IF(kmul.EQ.4) kflr=2
5542 DO 180 kflc=1,kflb-1
5543 kf=10000*kflr+100*kflb+10*kflc+kfls
5546 WRITE(mstu(11),6700) kf,chap,-kf,chan
5548 kf=10000*kflr+110*kflb+kfls
5550 WRITE(mstu(11),6700) kf,chap
5555 WRITE(mstu(11),6700) kf,chap
5558 WRITE(mstu(11),6700) kf,chap
5564 IF(kflsp.EQ.1.AND.(kfla.EQ.kflb.OR.kflb.EQ.kflc)) goto 210
5565 IF(kflsp.EQ.2.AND.kfla.EQ.kflc) goto 210
5566 IF(kflsp.EQ.1) kf=1000*kfla+100*kflc+10*kflb+kfls
5567 IF(kflsp.GE.2) kf=1000*kfla+100*kflb+10*kflc+kfls
5570 WRITE(mstu(11),6700) kf,chap,-kf,chan
5577 ELSEIF(mlist.EQ.12)
THEN
5578 WRITE(mstu(11),6800)
5582 IF(mstu(2).NE.0) kfmax=mstu(2)
5583 DO 270 kf=
max(1,mstu(1)),kfmax
5585 IF(kc.EQ.0) goto 270
5586 IF(mstu(14).EQ.0.AND.kf.GT.100.AND.kc.LE.100) goto 270
5587 IF(mstu(14).GT.0.AND.kf.GT.100.AND.
max(
mod(kf/1000,10),
5588 &
mod(kf/100,10)).GT.mstu(14)) goto 270
5589 IF(mstu(14).GT.0.AND.kf.GT.100.AND.kc.EQ.90) goto 270
5593 IF(kf.LE.100.AND.chap.EQ.
' '.AND.mdcy(kc,2).EQ.0) goto 270
5596 WRITE(mstu(11),6900) kf,kc,chap,chan,kchg(kc,1),kchg(kc,2),
5597 & kchg(kc,3),pm,pmas(kc,2),pmas(kc,3),pmas(kc,4),mdcy(kc,1)
5601 IF(kf.GT.100.AND.kc.LE.100) goto 270
5602 DO 260 idc=mdcy(kc,2),mdcy(kc,2)+mdcy(kc,3)-1
5604 CALL
luname(kfdp(idc,j),chad(j))
5606 WRITE(mstu(11),7000) idc,mdme(idc,1),mdme(idc,2),brat(idc),
5613 ELSEIF(mlist.EQ.13)
THEN
5614 WRITE(mstu(11),7100)
5616 WRITE(mstu(11),7200) i,mstu(i),paru(i),mstj(i),parj(i),parf(i)
5621 5100
FORMAT(///28
x,
'Event listing (summary)'//4
x,
'I particle/jet KS',
5622 &5
x,
'KF orig p_x p_y p_z E m'/)
5623 5200
FORMAT(///28
x,
'Event listing (standard)'//4
x,
'I particle/jet',
5624 &
' K(I,1) K(I,2) K(I,3) K(I,4) K(I,5) P(I,1)',
5625 &
' P(I,2) P(I,3) P(I,4) P(I,5)'/)
5626 5300
FORMAT(///28
x,
'Event listing (with vertices)'//4
x,
'I particle/j',
5627 &
'et K(I,1) K(I,2) K(I,3) K(I,4) K(I,5) P(I,1)',
5628 &
' P(I,2) P(I,3) P(I,4) P(I,5)'/73
x,
5629 &
'V(I,1) V(I,2) V(I,3) V(I,4) V(I,5)'/)
5630 5400
FORMAT(1
x,i4,2
x,a12,1
x,i2,1
x,i6,1
x,i4,5f9.3)
5631 5500
FORMAT(1
x,i4,2
x,a12,1
x,i2,1
x,i6,1
x,i4,5f9.2)
5632 5600
FORMAT(1
x,i4,2
x,a12,1
x,i2,1
x,i6,1
x,i4,5f9.1)
5633 5700
FORMAT(1
x,i4,2
x,a16,1
x,i3,1
x,i8,2
x,i4,2(3
x,i1,2i4),5f13.5)
5634 5800
FORMAT(1
x,i4,2
x,a16,1
x,i3,1
x,i8,2
x,i4,2(3
x,i9),5f13.5)
5635 5900
FORMAT(66
x,5(1
x,f12.3))
5636 6000
FORMAT(1
x,78(
'='))
5637 6100
FORMAT(1
x,130(
'='))
5638 6200
FORMAT(19
x,
'sum:',f6.2,5
x,5f9.3)
5639 6300
FORMAT(19
x,
'sum:',f6.2,5
x,5f9.2)
5640 6400
FORMAT(19
x,
'sum:',f6.2,5
x,5f9.1)
5641 6500
FORMAT(19
x,
'sum charge:',f6.2,3
x,
'sum momentum and inv. mass:',
5643 6600
FORMAT(///20
x,
'List of KF codes in program'/)
5644 6700
FORMAT(4
x,i6,4
x,a16,6
x,i6,4
x,a16)
5645 6800
FORMAT(///30
x,
'Particle/parton data table'//5
x,
'KF',5
x,
'KC',4
x,
5646 &
'particle',8
x,
'antiparticle',6
x,
'chg col anti',8
x,
'mass',7
x,
5647 &
'width',7
x,
'w-cut',5
x,
'lifetime',1
x,
'decay'/11
x,
'IDC',1
x,
'on/off',
5648 &1
x,
'ME',3
x,
'Br.rat.',4
x,
'decay products')
5649 6900
FORMAT(/1
x,i6,3
x,i4,4
x,a16,a16,3i5,1
x,f12.5,2(1
x,f11.5),
5651 7000
FORMAT(10
x,i4,2
x,i3,2
x,i3,2
x,f8.5,4
x,5a16)
5652 7100
FORMAT(///20
x,
'Parameter value table'//4
x,
'I',3
x,
'MSTU(I)',
5653 &8
x,
'PARU(I)',3
x,
'MSTJ(I)',8
x,
'PARJ(I)',8
x,
'PARF(I)')
5654 7200
FORMAT(1
x,i4,1
x,i9,1
x,f14.5,1
x,i9,1
x,f14.5,1
x,f14.5)
5664 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5665 common/pypars/mstp(200),parp(200),msti(200),pari(200)
5668 CHARACTER month(12)*3, logo(48)*32, refer(22)*36, line*79,
5669 &vers*1, subv*3, date*2, year*4
5672 DATA month/
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
5674 DATA (logo(j),j=1,10)/
5675 &
'PPP Y Y TTTTT H H III A ',
5676 &
'P P Y Y T H H I A A ',
5677 &
'PPP Y T HHHHH I AAAAA',
5679 &
'P Y T H H III A A',
5680 &
'JJJJ EEEE TTTTT SSS EEEE TTTTT',
5682 &
' J EEE T SSS EEE T ',
5684 &
' JJ EEEE T SSS EEEE T '/
5685 DATA (logo(j),j=11,29)/
5687 &
' *:::!!:::::::::::* ',
5688 &
' *::::::!!::::::::::::::* ',
5689 &
' *::::::::!!::::::::::::::::* ',
5690 &
' *:::::::::!!:::::::::::::::::* ',
5691 &
' *:::::::::!!:::::::::::::::::* ',
5692 &
' *::::::::!!::::::::::::::::*! ',
5693 &
' *::::::!!::::::::::::::* !! ',
5694 &
' !! *:::!!:::::::::::* !! ',
5695 &
' !! !* -><- * !! ',
5705 DATA (logo(j),j=30,48)/
5706 &
'Welcome to the Lund Monte Carlo!',
5708 &
' This is PYTHIA version x.xxx ',
5709 &
'Last date of change: xx xxx 199x',
5711 &
' This is JETSET version x.xxx ',
5712 &
'Last date of change: xx xxx 199x',
5715 &
' Torbjorn Sjostrand ',
5716 &
' Dept. of theoretical physics 2 ',
5717 &
' University of Lund ',
5718 &
' Solvegatan 14A ',
5719 &
' S-223 62 Lund, Sweden ',
5720 &
' phone: +46 - 46 - 222 48 16 ',
5721 &
' E-mail: torbjorn@thep.lu.se ',
5723 &
' Copyright Torbjorn Sjostrand ',
5724 &
' and CERN, Geneva 1993 '/
5725 DATA (refer(j),j=1,6)/
5726 &
'The latest program versions and docu',
5727 &
'mentation is found on WWW address ',
5728 &
'http://thep.lu.se/tf2/staff/torbjorn',
5732 DATA (refer(j),j=7,22)/
5733 &
'When you cite these programs, priori',
5734 &
'ty should always be given to the ',
5735 &
'latest published description. Curren',
5737 &
'T. Sjostrand, Computer Physics Commu',
5738 &
'n. 82 (1994) 74. ',
5739 &
'The most recent long description (un',
5741 &
'T. Sjostrand, LU TP 95-20 and CERN-T',
5742 &
'H.7112/93 (revised August 1995). ',
5743 &
'Also remember that the programs, to ',
5744 &
'a large extent, represent original ',
5745 &
'physics research. Other publications',
5746 &
' of special relevance to your ',
5747 &
'studies may therefore deserve separa',
5751 IF(mstp(183)/10.NE.199)
THEN
5752 logo(32)=
' Warning: PYTHIA is not loaded! '
5753 logo(33)=
'Did you remember to link PYDATA?'
5755 WRITE(vers,
'(I1)') mstp(181)
5756 logo(32)(26:26)=vers
5757 WRITE(subv,
'(I3)') mstp(182)
5758 logo(32)(28:30)=subv
5759 WRITE(date,
'(I2)') mstp(185)
5760 logo(33)(22:23)=date
5761 logo(33)(25:27)=month(mstp(184))
5762 WRITE(year,
'(I4)') mstp(183)
5763 logo(33)(29:32)=year
5767 IF(mstu(183)/10.NE.199)
THEN
5768 logo(35)=
' Error: JETSET is not loaded! '
5769 logo(36)=
'Did you remember to link LUDATA?'
5771 WRITE(vers,
'(I1)') mstu(181)
5772 logo(35)(26:26)=vers
5773 WRITE(subv,
'(I3)') mstu(182)
5774 logo(35)(28:30)=subv
5775 WRITE(date,
'(I2)') mstu(185)
5776 logo(36)(22:23)=date
5777 logo(36)(25:27)=month(mstu(184))
5778 WRITE(year,
'(I4)') mstu(183)
5779 logo(36)(29:32)=year
5793 IF(ilin.EQ.2.OR.ilin.EQ.3.OR.ilin.EQ.47.OR.ilin.EQ.48)
THEN
5794 line(4:77)=
'***********************************************'//
5795 &
'***************************'
5796 ELSEIF(ilin.GE.6.AND.ilin.LE.10)
THEN
5797 line(6:37)=logo(ilin-5)
5798 line(44:75)=logo(ilin)
5799 ELSEIF(ilin.GE.13.AND.ilin.LE.31)
THEN
5800 line(6:37)=logo(ilin-2)
5801 line(44:75)=logo(ilin+17)
5802 ELSEIF(ilin.GE.34.AND.ilin.LE.44)
THEN
5803 line(5:40)=refer(2*ilin-67)
5804 line(41:76)=refer(2*ilin-66)
5808 IF(mstu(183)/10.EQ.199)
THEN
5809 WRITE(mstu(11),
'(A79)') line
5811 WRITE(*,
'(A79)') line
5816 IF(mstu(183)/10.EQ.199.AND.mstp(183)/10.EQ.199)
THEN
5817 IF(mstu(182).LT.mstp(186))
WRITE(mstu(11),
5818 &
'(/'' Warning: JETSET subversion too old for PYTHIA''/)')
5819 IF(mstp(182).LT.mstu(186))
WRITE(mstu(11),
5820 &
'(/'' Warning: PYTHIA subversion too old for JETSET''/)')
5831 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
5832 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
5833 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
5834 common/ludat4/chaf(500)
5836 SAVE /ludat1/,/ludat2/,/ludat3/,/ludat4/
5837 CHARACTER chinl*80,chkc*4,chvar(19)*9,chlin*72,
5838 &chblk(20)*72,chold*12,chtmp*12,chnew*12,chcom*12
5839 DATA chvar/
'KCHG(I,1)',
'KCHG(I,2)',
'KCHG(I,3)',
'PMAS(I,1)',
5840 &
'PMAS(I,2)',
'PMAS(I,3)',
'PMAS(I,4)',
'MDCY(I,1)',
'MDCY(I,2)',
5841 &
'MDCY(I,3)',
'MDME(I,1)',
'MDME(I,2)',
'BRAT(I) ',
'KFDP(I,1)',
5842 &
'KFDP(I,2)',
'KFDP(I,3)',
'KFDP(I,4)',
'KFDP(I,5)',
'CHAF(I) '/
5845 IF(mstu(12).GE.1) CALL
lulist(0)
5848 WRITE(lfn,5000) kc,chaf(kc),(kchg(kc,j1),j1=1,3),
5849 & (pmas(kc,j2),j2=1,4),mdcy(kc,1)
5850 DO 100 idc=mdcy(kc,2),mdcy(kc,2)+mdcy(kc,3)-1
5851 WRITE(lfn,5100) mdme(idc,1),mdme(idc,2),brat(idc),
5852 & (kfdp(idc,j),j=1,5)
5857 ELSEIF(mupda.EQ.2)
THEN
5869 140
READ(lfn,5200,
end=150) chinl
5870 IF(chinl(2:5).NE.
' ')
THEN
5874 IF(ndc.NE.0) mdcy(kc,2)=idc+1-ndc
5878 IF(kc.LE.0.OR.kc.GT.mstu(6)) CALL
luerrm(27,
5879 &
'(LUUPDA:) Read KC code illegal, KC ='//chkc)
5880 READ(chinl,5000) kcr,chaf(kc),(kchg(kc,j1),j1=1,3),
5881 & (pmas(kc,j2),j2=1,4),mdcy(kc,1)
5886 IF(idc.GE.mstu(7)) CALL
luerrm(27,
5887 &
'(LUUPDA:) Decay data arrays full by KC ='//chkc)
5888 READ(chinl,5100) mdme(idc,1),mdme(idc,2),brat(idc),
5889 & (kfdp(idc,j),j=1,5)
5893 IF(ndc.NE.0) mdcy(kc,2)=idc+1-ndc
5901 IF(
min(pmas(kc,1),pmas(kc,2),pmas(kc,3),pmas(kc,1)-pmas(kc,3),
5902 & pmas(kc,4)).LT.0..OR.mdcy(kc,3).LT.0) CALL
luerrm(17,
5903 &
'(LUUPDA:) Mass/width/life/(# channels) wrong for KC ='//chkc)
5905 DO 170 idc=mdcy(kc,2),mdcy(kc,2)+mdcy(kc,3)-1
5906 IF(mdme(idc,2).GT.80) goto 170
5908 pms=pmas(kc,1)-pmas(kc,3)-parj(64)
5912 IF(kp.EQ.0.OR.kp.EQ.81.OR.iabs(kp).EQ.82)
THEN
5913 ELSEIF(
lucomp(kp).EQ.0)
THEN
5920 IF(kq.NE.0) merr=
max(2,merr)
5921 IF(kfdp(idc,2).NE.0.AND.(kc.LE.20.OR.kc.GT.40).AND.
5922 & (kc.LE.80.OR.kc.GT.100).AND.mdme(idc,2).NE.34.AND.
5923 & mdme(idc,2).NE.61.AND.pms.LT.0.) merr=
max(1,merr)
5924 IF(merr.EQ.3) CALL
luerrm(17,
5925 &
'(LUUPDA:) Unknown particle code in decay of KC ='//chkc)
5926 IF(merr.EQ.2) CALL
luerrm(17,
5927 &
'(LUUPDA:) Charge not conserved in decay of KC ='//chkc)
5928 IF(merr.EQ.1) CALL
luerrm(7,
5929 &
'(LUUPDA:) Kinematically unallowed decay of KC ='//chkc)
5930 brsum=brsum+brat(idc)
5932 WRITE(chtmp,5500) brsum
5933 IF(abs(brsum).GT.0.0005.AND.abs(brsum-1.).GT.0.0005) CALL
5934 &
luerrm(7,
'(LUUPDA:) Sum of branching ratios is '//chtmp(5:12)//
5935 &
' for KC ='//chkc)
5940 ELSEIF(mupda.EQ.3)
THEN
5943 IF(ivar.GE.11.AND.ivar.LE.18) ndim=mstu(7)
5946 chlin(7:35)=
'DATA ('//chvar(ivar)//
',I= 1, )/'
5952 IF(ivar.EQ.1)
WRITE(chtmp,5400) kchg(idim,1)
5953 IF(ivar.EQ.2)
WRITE(chtmp,5400) kchg(idim,2)
5954 IF(ivar.EQ.3)
WRITE(chtmp,5400) kchg(idim,3)
5955 IF(ivar.EQ.4)
WRITE(chtmp,5500) pmas(idim,1)
5956 IF(ivar.EQ.5)
WRITE(chtmp,5500) pmas(idim,2)
5957 IF(ivar.EQ.6)
WRITE(chtmp,5500) pmas(idim,3)
5958 IF(ivar.EQ.7)
WRITE(chtmp,5500) pmas(idim,4)
5959 IF(ivar.EQ.8)
WRITE(chtmp,5400) mdcy(idim,1)
5960 IF(ivar.EQ.9)
WRITE(chtmp,5400) mdcy(idim,2)
5961 IF(ivar.EQ.10)
WRITE(chtmp,5400) mdcy(idim,3)
5962 IF(ivar.EQ.11)
WRITE(chtmp,5400) mdme(idim,1)
5963 IF(ivar.EQ.12)
WRITE(chtmp,5400) mdme(idim,2)
5964 IF(ivar.EQ.13)
WRITE(chtmp,5500) brat(idim)
5965 IF(ivar.EQ.14)
WRITE(chtmp,5400) kfdp(idim,1)
5966 IF(ivar.EQ.15)
WRITE(chtmp,5400) kfdp(idim,2)
5967 IF(ivar.EQ.16)
WRITE(chtmp,5400) kfdp(idim,3)
5968 IF(ivar.EQ.17)
WRITE(chtmp,5400) kfdp(idim,4)
5969 IF(ivar.EQ.18)
WRITE(chtmp,5400) kfdp(idim,5)
5970 IF(ivar.EQ.19) chtmp=chaf(idim)
5976 IF(chtmp(13-ll:13-ll).NE.
' ') llow=13-ll
5977 IF(chtmp(ll:ll).NE.
' ') lhig=ll
5979 chnew=chtmp(llow:lhig)//
' '
5981 IF((ivar.GE.4.AND.ivar.LE.7).OR.ivar.EQ.13)
THEN
5984 IF(chnew(lnew:lnew).EQ.
'0') goto 200
5985 IF(lnew.EQ.1) chnew(1:2)=
'0.'
5986 IF(lnew.EQ.1) lnew=2
5987 ELSEIF(ivar.EQ.19)
THEN
5989 IF(chnew(ll:ll).EQ.
'''')
THEN
5991 chnew=chtmp(1:ll)//
''''//chtmp(ll+1:11)
5996 chnew(1:lnew+2)=
''''//chtmp(1:lnew)//
''''
6001 IF(chnew.NE.chold)
THEN
6008 IF(nrpt.GE.2) lrpt=lnew+3
6009 IF(nrpt.GE.10) lrpt=lnew+4
6010 IF(nrpt.GE.100) lrpt=lnew+5
6011 IF(nrpt.GE.1000) lrpt=lnew+6
6014 WRITE(chtmp,5400) nrpt
6016 IF(nrpt.GE.10) lrpt=2
6017 IF(nrpt.GE.100) lrpt=3
6018 IF(nrpt.GE.1000) lrpt=4
6019 chcom(1:lrpt+1+lnew)=chtmp(13-lrpt:12)//
'*'//chnew(1:lnew)
6025 IF(llin+lcom.LE.70)
THEN
6026 chlin(llin+1:llin+lcom+1)=chcom(1:lcom)//
','
6028 ELSEIF(nlin.LE.19)
THEN
6029 chlin(llin+1:72)=
' '
6032 chlin(6:6+lcom+1)=
'&'//chcom(1:lcom)//
','
6035 chlin(llin:72)=
'/'//
' '
6037 WRITE(chtmp,5400) idim-nrpt
6038 chblk(1)(30:33)=chtmp(9:12)
6040 WRITE(lfn,5600) chblk(ilin)
6044 chlin(7:35+lcom+1)=
'DATA ('//chvar(ivar)//
',I= , )/'//
6045 & chcom(1:lcom)//
','
6046 WRITE(chtmp,5400) idim-nrpt+1
6047 chlin(25:28)=chtmp(9:12)
6053 chlin(llin:72)=
'/'//
' '
6055 WRITE(chtmp,5400) ndim
6056 chblk(1)(30:33)=chtmp(9:12)
6058 WRITE(lfn,5600) chblk(ilin)
6064 5000
FORMAT(1
x,i4,2
x,a8,3i3,3f12.5,2
x,f12.5,i3)
6065 5100
FORMAT(5
x,2i5,f12.5,5i8)
6080 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
6081 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6082 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6083 SAVE /lujets/,/ludat1/,/ludat2/
6088 IF(i.LT.0.OR.i.GT.mstu(4).OR.j.LE.0)
THEN
6089 ELSEIF(i.EQ.0.AND.j.EQ.1)
THEN
6091 ELSEIF(i.EQ.0.AND.(j.EQ.2.OR.j.EQ.6))
THEN
6093 IF(j.EQ.2.AND.k(i1,1).GE.1.AND.k(i1,1).LE.10)
klu=
klu+1
6094 IF(j.EQ.6.AND.k(i1,1).GE.1.AND.k(i1,1).LE.10)
klu=
klu+
6107 IF(k(i,1).GE.1.AND.k(i,1).LE.10)
klu=1
6108 IF(j.EQ.8)
klu=
klu*k(i,2)
6109 ELSEIF(j.LE.12)
THEN
6113 IF(kc.NE.0) kq=kchg(kc,2)
6114 IF(j.EQ.9.AND.kc.NE.0.AND.kq.NE.0)
klu=k(i,2)
6115 IF(j.EQ.10.AND.kc.NE.0.AND.kq.EQ.0)
klu=k(i,2)
6117 IF(j.EQ.12)
klu=kq*isign(1,k(i,2))
6120 ELSEIF(j.EQ.13)
THEN
6122 klu=
mod(kfa/100,10)*(-1)**
mod(kfa/100,10)
6123 IF(kfa.LT.10)
klu=kfa
6124 IF(
mod(kfa/1000,10).NE.0)
klu=
mod(kfa/1000,10)
6128 ELSEIF(j.LE.15)
THEN
6134 IF(i1.GT.0.AND.k(i1,1).GT.0.AND.k(i1,1).LE.20) goto 110
6136 ELSEIF(j.EQ.16)
THEN
6138 IF(k(i,1).LE.20.AND.((kfa.GE.11.AND.kfa.LE.20).OR.kfa.EQ.22.OR.
6139 & (kfa.GT.100.AND.
mod(kfa/10,10).NE.0)))
THEN
6146 IF(kfam.NE.0.AND.kfam.LE.10) ilp=0
6147 IF(kfam.EQ.21.OR.kfam.EQ.91.OR.kfam.EQ.92.OR.kfam.EQ.93)
6149 IF(kfam.GT.100.AND.
mod(kfam/10,10).EQ.0) ilp=0
6150 IF(ilp.EQ.1) goto 120
6152 IF(k(i1,1).EQ.12)
THEN
6154 IF(k(i3,3).EQ.k(i2,3).AND.k(i3,2).NE.91.AND.k(i3,2).NE.92
6155 & .AND.k(i3,2).NE.93)
klu=
klu+1
6161 IF(i3.LT.
n.AND.k(i3,3).EQ.k(i2,3)) goto 140
6166 ELSEIF(j.EQ.17)
THEN
6173 IF(i1.EQ.0.OR.k(i0,1).LE.0.OR.k(i0,1).GT.20.OR.kc.EQ.0)
THEN
6178 IF(kchg(kc,2).EQ.0) goto 150
6179 IF(k(i1,1).NE.12)
klu=0
6180 IF(k(i1,1).NE.12)
RETURN
6183 IF(i2.LT.
n.AND.k(i2,1).NE.11) goto 160
6185 IF(k3m.GE.i1.AND.k3m.LE.i2)
klu=0
6187 IF(i3.LT.
n.AND.k3p.GE.i1.AND.k3p.LE.i2)
klu=0
6190 ELSEIF(j.EQ.18)
THEN
6191 IF(k(i,1).EQ.11.OR.k(i,1).EQ.12)
klu=
max(0,k(i,5)-k(i,4)+1)
6192 IF(k(i,4).EQ.0.OR.k(i,5).EQ.0)
klu=0
6193 ELSEIF(j.LE.22)
THEN
6194 IF(k(i,1).NE.3.AND.k(i,1).NE.13.AND.k(i,1).NE.14)
RETURN
6195 IF(j.EQ.19)
klu=
mod(k(i,4)/mstu(5),mstu(5))
6196 IF(j.EQ.20)
klu=
mod(k(i,5)/mstu(5),mstu(5))
6197 IF(j.EQ.21)
klu=
mod(k(i,4),mstu(5))
6198 IF(j.EQ.22)
klu=
mod(k(i,5),mstu(5))
6210 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
6211 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6212 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6213 SAVE /lujets/,/ludat1/,/ludat2/
6219 IF(i.LT.0.OR.i.GT.mstu(4).OR.j.LE.0)
THEN
6220 ELSEIF(i.EQ.0.AND.j.LE.4)
THEN
6222 IF(k(i1,1).GT.0.AND.k(i1,1).LE.10)
plu=
plu+
p(i1,j)
6224 ELSEIF(i.EQ.0.AND.j.EQ.5)
THEN
6228 IF(k(i1,1).GT.0.AND.k(i1,1).LE.10) psum(j1)=psum(j1)+
p(i1,j1)
6231 plu=
sqrt(
max(0.,psum(4)**2-psum(1)**2-psum(2)**2-psum(3)**2))
6232 ELSEIF(i.EQ.0.AND.j.EQ.6)
THEN
6234 IF(k(i1,1).GT.0.AND.k(i1,1).LE.10)
plu=
plu+
luchge(k(i1,2))/3.
6243 ELSEIF(j.LE.12)
THEN
6245 IF(j.EQ.7.OR.j.EQ.8)
plu=
p(i,1)**2+
p(i,2)**2+
p(i,3)**2
6246 IF(j.EQ.9.OR.j.EQ.10)
plu=
p(i,1)**2+
p(i,2)**2
6247 IF(j.EQ.11.OR.j.EQ.12)
plu=
p(i,5)**2+
p(i,1)**2+
p(i,2)**2
6248 IF(j.EQ.8.OR.j.EQ.10.OR.j.EQ.12)
plu=
sqrt(
plu)
6251 ELSEIF(j.LE.16)
THEN
6254 IF(j.EQ.14.OR.j.EQ.16)
plu=
plu*180./paru(1)
6257 ELSEIF(j.LE.19)
THEN
6259 IF(j.EQ.17) pmr=
p(i,5)
6260 IF(j.EQ.18) pmr=
ulmass(211)
6261 pr=
max(1
e-20,pmr**2+
p(i,1)**2+
p(i,2)**2)
6266 ELSEIF(j.LE.25)
THEN
6267 IF(j.EQ.20)
plu=2.*
sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)/paru(21)
6268 IF(j.EQ.21)
plu=2.*
p(i,3)/paru(21)
6269 IF(j.EQ.22)
plu=2.*
sqrt(
p(i,1)**2+
p(i,2)**2)/paru(21)
6270 IF(j.EQ.23)
plu=2.*
p(i,4)/paru(21)
6271 IF(j.EQ.24)
plu=(
p(i,4)+
p(i,3))/paru(21)
6272 IF(j.EQ.25)
plu=(
p(i,4)-
p(i,3))/paru(21)
6284 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
6285 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6286 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6287 SAVE /lujets/,/ludat1/,/ludat2/
6288 dimension sm(3,3),sv(3,3)
6299 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 140
6300 IF(mstu(41).GE.2)
THEN
6302 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
6303 & kc.EQ.18) goto 140
6304 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
6308 pa=
sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
6310 IF(abs(paru(41)-2.).GT.0.001) pwt=
max(1
e-10,pa)**(paru(41)-2.)
6313 sm(j1,j2)=sm(j1,j2)+pwt*
p(i,j1)*
p(i,j2)
6321 CALL
luerrm(8,
'(LUSPHE:) too few particles for analysis')
6328 sm(j1,j2)=sm(j1,j2)/ps
6333 sq=(sm(1,1)*sm(2,2)+sm(1,1)*sm(3,3)+sm(2,2)*sm(3,3)-sm(1,2)**2-
6334 &sm(1,3)**2-sm(2,3)**2)/3.-1./9.
6335 sr=-0.5*(sq+1./9.+sm(1,1)*sm(2,3)**2+sm(2,2)*sm(1,3)**2+sm(3,3)*
6336 &sm(1,2)**2-sm(1,1)*sm(2,2)*sm(3,3))+sm(1,2)*sm(1,3)*sm(2,3)+1./27.
6340 p(
n+2,4)=1.-
p(
n+1,4)-
p(
n+3,4)
6341 IF(
p(
n+2,4).LT.1
e-5)
THEN
6342 CALL
luerrm(8,
'(LUSPHE:) all particles back-to-back')
6351 sv(j1,j1)=sm(j1,j1)-
p(
n+i,4)
6360 IF(abs(sv(j1,j2)).LE.
smax) goto 190
6369 rl=sv(j1,jb)/sv(ja,jb)
6371 sv(j1,j2)=sv(j1,j2)-rl*sv(ja,j2)
6372 IF(abs(sv(j1,j2)).LE.
smax) goto 210
6378 jb2=jb+2-3*((jb+1)/3)
6379 p(
n+i,jb1)=-sv(jc,jb2)
6380 p(
n+i,jb2)=sv(jc,jb1)
6381 p(
n+i,jb)=-(sv(ja,jb1)*
p(
n+i,jb1)+sv(ja,jb2)*
p(
n+i,jb2))/
6384 sgn=(-1.)**
int(
rlu(0)+0.5)
6386 p(
n+i,j)=sgn*
p(
n+i,j)/pa
6391 sgn=(-1.)**
int(
rlu(0)+0.5)
6392 p(
n+2,1)=sgn*(
p(
n+1,2)*
p(
n+3,3)-
p(
n+1,3)*
p(
n+3,2))
6393 p(
n+2,2)=sgn*(
p(
n+1,3)*
p(
n+3,1)-
p(
n+1,1)*
p(
n+3,3))
6394 p(
n+2,3)=sgn*(
p(
n+1,1)*
p(
n+3,2)-
p(
n+1,2)*
p(
n+3,1))
6408 sph=1.5*(
p(
n+2,4)+
p(
n+3,4))
6412 IF(mstu(43).LE.1) mstu(3)=3
6413 IF(mstu(43).GE.2)
n=
n+3
6424 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
6425 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6426 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6427 SAVE /lujets/,/ludat1/,/ludat2/
6428 dimension tdi(3),tpr(3)
6434 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 100
6435 IF(mstu(41).GE.2)
THEN
6437 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
6438 & kc.EQ.18) goto 100
6439 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
6442 IF(
n+np+mstu(44)+15.GE.mstu(4)-mstu(32)-5)
THEN
6443 CALL
luerrm(11,
'(LUTHRU:) no more memory left in LUJETS')
6453 p(
n+np,4)=
sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
6455 IF(abs(paru(42)-1.).GT.0.001)
p(
n+np,5)=
p(
n+np,4)**(paru(42)-1.)
6456 ps=ps+
p(
n+np,4)*
p(
n+np,5)
6461 CALL
luerrm(8,
'(LUTHRU:) too few particles for analysis')
6473 CALL ludbrb(
n+1,
n+np+1,0.,-
phi,0d0,0d0,0d0)
6475 CALL ludbrb(
n+1,
n+np+1,-the,0.,0d0,0d0,0d0)
6479 DO 110 ilf=
n+np+4,
n+np+mstu(44)+4
6483 IF(ild.EQ.2)
p(i,4)=
sqrt(
p(i,1)**2+
p(i,2)**2)
6484 DO 130 ilf=
n+np+mstu(44)+3,
n+np+4,-1
6485 IF(
p(i,4).LE.
p(ilf,4)) goto 140
6497 DO 170 ilg=
n+np+mstu(44)+5,
n+np+mstu(44)+15
6500 nc=2**(
min(mstu(44),np)-1)
6505 DO 200 ilf=1,
min(mstu(44),np)
6507 IF(2**ilf*((ilc+2**(ilf-1)-1)/2**ilf).GE.ilc) sgn=-sgn
6509 tdi(j)=tdi(j)+sgn*
p(
n+np+ilf+3,j)
6512 tds=tdi(1)**2+tdi(2)**2+tdi(3)**2
6513 DO 220 ilg=
n+np+mstu(44)+
min(ilc,10)+4,
n+np+mstu(44)+5,-1
6514 IF(tds.LE.
p(ilg,4)) goto 230
6533 IF(thp.LE.1
e-10) tdi(j)=
p(
n+np+mstu(44)+4+ilg,j)
6534 IF(thp.GT.1
e-10) tdi(j)=tpr(j)
6538 sgn=sign(
p(i,5),tdi(1)*
p(i,1)+tdi(2)*
p(i,2)+tdi(3)*
p(i,3))
6540 tpr(j)=tpr(j)+sgn*
p(i,j)
6543 thp=
sqrt(tpr(1)**2+tpr(2)**2+tpr(3)**2)/ps
6544 IF(thp.GE.thps+paru(48)) goto 270
6547 IF(thp.LT.
p(
n+np+ild,4)-paru(48).AND.ilg.LT.
min(10,nc)) goto 260
6548 IF(thp.GT.
p(
n+np+ild,4)+paru(48))
THEN
6550 sgn=(-1.)**
int(
rlu(0)+0.5)
6552 p(
n+np+ild,j)=sgn*tpr(j)/(ps*thp)
6558 IF(iagr.LT.mstu(45).AND.ilg.LT.
min(10,nc)) goto 260
6562 sgn=(-1.)**
int(
rlu(0)+0.5)
6563 p(
n+np+3,1)=-sgn*
p(
n+np+2,2)
6564 p(
n+np+3,2)=sgn*
p(
n+np+2,1)
6568 thp=thp+
p(i,5)*abs(
p(
n+np+3,1)*
p(i,1)+
p(
n+np+3,2)*
p(i,2))
6581 p(
n+ild,j)=
p(
n+np+ild,j)
6585 CALL ludbrb(
n+1,
n+3,the,
phi,0d0,0d0,0d0)
6589 obl=
p(
n+2,4)-
p(
n+3,4)
6592 IF(mstu(43).LE.1) mstu(3)=3
6593 IF(mstu(43).GE.2)
n=
n+3
6604 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
6605 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6606 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6607 SAVE /lujets/,/ludat1/,/ludat2/
6609 SAVE nsav,np,ps,pss,rinit,npre,nrem
6612 r2t(i1,i2)=(
p(i1,5)*
p(i2,5)-
p(i1,1)*
p(i2,1)-
p(i1,2)*
p(i2,2)-
6613 &
p(i1,3)*
p(i2,3))*2.*
p(i1,5)*
p(i2,5)/(0.0001+
p(i1,5)+
p(i2,5))**2
6614 r2m(i1,i2)=2.*
p(i1,4)*
p(i2,4)*(1.-(
p(i1,1)*
p(i2,1)+
p(i1,2)*
6615 &
p(i2,2)+
p(i1,3)*
p(i2,3))/(
p(i1,5)*
p(i2,5)))
6618 IF(mstu(48).LE.0)
THEN
6626 IF(mstu(43).GE.2)
n=
n-njet
6628 p(i,5)=
sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
6630 IF(mstu(46).LE.3) r2acc=paru(44)**2
6631 IF(mstu(46).GE.4) r2acc=paru(45)*ps(5)**2
6638 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 140
6639 IF(mstu(41).GE.2)
THEN
6641 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
6642 & kc.EQ.18) goto 140
6643 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
6646 IF(
n+2*np.GE.mstu(4)-mstu(32)-5)
THEN
6647 CALL
luerrm(11,
'(LUCLUS:) no more memory left in LUJETS')
6658 IF(mstu(42).EQ.0)
p(
n+np,5)=0.
6659 IF(mstu(42).EQ.1.AND.k(i,2).NE.22)
p(
n+np,5)=pmas(101,1)
6660 p(
n+np,4)=
sqrt(
p(
n+np,5)**2+
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
6661 p(
n+np,5)=
sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
6663 ps(j)=ps(j)+
p(
n+np,j)
6673 ps(5)=
sqrt(
max(0.,ps(4)**2-ps(1)**2-ps(2)**2-ps(3)**2))
6676 IF(np.LT.mstu(47))
THEN
6677 CALL
luerrm(8,
'(LUCLUS:) too few particles for analysis')
6684 IF(mstu(46).LE.3) r2acc=paru(44)**2
6685 IF(mstu(46).GE.4) r2acc=paru(45)*ps(5)**2
6687 IF(np.LE.mstu(47)+2) rinit=0.
6691 DO 180 i=
n+np+1,
n+2*np
6696 IF(mstu(46).LE.2)
THEN
6700 DO 210 i=
n+np+1,
n+2*np
6701 IF(
p(i,5).GT.2.*rinit) goto 210
6705 p(
n+1,j)=
p(
n+1,j)+
p(i,j)
6709 IF(
p(
n+1,5).GT.2.*rinit) npre=1
6710 IF(rinit.GE.0.2*paru(43).AND.npre+nrem.LT.mstu(47)) goto 170
6711 IF(nrem.EQ.0) goto 170
6717 DO 230 i=
n+np+1,
n+2*np
6718 IF(k(i,4).NE.0.OR.
p(i,5).LE.pmax) goto 230
6723 p(
n+npre,j)=
p(imax,j)
6729 IF(mstu(46).LE.2)
THEN
6730 DO 260 i=
n+np+1,
n+2*np
6731 IF(k(i,4).NE.0) goto 260
6733 IF(r2.GT.rinit**2) goto 260
6737 p(
n+npre,j)=
p(
n+npre,j)+
p(i,j)
6740 p(
n+npre,5)=
sqrt(
p(
n+npre,1)**2+
p(
n+npre,2)**2+
p(
n+npre,3)**2)
6746 DO 280 i=
n+np+1,
n+2*np
6747 IF(k(i,4).NE.0) goto 280
6749 IF(r2.GE.r2min) goto 280
6755 p(
n+npre,j)=
p(
n+npre,j)+
p(imin,j)
6757 p(
n+npre,5)=
sqrt(
p(
n+npre,1)**2+
p(
n+npre,2)**2+
p(
n+npre,3)**2)
6765 IF(rinit.GE.0.2*paru(43).AND.npre+nrem.LT.mstu(47)) goto 170
6766 IF(nrem.GT.0) goto 220
6772 310
IF(mstu(46).LE.1)
THEN
6778 DO 360 i=
n+np+1,
n+2*np
6780 DO 340 ijet=
n+1,
n+njet
6781 IF(
p(ijet,5).LT.rinit) goto 340
6783 IF(r2.GE.r2min) goto 340
6789 v(imin,j)=v(imin,j)+
p(i,j)
6797 p(i,5)=
sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
6803 r2min=2.*
max(r2acc,ps(5)**2)
6804 DO 400 itry1=
n+1,
n+njet-1
6805 DO 390 itry2=itry1+1,
n+njet
6806 IF(mstu(46).LE.2) r2=r2t(itry1,itry2)
6807 IF(mstu(46).GE.3) r2=r2m(itry1,itry2)
6808 IF(r2.GE.r2min) goto 390
6816 IF(njet.GT.mstu(47).AND.r2min.LT.r2acc)
THEN
6817 irec=
min(imin1,imin2)
6818 idel=
max(imin1,imin2)
6820 p(irec,j)=
p(imin1,j)+
p(imin2,j)
6822 p(irec,5)=
sqrt(
p(irec,1)**2+
p(irec,2)**2+
p(irec,3)**2)
6823 DO 430 i=idel+1,
n+njet
6828 IF(mstu(46).GE.2)
THEN
6829 DO 440 i=
n+np+1,
n+2*np
6831 IF(iori.EQ.idel) k(i,4)=irec-
n
6832 IF(iori.GT.idel) k(i,4)=k(i,4)-1
6839 ELSEIF(njet.EQ.mstu(47).AND.mstu(46).LE.1.AND.nloop.LE.2)
THEN
6843 DO 460 i=
n+np+1,
n+2*np
6844 k(
n+k(i,4),5)=k(
n+k(i,4),5)+1
6848 IF(k(i,5).EQ.0) iemp=i
6854 DO 480 i=
n+np+1,
n+2*np
6855 IF(k(
n+k(i,4),5).LE.1.OR.
p(i,5).LT.rinit) goto 480
6858 IF(r2.LE.r2max) goto 480
6866 p(ijet,j)=
p(ijet,j)-
p(ispl,j)
6869 p(ijet,5)=
sqrt(
p(ijet,1)**2+
p(ijet,2)**2+
p(ijet,3)**2)
6870 IF(nloop.LE.2) goto 300
6876 IF(mstu(46).LE.1.AND.nloop.LE.2.AND.psjt/pss.GT.tsav+paru(48))
6888 DO 540 inew=
n+1,
n+njet
6890 DO 520 itry=
n+1,
n+njet
6891 IF(v(itry,4).LE.pemax) goto 520
6907 DO 550 i=
n+np+1,
n+2*np
6910 IF(k(k(i,3),1).NE.3) k(k(i,3),4)=iori-
n
6911 k(iori,4)=k(iori,4)+1
6922 IF(k(i,4).EQ.0) iemp=i
6931 paru(63)=
sqrt(r2min)
6932 IF(njet.LE.1) paru(63)=0.
6934 CALL
luerrm(8,
'(LUCLUS:) failed to reconstruct as requested')
6937 IF(mstu(43).LE.1) mstu(3)=njet
6938 IF(mstu(43).GE.2)
n=
n+njet
6950 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
6951 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
6952 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
6953 SAVE /lujets/,/ludat1/,/ludat2/
6956 ptlrat=1./sinh(paru(51))**2
6960 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 110
6961 IF(
p(i,1)**2+
p(i,2)**2.LE.ptlrat*
p(i,3)**2) goto 110
6962 IF(mstu(41).GE.2)
THEN
6964 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
6965 & kc.EQ.18) goto 110
6966 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
6972 ieta=
max(1,
min(mstu(51),1+
int(mstu(51)*0.5*(
eta/paru(51)+1.))))
6974 iphi=
max(1,
min(mstu(52),1+
int(mstu(52)*0.5*(
phi/paru(1)+1.))))
6975 ietph=mstu(52)*ieta+iphi
6979 IF(ietph.EQ.k(ic,3))
THEN
6985 IF(nc.GE.mstu(4)-mstu(32)-5)
THEN
6986 CALL
luerrm(11,
'(LUCELL:) no more memory left in LUJETS')
6994 p(nc,1)=(paru(51)/mstu(51))*(2*ieta-1-mstu(51))
6995 p(nc,2)=(paru(1)/mstu(52))*(2*iphi-1-mstu(52))
7000 IF(mstu(53).GE.1)
THEN
7003 IF(mstu(53).EQ.2) pei=
p(ic,5)*cosh(
p(ic,1))
7006 IF(pef.LT.0..OR.pef.GT.paru(56)*pei) goto 120
7008 IF(mstu(53).EQ.2)
p(ic,5)=pef/cosh(
p(ic,1))
7013 IF(paru(58).GT.0.)
THEN
7017 IF(
p(ic,5).GT.paru(58))
THEN
7033 IF(k(ic,5).NE.2) goto 160
7034 IF(
p(ic,5).LE.etmax) goto 160
7040 IF(etmax.LT.paru(52)) goto 220
7041 IF(nj.GE.mstu(4)-mstu(32)-5)
THEN
7042 CALL
luerrm(11,
'(LUCELL:) no more memory left in LUJETS')
7058 IF(k(ic,5).EQ.0) goto 170
7059 IF(abs(
p(ic,1)-
eta).GT.paru(54)) goto 170
7060 dphia=abs(
p(ic,2)-
phi)
7061 IF(dphia.GT.paru(54).AND.dphia.LT.paru(2)-paru(54)) goto 170
7063 IF(dphia.GT.paru(1)) phic=phic+sign(paru(2),
phi)
7064 IF((
p(ic,1)-
eta)**2+(phic-
phi)**2.GT.paru(54)**2) goto 170
7066 k(nj,4)=k(nj,4)+k(ic,4)
7067 p(nj,3)=
p(nj,3)+
p(ic,5)*
p(ic,1)
7068 p(nj,4)=
p(nj,4)+
p(ic,5)*phic
7069 p(nj,5)=
p(nj,5)+
p(ic,5)
7073 IF(
p(nj,5).LT.paru(53))
THEN
7076 IF(k(ic,5).LT.0) k(ic,5)=-k(ic,5)
7078 ELSEIF(mstu(54).LE.2)
THEN
7079 p(nj,3)=
p(nj,3)/
p(nj,5)
7080 p(nj,4)=
p(nj,4)/
p(nj,5)
7081 IF(abs(
p(nj,4)).GT.paru(1))
p(nj,4)=
p(nj,4)-sign(paru(2),
7084 IF(k(ic,5).LT.0) k(ic,5)=0
7091 IF(k(ic,5).GE.0) goto 210
7092 p(nj,1)=
p(nj,1)+
p(ic,5)*
cos(
p(ic,2))
7093 p(nj,2)=
p(nj,2)+
p(ic,5)*
sin(
p(ic,2))
7094 p(nj,3)=
p(nj,3)+
p(ic,5)*sinh(
p(ic,1))
7095 p(nj,4)=
p(nj,4)+
p(ic,5)*cosh(
p(ic,1))
7102 220
DO 250 i=1,nj-nc
7105 IF(k(ij,5).EQ.0) goto 230
7106 IF(
p(ij,5).LT.etmax) goto 230
7124 IF(mstu(54).EQ.2)
THEN
7127 p(i,1)=
p(i,5)*
cos(
p(i,4))
7128 p(i,2)=
p(i,5)*
sin(
p(i,4))
7129 p(i,3)=
p(i,5)*sinh(
eta)
7130 p(i,4)=
p(i,5)*cosh(
eta)
7133 ELSEIF(mstu(54).GE.3)
THEN
7135 p(i,5)=
sqrt(
max(0.,
p(i,4)**2-
p(i,1)**2-
p(i,2)**2-
p(i,3)**2))
7143 IF(mstu(43).LE.1) mstu(3)=njet
7144 IF(mstu(43).GE.2)
n=
n+njet
7155 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
7156 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
7157 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
7158 SAVE /lujets/,/ludat1/,/ludat2/
7159 dimension sm(3,3),sax(3),ps(3,5)
7175 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 170
7176 IF(mstu(41).GE.2)
THEN
7178 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
7179 & kc.EQ.18) goto 170
7180 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
7183 IF(
n+np+1.GE.mstu(4)-mstu(32)-5)
THEN
7184 CALL
luerrm(11,
'(LUJMAS:) no more memory left in LUJETS')
7193 IF(mstu(42).EQ.0)
p(
n+np,5)=0.
7194 IF(mstu(42).EQ.1.AND.k(i,2).NE.22)
p(
n+np,5)=pmas(101,1)
7195 p(
n+np,4)=
sqrt(
p(
n+np,5)**2+
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
7200 sm(j1,j2)=sm(j1,j2)+
p(i,j1)*
p(i,j2)
7203 pss=pss+(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
7205 ps(3,j)=ps(3,j)+
p(
n+np,j)
7211 CALL
luerrm(8,
'(LUJMAS:) too few particles for analysis')
7216 paru(61)=
sqrt(
max(0.,ps(3,4)**2-ps(3,1)**2-ps(3,2)**2-ps(3,3)**2))
7221 sm(j1,j2)=sm(j1,j2)/pss
7224 sq=(sm(1,1)*sm(2,2)+sm(1,1)*sm(3,3)+sm(2,2)*sm(3,3)-sm(1,2)**2-
7225 &sm(1,3)**2-sm(2,3)**2)/3.-1./9.
7226 sr=-0.5*(sq+1./9.+sm(1,1)*sm(2,3)**2+sm(2,2)*sm(1,3)**2+sm(3,3)*
7227 &sm(1,2)**2-sm(1,1)*sm(2,2)*sm(3,3))+sm(1,2)*sm(1,3)*sm(2,3)+1./27.
7229 sma=1./3.+
sqrt(-sq)*
max(2.*sp,
sqrt(3.*(1.-sp**2))-sp)
7233 sm(j1,j1)=sm(j1,j1)-sma
7241 IF(abs(sm(j1,j2)).LE.
smax) goto 220
7250 rl=sm(j1,jb)/sm(ja,jb)
7252 sm(j1,j2)=sm(j1,j2)-rl*sm(ja,j2)
7253 IF(abs(sm(j1,j2)).LE.
smax) goto 240
7259 jb2=jb+2-3*((jb+1)/3)
7260 sax(jb1)=-sm(jc,jb2)
7262 sax(jb)=-(sm(ja,jb1)*sax(jb1)+sm(ja,jb2)*sax(jb2))/sm(ja,jb)
7266 psax=
p(i,1)*sax(1)+
p(i,2)*sax(2)+
p(i,3)*sax(3)
7271 ps(is,j)=ps(is,j)+
p(i,j)
7274 pms=
max(1
e-10,ps(1,4)**2-ps(1,1)**2-ps(1,2)**2-ps(1,3)**2)+
7275 &
max(1
e-10,ps(2,4)**2-ps(2,1)**2-ps(2,2)**2-ps(2,3)**2)
7281 ps(3,j)=ps(1,j)-ps(2,j)
7284 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)
7285 IF(k(i,3).EQ.1) pmdi=2.*(
p(i,5)**2-pps)
7286 IF(k(i,3).EQ.2) pmdi=2.*(
p(i,5)**2+pps)
7287 IF(pmdi.LT.pmd)
THEN
7294 IF(pmd.LT.-paru(48)*pms)
THEN
7298 ps(is,j)=ps(is,j)-
p(im,j)
7299 ps(3-is,j)=ps(3-is,j)+
p(im,j)
7308 ps(1,5)=
sqrt(
max(0.,ps(1,4)**2-ps(1,1)**2-ps(1,2)**2-ps(1,3)**2))
7309 ps(2,5)=
sqrt(
max(0.,ps(2,4)**2-ps(2,1)**2-ps(2,2)**2-ps(2,3)**2))
7310 pmh=
max(ps(1,5),ps(2,5))
7311 pml=
min(ps(1,5),ps(2,5))
7321 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
7322 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
7323 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
7324 SAVE /lujets/,/ludat1/,/ludat2/
7331 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 110
7332 IF(mstu(41).GE.2)
THEN
7334 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
7335 & kc.EQ.18) goto 110
7336 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
7339 IF(
n+np.GE.mstu(4)-mstu(32)-5)
THEN
7340 CALL
luerrm(11,
'(LUFOWO:) no more memory left in LUJETS')
7351 p(
n+np,4)=
sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
7359 CALL
luerrm(8,
'(LUFOWO:) too few particles for analysis')
7374 cthe=(
p(i1,1)*
p(i2,1)+
p(i1,2)*
p(i2,2)+
p(i1,3)*
p(i2,3))/
7377 h20=
h20+
p(i1,4)*
p(i2,4)*(1.5*cthe**2-0.5)
7378 h30=h30+
p(i1,4)*
p(i2,4)*(2.5*cthe**3-1.5*cthe)
7379 h40=h40+
p(i1,4)*
p(i2,4)*(4.375*cthe**4-3.75*cthe**2+0.375)
7401 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
7402 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
7403 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
7404 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
7405 SAVE /lujets/,/ludat1/,/ludat2/,/ludat3/
7406 dimension kfis(100,2),npis(100,0:10),kffs(400),npfs(400,4),
7407 &fevfm(10,4),fm1fm(3,10,4),fm2fm(3,10,4),fmoma(4),fmoms(4),
7408 &fevee(50),fe1ec(50),fe2ec(50),fe1ea(25),fe2ea(25),
7409 &kfdm(8),kfdc(200,0:8),npdc(200)
7410 SAVE nevis,nkfis,kfis,npis,nevfs,nprfs,nfifs,nchfs,nkffs,
7411 &kffs,npfs,nevfm,nmufm,fm1fm,fm2fm,nevee,fe1ec,fe2ec,fe1ea,
7412 &fe2ea,nevdc,nkfdc,nredc,kfdc,npdc
7413 CHARACTER chau*16,chis(2)*12,chdc(8)*12
7414 DATA nevis/0/,nkfis/0/,nevfs/0/,nprfs/0/,nfifs/0/,nchfs/0/,
7415 &nkffs/0/,nevfm/0/,nmufm/0/,fm1fm/120*0./,fm2fm/120*0./,
7416 &nevee/0/,fe1ec/50*0./,fe2ec/50*0./,fe1ea/25*0./,fe2ea/25*0./,
7417 &nevdc/0/,nkfdc/0/,nredc/0/
7420 IF(mtabu.EQ.10)
THEN
7425 ELSEIF(mtabu.EQ.11)
THEN
7427 kfm1=2*iabs(mstu(161))
7428 IF(mstu(161).GT.0) kfm1=kfm1-1
7429 kfm2=2*iabs(mstu(162))
7430 IF(mstu(162).GT.0) kfm2=kfm2-1
7434 IF(kfmn.EQ.kfis(i,1).AND.kfmx.EQ.kfis(i,2))
THEN
7437 ELSEIF(kfmn.LT.kfis(i,1).OR.(kfmn.EQ.kfis(i,1).AND.
7438 & kfmx.LT.kfis(i,2)))
THEN
7444 110
IF(ikfis.LT.0)
THEN
7447 IF(nkfis.GE.100)
RETURN
7448 DO 130 i=nkfis,ikfis,-1
7449 kfis(i+1,1)=kfis(i,1)
7450 kfis(i+1,2)=kfis(i,2)
7452 npis(i+1,j)=npis(i,j)
7462 npis(ikfis,0)=npis(ikfis,0)+1
7467 IF(k(i,1).LE.0.OR.k(i,1).GT.12)
THEN
7468 ELSEIF(iabs(k(i,2)).GT.80.AND.iabs(k(i,2)).LE.100)
THEN
7469 ELSEIF(iabs(k(i,2)).GT.100.AND.
mod(iabs(k(i,2))/10,10).NE.0)
7474 IF(im.LE.0.OR.im.GT.
n)
THEN
7476 ELSEIF(k(im,1).LE.0.OR.k(im,1).GT.20)
THEN
7478 ELSEIF(iabs(k(im,2)).GT.80.AND.iabs(k(im,2)).LE.100)
THEN
7479 ELSEIF(iabs(k(im,2)).GT.100.AND.
mod(iabs(k(im,2))/10,10).NE.0)
7491 IF(np.GE.26) npco=10
7492 npis(ikfis,npco)=npis(ikfis,npco)+1
7496 ELSEIF(mtabu.EQ.12)
THEN
7498 WRITE(mstu(11),5000) nevis
7501 IF(kfmn.EQ.0) kfmn=kfis(i,2)
7503 IF(2*kfm1.EQ.kfmn) kfm1=-kfm1
7506 IF(chau(13:13).NE.
' ') chis(1)(12:12)=
'?'
7508 IF(kfis(i,1).EQ.0) kfmx=0
7510 IF(2*kfm2.EQ.kfmx) kfm2=-kfm2
7513 IF(chau(13:13).NE.
' ') chis(2)(12:12)=
'?'
7514 WRITE(mstu(11),5100) chis(1),chis(2),fac*npis(i,0),
7515 & (npis(i,j)/float(npis(i,0)),j=1,10)
7519 ELSEIF(mtabu.EQ.13)
THEN
7523 IF(kfmn.EQ.0) kfmn=kfis(i,2)
7525 IF(2*kfm1.EQ.kfmn) kfm1=-kfm1
7527 IF(kfis(i,1).EQ.0) kfmx=0
7529 IF(2*kfm2.EQ.kfmx) kfm2=-kfm2
7536 p(i,j)=fac*npis(i,j)
7537 v(i,j)=fac*npis(i,j+5)
7552 ELSEIF(mtabu.EQ.20)
THEN
7560 ELSEIF(mtabu.EQ.21)
THEN
7564 IF(k(i,1).LE.0.OR.k(i,1).GT.20.OR.k(i,1).EQ.13) goto 260
7568 IF(k(i,3).LE.0.OR.k(i,3).GT.
n)
THEN
7570 ELSEIF(k(k(i,3),1).LE.0.OR.k(k(i,3),1).GT.20)
THEN
7572 ELSEIF(k(k(i,3),2).GE.91.AND.k(k(i,3),2).LE.93)
THEN
7574 ELSEIF(kc.EQ.0)
THEN
7575 ELSEIF(k(k(i,3),1).EQ.13)
THEN
7577 IF(im.LE.0.OR.im.GT.
n)
THEN
7579 ELSEIF(k(im,1).LE.0.OR.k(im,1).GT.20)
THEN
7582 ELSEIF(kchg(kc,2).EQ.0)
THEN
7585 IF(kchg(kcm,2).NE.0) mpri=1
7588 IF(kc.NE.0.AND.mpri.EQ.1)
THEN
7589 IF(kchg(kc,2).EQ.0) nprfs=nprfs+1
7591 IF(k(i,1).LE.10)
THEN
7593 IF(
luchge(k(i,2)).NE.0) nchfs=nchfs+1
7598 kfs=3-isign(1,k(i,2))-mpri
7600 IF(kfa.EQ.kffs(ip))
THEN
7603 ELSEIF(kfa.LT.kffs(ip))
THEN
7609 220
IF(ikffs.LT.0)
THEN
7612 IF(nkffs.GE.400)
RETURN
7613 DO 240 ip=nkffs,ikffs,-1
7616 npfs(ip+1,j)=npfs(ip,j)
7625 npfs(ikffs,kfs)=npfs(ikffs,kfs)+1
7629 ELSEIF(mtabu.EQ.22)
THEN
7631 WRITE(mstu(11),5200) nevfs,fac*nprfs,fac*nfifs,fac*nchfs
7633 CALL
luname(kffs(i),chau)
7636 IF(kc.NE.0) mdcyf=mdcy(kc,1)
7637 WRITE(mstu(11),5300) kffs(i),chau,mdcyf,(fac*npfs(i,j),j=1,4),
7638 & fac*(npfs(i,1)+npfs(i,2)+npfs(i,3)+npfs(i,4))
7642 ELSEIF(mtabu.EQ.23)
THEN
7649 k(i,5)=npfs(i,1)+npfs(i,2)+npfs(i,3)+npfs(i,4)
7651 p(i,j)=fac*npfs(i,j)
7672 ELSEIF(mtabu.EQ.30)
THEN
7685 ELSEIF(mtabu.EQ.31)
THEN
7690 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 410
7691 IF(mstu(41).GE.2)
THEN
7693 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
7694 & kc.EQ.18) goto 410
7695 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
7699 IF(mstu(42).EQ.1.AND.k(i,2).NE.22) pmr=
ulmass(211)
7700 IF(mstu(42).GE.2) pmr=
p(i,5)
7701 pr=
max(1
e-20,pmr**2+
p(i,1)**2+
p(i,2)**2)
7704 IF(abs(yeta).GT.paru(57)) goto 410
7706 iyeta=512.*(yeta+paru(57))/(2.*paru(57))
7707 iyeta=
max(0,
min(511,iyeta))
7708 iphi=512.*(
phi+paru(1))/paru(2)
7709 iphi=
max(0,
min(511,iphi))
7712 iyep=iyep+4**ib*(2*
mod(iyeta/2**ib,2)+
mod(iphi/2**ib,2))
7716 IF(nupp.GT.mstu(4)-5-mstu(32))
THEN
7717 CALL
luerrm(11,
'(LUTABU:) no more memory left in LUJETS')
7721 IF(nupp.EQ.nlow+1)
THEN
7726 DO 350 i1=nupp-1,nlow+1,-1
7727 IF(iyeta.GE.k(i1,1)) goto 360
7731 DO 370 i1=nupp-1,nlow+1,-1
7732 IF(iphi.GE.k(i1,2)) goto 380
7736 DO 390 i1=nupp-1,nlow+1,-1
7737 IF(iyep.GE.k(i1,3)) goto 400
7755 IF(im.LE.2) ibin=2**(10-ib)
7756 IF(im.EQ.3) ibin=4**(10-ib)
7757 iagr=k(nlow+1,im)/ibin
7759 DO 440 i=nlow+2,nupp+1
7761 IF(icut.EQ.iagr)
THEN
7765 ELSEIF(nagr.EQ.2)
THEN
7766 fevfm(ib,1)=fevfm(ib,1)+2.
7767 ELSEIF(nagr.EQ.3)
THEN
7768 fevfm(ib,1)=fevfm(ib,1)+6.
7769 fevfm(ib,2)=fevfm(ib,2)+6.
7770 ELSEIF(nagr.EQ.4)
THEN
7771 fevfm(ib,1)=fevfm(ib,1)+12.
7772 fevfm(ib,2)=fevfm(ib,2)+24.
7773 fevfm(ib,3)=fevfm(ib,3)+24.
7775 fevfm(ib,1)=fevfm(ib,1)+nagr*(nagr-1.)
7776 fevfm(ib,2)=fevfm(ib,2)+nagr*(nagr-1.)*(nagr-2.)
7777 fevfm(ib,3)=fevfm(ib,3)+nagr*(nagr-1.)*(nagr-2.)*(nagr-3.)
7778 fevfm(ib,4)=fevfm(ib,4)+nagr*(nagr-1.)*(nagr-2.)*(nagr-3.)*
7790 IF(fevfm(1,ip).LT.0.5)
THEN
7792 ELSEIF(im.LE.2)
THEN
7793 fevfm(ib,ip)=2.**((ib-1)*ip)*fevfm(ib,ip)/fevfm(1,ip)
7795 fevfm(ib,ip)=4.**((ib-1)*ip)*fevfm(ib,ip)/fevfm(1,ip)
7797 fm1fm(im,ib,ip)=fm1fm(im,ib,ip)+fevfm(ib,ip)
7798 fm2fm(im,ib,ip)=fm2fm(im,ib,ip)+fevfm(ib,ip)**2
7802 nmufm=nmufm+(nupp-nlow)
7806 ELSEIF(mtabu.EQ.32)
THEN
7808 IF(mstu(42).LE.0)
WRITE(mstu(11),5400) nevfm,
'eta'
7809 IF(mstu(42).EQ.1)
WRITE(mstu(11),5400) nevfm,
'ypi'
7810 IF(mstu(42).GE.2)
WRITE(mstu(11),5400) nevfm,
'y '
7812 WRITE(mstu(11),5500)
7815 IF(im.NE.2) byeta=byeta/2**(ib-1)
7817 IF(im.NE.1) bphi=bphi/2**(ib-1)
7818 IF(im.LE.2) bnave=fac*nmufm/float(2**(ib-1))
7819 IF(im.EQ.3) bnave=fac*nmufm/float(4**(ib-1))
7821 fmoma(ip)=fac*fm1fm(im,ib,ip)
7822 fmoms(ip)=
sqrt(
max(0.,fac*(fac*fm2fm(im,ib,ip)-fmoma(ip)**2)))
7824 WRITE(mstu(11),5600) byeta,bphi,bnave,(fmoma(ip),fmoms(ip),
7830 ELSEIF(mtabu.EQ.33)
THEN
7838 IF(im.NE.2) k(i,3)=2**(ib-1)
7840 IF(im.NE.1) k(i,4)=2**(ib-1)
7842 p(i,1)=2.*paru(57)/k(i,3)
7843 v(i,1)=paru(2)/k(i,4)
7845 p(i,ip+1)=fac*fm1fm(im,ib,ip)
7846 v(i,ip+1)=
sqrt(
max(0.,fac*(fac*fm2fm(im,ib,ip)-
p(i,ip+1)**2)))
7862 ELSEIF(mtabu.EQ.40)
THEN
7874 ELSEIF(mtabu.EQ.41)
THEN
7880 IF(k(i,1).LE.0.OR.k(i,1).GT.10) goto 570
7881 IF(mstu(41).GE.2)
THEN
7883 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
7884 & kc.EQ.18) goto 570
7885 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
luchge(k(i,2)).EQ.0)
7889 IF(mstu(42).EQ.1.AND.k(i,2).NE.22) pmr=
ulmass(211)
7890 IF(mstu(42).GE.2) pmr=
p(i,5)
7891 IF(nupp.GT.mstu(4)-5-mstu(32))
THEN
7892 CALL
luerrm(11,
'(LUTABU:) no more memory left in LUJETS')
7899 p(nupp,4)=
sqrt(pmr**2+
p(i,1)**2+
p(i,2)**2+
p(i,3)**2)
7900 p(nupp,5)=
max(1
e-10,
sqrt(
p(i,1)**2+
p(i,2)**2+
p(i,3)**2))
7903 IF(nupp.EQ.nlow)
RETURN
7906 fac=(2./ecm**2)*50./paru(1)
7910 DO 600 i1=nlow+2,nupp
7911 DO 590 i2=nlow+1,i1-1
7912 cthe=(
p(i1,1)*
p(i2,1)+
p(i1,2)*
p(i2,2)+
p(i1,3)*
p(i2,3))/
7914 the=acos(
max(-1.,
min(1.,cthe)))
7915 ithe=
max(1,
min(50,1+
int(50.*the/paru(1))))
7916 fevee(ithe)=fevee(ithe)+fac*
p(i1,4)*
p(i2,4)
7920 fe1ec(j)=fe1ec(j)+fevee(j)
7921 fe2ec(j)=fe2ec(j)+fevee(j)**2
7922 fe1ec(51-j)=fe1ec(51-j)+fevee(51-j)
7923 fe2ec(51-j)=fe2ec(51-j)+fevee(51-j)**2
7924 fe1ea(j)=fe1ea(j)+(fevee(51-j)-fevee(j))
7925 fe2ea(j)=fe2ea(j)+(fevee(51-j)-fevee(j))**2
7930 ELSEIF(mtabu.EQ.42)
THEN
7932 WRITE(mstu(11),5700) nevee
7935 fees1=
sqrt(
max(0.,fac*(fac*fe2ec(j)-feec1**2)))
7936 feec2=fac*fe1ec(51-j)
7937 fees2=
sqrt(
max(0.,fac*(fac*fe2ec(51-j)-feec2**2)))
7939 feesa=
sqrt(
max(0.,fac*(fac*fe2ea(j)-feeca**2)))
7940 WRITE(mstu(11),5800) 3.6*(j-1),3.6*j,feec1,fees1,feec2,fees2,
7945 ELSEIF(mtabu.EQ.43)
THEN
7954 v(i,1)=
sqrt(
max(0.,fac*(fac*fe2ec(i)-
p(i,1)**2)))
7955 p(i,2)=fac*fe1ec(51-i)
7956 v(i,2)=
sqrt(
max(0.,fac*(fac*fe2ec(51-i)-
p(i,2)**2)))
7958 v(i,3)=
sqrt(
max(0.,fac*(fac*fe2ea(i)-
p(i,3)**2)))
7959 p(i,4)=paru(1)*(i-1)/50.
7960 p(i,5)=paru(1)*i/50.
7976 ELSEIF(mtabu.EQ.50)
THEN
7982 ELSEIF(mtabu.EQ.51)
THEN
7986 IF(k(i,1).LE.0.OR.k(i,1).GE.6) goto 670
7993 IF(k(i,2).LT.0) kfm=kfm-1
7994 DO 650 ids=nds-1,1,-1
7996 IF(kfm.LT.kfdm(ids)) goto 660
7997 kfdm(ids+1)=kfdm(ids)
8005 IF(nds.LT.kfdc(idc,0))
THEN
8008 ELSEIF(nds.EQ.kfdc(idc,0))
THEN
8010 IF(kfdm(i).LT.kfdc(idc,i))
THEN
8013 ELSEIF(kfdm(i).GT.kfdc(idc,i))
THEN
8022 700
IF(ikfdc.LT.0)
THEN
8024 ELSEIF(nkfdc.GE.200)
THEN
8028 DO 720 idc=nkfdc,ikfdc,-1
8029 npdc(idc+1)=npdc(idc)
8031 kfdc(idc+1,i)=kfdc(idc,i)
8037 kfdc(ikfdc,i)=kfdm(i)
8041 npdc(ikfdc)=npdc(ikfdc)+1
8044 ELSEIF(mtabu.EQ.52)
THEN
8046 WRITE(mstu(11),5900) nevdc
8048 DO 740 i=1,kfdc(idc,0)
8051 IF(2*kf.NE.kfm) kf=-kf
8054 IF(chau(13:13).NE.
' ') chdc(i)(12:12)=
'?'
8056 WRITE(mstu(11),6000) fac*npdc(idc),(chdc(i),i=1,kfdc(idc,0))
8058 IF(nredc.NE.0)
WRITE(mstu(11),6100) fac*nredc
8061 ELSEIF(mtabu.EQ.53)
THEN
8068 k(idc,5)=kfdc(idc,0)
8073 DO 770 i=1,kfdc(idc,0)
8076 IF(2*kf.NE.kfm) kf=-kf
8077 IF(i.LE.5)
p(idc,i)=kf
8078 IF(i.GE.6) v(idc,i-5)=kf
8080 v(idc,5)=fac*npdc(idc)
8096 5000
FORMAT(///20
x,
'Event statistics - initial state'/
8097 &20
x,
'based on an analysis of ',i6,
' events'//
8098 &3
x,
'Main flavours after',8
x,
'Fraction',4
x,
'Subfractions ',
8099 &
'according to fragmenting system multiplicity'/
8100 &4
x,
'hard interaction',24
x,
'1',7
x,
'2',7
x,
'3',7
x,
'4',7
x,
'5',
8101 &6
x,
'6-7',5
x,
'8-10',3
x,
'11-15',3
x,
'16-25',4
x,
'>25'/)
8102 5100
FORMAT(3
x,a12,1
x,a12,f10.5,1
x,10f8.4)
8103 5200
FORMAT(///20
x,
'Event statistics - final state'/
8104 &20
x,
'based on an analysis of ',i7,
' events'//
8105 &5
x,
'Mean primary multiplicity =',f10.4/
8106 &5
x,
'Mean final multiplicity =',f10.4/
8107 &5
x,
'Mean charged multiplicity =',f10.4//
8108 &5
x,
'Number of particles produced per event (directly and via ',
8109 &
'decays/branchings)'/
8110 &5
x,
'KF Particle/jet MDCY',10
x,
'Particles',13
x,
'Antiparticles',
8111 &8
x,
'Total'/35
x,
'prim seco prim seco'/)
8112 5300
FORMAT(1
x,i6,4
x,a16,i2,5(1
x,f11.6))
8113 5400
FORMAT(///20
x,
'Factorial moments analysis of multiplicity'/
8114 &20
x,
'based on an analysis of ',i6,
' events'//
8115 &3
x,
'delta-',a3,
' delta-phi <n>/bin',10
x,
'<F2>',18
x,
'<F3>',
8116 &18
x,
'<F4>',18
x,
'<F5>'/35
x,4(
' value error '))
8118 5600
FORMAT(2
x,2f10.4,f12.4,4(f12.4,f10.4))
8119 5700
FORMAT(///20
x,
'Energy-Energy Correlation and Asymmetry'/
8120 &20
x,
'based on an analysis of ',i6,
' events'//
8121 &2
x,
'theta range',8
x,
'EEC(theta)',8
x,
'EEC(180-theta)',7
x,
8122 &
'EECA(theta)'/2
x,
'in degrees ',3(
' value error')/)
8123 5800
FORMAT(2
x,
f4.1,
' - ',
f4.1,3(f11.4,f9.4))
8124 5900
FORMAT(///20
x,
'Decay channel analysis - final state'/
8125 &20
x,
'based on an analysis of ',i6,
' events'//
8126 &2
x,
'Probability',10
x,
'Complete final state'/)
8127 6000
FORMAT(2
x,f9.5,5
x,8(a12,1
x))
8128 6100
FORMAT(2
x,f9.5,5
x,
'into other channels (more than 8 particles ',
8129 &
'or table overflow)')
8139 IMPLICIT DOUBLE PRECISION(
d)
8140 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
8141 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8142 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
8143 SAVE /lujets/,/ludat1/,/ludat2/
8146 IF(mstu(12).GE.1) CALL
lulist(0)
8147 IF(kfl.LT.0.OR.kfl.GT.8)
THEN
8148 CALL
luerrm(16,
'(LUEEVT:) called with unknown flavour code')
8149 IF(mstu(21).GE.1)
RETURN
8151 IF(kfl.LE.5) ecmmin=parj(127)+2.02*parf(100+
max(1,kfl))
8152 IF(kfl.GE.6) ecmmin=parj(127)+2.02*pmas(kfl,1)
8153 IF(ecm.LT.ecmmin)
THEN
8154 CALL
luerrm(16,
'(LUEEVT:) called with too small CM energy')
8155 IF(mstu(21).GE.1)
RETURN
8159 IF(mstj(109).EQ.2.AND.mstj(110).NE.1)
THEN
8161 &
'(LUEEVT:) MSTJ(109) value requires MSTJ(110) = 1')
8164 IF(mstj(109).EQ.2.AND.mstj(111).NE.0)
THEN
8166 &
'(LUEEVT:) MSTJ(109) value requires MSTJ(111) = 0')
8172 IF(mstj(108).EQ.2.AND.(mstj(101).EQ.0.OR.mstj(101).EQ.1))
8175 IF(mstu(111).EQ.2) paru(112)=parj(122)
8176 IF(mstj(116).GT.0.AND.(mstj(116).GE.2.OR.abs(ecm-parj(151)).GE.
8177 &parj(139).OR.10*mstj(102)+kfl.NE.mstj(119))) CALL
luxtot(kfl,ecm,
8179 IF(mstj(116).GE.3) mstj(116)=1
8185 IF(ntry.GT.100)
THEN
8186 CALL
luerrm(14,
'(LUEEVT:) caught in an infinite loop')
8191 IF(mstj(115).GE.2)
THEN
8193 CALL
lu1ent(nc-1,11,0.5*ecm,0.,0.)
8195 CALL
lu1ent(nc,-11,0.5*ecm,paru(1),0.)
8202 IF(mstj(107).GE.1.AND.mstj(116).GE.1) CALL
luradk(ecm,mk,pak,
8204 IF(mk.EQ.1) ecmc=
sqrt(ecm*(ecm-2.*pak))
8205 IF(mstj(115).GE.1.AND.mk.EQ.1)
THEN
8207 CALL
lu1ent(nc,22,pak,thek,phik)
8208 k(nc,3)=
min(mstj(115)/2,1)
8212 IF(mstj(115).GE.3)
THEN
8215 IF(mstj(102).EQ.2) kf=23
8219 CALL
lu1ent(nc,kf,ecmc,0.,0.)
8226 CALL
luxkfl(kfl,ecm,ecmc,kflc)
8227 IF(kflc.EQ.0) goto 100
8228 CALL
luxjet(ecmc,njet,cut)
8230 IF(njet.EQ.4) CALL
lux4jt(njet,cut,kflc,ecmc,kfln,
x1,
x2,x4,
8232 IF(njet.EQ.3) CALL
lux3jt(njet,cut,kflc,ecmc,
x1,x3)
8233 IF(njet.EQ.2) mstj(120)=1
8236 IF(njet.EQ.2.AND.mstj(101).NE.5) CALL
lu2ent(nc+1,kflc,-kflc,ecmc)
8237 IF(njet.EQ.2.AND.mstj(101).EQ.5) CALL
lu2ent(-(nc+1),kflc,-kflc,
8239 IF(njet.EQ.3) CALL
lu3ent(nc+1,kflc,21,-kflc,ecmc,
x1,x3)
8240 IF(njet.EQ.4.AND.kfln.EQ.21) CALL
lu4ent(nc+1,kflc,kfln,kfln,
8241 &-kflc,ecmc,
x1,
x2,x4,x12,x14)
8242 IF(njet.EQ.4.AND.kfln.NE.21) CALL
lu4ent(nc+1,kflc,-kfln,kfln,
8243 &-kflc,ecmc,
x1,
x2,x4,x12,x14)
8244 IF(mstu(24).NE.0) goto 100
8246 k(ip,3)=k(ip,3)+
min(mstj(115)/2,1)+(mstj(115)/3)*(nc-1)
8250 IF(mstj(106).EQ.1)
THEN
8251 CALL
luxdif(nc,njet,kflc,ecmc,chi,the,
phi)
8252 CALL ludbrb(nc+1,
n,0.,chi,0d0,0d0,0d0)
8253 CALL ludbrb(nc+1,
n,the,
phi,0d0,0d0,0d0)
8259 nmin=nc+1-mstj(115)/3
8260 CALL ludbrb(nmin,
n,0.,-phik,0d0,0d0,0d0)
8261 CALL ludbrb(nmin,
n,alpk,0.,dbek*
sin(thek),0d0,dbek*
cos(thek))
8262 CALL ludbrb(nmin,
n,0.,phik,0d0,0d0,0d0)
8266 IF(mstj(101).EQ.5)
THEN
8269 IF(mstj(105).EQ.-1) mstj(14)=-1
8270 IF(mstj(105).GE.0) mstu(28)=0
8273 IF(mstj(105).GE.0.AND.mstu(28).NE.0) goto 100
8277 IF(mstj(105).EQ.1) CALL
luexec
8290 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8291 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
8292 SAVE /ludat1/,/ludat2/
8296 mstj(119)=10*mstj(102)+kfl
8297 IF(mstj(111).EQ.0)
THEN
8299 ELSEIF(mstu(111).EQ.0)
THEN
8300 parj(168)=
min(1.,
max(parj(128),
exp(-12.*paru(1)/
8301 & ((33.-2.*mstu(112))*paru(111)))))
8302 q2r=parj(168)*ecm**2
8304 parj(168)=
min(1.,
max(parj(128),paru(112)/ecm,
8305 & (2.*paru(112)/ecm)**2))
8306 q2r=parj(168)*ecm**2
8308 alspi=
ulalps(q2r)/paru(1)
8311 IF(mstj(101).EQ.0.OR.mstj(109).EQ.1)
THEN
8313 ELSEIF(iabs(mstj(101)).EQ.1.AND.mstj(109).EQ.0)
THEN
8315 ELSEIF(mstj(109).EQ.0)
THEN
8316 rqcd=1.+alspi+(1.986-0.115*mstu(118))*alspi**2
8317 IF(mstj(111).EQ.1) rqcd=
max(1.,rqcd+(33.-2.*mstu(112))/12.*
8318 &
log(parj(168))*alspi**2)
8319 ELSEIF(iabs(mstj(101)).EQ.1)
THEN
8320 rqcd=1.+(3./4.)*alspi
8322 rqcd=1.+(3./4.)*alspi-(3./32.+0.519*mstu(118))*alspi**2
8326 IF(mstj(102).GE.3)
THEN
8327 rva=3.*(3.+(4.*paru(102)-1.)**2)+6.*rqcd*(2.+(1.-8.*paru(102)/
8328 & 3.)**2+(4.*paru(102)/3.-1.)**2)
8333 IF(kflc.EQ.5) vf=4.*paru(102)/3.-1.
8334 IF(kflc.EQ.6) vf=1.-8.*paru(102)/3.
8335 rva=rva+3.*rqcd*(0.5*vq*(3.-vq**2)*vf**2+vq**3)
8337 parj(124)=paru(101)*parj(123)*rva/(48.*paru(102)*(1.-paru(102)))
8341 poll=1.-parj(131)*parj(132)
8342 IF(mstj(102).GE.2)
THEN
8343 sff=1./(16.*paru(102)*(1.-paru(102)))
8344 sfw=ecm**4/((ecm**2-parj(123)**2)**2+(parj(123)*parj(124))**2)
8345 sfi=sfw*(1.-(parj(123)/ecm)**2)
8347 sf1i=sff*(ve*poll+parj(132)-parj(131))
8348 sf1w=sff**2*((ve**2+1.)*poll+2.*ve*(parj(132)-parj(131)))
8358 DO 110 kflc=1,
max(mstj(104),kfl)
8359 IF(kfl.GT.0.AND.kflc.NE.kfl) goto 110
8362 IF(ecm.LT.2.*pmq+parj(127)) goto 110
8365 IF(
mod(mstj(103),2).EQ.1) vq=
sqrt(1.-(2.*pmq/ecm)**2)
8368 rqq=rqq+3.*qf**2*poll
8369 IF(mstj(102).LE.1)
THEN
8370 rtot=rtot+3.*0.5*vq*(3.-vq**2)*qf**2*poll
8372 vf=sign(1.,qf)-4.*qf*paru(102)
8373 rqv=rqv-6.*qf*vf*sf1i
8374 rva=rva+3.*(vf**2+1.)*sf1w
8375 rtot=rtot+3.*(0.5*vq*(3.-vq**2)*(qf**2*poll-2.*qf*vf*hf1i+
8376 & vf**2*hf1w)+vq**3*hf1w)
8380 IF(mstj(102).GE.2) rsum=rqq+sfi*rqv+sfw*rva
8387 parj(145)=parj(141)*86.8/ecm**2
8388 parj(146)=parj(142)*86.8/ecm**2
8389 parj(147)=parj(143)*86.8/ecm**2
8395 IF(mstj(107).LE.0)
RETURN
8399 xku=
min(parj(136),1.-(2.*parj(127)/ecm)**2)
8402 &1.526*
log(ecm**2/0.932)
8405 IF(mstj(102).LE.1)
THEN
8406 sigv=1.5*ale-0.5+paru(1)**2/3.+2.*sigv
8407 sigs=ale*(2.*
log(xkl)-
log(1.-xkl)-xkl)
8408 sigh=ale*(2.*
log(xku/xkl)-
log((1.-xku)/(1.-xkl))-(xku-xkl))
8412 szm=1.-(parj(123)/ecm)**2
8413 szw=parj(123)*parj(124)/ecm**2
8415 parj(162)=-(rqq+rqv+rva)/rsum
8416 parj(163)=(rqv*(1.-0.5*szm-sfi)+rva*(1.5-szm-sfw))/rsum
8417 parj(164)=(rqv*szw**2*(1.-2.*sfw)+rva*(2.*sfi+szw**2-4.+3.*szm-
8418 & szm**2))/(szw*rsum)
8419 sigv=1.5*ale-0.5+paru(1)**2/3.+((2.*rqq+sfi*rqv)/rsum)*sigv+
8420 & (szw*sfw*rqv/rsum)*paru(1)*20./9.
8421 sigs=ale*(2.*
log(xkl)+parj(161)*
log(1.-xkl)+parj(162)*xkl+
8422 & parj(163)*
log(((xkl-szm)**2+szw**2)/(szm**2+szw**2))+
8423 & parj(164)*(atan((xkl-szm)/szw)-atan(-szm/szw)))
8424 sigh=ale*(2.*
log(xku/xkl)+parj(161)*
log((1.-xku)/(1.-xkl))+
8425 & parj(162)*(xku-xkl)+parj(163)*
log(((xku-szm)**2+szw**2)/
8426 & ((xkl-szm)**2+szw**2))+parj(164)*(atan((xku-szm)/szw)-
8427 & atan((xkl-szm)/szw)))
8431 parj(160)=sigh/(paru(1)/paru(101)+sigv+sigs+sigh)
8432 parj(157)=rsum*(1.+(paru(101)/paru(1))*(sigv+sigs+sigh))*rqcd
8434 parj(148)=parj(144)*86.8/ecm**2
8445 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8450 &parj(163)*
log((
xx-szm)**2+szw**2)+parj(164)*atan((
xx-szm)/szw)
8455 IF(parj(160).LT.
rlu(0))
RETURN
8460 xku=
min(parj(136),1.-(2.*parj(127)/ecm)**2)
8461 IF(mstj(102).LE.1)
THEN
8462 100 xk=1./(1.+(1./xkl-1.)*((1./xku-1.)/(1./xkl-1.))**
rlu(0))
8463 IF(1.+(1.-xk)**2.LT.2.*
rlu(0)) goto 100
8467 szm=1.-(parj(123)/ecm)**2
8468 szw=parj(123)*parj(124)/ecm**2
8471 fxkd=1
e-4*(fxku-fxkl)
8472 fxkr=fxkl+
rlu(0)*(fxku-fxkl)
8477 IF(fxkv.GT.fxkr)
THEN
8484 IF(nxk.LT.15.AND.fxku-fxkl.GT.fxkd) goto 110
8485 xk=xkl+(xku-xkl)*(fxkr-fxkl)/(fxku-fxkl)
8490 pme=2.*(
ulmass(11)/ecm)**2
8491 120 cthm=pme*(2./pme)**
rlu(0)
8492 IF(1.-(xk**2*cthm*(1.-0.5*cthm)+2.*(1.-xk)*pme/
max(pme,
8493 &cthm*(1.-0.5*cthm)))/(1.+(1.-xk)**2).LT.
rlu(0)) goto 120
8495 IF(
rlu(0).GT.0.5) cthe=-cthe
8496 sthe=
sqrt(
max(0.,(cthm-pme)*(2.-cthm)))
8502 IF(0.5*(2.-xk*(1.-cthe))**2/((2.-xk)**2+(xk*cthe)**2).GT.
8504 alpk=asin(sgn*sthe*(xk-sgn*(2.*
sqrt(1.-xk)-2.+xk)*cthe)/
8505 &(2.-xk*(1.-sgn*cthe)))
8515 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8516 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
8517 SAVE /ludat1/,/ludat2/
8520 IF(mstj(102).LE.1)
THEN
8523 poll=1.-parj(131)*parj(132)
8524 sff=1./(16.*paru(102)*(1.-paru(102)))
8525 sfw=ecmc**4/((ecmc**2-parj(123)**2)**2+(parj(123)*parj(124))**2)
8526 sfi=sfw*(1.-(parj(123)/ecmc)**2)
8528 hf1i=sfi*sff*(ve*poll+parj(132)-parj(131))
8529 hf1w=sfw*sff**2*((ve**2+1.)*poll+2.*ve*(parj(132)-parj(131)))
8530 rfmax=
max(4./9.*poll-4./3.*(1.-8.*paru(102)/3.)*hf1i+
8531 & ((1.-8.*paru(102)/3.)**2+1.)*hf1w,1./9.*poll+2./3.*
8532 & (-1.+4.*paru(102)/3.)*hf1i+((-1.+4.*paru(102)/3.)**2+1.)*hf1w)
8538 IF(ntry.GT.100)
THEN
8539 CALL
luerrm(14,
'(LUXKFL:) caught in an infinite loop')
8544 IF(kfl.LE.0) kflc=1+
int(mstj(104)*
rlu(0))
8547 IF(ecm.LT.2.*pmq+parj(127)) goto 100
8550 IF(
mod(mstj(103),2).EQ.1) vq=
sqrt(
max(0.,1.-(2.*pmq/ecmc)**2))
8553 IF(mstj(102).LE.1)
THEN
8555 rfv=0.5*vq*(3.-vq**2)*qf**2
8557 vf=sign(1.,qf)-4.*qf*paru(102)
8558 rf=qf**2*poll-2.*qf*vf*hf1i+(vf**2+1.)*hf1w
8559 rfv=0.5*vq*(3.-vq**2)*(qf**2*poll-2.*qf*vf*hf1i+vf**2*hf1w)+
8561 IF(rfv.GT.0.) parj(171)=
min(1.,vq**3*hf1w/rfv)
8565 IF(kfl.LE.0.AND.rf.LT.
rlu(0)*rfmax) goto 100
8566 parj(158)=parj(158)+1.
8567 IF(ecmc.LT.2.*pmq+parj(127).OR.rfv.LT.
rlu(0)*rf) kflc=0
8568 IF(mstj(107).LE.0.AND.kflc.EQ.0) goto 100
8569 IF(kflc.NE.0) parj(159)=parj(159)+1.
8570 parj(144)=parj(157)*parj(159)/parj(158)
8571 parj(148)=parj(144)*86.8/ecm**2
8581 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8586 DATA zhut/3.0922, 6.2291, 7.4782, 7.8440, 8.2560/
8589 IF(mstj(101).EQ.0.OR.mstj(101).EQ.5)
THEN
8593 ELSEIF(mstj(109).EQ.0.OR.mstj(109).EQ.2)
THEN
8595 IF(mstj(109).EQ.2) cf=1.
8596 IF(mstj(111).EQ.0)
THEN
8599 ELSEIF(mstu(111).EQ.0)
THEN
8600 parj(169)=
min(1.,parj(129))
8602 parj(168)=
min(1.,
max(parj(128),
exp(-12.*paru(1)/
8603 & ((33.-2.*mstu(112))*paru(111)))))
8604 q2r=parj(168)*ecm**2
8606 parj(169)=
min(1.,
max(parj(129),(2.*paru(112)/ecm)**2))
8608 parj(168)=
min(1.,
max(parj(128),paru(112)/ecm,
8609 & (2.*paru(112)/ecm)**2))
8610 q2r=parj(168)*ecm**2
8614 alspi=(3./4.)*cf*
ulalps(q2r)/paru(1)
8615 IF(iabs(mstj(101)).EQ.1)
THEN
8617 ELSEIF(mstj(109).EQ.0)
THEN
8618 rqcd=1.+alspi+(1.986-0.115*mstu(118))*alspi**2
8619 IF(mstj(111).EQ.1) rqcd=
max(1.,rqcd+(33.-2.*mstu(112))/12.*
8620 &
log(parj(168))*alspi**2)
8622 rqcd=1.+alspi-(3./32.+0.519*mstu(118))*(4.*alspi/3.)**2
8626 alspi=(3./4.)*cf*
ulalps(q2)/paru(1)
8627 cut=
max(0.001,parj(125),(parj(126)/ecm)**2)
8628 IF(iabs(mstj(101)).LE.1.OR.(mstj(109).EQ.0.AND.mstj(111).EQ.0))
8630 IF(mstj(110).EQ.2) cut=
max(0.01,
min(0.05,cut))
8633 100
IF(mstj(101).EQ.0.OR.cut.GE.0.25)
THEN
8636 parj(152)=(2.*alspi/3.)*((3.-6.*cut+2.*
log(cut))*
8637 &
log(cut/(1.-2.*cut))+(2.5+1.5*cut-6.571)*(1.-3.*cut)+
8638 & 5.833*(1.-3.*cut)**2-3.894*(1.-3.*cut)**3+
8639 & 1.342*(1.-3.*cut)**4)/rqcd
8640 IF(mstj(109).EQ.2.AND.(mstj(101).EQ.2.OR.mstj(101).LE.-2))
8645 IF(iabs(mstj(101)).LE.1.OR.mstj(101).EQ.3.OR.mstj(109).EQ.2.OR.
8648 ELSEIF(mstj(110).LE.1)
THEN
8650 parj(153)=alspi**2*ct**2*(2.419+0.5989*ct+0.6782*ct**2-
8651 & 0.2661*ct**3+0.01159*ct**4)/rqcd
8654 ELSEIF(mstj(110).EQ.2)
THEN
8657 IF(abs(cut-0.01*iy).LT.0.0001) iza=iy
8663 zhurat=zhut(
iz)+(100.*cut-
iz)*(zhut(
iz+1)-zhut(
iz))
8665 parj(153)=alspi*parj(152)*zhurat
8669 IF(mstj(111).EQ.1.AND.iabs(mstj(101)).GE.2.AND.mstj(101).NE.3.
8670 & and.cut.LT.0.25) parj(153)=parj(153)+(33.-2.*mstu(112))/12.*
8671 &
log(parj(169))*alspi*parj(152)
8674 IF(iabs(mstj(101)).LE.1.OR.cut.GE.0.125)
THEN
8678 IF(cut.LE.0.018)
THEN
8679 xqqgg=6.349-4.330*ct+0.8304*ct**2
8680 IF(mstj(109).EQ.2) xqqgg=(4./3.)**2*(3.035-2.091*ct+
8682 xqqqq=1.25*(-0.1080+0.01486*ct+0.009364*ct**2)
8683 IF(mstj(109).EQ.2) xqqqq=8.*xqqqq
8685 xqqgg=-0.09773+0.2959*ct-0.2764*ct**2+0.08832*ct**3
8686 IF(mstj(109).EQ.2) xqqgg=(4./3.)**2*(-0.04079+0.1340*ct-
8687 & 0.1326*ct**2+0.04365*ct**3)
8688 xqqqq=1.25*(0.003661-0.004888*ct-0.001081*ct**2+0.002093*
8690 IF(mstj(109).EQ.2) xqqqq=8.*xqqqq
8692 parj(154)=alspi**2*ct**2*(xqqgg+xqqqq)/rqcd
8693 parj(155)=xqqqq/(xqqgg+xqqqq)
8697 IF(mstj(111).EQ.1.AND.parj(152)+parj(153).LT.0..AND.
8698 & parj(169).LT.0.99)
THEN
8699 parj(169)=
min(1.,1.2*parj(169))
8701 alspi=(3./4.)*cf*
ulalps(q2)/paru(1)
8706 IF(parj(152)+parj(153)+parj(154).GE.1)
THEN
8707 IF(mstj(110).EQ.2.AND.cut.GT.0.0499.AND.mstj(111).EQ.1.AND.
8708 & parj(169).LT.0.99)
THEN
8709 parj(169)=
min(1.,1.2*parj(169))
8711 alspi=(3./4.)*cf*
ulalps(q2)/paru(1)
8713 ELSEIF(mstj(110).EQ.2.AND.cut.GT.0.0499)
THEN
8715 &
'(LUXJET:) no allowed y cut value for Zhu parametrization')
8717 cut=0.26*(4.*cut)**(parj(152)+parj(153)+parj(154))**(-1./3.)
8718 IF(mstj(110).EQ.2) cut=
max(0.01,
min(0.05,cut))
8724 alspi=
ulalps(ecm**2)/paru(1)
8725 cut=
max(0.001,parj(125),(parj(126)/ecm)**2,
exp(-3./alspi))
8727 IF(cut.LT.0.25) parj(152)=(alspi/3.)*((1.-2.*cut)*
8728 &
log((1.-2.*cut)/cut)+0.5*(9.*cut**2-1.))
8735 IF(mstj(101).EQ.0.OR.mstj(101).EQ.5)
THEN
8737 ELSEIF(mstj(101).LE.0)
THEN
8738 njet=
min(4,2-mstj(101))
8742 IF(parj(152)+parj(153)+parj(154).GT.rnj) njet=3
8743 IF(parj(154).GT.rnj) njet=4
8754 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8756 dimension zhup(5,12)
8759 DATA ((zhup(ic1,ic2),ic2=1,12),ic1=1,5)/
8760 & 18.29, 89.56, 4.541, -52.09, -109.8, 24.90,
8761 & 11.63, 3.683, 17.50, 0.002440, -1.362, -0.3537,
8762 & 11.42, 6.299, -22.55, -8.915, 59.25, -5.855,
8763 & -32.85, -1.054, -16.90, 0.006489, -0.8156, 0.01095,
8764 & 7.847, -3.964, -35.83, 1.178, 29.39, 0.2806,
8765 & 47.82, -12.36, -56.72, 0.04054, -0.4365, 0.6062,
8766 & 5.441, -56.89, -50.27, 15.13, 114.3, -18.19,
8767 & 97.05, -1.890, -139.9, 0.08153, -0.4984, 0.9439,
8768 & -17.65, 51.44, -58.32, 70.95, -255.7, -78.99,
8769 & 476.9, 29.65, -239.3, 0.4745, -1.174, 6.081/
8772 dilog(
x)=
x+
x**2/4.+
x**3/9.+
x**4/16.+
x**5/25.+
x**6/36.+
x**7/49.
8779 IF(mstj(109).NE.1)
THEN
8782 IF(mstj(109).EQ.0)
THEN
8786 wtmx=
min(20.,37.-6.*cutd)
8787 IF(mstj(110).EQ.2) wtmx=2.*(7.5+80.*cut)
8796 als2pi=paru(118)/paru(2)
8798 IF(mstj(111).EQ.1) wtopt=(33.-2.*mstu(112))/6.*
log(parj(169))*
8800 wtmax=
max(0.,1.+wtopt+als2pi*wtmx)
8804 110 y13l=cutl+cutd*
rlu(0)
8805 y23l=cutl+cutd*
rlu(0)
8809 IF(y12.LE.cut) goto 110
8810 IF(y13**2+y23**2+2.*y12.LE.2.*
rlu(0)) goto 110
8813 IF(mstj(101).EQ.2.AND.mstj(110).LE.1)
THEN
8818 IF(y13.LE.0.5) y13i=
dilog(y13)
8819 IF(y13.GE.0.5) y13i=1.644934-y13l*y13m-
dilog(1.-y13)
8820 IF(y23.LE.0.5) y23i=
dilog(y23)
8821 IF(y23.GE.0.5) y23i=1.644934-y23l*y23m-
dilog(1.-y23)
8822 IF(y12.LE.0.5) y12i=
dilog(y12)
8823 IF(y12.GE.0.5) y12i=1.644934-y12l*y12m-
dilog(1.-y12)
8824 wt1=(y13**2+y23**2+2.*y12)/(y13*y23)
8825 wt2=cf*(-2.*(cutl-y12l)**2-3.*cutl-1.+3.289868+
8826 & 2.*(2.*cutl-y12l)*cut/y12)+
8827 & cn*((cutl-y12l)**2-(cutl-y13l)**2-(cutl-y23l)**2-11.*cutl/6.+
8828 & 67./18.+1.644934-(2.*cutl-y12l)*cut/y12+(2.*cutl-y13l)*
8829 & cut/y13+(2.*cutl-y23l)*cut/y23)+
8830 & tr*(2.*cutl/3.-10./9.)+
8831 & cf*(y12/(y12+y13)+y12/(y12+y23)+(y12+y23)/y13+(y12+y13)/y23+
8832 & y13l*(4.*y12**2+2.*y12*y13+4.*y12*y23+y13*y23)/(y12+y23)**2+
8833 & y23l*(4.*y12**2+2.*y12*y23+4.*y12*y13+y13*y23)/(y12+y13)**2)/
8835 & cn*(y13l*y13/(y12+y23)+y23l*y23/(y12+y13))/wt1+
8836 & (cn-2.*cf)*((y12**2+(y12+y13)**2)*(y12l*y23l-y12l*y12m-y23l*
8837 & y23m+1.644934-y12i-y23i)/(y13*y23)+(y12**2+(y12+y23)**2)*
8838 & (y12l*y13l-y12l*y12m-y13l*y13m+1.644934-y12i-y13i)/
8839 & (y13*y23)+(y13**2+y23**2)/(y13*y23*(y13+y23))-
8840 & 2.*y12l*y12**2/(y13+y23)**2-4.*y12l*y12/(y13+y23))/wt1-
8841 & cn*(y13l*y23l-y13l*y13m-y23l*y23m+1.644934-y13i-y23i)
8842 IF(1.+wtopt+als2pi*wt2.LE.0.) mstj(121)=1
8843 IF(1.+wtopt+als2pi*wt2.LE.wtmax*
rlu(0)) goto 110
8844 parj(156)=(wtopt+als2pi*wt2)/(1.+wtopt+als2pi*wt2)
8846 ELSEIF(mstj(101).EQ.2.AND.mstj(110).EQ.2)
THEN
8852 IF(abs(cut-0.01*iy).LT.0.0001) iza=iy
8856 wt2=zhup(
iz,1)+zhup(
iz,2)*
zx+zhup(
iz,3)*
zx**2+(zhup(
iz,4)+
8859 & zhup(
iz,11)/(1.-
zy)+zhup(
iz,12)/
zy
8862 wtl=zhup(
iz,1)+zhup(
iz,2)*
zx+zhup(
iz,3)*
zx**2+(zhup(
iz,4)+
8865 & zhup(
iz,11)/(1.-
zy)+zhup(
iz,12)/
zy
8867 wtu=zhup(
iz,1)+zhup(
iz,2)*
zx+zhup(
iz,3)*
zx**2+(zhup(
iz,4)+
8870 & zhup(
iz,11)/(1.-
zy)+zhup(
iz,12)/
zy
8871 wt2=wtl+(wtu-wtl)*(100.*cut+1.-
iz)
8873 IF(1.+wtopt+2.*als2pi*wt2.LE.0.) mstj(121)=1
8874 IF(1.+wtopt+2.*als2pi*wt2.LE.wtmax*
rlu(0)) goto 110
8875 parj(156)=(wtopt+2.*als2pi*wt2)/(1.+wtopt+2.*als2pi*wt2)
8882 IF(4.*y23*y13*y12/x3**2.LE.qme) njet=2
8883 IF(
mod(mstj(103),4).GE.2.AND.iabs(mstj(101)).LE.1.AND.qme*x3+
8884 & 0.5*qme**2+(0.5*qme+0.25*qme**2)*((1.-
x2)/(1.-
x1)+
8885 & (1.-
x1)/(1.-
x2)).GT.(
x1**2+
x2**2)*
rlu(0)) njet=2
8886 IF(mstj(101).EQ.-1.AND.njet.EQ.2) goto 100
8891 140 x3=
sqrt(4.*cut**2+
rlu(0)*((1.-cut)**2-4.*cut**2))
8892 IF(
log((x3-cut)/cut).LE.
rlu(0)*
log((1.-2.*cut)/cut)) goto 140
8893 yd=sign(2.*cut*((x3-cut)/cut)**
rlu(0)-x3,
rlu(0)-0.5)
8896 IF(4.*(1.-
x1)*(1.-
x2)*(1.-x3)/x3**2.LE.qme) njet=2
8897 IF(mstj(102).GE.2)
THEN
8898 IF(x3**2-2.*(1.+x3)*(1.-
x1)*(1.-
x2)*parj(171).LT.
8899 & x3**2*
rlu(0)) njet=2
8901 IF(mstj(101).EQ.-1.AND.njet.EQ.2) goto 130
8909 SUBROUTINE lux4jt(NJET,CUT,KFL,ECM,KFLN,X1,X2,X4,X12,X14)
8912 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
8914 dimension wta(4),wtb(4),wtc(4),wtd(4),wte(4)
8920 IF(mstj(109).EQ.0)
THEN
8933 IF(parj(155).GT.
rlu(0)) it=2
8934 IF(mstj(101).LE.-3) it=-mstj(101)-2
8935 IF(it.EQ.1) wtmx=0.7/cut**2
8936 IF(it.EQ.1.AND.mstj(109).EQ.2) wtmx=0.6/cut**2
8937 IF(it.EQ.2) wtmx=0.1125*cf*tr/cut**2
8941 110 y134=3.*cut+(1.-6.*cut)*
rlu(0)
8942 y234=3.*cut+(1.-6.*cut)*
rlu(0)
8943 IF(it.EQ.1) y34=(1.-5.*cut)*
exp(-ct*
rlu(0))
8944 IF(it.EQ.2) y34=cut+(1.-6.*cut)*
rlu(0)
8945 IF(y34.LE.y134+y234-1..OR.y34.GE.y134*y234) goto 110
8950 vb=y34*(1.-y134-y234+y34)/((y134-y34)*(y234-y34))
8951 y24=0.5*(y234-y34)*(1.-4.*
sqrt(
max(0.,vt*(1.-vt)*vb*(1.-vb)))*
8952 &cp-(1.-2.*vt)*(1.-2.*vb))
8955 IF(
min(y12,y13,y14,y23,y24).LE.cut) goto 110
8964 wta(ic)=(y12*y34**2-y13*y24*y34+y14*y23*y34+3.*y12*y23*y34+
8965 & 3.*y12*y14*y34+4.*y12**2*y34-y13*y23*y24+2.*y12*y23*y24-
8966 & y13*y14*y24-2.*y12*y13*y24+2.*y12**2*y24+y14*y23**2+2.*y12*
8967 & y23**2+y14**2*y23+4.*y12*y14*y23+4.*y12**2*y23+2.*y12*y14**2+
8968 & 2.*y12*y13*y14+4.*y12**2*y14+2.*y12**2*y13+2.*y12**3)/(2.*y13*
8969 & y134*y234*y24)+(y24*y34+y12*y34+y13*y24-y14*y23+y12*y13)/(y13*
8970 & y134**2)+2.*y23*(1.-y13)/(y13*y134*y24)+y34/(2.*y13*y24)
8971 wtb(ic)=(y12*y24*y34+y12*y14*y34-y13*y24**2+y13*y14*y24+2.*y12*
8972 & y14*y24)/(y13*y134*y23*y14)+y12*(1.+y34)*y124/(y134*y234*y14*
8973 & y24)-(2.*y13*y24+y14**2+y13*y23+2.*y12*y13)/(y13*y134*y14)+
8974 & y12*y123*y124/(2.*y13*y14*y23*y24)
8975 wtc(ic)=-(5.*y12*y34**2+2.*y12*y24*y34+2.*y12*y23*y34+2.*y12*
8976 & y14*y34+2.*y12*y13*y34+4.*y12**2*y34-y13*y24**2+y14*y23*y24+
8977 & y13*y23*y24+y13*y14*y24-y12*y14*y24-y13**2*y24-3.*y12*y13*y24-
8978 & y14*y23**2-y14**2*y23+y13*y14*y23-3.*y12*y14*y23-y12*y13*y23)/
8979 & (4.*y134*y234*y34**2)+(3.*y12*y34**2-3.*y13*y24*y34+3.*y12*y24*
8980 & y34+3.*y14*y23*y34-y13*y24**2-y12*y23*y34+6.*y12*y14*y34+2.*y12*
8981 & y13*y34-2.*y12**2*y34+y14*y23*y24-3.*y13*y23*y24-2.*y13*y14*
8982 & y24+4.*y12*y14*y24+2.*y12*y13*y24+3.*y14*y23**2+2.*y14**2*y23+
8983 & 2.*y14**2*y12+2.*y12**2*y14+6.*y12*y14*y23-2.*y12*y13**2-
8984 & 2.*y12**2*y13)/(4.*y13*y134*y234*y34)
8985 wtc(ic)=wtc(ic)+(2.*y12*y34**2-2.*y13*y24*y34+y12*y24*y34+
8986 & 4.*y13*y23*y34+4.*y12*y14*y34+2.*y12*y13*y34+2.*y12**2*y34-
8987 & y13*y24**2+3.*y14*y23*y24+4.*y13*y23*y24-2.*y13*y14*y24+
8988 & 4.*y12*y14*y24+2.*y12*y13*y24+2.*y14*y23**2+4.*y13*y23**2+
8989 & 2.*y13*y14*y23+2.*y12*y14*y23+4.*y12*y13*y23+2.*y12*y14**2+4.*
8990 & y12**2*y13+4.*y12*y13*y14+2.*y12**2*y14)/(4.*y13*y134*y24*y34)-
8991 & (y12*y34**2-2.*y14*y24*y34-2.*y13*y24*y34-y14*y23*y34+y13*y23*
8992 & y34+y12*y14*y34+2.*y12*y13*y34-2.*y14**2*y24-4.*y13*y14*y24-
8993 & 4.*y13**2*y24-y14**2*y23-y13**2*y23+y12*y13*y14-y12*y13**2)/
8994 & (2.*y13*y34*y134**2)+(y12*y34**2-4.*y14*y24*y34-2.*y13*y24*y34-
8995 & 2.*y14*y23*y34-4.*y13*y23*y34-4.*y12*y14*y34-4.*y12*y13*y34-
8996 & 2.*y13*y14*y24+2.*y13**2*y24+2.*y14**2*y23-2.*y13*y14*y23-
8997 & y12*y14**2-6.*y12*y13*y14-y12*y13**2)/(4.*y34**2*y134**2)
8998 wttot=wttot+y34*cf*(cf*wta(ic)+(cf-0.5*cn)*wtb(ic)+cn*wtc(ic))/
9001 wtd(ic)=(y13*y23*y34+y12*y23*y34-y12**2*y34+y13*y23*y24+2.*y12*
9002 & y23*y24-y14*y23**2+y12*y13*y24+y12*y14*y23+y12*y13*y14)/(y13**2*
9003 & y123**2)-(y12*y34**2-y13*y24*y34+y12*y24*y34-y14*y23*y34-y12*
9004 & y23*y34-y13*y24**2+y14*y23*y24-y13*y23*y24-y13**2*y24+y14*
9005 & y23**2)/(y13**2*y123*y134)+(y13*y14*y12+y34*y14*y12-y34**2*y12+
9006 & y13*y14*y24+2.*y34*y14*y24-y23*y14**2+y34*y13*y24+y34*y23*y14+
9007 & y34*y13*y23)/(y13**2*y134**2)-(y34*y12**2-y13*y24*y12+y34*y24*
9008 & y12-y23*y14*y12-y34*y14*y12-y13*y24**2+y23*y14*y24-y13*y14*y24-
9009 & y13**2*y24+y23*y14**2)/(y13**2*y134*y123)
9010 wte(ic)=(y12*y34*(y23-y24+y14+y13)+y13*y24**2-y14*y23*y24+y13*
9011 & y23*y24+y13*y14*y24+y13**2*y24-y14*y23*(y14+y23+y13))/(y13*y23*
9012 & y123*y134)-y12*(y12*y34-y23*y24-y13*y24-y14*y23-y14*y13)/(y13*
9013 & y23*y123**2)-(y14+y13)*(y24+y23)*y34/(y13*y23*y134*y234)+
9014 & (y12*y34*(y14-y24+y23+y13)+y13*y24**2-y23*y14*y24+y13*y14*y24+
9015 & y13*y23*y24+y13**2*y24-y23*y14*(y14+y23+y13))/(y13*y14*y134*
9016 & y123)-y34*(y34*y12-y14*y24-y13*y24-y23*y14-y23*y13)/(y13*y14*
9017 & y134**2)-(y23+y13)*(y24+y14)*y12/(y13*y14*y123*y124)
9018 wttot=wttot+cf*(tr*wtd(ic)+(cf-0.5*cn)*wte(ic))/16.
9022 130
IF(ic.EQ.1.OR.ic.EQ.3.OR.id.EQ.2.OR.id.EQ.3)
THEN
9033 IF(ic.EQ.2.OR.ic.EQ.4.OR.id.EQ.3.OR.id.EQ.4)
THEN
9044 IF(ic.LE.3) goto 120
9045 IF(id.EQ.1.AND.wttot.LT.
rlu(0)*wtmx) goto 110
9050 IF(mstj(109).EQ.0.AND.id.EQ.1)
THEN
9051 parj(156)=y34*(2.*(wta(1)+wta(2)+wta(3)+wta(4))+4.*(wtc(1)+
9052 & wtc(2)+wtc(3)+wtc(4)))/(9.*wttot)
9053 IF(wta(2)+wta(4)+2.*(wtc(2)+wtc(4)).GT.
rlu(0)*(wta(1)+wta(2)+
9054 & wta(3)+wta(4)+2.*(wtc(1)+wtc(2)+wtc(3)+wtc(4)))) id=2
9055 IF(id.EQ.2) goto 130
9056 ELSEIF(mstj(109).EQ.2.AND.id.EQ.1)
THEN
9057 parj(156)=y34*(wta(1)+wta(2)+wta(3)+wta(4))/(8.*wttot)
9058 IF(wta(2)+wta(4).GT.
rlu(0)*(wta(1)+wta(2)+wta(3)+wta(4))) id=2
9059 IF(id.EQ.2) goto 130
9062 IF(mstj(109).EQ.0.AND.0.5*y34*(wtc(1)+wtc(2)+wtc(3)+wtc(4)).GT.
9063 &
rlu(0)*wttot) mstj(120)=4
9067 IF(y12.LE.cut+qme) njet=2
9068 IF(njet.EQ.2) goto 150
9069 q12=0.5*(1.-
sqrt(1.-qme/y12))
9070 x1=1.-(1.-q12)*y234-q12*y134
9071 x4=1.-(1.-q12)*y134-q12*y234
9073 x12=(1.-q12)*y13+q12*y23
9075 IF(y134*y234/((1.-
x1)*(1.-x4)).LE.
rlu(0)) njet=2
9080 wtr=
rlu(0)*(wtd(1)+wtd(2)+wtd(3)+wtd(4))
9081 IF(wtr.LT.wtd(2)+wtd(3)+wtd(4)) id=2
9082 IF(wtr.LT.wtd(3)+wtd(4)) id=3
9083 IF(wtr.LT.wtd(4)) id=4
9084 IF(id.GE.2) goto 130
9087 parj(156)=cf*tr*(wtd(1)+wtd(2)+wtd(3)+wtd(4))/(16.*wttot)
9088 140 kfln=1+
int(5.*
rlu(0))
9089 IF(kfln.NE.kfl.AND.0.2*parj(156).LE.
rlu(0)) goto 140
9090 IF(kfln.EQ.kfl.AND.1.-0.8*parj(156).LE.
rlu(0)) goto 140
9091 IF(kfln.GT.mstj(104)) njet=2
9093 qmen=(2.*pmqn/ecm)**2
9096 IF(y24.LE.cut+qme.OR.y13.LE.1.1*qmen) njet=2
9097 IF(njet.EQ.2) goto 150
9098 q24=0.5*(1.-
sqrt(1.-qme/y24))
9099 q13=0.5*(1.-
sqrt(1.-qmen/y13))
9100 x1=1.-(1.-q24)*y123-q24*y134
9101 x4=1.-(1.-q24)*y134-q24*y123
9102 x2=1.-(1.-q13)*y234-q13*y124
9103 x12=(1.-q24)*((1.-q13)*y14+q13*y34)+q24*((1.-q13)*y12+q13*y23)
9105 x34=(1.-q24)*((1.-q13)*y23+q13*y12)+q24*((1.-q13)*y34+q13*y14)
9106 IF(pmq**2+pmqn**2+
min(x12,x34)*ecm**2.LE.
9107 & (parj(127)+pmq+pmqn)**2) njet=2
9108 IF(y123*y134/((1.-
x1)*(1.-x4)).LE.
rlu(0)) njet=2
9110 150
IF(mstj(101).LE.-2.AND.njet.EQ.2) goto 100
9117 SUBROUTINE luxdif(NC,NJET,KFL,ECM,CHI,THE,PHI)
9120 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
9121 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9122 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
9123 SAVE /lujets/,/ludat1/,/ludat2/
9127 poll=1.-parj(131)*parj(132)
9128 pold=parj(132)-parj(131)
9129 IF(mstj(102).LE.1.OR.mstj(109).EQ.1)
THEN
9137 sff=1./(16.*paru(102)*(1.-paru(102)))
9138 sfw=ecm**4/((ecm**2-parj(123)**2)**2+(parj(123)*parj(124))**2)
9139 sfi=sfw*(1.-(parj(123)/ecm)**2)
9143 vf=af-4.*qf*paru(102)
9144 hf1=qf**2*poll-2.*qf*vf*sfi*sff*(ve*poll-ae*pold)+
9145 & (vf**2+af**2)*sfw*sff**2*((ve**2+ae**2)*poll-2.*ve*ae*pold)
9146 hf2=-2.*qf*af*sfi*sff*(ae*poll-ve*pold)+2.*vf*af*sfw*sff**2*
9147 & (2.*ve*ae*poll-(ve**2+ae**2)*pold)
9148 hf3=parj(133)**2*(qf**2-2.*qf*vf*sfi*sff*ve+(vf**2+af**2)*
9149 & sfw*sff**2*(ve**2-ae**2))
9150 hf4=-parj(133)**2*2.*qf*vf*sfw*(parj(123)*parj(124)/ecm**2)*
9157 IF(mstj(103).GE.4.AND.iabs(mstj(101)).LE.1.AND.mstj(102).LE.1.AND.
9158 &mstj(109).NE.1) qme=(2.*
ulmass(kfl)/ecm)**2
9160 sigu=4.*
sqrt(1.-qme)
9161 sigl=2.*qme*
sqrt(1.-qme)
9173 ecmr=
p(nc+1,4)+
p(nc+4,4)+
sqrt((
p(nc+2,1)+
p(nc+3,1))**2+
9174 & (
p(nc+2,2)+
p(nc+3,2))**2+(
p(nc+2,3)+
p(nc+3,3))**2)
9175 x1=2.*
p(nc+1,4)/ecmr
9176 x2=2.*
p(nc+4,4)/ecmr
9182 st12=
sqrt(1.-ct12**2)
9183 IF(mstj(109).NE.1)
THEN
9184 sigu=2.*
x1**2+
x2**2*(1.+ct12**2)-qme*(3.+ct12**2-
x1-
x2)-
9185 & qme*
x1/xq+0.5*qme*((
x2**2-qme)*st12**2-2.*
x2)*xq
9186 sigl=(
x2*st12)**2-qme*(3.-ct12**2-2.5*(
x1+
x2)+
x1*
x2+qme)+
9187 & 0.5*qme*(
x1**2-
x1-qme)/xq+0.5*qme*((
x2**2-qme)*ct12**2-
x2)*xq
9188 sigt=0.5*(
x2**2-qme-0.5*qme*(
x2**2-qme)/xq)*st12**2
9189 sigi=((1.-0.5*qme*xq)*(
x2**2-qme)*st12*ct12+qme*(1.-
x1-
x2+
9190 & 0.5*
x1*
x2+0.5*qme)*st12/ct12)/sq2
9192 sigp=2.*(
x1**2-
x2**2*ct12)
9199 sigu=(1.-parj(171))*(x3**2-0.5*
xt**2)+
9200 & parj(171)*(x3**2-0.5*
xt**2-4.*(1.-
x1)*(1.-
x2)**2/
x1)
9201 sigl=(1.-parj(171))*0.5*
xt**2+
9202 & parj(171)*0.5*(1.-
x1)**2*
xt**2
9203 sigt=(1.-parj(171))*0.25*
xt**2+
9204 & parj(171)*0.25*
xt**2*(1.-2.*
x1)
9205 sigi=-(0.5/sq2)*((1.-parj(171))*
xt*x3*ct13+
9206 & parj(171)*
xt*((1.-2.*
x1)*x3*ct13-
x1*(
x1-
x2)))
9207 siga=(0.25/sq2)*
xt*(2.*(1.-
x1)-
x1*x3)
9208 sigp=x3**2-2.*(1.-
x1)*(1.-
x2)/
x1
9217 sigmax=(2.*hf1a+hf3a+hf4a)*abs(sigu)+2.*(hf1a+hf3a+hf4a)*
9218 &abs(sigl)+2.*(hf1a+2.*hf3a+2.*hf4a)*abs(sigt)+2.*sq2*
9219 &(hf1a+2.*hf3a+2.*hf4a)*abs(sigi)+4.*sq2*hf2a*abs(siga)+
9223 100 chi=paru(2)*
rlu(0)
9232 c2phi=
cos(2.*(
phi-parj(134)))
9233 s2phi=
sin(2.*(
phi-parj(134)))
9234 sig=((1.+cthe**2)*hf1+sthe**2*(c2phi*hf3-s2phi*hf4))*sigu+
9235 &2.*(sthe**2*hf1-sthe**2*(c2phi*hf3-s2phi*hf4))*sigl+
9236 &2.*(sthe**2*c2chi*hf1+((1.+cthe**2)*c2chi*c2phi-2.*cthe*s2chi*
9237 &s2phi)*hf3-((1.+cthe**2)*c2chi*s2phi+2.*cthe*s2chi*c2phi)*hf4)*
9238 &sigt-2.*sq2*(2.*sthe*cthe*cchi*hf1-2.*sthe*(cthe*cchi*c2phi-
9239 &schi*s2phi)*hf3+2.*sthe*(cthe*cchi*s2phi+schi*c2phi)*hf4)*sigi+
9240 &4.*sq2*sthe*cchi*hf2*siga+2.*cthe*hf2*sigp
9241 IF(sig.LT.sigmax*
rlu(0)) goto 100
9252 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
9253 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9254 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
9255 SAVE /lujets/,/ludat1/,/ludat2/
9258 IF(mstu(12).GE.1) CALL
lulist(0)
9259 IF(kfl.LT.0.OR.kfl.GT.8)
THEN
9260 CALL
luerrm(16,
'(LUONIA:) called with unknown flavour code')
9261 IF(mstu(21).GE.1)
RETURN
9263 IF(ecm.LT.parj(127)+2.02*parf(101))
THEN
9264 CALL
luerrm(16,
'(LUONIA:) called with too small CM energy')
9265 IF(mstu(21).GE.1)
RETURN
9270 IF(mstj(115).GE.2)
THEN
9272 CALL
lu1ent(nc-1,11,0.5*ecm,0.,0.)
9274 CALL
lu1ent(nc,-11,0.5*ecm,paru(1),0.)
9278 IF(mstj(115).GE.3.AND.kflc.GE.5)
THEN
9284 CALL
lu1ent(nc,kf,ecm,0.,0.)
9295 IF(x3.GE.1..OR.((1.-
x1)/(
x2*x3))**2+((1.-
x2)/(
x1*x3))**2+
9296 &((1.-x3)/(
x1*
x2))**2.LE.2.*
rlu(0)) goto 100
9299 IF(mstj(101).LE.4) CALL
lu3ent(nc+1,21,21,21,ecm,
x1,x3)
9300 IF(mstj(101).GE.5) CALL
lu3ent(-(nc+1),21,21,21,ecm,
x1,x3)
9304 IF(mstj(108).EQ.2.AND.(mstj(101).EQ.0.OR.mstj(101).EQ.1))
9307 IF(mstu(111).EQ.2) paru(112)=parj(122)
9309 IF(kflc.NE.0) qf=kchg(kflc,1)/3.
9310 rgam=7.2*qf**2*paru(101)/
ulalps(ecm**2)
9313 IF(
rlu(0).GT.rgam/(1.+rgam))
THEN
9314 IF(1.-
max(
x1,
x2,x3).LE.
max((parj(126)/ecm)**2,parj(125)))
9316 IF(njet.EQ.2.AND.mstj(101).LE.4) CALL
lu2ent(nc+1,21,21,ecm)
9317 IF(njet.EQ.2.AND.mstj(101).GE.5) CALL
lu2ent(-(nc+1),21,21,ecm)
9321 IF(ecmc.LT.2.*parj(127)) goto 100
9326 IF(mstj(101).GE.5) k(nc+2,4)=mstu(5)*(nc+3)
9327 IF(mstj(101).GE.5) k(nc+2,5)=mstu(5)*(nc+3)
9328 IF(mstj(101).GE.5) k(nc+3,4)=mstu(5)*(nc+2)
9329 IF(mstj(101).GE.5) k(nc+3,5)=mstu(5)*(nc+2)
9331 IF(ecmc.LT.4.*parj(127))
THEN
9335 CALL
lu1ent(nc+2,83,0.5*(
x2+x3)*ecm,paru(1),0.)
9341 k(ip,3)=k(ip,3)+(mstj(115)/2)+(kflc/5)*(mstj(115)/3)*(nc-1)
9345 IF(mstj(106).EQ.1)
THEN
9347 hf1=1.-parj(131)*parj(132)
9349 ct13=(
x1*x3-2.*
x1-2.*x3+2.)/(
x1*x3)
9350 st13=
sqrt(1.-ct13**2)
9351 sigl=0.5*x3**2*((1.-
x2)**2+(1.-x3)**2)*st13**2
9352 sigu=(
x1*(1.-
x1))**2+(
x2*(1.-
x2))**2+(x3*(1.-x3))**2-sigl
9354 sigi=(sigl*ct13/st13+0.5*
x1*x3*(1.-
x2)**2*st13)/sq2
9355 sigmax=(2.*hf1+hf3)*abs(sigu)+2.*(hf1+hf3)*abs(sigl)+2.*(hf1+
9356 & 2.*hf3)*abs(sigt)+2.*sq2*(hf1+2.*hf3)*abs(sigi)
9359 120 chi=paru(2)*
rlu(0)
9368 c2phi=
cos(2.*(
phi-parj(134)))
9369 s2phi=
sin(2.*(
phi-parj(134)))
9370 sig=((1.+cthe**2)*hf1+sthe**2*c2phi*hf3)*sigu+2.*(sthe**2*hf1-
9371 & sthe**2*c2phi*hf3)*sigl+2.*(sthe**2*c2chi*hf1+((1.+cthe**2)*
9372 & c2chi*c2phi-2.*cthe*s2chi*s2phi)*hf3)*sigt-2.*sq2*(2.*sthe*cthe*
9373 & cchi*hf1-2.*sthe*(cthe*cchi*c2phi-schi*s2phi)*hf3)*sigi
9374 IF(sig.LT.sigmax*
rlu(0)) goto 120
9375 CALL ludbrb(nc+1,
n,0.,chi,0d0,0d0,0d0)
9376 CALL ludbrb(nc+1,
n,the,
phi,0d0,0d0,0d0)
9380 IF(mstj(101).GE.5.AND.njet.GE.2)
THEN
9381 CALL
lushow(nc+mk+1,-njet,ecmc)
9383 IF(mstj(105).EQ.-1) mstj(14)=-1
9384 IF(mstj(105).GE.0) mstu(28)=0
9387 IF(mstj(105).GE.0.AND.mstu(28).NE.0) goto 100
9391 IF(mstj(105).EQ.1) CALL
luexec
9392 mstu(161)=110*kflc+3
9405 parameter(nmxhep=2000)
9406 common/
hepevt/nevhep,nhep,isthep(nmxhep),idhep(nmxhep),
9407 &jmohep(2,nmxhep),jdahep(2,nmxhep),phep(5,nmxhep),vhep(4,nmxhep)
9408 DOUBLE PRECISION phep,vhep
9409 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
9410 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9411 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
9413 SAVE /lujets/,/ludat1/,/ludat2/
9418 IF(
n.GT.nmxhep) CALL
luerrm(8,
9419 &
'(LUHEPC:) no more space in /HEPEVT/')
9423 IF(k(i,1).GE.1.AND.k(i,1).LE.10) isthep(i)=1
9424 IF(k(i,1).GE.11.AND.k(i,1).LE.20) isthep(i)=2
9425 IF(k(i,1).GE.21.AND.k(i,1).LE.30) isthep(i)=3
9426 IF(k(i,1).GE.31.AND.k(i,1).LE.100) isthep(i)=k(i,1)
9430 IF(k(i,1).NE.3.AND.k(i,1).NE.13.AND.k(i,1).NE.14)
THEN
9448 IF(k(i,1).EQ.21.AND.k(i-1,1).NE.21) inew=i
9452 IF(i.GE.inew+2.AND.k(i,1).EQ.21.AND.k(i,3).EQ.0)
THEN
9454 IF(i.GE.inew+3.AND.k(i-1,1).EQ.21.AND.k(i-1,3).EQ.0)
9458 ELSEIF(k(i,2).GE.91.AND.k(i,2).LE.93)
THEN
9461 IF(i1.GE.i) CALL
luerrm(8,
9462 &
'(LUHEPC:) translation of inconsistent event history')
9463 IF(i1.LT.i.AND.k(i1,1).NE.1.AND.k(i1,1).NE.11) goto 120
9465 IF(i1.LT.i.AND.kc.EQ.0) goto 120
9466 IF(i1.LT.i.AND.kchg(kc,2).EQ.0) goto 120
9468 ELSEIF(k(i,2).EQ.94)
THEN
9470 IF(nhep.GE.i+3.AND.k(i+3,3).LE.i) njet=3
9471 IF(nhep.GE.i+4.AND.k(i+4,3).LE.i) njet=4
9472 jmohep(2,i)=
mod(k(i+njet,4)/mstu(5),mstu(5))
9473 IF(jmohep(2,i).EQ.jmohep(1,i)) jmohep(2,i)=
9474 &
mod(k(i+1,4)/mstu(5),mstu(5))
9478 IF(k(i,2).EQ.94.AND.mstu(16).NE.2)
THEN
9479 DO 130 i1=jdahep(1,i),jdahep(2,i)
9480 i2=
mod(k(i1,4)/mstu(5),mstu(5))
9484 IF(k(i,2).GE.91.AND.k(i,2).LE.94) goto 140
9486 IF(i1.LE.0.OR.i1.GT.nhep) goto 140
9487 IF(k(i1,1).NE.13.AND.k(i1,1).NE.14) goto 140
9488 IF(jdahep(1,i1).EQ.0)
THEN
9495 IF(k(i,1).NE.13.AND.k(i,1).NE.14) goto 150
9496 IF(jdahep(2,i).EQ.0) jdahep(2,i)=jdahep(1,i)
9501 IF(nhep.GT.mstu(4)) CALL
luerrm(8,
9502 &
'(LUHEPC:) no more space in /LUJETS/')
9508 IF(isthep(i).EQ.1) k(i,1)=1
9509 IF(isthep(i).EQ.2) k(i,1)=11
9510 IF(isthep(i).EQ.3) k(i,1)=21
9522 IF(isthep(i).EQ.2.AND.phep(4,i).GT.phep(5,i))
THEN
9524 IF(i1.GT.0.AND.i1.LE.nhep) v(i,5)=(vhep(4,i1)-vhep(4,i))*
9525 & phep(5,i)/phep(4,i)
9529 IF(isthep(i).EQ.1)
THEN
9532 IF(kc.NE.0) kq=kchg(kc,2)*isign(1,k(i,2))
9533 IF(kq.NE.0) nkq=nkq+1
9534 IF(kq.NE.2) kqsum=kqsum+kq
9535 IF(kq.NE.0.AND.kqsum.NE.0)
THEN
9537 ELSEIF(kq.EQ.2.AND.i.LT.
n)
THEN
9538 IF(k(i+1,2).EQ.21) k(i,1)=2
9542 IF(nkq.EQ.1.OR.kqsum.NE.0) CALL
luerrm(8,
9543 &
'(LUHEPC:) input parton configuration not colour singlet')
9554 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
9555 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9556 SAVE /lujets/,/ludat1/
9557 dimension psum(5),pini(6),pfin(6)
9560 IF(mtest.GE.1) CALL
lutabu(20)
9579 IF(iev.EQ.301.OR.iev.EQ.351.OR.iev.EQ.401) mstj(116)=3
9585 IF(ity.EQ.3.OR.ity.EQ.4) mstj(11)=2
9586 IF(ity.EQ.1) CALL
lu1ent(1,1,15.,0.,0.)
9587 IF(ity.EQ.2) CALL
lu1ent(1,3101,15.,0.,0.)
9588 IF(ity.EQ.3) CALL
lu1ent(1,-2203,15.,0.,0.)
9589 IF(ity.EQ.4) CALL
lu1ent(1,-4,30.,0.,0.)
9590 IF(ity.EQ.5) CALL
lu1ent(1,21,15.,0.,0.)
9593 ELSEIF(iev.LE.130)
THEN
9595 IF(ity.EQ.1) CALL
lu2ent(1,1,-1,40.)
9596 IF(ity.EQ.2) CALL
lu2ent(1,4,-4,30.)
9597 IF(ity.EQ.3) CALL
lu2ent(1,2,2103,100.)
9598 IF(ity.EQ.4) CALL
lu2ent(1,21,21,40.)
9599 IF(ity.EQ.5) CALL
lu3ent(1,2101,21,-3203,30.,0.6,0.8)
9600 IF(ity.EQ.6) CALL
lu3ent(1,5,21,-5,40.,0.9,0.8)
9601 IF(ity.EQ.7) CALL
lu3ent(1,21,21,21,60.,0.7,0.5)
9602 IF(ity.EQ.8) CALL
lu4ent(1,2,21,21,-2,40.,0.4,0.64,0.6,0.12,0.2)
9605 ELSEIF(iev.LE.200)
THEN
9607 mstj(2)=1+
mod(iev-131,4)
9608 mstj(3)=1+
mod((iev-131)/4,4)
9609 IF(ity.EQ.1) CALL
lu2ent(1,4,-5,40.)
9610 IF(ity.EQ.2) CALL
lu3ent(1,3,21,-3,40.,0.9,0.4)
9611 IF(ity.EQ.3) CALL
lu4ent(1,2,21,21,-2,40.,0.4,0.64,0.6,0.12,0.2)
9612 IF(ity.GE.4) CALL
lu4ent(1,2,-3,3,-2,40.,0.4,0.64,0.6,0.12,0.2)
9615 ELSEIF(iev.LE.300)
THEN
9622 IF(i.EQ.1) kfl=
int(1.+4.*
rlu(0))
9623 IF(i.EQ.njet) kfl=-
int(1.+4.*
rlu(0))
9629 IF(i.EQ.1.OR.i.EQ.njet) mstj(93)=1
9630 IF(i.EQ.1.OR.i.EQ.njet) psum(5)=psum(5)+
ulmass(kfl)
9632 psum(j)=psum(j)+
p(i,j)
9635 IF(psum(4)**2-psum(1)**2-psum(2)**2-psum(3)**2.LT.
9636 & (psum(5)+parj(32))**2) goto 100
9639 ELSEIF(iev.LE.350)
THEN
9644 ELSEIF(iev.LE.400)
THEN
9645 mstj(42)=1+
mod(iev,2)
9646 mstj(43)=1+
mod(iev/2,4)
9647 mstj(44)=
mod(iev/8,3)
9651 ELSEIF(iev.LE.450)
THEN
9656 ELSEIF(iev.LE.500)
THEN
9660 ELSEIF(iev.LE.560)
THEN
9664 kflc=kflb-
mod(ity,5)
9665 CALL
lu1ent(1,100*kflb+10*kflc+kfls,0.,0.,0.)
9668 ELSEIF(iev.LE.600)
THEN
9672 kflb=kfla-
mod(ity,5)
9674 CALL
lu1ent(1,1000*kfla+100*kflb+10*kflc+kfls,0.,0.,0.)
9692 IF((pfin(1)-pini(1))**2+(pfin(2)-pini(2))**2.GE.4.) merr=merr+1
9693 epzrem=pini(4)+pini(3)-pfin(4)-pfin(3)
9694 IF(epzrem.LT.0..OR.epzrem.GT.2.*parj(31)) merr=merr+1
9695 IF(abs(pfin(6)-pini(6)).GT.2.1) merr=merr+1
9698 IF(abs(pfin(j)-pini(j)).GT.0.0001*pini(4)) merr=merr+1
9700 IF(abs(pfin(6)-pini(6)).GT.0.1) merr=merr+1
9702 IF(merr.NE.0)
WRITE(mstu(11),5000) (pini(j),j=1,4),pini(6),
9703 &(pfin(j),j=1,4),pfin(6)
9708 IF(k(i,1).GT.20) goto 170
9709 IF(
lucomp(k(i,2)).EQ.0)
THEN
9710 WRITE(mstu(11),5100) i
9713 pd=
p(i,4)**2-
p(i,1)**2-
p(i,2)**2-
p(i,3)**2-
p(i,5)**2
9714 IF(abs(pd).GT.
max(0.1,0.001*
p(i,4)**2).OR.
p(i,4).LT.0.)
THEN
9715 WRITE(mstu(11),5200) i
9719 IF(mtest.GE.1) CALL
lutabu(21)
9722 IF(merr.NE.0.OR.mstu(24).NE.0.OR.mstu(28).NE.0)
THEN
9724 ELSEIF(mtest.GE.1.AND.
mod(iev-5,100).EQ.0)
THEN
9729 IF(merr.NE.0) nerr=nerr+1
9731 WRITE(mstu(11),5300) iev
9737 IF(mtest.GE.1) CALL
lutabu(22)
9738 IF(nerr.EQ.0)
WRITE(mstu(11),5400)
9739 IF(nerr.GT.0)
WRITE(mstu(11),5500) nerr
9751 5000
FORMAT(/
' Momentum, energy and/or charge were not conserved ',
9752 &
'in following event'/
' sum of',9
x,
'px',11
x,
'py',11
x,
'pz',11
x,
9753 &
'E',8
x,
'charge'/
' before',2
x,4(1
x,f12.5),1
x,f8.2/
' after',3
x,
9754 &4(1
x,f12.5),1
x,f8.2)
9755 5100
FORMAT(/5
x,
'Entry no.',i4,
' in following event not known code')
9756 5200
FORMAT(/5
x,
'Entry no.',i4,
' in following event has faulty ',
9758 5300
FORMAT(/5
x,
'Ten errors experienced by event ',i3/
9759 &5
x,
'Something is seriously wrong! Execution stopped now!')
9760 5400
FORMAT(//5
x,
'End result of LUTEST: no errors detected.')
9761 5500
FORMAT(//5
x,
'End result of LUTEST:',i2,
' errors detected.'/
9762 &5
x,
'This should not have happened!')
9773 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
9774 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
9775 common/ludat3/mdcy(500,3),mdme(2000,2),brat(2000),kfdp(2000,5)
9776 common/ludat4/chaf(500)
9778 common/ludatr/mrlu(6),rrlu(100)
9779 SAVE /ludat1/,/ludat2/,/ludat3/,/ludat4/,/ludatr/
9783 & 0, 0, 0, 4000,10000, 500, 2000, 0, 0, 2,
9784 1 6, 1, 1, 0, 1, 1, 0, 0, 0, 0,
9785 2 2, 10, 0, 0, 1, 10, 0, 0, 0, 0,
9786 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
9787 4 2, 2, 1, 4, 2, 1, 1, 0, 0, 0,
9788 5 25, 24, 0, 1, 0, 0, 0, 0, 0, 0,
9789 6 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
9791 & 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
9792 1 1, 5, 3, 5, 0, 0, 0, 0, 0, 0,
9794 8 7, 408, 1995, 08, 23, 700, 0, 0, 0, 0,
9795 9 0, 0, 0, 0, 0, 0, 0, 0, 0, 0/
9797 & 3.1415927, 6.2831854, 0.1973, 5.068, 0.3894, 2.568, 4*0.,
9798 1 0.001, 0.09, 0.01, 0., 0., 0., 0., 0., 0., 0.,
9799 2 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9800 3 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9801 4 2.0, 1.0, 0.25, 2.5, 0.05, 0., 0., 0.0001, 0., 0.,
9802 5 2.5, 1.5, 7.0, 1.0, 0.5, 2.0, 3.2, 0., 0., 0.,
9804 & 0.00729735, 0.232, 0.007764, 1.0, 1.16639
e-5, 0., 0., 0.,
9806 1 0.20, 0.25, 1.0, 4.0, 10., 0., 0., 0., 0., 0.,
9807 2 -0.693, -1.0, 0.387, 1.0, -0.08, -1.0, 1.0, 1.0, 1.0, 0.,
9808 3 1.0, -1.0, 1.0, -1.0, 1.0, 0., 0., 0., 0., 0.,
9809 4 5.0, 1.0, 1.0, 0., 1.0, 1.0, 0., 0., 0., 0.,
9810 5 1.0, 0., 0., 0., 1000., 1.0, 1.0, 1.0, 1.0, 0.,
9811 6 1.0, 1.0, 1.0, 1.0, 1.0, 0., 0., 0., 0., 0.,
9812 7 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0., 0., 0.,
9813 8 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.,
9814 9 0., 0., 0., 0., 1.0, 0., 0., 0., 0., 0./
9816 & 1, 3, 0, 0, 0, 0, 0, 0, 0, 0,
9817 1 4, 2, 0, 1, 0, 0, 0, 0, 0, 0,
9818 2 2, 1, 1, 2, 1, 2, 2, 0, 0, 0,
9819 3 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
9820 4 2, 2, 4, 2, 5, 3, 3, 0, 0, 0,
9821 5 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
9823 & 5, 2, 7, 5, 1, 1, 0, 2, 0, 2,
9824 1 0, 0, 0, 0, 1, 1, 0, 0, 0, 0,
9827 & 0.10, 0.30, 0.40, 0.05, 0.50, 0.50, 0.50, 0., 0., 0.,
9828 1 0.50, 0.60, 0.75, 0., 0., 0., 0., 1.0, 1.0, 0.,
9829 2 0.36, 1.0, 0.01, 2.0, 1.0, 0.4, 0., 0., 0., 0.,
9830 3 0.10, 1.0, 0.8, 1.5, 0., 2.0, 0.2, 2.5, 0.6, 0.,
9831 4 0.3, 0.58, 0.5, 0.9, 0.5, 1.0, 1.0, 1.0, 0., 0.,
9832 5 0.77,0.77,0.77,-0.05,-0.005,-0.00001,-0.00001,-0.00001,1.0,0.,
9833 6 4.5, 0.7, 0., 0.003, 0.5, 0.5, 0., 0., 0., 0.,
9834 7 10., 1000., 100., 1000., 0., 0.7, 10., 0., 0., 0.,
9835 8 0.29, 1.0, 1.0, 0., 10., 10., 0., 0., 0., 0.,
9836 9 0.02, 1.0, 0.2, 0., 0., 0., 0., 0., 0., 0.,
9837 & 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9838 1 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9839 2 1.0, 0.25,91.187,2.489, 0.01, 2.0, 1.0, 0.25,0.002, 0.,
9840 3 0., 0., 0., 0., 0.01, 0.99, 0., 0., 0.2, 0.,
9844 DATA (kchg(i,1),i= 1, 500)/-1,2,-1,2,-1,2,-1,2,2*0,-3,0,-3,0,
9845 &-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,
9846 &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,
9847 &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,
9848 &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,
9849 &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,
9850 &-3,0,3,-3,0,-3,114*0/
9851 DATA (kchg(i,2),i= 1, 500)/8*1,12*0,2,16*0,2,1,50*0,-1,410*0/
9852 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,
9853 &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,
9854 &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,
9855 &0,6*1,4*0,6*1,4*0,16*1,4*0,6*1,114*0/
9856 DATA (pmas(i,1),i= 1, 500)/0.0099,0.0056,0.199,1.35,5.,160.,
9857 &2*250.,2*0.,0.00051,0.,0.1057,0.,1.777,0.,250.,5*0.,91.187,80.25,
9858 &80.,6*0.,500.,900.,500.,3*300.,350.,200.,5000.,60*0.,0.1396,
9859 &0.4977,0.4936,1.8693,1.8645,1.9688,5.2787,5.2786,5.47972,6.594,
9860 &0.135,0.5475,0.9578,2.9788,9.4,320.,2*500.,2*0.,0.7669,0.8961,
9861 &0.8916,2.0101,2.0071,2.11,2*5.325,5.5068,6.602,0.7683,0.782,
9862 &1.0194,3.0969,9.4603,320.,2*500.,2*0.,1.232,2*1.29,2*2.424,2.536,
9863 &2*5.73,5.97,7.3,1.232,1.17,1.4,3.46,9.875,320.,2*500.,2*0.,0.983,
9864 &2*1.429,2*2.272,2.5,2*5.68,5.92,7.25,0.9827,1.,1.4,3.4151,9.8598,
9865 &320.,2*500.,2*0.,1.26,2*1.402,2*2.372,2.56,2*5.78,6.02,7.3,1.26,
9866 &1.282,1.42,3.5106,9.8919,320.,2*500.,2*0.,1.318,1.432,1.425,
9867 &2*2.46,2.61,2*5.83,6.07,7.35,1.318,1.275,1.525,3.5562,9.9132,
9868 &320.,2*500.,2*0.,2*0.4977,8*0.,3.686,3*0.,10.0233,70*0.,1.1156,
9869 &5*0.,2.2849,0.,2.473,2.466,6*0.,5.641,0.,2*5.84,6*0.,0.9396,
9870 &0.9383,0.,1.1974,1.1926,1.1894,1.3213,1.3149,0.,2.4525,2.4529,
9871 &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,
9872 &1.231,1.3872,1.3837,1.3828,1.535,1.5318,1.6724,3*2.5,2*2.63,2.8,
9873 &4*0.,3*5.81,2*5.97,6.13,114*0./
9874 DATA (pmas(i,2),i= 1, 500)/22*0.,2.489,2.066,88*0.,0.0002,
9875 &0.001,6*0.,0.149,0.0505,0.0498,7*0.,0.151,0.00843,0.0044,7*0.,
9876 &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,
9877 &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,
9878 &0.024,0.06,0.0009,6*0.,0.11,0.109,0.098,2*0.019,5*0.02,0.11,
9879 &0.185,0.076,0.002,146*0.,4*0.12,0.0394,0.036,0.0358,0.0099,
9881 DATA (pmas(i,3),i= 1, 500)/22*0.,2*20.,88*0.,0.002,0.005,6*0.,
9882 &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.,
9883 &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,
9884 &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,
9885 &4*0.12,5*0.05,0.25,0.17,0.2,0.01,146*0.,4*0.14,0.04,2*0.035,
9887 DATA (pmas(i,4),i= 1, 500)/12*0.,658650.,0.,0.0914,68*0.,0.1,
9888 &0.387,15*0.,7804.,0.,3709.,0.32,0.1259,0.135,3*0.387,0.15,110*0.,
9889 &15500.,26.75,83*0.,78.88,5*0.,0.057,0.,0.025,0.09,6*0.,0.387,0.,
9890 &2*0.387,9*0.,44.3,0.,23.95,49.1,86.9,6*0.,0.13,9*0.,0.387,13*0.,
9893 & 0.5, 0.25, 0.5, 0.25, 1., 0.5, 0., 0., 0., 0.,
9894 1 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
9895 2 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
9896 3 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
9897 4 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
9898 5 0.5, 0., 0.5, 0., 1., 1., 0., 0., 0., 0.,
9899 6 0.75, 0.5, 0., 0.1667, 0.0833, 0.1667, 0., 0., 0., 0.,
9900 7 0., 0., 1., 0.3333, 0.6667, 0.3333, 0., 0., 0., 0.,
9901 8 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9902 9 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
9903 & 0.325, 0.325, 0.5, 1.6, 5.0, 0., 0., 0., 0., 0.,
9904 1 0., 0.11, 0.16, 0.048, 0.50, 0.45, 0.55, 0.60, 0., 0.,
9905 2 0.2, 0.1, 0., 0., 0., 0., 0., 0., 0., 0.,
9907 DATA ((vckm(i,j),j=1,4),i=1,4)/
9908 1 0.95113, 0.04884, 0.00003, 0.00000,
9909 2 0.04884, 0.94940, 0.00176, 0.00000,
9910 3 0.00003, 0.00176, 0.99821, 0.00000,
9911 4 0.00000, 0.00000, 0.00000, 1.00000/
9914 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,
9915 &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,
9916 &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,
9917 &9*0,5*1,0,6*1,4*0,6*1,4*0,16*1,4*0,6*1,114*0/
9918 DATA (mdcy(i,2),i= 1, 500)/1,9,17,25,33,41,50,60,2*0,70,74,76,
9919 &81,83,124,126,132,2*0,135,144,156,172,192,6*0,209,0,231,254,274,
9920 &292,301,304,305,42*0,314,315,319,328,331,336,338,11*0,358,359,
9921 &361,367,430,491,524,560,596,635,666,668,675,681,682,683,684,685,
9922 &2*0,686,688,691,694,697,699,700,701,702,703,704,708,713,721,724,
9923 &733,734,735,2*0,736,737,742,747,749,751,753,755,757,759,761,762,
9924 &765,769,770,771,772,773,2*0,774,775,777,779,781,783,785,787,789,
9925 &791,793,794,799,804,806,808,809,810,2*0,811,813,815,817,819,821,
9926 &823,825,827,829,831,833,846,850,852,854,855,856,2*0,857,863,873,
9927 &884,892,900,904,912,920,924,928,936,945,951,953,955,956,957,2*0,
9928 &958,966,8*0,968,3*0,979,70*0,993,5*0,997,0,1073,1074,6*0,1075,0,
9929 &1092,1093,9*0,1094,1096,1097,1100,1101,0,1103,1104,1105,1106,
9930 &1107,1108,4*0,1109,1110,1111,1112,1113,1114,4*0,1115,1116,1119,
9931 &1122,1123,1126,1129,1132,1134,1136,1140,1141,1142,1143,1145,1147,
9932 &4*0,1148,1149,1150,1151,1152,1153,114*0/
9933 DATA (mdcy(i,3),i= 1, 500)/5*8,9,2*10,2*0,4,2,5,2,41,2,6,3,2*0,
9934 &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,
9935 &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,
9936 &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,
9937 &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,
9938 &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,
9939 &6*1,4*0,1,2*3,1,3*3,2*2,4,3*1,2*2,1,4*0,6*1,114*0/
9940 DATA (mdme(i,1),i= 1,2000)/6*1,-1,7*1,-1,7*1,-1,7*1,-1,7*1,-1,
9941 &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,
9942 &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,
9943 &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,
9944 &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,
9945 &16*1,-1,2*1,3*-1,1665*1/
9946 DATA (mdme(i,2),i= 1,2000)/75*102,42,6*102,2*42,2*0,7*41,2*0,
9947 &24*41,6*102,45,29*102,8*32,8*0,16*32,4*0,8*32,4*0,32,4*0,8*32,
9948 &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,
9949 &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,
9950 &24*42,41*0,16*42,46*0,10*42,20*0,2*13,14*42,16*0,48,3*13,16*42,
9951 &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,
9952 &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,
9953 &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,
9954 &32,86,87,88,40*0,12,0,32,86,87,88,95*0,12,0,32,86,87,88,2*0,4*42,
9955 &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,
9956 &2*42,2*85,14*0,84,5*0,85,886*0/
9957 DATA (brat(i) ,i= 1, 439)/75*0.,1.,6*0.,0.179,0.178,0.116,
9958 &0.235,0.005,0.056,0.018,0.023,0.011,2*0.004,0.0067,0.014,2*0.002,
9959 &2*0.001,0.0022,0.054,0.002,0.016,0.005,0.011,0.0101,5*0.006,
9960 &0.002,2*0.001,5*0.002,6*0.,1.,29*0.,0.15394,0.11936,0.15394,
9961 &0.11926,0.15254,3*0.,0.03368,0.06664,0.03368,0.06664,0.03368,
9962 &0.06664,2*0.,0.3214,0.0165,2*0.,0.0165,0.3207,2*0.,0.00001,
9963 &0.00059,6*0.,3*0.1081,3*0.,0.0003,0.048,0.8705,4*0.,0.0002,
9964 &0.0603,0.,0.0199,0.0008,3*0.,0.143,0.111,0.143,0.111,0.143,0.085,
9965 &2*0.,0.03,0.058,0.03,0.058,0.03,0.058,8*0.,0.25,0.01,2*0.,0.01,
9966 &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.,
9967 &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,
9968 &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,
9969 &0.01,0.015,0.005,1.,3*0.,1.,4*0.,1.,0.25,0.01,2*0.,0.01,0.25,
9970 &4*0.,0.24,5*0.,3*0.08,0.,1.,2*0.5,0.635,0.212,0.056,0.017,0.048,
9971 &0.032,0.07,0.065,2*0.005,2*0.011,5*0.001,0.07,0.065,2*0.005,
9972 &2*0.011,5*0.001,0.026,0.019,0.066,0.041,0.045,0.076,0.0073,
9973 &2*0.0047,0.026,0.001,0.0006,0.0066,0.005,2*0.003,2*0.0006,
9974 &2*0.001,0.006,0.005,0.012,0.0057,0.067,0.008,0.0022,0.027,0.004,
9975 &0.019,0.012,0.002,0.009,0.0218,0.001,0.022,0.087,0.001,0.0019,
9976 &0.0015,0.0028,0.034,0.027,2*0.002,2*0.004,2*0.002,0.034,0.027/
9977 DATA (brat(i) ,i= 440, 655)/2*0.002,2*0.004,2*0.002,0.0365,
9978 &0.045,0.073,0.062,3*0.021,0.0061,0.015,0.025,0.0088,0.074,0.0109,
9979 &0.0041,0.002,0.0035,0.0011,0.001,0.0027,2*0.0016,0.0018,0.011,
9980 &0.0063,0.0052,0.018,0.016,0.0034,0.0036,0.0009,0.0006,0.015,
9981 &0.0923,0.018,0.022,0.0077,0.009,0.0075,0.024,0.0085,0.067,0.0511,
9982 &0.017,0.0004,0.0028,0.01,2*0.02,0.03,2*0.005,2*0.02,0.03,2*0.005,
9983 &0.015,0.037,0.028,0.079,0.095,0.052,0.0078,4*0.001,0.028,0.033,
9984 &0.026,0.05,0.01,4*0.005,0.25,0.0952,0.02,0.055,2*0.005,0.008,
9985 &0.012,0.02,0.055,2*0.005,0.008,0.012,0.01,0.03,0.0035,0.011,
9986 &0.0055,0.0042,0.009,0.018,0.015,0.0185,0.0135,0.025,0.0004,
9987 &0.0007,0.0008,0.0014,0.0019,0.0025,0.4291,0.08,0.07,0.02,0.015,
9988 &0.005,0.02,0.055,2*0.005,0.008,0.012,0.02,0.055,2*0.005,0.008,
9989 &0.012,0.01,0.03,0.0035,0.011,0.0055,0.0042,0.009,0.018,0.015,
9990 &0.0185,0.0135,0.025,0.0004,0.0007,0.0008,0.0014,0.0019,0.0025,
9991 &0.4291,0.08,0.07,0.02,0.015,0.005,0.02,0.055,2*0.005,0.008,0.012,
9992 &0.02,0.055,2*0.005,0.008,0.012,0.01,0.03,0.0035,0.011,0.0055,
9993 &0.0042,0.009,0.018,0.015,0.0185,0.0135,0.025,2*0.0002,0.0007,
9994 &2*0.0004,0.0014,0.001,0.0009,0.0025,0.4291,0.08,0.07,0.02,0.015,
9995 &0.005,0.047,0.122,0.006,0.012,0.035,0.012,0.035,0.003,0.007,0.15,
9996 &0.037,0.008,0.002,0.05,0.015,0.003,0.001,0.014,0.042,0.014,0.042/
9997 DATA (brat(i) ,i= 656, 931)/0.24,0.065,0.012,0.003,0.001,0.002,
9998 &0.001,0.002,0.014,0.003,0.988,0.012,0.389,0.319,0.2367,0.049,
9999 &0.005,0.001,0.0003,0.441,0.206,0.3,0.03,0.022,0.001,5*1.,0.99955,
10000 &0.00045,0.665,0.333,0.002,0.666,0.333,0.001,0.65,0.3,0.05,0.56,
10001 &0.44,5*1.,0.99912,0.00079,0.00005,0.00004,0.888,0.085,0.021,
10002 &2*0.003,0.49,0.344,3*0.043,0.023,0.013,0.001,0.0627,0.0597,
10003 &0.8776,3*0.027,0.015,0.045,0.015,0.045,0.77,0.029,4*1.,0.28,0.14,
10004 &0.313,0.157,0.11,0.28,0.14,0.313,0.157,0.11,0.667,0.333,0.667,
10005 &0.333,2*0.5,0.667,0.333,0.667,0.333,4*0.5,1.,0.333,0.334,0.333,
10006 &4*0.25,6*1.,0.667,0.333,0.667,0.333,0.667,0.333,0.667,0.333,
10007 &2*0.5,0.667,0.333,0.667,0.333,4*0.5,1.,0.52,0.26,0.11,2*0.055,
10008 &0.62,0.31,0.035,2*0.0175,0.007,0.993,0.02,0.98,3*1.,2*0.5,0.667,
10009 &0.333,0.667,0.333,0.667,0.333,0.667,0.333,2*0.5,0.667,0.333,
10010 &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,
10011 &0.727,0.35,0.65,3*1.,2*0.35,0.144,0.105,0.048,0.003,0.333,0.166,
10012 &0.168,0.084,0.087,0.043,0.059,2*0.029,0.002,0.332,0.166,0.168,
10013 &0.084,0.086,0.043,0.059,2*0.029,2*0.002,0.3,0.15,0.16,0.08,0.13,
10014 &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,
10015 &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,
10016 &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/
10017 DATA (brat(i) ,i= 932,2000)/0.024,2*0.012,0.003,0.566,0.283,
10018 &0.069,0.028,0.023,2*0.0115,0.005,0.003,0.356,2*0.178,0.28,
10019 &2*0.004,0.135,0.865,0.22,0.78,3*1.,0.217,0.124,2*0.193,2*0.135,
10020 &0.002,0.001,0.686,0.314,2*0.0083,0.1866,0.324,0.184,0.027,0.001,
10021 &0.093,0.087,0.078,0.0028,3*0.014,0.008,0.024,0.008,0.024,0.425,
10022 &0.02,0.185,0.088,0.043,0.067,0.066,0.641,0.357,2*0.001,0.018,
10023 &2*0.005,0.003,0.002,2*0.006,0.018,2*0.005,0.003,0.002,2*0.006,
10024 &0.0066,0.025,0.016,0.0088,2*0.005,0.0058,0.005,0.0055,4*0.004,
10025 &2*0.002,2*0.004,0.003,0.002,2*0.003,3*0.002,2*0.001,0.002,
10026 &2*0.001,2*0.002,0.0013,0.0018,5*0.001,4*0.003,2*0.005,2*0.002,
10027 &2*0.001,2*0.002,2*0.001,0.2432,0.057,2*0.035,0.15,2*0.075,0.03,
10028 &2*0.015,2*1.,2*0.105,0.04,0.0077,0.02,0.0235,0.0285,0.0435,
10029 &0.0011,0.0022,0.0044,0.4291,0.08,0.07,0.02,0.015,0.005,2*1.,
10030 &0.999,0.001,1.,0.516,0.483,0.001,1.,0.995,0.005,13*1.,0.331,
10031 &0.663,0.006,0.663,0.331,0.006,1.,0.88,2*0.06,0.88,2*0.06,0.88,
10032 &2*0.06,0.667,2*0.333,0.667,0.676,0.234,0.085,0.005,3*1.,4*0.5,
10034 DATA (kfdp(i,1),i= 1, 507)/21,22,23,4*-24,25,21,22,23,4*24,25,
10035 &21,22,23,4*-24,25,21,22,23,4*24,25,21,22,23,4*-24,25,21,22,23,
10036 &4*24,25,37,21,22,23,4*-24,25,2*-37,21,22,23,4*24,25,2*37,22,23,
10037 &-24,25,23,24,-12,22,23,-24,25,23,24,-12,-14,35*16,22,23,-24,25,
10038 &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,
10039 &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,
10040 &4*-3,4*-5,4*-7,-11,-13,-15,-17,1,2,3,4,5,6,7,8,11,13,15,17,21,
10041 &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,
10042 &35,4*-1,4*-3,4*-5,4*-7,-11,-13,-15,-17,3*24,1,2,3,4,5,6,7,8,11,
10043 &13,15,17,21,2*22,23,24,23,25,36,1,2,3,4,5,6,7,8,11,13,15,17,21,
10044 &2*22,23,24,23,-1,-3,-5,-7,-11,-13,-15,-17,24,5,6,21,2,1,2,3,4,5,
10045 &6,11,13,15,82,-11,-13,2*2,-12,-14,-16,2*-2,2*-4,-2,-4,2*89,37,
10046 &2*-89,2*5,-37,2*89,4*-1,4*-3,4*-5,4*-7,-11,-13,-15,-17,-13,130,
10047 &310,-13,3*211,12,14,11*-11,11*-13,-311,-313,-311,-313,-20313,
10048 &2*-311,-313,-311,-313,2*111,2*221,2*331,2*113,2*223,2*333,-311,
10049 &-313,2*-321,211,-311,-321,333,-311,-313,-321,211,2*-321,2*-311,
10050 &-321,211,113,8*-11,8*-13,-321,-323,-321,-323,-311,2*-313,-311,
10051 &-313,2*-311,-321,-10323,-321,-323,-321,-311,2*-313,211,111,333,
10052 &3*-321,-311,-313,-321,-313,310,333,211,2*-321,-311,-313,-311,211,
10053 &-321,3*-311,211,113,321,-15,5*-11,5*-13,221,331,333,221,331,333/
10054 DATA (kfdp(i,1),i= 508, 924)/10221,211,213,211,213,321,323,321,
10055 &323,2212,221,331,333,221,2*2,6*12,6*14,2*16,3*-411,3*-413,2*-411,
10056 &2*-413,2*441,2*443,2*20443,2*2,2*4,2,4,6*12,6*14,2*16,3*-421,
10057 &3*-423,2*-421,2*-423,2*441,2*443,2*20443,2*2,2*4,2,4,6*12,6*14,
10058 &2*16,3*-431,3*-433,2*-431,2*-433,3*441,3*443,3*20443,2*2,2*4,2,4,
10059 &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,
10060 &2*-1,3*22,111,211,2*22,211,22,211,111,3*22,111,82,21,3*0,2*211,
10061 &321,3*311,2*321,421,2*411,2*421,431,511,521,531,541,211,111,13,
10062 &11,211,22,211,2*111,321,130,-213,113,213,211,22,111,11,13,82,11,
10063 &13,15,1,2,3,4,21,22,3*0,223,321,311,323,313,2*311,321,313,323,
10064 &321,423,2*413,2*423,413,523,2*513,2*523,2*513,523,223,213,113,
10065 &-213,313,-313,323,-323,82,21,3*0,221,321,2*311,321,421,2*411,421,
10066 &411,421,521,2*511,2*521,2*511,521,221,211,111,321,130,310,211,
10067 &111,321,130,310,443,82,553,21,3*0,113,213,323,2*313,323,423,
10068 &2*413,2*423,413,523,2*513,2*523,2*513,523,213,-213,10211,10111,
10069 &-10211,2*221,213,2*113,-213,2*321,2*311,313,-313,323,-323,443,82,
10070 &553,21,3*0,213,113,221,223,321,211,321,311,323,313,323,313,321,
10071 &4*311,321,313,323,313,323,311,4*321,421,411,423,413,423,413,421,
10072 &2*411,421,413,423,413,423,411,2*421,411,423,413,521,511,523,513,
10073 &523,513,521,2*511,521,513,523,513,523,511,2*521,511,523,513,511/
10074 DATA (kfdp(i,1),i= 925,2000)/521,513,523,213,-213,221,223,321,
10075 &130,310,111,211,111,2*211,321,130,310,221,111,321,130,310,221,
10076 &211,111,443,82,553,21,3*0,111,211,-12,12,-14,14,211,111,211,111,
10077 &11,13,82,4*443,10441,20443,445,441,11,13,15,1,2,3,4,21,22,2*553,
10078 &10551,20553,555,2212,2*2112,-12,7*-11,7*-13,2*2224,2*2212,2*2214,
10079 &2*3122,2*3212,2*3214,5*3222,4*3224,2*3322,3324,2*2224,7*2212,
10080 &5*2214,2*2112,2*2114,2*3122,2*3212,2*3214,2*3222,2*3224,4*2,3,
10081 &2*2,1,2*2,2*0,-12,-14,-16,5*4122,441,443,20443,2*-2,2*-4,-2,-4,
10082 &2*0,2112,-12,3122,2212,2112,2212,3*3122,3*4122,4132,4232,0,
10083 &3*5122,5132,5232,0,2112,2212,2*2112,2212,2112,2*2212,3122,3212,
10084 &3112,3122,3222,3112,3122,3222,3212,3322,3312,3322,3312,3122,3322,
10085 &3312,-12,3*4122,2*4132,2*4232,4332,3*5122,5132,5232,5332,847*0/
10086 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,
10087 &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,
10088 &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,
10089 &-211,-213,-211,-213,-211,-213,3*-211,-321,-323,-321,-323,3*-321,
10090 &4*-211,-213,-211,-213,-211,-213,-211,-213,-211,-213,6*-211,2*15,
10091 &16,15,16,15,18,2*17,18,17,2*18,2*17,-1,-2,-3,-4,-5,-6,-7,-8,21,
10092 &-1,-2,-3,-4,-5,-6,-7,-8,-11,-13,-15,-17,-1,-2,-3,-4,-5,-6,-7,-8,
10093 &-11,-12,-13,-14,-15,-16,-17,-18,2,4,6,8,2,4,6,8,2,4,6,8,2,4,6,8,
10094 &12,14,16,18,-1,-2,-3,-4,-5,-6,-7,-8,-11,-13,-15,-17,21,22,2*23,
10095 &-24,-1,-2,-3,-4,-5,-6,-7,-8,-11,-12,-13,-14,-15,-16,-17,-18,-24,
10096 &-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,
10097 &25,-1,-2,-3,-4,-5,-6,-7,-8,-11,-13,-15,-17,21,22,2*23,-24,2*25,
10098 &36,-1,-2,-3,-4,-5,-6,-7,-8,-11,-13,-15,-17,21,22,2*23,-24,25,2,4,
10099 &6,8,12,14,16,18,25,-5,-6,21,11,-3,-4,-5,-6,-7,-8,-13,-15,-17,-82,
10100 &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,
10101 &4,6,8,2,4,6,8,2,4,6,8,12,14,16,18,14,2*0,14,111,211,111,-11,-13,
10102 &11*12,11*14,2*211,2*213,211,20213,2*321,2*323,211,213,211,213,
10103 &211,213,211,213,211,213,211,213,3*211,213,211,2*321,8*211,2*113,
10104 &2*211,8*12,8*14,2*211,2*213,2*111,221,2*113,223,333,20213,211,
10105 &2*321,323,2*311,313,-211,111,113,2*211,321,2*211,311,321,310,211/
10106 DATA (kfdp(i,2),i= 477, 857)/-211,4*211,321,4*211,113,2*211,-321,
10107 &16,5*12,5*14,3*211,3*213,211,2*111,2*113,2*-311,2*-313,-2112,
10108 &3*321,323,2*-1,6*-11,6*-13,2*-15,211,213,20213,211,213,20213,431,
10109 &433,431,433,311,313,311,313,311,313,-1,-4,-3,-4,-1,-3,6*-11,
10110 &6*-13,2*-15,211,213,20213,211,213,20213,431,433,431,433,321,323,
10111 &321,323,321,323,-1,-4,-3,-4,-1,-3,6*-11,6*-13,2*-15,211,213,
10112 &20213,211,213,20213,431,433,431,433,221,331,333,221,331,333,221,
10113 &331,333,-1,-4,-3,-4,-1,-3,-15,-3,-1,2*-11,2*-13,2*-15,-1,-4,-3,
10114 &-4,-3,-4,-1,-4,2*12,2*14,2,3,2,3,2*12,2*14,2,1,22,11,22,111,-211,
10115 &211,11,-211,13,-211,111,113,223,22,111,-82,21,3*0,111,22,-211,
10116 &111,22,211,111,22,211,111,22,111,6*22,-211,22,-13,-11,-211,111,
10117 &-211,2*111,-321,310,211,111,2*-211,221,22,-11,-13,-82,-11,-13,
10118 &-15,-1,-2,-3,-4,2*21,3*0,211,-213,113,-211,111,223,213,113,211,
10119 &111,223,211,111,-211,111,321,311,-211,111,211,111,-321,-311,411,
10120 &421,111,-211,111,211,-311,311,-321,321,-82,21,3*0,211,-211,111,
10121 &211,111,211,111,-211,111,311,321,-211,111,211,111,-321,-311,411,
10122 &421,111,-211,111,-321,130,310,-211,111,-321,130,310,22,-82,22,21,
10123 &3*0,211,111,-211,111,211,111,211,111,-211,111,321,311,-211,111,
10124 &211,111,-321,-311,411,421,-211,211,-211,111,2*211,111,-211,211,
10125 &111,211,-321,2*-311,-321,-311,311,-321,321,22,-82,22,21,3*0,111/
10126 DATA (kfdp(i,2),i= 858,2000)/3*211,-311,22,-211,111,-211,111,
10127 &-211,211,-213,113,223,221,211,111,211,111,2*211,213,113,223,221,
10128 &22,211,111,211,111,4*211,-211,111,-211,111,-211,211,-211,211,321,
10129 &311,321,311,-211,111,-211,111,-211,211,-211,2*211,111,211,111,
10130 &4*211,-321,-311,-321,-311,411,421,411,421,-211,211,111,211,-321,
10131 &130,310,22,-211,111,2*-211,-321,130,310,221,111,-321,130,310,221,
10132 &-211,111,22,-82,22,21,3*0,111,-211,11,-11,13,-13,-211,111,-211,
10133 &111,-11,-13,-82,211,111,221,111,4*22,-11,-13,-15,-1,-2,-3,-4,
10134 &2*21,211,111,3*22,-211,111,22,11,7*12,7*14,-321,-323,-311,-313,
10135 &-311,-313,211,213,211,213,211,213,111,221,331,113,223,111,221,
10136 &113,223,321,323,321,-211,-213,111,221,331,113,223,333,10221,111,
10137 &221,331,113,223,211,213,211,213,321,323,321,323,321,323,311,313,
10138 &311,313,2*-1,-3,-1,2203,3201,3203,2203,2101,2103,2*0,11,13,15,
10139 &-211,-213,-20213,-431,-433,3*3122,1,4,3,4,1,3,2*0,-211,11,22,111,
10140 &211,22,-211,111,22,-211,111,211,2*22,0,-211,111,211,2*22,0,
10141 &2*-211,111,22,111,211,22,211,2*-211,2*111,-211,2*211,111,211,
10142 &-211,2*111,211,-321,-211,111,11,-211,111,211,111,22,111,2*22,
10143 &-211,111,211,3*22,847*0/
10144 DATA (kfdp(i,3),i= 1, 944)/75*0,14,6*0,2*16,2*0,5*111,310,130,
10145 &2*0,2*111,310,130,321,113,211,223,221,2*113,2*211,2*223,2*221,
10146 &2*113,221,113,2*213,-213,195*0,4*3,4*4,1,4,3,2*2,10*81,25*0,-211,
10147 &3*111,-311,-313,-311,-321,-313,-323,111,221,331,113,223,-311,
10148 &-313,-311,-321,-313,-323,111,221,331,113,223,22*0,111,113,2*211,
10149 &-211,-311,211,111,3*211,-211,7*211,-321,-323,-311,-321,-313,-323,
10150 &-211,-213,-321,-323,-311,-321,-313,-323,-211,-213,22*0,111,113,
10151 &-311,2*-211,211,-211,310,-211,2*111,211,2*-211,-321,-211,2*211,
10152 &-211,111,-211,2*211,0,221,331,333,321,311,221,331,333,321,311,
10153 &20*0,3,0,-411,-413,-10413,-10411,-20413,-415,-411,-413,-10413,
10154 &-10411,-20413,-415,-411,-413,16*0,-4,-1,-4,-3,2*-2,-421,-423,
10155 &-10423,-10421,-20423,-425,-421,-423,-10423,-10421,-20423,-425,
10156 &-421,-423,16*0,-4,-1,-4,-3,2*-2,-431,-433,-10433,-10431,-20433,
10157 &-435,-431,-433,-10433,-10431,-20433,-435,-431,-433,19*0,-4,-1,-4,
10158 &-3,2*-2,3*0,441,443,441,443,441,443,-4,-1,-4,-3,-4,-3,-4,-1,531,
10159 &533,531,533,3,2,3,2,511,513,511,513,1,2,0,-11,0,2*111,-211,-11,
10160 &11,-13,2*221,3*0,111,27*0,111,2*0,22,111,5*0,111,12*0,2*21,103*0,
10161 &-211,2*111,-211,3*111,-211,111,211,14*0,111,6*0,111,-211,8*0,111,
10162 &-211,9*0,111,-211,111,-211,4*0,111,-211,111,-211,8*0,111,-211,
10163 &111,-211,4*0,111,-211,111,-211,11*0,-211,6*0,111,211,4*0,111/
10164 DATA (kfdp(i,3),i= 945,2000)/13*0,2*111,211,-211,211,-211,7*0,
10165 &-211,111,13*0,2*21,-211,111,6*0,2212,3122,3212,3214,2112,2114,
10166 &2212,2112,3122,3212,3214,2112,2114,2212,2112,52*0,3*3,1,8*0,
10167 &3*4122,8*0,4,1,4,3,2*2,3*0,2112,43*0,3322,861*0/
10168 DATA (kfdp(i,4),i= 1,2000)/88*0,3*111,8*0,-211,0,-211,3*0,111,
10169 &2*-211,0,111,0,2*111,113,221,111,-213,-211,211,195*0,13*81,41*0,
10170 &111,211,111,211,7*0,111,211,111,211,35*0,2*-211,2*111,211,111,
10171 &-211,2*211,2*-211,2*0,-211,111,-211,111,4*0,-211,111,-211,111,
10172 &34*0,111,-211,3*111,3*-211,2*111,3*-211,4*0,-321,-311,3*0,-321,
10173 &-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,
10174 &2*-5,7*0,-11,264*0,111,-211,4*0,111,57*0,-211,111,5*0,-211,111,
10175 &52*0,2101,2103,2*2101,19*0,6*2101,909*0/
10176 DATA (kfdp(i,5),i= 1,2000)/90*0,111,16*0,111,7*0,111,0,2*111,
10177 &303*0,-211,2*111,-211,111,-211,111,54*0,111,-211,3*111,-211,111,
10181 DATA (chaf(i) ,i= 1, 281)/
'd',
'u',
's',
'c',
'b',
't',
'l',
'h',
10182 &2*
' ',
'e',
'nu_e',
'mu',
'nu_mu',
'tau',
'nu_tau',
'chi',
'nu_chi',
10183 &2*
' ',
'g',
'gamma',
'Z',
'W',
'H',2*
' ',
'reggeon',
'pomeron',2*
' ',
10184 &
'Z''',
'Z"',
'W''',
'H''',
'A',
'H',
'eta_tech',
'LQ_ue',
'R',40*
' ',
10185 &
'specflav',
'rndmflav',
'phasespa',
'c-hadron',
'b-hadron',
10186 &
't-hadron',
'l-hadron',
'h-hadron',
'Wvirt',
'diquark',
'cluster',
10187 &
'string',
'indep.',
'CMshower',
'SPHEaxis',
'THRUaxis',
'CLUSjet',
10188 &
'CELLjet',
'table',
' ',
'pi',2*
'K',2*
'D',
'D_s',2*
'B',
'B_s',
'B_c',
10189 &
'pi',
'eta',
'eta''',
'eta_c',
'eta_b',
'eta_t',
'eta_l',
'eta_h',2*
' ',
10190 &
'rho',2*
'K*',2*
'D*',
'D*_s',2*
'B*',
'B*_s',
'B*_c',
'rho',
'omega',
10191 &
'phi',
'J/psi',
'Upsilon',
'Theta',
'Theta_l',
'Theta_h',2*
' ',
'b_1',
10192 &2*
'K_1',2*
'D_1',
'D_1s',2*
'B_1',
'B_1s',
'B_1c',
'b_1',
'h_1',
'h''_1',
10193 &
'h_1c',
'h_1b',
'h_1t',
'h_1l',
'h_1h',2*
' ',
'a_0',2*
'K*_0',2*
'D*_0',
10194 &
'D*_0s',2*
'B*_0',
'B*_0s',
'B*_0c',
'a_0',
'f_0',
'f''_0',
'chi_0c',
10195 &
'chi_0b',
'chi_0t',
'chi_0l',
'chi_0h',2*
' ',
'a_1',2*
'K*_1',
10196 &2*
'D*_1',
'D*_1s',2*
'B*_1',
'B*_1s',
'B*_1c',
'a_1',
'f_1',
'f''_1',
10197 &
'chi_1c',
'chi_1b',
'chi_1t',
'chi_1l',
'chi_1h',2*
' ',
'a_2',
10198 &2*
'K*_2',2*
'D*_2',
'D*_2s',2*
'B*_2',
'B*_2s',
'B*_2c',
'a_2',
'f_2',
10199 &
'f''_2',
'chi_2c',
'chi_2b',
'chi_2t',
'chi_2l',
'chi_2h',2*
' ',
'K_L',
10200 &
'K_S',8*
' ',
'psi''',3*
' ',
'Upsilon''',45*
' ',
'pi_diffr'/
10201 DATA (chaf(i) ,i= 282, 500)/
'n_diffr',
'p_diffr',
'rho_diff',
10202 &
'omega_di',
'phi_diff',
'J/psi_di',18*
' ',
'Lambda',5*
' ',
10203 &
'Lambda_c',
' ',2*
'Xi_c',6*
' ',
'Lambda_b',
' ',2*
'Xi_b',6*
' ',
'n',
10204 &
'p',
' ',3*
'Sigma',2*
'Xi',
' ',3*
'Sigma_c',2*
'Xi''_c',
'Omega_c',
10205 &4*
' ',3*
'Sigma_b',2*
'Xi''_b',
'Omega_b',4*
' ',4*
'Delta',
10206 &3*
'Sigma*',2*
'Xi*',
'Omega',3*
'Sigma*_c',2*
'Xi*_c',
'Omega*_c',
10207 &4*
' ',3*
'Sigma*_b',2*
'Xi*_b',
'Omega*_b',114*
' '/
10210 DATA mrlu/19780503,0,0,97,33,0/
10236 common/lujets/
n,k(4000,5),
p(4000,5),v(4000,5)
10237 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
10238 SAVE /lujets/,/ludat1/
10242 ndecay=itau+iorig+kforig
10243 WRITE(mstu(11),5000)
10244 IF(
rlu(0).LT.10.) stop
10247 5000
FORMAT(1
x,
'Error: you did not link your LUTAUD routine ',
10248 &
'correctly.'/1
x,
'Dummy routine in JETSET file called instead.'/
10249 &1
x,
'Execution stopped!')