Merge lp:~maddevelopers/mg5amcnlo/heft_fix into lp:~maddevelopers/mg5amcnlo/combine_v0_6_0

Proposed by Johan Alwall
Status: Merged
Merged at revision: 60
Proposed branch: lp:~maddevelopers/mg5amcnlo/heft_fix
Merge into: lp:~maddevelopers/mg5amcnlo/combine_v0_6_0
Diff against target: 216 lines (+101/-18)
4 files modified
madgraph/iolibs/helas_call_writers.py (+38/-7)
madgraph/iolibs/import_v4.py (+4/-0)
tests/acceptance_tests/test_cmd.py (+41/-0)
tests/parallel_tests/sample_script.py (+18/-11)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/heft_fix
Reviewer Review Type Date Requested Status
Olivier Mattelaer Approve
Review via email: mp+43019@code.launchpad.net

Description of the change

Included special calls for HEFT VVVS interaction in the FortranHelasCallWriter. Note that the new version of HEFT must be used (v. 1.5.0). g g > h + Ng, g g > h3 + Ng with N=1,2,3 have been tested agains regular V4, new V4, new V5, and UFO models.

To post a comment you must log in.
lp:~maddevelopers/mg5amcnlo/heft_fix updated
59. By Johan Alwall

Added acceptance test for v4 HEFT

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

It's look perfect but:

======================================================================
FAIL: test_v4_heft (tests.acceptance_tests.test_cmd.TestCmdShell2)
Test the import of models and the export of Helas Routine
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/omatt/Documents/Eclipse2/heft/tests/acceptance_tests/test_cmd.py", line 367, in test_v4_heft
    'check')))
AssertionError: False is not True

review: Needs Fixing
Revision history for this message
Johan Alwall (johan-alwall) wrote :

I can't reproduce this. Did you run with the latest CVS version of
MG/ME (or, equivalently, by running bin/create_release.py)?

