11 IMPLICIT DOUBLE PRECISION(a-
h, o-
z)
15 parameter(ksusy1=1000000,ksusy2=2000000,ktechn=3000000,
16 &kexcit=4000000,kdimen=5000000)
19 common/
pydat1/mstu(200),paru(200),mstj(200),parj(200)
20 common/
pydat2/kchg(500,4),pmas(500,4),parf(2000),vckm(4,4)
23 dimension sm(3,3),sv(3,3)
34 IF(
k(
i,1).LE.0.OR.
k(
i,1).GT.10) goto 140
35 IF(mstu(41).GE.2)
THEN
37 IF(kc.EQ.0.OR.kc.EQ.12.OR.kc.EQ.14.OR.kc.EQ.16.OR.
38 & kc.EQ.18.OR.
k(
i,2).EQ.ksusy1+22.OR.
k(
i,2).EQ.39.OR.
39 &
k(
i,2).EQ.ksusy1+39) goto 140
40 IF(mstu(41).GE.3.AND.kchg(kc,2).EQ.0.AND.
pychge(
k(
i,2)).EQ.0)
44 pa=sqrt(
p(
i,1)**2+
p(
i,2)**2+
p(
i,3)**2)
46 IF(abs(paru(41)-2d0).GT.0.001d0) pwt=
47 &
max(1d-10,pa)**(paru(41)-2d0)
50 sm(j1,j2)=sm(j1,j2)+pwt*
p(
i,j1)*
p(
i,j2)
58 CALL
pyerrm(8,
'(PYSPHE:) too few particles for analysis')
65 sm(j1,j2)=sm(j1,j2)/
ps
70 sq=(sm(1,1)*sm(2,2)+sm(1,1)*sm(3,3)+sm(2,2)*sm(3,3)-
71 &sm(1,2)**2-sm(1,3)**2-sm(2,3)**2)/3d0-1d0/9d0
72 sr=-0.5d0*(sq+1d0/9d0+sm(1,1)*sm(2,3)**2+sm(2,2)*sm(1,3)**2+
73 &sm(3,3)*sm(1,2)**2-sm(1,1)*sm(2,2)*sm(3,3))+
74 &sm(1,2)*sm(1,3)*sm(2,3)+1d0/27d0
75 sp=cos(acos(
max(min(sr/sqrt(-sq**3),1d0),-1d0))/3d0)
76 p(
n+1,4)=1d0/3d0+sqrt(-sq)*
max(2d0*
sp,sqrt(3d0*(1d0-
sp**2))-
sp)
77 p(
n+3,4)=1d0/3d0+sqrt(-sq)*min(2d0*
sp,-sqrt(3d0*(1d0-
sp**2))-
sp)
78 p(
n+2,4)=1d0-
p(
n+1,4)-
p(
n+3,4)
79 IF(
p(
n+2,4).LT.1d-5)
THEN
80 CALL
pyerrm(8,
'(PYSPHE:) all particles back-to-back')
89 sv(j1,j1)=sm(j1,j1)-
p(
n+
i,4)
98 IF(abs(sv(j1,j2)).LE.smax) goto 190
107 rl=sv(j1,jb)/sv(ja,jb)
109 sv(j1,j2)=sv(j1,j2)-rl*sv(ja,j2)
110 IF(abs(sv(j1,j2)).LE.smax) goto 210
116 jb2=jb+2-3*((jb+1)/3)
117 p(
n+
i,jb1)=-sv(jc,jb2)
118 p(
n+
i,jb2)=sv(jc,jb1)
119 p(
n+
i,jb)=-(sv(ja,jb1)*
p(
n+
i,jb1)+sv(ja,jb2)*
p(
n+
i,jb2))/
121 pa=sqrt(
p(
n+
i,1)**2+
p(
n+
i,2)**2+
p(
n+
i,3)**2)
122 sgn=(-1d0)**int(
pyr(0)+0.5d0)
129 sgn=(-1d0)**int(
pyr(0)+0.5d0)
130 p(
n+2,1)=sgn*(
p(
n+1,2)*
p(
n+3,3)-
p(
n+1,3)*
p(
n+3,2))
131 p(
n+2,2)=sgn*(
p(
n+1,3)*
p(
n+3,1)-
p(
n+1,1)*
p(
n+3,3))
132 p(
n+2,3)=sgn*(
p(
n+1,1)*
p(
n+3,2)-
p(
n+1,2)*
p(
n+3,1))
146 sph=1.5d0*(
p(
n+2,4)+
p(
n+3,4))
150 IF(mstu(43).LE.1) mstu(3)=3
151 IF(mstu(43).GE.2)
n=
n+3