1
c Interface to pdflib routines, version 4.00 and beyond (PDF set
2
c is identified by three parameters, NPTYPE, NGROUP, NSET).
3
c Includes also electron distribution functions of the jet package
4
c Modified on 8/11/01, since pdflib version 8.04 has in one case
5
c 100 pdf sets for one author group. Bug relevant to special treatment
6
c of AFG set fixed on 24/10/05 (603->6003)
8
subroutine mlmpdf(mode,ih,q2,x,fx,nf)
9
implicit real * 8 (a-h,o-z)
10
real * 4 q2,x,fx(-nf:nf)
11
common/trans/nptype,ngroup,nset
12
c set print flag. Set iflprt=2 in order to print the content
13
c of the common blocks w50511, w50512, and w50513
15
c x*pdf(x) in PDG format
20
character * 20 parm(20)
22
data ini/.true./,imode/0/
24
if(x.le.0.or.x.ge.1) then
31
c incoming particle is not an electron: use PDFLIB
32
if(ini.or.imode.ne.mode) then
35
c pass from our conventions to PDFLIB conventions for parameter settings.
36
c See subroutine newmode for comments on the conventions adopted
48
call pftopdg(xd,qd,fxp)
49
c in our conventions 1=up, 2=down; PDFLIB 1=down, 2=up. With
50
c f(1)<-->f(2) we mean also f(-1)<-->f(-2)
51
c in the following lines, deals with particles only (no antiparticles)
52
c proton(ih=1) ==> f(1)<-->f(2)
53
c neutron(ih=2) ==> no action (f(1)<-->f(2) for PDFLIB convention and
54
c f(1)<-->f(2) for isospin symmetry (u_proton=d_neutron....)
55
c pion+(ih=3) ==> f(2)<-->f(-2), since PDFLIB has d=u=q_v+q_sea,
57
c photon(ih=4) ==> f(-1)<-->f(-2) and f(i)=f(-i)/2, i=1,2 since PDFLIB
58
c has f(i)=2*f(-i), and f(1)<-->f(2)
59
c Notice that in the jet package pions and neutrons are not used. If
60
c selected, they are rejected by the routine pdfpar. This routine
61
c is therefore a completely general interface with PDFLIB
69
elseif(abs(ih).eq.2) then
71
elseif(abs(ih).eq.3) then
75
elseif(abs(ih).eq.4) then
83
va = (fxp(1)+fxp(2))/2
84
sea = (fxp(-1)+fxp(-2))/2
90
write(*,*) ' ih was', ih,' instead of 0, +-1, +-2, +-3, or 4'
93
c for particles, ich=1, for antiparticles, ich=-1
99
c divide by x and exchange q with qbar in the case of antiparticles
101
fx(j) = sngl(fxp(j*ich)/xd)
103
c correct for a bug in PDFLIB specific to AFG densities in the photon
104
if(ih.eq.4.and.mode.eq.6003)then
106
if(j.ne.0)fx(j)=fx(j)/2.d0
110
c incoming "hadron" is an electron
111
if(ini.or.imode.ne.mode) then
117
call elpdf_lac1(q2,x,fx,nf)
118
elseif(iset.eq.2) then
119
call elpdf_grv(q2,x,fx,nf)
120
elseif(iset.eq.3) then
121
call elpdf_user(q2,x,fx,nf)
123
write(*,*)'Electron set non implemented'
131
subroutine pdfpar(mode,ih,xlam,scheme,iret)
132
implicit real * 8 (a-h,o-z)
133
common/trans/nptype,ngroup,nset
134
common/w50512/qcdl4,qcdl5
135
character*10 pdfver(3)
136
common/w505190/pdfver
138
character * 20 parm(20)
143
data nopions/.false./
144
c iret#0 when problem occur
147
write(*,*)'This is an interface to PDFLIB'
148
write(*,*)'PDFLIB version number:',pdfver(1)
149
write(*,*)'Released:',pdfver(2)
150
write(*,*)'On:',pdfver(3)
154
if(abs(ih).ne.1.and.ih.ne.4.and.ih.ne.5)then
155
write(*,*) ' hadron tpye ',ih,' not implemented'
160
c fake values. If kept, the main program crashes
163
c incoming particle is not an electron: use PDFLIB
165
c the scheme of the PDFLIB set is not given in any common block.
166
c Set it by hand in the main program
168
call newmode(ih,mode)
175
c print the relevant parameters for the PDF set chosen
178
call pdfset(parm,val)
179
c Lambda_QCD_5, as given by PDFLIB
182
c incoming particle is an electron
186
elseif(mode.eq.52)then
189
elseif(mode.eq.53)then
193
write(*,*)'Electron set not implemented'
202
c prints details of the structure function sets
205
# ' For nucleons, pions and photons, enter the set number'
207
# ,' Set # = 1000*NGROUP+NSET'
209
# ,' where NGROUP and NSET are the parameters of the PDFLIB'
210
# ,' version you are using (please read the user manual of'
211
# ,' your version of PDFLIB to check the listing)'
214
# ' PDFLIB is not maintained by CERN any longer, and the last'
215
# ,' release (version 8.04) included up to MRST99 and CTEQ5 sets'
216
# ,' For more recent sets, we use the following labellings'
218
# ,'Group # Set # Set'
221
# ' 3 101 MRST 2001 NNLO average'
222
# ,' 3 102 MRST 2001 NNLO fast'
223
# ,' 3 103 MRST 2001 NNLO slow'
224
# ,' 3 104 MRST 2001 NNLO jet'
225
# ,' 3 105 MRST 2001 best fit'
226
# ,' 3 106 MRST 2001 low as'
227
# ,' 3 107 MRST 2001 high as'
228
# ,' 3 108 MRST 2001 jet fit'
229
# ,' 3 109 MRST 2001 leading order'
230
# ,' 3 110 MRST 2002 best fit'
231
# ,' 3 111 MRST 2002 NNLO'
232
# ,' 3 112-142 MRST 2002 error sets'
235
# ' 4 55 CTEQ5M1 parametrized version'
239
# ,' 4 59-98 CTEQ6 error sets'
242
# ' 10 1 Alekhin LO nominal ffn'
243
#, ' 10 2 Alekhin LO nominal vfn'
244
#, ' 10 3 Alekhin LO mc=1.75 ffn'
245
#, ' 10 4 Alekhin LO mc=1.75 vfn'
246
#, ' 10 5 Alekhin LO ss ffn'
247
#, ' 10 6 Alekhin LO ss vfn'
248
#, ' 10 7 Alekhin NL nominal ffn'
249
#, ' 10 8 Alekhin NL nominal vfn'
250
#, ' 10 9 Alekhin NL mc=1.75 ffn'
251
#, ' 10 10 Alekhin NL mc=1.75 vfn'
252
#, ' 10 11 Alekhin NL ss ffn'
253
#, ' 10 12 Alekhin NL ss vfn'
254
#, ' 10 13 Alekhin NNL nominal ffn'
255
#, ' 10 14 Alekhin NNL nominal vfn'
256
#, ' 10 15 Alekhin NNL mc=1.75 ffn'
257
#, ' 10 16 Alekhin NNL mc=1.75 vfn'
258
#, ' 10 17 Alekhin NNL ss ffn'
259
#, ' 10 18 Alekhin NNL ss vfn'
260
#, ' 10 19 Alekhin NNL slow ev ffn'
261
#, ' 10 20 Alekhin NNL slow ev vfn'
263
# ' For electrons, use'
269
# ,' 53 user defined'
270
100 format(1x,a,100(/,1x,a))
275
subroutine newmode(ih,mode)
276
c This subroutine converts our conventions for the identification
277
c of a set of PDFs into PDFLIB conventions. We use
283
c nucleons -2,-1,0,1,2 1
287
c Given the particle type, our package uses a single number (MODE)
288
c to identify to PDF set, while PDFLIB uses two numbers (NGROUP and NSET).
289
c The value of MODE which corresponds to the values (NGROUP,NSET)
290
c is by definition given by
292
c MODE=1000*NGROUP+NSET
294
c This is working as long as every group has less the 1000 PDFs sets....
295
implicit real * 8 (a-h,o-z)
296
common/trans/nptype,ngroup,nset
300
elseif(abs(ih).eq.3)then
305
write(6,*)'hadron type not implemented in PDFLIB'
308
ngroup=int(dfloat(mode)/1000.e0)
309
nset=mode-1000*ngroup
314
subroutine pdftomlm(ipdfih,ipdfgroup,ipdfndns,ihmlm,ndnsmlm)
315
c Performs the inverse operation of newmode
316
implicit real * 8 (a-h,o-z)
320
elseif(ipdfih.eq.2)then
322
elseif(ipdfih.eq.3)then
325
write(*,*)'Wrong hadron type in PDFLIB:',ipdfih
328
ndnsmlm=1000*ipdfgroup+ipdfndns
333
subroutine setlhacblk(strin)
334
c It should not be called when this file is linked
335
write(*,*)'Call to setlhacblk must not occur'
340
subroutine getlamlha(xlam,xlamlha)
341
c It should not be called when this file is linked
342
write(*,*)'Call to getlamlha must not occur'
347
C------- ALPHA QCD -------------------------------------
348
c Program to calculate alfa strong with nf flavours,
349
c as a function of lambda with 5 flavors.
350
c The value of alfa is matched at the thresholds q = mq.
351
c When invoked with nf < 0 it chooses nf as the number of
352
c flavors with mass less then q.
354
function alfas(q2,xlam,inf)
355
implicit real * 8 (a-h,o-z)
356
data olam/0.d0/,pi/3.14159d0/
357
data xmb/5.d0/,xmc/1.5d0/
358
if(xlam.ne.olam) then
361
bp5 = (153 - 19*5) / pi / 2 / (33 - 2*5)
363
bp4 = (153 - 19*4) / pi / 2 / (33 - 2*4)
365
bp3 = (153 - 19*3) / pi / 2 / (33 - 2*3)
366
xlc = 2 * log(xmc/xlam)
367
xlb = 2 * log(xmb/xlam)
370
c45 = 1/( 1/(b5 * xlb) - xllb*bp5/(b5 * xlb)**2 )
371
# - 1/( 1/(b4 * xlb) - xllb*bp4/(b4 * xlb)**2 )
372
c35 = 1/( 1/(b4 * xlc) - xllc*bp4/(b4 * xlc)**2 )
373
# - 1/( 1/(b3 * xlc) - xllc*bp3/(b3 * xlc)**2 ) + c45
376
xlq = 2 * log( q/xlam )
380
if( q .gt. xmb ) then
382
elseif( q .gt. xmc ) then
388
if ( nf .eq. 5 ) then
389
alfas = 1/(b5 * xlq) - bp5/(b5 * xlq)**2 * xllq
390
elseif( nf .eq. 4 ) then
391
alfas = 1/( 1/(1/(b4 * xlq) - bp4/(b4 * xlq)**2 * xllq) + c45 )
392
elseif( nf .eq. 3 ) then
393
alfas = 1/( 1/(1/(b3 * xlq) - bp3/(b3 * xlq)**2 * xllq) + c35 )
395
print *,'error in alfa: unimplemented # of light flavours',nf