~maddevelopers/mg5amcnlo/new_clustering

« back to all changes in this revision

Viewing changes to vendor/eepdfgrid/gridpdfaux_fccee365.f

  • Committer: Rikkert Frederix
  • Date: 2021-09-09 15:51:40 UTC
  • mfrom: (78.75.502 3.2.1)
  • Revision ID: frederix@physik.uzh.ch-20210909155140-rg6umfq68h6h47cf
merge with 3.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      integer function eepdf_n_components(partonid,beamid)
 
2
      implicit none
 
3
      integer partonid,beamid
 
4
      integer ncom
 
5
c     electron beam
 
6
      if (beamid .eq. 11) then
 
7
c     other partons are zero
 
8
        if (partonid .ne. 11) then
 
9
          ncom=0
 
10
        else
 
11
          ncom=4
 
12
        endif
 
13
      else if (beamid .eq. -11) then
 
14
        if (partonid .ne. -11) then
 
15
          ncom=0
 
16
        else
 
17
          ncom=4
 
18
        endif
 
19
      endif
 
20
      eepdf_n_components=ncom
 
21
      end
 
22
 
 
23
 
 
24
c     This function return the power of (1-x)
 
25
      real*8 function eepdf_tilde_power(Q2,n,partonid,beamid)
 
26
      implicit none
 
27
      real*8 me
 
28
      data me /0.511d-3/
 
29
      real*8 PI
 
30
      real*8 alphaem
 
31
c     In Gmu scheme
 
32
      data alphaem/0.007562397d0/
 
33
      real*8 beta,Q2
 
34
      integer n,partonid,beamid
 
35
      real*8 k,b
 
36
 
 
37
      PI=4.D0*DATAN(1.D0)
 
38
      beta = alphaem/PI * (dlog(Q2/me/me)-1d0)
 
39
      b=-2.D0/3.D0
 
40
 
 
41
c     electron beam
 
42
      if (beamid .eq. 11) then
 
43
c     other partons are zero
 
44
        if (partonid .ne. 11) then
 
45
          k=0d0
 
46
        else
 
47
          if (n .eq. 1) then
 
48
            k=1d0-beta
 
49
          else if (n .eq. 2) then
 
50
            k=-beta-b
 
51
          else if (n .eq. 3) then
 
52
            k=1d0-beta
 
53
          else if (n .eq. 4) then
 
54
            k=-beta-b
 
55
          else
 
56
            k=0d0
 
57
          endif
 
58
        endif
 
59
      else if (beamid .eq. -11) then
 
60
        if (partonid .ne. -11) then
 
61
          k=0d0
 
62
        else
 
63
          if (n .eq. 1) then
 
64
            k=1d0-beta
 
65
          else if (n .eq. 2) then
 
66
            k=1d0-beta
 
67
          else if (n .eq. 3) then
 
68
            k=-beta-b
 
69
          else if (n .eq. 4) then
 
70
            k=-beta-b
 
71
          else
 
72
            k=0d0
 
73
          endif
 
74
        endif
 
75
      endif
 
76
      eepdf_tilde_power = k
 
77
      end
 
78
 
 
79
c     This function return the type of this component
 
80
      integer function eepdf_tilde_type(n,partonid,beamid)
 
81
      implicit none
 
82
      integer n,partonid,beamid
 
83
      integer res
 
84
 
 
85
c     electron beam
 
86
      if (beamid .eq. 11) then
 
87
c     other partons are zero
 
88
        if (partonid .ne. 11) then
 
89
          res=0
 
90
        else
 
91
          if (n .eq. 1) then
 
92
            res=1
 
93
          else if (n .eq. 2) then
 
94
            res=2
 
95
          else if (n .eq. 3) then
 
96
            res=1
 
97
          else if (n .eq. 4) then
 
98
            res=2
 
99
          else
 
100
            res=0
 
101
          endif
 
102
        endif
 
103
      else if (beamid .eq. -11) then
 
104
        if (partonid .ne. -11) then
 
105
          res=0
 
106
        else
 
107
          if (n .eq. 1) then
 
108
            res=1
 
109
          else if (n .eq. 2) then
 
110
            res=1
 
111
          else if (n .eq. 3) then
 
112
            res=2
 
113
          else if (n .eq. 4) then
 
114
            res=2
 
115
          else
 
116
            res=0
 
117
          endif
 
118
        endif
 
119
      endif
 
120
      eepdf_tilde_type = res
 
121
      end
 
122
 
 
123
c     This is to calculate the factor for grid implementation
 
124
      real*8 function eepdf_tilde_factor(x,Q2,n,partonid,beamid)
 
125
      implicit none
 
126
      real*8 x,Q2
 
127
      real*8 me
 
128
      data me /0.511d-3/
 
129
      real*8 PI
 
130
      real*8 alphaem
 
131
c     In Gmu scheme
 
132
      data alphaem/0.007562397d0/
 
133
      real*8 beta
 
134
      integer n,partonid,beamid
 
135
      real*8 res
 
136
 
 
137
      PI=4.D0*DATAN(1.D0)
 
138
      beta = alphaem/PI * (dlog(Q2/me/me)-1d0)
 
139
 
 
140
c     electron beam
 
141
      if (beamid .eq. 11) then
 
142
c     other partons are zero
 
143
        if (partonid .ne. 11) then
 
144
          res=1d0
 
145
        else
 
146
          if (n .eq. 1) then
 
147
            res = 1d0
 
148
          else if (n .eq. 2) then
 
149
            res = 1d0
 
150
          else if (n .eq. 3) then
 
151
            res = 1d0
 
152
          else if (n .eq. 4) then
 
153
            res = 1d0
 
154
          else
 
155
            res = 1d0
 
156
          endif
 
157
        endif
 
158
      else if (beamid .eq. -11) then
 
159
        if (partonid .ne. -11) then
 
160
          res = 1d0
 
161
        else
 
162
          if (n .eq. 1) then
 
163
            res = 1d0
 
164
          else if (n .eq. 2) then
 
165
            res = 1d0
 
166
          else if (n .eq. 3) then
 
167
            res = 1d0
 
168
          else if (n .eq. 4) then
 
169
            res = 1d0
 
170
          else
 
171
            res = 1d0
 
172
          endif
 
173
        endif
 
174
      endif
 
175
      eepdf_tilde_factor = res
 
176
      end