Corrected path to mapping libraries.
[u/mrichter/AliRoot.git] / PDF / tpdf / testpdg.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.3  2000/04/19 13:30:02  mclareni
6 * Import version 8.04
7 *
8 * Revision 1.2  2000/04/09 10:06:56  plothow
9 * new version 8.00 - MRS 98 and 99, CTEQ5 and GRV98 added
10 *
11 * Revision 1.1.1.1  1996/04/12 15:30:17  plothow
12 * Version 7.01
13 *
14 *
15 #include "pdf/pilot.h"
16       PROGRAM TESTPDG
17 C
18       PARAMETER (LFLPRT = 2)
19 #include "pdf/w5051p2.inc"
20 #include "pdf/w5051p7.inc"
21 #include "pdf/w50510.inc"
22 #include "pdf/w50511.inc"
23 #include "pdf/w50512.inc"
24 #include "pdf/w50515.inc"
25 #include "pdf/w50516.inc"
26 #include "pdf/w50517.inc"
27 #include "pdf/w505110.inc"
28 #include "pdf/w505120.inc"
29 #include "pdf/w505122.inc"
30 C
31 #include "pdf/expdp.inc"
32      +       DX,DQ,DXPDF(-6:6),
33      +       ALF,ALPHAS2
34       REAL    X, Q, UPV, DNV, USEA, DSEA, SSEA, CSEA, BOT, TOP, GLUE
35       DIMENSION XX(5),Q2(5)
36       CHARACTER*20 PARM(NCHDIM)
37 #include "pdf/expdp.inc"
38      +       VAL(NCHDIM)
39 C
40       DATA NXX,XX/5, .002,.140,.700,0.01,0.05/
41       DATA NQ2,Q2/5, 1.30,24.0,33.5,200.0,200.0/
42 C
43       N6 = L6
44       IFLPRT = LFLPRT
45 C
46       CH1=4./9.
47       CH2=1./9.
48 C
49       SCAL=SQRT(Q2(2))
50 C
51 C First call to PDFSET to initialize COMMON/W505120/
52       PARM(1) = 'Init0'
53       VAL(1)  = 0.D0
54       CALL PDFSET(PARM,VAL)
55 C.
56 C Test new PDFLIB versions (4.0 or bigger)
57       DO KPTY = 1,NPTYMX
58          DO KGRO = 1,NGRMAX
59             IF(NPGSMX(KPTY,KGRO) .EQ. 0) GOTO 400
60             DO ISET=-9,NPGSMX(KPTY,KGRO)
61                IF((KPTY*KGRO).NE.1 .AND. ISET.LE.0) GOTO 300
62                WRITE (N6,*) ' ==========================================
63      +============================================'
64                FIRST=.TRUE.
65                IF(ISET.LE.-8) IFLSET = 0
66                IF(ISET.LT.0) GOTO 50
67                PARM(1) = 'Nptype'
68                VAL(1)  = KPTY
69                PARM(2) = 'Ngroup'
70                VAL(2)  = KGRO
71                PARM(3) = 'Nset'
72                VAL(3)  = ISET
73 C... test different NSET writings
74                IF(ISET.GT. 5) PARM(3) = 'NSET'
75                IF(ISET.GT.10) PARM(3) = 'nset'
76                IF(ISET.GT.15) PARM(3) = 'NSet'
77                IF(ISET.GT.20) PARM(3) = 'nsET'
78 C
79 C... test different NSET writings and INVALID parameter settings
80    50          CONTINUE
81                IF(ISET.GE.0) THEN
82                   CALL PDFSET(PARM,VAL)
83                ELSEIF (ISET.EQ.-9) THEN
84                   GOTO 100
85                ELSEIF (ISET.EQ.-8) THEN
86                   PARM(1) = 'dflm'
87                   VAL(1) = 8.D0
88                   CALL PDFSET(PARM,VAL)
89                ELSEIF (ISET.EQ.-7) THEN
90                   PARM(1) = 'GRV'
91                   VAL(1) = 3.D0
92                   CALL PDFSET(PARM,VAL)
93                ELSEIF (ISET.EQ.-6) THEN
94                   PARM(1) = 'abfkw'
95                   VAL(1) = 1.D0
96                   CALL PDFSET(PARM,VAL)
97                ELSEIF (ISET.EQ.-5) THEN
98                   PARM(1) = 'GRVph'
99                   VAL(1) = 2.D0
100                   CALL PDFSET(PARM,VAL)
101                ELSEIF (ISET.EQ.-4) THEN
102                   PARM(1) = 'Nptype'
103                   VAL(1)  = -1
104                   PARM(2) = 'Ngroup'
105                   VAL(2)  = KGRO
106                   PARM(3) = 'Nset'
107                   VAL(3)  = ISET
108                   CALL PDFSET(PARM,VAL)
109                ELSEIF (ISET.EQ.-3) THEN
110                   PARM(1) = 'Nptype'
111                   VAL(1)  = -1
112                   PARM(2) = 'Ngroup'
113                   VAL(2)  = KGRO
114                   PARM(3) = 'Nset'
115                   VAL(3)  =  0
116                   CALL PDFSET(PARM,VAL)
117                ELSEIF (ISET.EQ.-2) THEN
118                   PARM(1) = 'Nptype'
119                   VAL(1)  = KPTY
120                   PARM(2) = 'Ngroup'
121                   VAL(2)  = -1
122                   PARM(3) = 'Nset'
123                   VAL(3)  = ISET
124                   CALL PDFSET(PARM,VAL)
125                ELSEIF (ISET.EQ.-1) THEN
126                   PARM(1) = 'Nptype'
127                   VAL(1)  = KPTY
128                   PARM(2) = 'Ngroup'
129                   VAL(2)  = KGRO
130                   PARM(3) = 'Nset'
131                   VAL(3)  = 80
132                   CALL PDFSET(PARM,VAL)
133                ENDIF
134 C
135                DQ = SCAL
136                ALF = ALPHAS2(DQ)
137                WRITE(N6,4000) NPTYPE,NGROUP,NSET,
138      +         SFNAME(NPTYPE,NGROUP,NSET),MODECR(NPTYPE,NGROUP,NSET)
139                WRITE(N6,4001) QCDL4,QCDL5,DQ,ALF
140  4000          FORMAT(/,'  Nptype = ',I1,'  Ngroup = ',I2,
141      +                  '  Nset = ',I3,'  Name  = "',A8,
142      +                  '"  CrMode = ',I3)
143  4001          FORMAT(1H ,' QCDL4, QCDL5 = ',2F7.4,
144      +                    '    Scale = ',F8.4,'  alpha(s) = ',F7.5)
145 C
146   100          CONTINUE
147                DO 200 IX=1,NXX
148                X=XX(IX)
149                Q=SQRT(Q2(IX))
150                  DX=X
151                  DQ=Q
152                  CALL PFTOPDG(DX,DQ,DXPDF)
153                  DNV=DXPDF(1)
154                  UPV=DXPDF(2)
155                  DSEA=DXPDF(-1)
156                  USEA=DXPDF(-2)
157                  SSEA=DXPDF(3)
158                  CSEA=DXPDF(4)
159                  GLUE=DXPDF(0)
160 C
161                FFPU = UPV
162                FFPUB = USEA
163                FFPD = DNV
164                FFPDB = DSEA
165                FFPS = SSEA
166                FFPSB = SSEA
167                FFPC = CSEA
168                FFPCB = CSEA
169                FFNU = FFPD
170                FFNUB = FFPDB
171                FFND = FFPU
172                FFNDB = FFPUB
173                FFNS = FFPS
174                FFNSB = FFPSB
175                FFNC = FFPC
176                FFNCB = FFPCB
177                FFPGL = GLUE
178             SFFP=CH1*(FFPU+FFPUB+FFPC+FFPCB)+CH2*(FFPD+FFPDB+FFPS+FFPSB)
179             SFFN=CH1*(FFNU+FFNUB+FFNC+FFNCB)+CH2*(FFND+FFNDB+FFNS+FFNSB)
180                FACNP = 0.
181                IF (SFFP .NE. 0.) FACNP=SFFN/SFFP
182                UP = FFPU
183                UV = FFPU - FFPUB
184                US = FFPUB
185                DP = FFPD
186                DV = FFPD - FFPDB
187                DS = FFPDB
188                GL = FFPGL
189                F2P = SFFP
190 C
191                WRITE(N6,3000)X,Q2(IX),FACNP,UP,UV,US,DP,DV,GL,F2P
192  3000          FORMAT(1X,' X:',F6.3,2X,'Q2:',F5.1,
193      1         3X,'N/P:',F7.4,2X,'UP:',F6.3,
194      1         1X,'UV:',F6.3,1X,'US:',F6.3,1X,'DP:',F6.3,1X,'DV:',F6.3,
195      2         1X,'GL:',F6.3,2X,'F2P:',F7.4)
196 C
197  200           CONTINUE
198 C
199                IF(ISET.EQ.-9) THEN
200                   DQ = SCAL
201                   ALF = ALPHAS2(DQ)
202                   WRITE(N6,4000) NPTYPE,NGROUP,NSET,
203      +            SFNAME(NPTYPE,NGROUP,NSET),MODECR(NPTYPE,NGROUP,NSET)
204                   WRITE(N6,4001) QCDL4,QCDL5,DQ,ALF
205                ENDIF
206                CALL PDFSTA
207 C
208  300           CONTINUE
209              ENDDO
210  400         CONTINUE
211           ENDDO
212        ENDDO
213 C
214       STOP
215       END