9 SUBROUTINE py3ent(IP,KF1,KF2,KF3,PECM,X1,X3)
12 IMPLICIT DOUBLE PRECISION(a-
h, o-
z)
17 common/
pydat1/mstu(200),paru(200),mstj(200),parj(200)
18 common/
pydat2/kchg(500,4),pmas(500,4),parf(2000),vckm(4,4)
23 IF(mstu(12).NE.12345) CALL
pylist(0)
25 IF(ipa.GT.mstu(4)-2) CALL
pyerrm(21,
26 &
'(PY3ENT:) writing outside PYJETS memory')
30 IF(kc1.EQ.0.OR.kc2.EQ.0.OR.kc3.EQ.0) CALL
pyerrm(12,
31 &
'(PY3ENT:) unknown flavour code')
35 IF(mstu(10).EQ.1) pm1=
p(ipa,5)
36 IF(mstu(10).GE.2) pm1=
pymass(kf1)
38 IF(mstu(10).EQ.1) pm2=
p(ipa+1,5)
39 IF(mstu(10).GE.2) pm2=
pymass(kf2)
41 IF(mstu(10).EQ.1) pm3=
p(ipa+2,5)
42 IF(mstu(10).GE.2) pm3=
pymass(kf3)
52 kq1=kchg(kc1,2)*isign(1,kf1)
53 kq2=kchg(kc2,2)*isign(1,kf2)
54 kq3=kchg(kc3,2)*isign(1,kf3)
55 IF(mstu(19).EQ.1)
THEN
57 ELSEIF(kq1.EQ.0.AND.kq2.EQ.0.AND.kq3.EQ.0)
THEN
58 ELSEIF(kq1.NE.0.AND.kq2.EQ.2.AND.(kq1+kq3.EQ.0.OR.
61 CALL
pyerrm(2,
'(PY3ENT:) unphysical flavour combination')
70 IF(kq1.NE.0.AND.(kq2.NE.0.OR.kq3.NE.0))
k(ipa,1)=2
72 IF(kq2.NE.0.AND.kq3.NE.0)
k(ipa+1,1)=2
82 k(ipa,kcs)=mstu(5)*(ipa+1)
83 k(ipa,9-kcs)=mstu(5)*(ipa+2)
84 k(ipa+1,kcs)=mstu(5)*(ipa+2)
85 k(ipa+1,9-kcs)=mstu(5)*ipa
86 k(ipa+2,kcs)=mstu(5)*ipa
87 k(ipa+2,9-kcs)=mstu(5)*(ipa+1)
92 IF(0.5d0*x1*pecm.LE.pm1.OR.0.5d0*(2d0-x1-x3)*pecm.LE.pm2.OR.
93 &0.5d0*x3*pecm.LE.pm3) mkerr=1
94 pa1=sqrt(
max(1d-10,(0.5d0*x1*pecm)**2-pm1**2))
95 pa2=sqrt(
max(1d-10,(0.5d0*(2d0-x1-x3)*pecm)**2-pm2**2))
96 pa3=sqrt(
max(1d-10,(0.5d0*x3*pecm)**2-pm3**2))
97 cthe2=(pa3**2-pa1**2-pa2**2)/(2d0*pa1*pa2)
98 cthe3=(pa2**2-pa1**2-pa3**2)/(2d0*pa1*pa3)
99 IF(abs(cthe2).GE.1.001d0.OR.abs(cthe3).GE.1.001d0) mkerr=1
100 cthe3=
max(-1d0,min(1d0,cthe3))
101 IF(mkerr.NE.0) CALL
pyerrm(13,
102 &
'(PY3ENT:) unphysical kinematical variable setup')
106 p(ipa,4)=sqrt(pa1**2+pm1**2)
108 p(ipa+2,1)=pa3*sqrt(1d0-cthe3**2)
110 p(ipa+2,4)=sqrt(pa3**2+pm3**2)
112 p(ipa+1,1)=-
p(ipa+2,1)
113 p(ipa+1,3)=-
p(ipa,3)-
p(ipa+2,3)
114 p(ipa+1,4)=sqrt(
p(ipa+1,1)**2+
p(ipa+1,3)**2+pm2**2)