Change needed for G4
[u/mrichter/AliRoot.git] / LHAPDF / lhapdf5.3.1 / wrapgsg96.f
CommitLineData
4e9e3152 1 subroutine GSG96evolvep0(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
5 real*8 SIG,QNS,GL
6 common/gsgdat/SIG(78,11,3),QNS(78,11,3),GL(78,11,3)
7 character*16 name(nmxset)
8 integer nmem(nmxset),ndef(nmxset),mmem
9 common/NAME/name,nmem,ndef,mmem
10 integer nset
11
12 save
13
14 iimem = 2
15 call GS96HL(iimem,xin,qin,upv,dnv,str,chm,bot,glu)
16 usea = upv
17 dsea = dnv
18
19 pdf(-6)= 0.0d0
20 pdf(6)= 0.0d0
21 pdf(-5)= bot
22 pdf(5 )= bot
23 pdf(-4)= chm
24 pdf(4 )= chm
25 pdf(-3)= str
26 pdf(3 )= str
27 pdf(-2)= usea
28 pdf(2 )= upv
29 pdf(-1)= dsea
30 pdf(1 )= dnv
31 pdf(0 )= glu
32
33 return
34ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
35 entry GSG96evolvep1(xin,qin,p2in,ip2in,pdf)
36
37 iimem = 1
38 call GS96HL(iimem,xin,qin,upv,dnv,str,chm,bot,glu)
39 usea = upv
40 dsea = dnv
41
42 pdf(-6)= 0.0d0
43 pdf(6)= 0.0d0
44 pdf(-5)= bot
45 pdf(5 )= bot
46 pdf(-4)= chm
47 pdf(4 )= chm
48 pdf(-3)= str
49 pdf(3 )= str
50 pdf(-2)= usea
51 pdf(2 )= upv
52 pdf(-1)= dsea
53 pdf(1 )= dnv
54 pdf(0 )= glu
55
56 return
57ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
58 entry GSG96read(nset)
59 read(1,*)nmem(nset),ndef(nset)
60
61 do m = 1,2
62 do k = 1,78
63 read(1,*)(sig(k,j,m),j=1,4)
64 read(1,*)(sig(k,j,m),j=5,8)
65 read(1,*)(sig(k,j,m),j=9,11)
66 enddo
67 do k = 1,78
68 read(1,*)(qns(k,j,m),j=1,4)
69 read(1,*)(qns(k,j,m),j=5,8)
70 read(1,*)(qns(k,j,m),j=9,11)
71 enddo
72 do k = 1,78
73 read(1,*)(gl(k,j,m),j=1,4)
74 read(1,*)(gl(k,j,m),j=5,8)
75 read(1,*)(gl(k,j,m),j=9,11)
76 enddo
77 enddo
78 return
79c
80ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
81 entry GSG96alfa(alfas,qalfa)
82 call getnset(iset)
83 call getnmem(iset,imem)
84 call GetOrderAsM(iset,iord)
85 call Getlam4M(iset,imem,qcdl4)
86 call Getlam5M(iset,imem,qcdl5)
87 call aspdflib(alfas,Qalfa,iord,qcdl5)
88 return
89c
90ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
91 entry GSG96init(Eorder,Q2fit)
92 return
93c
94ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
95 entry GSG96pdf(mem)
96 call getnset(iset)
97 call setnmem(iset,mem)
98c imem = mem
99 return
100c
101 1000 format(5e13.5)
102 end
103ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
104c SUBROUTINE GS96HO(X,Q,U,D,S,C,B,G)
105 SUBROUTINE GS96HL(iset,X,Q,U,D,S,C,B,G)
106 implicit real*8 (a-h,o-z)
107 PARAMETER(NP=78,NQ=11,NARG=2)
108*****************************************************************
109* Subroutine returns the parton distributions in the photon in *
110* next-to-leading order. u,d etc. gives the actual distributions*
111* not x times the distributions; Q2 means Q^2. The distributions*
112* are valid for 5.0e^-4< x < 1.0 and 5.3 GeV^2 < Q^2 < 1.0e^8. *
113* if higher Q^2 or lower x is required, these may be obtained *
114* from the authors on request. *
115* Lionel Gordon April 1996 : Gordon@hep.anl.gov *
116* John Storrow :johns@a3.ph.man.ac.uk *
117*****************************************************************
118c DIMENSION SIG(NP,NQ),QNS(NP,NQ),GL(NP,NQ),Y(NP)
119 DIMENSION Y(NP)
120 DIMENSION XT(NARG),NA(NARG),A(NP+NQ),QT(NQ)
121 common/gsgdat/SIG(78,11,3),QNS(78,11,3),GL(78,11,3)
122 EXTERNAL GS2XCOR
123c SAVE SIG,QNS,GL,Y,ICALL
124 SAVE Y,ICALL
125 DATA QT /3.0D0,20.0D0,50.0D0,100.0D0,500.0D0,1.0D3,1.0D4,1.0D5,
126 + 1.0D6,1.0D7,1.0D8/
127******************************************************************
128 q2=q*q
129*if x is out of range
130 IF((X.LT.5.0D-4).OR.(X.GT.1.0D0)) GOTO 90
131*******************************************************************
132 IF (ICALL.NE.1) THEN
133* get the x coordinates
134 CALL GS2XCOR(Y,NP)
135 ICALL=1
136 END IF
137*
138 DO 30 IX=1,NP
139 A(IX)=Y(IX)
140 30 CONTINUE
141 DO 40 IQ=1,NQ
142 A(NP+IQ)=QT(IQ)
143 40 CONTINUE
144*
145 NA(1)=NP
146 NA(2)=NQ
147 XT(1)=X
148 XT(2)=Q2
149 XSIG=DBFINT(2,XT,NA,A,SIG(1,1,iset))
150 XQNS=DBFINT(2,XT,NA,A,QNS(1,1,iset))
151 G =DBFINT(2,XT,NA,A,GL(1,1,iset))
152*
153 IF (Q2.LT.50.0D0) THEN
154C Use three flavour evolution.
155 U=(XSIG+9.0D0*XQNS)/6.0D0
156 D=(XSIG-4.5D0*XQNS)/6.0D0
157 S=D
158 C=0.0D0
159 B=0.0D0
160*
161 ELSE IF((Q2.GT.50.0).AND.(Q2.LT.250.0)) THEN
162C Use four flavour evolution
163 U=(XSIG+6.0D0*XQNS)/8.0D0
164 D=(XSIG-6.0D0*XQNS)/8.0D0
165 S=D
166 C=U
167 B=0.0D0
168 ELSE
169C Use five flavour evolution
170 U=(XSIG+7.5D0*XQNS)/10.0D0
171 D=(XSIG-5.0D0*XQNS)/10.0D0
172 S=D
173 C=U
174 B=D
175 ENDIF
176 U=X*U
177 US=U
178 D=X*D
179 DS=D
180 S=X*S
181 C=X*C
182 B=X*B
183 G=X*G
184 90 RETURN
185 END
186ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
187 SUBROUTINE GS2XCOR(Y,NP)
188 IMPLICIT REAL*8(A-H,O-Z)
189 DIMENSION Y(NP)
190 N=1
191 DO 10 IX=1,20,2
192 Y(N)=DBLE(IX)/2000.0D0
193 N=N+1
194 10 CONTINUE
195 DO 20 IX=30,200,10
196 Y(N)=DBLE(IX)/2000.0D0
197 N=N+1
198 20 CONTINUE
199 DO 30 IX=240,1600,40
200 Y(N)=REAL(IX)/2000.0D0
201 N=N+1
202 30 CONTINUE
203 DO 40 IX=1625,1980,25
204 Y(N)=REAL(IX)/2000.0D0
205 N=N+1
206 40 CONTINUE
207 RETURN
208 END
209ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc