Merge lp:~maddevelopers/mg5amcnlo/lo_small_width into lp:~mg5core1/mg5amcnlo/2.6.4

Proposed by Olivier Mattelaer on 2018-10-26
Status: Merged
Merged at revision: 313
Proposed branch: lp:~maddevelopers/mg5amcnlo/lo_small_width
Merge into: lp:~mg5core1/mg5amcnlo/2.6.4
Diff against target: 4339 lines (+323/-3266)
32 files modified
MadSpin/interface_madspin.py (+6/-2)
Template/LO/Source/run.inc (+4/-1)
Template/LO/Source/transpole.f (+20/-1)
Template/LO/SubProcesses/myamp.f (+39/-112)
UpdateNotes.txt (+8/-2)
madgraph/core/helas_objects.py (+7/-0)
madgraph/interface/common_run_interface.py (+37/-1)
madgraph/iolibs/export_v4.py (+54/-4)
madgraph/iolibs/helas_call_writers.py (+23/-0)
madgraph/iolibs/template_files/matrix_loop_induced_madevent_group.inc (+1/-0)
madgraph/iolibs/template_files/matrix_madevent_group_v4.inc (+18/-0)
madgraph/iolibs/template_files/matrix_madevent_v4.inc (+16/-1)
madgraph/iolibs/template_files/matrix_madweight_group_v4.inc (+1/-0)
madgraph/various/banner.py (+1/-0)
madgraph/various/lhe_parser.py (+13/-8)
tests/acceptance_tests/test_cmd_madloop.py (+2/-2)
tests/acceptance_tests/test_export_fks.py (+1/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%GOLEM_interface.f (+0/-748)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%TIR_interface.f (+3/-11)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f (+1/-1)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%GOLEM_interface.f (+0/-748)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%TIR_interface.f (+3/-11)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f (+1/-1)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f (+29/-6)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f (+20/-3)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%GOLEM_interface.f (+0/-823)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%TIR_interface.f (+3/-11)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f (+1/-1)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%GOLEM_interface.f (+0/-755)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%TIR_interface.f (+3/-11)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f (+1/-1)
tests/unit_tests/iolibs/test_export_v4.py (+7/-0)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/lo_small_width
Reviewer Review Type Date Requested Status
Valentin Hirschi 2018-10-26 Pending
Review via email: mp+357867@code.launchpad.net
To post a comment you must log in.
311. By olivier-mattelaer on 2018-10-26

better writing of matrix.f to avoid to recompute the fake width systematically

312. By olivier-mattelaer on 2018-10-26

change small_width default value + Updates notes

313. By olivier-mattelaer on 2018-10-31

merge with 2.6.4

314. By olivier-mattelaer on 2018-10-31

fixing an issue with multiple particle with 0 width

315. By olivier-mattelaer on 2018-11-08

fixing tests

316. By olivier-mattelaer on 2018-11-08

merging with latest 2.6.4

317. By olivier-mattelaer on 2018-11-09

secure check in auto/scan case

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MadSpin/interface_madspin.py'
2--- MadSpin/interface_madspin.py 2018-10-31 10:07:53 +0000
3+++ MadSpin/interface_madspin.py 2018-11-09 08:24:41 +0000
4@@ -1067,8 +1067,13 @@
5 if len(hepmc_output) == 0:
6 hepmc_output.append(lhe_parser.Particle(event=hepmc_output))
7 hepmc_output[0].color2 = 0
8+ hepmc_output[0].status = -1
9+ hepmc_output.nexternal+=1
10 decayed_particle = lhe_parser.Particle(particle, hepmc_output)
11+ decayed_particle.mother1 = hepmc_output[0]
12+ decayed_particle.mother2 = hepmc_output[0]
13 hepmc_output.append(decayed_particle)
14+ hepmc_output.nexternal+=1
15 decayed_particle.add_decay(decay)
16 # change the weight associate to the event
17 if self.options['new_wgt'] == 'cross-section':
18@@ -1086,7 +1091,6 @@
19 else:
20 hepmc_output.wgt = event.wgt
21 hepmc_output.nexternal = len(hepmc_output) # the append does not update nexternal
22- hepmc_output.assign_mother()
23 output_lhe.write(str(hepmc_output))
24 else:
25 if counter==0:
26@@ -1436,7 +1440,7 @@
27 if self.options['fixed_order']:
28 production, counterevt= production[0], production[1:]
29 if curr_event and curr_event % 1000 == 0 and float(str(curr_event)[1:]) ==0:
30- print "decaying event number %s. Efficiency: %s [%s s]" % (curr_event, 1/self.efficiency, time.time()-start)
31+ logger.info("decaying event number %s. Efficiency: %s [%s s]" % (curr_event, 1/self.efficiency, time.time()-start))
32 while 1:
33 nb_try +=1
34 decays = self.get_decay_from_file(production, evt_decayfile, nb_event-curr_event)
35
36=== modified file 'Template/LO/Source/run.inc'
37--- Template/LO/Source/run.inc 2018-02-01 22:30:56 +0000
38+++ Template/LO/Source/run.inc 2018-11-09 08:24:41 +0000
39@@ -91,4 +91,7 @@
40 double precision mxxmin4pdg(0:25)
41 logical mxxpart_antipart(1:25)
42 common/TO_PDG_SPECIFIC_CUT/pdg_cut, ptmin4pdg,ptmax4pdg, Emin4pdg, Emax4pdg, etamin4pdg,
43- &etamax4pdg, mxxmin4pdg,mxxpart_antipart
44\ No newline at end of file
45+ &etamax4pdg, mxxmin4pdg,mxxpart_antipart
46+
47+ double precision small_width_treatment
48+ common/narrow_width/small_width_treatment
49\ No newline at end of file
50
51=== modified file 'Template/LO/Source/transpole.f'
52--- Template/LO/Source/transpole.f 2016-06-15 22:46:42 +0000
53+++ Template/LO/Source/transpole.f 2018-11-09 08:24:41 +0000
54@@ -28,13 +28,24 @@
55 double precision z,zmin,zmax,xmin,xmax,ez
56 double precision pole1,width1,x,xc
57 double precision a,b
58+c
59+c small width treatment
60+c
61+ double precision small_width_treatment
62+ common/narrow_width/small_width_treatment
63 c-----
64 c Begin Code
65 c-----
66 pole=pole1
67 width=width1
68+
69 x = x1
70 if (pole .gt. 0d0) then
71+ if (width.lt.pole*small_width_treatment)then
72+ width = pole * small_width_treatment
73+ jac = jac * width/width1
74+ endif
75+
76 zmin = atan((-pole)/width)/width
77 zmax = atan((1d0-pole)/width)/width
78 if (x .gt. del .and. x .lt. 1d0-del) then
79@@ -175,7 +186,11 @@
80 c
81 double precision pole1,width1,y1,jac
82 real*8 x
83-
84+c
85+c small width treatment
86+c
87+ double precision small_width_treatment
88+ common/narrow_width/small_width_treatment
89 c
90 c Local
91 c
92@@ -191,6 +206,10 @@
93 width=width1
94 y = y1
95 if (pole .gt. 0d0) then !BW
96+ if (width.lt.pole*small_width_treatment)then
97+ width = pole * small_width_treatment
98+ jac = jac * width/width1
99+ endif
100 zmin = atan((-pole)/width)/width
101 zmax = atan((1d0-pole)/width)/width
102 z = atan((y-pole)/width)/width
103
104=== modified file 'Template/LO/SubProcesses/myamp.f'
105--- Template/LO/SubProcesses/myamp.f 2016-12-17 16:26:56 +0000
106+++ Template/LO/SubProcesses/myamp.f 2018-11-09 08:24:41 +0000
107@@ -1,91 +1,3 @@
108- double precision function testamp(p)
109-c*****************************************************************************
110-c Approximates matrix element by propagators
111-c*****************************************************************************
112- implicit none
113-c
114-c Constants
115-c
116- include 'genps.inc'
117- include 'maxconfigs.inc'
118- include 'nexternal.inc'
119- double precision zero
120- parameter (zero = 0d0)
121-c
122-c Arguments
123-c
124- double precision p(0:3,nexternal)
125-c integer iconfig
126-c
127-c Local
128-c
129- double precision xp(0:3,-nexternal:nexternal)
130- double precision mpole(-nexternal:0),shat,tsgn
131- integer i,j,iconfig
132-
133- double precision prmass(-nexternal:0,lmaxconfigs)
134- double precision prwidth(-nexternal:0,lmaxconfigs)
135- integer pow(-nexternal:0,lmaxconfigs)
136- logical first_time
137-c
138-c Global
139-c
140- integer iforest(2,-max_branch:-1,lmaxconfigs)
141- common/to_forest/ iforest
142- integer mapconfig(0:lmaxconfigs), this_config
143- common/to_mconfigs/mapconfig, this_config
144-
145- include 'coupl.inc'
146-c
147-c External
148-c
149- double precision dot
150-
151- save prmass,prwidth,pow
152- data first_time /.true./
153-c-----
154-c Begin Code
155-c-----
156- iconfig = this_config
157- if (first_time) then
158-c include 'props.inc'
159- first_time=.false.
160- endif
161-
162- do i=1,nexternal
163- mpole(-i)=0d0
164- do j=0,3
165- xp(j,i)=p(j,i)
166- enddo
167- enddo
168-c mpole(-3) = 174**2
169-c shat = dot(p(0,1),p(0,2))/(1800)**2
170- shat = dot(p(0,1),p(0,2))/(10)**2
171-c shat = 1d0
172- testamp = 1d0
173- tsgn = +1d0
174- do i=-1,-(nexternal-3),-1 !Find all the propagotors
175- if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0
176- do j=0,3
177- xp(j,i) = xp(j,iforest(1,i,iconfig))
178- $ +tsgn*xp(j,iforest(2,i,iconfig))
179- enddo
180- if (prwidth(i,iconfig) .ne. 0d0 .and. .false.) then
181- testamp=testamp/((dot(xp(0,i),xp(0,i))
182- $ -prmass(i,iconfig)**2)**2
183- $ -(prmass(i,iconfig)*prwidth(i,iconfig))**2)
184- else
185- testamp = testamp/((dot(xp(0,i),xp(0,i)) -
186- $ prmass(i,iconfig)**2)
187- $ **(pow(i,iconfig)))
188- endif
189- testamp=testamp*shat**(pow(i,iconfig))
190-c write(*,*) i,iconfig,pow(i,iconfig),prmass(i,iconfig)
191- enddo
192-c testamp = 1d0/dot(xp(0,-1),xp(0,-1))
193- testamp=abs(testamp)
194-c testamp = 1d0
195- end
196
197 logical function cut_bw(p)
198 c*****************************************************************************
199@@ -114,6 +26,7 @@
200
201 double precision prmass(-nexternal:0,lmaxconfigs)
202 double precision prwidth(-nexternal:0,lmaxconfigs)
203+ double precision prwidth_tmp(-nexternal:0,lmaxconfigs)
204 integer pow(-nexternal:0,lmaxconfigs)
205 logical first_time, onshell
206 double precision xmass
207@@ -152,13 +65,14 @@
208 c
209 double precision dot
210
211- save prmass,prwidth,pow
212+ save prmass,prwidth,pow,prwidth_tmp
213 data first_time /.true./
214 c-----
215 c Begin Code
216 c-----
217 cut_bw = .false. !Default is we passed the cut
218 iconfig = this_config
219+
220 if (first_time) then
221 include 'props.inc'
222 nbw = 0
223@@ -209,10 +123,12 @@
224 c write(*,*) 'xmass',xmass,prmass(i,iconfig)
225 c
226 c Here we set if the BW is "on-shell" for LesHouches
227-c
228+c
229+ prwidth_tmp(i,iconfig) = max(prwidth(i,iconfig), prmass(i,iconfig)*small_width_treatment)
230+
231 onshell = (abs(xmass - prmass(i,iconfig)) .lt.
232- $ bwcutoff*prwidth(i,iconfig).and.
233- $ (prwidth(i,iconfig)/prmass(i,iconfig).lt.0.1d0.or.
234+ $ bwcutoff*prwidth_tmp(i,iconfig).and.
235+ $ (prwidth_tmp(i,iconfig)/prmass(i,iconfig).lt.0.1d0.or.
236 $ gForceBW(i,iconfig).eq.1))
237 if(onshell)then
238 c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11)
239@@ -264,10 +180,10 @@
240 c For decay-chain syntax use BWcutoff here too (22/12/14)
241 if (gForceBW(i, iconfig).eq.1) then
242 onshell = (abs(xmass - prmass(i,iconfig)) .lt.
243- $ bwcutoff*prwidth(i,iconfig))
244+ $ bwcutoff*prwidth_tmp(i,iconfig))
245 else
246 onshell = (abs(xmass - prmass(i,iconfig)) .lt.
247- $ 5d0*prwidth(i,iconfig))
248+ $ 5d0*prwidth_tmp(i,iconfig))
249 endif
250
251 if (onshell .and. (lbw(nbw).eq. 2) .or.
252@@ -313,6 +229,7 @@
253
254 double precision prmass(-nexternal:0,lmaxconfigs)
255 double precision prwidth(-nexternal:0,lmaxconfigs)
256+ double precision prwidth_tmp(-nexternal:0,lmaxconfigs)
257 integer pow(-nexternal:0,lmaxconfigs)
258
259 integer idup(nexternal,maxproc,maxsproc)
260@@ -382,11 +299,21 @@
261
262 c-----
263 c Begin Code
264-c-----
265+c-----
266+ iconfig = this_config
267+c needs to be initialise to avoid segfault
268+ do i = -nexternal,-1
269+ prwidth(i,iconfig) = 0
270+ prmass(i,iconfig) =0
271+ enddo
272 include 'props.inc'
273 c etmin = 10
274 nt = 0
275- iconfig = this_config
276+ do i = -nexternal,-1
277+ prwidth_tmp(i,iconfig) = max(prwidth(i,iconfig), prmass(i,iconfig)*small_width_treatment)
278+ enddo
279+
280+
281 mtot = 0d0
282 etot = 0d0 !Total energy needed
283 spmass = 0d0 !Keep track of BW masses for shat
284@@ -423,7 +350,7 @@
285 c Look for identical particles to map radiation processes
286 call idenparts(iden_part, iforest(1,-max_branch,iconfig),
287 $ sprop(1,-max_branch,iconfig), gForceBW(-max_branch,iconfig),
288- $ prwidth(-nexternal,iconfig))
289+ $ prwidth_tmp(-nexternal,iconfig))
290
291 c Start loop over propagators
292 do i=-1,-(nexternal-3),-1
293@@ -446,15 +373,15 @@
294 xm(i)=max(xm(i),max(xqcutij(l1,l2),0d0))
295 endif
296 c write(*,*) 'iconfig,i',iconfig,i
297-c write(*,*) prwidth(i,iconfig),prmass(i,iconfig)
298- if (prwidth(i,iconfig) .gt. 0 ) then
299+c write(*,*) prwidth_tmp(i,iconfig),prmass(i,iconfig)
300+ if (prwidth_tmp(i,iconfig) .gt. 0 ) then
301 nbw=nbw+1
302 c JA 6/8/2011 Set xe(i) for resonances
303 if (gforcebw(i,iconfig).eq.1) then
304- xm(i) = max(xm(i), prmass(i,iconfig)-bwcutoff*prwidth(i,iconfig))
305+ xm(i) = max(xm(i), prmass(i,iconfig)-bwcutoff*prwidth_tmp(i,iconfig))
306 bwcut_for_PS(i) = bwcutoff
307 else if (lbw(nbw).eq.1) then
308- xm(i) = max(xm(i), prmass(i,iconfig)-5d0*prwidth(i,iconfig))
309+ xm(i) = max(xm(i), prmass(i,iconfig)-5d0*prwidth_tmp(i,iconfig))
310 bwcut_for_PS(i) = 5d0
311 else
312 bwcut_for_PS(i) = 5d0
313@@ -465,19 +392,19 @@
314 c Either: required onshell and daughter masses too large
315 c Or: forced and daughter masses too large
316 c Or: required offshell and forced
317- if(prwidth(i,iconfig) .gt. 0.and.
318+ if(prwidth_tmp(i,iconfig) .gt. 0.and.
319 $ (lbw(nbw).eq.1.and.
320- $ (prmass(i,iconfig)+bwcut_for_PS(i)*prwidth(i,iconfig).lt.xm(i)
321- $ .or.prmass(i,iconfig)-bwcut_for_PS(i)*prwidth(i,iconfig).gt.dsqrt(stot))
322+ $ (prmass(i,iconfig)+bwcut_for_PS(i)*prwidth_tmp(i,iconfig).lt.xm(i)
323+ $ .or.prmass(i,iconfig)-bwcut_for_PS(i)*prwidth_tmp(i,iconfig).gt.dsqrt(stot))
324 $ .or.gforcebw(i,iconfig).eq.1.and.
325- $ prmass(i,iconfig)+bwcutoff*prwidth(i,iconfig).lt.xm(i)
326+ $ prmass(i,iconfig)+bwcutoff*prwidth_tmp(i,iconfig).lt.xm(i)
327 $ .or.lbw(nbw).eq.2.and.gforcebw(i,iconfig).eq.1))
328 $ then
329 c Write results.dat and quit
330 call write_null_results()
331 stop
332 endif
333- if (prwidth(i,iconfig) .gt. 0 .and. lbw(nbw) .le. 1) then !B.W.
334+ if (prwidth_tmp(i,iconfig) .gt. 0 .and. lbw(nbw) .le. 1) then !B.W.
335 if (i .eq. -(nexternal-(nincoming+1))) then !This is s-hat
336 j = 3*(nexternal-2)-4+1 !set i to ndim+1
337 c-----
338@@ -489,14 +416,14 @@
339 $ .or. lbw(nbw).eq.1) then
340 write(*,*) 'Setting PDF BW',j,nbw,prmass(i,iconfig)
341 spole(j)=prmass(i,iconfig)*prmass(i,iconfig)/stot
342- swidth(j) = prwidth(i,iconfig)*prmass(i,iconfig)/stot
343+ swidth(j) = prwidth(i,iconfig)*prmass(i,iconfig)/stot ! keep the real width here (important for the jacobian)
344 endif
345- else if((prmass(i,iconfig)+bwcut_for_PS(i)*prwidth(i,iconfig)).ge.xm(i)
346+ else if((prmass(i,iconfig)+bwcut_for_PS(i)*prwidth_tmp(i,iconfig)).ge.xm(i)
347 $ .and. iden_part(i).eq.0 .or. lbw(nbw).eq.1) then
348 c JA 02/13 Only allow BW if xm below M+5*Gamma
349 write(*,*) 'Setting BW',i,nbw,prmass(i,iconfig)
350 spole(-i)=prmass(i,iconfig)*prmass(i,iconfig)/stot
351- swidth(-i) = prwidth(i,iconfig)*prmass(i,iconfig)/stot
352+ swidth(-i) = prwidth(i,iconfig)*prmass(i,iconfig)/stot ! keep the real width here (important for the jacobian)
353 endif
354 c JA 4/1/2011 Set grid in case there is no BW (radiation process)
355 if (swidth(-i) .eq. 0d0 .and.
356@@ -509,7 +436,7 @@
357 c Set spmass for BWs
358 if (swidth(-i) .ne. 0d0)
359 $ spmass=spmass-xm(i) +
360- $ max(xm(i),prmass(i,iconfig)-bwcut_for_PS(i)*prwidth(i,iconfig))
361+ $ max(xm(i),prmass(i,iconfig)-bwcut_for_PS(i)*prwidth_tmp(i,iconfig))
362 else !1/x^pow
363 a=prmass(i,iconfig)**2/stot
364 c JA 4/1/2011 always set grid
365@@ -530,7 +457,7 @@
366 endif
367 endif
368 if (xo.eq.0d0) xo=1d0/stot
369-c if (prwidth(i, iconfig) .eq. 0d0.or.iden_part(i).gt.0) then
370+c if (prwidth_tmp(i, iconfig) .eq. 0d0.or.iden_part(i).gt.0) then
371 call setgrid(-i,xo,a,1)
372 c else
373 c write(*,*) 'Using flat grid for BW',i,nbw,
374@@ -610,7 +537,7 @@
375 spole(i)= -2.0d0 ! 1/s pole
376 write(*,*) "Transforming s_hat 1/s ",i,xo, smin, stot
377 else
378- write(*,*) "Transforming s_hat BW ",spole(i),swidth(i)
379+ write(*,*) "Transforming s_hat BW ",spole(i), max(swidth(i), spole(i)*small_width_treatment)
380 endif
381 endif
382
383
384=== modified file 'UpdateNotes.txt'
385--- UpdateNotes.txt 2018-10-17 13:25:07 +0000
386+++ UpdateNotes.txt 2018-11-09 08:24:41 +0000
387@@ -1,12 +1,18 @@
388 Update notes for MadGraph5_aMC@NLO (in reverse time order)
389
390 2.6.4 (//)
391+ OM: add specific treatement for small width (at LO only and not for loop-induced)
392+ if the width is smaller than 1e-6 times the mass, a fake width (at that value) is used for the
393+ numerical evaluation of the matrix-element. S-channel resonances are re-scaled according to
394+ narrow-width approximation to return the correct total cross-section (the distribution of events
395+ will on the other hand follow the new width).
396+ The parameter '1e-6' can be changed by adding to (LO) run_card the parameter: "small_width_treatment"
397+ OM: add a new command "install looptools" to trigger the question that is automatically trigger
398+ the first time a loop computation is needed.
399 RF: Fixed a bug when using TopDrawer plots for f(N)LO runs, where the combination of the plots could lead
400 to completely wrong histograms/distributions in case of high-precision runs.
401 OM: Fix some MLM crash for some processes (in particular BSM processes with W').
402 OM: Fix a bug in the reweighting due to the new lhe format (the one avoiding some issue with py8)
403- OM: add a new command "install looptools" to trigger the question that is automatically trigger
404- the first time a loop computation is needed.
405 OM: Fix a behavior for negative mass, the width was set to negative in the param_card automatically
406 making the Parton-shower (and other code) to crash since this does not follow the convention.
407 OM: Change compiler flag to support Mojave.
408
409=== modified file 'madgraph/core/helas_objects.py'
410--- madgraph/core/helas_objects.py 2017-08-10 13:09:28 +0000
411+++ madgraph/core/helas_objects.py 2018-11-09 08:24:41 +0000
412@@ -4569,6 +4569,13 @@
413 return sum([d.get('wavefunctions') for d in \
414 self.get('diagrams')], [])
415
416+
417+ def get_all_mass_widths(self):
418+ """Gives a list of all widths used by this ME (from propagator)"""
419+
420+ return set([(d.get('mass'),d.get('width')) for d in self.get_all_wavefunctions()])
421+
422+
423 def get_all_amplitudes(self):
424 """Gives a list of all amplitudes for this ME"""
425
426
427=== modified file 'madgraph/interface/common_run_interface.py'
428--- madgraph/interface/common_run_interface.py 2018-11-08 22:22:58 +0000
429+++ madgraph/interface/common_run_interface.py 2018-11-09 08:24:41 +0000
430@@ -3242,7 +3242,19 @@
431 - Check that no width are too small (raise a warning if this is the case)
432 3) if dependent is on True check for dependent parameter (automatic for scan)"""
433
434- return self.static_check_param_card(path, self, run=run, dependent=dependent)
435+ self.static_check_param_card(path, self, run=run, dependent=dependent)
436+
437+ card = param_card_mod.ParamCard(path)
438+ for param in card['decay']:
439+ width = param.value
440+ if width == 0:
441+ continue
442+ try:
443+ mass = card['mass'].get(param.lhacode).value
444+ except Exception:
445+ continue
446+
447+
448
449 @staticmethod
450 def static_check_param_card(path, interface, run=True, dependent=False,
451@@ -5680,6 +5692,30 @@
452 self.run_card['mass_ion1'] != self.run_card['mass_ion2']):
453 raise Exception, "Heavy ion profile for both beam are different but the symmetry used forbids it. \n Please generate your process with \"set group_subprocesses False\"."
454
455+ # check the status of small width status from LO
456+ for param in self.param_card['decay']:
457+ width = param.value
458+ if width == 0 or isinstance(width,str):
459+ continue
460+ try:
461+ mass = self.param_card['mass'].get(param.lhacode).value
462+ except Exception:
463+ continue
464+ if isinstance(mass,str):
465+ continue
466+
467+ if mass:
468+ if abs(width/mass) < self.run_card['small_width_treatment']:
469+ logger.warning("Particle %s will use a fake width ( %s instead of %s ).\n" +
470+ "Cross-section will be rescaled according to NWA if needed." +
471+ "To force exact treatment reduce the value of 'small_width_treatment' parameter of the run_card",
472+ param.lhacode[0], mass*self.run_card['small_width_treatment'], width)
473+ elif abs(width/mass) < 1e-12:
474+ logger.error('The width of particle %s is too small for an s-channel resonance (%s). If you have this particle in an s-channel, this is likely to create numerical instabilities .', param.lhacode[0], width)
475+ if CommonRunCmd.sleep_for_error:
476+ time.sleep(5)
477+ CommonRunCmd.sleep_for_error = False
478+
479
480 ########################################################################
481 # NLO specific check
482
483=== modified file 'madgraph/iolibs/export_v4.py'
484--- madgraph/iolibs/export_v4.py 2018-11-08 22:22:58 +0000
485+++ madgraph/iolibs/export_v4.py 2018-11-09 08:24:41 +0000
486@@ -12,6 +12,7 @@
487 # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch
488 #
489 ################################################################################
490+from madgraph.iolibs.helas_call_writers import HelasCallWriter
491 """Methods and classes to export matrix elements to v4 format."""
492
493 import copy
494@@ -93,12 +94,28 @@
495 # - None, madgraph do nothing for initialisation
496 exporter = 'v4'
497 # language of the output 'v4' for Fortran output
498- # 'cpp' for C++ output
499+ # 'cpp' for C++ output
500
501
502 def __init__(self, dir_path = "", opt=None):
503- # cmd_options is a dictionary with all the optional argurment passed at output time
504- return
505+ # cmd_options is a dictionary with all the optional argurment passed at output time
506+
507+ # Activate some monkey patching for the helas call writer.
508+ helas_call_writers.HelasCallWriter.customize_argument_for_all_other_helas_object = \
509+ self.helas_call_writer_custom
510+
511+
512+ # helper function for customise helas writter
513+ @staticmethod
514+ def custom_helas_call(call, arg):
515+ """static method to customise the way aloha function call are written
516+ call is the default template for the call
517+ arg are the dictionary used for the call
518+ """
519+ return call, arg
520+
521+ helas_call_writer_custom = lambda x,y,z: x.custom_helas_call(y,z)
522+
523
524 def copy_template(self, model):
525 return
526@@ -160,6 +177,9 @@
527 #place holder to pass information to the run_interface
528 self.proc_characteristic = banner_mod.ProcCharacteristic()
529
530+ # call mother class
531+ super(ProcessExporterFortran,self).__init__(dir_path, opt)
532+
533
534 #===========================================================================
535 # process exporter fortran switch between group and not grouped
536@@ -3423,6 +3443,7 @@
537 return s_and_t_channels
538
539
540+
541 #===============================================================================
542 # ProcessExporterFortranME
543 #===============================================================================
544@@ -3431,7 +3452,16 @@
545 MadEvent format."""
546
547 matrix_file = "matrix_madevent_v4.inc"
548-
549+
550+ # helper function for customise helas writter
551+ @staticmethod
552+ def custom_helas_call(call, arg):
553+ if arg['mass'] == '%(M)s,%(W)s,':
554+ arg['mass'] = '%(M)s, fk_%(W)s,'
555+ elif '%(W)s' in arg['mass']:
556+ raise Exception
557+ return call, arg
558+
559 def copy_template(self, model):
560 """Additional actions needed for setup of Template
561 """
562@@ -3455,6 +3485,7 @@
563
564
565
566+
567
568
569 #===========================================================================
570@@ -3945,10 +3976,29 @@
571 # Extract helas calls
572 helas_calls = fortran_model.get_matrix_element_calls(\
573 matrix_element)
574+
575
576 replace_dict['helas_calls'] = "\n".join(helas_calls)
577
578
579+ #adding the support for the fake width (forbidding too small width)
580+ mass_width = matrix_element.get_all_mass_widths()
581+ width_list = set([e[1] for e in mass_width])
582+
583+ replace_dict['fake_width_declaration'] = \
584+ (' double precision fk_%s \n' * len(width_list)) % tuple(width_list)
585+ replace_dict['fake_width_declaration'] += \
586+ (' save fk_%s \n' * len(width_list)) % tuple(width_list)
587+ fk_w_defs = []
588+ one_def = ' fk_%(w)s = SIGN(MAX(ABS(%(w)s), ABS(%(m)s*small_width_treatment)), %(w)s)'
589+ for m, w in mass_width:
590+ if w == 'zero':
591+ if ' fk_zero = 0d0' not in fk_w_defs:
592+ fk_w_defs.append(' fk_zero = 0d0')
593+ continue
594+ fk_w_defs.append(one_def %{'m':m, 'w':w})
595+ replace_dict['fake_width_definitions'] = '\n'.join(fk_w_defs)
596+
597 # Extract version number and date from VERSION file
598 info_lines = self.get_mg5_info_lines()
599 replace_dict['info_lines'] = info_lines
600
601=== modified file 'madgraph/iolibs/helas_call_writers.py'
602--- madgraph/iolibs/helas_call_writers.py 2016-03-03 23:17:06 +0000
603+++ madgraph/iolibs/helas_call_writers.py 2018-11-09 08:24:41 +0000
604@@ -21,11 +21,13 @@
605 import aloha.aloha_writers as aloha_writers
606 import aloha
607 from madgraph import MadGraph5Error
608+import madgraph.various.misc as misc
609
610 class HelasWriterError(Exception):
611 """Class for the error of this module """
612 pass
613
614+
615 #===============================================================================
616 # HelasCallWriter
617 #===============================================================================
618@@ -41,6 +43,19 @@
619 # Dictionaries from spin states to letters in Helas call
620 mother_dict = {1: 'S', 2: 'O', -2: 'I', 3: 'V', 5: 'T', 4:'OR', -4:'IR',
621 99:'P'}
622+
623+ @staticmethod
624+ def customize_argument_for_all_other_helas_object(call, arg):
625+ """ Place holder for PLUGIN/...
626+ (used by madevent output for small width handling)
627+ """
628+ return call, arg
629+
630+ @staticmethod
631+ def default_customize_argument_for_all_other_helas_object(call,arg):
632+ return call,arg
633+ #customize_argument_for_all_other_helas_object = fct_customize_argument_for_all_other_helas_object
634+ #default_customize_argument_for_all_other_helas_object = fct_customize_argument_for_all_other_helas_object
635
636 def default_setup(self):
637
638@@ -85,6 +100,11 @@
639
640 return ['model', 'wavefunctions', 'amplitudes']
641
642+
643+
644+
645+
646+
647 def get_loop_amp_helas_calls(self, matrix_element):
648 """Return a list of strings, corresponding to the Helas calls
649 for building loop amplitudes (AMPL) only."""
650@@ -1197,6 +1217,7 @@
651 arg['second_line'] = ampl+"="+ampl+"*(%(uvct)s)"
652
653 # ALL ARGUMENT FORMATTED ###############################################
654+ call, arg = HelasCallWriter.customize_argument_for_all_other_helas_object(call, arg)
655 # Store the result.
656 call = call % arg
657 # Now we have a line correctly formatted
658@@ -1209,6 +1230,8 @@
659 else:
660 self.add_amplitude(argument.get_call_key(), call_function)
661
662+
663+
664 def get_loop_amplitude_helas_calls(self, loop_matrix_element):
665 """ Returns a list of strings corresponding to the Helas calls for each
666 loop amplitude of this loop matrix element. This function is placed in
667
668=== modified file 'madgraph/iolibs/template_files/matrix_loop_induced_madevent_group.inc'
669--- madgraph/iolibs/template_files/matrix_loop_induced_madevent_group.inc 2017-11-01 10:08:52 +0000
670+++ madgraph/iolibs/template_files/matrix_loop_induced_madevent_group.inc 2018-11-09 08:24:41 +0000
671@@ -39,6 +39,7 @@
672 C When set negative, the security above is removed
673 DOUBLE PRECISION MULTICHANNEL_THRES
674 PARAMETER (MULTICHANNEL_THRES=1.0d-5)
675+
676 c
677 c global (due to reading writting)
678 c
679
680=== modified file 'madgraph/iolibs/template_files/matrix_madevent_group_v4.inc'
681--- madgraph/iolibs/template_files/matrix_madevent_group_v4.inc 2017-11-01 10:08:52 +0000
682+++ madgraph/iolibs/template_files/matrix_madevent_group_v4.inc 2018-11-09 08:24:41 +0000
683@@ -68,6 +68,9 @@
684
685 REAL*8 POL(2)
686 COMMON/TO_POLARIZATION/ POL
687+
688+ double precision small_width_treatment
689+ common/narrow_width/small_width_treatment
690
691 INTEGER ISUM_HEL
692 LOGICAL MULTI_CHANNEL
693@@ -87,6 +90,7 @@
694 C ----------
695 C BEGIN CODE
696 C ----------
697+
698 NTRY(IMIRROR)=NTRY(IMIRROR)+1
699 THIS_NTRY(IMIRROR) = THIS_NTRY(IMIRROR)+1
700 DO I=1,NEXTERNAL
701@@ -255,6 +259,11 @@
702 C Needed for v4 models
703 COMPLEX*16 DUM0,DUM1
704 DATA DUM0, DUM1/(0d0, 0d0), (1d0, 0d0)/
705+
706+ %(fake_width_declaration)s
707+ logical first
708+ data first /.true./
709+ save first
710 C
711 C FUNCTION
712 C
713@@ -265,6 +274,9 @@
714 Double Precision amp2(maxamps), jamp2(0:maxflow)
715 common/to_amps/ amp2, jamp2
716 include 'coupl.inc'
717+
718+ double precision small_width_treatment
719+ common/narrow_width/small_width_treatment
720 C
721 C COLOR DATA
722 C
723@@ -272,6 +284,12 @@
724 C ----------
725 C BEGIN CODE
726 C ----------
727+if (first) then
728+ first=.false.
729+ %(fake_width_definitions)s
730+endif
731+
732+
733 %(helas_calls)s
734 %(jamp_lines)s
735
736
737=== modified file 'madgraph/iolibs/template_files/matrix_madevent_v4.inc'
738--- madgraph/iolibs/template_files/matrix_madevent_v4.inc 2017-11-01 10:08:52 +0000
739+++ madgraph/iolibs/template_files/matrix_madevent_v4.inc 2018-11-09 08:24:41 +0000
740@@ -49,6 +49,7 @@
741 INTEGER IDUM, NGOOD, IGOOD(NCOMB), JHEL, J, JJ
742 REAL XRAN1
743 EXTERNAL XRAN1
744+
745 C
746 C GLOBAL VARIABLES
747 C
748@@ -58,7 +59,7 @@
749 CHARACTER*101 HEL_BUFF
750 COMMON/TO_HELICITY/ HEL_BUFF
751
752- REAL*8 POL(2)
753+ REAL*8 POL(2)
754 COMMON/TO_POLARIZATION/ POL
755
756 INTEGER ISUM_HEL
757@@ -68,6 +69,7 @@
758 DATA IDUM /-1/
759 DATA XTRY, XREJ, NGOOD /0,0,0/
760 SAVE YFRAC, IGOOD, JHEL
761+
762 %(helicity_lines)s
763 %(den_factor_line)s
764 C ----------
765@@ -235,6 +237,11 @@
766 C Needed for v4 models
767 COMPLEX*16 DUM0,DUM1
768 DATA DUM0, DUM1/(0d0, 0d0), (1d0, 0d0)/
769+
770+ %(fake_width_declaration)s
771+ logical first
772+ data first /.true./
773+ save first
774 C
775 C FUNCTION
776 C
777@@ -245,6 +252,9 @@
778 Double Precision amp2(maxamps), jamp2(0:maxflow)
779 common/to_amps/ amp2, jamp2
780 include 'coupl.inc'
781+
782+ double precision small_width_treatment
783+ common/narrow_width/small_width_treatment
784 C
785 C COLOR DATA
786 C
787@@ -252,6 +262,11 @@
788 C ----------
789 C BEGIN CODE
790 C ----------
791+if (first) then
792+ first=.false.
793+ %(fake_width_definitions)s
794+endif
795+
796 %(helas_calls)s
797 %(jamp_lines)s
798
799
800=== modified file 'madgraph/iolibs/template_files/matrix_madweight_group_v4.inc'
801--- madgraph/iolibs/template_files/matrix_madweight_group_v4.inc 2012-02-29 12:53:46 +0000
802+++ madgraph/iolibs/template_files/matrix_madweight_group_v4.inc 2018-11-09 08:24:41 +0000
803@@ -22,6 +22,7 @@
804 C ARGUMENTS
805 C
806 REAL*8 P(0:3,NEXTERNAL),ANS
807+
808 C
809 C LOCAL VARIABLES
810 C
811
812=== modified file 'madgraph/various/banner.py'
813--- madgraph/various/banner.py 2018-10-19 08:43:52 +0000
814+++ madgraph/various/banner.py 2018-11-09 08:24:41 +0000
815@@ -2952,6 +2952,7 @@
816 self.add_param('survey_splitting', -1, hidden=True, include=False, comment="for loop-induced control how many core are used at survey for the computation of a single iteration.")
817 self.add_param('survey_nchannel_per_job', 2, hidden=True, include=False, comment="control how many Channel are integrated inside a single job on cluster/multicore")
818 self.add_param('refine_evt_by_job', -1, hidden=True, include=False, comment="control the maximal number of events for the first iteration of the refine (larger means less jobs)")
819+ self.add_param('small_width_treatment', 1e-6, hidden=True, comment="generation where the width is below VALUE times mass will be replace by VALUE times mass for the computation. The cross-section will be corrected assuming NWA. Not used for loop-induced process")
820
821 # parameter allowing to define simple cut via the pdg
822 # Special syntax are related to those. (can not be edit directly)
823
824=== modified file 'madgraph/various/lhe_parser.py'
825--- madgraph/various/lhe_parser.py 2018-06-21 08:57:21 +0000
826+++ madgraph/various/lhe_parser.py 2018-11-09 08:24:41 +0000
827@@ -167,6 +167,7 @@
828 """associate to this particle the decay in the associate event"""
829
830 return self.event.add_decay_to_particle(self.event_id, decay_event)
831+
832
833 def __repr__(self):
834 return 'Particle("%s", event=%s)' % (str(self), self.event)
835@@ -1263,26 +1264,28 @@
836
837 if 'part' == status:
838 part = Particle(line, event=self)
839- if part.E != 0:
840+ if part.E != 0 or part.status==-1:
841 self.append(part)
842 elif self.nexternal:
843- self.nexternal-=1
844+ self.nexternal-=1
845 else:
846 if '</event>' in line:
847 line = line.replace('</event>','',1)
848 self.tag += '%s\n' % line
849
850 self.assign_mother()
851-
852+
853+
854 def assign_mother(self):
855 """convert the number in actual particle"""
856- #Security if not incoming particle. Define a fake particle and set all particle as
857- # decaying from that fake particle
858+ #Security if not incoming particle. Define a fake particle
859 if all(p.status != -1 for p in self):
860+ if not self.nexternal:
861+ return
862 if self.warning_order:
863 Event.warning_order = False
864 logger.warning("Weird format for lhe format: no incoming particle... adding a fake one")
865-
866+ raise Exception
867 mother = Particle(event=self)
868 mother.status = -1
869 mother.pid = 0
870@@ -1291,8 +1294,10 @@
871 mother.event_id = 0
872 self.nexternal += 1
873 for p in self[1:]:
874- p.mother1 = 1
875- p.mother2 = 1
876+ if isinstance(p.mother1, int) and p.mother1 > 1:
877+ p.mother1 += 1
878+ if isinstance(p.mother2, int) and p.mother2 > 1:
879+ p.mother2 += 1
880 p.event_id += 1
881
882
883
884=== modified file 'tests/acceptance_tests/test_cmd_madloop.py'
885--- tests/acceptance_tests/test_cmd_madloop.py 2018-04-24 22:39:50 +0000
886+++ tests/acceptance_tests/test_cmd_madloop.py 2018-11-09 08:24:41 +0000
887@@ -492,7 +492,7 @@
888 # Select the Tensor Integral to include in the test
889 misc.deactivate_dependence('pjfry', cmd = self.interface, log='stdout')
890 misc.deactivate_dependence('samurai', cmd = self.interface, log='stdout')
891- misc.activate_dependence('golem', cmd = self.interface, log='stdout')
892+ misc.deactivate_dependence('golem', cmd = self.interface, log='stdout')
893 misc.activate_dependence('ninja', cmd = self.interface, log='stdout',MG5dir=MG5DIR)
894 misc.activate_dependence('collier', cmd = self.interface, log='stdout',MG5dir=MG5DIR)
895
896@@ -533,7 +533,7 @@
897 # Select the Tensor Integral to include in the test
898 misc.deactivate_dependence('pjfry', cmd = interface, log='stdout')
899 misc.deactivate_dependence('samurai', cmd = interface, log='stdout')
900- misc.activate_dependence('golem', cmd = interface, log='stdout')
901+ misc.deactivate_dependence('golem', cmd = interface, log='stdout')
902 misc.activate_dependence('ninja', cmd = interface, log='stdout',MG5dir=MG5DIR)
903
904 run_cmd('generate g g > t t~ [virt=QCD]')
905
906=== modified file 'tests/acceptance_tests/test_export_fks.py'
907--- tests/acceptance_tests/test_export_fks.py 2017-05-15 10:39:31 +0000
908+++ tests/acceptance_tests/test_export_fks.py 2018-11-09 08:24:41 +0000
909@@ -75,7 +75,7 @@
910 # Select the Tensor Integral to include in the test
911 misc.deactivate_dependence('pjfry', cmd = interface, log='stdout')
912 misc.deactivate_dependence('samurai', cmd = interface, log='stdout')
913- misc.activate_dependence('golem', cmd = interface, log='stdout')
914+ misc.deactivate_dependence('golem', cmd = interface, log='stdout')
915 misc.activate_dependence('ninja', cmd = interface, log='stdout',MG5dir=MG5DIR)
916
917 run_cmd('import model %s' % model)
918
919=== removed file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%GOLEM_interface.f'
920--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%GOLEM_interface.f 2016-08-07 07:16:07 +0000
921+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%GOLEM_interface.f 1970-01-01 00:00:00 +0000
922@@ -1,748 +0,0 @@
923- SUBROUTINE GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE)
924-C
925-C Generated by MadGraph5_aMC@NLO v. %(version)s, %(date)s
926-C By the MadGraph5_aMC@NLO Development Team
927-C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch
928-C
929-C Interface between MG5 and Golem95.
930-C The Golem95 version should be higher than 1.3.0.
931-C It supports RANK = NLOOPLINE + 1 tensor integrals when 1 <
932-C NLOOPLINE < 6.
933-C
934-C Process: d~ u > w+ QED<=1 WEIGHTED<=2 [ all = QCD ]
935-C Process: s~ c > w+ QED<=1 WEIGHTED<=2 [ all = QCD ]
936-C
937-C
938-C MODULES
939-C
940- USE MATRICE_S
941- USE FORM_FACTOR_TYPE, ONLY: FORM_FACTOR
942- USE PRECISION_GOLEM, ONLY: KI
943- USE TENS_COMB
944- USE TENS_REC
945- USE FORM_FACTOR_1P, ONLY: A10
946- USE FORM_FACTOR_2P, ONLY: A20
947- USE FORM_FACTOR_3P, ONLY: A30
948- USE FORM_FACTOR_4P, ONLY: A40
949- USE FORM_FACTOR_5P, ONLY: A50
950- USE FORM_FACTOR_6P, ONLY: A60
951- IMPLICIT NONE
952-C
953-C CONSTANTS
954-C
955- INTEGER NEXTERNAL
956- PARAMETER (NEXTERNAL=3)
957- LOGICAL CHECKPCONSERVATION
958- PARAMETER (CHECKPCONSERVATION=.TRUE.)
959- REAL*8 NORMALIZATION
960- PARAMETER (NORMALIZATION = 1.D0/(16.D0*3.14159265358979323846D0*
961- $ *2))
962- REAL(KI),DIMENSION(0:3),PARAMETER::NULL_VEC = (/0.0_KI,0.0_KI
963- $ ,0.0_KI,0.0_KI/)
964-C GOLEM_RUN_MODE = 1: Use directly MadLoop tensorial coefficients
965-C GOLEM_RUN_MODE = 2: Reconstruct the tensorial coefficeints
966-C directly from
967-C numerator using golem internal reconstruction routine
968-C GOLEM_RUN_MODE = 3: Cross-checked reconstructed coefficients
969-C against
970-C MadLoop internal ones.
971- INTEGER GOLEM_RUN_MODE
972- PARAMETER (GOLEM_RUN_MODE=1)
973-C The following is the acceptance threshold used for
974-C GOLEM_RUN_MODE = 3
975- REAL*8 COEF_CHECK_THRS
976- DATA COEF_CHECK_THRS/1.0D-13/
977- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
978-
979- LOGICAL PASS_COEF_CHECK
980-C
981-C ARGUMENTS
982-C
983- INTEGER NLOOPLINE, RANK
984- REAL*8 PL(0:3,NLOOPLINE)
985- REAL*8 PCT(0:3,0:NLOOPLINE-1), ABSPCT(0:3)
986- REAL*8 REF_P
987- REAL(KI) PGOLEM(NLOOPLINE,0:3)
988- COMPLEX*16 M2L(NLOOPLINE)
989- COMPLEX(KI) M2LGOLEM(NLOOPLINE)
990- COMPLEX*16 RES(3)
991- LOGICAL STABLE
992-C
993-C LOCAL VARIABLES
994-C
995- INTEGER I, J, K
996- TYPE(FORM_FACTOR)::RES_GOLEM
997-
998- COMPLEX(KI)::COEFFS0,COEFFS0_REC
999- TYPE(COEFF_TYPE_1)::COEFFS1,COEFFS1_REC
1000- TYPE(COEFF_TYPE_2)::COEFFS2,COEFFS2_REC
1001- TYPE(COEFF_TYPE_3)::COEFFS3,COEFFS3_REC
1002- TYPE(COEFF_TYPE_4)::COEFFS4,COEFFS4_REC
1003- TYPE(COEFF_TYPE_5)::COEFFS5,COEFFS5_REC
1004- TYPE(COEFF_TYPE_6)::COEFFS6,COEFFS6_REC
1005-
1006-C The pinch propagator optimization is not used, so for now it is
1007-C always 0.
1008- INTEGER PINCH
1009-C
1010-C EXTERNAL FUNCTIONS
1011-C
1012- COMPLEX(KI) GOLEM_LOOPNUM
1013- EXTERNAL GOLEM_LOOPNUM
1014- LOGICAL COMPARE_COEFS_0
1015- LOGICAL COMPARE_COEFS_1
1016- LOGICAL COMPARE_COEFS_2
1017- LOGICAL COMPARE_COEFS_3
1018- LOGICAL COMPARE_COEFS_4
1019- LOGICAL COMPARE_COEFS_5
1020- LOGICAL COMPARE_COEFS_6
1021-C
1022-C GLOBAL VARIABLES
1023-C
1024- INCLUDE 'coupl.inc'
1025- INTEGER CTMODE
1026- REAL*8 LSCALE
1027- COMMON/CT/LSCALE,CTMODE
1028-
1029- INTEGER ID,SQSOINDEX,R
1030- COMMON/LOOP/ID,SQSOINDEX,R
1031-
1032- LOGICAL CTINIT, TIRINIT, GOLEMINIT, SAMURAIINIT, NINJAINIT
1033- $ ,COLLIERINIT
1034- COMMON/REDUCTIONCODEINIT/CTINIT, TIRINIT,GOLEMINIT,SAMURAIINIT
1035- $ ,NINJAINIT,COLLIERINIT
1036-
1037- INTEGER NLOOPGROUPS
1038- PARAMETER (NLOOPGROUPS=1)
1039- INTEGER NSQUAREDSO
1040- PARAMETER (NSQUAREDSO=1)
1041- INCLUDE 'loop_max_coefs.inc'
1042-
1043- COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
1044- COMMON/LCOEFS/LOOPCOEFS
1045-C ----------
1046-C BEGIN CODE
1047-C ----------
1048-
1049-C The CT initialization is also performed here if not done already
1050-C because it calls MPINIT of OneLOop which is necessary on some
1051-C system
1052- IF (CTINIT) THEN
1053- CTINIT=.FALSE.
1054- CALL INITCT()
1055- ENDIF
1056-
1057-C INITIALIZE GOLEM IF NEEDED
1058- IF (GOLEMINIT) THEN
1059- GOLEMINIT=.FALSE.
1060- CALL INITGOLEM()
1061- ENDIF
1062-
1063-C No stability test intrisic to Golem95 now
1064- STABLE=.TRUE.
1065-
1066-C This initialization must be done for each reduction because we
1067-C have not setup anyoptimization using pinched propagators yet.
1068- CALL INITGOLEM95(NLOOPLINE)
1069- PINCH = 0
1070-
1071-C YOU CAN FIND THE DETAILS ABOUT THE DIFFERENT CTMODE AT THE
1072-C BEGINNING OF THE FILE CTS_CUTS.F90 IN THE CUTTOOLS DISTRIBUTION
1073-
1074-C CONVERT THE MASSES TO BE COMPLEX
1075- DO I=1,NLOOPLINE
1076- M2LGOLEM(I)=M2L(I)
1077- ENDDO
1078-
1079-C CONVERT THE MOMENTA FLOWING IN THE LOOP LINES TO CT CONVENTIONS
1080- DO I=0,3
1081- ABSPCT(I) = 0.D0
1082- DO J=0,(NLOOPLINE-1)
1083- PCT(I,J)=0.D0
1084- ENDDO
1085- ENDDO
1086- DO I=0,3
1087- DO J=1,NLOOPLINE
1088- PCT(I,0)=PCT(I,0)+PL(I,J)
1089- ABSPCT(I)=ABSPCT(I)+ABS(PL(I,J))
1090- ENDDO
1091- ENDDO
1092- REF_P = MAX(ABSPCT(0), ABSPCT(1),ABSPCT(2),ABSPCT(3))
1093- DO I=0,3
1094- ABSPCT(I) = MAX(REF_P*1E-6, ABSPCT(I))
1095- ENDDO
1096- IF (CHECKPCONSERVATION.AND.REF_P.GT.1D-8) THEN
1097- IF ((PCT(0,0)/ABSPCT(0)).GT.1.D-6) THEN
1098- WRITE(*,*) 'energy is not conserved ',PCT(0,0)
1099- STOP 'energy is not conserved'
1100- ELSEIF ((PCT(1,0)/ABSPCT(1)).GT.1.D-6) THEN
1101- WRITE(*,*) 'px is not conserved ',PCT(1,0)
1102- STOP 'px is not conserved'
1103- ELSEIF ((PCT(2,0)/ABSPCT(2)).GT.1.D-6) THEN
1104- WRITE(*,*) 'py is not conserved ',PCT(2,0)
1105- STOP 'py is not conserved'
1106- ELSEIF ((PCT(3,0)/ABSPCT(3)).GT.1.D-6) THEN
1107- WRITE(*,*) 'pz is not conserved ',PCT(3,0)
1108- STOP 'pz is not conserved'
1109- ENDIF
1110- ENDIF
1111- DO I=0,3
1112- DO J=1,(NLOOPLINE-1)
1113- DO K=1,J
1114- PCT(I,J)=PCT(I,J)+PL(I,K)
1115- ENDDO
1116- ENDDO
1117- ENDDO
1118-
1119-C Now convert the loop momenta to Golem95 conventions
1120- DO I=0,3
1121- PGOLEM(1,I)=0.0E0_KI
1122- DO J=2,NLOOPLINE
1123- PGOLEM(J,I)=PCT(I,J-1)
1124- ENDDO
1125- ENDDO
1126-
1127-C Fill in the kinematic s-matrix while taking care of on-shell
1128-C limits.
1129- CALL SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2LGOLEM)
1130-C Construct the golem internal matrices derived from the kinetic
1131-C one.
1132- CALL PREPARESMATRIX()
1133-
1134-C Fill in the golem coefficents and compute the loop
1135- IF(GOLEM_RUN_MODE.EQ.2)THEN
1136- RES_GOLEM = EVALUATE_B(GOLEM_LOOPNUM,PGOLEM,0,RANK)
1137- ELSE
1138- PASS_COEF_CHECK=.TRUE.
1139- SELECT CASE(RANK)
1140- CASE(0)
1141- CALL FILL_GOLEM_COEFFS_0(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS0)
1142- IF(GOLEM_RUN_MODE.EQ.3)THEN
1143- COEFFS0_REC = GOLEM_LOOPNUM(NULL_VEC,0.0_KI)
1144- PASS_COEF_CHECK=COMPARE_COEFS_0(COEFFS0,COEFFS0_REC)
1145- ENDIF
1146- CASE(1)
1147- CALL FILL_GOLEM_COEFFS_1(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS1)
1148- IF(GOLEM_RUN_MODE.EQ.3)THEN
1149- CALL RECONSTRUCT1(GOLEM_LOOPNUM,COEFFS1_REC)
1150- PASS_COEF_CHECK=COMPARE_COEFS_1(COEFFS1,COEFFS1_REC)
1151- ENDIF
1152- CASE(2)
1153- CALL FILL_GOLEM_COEFFS_2(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS2)
1154- IF(GOLEM_RUN_MODE.EQ.3)THEN
1155- CALL RECONSTRUCT2(GOLEM_LOOPNUM,COEFFS2_REC)
1156- PASS_COEF_CHECK=COMPARE_COEFS_2(COEFFS2,COEFFS2_REC)
1157- ENDIF
1158- CASE(3)
1159- CALL FILL_GOLEM_COEFFS_3(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS3)
1160- IF(GOLEM_RUN_MODE.EQ.3)THEN
1161- CALL RECONSTRUCT3(GOLEM_LOOPNUM,COEFFS3_REC)
1162- PASS_COEF_CHECK=COMPARE_COEFS_3(COEFFS3,COEFFS3_REC)
1163- ENDIF
1164- CASE(4)
1165- CALL FILL_GOLEM_COEFFS_4(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS4)
1166- IF(GOLEM_RUN_MODE.EQ.3)THEN
1167- CALL RECONSTRUCT4(GOLEM_LOOPNUM,COEFFS4_REC)
1168- PASS_COEF_CHECK=COMPARE_COEFS_4(COEFFS4,COEFFS4_REC)
1169- ENDIF
1170- CASE(5)
1171- CALL FILL_GOLEM_COEFFS_5(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS5)
1172- IF(GOLEM_RUN_MODE.EQ.3)THEN
1173- CALL RECONSTRUCT5(GOLEM_LOOPNUM,COEFFS5_REC)
1174- PASS_COEF_CHECK=COMPARE_COEFS_5(COEFFS5,COEFFS5_REC)
1175- ENDIF
1176- CASE(6)
1177- CALL FILL_GOLEM_COEFFS_6(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS6)
1178- IF(GOLEM_RUN_MODE.EQ.3)THEN
1179- CALL RECONSTRUCT6(GOLEM_LOOPNUM,COEFFS6_REC)
1180- PASS_COEF_CHECK=COMPARE_COEFS_6(COEFFS6,COEFFS6_REC)
1181- ENDIF
1182- CASE DEFAULT
1183- WRITE(*,*)'Not yet implemented in Golem95 for rank= ',RANK
1184- STOP
1185- END SELECT
1186-
1187- IF(.NOT.PASS_COEF_CHECK)THEN
1188- WRITE(*,*)'Coefs mismatch for ID ',ID,' and rank ',RANK
1189- WRITE(*,*)'Coefs form MadLoop5:'
1190- SELECT CASE(RANK)
1191- CASE(0)
1192- WRITE(*,*)'Constant coef = ',COEFFS0
1193- CASE(1)
1194- CALL PRINT_COEFFS(COEFFS1)
1195- CASE(2)
1196- CALL PRINT_COEFFS(COEFFS2)
1197- CASE(3)
1198- CALL PRINT_COEFFS(COEFFS3)
1199- CASE(4)
1200- CALL PRINT_COEFFS(COEFFS4)
1201- CASE(5)
1202- CALL PRINT_COEFFS(COEFFS5)
1203- CASE(6)
1204- CALL PRINT_COEFFS(COEFFS6)
1205- END SELECT
1206- WRITE(*,*)'Coefs reconstructed by Golem95:'
1207- SELECT CASE(RANK)
1208- CASE(0)
1209- WRITE(*,*)'Constant coef = ',COEFFS0_REC
1210- CASE(1)
1211- CALL PRINT_COEFFS(COEFFS1_REC)
1212- CASE(2)
1213- CALL PRINT_COEFFS(COEFFS2_REC)
1214- CASE(3)
1215- CALL PRINT_COEFFS(COEFFS3_REC)
1216- CASE(4)
1217- CALL PRINT_COEFFS(COEFFS4_REC)
1218- CASE(5)
1219- CALL PRINT_COEFFS(COEFFS5_REC)
1220- CASE(6)
1221- CALL PRINT_COEFFS(COEFFS6_REC)
1222- END SELECT
1223- STOP
1224- ENDIF
1225-
1226- SELECT CASE(NLOOPLINE)
1227- CASE(1)
1228- WRITE(*,*)'Golem95 cannot handle with tadpole yet'
1229- STOP
1230- CASE(2)
1231- SELECT CASE(RANK)
1232- CASE(0)
1233- RES_GOLEM = COEFFS0*A20(PINCH)
1234- CASE(1)
1235- RES_GOLEM = CONTRACT2_1(COEFFS1,PGOLEM,PINCH)
1236- CASE(2)
1237- RES_GOLEM = CONTRACT2_2(COEFFS2,PGOLEM,PINCH)
1238- CASE(3)
1239- RES_GOLEM = CONTRACT2_3(COEFFS3,PGOLEM,PINCH)
1240- CASE DEFAULT
1241- WRITE(*,*)'Golem95 cannot handle with: N,r = ',2,RANK
1242- STOP
1243- END SELECT
1244- CASE(3)
1245- SELECT CASE(RANK)
1246- CASE(0)
1247- RES_GOLEM = COEFFS0*A30(PINCH)
1248- CASE(1)
1249- RES_GOLEM = CONTRACT3_1(COEFFS1,PGOLEM,PINCH)
1250- CASE(2)
1251- RES_GOLEM = CONTRACT3_2(COEFFS2,PGOLEM,PINCH)
1252- CASE(3)
1253- RES_GOLEM = CONTRACT3_3(COEFFS3,PGOLEM,PINCH)
1254- CASE(4)
1255- RES_GOLEM = CONTRACT3_4(COEFFS4,PGOLEM,PINCH)
1256- CASE DEFAULT
1257- WRITE(*,*)'Golem95 cannot handle with: N,r = ',3,RANK
1258- STOP
1259- END SELECT
1260- CASE(4)
1261- SELECT CASE(RANK)
1262- CASE(0)
1263- RES_GOLEM = COEFFS0*A40(PINCH)
1264- CASE(1)
1265- RES_GOLEM = CONTRACT4_1(COEFFS1,PGOLEM,PINCH)
1266- CASE(2)
1267- RES_GOLEM = CONTRACT4_2(COEFFS2,PGOLEM,PINCH)
1268- CASE(3)
1269- RES_GOLEM = CONTRACT4_3(COEFFS3,PGOLEM,PINCH)
1270- CASE(4)
1271- RES_GOLEM = CONTRACT4_4(COEFFS4,PGOLEM,PINCH)
1272- CASE(5)
1273- RES_GOLEM = CONTRACT4_5(COEFFS5,PGOLEM,PINCH)
1274- CASE DEFAULT
1275- WRITE(*,*)'Golem95 cannot handle with: N,r = ',4,RANK
1276- STOP
1277- END SELECT
1278- CASE(5)
1279- SELECT CASE(RANK)
1280- CASE(0)
1281- RES_GOLEM = COEFFS0*A50(PINCH)
1282- CASE(1)
1283- RES_GOLEM = CONTRACT5_1(COEFFS1,PGOLEM,PINCH)
1284- CASE(2)
1285- RES_GOLEM = CONTRACT5_2(COEFFS2,PGOLEM,PINCH)
1286- CASE(3)
1287- RES_GOLEM = CONTRACT5_3(COEFFS3,PGOLEM,PINCH)
1288- CASE(4)
1289- RES_GOLEM = CONTRACT5_4(COEFFS4,PGOLEM,PINCH)
1290- CASE(5)
1291- RES_GOLEM = CONTRACT5_5(COEFFS5,PGOLEM,PINCH)
1292- CASE(6)
1293- RES_GOLEM = CONTRACT5_6(COEFFS6,PGOLEM,PINCH)
1294- CASE DEFAULT
1295- WRITE(*,*)'Golem95 cannot handle with: N,r = ',5,RANK
1296- STOP
1297- END SELECT
1298- CASE(6)
1299- SELECT CASE(RANK)
1300- CASE(0)
1301- RES_GOLEM = COEFFS0*A60(PINCH)
1302- CASE(1)
1303- RES_GOLEM = CONTRACT6_1(COEFFS1,PGOLEM,PINCH)
1304- CASE(2)
1305- RES_GOLEM = CONTRACT6_2(COEFFS2,PGOLEM,PINCH)
1306- CASE(3)
1307- RES_GOLEM = CONTRACT6_3(COEFFS3,PGOLEM,PINCH)
1308- CASE(4)
1309- RES_GOLEM = CONTRACT6_4(COEFFS4,PGOLEM,PINCH)
1310- CASE(5)
1311- RES_GOLEM = CONTRACT6_5(COEFFS5,PGOLEM,PINCH)
1312- CASE(6)
1313- RES_GOLEM = CONTRACT6_6(COEFFS6,PGOLEM,PINCH)
1314- CASE DEFAULT
1315- WRITE(*,*)'Golem95 cannot handle with: N,r = ',6,RANK
1316- STOP
1317- END SELECT
1318- CASE DEFAULT
1319- WRITE(*,*)'Golem95 cannot handle with: N = ',NLOOPLINE
1320- STOP
1321- END SELECT
1322- ENDIF
1323-
1324- RES(1)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%C+2.0*LOG(MU_R)
1325- $ *RES_GOLEM%%B+2.0*LOG(MU_R)**2*RES_GOLEM%%A)
1326- RES(2)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%B+2.0*LOG(MU_R)
1327- $ *RES_GOLEM%%A)
1328- RES(3)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%A)
1329-C WRITE(*,*) 'Loop ID',ID,' =',RES(1),RES(2),RES(3)
1330-
1331-C Finally free golem memory and cache
1332- CALL EXITGOLEM95()
1333-
1334- END
1335-
1336- FUNCTION GOLEM_LOOPNUM(Q,MU2)
1337- USE PRECISION_GOLEM, ONLY: KI
1338- REAL(KI),DIMENSION(0:3),INTENT(IN)::Q
1339- REAL(KI),INTENT(IN)::MU2
1340- COMPLEX(KI)::GOLEM_LOOPNUM
1341-
1342- COMPLEX*16 QQ(0:3),NUM
1343- INTEGER I
1344-
1345- DO I=0,3
1346- QQ(I)=CMPLX(Q(I),0.0D0,KIND=16)
1347- ENDDO
1348-
1349- CALL LOOPNUM(QQ,NUM)
1350- GOLEM_LOOPNUM=NUM
1351- RETURN
1352- END FUNCTION
1353-
1354- SUBROUTINE INITGOLEM()
1355-C
1356-C INITIALISATION OF GOLEM
1357-C
1358-C
1359-C MODULE
1360-C
1361- USE PARAMETRE
1362-C
1363-C LOCAL VARIABLES
1364-C
1365- REAL*8 THRS
1366- LOGICAL EXT_NUM_FOR_R1
1367-C
1368-C GLOBAL VARIABLES
1369-C
1370- INCLUDE 'MadLoopParams.inc'
1371-C ----------
1372-C BEGIN CODE
1373-C ----------
1374-
1375-C DEFAULT PARAMETERS FOR GOLEM
1376-C -------------------------------
1377-C One can chose here to have either just the rational R1 piece
1378-C or everything but the R2
1379- RAT_OR_TOT_PAR = TOT
1380-
1381- END
1382-
1383- SUBROUTINE SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2L)
1384-C
1385-C MODULE
1386-C
1387- USE MATRICE_S
1388- USE PRECISION_GOLEM, ONLY: KI
1389-C
1390-C ARGUMENTS
1391-C
1392- INTEGER NLOOPLINE
1393- REAL(KI) PGOLEM(NLOOPLINE,0:3)
1394- COMPLEX(KI) M2L(NLOOPLINE)
1395-C
1396-C LOCAL VARIABLES
1397-C
1398- INTEGER I,J
1399- COMPLEX*16 S_MAT_FROM_MG(NLOOPLINE,NLOOPLINE)
1400-C ----------
1401-C BEGIN CODE
1402-C ----------
1403-
1404- CALL BUILD_KINEMATIC_MATRIX(NLOOPLINE,PGOLEM,M2L,S_MAT_FROM_MG)
1405-
1406- DO I=1,NLOOPLINE
1407- DO J=1,NLOOPLINE
1408- S_MAT(I,J)=S_MAT_FROM_MG(I,J)
1409- ENDDO
1410- ENDDO
1411-
1412- END
1413-
1414- FUNCTION COMPARE_COEFS_0(COEFS_A,COEFS_B)
1415-
1416- USE PRECISION_GOLEM, ONLY: KI
1417- COMPLEX(KI) COEFS_A,COEFS_B
1418- REAL*8 COEF_CHECK_THRS
1419- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
1420- REAL*8 DENOM,NUM
1421- LOGICAL COMPARE_COEFS_0
1422-
1423- NUM = ABS(COEFS_A-COEFS_B)
1424- DENOM = ABS(COEFS_A+COEFS_B)
1425- IF(DENOM.GT.0D0)THEN
1426- COMPARE_COEFS_0=((NUM/DENOM).LT.COEF_CHECK_THRS)
1427- ELSE
1428- COMPARE_COEFS_0=(NUM.LT.COEF_CHECK_THRS)
1429- ENDIF
1430-
1431- END
1432-
1433- FUNCTION COMPARE_COEFS_1(COEFS_A,COEFS_B)
1434-
1435- USE TENS_REC
1436- TYPE(COEFF_TYPE_1)COEFS_A,COEFS_B
1437- REAL*8 COEF_CHECK_THRS
1438- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
1439- REAL*8 DENOM,NUM
1440- LOGICAL COMPARE_COEFS_1
1441-
1442- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
1443- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
1444- $ )
1445-
1446- IF(DENOM.GT.0D0)THEN
1447- COMPARE_COEFS_1=((NUM/DENOM).LT.COEF_CHECK_THRS)
1448- ELSE
1449- COMPARE_COEFS_1=(NUM.LT.COEF_CHECK_THRS)
1450- ENDIF
1451-
1452- END
1453-
1454- FUNCTION COMPARE_COEFS_2(COEFS_A,COEFS_B)
1455-
1456- USE TENS_REC
1457- TYPE(COEFF_TYPE_2) COEFS_A,COEFS_B
1458- REAL*8 COEF_CHECK_THRS
1459- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
1460- REAL*8 DENOM,NUM
1461- LOGICAL COMPARE_COEFS_2
1462-
1463- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
1464- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))
1465- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
1466- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))
1467- IF(DENOM.GT.0D0)THEN
1468- COMPARE_COEFS_2=((NUM/DENOM).LT.COEF_CHECK_THRS)
1469- ELSE
1470- COMPARE_COEFS_2=(NUM.LT.COEF_CHECK_THRS)
1471- ENDIF
1472-
1473- END
1474-
1475- FUNCTION COMPARE_COEFS_3(COEFS_A,COEFS_B)
1476-
1477- USE TENS_REC
1478- TYPE(COEFF_TYPE_3) COEFS_A, COEFS_B
1479- REAL*8 COEF_CHECK_THRS
1480- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
1481- REAL*8 DENOM,NUM
1482- LOGICAL COMPARE_COEFS_3
1483-
1484- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
1485- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
1486- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
1487- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
1488- $ )
1489- IF(DENOM.GT.0D0)THEN
1490- COMPARE_COEFS_3=((NUM/DENOM).LT.COEF_CHECK_THRS)
1491- ELSE
1492- COMPARE_COEFS_3=(NUM.LT.COEF_CHECK_THRS)
1493- ENDIF
1494-
1495- END
1496-
1497- FUNCTION COMPARE_COEFS_4(COEFS_A,COEFS_B)
1498-
1499- USE TENS_REC
1500- TYPE(COEFF_TYPE_4) COEFS_A, COEFS_B
1501- REAL*8 COEF_CHECK_THRS
1502- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
1503- REAL*8 DENOM,NUM
1504- LOGICAL COMPARE_COEFS_4
1505-
1506- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
1507- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
1508- $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4))
1509- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
1510- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
1511- $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4))
1512- IF(DENOM.GT.0D0)THEN
1513- COMPARE_COEFS_4=((NUM/DENOM).LT.COEF_CHECK_THRS)
1514- ELSE
1515- COMPARE_COEFS_4=(NUM.LT.COEF_CHECK_THRS)
1516- ENDIF
1517-
1518- END
1519-
1520- FUNCTION COMPARE_COEFS_5(COEFS_A,COEFS_B)
1521-
1522- USE TENS_REC
1523- TYPE(COEFF_TYPE_5) COEFS_A,COEFS_B
1524- REAL*8 COEF_CHECK_THRS
1525- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
1526- REAL*8 DENOM,NUM
1527- LOGICAL COMPARE_COEFS_5
1528-
1529- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
1530- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
1531- $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4))
1532- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
1533- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
1534- $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4))
1535- IF(DENOM.GT.0D0)THEN
1536- COMPARE_COEFS_5=((NUM/DENOM).LT.COEF_CHECK_THRS)
1537- ELSE
1538- COMPARE_COEFS_5=(NUM.LT.COEF_CHECK_THRS)
1539- ENDIF
1540-
1541- END
1542-
1543- FUNCTION COMPARE_COEFS_6(COEFS_A,COEFS_B)
1544-
1545- USE TENS_REC
1546- TYPE(COEFF_TYPE_6) COEFS_A,COEFS_B
1547- REAL*8 COEF_CHECK_THRS
1548- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
1549- REAL*8 DENOM,NUM
1550- LOGICAL COMPARE_COEFS_6
1551-
1552- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
1553- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
1554- $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4))
1555- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
1556- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
1557- $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4))
1558- IF(DENOM.GT.0D0)THEN
1559- COMPARE_COEFS_6=((NUM/DENOM).LT.COEF_CHECK_THRS)
1560- ELSE
1561- COMPARE_COEFS_6=(NUM.LT.COEF_CHECK_THRS)
1562- ENDIF
1563-
1564- END
1565-
1566-
1567- SUBROUTINE FILL_GOLEM_COEFFS_0(ML_COEFS,GOLEM_COEFS)
1568- USE PRECISION_GOLEM, ONLY: KI
1569- INCLUDE 'coef_specs.inc'
1570- INCLUDE 'loop_max_coefs.inc'
1571- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
1572- COMPLEX(KI) GOLEM_COEFS
1573- GOLEM_COEFS=ML_COEFS(0)
1574- END
1575-
1576- SUBROUTINE FILL_GOLEM_COEFFS_1(ML_COEFS,GOLEM_COEFS)
1577- USE TENS_REC, ONLY: COEFF_TYPE_1
1578- INCLUDE 'coef_specs.inc'
1579- INCLUDE 'loop_max_coefs.inc'
1580- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
1581- TYPE(COEFF_TYPE_1) GOLEM_COEFS
1582-C Constant coefficient
1583- GOLEM_COEFS%%C0=ML_COEFS(0)
1584-C Coefficient q(0)
1585- GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1)
1586-C Coefficient q(1)
1587- GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2)
1588-C Coefficient q(2)
1589- GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3)
1590-C Coefficient q(3)
1591- GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4)
1592- END
1593-
1594- SUBROUTINE FILL_GOLEM_COEFFS_2(ML_COEFS,GOLEM_COEFS)
1595- USE TENS_REC, ONLY: COEFF_TYPE_2
1596- INCLUDE 'coef_specs.inc'
1597- INCLUDE 'loop_max_coefs.inc'
1598- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
1599- TYPE(COEFF_TYPE_2) GOLEM_COEFS
1600-C Constant coefficient
1601- GOLEM_COEFS%%C0=ML_COEFS(0)
1602-C Coefficient q(0)
1603- GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1)
1604-C Coefficient q(0)^2
1605- GOLEM_COEFS%%C1(1,2)= ML_COEFS(5)
1606-C Coefficient q(1)
1607- GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2)
1608-C Coefficient q(1)^2
1609- GOLEM_COEFS%%C1(2,2)= ML_COEFS(7)
1610-C Coefficient q(2)
1611- GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3)
1612-C Coefficient q(2)^2
1613- GOLEM_COEFS%%C1(3,2)= ML_COEFS(10)
1614-C Coefficient q(3)
1615- GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4)
1616-C Coefficient q(3)^2
1617- GOLEM_COEFS%%C1(4,2)= ML_COEFS(14)
1618-C Coefficient q(0)*q(1)
1619- GOLEM_COEFS%%C2(1,1)= ML_COEFS(6)
1620-C Coefficient q(0)*q(2)
1621- GOLEM_COEFS%%C2(2,1)= ML_COEFS(8)
1622-C Coefficient q(0)*q(3)
1623- GOLEM_COEFS%%C2(3,1)= ML_COEFS(11)
1624-C Coefficient q(1)*q(2)
1625- GOLEM_COEFS%%C2(4,1)= ML_COEFS(9)
1626-C Coefficient q(1)*q(3)
1627- GOLEM_COEFS%%C2(5,1)= ML_COEFS(12)
1628-C Coefficient q(2)*q(3)
1629- GOLEM_COEFS%%C2(6,1)= ML_COEFS(13)
1630- END
1631-
1632- SUBROUTINE FILL_GOLEM_COEFFS_3(ML_COEFS,GOLEM_COEFS)
1633- USE TENS_REC, ONLY: COEFF_TYPE_3
1634- INCLUDE 'coef_specs.inc'
1635- INCLUDE 'loop_max_coefs.inc'
1636- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
1637- TYPE(COEFF_TYPE_3) GOLEM_COEFS
1638-C Dummy routine for FILL_GOLEM_COEFS_3
1639- STOP 'ERROR: 3 > 2'
1640- END
1641-
1642- SUBROUTINE FILL_GOLEM_COEFFS_4(ML_COEFS,GOLEM_COEFS)
1643- USE TENS_REC, ONLY: COEFF_TYPE_4
1644- INCLUDE 'coef_specs.inc'
1645- INCLUDE 'loop_max_coefs.inc'
1646- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
1647- TYPE(COEFF_TYPE_4) GOLEM_COEFS
1648-C Dummy routine for FILL_GOLEM_COEFS_4
1649- STOP 'ERROR: 4 > 2'
1650- END
1651-
1652- SUBROUTINE FILL_GOLEM_COEFFS_5(ML_COEFS,GOLEM_COEFS)
1653- USE TENS_REC, ONLY: COEFF_TYPE_5
1654- INCLUDE 'coef_specs.inc'
1655- INCLUDE 'loop_max_coefs.inc'
1656- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
1657- TYPE(COEFF_TYPE_5) GOLEM_COEFS
1658-C Dummy routine for FILL_GOLEM_COEFS_5
1659- STOP 'ERROR: 5 > 2'
1660- END
1661-
1662- SUBROUTINE FILL_GOLEM_COEFFS_6(ML_COEFS,GOLEM_COEFS)
1663- USE TENS_REC, ONLY: COEFF_TYPE_6
1664- INCLUDE 'coef_specs.inc'
1665- INCLUDE 'loop_max_coefs.inc'
1666- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
1667- TYPE(COEFF_TYPE_6) GOLEM_COEFS
1668-C Dummy routine for FILL_GOLEM_COEFS_6
1669- STOP 'ERROR: 6 > 2'
1670- END
1671
1672=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%TIR_interface.f'
1673--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%TIR_interface.f 2016-08-07 07:16:07 +0000
1674+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%TIR_interface.f 2018-11-09 08:24:41 +0000
1675@@ -96,17 +96,9 @@
1676 ENDIF
1677
1678 IF (MLREDUCTIONLIB(I_LIB).EQ.4) THEN
1679-C Using Golem95
1680-C PDEN is dummy for Golem95 so we just initialize it to zero
1681-C here so as to use it for the function SWITCHORDER
1682- DO I=0,3
1683- DO J=1,NLOOPLINE-1
1684- PDEN(I,J)=0.0D0
1685- ENDDO
1686- ENDDO
1687- CALL SWITCH_ORDER(CTMODE,NLOOPLINE,PL,PDEN,M2L)
1688- CALL GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE)
1689- RETURN
1690+C Golem95 not available
1691+ WRITE(*,*) 'ERROR:: Golem95 is not interfaced.'
1692+ STOP
1693 ENDIF
1694
1695 C INITIALIZE TIR IF NEEDED
1696
1697=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f'
1698--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f 2017-08-14 07:04:15 +0000
1699+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f 2018-11-09 08:24:41 +0000
1700@@ -244,7 +244,7 @@
1701 C A FLAG TO DENOTE WHETHER THE CORRESPONDING LOOPLIBS ARE
1702 C AVAILABLE OR NOT
1703 LOGICAL LOOPLIBS_AVAILABLE(NLOOPLIB)
1704- DATA LOOPLIBS_AVAILABLE/.TRUE.,.FALSE.,.TRUE.,.TRUE.,.FALSE.
1705+ DATA LOOPLIBS_AVAILABLE/.TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.
1706 $ ,.TRUE.,.TRUE./
1707 COMMON/LOOPLIBS_AV/ LOOPLIBS_AVAILABLE
1708 C A FLAG TO DENOTE WHETHER THE CORRESPONDING DIRECTION TESTS
1709
1710=== removed file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%GOLEM_interface.f'
1711--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%GOLEM_interface.f 2016-08-07 07:16:07 +0000
1712+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%GOLEM_interface.f 1970-01-01 00:00:00 +0000
1713@@ -1,748 +0,0 @@
1714- SUBROUTINE GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE)
1715-C
1716-C Generated by MadGraph5_aMC@NLO v. %(version)s, %(date)s
1717-C By the MadGraph5_aMC@NLO Development Team
1718-C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch
1719-C
1720-C Interface between MG5 and Golem95.
1721-C The Golem95 version should be higher than 1.3.0.
1722-C It supports RANK = NLOOPLINE + 1 tensor integrals when 1 <
1723-C NLOOPLINE < 6.
1724-C
1725-C Process: u d~ > w+ QED<=1 WEIGHTED<=2 [ all = QCD ]
1726-C Process: c s~ > w+ QED<=1 WEIGHTED<=2 [ all = QCD ]
1727-C
1728-C
1729-C MODULES
1730-C
1731- USE MATRICE_S
1732- USE FORM_FACTOR_TYPE, ONLY: FORM_FACTOR
1733- USE PRECISION_GOLEM, ONLY: KI
1734- USE TENS_COMB
1735- USE TENS_REC
1736- USE FORM_FACTOR_1P, ONLY: A10
1737- USE FORM_FACTOR_2P, ONLY: A20
1738- USE FORM_FACTOR_3P, ONLY: A30
1739- USE FORM_FACTOR_4P, ONLY: A40
1740- USE FORM_FACTOR_5P, ONLY: A50
1741- USE FORM_FACTOR_6P, ONLY: A60
1742- IMPLICIT NONE
1743-C
1744-C CONSTANTS
1745-C
1746- INTEGER NEXTERNAL
1747- PARAMETER (NEXTERNAL=3)
1748- LOGICAL CHECKPCONSERVATION
1749- PARAMETER (CHECKPCONSERVATION=.TRUE.)
1750- REAL*8 NORMALIZATION
1751- PARAMETER (NORMALIZATION = 1.D0/(16.D0*3.14159265358979323846D0*
1752- $ *2))
1753- REAL(KI),DIMENSION(0:3),PARAMETER::NULL_VEC = (/0.0_KI,0.0_KI
1754- $ ,0.0_KI,0.0_KI/)
1755-C GOLEM_RUN_MODE = 1: Use directly MadLoop tensorial coefficients
1756-C GOLEM_RUN_MODE = 2: Reconstruct the tensorial coefficeints
1757-C directly from
1758-C numerator using golem internal reconstruction routine
1759-C GOLEM_RUN_MODE = 3: Cross-checked reconstructed coefficients
1760-C against
1761-C MadLoop internal ones.
1762- INTEGER GOLEM_RUN_MODE
1763- PARAMETER (GOLEM_RUN_MODE=1)
1764-C The following is the acceptance threshold used for
1765-C GOLEM_RUN_MODE = 3
1766- REAL*8 COEF_CHECK_THRS
1767- DATA COEF_CHECK_THRS/1.0D-13/
1768- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
1769-
1770- LOGICAL PASS_COEF_CHECK
1771-C
1772-C ARGUMENTS
1773-C
1774- INTEGER NLOOPLINE, RANK
1775- REAL*8 PL(0:3,NLOOPLINE)
1776- REAL*8 PCT(0:3,0:NLOOPLINE-1), ABSPCT(0:3)
1777- REAL*8 REF_P
1778- REAL(KI) PGOLEM(NLOOPLINE,0:3)
1779- COMPLEX*16 M2L(NLOOPLINE)
1780- COMPLEX(KI) M2LGOLEM(NLOOPLINE)
1781- COMPLEX*16 RES(3)
1782- LOGICAL STABLE
1783-C
1784-C LOCAL VARIABLES
1785-C
1786- INTEGER I, J, K
1787- TYPE(FORM_FACTOR)::RES_GOLEM
1788-
1789- COMPLEX(KI)::COEFFS0,COEFFS0_REC
1790- TYPE(COEFF_TYPE_1)::COEFFS1,COEFFS1_REC
1791- TYPE(COEFF_TYPE_2)::COEFFS2,COEFFS2_REC
1792- TYPE(COEFF_TYPE_3)::COEFFS3,COEFFS3_REC
1793- TYPE(COEFF_TYPE_4)::COEFFS4,COEFFS4_REC
1794- TYPE(COEFF_TYPE_5)::COEFFS5,COEFFS5_REC
1795- TYPE(COEFF_TYPE_6)::COEFFS6,COEFFS6_REC
1796-
1797-C The pinch propagator optimization is not used, so for now it is
1798-C always 0.
1799- INTEGER PINCH
1800-C
1801-C EXTERNAL FUNCTIONS
1802-C
1803- COMPLEX(KI) GOLEM_LOOPNUM
1804- EXTERNAL GOLEM_LOOPNUM
1805- LOGICAL COMPARE_COEFS_0
1806- LOGICAL COMPARE_COEFS_1
1807- LOGICAL COMPARE_COEFS_2
1808- LOGICAL COMPARE_COEFS_3
1809- LOGICAL COMPARE_COEFS_4
1810- LOGICAL COMPARE_COEFS_5
1811- LOGICAL COMPARE_COEFS_6
1812-C
1813-C GLOBAL VARIABLES
1814-C
1815- INCLUDE 'coupl.inc'
1816- INTEGER CTMODE
1817- REAL*8 LSCALE
1818- COMMON/CT/LSCALE,CTMODE
1819-
1820- INTEGER ID,SQSOINDEX,R
1821- COMMON/LOOP/ID,SQSOINDEX,R
1822-
1823- LOGICAL CTINIT, TIRINIT, GOLEMINIT, SAMURAIINIT, NINJAINIT
1824- $ ,COLLIERINIT
1825- COMMON/REDUCTIONCODEINIT/CTINIT, TIRINIT,GOLEMINIT,SAMURAIINIT
1826- $ ,NINJAINIT,COLLIERINIT
1827-
1828- INTEGER NLOOPGROUPS
1829- PARAMETER (NLOOPGROUPS=1)
1830- INTEGER NSQUAREDSO
1831- PARAMETER (NSQUAREDSO=1)
1832- INCLUDE 'loop_max_coefs.inc'
1833-
1834- COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
1835- COMMON/LCOEFS/LOOPCOEFS
1836-C ----------
1837-C BEGIN CODE
1838-C ----------
1839-
1840-C The CT initialization is also performed here if not done already
1841-C because it calls MPINIT of OneLOop which is necessary on some
1842-C system
1843- IF (CTINIT) THEN
1844- CTINIT=.FALSE.
1845- CALL INITCT()
1846- ENDIF
1847-
1848-C INITIALIZE GOLEM IF NEEDED
1849- IF (GOLEMINIT) THEN
1850- GOLEMINIT=.FALSE.
1851- CALL INITGOLEM()
1852- ENDIF
1853-
1854-C No stability test intrisic to Golem95 now
1855- STABLE=.TRUE.
1856-
1857-C This initialization must be done for each reduction because we
1858-C have not setup anyoptimization using pinched propagators yet.
1859- CALL INITGOLEM95(NLOOPLINE)
1860- PINCH = 0
1861-
1862-C YOU CAN FIND THE DETAILS ABOUT THE DIFFERENT CTMODE AT THE
1863-C BEGINNING OF THE FILE CTS_CUTS.F90 IN THE CUTTOOLS DISTRIBUTION
1864-
1865-C CONVERT THE MASSES TO BE COMPLEX
1866- DO I=1,NLOOPLINE
1867- M2LGOLEM(I)=M2L(I)
1868- ENDDO
1869-
1870-C CONVERT THE MOMENTA FLOWING IN THE LOOP LINES TO CT CONVENTIONS
1871- DO I=0,3
1872- ABSPCT(I) = 0.D0
1873- DO J=0,(NLOOPLINE-1)
1874- PCT(I,J)=0.D0
1875- ENDDO
1876- ENDDO
1877- DO I=0,3
1878- DO J=1,NLOOPLINE
1879- PCT(I,0)=PCT(I,0)+PL(I,J)
1880- ABSPCT(I)=ABSPCT(I)+ABS(PL(I,J))
1881- ENDDO
1882- ENDDO
1883- REF_P = MAX(ABSPCT(0), ABSPCT(1),ABSPCT(2),ABSPCT(3))
1884- DO I=0,3
1885- ABSPCT(I) = MAX(REF_P*1E-6, ABSPCT(I))
1886- ENDDO
1887- IF (CHECKPCONSERVATION.AND.REF_P.GT.1D-8) THEN
1888- IF ((PCT(0,0)/ABSPCT(0)).GT.1.D-6) THEN
1889- WRITE(*,*) 'energy is not conserved ',PCT(0,0)
1890- STOP 'energy is not conserved'
1891- ELSEIF ((PCT(1,0)/ABSPCT(1)).GT.1.D-6) THEN
1892- WRITE(*,*) 'px is not conserved ',PCT(1,0)
1893- STOP 'px is not conserved'
1894- ELSEIF ((PCT(2,0)/ABSPCT(2)).GT.1.D-6) THEN
1895- WRITE(*,*) 'py is not conserved ',PCT(2,0)
1896- STOP 'py is not conserved'
1897- ELSEIF ((PCT(3,0)/ABSPCT(3)).GT.1.D-6) THEN
1898- WRITE(*,*) 'pz is not conserved ',PCT(3,0)
1899- STOP 'pz is not conserved'
1900- ENDIF
1901- ENDIF
1902- DO I=0,3
1903- DO J=1,(NLOOPLINE-1)
1904- DO K=1,J
1905- PCT(I,J)=PCT(I,J)+PL(I,K)
1906- ENDDO
1907- ENDDO
1908- ENDDO
1909-
1910-C Now convert the loop momenta to Golem95 conventions
1911- DO I=0,3
1912- PGOLEM(1,I)=0.0E0_KI
1913- DO J=2,NLOOPLINE
1914- PGOLEM(J,I)=PCT(I,J-1)
1915- ENDDO
1916- ENDDO
1917-
1918-C Fill in the kinematic s-matrix while taking care of on-shell
1919-C limits.
1920- CALL SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2LGOLEM)
1921-C Construct the golem internal matrices derived from the kinetic
1922-C one.
1923- CALL PREPARESMATRIX()
1924-
1925-C Fill in the golem coefficents and compute the loop
1926- IF(GOLEM_RUN_MODE.EQ.2)THEN
1927- RES_GOLEM = EVALUATE_B(GOLEM_LOOPNUM,PGOLEM,0,RANK)
1928- ELSE
1929- PASS_COEF_CHECK=.TRUE.
1930- SELECT CASE(RANK)
1931- CASE(0)
1932- CALL FILL_GOLEM_COEFFS_0(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS0)
1933- IF(GOLEM_RUN_MODE.EQ.3)THEN
1934- COEFFS0_REC = GOLEM_LOOPNUM(NULL_VEC,0.0_KI)
1935- PASS_COEF_CHECK=COMPARE_COEFS_0(COEFFS0,COEFFS0_REC)
1936- ENDIF
1937- CASE(1)
1938- CALL FILL_GOLEM_COEFFS_1(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS1)
1939- IF(GOLEM_RUN_MODE.EQ.3)THEN
1940- CALL RECONSTRUCT1(GOLEM_LOOPNUM,COEFFS1_REC)
1941- PASS_COEF_CHECK=COMPARE_COEFS_1(COEFFS1,COEFFS1_REC)
1942- ENDIF
1943- CASE(2)
1944- CALL FILL_GOLEM_COEFFS_2(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS2)
1945- IF(GOLEM_RUN_MODE.EQ.3)THEN
1946- CALL RECONSTRUCT2(GOLEM_LOOPNUM,COEFFS2_REC)
1947- PASS_COEF_CHECK=COMPARE_COEFS_2(COEFFS2,COEFFS2_REC)
1948- ENDIF
1949- CASE(3)
1950- CALL FILL_GOLEM_COEFFS_3(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS3)
1951- IF(GOLEM_RUN_MODE.EQ.3)THEN
1952- CALL RECONSTRUCT3(GOLEM_LOOPNUM,COEFFS3_REC)
1953- PASS_COEF_CHECK=COMPARE_COEFS_3(COEFFS3,COEFFS3_REC)
1954- ENDIF
1955- CASE(4)
1956- CALL FILL_GOLEM_COEFFS_4(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS4)
1957- IF(GOLEM_RUN_MODE.EQ.3)THEN
1958- CALL RECONSTRUCT4(GOLEM_LOOPNUM,COEFFS4_REC)
1959- PASS_COEF_CHECK=COMPARE_COEFS_4(COEFFS4,COEFFS4_REC)
1960- ENDIF
1961- CASE(5)
1962- CALL FILL_GOLEM_COEFFS_5(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS5)
1963- IF(GOLEM_RUN_MODE.EQ.3)THEN
1964- CALL RECONSTRUCT5(GOLEM_LOOPNUM,COEFFS5_REC)
1965- PASS_COEF_CHECK=COMPARE_COEFS_5(COEFFS5,COEFFS5_REC)
1966- ENDIF
1967- CASE(6)
1968- CALL FILL_GOLEM_COEFFS_6(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS6)
1969- IF(GOLEM_RUN_MODE.EQ.3)THEN
1970- CALL RECONSTRUCT6(GOLEM_LOOPNUM,COEFFS6_REC)
1971- PASS_COEF_CHECK=COMPARE_COEFS_6(COEFFS6,COEFFS6_REC)
1972- ENDIF
1973- CASE DEFAULT
1974- WRITE(*,*)'Not yet implemented in Golem95 for rank= ',RANK
1975- STOP
1976- END SELECT
1977-
1978- IF(.NOT.PASS_COEF_CHECK)THEN
1979- WRITE(*,*)'Coefs mismatch for ID ',ID,' and rank ',RANK
1980- WRITE(*,*)'Coefs form MadLoop5:'
1981- SELECT CASE(RANK)
1982- CASE(0)
1983- WRITE(*,*)'Constant coef = ',COEFFS0
1984- CASE(1)
1985- CALL PRINT_COEFFS(COEFFS1)
1986- CASE(2)
1987- CALL PRINT_COEFFS(COEFFS2)
1988- CASE(3)
1989- CALL PRINT_COEFFS(COEFFS3)
1990- CASE(4)
1991- CALL PRINT_COEFFS(COEFFS4)
1992- CASE(5)
1993- CALL PRINT_COEFFS(COEFFS5)
1994- CASE(6)
1995- CALL PRINT_COEFFS(COEFFS6)
1996- END SELECT
1997- WRITE(*,*)'Coefs reconstructed by Golem95:'
1998- SELECT CASE(RANK)
1999- CASE(0)
2000- WRITE(*,*)'Constant coef = ',COEFFS0_REC
2001- CASE(1)
2002- CALL PRINT_COEFFS(COEFFS1_REC)
2003- CASE(2)
2004- CALL PRINT_COEFFS(COEFFS2_REC)
2005- CASE(3)
2006- CALL PRINT_COEFFS(COEFFS3_REC)
2007- CASE(4)
2008- CALL PRINT_COEFFS(COEFFS4_REC)
2009- CASE(5)
2010- CALL PRINT_COEFFS(COEFFS5_REC)
2011- CASE(6)
2012- CALL PRINT_COEFFS(COEFFS6_REC)
2013- END SELECT
2014- STOP
2015- ENDIF
2016-
2017- SELECT CASE(NLOOPLINE)
2018- CASE(1)
2019- WRITE(*,*)'Golem95 cannot handle with tadpole yet'
2020- STOP
2021- CASE(2)
2022- SELECT CASE(RANK)
2023- CASE(0)
2024- RES_GOLEM = COEFFS0*A20(PINCH)
2025- CASE(1)
2026- RES_GOLEM = CONTRACT2_1(COEFFS1,PGOLEM,PINCH)
2027- CASE(2)
2028- RES_GOLEM = CONTRACT2_2(COEFFS2,PGOLEM,PINCH)
2029- CASE(3)
2030- RES_GOLEM = CONTRACT2_3(COEFFS3,PGOLEM,PINCH)
2031- CASE DEFAULT
2032- WRITE(*,*)'Golem95 cannot handle with: N,r = ',2,RANK
2033- STOP
2034- END SELECT
2035- CASE(3)
2036- SELECT CASE(RANK)
2037- CASE(0)
2038- RES_GOLEM = COEFFS0*A30(PINCH)
2039- CASE(1)
2040- RES_GOLEM = CONTRACT3_1(COEFFS1,PGOLEM,PINCH)
2041- CASE(2)
2042- RES_GOLEM = CONTRACT3_2(COEFFS2,PGOLEM,PINCH)
2043- CASE(3)
2044- RES_GOLEM = CONTRACT3_3(COEFFS3,PGOLEM,PINCH)
2045- CASE(4)
2046- RES_GOLEM = CONTRACT3_4(COEFFS4,PGOLEM,PINCH)
2047- CASE DEFAULT
2048- WRITE(*,*)'Golem95 cannot handle with: N,r = ',3,RANK
2049- STOP
2050- END SELECT
2051- CASE(4)
2052- SELECT CASE(RANK)
2053- CASE(0)
2054- RES_GOLEM = COEFFS0*A40(PINCH)
2055- CASE(1)
2056- RES_GOLEM = CONTRACT4_1(COEFFS1,PGOLEM,PINCH)
2057- CASE(2)
2058- RES_GOLEM = CONTRACT4_2(COEFFS2,PGOLEM,PINCH)
2059- CASE(3)
2060- RES_GOLEM = CONTRACT4_3(COEFFS3,PGOLEM,PINCH)
2061- CASE(4)
2062- RES_GOLEM = CONTRACT4_4(COEFFS4,PGOLEM,PINCH)
2063- CASE(5)
2064- RES_GOLEM = CONTRACT4_5(COEFFS5,PGOLEM,PINCH)
2065- CASE DEFAULT
2066- WRITE(*,*)'Golem95 cannot handle with: N,r = ',4,RANK
2067- STOP
2068- END SELECT
2069- CASE(5)
2070- SELECT CASE(RANK)
2071- CASE(0)
2072- RES_GOLEM = COEFFS0*A50(PINCH)
2073- CASE(1)
2074- RES_GOLEM = CONTRACT5_1(COEFFS1,PGOLEM,PINCH)
2075- CASE(2)
2076- RES_GOLEM = CONTRACT5_2(COEFFS2,PGOLEM,PINCH)
2077- CASE(3)
2078- RES_GOLEM = CONTRACT5_3(COEFFS3,PGOLEM,PINCH)
2079- CASE(4)
2080- RES_GOLEM = CONTRACT5_4(COEFFS4,PGOLEM,PINCH)
2081- CASE(5)
2082- RES_GOLEM = CONTRACT5_5(COEFFS5,PGOLEM,PINCH)
2083- CASE(6)
2084- RES_GOLEM = CONTRACT5_6(COEFFS6,PGOLEM,PINCH)
2085- CASE DEFAULT
2086- WRITE(*,*)'Golem95 cannot handle with: N,r = ',5,RANK
2087- STOP
2088- END SELECT
2089- CASE(6)
2090- SELECT CASE(RANK)
2091- CASE(0)
2092- RES_GOLEM = COEFFS0*A60(PINCH)
2093- CASE(1)
2094- RES_GOLEM = CONTRACT6_1(COEFFS1,PGOLEM,PINCH)
2095- CASE(2)
2096- RES_GOLEM = CONTRACT6_2(COEFFS2,PGOLEM,PINCH)
2097- CASE(3)
2098- RES_GOLEM = CONTRACT6_3(COEFFS3,PGOLEM,PINCH)
2099- CASE(4)
2100- RES_GOLEM = CONTRACT6_4(COEFFS4,PGOLEM,PINCH)
2101- CASE(5)
2102- RES_GOLEM = CONTRACT6_5(COEFFS5,PGOLEM,PINCH)
2103- CASE(6)
2104- RES_GOLEM = CONTRACT6_6(COEFFS6,PGOLEM,PINCH)
2105- CASE DEFAULT
2106- WRITE(*,*)'Golem95 cannot handle with: N,r = ',6,RANK
2107- STOP
2108- END SELECT
2109- CASE DEFAULT
2110- WRITE(*,*)'Golem95 cannot handle with: N = ',NLOOPLINE
2111- STOP
2112- END SELECT
2113- ENDIF
2114-
2115- RES(1)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%C+2.0*LOG(MU_R)
2116- $ *RES_GOLEM%%B+2.0*LOG(MU_R)**2*RES_GOLEM%%A)
2117- RES(2)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%B+2.0*LOG(MU_R)
2118- $ *RES_GOLEM%%A)
2119- RES(3)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%A)
2120-C WRITE(*,*) 'Loop ID',ID,' =',RES(1),RES(2),RES(3)
2121-
2122-C Finally free golem memory and cache
2123- CALL EXITGOLEM95()
2124-
2125- END
2126-
2127- FUNCTION GOLEM_LOOPNUM(Q,MU2)
2128- USE PRECISION_GOLEM, ONLY: KI
2129- REAL(KI),DIMENSION(0:3),INTENT(IN)::Q
2130- REAL(KI),INTENT(IN)::MU2
2131- COMPLEX(KI)::GOLEM_LOOPNUM
2132-
2133- COMPLEX*16 QQ(0:3),NUM
2134- INTEGER I
2135-
2136- DO I=0,3
2137- QQ(I)=CMPLX(Q(I),0.0D0,KIND=16)
2138- ENDDO
2139-
2140- CALL LOOPNUM(QQ,NUM)
2141- GOLEM_LOOPNUM=NUM
2142- RETURN
2143- END FUNCTION
2144-
2145- SUBROUTINE INITGOLEM()
2146-C
2147-C INITIALISATION OF GOLEM
2148-C
2149-C
2150-C MODULE
2151-C
2152- USE PARAMETRE
2153-C
2154-C LOCAL VARIABLES
2155-C
2156- REAL*8 THRS
2157- LOGICAL EXT_NUM_FOR_R1
2158-C
2159-C GLOBAL VARIABLES
2160-C
2161- INCLUDE 'MadLoopParams.inc'
2162-C ----------
2163-C BEGIN CODE
2164-C ----------
2165-
2166-C DEFAULT PARAMETERS FOR GOLEM
2167-C -------------------------------
2168-C One can chose here to have either just the rational R1 piece
2169-C or everything but the R2
2170- RAT_OR_TOT_PAR = TOT
2171-
2172- END
2173-
2174- SUBROUTINE SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2L)
2175-C
2176-C MODULE
2177-C
2178- USE MATRICE_S
2179- USE PRECISION_GOLEM, ONLY: KI
2180-C
2181-C ARGUMENTS
2182-C
2183- INTEGER NLOOPLINE
2184- REAL(KI) PGOLEM(NLOOPLINE,0:3)
2185- COMPLEX(KI) M2L(NLOOPLINE)
2186-C
2187-C LOCAL VARIABLES
2188-C
2189- INTEGER I,J
2190- COMPLEX*16 S_MAT_FROM_MG(NLOOPLINE,NLOOPLINE)
2191-C ----------
2192-C BEGIN CODE
2193-C ----------
2194-
2195- CALL BUILD_KINEMATIC_MATRIX(NLOOPLINE,PGOLEM,M2L,S_MAT_FROM_MG)
2196-
2197- DO I=1,NLOOPLINE
2198- DO J=1,NLOOPLINE
2199- S_MAT(I,J)=S_MAT_FROM_MG(I,J)
2200- ENDDO
2201- ENDDO
2202-
2203- END
2204-
2205- FUNCTION COMPARE_COEFS_0(COEFS_A,COEFS_B)
2206-
2207- USE PRECISION_GOLEM, ONLY: KI
2208- COMPLEX(KI) COEFS_A,COEFS_B
2209- REAL*8 COEF_CHECK_THRS
2210- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
2211- REAL*8 DENOM,NUM
2212- LOGICAL COMPARE_COEFS_0
2213-
2214- NUM = ABS(COEFS_A-COEFS_B)
2215- DENOM = ABS(COEFS_A+COEFS_B)
2216- IF(DENOM.GT.0D0)THEN
2217- COMPARE_COEFS_0=((NUM/DENOM).LT.COEF_CHECK_THRS)
2218- ELSE
2219- COMPARE_COEFS_0=(NUM.LT.COEF_CHECK_THRS)
2220- ENDIF
2221-
2222- END
2223-
2224- FUNCTION COMPARE_COEFS_1(COEFS_A,COEFS_B)
2225-
2226- USE TENS_REC
2227- TYPE(COEFF_TYPE_1)COEFS_A,COEFS_B
2228- REAL*8 COEF_CHECK_THRS
2229- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
2230- REAL*8 DENOM,NUM
2231- LOGICAL COMPARE_COEFS_1
2232-
2233- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
2234- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
2235- $ )
2236-
2237- IF(DENOM.GT.0D0)THEN
2238- COMPARE_COEFS_1=((NUM/DENOM).LT.COEF_CHECK_THRS)
2239- ELSE
2240- COMPARE_COEFS_1=(NUM.LT.COEF_CHECK_THRS)
2241- ENDIF
2242-
2243- END
2244-
2245- FUNCTION COMPARE_COEFS_2(COEFS_A,COEFS_B)
2246-
2247- USE TENS_REC
2248- TYPE(COEFF_TYPE_2) COEFS_A,COEFS_B
2249- REAL*8 COEF_CHECK_THRS
2250- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
2251- REAL*8 DENOM,NUM
2252- LOGICAL COMPARE_COEFS_2
2253-
2254- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
2255- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))
2256- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
2257- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))
2258- IF(DENOM.GT.0D0)THEN
2259- COMPARE_COEFS_2=((NUM/DENOM).LT.COEF_CHECK_THRS)
2260- ELSE
2261- COMPARE_COEFS_2=(NUM.LT.COEF_CHECK_THRS)
2262- ENDIF
2263-
2264- END
2265-
2266- FUNCTION COMPARE_COEFS_3(COEFS_A,COEFS_B)
2267-
2268- USE TENS_REC
2269- TYPE(COEFF_TYPE_3) COEFS_A, COEFS_B
2270- REAL*8 COEF_CHECK_THRS
2271- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
2272- REAL*8 DENOM,NUM
2273- LOGICAL COMPARE_COEFS_3
2274-
2275- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
2276- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
2277- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
2278- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
2279- $ )
2280- IF(DENOM.GT.0D0)THEN
2281- COMPARE_COEFS_3=((NUM/DENOM).LT.COEF_CHECK_THRS)
2282- ELSE
2283- COMPARE_COEFS_3=(NUM.LT.COEF_CHECK_THRS)
2284- ENDIF
2285-
2286- END
2287-
2288- FUNCTION COMPARE_COEFS_4(COEFS_A,COEFS_B)
2289-
2290- USE TENS_REC
2291- TYPE(COEFF_TYPE_4) COEFS_A, COEFS_B
2292- REAL*8 COEF_CHECK_THRS
2293- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
2294- REAL*8 DENOM,NUM
2295- LOGICAL COMPARE_COEFS_4
2296-
2297- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
2298- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
2299- $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4))
2300- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
2301- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
2302- $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4))
2303- IF(DENOM.GT.0D0)THEN
2304- COMPARE_COEFS_4=((NUM/DENOM).LT.COEF_CHECK_THRS)
2305- ELSE
2306- COMPARE_COEFS_4=(NUM.LT.COEF_CHECK_THRS)
2307- ENDIF
2308-
2309- END
2310-
2311- FUNCTION COMPARE_COEFS_5(COEFS_A,COEFS_B)
2312-
2313- USE TENS_REC
2314- TYPE(COEFF_TYPE_5) COEFS_A,COEFS_B
2315- REAL*8 COEF_CHECK_THRS
2316- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
2317- REAL*8 DENOM,NUM
2318- LOGICAL COMPARE_COEFS_5
2319-
2320- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
2321- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
2322- $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4))
2323- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
2324- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
2325- $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4))
2326- IF(DENOM.GT.0D0)THEN
2327- COMPARE_COEFS_5=((NUM/DENOM).LT.COEF_CHECK_THRS)
2328- ELSE
2329- COMPARE_COEFS_5=(NUM.LT.COEF_CHECK_THRS)
2330- ENDIF
2331-
2332- END
2333-
2334- FUNCTION COMPARE_COEFS_6(COEFS_A,COEFS_B)
2335-
2336- USE TENS_REC
2337- TYPE(COEFF_TYPE_6) COEFS_A,COEFS_B
2338- REAL*8 COEF_CHECK_THRS
2339- COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS
2340- REAL*8 DENOM,NUM
2341- LOGICAL COMPARE_COEFS_6
2342-
2343- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
2344- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
2345- $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4))
2346- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
2347- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
2348- $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4))
2349- IF(DENOM.GT.0D0)THEN
2350- COMPARE_COEFS_6=((NUM/DENOM).LT.COEF_CHECK_THRS)
2351- ELSE
2352- COMPARE_COEFS_6=(NUM.LT.COEF_CHECK_THRS)
2353- ENDIF
2354-
2355- END
2356-
2357-
2358- SUBROUTINE FILL_GOLEM_COEFFS_0(ML_COEFS,GOLEM_COEFS)
2359- USE PRECISION_GOLEM, ONLY: KI
2360- INCLUDE 'coef_specs.inc'
2361- INCLUDE 'loop_max_coefs.inc'
2362- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
2363- COMPLEX(KI) GOLEM_COEFS
2364- GOLEM_COEFS=ML_COEFS(0)
2365- END
2366-
2367- SUBROUTINE FILL_GOLEM_COEFFS_1(ML_COEFS,GOLEM_COEFS)
2368- USE TENS_REC, ONLY: COEFF_TYPE_1
2369- INCLUDE 'coef_specs.inc'
2370- INCLUDE 'loop_max_coefs.inc'
2371- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
2372- TYPE(COEFF_TYPE_1) GOLEM_COEFS
2373-C Constant coefficient
2374- GOLEM_COEFS%%C0=ML_COEFS(0)
2375-C Coefficient q(0)
2376- GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1)
2377-C Coefficient q(1)
2378- GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2)
2379-C Coefficient q(2)
2380- GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3)
2381-C Coefficient q(3)
2382- GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4)
2383- END
2384-
2385- SUBROUTINE FILL_GOLEM_COEFFS_2(ML_COEFS,GOLEM_COEFS)
2386- USE TENS_REC, ONLY: COEFF_TYPE_2
2387- INCLUDE 'coef_specs.inc'
2388- INCLUDE 'loop_max_coefs.inc'
2389- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
2390- TYPE(COEFF_TYPE_2) GOLEM_COEFS
2391-C Constant coefficient
2392- GOLEM_COEFS%%C0=ML_COEFS(0)
2393-C Coefficient q(0)
2394- GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1)
2395-C Coefficient q(0)^2
2396- GOLEM_COEFS%%C1(1,2)= ML_COEFS(5)
2397-C Coefficient q(1)
2398- GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2)
2399-C Coefficient q(1)^2
2400- GOLEM_COEFS%%C1(2,2)= ML_COEFS(7)
2401-C Coefficient q(2)
2402- GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3)
2403-C Coefficient q(2)^2
2404- GOLEM_COEFS%%C1(3,2)= ML_COEFS(10)
2405-C Coefficient q(3)
2406- GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4)
2407-C Coefficient q(3)^2
2408- GOLEM_COEFS%%C1(4,2)= ML_COEFS(14)
2409-C Coefficient q(0)*q(1)
2410- GOLEM_COEFS%%C2(1,1)= ML_COEFS(6)
2411-C Coefficient q(0)*q(2)
2412- GOLEM_COEFS%%C2(2,1)= ML_COEFS(8)
2413-C Coefficient q(0)*q(3)
2414- GOLEM_COEFS%%C2(3,1)= ML_COEFS(11)
2415-C Coefficient q(1)*q(2)
2416- GOLEM_COEFS%%C2(4,1)= ML_COEFS(9)
2417-C Coefficient q(1)*q(3)
2418- GOLEM_COEFS%%C2(5,1)= ML_COEFS(12)
2419-C Coefficient q(2)*q(3)
2420- GOLEM_COEFS%%C2(6,1)= ML_COEFS(13)
2421- END
2422-
2423- SUBROUTINE FILL_GOLEM_COEFFS_3(ML_COEFS,GOLEM_COEFS)
2424- USE TENS_REC, ONLY: COEFF_TYPE_3
2425- INCLUDE 'coef_specs.inc'
2426- INCLUDE 'loop_max_coefs.inc'
2427- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
2428- TYPE(COEFF_TYPE_3) GOLEM_COEFS
2429-C Dummy routine for FILL_GOLEM_COEFS_3
2430- STOP 'ERROR: 3 > 2'
2431- END
2432-
2433- SUBROUTINE FILL_GOLEM_COEFFS_4(ML_COEFS,GOLEM_COEFS)
2434- USE TENS_REC, ONLY: COEFF_TYPE_4
2435- INCLUDE 'coef_specs.inc'
2436- INCLUDE 'loop_max_coefs.inc'
2437- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
2438- TYPE(COEFF_TYPE_4) GOLEM_COEFS
2439-C Dummy routine for FILL_GOLEM_COEFS_4
2440- STOP 'ERROR: 4 > 2'
2441- END
2442-
2443- SUBROUTINE FILL_GOLEM_COEFFS_5(ML_COEFS,GOLEM_COEFS)
2444- USE TENS_REC, ONLY: COEFF_TYPE_5
2445- INCLUDE 'coef_specs.inc'
2446- INCLUDE 'loop_max_coefs.inc'
2447- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
2448- TYPE(COEFF_TYPE_5) GOLEM_COEFS
2449-C Dummy routine for FILL_GOLEM_COEFS_5
2450- STOP 'ERROR: 5 > 2'
2451- END
2452-
2453- SUBROUTINE FILL_GOLEM_COEFFS_6(ML_COEFS,GOLEM_COEFS)
2454- USE TENS_REC, ONLY: COEFF_TYPE_6
2455- INCLUDE 'coef_specs.inc'
2456- INCLUDE 'loop_max_coefs.inc'
2457- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
2458- TYPE(COEFF_TYPE_6) GOLEM_COEFS
2459-C Dummy routine for FILL_GOLEM_COEFS_6
2460- STOP 'ERROR: 6 > 2'
2461- END
2462
2463=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%TIR_interface.f'
2464--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%TIR_interface.f 2016-08-07 07:16:07 +0000
2465+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%TIR_interface.f 2018-11-09 08:24:41 +0000
2466@@ -96,17 +96,9 @@
2467 ENDIF
2468
2469 IF (MLREDUCTIONLIB(I_LIB).EQ.4) THEN
2470-C Using Golem95
2471-C PDEN is dummy for Golem95 so we just initialize it to zero
2472-C here so as to use it for the function SWITCHORDER
2473- DO I=0,3
2474- DO J=1,NLOOPLINE-1
2475- PDEN(I,J)=0.0D0
2476- ENDDO
2477- ENDDO
2478- CALL SWITCH_ORDER(CTMODE,NLOOPLINE,PL,PDEN,M2L)
2479- CALL GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE)
2480- RETURN
2481+C Golem95 not available
2482+ WRITE(*,*) 'ERROR:: Golem95 is not interfaced.'
2483+ STOP
2484 ENDIF
2485
2486 C INITIALIZE TIR IF NEEDED
2487
2488=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f'
2489--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f 2017-08-14 07:04:15 +0000
2490+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f 2018-11-09 08:24:41 +0000
2491@@ -244,7 +244,7 @@
2492 C A FLAG TO DENOTE WHETHER THE CORRESPONDING LOOPLIBS ARE
2493 C AVAILABLE OR NOT
2494 LOGICAL LOOPLIBS_AVAILABLE(NLOOPLIB)
2495- DATA LOOPLIBS_AVAILABLE/.TRUE.,.FALSE.,.TRUE.,.TRUE.,.FALSE.
2496+ DATA LOOPLIBS_AVAILABLE/.TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.
2497 $ ,.TRUE.,.TRUE./
2498 COMMON/LOOPLIBS_AV/ LOOPLIBS_AVAILABLE
2499 C A FLAG TO DENOTE WHETHER THE CORRESPONDING DIRECTION TESTS
2500
2501=== modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f'
2502--- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f 2017-11-24 12:17:04 +0000
2503+++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f 2018-11-09 08:24:41 +0000
2504@@ -73,6 +73,9 @@
2505 REAL*8 POL(2)
2506 COMMON/TO_POLARIZATION/ POL
2507
2508+ DOUBLE PRECISION SMALL_WIDTH_TREATMENT
2509+ COMMON/NARROW_WIDTH/SMALL_WIDTH_TREATMENT
2510+
2511 INTEGER ISUM_HEL
2512 LOGICAL MULTI_CHANNEL
2513 COMMON/TO_MATRIX/ISUM_HEL, MULTI_CHANNEL
2514@@ -110,6 +113,7 @@
2515 C ----------
2516 C BEGIN CODE
2517 C ----------
2518+
2519 NTRY(IMIRROR)=NTRY(IMIRROR)+1
2520 THIS_NTRY(IMIRROR) = THIS_NTRY(IMIRROR)+1
2521 DO I=1,NEXTERNAL
2522@@ -290,6 +294,15 @@
2523 C Needed for v4 models
2524 COMPLEX*16 DUM0,DUM1
2525 DATA DUM0, DUM1/(0D0, 0D0), (1D0, 0D0)/
2526+
2527+ DOUBLE PRECISION FK_ZERO
2528+ DOUBLE PRECISION FK_WZ
2529+ SAVE FK_ZERO
2530+ SAVE FK_WZ
2531+
2532+ LOGICAL FIRST
2533+ DATA FIRST /.TRUE./
2534+ SAVE FIRST
2535 C
2536 C FUNCTION
2537 C
2538@@ -300,6 +313,9 @@
2539 DOUBLE PRECISION AMP2(MAXAMPS), JAMP2(0:MAXFLOW)
2540 COMMON/TO_AMPS/ AMP2, JAMP2
2541 INCLUDE 'coupl.inc'
2542+
2543+ DOUBLE PRECISION SMALL_WIDTH_TREATMENT
2544+ COMMON/NARROW_WIDTH/SMALL_WIDTH_TREATMENT
2545 C
2546 C COLOR DATA
2547 C
2548@@ -312,26 +328,33 @@
2549 C ----------
2550 C BEGIN CODE
2551 C ----------
2552+ IF (FIRST) THEN
2553+ FIRST=.FALSE.
2554+ FK_WZ = SIGN(MAX(ABS(WZ), ABS(MZ*SMALL_WIDTH_TREATMENT)), WZ)
2555+ FK_ZERO = 0D0
2556+ ENDIF
2557+
2558+
2559 CALL IXXXXX(P(0,1),ZERO,NHEL(1),+1*IC(1),W(1,1))
2560 CALL OXXXXX(P(0,2),ZERO,NHEL(2),-1*IC(2),W(1,2))
2561 CALL OXXXXX(P(0,3),ZERO,NHEL(3),+1*IC(3),W(1,3))
2562 CALL IXXXXX(P(0,4),ZERO,NHEL(4),-1*IC(4),W(1,4))
2563- CALL FFV1_3(W(1,1),W(1,2),GQQ,ZERO,ZERO,W(1,5))
2564+ CALL FFV1_3(W(1,1),W(1,2),GQQ,ZERO, FK_ZERO,W(1,5))
2565 C Amplitude(s) for diagram number 1
2566 CALL FFV1_0(W(1,4),W(1,3),W(1,5),GQQ,AMP(1))
2567- CALL FFV1_3(W(1,1),W(1,2),GQED,ZERO,ZERO,W(1,5))
2568+ CALL FFV1_3(W(1,1),W(1,2),GQED,ZERO, FK_ZERO,W(1,5))
2569 C Amplitude(s) for diagram number 2
2570 CALL FFV1_0(W(1,4),W(1,3),W(1,5),GQED,AMP(2))
2571- CALL FFV1_2_3(W(1,1),W(1,2),GUZ1,GUZ2,MZ,WZ,W(1,5))
2572+ CALL FFV1_2_3(W(1,1),W(1,2),GUZ1,GUZ2,MZ, FK_WZ,W(1,5))
2573 C Amplitude(s) for diagram number 3
2574 CALL FFV1_2_0(W(1,4),W(1,3),W(1,5),GUZ1,GUZ2,AMP(3))
2575- CALL FFV1_3(W(1,1),W(1,3),GQQ,ZERO,ZERO,W(1,5))
2576+ CALL FFV1_3(W(1,1),W(1,3),GQQ,ZERO, FK_ZERO,W(1,5))
2577 C Amplitude(s) for diagram number 4
2578 CALL FFV1_0(W(1,4),W(1,2),W(1,5),GQQ,AMP(4))
2579- CALL FFV1_3(W(1,1),W(1,3),GQED,ZERO,ZERO,W(1,5))
2580+ CALL FFV1_3(W(1,1),W(1,3),GQED,ZERO, FK_ZERO,W(1,5))
2581 C Amplitude(s) for diagram number 5
2582 CALL FFV1_0(W(1,4),W(1,2),W(1,5),GQED,AMP(5))
2583- CALL FFV1_2_3(W(1,1),W(1,3),GUZ1,GUZ2,MZ,WZ,W(1,5))
2584+ CALL FFV1_2_3(W(1,1),W(1,3),GUZ1,GUZ2,MZ, FK_WZ,W(1,5))
2585 C Amplitude(s) for diagram number 6
2586 CALL FFV1_2_0(W(1,4),W(1,2),W(1,5),GUZ1,GUZ2,AMP(6))
2587 C JAMPs contributing to orders ALL_ORDERS=1
2588
2589=== modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f'
2590--- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f 2017-11-26 00:21:49 +0000
2591+++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f 2018-11-09 08:24:41 +0000
2592@@ -51,6 +51,7 @@
2593 INTEGER IDUM, NGOOD, IGOOD(NCOMB), JHEL, J, JJ
2594 REAL XRAN1
2595 EXTERNAL XRAN1
2596+
2597 C
2598 C GLOBAL VARIABLES
2599 C
2600@@ -71,6 +72,7 @@
2601 DATA IDUM /-1/
2602 DATA XTRY, XREJ, NGOOD /0,0,0/
2603 SAVE YFRAC, IGOOD, JHEL
2604+
2605 DATA (NHEL(I, 1),I=1,4) / 1,-1,-1,-1/
2606 DATA (NHEL(I, 2),I=1,4) / 1,-1,-1, 1/
2607 DATA (NHEL(I, 3),I=1,4) / 1,-1, 1,-1/
2608@@ -261,6 +263,13 @@
2609 C Needed for v4 models
2610 COMPLEX*16 DUM0,DUM1
2611 DATA DUM0, DUM1/(0D0, 0D0), (1D0, 0D0)/
2612+
2613+ DOUBLE PRECISION FK_ZERO
2614+ SAVE FK_ZERO
2615+
2616+ LOGICAL FIRST
2617+ DATA FIRST /.TRUE./
2618+ SAVE FIRST
2619 C
2620 C FUNCTION
2621 C
2622@@ -271,6 +280,9 @@
2623 DOUBLE PRECISION AMP2(MAXAMPS), JAMP2(0:MAXFLOW)
2624 COMMON/TO_AMPS/ AMP2, JAMP2
2625 INCLUDE 'coupl.inc'
2626+
2627+ DOUBLE PRECISION SMALL_WIDTH_TREATMENT
2628+ COMMON/NARROW_WIDTH/SMALL_WIDTH_TREATMENT
2629 C
2630 C COLOR DATA
2631 C
2632@@ -283,17 +295,22 @@
2633 C ----------
2634 C BEGIN CODE
2635 C ----------
2636+ IF (FIRST) THEN
2637+ FIRST=.FALSE.
2638+ FK_ZERO = 0D0
2639+ ENDIF
2640+
2641 CALL IXXXXX(P(0,1),ZERO,NHEL(1),+1*IC(1),W(1,1))
2642 CALL OXXXXX(P(0,2),ZERO,NHEL(2),-1*IC(2),W(1,2))
2643 CALL VXXXXX(P(0,3),ZERO,NHEL(3),+1*IC(3),W(1,3))
2644 CALL VXXXXX(P(0,4),ZERO,NHEL(4),+1*IC(4),W(1,4))
2645- CALL FFV1_3(W(1,1),W(1,2),GQQ,ZERO,ZERO,W(1,5))
2646+ CALL FFV1_3(W(1,1),W(1,2),GQQ,ZERO, FK_ZERO,W(1,5))
2647 C Amplitude(s) for diagram number 1
2648 CALL VVV1_0(W(1,3),W(1,4),W(1,5),G,AMP(1))
2649- CALL FFV1_2(W(1,1),W(1,3),GQQ,ZERO,ZERO,W(1,5))
2650+ CALL FFV1_2(W(1,1),W(1,3),GQQ,ZERO, FK_ZERO,W(1,5))
2651 C Amplitude(s) for diagram number 2
2652 CALL FFV1_0(W(1,5),W(1,2),W(1,4),GQQ,AMP(2))
2653- CALL FFV1_2(W(1,1),W(1,4),GQQ,ZERO,ZERO,W(1,5))
2654+ CALL FFV1_2(W(1,1),W(1,4),GQQ,ZERO, FK_ZERO,W(1,5))
2655 C Amplitude(s) for diagram number 3
2656 CALL FFV1_0(W(1,5),W(1,2),W(1,3),GQQ,AMP(3))
2657 C JAMPs contributing to orders ALL_ORDERS=1
2658
2659=== removed file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%GOLEM_interface.f'
2660--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%GOLEM_interface.f 2016-05-26 03:24:09 +0000
2661+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%GOLEM_interface.f 1970-01-01 00:00:00 +0000
2662@@ -1,823 +0,0 @@
2663- SUBROUTINE ML5_0_GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE)
2664-C
2665-C Generated by MadGraph5_aMC@NLO v. %(version)s, %(date)s
2666-C By the MadGraph5_aMC@NLO Development Team
2667-C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch
2668-C
2669-C Interface between MG5 and Golem95.
2670-C The Golem95 version should be higher than 1.3.0.
2671-C It supports RANK = NLOOPLINE + 1 tensor integrals when 1 <
2672-C NLOOPLINE < 6.
2673-C
2674-C Process: g g > t t~ [ virt = QCD ]
2675-C
2676-C
2677-C MODULES
2678-C
2679- USE MATRICE_S
2680- USE FORM_FACTOR_TYPE, ONLY: FORM_FACTOR
2681- USE PRECISION_GOLEM, ONLY: KI
2682- USE TENS_COMB
2683- USE TENS_REC
2684- USE FORM_FACTOR_1P, ONLY: A10
2685- USE FORM_FACTOR_2P, ONLY: A20
2686- USE FORM_FACTOR_3P, ONLY: A30
2687- USE FORM_FACTOR_4P, ONLY: A40
2688- USE FORM_FACTOR_5P, ONLY: A50
2689- USE FORM_FACTOR_6P, ONLY: A60
2690- IMPLICIT NONE
2691-C
2692-C CONSTANTS
2693-C
2694- INTEGER NEXTERNAL
2695- PARAMETER (NEXTERNAL=4)
2696- LOGICAL CHECKPCONSERVATION
2697- PARAMETER (CHECKPCONSERVATION=.TRUE.)
2698- REAL*8 NORMALIZATION
2699- PARAMETER (NORMALIZATION = 1.D0/(16.D0*3.14159265358979323846D0*
2700- $ *2))
2701- REAL(KI),DIMENSION(0:3),PARAMETER::NULL_VEC = (/0.0_KI,0.0_KI
2702- $ ,0.0_KI,0.0_KI/)
2703-C GOLEM_RUN_MODE = 1: Use directly MadLoop tensorial coefficients
2704-C GOLEM_RUN_MODE = 2: Reconstruct the tensorial coefficeints
2705-C directly from
2706-C numerator using golem internal reconstruction routine
2707-C GOLEM_RUN_MODE = 3: Cross-checked reconstructed coefficients
2708-C against
2709-C MadLoop internal ones.
2710- INTEGER GOLEM_RUN_MODE
2711- PARAMETER (GOLEM_RUN_MODE=1)
2712-C The following is the acceptance threshold used for
2713-C GOLEM_RUN_MODE = 3
2714- REAL*8 COEF_CHECK_THRS
2715- DATA COEF_CHECK_THRS/1.0D-13/
2716- COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS
2717-
2718- LOGICAL PASS_COEF_CHECK
2719-C
2720-C ARGUMENTS
2721-C
2722- INTEGER NLOOPLINE, RANK
2723- REAL*8 PL(0:3,NLOOPLINE)
2724- REAL*8 PCT(0:3,0:NLOOPLINE-1), ABSPCT(0:3)
2725- REAL*8 REF_P
2726- REAL(KI) PGOLEM(NLOOPLINE,0:3)
2727- COMPLEX*16 M2L(NLOOPLINE)
2728- COMPLEX(KI) M2LGOLEM(NLOOPLINE)
2729- COMPLEX*16 RES(3)
2730- LOGICAL STABLE
2731-C
2732-C LOCAL VARIABLES
2733-C
2734- INTEGER I, J, K
2735- TYPE(FORM_FACTOR)::RES_GOLEM
2736-
2737- COMPLEX(KI)::COEFFS0,COEFFS0_REC
2738- TYPE(COEFF_TYPE_1)::COEFFS1,COEFFS1_REC
2739- TYPE(COEFF_TYPE_2)::COEFFS2,COEFFS2_REC
2740- TYPE(COEFF_TYPE_3)::COEFFS3,COEFFS3_REC
2741- TYPE(COEFF_TYPE_4)::COEFFS4,COEFFS4_REC
2742- TYPE(COEFF_TYPE_5)::COEFFS5,COEFFS5_REC
2743- TYPE(COEFF_TYPE_6)::COEFFS6,COEFFS6_REC
2744-
2745-C The pinch propagator optimization is not used, so for now it is
2746-C always 0.
2747- INTEGER PINCH
2748-C
2749-C EXTERNAL FUNCTIONS
2750-C
2751- COMPLEX(KI) ML5_0_GOLEM_LOOPNUM
2752- EXTERNAL ML5_0_GOLEM_LOOPNUM
2753- LOGICAL ML5_0_COMPARE_COEFS_0
2754- LOGICAL ML5_0_COMPARE_COEFS_1
2755- LOGICAL ML5_0_COMPARE_COEFS_2
2756- LOGICAL ML5_0_COMPARE_COEFS_3
2757- LOGICAL ML5_0_COMPARE_COEFS_4
2758- LOGICAL ML5_0_COMPARE_COEFS_5
2759- LOGICAL ML5_0_COMPARE_COEFS_6
2760-C
2761-C GLOBAL VARIABLES
2762-C
2763- INCLUDE 'coupl.inc'
2764- INTEGER CTMODE
2765- REAL*8 LSCALE
2766- COMMON/ML5_0_CT/LSCALE,CTMODE
2767-
2768- INTEGER ID,SQSOINDEX,R
2769- COMMON/ML5_0_LOOP/ID,SQSOINDEX,R
2770-
2771- LOGICAL CTINIT, TIRINIT, GOLEMINIT, SAMURAIINIT, NINJAINIT
2772- $ ,COLLIERINIT
2773- COMMON/REDUCTIONCODEINIT/CTINIT, TIRINIT,GOLEMINIT,SAMURAIINIT
2774- $ ,NINJAINIT,COLLIERINIT
2775-
2776- INTEGER NLOOPGROUPS
2777- PARAMETER (NLOOPGROUPS=26)
2778- INTEGER NSQUAREDSO
2779- PARAMETER (NSQUAREDSO=1)
2780- INCLUDE 'loop_max_coefs.inc'
2781-
2782- COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
2783- COMMON/ML5_0_LCOEFS/LOOPCOEFS
2784-C ----------
2785-C BEGIN CODE
2786-C ----------
2787-
2788-C The CT initialization is also performed here if not done already
2789-C because it calls MPINIT of OneLOop which is necessary on some
2790-C system
2791- IF (CTINIT) THEN
2792- CTINIT=.FALSE.
2793- CALL ML5_0_INITCT()
2794- ENDIF
2795-
2796-C INITIALIZE GOLEM IF NEEDED
2797- IF (GOLEMINIT) THEN
2798- GOLEMINIT=.FALSE.
2799- CALL ML5_0_INITGOLEM()
2800- ENDIF
2801-
2802-C No stability test intrisic to Golem95 now
2803- STABLE=.TRUE.
2804-
2805-C This initialization must be done for each reduction because we
2806-C have not setup anyoptimization using pinched propagators yet.
2807- CALL INITGOLEM95(NLOOPLINE)
2808- PINCH = 0
2809-
2810-C YOU CAN FIND THE DETAILS ABOUT THE DIFFERENT CTMODE AT THE
2811-C BEGINNING OF THE FILE CTS_CUTS.F90 IN THE CUTTOOLS DISTRIBUTION
2812-
2813-C CONVERT THE MASSES TO BE COMPLEX
2814- DO I=1,NLOOPLINE
2815- M2LGOLEM(I)=M2L(I)
2816- ENDDO
2817-
2818-C CONVERT THE MOMENTA FLOWING IN THE LOOP LINES TO CT CONVENTIONS
2819- DO I=0,3
2820- ABSPCT(I) = 0.D0
2821- DO J=0,(NLOOPLINE-1)
2822- PCT(I,J)=0.D0
2823- ENDDO
2824- ENDDO
2825- DO I=0,3
2826- DO J=1,NLOOPLINE
2827- PCT(I,0)=PCT(I,0)+PL(I,J)
2828- ABSPCT(I)=ABSPCT(I)+ABS(PL(I,J))
2829- ENDDO
2830- ENDDO
2831- REF_P = MAX(ABSPCT(0), ABSPCT(1),ABSPCT(2),ABSPCT(3))
2832- DO I=0,3
2833- ABSPCT(I) = MAX(REF_P*1E-6, ABSPCT(I))
2834- ENDDO
2835- IF (CHECKPCONSERVATION.AND.REF_P.GT.1D-8) THEN
2836- IF ((PCT(0,0)/ABSPCT(0)).GT.1.D-6) THEN
2837- WRITE(*,*) 'energy is not conserved ',PCT(0,0)
2838- STOP 'energy is not conserved'
2839- ELSEIF ((PCT(1,0)/ABSPCT(1)).GT.1.D-6) THEN
2840- WRITE(*,*) 'px is not conserved ',PCT(1,0)
2841- STOP 'px is not conserved'
2842- ELSEIF ((PCT(2,0)/ABSPCT(2)).GT.1.D-6) THEN
2843- WRITE(*,*) 'py is not conserved ',PCT(2,0)
2844- STOP 'py is not conserved'
2845- ELSEIF ((PCT(3,0)/ABSPCT(3)).GT.1.D-6) THEN
2846- WRITE(*,*) 'pz is not conserved ',PCT(3,0)
2847- STOP 'pz is not conserved'
2848- ENDIF
2849- ENDIF
2850- DO I=0,3
2851- DO J=1,(NLOOPLINE-1)
2852- DO K=1,J
2853- PCT(I,J)=PCT(I,J)+PL(I,K)
2854- ENDDO
2855- ENDDO
2856- ENDDO
2857-
2858-C Now convert the loop momenta to Golem95 conventions
2859- DO I=0,3
2860- PGOLEM(1,I)=0.0E0_KI
2861- DO J=2,NLOOPLINE
2862- PGOLEM(J,I)=PCT(I,J-1)
2863- ENDDO
2864- ENDDO
2865-
2866-C Fill in the kinematic s-matrix while taking care of on-shell
2867-C limits.
2868- CALL ML5_0_SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2LGOLEM)
2869-C Construct the golem internal matrices derived from the kinetic
2870-C one.
2871- CALL PREPARESMATRIX()
2872-
2873-C Fill in the golem coefficents and compute the loop
2874- IF(GOLEM_RUN_MODE.EQ.2)THEN
2875- RES_GOLEM = EVALUATE_B(ML5_0_GOLEM_LOOPNUM,PGOLEM,0,RANK)
2876- ELSE
2877- PASS_COEF_CHECK=.TRUE.
2878- SELECT CASE(RANK)
2879- CASE(0)
2880- CALL ML5_0_FILL_GOLEM_COEFFS_0(LOOPCOEFS(0,SQSOINDEX,ID)
2881- $ ,COEFFS0)
2882- IF(GOLEM_RUN_MODE.EQ.3)THEN
2883- COEFFS0_REC = ML5_0_GOLEM_LOOPNUM(NULL_VEC,0.0_KI)
2884- PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_0(COEFFS0,COEFFS0_REC)
2885- ENDIF
2886- CASE(1)
2887- CALL ML5_0_FILL_GOLEM_COEFFS_1(LOOPCOEFS(0,SQSOINDEX,ID)
2888- $ ,COEFFS1)
2889- IF(GOLEM_RUN_MODE.EQ.3)THEN
2890- CALL RECONSTRUCT1(ML5_0_GOLEM_LOOPNUM,COEFFS1_REC)
2891- PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_1(COEFFS1,COEFFS1_REC)
2892- ENDIF
2893- CASE(2)
2894- CALL ML5_0_FILL_GOLEM_COEFFS_2(LOOPCOEFS(0,SQSOINDEX,ID)
2895- $ ,COEFFS2)
2896- IF(GOLEM_RUN_MODE.EQ.3)THEN
2897- CALL RECONSTRUCT2(ML5_0_GOLEM_LOOPNUM,COEFFS2_REC)
2898- PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_2(COEFFS2,COEFFS2_REC)
2899- ENDIF
2900- CASE(3)
2901- CALL ML5_0_FILL_GOLEM_COEFFS_3(LOOPCOEFS(0,SQSOINDEX,ID)
2902- $ ,COEFFS3)
2903- IF(GOLEM_RUN_MODE.EQ.3)THEN
2904- CALL RECONSTRUCT3(ML5_0_GOLEM_LOOPNUM,COEFFS3_REC)
2905- PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_3(COEFFS3,COEFFS3_REC)
2906- ENDIF
2907- CASE(4)
2908- CALL ML5_0_FILL_GOLEM_COEFFS_4(LOOPCOEFS(0,SQSOINDEX,ID)
2909- $ ,COEFFS4)
2910- IF(GOLEM_RUN_MODE.EQ.3)THEN
2911- CALL RECONSTRUCT4(ML5_0_GOLEM_LOOPNUM,COEFFS4_REC)
2912- PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_4(COEFFS4,COEFFS4_REC)
2913- ENDIF
2914- CASE(5)
2915- CALL ML5_0_FILL_GOLEM_COEFFS_5(LOOPCOEFS(0,SQSOINDEX,ID)
2916- $ ,COEFFS5)
2917- IF(GOLEM_RUN_MODE.EQ.3)THEN
2918- CALL RECONSTRUCT5(ML5_0_GOLEM_LOOPNUM,COEFFS5_REC)
2919- PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_5(COEFFS5,COEFFS5_REC)
2920- ENDIF
2921- CASE(6)
2922- CALL ML5_0_FILL_GOLEM_COEFFS_6(LOOPCOEFS(0,SQSOINDEX,ID)
2923- $ ,COEFFS6)
2924- IF(GOLEM_RUN_MODE.EQ.3)THEN
2925- CALL RECONSTRUCT6(ML5_0_GOLEM_LOOPNUM,COEFFS6_REC)
2926- PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_6(COEFFS6,COEFFS6_REC)
2927- ENDIF
2928- CASE DEFAULT
2929- WRITE(*,*)'Not yet implemented in Golem95 for rank= ',RANK
2930- STOP
2931- END SELECT
2932-
2933- IF(.NOT.PASS_COEF_CHECK)THEN
2934- WRITE(*,*)'Coefs mismatch for ID ',ID,' and rank ',RANK
2935- WRITE(*,*)'Coefs form MadLoop5:'
2936- SELECT CASE(RANK)
2937- CASE(0)
2938- WRITE(*,*)'Constant coef = ',COEFFS0
2939- CASE(1)
2940- CALL PRINT_COEFFS(COEFFS1)
2941- CASE(2)
2942- CALL PRINT_COEFFS(COEFFS2)
2943- CASE(3)
2944- CALL PRINT_COEFFS(COEFFS3)
2945- CASE(4)
2946- CALL PRINT_COEFFS(COEFFS4)
2947- CASE(5)
2948- CALL PRINT_COEFFS(COEFFS5)
2949- CASE(6)
2950- CALL PRINT_COEFFS(COEFFS6)
2951- END SELECT
2952- WRITE(*,*)'Coefs reconstructed by Golem95:'
2953- SELECT CASE(RANK)
2954- CASE(0)
2955- WRITE(*,*)'Constant coef = ',COEFFS0_REC
2956- CASE(1)
2957- CALL PRINT_COEFFS(COEFFS1_REC)
2958- CASE(2)
2959- CALL PRINT_COEFFS(COEFFS2_REC)
2960- CASE(3)
2961- CALL PRINT_COEFFS(COEFFS3_REC)
2962- CASE(4)
2963- CALL PRINT_COEFFS(COEFFS4_REC)
2964- CASE(5)
2965- CALL PRINT_COEFFS(COEFFS5_REC)
2966- CASE(6)
2967- CALL PRINT_COEFFS(COEFFS6_REC)
2968- END SELECT
2969- STOP
2970- ENDIF
2971-
2972- SELECT CASE(NLOOPLINE)
2973- CASE(1)
2974- WRITE(*,*)'Golem95 cannot handle with tadpole yet'
2975- STOP
2976- CASE(2)
2977- SELECT CASE(RANK)
2978- CASE(0)
2979- RES_GOLEM = COEFFS0*A20(PINCH)
2980- CASE(1)
2981- RES_GOLEM = CONTRACT2_1(COEFFS1,PGOLEM,PINCH)
2982- CASE(2)
2983- RES_GOLEM = CONTRACT2_2(COEFFS2,PGOLEM,PINCH)
2984- CASE(3)
2985- RES_GOLEM = CONTRACT2_3(COEFFS3,PGOLEM,PINCH)
2986- CASE DEFAULT
2987- WRITE(*,*)'Golem95 cannot handle with: N,r = ',2,RANK
2988- STOP
2989- END SELECT
2990- CASE(3)
2991- SELECT CASE(RANK)
2992- CASE(0)
2993- RES_GOLEM = COEFFS0*A30(PINCH)
2994- CASE(1)
2995- RES_GOLEM = CONTRACT3_1(COEFFS1,PGOLEM,PINCH)
2996- CASE(2)
2997- RES_GOLEM = CONTRACT3_2(COEFFS2,PGOLEM,PINCH)
2998- CASE(3)
2999- RES_GOLEM = CONTRACT3_3(COEFFS3,PGOLEM,PINCH)
3000- CASE(4)
3001- RES_GOLEM = CONTRACT3_4(COEFFS4,PGOLEM,PINCH)
3002- CASE DEFAULT
3003- WRITE(*,*)'Golem95 cannot handle with: N,r = ',3,RANK
3004- STOP
3005- END SELECT
3006- CASE(4)
3007- SELECT CASE(RANK)
3008- CASE(0)
3009- RES_GOLEM = COEFFS0*A40(PINCH)
3010- CASE(1)
3011- RES_GOLEM = CONTRACT4_1(COEFFS1,PGOLEM,PINCH)
3012- CASE(2)
3013- RES_GOLEM = CONTRACT4_2(COEFFS2,PGOLEM,PINCH)
3014- CASE(3)
3015- RES_GOLEM = CONTRACT4_3(COEFFS3,PGOLEM,PINCH)
3016- CASE(4)
3017- RES_GOLEM = CONTRACT4_4(COEFFS4,PGOLEM,PINCH)
3018- CASE(5)
3019- RES_GOLEM = CONTRACT4_5(COEFFS5,PGOLEM,PINCH)
3020- CASE DEFAULT
3021- WRITE(*,*)'Golem95 cannot handle with: N,r = ',4,RANK
3022- STOP
3023- END SELECT
3024- CASE(5)
3025- SELECT CASE(RANK)
3026- CASE(0)
3027- RES_GOLEM = COEFFS0*A50(PINCH)
3028- CASE(1)
3029- RES_GOLEM = CONTRACT5_1(COEFFS1,PGOLEM,PINCH)
3030- CASE(2)
3031- RES_GOLEM = CONTRACT5_2(COEFFS2,PGOLEM,PINCH)
3032- CASE(3)
3033- RES_GOLEM = CONTRACT5_3(COEFFS3,PGOLEM,PINCH)
3034- CASE(4)
3035- RES_GOLEM = CONTRACT5_4(COEFFS4,PGOLEM,PINCH)
3036- CASE(5)
3037- RES_GOLEM = CONTRACT5_5(COEFFS5,PGOLEM,PINCH)
3038- CASE(6)
3039- RES_GOLEM = CONTRACT5_6(COEFFS6,PGOLEM,PINCH)
3040- CASE DEFAULT
3041- WRITE(*,*)'Golem95 cannot handle with: N,r = ',5,RANK
3042- STOP
3043- END SELECT
3044- CASE(6)
3045- SELECT CASE(RANK)
3046- CASE(0)
3047- RES_GOLEM = COEFFS0*A60(PINCH)
3048- CASE(1)
3049- RES_GOLEM = CONTRACT6_1(COEFFS1,PGOLEM,PINCH)
3050- CASE(2)
3051- RES_GOLEM = CONTRACT6_2(COEFFS2,PGOLEM,PINCH)
3052- CASE(3)
3053- RES_GOLEM = CONTRACT6_3(COEFFS3,PGOLEM,PINCH)
3054- CASE(4)
3055- RES_GOLEM = CONTRACT6_4(COEFFS4,PGOLEM,PINCH)
3056- CASE(5)
3057- RES_GOLEM = CONTRACT6_5(COEFFS5,PGOLEM,PINCH)
3058- CASE(6)
3059- RES_GOLEM = CONTRACT6_6(COEFFS6,PGOLEM,PINCH)
3060- CASE DEFAULT
3061- WRITE(*,*)'Golem95 cannot handle with: N,r = ',6,RANK
3062- STOP
3063- END SELECT
3064- CASE DEFAULT
3065- WRITE(*,*)'Golem95 cannot handle with: N = ',NLOOPLINE
3066- STOP
3067- END SELECT
3068- ENDIF
3069-
3070- RES(1)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%C+2.0*LOG(MU_R)
3071- $ *RES_GOLEM%%B+2.0*LOG(MU_R)**2*RES_GOLEM%%A)
3072- RES(2)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%B+2.0*LOG(MU_R)
3073- $ *RES_GOLEM%%A)
3074- RES(3)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%A)
3075-C WRITE(*,*) 'Loop ID',ID,' =',RES(1),RES(2),RES(3)
3076-
3077-C Finally free golem memory and cache
3078- CALL EXITGOLEM95()
3079-
3080- END
3081-
3082- FUNCTION ML5_0_GOLEM_LOOPNUM(Q,MU2)
3083- USE PRECISION_GOLEM, ONLY: KI
3084- REAL(KI),DIMENSION(0:3),INTENT(IN)::Q
3085- REAL(KI),INTENT(IN)::MU2
3086- COMPLEX(KI)::ML5_0_GOLEM_LOOPNUM
3087-
3088- COMPLEX*16 QQ(0:3),NUM
3089- INTEGER I
3090-
3091- DO I=0,3
3092- QQ(I)=CMPLX(Q(I),0.0D0,KIND=16)
3093- ENDDO
3094-
3095- CALL ML5_0_LOOPNUM(QQ,NUM)
3096- ML5_0_GOLEM_LOOPNUM=NUM
3097- RETURN
3098- END FUNCTION
3099-
3100- SUBROUTINE ML5_0_INITGOLEM()
3101-C
3102-C INITIALISATION OF GOLEM
3103-C
3104-C
3105-C MODULE
3106-C
3107- USE PARAMETRE
3108-C
3109-C LOCAL VARIABLES
3110-C
3111- REAL*8 THRS
3112- LOGICAL EXT_NUM_FOR_R1
3113-C
3114-C GLOBAL VARIABLES
3115-C
3116- INCLUDE 'MadLoopParams.inc'
3117-C ----------
3118-C BEGIN CODE
3119-C ----------
3120-
3121-C DEFAULT PARAMETERS FOR GOLEM
3122-C -------------------------------
3123-C One can chose here to have either just the rational R1 piece
3124-C or everything but the R2
3125- RAT_OR_TOT_PAR = TOT
3126-
3127- END
3128-
3129- SUBROUTINE ML5_0_SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2L)
3130-C
3131-C MODULE
3132-C
3133- USE MATRICE_S
3134- USE PRECISION_GOLEM, ONLY: KI
3135-C
3136-C ARGUMENTS
3137-C
3138- INTEGER NLOOPLINE
3139- REAL(KI) PGOLEM(NLOOPLINE,0:3)
3140- COMPLEX(KI) M2L(NLOOPLINE)
3141-C
3142-C LOCAL VARIABLES
3143-C
3144- INTEGER I,J
3145- COMPLEX*16 S_MAT_FROM_MG(NLOOPLINE,NLOOPLINE)
3146-C ----------
3147-C BEGIN CODE
3148-C ----------
3149-
3150- CALL ML5_0_BUILD_KINEMATIC_MATRIX(NLOOPLINE,PGOLEM,M2L
3151- $ ,S_MAT_FROM_MG)
3152-
3153- DO I=1,NLOOPLINE
3154- DO J=1,NLOOPLINE
3155- S_MAT(I,J)=S_MAT_FROM_MG(I,J)
3156- ENDDO
3157- ENDDO
3158-
3159- END
3160-
3161- FUNCTION ML5_0_COMPARE_COEFS_0(COEFS_A,COEFS_B)
3162-
3163- USE PRECISION_GOLEM, ONLY: KI
3164- COMPLEX(KI) COEFS_A,COEFS_B
3165- REAL*8 COEF_CHECK_THRS
3166- COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS
3167- REAL*8 DENOM,NUM
3168- LOGICAL ML5_0_COMPARE_COEFS_0
3169-
3170- NUM = ABS(COEFS_A-COEFS_B)
3171- DENOM = ABS(COEFS_A+COEFS_B)
3172- IF(DENOM.GT.0D0)THEN
3173- ML5_0_COMPARE_COEFS_0=((NUM/DENOM).LT.COEF_CHECK_THRS)
3174- ELSE
3175- ML5_0_COMPARE_COEFS_0=(NUM.LT.COEF_CHECK_THRS)
3176- ENDIF
3177-
3178- END
3179-
3180- FUNCTION ML5_0_COMPARE_COEFS_1(COEFS_A,COEFS_B)
3181-
3182- USE TENS_REC
3183- TYPE(COEFF_TYPE_1)COEFS_A,COEFS_B
3184- REAL*8 COEF_CHECK_THRS
3185- COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS
3186- REAL*8 DENOM,NUM
3187- LOGICAL ML5_0_COMPARE_COEFS_1
3188-
3189- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
3190- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
3191- $ )
3192-
3193- IF(DENOM.GT.0D0)THEN
3194- ML5_0_COMPARE_COEFS_1=((NUM/DENOM).LT.COEF_CHECK_THRS)
3195- ELSE
3196- ML5_0_COMPARE_COEFS_1=(NUM.LT.COEF_CHECK_THRS)
3197- ENDIF
3198-
3199- END
3200-
3201- FUNCTION ML5_0_COMPARE_COEFS_2(COEFS_A,COEFS_B)
3202-
3203- USE TENS_REC
3204- TYPE(COEFF_TYPE_2) COEFS_A,COEFS_B
3205- REAL*8 COEF_CHECK_THRS
3206- COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS
3207- REAL*8 DENOM,NUM
3208- LOGICAL ML5_0_COMPARE_COEFS_2
3209-
3210- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
3211- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))
3212- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
3213- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))
3214- IF(DENOM.GT.0D0)THEN
3215- ML5_0_COMPARE_COEFS_2=((NUM/DENOM).LT.COEF_CHECK_THRS)
3216- ELSE
3217- ML5_0_COMPARE_COEFS_2=(NUM.LT.COEF_CHECK_THRS)
3218- ENDIF
3219-
3220- END
3221-
3222- FUNCTION ML5_0_COMPARE_COEFS_3(COEFS_A,COEFS_B)
3223-
3224- USE TENS_REC
3225- TYPE(COEFF_TYPE_3) COEFS_A, COEFS_B
3226- REAL*8 COEF_CHECK_THRS
3227- COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS
3228- REAL*8 DENOM,NUM
3229- LOGICAL ML5_0_COMPARE_COEFS_3
3230-
3231- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
3232- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
3233- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
3234- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
3235- $ )
3236- IF(DENOM.GT.0D0)THEN
3237- ML5_0_COMPARE_COEFS_3=((NUM/DENOM).LT.COEF_CHECK_THRS)
3238- ELSE
3239- ML5_0_COMPARE_COEFS_3=(NUM.LT.COEF_CHECK_THRS)
3240- ENDIF
3241-
3242- END
3243-
3244- FUNCTION ML5_0_COMPARE_COEFS_4(COEFS_A,COEFS_B)
3245-
3246- USE TENS_REC
3247- TYPE(COEFF_TYPE_4) COEFS_A, COEFS_B
3248- REAL*8 COEF_CHECK_THRS
3249- COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS
3250- REAL*8 DENOM,NUM
3251- LOGICAL ML5_0_COMPARE_COEFS_4
3252-
3253- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
3254- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
3255- $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4))
3256- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
3257- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
3258- $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4))
3259- IF(DENOM.GT.0D0)THEN
3260- ML5_0_COMPARE_COEFS_4=((NUM/DENOM).LT.COEF_CHECK_THRS)
3261- ELSE
3262- ML5_0_COMPARE_COEFS_4=(NUM.LT.COEF_CHECK_THRS)
3263- ENDIF
3264-
3265- END
3266-
3267- FUNCTION ML5_0_COMPARE_COEFS_5(COEFS_A,COEFS_B)
3268-
3269- USE TENS_REC
3270- TYPE(COEFF_TYPE_5) COEFS_A,COEFS_B
3271- REAL*8 COEF_CHECK_THRS
3272- COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS
3273- REAL*8 DENOM,NUM
3274- LOGICAL ML5_0_COMPARE_COEFS_5
3275-
3276- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
3277- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
3278- $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4))
3279- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
3280- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
3281- $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4))
3282- IF(DENOM.GT.0D0)THEN
3283- ML5_0_COMPARE_COEFS_5=((NUM/DENOM).LT.COEF_CHECK_THRS)
3284- ELSE
3285- ML5_0_COMPARE_COEFS_5=(NUM.LT.COEF_CHECK_THRS)
3286- ENDIF
3287-
3288- END
3289-
3290- FUNCTION ML5_0_COMPARE_COEFS_6(COEFS_A,COEFS_B)
3291-
3292- USE TENS_REC
3293- TYPE(COEFF_TYPE_6) COEFS_A,COEFS_B
3294- REAL*8 COEF_CHECK_THRS
3295- COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS
3296- REAL*8 DENOM,NUM
3297- LOGICAL ML5_0_COMPARE_COEFS_6
3298-
3299- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
3300- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
3301- $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4))
3302- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
3303- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
3304- $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4))
3305- IF(DENOM.GT.0D0)THEN
3306- ML5_0_COMPARE_COEFS_6=((NUM/DENOM).LT.COEF_CHECK_THRS)
3307- ELSE
3308- ML5_0_COMPARE_COEFS_6=(NUM.LT.COEF_CHECK_THRS)
3309- ENDIF
3310-
3311- END
3312-
3313-
3314- SUBROUTINE ML5_0_FILL_GOLEM_COEFFS_0(ML_COEFS,GOLEM_COEFS)
3315- USE PRECISION_GOLEM, ONLY: KI
3316- INCLUDE 'coef_specs.inc'
3317- INCLUDE 'loop_max_coefs.inc'
3318- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
3319- COMPLEX(KI) GOLEM_COEFS
3320- GOLEM_COEFS=ML_COEFS(0)
3321- END
3322-
3323- SUBROUTINE ML5_0_FILL_GOLEM_COEFFS_1(ML_COEFS,GOLEM_COEFS)
3324- USE TENS_REC, ONLY: COEFF_TYPE_1
3325- INCLUDE 'coef_specs.inc'
3326- INCLUDE 'loop_max_coefs.inc'
3327- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
3328- TYPE(COEFF_TYPE_1) GOLEM_COEFS
3329-C Constant coefficient
3330- GOLEM_COEFS%%C0=ML_COEFS(0)
3331-C Coefficient q(0)
3332- GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1)
3333-C Coefficient q(1)
3334- GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2)
3335-C Coefficient q(2)
3336- GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3)
3337-C Coefficient q(3)
3338- GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4)
3339- END
3340-
3341- SUBROUTINE ML5_0_FILL_GOLEM_COEFFS_2(ML_COEFS,GOLEM_COEFS)
3342- USE TENS_REC, ONLY: COEFF_TYPE_2
3343- INCLUDE 'coef_specs.inc'
3344- INCLUDE 'loop_max_coefs.inc'
3345- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
3346- TYPE(COEFF_TYPE_2) GOLEM_COEFS
3347-C Constant coefficient
3348- GOLEM_COEFS%%C0=ML_COEFS(0)
3349-C Coefficient q(0)
3350- GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1)
3351-C Coefficient q(0)^2
3352- GOLEM_COEFS%%C1(1,2)= ML_COEFS(5)
3353-C Coefficient q(1)
3354- GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2)
3355-C Coefficient q(1)^2
3356- GOLEM_COEFS%%C1(2,2)= ML_COEFS(7)
3357-C Coefficient q(2)
3358- GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3)
3359-C Coefficient q(2)^2
3360- GOLEM_COEFS%%C1(3,2)= ML_COEFS(10)
3361-C Coefficient q(3)
3362- GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4)
3363-C Coefficient q(3)^2
3364- GOLEM_COEFS%%C1(4,2)= ML_COEFS(14)
3365-C Coefficient q(0)*q(1)
3366- GOLEM_COEFS%%C2(1,1)= ML_COEFS(6)
3367-C Coefficient q(0)*q(2)
3368- GOLEM_COEFS%%C2(2,1)= ML_COEFS(8)
3369-C Coefficient q(0)*q(3)
3370- GOLEM_COEFS%%C2(3,1)= ML_COEFS(11)
3371-C Coefficient q(1)*q(2)
3372- GOLEM_COEFS%%C2(4,1)= ML_COEFS(9)
3373-C Coefficient q(1)*q(3)
3374- GOLEM_COEFS%%C2(5,1)= ML_COEFS(12)
3375-C Coefficient q(2)*q(3)
3376- GOLEM_COEFS%%C2(6,1)= ML_COEFS(13)
3377- END
3378-
3379- SUBROUTINE ML5_0_FILL_GOLEM_COEFFS_3(ML_COEFS,GOLEM_COEFS)
3380- USE TENS_REC, ONLY: COEFF_TYPE_3
3381- INCLUDE 'coef_specs.inc'
3382- INCLUDE 'loop_max_coefs.inc'
3383- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
3384- TYPE(COEFF_TYPE_3) GOLEM_COEFS
3385-C Constant coefficient
3386- GOLEM_COEFS%%C0=ML_COEFS(0)
3387-C Coefficient q(0)
3388- GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1)
3389-C Coefficient q(0)^2
3390- GOLEM_COEFS%%C1(1,2)= ML_COEFS(5)
3391-C Coefficient q(0)^3
3392- GOLEM_COEFS%%C1(1,3)=-ML_COEFS(15)
3393-C Coefficient q(1)
3394- GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2)
3395-C Coefficient q(1)^2
3396- GOLEM_COEFS%%C1(2,2)= ML_COEFS(7)
3397-C Coefficient q(1)^3
3398- GOLEM_COEFS%%C1(2,3)=-ML_COEFS(18)
3399-C Coefficient q(2)
3400- GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3)
3401-C Coefficient q(2)^2
3402- GOLEM_COEFS%%C1(3,2)= ML_COEFS(10)
3403-C Coefficient q(2)^3
3404- GOLEM_COEFS%%C1(3,3)=-ML_COEFS(24)
3405-C Coefficient q(3)
3406- GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4)
3407-C Coefficient q(3)^2
3408- GOLEM_COEFS%%C1(4,2)= ML_COEFS(14)
3409-C Coefficient q(3)^3
3410- GOLEM_COEFS%%C1(4,3)=-ML_COEFS(34)
3411-C Coefficient q(0)*q(1)
3412- GOLEM_COEFS%%C2(1,1)= ML_COEFS(6)
3413-C Coefficient q(0)*q(1)^2
3414- GOLEM_COEFS%%C2(1,2)=-ML_COEFS(17)
3415-C Coefficient q(0)^2*q(1)
3416- GOLEM_COEFS%%C2(1,3)=-ML_COEFS(16)
3417-C Coefficient q(0)*q(2)
3418- GOLEM_COEFS%%C2(2,1)= ML_COEFS(8)
3419-C Coefficient q(0)*q(2)^2
3420- GOLEM_COEFS%%C2(2,2)=-ML_COEFS(22)
3421-C Coefficient q(0)^2*q(2)
3422- GOLEM_COEFS%%C2(2,3)=-ML_COEFS(19)
3423-C Coefficient q(0)*q(3)
3424- GOLEM_COEFS%%C2(3,1)= ML_COEFS(11)
3425-C Coefficient q(0)*q(3)^2
3426- GOLEM_COEFS%%C2(3,2)=-ML_COEFS(31)
3427-C Coefficient q(0)^2*q(3)
3428- GOLEM_COEFS%%C2(3,3)=-ML_COEFS(25)
3429-C Coefficient q(1)*q(2)
3430- GOLEM_COEFS%%C2(4,1)= ML_COEFS(9)
3431-C Coefficient q(1)*q(2)^2
3432- GOLEM_COEFS%%C2(4,2)=-ML_COEFS(23)
3433-C Coefficient q(1)^2*q(2)
3434- GOLEM_COEFS%%C2(4,3)=-ML_COEFS(21)
3435-C Coefficient q(1)*q(3)
3436- GOLEM_COEFS%%C2(5,1)= ML_COEFS(12)
3437-C Coefficient q(1)*q(3)^2
3438- GOLEM_COEFS%%C2(5,2)=-ML_COEFS(32)
3439-C Coefficient q(1)^2*q(3)
3440- GOLEM_COEFS%%C2(5,3)=-ML_COEFS(27)
3441-C Coefficient q(2)*q(3)
3442- GOLEM_COEFS%%C2(6,1)= ML_COEFS(13)
3443-C Coefficient q(2)*q(3)^2
3444- GOLEM_COEFS%%C2(6,2)=-ML_COEFS(33)
3445-C Coefficient q(2)^2*q(3)
3446- GOLEM_COEFS%%C2(6,3)=-ML_COEFS(30)
3447-C Coefficient q(0)*q(1)*q(2)
3448- GOLEM_COEFS%%C3(1,1)=-ML_COEFS(20)
3449-C Coefficient q(0)*q(1)*q(3)
3450- GOLEM_COEFS%%C3(2,1)=-ML_COEFS(26)
3451-C Coefficient q(0)*q(2)*q(3)
3452- GOLEM_COEFS%%C3(3,1)=-ML_COEFS(28)
3453-C Coefficient q(1)*q(2)*q(3)
3454- GOLEM_COEFS%%C3(4,1)=-ML_COEFS(29)
3455- END
3456-
3457- SUBROUTINE ML5_0_FILL_GOLEM_COEFFS_4(ML_COEFS,GOLEM_COEFS)
3458- USE TENS_REC, ONLY: COEFF_TYPE_4
3459- INCLUDE 'coef_specs.inc'
3460- INCLUDE 'loop_max_coefs.inc'
3461- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
3462- TYPE(COEFF_TYPE_4) GOLEM_COEFS
3463-C Dummy routine for ML5_0_FILL_GOLEM_COEFS_4
3464- STOP 'ERROR: 4 > 3'
3465- END
3466-
3467- SUBROUTINE ML5_0_FILL_GOLEM_COEFFS_5(ML_COEFS,GOLEM_COEFS)
3468- USE TENS_REC, ONLY: COEFF_TYPE_5
3469- INCLUDE 'coef_specs.inc'
3470- INCLUDE 'loop_max_coefs.inc'
3471- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
3472- TYPE(COEFF_TYPE_5) GOLEM_COEFS
3473-C Dummy routine for ML5_0_FILL_GOLEM_COEFS_5
3474- STOP 'ERROR: 5 > 3'
3475- END
3476-
3477- SUBROUTINE ML5_0_FILL_GOLEM_COEFFS_6(ML_COEFS,GOLEM_COEFS)
3478- USE TENS_REC, ONLY: COEFF_TYPE_6
3479- INCLUDE 'coef_specs.inc'
3480- INCLUDE 'loop_max_coefs.inc'
3481- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
3482- TYPE(COEFF_TYPE_6) GOLEM_COEFS
3483-C Dummy routine for ML5_0_FILL_GOLEM_COEFS_6
3484- STOP 'ERROR: 6 > 3'
3485- END
3486
3487=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%TIR_interface.f'
3488--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%TIR_interface.f 2016-06-28 23:55:35 +0000
3489+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%TIR_interface.f 2018-11-09 08:24:41 +0000
3490@@ -95,17 +95,9 @@
3491 ENDIF
3492
3493 IF (MLREDUCTIONLIB(I_LIB).EQ.4) THEN
3494-C Using Golem95
3495-C PDEN is dummy for Golem95 so we just initialize it to zero
3496-C here so as to use it for the function SWITCHORDER
3497- DO I=0,3
3498- DO J=1,NLOOPLINE-1
3499- PDEN(I,J)=0.0D0
3500- ENDDO
3501- ENDDO
3502- CALL ML5_0_SWITCH_ORDER(CTMODE,NLOOPLINE,PL,PDEN,M2L)
3503- CALL ML5_0_GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE)
3504- RETURN
3505+C Golem95 not available
3506+ WRITE(*,*) 'ERROR:: Golem95 is not interfaced.'
3507+ STOP
3508 ENDIF
3509
3510 C INITIALIZE TIR IF NEEDED
3511
3512=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f'
3513--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f 2017-08-14 07:04:15 +0000
3514+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f 2018-11-09 08:24:41 +0000
3515@@ -243,7 +243,7 @@
3516 C A FLAG TO DENOTE WHETHER THE CORRESPONDING LOOPLIBS ARE
3517 C AVAILABLE OR NOT
3518 LOGICAL LOOPLIBS_AVAILABLE(NLOOPLIB)
3519- DATA LOOPLIBS_AVAILABLE/.TRUE.,.FALSE.,.TRUE.,.TRUE.,.FALSE.
3520+ DATA LOOPLIBS_AVAILABLE/.TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.
3521 $ ,.TRUE.,.TRUE./
3522 COMMON/ML5_0_LOOPLIBS_AV/ LOOPLIBS_AVAILABLE
3523 C A FLAG TO DENOTE WHETHER THE CORRESPONDING DIRECTION TESTS
3524
3525=== removed file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%GOLEM_interface.f'
3526--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%GOLEM_interface.f 2016-05-26 03:24:09 +0000
3527+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%GOLEM_interface.f 1970-01-01 00:00:00 +0000
3528@@ -1,755 +0,0 @@
3529- SUBROUTINE MG5_1_GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE)
3530-C
3531-C Generated by MadGraph5_aMC@NLO v. %(version)s, %(date)s
3532-C By the MadGraph5_aMC@NLO Development Team
3533-C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch
3534-C
3535-C Interface between MG5 and Golem95.
3536-C The Golem95 version should be higher than 1.3.0.
3537-C It supports RANK = NLOOPLINE + 1 tensor integrals when 1 <
3538-C NLOOPLINE < 6.
3539-C
3540-C Process: u u~ > u u~ [ virt = QCD ] @1
3541-C
3542-C
3543-C MODULES
3544-C
3545- USE MATRICE_S
3546- USE FORM_FACTOR_TYPE, ONLY: FORM_FACTOR
3547- USE PRECISION_GOLEM, ONLY: KI
3548- USE TENS_COMB
3549- USE TENS_REC
3550- USE FORM_FACTOR_1P, ONLY: A10
3551- USE FORM_FACTOR_2P, ONLY: A20
3552- USE FORM_FACTOR_3P, ONLY: A30
3553- USE FORM_FACTOR_4P, ONLY: A40
3554- USE FORM_FACTOR_5P, ONLY: A50
3555- USE FORM_FACTOR_6P, ONLY: A60
3556- IMPLICIT NONE
3557-C
3558-C CONSTANTS
3559-C
3560- INTEGER NEXTERNAL
3561- PARAMETER (NEXTERNAL=4)
3562- LOGICAL CHECKPCONSERVATION
3563- PARAMETER (CHECKPCONSERVATION=.TRUE.)
3564- REAL*8 NORMALIZATION
3565- PARAMETER (NORMALIZATION = 1.D0/(16.D0*3.14159265358979323846D0*
3566- $ *2))
3567- REAL(KI),DIMENSION(0:3),PARAMETER::NULL_VEC = (/0.0_KI,0.0_KI
3568- $ ,0.0_KI,0.0_KI/)
3569-C GOLEM_RUN_MODE = 1: Use directly MadLoop tensorial coefficients
3570-C GOLEM_RUN_MODE = 2: Reconstruct the tensorial coefficeints
3571-C directly from
3572-C numerator using golem internal reconstruction routine
3573-C GOLEM_RUN_MODE = 3: Cross-checked reconstructed coefficients
3574-C against
3575-C MadLoop internal ones.
3576- INTEGER GOLEM_RUN_MODE
3577- PARAMETER (GOLEM_RUN_MODE=1)
3578-C The following is the acceptance threshold used for
3579-C GOLEM_RUN_MODE = 3
3580- REAL*8 COEF_CHECK_THRS
3581- DATA COEF_CHECK_THRS/1.0D-13/
3582- COMMON/MG5_1_COEF_CHECK_THRS/COEF_CHECK_THRS
3583-
3584- LOGICAL PASS_COEF_CHECK
3585-C
3586-C ARGUMENTS
3587-C
3588- INTEGER NLOOPLINE, RANK
3589- REAL*8 PL(0:3,NLOOPLINE)
3590- REAL*8 PCT(0:3,0:NLOOPLINE-1), ABSPCT(0:3)
3591- REAL*8 REF_P
3592- REAL(KI) PGOLEM(NLOOPLINE,0:3)
3593- COMPLEX*16 M2L(NLOOPLINE)
3594- COMPLEX(KI) M2LGOLEM(NLOOPLINE)
3595- COMPLEX*16 RES(3)
3596- LOGICAL STABLE
3597-C
3598-C LOCAL VARIABLES
3599-C
3600- INTEGER I, J, K
3601- TYPE(FORM_FACTOR)::RES_GOLEM
3602-
3603- COMPLEX(KI)::COEFFS0,COEFFS0_REC
3604- TYPE(COEFF_TYPE_1)::COEFFS1,COEFFS1_REC
3605- TYPE(COEFF_TYPE_2)::COEFFS2,COEFFS2_REC
3606- TYPE(COEFF_TYPE_3)::COEFFS3,COEFFS3_REC
3607- TYPE(COEFF_TYPE_4)::COEFFS4,COEFFS4_REC
3608- TYPE(COEFF_TYPE_5)::COEFFS5,COEFFS5_REC
3609- TYPE(COEFF_TYPE_6)::COEFFS6,COEFFS6_REC
3610-
3611-C The pinch propagator optimization is not used, so for now it is
3612-C always 0.
3613- INTEGER PINCH
3614-C
3615-C EXTERNAL FUNCTIONS
3616-C
3617- COMPLEX(KI) MG5_1_GOLEM_LOOPNUM
3618- EXTERNAL MG5_1_GOLEM_LOOPNUM
3619- LOGICAL MG5_1_COMPARE_COEFS_0
3620- LOGICAL MG5_1_COMPARE_COEFS_1
3621- LOGICAL MG5_1_COMPARE_COEFS_2
3622- LOGICAL MG5_1_COMPARE_COEFS_3
3623- LOGICAL MG5_1_COMPARE_COEFS_4
3624- LOGICAL MG5_1_COMPARE_COEFS_5
3625- LOGICAL MG5_1_COMPARE_COEFS_6
3626-C
3627-C GLOBAL VARIABLES
3628-C
3629- INCLUDE 'coupl.inc'
3630- INTEGER CTMODE
3631- REAL*8 LSCALE
3632- COMMON/MG5_1_CT/LSCALE,CTMODE
3633-
3634- INTEGER ID,SQSOINDEX,R
3635- COMMON/MG5_1_LOOP/ID,SQSOINDEX,R
3636-
3637- LOGICAL CTINIT, TIRINIT, GOLEMINIT, SAMURAIINIT, NINJAINIT
3638- $ ,COLLIERINIT
3639- COMMON/REDUCTIONCODEINIT/CTINIT, TIRINIT,GOLEMINIT,SAMURAIINIT
3640- $ ,NINJAINIT,COLLIERINIT
3641-
3642- INTEGER NLOOPGROUPS
3643- PARAMETER (NLOOPGROUPS=13)
3644- INTEGER NSQUAREDSO
3645- PARAMETER (NSQUAREDSO=1)
3646- INCLUDE 'loop_max_coefs.inc'
3647-
3648- COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS)
3649- COMMON/MG5_1_LCOEFS/LOOPCOEFS
3650-C ----------
3651-C BEGIN CODE
3652-C ----------
3653-
3654-C The CT initialization is also performed here if not done already
3655-C because it calls MPINIT of OneLOop which is necessary on some
3656-C system
3657- IF (CTINIT) THEN
3658- CTINIT=.FALSE.
3659- CALL MG5_1_INITCT()
3660- ENDIF
3661-
3662-C INITIALIZE GOLEM IF NEEDED
3663- IF (GOLEMINIT) THEN
3664- GOLEMINIT=.FALSE.
3665- CALL MG5_1_INITGOLEM()
3666- ENDIF
3667-
3668-C No stability test intrisic to Golem95 now
3669- STABLE=.TRUE.
3670-
3671-C This initialization must be done for each reduction because we
3672-C have not setup anyoptimization using pinched propagators yet.
3673- CALL INITGOLEM95(NLOOPLINE)
3674- PINCH = 0
3675-
3676-C YOU CAN FIND THE DETAILS ABOUT THE DIFFERENT CTMODE AT THE
3677-C BEGINNING OF THE FILE CTS_CUTS.F90 IN THE CUTTOOLS DISTRIBUTION
3678-
3679-C CONVERT THE MASSES TO BE COMPLEX
3680- DO I=1,NLOOPLINE
3681- M2LGOLEM(I)=M2L(I)
3682- ENDDO
3683-
3684-C CONVERT THE MOMENTA FLOWING IN THE LOOP LINES TO CT CONVENTIONS
3685- DO I=0,3
3686- ABSPCT(I) = 0.D0
3687- DO J=0,(NLOOPLINE-1)
3688- PCT(I,J)=0.D0
3689- ENDDO
3690- ENDDO
3691- DO I=0,3
3692- DO J=1,NLOOPLINE
3693- PCT(I,0)=PCT(I,0)+PL(I,J)
3694- ABSPCT(I)=ABSPCT(I)+ABS(PL(I,J))
3695- ENDDO
3696- ENDDO
3697- REF_P = MAX(ABSPCT(0), ABSPCT(1),ABSPCT(2),ABSPCT(3))
3698- DO I=0,3
3699- ABSPCT(I) = MAX(REF_P*1E-6, ABSPCT(I))
3700- ENDDO
3701- IF (CHECKPCONSERVATION.AND.REF_P.GT.1D-8) THEN
3702- IF ((PCT(0,0)/ABSPCT(0)).GT.1.D-6) THEN
3703- WRITE(*,*) 'energy is not conserved ',PCT(0,0)
3704- STOP 'energy is not conserved'
3705- ELSEIF ((PCT(1,0)/ABSPCT(1)).GT.1.D-6) THEN
3706- WRITE(*,*) 'px is not conserved ',PCT(1,0)
3707- STOP 'px is not conserved'
3708- ELSEIF ((PCT(2,0)/ABSPCT(2)).GT.1.D-6) THEN
3709- WRITE(*,*) 'py is not conserved ',PCT(2,0)
3710- STOP 'py is not conserved'
3711- ELSEIF ((PCT(3,0)/ABSPCT(3)).GT.1.D-6) THEN
3712- WRITE(*,*) 'pz is not conserved ',PCT(3,0)
3713- STOP 'pz is not conserved'
3714- ENDIF
3715- ENDIF
3716- DO I=0,3
3717- DO J=1,(NLOOPLINE-1)
3718- DO K=1,J
3719- PCT(I,J)=PCT(I,J)+PL(I,K)
3720- ENDDO
3721- ENDDO
3722- ENDDO
3723-
3724-C Now convert the loop momenta to Golem95 conventions
3725- DO I=0,3
3726- PGOLEM(1,I)=0.0E0_KI
3727- DO J=2,NLOOPLINE
3728- PGOLEM(J,I)=PCT(I,J-1)
3729- ENDDO
3730- ENDDO
3731-
3732-C Fill in the kinematic s-matrix while taking care of on-shell
3733-C limits.
3734- CALL MG5_1_SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2LGOLEM)
3735-C Construct the golem internal matrices derived from the kinetic
3736-C one.
3737- CALL PREPARESMATRIX()
3738-
3739-C Fill in the golem coefficents and compute the loop
3740- IF(GOLEM_RUN_MODE.EQ.2)THEN
3741- RES_GOLEM = EVALUATE_B(MG5_1_GOLEM_LOOPNUM,PGOLEM,0,RANK)
3742- ELSE
3743- PASS_COEF_CHECK=.TRUE.
3744- SELECT CASE(RANK)
3745- CASE(0)
3746- CALL MG5_1_FILL_GOLEM_COEFFS_0(LOOPCOEFS(0,SQSOINDEX,ID)
3747- $ ,COEFFS0)
3748- IF(GOLEM_RUN_MODE.EQ.3)THEN
3749- COEFFS0_REC = MG5_1_GOLEM_LOOPNUM(NULL_VEC,0.0_KI)
3750- PASS_COEF_CHECK=MG5_1_COMPARE_COEFS_0(COEFFS0,COEFFS0_REC)
3751- ENDIF
3752- CASE(1)
3753- CALL MG5_1_FILL_GOLEM_COEFFS_1(LOOPCOEFS(0,SQSOINDEX,ID)
3754- $ ,COEFFS1)
3755- IF(GOLEM_RUN_MODE.EQ.3)THEN
3756- CALL RECONSTRUCT1(MG5_1_GOLEM_LOOPNUM,COEFFS1_REC)
3757- PASS_COEF_CHECK=MG5_1_COMPARE_COEFS_1(COEFFS1,COEFFS1_REC)
3758- ENDIF
3759- CASE(2)
3760- CALL MG5_1_FILL_GOLEM_COEFFS_2(LOOPCOEFS(0,SQSOINDEX,ID)
3761- $ ,COEFFS2)
3762- IF(GOLEM_RUN_MODE.EQ.3)THEN
3763- CALL RECONSTRUCT2(MG5_1_GOLEM_LOOPNUM,COEFFS2_REC)
3764- PASS_COEF_CHECK=MG5_1_COMPARE_COEFS_2(COEFFS2,COEFFS2_REC)
3765- ENDIF
3766- CASE(3)
3767- CALL MG5_1_FILL_GOLEM_COEFFS_3(LOOPCOEFS(0,SQSOINDEX,ID)
3768- $ ,COEFFS3)
3769- IF(GOLEM_RUN_MODE.EQ.3)THEN
3770- CALL RECONSTRUCT3(MG5_1_GOLEM_LOOPNUM,COEFFS3_REC)
3771- PASS_COEF_CHECK=MG5_1_COMPARE_COEFS_3(COEFFS3,COEFFS3_REC)
3772- ENDIF
3773- CASE(4)
3774- CALL MG5_1_FILL_GOLEM_COEFFS_4(LOOPCOEFS(0,SQSOINDEX,ID)
3775- $ ,COEFFS4)
3776- IF(GOLEM_RUN_MODE.EQ.3)THEN
3777- CALL RECONSTRUCT4(MG5_1_GOLEM_LOOPNUM,COEFFS4_REC)
3778- PASS_COEF_CHECK=MG5_1_COMPARE_COEFS_4(COEFFS4,COEFFS4_REC)
3779- ENDIF
3780- CASE(5)
3781- CALL MG5_1_FILL_GOLEM_COEFFS_5(LOOPCOEFS(0,SQSOINDEX,ID)
3782- $ ,COEFFS5)
3783- IF(GOLEM_RUN_MODE.EQ.3)THEN
3784- CALL RECONSTRUCT5(MG5_1_GOLEM_LOOPNUM,COEFFS5_REC)
3785- PASS_COEF_CHECK=MG5_1_COMPARE_COEFS_5(COEFFS5,COEFFS5_REC)
3786- ENDIF
3787- CASE(6)
3788- CALL MG5_1_FILL_GOLEM_COEFFS_6(LOOPCOEFS(0,SQSOINDEX,ID)
3789- $ ,COEFFS6)
3790- IF(GOLEM_RUN_MODE.EQ.3)THEN
3791- CALL RECONSTRUCT6(MG5_1_GOLEM_LOOPNUM,COEFFS6_REC)
3792- PASS_COEF_CHECK=MG5_1_COMPARE_COEFS_6(COEFFS6,COEFFS6_REC)
3793- ENDIF
3794- CASE DEFAULT
3795- WRITE(*,*)'Not yet implemented in Golem95 for rank= ',RANK
3796- STOP
3797- END SELECT
3798-
3799- IF(.NOT.PASS_COEF_CHECK)THEN
3800- WRITE(*,*)'Coefs mismatch for ID ',ID,' and rank ',RANK
3801- WRITE(*,*)'Coefs form MadLoop5:'
3802- SELECT CASE(RANK)
3803- CASE(0)
3804- WRITE(*,*)'Constant coef = ',COEFFS0
3805- CASE(1)
3806- CALL PRINT_COEFFS(COEFFS1)
3807- CASE(2)
3808- CALL PRINT_COEFFS(COEFFS2)
3809- CASE(3)
3810- CALL PRINT_COEFFS(COEFFS3)
3811- CASE(4)
3812- CALL PRINT_COEFFS(COEFFS4)
3813- CASE(5)
3814- CALL PRINT_COEFFS(COEFFS5)
3815- CASE(6)
3816- CALL PRINT_COEFFS(COEFFS6)
3817- END SELECT
3818- WRITE(*,*)'Coefs reconstructed by Golem95:'
3819- SELECT CASE(RANK)
3820- CASE(0)
3821- WRITE(*,*)'Constant coef = ',COEFFS0_REC
3822- CASE(1)
3823- CALL PRINT_COEFFS(COEFFS1_REC)
3824- CASE(2)
3825- CALL PRINT_COEFFS(COEFFS2_REC)
3826- CASE(3)
3827- CALL PRINT_COEFFS(COEFFS3_REC)
3828- CASE(4)
3829- CALL PRINT_COEFFS(COEFFS4_REC)
3830- CASE(5)
3831- CALL PRINT_COEFFS(COEFFS5_REC)
3832- CASE(6)
3833- CALL PRINT_COEFFS(COEFFS6_REC)
3834- END SELECT
3835- STOP
3836- ENDIF
3837-
3838- SELECT CASE(NLOOPLINE)
3839- CASE(1)
3840- WRITE(*,*)'Golem95 cannot handle with tadpole yet'
3841- STOP
3842- CASE(2)
3843- SELECT CASE(RANK)
3844- CASE(0)
3845- RES_GOLEM = COEFFS0*A20(PINCH)
3846- CASE(1)
3847- RES_GOLEM = CONTRACT2_1(COEFFS1,PGOLEM,PINCH)
3848- CASE(2)
3849- RES_GOLEM = CONTRACT2_2(COEFFS2,PGOLEM,PINCH)
3850- CASE(3)
3851- RES_GOLEM = CONTRACT2_3(COEFFS3,PGOLEM,PINCH)
3852- CASE DEFAULT
3853- WRITE(*,*)'Golem95 cannot handle with: N,r = ',2,RANK
3854- STOP
3855- END SELECT
3856- CASE(3)
3857- SELECT CASE(RANK)
3858- CASE(0)
3859- RES_GOLEM = COEFFS0*A30(PINCH)
3860- CASE(1)
3861- RES_GOLEM = CONTRACT3_1(COEFFS1,PGOLEM,PINCH)
3862- CASE(2)
3863- RES_GOLEM = CONTRACT3_2(COEFFS2,PGOLEM,PINCH)
3864- CASE(3)
3865- RES_GOLEM = CONTRACT3_3(COEFFS3,PGOLEM,PINCH)
3866- CASE(4)
3867- RES_GOLEM = CONTRACT3_4(COEFFS4,PGOLEM,PINCH)
3868- CASE DEFAULT
3869- WRITE(*,*)'Golem95 cannot handle with: N,r = ',3,RANK
3870- STOP
3871- END SELECT
3872- CASE(4)
3873- SELECT CASE(RANK)
3874- CASE(0)
3875- RES_GOLEM = COEFFS0*A40(PINCH)
3876- CASE(1)
3877- RES_GOLEM = CONTRACT4_1(COEFFS1,PGOLEM,PINCH)
3878- CASE(2)
3879- RES_GOLEM = CONTRACT4_2(COEFFS2,PGOLEM,PINCH)
3880- CASE(3)
3881- RES_GOLEM = CONTRACT4_3(COEFFS3,PGOLEM,PINCH)
3882- CASE(4)
3883- RES_GOLEM = CONTRACT4_4(COEFFS4,PGOLEM,PINCH)
3884- CASE(5)
3885- RES_GOLEM = CONTRACT4_5(COEFFS5,PGOLEM,PINCH)
3886- CASE DEFAULT
3887- WRITE(*,*)'Golem95 cannot handle with: N,r = ',4,RANK
3888- STOP
3889- END SELECT
3890- CASE(5)
3891- SELECT CASE(RANK)
3892- CASE(0)
3893- RES_GOLEM = COEFFS0*A50(PINCH)
3894- CASE(1)
3895- RES_GOLEM = CONTRACT5_1(COEFFS1,PGOLEM,PINCH)
3896- CASE(2)
3897- RES_GOLEM = CONTRACT5_2(COEFFS2,PGOLEM,PINCH)
3898- CASE(3)
3899- RES_GOLEM = CONTRACT5_3(COEFFS3,PGOLEM,PINCH)
3900- CASE(4)
3901- RES_GOLEM = CONTRACT5_4(COEFFS4,PGOLEM,PINCH)
3902- CASE(5)
3903- RES_GOLEM = CONTRACT5_5(COEFFS5,PGOLEM,PINCH)
3904- CASE(6)
3905- RES_GOLEM = CONTRACT5_6(COEFFS6,PGOLEM,PINCH)
3906- CASE DEFAULT
3907- WRITE(*,*)'Golem95 cannot handle with: N,r = ',5,RANK
3908- STOP
3909- END SELECT
3910- CASE(6)
3911- SELECT CASE(RANK)
3912- CASE(0)
3913- RES_GOLEM = COEFFS0*A60(PINCH)
3914- CASE(1)
3915- RES_GOLEM = CONTRACT6_1(COEFFS1,PGOLEM,PINCH)
3916- CASE(2)
3917- RES_GOLEM = CONTRACT6_2(COEFFS2,PGOLEM,PINCH)
3918- CASE(3)
3919- RES_GOLEM = CONTRACT6_3(COEFFS3,PGOLEM,PINCH)
3920- CASE(4)
3921- RES_GOLEM = CONTRACT6_4(COEFFS4,PGOLEM,PINCH)
3922- CASE(5)
3923- RES_GOLEM = CONTRACT6_5(COEFFS5,PGOLEM,PINCH)
3924- CASE(6)
3925- RES_GOLEM = CONTRACT6_6(COEFFS6,PGOLEM,PINCH)
3926- CASE DEFAULT
3927- WRITE(*,*)'Golem95 cannot handle with: N,r = ',6,RANK
3928- STOP
3929- END SELECT
3930- CASE DEFAULT
3931- WRITE(*,*)'Golem95 cannot handle with: N = ',NLOOPLINE
3932- STOP
3933- END SELECT
3934- ENDIF
3935-
3936- RES(1)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%C+2.0*LOG(MU_R)
3937- $ *RES_GOLEM%%B+2.0*LOG(MU_R)**2*RES_GOLEM%%A)
3938- RES(2)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%B+2.0*LOG(MU_R)
3939- $ *RES_GOLEM%%A)
3940- RES(3)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%A)
3941-C WRITE(*,*) 'Loop ID',ID,' =',RES(1),RES(2),RES(3)
3942-
3943-C Finally free golem memory and cache
3944- CALL EXITGOLEM95()
3945-
3946- END
3947-
3948- FUNCTION MG5_1_GOLEM_LOOPNUM(Q,MU2)
3949- USE PRECISION_GOLEM, ONLY: KI
3950- REAL(KI),DIMENSION(0:3),INTENT(IN)::Q
3951- REAL(KI),INTENT(IN)::MU2
3952- COMPLEX(KI)::MG5_1_GOLEM_LOOPNUM
3953-
3954- COMPLEX*16 QQ(0:3),NUM
3955- INTEGER I
3956-
3957- DO I=0,3
3958- QQ(I)=CMPLX(Q(I),0.0D0,KIND=16)
3959- ENDDO
3960-
3961- CALL MG5_1_LOOPNUM(QQ,NUM)
3962- MG5_1_GOLEM_LOOPNUM=NUM
3963- RETURN
3964- END FUNCTION
3965-
3966- SUBROUTINE MG5_1_INITGOLEM()
3967-C
3968-C INITIALISATION OF GOLEM
3969-C
3970-C
3971-C MODULE
3972-C
3973- USE PARAMETRE
3974-C
3975-C LOCAL VARIABLES
3976-C
3977- REAL*8 THRS
3978- LOGICAL EXT_NUM_FOR_R1
3979-C
3980-C GLOBAL VARIABLES
3981-C
3982- INCLUDE 'MadLoopParams.inc'
3983-C ----------
3984-C BEGIN CODE
3985-C ----------
3986-
3987-C DEFAULT PARAMETERS FOR GOLEM
3988-C -------------------------------
3989-C One can chose here to have either just the rational R1 piece
3990-C or everything but the R2
3991- RAT_OR_TOT_PAR = TOT
3992-
3993- END
3994-
3995- SUBROUTINE MG5_1_SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2L)
3996-C
3997-C MODULE
3998-C
3999- USE MATRICE_S
4000- USE PRECISION_GOLEM, ONLY: KI
4001-C
4002-C ARGUMENTS
4003-C
4004- INTEGER NLOOPLINE
4005- REAL(KI) PGOLEM(NLOOPLINE,0:3)
4006- COMPLEX(KI) M2L(NLOOPLINE)
4007-C
4008-C LOCAL VARIABLES
4009-C
4010- INTEGER I,J
4011- COMPLEX*16 S_MAT_FROM_MG(NLOOPLINE,NLOOPLINE)
4012-C ----------
4013-C BEGIN CODE
4014-C ----------
4015-
4016- CALL MG5_1_BUILD_KINEMATIC_MATRIX(NLOOPLINE,PGOLEM,M2L
4017- $ ,S_MAT_FROM_MG)
4018-
4019- DO I=1,NLOOPLINE
4020- DO J=1,NLOOPLINE
4021- S_MAT(I,J)=S_MAT_FROM_MG(I,J)
4022- ENDDO
4023- ENDDO
4024-
4025- END
4026-
4027- FUNCTION MG5_1_COMPARE_COEFS_0(COEFS_A,COEFS_B)
4028-
4029- USE PRECISION_GOLEM, ONLY: KI
4030- COMPLEX(KI) COEFS_A,COEFS_B
4031- REAL*8 COEF_CHECK_THRS
4032- COMMON/MG5_1_COEF_CHECK_THRS/COEF_CHECK_THRS
4033- REAL*8 DENOM,NUM
4034- LOGICAL MG5_1_COMPARE_COEFS_0
4035-
4036- NUM = ABS(COEFS_A-COEFS_B)
4037- DENOM = ABS(COEFS_A+COEFS_B)
4038- IF(DENOM.GT.0D0)THEN
4039- MG5_1_COMPARE_COEFS_0=((NUM/DENOM).LT.COEF_CHECK_THRS)
4040- ELSE
4041- MG5_1_COMPARE_COEFS_0=(NUM.LT.COEF_CHECK_THRS)
4042- ENDIF
4043-
4044- END
4045-
4046- FUNCTION MG5_1_COMPARE_COEFS_1(COEFS_A,COEFS_B)
4047-
4048- USE TENS_REC
4049- TYPE(COEFF_TYPE_1)COEFS_A,COEFS_B
4050- REAL*8 COEF_CHECK_THRS
4051- COMMON/MG5_1_COEF_CHECK_THRS/COEF_CHECK_THRS
4052- REAL*8 DENOM,NUM
4053- LOGICAL MG5_1_COMPARE_COEFS_1
4054-
4055- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
4056- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
4057- $ )
4058-
4059- IF(DENOM.GT.0D0)THEN
4060- MG5_1_COMPARE_COEFS_1=((NUM/DENOM).LT.COEF_CHECK_THRS)
4061- ELSE
4062- MG5_1_COMPARE_COEFS_1=(NUM.LT.COEF_CHECK_THRS)
4063- ENDIF
4064-
4065- END
4066-
4067- FUNCTION MG5_1_COMPARE_COEFS_2(COEFS_A,COEFS_B)
4068-
4069- USE TENS_REC
4070- TYPE(COEFF_TYPE_2) COEFS_A,COEFS_B
4071- REAL*8 COEF_CHECK_THRS
4072- COMMON/MG5_1_COEF_CHECK_THRS/COEF_CHECK_THRS
4073- REAL*8 DENOM,NUM
4074- LOGICAL MG5_1_COMPARE_COEFS_2
4075-
4076- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
4077- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))
4078- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
4079- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))
4080- IF(DENOM.GT.0D0)THEN
4081- MG5_1_COMPARE_COEFS_2=((NUM/DENOM).LT.COEF_CHECK_THRS)
4082- ELSE
4083- MG5_1_COMPARE_COEFS_2=(NUM.LT.COEF_CHECK_THRS)
4084- ENDIF
4085-
4086- END
4087-
4088- FUNCTION MG5_1_COMPARE_COEFS_3(COEFS_A,COEFS_B)
4089-
4090- USE TENS_REC
4091- TYPE(COEFF_TYPE_3) COEFS_A, COEFS_B
4092- REAL*8 COEF_CHECK_THRS
4093- COMMON/MG5_1_COEF_CHECK_THRS/COEF_CHECK_THRS
4094- REAL*8 DENOM,NUM
4095- LOGICAL MG5_1_COMPARE_COEFS_3
4096-
4097- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
4098- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
4099- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
4100- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
4101- $ )
4102- IF(DENOM.GT.0D0)THEN
4103- MG5_1_COMPARE_COEFS_3=((NUM/DENOM).LT.COEF_CHECK_THRS)
4104- ELSE
4105- MG5_1_COMPARE_COEFS_3=(NUM.LT.COEF_CHECK_THRS)
4106- ENDIF
4107-
4108- END
4109-
4110- FUNCTION MG5_1_COMPARE_COEFS_4(COEFS_A,COEFS_B)
4111-
4112- USE TENS_REC
4113- TYPE(COEFF_TYPE_4) COEFS_A, COEFS_B
4114- REAL*8 COEF_CHECK_THRS
4115- COMMON/MG5_1_COEF_CHECK_THRS/COEF_CHECK_THRS
4116- REAL*8 DENOM,NUM
4117- LOGICAL MG5_1_COMPARE_COEFS_4
4118-
4119- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
4120- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
4121- $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4))
4122- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
4123- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
4124- $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4))
4125- IF(DENOM.GT.0D0)THEN
4126- MG5_1_COMPARE_COEFS_4=((NUM/DENOM).LT.COEF_CHECK_THRS)
4127- ELSE
4128- MG5_1_COMPARE_COEFS_4=(NUM.LT.COEF_CHECK_THRS)
4129- ENDIF
4130-
4131- END
4132-
4133- FUNCTION MG5_1_COMPARE_COEFS_5(COEFS_A,COEFS_B)
4134-
4135- USE TENS_REC
4136- TYPE(COEFF_TYPE_5) COEFS_A,COEFS_B
4137- REAL*8 COEF_CHECK_THRS
4138- COMMON/MG5_1_COEF_CHECK_THRS/COEF_CHECK_THRS
4139- REAL*8 DENOM,NUM
4140- LOGICAL MG5_1_COMPARE_COEFS_5
4141-
4142- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
4143- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
4144- $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4))
4145- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
4146- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
4147- $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4))
4148- IF(DENOM.GT.0D0)THEN
4149- MG5_1_COMPARE_COEFS_5=((NUM/DENOM).LT.COEF_CHECK_THRS)
4150- ELSE
4151- MG5_1_COMPARE_COEFS_5=(NUM.LT.COEF_CHECK_THRS)
4152- ENDIF
4153-
4154- END
4155-
4156- FUNCTION MG5_1_COMPARE_COEFS_6(COEFS_A,COEFS_B)
4157-
4158- USE TENS_REC
4159- TYPE(COEFF_TYPE_6) COEFS_A,COEFS_B
4160- REAL*8 COEF_CHECK_THRS
4161- COMMON/MG5_1_COEF_CHECK_THRS/COEF_CHECK_THRS
4162- REAL*8 DENOM,NUM
4163- LOGICAL MG5_1_COMPARE_COEFS_6
4164-
4165- NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1))
4166- $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3))
4167- $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4))
4168- DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1)
4169- $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3)
4170- $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4))
4171- IF(DENOM.GT.0D0)THEN
4172- MG5_1_COMPARE_COEFS_6=((NUM/DENOM).LT.COEF_CHECK_THRS)
4173- ELSE
4174- MG5_1_COMPARE_COEFS_6=(NUM.LT.COEF_CHECK_THRS)
4175- ENDIF
4176-
4177- END
4178-
4179-
4180- SUBROUTINE MG5_1_FILL_GOLEM_COEFFS_0(ML_COEFS,GOLEM_COEFS)
4181- USE PRECISION_GOLEM, ONLY: KI
4182- INCLUDE 'coef_specs.inc'
4183- INCLUDE 'loop_max_coefs.inc'
4184- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
4185- COMPLEX(KI) GOLEM_COEFS
4186- GOLEM_COEFS=ML_COEFS(0)
4187- END
4188-
4189- SUBROUTINE MG5_1_FILL_GOLEM_COEFFS_1(ML_COEFS,GOLEM_COEFS)
4190- USE TENS_REC, ONLY: COEFF_TYPE_1
4191- INCLUDE 'coef_specs.inc'
4192- INCLUDE 'loop_max_coefs.inc'
4193- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
4194- TYPE(COEFF_TYPE_1) GOLEM_COEFS
4195-C Constant coefficient
4196- GOLEM_COEFS%%C0=ML_COEFS(0)
4197-C Coefficient q(0)
4198- GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1)
4199-C Coefficient q(1)
4200- GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2)
4201-C Coefficient q(2)
4202- GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3)
4203-C Coefficient q(3)
4204- GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4)
4205- END
4206-
4207- SUBROUTINE MG5_1_FILL_GOLEM_COEFFS_2(ML_COEFS,GOLEM_COEFS)
4208- USE TENS_REC, ONLY: COEFF_TYPE_2
4209- INCLUDE 'coef_specs.inc'
4210- INCLUDE 'loop_max_coefs.inc'
4211- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
4212- TYPE(COEFF_TYPE_2) GOLEM_COEFS
4213-C Constant coefficient
4214- GOLEM_COEFS%%C0=ML_COEFS(0)
4215-C Coefficient q(0)
4216- GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1)
4217-C Coefficient q(0)^2
4218- GOLEM_COEFS%%C1(1,2)= ML_COEFS(5)
4219-C Coefficient q(1)
4220- GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2)
4221-C Coefficient q(1)^2
4222- GOLEM_COEFS%%C1(2,2)= ML_COEFS(7)
4223-C Coefficient q(2)
4224- GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3)
4225-C Coefficient q(2)^2
4226- GOLEM_COEFS%%C1(3,2)= ML_COEFS(10)
4227-C Coefficient q(3)
4228- GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4)
4229-C Coefficient q(3)^2
4230- GOLEM_COEFS%%C1(4,2)= ML_COEFS(14)
4231-C Coefficient q(0)*q(1)
4232- GOLEM_COEFS%%C2(1,1)= ML_COEFS(6)
4233-C Coefficient q(0)*q(2)
4234- GOLEM_COEFS%%C2(2,1)= ML_COEFS(8)
4235-C Coefficient q(0)*q(3)
4236- GOLEM_COEFS%%C2(3,1)= ML_COEFS(11)
4237-C Coefficient q(1)*q(2)
4238- GOLEM_COEFS%%C2(4,1)= ML_COEFS(9)
4239-C Coefficient q(1)*q(3)
4240- GOLEM_COEFS%%C2(5,1)= ML_COEFS(12)
4241-C Coefficient q(2)*q(3)
4242- GOLEM_COEFS%%C2(6,1)= ML_COEFS(13)
4243- END
4244-
4245- SUBROUTINE MG5_1_FILL_GOLEM_COEFFS_3(ML_COEFS,GOLEM_COEFS)
4246- USE TENS_REC, ONLY: COEFF_TYPE_3
4247- INCLUDE 'coef_specs.inc'
4248- INCLUDE 'loop_max_coefs.inc'
4249- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
4250- TYPE(COEFF_TYPE_3) GOLEM_COEFS
4251-C Dummy routine for MG5_1_FILL_GOLEM_COEFS_3
4252- STOP 'ERROR: 3 > 2'
4253- END
4254-
4255- SUBROUTINE MG5_1_FILL_GOLEM_COEFFS_4(ML_COEFS,GOLEM_COEFS)
4256- USE TENS_REC, ONLY: COEFF_TYPE_4
4257- INCLUDE 'coef_specs.inc'
4258- INCLUDE 'loop_max_coefs.inc'
4259- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
4260- TYPE(COEFF_TYPE_4) GOLEM_COEFS
4261-C Dummy routine for MG5_1_FILL_GOLEM_COEFS_4
4262- STOP 'ERROR: 4 > 2'
4263- END
4264-
4265- SUBROUTINE MG5_1_FILL_GOLEM_COEFFS_5(ML_COEFS,GOLEM_COEFS)
4266- USE TENS_REC, ONLY: COEFF_TYPE_5
4267- INCLUDE 'coef_specs.inc'
4268- INCLUDE 'loop_max_coefs.inc'
4269- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
4270- TYPE(COEFF_TYPE_5) GOLEM_COEFS
4271-C Dummy routine for MG5_1_FILL_GOLEM_COEFS_5
4272- STOP 'ERROR: 5 > 2'
4273- END
4274-
4275- SUBROUTINE MG5_1_FILL_GOLEM_COEFFS_6(ML_COEFS,GOLEM_COEFS)
4276- USE TENS_REC, ONLY: COEFF_TYPE_6
4277- INCLUDE 'coef_specs.inc'
4278- INCLUDE 'loop_max_coefs.inc'
4279- COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1)
4280- TYPE(COEFF_TYPE_6) GOLEM_COEFS
4281-C Dummy routine for MG5_1_FILL_GOLEM_COEFS_6
4282- STOP 'ERROR: 6 > 2'
4283- END
4284
4285=== modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%TIR_interface.f'
4286--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%TIR_interface.f 2016-06-28 23:55:35 +0000
4287+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%TIR_interface.f 2018-11-09 08:24:41 +0000
4288@@ -95,17 +95,9 @@
4289 ENDIF
4290
4291 IF (MLREDUCTIONLIB(I_LIB).EQ.4) THEN
4292-C Using Golem95
4293-C PDEN is dummy for Golem95 so we just initialize it to zero
4294-C here so as to use it for the function SWITCHORDER
4295- DO I=0,3
4296- DO J=1,NLOOPLINE-1
4297- PDEN(I,J)=0.0D0
4298- ENDDO
4299- ENDDO
4300- CALL MG5_1_SWITCH_ORDER(CTMODE,NLOOPLINE,PL,PDEN,M2L)
4301- CALL MG5_1_GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE)
4302- RETURN
4303+C Golem95 not available
4304+ WRITE(*,*) 'ERROR:: Golem95 is not interfaced.'
4305+ STOP
4306 ENDIF
4307
4308 C INITIALIZE TIR IF NEEDED
4309
4310=== modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f'
4311--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f 2017-08-15 19:34:40 +0000
4312+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f 2018-11-09 08:24:41 +0000
4313@@ -243,7 +243,7 @@
4314 C A FLAG TO DENOTE WHETHER THE CORRESPONDING LOOPLIBS ARE
4315 C AVAILABLE OR NOT
4316 LOGICAL LOOPLIBS_AVAILABLE(NLOOPLIB)
4317- DATA LOOPLIBS_AVAILABLE/.TRUE.,.FALSE.,.TRUE.,.TRUE.,.FALSE.
4318+ DATA LOOPLIBS_AVAILABLE/.TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE.
4319 $ ,.TRUE.,.TRUE./
4320 COMMON/MG5_1_LOOPLIBS_AV/ LOOPLIBS_AVAILABLE
4321 C A FLAG TO DENOTE WHETHER THE CORRESPONDING DIRECTION TESTS
4322
4323=== modified file 'tests/unit_tests/iolibs/test_export_v4.py'
4324--- tests/unit_tests/iolibs/test_export_v4.py 2018-06-14 20:20:22 +0000
4325+++ tests/unit_tests/iolibs/test_export_v4.py 2018-11-09 08:24:41 +0000
4326@@ -2455,6 +2455,13 @@
4327 created_files = ['leshouche'
4328 ]
4329
4330+
4331+ def setUp(self):
4332+
4333+
4334+ helas_call_writers.HelasCallWriter.customize_argument_for_all_other_helas_object =\
4335+ staticmethod(helas_call_writers.HelasCallWriter.default_customize_argument_for_all_other_helas_object)
4336+
4337 tearDown = test_file_writers.CheckFileCreate.clean_files
4338
4339 def test_generate_helas_diagrams_ea_ae(self):

Subscribers

People subscribed via source and target branches

to all changes: