Merge lp:~mg5core1/mg5amcnlo/2.6.4 into lp:mg5amcnlo/lts
- 2.6.4
- Merge into series2.0
Proposed by
Olivier Mattelaer
Status: | Merged |
---|---|
Merged at revision: | 280 |
Proposed branch: | lp:~mg5core1/mg5amcnlo/2.6.4 |
Merge into: | lp:mg5amcnlo/lts |
Diff against target: |
5979 lines (+775/-3545) 68 files modified
MadSpin/decay.py (+12/-3) MadSpin/interface_madspin.py (+23/-8) MadSpin/src/driver.f (+5/-5) Template/LO/Source/run.inc (+4/-1) Template/LO/Source/transpole.f (+20/-1) Template/LO/SubProcesses/genps.f (+2/-2) Template/LO/SubProcesses/myamp.f (+39/-112) Template/LO/SubProcesses/reweight.f (+21/-7) Template/NLO/MCatNLO/Makefile_MadFKS (+1/-1) Template/NLO/SubProcesses/check_poles.f (+2/-2) Template/NLO/SubProcesses/combine_plots_FO.sh (+56/-110) Template/NLO/SubProcesses/driver_mintFO.f (+1/-1) Template/NLO/SubProcesses/driver_mintMC.f (+1/-1) Template/NLO/SubProcesses/makefile (+0/-6) Template/NLO/SubProcesses/mint-integrator2.f (+3/-3) Template/NLO/SubProcesses/read40.for (+1/-1) Template/NLO/SubProcesses/split40.f (+0/-51) UpdateNotes.txt (+17/-0) VERSION (+2/-2) aloha/aloha_writers.py (+3/-1) madgraph/core/base_objects.py (+8/-2) madgraph/core/helas_objects.py (+7/-0) madgraph/interface/amcatnlo_interface.py (+4/-0) madgraph/interface/amcatnlo_run_interface.py (+16/-2) madgraph/interface/common_run_interface.py (+103/-13) madgraph/interface/extended_cmd.py (+8/-0) madgraph/interface/loop_interface.py (+13/-5) madgraph/interface/madevent_interface.py (+16/-8) madgraph/interface/madgraph_interface.py (+17/-5) madgraph/interface/reweight_interface.py (+5/-4) madgraph/iolibs/export_v4.py (+67/-5) 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/madevent/sum_html.py (+1/-1) madgraph/various/banner.py (+10/-6) madgraph/various/lhe_parser.py (+13/-8) madgraph/various/systematics.py (+1/-0) models/check_param_card.py (+9/-5) models/import_ufo.py (+41/-9) tests/IOTests.py (+11/-5) tests/acceptance_tests/test_cmd_madloop.py (+2/-2) tests/acceptance_tests/test_export_fks.py (+1/-1) tests/acceptance_tests/test_madspin.py (+54/-2) tests/acceptance_tests/test_model_equivalence.py (+3/-4) 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/test_manager.py (+1/-1) tests/unit_tests/iolibs/test_export_v4.py (+7/-0) tests/unit_tests/madspin/test_madspin.py (+7/-0) vendor/CutTools/src/makefile (+10/-4) vendor/CutTools/src/qcdloop/aaxex.f (+1/-1) vendor/IREGI/src/qcdloop/ff/aaxex.f (+1/-1) vendor/IREGI/src/qcdloop/ff/makefile (+1/-1) |
To merge this branch: | bzr merge lp:~mg5core1/mg5amcnlo/2.6.4 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
MadTeam | Pending | ||
Review via email: mp+358542@code.launchpad.net |
Commit message
2.6.4 is now ready. I will procede to merging it.
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'MadSpin/decay.py' |
2 | --- MadSpin/decay.py 2018-03-22 14:00:54 +0000 |
3 | +++ MadSpin/decay.py 2018-11-09 10:32:12 +0000 |
4 | @@ -3963,14 +3963,23 @@ |
5 | elif mode=='full': |
6 | stdin_text="5 0 0 0 \n" # before closing, write down the seed |
7 | external = self.calculator[('full',path)] |
8 | - external.stdin.write(stdin_text) |
9 | + try: |
10 | + external.stdin.write(stdin_text) |
11 | + except Exception: |
12 | + continue |
13 | ranmar_state=external.stdout.readline() |
14 | ranmar_file=pjoin(path,'ranmar_state.dat') |
15 | ranmar=open(ranmar_file, 'w') |
16 | ranmar.write(ranmar_state) |
17 | ranmar.close() |
18 | - external.stdin.close() |
19 | - external.stdout.close() |
20 | + try: |
21 | + external.stdin.close() |
22 | + except Exception: |
23 | + continue |
24 | + try: |
25 | + external.stdout.close() |
26 | + except Exception: |
27 | + continue |
28 | external.terminate() |
29 | del external |
30 | else: |
31 | |
32 | === modified file 'MadSpin/interface_madspin.py' |
33 | --- MadSpin/interface_madspin.py 2018-06-22 06:52:02 +0000 |
34 | +++ MadSpin/interface_madspin.py 2018-11-09 10:32:12 +0000 |
35 | @@ -199,10 +199,11 @@ |
36 | |
37 | self.inputfile = inputfile |
38 | if self.options['spinmode'] == 'none' and \ |
39 | - (self.options['input_format'] != 'lhe' or (self.options['input_format'] == 'auto' and '.lhe' in inputfile[:-5])): |
40 | + (self.options['input_format'] not in ['lhe','auto'] or |
41 | + (self.options['input_format'] == 'auto' and '.lhe' not in inputfile[-7:])): |
42 | self.banner = banner.Banner() |
43 | self.setup_for_pure_decay() |
44 | - return |
45 | + return |
46 | |
47 | if inputfile.endswith('.gz'): |
48 | misc.gunzip(inputfile) |
49 | @@ -984,8 +985,11 @@ |
50 | #misc.sprint(i, particle.pdg, particle.pid) |
51 | #misc.sprint(self.final_state, evt_decayfile) |
52 | # check if we need to decay the particle |
53 | - if not (particle.pdg in self.final_state or particle.pdg in evt_decayfile): |
54 | - continue # nothing to do for this particle |
55 | + if self.final_state and particle.pdg not in self.final_state: |
56 | + continue # nothing to do for this particle |
57 | + if particle.pdg not in evt_decayfile: |
58 | + continue # nothing to do for this particle |
59 | + |
60 | # check how the decay need to be done |
61 | nb_decay = len(evt_decayfile[particle.pdg]) |
62 | if nb_decay == 0: |
63 | @@ -1004,11 +1008,18 @@ |
64 | cumul = 0 |
65 | for j,events in evt_decayfile[particle.pdg].items(): |
66 | cumul += events.cross |
67 | - if r < cumul: |
68 | + if r <= cumul: |
69 | decay_file = events |
70 | decay_file_nb = j |
71 | - else: |
72 | break |
73 | + else: |
74 | + # security for numerical accuracy issue... (unlikely but better safe) |
75 | + if (cumul-tot)/tot < 1e-5: |
76 | + decay_file = events |
77 | + decay_file_nb = j |
78 | + else: |
79 | + misc.sprint(j,cumul, events.cross, tot, (tot-cumul)/tot) |
80 | + raise Exception |
81 | |
82 | if self.options['new_wgt'] == 'BR': |
83 | tot_width = float(self.banner.get('param', 'decay', abs(pdg)).value) |
84 | @@ -1056,8 +1067,13 @@ |
85 | if len(hepmc_output) == 0: |
86 | hepmc_output.append(lhe_parser.Particle(event=hepmc_output)) |
87 | hepmc_output[0].color2 = 0 |
88 | + hepmc_output[0].status = -1 |
89 | + hepmc_output.nexternal+=1 |
90 | decayed_particle = lhe_parser.Particle(particle, hepmc_output) |
91 | + decayed_particle.mother1 = hepmc_output[0] |
92 | + decayed_particle.mother2 = hepmc_output[0] |
93 | hepmc_output.append(decayed_particle) |
94 | + hepmc_output.nexternal+=1 |
95 | decayed_particle.add_decay(decay) |
96 | # change the weight associate to the event |
97 | if self.options['new_wgt'] == 'cross-section': |
98 | @@ -1075,7 +1091,6 @@ |
99 | else: |
100 | hepmc_output.wgt = event.wgt |
101 | hepmc_output.nexternal = len(hepmc_output) # the append does not update nexternal |
102 | - hepmc_output.assign_mother() |
103 | output_lhe.write(str(hepmc_output)) |
104 | else: |
105 | if counter==0: |
106 | @@ -1425,7 +1440,7 @@ |
107 | if self.options['fixed_order']: |
108 | production, counterevt= production[0], production[1:] |
109 | if curr_event and curr_event % 1000 == 0 and float(str(curr_event)[1:]) ==0: |
110 | - print "decaying event number %s. Efficiency: %s [%s s]" % (curr_event, 1/self.efficiency, time.time()-start) |
111 | + logger.info("decaying event number %s. Efficiency: %s [%s s]" % (curr_event, 1/self.efficiency, time.time()-start)) |
112 | while 1: |
113 | nb_try +=1 |
114 | decays = self.get_decay_from_file(production, evt_decayfile, nb_event-curr_event) |
115 | |
116 | === modified file 'MadSpin/src/driver.f' |
117 | --- MadSpin/src/driver.f 2017-08-03 18:49:25 +0000 |
118 | +++ MadSpin/src/driver.f 2018-11-09 10:32:12 +0000 |
119 | @@ -340,10 +340,10 @@ |
120 | if (jac.lt.0d0) then |
121 | counter2=counter2+1 |
122 | counter3=counter3+1 |
123 | -c if (counter3.gt.500) then |
124 | -c write(*,*) "500_pts_failed_stop_executation" |
125 | -c stop |
126 | -c endif |
127 | + if (counter3.gt.500*8*100) then |
128 | + write(*,*) "500_pts_failed_stop_executation" |
129 | + stop |
130 | + endif |
131 | if (counter2.ge.8) then ! use another topology to generate PS points |
132 | do k=1,n_max_cg |
133 | amp2(k)=0d0 |
134 | @@ -960,7 +960,7 @@ |
135 | include 'nexternal_prod.inc' |
136 | !include 'run.inc' |
137 | c arguments |
138 | - double precision jac,x(36),p(0:3,nexternal), p_prod(0:3,nexternal) |
139 | + double precision jac,x(36),p(0:3,nexternal), p_prod(0:3,nexternal_prod) |
140 | integer itree(2,-nexternal:-1) |
141 | double precision qmass(-nexternal:0),qwidth(-nexternal:0) |
142 | c common |
143 | |
144 | === modified file 'Template/LO/Source/run.inc' |
145 | --- Template/LO/Source/run.inc 2018-02-01 22:30:56 +0000 |
146 | +++ Template/LO/Source/run.inc 2018-11-09 10:32:12 +0000 |
147 | @@ -91,4 +91,7 @@ |
148 | double precision mxxmin4pdg(0:25) |
149 | logical mxxpart_antipart(1:25) |
150 | common/TO_PDG_SPECIFIC_CUT/pdg_cut, ptmin4pdg,ptmax4pdg, Emin4pdg, Emax4pdg, etamin4pdg, |
151 | - &etamax4pdg, mxxmin4pdg,mxxpart_antipart |
152 | \ No newline at end of file |
153 | + &etamax4pdg, mxxmin4pdg,mxxpart_antipart |
154 | + |
155 | + double precision small_width_treatment |
156 | + common/narrow_width/small_width_treatment |
157 | \ No newline at end of file |
158 | |
159 | === modified file 'Template/LO/Source/transpole.f' |
160 | --- Template/LO/Source/transpole.f 2016-06-15 22:46:42 +0000 |
161 | +++ Template/LO/Source/transpole.f 2018-11-09 10:32:12 +0000 |
162 | @@ -28,13 +28,24 @@ |
163 | double precision z,zmin,zmax,xmin,xmax,ez |
164 | double precision pole1,width1,x,xc |
165 | double precision a,b |
166 | +c |
167 | +c small width treatment |
168 | +c |
169 | + double precision small_width_treatment |
170 | + common/narrow_width/small_width_treatment |
171 | c----- |
172 | c Begin Code |
173 | c----- |
174 | pole=pole1 |
175 | width=width1 |
176 | + |
177 | x = x1 |
178 | if (pole .gt. 0d0) then |
179 | + if (width.lt.pole*small_width_treatment)then |
180 | + width = pole * small_width_treatment |
181 | + jac = jac * width/width1 |
182 | + endif |
183 | + |
184 | zmin = atan((-pole)/width)/width |
185 | zmax = atan((1d0-pole)/width)/width |
186 | if (x .gt. del .and. x .lt. 1d0-del) then |
187 | @@ -175,7 +186,11 @@ |
188 | c |
189 | double precision pole1,width1,y1,jac |
190 | real*8 x |
191 | - |
192 | +c |
193 | +c small width treatment |
194 | +c |
195 | + double precision small_width_treatment |
196 | + common/narrow_width/small_width_treatment |
197 | c |
198 | c Local |
199 | c |
200 | @@ -191,6 +206,10 @@ |
201 | width=width1 |
202 | y = y1 |
203 | if (pole .gt. 0d0) then !BW |
204 | + if (width.lt.pole*small_width_treatment)then |
205 | + width = pole * small_width_treatment |
206 | + jac = jac * width/width1 |
207 | + endif |
208 | zmin = atan((-pole)/width)/width |
209 | zmax = atan((1d0-pole)/width)/width |
210 | z = atan((y-pole)/width)/width |
211 | |
212 | === modified file 'Template/LO/SubProcesses/genps.f' |
213 | --- Template/LO/SubProcesses/genps.f 2018-06-20 11:54:42 +0000 |
214 | +++ Template/LO/SubProcesses/genps.f 2018-11-09 10:32:12 +0000 |
215 | @@ -41,7 +41,7 @@ |
216 | integer mincfig,maxcfig !Range of configurations |
217 | integer invar |
218 | double precision wgt !(input and output) |
219 | - double precision x(maxdim),p(maxdim) !x,p (output) [p(0:3,nexternal)] |
220 | + double precision x(*),p(*) !x,p (output) [p(0:3,nexternal)] |
221 | c |
222 | c Local |
223 | c |
224 | @@ -568,7 +568,7 @@ |
225 | if (abs(lpp(1)) .eq. 3) m1 = 0.000511d0 |
226 | if (abs(lpp(2)) .eq. 3) m2 = 0.000511d0 |
227 | if (mass_ion(1).ge.0d0) m1 = mass_ion(1) |
228 | - if (mass_ion(2).ge.0d0) m1 = mass_ion(2) |
229 | + if (mass_ion(2).ge.0d0) m2 = mass_ion(2) |
230 | if(ebeam(1).lt.m1.and.lpp(1).ne.9) ebeam(1)=m1 |
231 | if(ebeam(2).lt.m2.and.lpp(2).ne.9) ebeam(2)=m2 |
232 | pi1(0)=ebeam(1) |
233 | |
234 | === modified file 'Template/LO/SubProcesses/myamp.f' |
235 | --- Template/LO/SubProcesses/myamp.f 2016-12-17 16:26:56 +0000 |
236 | +++ Template/LO/SubProcesses/myamp.f 2018-11-09 10:32:12 +0000 |
237 | @@ -1,91 +1,3 @@ |
238 | - double precision function testamp(p) |
239 | -c***************************************************************************** |
240 | -c Approximates matrix element by propagators |
241 | -c***************************************************************************** |
242 | - implicit none |
243 | -c |
244 | -c Constants |
245 | -c |
246 | - include 'genps.inc' |
247 | - include 'maxconfigs.inc' |
248 | - include 'nexternal.inc' |
249 | - double precision zero |
250 | - parameter (zero = 0d0) |
251 | -c |
252 | -c Arguments |
253 | -c |
254 | - double precision p(0:3,nexternal) |
255 | -c integer iconfig |
256 | -c |
257 | -c Local |
258 | -c |
259 | - double precision xp(0:3,-nexternal:nexternal) |
260 | - double precision mpole(-nexternal:0),shat,tsgn |
261 | - integer i,j,iconfig |
262 | - |
263 | - double precision prmass(-nexternal:0,lmaxconfigs) |
264 | - double precision prwidth(-nexternal:0,lmaxconfigs) |
265 | - integer pow(-nexternal:0,lmaxconfigs) |
266 | - logical first_time |
267 | -c |
268 | -c Global |
269 | -c |
270 | - integer iforest(2,-max_branch:-1,lmaxconfigs) |
271 | - common/to_forest/ iforest |
272 | - integer mapconfig(0:lmaxconfigs), this_config |
273 | - common/to_mconfigs/mapconfig, this_config |
274 | - |
275 | - include 'coupl.inc' |
276 | -c |
277 | -c External |
278 | -c |
279 | - double precision dot |
280 | - |
281 | - save prmass,prwidth,pow |
282 | - data first_time /.true./ |
283 | -c----- |
284 | -c Begin Code |
285 | -c----- |
286 | - iconfig = this_config |
287 | - if (first_time) then |
288 | -c include 'props.inc' |
289 | - first_time=.false. |
290 | - endif |
291 | - |
292 | - do i=1,nexternal |
293 | - mpole(-i)=0d0 |
294 | - do j=0,3 |
295 | - xp(j,i)=p(j,i) |
296 | - enddo |
297 | - enddo |
298 | -c mpole(-3) = 174**2 |
299 | -c shat = dot(p(0,1),p(0,2))/(1800)**2 |
300 | - shat = dot(p(0,1),p(0,2))/(10)**2 |
301 | -c shat = 1d0 |
302 | - testamp = 1d0 |
303 | - tsgn = +1d0 |
304 | - do i=-1,-(nexternal-3),-1 !Find all the propagotors |
305 | - if (iforest(1,i,iconfig) .eq. 1) tsgn=-1d0 |
306 | - do j=0,3 |
307 | - xp(j,i) = xp(j,iforest(1,i,iconfig)) |
308 | - $ +tsgn*xp(j,iforest(2,i,iconfig)) |
309 | - enddo |
310 | - if (prwidth(i,iconfig) .ne. 0d0 .and. .false.) then |
311 | - testamp=testamp/((dot(xp(0,i),xp(0,i)) |
312 | - $ -prmass(i,iconfig)**2)**2 |
313 | - $ -(prmass(i,iconfig)*prwidth(i,iconfig))**2) |
314 | - else |
315 | - testamp = testamp/((dot(xp(0,i),xp(0,i)) - |
316 | - $ prmass(i,iconfig)**2) |
317 | - $ **(pow(i,iconfig))) |
318 | - endif |
319 | - testamp=testamp*shat**(pow(i,iconfig)) |
320 | -c write(*,*) i,iconfig,pow(i,iconfig),prmass(i,iconfig) |
321 | - enddo |
322 | -c testamp = 1d0/dot(xp(0,-1),xp(0,-1)) |
323 | - testamp=abs(testamp) |
324 | -c testamp = 1d0 |
325 | - end |
326 | |
327 | logical function cut_bw(p) |
328 | c***************************************************************************** |
329 | @@ -114,6 +26,7 @@ |
330 | |
331 | double precision prmass(-nexternal:0,lmaxconfigs) |
332 | double precision prwidth(-nexternal:0,lmaxconfigs) |
333 | + double precision prwidth_tmp(-nexternal:0,lmaxconfigs) |
334 | integer pow(-nexternal:0,lmaxconfigs) |
335 | logical first_time, onshell |
336 | double precision xmass |
337 | @@ -152,13 +65,14 @@ |
338 | c |
339 | double precision dot |
340 | |
341 | - save prmass,prwidth,pow |
342 | + save prmass,prwidth,pow,prwidth_tmp |
343 | data first_time /.true./ |
344 | c----- |
345 | c Begin Code |
346 | c----- |
347 | cut_bw = .false. !Default is we passed the cut |
348 | iconfig = this_config |
349 | + |
350 | if (first_time) then |
351 | include 'props.inc' |
352 | nbw = 0 |
353 | @@ -209,10 +123,12 @@ |
354 | c write(*,*) 'xmass',xmass,prmass(i,iconfig) |
355 | c |
356 | c Here we set if the BW is "on-shell" for LesHouches |
357 | -c |
358 | +c |
359 | + prwidth_tmp(i,iconfig) = max(prwidth(i,iconfig), prmass(i,iconfig)*small_width_treatment) |
360 | + |
361 | onshell = (abs(xmass - prmass(i,iconfig)) .lt. |
362 | - $ bwcutoff*prwidth(i,iconfig).and. |
363 | - $ (prwidth(i,iconfig)/prmass(i,iconfig).lt.0.1d0.or. |
364 | + $ bwcutoff*prwidth_tmp(i,iconfig).and. |
365 | + $ (prwidth_tmp(i,iconfig)/prmass(i,iconfig).lt.0.1d0.or. |
366 | $ gForceBW(i,iconfig).eq.1)) |
367 | if(onshell)then |
368 | c Remove on-shell forbidden s-channels (gForceBW=2) (JA 2/10/11) |
369 | @@ -264,10 +180,10 @@ |
370 | c For decay-chain syntax use BWcutoff here too (22/12/14) |
371 | if (gForceBW(i, iconfig).eq.1) then |
372 | onshell = (abs(xmass - prmass(i,iconfig)) .lt. |
373 | - $ bwcutoff*prwidth(i,iconfig)) |
374 | + $ bwcutoff*prwidth_tmp(i,iconfig)) |
375 | else |
376 | onshell = (abs(xmass - prmass(i,iconfig)) .lt. |
377 | - $ 5d0*prwidth(i,iconfig)) |
378 | + $ 5d0*prwidth_tmp(i,iconfig)) |
379 | endif |
380 | |
381 | if (onshell .and. (lbw(nbw).eq. 2) .or. |
382 | @@ -313,6 +229,7 @@ |
383 | |
384 | double precision prmass(-nexternal:0,lmaxconfigs) |
385 | double precision prwidth(-nexternal:0,lmaxconfigs) |
386 | + double precision prwidth_tmp(-nexternal:0,lmaxconfigs) |
387 | integer pow(-nexternal:0,lmaxconfigs) |
388 | |
389 | integer idup(nexternal,maxproc,maxsproc) |
390 | @@ -382,11 +299,21 @@ |
391 | |
392 | c----- |
393 | c Begin Code |
394 | -c----- |
395 | +c----- |
396 | + iconfig = this_config |
397 | +c needs to be initialise to avoid segfault |
398 | + do i = -nexternal,-1 |
399 | + prwidth(i,iconfig) = 0 |
400 | + prmass(i,iconfig) =0 |
401 | + enddo |
402 | include 'props.inc' |
403 | c etmin = 10 |
404 | nt = 0 |
405 | - iconfig = this_config |
406 | + do i = -nexternal,-1 |
407 | + prwidth_tmp(i,iconfig) = max(prwidth(i,iconfig), prmass(i,iconfig)*small_width_treatment) |
408 | + enddo |
409 | + |
410 | + |
411 | mtot = 0d0 |
412 | etot = 0d0 !Total energy needed |
413 | spmass = 0d0 !Keep track of BW masses for shat |
414 | @@ -423,7 +350,7 @@ |
415 | c Look for identical particles to map radiation processes |
416 | call idenparts(iden_part, iforest(1,-max_branch,iconfig), |
417 | $ sprop(1,-max_branch,iconfig), gForceBW(-max_branch,iconfig), |
418 | - $ prwidth(-nexternal,iconfig)) |
419 | + $ prwidth_tmp(-nexternal,iconfig)) |
420 | |
421 | c Start loop over propagators |
422 | do i=-1,-(nexternal-3),-1 |
423 | @@ -446,15 +373,15 @@ |
424 | xm(i)=max(xm(i),max(xqcutij(l1,l2),0d0)) |
425 | endif |
426 | c write(*,*) 'iconfig,i',iconfig,i |
427 | -c write(*,*) prwidth(i,iconfig),prmass(i,iconfig) |
428 | - if (prwidth(i,iconfig) .gt. 0 ) then |
429 | +c write(*,*) prwidth_tmp(i,iconfig),prmass(i,iconfig) |
430 | + if (prwidth_tmp(i,iconfig) .gt. 0 ) then |
431 | nbw=nbw+1 |
432 | c JA 6/8/2011 Set xe(i) for resonances |
433 | if (gforcebw(i,iconfig).eq.1) then |
434 | - xm(i) = max(xm(i), prmass(i,iconfig)-bwcutoff*prwidth(i,iconfig)) |
435 | + xm(i) = max(xm(i), prmass(i,iconfig)-bwcutoff*prwidth_tmp(i,iconfig)) |
436 | bwcut_for_PS(i) = bwcutoff |
437 | else if (lbw(nbw).eq.1) then |
438 | - xm(i) = max(xm(i), prmass(i,iconfig)-5d0*prwidth(i,iconfig)) |
439 | + xm(i) = max(xm(i), prmass(i,iconfig)-5d0*prwidth_tmp(i,iconfig)) |
440 | bwcut_for_PS(i) = 5d0 |
441 | else |
442 | bwcut_for_PS(i) = 5d0 |
443 | @@ -465,19 +392,19 @@ |
444 | c Either: required onshell and daughter masses too large |
445 | c Or: forced and daughter masses too large |
446 | c Or: required offshell and forced |
447 | - if(prwidth(i,iconfig) .gt. 0.and. |
448 | + if(prwidth_tmp(i,iconfig) .gt. 0.and. |
449 | $ (lbw(nbw).eq.1.and. |
450 | - $ (prmass(i,iconfig)+bwcut_for_PS(i)*prwidth(i,iconfig).lt.xm(i) |
451 | - $ .or.prmass(i,iconfig)-bwcut_for_PS(i)*prwidth(i,iconfig).gt.dsqrt(stot)) |
452 | + $ (prmass(i,iconfig)+bwcut_for_PS(i)*prwidth_tmp(i,iconfig).lt.xm(i) |
453 | + $ .or.prmass(i,iconfig)-bwcut_for_PS(i)*prwidth_tmp(i,iconfig).gt.dsqrt(stot)) |
454 | $ .or.gforcebw(i,iconfig).eq.1.and. |
455 | - $ prmass(i,iconfig)+bwcutoff*prwidth(i,iconfig).lt.xm(i) |
456 | + $ prmass(i,iconfig)+bwcutoff*prwidth_tmp(i,iconfig).lt.xm(i) |
457 | $ .or.lbw(nbw).eq.2.and.gforcebw(i,iconfig).eq.1)) |
458 | $ then |
459 | c Write results.dat and quit |
460 | call write_null_results() |
461 | stop |
462 | endif |
463 | - if (prwidth(i,iconfig) .gt. 0 .and. lbw(nbw) .le. 1) then !B.W. |
464 | + if (prwidth_tmp(i,iconfig) .gt. 0 .and. lbw(nbw) .le. 1) then !B.W. |
465 | if (i .eq. -(nexternal-(nincoming+1))) then !This is s-hat |
466 | j = 3*(nexternal-2)-4+1 !set i to ndim+1 |
467 | c----- |
468 | @@ -489,14 +416,14 @@ |
469 | $ .or. lbw(nbw).eq.1) then |
470 | write(*,*) 'Setting PDF BW',j,nbw,prmass(i,iconfig) |
471 | spole(j)=prmass(i,iconfig)*prmass(i,iconfig)/stot |
472 | - swidth(j) = prwidth(i,iconfig)*prmass(i,iconfig)/stot |
473 | + swidth(j) = prwidth(i,iconfig)*prmass(i,iconfig)/stot ! keep the real width here (important for the jacobian) |
474 | endif |
475 | - else if((prmass(i,iconfig)+bwcut_for_PS(i)*prwidth(i,iconfig)).ge.xm(i) |
476 | + else if((prmass(i,iconfig)+bwcut_for_PS(i)*prwidth_tmp(i,iconfig)).ge.xm(i) |
477 | $ .and. iden_part(i).eq.0 .or. lbw(nbw).eq.1) then |
478 | c JA 02/13 Only allow BW if xm below M+5*Gamma |
479 | write(*,*) 'Setting BW',i,nbw,prmass(i,iconfig) |
480 | spole(-i)=prmass(i,iconfig)*prmass(i,iconfig)/stot |
481 | - swidth(-i) = prwidth(i,iconfig)*prmass(i,iconfig)/stot |
482 | + swidth(-i) = prwidth(i,iconfig)*prmass(i,iconfig)/stot ! keep the real width here (important for the jacobian) |
483 | endif |
484 | c JA 4/1/2011 Set grid in case there is no BW (radiation process) |
485 | if (swidth(-i) .eq. 0d0 .and. |
486 | @@ -509,7 +436,7 @@ |
487 | c Set spmass for BWs |
488 | if (swidth(-i) .ne. 0d0) |
489 | $ spmass=spmass-xm(i) + |
490 | - $ max(xm(i),prmass(i,iconfig)-bwcut_for_PS(i)*prwidth(i,iconfig)) |
491 | + $ max(xm(i),prmass(i,iconfig)-bwcut_for_PS(i)*prwidth_tmp(i,iconfig)) |
492 | else !1/x^pow |
493 | a=prmass(i,iconfig)**2/stot |
494 | c JA 4/1/2011 always set grid |
495 | @@ -530,7 +457,7 @@ |
496 | endif |
497 | endif |
498 | if (xo.eq.0d0) xo=1d0/stot |
499 | -c if (prwidth(i, iconfig) .eq. 0d0.or.iden_part(i).gt.0) then |
500 | +c if (prwidth_tmp(i, iconfig) .eq. 0d0.or.iden_part(i).gt.0) then |
501 | call setgrid(-i,xo,a,1) |
502 | c else |
503 | c write(*,*) 'Using flat grid for BW',i,nbw, |
504 | @@ -610,7 +537,7 @@ |
505 | spole(i)= -2.0d0 ! 1/s pole |
506 | write(*,*) "Transforming s_hat 1/s ",i,xo, smin, stot |
507 | else |
508 | - write(*,*) "Transforming s_hat BW ",spole(i),swidth(i) |
509 | + write(*,*) "Transforming s_hat BW ",spole(i), max(swidth(i), spole(i)*small_width_treatment) |
510 | endif |
511 | endif |
512 | |
513 | |
514 | === modified file 'Template/LO/SubProcesses/reweight.f' |
515 | --- Template/LO/SubProcesses/reweight.f 2018-06-08 14:42:29 +0000 |
516 | +++ Template/LO/SubProcesses/reweight.f 2018-11-09 10:32:12 +0000 |
517 | @@ -6,6 +6,7 @@ |
518 | c ---- |
519 | c p p > t t~ (up to 2jet) |
520 | c p p > w+ (up to 3 jet) |
521 | +c p p > j j w+ (ordering seems important) |
522 | c p p > z t t~ j j (no MLM needed) |
523 | c |
524 | c |
525 | @@ -243,13 +244,15 @@ |
526 | integer iddgluon, iddother, idgluon, idother |
527 | logical isqcd |
528 | external isqcd |
529 | + integer get_color |
530 | + external get_color |
531 | |
532 | idmo=ipdg(imo) |
533 | idda1=ipdg(ida1) |
534 | idda2=ipdg(ida2) |
535 | |
536 | if (btest(mlevel,4)) then |
537 | - write(*,*) ' updating ipart for: ',ida1,ida2,' -> ',imo |
538 | + write(*,*) 'updating ipart for: ',ida1,ida2,' -> ',imo |
539 | endif |
540 | |
541 | if (btest(mlevel,4)) then |
542 | @@ -291,7 +294,6 @@ |
543 | $ ' (',ipdg(imo),')' |
544 | return |
545 | endif |
546 | - |
547 | c FS clustering |
548 | c Transmit parton PDG code for parton vertex |
549 | if(isjet(idmo)) then |
550 | @@ -370,14 +372,26 @@ |
551 | c quark -> gluon-quark or Z-quark or h-quark or W-quark |
552 | ipart(1,imo)=ipart(1,ida2) |
553 | ipart(2,imo)=0 |
554 | - else |
555 | + else if(iabs(get_color(idmo)).eq.3.and.iabs(get_color(idda1)).eq.3.and.get_color(idda2).eq.1) then |
556 | +c exotic q > q' Scalar |
557 | + ipart(1,imo)=ipart(1,ida1) |
558 | + ipart(2,imo)=0 |
559 | + else if(iabs(get_color(idmo)).eq.3.and.iabs(get_color(idda2)).eq.3.and.get_color(idda1).eq.1) then |
560 | +c exotic q > Scalar q' |
561 | + ipart(1,imo)=ipart(1,ida2) |
562 | + ipart(2,imo)=0 |
563 | + else if (get_color(idmo).eq.1) then |
564 | c Color singlet |
565 | ipart(1,imo)=ipart(1,ida1) |
566 | ipart(2,imo)=ipart(1,ida2) |
567 | + else |
568 | + write(*,*) idmo,'>', idda1, idda2, 'color', get_color(idmo),'>', get_color(idda1), get_color(idda2) |
569 | + write(*,*) "failed for ipartupdate. Please retry without MLM/default dynamical scale" |
570 | + stop 3 |
571 | endif |
572 | |
573 | if (btest(mlevel,4)) then |
574 | - write(*,*) ' -> ',(ipart(i,imo),i=1,2),' (',ipdg(imo),')' |
575 | + write(*,*) 'XY -> ',(ipart(i,imo),i=1,2),' (',ipdg(imo),')' |
576 | endif |
577 | |
578 | return |
579 | @@ -695,6 +709,7 @@ |
580 | c increasecode gives whether we should increase jcode at next vertex |
581 | increasecode=.false. |
582 | do n=1,nexternal-2 |
583 | +c write(*,*) 'QCD jet status (before n= ',n,'):',(iqjets(i),i=3,nexternal) |
584 | do i=1,2 ! index of the child in the interaction |
585 | do j=1,2 ! j index of the beam |
586 | if(idacl(n,i).eq.ibeam(j))then |
587 | @@ -769,7 +784,6 @@ |
588 | pdgm = ipdgcl(imocl(n),igraphs(1),iproc) |
589 | pdgid1 = ipdgcl(idacl(n,1),igraphs(1),iproc) |
590 | pdgid2 = ipdgcl(idacl(n,2),igraphs(1),iproc) |
591 | - |
592 | if (.not.isqcd(pdgm).and..not.isqcd(pdgid1).and..not.isqcd(pdgid2)) then |
593 | ! this is to avoid to do weird stuff for w+ w- z (or h h h) |
594 | ! this fix an issue for qq_zttxqq G1594.08 |
595 | @@ -914,8 +928,8 @@ |
596 | endif |
597 | enddo |
598 | njetstore(iconfig)=njets |
599 | - if (btest(mlevel,4)) |
600 | - $ write(*,*) 'Storing jets: ',(iqjetstore(i,iconfig),i=1,njets) |
601 | + if (btest(mlevel,4)) |
602 | + $ write(*,*) 'Storing jets: ',(iqjetstore(i,iconfig),i=1,njets) |
603 | c Recluster without requiring chcluster |
604 | goto 100 |
605 | else |
606 | |
607 | === modified file 'Template/NLO/MCatNLO/Makefile_MadFKS' |
608 | --- Template/NLO/MCatNLO/Makefile_MadFKS 2016-02-24 00:19:50 +0000 |
609 | +++ Template/NLO/MCatNLO/Makefile_MadFKS 2018-11-09 10:32:12 +0000 |
610 | @@ -1,7 +1,7 @@ |
611 | -include ../../Source/make_opts |
612 | |
613 | DEBUG= |
614 | -FF=$(FC) $(FFLAGS) $(DEBUG) |
615 | +FF=$(FC) $(FFLAGS) $(DEBUG) -std=legacy |
616 | CPP=$(CXX) $(CXXFLAGS) $(DEBUG) $(INCLOPTION) |
617 | CC=$(CXX) $(CFLAGS) $(DEBUG) $(INCLOPTION) |
618 | |
619 | |
620 | === modified file 'Template/NLO/SubProcesses/check_poles.f' |
621 | --- Template/NLO/SubProcesses/check_poles.f 2017-06-18 20:58:19 +0000 |
622 | +++ Template/NLO/SubProcesses/check_poles.f 2018-11-09 10:32:12 +0000 |
623 | @@ -19,7 +19,7 @@ |
624 | include 'genps.inc' |
625 | include 'nexternal.inc' |
626 | include 'nFKSconfigs.inc' |
627 | - double precision p(0:3, nexternal), prambo(0:3, nexternal) |
628 | + double precision p(0:3, nexternal), prambo(0:3,100) |
629 | double precision p_born(0:3,nexternal-1) |
630 | common/pborn/p_born |
631 | double precision pswgt |
632 | @@ -49,7 +49,7 @@ |
633 | include 'coupl.inc' |
634 | include 'q_es.inc' |
635 | integer nsqso |
636 | - double precision pmass(nexternal), pmass_rambo(nexternal) |
637 | + double precision pmass(nexternal), pmass_rambo(100) |
638 | integer nfail |
639 | logical first_time |
640 | data first_time/.TRUE./ |
641 | |
642 | === modified file 'Template/NLO/SubProcesses/combine_plots_FO.sh' |
643 | --- Template/NLO/SubProcesses/combine_plots_FO.sh 2013-05-25 12:52:41 +0000 |
644 | +++ Template/NLO/SubProcesses/combine_plots_FO.sh 2018-11-09 10:32:12 +0000 |
645 | @@ -1,6 +1,4 @@ |
646 | #!/bin/bash |
647 | -TD=td_mac_intel |
648 | -PSOPEN=open |
649 | |
650 | # $? is the value of last executed command. A call to this function |
651 | # after a failure will cause the program to quit the script |
652 | @@ -15,126 +13,74 @@ |
653 | fi |
654 | } |
655 | |
656 | -thisdir=`pwd` |
657 | -if [ -f $thisdir/MADatNLO.top ] |
658 | -then |
659 | -rm -f $thisdir/MADatNLO*.top |
660 | -fi |
661 | -make read40 |
662 | -EXENAME=$thisdir/read40 |
663 | +function combine { |
664 | +counter=0 |
665 | +i=1 |
666 | echo -n "" > dir |
667 | -counterp=0 |
668 | -for p in P* ; do |
669 | - cd $thisdir |
670 | - cd $p |
671 | - rm -f MADatNLO* |
672 | - rm -f *read40*.out |
673 | - echo -n "" > dir |
674 | - counter=0 |
675 | - i=1 |
676 | - for g in $* ; do |
677 | - if [ ! -f $g/MADatNLO*.top ] |
678 | - then |
679 | - echo "No topdrawer file in $p/$g" |
680 | - else |
681 | - counter=$(($counter + 1)) |
682 | - echo $g"/MADatNLO.top" >> dir |
683 | - if [[ $(($counter % 40)) == 0 ]]; then |
684 | - echo -n "" > dir2 |
685 | - echo "40" > dir2 |
686 | - cat dir >> dir2 |
687 | - $EXENAME < dir2 |
688 | - teststatus Failure in step 1 |
689 | - rm -f dir |
690 | - rm -f dir2 |
691 | - mv fort.88 MADatNLO$i\.top |
692 | - mv read40.out "S1read40_"$i\.out |
693 | - i=$(($i + 1)) |
694 | - echo -n "" > dir |
695 | - fi |
696 | - fi |
697 | - done |
698 | - if [[ $(($counter % 40)) != 0 ]] ; then |
699 | - echo $(($counter % 40)) > dir2 |
700 | +for plot_file in "${@:2}" ; do |
701 | + counter=$(($counter + 1)) |
702 | + echo $plot_file >> dir |
703 | + if [[ $(($counter % 40)) == 0 ]]; then |
704 | + echo -n "" > dir2 |
705 | + echo "40" > dir2 |
706 | cat dir >> dir2 |
707 | - while [[ $(($counter % 40)) -ne 0 ]]; do |
708 | - counter=$[$counter-1] |
709 | - done |
710 | - $EXENAME < dir2 |
711 | - teststatus Failure in step 2 |
712 | + ./read40 < dir2 |
713 | + teststatus Failure in step 1 |
714 | rm -f dir |
715 | rm -f dir2 |
716 | - mv fort.88 MADatNLO$i\.top |
717 | - mv read40.out "S2read40_"$i\.out |
718 | - fi |
719 | - |
720 | - counter=0 |
721 | - for m in MADatNLO*.top ; do |
722 | - counter=$[$counter+1] |
723 | - echo $m >> dir |
724 | - done |
725 | - if [[ $counter -gt 1 ]] ; then |
726 | - echo $counter > dir2 |
727 | - cat dir >> dir2 |
728 | - $EXENAME < dir2 |
729 | - teststatus Failure in step 3 |
730 | - rm -f dir2 |
731 | - mv fort.88 MADatNLO.top |
732 | - mv read40.out S3read40.out |
733 | - else |
734 | - mv MADatNLO1.top MADatNLO.top |
735 | - fi |
736 | - rm -f dir |
737 | - cd $thisdir |
738 | - counterp=$(($counterp + 1)) |
739 | - echo $p"/MADatNLO.top" >> dir |
740 | - echo $counterp $p "done" |
741 | -done |
742 | - |
743 | -cd $thisdir |
744 | -make split40 |
745 | -./split40 |
746 | - |
747 | -i=0 |
748 | -#pdir* are created by split |
749 | -for p in pdir* ; do |
750 | - i=$(($i+1)) |
751 | - $EXENAME < $p |
752 | - teststatus Failure in step 4 |
753 | - mv fort.88 MADatNLO$i\.top |
754 | - mv read40.out "S4read40_"$i\.out |
755 | - rm $p |
756 | - echo $i $p "done" |
757 | -done |
758 | - |
759 | -if [[ $i -gt 1 ]] ; then |
760 | - echo $i > dir2 |
761 | - for p in MADatNLO*.top ; do |
762 | - echo $p >>dir2 |
763 | - done |
764 | - $EXENAME < dir2 |
765 | - teststatus Failure in step 5 |
766 | + mv fort.88 $1_$i\.top |
767 | + mv read40.out "S1read40_"$1_$i\.out |
768 | + i=$(($i + 1)) |
769 | + echo -n "" > dir |
770 | + fi |
771 | +done |
772 | +if [[ $(($counter % 40)) != 0 ]] ; then |
773 | + echo $(($counter % 40)) > dir2 |
774 | + cat dir >> dir2 |
775 | + ./read40 < dir2 |
776 | + teststatus Failure in step 2 |
777 | rm -f dir |
778 | rm -f dir2 |
779 | - mv fort.88 MADatNLO.top |
780 | - mv read40.out S5read40.out |
781 | + mv fort.88 $1_$i\.top |
782 | + mv read40.out "S2read40_"$1_$i\.out |
783 | +fi |
784 | +} |
785 | + |
786 | +make read40 |
787 | +rm -f MADatNLO*.top |
788 | + |
789 | +if [ "$#" -gt 64000 ]; then |
790 | + combine "MADatNLO_A" "$@" |
791 | + combine "MADatNLO_B" MADatNLO_A*.top |
792 | + combine "MADatNLO_C" MADatNLO_B*.top |
793 | + combine "MADatNLO_D" MADatNLO_C*.top |
794 | + mv MADatNLO_D_1.top MADatNLO.top |
795 | +elif [ "$#" -gt 1600 ]; then |
796 | + combine "MADatNLO_A" "$@" |
797 | + combine "MADatNLO_B" MADatNLO_A*.top |
798 | + combine "MADatNLO_C" MADatNLO_B*.top |
799 | + mv MADatNLO_C_1.top MADatNLO.top |
800 | +elif [ "$#" -gt 40 ]; then |
801 | + combine "MADatNLO_A" "$@" |
802 | + combine "MADatNLO_B" MADatNLO_A*.top |
803 | + mv MADatNLO_B_1.top MADatNLO.top |
804 | +elif [ "$#" -gt 1 ]; then |
805 | + combine "MADatNLO_A" "$@" |
806 | + mv MADatNLO_A_1.top MADatNLO.top |
807 | else |
808 | - mv MADatNLO1.top MADatNLO.top |
809 | + cp $1 MADatNLO.top |
810 | fi |
811 | |
812 | -if [ -f $thisdir/read40.errors ] |
813 | + |
814 | +if [ -f read40.errors ] |
815 | then |
816 | -rm -f $thisdir/read40.errors |
817 | +rm -f read40.errors |
818 | fi |
819 | -find . -name S"*"read40"*".out -exec fgrep -il "READ40 ERROR READ40 ERROR" {} \; > $thisdir/read40.errors |
820 | - |
821 | -if [ ! -s $thisdir/read40.errors ] ; then |
822 | + |
823 | +find . -name S"*"read40"*".out -exec fgrep -il "READ40 ERROR READ40 ERROR" {} \; > read40.errors |
824 | + |
825 | +if [ ! -s read40.errors ] ; then |
826 | echo 'no errors found' |
827 | else |
828 | echo 'ERRORS! see read40.errors for details' |
829 | fi |
830 | - |
831 | -#./NLO_Born3.py |
832 | -#$TD MADatNLO_combined.top "POSTSCR,ORIENT=3" |
833 | -#$PSOPEN MADatNLO_combined.ps |
834 | -##td2pdf MADatNLO_con |
835 | |
836 | === modified file 'Template/NLO/SubProcesses/driver_mintFO.f' |
837 | --- Template/NLO/SubProcesses/driver_mintFO.f 2017-09-21 13:47:31 +0000 |
838 | +++ Template/NLO/SubProcesses/driver_mintFO.f 2018-11-09 10:32:12 +0000 |
839 | @@ -48,7 +48,7 @@ |
840 | include "mint.inc" |
841 | integer nhits_in_grids(maxchannels) |
842 | real* 8 xgrid(0:nintervals,ndimmax,maxchannels),ymax(nintervals |
843 | - $ ,ndimmax,maxchannels),ymax_virt(maxchannels),ans(nintegrals |
844 | + $ ,ndimmax,maxchannels),ymax_virt(0:maxchannels),ans(nintegrals |
845 | $ ,0:maxchannels),unc(nintegrals,0:maxchannels),chi2(nintegrals |
846 | $ ,0:maxchannels),x(ndimmax),itmax_fl |
847 | integer ixi_i,iphi_i,iy_ij,vn |
848 | |
849 | === modified file 'Template/NLO/SubProcesses/driver_mintMC.f' |
850 | --- Template/NLO/SubProcesses/driver_mintMC.f 2017-09-21 13:47:31 +0000 |
851 | +++ Template/NLO/SubProcesses/driver_mintMC.f 2018-11-09 10:32:12 +0000 |
852 | @@ -55,7 +55,7 @@ |
853 | common /event_normalisation/event_norm |
854 | c For MINT: |
855 | real* 8 xgrid(0:nintervals,ndimmax,maxchannels),ymax(nintervals |
856 | - $ ,ndimmax,maxchannels),ymax_virt(maxchannels),ans(nintegrals |
857 | + $ ,ndimmax,maxchannels),ymax_virt(0:maxchannels),ans(nintegrals |
858 | $ ,0:maxchannels),unc(nintegrals,0:maxchannels),chi2(nintegrals |
859 | $ ,0:maxchannels),x(ndimmax) |
860 | integer ixi_i,iphi_i,iy_ij,vn,nhits_in_grids(maxchannels) |
861 | |
862 | === modified file 'Template/NLO/SubProcesses/makefile' |
863 | --- Template/NLO/SubProcesses/makefile 2017-06-15 16:22:23 +0000 |
864 | +++ Template/NLO/SubProcesses/makefile 2018-11-09 10:32:12 +0000 |
865 | @@ -7,9 +7,6 @@ |
866 | # Files for the read40 combiner of top drawer files |
867 | READ40=read40.o |
868 | |
869 | -# Files for the split40 splitter of top drawer files |
870 | -SPLIT40=split40.o |
871 | - |
872 | # Files to collect all the events in the separate integration channels into a single file |
873 | COLLECT_EVENTS=collect_events.o handling_lhe_events.o fill_MC_mshell.o |
874 | |
875 | @@ -21,9 +18,6 @@ |
876 | read40: $(READ40) |
877 | $(FC) $(LDFLAGS) -o read40 $(READ40) |
878 | |
879 | -split40: $(SPLIT40) |
880 | - $(FC) $(LDFLAGS) -o split40 $(SPLIT40) |
881 | - |
882 | collect_events: $(COLLECT_EVENTS) $(LIBS) |
883 | $(FC) -o collect_events $(COLLECT_EVENTS) $(LINKLIBS) $(LDFLAGS) |
884 | rm handling_lhe_events.o |
885 | |
886 | === modified file 'Template/NLO/SubProcesses/mint-integrator2.f' |
887 | --- Template/NLO/SubProcesses/mint-integrator2.f 2017-05-09 14:07:18 +0000 |
888 | +++ Template/NLO/SubProcesses/mint-integrator2.f 2018-11-09 10:32:12 +0000 |
889 | @@ -77,7 +77,7 @@ |
890 | $ ,ans(nintegrals,0:maxchannels),unc(nintegrals,0:maxchannels) |
891 | $ ,ans3(nintegrals,3),unc3(nintegrals,3),ans_l3(nintegrals) |
892 | $ ,unc_l3(nintegrals),chi2_l3(nintegrals),vol_chan |
893 | - real * 8 xint_virt(maxchannels),ymax_virt(maxchannels) |
894 | + real * 8 xint_virt(maxchannels),ymax_virt(0:maxchannels) |
895 | $ ,ans_chan(0:maxchannels) |
896 | real * 8 x(ndimmax),vol |
897 | real * 8 xacc(0:nintervals,ndimmax,maxchannels) |
898 | @@ -985,8 +985,8 @@ |
899 | integer ndim,imode |
900 | include "mint.inc" |
901 | real * 8 fun,xgrid(0:nintervals,ndimmax,maxchannels) |
902 | - $ ,ymax(nintervals,ndimmax,maxchannels),ymax_virt(maxchannels) |
903 | - $ ,x(ndimmax) |
904 | + $ ,ymax(nintervals,ndimmax,maxchannels) |
905 | + $ ,ymax_virt(0:maxchannels),x(ndimmax) |
906 | real * 8 dx(ndimmax),xx(ndimmax),vol_chan,dummy |
907 | integer icell(ndimmax),ncell(ndimmax),ncell_virt |
908 | integer ifold(ndimmax),kfold(ndimmax) |
909 | |
910 | === modified file 'Template/NLO/SubProcesses/read40.for' |
911 | --- Template/NLO/SubProcesses/read40.for 2012-08-28 21:06:34 +0000 |
912 | +++ Template/NLO/SubProcesses/read40.for 2018-11-09 10:32:12 +0000 |
913 | @@ -5,7 +5,7 @@ |
914 | real * 8 xfacts(1:40),step(1:40) |
915 | real * 8 xv(1:40,1:1000),yv(1:40,1:1000),er(1:40,1:1000) |
916 | real * 8 xa(1:1000),ya(1:1000),ea(1:1000) |
917 | - character * 70 file,file1,filename(1:40) |
918 | + character * 700 file,file1,filename(1:40) |
919 | character * 70 line,vartype,vartype2 |
920 | character * 70 strscale,strlimx,strlimy,strtit |
921 | character * 11 chref1,chref7 |
922 | |
923 | === removed file 'Template/NLO/SubProcesses/split40.f' |
924 | --- Template/NLO/SubProcesses/split40.f 2012-08-28 21:06:34 +0000 |
925 | +++ Template/NLO/SubProcesses/split40.f 1970-01-01 00:00:00 +0000 |
926 | @@ -1,51 +0,0 @@ |
927 | - PROGRAM SPLIT |
928 | - IMPLICIT NONE |
929 | - character*80 buff |
930 | - integer number,i,j |
931 | - |
932 | - open (unit=1, file="dir", status="old") |
933 | - |
934 | - number=0 |
935 | - do |
936 | - read(1,*,end=99,err=99) buff |
937 | - number=number+1 |
938 | - enddo |
939 | - 99 continue |
940 | - rewind(1) |
941 | - i=1 |
942 | - do while (number.gt.40) |
943 | - open(unit=2,file='pdir'//char(48+i),status='unknown') |
944 | - write (2,'(i3)') 40 |
945 | - do j=1,40 |
946 | - read(1,'(a)',end=98,err=98) buff |
947 | - write (2,'(a)') buff |
948 | - enddo |
949 | -c do j=1,9 |
950 | -c write (2,'(i1)') 1 |
951 | -c enddo |
952 | - close(2) |
953 | - i=i+1 |
954 | - number=number-40 |
955 | - enddo |
956 | - if (number.gt.0) then |
957 | - open(unit=2,file='pdir'//char(48+i),status='unknown') |
958 | - if (number.gt.99) then |
959 | - write (2,'(i3)') number |
960 | - elseif(number.gt.9)then |
961 | - write (2,'(i2)') number |
962 | - else |
963 | - write (2,'(i1)') number |
964 | - endif |
965 | - do j=1,number |
966 | - read(1,'(a)',end=98,err=98) buff |
967 | - write (2,'(a)') buff |
968 | - enddo |
969 | -c do j=1,number |
970 | -c write (2,'(i1)') 1 |
971 | -c enddo |
972 | - close(2) |
973 | - endif |
974 | - |
975 | - |
976 | - 98 return |
977 | - end |
978 | |
979 | === modified file 'UpdateNotes.txt' |
980 | --- UpdateNotes.txt 2018-06-22 06:52:02 +0000 |
981 | +++ UpdateNotes.txt 2018-11-09 10:32:12 +0000 |
982 | @@ -1,5 +1,22 @@ |
983 | Update notes for MadGraph5_aMC@NLO (in reverse time order) |
984 | |
985 | +2.6.4 (//) |
986 | + OM: add specific treatement for small width (at LO only and not for loop-induced) |
987 | + if the width is smaller than 1e-6 times the mass, a fake width (at that value) is used for the |
988 | + numerical evaluation of the matrix-element. S-channel resonances are re-scaled according to |
989 | + narrow-width approximation to return the correct total cross-section (the distribution of events |
990 | + will on the other hand follow the new width). |
991 | + The parameter '1e-6' can be changed by adding to (LO) run_card the parameter: "small_width_treatment" |
992 | + OM: add a new command "install looptools" to trigger the question that is automatically trigger |
993 | + the first time a loop computation is needed. |
994 | + RF: Fixed a bug when using TopDrawer plots for f(N)LO runs, where the combination of the plots could lead |
995 | + to completely wrong histograms/distributions in case of high-precision runs. |
996 | + OM: Fix some MLM crash for some processes (in particular BSM processes with W'). |
997 | + OM: Fix a bug in the reweighting due to the new lhe format (the one avoiding some issue with py8) |
998 | + OM: Fix a behavior for negative mass, the width was set to negative in the param_card automatically |
999 | + making the Parton-shower (and other code) to crash since this does not follow the convention. |
1000 | + OM: Change compiler flag to support Mojave. |
1001 | + |
1002 | 2.6.3.2 (22/06/18) |
1003 | OM: Fix a bug in auto-width when mass are below QCD scale. |
1004 | OM: Fix a bug for g b initial state where the mass in the lhe file was not always correctly assigned |
1005 | |
1006 | === modified file 'VERSION' |
1007 | --- VERSION 2018-06-22 06:52:02 +0000 |
1008 | +++ VERSION 2018-11-09 10:32:12 +0000 |
1009 | @@ -1,5 +1,5 @@ |
1010 | -version = 2.6.3.2 |
1011 | -date = 2018-06-22 |
1012 | +version = 2.6.4 |
1013 | +date = 2018-11-30 |
1014 | |
1015 | |
1016 | |
1017 | |
1018 | === modified file 'aloha/aloha_writers.py' |
1019 | --- aloha/aloha_writers.py 2018-05-23 14:15:47 +0000 |
1020 | +++ aloha/aloha_writers.py 2018-11-09 10:32:12 +0000 |
1021 | @@ -523,7 +523,7 @@ |
1022 | if 'MP' in self.tag: |
1023 | out.write(' complex*32 CI\n') |
1024 | if KERNEL.has_pi: |
1025 | - out.write(' double*16 PI\n') |
1026 | + out.write(' REAL ( KIND = 16 ) PI\n') |
1027 | else: |
1028 | out.write(' complex*16 CI\n') |
1029 | if KERNEL.has_pi: |
1030 | @@ -673,6 +673,8 @@ |
1031 | self.has_model_parameter = True |
1032 | if name.lower() in ['pi', 'as', 'mu_r', 'aewm1','g']: |
1033 | return name |
1034 | + if name.startswith(aloha.aloha_prefix): |
1035 | + return name |
1036 | return '%s%s' % (aloha.aloha_prefix, name) |
1037 | |
1038 | if '_' in name: |
1039 | |
1040 | === modified file 'madgraph/core/base_objects.py' |
1041 | --- madgraph/core/base_objects.py 2018-04-23 20:23:22 +0000 |
1042 | +++ madgraph/core/base_objects.py 2018-11-09 10:32:12 +0000 |
1043 | @@ -1487,7 +1487,7 @@ |
1044 | def change_parameter_name_with_prefix(self, prefix='mdl_'): |
1045 | """ Change all model parameter by a given prefix. |
1046 | Modify the parameter if some of them are identical up to the case""" |
1047 | - |
1048 | + |
1049 | lower_dict={} |
1050 | duplicate = set() |
1051 | keys = self.get('parameters').keys() |
1052 | @@ -1568,7 +1568,13 @@ |
1053 | for key in self['couplings'].keys(): |
1054 | for coup in self['couplings'][key]: |
1055 | coup.expr = rep_pattern.sub(replace, coup.expr) |
1056 | - |
1057 | + |
1058 | + # change form-factor |
1059 | + ff = [l.formfactors for l in self['lorentz'] if hasattr(l, 'formfactors')] |
1060 | + ff = set(sum(ff,[])) # here we have the list of ff used in the model |
1061 | + for f in ff: |
1062 | + f.value = rep_pattern.sub(replace, f.value) |
1063 | + |
1064 | # change mass/width |
1065 | for part in self['particles']: |
1066 | if str(part.get('mass')) in one_change: |
1067 | |
1068 | === modified file 'madgraph/core/helas_objects.py' |
1069 | --- madgraph/core/helas_objects.py 2017-08-10 13:09:28 +0000 |
1070 | +++ madgraph/core/helas_objects.py 2018-11-09 10:32:12 +0000 |
1071 | @@ -4569,6 +4569,13 @@ |
1072 | return sum([d.get('wavefunctions') for d in \ |
1073 | self.get('diagrams')], []) |
1074 | |
1075 | + |
1076 | + def get_all_mass_widths(self): |
1077 | + """Gives a list of all widths used by this ME (from propagator)""" |
1078 | + |
1079 | + return set([(d.get('mass'),d.get('width')) for d in self.get_all_wavefunctions()]) |
1080 | + |
1081 | + |
1082 | def get_all_amplitudes(self): |
1083 | """Gives a list of all amplitudes for this ME""" |
1084 | |
1085 | |
1086 | === modified file 'madgraph/interface/amcatnlo_interface.py' |
1087 | --- madgraph/interface/amcatnlo_interface.py 2018-06-08 13:35:22 +0000 |
1088 | +++ madgraph/interface/amcatnlo_interface.py 2018-11-09 10:32:12 +0000 |
1089 | @@ -445,7 +445,11 @@ |
1090 | proc_type=self.extract_process_type(line) |
1091 | if proc_type[1] not in ['real', 'LOonly']: |
1092 | run_interface.check_compiler(self.options, block=False) |
1093 | + #validate_model will reset self._generate_info; to avoid |
1094 | + #this store it |
1095 | + geninfo = self._generate_info |
1096 | self.validate_model(proc_type[1], coupling_type=proc_type[2]) |
1097 | + self._generate_info = geninfo |
1098 | |
1099 | #now generate the amplitudes as usual |
1100 | #self.options['group_subprocesses'] = 'False' |
1101 | |
1102 | === modified file 'madgraph/interface/amcatnlo_run_interface.py' |
1103 | --- madgraph/interface/amcatnlo_run_interface.py 2018-06-14 15:24:33 +0000 |
1104 | +++ madgraph/interface/amcatnlo_run_interface.py 2018-11-09 10:32:12 +0000 |
1105 | @@ -1053,7 +1053,10 @@ |
1106 | |
1107 | if self.last_mode in ['LO', 'NLO']: |
1108 | self.switch['fixed_order'] = 'ON' |
1109 | - self.switch['fixed_order'] = 'OFF' |
1110 | + if self.proc_characteristics['ninitial'] == 1: |
1111 | + self.switch['fixed_order'] = 'ON' |
1112 | + else: |
1113 | + self.switch['fixed_order'] = 'OFF' |
1114 | |
1115 | def color_for_fixed_order(self, switch_value): |
1116 | |
1117 | @@ -1158,6 +1161,11 @@ |
1118 | if self.last_mode in ['LO', 'NLO', 'noshower', 'noshowerLO']: |
1119 | self.switch['shower'] = 'OFF' |
1120 | return |
1121 | + |
1122 | + if self.proc_characteristics['ninitial'] == 1: |
1123 | + self.switch['shower'] = 'OFF' |
1124 | + return |
1125 | + |
1126 | |
1127 | if os.path.exists(pjoin(self.me_dir, 'Cards', 'shower_card.dat')): |
1128 | self.switch['shower'] = self.run_card['parton_shower'] |
1129 | @@ -2603,7 +2611,13 @@ |
1130 | devnull = open(os.devnull, 'w') |
1131 | |
1132 | if self.analyse_card['fo_analysis_format'].lower() == 'topdrawer': |
1133 | - misc.call(['./combine_plots_FO.sh'] + folder_name, \ |
1134 | + topfiles = [] |
1135 | + for job in jobs: |
1136 | + if job['dirname'].endswith('.top'): |
1137 | + topfiles.append(job['dirname']) |
1138 | + else: |
1139 | + topfiles.append(pjoin(job['dirname'],'MADatNLO.top')) |
1140 | + misc.call(['./combine_plots_FO.sh'] + topfiles, \ |
1141 | stdout=devnull, |
1142 | cwd=pjoin(self.me_dir, 'SubProcesses')) |
1143 | files.cp(pjoin(self.me_dir, 'SubProcesses', 'MADatNLO.top'), |
1144 | |
1145 | === modified file 'madgraph/interface/common_run_interface.py' |
1146 | --- madgraph/interface/common_run_interface.py 2018-06-22 06:52:02 +0000 |
1147 | +++ madgraph/interface/common_run_interface.py 2018-11-09 10:32:12 +0000 |
1148 | @@ -963,13 +963,15 @@ |
1149 | else: |
1150 | return None |
1151 | |
1152 | - def ask_edit_cards(self, cards, mode='fixed', plot=True, first_cmd=None): |
1153 | + def ask_edit_cards(self, cards, mode='fixed', plot=True, first_cmd=None, from_banner=None, |
1154 | + banner=None): |
1155 | """ """ |
1156 | if not self.options['madanalysis_path']: |
1157 | plot = False |
1158 | |
1159 | self.ask_edit_card_static(cards, mode, plot, self.options['timeout'], |
1160 | - self.ask, first_cmd=first_cmd) |
1161 | + self.ask, first_cmd=first_cmd, from_banner=from_banner, |
1162 | + banner=banner) |
1163 | |
1164 | for c in cards: |
1165 | if not os.path.isabs(c): |
1166 | @@ -3240,7 +3242,19 @@ |
1167 | - Check that no width are too small (raise a warning if this is the case) |
1168 | 3) if dependent is on True check for dependent parameter (automatic for scan)""" |
1169 | |
1170 | - return self.static_check_param_card(path, self, run=run, dependent=dependent) |
1171 | + self.static_check_param_card(path, self, run=run, dependent=dependent) |
1172 | + |
1173 | + card = param_card_mod.ParamCard(path) |
1174 | + for param in card['decay']: |
1175 | + width = param.value |
1176 | + if width == 0: |
1177 | + continue |
1178 | + try: |
1179 | + mass = card['mass'].get(param.lhacode).value |
1180 | + except Exception: |
1181 | + continue |
1182 | + |
1183 | + |
1184 | |
1185 | @staticmethod |
1186 | def static_check_param_card(path, interface, run=True, dependent=False, |
1187 | @@ -4138,6 +4152,21 @@ |
1188 | return CommonRunCmd.install_lhapdf_pdfset_static(lhapdf_config, pdfsets_dir, |
1189 | filename.replace('.LHgrid',''), |
1190 | lhapdf_version, alternate_path) |
1191 | + elif lhapdf_version.startswith('6.'): |
1192 | + # try to do a simple wget |
1193 | + wwwpath = "http://www.hepforge.org/archive/lhapdf/pdfsets/%s/%s.tar.gz" |
1194 | + wwwpath %= ('.'.join(lhapdf_version.split('.')[:2]), filename) |
1195 | + misc.wget(wwwpath, pjoin(pdfsets_dir, '%s.tar.gz' %filename)) |
1196 | + misc.call(['tar', '-xzpvf', '%s.tar.gz' %filename], |
1197 | + cwd=pdfsets_dir) |
1198 | + if os.path.exists(pjoin(pdfsets_dir, filename)) or \ |
1199 | + os.path.isdir(pjoin(pdfsets_dir, filename)): |
1200 | + logger.info('%s successfully downloaded and stored in %s' \ |
1201 | + % (filename, pdfsets_dir)) |
1202 | + else: |
1203 | + raise MadGraph5Error, \ |
1204 | + 'Could not download %s into %s. Please try to install it manually.' \ |
1205 | + % (filename, pdfsets_dir) |
1206 | |
1207 | else: |
1208 | raise MadGraph5Error, \ |
1209 | @@ -4342,7 +4371,7 @@ |
1210 | |
1211 | |
1212 | |
1213 | - def __init__(self, question, cards=[], mode='auto', *args, **opt): |
1214 | + def __init__(self, question, cards=[], from_banner=None, banner=None, mode='auto', *args, **opt): |
1215 | |
1216 | |
1217 | self.load_default() |
1218 | @@ -4365,7 +4394,8 @@ |
1219 | self.all_vars = set() |
1220 | self.modified_card = set() #set of cards not in sync with filesystem |
1221 | # need to sync them before editing/leaving |
1222 | - |
1223 | + self.init_from_banner(from_banner, banner) |
1224 | + |
1225 | #update default path by custom one if specify in cards |
1226 | for card in cards: |
1227 | if os.path.exists(card) and os.path.sep in cards: |
1228 | @@ -4379,11 +4409,31 @@ |
1229 | new_conflict = self.all_vars.intersection(new_vars) |
1230 | self.conflict.union(new_conflict) |
1231 | self.all_vars.union(new_vars) |
1232 | + |
1233 | + |
1234 | + def init_from_banner(self, from_banner, banner): |
1235 | + """ defined card that need to be initialized from the banner file |
1236 | + from_banner should be a list of card to load from the banner object |
1237 | + """ |
1238 | + |
1239 | + if from_banner is None: |
1240 | + self.from_banner = {} |
1241 | + return |
1242 | + misc.sprint(from_banner) |
1243 | + self.from_banner = {} |
1244 | + for card in from_banner: |
1245 | + self.from_banner[card] = banner.charge_card(card) |
1246 | + return self.from_banner |
1247 | + |
1248 | |
1249 | def get_path(self, name, cards): |
1250 | """initialise the path if requested""" |
1251 | |
1252 | defname = '%s_default' % name |
1253 | + |
1254 | + if name in self.from_banner: |
1255 | + return self.from_banner[name] |
1256 | + |
1257 | if isinstance(cards, list): |
1258 | if name in cards: |
1259 | return True |
1260 | @@ -4417,7 +4467,13 @@ |
1261 | self.pname2block = {} |
1262 | self.restricted_value = {} |
1263 | self.param_card = {} |
1264 | - if not self.get_path('param', cards): |
1265 | + |
1266 | + is_valid_path = self.get_path('param', cards) |
1267 | + if not is_valid_path: |
1268 | + self.param_consistency = False |
1269 | + return [] |
1270 | + if isinstance(is_valid_path, param_card_mod.ParamCard): |
1271 | + self.param_card = is_valid_path |
1272 | self.param_consistency = False |
1273 | return [] |
1274 | |
1275 | @@ -4441,10 +4497,15 @@ |
1276 | return self.pname2block.keys() |
1277 | |
1278 | def init_run(self, cards): |
1279 | - |
1280 | + |
1281 | self.run_set = [] |
1282 | - if not self.get_path('run', cards): |
1283 | - return [] |
1284 | + is_valid_path = self.get_path('run', cards) |
1285 | + if not is_valid_path: |
1286 | + return [] |
1287 | + if isinstance(is_valid_path, banner_mod.RunCard): |
1288 | + self.run_card = is_valid_path |
1289 | + return [] |
1290 | + |
1291 | |
1292 | try: |
1293 | self.run_card = banner_mod.RunCard(self.paths['run'], consistency='warning') |
1294 | @@ -4455,6 +4516,7 @@ |
1295 | except IOError: |
1296 | run_card_def = {} |
1297 | |
1298 | + |
1299 | if run_card_def: |
1300 | if self.run_card: |
1301 | self.run_set = run_card_def.keys() + self.run_card.hidden_param |
1302 | @@ -5129,7 +5191,6 @@ |
1303 | logger.warning(str(e)) |
1304 | return |
1305 | |
1306 | - |
1307 | start = 0 |
1308 | if len(args) < 2: |
1309 | logger.warning('Invalid set command %s (need two arguments)' % line) |
1310 | @@ -5206,6 +5267,7 @@ |
1311 | |
1312 | if args[0] in ['run_card', 'param_card', 'MadWeight_card', 'shower_card', |
1313 | 'delphes_card','madanalysis5_hadron_card','madanalysis5_parton_card']: |
1314 | + |
1315 | if args[1] == 'default': |
1316 | logger.info('replace %s by the default card' % args[0],'$MG:BOLD') |
1317 | files.cp(self.paths['%s_default' %args[0][:-5]], self.paths[args[0][:-5]]) |
1318 | @@ -5262,7 +5324,10 @@ |
1319 | |
1320 | #### RUN CARD |
1321 | if args[start] in [l.lower() for l in self.run_card.keys()] and card in ['', 'run_card']: |
1322 | + |
1323 | if args[start] not in self.run_set: |
1324 | + if card in self.from_banner or 'run' in self.from_banner: |
1325 | + raise Exception, "change not allowed for this card: event already generated!" |
1326 | args[start] = [l for l in self.run_set if l.lower() == args[start]][0] |
1327 | |
1328 | if args[start] in self.conflict and card == '': |
1329 | @@ -5279,9 +5344,10 @@ |
1330 | logger.info('remove information %s from the run_card' % args[start],'$MG:BOLD') |
1331 | del self.run_card[args[start]] |
1332 | else: |
1333 | - if args[0].startswith('sys_') or \ |
1334 | - args[0] in self.run_card.list_parameter or \ |
1335 | - args[0] in self.run_card.dict_parameter: |
1336 | + lower_name = args[0].lower() |
1337 | + if lower_name.startswith('sys_') or \ |
1338 | + lower_name in self.run_card.list_parameter or \ |
1339 | + lower_name in self.run_card.dict_parameter: |
1340 | val = ' '.join(args[start+1:]) |
1341 | val = val.split('#')[0] |
1342 | else: |
1343 | @@ -5626,6 +5692,30 @@ |
1344 | self.run_card['mass_ion1'] != self.run_card['mass_ion2']): |
1345 | 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\"." |
1346 | |
1347 | + # check the status of small width status from LO |
1348 | + for param in self.param_card['decay']: |
1349 | + width = param.value |
1350 | + if width == 0 or isinstance(width,str): |
1351 | + continue |
1352 | + try: |
1353 | + mass = self.param_card['mass'].get(param.lhacode).value |
1354 | + except Exception: |
1355 | + continue |
1356 | + if isinstance(mass,str): |
1357 | + continue |
1358 | + |
1359 | + if mass: |
1360 | + if abs(width/mass) < self.run_card['small_width_treatment']: |
1361 | + logger.warning("Particle %s will use a fake width ( %s instead of %s ).\n" + |
1362 | + "Cross-section will be rescaled according to NWA if needed." + |
1363 | + "To force exact treatment reduce the value of 'small_width_treatment' parameter of the run_card", |
1364 | + param.lhacode[0], mass*self.run_card['small_width_treatment'], width) |
1365 | + elif abs(width/mass) < 1e-12: |
1366 | + 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) |
1367 | + if CommonRunCmd.sleep_for_error: |
1368 | + time.sleep(5) |
1369 | + CommonRunCmd.sleep_for_error = False |
1370 | + |
1371 | |
1372 | ######################################################################## |
1373 | # NLO specific check |
1374 | |
1375 | === modified file 'madgraph/interface/extended_cmd.py' |
1376 | --- madgraph/interface/extended_cmd.py 2018-05-16 08:43:26 +0000 |
1377 | +++ madgraph/interface/extended_cmd.py 2018-11-09 10:32:12 +0000 |
1378 | @@ -2618,6 +2618,13 @@ |
1379 | |
1380 | def postcmd(self, stop, line): |
1381 | |
1382 | + # for diamond class arch where both branch defines the postcmd |
1383 | + # set it up to be in coop mode |
1384 | + try: |
1385 | + out = super(ControlSwitch,self).postcmd(stop, line) |
1386 | + except AttributeError: |
1387 | + pass |
1388 | + |
1389 | line = line.strip() |
1390 | if ';' in line: |
1391 | line= [l for l in line.split(';') if l][-1] |
1392 | @@ -2676,6 +2683,7 @@ |
1393 | def check_consistency(self, key, value): |
1394 | """check the consistency of the new flag with the old ones""" |
1395 | |
1396 | + |
1397 | if key in self.last_changed: |
1398 | self.last_changed.remove(key) |
1399 | self.last_changed.append(key) |
1400 | |
1401 | === modified file 'madgraph/interface/loop_interface.py' |
1402 | --- madgraph/interface/loop_interface.py 2018-03-22 14:00:54 +0000 |
1403 | +++ madgraph/interface/loop_interface.py 2018-11-09 10:32:12 +0000 |
1404 | @@ -21,6 +21,7 @@ |
1405 | import time |
1406 | import logging |
1407 | import re |
1408 | +import sys |
1409 | |
1410 | import madgraph |
1411 | from madgraph import MG4DIR, MG5DIR, MadGraph5Error |
1412 | @@ -494,14 +495,19 @@ |
1413 | aloha.mp_precision = aloha_original_quad_mode |
1414 | |
1415 | |
1416 | - def install_reduction_library(self): |
1417 | + def install_reduction_library(self, force=False): |
1418 | """Code to install the reduction library if needed""" |
1419 | |
1420 | opt = self.options |
1421 | - |
1422 | + |
1423 | # Check if first time: |
1424 | - if (opt['ninja'] is None) or (os.path.isfile(pjoin(MG5DIR, opt['ninja'],'libninja.a'))): |
1425 | + if not force and ((opt['ninja'] is None) or (os.path.isfile(pjoin(MG5DIR, opt['ninja'],'libninja.a')))): |
1426 | return |
1427 | + |
1428 | + # do not trigger the question for tests |
1429 | + if 'test_manager.py' in sys.argv[0]: |
1430 | + from unittest.case import SkipTest |
1431 | + raise SkipTest |
1432 | |
1433 | logger.info("First output using loop matrix-elements has been detected. Now asking for loop reduction:", '$MG:BOLD') |
1434 | to_install = self.ask('install', '0', ask_class=AskLoopInstaller, timeout=300, |
1435 | @@ -950,9 +956,11 @@ |
1436 | if os.path.exists(pjoin(install_dir1, 'collier')): |
1437 | self.code['collier'] = pjoin(install_dir1, 'collier') |
1438 | if os.path.exists(pjoin(install_dir2, 'PJFry','bin','qd-config')): |
1439 | - self.code['collier'] = pjoin(install_dir2, 'PJFry') |
1440 | + self.code['pjfry'] = pjoin(install_dir2, 'PJFry') |
1441 | if os.path.exists(pjoin(install_dir2, 'golem95')): |
1442 | - self.code['collier'] = pjoin(install_dir2, 'golem95') |
1443 | + self.code['glem'] = pjoin(install_dir2, 'golem95') |
1444 | + if os.path.exists(pjoin(install_dir1, 'ninja')): |
1445 | + self.code['ninja'] = pjoin(install_dir2, 'ninja','lib') |
1446 | |
1447 | # 1. create the question |
1448 | question, allowed_answer = self.create_question(first=True) |
1449 | |
1450 | === modified file 'madgraph/interface/madevent_interface.py' |
1451 | --- madgraph/interface/madevent_interface.py 2018-06-08 13:35:22 +0000 |
1452 | +++ madgraph/interface/madevent_interface.py 2018-11-09 10:32:12 +0000 |
1453 | @@ -4142,9 +4142,14 @@ |
1454 | self.configure_directory(html_opening =False) |
1455 | self.check_pythia8(args) |
1456 | |
1457 | + # Update the banner with the pythia card |
1458 | + if not self.banner or len(self.banner) <=1: |
1459 | + # Here the level keyword 'pythia' must not be changed to 'pythia8'. |
1460 | + self.banner = banner_mod.recover_banner(self.results, 'pythia') |
1461 | + |
1462 | # the args are modify and the last arg is always the mode |
1463 | if not no_default: |
1464 | - self.ask_pythia_run_configuration(args[-1], pythia_version=8) |
1465 | + self.ask_pythia_run_configuration(args[-1], pythia_version=8, banner=self.banner) |
1466 | |
1467 | if self.options['automatic_html_opening']: |
1468 | misc.open_file(os.path.join(self.me_dir, 'crossx.html')) |
1469 | @@ -4157,10 +4162,7 @@ |
1470 | #"The normalisation of the hepmc output file will be wrong (i.e. non-standard).\n"+\ |
1471 | #"Please use 'event_norm = average' in the run_card to avoid this problem.") |
1472 | |
1473 | - # Update the banner with the pythia card |
1474 | - if not self.banner or len(self.banner) <=1: |
1475 | - # Here the level keyword 'pythia' must not be changed to 'pythia8'. |
1476 | - self.banner = banner_mod.recover_banner(self.results, 'pythia') |
1477 | + |
1478 | |
1479 | if not self.options['mg5amc_py8_interface_path'] or not \ |
1480 | os.path.exists(pjoin(self.options['mg5amc_py8_interface_path'], |
1481 | @@ -6126,7 +6128,7 @@ |
1482 | return switch |
1483 | |
1484 | ############################################################################ |
1485 | - def ask_pythia_run_configuration(self, mode=None, pythia_version=6): |
1486 | + def ask_pythia_run_configuration(self, mode=None, pythia_version=6, banner=None): |
1487 | """Ask the question when launching pythia""" |
1488 | |
1489 | pythia_suffix = '' if pythia_version==6 else '%d'%pythia_version |
1490 | @@ -6187,10 +6189,16 @@ |
1491 | if self.force: |
1492 | return mode |
1493 | |
1494 | + if not banner: |
1495 | + banner = self.banner |
1496 | + |
1497 | if auto: |
1498 | - self.ask_edit_cards(cards, mode='auto', plot=(pythia_version==6)) |
1499 | + self.ask_edit_cards(cards, from_banner=['param', 'run'], |
1500 | + mode='auto', plot=(pythia_version==6), banner=banner |
1501 | + ) |
1502 | else: |
1503 | - self.ask_edit_cards(cards, plot=(pythia_version==6)) |
1504 | + self.ask_edit_cards(cards, from_banner=['param', 'run'], |
1505 | + plot=(pythia_version==6), banner=banner) |
1506 | |
1507 | return mode |
1508 | |
1509 | |
1510 | === modified file 'madgraph/interface/madgraph_interface.py' |
1511 | --- madgraph/interface/madgraph_interface.py 2018-06-22 06:52:02 +0000 |
1512 | +++ madgraph/interface/madgraph_interface.py 2018-11-09 10:32:12 +0000 |
1513 | @@ -2782,7 +2782,8 @@ |
1514 | 'gauge','lorentz', 'brs', 'cms'] |
1515 | _import_formats = ['model_v4', 'model', 'proc_v4', 'command', 'banner'] |
1516 | _install_opts = ['Delphes', 'MadAnalysis4', 'ExRootAnalysis', |
1517 | - 'update', 'Golem95', 'PJFry', 'QCDLoop', 'maddm', 'maddump'] |
1518 | + 'update', 'Golem95', 'PJFry', 'QCDLoop', 'maddm', 'maddump', |
1519 | + 'looptools'] |
1520 | |
1521 | # The targets below are installed using the HEPToolsInstaller.py script |
1522 | _advanced_install_opts = ['pythia8','zlib','boost','lhapdf6','lhapdf5','collier', |
1523 | @@ -5840,7 +5841,7 @@ |
1524 | function will overwrite any existing installation of the tool without |
1525 | warnings. |
1526 | """ |
1527 | - |
1528 | + |
1529 | # Make sure to avoid any border effect on custom_additional_options |
1530 | add_options = list(additional_options) |
1531 | |
1532 | @@ -5857,6 +5858,10 @@ |
1533 | if args[0] == 'update': |
1534 | self.install_update(['update']+install_options['update_options'],wget=program) |
1535 | return |
1536 | + elif args[0] == 'looptools': |
1537 | + self.install_reduction_library(force=True) |
1538 | + return |
1539 | + |
1540 | |
1541 | plugin = self.install_plugin |
1542 | |
1543 | @@ -5903,12 +5908,20 @@ |
1544 | data = urllib.urlopen(cluster_path) |
1545 | except Exception: |
1546 | continue |
1547 | + if data.getcode() != 200: |
1548 | + continue |
1549 | + |
1550 | break |
1551 | + |
1552 | else: |
1553 | raise MadGraph5Error, '''Impossible to connect any of us servers. |
1554 | Please check your internet connection or retry later''' |
1555 | - for line in data: |
1556 | - split = line.split() |
1557 | + for wwwline in data: |
1558 | + split = wwwline.split() |
1559 | + if len(split)!=2: |
1560 | + if '--source' not in line: |
1561 | + source = {0:'uiuc',1:'ucl'}[index] |
1562 | + return self.do_install(line+' --source='+source, paths=paths, additional_options=additional_options) |
1563 | path[split[0]] = split[1] |
1564 | |
1565 | ################################################################################ |
1566 | @@ -7037,7 +7050,6 @@ |
1567 | param_card = check_param_card.ParamCard(out_path.getvalue().split('\n')) |
1568 | |
1569 | for (block, lhacode) in put_to_one: |
1570 | - misc.sprint(block, lhacode) |
1571 | try: |
1572 | param_card[block].get(lhacode).value = 1 |
1573 | except: |
1574 | |
1575 | === modified file 'madgraph/interface/reweight_interface.py' |
1576 | --- madgraph/interface/reweight_interface.py 2018-06-15 15:10:56 +0000 |
1577 | +++ madgraph/interface/reweight_interface.py 2018-11-09 10:32:12 +0000 |
1578 | @@ -233,8 +233,8 @@ |
1579 | |
1580 | if '=' in order: |
1581 | # get the type NLO QCD/QED/... |
1582 | - order = order.split('=',1)[1] |
1583 | - |
1584 | + order = order.split('=',1)[1].strip() |
1585 | + |
1586 | # define the list of particles that are needed for the radiation |
1587 | pert = fks_common.find_pert_particles_interactions(model, |
1588 | pert_order = order)['soft_particles'] |
1589 | @@ -746,7 +746,8 @@ |
1590 | # Find new tag in the banner and add information if needed |
1591 | if 'initrwgt' in self.banner and self.output_type == 'default': |
1592 | if 'name=\'mg_reweighting\'' in self.banner['initrwgt']: |
1593 | - blockpat = re.compile(r'''<weightgroup name=\'mg_reweighting\'\s*>(?P<text>.*?)</weightgroup>''', re.I+re.M+re.S) |
1594 | + blockpat = re.compile(r'''<weightgroup name=\'mg_reweighting\'\s*weight_name_strategy=\'includeIdInWeightName\'>(?P<text>.*?)</weightgroup>''', re.I+re.M+re.S) |
1595 | + misc.sprint(blockpat, self.banner['initrwgt']) |
1596 | before, content, after = blockpat.split(self.banner['initrwgt']) |
1597 | header_rwgt_other = before + after |
1598 | pattern = re.compile('<weight id=\'(?:rwgt_(?P<id>\d+)|(?P<id2>[_\w]+))(?P<rwgttype>\s*|_\w+)\'>(?P<info>.*?)</weight>', re.S+re.I+re.M) |
1599 | @@ -1787,7 +1788,7 @@ |
1600 | for i in range(len(pdg)): |
1601 | if pdg[i] == oldpdg[i]: |
1602 | continue |
1603 | - if not self.model or not getattr(self.model, 'get_mass'): |
1604 | + if not self.model or not hasattr(self.model, 'get_mass'): |
1605 | continue |
1606 | if self.model.get_mass(int(pdg[i])) == self.model.get_mass(int(oldpdg[i])): |
1607 | continue |
1608 | |
1609 | === modified file 'madgraph/iolibs/export_v4.py' |
1610 | --- madgraph/iolibs/export_v4.py 2018-06-07 13:31:42 +0000 |
1611 | +++ madgraph/iolibs/export_v4.py 2018-11-09 10:32:12 +0000 |
1612 | @@ -12,6 +12,7 @@ |
1613 | # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch |
1614 | # |
1615 | ################################################################################ |
1616 | +from madgraph.iolibs.helas_call_writers import HelasCallWriter |
1617 | """Methods and classes to export matrix elements to v4 format.""" |
1618 | |
1619 | import copy |
1620 | @@ -93,12 +94,28 @@ |
1621 | # - None, madgraph do nothing for initialisation |
1622 | exporter = 'v4' |
1623 | # language of the output 'v4' for Fortran output |
1624 | - # 'cpp' for C++ output |
1625 | + # 'cpp' for C++ output |
1626 | |
1627 | |
1628 | def __init__(self, dir_path = "", opt=None): |
1629 | - # cmd_options is a dictionary with all the optional argurment passed at output time |
1630 | - return |
1631 | + # cmd_options is a dictionary with all the optional argurment passed at output time |
1632 | + |
1633 | + # Activate some monkey patching for the helas call writer. |
1634 | + helas_call_writers.HelasCallWriter.customize_argument_for_all_other_helas_object = \ |
1635 | + self.helas_call_writer_custom |
1636 | + |
1637 | + |
1638 | + # helper function for customise helas writter |
1639 | + @staticmethod |
1640 | + def custom_helas_call(call, arg): |
1641 | + """static method to customise the way aloha function call are written |
1642 | + call is the default template for the call |
1643 | + arg are the dictionary used for the call |
1644 | + """ |
1645 | + return call, arg |
1646 | + |
1647 | + helas_call_writer_custom = lambda x,y,z: x.custom_helas_call(y,z) |
1648 | + |
1649 | |
1650 | def copy_template(self, model): |
1651 | return |
1652 | @@ -160,6 +177,9 @@ |
1653 | #place holder to pass information to the run_interface |
1654 | self.proc_characteristic = banner_mod.ProcCharacteristic() |
1655 | |
1656 | + # call mother class |
1657 | + super(ProcessExporterFortran,self).__init__(dir_path, opt) |
1658 | + |
1659 | |
1660 | #=========================================================================== |
1661 | # process exporter fortran switch between group and not grouped |
1662 | @@ -1834,13 +1854,25 @@ |
1663 | is_clang = misc.detect_if_cpp_compiler_is_clang(compiler) |
1664 | is_lc = misc.detect_cpp_std_lib_dependence(compiler) == '-lc++' |
1665 | |
1666 | + |
1667 | # list of the variable to set in the make_opts file |
1668 | for_update= {'DEFAULT_CPP_COMPILER':compiler, |
1669 | 'MACFLAG':'-mmacosx-version-min=10.7' if is_clang and is_lc else '', |
1670 | 'STDLIB': '-lc++' if is_lc else '-lstdc++', |
1671 | 'STDLIB_FLAG': '-stdlib=libc++' if is_lc and is_clang else '' |
1672 | } |
1673 | - |
1674 | + |
1675 | + # for MOJAVE remove the MACFLAG: |
1676 | + if is_clang: |
1677 | + import platform |
1678 | + version, _, _ = platform.mac_ver() |
1679 | + if not version:# not linux |
1680 | + version = 14 # set version to remove MACFLAG |
1681 | + else: |
1682 | + version = int(version.split('.')[1]) |
1683 | + if version >= 14: |
1684 | + for_update['MACFLAG'] = '-mmacosx-version-min=10.8' if is_lc else '' |
1685 | + |
1686 | if not root_dir: |
1687 | root_dir = self.dir_path |
1688 | make_opts = pjoin(root_dir, 'Source', 'make_opts') |
1689 | @@ -3411,6 +3443,7 @@ |
1690 | return s_and_t_channels |
1691 | |
1692 | |
1693 | + |
1694 | #=============================================================================== |
1695 | # ProcessExporterFortranME |
1696 | #=============================================================================== |
1697 | @@ -3419,7 +3452,16 @@ |
1698 | MadEvent format.""" |
1699 | |
1700 | matrix_file = "matrix_madevent_v4.inc" |
1701 | - |
1702 | + |
1703 | + # helper function for customise helas writter |
1704 | + @staticmethod |
1705 | + def custom_helas_call(call, arg): |
1706 | + if arg['mass'] == '%(M)s,%(W)s,': |
1707 | + arg['mass'] = '%(M)s, fk_%(W)s,' |
1708 | + elif '%(W)s' in arg['mass']: |
1709 | + raise Exception |
1710 | + return call, arg |
1711 | + |
1712 | def copy_template(self, model): |
1713 | """Additional actions needed for setup of Template |
1714 | """ |
1715 | @@ -3443,6 +3485,7 @@ |
1716 | |
1717 | |
1718 | |
1719 | + |
1720 | |
1721 | |
1722 | #=========================================================================== |
1723 | @@ -3933,10 +3976,29 @@ |
1724 | # Extract helas calls |
1725 | helas_calls = fortran_model.get_matrix_element_calls(\ |
1726 | matrix_element) |
1727 | + |
1728 | |
1729 | replace_dict['helas_calls'] = "\n".join(helas_calls) |
1730 | |
1731 | |
1732 | + #adding the support for the fake width (forbidding too small width) |
1733 | + mass_width = matrix_element.get_all_mass_widths() |
1734 | + width_list = set([e[1] for e in mass_width]) |
1735 | + |
1736 | + replace_dict['fake_width_declaration'] = \ |
1737 | + (' double precision fk_%s \n' * len(width_list)) % tuple(width_list) |
1738 | + replace_dict['fake_width_declaration'] += \ |
1739 | + (' save fk_%s \n' * len(width_list)) % tuple(width_list) |
1740 | + fk_w_defs = [] |
1741 | + one_def = ' fk_%(w)s = SIGN(MAX(ABS(%(w)s), ABS(%(m)s*small_width_treatment)), %(w)s)' |
1742 | + for m, w in mass_width: |
1743 | + if w == 'zero': |
1744 | + if ' fk_zero = 0d0' not in fk_w_defs: |
1745 | + fk_w_defs.append(' fk_zero = 0d0') |
1746 | + continue |
1747 | + fk_w_defs.append(one_def %{'m':m, 'w':w}) |
1748 | + replace_dict['fake_width_definitions'] = '\n'.join(fk_w_defs) |
1749 | + |
1750 | # Extract version number and date from VERSION file |
1751 | info_lines = self.get_mg5_info_lines() |
1752 | replace_dict['info_lines'] = info_lines |
1753 | |
1754 | === modified file 'madgraph/iolibs/helas_call_writers.py' |
1755 | --- madgraph/iolibs/helas_call_writers.py 2016-03-03 23:17:06 +0000 |
1756 | +++ madgraph/iolibs/helas_call_writers.py 2018-11-09 10:32:12 +0000 |
1757 | @@ -21,11 +21,13 @@ |
1758 | import aloha.aloha_writers as aloha_writers |
1759 | import aloha |
1760 | from madgraph import MadGraph5Error |
1761 | +import madgraph.various.misc as misc |
1762 | |
1763 | class HelasWriterError(Exception): |
1764 | """Class for the error of this module """ |
1765 | pass |
1766 | |
1767 | + |
1768 | #=============================================================================== |
1769 | # HelasCallWriter |
1770 | #=============================================================================== |
1771 | @@ -41,6 +43,19 @@ |
1772 | # Dictionaries from spin states to letters in Helas call |
1773 | mother_dict = {1: 'S', 2: 'O', -2: 'I', 3: 'V', 5: 'T', 4:'OR', -4:'IR', |
1774 | 99:'P'} |
1775 | + |
1776 | + @staticmethod |
1777 | + def customize_argument_for_all_other_helas_object(call, arg): |
1778 | + """ Place holder for PLUGIN/... |
1779 | + (used by madevent output for small width handling) |
1780 | + """ |
1781 | + return call, arg |
1782 | + |
1783 | + @staticmethod |
1784 | + def default_customize_argument_for_all_other_helas_object(call,arg): |
1785 | + return call,arg |
1786 | + #customize_argument_for_all_other_helas_object = fct_customize_argument_for_all_other_helas_object |
1787 | + #default_customize_argument_for_all_other_helas_object = fct_customize_argument_for_all_other_helas_object |
1788 | |
1789 | def default_setup(self): |
1790 | |
1791 | @@ -85,6 +100,11 @@ |
1792 | |
1793 | return ['model', 'wavefunctions', 'amplitudes'] |
1794 | |
1795 | + |
1796 | + |
1797 | + |
1798 | + |
1799 | + |
1800 | def get_loop_amp_helas_calls(self, matrix_element): |
1801 | """Return a list of strings, corresponding to the Helas calls |
1802 | for building loop amplitudes (AMPL) only.""" |
1803 | @@ -1197,6 +1217,7 @@ |
1804 | arg['second_line'] = ampl+"="+ampl+"*(%(uvct)s)" |
1805 | |
1806 | # ALL ARGUMENT FORMATTED ############################################### |
1807 | + call, arg = HelasCallWriter.customize_argument_for_all_other_helas_object(call, arg) |
1808 | # Store the result. |
1809 | call = call % arg |
1810 | # Now we have a line correctly formatted |
1811 | @@ -1209,6 +1230,8 @@ |
1812 | else: |
1813 | self.add_amplitude(argument.get_call_key(), call_function) |
1814 | |
1815 | + |
1816 | + |
1817 | def get_loop_amplitude_helas_calls(self, loop_matrix_element): |
1818 | """ Returns a list of strings corresponding to the Helas calls for each |
1819 | loop amplitude of this loop matrix element. This function is placed in |
1820 | |
1821 | === modified file 'madgraph/iolibs/template_files/matrix_loop_induced_madevent_group.inc' |
1822 | --- madgraph/iolibs/template_files/matrix_loop_induced_madevent_group.inc 2017-11-01 10:08:52 +0000 |
1823 | +++ madgraph/iolibs/template_files/matrix_loop_induced_madevent_group.inc 2018-11-09 10:32:12 +0000 |
1824 | @@ -39,6 +39,7 @@ |
1825 | C When set negative, the security above is removed |
1826 | DOUBLE PRECISION MULTICHANNEL_THRES |
1827 | PARAMETER (MULTICHANNEL_THRES=1.0d-5) |
1828 | + |
1829 | c |
1830 | c global (due to reading writting) |
1831 | c |
1832 | |
1833 | === modified file 'madgraph/iolibs/template_files/matrix_madevent_group_v4.inc' |
1834 | --- madgraph/iolibs/template_files/matrix_madevent_group_v4.inc 2017-11-01 10:08:52 +0000 |
1835 | +++ madgraph/iolibs/template_files/matrix_madevent_group_v4.inc 2018-11-09 10:32:12 +0000 |
1836 | @@ -68,6 +68,9 @@ |
1837 | |
1838 | REAL*8 POL(2) |
1839 | COMMON/TO_POLARIZATION/ POL |
1840 | + |
1841 | + double precision small_width_treatment |
1842 | + common/narrow_width/small_width_treatment |
1843 | |
1844 | INTEGER ISUM_HEL |
1845 | LOGICAL MULTI_CHANNEL |
1846 | @@ -87,6 +90,7 @@ |
1847 | C ---------- |
1848 | C BEGIN CODE |
1849 | C ---------- |
1850 | + |
1851 | NTRY(IMIRROR)=NTRY(IMIRROR)+1 |
1852 | THIS_NTRY(IMIRROR) = THIS_NTRY(IMIRROR)+1 |
1853 | DO I=1,NEXTERNAL |
1854 | @@ -255,6 +259,11 @@ |
1855 | C Needed for v4 models |
1856 | COMPLEX*16 DUM0,DUM1 |
1857 | DATA DUM0, DUM1/(0d0, 0d0), (1d0, 0d0)/ |
1858 | + |
1859 | + %(fake_width_declaration)s |
1860 | + logical first |
1861 | + data first /.true./ |
1862 | + save first |
1863 | C |
1864 | C FUNCTION |
1865 | C |
1866 | @@ -265,6 +274,9 @@ |
1867 | Double Precision amp2(maxamps), jamp2(0:maxflow) |
1868 | common/to_amps/ amp2, jamp2 |
1869 | include 'coupl.inc' |
1870 | + |
1871 | + double precision small_width_treatment |
1872 | + common/narrow_width/small_width_treatment |
1873 | C |
1874 | C COLOR DATA |
1875 | C |
1876 | @@ -272,6 +284,12 @@ |
1877 | C ---------- |
1878 | C BEGIN CODE |
1879 | C ---------- |
1880 | +if (first) then |
1881 | + first=.false. |
1882 | + %(fake_width_definitions)s |
1883 | +endif |
1884 | + |
1885 | + |
1886 | %(helas_calls)s |
1887 | %(jamp_lines)s |
1888 | |
1889 | |
1890 | === modified file 'madgraph/iolibs/template_files/matrix_madevent_v4.inc' |
1891 | --- madgraph/iolibs/template_files/matrix_madevent_v4.inc 2017-11-01 10:08:52 +0000 |
1892 | +++ madgraph/iolibs/template_files/matrix_madevent_v4.inc 2018-11-09 10:32:12 +0000 |
1893 | @@ -49,6 +49,7 @@ |
1894 | INTEGER IDUM, NGOOD, IGOOD(NCOMB), JHEL, J, JJ |
1895 | REAL XRAN1 |
1896 | EXTERNAL XRAN1 |
1897 | + |
1898 | C |
1899 | C GLOBAL VARIABLES |
1900 | C |
1901 | @@ -58,7 +59,7 @@ |
1902 | CHARACTER*101 HEL_BUFF |
1903 | COMMON/TO_HELICITY/ HEL_BUFF |
1904 | |
1905 | - REAL*8 POL(2) |
1906 | + REAL*8 POL(2) |
1907 | COMMON/TO_POLARIZATION/ POL |
1908 | |
1909 | INTEGER ISUM_HEL |
1910 | @@ -68,6 +69,7 @@ |
1911 | DATA IDUM /-1/ |
1912 | DATA XTRY, XREJ, NGOOD /0,0,0/ |
1913 | SAVE YFRAC, IGOOD, JHEL |
1914 | + |
1915 | %(helicity_lines)s |
1916 | %(den_factor_line)s |
1917 | C ---------- |
1918 | @@ -235,6 +237,11 @@ |
1919 | C Needed for v4 models |
1920 | COMPLEX*16 DUM0,DUM1 |
1921 | DATA DUM0, DUM1/(0d0, 0d0), (1d0, 0d0)/ |
1922 | + |
1923 | + %(fake_width_declaration)s |
1924 | + logical first |
1925 | + data first /.true./ |
1926 | + save first |
1927 | C |
1928 | C FUNCTION |
1929 | C |
1930 | @@ -245,6 +252,9 @@ |
1931 | Double Precision amp2(maxamps), jamp2(0:maxflow) |
1932 | common/to_amps/ amp2, jamp2 |
1933 | include 'coupl.inc' |
1934 | + |
1935 | + double precision small_width_treatment |
1936 | + common/narrow_width/small_width_treatment |
1937 | C |
1938 | C COLOR DATA |
1939 | C |
1940 | @@ -252,6 +262,11 @@ |
1941 | C ---------- |
1942 | C BEGIN CODE |
1943 | C ---------- |
1944 | +if (first) then |
1945 | + first=.false. |
1946 | + %(fake_width_definitions)s |
1947 | +endif |
1948 | + |
1949 | %(helas_calls)s |
1950 | %(jamp_lines)s |
1951 | |
1952 | |
1953 | === modified file 'madgraph/iolibs/template_files/matrix_madweight_group_v4.inc' |
1954 | --- madgraph/iolibs/template_files/matrix_madweight_group_v4.inc 2012-02-29 12:53:46 +0000 |
1955 | +++ madgraph/iolibs/template_files/matrix_madweight_group_v4.inc 2018-11-09 10:32:12 +0000 |
1956 | @@ -22,6 +22,7 @@ |
1957 | C ARGUMENTS |
1958 | C |
1959 | REAL*8 P(0:3,NEXTERNAL),ANS |
1960 | + |
1961 | C |
1962 | C LOCAL VARIABLES |
1963 | C |
1964 | |
1965 | === modified file 'madgraph/madevent/sum_html.py' |
1966 | --- madgraph/madevent/sum_html.py 2018-05-25 09:13:24 +0000 |
1967 | +++ madgraph/madevent/sum_html.py 2018-11-09 10:32:12 +0000 |
1968 | @@ -699,7 +699,7 @@ |
1969 | P_comb = Combine_results(Pdir) |
1970 | |
1971 | if jobs: |
1972 | - for job in filter(lambda j: j['p_dir'] == Pdir, jobs): |
1973 | + for job in filter(lambda j: j['p_dir'] in Pdir, jobs): |
1974 | P_comb.add_results(os.path.basename(job['dirname']),\ |
1975 | pjoin(job['dirname'],'results.dat')) |
1976 | elif folder_names: |
1977 | |
1978 | === modified file 'madgraph/various/banner.py' |
1979 | --- madgraph/various/banner.py 2018-05-17 13:55:48 +0000 |
1980 | +++ madgraph/various/banner.py 2018-11-09 10:32:12 +0000 |
1981 | @@ -483,9 +483,9 @@ |
1982 | def charge_card(self, tag): |
1983 | """Build the python object associated to the card""" |
1984 | |
1985 | - if tag == 'param_card': |
1986 | + if tag in ['param_card', 'param']: |
1987 | tag = 'slha' |
1988 | - elif tag == 'run_card': |
1989 | + elif tag in ['run_card', 'run']: |
1990 | tag = 'mgruncard' |
1991 | elif tag == 'proc_card': |
1992 | tag = 'mg5proccard' |
1993 | @@ -905,7 +905,10 @@ |
1994 | out = [] |
1995 | for line in self: |
1996 | if line.startswith('define'): |
1997 | - name, content = line[7:].split('=',1) |
1998 | + try: |
1999 | + name, content = line[7:].split('=',1) |
2000 | + except ValueError: |
2001 | + name, content = line[7:].split(None,1) |
2002 | out.append((name, content)) |
2003 | return out |
2004 | else: |
2005 | @@ -2372,9 +2375,9 @@ |
2006 | else: |
2007 | this_group = this_group[0] |
2008 | if block_name in write_block: |
2009 | - text += this_group.on_template % self |
2010 | + text += this_group.template_on % self |
2011 | for name in this_group.fields: |
2012 | - written.add(f) |
2013 | + written.add(name) |
2014 | if name in to_write: |
2015 | to_write.remove(name) |
2016 | else: |
2017 | @@ -2949,6 +2952,7 @@ |
2018 | 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.") |
2019 | 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") |
2020 | 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)") |
2021 | + 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") |
2022 | |
2023 | # parameter allowing to define simple cut via the pdg |
2024 | # Special syntax are related to those. (can not be edit directly) |
2025 | @@ -2970,7 +2974,7 @@ |
2026 | self.add_param('etamax4pdg',[-1.], system=True) |
2027 | self.add_param('mxxmin4pdg',[-1.], system=True) |
2028 | self.add_param('mxxpart_antipart', [False], system=True) |
2029 | - |
2030 | + |
2031 | |
2032 | def check_validity(self): |
2033 | """ """ |
2034 | |
2035 | === modified file 'madgraph/various/lhe_parser.py' |
2036 | --- madgraph/various/lhe_parser.py 2018-06-21 08:57:21 +0000 |
2037 | +++ madgraph/various/lhe_parser.py 2018-11-09 10:32:12 +0000 |
2038 | @@ -167,6 +167,7 @@ |
2039 | """associate to this particle the decay in the associate event""" |
2040 | |
2041 | return self.event.add_decay_to_particle(self.event_id, decay_event) |
2042 | + |
2043 | |
2044 | def __repr__(self): |
2045 | return 'Particle("%s", event=%s)' % (str(self), self.event) |
2046 | @@ -1263,26 +1264,28 @@ |
2047 | |
2048 | if 'part' == status: |
2049 | part = Particle(line, event=self) |
2050 | - if part.E != 0: |
2051 | + if part.E != 0 or part.status==-1: |
2052 | self.append(part) |
2053 | elif self.nexternal: |
2054 | - self.nexternal-=1 |
2055 | + self.nexternal-=1 |
2056 | else: |
2057 | if '</event>' in line: |
2058 | line = line.replace('</event>','',1) |
2059 | self.tag += '%s\n' % line |
2060 | |
2061 | self.assign_mother() |
2062 | - |
2063 | + |
2064 | + |
2065 | def assign_mother(self): |
2066 | """convert the number in actual particle""" |
2067 | - #Security if not incoming particle. Define a fake particle and set all particle as |
2068 | - # decaying from that fake particle |
2069 | + #Security if not incoming particle. Define a fake particle |
2070 | if all(p.status != -1 for p in self): |
2071 | + if not self.nexternal: |
2072 | + return |
2073 | if self.warning_order: |
2074 | Event.warning_order = False |
2075 | logger.warning("Weird format for lhe format: no incoming particle... adding a fake one") |
2076 | - |
2077 | + raise Exception |
2078 | mother = Particle(event=self) |
2079 | mother.status = -1 |
2080 | mother.pid = 0 |
2081 | @@ -1291,8 +1294,10 @@ |
2082 | mother.event_id = 0 |
2083 | self.nexternal += 1 |
2084 | for p in self[1:]: |
2085 | - p.mother1 = 1 |
2086 | - p.mother2 = 1 |
2087 | + if isinstance(p.mother1, int) and p.mother1 > 1: |
2088 | + p.mother1 += 1 |
2089 | + if isinstance(p.mother2, int) and p.mother2 > 1: |
2090 | + p.mother2 += 1 |
2091 | p.event_id += 1 |
2092 | |
2093 | |
2094 | |
2095 | === modified file 'madgraph/various/systematics.py' |
2096 | --- madgraph/various/systematics.py 2018-03-25 08:30:56 +0000 |
2097 | +++ madgraph/various/systematics.py 2018-11-09 10:32:12 +0000 |
2098 | @@ -885,6 +885,7 @@ |
2099 | for onewgt in cevent.wgts: |
2100 | if not __debug__ and (dyn== -1 and Dmur==1 and Dmuf==1 and pdf==self.orig_pdf): |
2101 | wgt += onewgt.ref_wgt |
2102 | + continue |
2103 | |
2104 | if dyn == -1: |
2105 | mur2 = onewgt.scales2[1] |
2106 | |
2107 | === modified file 'models/check_param_card.py' |
2108 | --- models/check_param_card.py 2018-04-26 14:24:04 +0000 |
2109 | +++ models/check_param_card.py 2018-11-09 10:32:12 +0000 |
2110 | @@ -178,7 +178,7 @@ |
2111 | |
2112 | def rename_keys(self, change_keys): |
2113 | |
2114 | - misc.sprint(self.param_dict, change_keys, [p.lhacode for p in self]) |
2115 | + |
2116 | for old_key, new_key in change_keys.items(): |
2117 | |
2118 | assert old_key in self.param_dict |
2119 | @@ -509,15 +509,15 @@ |
2120 | if model_value.imag > 1e-5 * model_value.real: |
2121 | raise Exception, "Width should be real number: particle %s (%s) has mass: %s" |
2122 | model_value = model_value.real |
2123 | - if not misc.equal(model_value, param_value, 4): |
2124 | + if not misc.equal(abs(model_value), param_value, 4): |
2125 | modify = True |
2126 | if loglevel == 20: |
2127 | logger.info('For consistency, the width of particle %s (%s) is changed to %s.' % (lhacode, particle.get('name'), model_value), '$MG:BOLD') |
2128 | else: |
2129 | logger.log(loglevel,'For consistency, the width of particle %s (%s) is changed to %s.' % (lhacode, particle.get('name'), model_value)) |
2130 | #logger.debug('was %s', param_value) |
2131 | - if model_value != param_value: |
2132 | - self.get('decay').get(abs(particle.get_pdg_code())).value = model_value |
2133 | + if abs(model_value) != param_value: |
2134 | + self.get('decay').get(abs(particle.get_pdg_code())).value = abs(model_value) |
2135 | |
2136 | return modify |
2137 | |
2138 | @@ -640,6 +640,11 @@ |
2139 | logger.warning('information about \"%s %s" is missing (full block missing) using default value: %s.' %\ |
2140 | (block, lhaid, value)) |
2141 | value = str(value).lower() |
2142 | + #special handling for negative mass -> set width negative |
2143 | + if block == 'decay': |
2144 | + if self['mass'].get(tuple(lhaid)).value < 0: |
2145 | + value = '-%s' % value |
2146 | + |
2147 | fout.writelines(' %s = %s' % (variable, ('%e'%float(value)).replace('e','d'))) |
2148 | if need_mp: |
2149 | fout.writelines(' mp__%s = %s_16' % (variable, value)) |
2150 | @@ -1036,7 +1041,6 @@ |
2151 | data.append(info[k]) |
2152 | else: |
2153 | data.append(0.) |
2154 | - misc.sprint(name, bench, data) |
2155 | ff.write(formatting % tuple([name] + bench + data)) |
2156 | |
2157 | if not path: |
2158 | |
2159 | === modified file 'models/import_ufo.py' |
2160 | --- models/import_ufo.py 2018-06-15 13:28:53 +0000 |
2161 | +++ models/import_ufo.py 2018-11-09 10:32:12 +0000 |
2162 | @@ -112,6 +112,8 @@ |
2163 | data = urllib.urlopen(cluster_path) |
2164 | except Exception: |
2165 | continue |
2166 | + if data.getcode() != 200: |
2167 | + continue |
2168 | break |
2169 | else: |
2170 | raise MadGraph5Error, '''Model not found locally and Impossible to connect any of us servers. |
2171 | @@ -138,7 +140,8 @@ |
2172 | target = None |
2173 | if 'PYTHONPATH' in os.environ and not local_dir: |
2174 | for directory in os.environ['PYTHONPATH'].split(':'): |
2175 | - if 'UFO' in os.path.basename(directory) and os.path.exists(directory): |
2176 | + if 'UFO' in os.path.basename(directory) and os.path.exists(directory) and\ |
2177 | + misc.glob('*/couplings.py', path=directory): |
2178 | target= directory |
2179 | if target is None: |
2180 | target = pjoin(MG5DIR, 'models') |
2181 | @@ -646,14 +649,15 @@ |
2182 | continue |
2183 | names = [interaction['lorentz'][i] for i in to_lor[key]] |
2184 | names.sort() |
2185 | - |
2186 | + if self.lorentz_info[names[0]].get('structure') == 'external': |
2187 | + continue |
2188 | # get name of the new lorentz |
2189 | if tuple(names) in self.lorentz_combine: |
2190 | # already created new loretnz |
2191 | new_name = self.lorentz_combine[tuple(names)] |
2192 | else: |
2193 | new_name = self.add_merge_lorentz(names) |
2194 | - |
2195 | + |
2196 | # remove the old couplings |
2197 | color, coup = key |
2198 | to_remove = [(color, lor) for lor in to_lor[key]] |
2199 | @@ -696,7 +700,12 @@ |
2200 | # load the associate lorentz expression |
2201 | new_struct = ' + '.join([self.lorentz_info[n].get('structure') for n in names]) |
2202 | spins = self.lorentz_info[names[0]].get('spins') |
2203 | - new_lor = self.add_lorentz(new_name, spins, new_struct) |
2204 | + formfactors = sum([ self.lorentz_info[n].get('formfactors') for n in names \ |
2205 | + if hasattr(self.lorentz_info[n], 'formfactors') \ |
2206 | + and self.lorentz_info[n].get('formfactors') \ |
2207 | + ],[]) |
2208 | + |
2209 | + new_lor = self.add_lorentz(new_name, spins, new_struct, formfactors) |
2210 | self.lorentz_info[new_name] = new_lor |
2211 | |
2212 | return new_name |
2213 | @@ -1368,15 +1377,19 @@ |
2214 | |
2215 | return '' if sign ==1 else '-' |
2216 | |
2217 | - def add_lorentz(self, name, spins , expr): |
2218 | + def add_lorentz(self, name, spins , expr, formfact=None): |
2219 | """ Add a Lorentz expression which is not present in the UFO """ |
2220 | |
2221 | + logger.debug('MG5 converter defines %s to %s', name, expr) |
2222 | assert name not in [l.name for l in self.model['lorentz']] |
2223 | with misc.TMP_variable(self.ufomodel.object_library, 'all_lorentz', |
2224 | self.model['lorentz']): |
2225 | new = self.model['lorentz'][0].__class__(name = name, |
2226 | spins = spins, |
2227 | structure = expr) |
2228 | + if formfact: |
2229 | + new.formfactors = formfact |
2230 | + |
2231 | assert name in [l.name for l in self.model['lorentz']] |
2232 | assert name not in [l.name for l in self.ufomodel.all_lorentz] |
2233 | #self.model['lorentz'].append(new) # already done by above command |
2234 | @@ -1973,7 +1986,7 @@ |
2235 | null_parameters.append(name) |
2236 | elif value == 1: |
2237 | one_parameters.append(name) |
2238 | - |
2239 | + |
2240 | return null_parameters, one_parameters |
2241 | |
2242 | def apply_conditional_simplifications(self, modified_params, |
2243 | @@ -2301,7 +2314,9 @@ |
2244 | particle['width'] = 'ZERO' |
2245 | if particle['width'] in one_parameters: |
2246 | one_parameters.remove(particle['width']) |
2247 | - |
2248 | + if particle['mass'] in one_parameters: |
2249 | + one_parameters.remove(particle['mass']) |
2250 | + |
2251 | for pdg, particle in self['particle_dict'].items(): |
2252 | if particle['mass'] in zero_parameters: |
2253 | particle['mass'] = 'ZERO' |
2254 | @@ -2340,6 +2355,13 @@ |
2255 | for coupling in coupling_list: |
2256 | for use in re_pat.findall(coupling.expr): |
2257 | used.add(use) |
2258 | + |
2259 | + # check in form-factor |
2260 | + for lor in self['lorentz']: |
2261 | + if hasattr(lor, 'formfactors') and lor.formfactors: |
2262 | + for ff in lor.formfactors: |
2263 | + for use in re_pat.findall(ff.value): |
2264 | + used.add(use) |
2265 | else: |
2266 | used = set([i for i in special_parameters if i]) |
2267 | |
2268 | @@ -2484,16 +2506,26 @@ |
2269 | if any( n.startswith('d') for n in names ): |
2270 | new_struct += '-' + ' - '.join(['1.*(%s)' %self.lorentz_info[n[1:]].get('structure') for n in names if n.startswith('d')]) |
2271 | spins = self.lorentz_info[names[0][1:]].get('spins') |
2272 | - new_lor = self.add_lorentz(new_name, spins, new_struct) |
2273 | + formfact = sum([ self.lorentz_info[n[1:]].get('formfactors') for n in names \ |
2274 | + if hasattr(self.lorentz_info[n[1:]], 'formfactors') \ |
2275 | + and self.lorentz_info[n[1:]].get('formfactors') \ |
2276 | + ],[]) |
2277 | + |
2278 | + |
2279 | + |
2280 | + |
2281 | + new_lor = self.add_lorentz(new_name, spins, new_struct, formfact) |
2282 | self.lorentz_info[new_name] = new_lor |
2283 | |
2284 | return new_name |
2285 | |
2286 | - def add_lorentz(self, name, spin, struct): |
2287 | + def add_lorentz(self, name, spin, struct, formfact=None): |
2288 | """adding lorentz structure to the current model""" |
2289 | new = self['lorentz'][0].__class__(name = name, |
2290 | spins = spin, |
2291 | structure = struct) |
2292 | + if formfact: |
2293 | + new.formfactors = formfact |
2294 | self['lorentz'].append(new) |
2295 | self.create_lorentz_dict() |
2296 | |
2297 | |
2298 | === modified file 'tests/IOTests.py' |
2299 | --- tests/IOTests.py 2016-09-07 13:39:06 +0000 |
2300 | +++ tests/IOTests.py 2018-11-09 10:32:12 +0000 |
2301 | @@ -296,20 +296,26 @@ |
2302 | """Clean up the file created. Called at the end of the test run.""" |
2303 | |
2304 | pathsToClean = [self.temporary_folder] |
2305 | - |
2306 | + |
2307 | if not self.clean_function is None: |
2308 | paths, prevent_cleanUp = self.clean_function(*args, **kwargs) |
2309 | - pathsToClean.extend(paths) |
2310 | + if isinstance(paths, str): |
2311 | + pathsToClean.append(paths) |
2312 | + else: |
2313 | + pathsToClean.extend(paths) |
2314 | if prevent_cleanUp: |
2315 | print colored%(31, |
2316 | "Clean up of the following of temporary folders prevented:") |
2317 | for path in pathsToClean: |
2318 | print colored%(31," > %s"%str(path)) |
2319 | - |
2320 | + |
2321 | try: |
2322 | for path in pathsToClean: |
2323 | - shutil.rmtree(path) |
2324 | - except OSError: |
2325 | + if os.path.isdir(path): |
2326 | + shutil.rmtree(path) |
2327 | + else: |
2328 | + os.remove(path) |
2329 | + except OSError,error: |
2330 | pass |
2331 | |
2332 | #=============================================================================== |
2333 | |
2334 | === modified file 'tests/acceptance_tests/test_cmd_madloop.py' |
2335 | --- tests/acceptance_tests/test_cmd_madloop.py 2018-04-24 22:39:50 +0000 |
2336 | +++ tests/acceptance_tests/test_cmd_madloop.py 2018-11-09 10:32:12 +0000 |
2337 | @@ -492,7 +492,7 @@ |
2338 | # Select the Tensor Integral to include in the test |
2339 | misc.deactivate_dependence('pjfry', cmd = self.interface, log='stdout') |
2340 | misc.deactivate_dependence('samurai', cmd = self.interface, log='stdout') |
2341 | - misc.activate_dependence('golem', cmd = self.interface, log='stdout') |
2342 | + misc.deactivate_dependence('golem', cmd = self.interface, log='stdout') |
2343 | misc.activate_dependence('ninja', cmd = self.interface, log='stdout',MG5dir=MG5DIR) |
2344 | misc.activate_dependence('collier', cmd = self.interface, log='stdout',MG5dir=MG5DIR) |
2345 | |
2346 | @@ -533,7 +533,7 @@ |
2347 | # Select the Tensor Integral to include in the test |
2348 | misc.deactivate_dependence('pjfry', cmd = interface, log='stdout') |
2349 | misc.deactivate_dependence('samurai', cmd = interface, log='stdout') |
2350 | - misc.activate_dependence('golem', cmd = interface, log='stdout') |
2351 | + misc.deactivate_dependence('golem', cmd = interface, log='stdout') |
2352 | misc.activate_dependence('ninja', cmd = interface, log='stdout',MG5dir=MG5DIR) |
2353 | |
2354 | run_cmd('generate g g > t t~ [virt=QCD]') |
2355 | |
2356 | === modified file 'tests/acceptance_tests/test_export_fks.py' |
2357 | --- tests/acceptance_tests/test_export_fks.py 2017-05-15 10:39:31 +0000 |
2358 | +++ tests/acceptance_tests/test_export_fks.py 2018-11-09 10:32:12 +0000 |
2359 | @@ -75,7 +75,7 @@ |
2360 | # Select the Tensor Integral to include in the test |
2361 | misc.deactivate_dependence('pjfry', cmd = interface, log='stdout') |
2362 | misc.deactivate_dependence('samurai', cmd = interface, log='stdout') |
2363 | - misc.activate_dependence('golem', cmd = interface, log='stdout') |
2364 | + misc.deactivate_dependence('golem', cmd = interface, log='stdout') |
2365 | misc.activate_dependence('ninja', cmd = interface, log='stdout',MG5dir=MG5DIR) |
2366 | |
2367 | run_cmd('import model %s' % model) |
2368 | |
2369 | === modified file 'tests/acceptance_tests/test_madspin.py' |
2370 | --- tests/acceptance_tests/test_madspin.py 2018-05-25 09:13:24 +0000 |
2371 | +++ tests/acceptance_tests/test_madspin.py 2018-11-09 10:32:12 +0000 |
2372 | @@ -93,7 +93,7 @@ |
2373 | subprocess.call([pjoin(MG5DIR, 'MadSpin', 'madspin'), |
2374 | pjoin(self.path, 'test_hepmc')], |
2375 | cwd=pjoin(self.path), |
2376 | - stdout=stdout,stderr=stdout) |
2377 | + stdout=stdout,stderr=stderr) |
2378 | self.assertTrue(os.path.exists(pjoin(self.path, 'test_decayed.lhe.gz'))) |
2379 | lhe = lhe_parser.EventFile(pjoin(self.path, 'test_decayed.lhe.gz')) |
2380 | self.assertEqual(10, len(lhe)) |
2381 | @@ -111,4 +111,56 @@ |
2382 | |
2383 | self.assertEqual(nb_dec, 116) |
2384 | self.assertEqual(nb_photon, 116) |
2385 | - |
2386 | \ No newline at end of file |
2387 | + |
2388 | + def test_lhe_none_decay(self): |
2389 | + """ """ |
2390 | + |
2391 | + cwd = os.getcwd() |
2392 | + |
2393 | + files.cp(pjoin(MG5DIR, 'tests', 'input_files', 'test_spinmode_none.lhe.gz'), self.path) |
2394 | + |
2395 | + |
2396 | + fsock = open(pjoin(self.path, 'test_hepmc'),'w') |
2397 | + text = """ |
2398 | + set spinmode none |
2399 | + import ./test_spinmode_none.lhe.gz |
2400 | + decay z > mu+ mu- |
2401 | + launch |
2402 | + """ |
2403 | + |
2404 | + fsock.write(text) |
2405 | + fsock.close() |
2406 | + |
2407 | + import subprocess |
2408 | + if logging.getLogger('madgraph').level <= 20: |
2409 | + stdout=None |
2410 | + stderr=None |
2411 | + else: |
2412 | + devnull =open(os.devnull,'w') |
2413 | + stdout=devnull |
2414 | + stderr=devnull |
2415 | + |
2416 | + subprocess.call([pjoin(MG5DIR, 'MadSpin', 'madspin'), |
2417 | + pjoin(self.path, 'test_hepmc')], |
2418 | + cwd=pjoin(self.path), |
2419 | + stdout=stdout,stderr=stderr) |
2420 | + |
2421 | + self.assertTrue(os.path.exists(pjoin(self.path, 'test_spinmode_none_decayed.lhe.gz'))) |
2422 | + lhe = lhe_parser.EventFile(pjoin(self.path, 'test_spinmode_none_decayed.lhe.gz')) |
2423 | + self.assertEqual(100, len(lhe)) |
2424 | + |
2425 | + nb_dec = 0 |
2426 | + nb_muon = 0 |
2427 | + for event in lhe: |
2428 | + muon_in = 0 |
2429 | + self.assertEqual(event.nexternal, len(event)) |
2430 | + for particle in event: |
2431 | + if particle.pdg == 23: |
2432 | + self.assertEqual(particle.status,2) |
2433 | + nb_dec += 1 |
2434 | + if particle.pdg == 13: |
2435 | + nb_muon += 1 |
2436 | + muon_in +=1 |
2437 | + self.assertEqual(muon_in, 1) |
2438 | + self.assertEqual(nb_dec, 189) |
2439 | + self.assertEqual(nb_muon, 100) |
2440 | \ No newline at end of file |
2441 | |
2442 | === modified file 'tests/acceptance_tests/test_model_equivalence.py' |
2443 | --- tests/acceptance_tests/test_model_equivalence.py 2018-06-15 08:18:31 +0000 |
2444 | +++ tests/acceptance_tests/test_model_equivalence.py 2018-11-09 10:32:12 +0000 |
2445 | @@ -146,15 +146,14 @@ |
2446 | ufo_model.pass_particles_name_in_mg_default() |
2447 | |
2448 | # import MG4 model |
2449 | + |
2450 | model = base_objects.Model() |
2451 | if not MG4DIR: |
2452 | raise MadGraph5Error, "Please provide a valid MG/ME path with -d" |
2453 | v4_path = os.path.join(MG4DIR, 'models', 'mssm_v4') |
2454 | if not os.path.isdir(v4_path): |
2455 | - v4_path = os.path.join(MG4DIR, 'Models', 'mssm') |
2456 | - if not os.path.isdir(v4_path): |
2457 | - raise MadGraph5Error, \ |
2458 | - "Please provide a valid MG/ME path with -d" |
2459 | + import_ufo.import_model_from_db('mssm_v4', local_dir=True) |
2460 | + |
2461 | |
2462 | model.set('particles', files.read_from_file( |
2463 | os.path.join(v4_path,'particles.dat'), |
2464 | |
2465 | === removed file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%GOLEM_interface.f' |
2466 | --- 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 |
2467 | +++ 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 |
2468 | @@ -1,748 +0,0 @@ |
2469 | - SUBROUTINE GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE) |
2470 | -C |
2471 | -C Generated by MadGraph5_aMC@NLO v. %(version)s, %(date)s |
2472 | -C By the MadGraph5_aMC@NLO Development Team |
2473 | -C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch |
2474 | -C |
2475 | -C Interface between MG5 and Golem95. |
2476 | -C The Golem95 version should be higher than 1.3.0. |
2477 | -C It supports RANK = NLOOPLINE + 1 tensor integrals when 1 < |
2478 | -C NLOOPLINE < 6. |
2479 | -C |
2480 | -C Process: d~ u > w+ QED<=1 WEIGHTED<=2 [ all = QCD ] |
2481 | -C Process: s~ c > w+ QED<=1 WEIGHTED<=2 [ all = QCD ] |
2482 | -C |
2483 | -C |
2484 | -C MODULES |
2485 | -C |
2486 | - USE MATRICE_S |
2487 | - USE FORM_FACTOR_TYPE, ONLY: FORM_FACTOR |
2488 | - USE PRECISION_GOLEM, ONLY: KI |
2489 | - USE TENS_COMB |
2490 | - USE TENS_REC |
2491 | - USE FORM_FACTOR_1P, ONLY: A10 |
2492 | - USE FORM_FACTOR_2P, ONLY: A20 |
2493 | - USE FORM_FACTOR_3P, ONLY: A30 |
2494 | - USE FORM_FACTOR_4P, ONLY: A40 |
2495 | - USE FORM_FACTOR_5P, ONLY: A50 |
2496 | - USE FORM_FACTOR_6P, ONLY: A60 |
2497 | - IMPLICIT NONE |
2498 | -C |
2499 | -C CONSTANTS |
2500 | -C |
2501 | - INTEGER NEXTERNAL |
2502 | - PARAMETER (NEXTERNAL=3) |
2503 | - LOGICAL CHECKPCONSERVATION |
2504 | - PARAMETER (CHECKPCONSERVATION=.TRUE.) |
2505 | - REAL*8 NORMALIZATION |
2506 | - PARAMETER (NORMALIZATION = 1.D0/(16.D0*3.14159265358979323846D0* |
2507 | - $ *2)) |
2508 | - REAL(KI),DIMENSION(0:3),PARAMETER::NULL_VEC = (/0.0_KI,0.0_KI |
2509 | - $ ,0.0_KI,0.0_KI/) |
2510 | -C GOLEM_RUN_MODE = 1: Use directly MadLoop tensorial coefficients |
2511 | -C GOLEM_RUN_MODE = 2: Reconstruct the tensorial coefficeints |
2512 | -C directly from |
2513 | -C numerator using golem internal reconstruction routine |
2514 | -C GOLEM_RUN_MODE = 3: Cross-checked reconstructed coefficients |
2515 | -C against |
2516 | -C MadLoop internal ones. |
2517 | - INTEGER GOLEM_RUN_MODE |
2518 | - PARAMETER (GOLEM_RUN_MODE=1) |
2519 | -C The following is the acceptance threshold used for |
2520 | -C GOLEM_RUN_MODE = 3 |
2521 | - REAL*8 COEF_CHECK_THRS |
2522 | - DATA COEF_CHECK_THRS/1.0D-13/ |
2523 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
2524 | - |
2525 | - LOGICAL PASS_COEF_CHECK |
2526 | -C |
2527 | -C ARGUMENTS |
2528 | -C |
2529 | - INTEGER NLOOPLINE, RANK |
2530 | - REAL*8 PL(0:3,NLOOPLINE) |
2531 | - REAL*8 PCT(0:3,0:NLOOPLINE-1), ABSPCT(0:3) |
2532 | - REAL*8 REF_P |
2533 | - REAL(KI) PGOLEM(NLOOPLINE,0:3) |
2534 | - COMPLEX*16 M2L(NLOOPLINE) |
2535 | - COMPLEX(KI) M2LGOLEM(NLOOPLINE) |
2536 | - COMPLEX*16 RES(3) |
2537 | - LOGICAL STABLE |
2538 | -C |
2539 | -C LOCAL VARIABLES |
2540 | -C |
2541 | - INTEGER I, J, K |
2542 | - TYPE(FORM_FACTOR)::RES_GOLEM |
2543 | - |
2544 | - COMPLEX(KI)::COEFFS0,COEFFS0_REC |
2545 | - TYPE(COEFF_TYPE_1)::COEFFS1,COEFFS1_REC |
2546 | - TYPE(COEFF_TYPE_2)::COEFFS2,COEFFS2_REC |
2547 | - TYPE(COEFF_TYPE_3)::COEFFS3,COEFFS3_REC |
2548 | - TYPE(COEFF_TYPE_4)::COEFFS4,COEFFS4_REC |
2549 | - TYPE(COEFF_TYPE_5)::COEFFS5,COEFFS5_REC |
2550 | - TYPE(COEFF_TYPE_6)::COEFFS6,COEFFS6_REC |
2551 | - |
2552 | -C The pinch propagator optimization is not used, so for now it is |
2553 | -C always 0. |
2554 | - INTEGER PINCH |
2555 | -C |
2556 | -C EXTERNAL FUNCTIONS |
2557 | -C |
2558 | - COMPLEX(KI) GOLEM_LOOPNUM |
2559 | - EXTERNAL GOLEM_LOOPNUM |
2560 | - LOGICAL COMPARE_COEFS_0 |
2561 | - LOGICAL COMPARE_COEFS_1 |
2562 | - LOGICAL COMPARE_COEFS_2 |
2563 | - LOGICAL COMPARE_COEFS_3 |
2564 | - LOGICAL COMPARE_COEFS_4 |
2565 | - LOGICAL COMPARE_COEFS_5 |
2566 | - LOGICAL COMPARE_COEFS_6 |
2567 | -C |
2568 | -C GLOBAL VARIABLES |
2569 | -C |
2570 | - INCLUDE 'coupl.inc' |
2571 | - INTEGER CTMODE |
2572 | - REAL*8 LSCALE |
2573 | - COMMON/CT/LSCALE,CTMODE |
2574 | - |
2575 | - INTEGER ID,SQSOINDEX,R |
2576 | - COMMON/LOOP/ID,SQSOINDEX,R |
2577 | - |
2578 | - LOGICAL CTINIT, TIRINIT, GOLEMINIT, SAMURAIINIT, NINJAINIT |
2579 | - $ ,COLLIERINIT |
2580 | - COMMON/REDUCTIONCODEINIT/CTINIT, TIRINIT,GOLEMINIT,SAMURAIINIT |
2581 | - $ ,NINJAINIT,COLLIERINIT |
2582 | - |
2583 | - INTEGER NLOOPGROUPS |
2584 | - PARAMETER (NLOOPGROUPS=1) |
2585 | - INTEGER NSQUAREDSO |
2586 | - PARAMETER (NSQUAREDSO=1) |
2587 | - INCLUDE 'loop_max_coefs.inc' |
2588 | - |
2589 | - COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS) |
2590 | - COMMON/LCOEFS/LOOPCOEFS |
2591 | -C ---------- |
2592 | -C BEGIN CODE |
2593 | -C ---------- |
2594 | - |
2595 | -C The CT initialization is also performed here if not done already |
2596 | -C because it calls MPINIT of OneLOop which is necessary on some |
2597 | -C system |
2598 | - IF (CTINIT) THEN |
2599 | - CTINIT=.FALSE. |
2600 | - CALL INITCT() |
2601 | - ENDIF |
2602 | - |
2603 | -C INITIALIZE GOLEM IF NEEDED |
2604 | - IF (GOLEMINIT) THEN |
2605 | - GOLEMINIT=.FALSE. |
2606 | - CALL INITGOLEM() |
2607 | - ENDIF |
2608 | - |
2609 | -C No stability test intrisic to Golem95 now |
2610 | - STABLE=.TRUE. |
2611 | - |
2612 | -C This initialization must be done for each reduction because we |
2613 | -C have not setup anyoptimization using pinched propagators yet. |
2614 | - CALL INITGOLEM95(NLOOPLINE) |
2615 | - PINCH = 0 |
2616 | - |
2617 | -C YOU CAN FIND THE DETAILS ABOUT THE DIFFERENT CTMODE AT THE |
2618 | -C BEGINNING OF THE FILE CTS_CUTS.F90 IN THE CUTTOOLS DISTRIBUTION |
2619 | - |
2620 | -C CONVERT THE MASSES TO BE COMPLEX |
2621 | - DO I=1,NLOOPLINE |
2622 | - M2LGOLEM(I)=M2L(I) |
2623 | - ENDDO |
2624 | - |
2625 | -C CONVERT THE MOMENTA FLOWING IN THE LOOP LINES TO CT CONVENTIONS |
2626 | - DO I=0,3 |
2627 | - ABSPCT(I) = 0.D0 |
2628 | - DO J=0,(NLOOPLINE-1) |
2629 | - PCT(I,J)=0.D0 |
2630 | - ENDDO |
2631 | - ENDDO |
2632 | - DO I=0,3 |
2633 | - DO J=1,NLOOPLINE |
2634 | - PCT(I,0)=PCT(I,0)+PL(I,J) |
2635 | - ABSPCT(I)=ABSPCT(I)+ABS(PL(I,J)) |
2636 | - ENDDO |
2637 | - ENDDO |
2638 | - REF_P = MAX(ABSPCT(0), ABSPCT(1),ABSPCT(2),ABSPCT(3)) |
2639 | - DO I=0,3 |
2640 | - ABSPCT(I) = MAX(REF_P*1E-6, ABSPCT(I)) |
2641 | - ENDDO |
2642 | - IF (CHECKPCONSERVATION.AND.REF_P.GT.1D-8) THEN |
2643 | - IF ((PCT(0,0)/ABSPCT(0)).GT.1.D-6) THEN |
2644 | - WRITE(*,*) 'energy is not conserved ',PCT(0,0) |
2645 | - STOP 'energy is not conserved' |
2646 | - ELSEIF ((PCT(1,0)/ABSPCT(1)).GT.1.D-6) THEN |
2647 | - WRITE(*,*) 'px is not conserved ',PCT(1,0) |
2648 | - STOP 'px is not conserved' |
2649 | - ELSEIF ((PCT(2,0)/ABSPCT(2)).GT.1.D-6) THEN |
2650 | - WRITE(*,*) 'py is not conserved ',PCT(2,0) |
2651 | - STOP 'py is not conserved' |
2652 | - ELSEIF ((PCT(3,0)/ABSPCT(3)).GT.1.D-6) THEN |
2653 | - WRITE(*,*) 'pz is not conserved ',PCT(3,0) |
2654 | - STOP 'pz is not conserved' |
2655 | - ENDIF |
2656 | - ENDIF |
2657 | - DO I=0,3 |
2658 | - DO J=1,(NLOOPLINE-1) |
2659 | - DO K=1,J |
2660 | - PCT(I,J)=PCT(I,J)+PL(I,K) |
2661 | - ENDDO |
2662 | - ENDDO |
2663 | - ENDDO |
2664 | - |
2665 | -C Now convert the loop momenta to Golem95 conventions |
2666 | - DO I=0,3 |
2667 | - PGOLEM(1,I)=0.0E0_KI |
2668 | - DO J=2,NLOOPLINE |
2669 | - PGOLEM(J,I)=PCT(I,J-1) |
2670 | - ENDDO |
2671 | - ENDDO |
2672 | - |
2673 | -C Fill in the kinematic s-matrix while taking care of on-shell |
2674 | -C limits. |
2675 | - CALL SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2LGOLEM) |
2676 | -C Construct the golem internal matrices derived from the kinetic |
2677 | -C one. |
2678 | - CALL PREPARESMATRIX() |
2679 | - |
2680 | -C Fill in the golem coefficents and compute the loop |
2681 | - IF(GOLEM_RUN_MODE.EQ.2)THEN |
2682 | - RES_GOLEM = EVALUATE_B(GOLEM_LOOPNUM,PGOLEM,0,RANK) |
2683 | - ELSE |
2684 | - PASS_COEF_CHECK=.TRUE. |
2685 | - SELECT CASE(RANK) |
2686 | - CASE(0) |
2687 | - CALL FILL_GOLEM_COEFFS_0(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS0) |
2688 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
2689 | - COEFFS0_REC = GOLEM_LOOPNUM(NULL_VEC,0.0_KI) |
2690 | - PASS_COEF_CHECK=COMPARE_COEFS_0(COEFFS0,COEFFS0_REC) |
2691 | - ENDIF |
2692 | - CASE(1) |
2693 | - CALL FILL_GOLEM_COEFFS_1(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS1) |
2694 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
2695 | - CALL RECONSTRUCT1(GOLEM_LOOPNUM,COEFFS1_REC) |
2696 | - PASS_COEF_CHECK=COMPARE_COEFS_1(COEFFS1,COEFFS1_REC) |
2697 | - ENDIF |
2698 | - CASE(2) |
2699 | - CALL FILL_GOLEM_COEFFS_2(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS2) |
2700 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
2701 | - CALL RECONSTRUCT2(GOLEM_LOOPNUM,COEFFS2_REC) |
2702 | - PASS_COEF_CHECK=COMPARE_COEFS_2(COEFFS2,COEFFS2_REC) |
2703 | - ENDIF |
2704 | - CASE(3) |
2705 | - CALL FILL_GOLEM_COEFFS_3(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS3) |
2706 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
2707 | - CALL RECONSTRUCT3(GOLEM_LOOPNUM,COEFFS3_REC) |
2708 | - PASS_COEF_CHECK=COMPARE_COEFS_3(COEFFS3,COEFFS3_REC) |
2709 | - ENDIF |
2710 | - CASE(4) |
2711 | - CALL FILL_GOLEM_COEFFS_4(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS4) |
2712 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
2713 | - CALL RECONSTRUCT4(GOLEM_LOOPNUM,COEFFS4_REC) |
2714 | - PASS_COEF_CHECK=COMPARE_COEFS_4(COEFFS4,COEFFS4_REC) |
2715 | - ENDIF |
2716 | - CASE(5) |
2717 | - CALL FILL_GOLEM_COEFFS_5(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS5) |
2718 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
2719 | - CALL RECONSTRUCT5(GOLEM_LOOPNUM,COEFFS5_REC) |
2720 | - PASS_COEF_CHECK=COMPARE_COEFS_5(COEFFS5,COEFFS5_REC) |
2721 | - ENDIF |
2722 | - CASE(6) |
2723 | - CALL FILL_GOLEM_COEFFS_6(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS6) |
2724 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
2725 | - CALL RECONSTRUCT6(GOLEM_LOOPNUM,COEFFS6_REC) |
2726 | - PASS_COEF_CHECK=COMPARE_COEFS_6(COEFFS6,COEFFS6_REC) |
2727 | - ENDIF |
2728 | - CASE DEFAULT |
2729 | - WRITE(*,*)'Not yet implemented in Golem95 for rank= ',RANK |
2730 | - STOP |
2731 | - END SELECT |
2732 | - |
2733 | - IF(.NOT.PASS_COEF_CHECK)THEN |
2734 | - WRITE(*,*)'Coefs mismatch for ID ',ID,' and rank ',RANK |
2735 | - WRITE(*,*)'Coefs form MadLoop5:' |
2736 | - SELECT CASE(RANK) |
2737 | - CASE(0) |
2738 | - WRITE(*,*)'Constant coef = ',COEFFS0 |
2739 | - CASE(1) |
2740 | - CALL PRINT_COEFFS(COEFFS1) |
2741 | - CASE(2) |
2742 | - CALL PRINT_COEFFS(COEFFS2) |
2743 | - CASE(3) |
2744 | - CALL PRINT_COEFFS(COEFFS3) |
2745 | - CASE(4) |
2746 | - CALL PRINT_COEFFS(COEFFS4) |
2747 | - CASE(5) |
2748 | - CALL PRINT_COEFFS(COEFFS5) |
2749 | - CASE(6) |
2750 | - CALL PRINT_COEFFS(COEFFS6) |
2751 | - END SELECT |
2752 | - WRITE(*,*)'Coefs reconstructed by Golem95:' |
2753 | - SELECT CASE(RANK) |
2754 | - CASE(0) |
2755 | - WRITE(*,*)'Constant coef = ',COEFFS0_REC |
2756 | - CASE(1) |
2757 | - CALL PRINT_COEFFS(COEFFS1_REC) |
2758 | - CASE(2) |
2759 | - CALL PRINT_COEFFS(COEFFS2_REC) |
2760 | - CASE(3) |
2761 | - CALL PRINT_COEFFS(COEFFS3_REC) |
2762 | - CASE(4) |
2763 | - CALL PRINT_COEFFS(COEFFS4_REC) |
2764 | - CASE(5) |
2765 | - CALL PRINT_COEFFS(COEFFS5_REC) |
2766 | - CASE(6) |
2767 | - CALL PRINT_COEFFS(COEFFS6_REC) |
2768 | - END SELECT |
2769 | - STOP |
2770 | - ENDIF |
2771 | - |
2772 | - SELECT CASE(NLOOPLINE) |
2773 | - CASE(1) |
2774 | - WRITE(*,*)'Golem95 cannot handle with tadpole yet' |
2775 | - STOP |
2776 | - CASE(2) |
2777 | - SELECT CASE(RANK) |
2778 | - CASE(0) |
2779 | - RES_GOLEM = COEFFS0*A20(PINCH) |
2780 | - CASE(1) |
2781 | - RES_GOLEM = CONTRACT2_1(COEFFS1,PGOLEM,PINCH) |
2782 | - CASE(2) |
2783 | - RES_GOLEM = CONTRACT2_2(COEFFS2,PGOLEM,PINCH) |
2784 | - CASE(3) |
2785 | - RES_GOLEM = CONTRACT2_3(COEFFS3,PGOLEM,PINCH) |
2786 | - CASE DEFAULT |
2787 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',2,RANK |
2788 | - STOP |
2789 | - END SELECT |
2790 | - CASE(3) |
2791 | - SELECT CASE(RANK) |
2792 | - CASE(0) |
2793 | - RES_GOLEM = COEFFS0*A30(PINCH) |
2794 | - CASE(1) |
2795 | - RES_GOLEM = CONTRACT3_1(COEFFS1,PGOLEM,PINCH) |
2796 | - CASE(2) |
2797 | - RES_GOLEM = CONTRACT3_2(COEFFS2,PGOLEM,PINCH) |
2798 | - CASE(3) |
2799 | - RES_GOLEM = CONTRACT3_3(COEFFS3,PGOLEM,PINCH) |
2800 | - CASE(4) |
2801 | - RES_GOLEM = CONTRACT3_4(COEFFS4,PGOLEM,PINCH) |
2802 | - CASE DEFAULT |
2803 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',3,RANK |
2804 | - STOP |
2805 | - END SELECT |
2806 | - CASE(4) |
2807 | - SELECT CASE(RANK) |
2808 | - CASE(0) |
2809 | - RES_GOLEM = COEFFS0*A40(PINCH) |
2810 | - CASE(1) |
2811 | - RES_GOLEM = CONTRACT4_1(COEFFS1,PGOLEM,PINCH) |
2812 | - CASE(2) |
2813 | - RES_GOLEM = CONTRACT4_2(COEFFS2,PGOLEM,PINCH) |
2814 | - CASE(3) |
2815 | - RES_GOLEM = CONTRACT4_3(COEFFS3,PGOLEM,PINCH) |
2816 | - CASE(4) |
2817 | - RES_GOLEM = CONTRACT4_4(COEFFS4,PGOLEM,PINCH) |
2818 | - CASE(5) |
2819 | - RES_GOLEM = CONTRACT4_5(COEFFS5,PGOLEM,PINCH) |
2820 | - CASE DEFAULT |
2821 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',4,RANK |
2822 | - STOP |
2823 | - END SELECT |
2824 | - CASE(5) |
2825 | - SELECT CASE(RANK) |
2826 | - CASE(0) |
2827 | - RES_GOLEM = COEFFS0*A50(PINCH) |
2828 | - CASE(1) |
2829 | - RES_GOLEM = CONTRACT5_1(COEFFS1,PGOLEM,PINCH) |
2830 | - CASE(2) |
2831 | - RES_GOLEM = CONTRACT5_2(COEFFS2,PGOLEM,PINCH) |
2832 | - CASE(3) |
2833 | - RES_GOLEM = CONTRACT5_3(COEFFS3,PGOLEM,PINCH) |
2834 | - CASE(4) |
2835 | - RES_GOLEM = CONTRACT5_4(COEFFS4,PGOLEM,PINCH) |
2836 | - CASE(5) |
2837 | - RES_GOLEM = CONTRACT5_5(COEFFS5,PGOLEM,PINCH) |
2838 | - CASE(6) |
2839 | - RES_GOLEM = CONTRACT5_6(COEFFS6,PGOLEM,PINCH) |
2840 | - CASE DEFAULT |
2841 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',5,RANK |
2842 | - STOP |
2843 | - END SELECT |
2844 | - CASE(6) |
2845 | - SELECT CASE(RANK) |
2846 | - CASE(0) |
2847 | - RES_GOLEM = COEFFS0*A60(PINCH) |
2848 | - CASE(1) |
2849 | - RES_GOLEM = CONTRACT6_1(COEFFS1,PGOLEM,PINCH) |
2850 | - CASE(2) |
2851 | - RES_GOLEM = CONTRACT6_2(COEFFS2,PGOLEM,PINCH) |
2852 | - CASE(3) |
2853 | - RES_GOLEM = CONTRACT6_3(COEFFS3,PGOLEM,PINCH) |
2854 | - CASE(4) |
2855 | - RES_GOLEM = CONTRACT6_4(COEFFS4,PGOLEM,PINCH) |
2856 | - CASE(5) |
2857 | - RES_GOLEM = CONTRACT6_5(COEFFS5,PGOLEM,PINCH) |
2858 | - CASE(6) |
2859 | - RES_GOLEM = CONTRACT6_6(COEFFS6,PGOLEM,PINCH) |
2860 | - CASE DEFAULT |
2861 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',6,RANK |
2862 | - STOP |
2863 | - END SELECT |
2864 | - CASE DEFAULT |
2865 | - WRITE(*,*)'Golem95 cannot handle with: N = ',NLOOPLINE |
2866 | - STOP |
2867 | - END SELECT |
2868 | - ENDIF |
2869 | - |
2870 | - RES(1)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%C+2.0*LOG(MU_R) |
2871 | - $ *RES_GOLEM%%B+2.0*LOG(MU_R)**2*RES_GOLEM%%A) |
2872 | - RES(2)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%B+2.0*LOG(MU_R) |
2873 | - $ *RES_GOLEM%%A) |
2874 | - RES(3)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%A) |
2875 | -C WRITE(*,*) 'Loop ID',ID,' =',RES(1),RES(2),RES(3) |
2876 | - |
2877 | -C Finally free golem memory and cache |
2878 | - CALL EXITGOLEM95() |
2879 | - |
2880 | - END |
2881 | - |
2882 | - FUNCTION GOLEM_LOOPNUM(Q,MU2) |
2883 | - USE PRECISION_GOLEM, ONLY: KI |
2884 | - REAL(KI),DIMENSION(0:3),INTENT(IN)::Q |
2885 | - REAL(KI),INTENT(IN)::MU2 |
2886 | - COMPLEX(KI)::GOLEM_LOOPNUM |
2887 | - |
2888 | - COMPLEX*16 QQ(0:3),NUM |
2889 | - INTEGER I |
2890 | - |
2891 | - DO I=0,3 |
2892 | - QQ(I)=CMPLX(Q(I),0.0D0,KIND=16) |
2893 | - ENDDO |
2894 | - |
2895 | - CALL LOOPNUM(QQ,NUM) |
2896 | - GOLEM_LOOPNUM=NUM |
2897 | - RETURN |
2898 | - END FUNCTION |
2899 | - |
2900 | - SUBROUTINE INITGOLEM() |
2901 | -C |
2902 | -C INITIALISATION OF GOLEM |
2903 | -C |
2904 | -C |
2905 | -C MODULE |
2906 | -C |
2907 | - USE PARAMETRE |
2908 | -C |
2909 | -C LOCAL VARIABLES |
2910 | -C |
2911 | - REAL*8 THRS |
2912 | - LOGICAL EXT_NUM_FOR_R1 |
2913 | -C |
2914 | -C GLOBAL VARIABLES |
2915 | -C |
2916 | - INCLUDE 'MadLoopParams.inc' |
2917 | -C ---------- |
2918 | -C BEGIN CODE |
2919 | -C ---------- |
2920 | - |
2921 | -C DEFAULT PARAMETERS FOR GOLEM |
2922 | -C ------------------------------- |
2923 | -C One can chose here to have either just the rational R1 piece |
2924 | -C or everything but the R2 |
2925 | - RAT_OR_TOT_PAR = TOT |
2926 | - |
2927 | - END |
2928 | - |
2929 | - SUBROUTINE SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2L) |
2930 | -C |
2931 | -C MODULE |
2932 | -C |
2933 | - USE MATRICE_S |
2934 | - USE PRECISION_GOLEM, ONLY: KI |
2935 | -C |
2936 | -C ARGUMENTS |
2937 | -C |
2938 | - INTEGER NLOOPLINE |
2939 | - REAL(KI) PGOLEM(NLOOPLINE,0:3) |
2940 | - COMPLEX(KI) M2L(NLOOPLINE) |
2941 | -C |
2942 | -C LOCAL VARIABLES |
2943 | -C |
2944 | - INTEGER I,J |
2945 | - COMPLEX*16 S_MAT_FROM_MG(NLOOPLINE,NLOOPLINE) |
2946 | -C ---------- |
2947 | -C BEGIN CODE |
2948 | -C ---------- |
2949 | - |
2950 | - CALL BUILD_KINEMATIC_MATRIX(NLOOPLINE,PGOLEM,M2L,S_MAT_FROM_MG) |
2951 | - |
2952 | - DO I=1,NLOOPLINE |
2953 | - DO J=1,NLOOPLINE |
2954 | - S_MAT(I,J)=S_MAT_FROM_MG(I,J) |
2955 | - ENDDO |
2956 | - ENDDO |
2957 | - |
2958 | - END |
2959 | - |
2960 | - FUNCTION COMPARE_COEFS_0(COEFS_A,COEFS_B) |
2961 | - |
2962 | - USE PRECISION_GOLEM, ONLY: KI |
2963 | - COMPLEX(KI) COEFS_A,COEFS_B |
2964 | - REAL*8 COEF_CHECK_THRS |
2965 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
2966 | - REAL*8 DENOM,NUM |
2967 | - LOGICAL COMPARE_COEFS_0 |
2968 | - |
2969 | - NUM = ABS(COEFS_A-COEFS_B) |
2970 | - DENOM = ABS(COEFS_A+COEFS_B) |
2971 | - IF(DENOM.GT.0D0)THEN |
2972 | - COMPARE_COEFS_0=((NUM/DENOM).LT.COEF_CHECK_THRS) |
2973 | - ELSE |
2974 | - COMPARE_COEFS_0=(NUM.LT.COEF_CHECK_THRS) |
2975 | - ENDIF |
2976 | - |
2977 | - END |
2978 | - |
2979 | - FUNCTION COMPARE_COEFS_1(COEFS_A,COEFS_B) |
2980 | - |
2981 | - USE TENS_REC |
2982 | - TYPE(COEFF_TYPE_1)COEFS_A,COEFS_B |
2983 | - REAL*8 COEF_CHECK_THRS |
2984 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
2985 | - REAL*8 DENOM,NUM |
2986 | - LOGICAL COMPARE_COEFS_1 |
2987 | - |
2988 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
2989 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
2990 | - $ ) |
2991 | - |
2992 | - IF(DENOM.GT.0D0)THEN |
2993 | - COMPARE_COEFS_1=((NUM/DENOM).LT.COEF_CHECK_THRS) |
2994 | - ELSE |
2995 | - COMPARE_COEFS_1=(NUM.LT.COEF_CHECK_THRS) |
2996 | - ENDIF |
2997 | - |
2998 | - END |
2999 | - |
3000 | - FUNCTION COMPARE_COEFS_2(COEFS_A,COEFS_B) |
3001 | - |
3002 | - USE TENS_REC |
3003 | - TYPE(COEFF_TYPE_2) COEFS_A,COEFS_B |
3004 | - REAL*8 COEF_CHECK_THRS |
3005 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3006 | - REAL*8 DENOM,NUM |
3007 | - LOGICAL COMPARE_COEFS_2 |
3008 | - |
3009 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
3010 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2)) |
3011 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
3012 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2)) |
3013 | - IF(DENOM.GT.0D0)THEN |
3014 | - COMPARE_COEFS_2=((NUM/DENOM).LT.COEF_CHECK_THRS) |
3015 | - ELSE |
3016 | - COMPARE_COEFS_2=(NUM.LT.COEF_CHECK_THRS) |
3017 | - ENDIF |
3018 | - |
3019 | - END |
3020 | - |
3021 | - FUNCTION COMPARE_COEFS_3(COEFS_A,COEFS_B) |
3022 | - |
3023 | - USE TENS_REC |
3024 | - TYPE(COEFF_TYPE_3) COEFS_A, COEFS_B |
3025 | - REAL*8 COEF_CHECK_THRS |
3026 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3027 | - REAL*8 DENOM,NUM |
3028 | - LOGICAL COMPARE_COEFS_3 |
3029 | - |
3030 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
3031 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3)) |
3032 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
3033 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3) |
3034 | - $ ) |
3035 | - IF(DENOM.GT.0D0)THEN |
3036 | - COMPARE_COEFS_3=((NUM/DENOM).LT.COEF_CHECK_THRS) |
3037 | - ELSE |
3038 | - COMPARE_COEFS_3=(NUM.LT.COEF_CHECK_THRS) |
3039 | - ENDIF |
3040 | - |
3041 | - END |
3042 | - |
3043 | - FUNCTION COMPARE_COEFS_4(COEFS_A,COEFS_B) |
3044 | - |
3045 | - USE TENS_REC |
3046 | - TYPE(COEFF_TYPE_4) COEFS_A, COEFS_B |
3047 | - REAL*8 COEF_CHECK_THRS |
3048 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3049 | - REAL*8 DENOM,NUM |
3050 | - LOGICAL COMPARE_COEFS_4 |
3051 | - |
3052 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
3053 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3)) |
3054 | - $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4)) |
3055 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
3056 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3) |
3057 | - $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4)) |
3058 | - IF(DENOM.GT.0D0)THEN |
3059 | - COMPARE_COEFS_4=((NUM/DENOM).LT.COEF_CHECK_THRS) |
3060 | - ELSE |
3061 | - COMPARE_COEFS_4=(NUM.LT.COEF_CHECK_THRS) |
3062 | - ENDIF |
3063 | - |
3064 | - END |
3065 | - |
3066 | - FUNCTION COMPARE_COEFS_5(COEFS_A,COEFS_B) |
3067 | - |
3068 | - USE TENS_REC |
3069 | - TYPE(COEFF_TYPE_5) COEFS_A,COEFS_B |
3070 | - REAL*8 COEF_CHECK_THRS |
3071 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3072 | - REAL*8 DENOM,NUM |
3073 | - LOGICAL COMPARE_COEFS_5 |
3074 | - |
3075 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
3076 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3)) |
3077 | - $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4)) |
3078 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
3079 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3) |
3080 | - $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4)) |
3081 | - IF(DENOM.GT.0D0)THEN |
3082 | - COMPARE_COEFS_5=((NUM/DENOM).LT.COEF_CHECK_THRS) |
3083 | - ELSE |
3084 | - COMPARE_COEFS_5=(NUM.LT.COEF_CHECK_THRS) |
3085 | - ENDIF |
3086 | - |
3087 | - END |
3088 | - |
3089 | - FUNCTION COMPARE_COEFS_6(COEFS_A,COEFS_B) |
3090 | - |
3091 | - USE TENS_REC |
3092 | - TYPE(COEFF_TYPE_6) COEFS_A,COEFS_B |
3093 | - REAL*8 COEF_CHECK_THRS |
3094 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3095 | - REAL*8 DENOM,NUM |
3096 | - LOGICAL COMPARE_COEFS_6 |
3097 | - |
3098 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
3099 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3)) |
3100 | - $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4)) |
3101 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
3102 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3) |
3103 | - $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4)) |
3104 | - IF(DENOM.GT.0D0)THEN |
3105 | - COMPARE_COEFS_6=((NUM/DENOM).LT.COEF_CHECK_THRS) |
3106 | - ELSE |
3107 | - COMPARE_COEFS_6=(NUM.LT.COEF_CHECK_THRS) |
3108 | - ENDIF |
3109 | - |
3110 | - END |
3111 | - |
3112 | - |
3113 | - SUBROUTINE FILL_GOLEM_COEFFS_0(ML_COEFS,GOLEM_COEFS) |
3114 | - USE PRECISION_GOLEM, ONLY: KI |
3115 | - INCLUDE 'coef_specs.inc' |
3116 | - INCLUDE 'loop_max_coefs.inc' |
3117 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3118 | - COMPLEX(KI) GOLEM_COEFS |
3119 | - GOLEM_COEFS=ML_COEFS(0) |
3120 | - END |
3121 | - |
3122 | - SUBROUTINE FILL_GOLEM_COEFFS_1(ML_COEFS,GOLEM_COEFS) |
3123 | - USE TENS_REC, ONLY: COEFF_TYPE_1 |
3124 | - INCLUDE 'coef_specs.inc' |
3125 | - INCLUDE 'loop_max_coefs.inc' |
3126 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3127 | - TYPE(COEFF_TYPE_1) GOLEM_COEFS |
3128 | -C Constant coefficient |
3129 | - GOLEM_COEFS%%C0=ML_COEFS(0) |
3130 | -C Coefficient q(0) |
3131 | - GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1) |
3132 | -C Coefficient q(1) |
3133 | - GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2) |
3134 | -C Coefficient q(2) |
3135 | - GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3) |
3136 | -C Coefficient q(3) |
3137 | - GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4) |
3138 | - END |
3139 | - |
3140 | - SUBROUTINE FILL_GOLEM_COEFFS_2(ML_COEFS,GOLEM_COEFS) |
3141 | - USE TENS_REC, ONLY: COEFF_TYPE_2 |
3142 | - INCLUDE 'coef_specs.inc' |
3143 | - INCLUDE 'loop_max_coefs.inc' |
3144 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3145 | - TYPE(COEFF_TYPE_2) GOLEM_COEFS |
3146 | -C Constant coefficient |
3147 | - GOLEM_COEFS%%C0=ML_COEFS(0) |
3148 | -C Coefficient q(0) |
3149 | - GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1) |
3150 | -C Coefficient q(0)^2 |
3151 | - GOLEM_COEFS%%C1(1,2)= ML_COEFS(5) |
3152 | -C Coefficient q(1) |
3153 | - GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2) |
3154 | -C Coefficient q(1)^2 |
3155 | - GOLEM_COEFS%%C1(2,2)= ML_COEFS(7) |
3156 | -C Coefficient q(2) |
3157 | - GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3) |
3158 | -C Coefficient q(2)^2 |
3159 | - GOLEM_COEFS%%C1(3,2)= ML_COEFS(10) |
3160 | -C Coefficient q(3) |
3161 | - GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4) |
3162 | -C Coefficient q(3)^2 |
3163 | - GOLEM_COEFS%%C1(4,2)= ML_COEFS(14) |
3164 | -C Coefficient q(0)*q(1) |
3165 | - GOLEM_COEFS%%C2(1,1)= ML_COEFS(6) |
3166 | -C Coefficient q(0)*q(2) |
3167 | - GOLEM_COEFS%%C2(2,1)= ML_COEFS(8) |
3168 | -C Coefficient q(0)*q(3) |
3169 | - GOLEM_COEFS%%C2(3,1)= ML_COEFS(11) |
3170 | -C Coefficient q(1)*q(2) |
3171 | - GOLEM_COEFS%%C2(4,1)= ML_COEFS(9) |
3172 | -C Coefficient q(1)*q(3) |
3173 | - GOLEM_COEFS%%C2(5,1)= ML_COEFS(12) |
3174 | -C Coefficient q(2)*q(3) |
3175 | - GOLEM_COEFS%%C2(6,1)= ML_COEFS(13) |
3176 | - END |
3177 | - |
3178 | - SUBROUTINE FILL_GOLEM_COEFFS_3(ML_COEFS,GOLEM_COEFS) |
3179 | - USE TENS_REC, ONLY: COEFF_TYPE_3 |
3180 | - INCLUDE 'coef_specs.inc' |
3181 | - INCLUDE 'loop_max_coefs.inc' |
3182 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3183 | - TYPE(COEFF_TYPE_3) GOLEM_COEFS |
3184 | -C Dummy routine for FILL_GOLEM_COEFS_3 |
3185 | - STOP 'ERROR: 3 > 2' |
3186 | - END |
3187 | - |
3188 | - SUBROUTINE FILL_GOLEM_COEFFS_4(ML_COEFS,GOLEM_COEFS) |
3189 | - USE TENS_REC, ONLY: COEFF_TYPE_4 |
3190 | - INCLUDE 'coef_specs.inc' |
3191 | - INCLUDE 'loop_max_coefs.inc' |
3192 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3193 | - TYPE(COEFF_TYPE_4) GOLEM_COEFS |
3194 | -C Dummy routine for FILL_GOLEM_COEFS_4 |
3195 | - STOP 'ERROR: 4 > 2' |
3196 | - END |
3197 | - |
3198 | - SUBROUTINE FILL_GOLEM_COEFFS_5(ML_COEFS,GOLEM_COEFS) |
3199 | - USE TENS_REC, ONLY: COEFF_TYPE_5 |
3200 | - INCLUDE 'coef_specs.inc' |
3201 | - INCLUDE 'loop_max_coefs.inc' |
3202 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3203 | - TYPE(COEFF_TYPE_5) GOLEM_COEFS |
3204 | -C Dummy routine for FILL_GOLEM_COEFS_5 |
3205 | - STOP 'ERROR: 5 > 2' |
3206 | - END |
3207 | - |
3208 | - SUBROUTINE FILL_GOLEM_COEFFS_6(ML_COEFS,GOLEM_COEFS) |
3209 | - USE TENS_REC, ONLY: COEFF_TYPE_6 |
3210 | - INCLUDE 'coef_specs.inc' |
3211 | - INCLUDE 'loop_max_coefs.inc' |
3212 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3213 | - TYPE(COEFF_TYPE_6) GOLEM_COEFS |
3214 | -C Dummy routine for FILL_GOLEM_COEFS_6 |
3215 | - STOP 'ERROR: 6 > 2' |
3216 | - END |
3217 | |
3218 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%TIR_interface.f' |
3219 | --- 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 |
3220 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%TIR_interface.f 2018-11-09 10:32:12 +0000 |
3221 | @@ -96,17 +96,9 @@ |
3222 | ENDIF |
3223 | |
3224 | IF (MLREDUCTIONLIB(I_LIB).EQ.4) THEN |
3225 | -C Using Golem95 |
3226 | -C PDEN is dummy for Golem95 so we just initialize it to zero |
3227 | -C here so as to use it for the function SWITCHORDER |
3228 | - DO I=0,3 |
3229 | - DO J=1,NLOOPLINE-1 |
3230 | - PDEN(I,J)=0.0D0 |
3231 | - ENDDO |
3232 | - ENDDO |
3233 | - CALL SWITCH_ORDER(CTMODE,NLOOPLINE,PL,PDEN,M2L) |
3234 | - CALL GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE) |
3235 | - RETURN |
3236 | +C Golem95 not available |
3237 | + WRITE(*,*) 'ERROR:: Golem95 is not interfaced.' |
3238 | + STOP |
3239 | ENDIF |
3240 | |
3241 | C INITIALIZE TIR IF NEEDED |
3242 | |
3243 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f' |
3244 | --- 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 |
3245 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f 2018-11-09 10:32:12 +0000 |
3246 | @@ -244,7 +244,7 @@ |
3247 | C A FLAG TO DENOTE WHETHER THE CORRESPONDING LOOPLIBS ARE |
3248 | C AVAILABLE OR NOT |
3249 | LOGICAL LOOPLIBS_AVAILABLE(NLOOPLIB) |
3250 | - DATA LOOPLIBS_AVAILABLE/.TRUE.,.FALSE.,.TRUE.,.TRUE.,.FALSE. |
3251 | + DATA LOOPLIBS_AVAILABLE/.TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE. |
3252 | $ ,.TRUE.,.TRUE./ |
3253 | COMMON/LOOPLIBS_AV/ LOOPLIBS_AVAILABLE |
3254 | C A FLAG TO DENOTE WHETHER THE CORRESPONDING DIRECTION TESTS |
3255 | |
3256 | === removed file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%GOLEM_interface.f' |
3257 | --- 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 |
3258 | +++ 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 |
3259 | @@ -1,748 +0,0 @@ |
3260 | - SUBROUTINE GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE) |
3261 | -C |
3262 | -C Generated by MadGraph5_aMC@NLO v. %(version)s, %(date)s |
3263 | -C By the MadGraph5_aMC@NLO Development Team |
3264 | -C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch |
3265 | -C |
3266 | -C Interface between MG5 and Golem95. |
3267 | -C The Golem95 version should be higher than 1.3.0. |
3268 | -C It supports RANK = NLOOPLINE + 1 tensor integrals when 1 < |
3269 | -C NLOOPLINE < 6. |
3270 | -C |
3271 | -C Process: u d~ > w+ QED<=1 WEIGHTED<=2 [ all = QCD ] |
3272 | -C Process: c s~ > w+ QED<=1 WEIGHTED<=2 [ all = QCD ] |
3273 | -C |
3274 | -C |
3275 | -C MODULES |
3276 | -C |
3277 | - USE MATRICE_S |
3278 | - USE FORM_FACTOR_TYPE, ONLY: FORM_FACTOR |
3279 | - USE PRECISION_GOLEM, ONLY: KI |
3280 | - USE TENS_COMB |
3281 | - USE TENS_REC |
3282 | - USE FORM_FACTOR_1P, ONLY: A10 |
3283 | - USE FORM_FACTOR_2P, ONLY: A20 |
3284 | - USE FORM_FACTOR_3P, ONLY: A30 |
3285 | - USE FORM_FACTOR_4P, ONLY: A40 |
3286 | - USE FORM_FACTOR_5P, ONLY: A50 |
3287 | - USE FORM_FACTOR_6P, ONLY: A60 |
3288 | - IMPLICIT NONE |
3289 | -C |
3290 | -C CONSTANTS |
3291 | -C |
3292 | - INTEGER NEXTERNAL |
3293 | - PARAMETER (NEXTERNAL=3) |
3294 | - LOGICAL CHECKPCONSERVATION |
3295 | - PARAMETER (CHECKPCONSERVATION=.TRUE.) |
3296 | - REAL*8 NORMALIZATION |
3297 | - PARAMETER (NORMALIZATION = 1.D0/(16.D0*3.14159265358979323846D0* |
3298 | - $ *2)) |
3299 | - REAL(KI),DIMENSION(0:3),PARAMETER::NULL_VEC = (/0.0_KI,0.0_KI |
3300 | - $ ,0.0_KI,0.0_KI/) |
3301 | -C GOLEM_RUN_MODE = 1: Use directly MadLoop tensorial coefficients |
3302 | -C GOLEM_RUN_MODE = 2: Reconstruct the tensorial coefficeints |
3303 | -C directly from |
3304 | -C numerator using golem internal reconstruction routine |
3305 | -C GOLEM_RUN_MODE = 3: Cross-checked reconstructed coefficients |
3306 | -C against |
3307 | -C MadLoop internal ones. |
3308 | - INTEGER GOLEM_RUN_MODE |
3309 | - PARAMETER (GOLEM_RUN_MODE=1) |
3310 | -C The following is the acceptance threshold used for |
3311 | -C GOLEM_RUN_MODE = 3 |
3312 | - REAL*8 COEF_CHECK_THRS |
3313 | - DATA COEF_CHECK_THRS/1.0D-13/ |
3314 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3315 | - |
3316 | - LOGICAL PASS_COEF_CHECK |
3317 | -C |
3318 | -C ARGUMENTS |
3319 | -C |
3320 | - INTEGER NLOOPLINE, RANK |
3321 | - REAL*8 PL(0:3,NLOOPLINE) |
3322 | - REAL*8 PCT(0:3,0:NLOOPLINE-1), ABSPCT(0:3) |
3323 | - REAL*8 REF_P |
3324 | - REAL(KI) PGOLEM(NLOOPLINE,0:3) |
3325 | - COMPLEX*16 M2L(NLOOPLINE) |
3326 | - COMPLEX(KI) M2LGOLEM(NLOOPLINE) |
3327 | - COMPLEX*16 RES(3) |
3328 | - LOGICAL STABLE |
3329 | -C |
3330 | -C LOCAL VARIABLES |
3331 | -C |
3332 | - INTEGER I, J, K |
3333 | - TYPE(FORM_FACTOR)::RES_GOLEM |
3334 | - |
3335 | - COMPLEX(KI)::COEFFS0,COEFFS0_REC |
3336 | - TYPE(COEFF_TYPE_1)::COEFFS1,COEFFS1_REC |
3337 | - TYPE(COEFF_TYPE_2)::COEFFS2,COEFFS2_REC |
3338 | - TYPE(COEFF_TYPE_3)::COEFFS3,COEFFS3_REC |
3339 | - TYPE(COEFF_TYPE_4)::COEFFS4,COEFFS4_REC |
3340 | - TYPE(COEFF_TYPE_5)::COEFFS5,COEFFS5_REC |
3341 | - TYPE(COEFF_TYPE_6)::COEFFS6,COEFFS6_REC |
3342 | - |
3343 | -C The pinch propagator optimization is not used, so for now it is |
3344 | -C always 0. |
3345 | - INTEGER PINCH |
3346 | -C |
3347 | -C EXTERNAL FUNCTIONS |
3348 | -C |
3349 | - COMPLEX(KI) GOLEM_LOOPNUM |
3350 | - EXTERNAL GOLEM_LOOPNUM |
3351 | - LOGICAL COMPARE_COEFS_0 |
3352 | - LOGICAL COMPARE_COEFS_1 |
3353 | - LOGICAL COMPARE_COEFS_2 |
3354 | - LOGICAL COMPARE_COEFS_3 |
3355 | - LOGICAL COMPARE_COEFS_4 |
3356 | - LOGICAL COMPARE_COEFS_5 |
3357 | - LOGICAL COMPARE_COEFS_6 |
3358 | -C |
3359 | -C GLOBAL VARIABLES |
3360 | -C |
3361 | - INCLUDE 'coupl.inc' |
3362 | - INTEGER CTMODE |
3363 | - REAL*8 LSCALE |
3364 | - COMMON/CT/LSCALE,CTMODE |
3365 | - |
3366 | - INTEGER ID,SQSOINDEX,R |
3367 | - COMMON/LOOP/ID,SQSOINDEX,R |
3368 | - |
3369 | - LOGICAL CTINIT, TIRINIT, GOLEMINIT, SAMURAIINIT, NINJAINIT |
3370 | - $ ,COLLIERINIT |
3371 | - COMMON/REDUCTIONCODEINIT/CTINIT, TIRINIT,GOLEMINIT,SAMURAIINIT |
3372 | - $ ,NINJAINIT,COLLIERINIT |
3373 | - |
3374 | - INTEGER NLOOPGROUPS |
3375 | - PARAMETER (NLOOPGROUPS=1) |
3376 | - INTEGER NSQUAREDSO |
3377 | - PARAMETER (NSQUAREDSO=1) |
3378 | - INCLUDE 'loop_max_coefs.inc' |
3379 | - |
3380 | - COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS) |
3381 | - COMMON/LCOEFS/LOOPCOEFS |
3382 | -C ---------- |
3383 | -C BEGIN CODE |
3384 | -C ---------- |
3385 | - |
3386 | -C The CT initialization is also performed here if not done already |
3387 | -C because it calls MPINIT of OneLOop which is necessary on some |
3388 | -C system |
3389 | - IF (CTINIT) THEN |
3390 | - CTINIT=.FALSE. |
3391 | - CALL INITCT() |
3392 | - ENDIF |
3393 | - |
3394 | -C INITIALIZE GOLEM IF NEEDED |
3395 | - IF (GOLEMINIT) THEN |
3396 | - GOLEMINIT=.FALSE. |
3397 | - CALL INITGOLEM() |
3398 | - ENDIF |
3399 | - |
3400 | -C No stability test intrisic to Golem95 now |
3401 | - STABLE=.TRUE. |
3402 | - |
3403 | -C This initialization must be done for each reduction because we |
3404 | -C have not setup anyoptimization using pinched propagators yet. |
3405 | - CALL INITGOLEM95(NLOOPLINE) |
3406 | - PINCH = 0 |
3407 | - |
3408 | -C YOU CAN FIND THE DETAILS ABOUT THE DIFFERENT CTMODE AT THE |
3409 | -C BEGINNING OF THE FILE CTS_CUTS.F90 IN THE CUTTOOLS DISTRIBUTION |
3410 | - |
3411 | -C CONVERT THE MASSES TO BE COMPLEX |
3412 | - DO I=1,NLOOPLINE |
3413 | - M2LGOLEM(I)=M2L(I) |
3414 | - ENDDO |
3415 | - |
3416 | -C CONVERT THE MOMENTA FLOWING IN THE LOOP LINES TO CT CONVENTIONS |
3417 | - DO I=0,3 |
3418 | - ABSPCT(I) = 0.D0 |
3419 | - DO J=0,(NLOOPLINE-1) |
3420 | - PCT(I,J)=0.D0 |
3421 | - ENDDO |
3422 | - ENDDO |
3423 | - DO I=0,3 |
3424 | - DO J=1,NLOOPLINE |
3425 | - PCT(I,0)=PCT(I,0)+PL(I,J) |
3426 | - ABSPCT(I)=ABSPCT(I)+ABS(PL(I,J)) |
3427 | - ENDDO |
3428 | - ENDDO |
3429 | - REF_P = MAX(ABSPCT(0), ABSPCT(1),ABSPCT(2),ABSPCT(3)) |
3430 | - DO I=0,3 |
3431 | - ABSPCT(I) = MAX(REF_P*1E-6, ABSPCT(I)) |
3432 | - ENDDO |
3433 | - IF (CHECKPCONSERVATION.AND.REF_P.GT.1D-8) THEN |
3434 | - IF ((PCT(0,0)/ABSPCT(0)).GT.1.D-6) THEN |
3435 | - WRITE(*,*) 'energy is not conserved ',PCT(0,0) |
3436 | - STOP 'energy is not conserved' |
3437 | - ELSEIF ((PCT(1,0)/ABSPCT(1)).GT.1.D-6) THEN |
3438 | - WRITE(*,*) 'px is not conserved ',PCT(1,0) |
3439 | - STOP 'px is not conserved' |
3440 | - ELSEIF ((PCT(2,0)/ABSPCT(2)).GT.1.D-6) THEN |
3441 | - WRITE(*,*) 'py is not conserved ',PCT(2,0) |
3442 | - STOP 'py is not conserved' |
3443 | - ELSEIF ((PCT(3,0)/ABSPCT(3)).GT.1.D-6) THEN |
3444 | - WRITE(*,*) 'pz is not conserved ',PCT(3,0) |
3445 | - STOP 'pz is not conserved' |
3446 | - ENDIF |
3447 | - ENDIF |
3448 | - DO I=0,3 |
3449 | - DO J=1,(NLOOPLINE-1) |
3450 | - DO K=1,J |
3451 | - PCT(I,J)=PCT(I,J)+PL(I,K) |
3452 | - ENDDO |
3453 | - ENDDO |
3454 | - ENDDO |
3455 | - |
3456 | -C Now convert the loop momenta to Golem95 conventions |
3457 | - DO I=0,3 |
3458 | - PGOLEM(1,I)=0.0E0_KI |
3459 | - DO J=2,NLOOPLINE |
3460 | - PGOLEM(J,I)=PCT(I,J-1) |
3461 | - ENDDO |
3462 | - ENDDO |
3463 | - |
3464 | -C Fill in the kinematic s-matrix while taking care of on-shell |
3465 | -C limits. |
3466 | - CALL SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2LGOLEM) |
3467 | -C Construct the golem internal matrices derived from the kinetic |
3468 | -C one. |
3469 | - CALL PREPARESMATRIX() |
3470 | - |
3471 | -C Fill in the golem coefficents and compute the loop |
3472 | - IF(GOLEM_RUN_MODE.EQ.2)THEN |
3473 | - RES_GOLEM = EVALUATE_B(GOLEM_LOOPNUM,PGOLEM,0,RANK) |
3474 | - ELSE |
3475 | - PASS_COEF_CHECK=.TRUE. |
3476 | - SELECT CASE(RANK) |
3477 | - CASE(0) |
3478 | - CALL FILL_GOLEM_COEFFS_0(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS0) |
3479 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
3480 | - COEFFS0_REC = GOLEM_LOOPNUM(NULL_VEC,0.0_KI) |
3481 | - PASS_COEF_CHECK=COMPARE_COEFS_0(COEFFS0,COEFFS0_REC) |
3482 | - ENDIF |
3483 | - CASE(1) |
3484 | - CALL FILL_GOLEM_COEFFS_1(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS1) |
3485 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
3486 | - CALL RECONSTRUCT1(GOLEM_LOOPNUM,COEFFS1_REC) |
3487 | - PASS_COEF_CHECK=COMPARE_COEFS_1(COEFFS1,COEFFS1_REC) |
3488 | - ENDIF |
3489 | - CASE(2) |
3490 | - CALL FILL_GOLEM_COEFFS_2(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS2) |
3491 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
3492 | - CALL RECONSTRUCT2(GOLEM_LOOPNUM,COEFFS2_REC) |
3493 | - PASS_COEF_CHECK=COMPARE_COEFS_2(COEFFS2,COEFFS2_REC) |
3494 | - ENDIF |
3495 | - CASE(3) |
3496 | - CALL FILL_GOLEM_COEFFS_3(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS3) |
3497 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
3498 | - CALL RECONSTRUCT3(GOLEM_LOOPNUM,COEFFS3_REC) |
3499 | - PASS_COEF_CHECK=COMPARE_COEFS_3(COEFFS3,COEFFS3_REC) |
3500 | - ENDIF |
3501 | - CASE(4) |
3502 | - CALL FILL_GOLEM_COEFFS_4(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS4) |
3503 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
3504 | - CALL RECONSTRUCT4(GOLEM_LOOPNUM,COEFFS4_REC) |
3505 | - PASS_COEF_CHECK=COMPARE_COEFS_4(COEFFS4,COEFFS4_REC) |
3506 | - ENDIF |
3507 | - CASE(5) |
3508 | - CALL FILL_GOLEM_COEFFS_5(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS5) |
3509 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
3510 | - CALL RECONSTRUCT5(GOLEM_LOOPNUM,COEFFS5_REC) |
3511 | - PASS_COEF_CHECK=COMPARE_COEFS_5(COEFFS5,COEFFS5_REC) |
3512 | - ENDIF |
3513 | - CASE(6) |
3514 | - CALL FILL_GOLEM_COEFFS_6(LOOPCOEFS(0,SQSOINDEX,ID),COEFFS6) |
3515 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
3516 | - CALL RECONSTRUCT6(GOLEM_LOOPNUM,COEFFS6_REC) |
3517 | - PASS_COEF_CHECK=COMPARE_COEFS_6(COEFFS6,COEFFS6_REC) |
3518 | - ENDIF |
3519 | - CASE DEFAULT |
3520 | - WRITE(*,*)'Not yet implemented in Golem95 for rank= ',RANK |
3521 | - STOP |
3522 | - END SELECT |
3523 | - |
3524 | - IF(.NOT.PASS_COEF_CHECK)THEN |
3525 | - WRITE(*,*)'Coefs mismatch for ID ',ID,' and rank ',RANK |
3526 | - WRITE(*,*)'Coefs form MadLoop5:' |
3527 | - SELECT CASE(RANK) |
3528 | - CASE(0) |
3529 | - WRITE(*,*)'Constant coef = ',COEFFS0 |
3530 | - CASE(1) |
3531 | - CALL PRINT_COEFFS(COEFFS1) |
3532 | - CASE(2) |
3533 | - CALL PRINT_COEFFS(COEFFS2) |
3534 | - CASE(3) |
3535 | - CALL PRINT_COEFFS(COEFFS3) |
3536 | - CASE(4) |
3537 | - CALL PRINT_COEFFS(COEFFS4) |
3538 | - CASE(5) |
3539 | - CALL PRINT_COEFFS(COEFFS5) |
3540 | - CASE(6) |
3541 | - CALL PRINT_COEFFS(COEFFS6) |
3542 | - END SELECT |
3543 | - WRITE(*,*)'Coefs reconstructed by Golem95:' |
3544 | - SELECT CASE(RANK) |
3545 | - CASE(0) |
3546 | - WRITE(*,*)'Constant coef = ',COEFFS0_REC |
3547 | - CASE(1) |
3548 | - CALL PRINT_COEFFS(COEFFS1_REC) |
3549 | - CASE(2) |
3550 | - CALL PRINT_COEFFS(COEFFS2_REC) |
3551 | - CASE(3) |
3552 | - CALL PRINT_COEFFS(COEFFS3_REC) |
3553 | - CASE(4) |
3554 | - CALL PRINT_COEFFS(COEFFS4_REC) |
3555 | - CASE(5) |
3556 | - CALL PRINT_COEFFS(COEFFS5_REC) |
3557 | - CASE(6) |
3558 | - CALL PRINT_COEFFS(COEFFS6_REC) |
3559 | - END SELECT |
3560 | - STOP |
3561 | - ENDIF |
3562 | - |
3563 | - SELECT CASE(NLOOPLINE) |
3564 | - CASE(1) |
3565 | - WRITE(*,*)'Golem95 cannot handle with tadpole yet' |
3566 | - STOP |
3567 | - CASE(2) |
3568 | - SELECT CASE(RANK) |
3569 | - CASE(0) |
3570 | - RES_GOLEM = COEFFS0*A20(PINCH) |
3571 | - CASE(1) |
3572 | - RES_GOLEM = CONTRACT2_1(COEFFS1,PGOLEM,PINCH) |
3573 | - CASE(2) |
3574 | - RES_GOLEM = CONTRACT2_2(COEFFS2,PGOLEM,PINCH) |
3575 | - CASE(3) |
3576 | - RES_GOLEM = CONTRACT2_3(COEFFS3,PGOLEM,PINCH) |
3577 | - CASE DEFAULT |
3578 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',2,RANK |
3579 | - STOP |
3580 | - END SELECT |
3581 | - CASE(3) |
3582 | - SELECT CASE(RANK) |
3583 | - CASE(0) |
3584 | - RES_GOLEM = COEFFS0*A30(PINCH) |
3585 | - CASE(1) |
3586 | - RES_GOLEM = CONTRACT3_1(COEFFS1,PGOLEM,PINCH) |
3587 | - CASE(2) |
3588 | - RES_GOLEM = CONTRACT3_2(COEFFS2,PGOLEM,PINCH) |
3589 | - CASE(3) |
3590 | - RES_GOLEM = CONTRACT3_3(COEFFS3,PGOLEM,PINCH) |
3591 | - CASE(4) |
3592 | - RES_GOLEM = CONTRACT3_4(COEFFS4,PGOLEM,PINCH) |
3593 | - CASE DEFAULT |
3594 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',3,RANK |
3595 | - STOP |
3596 | - END SELECT |
3597 | - CASE(4) |
3598 | - SELECT CASE(RANK) |
3599 | - CASE(0) |
3600 | - RES_GOLEM = COEFFS0*A40(PINCH) |
3601 | - CASE(1) |
3602 | - RES_GOLEM = CONTRACT4_1(COEFFS1,PGOLEM,PINCH) |
3603 | - CASE(2) |
3604 | - RES_GOLEM = CONTRACT4_2(COEFFS2,PGOLEM,PINCH) |
3605 | - CASE(3) |
3606 | - RES_GOLEM = CONTRACT4_3(COEFFS3,PGOLEM,PINCH) |
3607 | - CASE(4) |
3608 | - RES_GOLEM = CONTRACT4_4(COEFFS4,PGOLEM,PINCH) |
3609 | - CASE(5) |
3610 | - RES_GOLEM = CONTRACT4_5(COEFFS5,PGOLEM,PINCH) |
3611 | - CASE DEFAULT |
3612 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',4,RANK |
3613 | - STOP |
3614 | - END SELECT |
3615 | - CASE(5) |
3616 | - SELECT CASE(RANK) |
3617 | - CASE(0) |
3618 | - RES_GOLEM = COEFFS0*A50(PINCH) |
3619 | - CASE(1) |
3620 | - RES_GOLEM = CONTRACT5_1(COEFFS1,PGOLEM,PINCH) |
3621 | - CASE(2) |
3622 | - RES_GOLEM = CONTRACT5_2(COEFFS2,PGOLEM,PINCH) |
3623 | - CASE(3) |
3624 | - RES_GOLEM = CONTRACT5_3(COEFFS3,PGOLEM,PINCH) |
3625 | - CASE(4) |
3626 | - RES_GOLEM = CONTRACT5_4(COEFFS4,PGOLEM,PINCH) |
3627 | - CASE(5) |
3628 | - RES_GOLEM = CONTRACT5_5(COEFFS5,PGOLEM,PINCH) |
3629 | - CASE(6) |
3630 | - RES_GOLEM = CONTRACT5_6(COEFFS6,PGOLEM,PINCH) |
3631 | - CASE DEFAULT |
3632 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',5,RANK |
3633 | - STOP |
3634 | - END SELECT |
3635 | - CASE(6) |
3636 | - SELECT CASE(RANK) |
3637 | - CASE(0) |
3638 | - RES_GOLEM = COEFFS0*A60(PINCH) |
3639 | - CASE(1) |
3640 | - RES_GOLEM = CONTRACT6_1(COEFFS1,PGOLEM,PINCH) |
3641 | - CASE(2) |
3642 | - RES_GOLEM = CONTRACT6_2(COEFFS2,PGOLEM,PINCH) |
3643 | - CASE(3) |
3644 | - RES_GOLEM = CONTRACT6_3(COEFFS3,PGOLEM,PINCH) |
3645 | - CASE(4) |
3646 | - RES_GOLEM = CONTRACT6_4(COEFFS4,PGOLEM,PINCH) |
3647 | - CASE(5) |
3648 | - RES_GOLEM = CONTRACT6_5(COEFFS5,PGOLEM,PINCH) |
3649 | - CASE(6) |
3650 | - RES_GOLEM = CONTRACT6_6(COEFFS6,PGOLEM,PINCH) |
3651 | - CASE DEFAULT |
3652 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',6,RANK |
3653 | - STOP |
3654 | - END SELECT |
3655 | - CASE DEFAULT |
3656 | - WRITE(*,*)'Golem95 cannot handle with: N = ',NLOOPLINE |
3657 | - STOP |
3658 | - END SELECT |
3659 | - ENDIF |
3660 | - |
3661 | - RES(1)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%C+2.0*LOG(MU_R) |
3662 | - $ *RES_GOLEM%%B+2.0*LOG(MU_R)**2*RES_GOLEM%%A) |
3663 | - RES(2)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%B+2.0*LOG(MU_R) |
3664 | - $ *RES_GOLEM%%A) |
3665 | - RES(3)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%A) |
3666 | -C WRITE(*,*) 'Loop ID',ID,' =',RES(1),RES(2),RES(3) |
3667 | - |
3668 | -C Finally free golem memory and cache |
3669 | - CALL EXITGOLEM95() |
3670 | - |
3671 | - END |
3672 | - |
3673 | - FUNCTION GOLEM_LOOPNUM(Q,MU2) |
3674 | - USE PRECISION_GOLEM, ONLY: KI |
3675 | - REAL(KI),DIMENSION(0:3),INTENT(IN)::Q |
3676 | - REAL(KI),INTENT(IN)::MU2 |
3677 | - COMPLEX(KI)::GOLEM_LOOPNUM |
3678 | - |
3679 | - COMPLEX*16 QQ(0:3),NUM |
3680 | - INTEGER I |
3681 | - |
3682 | - DO I=0,3 |
3683 | - QQ(I)=CMPLX(Q(I),0.0D0,KIND=16) |
3684 | - ENDDO |
3685 | - |
3686 | - CALL LOOPNUM(QQ,NUM) |
3687 | - GOLEM_LOOPNUM=NUM |
3688 | - RETURN |
3689 | - END FUNCTION |
3690 | - |
3691 | - SUBROUTINE INITGOLEM() |
3692 | -C |
3693 | -C INITIALISATION OF GOLEM |
3694 | -C |
3695 | -C |
3696 | -C MODULE |
3697 | -C |
3698 | - USE PARAMETRE |
3699 | -C |
3700 | -C LOCAL VARIABLES |
3701 | -C |
3702 | - REAL*8 THRS |
3703 | - LOGICAL EXT_NUM_FOR_R1 |
3704 | -C |
3705 | -C GLOBAL VARIABLES |
3706 | -C |
3707 | - INCLUDE 'MadLoopParams.inc' |
3708 | -C ---------- |
3709 | -C BEGIN CODE |
3710 | -C ---------- |
3711 | - |
3712 | -C DEFAULT PARAMETERS FOR GOLEM |
3713 | -C ------------------------------- |
3714 | -C One can chose here to have either just the rational R1 piece |
3715 | -C or everything but the R2 |
3716 | - RAT_OR_TOT_PAR = TOT |
3717 | - |
3718 | - END |
3719 | - |
3720 | - SUBROUTINE SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2L) |
3721 | -C |
3722 | -C MODULE |
3723 | -C |
3724 | - USE MATRICE_S |
3725 | - USE PRECISION_GOLEM, ONLY: KI |
3726 | -C |
3727 | -C ARGUMENTS |
3728 | -C |
3729 | - INTEGER NLOOPLINE |
3730 | - REAL(KI) PGOLEM(NLOOPLINE,0:3) |
3731 | - COMPLEX(KI) M2L(NLOOPLINE) |
3732 | -C |
3733 | -C LOCAL VARIABLES |
3734 | -C |
3735 | - INTEGER I,J |
3736 | - COMPLEX*16 S_MAT_FROM_MG(NLOOPLINE,NLOOPLINE) |
3737 | -C ---------- |
3738 | -C BEGIN CODE |
3739 | -C ---------- |
3740 | - |
3741 | - CALL BUILD_KINEMATIC_MATRIX(NLOOPLINE,PGOLEM,M2L,S_MAT_FROM_MG) |
3742 | - |
3743 | - DO I=1,NLOOPLINE |
3744 | - DO J=1,NLOOPLINE |
3745 | - S_MAT(I,J)=S_MAT_FROM_MG(I,J) |
3746 | - ENDDO |
3747 | - ENDDO |
3748 | - |
3749 | - END |
3750 | - |
3751 | - FUNCTION COMPARE_COEFS_0(COEFS_A,COEFS_B) |
3752 | - |
3753 | - USE PRECISION_GOLEM, ONLY: KI |
3754 | - COMPLEX(KI) COEFS_A,COEFS_B |
3755 | - REAL*8 COEF_CHECK_THRS |
3756 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3757 | - REAL*8 DENOM,NUM |
3758 | - LOGICAL COMPARE_COEFS_0 |
3759 | - |
3760 | - NUM = ABS(COEFS_A-COEFS_B) |
3761 | - DENOM = ABS(COEFS_A+COEFS_B) |
3762 | - IF(DENOM.GT.0D0)THEN |
3763 | - COMPARE_COEFS_0=((NUM/DENOM).LT.COEF_CHECK_THRS) |
3764 | - ELSE |
3765 | - COMPARE_COEFS_0=(NUM.LT.COEF_CHECK_THRS) |
3766 | - ENDIF |
3767 | - |
3768 | - END |
3769 | - |
3770 | - FUNCTION COMPARE_COEFS_1(COEFS_A,COEFS_B) |
3771 | - |
3772 | - USE TENS_REC |
3773 | - TYPE(COEFF_TYPE_1)COEFS_A,COEFS_B |
3774 | - REAL*8 COEF_CHECK_THRS |
3775 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3776 | - REAL*8 DENOM,NUM |
3777 | - LOGICAL COMPARE_COEFS_1 |
3778 | - |
3779 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
3780 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
3781 | - $ ) |
3782 | - |
3783 | - IF(DENOM.GT.0D0)THEN |
3784 | - COMPARE_COEFS_1=((NUM/DENOM).LT.COEF_CHECK_THRS) |
3785 | - ELSE |
3786 | - COMPARE_COEFS_1=(NUM.LT.COEF_CHECK_THRS) |
3787 | - ENDIF |
3788 | - |
3789 | - END |
3790 | - |
3791 | - FUNCTION COMPARE_COEFS_2(COEFS_A,COEFS_B) |
3792 | - |
3793 | - USE TENS_REC |
3794 | - TYPE(COEFF_TYPE_2) COEFS_A,COEFS_B |
3795 | - REAL*8 COEF_CHECK_THRS |
3796 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3797 | - REAL*8 DENOM,NUM |
3798 | - LOGICAL COMPARE_COEFS_2 |
3799 | - |
3800 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
3801 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2)) |
3802 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
3803 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2)) |
3804 | - IF(DENOM.GT.0D0)THEN |
3805 | - COMPARE_COEFS_2=((NUM/DENOM).LT.COEF_CHECK_THRS) |
3806 | - ELSE |
3807 | - COMPARE_COEFS_2=(NUM.LT.COEF_CHECK_THRS) |
3808 | - ENDIF |
3809 | - |
3810 | - END |
3811 | - |
3812 | - FUNCTION COMPARE_COEFS_3(COEFS_A,COEFS_B) |
3813 | - |
3814 | - USE TENS_REC |
3815 | - TYPE(COEFF_TYPE_3) COEFS_A, COEFS_B |
3816 | - REAL*8 COEF_CHECK_THRS |
3817 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3818 | - REAL*8 DENOM,NUM |
3819 | - LOGICAL COMPARE_COEFS_3 |
3820 | - |
3821 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
3822 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3)) |
3823 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
3824 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3) |
3825 | - $ ) |
3826 | - IF(DENOM.GT.0D0)THEN |
3827 | - COMPARE_COEFS_3=((NUM/DENOM).LT.COEF_CHECK_THRS) |
3828 | - ELSE |
3829 | - COMPARE_COEFS_3=(NUM.LT.COEF_CHECK_THRS) |
3830 | - ENDIF |
3831 | - |
3832 | - END |
3833 | - |
3834 | - FUNCTION COMPARE_COEFS_4(COEFS_A,COEFS_B) |
3835 | - |
3836 | - USE TENS_REC |
3837 | - TYPE(COEFF_TYPE_4) COEFS_A, COEFS_B |
3838 | - REAL*8 COEF_CHECK_THRS |
3839 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3840 | - REAL*8 DENOM,NUM |
3841 | - LOGICAL COMPARE_COEFS_4 |
3842 | - |
3843 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
3844 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3)) |
3845 | - $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4)) |
3846 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
3847 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3) |
3848 | - $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4)) |
3849 | - IF(DENOM.GT.0D0)THEN |
3850 | - COMPARE_COEFS_4=((NUM/DENOM).LT.COEF_CHECK_THRS) |
3851 | - ELSE |
3852 | - COMPARE_COEFS_4=(NUM.LT.COEF_CHECK_THRS) |
3853 | - ENDIF |
3854 | - |
3855 | - END |
3856 | - |
3857 | - FUNCTION COMPARE_COEFS_5(COEFS_A,COEFS_B) |
3858 | - |
3859 | - USE TENS_REC |
3860 | - TYPE(COEFF_TYPE_5) COEFS_A,COEFS_B |
3861 | - REAL*8 COEF_CHECK_THRS |
3862 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3863 | - REAL*8 DENOM,NUM |
3864 | - LOGICAL COMPARE_COEFS_5 |
3865 | - |
3866 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
3867 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3)) |
3868 | - $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4)) |
3869 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
3870 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3) |
3871 | - $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4)) |
3872 | - IF(DENOM.GT.0D0)THEN |
3873 | - COMPARE_COEFS_5=((NUM/DENOM).LT.COEF_CHECK_THRS) |
3874 | - ELSE |
3875 | - COMPARE_COEFS_5=(NUM.LT.COEF_CHECK_THRS) |
3876 | - ENDIF |
3877 | - |
3878 | - END |
3879 | - |
3880 | - FUNCTION COMPARE_COEFS_6(COEFS_A,COEFS_B) |
3881 | - |
3882 | - USE TENS_REC |
3883 | - TYPE(COEFF_TYPE_6) COEFS_A,COEFS_B |
3884 | - REAL*8 COEF_CHECK_THRS |
3885 | - COMMON/COEF_CHECK_THRS/COEF_CHECK_THRS |
3886 | - REAL*8 DENOM,NUM |
3887 | - LOGICAL COMPARE_COEFS_6 |
3888 | - |
3889 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
3890 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3)) |
3891 | - $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4)) |
3892 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
3893 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3) |
3894 | - $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4)) |
3895 | - IF(DENOM.GT.0D0)THEN |
3896 | - COMPARE_COEFS_6=((NUM/DENOM).LT.COEF_CHECK_THRS) |
3897 | - ELSE |
3898 | - COMPARE_COEFS_6=(NUM.LT.COEF_CHECK_THRS) |
3899 | - ENDIF |
3900 | - |
3901 | - END |
3902 | - |
3903 | - |
3904 | - SUBROUTINE FILL_GOLEM_COEFFS_0(ML_COEFS,GOLEM_COEFS) |
3905 | - USE PRECISION_GOLEM, ONLY: KI |
3906 | - INCLUDE 'coef_specs.inc' |
3907 | - INCLUDE 'loop_max_coefs.inc' |
3908 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3909 | - COMPLEX(KI) GOLEM_COEFS |
3910 | - GOLEM_COEFS=ML_COEFS(0) |
3911 | - END |
3912 | - |
3913 | - SUBROUTINE FILL_GOLEM_COEFFS_1(ML_COEFS,GOLEM_COEFS) |
3914 | - USE TENS_REC, ONLY: COEFF_TYPE_1 |
3915 | - INCLUDE 'coef_specs.inc' |
3916 | - INCLUDE 'loop_max_coefs.inc' |
3917 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3918 | - TYPE(COEFF_TYPE_1) GOLEM_COEFS |
3919 | -C Constant coefficient |
3920 | - GOLEM_COEFS%%C0=ML_COEFS(0) |
3921 | -C Coefficient q(0) |
3922 | - GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1) |
3923 | -C Coefficient q(1) |
3924 | - GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2) |
3925 | -C Coefficient q(2) |
3926 | - GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3) |
3927 | -C Coefficient q(3) |
3928 | - GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4) |
3929 | - END |
3930 | - |
3931 | - SUBROUTINE FILL_GOLEM_COEFFS_2(ML_COEFS,GOLEM_COEFS) |
3932 | - USE TENS_REC, ONLY: COEFF_TYPE_2 |
3933 | - INCLUDE 'coef_specs.inc' |
3934 | - INCLUDE 'loop_max_coefs.inc' |
3935 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3936 | - TYPE(COEFF_TYPE_2) GOLEM_COEFS |
3937 | -C Constant coefficient |
3938 | - GOLEM_COEFS%%C0=ML_COEFS(0) |
3939 | -C Coefficient q(0) |
3940 | - GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1) |
3941 | -C Coefficient q(0)^2 |
3942 | - GOLEM_COEFS%%C1(1,2)= ML_COEFS(5) |
3943 | -C Coefficient q(1) |
3944 | - GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2) |
3945 | -C Coefficient q(1)^2 |
3946 | - GOLEM_COEFS%%C1(2,2)= ML_COEFS(7) |
3947 | -C Coefficient q(2) |
3948 | - GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3) |
3949 | -C Coefficient q(2)^2 |
3950 | - GOLEM_COEFS%%C1(3,2)= ML_COEFS(10) |
3951 | -C Coefficient q(3) |
3952 | - GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4) |
3953 | -C Coefficient q(3)^2 |
3954 | - GOLEM_COEFS%%C1(4,2)= ML_COEFS(14) |
3955 | -C Coefficient q(0)*q(1) |
3956 | - GOLEM_COEFS%%C2(1,1)= ML_COEFS(6) |
3957 | -C Coefficient q(0)*q(2) |
3958 | - GOLEM_COEFS%%C2(2,1)= ML_COEFS(8) |
3959 | -C Coefficient q(0)*q(3) |
3960 | - GOLEM_COEFS%%C2(3,1)= ML_COEFS(11) |
3961 | -C Coefficient q(1)*q(2) |
3962 | - GOLEM_COEFS%%C2(4,1)= ML_COEFS(9) |
3963 | -C Coefficient q(1)*q(3) |
3964 | - GOLEM_COEFS%%C2(5,1)= ML_COEFS(12) |
3965 | -C Coefficient q(2)*q(3) |
3966 | - GOLEM_COEFS%%C2(6,1)= ML_COEFS(13) |
3967 | - END |
3968 | - |
3969 | - SUBROUTINE FILL_GOLEM_COEFFS_3(ML_COEFS,GOLEM_COEFS) |
3970 | - USE TENS_REC, ONLY: COEFF_TYPE_3 |
3971 | - INCLUDE 'coef_specs.inc' |
3972 | - INCLUDE 'loop_max_coefs.inc' |
3973 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3974 | - TYPE(COEFF_TYPE_3) GOLEM_COEFS |
3975 | -C Dummy routine for FILL_GOLEM_COEFS_3 |
3976 | - STOP 'ERROR: 3 > 2' |
3977 | - END |
3978 | - |
3979 | - SUBROUTINE FILL_GOLEM_COEFFS_4(ML_COEFS,GOLEM_COEFS) |
3980 | - USE TENS_REC, ONLY: COEFF_TYPE_4 |
3981 | - INCLUDE 'coef_specs.inc' |
3982 | - INCLUDE 'loop_max_coefs.inc' |
3983 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3984 | - TYPE(COEFF_TYPE_4) GOLEM_COEFS |
3985 | -C Dummy routine for FILL_GOLEM_COEFS_4 |
3986 | - STOP 'ERROR: 4 > 2' |
3987 | - END |
3988 | - |
3989 | - SUBROUTINE FILL_GOLEM_COEFFS_5(ML_COEFS,GOLEM_COEFS) |
3990 | - USE TENS_REC, ONLY: COEFF_TYPE_5 |
3991 | - INCLUDE 'coef_specs.inc' |
3992 | - INCLUDE 'loop_max_coefs.inc' |
3993 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
3994 | - TYPE(COEFF_TYPE_5) GOLEM_COEFS |
3995 | -C Dummy routine for FILL_GOLEM_COEFS_5 |
3996 | - STOP 'ERROR: 5 > 2' |
3997 | - END |
3998 | - |
3999 | - SUBROUTINE FILL_GOLEM_COEFFS_6(ML_COEFS,GOLEM_COEFS) |
4000 | - USE TENS_REC, ONLY: COEFF_TYPE_6 |
4001 | - INCLUDE 'coef_specs.inc' |
4002 | - INCLUDE 'loop_max_coefs.inc' |
4003 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
4004 | - TYPE(COEFF_TYPE_6) GOLEM_COEFS |
4005 | -C Dummy routine for FILL_GOLEM_COEFS_6 |
4006 | - STOP 'ERROR: 6 > 2' |
4007 | - END |
4008 | |
4009 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%TIR_interface.f' |
4010 | --- 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 |
4011 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%TIR_interface.f 2018-11-09 10:32:12 +0000 |
4012 | @@ -96,17 +96,9 @@ |
4013 | ENDIF |
4014 | |
4015 | IF (MLREDUCTIONLIB(I_LIB).EQ.4) THEN |
4016 | -C Using Golem95 |
4017 | -C PDEN is dummy for Golem95 so we just initialize it to zero |
4018 | -C here so as to use it for the function SWITCHORDER |
4019 | - DO I=0,3 |
4020 | - DO J=1,NLOOPLINE-1 |
4021 | - PDEN(I,J)=0.0D0 |
4022 | - ENDDO |
4023 | - ENDDO |
4024 | - CALL SWITCH_ORDER(CTMODE,NLOOPLINE,PL,PDEN,M2L) |
4025 | - CALL GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE) |
4026 | - RETURN |
4027 | +C Golem95 not available |
4028 | + WRITE(*,*) 'ERROR:: Golem95 is not interfaced.' |
4029 | + STOP |
4030 | ENDIF |
4031 | |
4032 | C INITIALIZE TIR IF NEEDED |
4033 | |
4034 | === modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f' |
4035 | --- 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 |
4036 | +++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f 2018-11-09 10:32:12 +0000 |
4037 | @@ -244,7 +244,7 @@ |
4038 | C A FLAG TO DENOTE WHETHER THE CORRESPONDING LOOPLIBS ARE |
4039 | C AVAILABLE OR NOT |
4040 | LOGICAL LOOPLIBS_AVAILABLE(NLOOPLIB) |
4041 | - DATA LOOPLIBS_AVAILABLE/.TRUE.,.FALSE.,.TRUE.,.TRUE.,.FALSE. |
4042 | + DATA LOOPLIBS_AVAILABLE/.TRUE.,.FALSE.,.TRUE.,.FALSE.,.FALSE. |
4043 | $ ,.TRUE.,.TRUE./ |
4044 | COMMON/LOOPLIBS_AV/ LOOPLIBS_AVAILABLE |
4045 | C A FLAG TO DENOTE WHETHER THE CORRESPONDING DIRECTION TESTS |
4046 | |
4047 | === modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f' |
4048 | --- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f 2017-11-24 12:17:04 +0000 |
4049 | +++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_group/matrix1.f 2018-11-09 10:32:12 +0000 |
4050 | @@ -73,6 +73,9 @@ |
4051 | REAL*8 POL(2) |
4052 | COMMON/TO_POLARIZATION/ POL |
4053 | |
4054 | + DOUBLE PRECISION SMALL_WIDTH_TREATMENT |
4055 | + COMMON/NARROW_WIDTH/SMALL_WIDTH_TREATMENT |
4056 | + |
4057 | INTEGER ISUM_HEL |
4058 | LOGICAL MULTI_CHANNEL |
4059 | COMMON/TO_MATRIX/ISUM_HEL, MULTI_CHANNEL |
4060 | @@ -110,6 +113,7 @@ |
4061 | C ---------- |
4062 | C BEGIN CODE |
4063 | C ---------- |
4064 | + |
4065 | NTRY(IMIRROR)=NTRY(IMIRROR)+1 |
4066 | THIS_NTRY(IMIRROR) = THIS_NTRY(IMIRROR)+1 |
4067 | DO I=1,NEXTERNAL |
4068 | @@ -290,6 +294,15 @@ |
4069 | C Needed for v4 models |
4070 | COMPLEX*16 DUM0,DUM1 |
4071 | DATA DUM0, DUM1/(0D0, 0D0), (1D0, 0D0)/ |
4072 | + |
4073 | + DOUBLE PRECISION FK_ZERO |
4074 | + DOUBLE PRECISION FK_WZ |
4075 | + SAVE FK_ZERO |
4076 | + SAVE FK_WZ |
4077 | + |
4078 | + LOGICAL FIRST |
4079 | + DATA FIRST /.TRUE./ |
4080 | + SAVE FIRST |
4081 | C |
4082 | C FUNCTION |
4083 | C |
4084 | @@ -300,6 +313,9 @@ |
4085 | DOUBLE PRECISION AMP2(MAXAMPS), JAMP2(0:MAXFLOW) |
4086 | COMMON/TO_AMPS/ AMP2, JAMP2 |
4087 | INCLUDE 'coupl.inc' |
4088 | + |
4089 | + DOUBLE PRECISION SMALL_WIDTH_TREATMENT |
4090 | + COMMON/NARROW_WIDTH/SMALL_WIDTH_TREATMENT |
4091 | C |
4092 | C COLOR DATA |
4093 | C |
4094 | @@ -312,26 +328,33 @@ |
4095 | C ---------- |
4096 | C BEGIN CODE |
4097 | C ---------- |
4098 | + IF (FIRST) THEN |
4099 | + FIRST=.FALSE. |
4100 | + FK_WZ = SIGN(MAX(ABS(WZ), ABS(MZ*SMALL_WIDTH_TREATMENT)), WZ) |
4101 | + FK_ZERO = 0D0 |
4102 | + ENDIF |
4103 | + |
4104 | + |
4105 | CALL IXXXXX(P(0,1),ZERO,NHEL(1),+1*IC(1),W(1,1)) |
4106 | CALL OXXXXX(P(0,2),ZERO,NHEL(2),-1*IC(2),W(1,2)) |
4107 | CALL OXXXXX(P(0,3),ZERO,NHEL(3),+1*IC(3),W(1,3)) |
4108 | CALL IXXXXX(P(0,4),ZERO,NHEL(4),-1*IC(4),W(1,4)) |
4109 | - CALL FFV1_3(W(1,1),W(1,2),GQQ,ZERO,ZERO,W(1,5)) |
4110 | + CALL FFV1_3(W(1,1),W(1,2),GQQ,ZERO, FK_ZERO,W(1,5)) |
4111 | C Amplitude(s) for diagram number 1 |
4112 | CALL FFV1_0(W(1,4),W(1,3),W(1,5),GQQ,AMP(1)) |
4113 | - CALL FFV1_3(W(1,1),W(1,2),GQED,ZERO,ZERO,W(1,5)) |
4114 | + CALL FFV1_3(W(1,1),W(1,2),GQED,ZERO, FK_ZERO,W(1,5)) |
4115 | C Amplitude(s) for diagram number 2 |
4116 | CALL FFV1_0(W(1,4),W(1,3),W(1,5),GQED,AMP(2)) |
4117 | - CALL FFV1_2_3(W(1,1),W(1,2),GUZ1,GUZ2,MZ,WZ,W(1,5)) |
4118 | + CALL FFV1_2_3(W(1,1),W(1,2),GUZ1,GUZ2,MZ, FK_WZ,W(1,5)) |
4119 | C Amplitude(s) for diagram number 3 |
4120 | CALL FFV1_2_0(W(1,4),W(1,3),W(1,5),GUZ1,GUZ2,AMP(3)) |
4121 | - CALL FFV1_3(W(1,1),W(1,3),GQQ,ZERO,ZERO,W(1,5)) |
4122 | + CALL FFV1_3(W(1,1),W(1,3),GQQ,ZERO, FK_ZERO,W(1,5)) |
4123 | C Amplitude(s) for diagram number 4 |
4124 | CALL FFV1_0(W(1,4),W(1,2),W(1,5),GQQ,AMP(4)) |
4125 | - CALL FFV1_3(W(1,1),W(1,3),GQED,ZERO,ZERO,W(1,5)) |
4126 | + CALL FFV1_3(W(1,1),W(1,3),GQED,ZERO, FK_ZERO,W(1,5)) |
4127 | C Amplitude(s) for diagram number 5 |
4128 | CALL FFV1_0(W(1,4),W(1,2),W(1,5),GQED,AMP(5)) |
4129 | - CALL FFV1_2_3(W(1,1),W(1,3),GUZ1,GUZ2,MZ,WZ,W(1,5)) |
4130 | + CALL FFV1_2_3(W(1,1),W(1,3),GUZ1,GUZ2,MZ, FK_WZ,W(1,5)) |
4131 | C Amplitude(s) for diagram number 6 |
4132 | CALL FFV1_2_0(W(1,4),W(1,2),W(1,5),GUZ1,GUZ2,AMP(6)) |
4133 | C JAMPs contributing to orders ALL_ORDERS=1 |
4134 | |
4135 | === modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f' |
4136 | --- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f 2017-11-26 00:21:49 +0000 |
4137 | +++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_madevent_nogroup/matrix.f 2018-11-09 10:32:12 +0000 |
4138 | @@ -51,6 +51,7 @@ |
4139 | INTEGER IDUM, NGOOD, IGOOD(NCOMB), JHEL, J, JJ |
4140 | REAL XRAN1 |
4141 | EXTERNAL XRAN1 |
4142 | + |
4143 | C |
4144 | C GLOBAL VARIABLES |
4145 | C |
4146 | @@ -71,6 +72,7 @@ |
4147 | DATA IDUM /-1/ |
4148 | DATA XTRY, XREJ, NGOOD /0,0,0/ |
4149 | SAVE YFRAC, IGOOD, JHEL |
4150 | + |
4151 | DATA (NHEL(I, 1),I=1,4) / 1,-1,-1,-1/ |
4152 | DATA (NHEL(I, 2),I=1,4) / 1,-1,-1, 1/ |
4153 | DATA (NHEL(I, 3),I=1,4) / 1,-1, 1,-1/ |
4154 | @@ -261,6 +263,13 @@ |
4155 | C Needed for v4 models |
4156 | COMPLEX*16 DUM0,DUM1 |
4157 | DATA DUM0, DUM1/(0D0, 0D0), (1D0, 0D0)/ |
4158 | + |
4159 | + DOUBLE PRECISION FK_ZERO |
4160 | + SAVE FK_ZERO |
4161 | + |
4162 | + LOGICAL FIRST |
4163 | + DATA FIRST /.TRUE./ |
4164 | + SAVE FIRST |
4165 | C |
4166 | C FUNCTION |
4167 | C |
4168 | @@ -271,6 +280,9 @@ |
4169 | DOUBLE PRECISION AMP2(MAXAMPS), JAMP2(0:MAXFLOW) |
4170 | COMMON/TO_AMPS/ AMP2, JAMP2 |
4171 | INCLUDE 'coupl.inc' |
4172 | + |
4173 | + DOUBLE PRECISION SMALL_WIDTH_TREATMENT |
4174 | + COMMON/NARROW_WIDTH/SMALL_WIDTH_TREATMENT |
4175 | C |
4176 | C COLOR DATA |
4177 | C |
4178 | @@ -283,17 +295,22 @@ |
4179 | C ---------- |
4180 | C BEGIN CODE |
4181 | C ---------- |
4182 | + IF (FIRST) THEN |
4183 | + FIRST=.FALSE. |
4184 | + FK_ZERO = 0D0 |
4185 | + ENDIF |
4186 | + |
4187 | CALL IXXXXX(P(0,1),ZERO,NHEL(1),+1*IC(1),W(1,1)) |
4188 | CALL OXXXXX(P(0,2),ZERO,NHEL(2),-1*IC(2),W(1,2)) |
4189 | CALL VXXXXX(P(0,3),ZERO,NHEL(3),+1*IC(3),W(1,3)) |
4190 | CALL VXXXXX(P(0,4),ZERO,NHEL(4),+1*IC(4),W(1,4)) |
4191 | - CALL FFV1_3(W(1,1),W(1,2),GQQ,ZERO,ZERO,W(1,5)) |
4192 | + CALL FFV1_3(W(1,1),W(1,2),GQQ,ZERO, FK_ZERO,W(1,5)) |
4193 | C Amplitude(s) for diagram number 1 |
4194 | CALL VVV1_0(W(1,3),W(1,4),W(1,5),G,AMP(1)) |
4195 | - CALL FFV1_2(W(1,1),W(1,3),GQQ,ZERO,ZERO,W(1,5)) |
4196 | + CALL FFV1_2(W(1,1),W(1,3),GQQ,ZERO, FK_ZERO,W(1,5)) |
4197 | C Amplitude(s) for diagram number 2 |
4198 | CALL FFV1_0(W(1,5),W(1,2),W(1,4),GQQ,AMP(2)) |
4199 | - CALL FFV1_2(W(1,1),W(1,4),GQQ,ZERO,ZERO,W(1,5)) |
4200 | + CALL FFV1_2(W(1,1),W(1,4),GQQ,ZERO, FK_ZERO,W(1,5)) |
4201 | C Amplitude(s) for diagram number 3 |
4202 | CALL FFV1_0(W(1,5),W(1,2),W(1,3),GQQ,AMP(3)) |
4203 | C JAMPs contributing to orders ALL_ORDERS=1 |
4204 | |
4205 | === removed file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%GOLEM_interface.f' |
4206 | --- 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 |
4207 | +++ 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 |
4208 | @@ -1,823 +0,0 @@ |
4209 | - SUBROUTINE ML5_0_GOLEMLOOP(NLOOPLINE,PL,M2L,RANK,RES,STABLE) |
4210 | -C |
4211 | -C Generated by MadGraph5_aMC@NLO v. %(version)s, %(date)s |
4212 | -C By the MadGraph5_aMC@NLO Development Team |
4213 | -C Visit launchpad.net/madgraph5 and amcatnlo.web.cern.ch |
4214 | -C |
4215 | -C Interface between MG5 and Golem95. |
4216 | -C The Golem95 version should be higher than 1.3.0. |
4217 | -C It supports RANK = NLOOPLINE + 1 tensor integrals when 1 < |
4218 | -C NLOOPLINE < 6. |
4219 | -C |
4220 | -C Process: g g > t t~ [ virt = QCD ] |
4221 | -C |
4222 | -C |
4223 | -C MODULES |
4224 | -C |
4225 | - USE MATRICE_S |
4226 | - USE FORM_FACTOR_TYPE, ONLY: FORM_FACTOR |
4227 | - USE PRECISION_GOLEM, ONLY: KI |
4228 | - USE TENS_COMB |
4229 | - USE TENS_REC |
4230 | - USE FORM_FACTOR_1P, ONLY: A10 |
4231 | - USE FORM_FACTOR_2P, ONLY: A20 |
4232 | - USE FORM_FACTOR_3P, ONLY: A30 |
4233 | - USE FORM_FACTOR_4P, ONLY: A40 |
4234 | - USE FORM_FACTOR_5P, ONLY: A50 |
4235 | - USE FORM_FACTOR_6P, ONLY: A60 |
4236 | - IMPLICIT NONE |
4237 | -C |
4238 | -C CONSTANTS |
4239 | -C |
4240 | - INTEGER NEXTERNAL |
4241 | - PARAMETER (NEXTERNAL=4) |
4242 | - LOGICAL CHECKPCONSERVATION |
4243 | - PARAMETER (CHECKPCONSERVATION=.TRUE.) |
4244 | - REAL*8 NORMALIZATION |
4245 | - PARAMETER (NORMALIZATION = 1.D0/(16.D0*3.14159265358979323846D0* |
4246 | - $ *2)) |
4247 | - REAL(KI),DIMENSION(0:3),PARAMETER::NULL_VEC = (/0.0_KI,0.0_KI |
4248 | - $ ,0.0_KI,0.0_KI/) |
4249 | -C GOLEM_RUN_MODE = 1: Use directly MadLoop tensorial coefficients |
4250 | -C GOLEM_RUN_MODE = 2: Reconstruct the tensorial coefficeints |
4251 | -C directly from |
4252 | -C numerator using golem internal reconstruction routine |
4253 | -C GOLEM_RUN_MODE = 3: Cross-checked reconstructed coefficients |
4254 | -C against |
4255 | -C MadLoop internal ones. |
4256 | - INTEGER GOLEM_RUN_MODE |
4257 | - PARAMETER (GOLEM_RUN_MODE=1) |
4258 | -C The following is the acceptance threshold used for |
4259 | -C GOLEM_RUN_MODE = 3 |
4260 | - REAL*8 COEF_CHECK_THRS |
4261 | - DATA COEF_CHECK_THRS/1.0D-13/ |
4262 | - COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS |
4263 | - |
4264 | - LOGICAL PASS_COEF_CHECK |
4265 | -C |
4266 | -C ARGUMENTS |
4267 | -C |
4268 | - INTEGER NLOOPLINE, RANK |
4269 | - REAL*8 PL(0:3,NLOOPLINE) |
4270 | - REAL*8 PCT(0:3,0:NLOOPLINE-1), ABSPCT(0:3) |
4271 | - REAL*8 REF_P |
4272 | - REAL(KI) PGOLEM(NLOOPLINE,0:3) |
4273 | - COMPLEX*16 M2L(NLOOPLINE) |
4274 | - COMPLEX(KI) M2LGOLEM(NLOOPLINE) |
4275 | - COMPLEX*16 RES(3) |
4276 | - LOGICAL STABLE |
4277 | -C |
4278 | -C LOCAL VARIABLES |
4279 | -C |
4280 | - INTEGER I, J, K |
4281 | - TYPE(FORM_FACTOR)::RES_GOLEM |
4282 | - |
4283 | - COMPLEX(KI)::COEFFS0,COEFFS0_REC |
4284 | - TYPE(COEFF_TYPE_1)::COEFFS1,COEFFS1_REC |
4285 | - TYPE(COEFF_TYPE_2)::COEFFS2,COEFFS2_REC |
4286 | - TYPE(COEFF_TYPE_3)::COEFFS3,COEFFS3_REC |
4287 | - TYPE(COEFF_TYPE_4)::COEFFS4,COEFFS4_REC |
4288 | - TYPE(COEFF_TYPE_5)::COEFFS5,COEFFS5_REC |
4289 | - TYPE(COEFF_TYPE_6)::COEFFS6,COEFFS6_REC |
4290 | - |
4291 | -C The pinch propagator optimization is not used, so for now it is |
4292 | -C always 0. |
4293 | - INTEGER PINCH |
4294 | -C |
4295 | -C EXTERNAL FUNCTIONS |
4296 | -C |
4297 | - COMPLEX(KI) ML5_0_GOLEM_LOOPNUM |
4298 | - EXTERNAL ML5_0_GOLEM_LOOPNUM |
4299 | - LOGICAL ML5_0_COMPARE_COEFS_0 |
4300 | - LOGICAL ML5_0_COMPARE_COEFS_1 |
4301 | - LOGICAL ML5_0_COMPARE_COEFS_2 |
4302 | - LOGICAL ML5_0_COMPARE_COEFS_3 |
4303 | - LOGICAL ML5_0_COMPARE_COEFS_4 |
4304 | - LOGICAL ML5_0_COMPARE_COEFS_5 |
4305 | - LOGICAL ML5_0_COMPARE_COEFS_6 |
4306 | -C |
4307 | -C GLOBAL VARIABLES |
4308 | -C |
4309 | - INCLUDE 'coupl.inc' |
4310 | - INTEGER CTMODE |
4311 | - REAL*8 LSCALE |
4312 | - COMMON/ML5_0_CT/LSCALE,CTMODE |
4313 | - |
4314 | - INTEGER ID,SQSOINDEX,R |
4315 | - COMMON/ML5_0_LOOP/ID,SQSOINDEX,R |
4316 | - |
4317 | - LOGICAL CTINIT, TIRINIT, GOLEMINIT, SAMURAIINIT, NINJAINIT |
4318 | - $ ,COLLIERINIT |
4319 | - COMMON/REDUCTIONCODEINIT/CTINIT, TIRINIT,GOLEMINIT,SAMURAIINIT |
4320 | - $ ,NINJAINIT,COLLIERINIT |
4321 | - |
4322 | - INTEGER NLOOPGROUPS |
4323 | - PARAMETER (NLOOPGROUPS=26) |
4324 | - INTEGER NSQUAREDSO |
4325 | - PARAMETER (NSQUAREDSO=1) |
4326 | - INCLUDE 'loop_max_coefs.inc' |
4327 | - |
4328 | - COMPLEX*16 LOOPCOEFS(0:LOOPMAXCOEFS-1,NSQUAREDSO,NLOOPGROUPS) |
4329 | - COMMON/ML5_0_LCOEFS/LOOPCOEFS |
4330 | -C ---------- |
4331 | -C BEGIN CODE |
4332 | -C ---------- |
4333 | - |
4334 | -C The CT initialization is also performed here if not done already |
4335 | -C because it calls MPINIT of OneLOop which is necessary on some |
4336 | -C system |
4337 | - IF (CTINIT) THEN |
4338 | - CTINIT=.FALSE. |
4339 | - CALL ML5_0_INITCT() |
4340 | - ENDIF |
4341 | - |
4342 | -C INITIALIZE GOLEM IF NEEDED |
4343 | - IF (GOLEMINIT) THEN |
4344 | - GOLEMINIT=.FALSE. |
4345 | - CALL ML5_0_INITGOLEM() |
4346 | - ENDIF |
4347 | - |
4348 | -C No stability test intrisic to Golem95 now |
4349 | - STABLE=.TRUE. |
4350 | - |
4351 | -C This initialization must be done for each reduction because we |
4352 | -C have not setup anyoptimization using pinched propagators yet. |
4353 | - CALL INITGOLEM95(NLOOPLINE) |
4354 | - PINCH = 0 |
4355 | - |
4356 | -C YOU CAN FIND THE DETAILS ABOUT THE DIFFERENT CTMODE AT THE |
4357 | -C BEGINNING OF THE FILE CTS_CUTS.F90 IN THE CUTTOOLS DISTRIBUTION |
4358 | - |
4359 | -C CONVERT THE MASSES TO BE COMPLEX |
4360 | - DO I=1,NLOOPLINE |
4361 | - M2LGOLEM(I)=M2L(I) |
4362 | - ENDDO |
4363 | - |
4364 | -C CONVERT THE MOMENTA FLOWING IN THE LOOP LINES TO CT CONVENTIONS |
4365 | - DO I=0,3 |
4366 | - ABSPCT(I) = 0.D0 |
4367 | - DO J=0,(NLOOPLINE-1) |
4368 | - PCT(I,J)=0.D0 |
4369 | - ENDDO |
4370 | - ENDDO |
4371 | - DO I=0,3 |
4372 | - DO J=1,NLOOPLINE |
4373 | - PCT(I,0)=PCT(I,0)+PL(I,J) |
4374 | - ABSPCT(I)=ABSPCT(I)+ABS(PL(I,J)) |
4375 | - ENDDO |
4376 | - ENDDO |
4377 | - REF_P = MAX(ABSPCT(0), ABSPCT(1),ABSPCT(2),ABSPCT(3)) |
4378 | - DO I=0,3 |
4379 | - ABSPCT(I) = MAX(REF_P*1E-6, ABSPCT(I)) |
4380 | - ENDDO |
4381 | - IF (CHECKPCONSERVATION.AND.REF_P.GT.1D-8) THEN |
4382 | - IF ((PCT(0,0)/ABSPCT(0)).GT.1.D-6) THEN |
4383 | - WRITE(*,*) 'energy is not conserved ',PCT(0,0) |
4384 | - STOP 'energy is not conserved' |
4385 | - ELSEIF ((PCT(1,0)/ABSPCT(1)).GT.1.D-6) THEN |
4386 | - WRITE(*,*) 'px is not conserved ',PCT(1,0) |
4387 | - STOP 'px is not conserved' |
4388 | - ELSEIF ((PCT(2,0)/ABSPCT(2)).GT.1.D-6) THEN |
4389 | - WRITE(*,*) 'py is not conserved ',PCT(2,0) |
4390 | - STOP 'py is not conserved' |
4391 | - ELSEIF ((PCT(3,0)/ABSPCT(3)).GT.1.D-6) THEN |
4392 | - WRITE(*,*) 'pz is not conserved ',PCT(3,0) |
4393 | - STOP 'pz is not conserved' |
4394 | - ENDIF |
4395 | - ENDIF |
4396 | - DO I=0,3 |
4397 | - DO J=1,(NLOOPLINE-1) |
4398 | - DO K=1,J |
4399 | - PCT(I,J)=PCT(I,J)+PL(I,K) |
4400 | - ENDDO |
4401 | - ENDDO |
4402 | - ENDDO |
4403 | - |
4404 | -C Now convert the loop momenta to Golem95 conventions |
4405 | - DO I=0,3 |
4406 | - PGOLEM(1,I)=0.0E0_KI |
4407 | - DO J=2,NLOOPLINE |
4408 | - PGOLEM(J,I)=PCT(I,J-1) |
4409 | - ENDDO |
4410 | - ENDDO |
4411 | - |
4412 | -C Fill in the kinematic s-matrix while taking care of on-shell |
4413 | -C limits. |
4414 | - CALL ML5_0_SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2LGOLEM) |
4415 | -C Construct the golem internal matrices derived from the kinetic |
4416 | -C one. |
4417 | - CALL PREPARESMATRIX() |
4418 | - |
4419 | -C Fill in the golem coefficents and compute the loop |
4420 | - IF(GOLEM_RUN_MODE.EQ.2)THEN |
4421 | - RES_GOLEM = EVALUATE_B(ML5_0_GOLEM_LOOPNUM,PGOLEM,0,RANK) |
4422 | - ELSE |
4423 | - PASS_COEF_CHECK=.TRUE. |
4424 | - SELECT CASE(RANK) |
4425 | - CASE(0) |
4426 | - CALL ML5_0_FILL_GOLEM_COEFFS_0(LOOPCOEFS(0,SQSOINDEX,ID) |
4427 | - $ ,COEFFS0) |
4428 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
4429 | - COEFFS0_REC = ML5_0_GOLEM_LOOPNUM(NULL_VEC,0.0_KI) |
4430 | - PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_0(COEFFS0,COEFFS0_REC) |
4431 | - ENDIF |
4432 | - CASE(1) |
4433 | - CALL ML5_0_FILL_GOLEM_COEFFS_1(LOOPCOEFS(0,SQSOINDEX,ID) |
4434 | - $ ,COEFFS1) |
4435 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
4436 | - CALL RECONSTRUCT1(ML5_0_GOLEM_LOOPNUM,COEFFS1_REC) |
4437 | - PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_1(COEFFS1,COEFFS1_REC) |
4438 | - ENDIF |
4439 | - CASE(2) |
4440 | - CALL ML5_0_FILL_GOLEM_COEFFS_2(LOOPCOEFS(0,SQSOINDEX,ID) |
4441 | - $ ,COEFFS2) |
4442 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
4443 | - CALL RECONSTRUCT2(ML5_0_GOLEM_LOOPNUM,COEFFS2_REC) |
4444 | - PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_2(COEFFS2,COEFFS2_REC) |
4445 | - ENDIF |
4446 | - CASE(3) |
4447 | - CALL ML5_0_FILL_GOLEM_COEFFS_3(LOOPCOEFS(0,SQSOINDEX,ID) |
4448 | - $ ,COEFFS3) |
4449 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
4450 | - CALL RECONSTRUCT3(ML5_0_GOLEM_LOOPNUM,COEFFS3_REC) |
4451 | - PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_3(COEFFS3,COEFFS3_REC) |
4452 | - ENDIF |
4453 | - CASE(4) |
4454 | - CALL ML5_0_FILL_GOLEM_COEFFS_4(LOOPCOEFS(0,SQSOINDEX,ID) |
4455 | - $ ,COEFFS4) |
4456 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
4457 | - CALL RECONSTRUCT4(ML5_0_GOLEM_LOOPNUM,COEFFS4_REC) |
4458 | - PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_4(COEFFS4,COEFFS4_REC) |
4459 | - ENDIF |
4460 | - CASE(5) |
4461 | - CALL ML5_0_FILL_GOLEM_COEFFS_5(LOOPCOEFS(0,SQSOINDEX,ID) |
4462 | - $ ,COEFFS5) |
4463 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
4464 | - CALL RECONSTRUCT5(ML5_0_GOLEM_LOOPNUM,COEFFS5_REC) |
4465 | - PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_5(COEFFS5,COEFFS5_REC) |
4466 | - ENDIF |
4467 | - CASE(6) |
4468 | - CALL ML5_0_FILL_GOLEM_COEFFS_6(LOOPCOEFS(0,SQSOINDEX,ID) |
4469 | - $ ,COEFFS6) |
4470 | - IF(GOLEM_RUN_MODE.EQ.3)THEN |
4471 | - CALL RECONSTRUCT6(ML5_0_GOLEM_LOOPNUM,COEFFS6_REC) |
4472 | - PASS_COEF_CHECK=ML5_0_COMPARE_COEFS_6(COEFFS6,COEFFS6_REC) |
4473 | - ENDIF |
4474 | - CASE DEFAULT |
4475 | - WRITE(*,*)'Not yet implemented in Golem95 for rank= ',RANK |
4476 | - STOP |
4477 | - END SELECT |
4478 | - |
4479 | - IF(.NOT.PASS_COEF_CHECK)THEN |
4480 | - WRITE(*,*)'Coefs mismatch for ID ',ID,' and rank ',RANK |
4481 | - WRITE(*,*)'Coefs form MadLoop5:' |
4482 | - SELECT CASE(RANK) |
4483 | - CASE(0) |
4484 | - WRITE(*,*)'Constant coef = ',COEFFS0 |
4485 | - CASE(1) |
4486 | - CALL PRINT_COEFFS(COEFFS1) |
4487 | - CASE(2) |
4488 | - CALL PRINT_COEFFS(COEFFS2) |
4489 | - CASE(3) |
4490 | - CALL PRINT_COEFFS(COEFFS3) |
4491 | - CASE(4) |
4492 | - CALL PRINT_COEFFS(COEFFS4) |
4493 | - CASE(5) |
4494 | - CALL PRINT_COEFFS(COEFFS5) |
4495 | - CASE(6) |
4496 | - CALL PRINT_COEFFS(COEFFS6) |
4497 | - END SELECT |
4498 | - WRITE(*,*)'Coefs reconstructed by Golem95:' |
4499 | - SELECT CASE(RANK) |
4500 | - CASE(0) |
4501 | - WRITE(*,*)'Constant coef = ',COEFFS0_REC |
4502 | - CASE(1) |
4503 | - CALL PRINT_COEFFS(COEFFS1_REC) |
4504 | - CASE(2) |
4505 | - CALL PRINT_COEFFS(COEFFS2_REC) |
4506 | - CASE(3) |
4507 | - CALL PRINT_COEFFS(COEFFS3_REC) |
4508 | - CASE(4) |
4509 | - CALL PRINT_COEFFS(COEFFS4_REC) |
4510 | - CASE(5) |
4511 | - CALL PRINT_COEFFS(COEFFS5_REC) |
4512 | - CASE(6) |
4513 | - CALL PRINT_COEFFS(COEFFS6_REC) |
4514 | - END SELECT |
4515 | - STOP |
4516 | - ENDIF |
4517 | - |
4518 | - SELECT CASE(NLOOPLINE) |
4519 | - CASE(1) |
4520 | - WRITE(*,*)'Golem95 cannot handle with tadpole yet' |
4521 | - STOP |
4522 | - CASE(2) |
4523 | - SELECT CASE(RANK) |
4524 | - CASE(0) |
4525 | - RES_GOLEM = COEFFS0*A20(PINCH) |
4526 | - CASE(1) |
4527 | - RES_GOLEM = CONTRACT2_1(COEFFS1,PGOLEM,PINCH) |
4528 | - CASE(2) |
4529 | - RES_GOLEM = CONTRACT2_2(COEFFS2,PGOLEM,PINCH) |
4530 | - CASE(3) |
4531 | - RES_GOLEM = CONTRACT2_3(COEFFS3,PGOLEM,PINCH) |
4532 | - CASE DEFAULT |
4533 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',2,RANK |
4534 | - STOP |
4535 | - END SELECT |
4536 | - CASE(3) |
4537 | - SELECT CASE(RANK) |
4538 | - CASE(0) |
4539 | - RES_GOLEM = COEFFS0*A30(PINCH) |
4540 | - CASE(1) |
4541 | - RES_GOLEM = CONTRACT3_1(COEFFS1,PGOLEM,PINCH) |
4542 | - CASE(2) |
4543 | - RES_GOLEM = CONTRACT3_2(COEFFS2,PGOLEM,PINCH) |
4544 | - CASE(3) |
4545 | - RES_GOLEM = CONTRACT3_3(COEFFS3,PGOLEM,PINCH) |
4546 | - CASE(4) |
4547 | - RES_GOLEM = CONTRACT3_4(COEFFS4,PGOLEM,PINCH) |
4548 | - CASE DEFAULT |
4549 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',3,RANK |
4550 | - STOP |
4551 | - END SELECT |
4552 | - CASE(4) |
4553 | - SELECT CASE(RANK) |
4554 | - CASE(0) |
4555 | - RES_GOLEM = COEFFS0*A40(PINCH) |
4556 | - CASE(1) |
4557 | - RES_GOLEM = CONTRACT4_1(COEFFS1,PGOLEM,PINCH) |
4558 | - CASE(2) |
4559 | - RES_GOLEM = CONTRACT4_2(COEFFS2,PGOLEM,PINCH) |
4560 | - CASE(3) |
4561 | - RES_GOLEM = CONTRACT4_3(COEFFS3,PGOLEM,PINCH) |
4562 | - CASE(4) |
4563 | - RES_GOLEM = CONTRACT4_4(COEFFS4,PGOLEM,PINCH) |
4564 | - CASE(5) |
4565 | - RES_GOLEM = CONTRACT4_5(COEFFS5,PGOLEM,PINCH) |
4566 | - CASE DEFAULT |
4567 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',4,RANK |
4568 | - STOP |
4569 | - END SELECT |
4570 | - CASE(5) |
4571 | - SELECT CASE(RANK) |
4572 | - CASE(0) |
4573 | - RES_GOLEM = COEFFS0*A50(PINCH) |
4574 | - CASE(1) |
4575 | - RES_GOLEM = CONTRACT5_1(COEFFS1,PGOLEM,PINCH) |
4576 | - CASE(2) |
4577 | - RES_GOLEM = CONTRACT5_2(COEFFS2,PGOLEM,PINCH) |
4578 | - CASE(3) |
4579 | - RES_GOLEM = CONTRACT5_3(COEFFS3,PGOLEM,PINCH) |
4580 | - CASE(4) |
4581 | - RES_GOLEM = CONTRACT5_4(COEFFS4,PGOLEM,PINCH) |
4582 | - CASE(5) |
4583 | - RES_GOLEM = CONTRACT5_5(COEFFS5,PGOLEM,PINCH) |
4584 | - CASE(6) |
4585 | - RES_GOLEM = CONTRACT5_6(COEFFS6,PGOLEM,PINCH) |
4586 | - CASE DEFAULT |
4587 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',5,RANK |
4588 | - STOP |
4589 | - END SELECT |
4590 | - CASE(6) |
4591 | - SELECT CASE(RANK) |
4592 | - CASE(0) |
4593 | - RES_GOLEM = COEFFS0*A60(PINCH) |
4594 | - CASE(1) |
4595 | - RES_GOLEM = CONTRACT6_1(COEFFS1,PGOLEM,PINCH) |
4596 | - CASE(2) |
4597 | - RES_GOLEM = CONTRACT6_2(COEFFS2,PGOLEM,PINCH) |
4598 | - CASE(3) |
4599 | - RES_GOLEM = CONTRACT6_3(COEFFS3,PGOLEM,PINCH) |
4600 | - CASE(4) |
4601 | - RES_GOLEM = CONTRACT6_4(COEFFS4,PGOLEM,PINCH) |
4602 | - CASE(5) |
4603 | - RES_GOLEM = CONTRACT6_5(COEFFS5,PGOLEM,PINCH) |
4604 | - CASE(6) |
4605 | - RES_GOLEM = CONTRACT6_6(COEFFS6,PGOLEM,PINCH) |
4606 | - CASE DEFAULT |
4607 | - WRITE(*,*)'Golem95 cannot handle with: N,r = ',6,RANK |
4608 | - STOP |
4609 | - END SELECT |
4610 | - CASE DEFAULT |
4611 | - WRITE(*,*)'Golem95 cannot handle with: N = ',NLOOPLINE |
4612 | - STOP |
4613 | - END SELECT |
4614 | - ENDIF |
4615 | - |
4616 | - RES(1)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%C+2.0*LOG(MU_R) |
4617 | - $ *RES_GOLEM%%B+2.0*LOG(MU_R)**2*RES_GOLEM%%A) |
4618 | - RES(2)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%B+2.0*LOG(MU_R) |
4619 | - $ *RES_GOLEM%%A) |
4620 | - RES(3)=NORMALIZATION*2.0D0*DBLE(RES_GOLEM%%A) |
4621 | -C WRITE(*,*) 'Loop ID',ID,' =',RES(1),RES(2),RES(3) |
4622 | - |
4623 | -C Finally free golem memory and cache |
4624 | - CALL EXITGOLEM95() |
4625 | - |
4626 | - END |
4627 | - |
4628 | - FUNCTION ML5_0_GOLEM_LOOPNUM(Q,MU2) |
4629 | - USE PRECISION_GOLEM, ONLY: KI |
4630 | - REAL(KI),DIMENSION(0:3),INTENT(IN)::Q |
4631 | - REAL(KI),INTENT(IN)::MU2 |
4632 | - COMPLEX(KI)::ML5_0_GOLEM_LOOPNUM |
4633 | - |
4634 | - COMPLEX*16 QQ(0:3),NUM |
4635 | - INTEGER I |
4636 | - |
4637 | - DO I=0,3 |
4638 | - QQ(I)=CMPLX(Q(I),0.0D0,KIND=16) |
4639 | - ENDDO |
4640 | - |
4641 | - CALL ML5_0_LOOPNUM(QQ,NUM) |
4642 | - ML5_0_GOLEM_LOOPNUM=NUM |
4643 | - RETURN |
4644 | - END FUNCTION |
4645 | - |
4646 | - SUBROUTINE ML5_0_INITGOLEM() |
4647 | -C |
4648 | -C INITIALISATION OF GOLEM |
4649 | -C |
4650 | -C |
4651 | -C MODULE |
4652 | -C |
4653 | - USE PARAMETRE |
4654 | -C |
4655 | -C LOCAL VARIABLES |
4656 | -C |
4657 | - REAL*8 THRS |
4658 | - LOGICAL EXT_NUM_FOR_R1 |
4659 | -C |
4660 | -C GLOBAL VARIABLES |
4661 | -C |
4662 | - INCLUDE 'MadLoopParams.inc' |
4663 | -C ---------- |
4664 | -C BEGIN CODE |
4665 | -C ---------- |
4666 | - |
4667 | -C DEFAULT PARAMETERS FOR GOLEM |
4668 | -C ------------------------------- |
4669 | -C One can chose here to have either just the rational R1 piece |
4670 | -C or everything but the R2 |
4671 | - RAT_OR_TOT_PAR = TOT |
4672 | - |
4673 | - END |
4674 | - |
4675 | - SUBROUTINE ML5_0_SETUP_KIN_MATRIX(NLOOPLINE,PGOLEM,M2L) |
4676 | -C |
4677 | -C MODULE |
4678 | -C |
4679 | - USE MATRICE_S |
4680 | - USE PRECISION_GOLEM, ONLY: KI |
4681 | -C |
4682 | -C ARGUMENTS |
4683 | -C |
4684 | - INTEGER NLOOPLINE |
4685 | - REAL(KI) PGOLEM(NLOOPLINE,0:3) |
4686 | - COMPLEX(KI) M2L(NLOOPLINE) |
4687 | -C |
4688 | -C LOCAL VARIABLES |
4689 | -C |
4690 | - INTEGER I,J |
4691 | - COMPLEX*16 S_MAT_FROM_MG(NLOOPLINE,NLOOPLINE) |
4692 | -C ---------- |
4693 | -C BEGIN CODE |
4694 | -C ---------- |
4695 | - |
4696 | - CALL ML5_0_BUILD_KINEMATIC_MATRIX(NLOOPLINE,PGOLEM,M2L |
4697 | - $ ,S_MAT_FROM_MG) |
4698 | - |
4699 | - DO I=1,NLOOPLINE |
4700 | - DO J=1,NLOOPLINE |
4701 | - S_MAT(I,J)=S_MAT_FROM_MG(I,J) |
4702 | - ENDDO |
4703 | - ENDDO |
4704 | - |
4705 | - END |
4706 | - |
4707 | - FUNCTION ML5_0_COMPARE_COEFS_0(COEFS_A,COEFS_B) |
4708 | - |
4709 | - USE PRECISION_GOLEM, ONLY: KI |
4710 | - COMPLEX(KI) COEFS_A,COEFS_B |
4711 | - REAL*8 COEF_CHECK_THRS |
4712 | - COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS |
4713 | - REAL*8 DENOM,NUM |
4714 | - LOGICAL ML5_0_COMPARE_COEFS_0 |
4715 | - |
4716 | - NUM = ABS(COEFS_A-COEFS_B) |
4717 | - DENOM = ABS(COEFS_A+COEFS_B) |
4718 | - IF(DENOM.GT.0D0)THEN |
4719 | - ML5_0_COMPARE_COEFS_0=((NUM/DENOM).LT.COEF_CHECK_THRS) |
4720 | - ELSE |
4721 | - ML5_0_COMPARE_COEFS_0=(NUM.LT.COEF_CHECK_THRS) |
4722 | - ENDIF |
4723 | - |
4724 | - END |
4725 | - |
4726 | - FUNCTION ML5_0_COMPARE_COEFS_1(COEFS_A,COEFS_B) |
4727 | - |
4728 | - USE TENS_REC |
4729 | - TYPE(COEFF_TYPE_1)COEFS_A,COEFS_B |
4730 | - REAL*8 COEF_CHECK_THRS |
4731 | - COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS |
4732 | - REAL*8 DENOM,NUM |
4733 | - LOGICAL ML5_0_COMPARE_COEFS_1 |
4734 | - |
4735 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
4736 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
4737 | - $ ) |
4738 | - |
4739 | - IF(DENOM.GT.0D0)THEN |
4740 | - ML5_0_COMPARE_COEFS_1=((NUM/DENOM).LT.COEF_CHECK_THRS) |
4741 | - ELSE |
4742 | - ML5_0_COMPARE_COEFS_1=(NUM.LT.COEF_CHECK_THRS) |
4743 | - ENDIF |
4744 | - |
4745 | - END |
4746 | - |
4747 | - FUNCTION ML5_0_COMPARE_COEFS_2(COEFS_A,COEFS_B) |
4748 | - |
4749 | - USE TENS_REC |
4750 | - TYPE(COEFF_TYPE_2) COEFS_A,COEFS_B |
4751 | - REAL*8 COEF_CHECK_THRS |
4752 | - COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS |
4753 | - REAL*8 DENOM,NUM |
4754 | - LOGICAL ML5_0_COMPARE_COEFS_2 |
4755 | - |
4756 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
4757 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2)) |
4758 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
4759 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2)) |
4760 | - IF(DENOM.GT.0D0)THEN |
4761 | - ML5_0_COMPARE_COEFS_2=((NUM/DENOM).LT.COEF_CHECK_THRS) |
4762 | - ELSE |
4763 | - ML5_0_COMPARE_COEFS_2=(NUM.LT.COEF_CHECK_THRS) |
4764 | - ENDIF |
4765 | - |
4766 | - END |
4767 | - |
4768 | - FUNCTION ML5_0_COMPARE_COEFS_3(COEFS_A,COEFS_B) |
4769 | - |
4770 | - USE TENS_REC |
4771 | - TYPE(COEFF_TYPE_3) COEFS_A, COEFS_B |
4772 | - REAL*8 COEF_CHECK_THRS |
4773 | - COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS |
4774 | - REAL*8 DENOM,NUM |
4775 | - LOGICAL ML5_0_COMPARE_COEFS_3 |
4776 | - |
4777 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
4778 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3)) |
4779 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
4780 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3) |
4781 | - $ ) |
4782 | - IF(DENOM.GT.0D0)THEN |
4783 | - ML5_0_COMPARE_COEFS_3=((NUM/DENOM).LT.COEF_CHECK_THRS) |
4784 | - ELSE |
4785 | - ML5_0_COMPARE_COEFS_3=(NUM.LT.COEF_CHECK_THRS) |
4786 | - ENDIF |
4787 | - |
4788 | - END |
4789 | - |
4790 | - FUNCTION ML5_0_COMPARE_COEFS_4(COEFS_A,COEFS_B) |
4791 | - |
4792 | - USE TENS_REC |
4793 | - TYPE(COEFF_TYPE_4) COEFS_A, COEFS_B |
4794 | - REAL*8 COEF_CHECK_THRS |
4795 | - COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS |
4796 | - REAL*8 DENOM,NUM |
4797 | - LOGICAL ML5_0_COMPARE_COEFS_4 |
4798 | - |
4799 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
4800 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3)) |
4801 | - $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4)) |
4802 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
4803 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3) |
4804 | - $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4)) |
4805 | - IF(DENOM.GT.0D0)THEN |
4806 | - ML5_0_COMPARE_COEFS_4=((NUM/DENOM).LT.COEF_CHECK_THRS) |
4807 | - ELSE |
4808 | - ML5_0_COMPARE_COEFS_4=(NUM.LT.COEF_CHECK_THRS) |
4809 | - ENDIF |
4810 | - |
4811 | - END |
4812 | - |
4813 | - FUNCTION ML5_0_COMPARE_COEFS_5(COEFS_A,COEFS_B) |
4814 | - |
4815 | - USE TENS_REC |
4816 | - TYPE(COEFF_TYPE_5) COEFS_A,COEFS_B |
4817 | - REAL*8 COEF_CHECK_THRS |
4818 | - COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS |
4819 | - REAL*8 DENOM,NUM |
4820 | - LOGICAL ML5_0_COMPARE_COEFS_5 |
4821 | - |
4822 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
4823 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3)) |
4824 | - $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4)) |
4825 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
4826 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3) |
4827 | - $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4)) |
4828 | - IF(DENOM.GT.0D0)THEN |
4829 | - ML5_0_COMPARE_COEFS_5=((NUM/DENOM).LT.COEF_CHECK_THRS) |
4830 | - ELSE |
4831 | - ML5_0_COMPARE_COEFS_5=(NUM.LT.COEF_CHECK_THRS) |
4832 | - ENDIF |
4833 | - |
4834 | - END |
4835 | - |
4836 | - FUNCTION ML5_0_COMPARE_COEFS_6(COEFS_A,COEFS_B) |
4837 | - |
4838 | - USE TENS_REC |
4839 | - TYPE(COEFF_TYPE_6) COEFS_A,COEFS_B |
4840 | - REAL*8 COEF_CHECK_THRS |
4841 | - COMMON/ML5_0_COEF_CHECK_THRS/COEF_CHECK_THRS |
4842 | - REAL*8 DENOM,NUM |
4843 | - LOGICAL ML5_0_COMPARE_COEFS_6 |
4844 | - |
4845 | - NUM = ABS(COEFS_A%%C0-COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1-COEFS_B%%C1)) |
4846 | - $ +SUM(ABS(COEFS_A%%C2-COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3-COEFS_B%%C3)) |
4847 | - $ +SUM(ABS(COEFS_A%%C4-COEFS_B%%C4)) |
4848 | - DENOM = ABS(COEFS_A%%C0+COEFS_B%%C0)+SUM(ABS(COEFS_A%%C1+COEFS_B%%C1) |
4849 | - $ )+SUM(ABS(COEFS_A%%C2+COEFS_B%%C2))+SUM(ABS(COEFS_A%%C3+COEFS_B%%C3) |
4850 | - $ )+SUM(ABS(COEFS_A%%C4+COEFS_B%%C4)) |
4851 | - IF(DENOM.GT.0D0)THEN |
4852 | - ML5_0_COMPARE_COEFS_6=((NUM/DENOM).LT.COEF_CHECK_THRS) |
4853 | - ELSE |
4854 | - ML5_0_COMPARE_COEFS_6=(NUM.LT.COEF_CHECK_THRS) |
4855 | - ENDIF |
4856 | - |
4857 | - END |
4858 | - |
4859 | - |
4860 | - SUBROUTINE ML5_0_FILL_GOLEM_COEFFS_0(ML_COEFS,GOLEM_COEFS) |
4861 | - USE PRECISION_GOLEM, ONLY: KI |
4862 | - INCLUDE 'coef_specs.inc' |
4863 | - INCLUDE 'loop_max_coefs.inc' |
4864 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
4865 | - COMPLEX(KI) GOLEM_COEFS |
4866 | - GOLEM_COEFS=ML_COEFS(0) |
4867 | - END |
4868 | - |
4869 | - SUBROUTINE ML5_0_FILL_GOLEM_COEFFS_1(ML_COEFS,GOLEM_COEFS) |
4870 | - USE TENS_REC, ONLY: COEFF_TYPE_1 |
4871 | - INCLUDE 'coef_specs.inc' |
4872 | - INCLUDE 'loop_max_coefs.inc' |
4873 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
4874 | - TYPE(COEFF_TYPE_1) GOLEM_COEFS |
4875 | -C Constant coefficient |
4876 | - GOLEM_COEFS%%C0=ML_COEFS(0) |
4877 | -C Coefficient q(0) |
4878 | - GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1) |
4879 | -C Coefficient q(1) |
4880 | - GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2) |
4881 | -C Coefficient q(2) |
4882 | - GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3) |
4883 | -C Coefficient q(3) |
4884 | - GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4) |
4885 | - END |
4886 | - |
4887 | - SUBROUTINE ML5_0_FILL_GOLEM_COEFFS_2(ML_COEFS,GOLEM_COEFS) |
4888 | - USE TENS_REC, ONLY: COEFF_TYPE_2 |
4889 | - INCLUDE 'coef_specs.inc' |
4890 | - INCLUDE 'loop_max_coefs.inc' |
4891 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
4892 | - TYPE(COEFF_TYPE_2) GOLEM_COEFS |
4893 | -C Constant coefficient |
4894 | - GOLEM_COEFS%%C0=ML_COEFS(0) |
4895 | -C Coefficient q(0) |
4896 | - GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1) |
4897 | -C Coefficient q(0)^2 |
4898 | - GOLEM_COEFS%%C1(1,2)= ML_COEFS(5) |
4899 | -C Coefficient q(1) |
4900 | - GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2) |
4901 | -C Coefficient q(1)^2 |
4902 | - GOLEM_COEFS%%C1(2,2)= ML_COEFS(7) |
4903 | -C Coefficient q(2) |
4904 | - GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3) |
4905 | -C Coefficient q(2)^2 |
4906 | - GOLEM_COEFS%%C1(3,2)= ML_COEFS(10) |
4907 | -C Coefficient q(3) |
4908 | - GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4) |
4909 | -C Coefficient q(3)^2 |
4910 | - GOLEM_COEFS%%C1(4,2)= ML_COEFS(14) |
4911 | -C Coefficient q(0)*q(1) |
4912 | - GOLEM_COEFS%%C2(1,1)= ML_COEFS(6) |
4913 | -C Coefficient q(0)*q(2) |
4914 | - GOLEM_COEFS%%C2(2,1)= ML_COEFS(8) |
4915 | -C Coefficient q(0)*q(3) |
4916 | - GOLEM_COEFS%%C2(3,1)= ML_COEFS(11) |
4917 | -C Coefficient q(1)*q(2) |
4918 | - GOLEM_COEFS%%C2(4,1)= ML_COEFS(9) |
4919 | -C Coefficient q(1)*q(3) |
4920 | - GOLEM_COEFS%%C2(5,1)= ML_COEFS(12) |
4921 | -C Coefficient q(2)*q(3) |
4922 | - GOLEM_COEFS%%C2(6,1)= ML_COEFS(13) |
4923 | - END |
4924 | - |
4925 | - SUBROUTINE ML5_0_FILL_GOLEM_COEFFS_3(ML_COEFS,GOLEM_COEFS) |
4926 | - USE TENS_REC, ONLY: COEFF_TYPE_3 |
4927 | - INCLUDE 'coef_specs.inc' |
4928 | - INCLUDE 'loop_max_coefs.inc' |
4929 | - COMPLEX*16 ML_COEFS(0:LOOPMAXCOEFS-1) |
4930 | - TYPE(COEFF_TYPE_3) GOLEM_COEFS |
4931 | -C Constant coefficient |
4932 | - GOLEM_COEFS%%C0=ML_COEFS(0) |
4933 | -C Coefficient q(0) |
4934 | - GOLEM_COEFS%%C1(1,1)=-ML_COEFS(1) |
4935 | -C Coefficient q(0)^2 |
4936 | - GOLEM_COEFS%%C1(1,2)= ML_COEFS(5) |
4937 | -C Coefficient q(0)^3 |
4938 | - GOLEM_COEFS%%C1(1,3)=-ML_COEFS(15) |
4939 | -C Coefficient q(1) |
4940 | - GOLEM_COEFS%%C1(2,1)=-ML_COEFS(2) |
4941 | -C Coefficient q(1)^2 |
4942 | - GOLEM_COEFS%%C1(2,2)= ML_COEFS(7) |
4943 | -C Coefficient q(1)^3 |
4944 | - GOLEM_COEFS%%C1(2,3)=-ML_COEFS(18) |
4945 | -C Coefficient q(2) |
4946 | - GOLEM_COEFS%%C1(3,1)=-ML_COEFS(3) |
4947 | -C Coefficient q(2)^2 |
4948 | - GOLEM_COEFS%%C1(3,2)= ML_COEFS(10) |
4949 | -C Coefficient q(2)^3 |
4950 | - GOLEM_COEFS%%C1(3,3)=-ML_COEFS(24) |
4951 | -C Coefficient q(3) |
4952 | - GOLEM_COEFS%%C1(4,1)=-ML_COEFS(4) |
4953 | -C Coefficient q(3)^2 |
4954 | - GOLEM_COEFS%%C1(4,2)= ML_COEFS(14) |
4955 | -C Coefficient q(3)^3 |
4956 | - GOLEM_COEFS%%C1(4,3)=-ML_COEFS(34) |
4957 | -C Coefficient q(0)*q(1) |
4958 | - GOLEM_COEFS%%C2(1,1)= ML_COEFS(6) |
4959 | -C Coefficient q(0)*q(1)^2 |
4960 | - GOLEM_COEFS%%C2(1,2)=-ML_COEFS(17) |
4961 | -C Coefficient q(0)^2*q(1) |
4962 | - GOLEM_COEFS%%C2(1,3)=-ML_COEFS(16) |
4963 | -C Coefficient q(0)*q(2) |
4964 | - GOLEM_COEFS%%C2(2,1)= ML_COEFS(8) |
4965 | -C Coefficient q(0)*q(2)^2 |
4966 | - GOLEM_COEFS%%C2(2,2)=-ML_COEFS(22) |
4967 | -C Coefficient q(0)^2*q(2) |
4968 | - GOLEM_COEFS%%C2(2,3)=-ML_COEFS(19) |
4969 | -C Coefficient q(0)*q(3) |
4970 | - GOLEM_COEFS%%C2(3,1)= ML_COEFS(11) |
4971 | -C Coefficient q(0)*q(3)^2 |
4972 | - GOLEM_COEFS%%C2(3,2)=-ML_COEFS(31) |
4973 | -C Coefficient q(0)^2*q(3) |
4974 | - GOLEM_COEFS%%C2(3,3)=-ML_COEFS(25) |
4975 | -C Coefficient q(1)*q(2) |
4976 | - GOLEM_COEFS%%C2(4,1)= ML_COEFS(9) |
4977 | -C Coefficient q(1)*q(2)^2 |
4978 | - GOLEM_COEFS%%C2(4,2)=-ML_COEFS(23) |
4979 | -C Coefficient q(1)^2*q(2) |
4980 | - GOLEM_COEFS%%C2(4,3)=-ML_COEFS(21) |
4981 | -C Coefficient q(1)*q(3) |
4982 | - GOLEM_COEFS%%C2(5,1)= ML_COEFS(12) |
4983 | -C Coefficient q(1)*q(3)^2 |
4984 | - GOLEM_COEFS%%C2(5,2)=-ML_COEFS(32) |
4985 | -C Coefficient q(1)^2*q(3) |
4986 | - GOLEM_COEFS%%C2(5,3)=-ML_COEFS(27) |
4987 | -C Coefficient q(2)*q(3) |
4988 | - GOLEM_COEFS%%C2(6,1)= ML_COEFS(13) |
4989 | -C Coefficient q(2)*q(3)^2 |
4990 | - GOLEM_COEFS%%C2(6,2)=-ML_COEFS(33) |
4991 | -C Coefficient q(2)^2*q(3) |
4992 | - GOLEM_COEFS%%C2(6,3)=-ML_COEFS(30) |
4993 | -C Coefficient q(0)*q(1)*q(2) |
4994 | - GOLEM_COEFS%%C3(1,1)=-ML_COEFS(20) |
4995 | -C Coefficient q(0)*q(1)*q(3) |
4996 | - GOLEM_COEFS%%C3(2,1)=-ML_COEFS(26) |
4997 | -C Coefficient q(0)*q(2)*q(3) |
4998 | - GOLEM_COEFS%%C3(3,1)=-ML_COEFS(28) |
4999 | -C Coefficient q(1)*q(2)*q(3) |
5000 | - GOLEM_COEFS%%C3(4,1)=-ML_COEFS(29) |
The diff has been truncated for viewing.