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