1
C*****Butchered by RKE to remove polint and readtbl which are common to
2
C*****Ctq4Fn and Ctq5Pdf
4
C============================================================================
5
C CTEQ Parton Distribution Functions: Version 4
8
C By: H.L. Lai, J. Huston, S. Kuhlmann, F. Olness, J. Owens, D. Soper
10
C Ref: MSUHEP-60426, CTEQ-604, e-Print Archive: hep-ph/9606399
12
C This package contains 9 sets of CTEQ4 PDF's. Details are:
13
C ---------------------------------------------------------------------------
14
C Iset PDF Description Alpha_s(Mz) Q0(GeV) Table_File
15
C ---------------------------------------------------------------------------
16
C 1 CTEQ4M Standard MSbar scheme 0.116 1.6 cteq4m.tbl
17
C 2 CTEQ4D Standard DIS scheme 0.116 1.6 cteq4d.tbl
18
C 3 CTEQ4L Leading Order 0.116 1.6 cteq4l.tbl
19
C 4 CTEQ4A1 Alpha_s series 0.110 1.6 cteq4a1.tbl
20
C 5 CTEQ4A2 Alpha_s series 0.113 1.6 cteq4a2.tbl
21
C 6 CTEQ4A3 same as CTEQ4M 0.116 1.6 cteq4m.tbl
22
C 7 CTEQ4A4 Alpha_s series 0.119 1.6 cteq4a4.tbl
23
C 8 CTEQ4A5 Alpha_s series 0.122 1.6 cteq4a5.tbl
24
C 9 CTEQ4HJ High Jet 0.116 1.6 cteq4hj.tbl
25
C 10 CTEQ4LQ Low Q0 0.114 0.7 cteq4lq.tbl
26
C ---------------------------------------------------------------------------
28
C The available applied range is 10^-5 < x < 1 and 1.6 < Q < 10,000 (GeV)
29
C except CTEQ4LQ for which Q starts at a lower value of 0.7 GeV.
30
C The Table_Files are assumed to be in the working directory.
32
C The function Ctq4Fn (Iset, Iparton, X, Q)
33
C returns the parton distribution inside the proton for parton [Iparton]
34
C at [X] Bjorken_X and scale [Q] (GeV) in PDF set [Iset].
35
C Iparton is the parton label (5, 4, 3, 2, 1, 0, -1, ......, -5)
36
C for (b, c, s, d, u, g, u_bar, ..., b_bar)
38
C For detailed information on the parameters used, e.q. quark masses,
39
C QCD Lambda, ... etc., see info lines at the beginning of the
42
C These programs, as provided, are in double precision. By removing the
43
C "Implicit Double Precision" lines, they can also be run in single
46
C If you have detailed questions concerning these CTEQ4 distributions,
47
C or if you find problems/bugs using this package, direct inquires to
48
C Hung-Liang Lai(Lai_H@pa.msu.edu) or Wu-Ki Tung(Tung@pa.msu.edu).
50
C===========================================================================
52
Function Ctq4Fn (Iset, Iparton, X, Q)
53
Implicit Double Precision (A-H,O-Z)
54
Character Flnm(10)*11,TableFile*40
57
> / CtqPar2 / Nx, Nt, NfMx
58
> / QCDtable / Alambda, Nfl, Iorder
59
Data (Flnm(I), I=1,10)
60
> / 'cteq4m.tbl ', 'cteq4d.tbl ', 'cteq4l.tbl '
61
> , 'cteq4a1.tbl', 'cteq4a2.tbl', 'cteq4m.tbl ', 'cteq4a4.tbl'
62
> , 'cteq4a5.tbl', 'cteq4hj.tbl', 'cteq4lq.tbl' /
63
Data Isetold, Isetmin, Isetmax / -987, 1, 10 /
66
C If data file not initialized, do so.
67
If(Iset.ne.Isetold) then
68
If (Iset.lt.Isetmin .or. Iset.gt.Isetmax) Then
69
Print *, 'Invalid Iset number in Ctq4Fn :', Iset
73
c Open(IU, File='Pdfdata/'//Flnm(Iset), Status='OLD', Err=100)
75
call OpenData(TableFile)
76
c write (*,*) TableFile
83
If (X .lt. 0D0 .or. X .gt. 1D0) Then
84
Print *, 'X out of range in Ctq4Fn: ', X
87
If (Q .lt. Alambda) Then
88
Print *, 'Q out of range in Ctq4Fn: ', Q
91
If (Iparton .lt. -NfMx .or. Iparton .gt. NfMx) Then
92
Print *, 'Iparton out of range in Ctq4Fn: ', Iparton
96
Ctq4Fn = PartonX (Iparton, X, Q)
97
if(Ctq4Fn.lt.0.D0) Ctq4Fn = 0.D0
101
100 Print *, ' Data file ', Flnm(Iset), ' cannot be opened '
104
C ********************
108
C Returns an unallocated FORTRAN i/o unit.
112
INQUIRE (UNIT=N, OPENED=EX)
118
Stop ' There is no available I/O unit. '
119
C *************************