4 SUBROUTINE lu4ent(IP,KF1,KF2,KF3,KF4,PECM,X1,X2,X4,X12,X14)
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)-3) CALL
luerrm(21,
21 &
'(LU4ENT:) writing outside LUJETS momory')
26 IF(kc1.EQ.0.OR.kc2.EQ.0.OR.kc3.EQ.0.OR.kc4.EQ.0) CALL
luerrm(12,
27 &
'(LU4ENT:) unknown flavour code')
31 IF(mstu(10).EQ.1) pm1=
p(ipa,5)
32 IF(mstu(10).GE.2) pm1=
ulmass(kf1)
34 IF(mstu(10).EQ.1) pm2=
p(ipa+1,5)
35 IF(mstu(10).GE.2) pm2=
ulmass(kf2)
37 IF(mstu(10).EQ.1) pm3=
p(ipa+2,5)
38 IF(mstu(10).GE.2) pm3=
ulmass(kf3)
40 IF(mstu(10).EQ.1) pm4=
p(ipa+3,5)
41 IF(mstu(10).GE.2) pm4=
ulmass(kf4)
49 kq1=kchg(kc1,2)*isign(1,kf1)
50 kq2=kchg(kc2,2)*isign(1,kf2)
51 kq3=kchg(kc3,2)*isign(1,kf3)
52 kq4=kchg(kc4,2)*isign(1,kf4)
53 IF(kq1.EQ.0.AND.kq2.EQ.0.AND.kq3.EQ.0.AND.kq4.EQ.0)
THEN
54 ELSEIF(kq1.NE.0.AND.kq2.EQ.2.AND.kq3.EQ.2.AND.(kq1+kq4.EQ.0.OR.
56 ELSEIF(kq1.NE.0.AND.kq1+kq2.EQ.0.AND.kq3.NE.0.AND.kq3+kq4.EQ.0.)
59 CALL
luerrm(2,
'(LU4ENT:) unphysical flavour combination')
69 IF(kq1.NE.0.AND.(kq2.NE.0.OR.kq3.NE.0.OR.kq4.NE.0))
k(ipa,1)=2
71 IF(kq2.NE.0.AND.kq1+kq2.NE.0.AND.(kq3.NE.0.OR.kq4.NE.0))
74 IF(kq3.NE.0.AND.kq4.NE.0)
k(ipa+2,1)=2
79 ELSEIF(kq1+kq2.NE.0)
THEN
80 IF(kq1.EQ.0.OR.kq2.EQ.0.OR.kq3.EQ.0.OR.kq4.EQ.0) CALL
luerrm(2,
81 &
'(LU4ENT:) requested flavours can not develop parton shower')
88 k(ipa,kcs)=mstu(5)*(ipa+1)
89 k(ipa,9-kcs)=mstu(5)*(ipa+3)
90 k(ipa+1,kcs)=mstu(5)*(ipa+2)
91 k(ipa+1,9-kcs)=mstu(5)*ipa
92 k(ipa+2,kcs)=mstu(5)*(ipa+3)
93 k(ipa+2,9-kcs)=mstu(5)*(ipa+1)
94 k(ipa+3,kcs)=mstu(5)*ipa
95 k(ipa+3,9-kcs)=mstu(5)*(ipa+2)
99 IF(kq1.EQ.0.OR.kq2.EQ.0.OR.kq3.EQ.0.OR.kq4.EQ.0) CALL
luerrm(2,
100 &
'(LU4ENT:) requested flavours can not develop parton shower')
105 k(ipa,4)=mstu(5)*(ipa+1)
107 k(ipa+1,4)=mstu(5)*ipa
108 k(ipa+1,5)=
k(ipa+1,4)
109 k(ipa+2,4)=mstu(5)*(ipa+3)
110 k(ipa+2,5)=
k(ipa+2,4)
111 k(ipa+3,4)=mstu(5)*(ipa+2)
112 k(ipa+3,5)=
k(ipa+3,4)
117 IF(0.5*x1*pecm.LE.pm1.OR.0.5*x2*pecm.LE.pm2.OR.0.5*(2.-x1-x2-x4)*
118 &pecm.LE.pm3.OR.0.5*x4*pecm.LE.pm4) mkerr=1
119 pa1=sqrt(
max(0.,(0.5*x1*pecm)**2-pm1**2))
120 pa2=sqrt(
max(0.,(0.5*x2*pecm)**2-pm2**2))
121 pa3=sqrt(
max(0.,(0.5*(2.-x1-x2-x4)*pecm)**2-pm3**2))
122 pa4=sqrt(
max(0.,(0.5*x4*pecm)**2-pm4**2))
123 x24=x1+x2+x4-1.-x12-x14+(pm3**2-pm1**2-pm2**2-pm4**2)/pecm**2
124 cthe4=(x1*x4-2.*x14)*pecm**2/(4.*pa1*pa4)
125 IF(abs(cthe4).GE.1.002) mkerr=1
126 cthe4=
max(-1.,min(1.,cthe4))
127 sthe4=sqrt(1.-cthe4**2)
128 cthe2=(x1*x2-2.*x12)*pecm**2/(4.*pa1*pa2)
129 IF(abs(cthe2).GE.1.002) mkerr=1
130 cthe2=
max(-1.,min(1.,cthe2))
131 sthe2=sqrt(1.-cthe2**2)
132 cphi2=((x2*x4-2.*x24)*pecm**2-4.*pa2*cthe2*pa4*cthe4)/
133 &(4.*pa2*sthe2*pa4*sthe4)
134 IF(abs(cphi2).GE.1.05) mkerr=1
135 cphi2=
max(-1.,min(1.,cphi2))
136 IF(mkerr.EQ.1) CALL
luerrm(13,
137 &
'(LU4ENT:) unphysical kinematical variable setup')
141 p(ipa,4)=sqrt(pa1**2+pm1**2)
145 p(ipa+3,4)=sqrt(pa4**2+pm4**2)
147 p(ipa+1,1)=pa2*sthe2*cphi2
148 p(ipa+1,2)=pa2*sthe2*sqrt(1.-cphi2**2)*(-1.)**int(
rlu(0)+0.5)
150 p(ipa+1,4)=sqrt(pa2**2+pm2**2)
152 p(ipa+2,1)=-
p(ipa+1,1)-
p(ipa+3,1)
153 p(ipa+2,2)=-
p(ipa+1,2)
154 p(ipa+2,3)=-
p(ipa,3)-
p(ipa+1,3)-
p(ipa+3,3)
155 p(ipa+2,4)=sqrt(
p(ipa+2,1)**2+
p(ipa+2,2)**2+
p(ipa+2,3)**2+pm3**2)