JHUGen MELA  v2.4.1
Matrix element calculations as used in JHUGen. MELA is an important tool that was used for the Higgs boson discovery and for precise measurements of its structure and interactions. Please see the website https://spin.pha.jhu.edu/ and papers cited there for more details, and kindly cite those papers when using this code.
Modules | Functions/Subroutines | Variables
DD_global.F90 File Reference

Go to the source code of this file.

Modules

module  dd_global
 
module  dd_2pt
 
module  dd_3pt
 
module  dd_4pt
 
module  dd_5pt
 
module  dd_6pt
 
module  dd_statistics
 

Functions/Subroutines

subroutine init_dd_global (nmax_in, ritmax_in)
 
integer(kind=8) function binomial_dd (n, m)
 

Variables

integer dd_global::rmax2
 
integer dd_global::rmax3
 
integer dd_global::rmax4
 
integer dd_global::rmax5
 
integer dd_global::rmax6
 
integer dd_global::nmax
 
integer dd_global::rmax
 
integer dd_global::r2max2
 
integer dd_global::r2max3
 
integer dd_global::r2max4
 
integer dd_global::r2max5
 
integer dd_global::r2max6
 
integer(kind=8) dd_global::ncoefmax2
 
integer(kind=8) dd_global::ncoefmax3
 
integer(kind=8) dd_global::ncoefmax4
 
integer(kind=8) dd_global::ncoefmax5
 
integer(kind=8) dd_global::ncoefmax6
 
integer(kind=8) dd_global::ncoefmax3_int
 
integer(kind=8) dd_global::ncoefmax4_int
 
integer, dimension(:), allocatable dd_global::tid
 
integer, dimension(:), allocatable dd_global::ntid
 
integer(kind=8), dimension(:,:), allocatable dd_global::binc
 
double precision dd_global::cacc
 
double precision dd_global::dacc
 
integer dd_global::mode34
 
integer dd_global::mode5
 
integer dd_global::mode6
 
integer dd_global::ritmax
 
integer dd_global::outlevel
 
integer dd_global::outchannel
 
integer dd_global::cout
 
integer dd_global::coutmax
 
logical dd_global::cout_on
 
double precision, dimension(:), allocatable dd_global::aimacc
 
double precision, dimension(:), allocatable dd_global::erracc
 
double precision, dimension(:,:), allocatable dd_global::resaccabs
 
double precision, dimension(:,:), allocatable dd_global::resaccrel
 
double precision, dimension(:,:), allocatable dd_global::resaccabs2
 
double precision, dimension(:,:), allocatable dd_global::resaccrel2
 
integer dd_global::nmaster
 
integer dd_global::r2master
 
integer dd_global::accflag
 
integer dd_global::errflag
 
integer dd_global::stopflag
 
double precision dd_global::deltauv
 
double precision dd_global::muv2
 
double precision dd_global::delta2ir
 
double precision dd_global::delta1ir
 
double precision dd_global::mir2
 
double precision, dimension(100) dd_global::mx2
 
double complex, dimension(:), allocatable dd_global::scalint
 
double complex, dimension(:), allocatable dd_global::scalintnew
 
double precision, dimension(:), allocatable dd_global::scalint_err
 
double complex, dimension(:,:), allocatable dd_global::auxc
 
double precision, dimension(:,:), allocatable dd_global::auxr
 
double precision, dimension(:), allocatable dd_global::acc_pave
 
double precision, dimension(:), allocatable dd_global::acc_new
 
double precision, dimension(:,:), allocatable dd_global::accr2_aux
 
double precision, dimension(:,:), allocatable dd_global::accr2_newprelim
 
double precision, dimension(:,:), allocatable dd_global::accr2_new_aux
 
double precision, dimension(:), allocatable dd_global::maxtxij
 
double precision, dimension(:), allocatable dd_global::maxttx0klm
 
double precision, dimension(:), allocatable dd_global::maxttx0ijm
 