> ======================================================================
> FAIL: test_v4_heft (tests.acceptance_tests.test_cmd.TestCmdShell2)
> Test the import of models and the export of Helas Routine
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/Users/omatt/Documents/Eclipse2/heft/tests/acceptance_tests/test_cmd.py", line 367, in test_v4_heft
>    'check')))
> AssertionError: False is not True

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Sorry for that indeed, my cvs was not up-to-date for this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'madgraph/iolibs/helas_call_writers.py'
--- madgraph/iolibs/helas_call_writers.py 2010-10-28 00:17:50 +0000
+++ madgraph/iolibs/helas_call_writers.py 2010-12-07 22:48:10 +0000
@@ -211,7 +211,7 @@
211 self_dict = {1: 'H', 2: 'F', -2: 'F', 3: 'J', 5: 'U'}211 self_dict = {1: 'H', 2: 'F', -2: 'F', 3: 'J', 5: 'U'}
212 # Dictionaries used for sorting the letters in the Helas call212 # Dictionaries used for sorting the letters in the Helas call
213 sort_wf = {'O': 0, 'I': 1, 'S': 2, 'T': 3, 'V': 4}213 sort_wf = {'O': 0, 'I': 1, 'S': 2, 'T': 3, 'V': 4}
214 sort_amp = {'S': 1, 'V': 2, 'T': 0, 'O': 3, 'I': 4}214 sort_amp = {'S': 0, 'V': 2, 'T': 1, 'O': 3, 'I': 4}
215215
216 def default_setup(self):216 def default_setup(self):
217 """Set up special Helas calls (wavefunctions and amplitudes)217 """Set up special Helas calls (wavefunctions and amplitudes)
@@ -225,35 +225,29 @@
225 # Gluon 4-vertex division tensor calls ggT for the FR sm and mssm225 # Gluon 4-vertex division tensor calls ggT for the FR sm and mssm
226226
227 key = ((3, 3, 5, 3), 'A')227 key = ((3, 3, 5, 3), 'A')
228
229 call = lambda wf: \228 call = lambda wf: \
230 "CALL UVVAXX(W(1,%d),W(1,%d),%s,zero,zero,zero,W(1,%d))" % \229 "CALL UVVAXX(W(1,%d),W(1,%d),%s,zero,zero,zero,W(1,%d))" % \
231 (wf.get('mothers')[0].get('number'),230 (wf.get('mothers')[0].get('number'),
232 wf.get('mothers')[1].get('number'),231 wf.get('mothers')[1].get('number'),
233
234 wf.get('coupling'),232 wf.get('coupling'),
235 wf.get('number'))233 wf.get('number'))
236 self.add_wavefunction(key, call)234 self.add_wavefunction(key, call)
237235
238 key = ((3, 5, 3, 1), 'A')236 key = ((3, 5, 3, 1), 'A')
239
240 call = lambda wf: \237 call = lambda wf: \
241 "CALL JVTAXX(W(1,%d),W(1,%d),%s,zero,zero,W(1,%d))" % \238 "CALL JVTAXX(W(1,%d),W(1,%d),%s,zero,zero,W(1,%d))" % \
242 (wf.get('mothers')[0].get('number'),239 (wf.get('mothers')[0].get('number'),
243 wf.get('mothers')[1].get('number'),240 wf.get('mothers')[1].get('number'),
244
245 wf.get('coupling'),241 wf.get('coupling'),
246 wf.get('number'))242 wf.get('number'))
247 self.add_wavefunction(key, call)243 self.add_wavefunction(key, call)
248244
249 key = ((3, 3, 5), 'A')245 key = ((3, 3, 5), 'A')
250
251 call = lambda amp: \246 call = lambda amp: \
252 "CALL VVTAXX(W(1,%d),W(1,%d),W(1,%d),%s,zero,AMP(%d))" % \247 "CALL VVTAXX(W(1,%d),W(1,%d),W(1,%d),%s,zero,AMP(%d))" % \
253 (amp.get('mothers')[0].get('number'),248 (amp.get('mothers')[0].get('number'),
254 amp.get('mothers')[1].get('number'),249 amp.get('mothers')[1].get('number'),
255 amp.get('mothers')[2].get('number'),250 amp.get('mothers')[2].get('number'),
256
257 amp.get('coupling'),251 amp.get('coupling'),
258 amp.get('number'))252 amp.get('number'))
259 self.add_amplitude(key, call)253 self.add_amplitude(key, call)
@@ -318,6 +312,43 @@
318 amp.get('number'))312 amp.get('number'))
319 self.add_amplitude(key, call)313 self.add_amplitude(key, call)
320314
315 # HEFT VVVS calls
316
317 key = ((1, 3, 3, 3, 3), '')
318 call = lambda wf: \
319 "CALL JVVSXX(W(1,%d),W(1,%d),W(1,%d),DUM1,%s,%s,%s,W(1,%d))" % \
320 (wf.get('mothers')[0].get('number'),
321 wf.get('mothers')[1].get('number'),
322 wf.get('mothers')[2].get('number'),
323 wf.get('coupling'),
324 wf.get('mass'),
325 wf.get('width'),
326 wf.get('number'))
327 self.add_wavefunction(key, call)
328
329 key = ((3, 3, 3, 1, 4), '')
330 call = lambda wf: \
331 "CALL HVVVXX(W(1,%d),W(1,%d),W(1,%d),DUM1,%s,%s,%s,W(1,%d))" % \
332 (wf.get('mothers')[0].get('number'),
333 wf.get('mothers')[1].get('number'),
334 wf.get('mothers')[2].get('number'),
335 wf.get('coupling'),
336 wf.get('mass'),
337 wf.get('width'),
338 wf.get('number'))
339 self.add_wavefunction(key, call)
340
341 key = ((1, 3, 3, 3), '')
342 call = lambda amp: \
343 "CALL VVVSXX(W(1,%d),W(1,%d),W(1,%d),W(1,%d),DUM1,%s,AMP(%d))" % \
344 (amp.get('mothers')[0].get('number'),
345 amp.get('mothers')[1].get('number'),
346 amp.get('mothers')[2].get('number'),
347 amp.get('mothers')[3].get('number'),
348 amp.get('coupling'),
349 amp.get('number'))
350 self.add_amplitude(key, call)
351
321 def get_wavefunction_call(self, wavefunction):352 def get_wavefunction_call(self, wavefunction):
322 """Return the function for writing the wavefunction353 """Return the function for writing the wavefunction
323 corresponding to the key. If the function doesn't exist,354 corresponding to the key. If the function doesn't exist,
324355
=== modified file 'madgraph/iolibs/import_v4.py'
--- madgraph/iolibs/import_v4.py 2010-12-07 00:44:02 +0000
+++ madgraph/iolibs/import_v4.py 2010-12-07 22:48:10 +0000
@@ -334,6 +334,10 @@
334 # Should only use one Helas amplitude for electroweak334 # Should only use one Helas amplitude for electroweak
335 # 4-vector vertices with FR. I choose W3W3NX.335 # 4-vector vertices with FR. I choose W3W3NX.
336 myinter.set('lorentz', ['WWVVN'])336 myinter.set('lorentz', ['WWVVN'])
337 elif values[len(part_list)] in ['DUM', 'DUM0', 'DUM1']:
338 # We can just use the second coupling, since the first
339 # is a dummy
340 myinter.set('couplings', {(0, 0):values[len(part_list)+1]})
337 elif pdg_codes == [21, 21, 21, 21]:341 elif pdg_codes == [21, 21, 21, 21]:
338 # gggg342 # gggg
339 myinter.set('couplings', {(0, 0):values[len(part_list)],343 myinter.set('couplings', {(0, 0):values[len(part_list)],
340344
=== modified file 'tests/acceptance_tests/test_cmd.py'
--- tests/acceptance_tests/test_cmd.py 2010-11-24 20:48:25 +0000
+++ tests/acceptance_tests/test_cmd.py 2010-12-07 22:48:10 +0000
@@ -338,6 +338,47 @@
338 self.assertTrue(me_groups)338 self.assertTrue(me_groups)
339 self.assertAlmostEqual(float(me_groups.group('value')), 1.953735e-2)339 self.assertAlmostEqual(float(me_groups.group('value')), 1.953735e-2)
340 340
341 def test_v4_heft(self):
342 """Test the import of models and the export of Helas Routine """
343
344 if os.path.isdir(self.out_dir):
345 shutil.rmdir(self.out_dir)
346
347 self.do('import model_v4 heft')
348 self.do('generate g g > h g g')
349 self.do('output standalone %s ' % self.out_dir)
350
351 devnull = open(os.devnull,'w')
352 # Check that the Model and Aloha output compile
353 subprocess.call(['make'],
354 stdout=devnull, stderr=devnull,
355 cwd=os.path.join(self.out_dir, 'Source'))
356 self.assertTrue(os.path.exists(os.path.join(self.out_dir,
357 'lib', 'libdhelas3.a')))
358 self.assertTrue(os.path.exists(os.path.join(self.out_dir,
359 'lib', 'libmodel.a')))
360 # Check that check_sa.f compiles
361 subprocess.call(['make', 'check'],
362 stdout=devnull, stderr=devnull,
363 cwd=os.path.join(self.out_dir, 'SubProcesses',
364 'P0_gg_hgg'))
365 self.assertTrue(os.path.exists(os.path.join(self.out_dir,
366 'SubProcesses', 'P0_gg_hgg',
367 'check')))
368 # Check that the output of check is correct
369 logfile = os.path.join(self.out_dir,'SubProcesses', 'P0_gg_hgg',
370 'check.log')
371 subprocess.call('./check',
372 stdout=open(logfile, 'w'), stderr=devnull,
373 cwd=os.path.join(self.out_dir, 'SubProcesses',
374 'P0_gg_hgg'), shell=True)
375 log_output = open(logfile, 'r').read()
376 me_re = re.compile('Matrix element\s*=\s*(?P<value>[\d\.eE\+-]+)\s*GeV',
377 re.IGNORECASE)
378 me_groups = me_re.search(log_output)
379 self.assertTrue(me_groups)
380 self.assertAlmostEqual(float(me_groups.group('value')), 1.10908942e-06)
381
341 def test_madevent_ufo_aloha(self):382 def test_madevent_ufo_aloha(self):
342 """Test MadEvent output with UFO/ALOHA"""383 """Test MadEvent output with UFO/ALOHA"""
343384
344385
=== modified file 'tests/parallel_tests/sample_script.py'
--- tests/parallel_tests/sample_script.py 2010-12-05 05:38:08 +0000
+++ tests/parallel_tests/sample_script.py 2010-12-07 22:48:10 +0000
@@ -53,12 +53,19 @@
53 'e+ x1+ > e+ h1 x1+','e+ x1+ > e+ h2 x1+','e+ x1+ > e+ h3 x1+']53 'e+ x1+ > e+ h1 x1+','e+ x1+ > e+ h2 x1+','e+ x1+ > e+ h3 x1+']
54 my_proc_list += ['el+ h2 > el+ w+ w-']54 my_proc_list += ['el+ h2 > el+ w+ w-']
55 55
56 my_proc_list += me_comparator.create_proc_list(['g', 'go'], initial=2,56 #my_proc_list += me_comparator.create_proc_list(['g', 'go'], initial=2,
57 final=2)57 # final=2)
5858 #my_proc_list = me_comparator.create_proc_list(['g', 'h', 'h3'], initial=2,
59 # Create a MERunner object for MG459 # final=4)
60 #my_mg4 = me_comparator.MG4Runner()60
61 #my_mg4.setup(mg4_path)61 my_proc_list = ['h > g g g g']
62 # Create a MERunner object for MG4
63 my_mg4 = me_comparator.MG4Runner()
64 my_mg4.setup(mg4_path)
65
66 # Create a MERunner object for MG4
67 my_mg4_2 = me_comparator.MG4Runner()
68 my_mg4_2.setup(mg4_path)
6269
63 # Create a MERunner object for MG570 # Create a MERunner object for MG5
64 my_mg5 = me_comparator.MG5Runner()71 my_mg5 = me_comparator.MG5Runner()
@@ -69,21 +76,21 @@
69 my_mg5_ufo.setup(mg5_path, mg4_path)76 my_mg5_ufo.setup(mg5_path, mg4_path)
7077
71 # Create a MERunner object for C++78 # Create a MERunner object for C++
72 my_mg5_cpp = me_comparator.MG5_CPP_Runner()79 #my_mg5_cpp = me_comparator.MG5_CPP_Runner()
73 my_mg5_cpp.setup(mg5_path, mg4_path)80 #my_mg5_cpp.setup(mg5_path, mg4_path)
7481
75 # Create and setup a comparator82 # Create and setup a comparator
76 my_comp = me_comparator.MEComparator()83 my_comp = me_comparator.MEComparator()
77 my_comp.set_me_runners(my_mg5_cpp, my_mg5_ufo, my_mg5)84 my_comp.set_me_runners(my_mg5, my_mg5_ufo, my_mg4, my_mg4_2)
7885
79 # Run the actual comparison86 # Run the actual comparison
80 my_comp.run_comparison(my_proc_list,87 my_comp.run_comparison(my_proc_list,
81 model='mssm', orders={'QED':4, 'QCD':4, 'HIG':1, 'HIW':1}, energy=2000)88 model=['heft_fix', 'heft', 'heft', 'heft_fix'], orders={'QED':0, 'QCD':3, 'HIG':1, 'HIW':1}, energy=2000)
8289
83 # Do some cleanup90 # Do some cleanup
84 #my_comp.cleanup()91 #my_comp.cleanup()
8592
86 filename = "mssm_results.log"93 filename = "heft_results.log"
8794
88 # Print the output95 # Print the output
89 my_comp.output_result(filename=filename)96 my_comp.output_result(filename=filename)

Subscribers

People subscribed via source and target branches