11 IMPLICIT DOUBLE PRECISION(a-
h, o-
z)
16 common/
pydat1/mstu(200),paru(200),mstj(200),parj(200)
17 common/
pydat2/kchg(500,4),pmas(500,4),parf(2000),vckm(4,4)
21 IF(mstu(12).NE.12345) CALL
pylist(0)
22 IF(kfl.LT.0.OR.kfl.GT.8)
THEN
23 CALL
pyerrm(16,
'(PYONIA:) called with unknown flavour code')
24 IF(mstu(21).GE.1)
RETURN
26 IF(ecm.LT.parj(127)+2.02d0*parf(101))
THEN
27 CALL
pyerrm(16,
'(PYONIA:) called with too small CM energy')
28 IF(mstu(21).GE.1)
RETURN
33 IF(mstj(115).GE.2)
THEN
35 CALL
py1ent(nc-1,11,0.5d0*ecm,0d0,0d0)
37 CALL
py1ent(nc,-11,0.5d0*ecm,paru(1),0d0)
41 IF(mstj(115).GE.3.AND.kflc.GE.5)
THEN
47 CALL
py1ent(nc,kf,ecm,0d0,0d0)
58 IF(x3.GE.1d0.OR.((1d0-x1)/(x2*x3))**2+((1d0-x2)/(x1*x3))**2+
59 &((1d0-x3)/(x1*x2))**2.LE.2d0*
pyr(0)) goto 100
62 IF(mstj(101).LE.4) CALL
py3ent(nc+1,21,21,21,ecm,x1,x3)
63 IF(mstj(101).GE.5) CALL
py3ent(-(nc+1),21,21,21,ecm,x1,x3)
67 IF(mstj(108).EQ.2.AND.(mstj(101).EQ.0.OR.mstj(101).EQ.1))
70 IF(mstu(111).EQ.2) paru(112)=parj(122)
72 IF(kflc.NE.0) qf=kchg(kflc,1)/3d0
73 rgam=7.2d0*qf**2*paru(101)/
pyalps(ecm**2)
76 IF(
pyr(0).GT.rgam/(1d0+rgam))
THEN
77 IF(1d0-
max(x1,x2,x3).LE.
max((parj(126)/ecm)**2,parj(125)))
79 IF(njet.EQ.2.AND.mstj(101).LE.4) CALL
py2ent(nc+1,21,21,ecm)
80 IF(njet.EQ.2.AND.mstj(101).GE.5) CALL
py2ent(-(nc+1),21,21,ecm)
84 IF(ecmc.LT.2d0*parj(127)) goto 100
89 IF(mstj(101).GE.5)
k(nc+2,4)=mstu(5)*(nc+3)
90 IF(mstj(101).GE.5)
k(nc+2,5)=mstu(5)*(nc+3)
91 IF(mstj(101).GE.5)
k(nc+3,4)=mstu(5)*(nc+2)
92 IF(mstj(101).GE.5)
k(nc+3,5)=mstu(5)*(nc+2)
94 IF(ecmc.LT.4d0*parj(127))
THEN
98 CALL
py1ent(nc+2,83,0.5d0*(x2+x3)*ecm,paru(1),0d0)
104 k(ip,3)=
k(ip,3)+(mstj(115)/2)+(kflc/5)*(mstj(115)/3)*(nc-1)
108 IF(mstj(106).EQ.1)
THEN
110 hf1=1d0-parj(131)*parj(132)
112 ct13=(x1*x3-2d0*x1-2d0*x3+2d0)/(x1*x3)
113 st13=sqrt(1d0-ct13**2)
114 sigl=0.5d0*x3**2*((1d0-x2)**2+(1d0-x3)**2)*st13**2
115 sigu=(x1*(1d0-x1))**2+(x2*(1d0-x2))**2+(x3*(1d0-x3))**2-sigl
117 sigi=(sigl*ct13/st13+0.5d0*x1*x3*(1d0-x2)**2*st13)/sq2
118 sigmax=(2d0*hf1+hf3)*abs(sigu)+2d0*(hf1+hf3)*abs(sigl)+2d0*(hf1+
119 & 2d0*hf3)*abs(sigt)+2d0*sq2*(hf1+2d0*hf3)*abs(sigi)
122 120 chi=paru(2)*
pyr(0)
131 c2phi=cos(2d0*(
phi-parj(134)))
132 s2phi=sin(2d0*(
phi-parj(134)))
133 sig=((1d0+cthe**2)*hf1+sthe**2*c2phi*hf3)*sigu+2d0*(sthe**2*hf1-
134 & sthe**2*c2phi*hf3)*sigl+2d0*(sthe**2*c2chi*hf1+((1d0+cthe**2)*
135 & c2chi*c2phi-2d0*cthe*s2chi*s2phi)*hf3)*sigt-
136 & 2d0*sq2*(2d0*sthe*cthe*cchi*hf1-2d0*sthe*
137 & (cthe*cchi*c2phi-schi*s2phi)*hf3)*sigi
138 IF(sig.LT.sigmax*
pyr(0)) goto 120
139 CALL
pyrobo(nc+1,
n,0d0,chi,0d0,0d0,0d0)
144 IF(mstj(101).GE.5.AND.njet.GE.2)
THEN
145 CALL
pyshow(nc+mk+1,-njet,ecmc)
147 IF(mstj(105).EQ.-1) mstj(14)=-1
148 IF(mstj(105).GE.0) mstu(28)=0
151 IF(mstj(105).GE.0.AND.mstu(28).NE.0) goto 100
155 IF(mstj(105).EQ.1) CALL
pyexec