double precision, dimension(:), allocatable dd_global::maxtz_nj
 
double precision, dimension(:), allocatable dd_global::maxttz_knlm
 
double precision, dimension(:), allocatable dd_global::ttzff_kl
 
integer, dimension(:,:), allocatable dd_global::auxi
 
integer, dimension(:), allocatable dd_global::r2_aux
 
integer, dimension(:), allocatable dd_global::r2_new_aux
 
integer, dimension(:), allocatable dd_global::r2_newprelim
 
integer, dimension(:), allocatable dd_global::qmethod
 
integer, dimension(:), allocatable dd_global::qmethod_new
 
integer dd_global::nc_ddin
 
integer dd_global::nr_ddin
 
integer dd_global::ni_ddin
 
integer, dimension(100) dd_global::i_ddin
 
double complex, dimension(100) dd_global::c_ddin
 
double precision, dimension(100) dd_global::r_ddin
 
character(len=20) dd_global::s_ddin
 
double precision dd_global::dprec_dd
 
double complex, dimension(:,:,:), allocatable dd_2pt::b_cache
 
double complex, dimension(:,:,:), allocatable dd_2pt::buv_cache
 
double complex, dimension(:,:), allocatable dd_3pt::c_cache
 
double complex, dimension(:,:), allocatable dd_3pt::cuv_cache
 
double complex, dimension(:,:), allocatable dd_3pt::c_new_cache
 
double complex, dimension(:,:), allocatable dd_3pt::cuv_new_cache
 
double complex, dimension(:,:,:,:,:), allocatable dd_3pt::ttx2_aux
 
double complex, dimension(:,:,:), allocatable dd_3pt::x2_aux
 
double complex, dimension(:,:,:), allocatable dd_3pt::tx2_aux
 
double precision, dimension(:,:), allocatable dd_3pt::cij_err
 
double precision, dimension(:,:), allocatable dd_3pt::c00_err
 
double precision, dimension(:,:), allocatable dd_3pt::cij_err2
 
double precision, dimension(:,:), allocatable dd_3pt::cij_err_newprelim
 
double precision, dimension(:,:), allocatable dd_3pt::c00_err_newprelim
 
double precision, dimension(:,:), allocatable dd_3pt::cij_err_new
 
double precision, dimension(:,:), allocatable dd_3pt::c00_err_new
 
double precision, dimension(:,:,:), allocatable dd_3pt::z2_aux
 
double precision, dimension(:,:,:), allocatable dd_3pt::tz2_aux
 
double precision, dimension(:,:,:), allocatable dd_3pt::z2i_aux
 
double precision, dimension(:,:,:,:,:), allocatable dd_3pt::ttz2_aux
 
double complex, dimension(:,:), allocatable dd_4pt::d_cache
 
double complex, dimension(:,:), allocatable dd_4pt::duv_cache
 
double precision, dimension(:,:), allocatable dd_4pt::dij_err
 
double precision, dimension(:,:), allocatable dd_4pt::d00_err
 
double precision, dimension(:,:), allocatable dd_4pt::dij_err_new
 
double precision, dimension(:,:), allocatable dd_4pt::d00_err_new
 
double precision, dimension(:,:), allocatable dd_4pt::dij_err2
 
double precision, dimension(:,:), allocatable dd_5pt::eij_err
 
double precision, dimension(:,:), allocatable dd_5pt::eij_err2
 
double precision, dimension(:,:), allocatable dd_6pt::fij_err
 
double precision, dimension(:,:), allocatable dd_6pt::fij_err2
 
integer dd_statistics::dpv_calc_dd
 
integer dd_statistics::dpv_ok_dd
 
integer dd_statistics::dapv_calc_dd
 
integer dd_statistics::dapv_ok_dd
 
integer dd_statistics::dg_calc_dd
 
integer dd_statistics::dg_ok_dd
 
integer dd_statistics::dg2_calc_dd
 
integer dd_statistics::dg2_ok_dd
 
integer dd_statistics::dgc_calc_dd
 
integer dd_statistics::dgc_ok_dd
 
integer dd_statistics::d_bad_dd
 

Function/Subroutine Documentation

◆ binomial_dd()

integer (kind=8) function binomial_dd ( integer  n,
integer  m 
)

Definition at line 271 of file DD_global.F90.

271  integer :: i,n,m
272 
273  binomial_dd = 1
274  if ((m.ge.0).and.(m.le.n)) then
275  do i=1,m
276  binomial_dd = binomial_dd*(n+1-i)
278  enddo
279  else
280  binomial_dd = 0
281  endif
282 

◆ init_dd_global()

subroutine init_dd_global ( integer, intent(in)  nmax_in,
integer, intent(in)  ritmax_in 
)

Definition at line 85 of file DD_global.F90.

85 
86  use dd_global
87  use dd_2pt
88  use dd_3pt
89  use dd_4pt
90  use dd_5pt
91  use dd_6pt
92 
93  integer, intent(in) :: nmax_in,ritmax_in
94  integer :: id,n,k
95  integer (kind=8) :: Binomial_DD
96 
97  ritmax = ritmax_in
98 
99 ! dimensions for array declarations
100  rmax6 = 6
101  rmax5 = 5
102  rmax4 = ritmax+3
103  rmax3 = rmax4+2
104  rmax2 = rmax4+4
105  rmax = 2*rmax2
106 
107 ! maximal rank of N-point tensors
108 ! -> dimensions for arrays in internal cache
109  r2max6 = rmax6
110  r2max5 = r2max6-1
111 ! r2max4 = r2max5-1
112 !changed SD 28.6.17
113  r2max4 = rmax4
114  r2max3 = rmax3
115  r2max2 = rmax2
116 
117 ! store some binomial coefficients
118  if (allocated(binc)) then
119  deallocate(binc)
120  endif
121  allocate(binc(0:r2max3,0:r2max3))
122  do n=0,r2max3
123  do k=0,r2max3
124  binc(n,k) = binomial_dd(n,k)
125  enddo
126  enddo
127 
128  ncoefmax4_int = binomial_dd(r2max4+4,4)
129  ncoefmax3_int = binomial_dd(r2max3+3,3)
130 
131  ncoefmax2 = 2*binomial_dd(r2max2+2,2) + 2*r2max2 + 13
132  ncoefmax3 = 2*binomial_dd(r2max3+3,3) + 8*r2max3 + 11
133  ncoefmax4 = 2*binomial_dd(r2max4+4,4) + 7*r2max4 + 10 ! conservative upper limit
134  ncoefmax5 = 2*binomial_dd(r2max5+5,5) + 6*r2max5 + 9
135  ncoefmax6 = 2*binomial_dd(r2max6+6,6) + 6*r2max6 + 9
136 
137  nmax = nmax_in
138 
139 ! identifiers for N-point functions
140  if (allocated(tid)) then
141  deallocate(tid,ntid)
142  end if
143  allocate(tid(0:2**nmax_in-1),ntid(0:nmax_in))
144  ntid(0:nmax) = 0
145  do id=0,2**nmax-1
146  n=0
147  do k=0,nmax-1
148  if (mod(id,2**(k+1))/2**k.eq.0) n=n+1
149  enddo
150  ntid(n) = ntid(n)+1
151  tid(id) = ntid(n)
152  enddo
153 
154  if (allocated(aimacc)) then
155  deallocate(aimacc,erracc)
156  end if
157  allocate(aimacc(nmax),erracc(nmax))
158 
159  if (allocated(resaccabs)) then
160  deallocate(resaccabs,resaccrel,resaccabs2,resaccrel2)
161  end if
162  allocate(resaccabs(0:2**nmax,0:rmax),resaccrel(0:2**nmax,0:rmax))
163  allocate(resaccabs2(0:2**nmax,0:rmax),resaccrel2(0:2**nmax,0:rmax))
164 
165 ! arrays depending on nmax and any r2max#
166 
167  if (allocated(b_cache)) then
168  deallocate(b_cache,buv_cache)
169  end if
170  if (nmax.ge.2) then
171  allocate(b_cache(ntid(2),0:r2max2,0:r2max2))
172  allocate(buv_cache(ntid(2),0:r2max2,0:r2max2))
173  endif
174 
175  if (allocated(c_cache)) then
176  deallocate(c_cache,cuv_cache,c_new_cache,cuv_new_cache)
177  deallocate(cij_err,c00_err,cij_err2)
178  deallocate(cij_err_newprelim,c00_err_newprelim,cij_err_new,c00_err_new)
179  deallocate(accr2_aux,accr2_newprelim,accr2_new_aux)
180  endif
181  if (nmax.ge.3) then
182  allocate(c_cache(ntid(3),ncoefmax3_int))
183  allocate(cuv_cache(ntid(3),ncoefmax3_int))
184  allocate(c_new_cache(ntid(3),ncoefmax3_int))
185  allocate(cuv_new_cache(ntid(3),ncoefmax3_int))
186  allocate(cij_err(ntid(3),0:2*r2max3))
187  allocate(c00_err(ntid(3),0:2*r2max3))
188  allocate(cij_err2(ntid(3),0:2*r2max3))
189  allocate(cij_err_newprelim(ntid(3),0:2*r2max3))
190  allocate(c00_err_newprelim(ntid(3),0:2*r2max3))
191  allocate(cij_err_new(ntid(3),0:2*r2max3))
192  allocate(c00_err_new(ntid(3),0:2*r2max3))
193  allocate(accr2_aux(ntid(3),0:2*r2max3))
194  allocate(accr2_newprelim(ntid(3),0:2*r2max3))
195  allocate(accr2_new_aux(ntid(3),0:2*r2max3))
196  endif
197 
198  if (allocated(d_cache)) then
199  deallocate(d_cache,duv_cache)
200  deallocate(dij_err,d00_err,dij_err_new,d00_err_new,dij_err2)
201  endif
202  if (nmax.ge.4) then
203  allocate(d_cache(ntid(4),ncoefmax4_int))
204  allocate(duv_cache(ntid(4),ncoefmax4_int))
205  allocate(dij_err(ntid(4),0:2*r2max4))
206  allocate(d00_err(ntid(4),0:2*r2max4))
207  allocate(dij_err_new(ntid(4),0:2*r2max4))
208  allocate(d00_err_new(ntid(4),0:2*r2max4))
209  allocate(dij_err2(ntid(4),0:2*r2max4))
210  endif
211 
212  if (allocated(eij_err)) then
213  deallocate(eij_err,eij_err2)
214  endif
215  if (nmax.ge.5) then
216  allocate(eij_err(ntid(5),0:2*r2max5))
217  allocate(eij_err2(ntid(5),0:2*r2max5))
218  endif
219 
220  if (allocated(fij_err)) then
221  deallocate(fij_err,fij_err2)
222  endif
223  if (nmax.ge.6) then
224  allocate(fij_err(ntid(6),0:2*r2max6))
225  allocate(fij_err2(ntid(6),0:2*r2max6))
226  endif
227 
228 ! arrays depending only on nmax
229 
230  if (allocated(z2i_aux)) then
231  deallocate(z2_aux,tz2_aux,z2i_aux,ttz2_aux)
232  deallocate(x2_aux,tx2_aux,ttx2_aux)
233  endif
234  if (nmax.ge.3) then
235  allocate(z2i_aux(ntid(3),2,2),ttz2_aux(ntid(3),2,2,2,2))
236  allocate(z2_aux(ntid(3),2,2),tz2_aux(ntid(3),2,2))
237  allocate(x2_aux(ntid(3),0:2,0:2),tx2_aux(ntid(3),0:2,0:2))
238  allocate(ttx2_aux(ntid(3),0:2,0:2,0:2,0:2))
239  endif
240 
241  if (allocated(scalint)) then
242  deallocate(scalint,scalint_err,scalintnew)
243  deallocate(auxc)
244  deallocate(auxr)
245  deallocate(acc_pave,acc_new)
246  deallocate(maxtxij,maxttx0klm,maxttx0ijm)
247  deallocate(maxtz_nj,maxttz_knlm,ttzff_kl)
248  deallocate(auxi,r2_aux,r2_new_aux,r2_newprelim,qmethod,qmethod_new)
249  end if
250 
251  allocate(scalint(0:2**nmax),scalint_err(0:2**nmax),scalintnew(0:2**nmax))
252  allocate(maxtxij(0:2**nmax),maxttx0klm(0:2**nmax),maxttx0ijm(0:2**nmax))
253  allocate(maxtz_nj(0:2**nmax),maxttz_knlm(0:2**nmax),ttzff_kl(0:2**nmax))
254  allocate(acc_pave(0:2**nmax),acc_new(0:2**nmax))
255  allocate(auxr(0:2**nmax,2))
256  allocate(auxc(0:2**nmax,7))
257  allocate(auxi(0:2**nmax,6))
258  allocate(r2_aux(0:2**nmax),r2_new_aux(0:2**nmax),r2_newprelim(0:2**nmax))
259  allocate(qmethod(0:2**nmax),qmethod_new(0:2**nmax))
260 
dd_global::ncoefmax4
integer(kind=8) ncoefmax4
Definition: DD_global.F90:14
dd_global::r2max5
integer r2max5
Definition: DD_global.F90:13
dd_global::rmax3
integer rmax3
Definition: DD_global.F90:12
dd_global::r2max4
integer r2max4
Definition: DD_global.F90:13
dd_global::ncoefmax6
integer(kind=8) ncoefmax6
Definition: DD_global.F90:14
dd_global::tid
integer, dimension(:), allocatable tid
Definition: DD_global.F90:16
dd_global::ncoefmax4_int
integer(kind=8) ncoefmax4_int
Definition: DD_global.F90:15
dd_global::ncoefmax2
integer(kind=8) ncoefmax2
Definition: DD_global.F90:14
dd_global::ntid
integer, dimension(:), allocatable ntid
Definition: DD_global.F90:16
dd_global::ritmax
integer ritmax
Definition: DD_global.F90:20
dd_global::r2max2
integer r2max2
Definition: DD_global.F90:13
dd_global::rmax5
integer rmax5
Definition: DD_global.F90:12
dd_global::rmax
integer rmax
Definition: DD_global.F90:12
dd_global::ncoefmax3_int
integer(kind=8) ncoefmax3_int
Definition: DD_global.F90:15
dd_global::rmax6
integer rmax6
Definition: DD_global.F90:12
dd_global::nmax
integer nmax
Definition: DD_global.F90:12
dd_4pt
Definition: DD_global.F90:64
dd_2pt
Definition: DD_global.F90:50
dd_5pt
Definition: DD_global.F90:69
dd_6pt
Definition: DD_global.F90:73
dd_3pt
Definition: DD_global.F90:54
dd_global::r2max6
integer r2max6
Definition: DD_global.F90:13
dd_global
Definition: DD_global.F90:11
dd_global::ncoefmax3
integer(kind=8) ncoefmax3
Definition: DD_global.F90:14
endif
O0 g endif() string(TOLOWER "$
Definition: CMakeLists.txt:143
binomial_dd
integer(kind=8) function binomial_dd(n, m)
Definition: DD_global.F90:271
dd_global::rmax2
integer rmax2
Definition: DD_global.F90:12
dd_global::r2max3
integer r2max3
Definition: DD_global.F90:13
dd_global::rmax4
integer rmax4
Definition: DD_global.F90:12
dd_global::ncoefmax5
integer(kind=8) ncoefmax5
Definition: DD_global.F90:14
dd_global::binc
integer(kind=8), dimension(:,:), allocatable binc
Definition: DD_global.F90:17