EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rdarry.F
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file rdarry.F
1 
2 *72*********************************************************************
3  subroutine rdarry(x,q2,aux,iflag)
4  implicit real*8(a-h,o-z)
5  implicit integer(i-n)
6  data icount /0/
7 *
8 * to avoid variable conflictions, a second keep element is necessary
9 * with the same common block name (see LEPTO2)
10 *
11 
12  COMMON /leptou/ cut(14),lst(40),parl(30),
13  & xlp,ylp,w2lp,q2lp,ulp
14  REAL cut,parl,xlp,ylp,w2lp,q2lp,ulp
15  INTEGER lst
16  SAVE /leptou/
17 
18 
19  dimension aux(5)
20  common/pdist/arraya(151,20,6)
21 
22  nx=151
23  ndata=nx-1
24  nq2pts=20
25  nq2inv=nq2pts-1
26  q2sta=1.d0
27  q2fin=1.d6
28  ymin=5.d0
29  xmin=10.d0**(-ymin)
30  xmax=1.d0
31 
32  if (q2.lt.q2sta) then
33  q2=q2sta
34  IF(cut(5).lt.q2.and.cut(6).gt.q2.AND.icount.lt.10) THEN
35  icount = icount + 1
36  WRITE(*,*) 'WARNING : rdarry : Q^2 set to minimal value !',q2
37  ENDIF
38  endif
39  if (q2.gt.q2fin) then
40  q2=q2fin
41  IF(cut(5).lt.q2.and.cut(6).gt.q2.AND.icount.lt.10) THEN
42  icount = icount + 1
43  WRITE(*,*) 'WARNING : rdarry : Q^2 set to maximal value !',q2
44  ENDIF
45  endif
46  if (x.lt.xmin) then
47  x=xmin
48  IF(cut(1).lt.x.and.cut(2).gt.x.AND.icount.lt.10) THEN
49  icount = icount + 1
50  WRITE(*,*) 'WARNING : rdarry : X set to minimal value !',x
51  ENDIF
52  endif
53  if (x.gt.xmax) then
54  x=xmax
55  IF(cut(1).lt.x.and.cut(2).gt.x.AND.icount.lt.10) THEN
56  icount = icount + 1
57  WRITE(*,*) 'WARNING : rdarry : X set to maximal value !',x
58  ENDIF
59  endif
60 
61  y=dlog10(x)
62  ram=(y+ymin)*ndata/ymin+1.d0
63  iram=int(ram)
64  fraci=ram-dble(iram)
65  ram=dlog(q2/q2sta)*nq2inv/dlog(q2fin/q2sta)+1.d0
66  jram=int(ram)
67  fracj=ram-dble(jram)
68 
69  do i=1,5
70  aux(i)=(arraya(iram,jram,i)*(1.d0-fraci)
71  . +arraya(iram+1,jram,i)*fraci)*(1.d0-fracj)+
72  . (arraya(iram,jram+1,i)*(1.d0-fraci)
73  . +arraya(iram+1,jram+1,i)*fraci)*fracj
74  enddo
75 
76  return
77  end