File indexing completed on 2024-04-06 12:13:31
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092 double precision function ctq6pdf (iparton, x, q)
0093 implicit double precision (a-h,o-z)
0094 logical warn
0095 common
0096 > / ctqpar2 / nx, nt, nfmx
0097 > / qcdtable / alambda, nfl, iorder
0098
0099 data warn /.true./
0100 save warn
0101
0102 if (x .lt. 0d0 .or. x .gt. 1d0) then
0103 print *, 'x out of range in ctq6pdf: ', x
0104 stop
0105 endif
0106 if (q .lt. alambda) then
0107 print *, 'q out of range in ctq6pdf: ', q
0108 stop
0109 endif
0110 if ((iparton .lt. -nfmx .or. iparton .gt. nfmx)) then
0111 if (warn) then
0112
0113 warn = .false.
0114 print *, 'warning: iparton out of range in ctq6pdf! '
0115 print *, 'iparton, mxflvn0: ', iparton, nfmx
0116 endif
0117 ctq6pdf = 0d0
0118 return
0119 endif
0120
0121 ctq6pdf = partonx6 (iparton, x, q)
0122
0123 if(ctq6pdf.lt.1.0d-16) ctq6pdf = 0.0d0
0124
0125 return
0126
0127
0128 end
0129
0130 subroutine setctq6 (iset)
0131 implicit double precision (a-h,o-z)
0132 parameter (isetmax0=5)
0133 character flnm(isetmax0)*6, nn*3, tablefile*140
0134 data (flnm(i), i=1,isetmax0)
0135 > / 'cteq6m', 'cteq6d', 'cteq6l', 'cteq6l','ctq61.'/
0136 data isetold, isetmin0, isetmin1, isetmax1 /-987,1,100,140/
0137 data isetmin2,isetmax2 /200,240/
0138 save
0139
0140 character cmsdir*82
0141 call getenv('CMSSW_BASE',cmsdir)
0142 kspace=index(cmsdir,' ')
0143 if(iset.ne.isetold) then
0144 iu= nextun()
0145 if (iset.ge.isetmin0 .and. iset.le.3) then
0146 tablefile=cmsdir(1:kspace-1)
0147 $ //'/src/GeneratorInterface/GenExtensions/data/'
0148 $ //flnm(iset)//'.tbl'
0149 elseif (iset.eq.4) then
0150 tablefile=cmsdir(1:kspace-1)
0151 $ //'/src/GeneratorInterface/GenExtensions/data/'
0152 $ //flnm(iset)//'1.tbl'
0153 elseif (iset.ge.isetmin1 .and. iset.le.isetmax1) then
0154 write(nn,'(i3)') iset
0155 tablefile=cmsdir(1:kspace-1)
0156 $ //'/src/GeneratorInterface/GenExtensions/data/'
0157 $ //flnm(1)//nn//'.tbl'
0158 elseif (iset.ge.isetmin2 .and. iset.le.isetmax2) then
0159 write(nn,'(i3)') iset
0160 tablefile=cmsdir(1:kspace-1)
0161 $ //'/src/GeneratorInterface/GenExtensions/data/'
0162 $ //flnm(5)//nn(2:3)//'.tbl'
0163 else
0164 print *, 'invalid iset number in setctq6 :', iset
0165 stop
0166 endif
0167
0168 open(iu, file=tablefile, status='old', err=100)
0169 call readtbl (iu)
0170 close (iu)
0171 isetold=iset
0172 endif
0173 return
0174
0175 100 print *, ' data file ', tablefile, ' cannot be opened '
0176 >//'in setctq6!!'
0177 stop
0178
0179 end
0180
0181 subroutine readtbl (nu)
0182 implicit double precision (a-h,o-z)
0183 character line*80
0184 parameter (mxx = 96, mxq = 20, mxf = 5)
0185 parameter (mxpqx = (mxf + 3) * mxq * mxx)
0186 common
0187 > / ctqpar1 / al, xv(0:mxx), tv(0:mxq), upd(mxpqx)
0188 > / ctqpar2 / nx, nt, nfmx
0189 > / xqrange / qini, qmax, xmin
0190 > / qcdtable / alambda, nfl, iorder
0191 > / masstbl / amass(6)
0192
0193 read (nu, '(a)') line
0194 read (nu, '(a)') line
0195 read (nu, *) dr, fl, al, (amass(i),i=1,6)
0196 iorder = nint(dr)
0197 nfl = nint(fl)
0198 alambda = al
0199
0200 read (nu, '(a)') line
0201 read (nu, *) nx, nt, nfmx
0202
0203 read (nu, '(a)') line
0204 read (nu, *) qini, qmax, (tv(i), i =0, nt)
0205
0206 read (nu, '(a)') line
0207 read (nu, *) xmin, (xv(i), i =0, nx)
0208
0209 do 11 iq = 0, nt
0210 tv(iq) = log(log (tv(iq) /al))
0211 11 continue
0212
0213
0214
0215
0216
0217 nblk = (nx+1) * (nt+1)
0218 npts = nblk * (nfmx+3)
0219 read (nu, '(a)') line
0220 read (nu, *, iostat=iret) (upd(i), i=1,npts)
0221
0222 return
0223
0224 end
0225
0226 function nextun()
0227
0228 logical ex
0229
0230 do 10 n = 10, 300
0231 inquire (unit=n, opened=ex)
0232 if (.not. ex) then
0233 nextun = n
0234 return
0235 endif
0236 10 continue
0237 stop ' there is no available i/o unit. '
0238
0239 end
0240
0241
0242 subroutine polint (xa,ya,n,x,y,dy)
0243
0244 implicit double precision (a-h, o-z)
0245
0246 parameter (nmax=10)
0247 dimension xa(n),ya(n),c(nmax),d(nmax)
0248 ns=1
0249 dif=abs(x-xa(1))
0250 do 11 i=1,n
0251 dift=abs(x-xa(i))
0252 if (dift.lt.dif) then
0253 ns=i
0254 dif=dift
0255 endif
0256 c(i)=ya(i)
0257 d(i)=ya(i)
0258 11 continue
0259 y=ya(ns)
0260 ns=ns-1
0261 do 13 m=1,n-1
0262 do 12 i=1,n-m
0263 ho=xa(i)-x
0264 hp=xa(i+m)-x
0265 w=c(i+1)-d(i)
0266 den=ho-hp
0267
0268
0269 if (den.eq.0.) then
0270 WRITE (*,*) 'den is 0'
0271 READ (*,'()')
0272 endif
0273 den=w/den
0274 d(i)=hp*den
0275 c(i)=ho*den
0276 12 continue
0277 if (2*ns.lt.n-m)then
0278 dy=c(ns+1)
0279 else
0280 dy=d(ns)
0281 ns=ns-1
0282 endif
0283 y=y+dy
0284 13 continue
0285 return
0286 end
0287
0288 double precision function partonx6 (iprtn, xx, qq)
0289
0290
0291
0292
0293
0294 implicit double precision (a-h,o-z)
0295
0296 parameter (mxx = 96, mxq = 20, mxf = 5)
0297 parameter (mxqx= mxq * mxx, mxpqx = mxqx * (mxf+3))
0298
0299 common
0300 > / ctqpar1 / al, xv(0:mxx), tv(0:mxq), upd(mxpqx)
0301 > / ctqpar2 / nx, nt, nfmx
0302 > / xqrange / qini, qmax, xmin
0303
0304 dimension fvec(4), fij(4)
0305 dimension xvpow(0:mxx)
0306 data onep / 1.00001 /
0307 data xpow / 0.3d0 / !**** choice of interpolation variable
0308 data nqvec / 4 /
0309 data ientry / 0 /
0310 save ientry,xvpow
0311
0312
0313 if(ientry .eq. 0) then
0314 ientry = 1
0315
0316 xvpow(0) = 0d0
0317 do i = 1, nx
0318 xvpow(i) = xv(i)**xpow
0319 enddo
0320 endif
0321
0322 x = xx
0323 q = qq
0324 tt = log(log(q/al))
0325
0326
0327
0328 jlx = -1
0329 ju = nx+1
0330 11 if (ju-jlx .gt. 1) then
0331 jm = (ju+jlx) / 2
0332 if (x .ge. xv(jm)) then
0333 jlx = jm
0334 else
0335 ju = jm
0336 endif
0337 goto 11
0338 endif
0339
0340
0341
0342
0343 if (jlx .le. -1) then
0344 print '(a,1pe12.4)', 'severe error: x <= 0 in partonx6! x = ', x
0345 stop
0346 elseif (jlx .eq. 0) then
0347 jx = 0
0348 elseif (jlx .le. nx-2) then
0349
0350
0351 jx = jlx - 1
0352 elseif (jlx.eq.nx-1 .or. x.lt.onep) then
0353
0354
0355
0356
0357 jx = jlx - 2
0358 else
0359 print '(a,1pe12.4)', 'severe error: x > 1 in partonx6! x = ', x
0360 stop
0361 endif
0362
0363
0364
0365 ss = x**xpow
0366
0367 const1 = 0.
0368 const2 = 0.
0369 const3 = 0.
0370 const4 = 0.
0371 const5 = 0.
0372 const6 = 0.
0373 sy2 = 0.
0374 sy3 = 0.
0375 s23 = 0.
0376
0377 if (jlx.ge.2 .and. jlx.le.nx-2) then
0378
0379
0380 svec1 = xvpow(jx)
0381 svec2 = xvpow(jx+1)
0382 svec3 = xvpow(jx+2)
0383 svec4 = xvpow(jx+3)
0384
0385 s12 = svec1 - svec2
0386 s13 = svec1 - svec3
0387 s23 = svec2 - svec3
0388 s24 = svec2 - svec4
0389 s34 = svec3 - svec4
0390
0391 sy2 = ss - svec2
0392 sy3 = ss - svec3
0393
0394
0395 const1 = s13/s23
0396 const2 = s12/s23
0397 const3 = s34/s23
0398 const4 = s24/s23
0399 s1213 = s12 + s13
0400 s2434 = s24 + s34
0401 sdet = s12*s34 - s1213*s2434
0402 tmp = sy2*sy3/sdet
0403 const5 = (s34*sy2-s2434*sy3)*tmp/s12
0404 const6 = (s1213*sy2-s12*sy3)*tmp/s34
0405
0406 endif
0407
0408
0409
0410 jlq = -1
0411 ju = nt+1
0412 12 if (ju-jlq .gt. 1) then
0413 jm = (ju+jlq) / 2
0414 if (tt .ge. tv(jm)) then
0415 jlq = jm
0416 else
0417 ju = jm
0418 endif
0419 goto 12
0420 endif
0421
0422 if (jlq .le. 0) then
0423 jq = 0
0424 elseif (jlq .le. nt-2) then
0425
0426 jq = jlq - 1
0427 else
0428
0429 jq = nt - 3
0430
0431 endif
0432
0433
0434 tdet = 0.
0435 t12 = 0.
0436 t13 = 0.
0437 t23 = 0.
0438 t24 = 0.
0439 t34 = 0.
0440 ty2 = 0.
0441 ty3 = 0.
0442 tmp1 = 0.
0443 tmp2 = 0.
0444
0445
0446 if (jlq.ge.1 .and. jlq.le.nt-2) then
0447
0448 tvec1 = tv(jq)
0449 tvec2 = tv(jq+1)
0450 tvec3 = tv(jq+2)
0451 tvec4 = tv(jq+3)
0452
0453 t12 = tvec1 - tvec2
0454 t13 = tvec1 - tvec3
0455 t23 = tvec2 - tvec3
0456 t24 = tvec2 - tvec4
0457 t34 = tvec3 - tvec4
0458
0459 ty2 = tt - tvec2
0460 ty3 = tt - tvec3
0461
0462 tmp1 = t12 + t13
0463 tmp2 = t24 + t34
0464
0465 tdet = t12*t34 - tmp1*tmp2
0466
0467 endif
0468
0469
0470
0471
0472 if (iprtn .ge. 3) then
0473 ip = - iprtn
0474 else
0475 ip = iprtn
0476 endif
0477 jtmp = ((ip + nfmx)*(nt+1)+(jq-1))*(nx+1)+jx+1
0478
0479 do it = 1, nqvec
0480
0481 j1 = jtmp + it*(nx+1)
0482
0483 if (jx .eq. 0) then
0484
0485
0486
0487
0488 fij(1) = 0
0489 fij(2) = upd(j1+1) * xv(1)**2
0490 fij(3) = upd(j1+2) * xv(2)**2
0491 fij(4) = upd(j1+3) * xv(3)**2
0492
0493
0494
0495 call polint (xvpow(0), fij(1), 4, ss, fx, dfx)
0496
0497 if (x .gt. 0d0) fvec(it) = fx / x**2
0498
0499 elseif (jlx .eq. nx-1) then
0500
0501
0502 call polint (xvpow(nx-3), upd(j1), 4, ss, fx, dfx)
0503
0504 fvec(it) = fx
0505
0506 else
0507
0508
0509 sf2 = upd(j1+1)
0510 sf3 = upd(j1+2)
0511
0512 g1 = sf2*const1 - sf3*const2
0513 g4 = -sf2*const3 + sf3*const4
0514
0515 fvec(it) = (const5*(upd(j1)-g1)
0516 & + const6*(upd(j1+3)-g4)
0517 & + sf2*sy3 - sf3*sy2) / s23
0518
0519 endif
0520
0521 enddo
0522
0523
0524
0525 if (jlq .le. 0) then
0526
0527 call polint (tv(0), fvec(1), 4, tt, ff, dfq)
0528
0529 elseif (jlq .ge. nt-1) then
0530
0531 call polint (tv(nt-3), fvec(1), 4, tt, ff, dfq)
0532 else
0533
0534
0535
0536 tf2 = fvec(2)
0537 tf3 = fvec(3)
0538
0539 g1 = ( tf2*t13 - tf3*t12) / t23
0540 g4 = (-tf2*t34 + tf3*t24) / t23
0541
0542 h00 = ((t34*ty2-tmp2*ty3)*(fvec(1)-g1)/t12
0543 & + (tmp1*ty2-t12*ty3)*(fvec(4)-g4)/t34)
0544
0545 ff = (h00*ty2*ty3/tdet + tf2*ty3 - tf3*ty2) / t23
0546 endif
0547
0548 partonx6 = ff
0549
0550 return
0551 end
0552
0553 double precision function alpcteq(q2, naord)
0554
0555
0556
0557
0558
0559
0560
0561
0562
0563
0564
0565 implicit double precision (a - z)
0566 integer nf, k, i, naord
0567 dimension lambdal (3:6), lambdan (3:6), q2thr (3)
0568
0569
0570 data q2thr / 1.690, 20.25, 32400. /
0571 data lambdal / 0.247, 0.215, 0.1650, 0.0847 /
0572 data lambdan / 0.350, 0.326, 0.2260, 0.151 /
0573
0574
0575 nf = 3
0576 do 10 k = 1, 3
0577 if (q2 .gt. q2thr (k)) then
0578 nf = nf + 1
0579 else
0580 go to 20
0581 end if
0582 10 continue
0583
0584
0585 20 b0 = 11.- 2./3.* nf
0586 b1 = 102.- 38./3.* nf
0587 b10 = b1 / (b0*b0)
0588 if (naord .eq. 1) then
0589 lam2 = lambdal (nf) * lambdal (nf)
0590 alp = 1./(b0 * dlog (q2/lam2))
0591 go to 1
0592 else if (naord .eq. 2) then
0593 lam2 = lambdan (nf) * lambdan (nf)
0594 b1 = 102.- 38./3.* nf
0595 b10 = b1 / (b0*b0)
0596 else
0597 write (6,91)
0598 91 format ('invalid choice for order in alpha_s')
0599 stop
0600 end if
0601
0602
0603 lq2 = dlog (q2 / lam2)
0604 alp = 1./(b0*lq2) * (1.- b10*dlog(lq2)/lq2)
0605
0606
0607 do 2 i = 1, 6
0608 xl = dlog (1./(b0*alp) + b10)
0609 xlp = dlog (1./(b0*alp*1.01) + b10)
0610 xlm = dlog (1./(b0*alp*0.99) + b10)
0611 y = lq2 - 1./ (b0*alp) + b10 * xl
0612 y1 = (- 1./ (b0*alp*1.01) + b10 * xlp
0613 1 + 1./ (b0*alp*0.99) - b10 * xlp) / (0.02d0*alp)
0614 alp = alp - y/y1
0615 2 continue
0616
0617
0618 1 alpcteq = alp
0619 return
0620 end
0621
0622
0623
0624
0625
0626
0627
0628
0629
0630
0631
0632
0633
0634
0635
0636
0637
0638
0639
0640
0641
0642
0643
0644
0645
0646
0647
0648
0649
0650
0651
0652
0653
0654
0655
0656 subroutine grv98pa (iset, x, q2, uv, dv, us, ds, ss, gl)
0657
0658
0659
0660
0661
0662
0663
0664
0665
0666
0667
0668
0669
0670
0671
0672
0673
0674
0675
0676
0677
0678
0679
0680 implicit double precision (a-h, o-z)
0681 parameter (npart=6, nx=68, nq=27, narg=2)
0682 dimension xuvf(nx,nq), xdvf(nx,nq), xdef(nx,nq), xudf(nx,nq),
0683 1 xsf(nx,nq), xgf(nx,nq), parton (npart,nq,nx-1),
0684 2 qs(nq), xb(nx), xt(narg), na(narg), arrf(nx+nq)
0685 character*80 line
0686 common /intinip/iinip
0687 save xuvf, xdvf, xdef, xudf, xsf, xgf, na, arrf
0688
0689
0690 data qs / 0.8e0,
0691 1 1.0e0, 1.3e0, 1.8e0, 2.7e0, 4.0e0, 6.4e0,
0692 2 1.0e1, 1.6e1, 2.5e1, 4.0e1, 6.4e1,
0693 3 1.0e2, 1.8e2, 3.2e2, 5.7e2,
0694 4 1.0e3, 1.8e3, 3.2e3, 5.7e3,
0695 5 1.0e4, 2.2e4, 4.6e4,
0696 6 1.0e5, 2.2e5, 4.6e5,
0697 7 1.e6 /
0698 data xb / 1.0e-9, 1.8e-9, 3.2e-9, 5.7e-9,
0699 a 1.0e-8, 1.8e-8, 3.2e-8, 5.7e-8,
0700 b 1.0e-7, 1.8e-7, 3.2e-7, 5.7e-7,
0701 c 1.0e-6, 1.4e-6, 2.0e-6, 3.0e-6, 4.5e-6, 6.7e-6,
0702 1 1.0e-5, 1.4e-5, 2.0e-5, 3.0e-5, 4.5e-5, 6.7e-5,
0703 2 1.0e-4, 1.4e-4, 2.0e-4, 3.0e-4, 4.5e-4, 6.7e-4,
0704 3 1.0e-3, 1.4e-3, 2.0e-3, 3.0e-3, 4.5e-3, 6.7e-3,
0705 4 1.0e-2, 1.4e-2, 2.0e-2, 3.0e-2, 4.5e-2, 0.06, 0.08,
0706 5 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25, 0.275,
0707 6 0.3, 0.325, 0.35, 0.375, 0.4, 0.45, 0.5, 0.55,
0708 7 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1. /
0709
0710
0711 if ( (x.lt.0.99d-9) .or. (x.gt.1.d0) ) then
0712 write(6,91)
0713 91 format (2x,'parton interpolation: x out of range')
0714 stop
0715 endif
0716 if ( (q2.lt.0.799) .or. (q2.gt.1.01e6) ) then
0717
0718
0719 q2=1.0d6
0720
0721 endif
0722 if (iinip .ne. 0) goto 16
0723
0724
0725
0726
0727
0728 if (iset .eq. 1) then
0729 open (11,file='grv98lo.grid',status='old') ! 7.332e-05
0730 else if (iset .eq. 2) then
0731 open (11,file='grv98nlm.grid',status='old') ! 1.015e-04
0732 else if (iset .eq. 3) then
0733 open (11,file='grv98nld.grid',status='old') ! 1.238e-04
0734 else
0735 write(6,93)
0736 93 format (2x,'no or invalid parton set choice')
0737 stop
0738 end if
0739 iinip = 1
0740 read(11,89) line
0741 89 format(a80)
0742 do 15 m = 1, nx-1
0743 do 15 n = 1, nq
0744 read(11,90) parton(1,n,m), parton(2,n,m), parton(3,n,m),
0745 1 parton(4,n,m), parton(5,n,m), parton(6,n,m)
0746 90 format (6(1pe10.3))
0747 15 continue
0748 close(11)
0749
0750
0751 do 10 iq = 1, nq
0752 do 20 ix = 1, nx-1
0753 xb0v = xb(ix)**0.5
0754 xb0s = xb(ix)**(-0.2)
0755 xb1 = 1.-xb(ix)
0756 xuvf(ix,iq) = parton(1,iq,ix) / (xb1**3 * xb0v)
0757 xdvf(ix,iq) = parton(2,iq,ix) / (xb1**4 * xb0v)
0758 xdef(ix,iq) = parton(3,iq,ix) / (xb1**7 * xb0v)
0759 xudf(ix,iq) = parton(4,iq,ix) / (xb1**7 * xb0s)
0760 xsf(ix,iq) = parton(5,iq,ix) / (xb1**7 * xb0s)
0761 xgf(ix,iq) = parton(6,iq,ix) / (xb1**5 * xb0s)
0762 20 continue
0763 xuvf(nx,iq) = 0.e0
0764 xdvf(nx,iq) = 0.e0
0765 xdef(nx,iq) = 0.e0
0766 xudf(nx,iq) = 0.e0
0767 xsf(nx,iq) = 0.e0
0768 xgf(nx,iq) = 0.e0
0769 10 continue
0770 na(1) = nx
0771 na(2) = nq
0772 do 30 ix = 1, nx
0773 arrf(ix) = dlog(xb(ix))
0774 30 continue
0775 do 40 iq = 1, nq
0776 arrf(nx+iq) = dlog(qs(iq))
0777 40 continue
0778
0779
0780
0781 16 continue
0782
0783
0784 xt(1) = dlog(x)
0785 xt(2) = dlog(q2)
0786 x1 = 1.- x
0787 xv = x**0.5
0788 xs = x**(-0.2)
0789 uv = fint(narg,xt,na,arrf,xuvf) * x1**3 * xv
0790 dv = fint(narg,xt,na,arrf,xdvf) * x1**4 * xv
0791 de = fint(narg,xt,na,arrf,xdef) * x1**7 * xv
0792 ud = fint(narg,xt,na,arrf,xudf) * x1**7 * xs
0793 us = 0.5 * (ud - de)
0794 ds = 0.5 * (ud + de)
0795 ss = fint(narg,xt,na,arrf,xsf) * x1**7 * xs
0796 gl = fint(narg,xt,na,arrf,xgf) * x1**5 * xs
0797
0798 return
0799 end
0800
0801
0802
0803
0804 subroutine grv98f2 (iset, x, q2, f2l, f2c, f2b, f2)
0805
0806
0807
0808
0809
0810
0811
0812
0813
0814
0815
0816
0817
0818
0819
0820
0821
0822
0823
0824
0825
0826
0827 implicit double precision (a-h, o-z)
0828 parameter (nstrf=3, nx=68, nq=21, narg=2)
0829 dimension xf2lf(nx,nq), xf2cf(nx,nq), xf2bf(nx,nq),
0830 1 strfct (nstrf,nq,nx-1), qs(nq), xb(nx),
0831 3 xt(narg), na(narg), arrf(nx+nq)
0832 character*80 line
0833 common / intinif / iinif
0834 save xf2lf, xf2cf, xf2bf, na, arrf
0835
0836
0837 data qs / 0.8e0,
0838 1 1.0e0, 1.3e0, 1.8e0, 2.7e0, 4.0e0, 6.4e0,
0839 2 1.0e1, 1.6e1, 2.5e1, 4.0e1, 6.4e1,
0840 3 1.0e2, 1.8e2, 3.2e2, 5.7e2,
0841 4 1.0e3, 1.8e3, 3.2e3, 5.7e3,
0842 5 1.0e4/
0843 data xb / 1.0e-9, 1.8e-9, 3.2e-9, 5.7e-9,
0844 a 1.0e-8, 1.8e-8, 3.2e-8, 5.7e-8,
0845 b 1.0e-7, 1.8e-7, 3.2e-7, 5.7e-7,
0846 c 1.0e-6, 1.4e-6, 2.0e-6, 3.0e-6, 4.5e-6, 6.7e-6,
0847 1 1.0e-5, 1.4e-5, 2.0e-5, 3.0e-5, 4.5e-5, 6.7e-5,
0848 2 1.0e-4, 1.4e-4, 2.0e-4, 3.0e-4, 4.5e-4, 6.7e-4,
0849 3 1.0e-3, 1.4e-3, 2.0e-3, 3.0e-3, 4.5e-3, 6.7e-3,
0850 4 1.0e-2, 1.4e-2, 2.0e-2, 3.0e-2, 4.5e-2, 0.06, 0.08,
0851 5 0.1, 0.125, 0.15, 0.175, 0.2, 0.225, 0.25, 0.275,
0852 6 0.3, 0.325, 0.35, 0.375, 0.4, 0.45, 0.5, 0.55,
0853 7 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1. /
0854
0855
0856 if ( (x.lt.0.99d-9) .or. (x.gt.1.d0) ) then
0857 write(6,91)
0858 91 format (2x,'str.fct. interpolation: x out of range')
0859 stop
0860 endif
0861 if ( (q2.lt.0.799) .or. (q2.gt.1.01e4) ) then
0862 write(6,92)
0863 92 format (2x,'str.fct. interpolation: q2 out of range')
0864 stop
0865 endif
0866 if (iinif .ne. 0) goto 16
0867
0868
0869
0870
0871
0872 if (iset .eq. 1) then
0873 open (11,file='grv98lof.grid',status='old') ! 7.907e-01
0874 else if (iset.eq.2) then
0875 open (11,file='grv98nlf.grid',status='old') ! 9.368e-01
0876 else
0877 write(6,93)
0878 93 format (2x,'no or invalid str.fct. set choice')
0879 stop
0880 end if
0881 iinif = 1
0882 read(11,89) line
0883 89 format(a80)
0884 do 15 m = 1, nx-1
0885 do 15 n = 1, nq
0886 read(11,90) strfct(1,n,m), strfct(2,n,m), strfct(3,n,m)
0887 90 format (3(1pe10.3))
0888 15 continue
0889 close(11)
0890
0891
0892 do 10 iq = 1, nq
0893 do 20 ix = 1, nx-1
0894 xbs = xb(ix)**0.2
0895 xb1 = 1.-xb(ix)
0896 xf2lf(ix,iq) = strfct(1,iq,ix) / xb1**3 * xbs
0897 xf2cf(ix,iq) = strfct(2,iq,ix) / xb1**7 * xbs
0898 xf2bf(ix,iq) = strfct(3,iq,ix) / xb1**7 * xbs
0899 20 continue
0900 xf2lf(nx,iq) = 0.e0
0901 xf2cf(nx,iq) = 0.e0
0902 xf2bf(nx,iq) = 0.e0
0903 10 continue
0904 na(1) = nx
0905 na(2) = nq
0906 do 30 ix = 1, nx
0907 arrf(ix) = dlog(xb(ix))
0908 30 continue
0909 do 40 iq = 1, nq
0910 arrf(nx+iq) = dlog(qs(iq))
0911 40 continue
0912
0913
0914
0915 16 continue
0916
0917
0918 xt(1) = dlog(x)
0919 xt(2) = dlog(q2)
0920 x1 = 1.- x
0921 xs = x**(-0.2)
0922 f2l = fint(narg,xt,na,arrf,xf2lf) * x1**3 * xs
0923 f2c = fint(narg,xt,na,arrf,xf2cf) * x1**7 * xs
0924 f2b = fint(narg,xt,na,arrf,xf2bf) * x1**7 * xs
0925 f2 = f2l + f2c + f2b
0926
0927 return
0928 end
0929
0930
0931 double precision function fint(narg,arg,nent,ent,table)
0932
0933
0934
0935
0936
0937 implicit double precision (a-h, o-z)
0938 dimension arg(narg),nent(narg),ent(*),table(*)
0939 dimension d(5),ncomb(5),ient(5)
0940
0941 kd=1
0942 m=1
0943 ja=1
0944
0945 do 5 ii=1,narg
0946 ncomb(ii)=1
0947 jb=ja-1+nent(ii)
0948 do 2 j=ja,jb
0949 if (arg(ii).le.ent(j)) go to 3
0950 2 continue
0951 j=jb
0952 3 if (j.ne.ja) go to 4
0953 j=j+1
0954 4 jr=j-1
0955 d(ii)=(ent(j)-arg(ii))/(ent(j)-ent(jr))
0956 ient(ii)=j-ja
0957 kd=kd+ient(ii)*m
0958 m=m*nent(ii)
0959 ja=jb+1
0960 5 continue
0961
0962 fint=0.
0963 10 fac=1.
0964 iadr=kd
0965 ifadr=1
0966
0967 do 15 i=1,narg
0968 if (ncomb(i).eq.0) go to 12
0969 fac=fac*(1.-d(i))
0970 go to 15
0971 12 fac=fac*d(i)
0972 iadr=iadr-ifadr
0973 ifadr=ifadr*nent(i)
0974 15 continue
0975
0976 fint=fint+fac*table(iadr)
0977 il=narg
0978 40 if (ncomb(il).eq.0) go to 80
0979 ncomb(il)=0
0980 if (il.eq.narg) go to 10
0981 il=il+1
0982 do 50 k=il,narg
0983 50 ncomb(k)=1
0984 go to 10
0985 80 il=il-1
0986 if(il.ne.0) go to 40
0987
0988 return
0989 end
0990
0991
0992 double precision function alpgrv(q2, naord)
0993
0994
0995
0996
0997
0998
0999
1000
1001
1002
1003
1004 implicit double precision (a - z)
1005 integer nf, k, i, naord
1006 dimension lambdal (3:6), lambdan (3:6), q2thr (3)
1007
1008
1009 data q2thr / 1.960, 20.25, 30625. /
1010 data lambdal / 0.2041, 0.1750, 0.1320, 0.0665 /
1011 data lambdan / 0.2994, 0.2460, 0.1677, 0.0678 /
1012
1013
1014 nf = 3
1015 do 10 k = 1, 3
1016 if (q2 .gt. q2thr (k)) then
1017 nf = nf + 1
1018 else
1019 go to 20
1020 end if
1021 10 continue
1022
1023
1024 20 b0 = 11.- 2./3.* nf
1025 b1 = 102.- 38./3.* nf
1026 b10 = b1 / (b0*b0)
1027 if (naord .eq. 1) then
1028 lam2 = lambdal (nf) * lambdal (nf)
1029 alp = 1./(b0 * dlog (q2/lam2))
1030 go to 1
1031 else if (naord .eq. 2) then
1032 lam2 = lambdan (nf) * lambdan (nf)
1033 b1 = 102.- 38./3.* nf
1034 b10 = b1 / (b0*b0)
1035 else
1036 write (6,91)
1037 91 format ('invalid choice for order in alpha_s')
1038 stop
1039 end if
1040
1041
1042 lq2 = dlog (q2 / lam2)
1043 alp = 1./(b0*lq2) * (1.- b10*dlog(lq2)/lq2)
1044
1045
1046 do 2 i = 1, 6
1047 xl = dlog (1./(b0*alp) + b10)
1048 xlp = dlog (1./(b0*alp*1.01) + b10)
1049 xlm = dlog (1./(b0*alp*0.99) + b10)
1050 y = lq2 - 1./ (b0*alp) + b10 * xl
1051 y1 = (- 1./ (b0*alp*1.01) + b10 * xlp
1052 1 + 1./ (b0*alp*0.99) - b10 * xlp) / (0.02d0*alp)
1053 alp = alp - y/y1
1054 2 continue
1055
1056
1057 1 alpgrv = alp
1058 return
1059 end
1060
1061 subroutine mrstlo(x,q,mode,upv,dnv,usea,dsea,str,chm,bot,glu)
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081 implicit real*8(a-h,o-z)
1082 data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
1083 q2=q*q
1084 if(q2.lt.qsqmin.or.q2.gt.qsqmax) print *, 99,q2
1085 if(x.lt.xmin.or.x.gt.xmax) print *, 98,x
1086 if(mode.eq.1) then
1087 call mrst1(x,q2,upv,dnv,usea,dsea,str,chm,bot,glu)
1088 endif
1089
1090
1091 return
1092 end
1093
1094 subroutine mrst1(x,qsq,upv,dnv,usea,dsea,str,chm,bot,glu)
1095 implicit real*8(a-h,o-z)
1096 parameter(nx=49,nq=37,np=8,nqc0=2,nqb0=11,nqc=35,nqb=26)
1097 real*8 f1(nx,nq),f2(nx,nq),f3(nx,nq),f4(nx,nq),f5(nx,nq),
1098 .f6(nx,nq),f7(nx,nq),f8(nx,nq),fc(nx,nqc),fb(nx,nqb)
1099 real*8 qq(nq),xx(nx),cc1(nx,nq,4,4),cc2(nx,nq,4,4),
1100 .cc3(nx,nq,4,4),cc4(nx,nq,4,4),cc6(nx,nq,4,4),cc8(nx,nq,4,4),
1101 .ccc(nx,nqc,4,4),ccb(nx,nqb,4,4)
1102 real*8 xxl(nx),qql(nq),qqlc(nqc),qqlb(nqb)
1103 data xx/1d-5,2d-5,4d-5,6d-5,8d-5,
1104 . 1d-4,2d-4,4d-4,6d-4,8d-4,
1105 . 1d-3,2d-3,4d-3,6d-3,8d-3,
1106 . 1d-2,1.4d-2,2d-2,3d-2,4d-2,6d-2,8d-2,
1107 . .1d0,.125d0,.15d0,.175d0,.2d0,.225d0,.25d0,.275d0,
1108 . .3d0,.325d0,.35d0,.375d0,.4d0,.425d0,.45d0,.475d0,
1109 . .5d0,.525d0,.55d0,.575d0,.6d0,.65d0,.7d0,.75d0,
1110 . .8d0,.9d0,1d0/
1111 data qq/1.25d0,1.5d0,2d0,2.5d0,3.2d0,4d0,5d0,6.4d0,8d0,1d1,
1112 . 1.2d1,1.8d1,2.6d1,4d1,6.4d1,1d2,
1113 . 1.6d2,2.4d2,4d2,6.4d2,1d3,1.8d3,3.2d3,5.6d3,1d4,
1114 . 1.8d4,3.2d4,5.6d4,1d5,1.8d5,3.2d5,5.6d5,1d6,
1115 . 1.8d6,3.2d6,5.6d6,1d7/
1116 data xmin,xmax,qsqmin,qsqmax/1d-5,1d0,1.25d0,1d7/
1117 data init/0/
1118 save
1119 xsave=x
1120 q2save=qsq
1121 if(init.ne.0) goto 10
1122 open(unit=33,file='lo2002.dat',status='old')
1123 do 20 n=1,nx-1
1124 do 20 m=1,nq
1125 read(33,50)f1(n,m),f2(n,m),f3(n,m),f4(n,m),
1126 . f5(n,m),f7(n,m),f6(n,m),f8(n,m)
1127
1128 20 continue
1129 do 40 m=1,nq
1130 f1(nx,m)=0.d0
1131 f2(nx,m)=0.d0
1132 f3(nx,m)=0.d0
1133 f4(nx,m)=0.d0
1134 f5(nx,m)=0.d0
1135 f6(nx,m)=0.d0
1136 f7(nx,m)=0.d0
1137 f8(nx,m)=0.d0
1138 40 continue
1139 do n=1,nx
1140 xxl(n)=dlog(xx(n))
1141 enddo
1142 do m=1,nq
1143 qql(m)=dlog(qq(m))
1144 enddo
1145
1146 call jeppe1(nx,nq,xxl,qql,f1,cc1)
1147 call jeppe1(nx,nq,xxl,qql,f2,cc2)
1148 call jeppe1(nx,nq,xxl,qql,f3,cc3)
1149 call jeppe1(nx,nq,xxl,qql,f4,cc4)
1150 call jeppe1(nx,nq,xxl,qql,f6,cc6)
1151 call jeppe1(nx,nq,xxl,qql,f8,cc8)
1152
1153 emc2=2.045
1154 emb2=18.5
1155
1156 do 44 m=1,nqc
1157 qqlc(m)=qql(m+nqc0)
1158 do 44 n=1,nx
1159 fc(n,m)=f5(n,m+nqc0)
1160 44 continue
1161 qqlc(1)=dlog(emc2)
1162 call jeppe1(nx,nqc,xxl,qqlc,fc,ccc)
1163
1164 do 45 m=1,nqb
1165 qqlb(m)=qql(m+nqb0)
1166 do 45 n=1,nx
1167 fb(n,m)=f7(n,m+nqb0)
1168 45 continue
1169 qqlb(1)=dlog(emb2)
1170 call jeppe1(nx,nqb,xxl,qqlb,fb,ccb)
1171
1172
1173 init=1
1174 10 continue
1175
1176 xlog=dlog(x)
1177 qsqlog=dlog(qsq)
1178
1179 call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc1,upv)
1180 call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc2,dnv)
1181 call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc3,glu)
1182 call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc4,usea)
1183 call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc6,str)
1184 call jeppe2(xlog,qsqlog,nx,nq,xxl,qql,cc8,dsea)
1185
1186 chm=0.d0
1187 if(qsq.gt.emc2) then
1188 call jeppe2(xlog,qsqlog,nx,nqc,xxl,qqlc,ccc,chm)
1189 endif
1190
1191 bot=0.d0
1192 if(qsq.gt.emb2) then
1193 call jeppe2(xlog,qsqlog,nx,nqb,xxl,qqlb,ccb,bot)
1194 endif
1195
1196 x=xsave
1197 qsq=q2save
1198
1199 close(33)
1200
1201 return
1202 50 format(8f10.5)
1203 end
1204
1205 subroutine jeppe1(nx,my,xx,yy,ff,cc)
1206 implicit real*8(a-h,o-z)
1207 parameter(nnx=49,mmy=37)
1208 dimension xx(nx),yy(my),ff(nx,my),ff1(nnx,mmy),ff2(nnx,mmy),
1209 xff12(nnx,mmy),yy0(4),yy1(4),yy2(4),yy12(4),z(16),
1210 xcl(16),cc(nx,my,4,4),iwt(16,16)
1211
1212 data iwt/1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1213 x 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
1214 x -3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0,
1215 x 2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0,
1216 x 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
1217 x 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
1218 x 0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1,
1219 x 0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1,
1220 x -3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0,
1221 x 0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0,
1222 x 9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2,
1223 x -6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2,
1224 x 2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
1225 x 0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0,
1226 x -6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1,
1227 x 4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1/
1228
1229
1230 do 42 m=1,my
1231 dx=xx(2)-xx(1)
1232 ff1(1,m)=(ff(2,m)-ff(1,m))/dx
1233 dx=xx(nx)-xx(nx-1)
1234 ff1(nx,m)=(ff(nx,m)-ff(nx-1,m))/dx
1235 do 41 n=2,nx-1
1236 ff1(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff(n-1,m),ff(n,m),
1237 xff(n+1,m))
1238 41 continue
1239 42 continue
1240
1241 do 44 n=1,nx
1242 dy=yy(2)-yy(1)
1243 ff2(n,1)=(ff(n,2)-ff(n,1))/dy
1244 dy=yy(my)-yy(my-1)
1245 ff2(n,my)=(ff(n,my)-ff(n,my-1))/dy
1246 do 43 m=2,my-1
1247 ff2(n,m)=polderiv(yy(m-1),yy(m),yy(m+1),ff(n,m-1),ff(n,m),
1248 xff(n,m+1))
1249 43 continue
1250 44 continue
1251
1252 do 46 m=1,my
1253 dx=xx(2)-xx(1)
1254 ff12(1,m)=(ff2(2,m)-ff2(1,m))/dx
1255 dx=xx(nx)-xx(nx-1)
1256 ff12(nx,m)=(ff2(nx,m)-ff2(nx-1,m))/dx
1257 do 45 n=2,nx-1
1258 ff12(n,m)=polderiv(xx(n-1),xx(n),xx(n+1),ff2(n-1,m),ff2(n,m),
1259 xff2(n+1,m))
1260 45 continue
1261 46 continue
1262
1263 do 53 n=1,nx-1
1264 do 52 m=1,my-1
1265 d1=xx(n+1)-xx(n)
1266 d2=yy(m+1)-yy(m)
1267 d1d2=d1*d2
1268
1269 yy0(1)=ff(n,m)
1270 yy0(2)=ff(n+1,m)
1271 yy0(3)=ff(n+1,m+1)
1272 yy0(4)=ff(n,m+1)
1273
1274 yy1(1)=ff1(n,m)
1275 yy1(2)=ff1(n+1,m)
1276 yy1(3)=ff1(n+1,m+1)
1277 yy1(4)=ff1(n,m+1)
1278
1279 yy2(1)=ff2(n,m)
1280 yy2(2)=ff2(n+1,m)
1281 yy2(3)=ff2(n+1,m+1)
1282 yy2(4)=ff2(n,m+1)
1283
1284 yy12(1)=ff12(n,m)
1285 yy12(2)=ff12(n+1,m)
1286 yy12(3)=ff12(n+1,m+1)
1287 yy12(4)=ff12(n,m+1)
1288
1289 do 47 k=1,4
1290 z(k)=yy0(k)
1291 z(k+4)=yy1(k)*d1
1292 z(k+8)=yy2(k)*d2
1293 z(k+12)=yy12(k)*d1d2
1294 47 continue
1295
1296 do 49 l=1,16
1297 xxd=0.
1298 do 48 k=1,16
1299 xxd=xxd+iwt(k,l)*z(k)
1300 48 continue
1301 cl(l)=xxd
1302 49 continue
1303 l=0
1304 do 51 k=1,4
1305 do 50 j=1,4
1306 l=l+1
1307 cc(n,m,k,j)=cl(l)
1308 50 continue
1309 51 continue
1310 52 continue
1311 53 continue
1312 return
1313 end
1314
1315 subroutine jeppe2(x,y,nx,my,xx,yy,cc,z)
1316 implicit real*8(a-h,o-z)
1317 dimension xx(nx),yy(my),cc(nx,my,4,4)
1318
1319 n=locx(xx,nx,x)
1320 m=locx(yy,my,y)
1321
1322 t=(x-xx(n))/(xx(n+1)-xx(n))
1323 u=(y-yy(m))/(yy(m+1)-yy(m))
1324
1325 z=0.
1326 do 1 l=4,1,-1
1327 z=t*z+((cc(n,m,l,4)*u+cc(n,m,l,3))*u
1328 . +cc(n,m,l,2))*u+cc(n,m,l,1)
1329 1 continue
1330 return
1331 end
1332
1333 integer function locx(xx,nx,x)
1334 implicit real*8(a-h,o-z)
1335 dimension xx(nx)
1336 if(x.le.xx(1)) then
1337 locx=1
1338 return
1339 endif
1340 if(x.ge.xx(nx)) then
1341 locx=nx-1
1342 return
1343 endif
1344 ju=nx+1
1345 jl=0
1346 1 if((ju-jl).le.1) go to 2
1347 jm=(ju+jl)/2
1348 if(x.ge.xx(jm)) then
1349 jl=jm
1350 else
1351 ju=jm
1352 endif
1353 go to 1
1354 2 locx=jl
1355 return
1356 end
1357
1358 real*8 function polderiv(x1,x2,x3,y1,y2,y3)
1359 implicit real*8(a-h,o-z)
1360 polderiv=(x3*x3*(y1-y2)-2.0*x2*(x3*(y1-y2)+x1*
1361 .(y2-y3))+x2*x2*(y1-y3)+x1*x1*(y2-y3))/((x1-x2)*(x1-x3)*(x2-x3))
1362 return
1363 end
1364
1365 double precision function alpmsrt(scale,lambda,iorder)
1366
1367
1368
1369
1370
1371
1372
1373
1374 implicit real*8 (a-h,o-z)
1375 real*8 lambda
1376 data tol,qsct,qsdt/5d-4,74d0,8.18d0/
1377
1378
1379 alpmsrt =0.
1380
1381 pi=4d0*datan(1d0)
1382 iord=iorder
1383 ith=0
1384 flav=4d0
1385 al=lambda
1386 al2=lambda*lambda
1387 qs=scale*scale
1388 t=dlog(qs/al2)
1389 tt=t
1390
1391 qsctt=qsct/4.
1392 qsdtt=qsdt/4.
1393 if(qs.lt.0.5d0) then !! running stops below 0.5
1394 qs=0.5d0
1395 t=dlog(qs/al2)
1396 tt=t
1397 endif
1398
1399 alfqc5=0.
1400 alfqc4=0.
1401 alfqc3=0.
1402
1403 if(qs.gt.qsctt) go to 12
1404 if(qs.lt.qsdtt) go to 312
1405 11 continue
1406 b0=11-2.*flav/3.
1407 x1=4.*pi/b0
1408 5 continue
1409 if(iord.eq.0) then
1410 alpmsrt=x1/t
1411 elseif(iord.eq.1) then
1412 b1=102.-38.*flav/3.
1413 x2=b1/b0**2
1414 as2=x1/t*(1.-x2*dlog(t)/t)
1415 95 as=as2
1416 f=-t+x1/as-x2*dlog(x1/as+x2)
1417 fp=-x1/as**2*(1.-x2/(x1/as+x2))
1418 as2=as-f/fp
1419 del=abs(f/fp/as)
1420 if((del-tol).gt.0.) go to 95
1421 alpmsrt=as2
1422 elseif(iord.eq.2) then
1423 alpmsrt=qwikalf(t,2,flav)
1424 endif
1425 if(ith.eq.0) return
1426 go to (13,14,15) ith
1427 print *, 'here'
1428 go to 5
1429 12 ith=1
1430 t=dlog(qsctt/al2)
1431 go to 11
1432 13 alfqc4=alpmsrt
1433 flav=5.
1434 ith=2
1435 go to 11
1436 14 alfqc5=alpmsrt
1437 ith=3
1438 t=tt
1439 go to 11
1440 15 alfqs5=alpmsrt
1441 alfinv=1./alfqs5+1./alfqc4-1./alfqc5
1442 alpmsrt=1./alfinv
1443 return
1444
1445 311 continue
1446 b0=11-2.*flav/3.
1447 x1=4.*pi/b0
1448 if(iord.eq.0) then
1449 alpmsrt=x1/t
1450 elseif(iord.eq.1) then
1451 b1=102.-38.*flav/3.
1452 x2=b1/b0**2
1453 as2=x1/t*(1.-x2*dlog(t)/t)
1454 35 as=as2
1455 f=-t+x1/as-x2*dlog(x1/as+x2)
1456 fp=-x1/as**2*(1.-x2/(x1/as+x2))
1457 as2=as-f/fp
1458 del=abs(f/fp/as)
1459 if((del-tol).gt.0.) go to 35
1460 elseif(iord.eq.2) then
1461 alpmsrt=qwikalf(t,2,flav)
1462 endif
1463 if(ith.eq.0) return
1464
1465 go to (313,314,315) ith
1466 312 ith=1
1467 t=dlog(qsdtt/al2)
1468 go to 311
1469 313 alfqc4=alpmsrt
1470 flav=3.
1471 ith=2
1472 go to 311
1473 314 alfqc3=alpmsrt
1474 ith=3
1475 t=tt
1476 go to 311
1477 315 alfqs3=alpmsrt
1478 alfinv=1./alfqs3+1./alfqc4-1./alfqc3
1479 alpmsrt=1./alfinv
1480 return
1481 end
1482
1483 double precision function qwikalf(t,iord,flav)
1484 implicit real*8(a-h,o-z)
1485 dimension z3(6),z4(6),z5(6),zz3(6),zz4(6),zz5(6)
1486 data z3/ -.161667e+01,0.954244e+01,
1487 .0.768623e+01,0.101523e+00,-.360127e-02,0.457867e-04/
1488 data z4/ -.172239e+01,0.831185e+01,
1489 .0.721463e+01,0.835531e-01,-.285436e-02,0.349129e-04/
1490 data z5/ -.872190e+00,0.572816e+01,
1491 .0.716119e+01,0.195884e-01,-.300199e-03,0.151741e-05/
1492 data zz3/-.155611e+02,0.168406e+02,
1493 .0.603014e+01,0.257682e+00,-.970217e-02,0.127628e-03/
1494 data zz4/-.106762e+02,0.118497e+02,0.664964e+01,
1495 .0.112996e+00,-.317551e-02,0.302434e-04/
1496 data zz5/-.531860e+01,0.708503e+01,0.698352e+01,
1497 .0.274170e-01,-.426894e-03,0.217591e-05/
1498 data pi/3.14159/
1499 nfm2=flav-2.
1500 x=dsqrt(t)
1501 x2=x*x
1502 x3=x*x2
1503 x4=x*x3
1504 x5=x*x4
1505 go to (1,2) iord !!iord change!!
1506 1 go to (3,4,5) nfm2
1507 3 y=z3(1)+z3(2)*x+z3(3)*x2+z3(4)*x3+z3(5)*x4+z3(6)*x5
1508 go to 10
1509 4 y=z4(1)+z4(2)*x+z4(3)*x2+z4(4)*x3+z4(5)*x4+z4(6)*x5
1510 go to 10
1511 5 y=z5(1)+z5(2)*x+z5(3)*x2+z5(4)*x3+z5(5)*x4+z5(6)*x5
1512 go to 10
1513 2 go to (6,7,8) nfm2
1514 6 y=zz3(1)+zz3(2)*x+zz3(3)*x2+zz3(4)*x3+zz3(5)*x4+zz3(6)*x5
1515 go to 10
1516 7 y=zz4(1)+zz4(2)*x+zz4(3)*x2+zz4(4)*x3+zz4(5)*x4+zz4(6)*x5
1517 go to 10
1518 8 y=zz5(1)+zz5(2)*x+zz5(3)*x2+zz5(4)*x3+zz5(5)*x4+zz5(6)*x5
1519 go to 10
1520 10 qwikalf=4.*pi/y
1521 return
1522 end