~maddevelopers/mg5amcnlo/3.0.2-alpha0

« back to all changes in this revision

Viewing changes to Template/Source/PDF/PhotonFlux.f

Added Template and HELAS into bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
c/* ********************************************************* */
 
2
c/*  Equivalent photon approximation structure function.   * */
 
3
c/*     Improved Weizsaecker-Williams formula              * */
 
4
c/*   V.M.Budnev et al., Phys.Rep. 15C (1975) 181          * */
 
5
c/* ********************************************************* */
 
6
c   provided by Tomasz Pierzchala - UCL
 
7
 
 
8
      real*8 function epa_electron(x,q2max)
 
9
      integer i
 
10
      real*8 x,phi_f
 
11
      real*8 xin
 
12
      real*8 alpha
 
13
      real*8 f, q2min,q2max
 
14
      real*8 PI
 
15
      data PI/3.14159265358979323846/
 
16
 
 
17
      data xin/0.511d-3/ !electron mass in GeV
 
18
 
 
19
      alpha = .0072992701
 
20
 
 
21
C     // x = omega/E = (E-E')/E
 
22
      if (x.lt.1) then
 
23
         q2min= xin*xin*x*x/(1-x)
 
24
         if(q2min.lt.q2max) then 
 
25
            f = alpha/2d0/PI*
 
26
     &           (2d0*xin*xin*x*(-1/q2min+1/q2max)+
 
27
     &           (2-2d0*x+x*x)/x*dlog(q2max/q2min))
 
28
            
 
29
         else
 
30
           f = 0. 
 
31
         endif
 
32
      else
 
33
         f= 0.
 
34
      endif
 
35
c      write (*,*) x,dsqrt(q2min),dsqrt(q2max),f
 
36
      if (f .lt. 0) f = 0
 
37
      epa_electron= f
 
38
 
 
39
      end
 
40
 
 
41
      real*8 function epa_proton(x,q2max)
 
42
      integer i
 
43
      real*8 x,phi_f
 
44
      real*8 xin
 
45
      real*8 alpha,qz
 
46
      real*8 f, qmi,qma, q2max
 
47
      real*8 PI
 
48
      data PI/3.14159265358979323846/
 
49
 
 
50
      data xin/0.938/ ! proton mass in GeV
 
51
 
 
52
      alpha = .0072992701
 
53
      qz = 0.71
 
54
    
 
55
C     // x = omega/E = (E-E')/E
 
56
      if (x.lt.1) then
 
57
         qmi= xin*xin*x*x/(1-x)
 
58
         if(qmi.lt.q2max) then          
 
59
            f = alpha/PI*(phi_f(x,q2max/qz)-phi_f(x,qmi/qz))*(1-x)/x
 
60
         else
 
61
            f=0.
 
62
         endif
 
63
      else
 
64
         f= 0.
 
65
      endif
 
66
      if (f .lt. 0) f = 0
 
67
      epa_proton= f
 
68
      end
 
69
 
 
70
      real*8 function phi_f(x,qq)
 
71
      real*8 x, qq
 
72
      real*8 y,qq1,f
 
73
      real*8 a,b,c
 
74
 
 
75
       a = 7.16
 
76
       b = -3.96
 
77
       c = .028
 
78
 
 
79
      qq1=1+qq
 
80
      y= x*x/(1-x)
 
81
      f=(1+a*y)*(-log(qq1/qq)+1/qq1+1/(2*qq1*qq1)+1/(3*qq1*qq1*qq1))
 
82
      f=f + (1-b)*y/(4*qq*qq1*qq1*qq1);
 
83
      f=f+ c*(1+y/4)*(log((qq1-b)/qq1)+b/qq1+b*b/(2*qq1*qq1)+
 
84
     $b*b*b/(3*qq1*qq1*qq1))
 
85
      phi_f= f
 
86
      end
 
87