8 SUBROUTINE py4jet(PMAX,IRAD,ICOM)
11 IMPLICIT DOUBLE PRECISION(a-
h, o-
z)
16 common/
pydat1/mstu(200),paru(200),mstj(200),parj(200)
19 dimension ijoin(2),ptot(4),
beta(3)
33 IF(
k(
i,1).LE.0.OR.
k(
i,1).GT.10) goto 100
35 IF((kfa.GE.1.AND.kfa.LE.6).OR.kfa.EQ.21)
THEN
36 IF(
k(
i,2).GT.0.AND.
k(
i,2).LE.6)
THEN
42 CALL
pyerrm(16,
'(PY4JET:) more than two quarks')
44 ELSEIF(
k(
i,2).LT.0)
THEN
50 CALL
pyerrm(16,
'(PY4JET:) more than two antiquarks')
58 CALL
pyerrm(16,
'(PY4JET:) more than two gluons')
65 IF(
i1.EQ.0.OR.
i2.EQ.0.OR.
i3.EQ.0.OR.
i4.EQ.0)
THEN
66 CALL
pyerrm(16,
'(PY4JET:) event contains too few partons')
69 CALL
pyerrm(6,
'(PY4JET:) partons arranged in wrong order')
73 IF(iabs(
k(
i3,2)).LT.10.AND.iabs(
k(
i4,2)).LT.10)
THEN
75 ELSEIF(
k(
i3,2).EQ.21.AND.
k(
i4,2).EQ.21)
THEN
78 CALL
pyerrm(16,
'(PY4JET:) second parton pair inconsistent')
85 ecm=sqrt(
max(0d0,ptot(4)**2-ptot(1)**2-ptot(2)**2-ptot(3)**2))
99 IF(w1.GT.
pyr(0)*(w1+w2))
THEN
115 wr=(w1+w2+w3+w4+w5+w6+w7+w8)*
pyr(0)
118 ELSEIF(w1+w2.GT.wr)
THEN
120 ELSEIF(w1+w2+w3.GT.wr)
THEN
122 ELSEIF(w1+w2+w3+w4.GT.wr)
THEN
124 ELSEIF(w1+w2+w3+w4+w5.GT.wr)
THEN
126 ELSEIF(w1+w2+w3+w4+w5+w6.GT.wr)
THEN
128 ELSEIF(w1+w2+w3+w4+w5+w6+w7.GT.wr)
THEN
147 CALL
pyrobo(nsav+1,nsav+6,0d0,-
phi,0d0,0d0,0d0)
149 CALL
pyrobo(nsav+1,nsav+6,-the,0d0,0d0,0d0,0d0)
161 IF(
k(nsav+1,2).EQ.
k(
i1,2))
THEN
172 pabs=sqrt(
max(0d0,(ecm**2-
p(
n+1,5)**2-
p(
n+2,5)**2)**2-
173 &(2d0*
p(
n+1,5)*
p(
n+2,5))**2))/(2d0*ecm)
175 p(
n+1,4)=sqrt(pabs**2+
p(
n+1,5)**2)
177 p(
n+2,4)=sqrt(pabs**2+
p(
n+2,5)**2)
183 IF(irad.EQ.0) mstj(41)=1
189 IF(pmax.LT.parj(82))
THEN
194 CALL
pyshow(nsav+1,-100,pqmax)