Change needed for G4
[u/mrichter/AliRoot.git] / LHAPDF / lhapdf5.3.1 / wrapgrvg.f
1       subroutine GRVGevolvep0(xin,qin,p2in,ip2in,pdf)
2       include 'parmsetup.inc'
3       real*8 xin,qin,q2in,p2in,pdf(-6:6),xval(45),qcdl4,qcdl5
4       real*8 upv,dnv,usea,dsea,str,chm,bot,top,glu,zbot,zchm
5       character*16 name(nmxset)
6       integer nmem(nmxset),ndef(nmxset),mmem
7       common/NAME/name,nmem,ndef,mmem
8       integer nset
9       
10       save 
11       
12       call getnset(iset)
13       call getnmem(iset,imem)
14       if(imem.eq.1) then
15         call GRVGALO (xin,qin,upv,dnv,usea,dsea,str,chm,bot,glu)
16       elseif(imem.eq.2.or.imem.eq.0) then
17         q2in = qin*qin
18 c calls GRVGALO for charm and bottom, rest from GRSGALO
19         call GRVGALO(xin,qin,upv,dnv,usea,dsea,str,chm,bot,glu)
20         call GRSGALO(xin,q2in,p2in,
21      +               upv,dnv,usea,dsea,str,zchm,zbot,glu)
22       else
23         CONTINUE
24       endif     
25       pdf(-6)= 0.0d0
26       pdf(6)= 0.0d0
27       pdf(-5)= bot
28       pdf(5 )= bot
29       pdf(-4)= chm
30       pdf(4 )= chm
31       pdf(-3)= str
32       pdf(3 )= str
33       pdf(-2)= usea
34       pdf(2 )= upv
35       pdf(-1)= dsea
36       pdf(1 )= dnv
37       pdf(0 )= glu
38       
39       return
40 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
41       entry GRVGevolvep1(xin,qin,p2in,ip2in,pdf)
42
43       if(imem.eq.1) then
44         call GRVGAH0 (xin,qin,upv,dnv,usea,dsea,str,chm,bot,glu)
45       elseif(imem.eq.2 .or. imem.eq.0) then
46         call GRVGAHO (xin,qin,upv,dnv,usea,dsea,str,chm,bot,glu)
47       else
48         CONTINUE
49       endif     
50
51       pdf(-6)= 0.0d0
52       pdf(6)= 0.0d0
53       pdf(-5)= bot
54       pdf(5 )= bot
55       pdf(-4)= chm
56       pdf(4 )= chm
57       pdf(-3)= str
58       pdf(3 )= str
59       pdf(-2)= usea
60       pdf(2 )= upv
61       pdf(-1)= dsea
62       pdf(1 )= dnv
63       pdf(0 )= glu
64       
65       return
66 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
67       entry GRVGread(nset)
68       read(1,*)nmem(nset),ndef(nset)
69       return
70 c
71 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
72       entry GRVGalfa(alfas,qalfa)
73         call getnset(iset)
74         call GetOrderAsM(iset,iord)
75         call Getlam4M(iset,imem,qcdl4)
76         call Getlam5M(iset,imem,qcdl5)
77         call aspdflib(alfas,Qalfa,iord,qcdl5)
78       return
79 c
80 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
81       entry GRVGinit(Eorder,Q2fit)
82       return
83 c
84 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
85       entry GRVGpdf(mem)
86       call getnset(iset)
87       call setnmem(iset,mem)
88
89 c      imem = mem
90       return
91 c
92  1000 format(5e13.5)
93       end
94 c
95        SUBROUTINE GRVGAH0 (ZX,ZQ,ZUV,ZDV,ZUB,ZDB,ZSB,ZCB,ZBB,ZGL)
96 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
97 *                                                                 *
98 *      G R V - P H O T O N - P A R A M E T R I Z A T I O N S      *
99 *                                                                 *
100 *                 FOR A DETAILED EXPLANATION SEE :                *
101 *              M. GLUECK, E.REYA, A.VOGT: DO-TH 91/31             *
102 *                                                                 *
103 *    THE OUTPUT IS ALWAYS   1./ ALPHA(EM) * X * PARTON DENSITY    *
104 *    output modified by HPB to be always    X * PARTON DENSITY    *
105 *                                                                 *
106 *   THE PARAMETRIZATIONS ARE FITTED TO THE PARTON DISTRIBUTIONS   *
107 *   FOR Q ** 2 BETWEEN MU ** 2 (=  0.25 / 0.30  GEV ** 2  IN LO   *
108 *   / HO) AND  1.E6 GEV ** 2  AND FOR X BETWEEN  1.E-5  AND  1.   *
109 *                                                                 *
110 *              HEAVY QUARK THRESHOLDS  Q(H) = M(H) :              *
111 *         M(C)  =  1.5,  M(B)  =  4.5,  M(T)  =  100  GEV         *
112 *                                                                 *
113 *      CORRESPONDING LAMBDA(F) VALUES FOR F ACTIVE FLAVOURS :     *
114 *      LO :   LAMBDA(3)  =  0.232,   LAMBDA(4)  =  0.200,         *
115 *             LAMBDA(5)  =  0.153,   LAMBDA(6)  =  0.082  GEV     *
116 *      HO :   LAMBDA(3)  =  0.248,   LAMBDA(4)  =  0.200,         *
117 *             LAMBDA(5)  =  0.131,   LAMBDA(6)  =  0.053  GEV     *
118 *                                                                 *
119 *      HO DISTRIBUTIONS REFER TO THE DIS(GAMMA) SCHEME, SEE :     *
120 *              M. GLUECK, E.REYA, A.VOGT: DO-TH 91/26             *
121 *                                                                 *
122 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
123 C
124        IMPLICIT REAL (A - Y)
125        double precision
126      +        ZX,ZQ,ZUV,ZDV,ZUB,ZDB,ZSB,ZCB,ZBB,ZGL
127        REAL  X, Q
128        DATA ALPHEM/7.29927D-3/
129        X = ZX
130        Q = ZQ
131        MU2  = 0.3
132        LAM2 = 0.248 * 0.248
133        Q2 = Q*Q
134        S  = ALOG (ALOG(Q2/LAM2) / ALOG(MU2/LAM2))
135        SS = SQRT (S)
136        S2 = S * S
137 C...X * U = X * UBAR :
138        AL =  1.447
139        BE =  0.848
140        AK =  0.527 + 0.200 * S  - 0.107 * S2
141        BK =  7.106 - 0.310 * SS - 0.786 * S2
142        AG =  0.197 + 0.533 * S
143        BG =  0.062 - 0.398 * S  + 0.109 * S2
144        C  =          0.755 * S  - 0.112 * S2
145        D  =  0.318 - 0.059 * S
146        E  =  4.225 + 1.708 * S
147        ES =  1.752 + 0.866 * S
148        U0 =  GRVGF (X, S, AL, BE, AK, BK, AG, BG, C, D, E, ES)
149        ZUV = U0 * ALPHEM
150        ZUB = ZUV
151 C...X * D = X * DBAR :
152        AL =  1.424
153        BE =  0.770
154        AK =  0.500 + 0.067 * SS - 0.055 * S2
155        BK =  0.376 - 0.453 * SS + 0.405 * S2
156        AG =  0.156 + 0.184 * S
157        BG =   0.0  - 0.528 * S  + 0.146 * S2
158        C  =  0.121 + 0.092 * S
159        D  =  0.379 - 0.301 * S  + 0.081 * S2
160        E  =  4.346 + 1.638 * S
161        ES =  1.645 + 1.016 * S
162        D0  =  GRVGF (X, S, AL, BE, AK, BK, AG, BG, C, D, E, ES)
163        ZDV = D0 * ALPHEM
164        ZDB = ZDV
165 C...X * G :
166        AL =  0.661
167        BE =  0.793
168        AK =  0.537 - 0.600 * SS
169        BK =  6.389              - 0.953 * S2
170        AG =  0.558 - 0.383 * SS + 0.261 * S2
171        BG =   0.0  - 0.305 * S
172        C  = -0.222              + 0.078 * S2
173        D  =  0.153 + 0.978 * S  - 0.209 * S2
174        E  =  1.429 + 1.772 * S
175        ES =  3.331 + 0.806 * S
176        G0 =  GRVGF (X, S, AL, BE, AK, BK, AG, BG, C, D, E, ES)
177        ZGL = G0 * ALPHEM
178 C...X * S = X * SBAR :
179        SF =   0.0
180        AL =  1.578
181        BE =  0.863
182        AK =  0.622 + 0.332 * S  - 0.300 * S2
183        BK =  2.469
184        AG =  0.211 - 0.064 * SS - 0.018 * S2
185        BG = -0.215 + 0.122 * S
186        C  =  0.153
187        D  =   0.0  + 0.253 * S  - 0.081 * S2
188        E  =  3.990 + 2.014 * S
189        ES =  1.720 + 0.986 * S
190        S0 =  GRVGFS (X, S, SF, AL, BE, AK, BK, AG, BG, C, D, E, ES)
191        ZSB = S0 * ALPHEM
192 C...X * C = X * CBAR :
193        SF =  0.820
194        AL =  0.929
195        BE =  0.381
196        AK =  1.228 - 0.231 * S
197        BK =  3.806             - 0.337 * S2
198        AG =  0.932 + 0.150 * S
199        BG = -0.906
200        C  =  1.133
201        D  =   0.0  + 0.138 * S  - 0.028 * S2
202        E  =  5.588 + 0.628 * S
203        ES =  2.665 + 1.054 * S
204        C0 =  GRVGFS (X, S, SF, AL, BE, AK, BK, AG, BG, C, D, E, ES)
205        ZCB = C0 * ALPHEM
206 C...X * B = X * BBAR :
207        SF =  1.297
208        AL =  0.970
209        BE =  0.207
210        AK =  1.719 - 0.292 * S
211        BK =  0.928 + 0.096 * S
212        AG =  0.845 + 0.178 * S
213        BG = -2.310
214        C  =  1.558
215        D  = -0.191 + 0.151 * S
216        E  =  6.089 + 0.282 * S
217        ES =  3.379 + 1.062 * S
218        B0 =  GRVGFS (X, S, SF, AL, BE, AK, BK, AG, BG, C, D, E, ES)
219        ZBB = B0 * ALPHEM
220 C
221        RETURN
222        END
223 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
224        SUBROUTINE GRVGAHO (ZX,ZQ,ZUV,ZDV,ZUB,ZDB,ZSB,ZCB,ZBB,ZGL)
225 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
226 *                                                                 *
227 *      G R V - P H O T O N - P A R A M E T R I Z A T I O N S      *
228 *                                                                 *
229 *                 FOR A DETAILED EXPLANATION SEE :                *
230 *              M. GLUECK, E.REYA, A.VOGT: DO-TH 91/31             *
231 *                                                                 *
232 *    THE OUTPUT IS ALWAYS   1./ ALPHA(EM) * X * PARTON DENSITY    *
233 *    output modified by HPB to be always    X * PARTON DENSITY    *
234 *                                                                 *
235 *   THE PARAMETRIZATIONS ARE FITTED TO THE PARTON DISTRIBUTIONS   *
236 *   FOR Q ** 2 BETWEEN MU ** 2 (=  0.25 / 0.30  GEV ** 2  IN LO   *
237 *   / HO) AND  1.E6 GEV ** 2  AND FOR X BETWEEN  1.E-5  AND  1.   *
238 *                                                                 *
239 *              HEAVY QUARK THRESHOLDS  Q(H) = M(H) :              *
240 *         M(C)  =  1.5,  M(B)  =  4.5,  M(T)  =  100  GEV         *
241 *                                                                 *
242 *      CORRESPONDING LAMBDA(F) VALUES FOR F ACTIVE FLAVOURS :     *
243 *      LO :   LAMBDA(3)  =  0.232,   LAMBDA(4)  =  0.200,         *
244 *             LAMBDA(5)  =  0.153,   LAMBDA(6)  =  0.082  GEV     *
245 *      HO :   LAMBDA(3)  =  0.248,   LAMBDA(4)  =  0.200,         *
246 *             LAMBDA(5)  =  0.131,   LAMBDA(6)  =  0.053  GEV     *
247 *                                                                 *
248 *      HO DISTRIBUTIONS REFER TO THE DIS(GAMMA) SCHEME, SEE :     *
249 *              M. GLUECK, E.REYA, A.VOGT: DO-TH 91/26             *
250 *                                                                 *
251 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
252 C
253        IMPLICIT REAL (A - Y)
254        double precision
255      +        ZX,ZQ,ZUV,ZDV,ZUB,ZDB,ZSB,ZCB,ZBB,ZGL
256        DATA ALPHEM/7.29927D-3/
257        REAL  X, Q
258        X = ZX
259        Q = ZQ
260        MU2  = 0.3
261        LAM2 = 0.248 * 0.248
262        Q2 = Q*Q
263        S  = ALOG (ALOG(Q2/LAM2) / ALOG(MU2/LAM2))
264        SS = SQRT (S)
265        S2 = S * S
266 C...X * U = X * UBAR :
267        AL =  0.583
268        BE =  0.688
269        AK =  0.449 - 0.025 * S  - 0.071 * S2
270        BK =  5.060 - 1.116 * SS
271        AG =  0.103
272        BG =  0.319 + 0.422 * S
273        C  =  1.508 + 4.792 * S  - 1.963 * S2
274        D  =  1.075 + 0.222 * SS - 0.193 * S2
275        E  =  4.147 + 1.131 * S
276        ES =  1.661 + 0.874 * S
277        UH =  GRVGF (X, S, AL, BE, AK, BK, AG, BG, C, D, E, ES)
278        ZUV = UH * ALPHEM
279        ZUB = ZUV
280 C...X * D = X * DBAR :
281        AL =  0.591
282        BE =  0.698
283        AK =  0.442 - 0.132 * S  - 0.058 * S2
284        BK =  5.437 - 1.916 * SS
285        AG =  0.099
286        BG =  0.311 - 0.059 * S
287        C  =  0.800 + 0.078 * S  - 0.100 * S2
288        D  =  0.862 + 0.294 * SS - 0.184 * S2
289        E  =  4.202 + 1.352 * S
290        ES =  1.841 + 0.990 * S
291        DH  =  GRVGF (X, S, AL, BE, AK, BK, AG, BG, C, D, E, ES)
292        ZDV = DH * ALPHEM
293        ZDB = ZDV
294 C...X * G :
295        AL =  1.161
296        BE =  1.591
297        AK =  0.530 - 0.742 * SS + 0.025 * S2
298        BK =  5.662
299        AG =  0.533 - 0.281 * SS + 0.218 * S2
300        BG =  0.025 - 0.518 * S  + 0.156 * S2
301        C  = -0.282              + 0.209 * S2
302        D  =  0.107 + 1.058 * S  - 0.218 * S2
303        E  =   0.0  + 2.704 * S
304        ES =  3.071 - 0.378 * S
305        GH =  GRVGF (X, S, AL, BE, AK, BK, AG, BG, C, D, E, ES)
306        ZGL = GH * ALPHEM
307 C...X * S = X * SBAR :
308        SF =   0.0
309        AL =  0.635
310        BE =  0.456
311        AK =  1.770 - 0.735 * SS - 0.079 * S2
312        BK =  3.832
313        AG =  0.084 - 0.023 * S
314        BG =  0.136
315        C  =  2.119 - 0.942 * S  + 0.063 * S2
316        D  =  1.271 + 0.076 * S  - 0.190 * S2
317        E  =  4.604 + 0.737 * S
318        ES =  1.641 + 0.976 * S
319        SH =  GRVGFS (X, S, SF, AL, BE, AK, BK, AG, BG, C, D, E, ES)
320        ZSB = SH * ALPHEM
321 C...X * C = X * CBAR :
322        SF =  0.820
323        AL =  0.926
324        BE =  0.152
325        AK =  1.142 - 0.175 * S
326        BK =  3.276
327        AG =  0.504 + 0.317 * S
328        BG = -0.433
329        C  =  3.334
330        D  =  0.398 + 0.326 * S  - 0.107 * S2
331        E  =  5.493 + 0.408 * S
332        ES =  2.426 + 1.277 * S
333        CH =  GRVGFS (X, S, SF, AL, BE, AK, BK, AG, BG, C, D, E, ES)
334        ZCB = CH * ALPHEM
335 C...X * B = X * BBAR :
336        SF =  1.297
337        AL =  0.969
338        BE =  0.266
339        AK =  1.953 - 0.391 * S
340        BK =  1.657 - 0.161 * S
341        AG =  1.076 + 0.034 * S
342        BG = -2.015
343        C  =  1.662
344        D  =  0.353 + 0.016 * S
345        E  =  5.713 + 0.249 * S
346        ES =  3.456 + 0.673 * S
347        BH =  GRVGFS (X, S, SF, AL, BE, AK, BK, AG, BG, C, D, E, ES)
348        ZBB = BH * ALPHEM
349 c
350        RETURN
351        END
352 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
353        SUBROUTINE GRVGALO (ZX,ZQ,ZUV,ZDV,ZUB,ZDB,ZSB,ZCB,ZBB,ZGL)
354 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
355 *                                                                 *
356 *      G R V - P H O T O N - P A R A M E T R I Z A T I O N S      *
357 *                                                                 *
358 *                 FOR A DETAILED EXPLANATION SEE :                *
359 *              M. GLUECK, E.REYA, A.VOGT: DO-TH 91/31             *
360 *                                                                 *
361 *    THE OUTPUT IS ALWAYS   1./ ALPHA(EM) * X * PARTON DENSITY    *
362 *    output modified by HPB to be always    X * PARTON DENSITY    *
363 *                                                                 *
364 *   THE PARAMETRIZATIONS ARE FITTED TO THE PARTON DISTRIBUTIONS   *
365 *   FOR Q ** 2 BETWEEN MU ** 2 (=  0.25 / 0.30  GEV ** 2  IN LO   *
366 *   / HO) AND  1.E6 GEV ** 2  AND FOR X BETWEEN  1.E-5  AND  1.   *
367 *                                                                 *
368 *              HEAVY QUARK THRESHOLDS  Q(H) = M(H) :              *
369 *         M(C)  =  1.5,  M(B)  =  4.5,  M(T)  =  100  GEV         *
370 *                                                                 *
371 *      CORRESPONDING LAMBDA(F) VALUES FOR F ACTIVE FLAVOURS :     *
372 *      LO :   LAMBDA(3)  =  0.232,   LAMBDA(4)  =  0.200,         *
373 *             LAMBDA(5)  =  0.153,   LAMBDA(6)  =  0.082  GEV     *
374 *      HO :   LAMBDA(3)  =  0.248,   LAMBDA(4)  =  0.200,         *
375 *             LAMBDA(5)  =  0.131,   LAMBDA(6)  =  0.053  GEV     *
376 *                                                                 *
377 *      HO DISTRIBUTIONS REFER TO THE DIS(GAMMA) SCHEME, SEE :     *
378 *              M. GLUECK, E.REYA, A.VOGT: DO-TH 91/26             *
379 *                                                                 *
380 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
381 C
382        IMPLICIT REAL (A - Y)
383        double precision
384      +        ZX,ZQ,ZUV,ZDV,ZUB,ZDB,ZSB,ZCB,ZBB,ZGL
385        REAL  X, Q
386        DATA ALPHEM/7.29927D-3/
387        X = ZX
388        Q = ZQ
389        MU2  = 0.25
390        LAM2 = 0.232 * 0.232
391        Q2 = Q*Q
392        S  = ALOG (ALOG(Q2/LAM2) / ALOG(MU2/LAM2))
393        SS = SQRT (S)
394        S2 = S * S
395 C...X * U = X * UBAR :
396        AL =  1.717
397        BE =  0.641
398        AK =  0.500 - 0.176 * S
399        BK = 15.00  - 5.687 * SS - 0.552 * S2
400        AG =  0.235 + 0.046 * SS
401        BG =  0.082 - 0.051 * S  + 0.168 * S2
402        C  =   0.0  + 0.459 * S
403        D  =  0.354 - 0.061 * S
404        E  =  4.899 + 1.678 * S
405        ES =  2.046 + 1.389 * S
406        UL =  GRVGF (X, S, AL, BE, AK, BK, AG, BG, C, D, E, ES)
407        ZUV = UL * ALPHEM
408        ZUB = ZUV
409 C...X * D = X * DBAR :
410        AL =  1.549
411        BE =  0.782
412        AK =  0.496 + 0.026 * S
413        BK =  0.685 - 0.580 * SS + 0.608 * S2
414        AG =  0.233 + 0.302 * S
415        BG =   0.0  - 0.818 * S  + 0.198 * S2
416        C  =  0.114 + 0.154 * S
417        D  =  0.405 - 0.195 * S  + 0.046 * S2
418        E  =  4.807 + 1.226 * S
419        ES =  2.166 + 0.664 * S
420        DL  =  GRVGF (X, S, AL, BE, AK, BK, AG, BG, C, D, E, ES)
421        ZDV = DL * ALPHEM
422        ZDB = ZDV
423 C...X * G :
424        AL =  0.676
425        BE =  1.089
426        AK =  0.462 - 0.524 * SS
427        BK =  5.451              - 0.804 * S2
428        AG =  0.535 - 0.504 * SS + 0.288 * S2
429        BG =  0.364 - 0.520 * S
430        C  = -0.323              + 0.115 * S2
431        D  =  0.233 + 0.790 * S  - 0.139 * S2
432        E  =  0.893 + 1.968 * S
433        ES =  3.432 + 0.392 * S
434        GL =  GRVGF (X, S, AL, BE, AK, BK, AG, BG, C, D, E, ES)
435        ZGL = GL * ALPHEM
436 C...X * S = X * SBAR :
437        SF =   0.0
438        AL =  1.609
439        BE =  0.962
440        AK =  0.470              - 0.099 * S2
441        BK =  3.246
442        AG =  0.121 - 0.068 * SS
443        BG = -0.090 + 0.074 * S
444        C  =  0.062 + 0.034 * S
445        D  =   0.0  + 0.226 * S  - 0.060 * S2
446        E  =  4.288 + 1.707 * S
447        ES =  2.122 + 0.656 * S
448        SL =  GRVGFS (X, S, SF, AL, BE, AK, BK, AG, BG, C, D, E, ES)
449        ZSB = SL * ALPHEM
450 C...X * C = X * CBAR :
451        SF =  0.888
452        AL =  0.970
453        BE =  0.545
454        AK =  1.254 - 0.251 * S
455        BK =  3.932              - 0.327 * S2
456        AG =  0.658 + 0.202 * S
457        BG = -0.699
458        C  =  0.965
459        D  =   0.0  + 0.141 * S  - 0.027 * S2
460        E  =  4.911 + 0.969 * S
461        ES =  2.796 + 0.952 * S
462        CL =  GRVGFS (X, S, SF, AL, BE, AK, BK, AG, BG, C, D, E, ES)
463        ZCB = CL * ALPHEM
464 C...X * B = X * BBAR :
465        SF =  1.351
466        AL =  1.016
467        BE =  0.338
468        AK =  1.961 - 0.370 * S
469        BK =  0.923 + 0.119 * S
470        AG =  0.815 + 0.207 * S
471        BG = -2.275
472        C  =  1.480
473        D  = -0.223 + 0.173 * S
474        E  =  5.426 + 0.623 * S
475        ES =  3.819 + 0.901 * S
476        BL =  GRVGFS (X, S, SF, AL, BE, AK, BK, AG, BG, C, D, E, ES)
477        ZBB = BL * ALPHEM
478 C
479        RETURN
480        END
481 cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
482 C-----------------------------------------------------------------------
483 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
484 *                                                                 *
485 *           G R S - LO - VIRTUAL PHOTON PARAMETRIZATIONS          *
486 *                                                                 *
487 *                 FOR A DETAILED EXPLANATION SEE                  *
488 *                M. GLUECK, E.REYA, M. STRATMANN :                *
489 *                    PHYS. REV. D51 (1995) 3220                   *
490 *                                                                 *
491 *   THE PARAMETRIZATIONS ARE FITTED TO THE EVOLVED PARTONS FOR    *
492 *        Q**2 / GEV**2  BETWEEN   0.6   AND  5.E4                 *
493 *                       AND (!)  Q**2 > 5 P**2                    *
494 *        P**2 / GEV**2  BETWEEN   0.0   AND  10.                  *
495 *                       P**2 = 0  <=> REAL PHOTON                 *
496 *             X         BETWEEN  1.E-4  AND   1.                  *
497 *                                                                 *
498 *   HEAVY QUARK THRESHOLDS  Q(H) = M(H)  IN THE BETA FUNCTION :   *
499 *                   M(C)  =  1.5,  M(B)  =  4.5                   *
500 *   CORRESPONDING LAMBDA(F) VALUES IN GEV FOR  Q**2 > M(H)**2 :   *
501 *      LO :   LAMBDA(3)  =  0.232,   LAMBDA(4)  =  0.200,         *
502 *             LAMBDA(5)  =  0.153,                                *
503 *   THE NUMBER OF ACTIVE QUARK FLAVOURS IS  NF = 3  EVERYWHERE    *
504 *   EXCEPT IN THE BETA FUNCTION, I.E. THE HEAVY QUARKS C,B,...    *
505 *   ARE NOT PRESENT AS PARTONS IN THE Q2-EVOLUTION.               *
506 *                                                                 *
507 *   PLEASE REPORT ANY STRANGE BEHAVIOUR TO :                      *
508 *          STRAT@HAL1.PHYSIK.UNI-DORTMUND.DE                      *
509 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
510 *
511 *...INPUT PARAMETERS : 
512 *
513 *    X   = MOMENTUM FRACTION 
514 *    Q2  = SCALE Q**2 IN GEV**2
515 *    P2  = VIRTUALITY OF THE PHOTON IN GEV**2 
516 *
517 *...OUTPUT (ALWAYS X TIMES THE DISTRIBUTION DIVIDED BY ALPHA_EM) :
518 *...OUTPUT (ALWAYS X TIMES THE DISTRIBUTION) :  modified H.P.-B. 10.9.1996
519 *
520 ********************************************************
521       SUBROUTINE GRSGALO(DX,DQ2,DP2,
522      +                     DUPV,DDNV,DUSEA,DDSEA,DSTR,DCHM,DBOT,DGL)
523 C      subroutine grsgalo(x,q2,p2,ugam,dgam,sgam,ggam)
524       implicit real*8 (a-h,o-z)
525       double precision
526      +          x, q2, p2, mu2, lam2,
527      +          ugam, dgam, sgam, ggam,
528      +          DUPV,DDNV,DUSEA,DDSEA,DSTR,DCHM,DBOT,DGL
529 C
530       dimension u1(40),ds1(40),g1(40)
531       dimension ud2(20),s2(20),g2(20)
532       dimension up0(20),dsp0(20),gp0(20)
533       DATA ALPHEM/7.29927D-3/ 
534 c
535       data u1/-0.139d0,0.783d0,0.132d0,0.087d0,0.003d0,-0.0134d0,
536      +   0.009d0,-0.017d0,0.092d0,-0.516d0,-0.085d0,0.439d0,
537      +   0.013d0,0.108d0,-0.019d0,-0.272d0,-0.167d0,0.138d0,
538      +   0.076d0,0.026d0,-0.013d0,0.27d0,0.107d0,-0.097d0,0.04d0,
539      +   0.064d0,0.011d0,0.002d0,0.057d0,-0.057d0,0.162d0,
540      +   -0.172d0,0.124d0,-0.016d0,-0.065d0,0.044d0,-1.009d0,
541      +   0.622d0,0.227d0,-0.184d0/
542       data ds1/0.033d0,0.007d0,-0.0516d0,0.12d0,0.001d0,-0.013d0,
543      +   0.018d0,-0.028d0,0.102d0,-0.595d0,-0.114d0,0.669d0,
544      +   0.022d0,0.001d0,-0.003d0,-0.0583d0,-0.041d0,0.035d0,
545      +   0.009d0,0.009d0,0.004d0,0.054d0,0.025d0,-0.02d0,
546      +   0.007d0,0.021d0,0.01d0,0.004d0,-0.067d0,0.06d0,-0.148d0,
547      +   0.13d0,0.032d0,-0.009d0,-0.06d0,0.036d0,-0.39d0,0.033d0,
548      +   0.245d0,-0.171d0/
549       data g1/0.025d0,0.d0,-0.018d0,0.112d0,-0.025d0,0.177d0, 
550      +   -0.022d0,0.024d0,0.001d0,-0.0104d0,0.d0,0.d0,-1.082d0,
551      +   -1.666d0,0.d0,0.086d0,0.d0,0.053d0,0.005d0,-0.058d0,
552      +   0.034d0,0.073d0,1.08d0,1.63d0,-0.0256d0,-0.088d0,0.d0,
553      +   0.d0,-0.004d0,0.016d0,0.007d0,-0.012d0,0.01d0,-0.673d0,
554      +   0.126d0,-0.167d0,0.032d0,-0.227d0,0.086d0,-0.159d0/
555       data ud2/0.756d0,0.187d0,0.109d0,-0.163d0,0.002d0,0.004d0,
556      +   0.054d0,-0.039d0,22.53d0,-21.02d0,5.608d0,0.332d0,
557      +   -0.008d0,-0.021d0,0.381d0,0.572d0,4.774d0,1.436d0,
558      +   -0.614d0,3.548d0/ 
559       data s2/0.902d0,0.182d0,0.271d0,-0.346d0,0.017d0,-0.01d0,
560      +   -0.011d0,0.0065d0,17.1d0,-13.29d0,6.519d0,0.031d0,
561      +   -0.0176d0,0.003d0,1.243d0,0.804d0,4.709d0,1.499d0,
562      +   -0.48d0,3.401d0/
563       data g2/0.364d0,1.31d0,0.86d0,-0.254d0,0.611d0,0.008d0,
564      +   -0.097d0,-2.412d0,-0.843d0,2.248d0,-0.201d0,1.33d0,
565      +   0.572d0,0.44d0,1.233d0,0.009d0,0.954d0,1.862d0,3.791d0,
566      +   -0.079d0/
567       data up0/1.551d0,0.105d0,1.089d0,-0.172d0,3.822d0,-2.162d0,
568      +   0.533d0,-0.467d0,-0.412d0,0.2d0,0.377d0,0.299d0,0.487d0,
569      +   0.0766d0,0.119d0,0.063d0,7.605d0,0.234d0,-0.567d0,
570      +   2.294d0/ 
571       data dsp0/2.484d0,1.214d0,1.088d0,-0.1735d0,4.293d0,
572      +   -2.802d0,0.5975d0,-0.1193d0,-0.0872d0,0.0418d0,0.128d0,
573      +   0.0337d0,0.127d0,0.0135d0,0.14d0,0.0423d0,6.946d0,
574      +   0.814d0,1.531d0,0.124d0/
575       data gp0/1.682d0,1.1d0,0.5888d0,-0.4714d0,0.5362d0,0.0127d0,
576      +   -2.438d0,0.03399d0,0.07825d0,0.05842d0,0.08393d0,2.348d0,
577      +   -0.07182d0,1.084d0,0.3098d0,-0.07514d0,3.327d0,1.1d0,
578      +   2.264d0,0.2675d0/
579 c
580       save u1,ds1,g1,ud2,s2,g2,up0,dsp0,gp0
581 c
582       x  = DX
583       q  = SQRT(DQ2)
584       q2 = DQ2
585       p2 = DP2
586       mu2=0.25d0
587       lam2=0.232d0*0.232d0
588 c
589       if(p2.le.0.25d0) then
590          s=log(log(q2/lam2)/log(mu2/lam2))
591          lp1=0.d0
592          lp2=0.d0
593       else
594          if(q2.lt.p2) then
595             write(*,1000)
596  1000       format
597      +      ('  WARNING: GRSGALO has been called with Q2 < P2 !',/,
598      +       '           GRSGALO is about to blow up, therefore',/,
599      +       '           Q2 is set equal to P2')
600             q2=p2
601          endif
602          s=log(log(q2/lam2)/log(p2/lam2))
603          lp1=log(p2/mu2)*log(p2/mu2)
604          lp2=log(p2/mu2+log(p2/mu2))
605       endif
606 c
607       alp=up0(1)+lp1*u1(1)+lp2*u1(2)
608       bet=up0(2)+lp1*u1(3)+lp2*u1(4)
609       a=up0(3)+lp1*u1(5)+lp2*u1(6)+
610      +  (up0(4)+lp1*u1(7)+lp2*u1(8))*s
611       b=up0(5)+lp1*u1(9)+lp2*u1(10)+
612      +  (up0(6)+lp1*u1(11)+lp2*u1(12))*s**0.5+
613      +  (up0(7)+lp1*u1(13)+lp2*u1(14))*s**2
614       gb=up0(8)+lp1*u1(15)+lp2*u1(16)+
615      +  (up0(9)+lp1*u1(17)+lp2*u1(18))*s+
616      +  (up0(10)+lp1*u1(19)+lp2*u1(20))*s**2
617       ga=up0(11)+lp1*u1(21)+lp2*u1(22)+
618      +  (up0(12)+lp1*u1(23)+lp2*u1(24))*s**0.5
619       gc=up0(13)+lp1*u1(25)+lp2*u1(33)+
620      +  (up0(14)+lp1*u1(26)+lp2*u1(34))*s
621       gd=up0(15)+lp1*u1(27)+lp2*u1(35)+
622      +  (up0(16)+lp1*u1(28)+lp2*u1(36))*s
623       ge=up0(17)+lp1*u1(29)+lp2*u1(37)+
624      +  (up0(18)+lp1*u1(30)+lp2*u1(38))*s
625       gep=up0(19)+lp1*u1(31)+lp2*u1(39)+
626      +  (up0(20)+lp1*u1(32)+lp2*u1(40))*s
627       upart1=grsf2(x,s,alp,bet,a,b,ga,gb,gc,gd,ge,gep)
628 c
629       alp=dsp0(1)+lp1*ds1(1)+lp2*ds1(2)
630       bet=dsp0(2)+lp1*ds1(3)+lp2*ds1(4)
631       a=dsp0(3)+lp1*ds1(5)+lp2*ds1(6)+
632      +  (dsp0(4)+lp1*ds1(7)+lp2*ds1(8))*s
633       b=dsp0(5)+lp1*ds1(9)+lp2*ds1(10)+
634      +  (dsp0(6)+lp1*ds1(11)+lp2*ds1(12))*s**0.5+
635      +  (dsp0(7)+lp1*ds1(13)+lp2*ds1(14))*s**2
636       gb=dsp0(8)+lp1*ds1(15)+lp2*ds1(16)+
637      +  (dsp0(9)+lp1*ds1(17)+lp2*ds1(18))*s+
638      +  (dsp0(10)+lp1*ds1(19)+lp2*ds1(20))*s**2
639       ga=dsp0(11)+lp1*ds1(21)+lp2*ds1(22)+
640      +  (dsp0(12)+lp1*ds1(23)+lp2*ds1(24))*s
641       gc=dsp0(13)+lp1*ds1(25)+lp2*ds1(33)+
642      +  (dsp0(14)+lp1*ds1(26)+lp2*ds1(34))*s
643       gd=dsp0(15)+lp1*ds1(27)+lp2*ds1(35)+
644      +  (dsp0(16)+lp1*ds1(28)+lp2*ds1(36))*s
645       ge=dsp0(17)+lp1*ds1(29)+lp2*ds1(37)+
646      +  (dsp0(18)+lp1*ds1(30)+lp2*ds1(38))*s
647       gep=dsp0(19)+lp1*ds1(31)+lp2*ds1(39)+
648      +  (dsp0(20)+lp1*ds1(32)+lp2*ds1(40))*s
649       dspart1=grsf2(x,s,alp,bet,a,b,ga,gb,gc,gd,ge,gep)
650 c
651       alp=gp0(1)+lp1*g1(1)+lp2*g1(2)
652       bet=gp0(2)+lp1*g1(3)+lp2*g1(4)
653       a=gp0(3)+lp1*g1(5)+lp2*g1(6)+
654      +  (gp0(4)+lp1*g1(7)+lp2*g1(8))*s**0.5
655       b=gp0(5)+lp1*g1(9)+lp2*g1(10)+
656      +  (gp0(6)+lp1*g1(11)+lp2*g1(12))*s**2
657       gb=gp0(7)+lp1*g1(13)+lp2*g1(14)+
658      +  (gp0(8)+lp1*g1(15)+lp2*g1(16))*s
659       ga=gp0(9)+lp1*g1(17)+lp2*g1(18)+
660      +  (gp0(10)+lp1*g1(19)+lp2*g1(20))*s**0.5+
661      +  (gp0(11)+lp1*g1(21)+lp2*g1(22))*s**2
662       gc=gp0(12)+lp1*g1(23)+lp2*g1(24)+
663      +  (gp0(13)+lp1*g1(25)+lp2*g1(26))*s**2
664       gd=gp0(14)+lp1*g1(27)+lp2*g1(28)+
665      +  (gp0(15)+lp1*g1(29)+lp2*g1(30))*s+
666      +  (gp0(16)+lp1*g1(31)+lp2*g1(32))*s**2
667       ge=gp0(17)+lp1*g1(33)+lp2*g1(34)+
668      +  (gp0(18)+lp1*g1(35)+lp2*g1(36))*s
669       gep=gp0(19)+lp1*g1(37)+lp2*g1(38)+
670      +  (gp0(20)+lp1*g1(39)+lp2*g1(40))*s
671       gpart1=grsf2(x,s,alp,bet,a,b,ga,gb,gc,gd,ge,gep)
672 c
673       s=log(log(q2/lam2)/log(mu2/lam2))
674       suppr=1.d0/(1.d0+p2/0.59d0)**2
675 c
676       alp=ud2(1)
677       bet=ud2(2)
678       a=ud2(3)+ud2(4)*s
679       ga=ud2(5)+ud2(6)*s**0.5
680       gc=ud2(7)+ud2(8)*s
681       b=ud2(9)+ud2(10)*s+ud2(11)*s**2
682       gb=ud2(12)+ud2(13)*s+ud2(14)*s**2
683       gd=ud2(15)+ud2(16)*s
684       ge=ud2(17)+ud2(18)*s
685       gep=ud2(19)+ud2(20)*s
686       udpart2=suppr*grsf1(x,s,alp,bet,a,b,ga,gb,gc,gd,ge,gep)
687 c
688       alp=s2(1)
689       bet=s2(2)
690       a=s2(3)+s2(4)*s
691       ga=s2(5)+s2(6)*s**0.5
692       gc=s2(7)+s2(8)*s
693       b=s2(9)+s2(10)*s+s2(11)*s**2
694       gb=s2(12)+s2(13)*s+s2(14)*s**2
695       gd=s2(15)+s2(16)*s
696       ge=s2(17)+s2(18)*s
697       gep=s2(19)+s2(20)*s
698       spart2=suppr*grsf2(x,s,alp,bet,a,b,ga,gb,gc,gd,ge,gep)
699 c
700       alp=g2(1)
701       bet=g2(2)
702       a=g2(3)+g2(4)*s**0.5
703       b=g2(5)+g2(6)*s**2
704       gb=g2(7)+g2(8)*s
705       ga=g2(9)+g2(10)*s**0.5+g2(11)*s**2
706       gc=g2(12)+g2(13)*s**2
707       gd=g2(14)+g2(15)*s+g2(16)*s**2
708       ge=g2(17)+g2(18)*s
709       gep=g2(19)+g2(20)*s
710       gpart2=suppr*grsf1(x,s,alp,bet,a,b,ga,gb,gc,gd,ge,gep)
711 c
712       ugam=upart1+udpart2
713       DUPV = UGAM * ALPHEM
714       DUSEA = DUPV
715       dgam=dspart1+udpart2
716       DDNV = DGAM * ALPHEM
717       DDSEA = DDNV
718       sgam=dspart1+spart2
719       DSTR = SGAM * ALPHEM
720       ggam=gpart1+gpart2
721       DGL = GGAM * ALPHEM
722 C
723       DCHM = 0.D0
724       DBOT = 0.D0
725 c
726       return
727       end
728 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
729        FUNCTION GRVGF (X, S, AL, BE, AK, BK, AG, BG, C, D, E, ES)
730        IMPLICIT REAL (A - Z)
731        SX = SQRT (X)
732        LX = ALOG (1./X)
733        GRVGF  = (X**AK * (AG + BG * SX + C * X**BK)  +  S**AL
734      1       * EXP (-E + SQRT (ES * S**BE * LX))) * (1.- X)**D
735        RETURN
736        END
737 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
738        FUNCTION GRVGFS (X, S, SF, AL, BE, AK, BK, AG, BG, C, D, E, ES)
739        IMPLICIT REAL (A - Z)
740        IF (S .LE. SF) THEN
741           GRVGFS = 0.0
742        ELSE
743           SX = SQRT (X)
744           LX = ALOG (1./X)
745           DS = S - SF
746           GRVGFS = (DS * X**AK * (AG + BG * SX + C * X**BK) + DS**AL
747      1         * EXP (-E + SQRT (ES * S**BE * LX))) * (1.- X)**D
748        END IF
749        RETURN
750        END
751 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
752       double precision function grsf1(x,s,alp,bet,a,b,ga,gb,gc,gd,
753      +                                ge,gep)
754       implicit real*8 (a-h,o-z)
755 C
756       grsf1=(x**a*(ga+gb*sqrt(x)+gc*x**b)+
757      +      s**alp*exp(-ge+sqrt(gep*s**bet*log(1.d0/x))))*
758      +      (1.d0-x)**gd
759       return
760       end
761 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
762       double precision function grsf2(x,s,alp,bet,a,b,ga,gb,gc,gd,
763      +                                ge,gep)
764       implicit real*8 (a-h,o-z)
765 C
766       grsf2=(s*x**a*(ga+gb*sqrt(x)+gc*x**b)+
767      +      s**alp*exp(-ge+sqrt(gep*s**bet*log(1.d0/x))))*
768      +      (1.d0-x)**gd
769       return
770       end
771 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
772