8 SUBROUTINE py2ent(IP,KF1,KF2,PECM)
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)
22 IF(mstu(12).NE.12345) CALL
pylist(0)
24 IF(ipa.GT.mstu(4)-1) CALL
pyerrm(21,
25 &
'(PY2ENT:) writing outside PYJETS memory')
28 IF(kc1.EQ.0.OR.kc2.EQ.0) CALL
pyerrm(12,
29 &
'(PY2ENT:) unknown flavour code')
33 IF(mstu(10).EQ.1) pm1=
p(ipa,5)
34 IF(mstu(10).GE.2) pm1=
pymass(kf1)
36 IF(mstu(10).EQ.1) pm2=
p(ipa+1,5)
37 IF(mstu(10).GE.2) pm2=
pymass(kf2)
47 kq1=kchg(kc1,2)*isign(1,kf1)
48 kq2=kchg(kc2,2)*isign(1,kf2)
49 IF(mstu(19).EQ.1)
THEN
52 IF(kq1+kq2.NE.0.AND.kq1+kq2.NE.4) CALL
pyerrm(2,
53 &
'(PY2ENT:) unphysical flavour combination')
61 IF(kq1.NE.0.AND.kq2.NE.0)
k(ipa,1)=2
68 k(ipa,4)=mstu(5)*(ipa+1)
70 k(ipa+1,4)=mstu(5)*ipa
75 IF(pecm.LE.pm1+pm2) CALL
pyerrm(13,
76 &
'(PY2ENT:) energy smaller than sum of masses')
77 pa=sqrt(
max(0d0,(pecm**2-pm1**2-pm2**2)**2-(2d0*pm1*pm2)**2))/
80 p(ipa,4)=sqrt(pm1**2+pa**2)
83 p(ipa+1,4)=sqrt(pm2**2+pa**2)