Change needed for G4
[u/mrichter/AliRoot.git] / LHAPDF / lhapdf5.3.1 / wrapsmrspi.f
CommitLineData
4e9e3152 1 subroutine SMRSPevolve(xin,qin,pdf)
2 include 'parmsetup.inc'
3 PARAMETER(NX=50)
4 PARAMETER(NQ=19)
5 real*8 xin,qin,pdf(-6:6),xval(45),qcdl4,qcdl5
6 real*8 upv,dnv,usea,dsea,str,chm,bot,top,glu
7 real*8 SIG,QNS,GL
8 real*8 holdit
9 real*8 f
10 common /SMRSP/ F(7,NX,NQ,3)
11 character*16 name(nmxset)
12 integer nmem(nmxset),ndef(nmxset),mmem
13 common/NAME/name,nmem,ndef,mmem
14 integer nset
15 save
16
17 call getnset(iset)
18 call getnmem(iset,imem)
19
20 iimem = imem
21 if(iimem.eq.0) iimem = 2
22 if(iimem.le.3) then
23 call SMRSPxx(iimem,xin,qin,upv,dnv,usea,str,chm,bot,glu)
24 endif
25
26
27 pdf(-6)= 0.0d0
28 pdf(6)= 0.0d0
29 pdf(-5)= bot
30 pdf(5 )= bot
31 pdf(-4)= chm
32 pdf(4 )= chm
33 pdf(-3)= str
34 pdf(3 )= str
35 pdf(-2)= usea
36 pdf(2 )= upv+usea
37 pdf(-1)= usea
38 pdf(1 )= dnv+usea
39 pdf(0 )= glu
40
41 return
42ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
43 entry SMRSPread(nset)
44 read(1,*)nmem(nset),ndef(nset)
45 do j=1,3
46 do k=1,NX
47 do l=1,NQ
48 read(1,*)(F(m,k,l,j),m=1,5),F(7,k,l,j),F(6,k,l,j)
49 enddo
50 enddo
51 enddo
52 return
53c
54ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
55 entry SMRSPalfa(alfas,qalfa)
56 call getnset(iset)
57 call getnmem(iset,imem)
58 call GetOrderAsM(iset,iord)
59 call Getlam4M(iset,imem,qcdl4)
60 call Getlam5M(iset,imem,qcdl5)
61 call aspdflib(alfas,Qalfa,iord,qcdl5)
62 return
63c
64ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
65 entry SMRSPinit(Eorder,Q2fit)
66 return
67c
68ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
69 entry SMRSPpdf(mem)
70c imem = mem
71 call getnset(iset)
72 call setnmem(iset,mem)
73 return
74c
75 1000 format(5e13.5)
76 end
77ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
78C
79 SUBROUTINE SMRSPxx(iset,X,SCALE,UPV,DNV,SEA,STR,CHM,BOT,GLU)
80C
81C :::::::::::: PION STRUCTURE FUNCTION :: 10% SEA :::::::::::::::::
82C
83 implicit real*8 (a-h,o-z)
84 PARAMETER(NX=50)
85 PARAMETER(NQ=19)
86 PARAMETER(NTENTH=21)
87 common /SMRSP/ F(7,NX,NQ,3)
88 DIMENSION G(7),XX(NX),N0(7)
89c DIMENSION F(7,NX,NQ),G(7),XX(NX),N0(7)
90 DATA XX/1.D-5,2.D-5,4.D-5,6.D-5,8.D-5,
91 . 1.D-4,2.D-4,4.D-4,6.D-4,8.D-4,
92 . 1.D-3,2.D-3,4.D-3,6.D-3,8.D-3,
93 . 1.D-2,2.D-2,4.D-2,6.D-2,8.D-2,
94 . .1D0,.125D0,.15D0,.175D0,.2D0,.225D0,.25D0,.275D0,
95 . .3D0,.325D0,.35D0,.375D0,.4D0,.425D0,.45D0,.475D0,
96 . .5D0,.525D0,.55D0,.575D0,.6D0,.65D0,.7D0,.75D0,
97 . .8D0,.85D0,.9D0,.95D0,.975D0,1.D0/
98 DATA XMIN,XMAX,QSQMIN,QSQMAX/1.D-5,1.D0,5.D0,1310720.D0/
99 DATA N0/0,0,3,5,0,5,0/
100 DATA ZEROD/0.D0/,PONED/0.1D0/,ONED/1.D0/,ONEDO/1.1D0/,TWOD/2.D0/
101 DATA INIT/0/
102 XSAVE=X
103 IF(INIT.NE.0) GOTO 10
104 INIT=1
105 DO 20 N=1,NX-1
106 DO 20 M=1,NQ
107 DO 25 I=1,7
108 25 F(I,N,M,iset)=F(I,N,M,iset)/(ONED-XX(N))**N0(I)
109 20 CONTINUE
110 DO 30 J=1,NTENTH-1
111 XX(J)= LOG10(XX(J))+ONEDO
112 DO 30 I=2,6
113 DO 30 K=1,NQ
114 30 F(I,J,K,iset)= LOG(F(I,J,K,iset))
115 + *F(I,NTENTH,K,iset)/ LOG(F(I,NTENTH,K,iset))
116 50 FORMAT(7F10.5)
117 DO 40 I=1,7
118 DO 40 M=1,NQ
119 40 F(I,NX,M,iset)=ZEROD
120 10 CONTINUE
121 IF(X.LT.XMIN) X=XMIN
122 IF(X.GT.XMAX) X=XMAX
123 QSQ=SCALE**2
124 IF(QSQ.LT.QSQMIN) QSQ=QSQMIN
125 IF(QSQ.GT.QSQMAX) QSQ=QSQMAX
126 XXX=X
127 IF(X.LT.PONED) XXX= LOG10(X)+ONEDO
128 N=0
129 70 N=N+1
130 IF(XXX.GT.XX(N+1)) GOTO 70
131 A=(XXX-XX(N))/(XX(N+1)-XX(N))
132 RM= LOG(QSQ/QSQMIN)/ LOG(TWOD)
133 B=RM-AINT(RM)
134 M=1+ INT(RM)
135 DO 60 I=1,7
136 G(I)= (ONED-A)*(ONED-B)*F(I,N,M,iset)+(ONED-A)*B*F(I,N,M+1,iset)
137 . + A*(ONED-B)*F(I,N+1,M,iset) + A*B*F(I,N+1,M+1,iset)
138 IF(N.GE.NTENTH) GOTO 65
139 IF(I.EQ.7.OR.I.EQ.1) GOTO 65
140 FAC=(ONED-B)*F(I,NTENTH,M,iset)+B*F(I,NTENTH,M+1,iset)
141 G(I)=FAC**(G(I)/FAC)
142 65 CONTINUE
143 G(I)=G(I)*(ONED-X)**N0(I)
144 60 CONTINUE
145C UPBAR DISTRIBUTION = D DISTRIBUTION
146 UPV=G(2)
147 DNV=G(2)
148C THIS SEA IS (UBAR+DBAR)/2
149 SEA=G(4)
150 STR=G(6)
151 CHM=G(5)
152 GLU=G(3)
153 BOT=G(7)
154 X=XSAVE
155 RETURN
156 END