10 IMPLICIT DOUBLE PRECISION(a-
h, o-
z)
14 parameter(ksusy1=1000000,ksusy2=2000000,ktechn=3000000,
15 &kexcit=4000000,kdimen=5000000)
18 common/
pydat1/mstu(200),paru(200),mstj(200),parj(200)
19 common/
pydat2/kchg(500,4),pmas(500,4),parf(2000),vckm(4,4)
23 SAVE nsav,
np,
ps,pss,rinit,npre,nrem
34 IF(mstu(48).LE.0)
THEN
43 IF(mstu(43).GE.2)
n=
n-njet
45 p(
i,5)=sqrt(
p(
i,1)**2+
p(
i,2)**2+
p(
i,3)**2)
47 IF(mstu(46).LE.3.OR.mstu(46).EQ.5)
THEN
50 r2acc=paru(45)*
ps(5)**2
58 IF(
k(
i,1).LE.0.OR.
k(
i,1).GT.10) goto 140
59 IF(mstu(41).GE.2)
THEN
61 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
62 & kc.EQ.18.OR.
k(
i,2).EQ.ksusy1+22.OR.
k(
i,2).EQ.39.OR.
63 &
k(
i,2).EQ.ksusy1+39) goto 140
64 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
pychge(
k(
i,2)).EQ.0)
67 IF(
n+2*
np.GE.mstu(4)-mstu(32)-5)
THEN
68 CALL
pyerrm(11,
'(PYCLUS:) no more memory left in PYJETS')
79 IF(mstu(42).EQ.0)
p(
n+
np,5)=0d0
80 IF(mstu(42).EQ.1.AND.
k(
i,2).NE.22)
p(
n+
np,5)=pimass
97 IF(
np.LT.mstu(47))
THEN
98 CALL
pyerrm(8,
'(PYCLUS:) too few particles for analysis')
105 IF(mstu(46).LE.3.OR.mstu(46).EQ.5)
THEN
108 r2acc=paru(45)*
ps(5)**2
110 rinit=1.25d0*paru(43)
111 IF(
np.LE.mstu(47)+2) rinit=0d0
112 170 rinit=0.8d0*rinit
120 IF(mstu(46).LE.2)
THEN
125 IF(
p(
i,5).GT.2d0*rinit) goto 210
132 p(
n+1,5)=sqrt(
p(
n+1,1)**2+
p(
n+1,2)**2+
p(
n+1,3)**2)
133 IF(
p(
n+1,5).GT.2d0*rinit) npre=1
134 IF(rinit.GE.0.2d0*paru(43).AND.npre+nrem.LT.mstu(47)) goto 170
135 IF(nrem.EQ.0) goto 170
142 IF(
k(
i,4).NE.0.OR.
p(
i,5).LE.pmax) goto 230
147 p(
n+npre,
j)=
p(imax,
j)
153 IF(mstu(46).LE.2)
THEN
155 IF(
k(
i,4).NE.0) goto 260
157 IF(
r2.GT.rinit**2) goto 260
164 p(
n+npre,5)=sqrt(
p(
n+npre,1)**2+
p(
n+npre,2)**2+
p(
n+npre,3)**2)
172 IF(
k(
i,4).NE.0) goto 280
173 IF(mstu(46).LE.4)
THEN
178 IF(
r2.GE.r2min) goto 280
186 p(
n+npre,5)=sqrt(
p(
n+npre,1)**2+
p(
n+npre,2)**2+
p(
n+npre,3)**2)
194 IF(rinit.GE.0.2d0*paru(43).AND.npre+nrem.LT.mstu(47)) goto 170
195 IF(nrem.GT.0) goto 220
201 310
IF(mstu(46).LE.1)
THEN
209 DO 340 ijet=
n+1,
n+njet
210 IF(
p(ijet,5).LT.rinit) goto 340
212 IF(
r2.GE.r2min) goto 340
226 p(
i,5)=sqrt(
p(
i,1)**2+
p(
i,2)**2+
p(
i,3)**2)
232 r2min=2d0*
max(r2acc,
ps(5)**2)
233 DO 400 itry1=
n+1,
n+njet-1
234 DO 390 itry2=itry1+1,
n+njet
235 IF(mstu(46).LE.2)
THEN
237 ELSEIF(mstu(46).LE.4)
THEN
242 IF(
r2.GE.r2min) goto 390
250 IF(njet.GT.mstu(47).AND.r2min.LT.r2acc)
THEN
251 irec=min(imin1,imin2)
252 idel=
max(imin1,imin2)
254 p(irec,
j)=
p(imin1,
j)+
p(imin2,
j)
256 p(irec,5)=sqrt(
p(irec,1)**2+
p(irec,2)**2+
p(irec,3)**2)
257 DO 430
i=idel+1,
n+njet
262 IF(mstu(46).GE.2)
THEN
265 IF(iori.EQ.idel)
k(
i,4)=irec-
n
266 IF(iori.GT.idel)
k(
i,4)=
k(
i,4)-1
273 ELSEIF(njet.EQ.mstu(47).AND.mstu(46).LE.1.AND.nloop.LE.2)
THEN
282 IF(
k(
i,5).EQ.0) iemp=
i
289 IF(
k(
n+
k(
i,4),5).LE.1.OR.
p(
i,5).LT.rinit) goto 480
292 IF(
r2.LE.r2max) goto 480
300 p(ijet,
j)=
p(ijet,
j)-
p(ispl,
j)
303 p(ijet,5)=sqrt(
p(ijet,1)**2+
p(ijet,2)**2+
p(ijet,3)**2)
304 IF(nloop.LE.2) goto 300
310 IF(mstu(46).LE.1.AND.nloop.LE.2.AND.psjt/pss.GT.tsav+paru(48))
322 DO 540 inew=
n+1,
n+njet
324 DO 520 itry=
n+1,
n+njet
325 IF(
v(itry,4).LE.pemax) goto 520
344 IF(
k(
k(
i,3),1).NE.3)
k(
k(
i,3),4)=iori-
n
345 k(iori,4)=
k(iori,4)+1
352 p(
i,5)=sqrt(
max(
p(
i,4)**2-
p(
i,5)**2,0d0))
356 IF(
k(
i,4).EQ.0) iemp=
i
366 IF(njet.LE.1) paru(63)=0d0
368 CALL
pyerrm(8,
'(PYCLUS:) failed to reconstruct as requested')
372 IF(mstu(43).LE.1) mstu(3)=
max(0,njet)
373 IF(mstu(43).GE.2)
n=
n+
max(0,njet)