9 SUBROUTINE pyofsh(MOFSH,KFMO,KFD1,KFD2,PMMO,RET1,RET2)
12 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)
18 common/
pydat3/mdcy(500,3),mdme(8000,2),brat(8000),kfdp(8000,5)
19 common/
pysubs/msel,mselpd,msub(500),kfin(2,-40:40),ckin(200)
22 common/
pyint2/iset(500),kfpr(500,2),coef(500,20),icol(40,4,2)
27 dimension kfd(2),mbw(2),pmd(2),pgd(2),pmg(2),pml(2),pmu(2),
28 &pmh(2),atl(2),atu(2),ath(2),rmg(2),inx1(100),xpt1(100),
29 &fpt1(100),inx2(100),xpt2(100),fpt2(100),wdtp(0:400),
38 IF(kfd(1).EQ.kfd(2)) meql=1
40 IF(mofsh.GE.2.AND.meql.EQ.1) mlm=int(1.5d0+
pyr(0))
41 IF(mofsh.LE.2.OR.mofsh.EQ.5)
THEN
47 IF(ckin(2).GT.ckin(1)) pmmx=min(ckin(2),
vint(1))
50 IF((kfmo.EQ.25.OR.kfmo.EQ.35.OR.kfmo.EQ.36).AND.meql.EQ.1.AND.
51 &(kfd(1).EQ.23.OR.kfd(1).EQ.24)) mmed=1
52 IF((kfmo.EQ.32.OR.iabs(kfmo).EQ.34).AND.(kfd(1).EQ.23.OR.
53 &kfd(1).EQ.24).AND.(kfd(2).EQ.23.OR.kfd(2).EQ.24)) mmed=2
54 IF((kfmo.EQ.32.OR.iabs(kfmo).EQ.34).AND.(kfd(2).EQ.25.OR.
55 &kfd(2).EQ.35.OR.kfd(2).EQ.36)) mmed=3
68 IF(
mstp(42).LE.0.OR.pgd(
i).LT.
parp(41))
THEN
71 rmg(
i)=(pmg(
i)/pmmx)**2
79 IF(mofsh.EQ.1.AND.loop.EQ.1.AND.mbw(
i).EQ.1)
THEN
82 IF(mbw(3-
i).EQ.0) pmu(
i)=min(pmu(
i),pmmx-pmd(3-
i))
83 IF(pmu(
i).LT.pml(
i)+parj(64)) mbw(
i)=-1
84 ELSEIF(mbw(
i).EQ.1.AND.mofsh.NE.5)
THEN
87 pml(
i)=
max(ckin(noff+2*ilm-1),
parp(42))
88 IF(mbw(3-
i).EQ.0)
THEN
91 pmu(
i)=pmmx-
max(ckin(noff+5-2*ilm),
parp(42))
93 IF(ckin(noff+2*ilm).GT.ckin(noff+2*ilm-1)) pmu(
i)=
94 & min(pmu(
i),ckin(noff+2*ilm))
95 IF(
i.EQ.mlm) pmu(
i)=min(pmu(
i),0.5d0*pmmx)
96 IF(meql.EQ.0) pmh(
i)=min(pmu(
i),0.5d0*pmmx)
97 IF(pmu(
i).LT.pml(
i)+parj(64)) mbw(
i)=-1
99 atl(
i)=atan((pml(
i)**2-pmd(
i)**2)/(pmd(
i)*pgd(
i)))
100 atu(
i)=atan((pmu(
i)**2-pmd(
i)**2)/(pmd(
i)*pgd(
i)))
101 IF(meql.EQ.0) ath(
i)=atan((pmh(
i)**2-pmd(
i)**2)/(pmd(
i)*
104 ELSEIF(mbw(
i).EQ.1.AND.mofsh.EQ.5)
THEN
109 IF(mbw(3-
i).EQ.0) pmu(
i)=min(pmu(
i),pmmx-pmd(3-
i))
110 IF(
i.EQ.mlm) pmu(
i)=min(pmu(
i),0.5d0*pmmx)
111 IF(meql.EQ.0) pmh(
i)=min(pmu(
i),0.5d0*pmmx)
112 IF(pmu(
i).LT.pml(
i)+parj(64)) mbw(
i)=-1
114 atl(
i)=atan((pml(
i)**2-pmd(
i)**2)/(pmd(
i)*pgd(
i)))
115 atu(
i)=atan((pmu(
i)**2-pmd(
i)**2)/(pmd(
i)*pgd(
i)))
116 IF(meql.EQ.0) ath(
i)=atan((pmh(
i)**2-pmd(
i)**2)/(pmd(
i)*
121 IF(mbw(1).LT.0.OR.mbw(2).LT.0.OR.(mbw(1).EQ.0.AND.mbw(2).EQ.0))
123 CALL
pyerrm(3,
'(PYOFSH:) no allowed decay product masses')
138 ELSEIF(mbw(2).EQ.0)
THEN
143 IF(mbw(1).EQ.1.AND.mbw(2).EQ.1)
THEN
144 atl2=atan((pml(2)**2-pmd(2)**2)/(pmd(2)*pgd(2)))
145 atu2=atan((pmu(2)**2-pmd(2)**2)/(pmd(2)*pgd(2)))
151 130
IF(mbw(1).EQ.1.AND.mbw(2).EQ.1)
THEN
152 pm2s=pmd(2)**2+pmd(2)*pgd(2)*tan(atl2+xpt2(npt2)*(atu2-atl2))
153 pm2=min(pmu(2),
max(pml(2),sqrt(
max(0d0,pm2s))))
159 pmu1=min(pmu(1),pmmx-pm2)
160 IF(meql.EQ.1) pmu1=min(pmu1,pm2)
161 atl1=atan((pml1**2-pmd(1)**2)/(pmd(1)*pgd(1)))
162 atu1=atan((pmu1**2-pmd(1)**2)/(pmd(1)*pgd(1)))
163 IF(pml1+parj(64).GE.pmu1.OR.atl1+1d-7.GE.atu1)
THEN
171 140 pm1s=pmd(1)**2+pmd(1)*pgd(1)*tan(atl1+xpt1(npt1)*(atu1-atl1))
172 pm1=min(pmu1,
max(pml1,sqrt(
max(0d0,pm1s))))
176 func1=sqrt(
max(0d0,(1d0-rm1-rm2)**2-4d0*rm1*rm2))
177 IF(mmed.EQ.1) func1=func1*((1d0-rm1-rm2)**2+8d0*rm1*rm2)
178 IF(mmed.EQ.2) func1=func1**3*(1d0+10d0*rm1+10d0*rm2+rm1**2+
179 & rm2**2+10d0*rm1*rm2)
180 IF(func1.GT.fmax1) fmax1=func1
189 ELSEIF(npt1.LE.8)
THEN
191 IF(npt1.LE.4.OR.npt1.EQ.6) ish1=1
193 xpt1(npt1)=0.5d0*(xpt1(ish1)+xpt1(inx1(ish1)))
194 inx1(npt1)=inx1(ish1)
197 ELSEIF(npt1.LT.100)
THEN
200 IF(ish1.GT.npt1) ish1=2
201 IF(ish1.EQ.isn1) goto 160
202 dfpt1=abs(fpt1(ish1)-fpt1(inx1(ish1)))
203 IF(dfpt1.LT.
parp(43)*fmax1) goto 150
205 xpt1(npt1)=0.5d0*(xpt1(ish1)+xpt1(inx1(ish1)))
206 inx1(npt1)=inx1(ish1)
214 fsum1=fsum1+0.5d0*(fpt1(ipt1)+fpt1(inx1(ipt1)))*
215 & (xpt1(inx1(ipt1))-xpt1(ipt1))
217 func2=fsum1*(atu1-atl1)/paru(1)
218 180
IF(mbw(1).EQ.1.AND.mbw(2).EQ.1)
THEN
219 IF(func2.GT.fmax2) fmax2=func2
228 ELSEIF(npt2.LE.8)
THEN
230 IF(npt2.LE.4.OR.npt2.EQ.6) ish2=1
232 xpt2(npt2)=0.5d0*(xpt2(ish2)+xpt2(inx2(ish2)))
233 inx2(npt2)=inx2(ish2)
236 ELSEIF(npt2.LT.100)
THEN
239 IF(ish2.GT.npt2) ish2=2
240 IF(ish2.EQ.isn2) goto 200
241 dfpt2=abs(fpt2(ish2)-fpt2(inx2(ish2)))
242 IF(dfpt2.LT.
parp(43)*fmax2) goto 190
244 xpt2(npt2)=0.5d0*(xpt2(ish2)+xpt2(inx2(ish2)))
245 inx2(npt2)=inx2(ish2)
253 fsum2=fsum2+0.5d0*(fpt2(ipt2)+fpt2(inx2(ipt2)))*
254 & (xpt2(inx2(ipt2))-xpt2(ipt2))
256 fsum2=fsum2*(atu2-atl2)/paru(1)
257 IF(meql.EQ.1) fsum2=2d0*fsum2
263 IF(loop.EQ.1) widw=fsum2
265 IF(loop.EQ.1.AND.(ckin(46).GE.ckin(45).OR.ckin(48).GE.ckin(47)
266 & .OR.
max(ckin(45),ckin(47)).GE.1.01d0*
parp(42)))
THEN
274 ELSEIF(mofsh.EQ.2.OR.mofsh.EQ.5)
THEN
276 IF(mbw(
i).EQ.0) goto 230
277 pmbw=pmd(
i)**2+pmd(
i)*pgd(
i)*tan(atl(
i)+
pyr(0)*
279 pmg(
i)=min(pmu(
i),
max(pml(
i),sqrt(
max(0d0,pmbw))))
280 rmg(
i)=(pmg(
i)/pmmx)**2
282 IF((meql.EQ.1.AND.pmg(
max(1,mlm)).GT.pmg(min(2,3-mlm))).OR.
283 & pmg(1)+pmg(2)+parj(64).GT.pmmx) goto 220
286 flam=sqrt(
max(0d0,(1d0-rmg(1)-rmg(2))**2-4d0*rmg(1)*rmg(2)))
288 wtbe=flam*((1d0-rmg(1)-rmg(2))**2+8d0*rmg(1)*rmg(2))
289 ELSEIF(mmed.EQ.2)
THEN
290 wtbe=flam**3*(1d0+10d0*rmg(1)+10d0*rmg(2)+rmg(1)**2+
291 & rmg(2)**2+10d0*rmg(1)*rmg(2))
292 ELSEIF(mmed.EQ.3)
THEN
293 wtbe=flam*(rmg(1)+flam**2/12d0)
297 IF(wtbe.LT.
pyr(0)) goto 220
302 ELSEIF(mofsh.EQ.3)
THEN
303 IF(mbw(1).NE.0.AND.mbw(2).EQ.0)
THEN
304 pmg(1)=min(pmd(1),0.5d0*(pml(1)+pmu(1)))
306 ELSEIF(mbw(2).NE.0.AND.mbw(1).EQ.0)
THEN
308 pmg(2)=min(pmd(2),0.5d0*(pml(2)+pmu(2)))
312 pmg(1)=min(pmd(1),0.1d0*(idiv*pml(1)+(10-idiv)*pmu(1)))
313 pmg(2)=min(pmd(2),0.1d0*(idiv*pml(2)+(10-idiv)*pmu(2)))
314 IF(idiv.LE.9.AND.pmg(1)+pmg(2).GT.0.9d0*pmmx) goto 240
320 IF(meql.EQ.0.AND.mbw(1).EQ.1.AND.mbw(2).EQ.1.AND.pmd(1)+pmd(2)
321 & .GT.pmmx.AND.pmh(1).GT.pml(1).AND.pmh(2).GT.pml(2)) meql=2
325 IF(mbw(
i).NE.0)
vint(80)=
vint(80)*1.25d0*(atu(
i)-atl(
i))/
329 vint(80)=(1.25d0/paru(1))**2*
max((atu(1)-atl(1))*
330 & (ath(2)-atl(2)),(ath(1)-atl(1))*(atu(2)-atl(2)))
332 IF((isub.EQ.15.OR.isub.EQ.19.OR.isub.EQ.30.OR.isub.EQ.35).AND.
338 ELSEIF(mofsh.EQ.4)
THEN
339 IF(meql.EQ.0.AND.mbw(1).EQ.1.AND.mbw(2).EQ.1.AND.pmd(1)+pmd(2)
340 & .GT.pmmx.AND.pmh(1).GT.pml(1).AND.pmh(2).GT.pml(2)) meql=2
341 260
IF(meql.EQ.2) mlm=int(1.5d0+
pyr(0))
345 IF(mbw(
i).EQ.0) goto 270
347 IF(meql.EQ.2.AND.
i.EQ.mlm) pmv=pmh(
i)
349 IF(meql.EQ.2.AND.
i.EQ.mlm) atv=ath(
i)
351 IF((isub.EQ.15.OR.isub.EQ.19.OR.isub.EQ.22.OR.isub.EQ.30.OR.
352 & isub.EQ.35).AND.
mstp(43).NE.2) rbr=2d0*rbr
353 IF(rbr.LT.0.8d0)
THEN
354 pmsr=pmd(
i)**2+pmd(
i)*pgd(
i)*tan(atl(
i)+
pyr(0)*(atv-atl(
i)))
355 pmg(
i)=min(pmv,
max(pml(
i),sqrt(
max(0d0,pmsr))))
356 ELSEIF(rbr.LT.0.9d0)
THEN
357 pmg(
i)=sqrt(
max(0d0,pml(
i)**2+
pyr(0)*(pmv**2-pml(
i)**2)))
358 ELSEIF(rbr.LT.1.5d0)
THEN
359 pmg(
i)=pml(
i)*(pmv/pml(
i))**
pyr(0)
361 pmg(
i)=sqrt(
max(0d0,pml(
i)**2*pmv**2/(pml(
i)**2+
pyr(0)*
362 & (pmv**2-pml(
i)**2))))
365 IF((meql.GE.1.AND.pmg(
max(1,mlm)).GT.pmg(min(2,3-mlm))).OR.
366 & pmg(1)+pmg(2)+parj(64).GT.pmmx)
THEN
367 IF(
mint(48).EQ.1.AND.
mstp(171).EQ.0)
THEN
382 IF(mbw(
i).EQ.0) goto 280
384 IF(meql.EQ.2.AND.
i.EQ.mlm) pmv=pmh(
i)
386 IF(meql.EQ.2.AND.
i.EQ.mlm) atv=ath(
i)
387 f0=pmd(
i)*pgd(
i)/((pmg(
i)**2-pmd(
i)**2)**2+
388 & (pmd(
i)*pgd(
i))**2)/paru(1)
392 fi0=(atv-atl(
i))/paru(1)
394 fi2=2d0*
log(pmv/pml(
i))
395 fi3=1d0/pml(
i)**2-1d0/pmv**2
396 IF((isub.EQ.15.OR.isub.EQ.19.OR.isub.EQ.22.OR.isub.EQ.30.OR.
397 & isub.EQ.35).AND.
mstp(43).NE.2)
THEN
398 vint(80)=
vint(80)*20d0/(8d0+(fi0/f0)*(f1/fi1+6d0*
f2/fi2+
401 vint(80)=
vint(80)*10d0/(8d0+(fi0/f0)*(f1/fi1+
f2/fi2))