9 SUBROUTINE pykmap(IVAR,MVAR,VVAR)
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/
pysubs/msel,mselpd,msub(500),kfin(2,-40:40),ckin(200)
21 common/
pyint2/iset(500),kfpr(500,2),coef(500,20),icol(40,4,2)
30 IF(mvar.EQ.3.OR.mvar.EQ.4)
THEN
33 ELSEIF(mvar.EQ.5.OR.mvar.EQ.6)
THEN
37 IF(
mint(47).EQ.1.AND.(istsb.EQ.1.OR.istsb.EQ.2))
THEN
39 ELSEIF(mvar.EQ.1)
THEN
40 tau=taumin*(taumax/taumin)**vvar
41 ELSEIF(mvar.EQ.2)
THEN
42 tau=taumax*taumin/(taumin+(taumax-taumin)*vvar)
43 ELSEIF(mvar.EQ.3.OR.mvar.EQ.5)
THEN
44 ratgen=(taure+taumax)/(taure+taumin)*taumin/taumax
45 tau=taure*taumin/((taure+taumin)*ratgen**vvar-taumin)
46 ELSEIF(mvar.EQ.4.OR.mvar.EQ.6)
THEN
47 aupp=atan((taumax-taure)/gamre)
48 alow=atan((taumin-taure)/gamre)
49 tau=taure+gamre*tan(alow+(aupp-alow)*vvar)
50 ELSEIF(
mint(47).EQ.5)
THEN
51 aupp=
log(
max(2d-10,1d0-taumax))
52 alow=
log(
max(2d-10,1d0-taumin))
53 tau=1d0-exp(aupp+vvar*(alow-aupp))
55 aupp=
log(
max(1d-10,1d0-taumax))
56 alow=
log(
max(1d-10,1d0-taumin))
57 tau=1d0-exp(aupp+vvar*(alow-aupp))
62 ELSEIF(ivar.EQ.2)
THEN
66 IF(istsb.GE.3.AND.istsb.LE.5) taue=
vint(26)
67 IF(
mint(47).EQ.1)
THEN
69 ELSEIF(
mint(47).EQ.2.OR.
mint(47).EQ.6)
THEN
71 ELSEIF(
mint(47).EQ.3.OR.
mint(47).EQ.7)
THEN
73 ELSEIF(mvar.EQ.1)
THEN
74 yst=ystmin+(ystmax-ystmin)*sqrt(vvar)
75 ELSEIF(mvar.EQ.2)
THEN
76 yst=ystmax-(ystmax-ystmin)*sqrt(1d0-vvar)
77 ELSEIF(mvar.EQ.3)
THEN
78 aupp=atan(exp(ystmax))
79 alow=atan(exp(ystmin))
80 yst=
log(tan(alow+(aupp-alow)*vvar))
81 ELSEIF(mvar.EQ.4)
THEN
83 aupp=
log(
max(1d-10,exp(yst0-ystmin)-1d0))
84 alow=
log(
max(1d-10,exp(yst0-ystmax)-1d0))
85 yst=yst0-
log(1d0+exp(alow+vvar*(aupp-alow)))
88 aupp=
log(
max(1d-10,exp(yst0+ystmin)-1d0))
89 alow=
log(
max(1d-10,exp(yst0+ystmax)-1d0))
90 yst=
log(1d0+exp(aupp+vvar*(alow-aupp)))-yst0
92 vint(22)=min(ystmax,
max(ystmin,yst))
95 ELSEIF(ivar.EQ.3)
THEN
107 IF(aneg.GT.0d0.AND.vvar*(aneg+apos).LE.aneg)
THEN
108 vctn=vvar*(aneg+apos)/aneg
109 cth=ctnmin+(ctnmax-ctnmin)*vctn
111 vctp=(vvar*(aneg+apos)-aneg)/apos
112 cth=ctpmin+(ctpmax-ctpmin)*vctp
114 ELSEIF(mvar.EQ.2)
THEN
115 rmnmin=
max(rm34,rsqm-ctnmin)
116 rmnmax=
max(rm34,rsqm-ctnmax)
117 rmpmin=
max(rm34,rsqm-ctpmin)
118 rmpmax=
max(rm34,rsqm-ctpmax)
119 aneg=
log(rmnmin/rmnmax)
120 apos=
log(rmpmin/rmpmax)
121 IF(aneg.GT.0d0.AND.vvar*(aneg+apos).LE.aneg)
THEN
122 vctn=vvar*(aneg+apos)/aneg
123 cth=rsqm-rmnmin*(rmnmax/rmnmin)**vctn
125 vctp=(vvar*(aneg+apos)-aneg)/apos
126 cth=rsqm-rmpmin*(rmpmax/rmpmin)**vctp
128 ELSEIF(mvar.EQ.3)
THEN
129 rmnmin=
max(rm34,rsqm+ctnmin)
130 rmnmax=
max(rm34,rsqm+ctnmax)
131 rmpmin=
max(rm34,rsqm+ctpmin)
132 rmpmax=
max(rm34,rsqm+ctpmax)
133 aneg=
log(rmnmax/rmnmin)
134 apos=
log(rmpmax/rmpmin)
135 IF(aneg.GT.0d0.AND.vvar*(aneg+apos).LE.aneg)
THEN
136 vctn=vvar*(aneg+apos)/aneg
137 cth=rmnmin*(rmnmax/rmnmin)**vctn-rsqm
139 vctp=(vvar*(aneg+apos)-aneg)/apos
140 cth=rmpmin*(rmpmax/rmpmin)**vctp-rsqm
142 ELSEIF(mvar.EQ.4)
THEN
143 rmnmin=
max(rm34,rsqm-ctnmin)
144 rmnmax=
max(rm34,rsqm-ctnmax)
145 rmpmin=
max(rm34,rsqm-ctpmin)
146 rmpmax=
max(rm34,rsqm-ctpmax)
147 aneg=1d0/rmnmax-1d0/rmnmin
148 apos=1d0/rmpmax-1d0/rmpmin
149 IF(aneg.GT.0d0.AND.vvar*(aneg+apos).LE.aneg)
THEN
150 vctn=vvar*(aneg+apos)/aneg
151 cth=rsqm-1d0/(1d0/rmnmin+aneg*vctn)
153 vctp=(vvar*(aneg+apos)-aneg)/apos
154 cth=rsqm-1d0/(1d0/rmpmin+apos*vctp)
156 ELSEIF(mvar.EQ.5)
THEN
157 rmnmin=
max(rm34,rsqm+ctnmin)
158 rmnmax=
max(rm34,rsqm+ctnmax)
159 rmpmin=
max(rm34,rsqm+ctpmin)
160 rmpmax=
max(rm34,rsqm+ctpmax)
161 aneg=1d0/rmnmin-1d0/rmnmax
162 apos=1d0/rmpmin-1d0/rmpmax
163 IF(aneg.GT.0d0.AND.vvar*(aneg+apos).LE.aneg)
THEN
164 vctn=vvar*(aneg+apos)/aneg
165 cth=1d0/(1d0/rmnmin-aneg*vctn)-rsqm
167 vctp=(vvar*(aneg+apos)-aneg)/apos
168 cth=1d0/(1d0/rmpmin-apos*vctp)-rsqm
171 IF(cth.LT.0d0) cth=min(ctnmax,
max(ctnmin,cth))
172 IF(cth.GT.0d0) cth=min(ctpmax,
max(ctpmin,cth))
176 ELSEIF(ivar.EQ.4)
THEN
180 IF(
mint(47).EQ.1)
THEN
182 ELSEIF(mvar.EQ.1)
THEN
183 taup=taupmn*(taupmx/taupmn)**vvar
184 ELSEIF(mvar.EQ.2)
THEN
185 aupp=(1d0-
tau/taupmx)**4
186 alow=(1d0-
tau/taupmn)**4
187 taup=
tau/
max(1d-10,1d0-(alow+(aupp-alow)*vvar)**0.25d0)
188 ELSEIF(
mint(47).EQ.5)
THEN
189 aupp=
log(
max(2d-10,1d0-taupmx))
190 alow=
log(
max(2d-10,1d0-taupmn))
191 taup=1d0-exp(aupp+vvar*(alow-aupp))
193 aupp=
log(
max(1d-10,1d0-taupmx))
194 alow=
log(
max(1d-10,1d0-taupmn))
195 taup=1d0-exp(aupp+vvar*(alow-aupp))
197 vint(26)=min(taupmx,
max(taupmn,taup))
203 ELSEIF(ivar.EQ.5)
THEN
208 IF(isub.EQ.123.OR.isub.EQ.124.OR.isub.EQ.173.OR.isub.EQ.174
209 & .OR.isub.EQ.178.OR.isub.EQ.179.OR.isub.EQ.351.OR.isub.EQ.352)
216 IF(pm1+pm2+pm3.GT.0.9999d0*shpr)
THEN
232 ptsmx1=((shp-pm1**2-(pm2+pm3)**2)**2-(2d0*pm1*(pm2+pm3))**2)/
234 IF(ckin(52).GT.0d0) ptsmx1=min(ptsmx1,ckin(52)**2)
236 ptsmx2=((shp-pm2**2-(pm1+pm3)**2)**2-(2d0*pm2*(pm1+pm3))**2)/
238 IF(ckin(54).GT.0d0) ptsmx2=min(ptsmx2,ckin(54)**2)
245 IF(hmx.LT.1.0001d0*hmn)
THEN
252 pts1=ptsmn1+
pyr(0)*hde
253 ELSEIF(
rpt.LT.hwt1+hwt2)
THEN
254 pts1=
max(ptsmn1,hmn*(hmx/hmn)**
pyr(0)-pmrs1)
256 pts1=
max(ptsmn1,hmn*hmx/(hmn+
pyr(0)*hde)-pmrs1)
258 wtpts1=hde/(hwt1+hwt2*hde/(
log(hmx/hmn)*(pmrs1+pts1))+
259 & hwt3*hmn*hmx/(pmrs1+pts1)**2)
262 IF(hmx.LT.1.0001d0*hmn)
THEN
269 pts2=ptsmn2+
pyr(0)*hde
270 ELSEIF(
rpt.LT.hwt1+hwt2)
THEN
271 pts2=
max(ptsmn2,hmn*(hmx/hmn)**
pyr(0)-pmrs2)
273 pts2=
max(ptsmn2,hmn*hmx/(hmn+
pyr(0)*hde)-pmrs2)
275 wtpts2=hde/(hwt1+hwt2*hde/(
log(hmx/hmn)*(pmrs2+pts2))+
276 & hwt3*hmn*hmx/(pmrs2+pts2)**2)
282 pts3=
max(0d0,pts1+pts2+2d0*sqrt(pts1*pts2)*cos(phir))
283 IF(pts3.LT.ckin(55)**2.OR.(ckin(56).GT.0d0.AND.pts3.GT.
297 IF(pmt1+pmt2+pmt3.GT.0.9999d0*shpr)
THEN
303 y3max=
log((shp+pms3-pm12+sqrt(
max(0d0,(shp-pms3-pm12)**2-
304 & 4d0*pms3*pm12)))/(2d0*shpr*pmt3))
305 IF(y3max.LT.1d-6)
THEN
309 y3=(2d0*
pyr(0)-1d0)*0.999999d0*y3max
316 pms12=pe12**2-pz12**2
317 sql12=sqrt(
max(0d0,(pms12-pms1-pms2)**2-4d0*pms1*pms2))
318 IF(sql12.LT.1d-6*shp)
THEN
324 tfac=-shpr/(2d0*pms12)
325 t1p=tfac*(pe12-pz12)*(pmm1-sql12)
326 t1n=tfac*(pe12-pz12)*(pmm1+sql12)
327 t2p=tfac*(pe12+pz12)*(pmm2-sql12)
328 t2n=tfac*(pe12+pz12)*(pmm2+sql12)
331 IF(mptpk.EQ.1.OR.isub.EQ.351.OR.isub.EQ.352)
THEN
335 wtpu=1d0/((t1p-pmrs1)*(t2p-pmrs2))**2
336 wtnu=1d0/((t1n-pmrs1)*(t2n-pmrs2))**2
341 IF(wtn.GT.
pyr(0))
eps=-1d0
362 vint(217)=-0.5d0*tfac*(pe12-pz12)*(pmm2+
eps*sql12)
363 vint(218)=-0.5d0*tfac*(pe12+pz12)*(pmm1+
eps*sql12)
364 vint(219)=0.5d0*(pms12-pts3)