Corrected path to mapping libraries.
[u/mrichter/AliRoot.git] / PDF / tpdf / test_npdf.F
1 #include "pdf/pilot.h"
2       PROGRAM TEST_NPDF
3 C
4       PARAMETER (LFLPRT = 2)
5 #include "pdf/w5051p2.inc"
6 #include "pdf/w5051p7.inc"
7 #include "pdf/w50510.inc"
8 #include "pdf/w50511.inc"
9 #include "pdf/w50511a.inc"
10 #include "pdf/w50512.inc"
11 #include "pdf/w50515.inc"
12 #include "pdf/w50516.inc"
13 #include "pdf/w50517.inc"
14 #include "pdf/w505110.inc"
15 #include "pdf/w505120.inc"
16 #include "pdf/w505122.inc"
17 C
18 #include "pdf/expdp.inc"
19      +       DX,DQ,DUPV,DDNV,DUSEA,DDSEA,DSTR,DCHM,DBOT,DTOP,DGL,
20      +             DUV,DDV,DUS,DDS,DST,DCH,DB,DT,DG,
21      +             RUV,RDV,RUB,RDB,RS,RC,RB,RT,RG,
22      +       DQ2,DP2,DANO,ALF,ALPHAS2
23       REAL   X, Q, UPV, DNV, USEA, DSEA, SSEA, CSEA, BOT, TOP, GLUE
24       REAL   P2, ANO
25       DIMENSION XX(6),Q2(6),ANO(3)
26       CHARACTER*20 PARM(NCHDIM)
27 #include "pdf/expdp.inc"
28      +       VAL(NCHDIM)
29 C
30       DATA NXX,XX/6, .0001,.001,.01,.1,.3,.700/
31       DATA NQ2,Q2/6, 2.25,10000.,39.9,2.25,39.9,39.9/
32       DATA P2/5./
33       DATA IP2/0/
34       DATA ANO/12.,117.,208./
35 C
36       N6 = L6
37       IFLPRT = LFLPRT
38 C
39       CH1=4./9.
40       CH2=1./9.
41 C
42       SCAL=SQRT(Q2(2))
43 C
44 C First call to PDFSET to initialize COMMON/W505120/
45       PARM(1) = 'Init0'
46       VAL(1)  = 0.D0
47       CALL PDFSET(PARM,VAL)
48 C.
49 C Test new PDFLIB versions (4.0 or bigger)
50       KPTY=1
51          DO KGRO = 1,NGRMAX
52             IF(NPGSMX(KPTY,KGRO) .EQ. 0) GOTO 400
53             DO ISET=0,NPGSMX(KPTY,KGRO)
54                IF((KPTY*KGRO).NE.1 .AND. ISET.LE.0) GOTO 300
55                WRITE (N6,*) ' ==========================================
56      +============================================'
57                FIRST=.TRUE.
58                PARM(1) = 'Nptype'
59                VAL(1)  = KPTY
60                PARM(2) = 'Ngroup'
61                VAL(2)  = KGRO
62                PARM(3) = 'Nset'
63                VAL(3)  = ISET
64 C now do the NPDF's
65                   PARM(4) = 'NAtype'
66                   VAL(4)  = 4
67                   PARM(5) = 'NAgroup'
68                   VAL(5)  = 1
69                   PARM(6) = 'NAset'
70                   VAL(6)  = 1
71 C... test different NSET writings
72                IF(ISET.GT. 5) PARM(3) = 'NSET'
73                IF(ISET.GT.10) PARM(3) = 'nset'
74                IF(ISET.GT.15) PARM(3) = 'NSet'
75                IF(ISET.GT.20) PARM(3) = 'nsET'
76 C
77                   CALL PDFSET(PARM,VAL)
78 C
79                DQ = SCAL
80                ALF = ALPHAS2(DQ)
81                WRITE(N6,4000) NPTYPE,NGROUP,NSET,
82      +         SFNAME(NPTYPE,NGROUP,NSET),MODECR(NPTYPE,NGROUP,NSET)
83                WRITE(N6,4001) QCDL4,QCDL5,DQ,ALF
84  4000          FORMAT(/,'  Nptype = ',I1,'  Ngroup = ',I2,
85      +                  '  Nset = ',I3,'  Name  = "',A8,
86      +                  '"  CrMode = ',I3)
87  4001          FORMAT(1H ,' QCDL4, QCDL5 = ',2F7.4,
88      +                    '    Scale = ',F8.4,'  alpha(s) = ',F7.5)
89                WRITE(N6,4002) NATYPE,NAGROUP,NASET,
90      +                        SFNAME(NATYPE,NAGROUP,NASET)
91  4002          FORMAT(/,'  NAtype = ',I1,'  NAgroup = ',I2,
92      +                  '  NAset = ',I3,'  Name  = "',A8,'"')
93 C
94   100          CONTINUE
95                DO IA=1,3
96                IAFL=0
97                DO 200 IX=1,NXX
98                X=XX(IX)
99                Q=SQRT(Q2(IX))
100                  DX=X
101                  DQ=Q
102                  DANO=ANO(IA)
103                     CALL STRUCTA(DX,DQ,DANO,
104      +                    DUPV,DDNV,DUSEA,DDSEA,DSTR,DCHM,DBOT,DTOP,DGL)
105                  UPV=DUPV
106                  DNV=DDNV
107                  USEA=DUSEA
108                  DSEA=DDSEA
109                  SSEA=DSTR
110                  CSEA=DCHM
111                  GLUE=DGL
112 C
113                FFPU = UPV + USEA
114                FFPUB = USEA
115                FFPD = DNV + DSEA
116                FFPDB = DSEA
117                FFPS = SSEA
118                FFPSB = SSEA
119                FFPC = CSEA
120                FFPCB = CSEA
121                FFNU = FFPD
122                FFNUB = FFPDB
123                FFND = FFPU
124                FFNDB = FFPUB
125                FFNS = FFPS
126                FFNSB = FFPSB
127                FFNC = FFPC
128                FFNCB = FFPCB
129                FFPGL = GLUE
130             SFFP=CH1*(FFPU+FFPUB+FFPC+FFPCB)+CH2*(FFPD+FFPDB+FFPS+FFPSB)
131             SFFN=CH1*(FFNU+FFNUB+FFNC+FFNCB)+CH2*(FFND+FFNDB+FFNS+FFNSB)
132                FACNP = 0.
133                IF (SFFP .NE. 0.) FACNP=SFFN/SFFP
134                UP = FFPU
135                UV = FFPU - FFPUB
136                US = FFPUB
137                DP = FFPD
138                DV = FFPD - FFPDB
139                DS = FFPDB
140                GL = FFPGL
141                F2P = SFFP
142 C
143                IF (IAFL.EQ.0) WRITE(N6,2999) ANO(IA)
144  2999          FORMAT(1X,' A:',F5.0)
145                IAFL=1
146                 IF(Q2(IX).LT.100.) THEN
147                WRITE(N6,3000) X,Q2(IX),FACNP,UP,UV,US,DP,DV,GL,F2P
148                 ELSE
149                WRITE(N6,3001) X,Q2(IX),FACNP,UP,UV,US,DP,DV,GL,F2P
150                 ENDIF
151  3000          FORMAT(1X,' X:',F6.3,2X,'Q2:',F6.1,
152      1         3X,'N/P:',F7.4,2X,'UP:',F6.3,
153      1         1X,'UV:',F6.3,1X,'US:',F6.3,1X,'DP:',F6.3,1X,'DV:',F6.3,
154      2         1X,'GL:',F6.3,2X,'F2P:',F7.4)
155  3001           FORMAT(1X,' X:',F6.3,2X,'Q2:',F6.0,
156      1         3X,'N/P:',F7.4,2X,'UP:',F6.3,
157      1         1X,'UV:',F6.3,1X,'US:',F6.3,1X,'DP:',F6.3,1X,'DV:',F6.3,
158      2         1X,'GL:',F6.3,2X,'F2P:',F7.4)
159 C
160  200           CONTINUE
161                WRITE(N6,*) ' '
162                ENDDO
163 C
164                CALL PDFSTA
165 C
166  300           CONTINUE
167              ENDDO
168  400         CONTINUE
169           ENDDO
170 C       ENDDO
171 C
172       STOP
173       END