10 common/histrng/
nfp(300,15),pphi(300,15),
nft(300,15),pthi(300,15)
13 common/lujets/
n,
k(9000,5),
p(9000,5),
v(9000,5)
15 common/ludat1/mstu(200),paru(200),mstj(200),parj(200)
17 common/ludat2/kchg(500,3),pmas(500,4),parf(2000),vckm(4,4)
19 common/pyhipars/mstp(200),parp(200),msti(200),pari(200)
21 common/pyhiint1/mint(400),vint(400)
23 dimension kflch(2),kflsp(2),chi(2),pms(6),
is(2),robo(5)
26 IF(mint(43).EQ.1)
THEN
37 IF(ipu1.EQ.0.AND.ipu2.EQ.0)
RETURN
42 IF(isub.EQ.95) ilep=-1
43 IF(ilep.EQ.1) iq=mint(84)+1
44 IF(ilep.EQ.2) iq=mint(84)+2
59 ELSEIF(mint(40+jt).EQ.1.AND.ipu.NE.0)
THEN
81 IF(ss_w2.LE.4.0*parp(93)**2) goto 1211
83 IF(
ihpr2(5).LE.0)
THEN
84 120
IF(mstp(91).LE.0)
THEN
86 ELSEIF(mstp(91).EQ.1)
THEN
91 pt=-parp(92)*
log(rpt1*rpt2)
93 IF(
pt.GT.parp(93)) goto 120
97 ELSE IF(
ihpr2(5).EQ.1)
THEN
100 1205 ptgs=parp(91)*sqrt(-
log(
rlu(0)))
101 IF(ptgs.GT.parp(93)) go
to 1205
105 DO 1210 i_int=1,jpt-1
106 pkcsq=parp(91)*sqrt(-
log(
rlu(0)))
109 rpt2=rpt2+pkcsq*sin(
phi)
111 IF(rpt1**2+rpt2**2.GE.ss_w2/4.0) go
to 1205
121 pms(jt)=
p(i,5)**2+
p(i,1)**2+
p(i,2)**2
127 shs=(1.-vint(43-jt))*q2/vint(43-jt)+vint(5-jt)**2
134 IF(ilep.EQ.0) shs=vint(141)*vint(142)*vint(2)+
135 &(
p(i1,1)+
p(i2,1))**2+(
p(i1,2)+
p(i2,2))**2
136 shr=sqrt(
max(0.,shs))
138 IF((shs-pms(1)-pms(2))**2-4.*pms(1)*pms(2).LE.0.) goto 110
139 p(i1,4)=0.5*(shr+(pms(1)-pms(2))/shr)
140 p(i1,3)=sqrt(
max(0.,
p(i1,4)**2-pms(1)))
143 ELSEIF(ilep.EQ.1)
THEN
148 ELSEIF(ilep.EQ.2)
THEN
154 IF(mint(43).EQ.1)
RETURN
158 robo(3)=(
p(i1,1)+
p(i2,1))/shr
159 robo(4)=(
p(i1,2)+
p(i2,2))/shr
160 CALL ludbrb(i1,i2,0.,0.,-dble(robo(3)),-dble(robo(4)),0d0)
162 CALL ludbrb(i1,i2,0.,-robo(2),0d0,0d0,0d0)
164 CALL ludbrb(i1,i2,-robo(1),0.,0d0,0d0,0d0)
165 nmax=
max(mint(52),ipu1,ipu2)
166 CALL ludbrb(i1,nmax,robo(1),robo(2),dble(robo(3)),dble(robo(4)),
168 robo(5)=
max(-0.999999,
min(0.999999,(vint(141)-vint(142))/
169 & (vint(141)+vint(142))))
170 CALL ludbrb(i1,nmax,0.,0.,0d0,0d0,dble(robo(5)))
176 IF(mstp(81).LE.0.OR.mstp(82).LE.0.OR.isub.EQ.95)
THEN
180 peh=
p(i1,4)+
p(i2,4)+0.5*vint(1)*(vint(151)+vint(152))
181 pzh=
p(i1,3)+
p(i2,3)+0.5*vint(1)*(vint(151)-vint(152))
182 shh=(vint(1)-peh)**2-(
p(i1,1)+
p(i2,1))**2-(
p(i1,2)+
p(i2,2))**2-
184 pmmin=
p(mint(83)+1,5)+
p(mint(83)+2,5)+
ulmass(
k(i1,2))+
186 IF(shr.GE.vint(1).OR.shh.LE.(pmmin+parp(111))**2)
THEN
190 shr=sqrt(shh+(
p(i1,1)+
p(i2,1))**2+(
p(i1,2)+
p(i2,2))**2)
194 pms(ilep)=
max(0.,pei**2-pzi**2)
195 pmmin=
p(ilepr-2,5)+
ulmass(
k(ilepr,2))+sqrt(pms(ilep))
196 IF(shr.LE.pmmin+parp(111))
THEN
205 IF(jt.EQ.ilep) goto 190
208 CALL
pyhispli(mint(10+jt),mint(12+jt),kflch(jt),kflsp(jt))
221 kfls=(3-kchg(
lucomp(kflsp(jt)),2)*isign(1,kflsp(jt)))/2
223 k(ipu,6-kfls)=mod(
k(ipu,6-kfls),mstu(5))+mstu(5)*i
224 IF(kflch(jt).EQ.0)
THEN
225 p(i,1)=-
p(mint(83)+jt+2,1)
226 p(i,2)=-
p(mint(83)+jt+2,2)
227 pms(jt)=
p(i,5)**2+
p(i,1)**2+
p(i,2)**2
232 pms(jt+2)=
p(i,5)**2+
p(i,1)**2+
p(i,2)**2
242 p(i,1)=-
p(mint(83)+jt+2,1)-
p(i-1,1)
243 p(i,2)=-
p(mint(83)+jt+2,2)-
p(i-1,2)
244 pms(jt+4)=
p(i,5)**2+
p(i,1)**2+
p(i,2)**2
247 IF(mod(mint(10+jt)/1000,10).NE.0) imb=2
248 IF(iabs(kflch(jt)).LE.10.OR.kflch(jt).EQ.21)
THEN
250 IF(mstp(92).LE.1)
THEN
251 IF(imb.EQ.1) chi(jt)=
rlu(0)
252 IF(imb.EQ.2) chi(jt)=1.-sqrt(
rlu(0))
253 ELSEIF(mstp(92).EQ.2)
THEN
254 chi(jt)=1.-
rlu(0)**(1./(1.+chik))
255 ELSEIF(mstp(92).EQ.3)
THEN
257 170 chi(jt)=
rlu(0)**2
258 IF((chi(jt)**2/(chi(jt)**2+cut**2))**0.25*(1.-chi(jt))**chik
259 & .LT.
rlu(0)) goto 170
262 cutr=(1.+sqrt(1.+cut**2))/cut
263 180 chir=cut*cutr**
rlu(0)
264 chi(jt)=(chir**2-cut**2)/(2.*chir)
265 IF((1.-chi(jt))**chik.LT.
rlu(0)) goto 180
269 IF(mstp(92).LE.1)
THEN
270 IF(imb.EQ.1) chi(jt)=
rlu(0)
271 IF(imb.EQ.2) chi(jt)=1.-sqrt(
rlu(0))
273 chi(jt)=1.-
rlu(0)**(1./(1.+parp(93+2*imb)))
275 IF(mod(kflch(jt)/1000,10).NE.0) chi(jt)=1.-chi(jt)
277 pms(jt)=pms(jt+4)/chi(jt)+pms(jt+2)/(1.-chi(jt))
278 kfls=kchg(
lucomp(kflch(jt)),2)*isign(1,kflch(jt))
283 k(ipu,6-kfls)=mod(
k(ipu,6-kfls),mstu(5))+mstu(5)*i
287 IF(shr.LE.sqrt(pms(1))+sqrt(pms(2))) goto 140
292 IF(jt.EQ.ilep) goto 200
293 pe=0.5*(shr+(pms(jt)-pms(3-jt))/shr)
294 pz=sqrt(pe**2-pms(jt))
295 IF(kflch(jt).EQ.0)
THEN
297 p(
is(jt),3)=pz*(-1)**(jt-1)
300 p(
is(jt)+1,4)=0.5*(pw1+pms(jt+4)/pw1)
301 p(
is(jt)+1,3)=0.5*(pw1-pms(jt+4)/pw1)*(-1)**(jt-1)
302 p(
is(jt),4)=pe-
p(
is(jt)+1,4)
303 p(
is(jt),3)=pz*(-1)**(jt-1)-
p(
is(jt)+1,3)
309 CALL ludbrb(ns+1,
n,0.,0.,0d0,0d0,-dble(pzh/(vint(1)-peh)))
312 nmax=
max(
ip,mint(52))
314 pzf=pz*(-1)**(ilep-1)
315 pt2=
p(ilepr,1)**2+
p(ilepr,2)**2
317 CALL ludbrb(mint(84)+1,nmax,0.,-phipt,0d0,0d0,0d0)
318 rqp=
p(iq,3)*(
pt2+pei**2)-
p(iq,4)*pei*pzi
319 sinth=
p(iq,4)*sqrt(
pt2*(
pt2+pei**2)/(rqp**2+
pt2*
320 &
p(iq,4)**2*pzi**2))*
sign(1.,-rqp)
321 CALL ludbrb(mint(84)+1,nmax,asin(sinth),0.,0d0,0d0,0d0)
322 betax=(-pei*pzi*sinth+sqrt(
pt2*(
pt2+pei**2-(pzi*sinth)**2)))/
324 CALL ludbrb(mint(84)+1,nmax,0.,0.,dble(betax),0d0,0d0)
325 CALL ludbrb(mint(84)+1,nmax,0.,phipt,0d0,0d0,0d0)
328 betaz=(-pem*pzm+pzf*sqrt(pzf**2+pem**2-pzm**2))/(pzf**2+pem**2)
329 CALL ludbrb(mint(84)+1,nmax,0.,0.,0d0,0d0,dble(betaz))
330 CALL ludbrb(i1,i2,asin(sinth),0.,dble(betax),0d0,0d0)
331 CALL ludbrb(i1,i2,0.,phipt,0d0,0d0,dble(betaz))