4 SUBROUTINE lu3ent(IP,KF1,KF2,KF3,PECM,X1,X3)
9 common/lujets/
n,
k(9000,5),
p(9000,5),
v(9000,5)
11 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
13 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
18 IF(mstu(12).GE.1) CALL
lulist(0)
20 IF(ipa.GT.mstu(4)-2) CALL
luerrm(21,
21 &
'(LU3ENT:) writing outside LUJETS memory')
25 IF(kc1.EQ.0.OR.kc2.EQ.0.OR.kc3.EQ.0) CALL
luerrm(12,
26 &
'(LU3ENT:) unknown flavour code')
30 IF(mstu(10).EQ.1) pm1=
p(ipa,5)
31 IF(mstu(10).GE.2) pm1=
ulmass(kf1)
33 IF(mstu(10).EQ.1) pm2=
p(ipa+1,5)
34 IF(mstu(10).GE.2) pm2=
ulmass(kf2)
36 IF(mstu(10).EQ.1) pm3=
p(ipa+2,5)
37 IF(mstu(10).GE.2) pm3=
ulmass(kf3)
45 kq1=kchg(kc1,2)*isign(1,kf1)
46 kq2=kchg(kc2,2)*isign(1,kf2)
47 kq3=kchg(kc3,2)*isign(1,kf3)
48 IF(kq1.EQ.0.AND.kq2.EQ.0.AND.kq3.EQ.0)
THEN
49 ELSEIF(kq1.NE.0.AND.kq2.EQ.2.AND.(kq1+kq3.EQ.0.OR.kq1+kq3.EQ.4))
52 CALL
luerrm(2,
'(LU3ENT:) unphysical flavour combination')
61 IF(kq1.NE.0.AND.(kq2.NE.0.OR.kq3.NE.0))
k(ipa,1)=2
63 IF(kq2.NE.0.AND.kq3.NE.0)
k(ipa+1,1)=2
68 IF(kq1.EQ.0.OR.kq2.EQ.0.OR.kq3.EQ.0) CALL
luerrm(2,
69 &
'(LU3ENT:) requested flavours can not develop parton shower')
75 k(ipa,kcs)=mstu(5)*(ipa+1)
76 k(ipa,9-kcs)=mstu(5)*(ipa+2)
77 k(ipa+1,kcs)=mstu(5)*(ipa+2)
78 k(ipa+1,9-kcs)=mstu(5)*ipa
79 k(ipa+2,kcs)=mstu(5)*ipa
80 k(ipa+2,9-kcs)=mstu(5)*(ipa+1)
85 IF(0.5*x1*pecm.LE.pm1.OR.0.5*(2.-x1-
x3)*pecm.LE.pm2.OR.
86 &0.5*
x3*pecm.LE.pm3) mkerr=1
87 pa1=sqrt(
max(0.,(0.5*x1*pecm)**2-pm1**2))
88 pa2=sqrt(
max(0.,(0.5*(2.-x1-
x3)*pecm)**2-pm2**2))
89 pa3=sqrt(
max(0.,(0.5*
x3*pecm)**2-pm3**2))
90 cthe2=(pa3**2-pa1**2-pa2**2)/(2.*pa1*pa2)
91 cthe3=(pa2**2-pa1**2-pa3**2)/(2.*pa1*pa3)
92 IF(abs(cthe2).GE.1.001.OR.abs(cthe3).GE.1.001) mkerr=1
93 cthe3=
max(-1.,
min(1.,cthe3))
94 IF(mkerr.NE.0) CALL
luerrm(13,
95 &
'(LU3ENT:) unphysical kinematical variable setup')
99 p(ipa,4)=sqrt(pa1**2+pm1**2)
101 p(ipa+2,1)=pa3*sqrt(1.-cthe3**2)
103 p(ipa+2,4)=sqrt(pa3**2+pm3**2)
105 p(ipa+1,1)=-
p(ipa+2,1)
106 p(ipa+1,3)=-
p(ipa,3)-
p(ipa+2,3)
107 p(ipa+1,4)=sqrt(
p(ipa+1,1)**2+
p(ipa+1,3)**2+pm2**2)