cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c This is version 0.9 of the interpolation routines and tables for getting c the parton helicity densities. With this version you should have c the following tables: c gd_bs1.dat gd_gsb.dat gdcl11.dat gdgps1.dat gdgrv2.dat c gd_bs2.dat gd_gsc.dat gdcl21.dat gdgps2.dat gdnad1.dat c gd_gsa.dat gdbrod.dat gdcl31.dat gdgrv1.dat gdnad2.dat c c This program must be compiled with CERNLIB's interpolation routine DIVDIF. c c The Delta(PDF) are obtained through the function call polgal(npdf,x,q,dpdf). c Input: c NPDF=code selecting the Delta(PDF) choice c X=momentum fraction c q=energy scale in GeV c Output: Is the array DPDF(i) where i=-2,-1,0,1,2,3,4,5 for c partons dbar,ubar,g,u,d,s,c,b; the value is the NUMBER density c for the helicity distribution (as opposed to the momentum density). c Error return codes: c polgal=2 Q value larger that Qmax c polgal=1 x value larger that 1 c polgal=0 successful execution c polgal=-1 x value smaller that 10^-5 c polgal=-2 Q value smaller that Qmin c c Here are the choices for NPDF: c Gehrmann and Stirling [Z.Phys.C65(1995)461] c NPDF=211,212,213 for models A,B,C c Bourrely and Soffer [Nucl.Phys.B445(1995)341] c NPDF=231,232 for models 1 and 2 c Gluck, Reya and Vogelsang [Nucl.Phys. (1990) 347] c NPDF=241,242 for models 1 and 2 c Gupta, et al., [Z.Phys.46(1990)111] c NPDF=121,122 for models 1 and 2 c Cheng and Lai [Phys.Rev.D41(1990)91] c NPDF=111 Delta(d)>0 at x=0.35; c gammag=0.31,Delta(s)=0 at Q0^2=10.7GeV^2 c NPDF=112 Delta(d)>0 at x=0.50; c gammag=0.31,Delta(s)=0 at Q0^2=10.7GeV^2 c NPDF=113 Delta(d)>0 at x=0.75; c gammag=0.31,Delta(s)=0 at Q0^2=10.7GeV^2 c P.M. Nadolsky [Z.Phys.C63(1994)601] c NPDF=191,192 for models 1 and 2 c Brodsky, et al. [Nucl.Phys.B441(1995)197] c NPDF=200 c c To know what UNpolarized PDFs go with each set, consult either the original c references or Glenn A. Ladinsky, A COLLECTION OF POLARIZED PARTON c DENSITIES. MSU-51120 (Jan 1996) 10p. [HEP-PH 9601287] c c Parameter Limits: c The limits on the distributions are best obtained by examining the c appropriate literature above. Keep in mind that the grid used for c each distribution starts at its given initial energy scale found in c the literature. Furthermore, extrapolations in x appear in these c grids, but it is the creators of the distributions who define their c accuracy. The fact that extrapolations are possible here is NOT c an endorsement of their use. c c In this version Qmax=3 TeV and Xmin=10^-5. c c Updates planned for next version: c (1) Include more NPDF choices c (2) Include routines to access parameter values: Lambda(QCD), Q0, etc. c c Created 30 January 1996 by Glenn A. Ladinsky c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc program spnpdf c This is a sample routine for obtaining the Delta(PDF) values. integer npdf,i real*8 dpdf(-2:5),x,q,polgal,val external polgal c npdf=191 x=0.01d0 q=50.0d0 do i=1,10 write(6,'(a9$)') 'Input X> ' read(5,*) x val=polgal(npdf,x,q,dpdf) write(6,*) 'dbar> ',x,q,x*dpdf(-2) write(6,*) 'ubar> ',x,q,x*dpdf(-1) write(6,*) 'gluon> ',x,q,x*dpdf(0) write(6,*) 'u> ',x,q,x*dpdf(1) write(6,*) 'd> ',x,q,x*dpdf(2) write(6,*) 's> ',x,q,x*dpdf(3) write(6,*) 'c> ',x,q,x*dpdf(4) write(6,*) 'b> ',x,q,x*dpdf(5) write(6,*) 'Return Code=',val enddo stop end c real*8 function polgal(npdf,d_x_in,d_q_in,dpdf) c To get linear interpolation use p=1; to get quadratic interpolation use p=2; c note the requirement is that p<6. implicit none integer mqq,nxx parameter (mqq=19,nxx=47) character*6 flist character*10 fname character*70 header logical first integer iq,ix integer nq,nx,i,m,n,ixmin,ixmax,iqmin,iqmax,itmp,j,k,p,npdf real xx(nxx),dp(-2:5,mqq,nxx),qinilg,qmaxlg,delqlg real xaray(6),qaray(6),xcoord(6),qcoord(6),x_in,qlg_in,divdif real*8 d_x_in,d_q_in,qmin,qmax,qm(6),qcdlam(3:6),qlg,dpdf(-2:5) external divdif,flist save xx,first,dp data first/.true./ DATA XX/1.e-5,2.e-5,4.e-5,6.e-5,8.e-5,1.e-4,2.e-4,4.e-4,6.e-4, & 8.e-4,1.e-3,2.e-3,4.e-3,6.e-3,8.e-3,1.e-2,2.e-2,4.e-2,6.e-2, & 8.e-2,.1e0,.125e0,.15e0,.175e0,.2e0,.225e0,.25e0,.275e0, & .3e0,.325e0,.35e0,.375e0,.4e0,.425e0,.45e0,.475e0, & .5e0,.525e0,.55e0,.575e0,.6e0,.65e0,.7e0,.75e0,.8e0,.9e0,1.e0/ if(first) then write(6,*) ' POLGAL: First call--reading input grid' fname=flist(npdf)//'.dat' write(6,*) 'Opening file ',fname open(unit=27,file=fname,status='old') read(27,'(a70)') header read(27,*) qmin,qmax,qinilg,qmaxlg,delqlg read(27,*) qcdlam(3),qcdlam(4),qcdlam(5),qcdlam(6) read(27,*) qm(1),qm(2),qm(3),qm(4),qm(5),qm(6) write(6,*) qmin,qmax,qinilg,qmaxlg,delqlg write(6,*) qcdlam(3),qcdlam(4),qcdlam(5),qcdlam(6) write(6,'(6(g12.6,x))') qm(1),qm(2),qm(3),qm(4),qm(5),qm(6) do i=1,999999 do iq=1,mqq do ix=1,nxx read(27,*,end=1999) dp(-2,iq,ix),dp(-1,iq,ix),dp(0,iq,ix), > dp(1,iq,ix),dp(2,iq,ix),dp(3,iq,ix),dp(4,iq,ix),dp(5,iq,ix) enddo enddo enddo 1999 continue close(27) first=.false. endif x_in=real(d_x_in) qlg=log(d_q_in/qmin) qlg_in=real(qlg) m=int(qlg/delqlg)+1 write(6,*) 'The value Q=',d_q_in,' yielded M=',m n=0 if(x_in.lt.0.1) then do i=1,nxx if(x_in.lt.xx(i)) goto 2000 n=n+1 enddo 2000 continue elseif(x_in.ge.0.1.and.x_in.le.0.6) then n= 21+int((x_in-0.1)/0.025) elseif(x_in.gt.0.6.and.x_in.le.0.8) then n= 20+21+int((x_in-0.6)/0.05) elseif(x_in.gt.0.8.and.x_in.lt.0.9) then n= 45 elseif(x_in.ge.0.9) then n= 46 endif write(6,*) 'The value x=',x_in,' yielded N=',n p=2 if((p-2*int(float(p)/2.0)).eq.0) then itmp=(p+2)/2 else itmp=(p+1)/2 endif ixmin=n-itmp+1 ixmax=n+itmp iqmin=m-itmp+1 iqmax=m+itmp if(ixmin.lt.1) then itmp=1-ixmin ixmin=ixmin+itmp ixmax=ixmax+itmp elseif(ixmax.gt.nxx) then itmp=ixmax-nxx ixmin=ixmin-itmp ixmax=ixmax-itmp endif if(iqmin.lt.1) then itmp=1-iqmin iqmin=iqmin+itmp iqmax=iqmax+itmp elseif(iqmax.gt.mqq) then itmp=iqmax-mqq iqmin=iqmin-itmp iqmax=iqmax-itmp endif nx=ixmax-ixmin+1 nq=iqmax-iqmin+1 do i=-2,5 if(i.ne.0.and.d_q_in.le.qm(abs(i))) then dpdf(i)=0.0d00 else do k=ixmin,ixmax do j=iqmin,iqmax qcoord(j-iqmin+1)=(j-1)*delqlg qaray(j-iqmin+1)=real(dp(i,j,k)) enddo xcoord(k-ixmin+1)=xx(k) xaray(k-ixmin+1)=divdif(qaray,qcoord,nq,qlg_in,p) enddo dpdf(i)=1.d0*divdif(xaray,xcoord,nx,x_in,p) endif enddo polgal=0.d0 if(x_in.gt.1.0) polgal=1 if(x_in.lt.1.0e-5) polgal=-1 if(qlg.lt.0.0d0) polgal=-2 if(d_q_in.gt.qmax) polgal=2 return end character*6 function flist(npdf) integer npdf if(npdf.eq.211) then flist='gd_gsa' elseif(npdf.eq.212) then flist='gd_gsb' elseif(npdf.eq.213) then flist='gd_gsc' elseif(npdf.eq.231) then flist='gd_bs1' elseif(npdf.eq.232) then flist='gd_bs2' elseif(npdf.eq.241) then flist='gdgrv1' elseif(npdf.eq.242) then flist='gdgrv2' elseif(npdf.eq.121) then flist='gdgps1' elseif(npdf.eq.122) then flist='gdgps2' elseif(npdf.eq.111) then flist='gdcl11' elseif(npdf.eq.112) then flist='gdcl21' elseif(npdf.eq.113) then flist='gdcl31' elseif(npdf.eq.191) then flist='gdnad1' elseif(npdf.eq.192) then flist='gdnad2' elseif(npdf.eq.200) then flist='gdbrod' else write(6,*) 'ERROR: No such NPDF ',npdf endif return end