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
1=== modified file 'madgraph/iolibs/helas_call_writers.py'
2--- madgraph/iolibs/helas_call_writers.py 2010-10-28 00:17:50 +0000
3+++ madgraph/iolibs/helas_call_writers.py 2010-12-07 22:48:10 +0000
4@@ -211,7 +211,7 @@
5 self_dict = {1: 'H', 2: 'F', -2: 'F', 3: 'J', 5: 'U'}
6 # Dictionaries used for sorting the letters in the Helas call
7 sort_wf = {'O': 0, 'I': 1, 'S': 2, 'T': 3, 'V': 4}
8- sort_amp = {'S': 1, 'V': 2, 'T': 0, 'O': 3, 'I': 4}
9+ sort_amp = {'S': 0, 'V': 2, 'T': 1, 'O': 3, 'I': 4}
10
11 def default_setup(self):
12 """Set up special Helas calls (wavefunctions and amplitudes)
13@@ -225,35 +225,29 @@
14 # Gluon 4-vertex division tensor calls ggT for the FR sm and mssm
15
16 key = ((3, 3, 5, 3), 'A')
17-
18 call = lambda wf: \
19 "CALL UVVAXX(W(1,%d),W(1,%d),%s,zero,zero,zero,W(1,%d))" % \
20 (wf.get('mothers')[0].get('number'),
21 wf.get('mothers')[1].get('number'),
22-
23 wf.get('coupling'),
24 wf.get('number'))
25 self.add_wavefunction(key, call)
26
27 key = ((3, 5, 3, 1), 'A')
28-
29 call = lambda wf: \
30 "CALL JVTAXX(W(1,%d),W(1,%d),%s,zero,zero,W(1,%d))" % \
31 (wf.get('mothers')[0].get('number'),
32 wf.get('mothers')[1].get('number'),
33-
34 wf.get('coupling'),
35 wf.get('number'))
36 self.add_wavefunction(key, call)
37
38 key = ((3, 3, 5), 'A')
39-
40 call = lambda amp: \
41 "CALL VVTAXX(W(1,%d),W(1,%d),W(1,%d),%s,zero,AMP(%d))" % \
42 (amp.get('mothers')[0].get('number'),
43 amp.get('mothers')[1].get('number'),
44 amp.get('mothers')[2].get('number'),
45-
46 amp.get('coupling'),
47 amp.get('number'))
48 self.add_amplitude(key, call)
49@@ -318,6 +312,43 @@
50 amp.get('number'))
51 self.add_amplitude(key, call)
52
53+ # HEFT VVVS calls
54+
55+ key = ((1, 3, 3, 3, 3), '')
56+ call = lambda wf: \
57+ "CALL JVVSXX(W(1,%d),W(1,%d),W(1,%d),DUM1,%s,%s,%s,W(1,%d))" % \
58+ (wf.get('mothers')[0].get('number'),
59+ wf.get('mothers')[1].get('number'),
60+ wf.get('mothers')[2].get('number'),
61+ wf.get('coupling'),
62+ wf.get('mass'),
63+ wf.get('width'),
64+ wf.get('number'))
65+ self.add_wavefunction(key, call)
66+
67+ key = ((3, 3, 3, 1, 4), '')
68+ call = lambda wf: \
69+ "CALL HVVVXX(W(1,%d),W(1,%d),W(1,%d),DUM1,%s,%s,%s,W(1,%d))" % \
70+ (wf.get('mothers')[0].get('number'),
71+ wf.get('mothers')[1].get('number'),
72+ wf.get('mothers')[2].get('number'),
73+ wf.get('coupling'),
74+ wf.get('mass'),
75+ wf.get('width'),
76+ wf.get('number'))
77+ self.add_wavefunction(key, call)
78+
79+ key = ((1, 3, 3, 3), '')
80+ call = lambda amp: \
81+ "CALL VVVSXX(W(1,%d),W(1,%d),W(1,%d),W(1,%d),DUM1,%s,AMP(%d))" % \
82+ (amp.get('mothers')[0].get('number'),
83+ amp.get('mothers')[1].get('number'),
84+ amp.get('mothers')[2].get('number'),
85+ amp.get('mothers')[3].get('number'),
86+ amp.get('coupling'),
87+ amp.get('number'))
88+ self.add_amplitude(key, call)
89+
90 def get_wavefunction_call(self, wavefunction):
91 """Return the function for writing the wavefunction
92 corresponding to the key. If the function doesn't exist,
93
94=== modified file 'madgraph/iolibs/import_v4.py'
95--- madgraph/iolibs/import_v4.py 2010-12-07 00:44:02 +0000
96+++ madgraph/iolibs/import_v4.py 2010-12-07 22:48:10 +0000
97@@ -334,6 +334,10 @@
98 # Should only use one Helas amplitude for electroweak
99 # 4-vector vertices with FR. I choose W3W3NX.
100 myinter.set('lorentz', ['WWVVN'])
101+ elif values[len(part_list)] in ['DUM', 'DUM0', 'DUM1']:
102+ # We can just use the second coupling, since the first
103+ # is a dummy
104+ myinter.set('couplings', {(0, 0):values[len(part_list)+1]})
105 elif pdg_codes == [21, 21, 21, 21]:
106 # gggg
107 myinter.set('couplings', {(0, 0):values[len(part_list)],
108
109=== modified file 'tests/acceptance_tests/test_cmd.py'
110--- tests/acceptance_tests/test_cmd.py 2010-11-24 20:48:25 +0000
111+++ tests/acceptance_tests/test_cmd.py 2010-12-07 22:48:10 +0000
112@@ -338,6 +338,47 @@
113 self.assertTrue(me_groups)
114 self.assertAlmostEqual(float(me_groups.group('value')), 1.953735e-2)
115
116+ def test_v4_heft(self):
117+ """Test the import of models and the export of Helas Routine """
118+
119+ if os.path.isdir(self.out_dir):
120+ shutil.rmdir(self.out_dir)
121+
122+ self.do('import model_v4 heft')
123+ self.do('generate g g > h g g')
124+ self.do('output standalone %s ' % self.out_dir)
125+
126+ devnull = open(os.devnull,'w')
127+ # Check that the Model and Aloha output compile
128+ subprocess.call(['make'],
129+ stdout=devnull, stderr=devnull,
130+ cwd=os.path.join(self.out_dir, 'Source'))
131+ self.assertTrue(os.path.exists(os.path.join(self.out_dir,
132+ 'lib', 'libdhelas3.a')))
133+ self.assertTrue(os.path.exists(os.path.join(self.out_dir,
134+ 'lib', 'libmodel.a')))
135+ # Check that check_sa.f compiles
136+ subprocess.call(['make', 'check'],
137+ stdout=devnull, stderr=devnull,
138+ cwd=os.path.join(self.out_dir, 'SubProcesses',
139+ 'P0_gg_hgg'))
140+ self.assertTrue(os.path.exists(os.path.join(self.out_dir,
141+ 'SubProcesses', 'P0_gg_hgg',
142+ 'check')))
143+ # Check that the output of check is correct
144+ logfile = os.path.join(self.out_dir,'SubProcesses', 'P0_gg_hgg',
145+ 'check.log')
146+ subprocess.call('./check',
147+ stdout=open(logfile, 'w'), stderr=devnull,
148+ cwd=os.path.join(self.out_dir, 'SubProcesses',
149+ 'P0_gg_hgg'), shell=True)
150+ log_output = open(logfile, 'r').read()
151+ me_re = re.compile('Matrix element\s*=\s*(?P<value>[\d\.eE\+-]+)\s*GeV',
152+ re.IGNORECASE)
153+ me_groups = me_re.search(log_output)
154+ self.assertTrue(me_groups)
155+ self.assertAlmostEqual(float(me_groups.group('value')), 1.10908942e-06)
156+
157 def test_madevent_ufo_aloha(self):
158 """Test MadEvent output with UFO/ALOHA"""
159
160
161=== modified file 'tests/parallel_tests/sample_script.py'
162--- tests/parallel_tests/sample_script.py 2010-12-05 05:38:08 +0000
163+++ tests/parallel_tests/sample_script.py 2010-12-07 22:48:10 +0000
164@@ -53,12 +53,19 @@
165 'e+ x1+ > e+ h1 x1+','e+ x1+ > e+ h2 x1+','e+ x1+ > e+ h3 x1+']
166 my_proc_list += ['el+ h2 > el+ w+ w-']
167
168- my_proc_list += me_comparator.create_proc_list(['g', 'go'], initial=2,
169- final=2)
170-
171- # Create a MERunner object for MG4
172- #my_mg4 = me_comparator.MG4Runner()
173- #my_mg4.setup(mg4_path)
174+ #my_proc_list += me_comparator.create_proc_list(['g', 'go'], initial=2,
175+ # final=2)
176+ #my_proc_list = me_comparator.create_proc_list(['g', 'h', 'h3'], initial=2,
177+ # final=4)
178+
179+ my_proc_list = ['h > g g g g']
180+ # Create a MERunner object for MG4
181+ my_mg4 = me_comparator.MG4Runner()
182+ my_mg4.setup(mg4_path)
183+
184+ # Create a MERunner object for MG4
185+ my_mg4_2 = me_comparator.MG4Runner()
186+ my_mg4_2.setup(mg4_path)
187
188 # Create a MERunner object for MG5
189 my_mg5 = me_comparator.MG5Runner()
190@@ -69,21 +76,21 @@
191 my_mg5_ufo.setup(mg5_path, mg4_path)
192
193 # Create a MERunner object for C++
194- my_mg5_cpp = me_comparator.MG5_CPP_Runner()
195- my_mg5_cpp.setup(mg5_path, mg4_path)
196+ #my_mg5_cpp = me_comparator.MG5_CPP_Runner()
197+ #my_mg5_cpp.setup(mg5_path, mg4_path)
198
199 # Create and setup a comparator
200 my_comp = me_comparator.MEComparator()
201- my_comp.set_me_runners(my_mg5_cpp, my_mg5_ufo, my_mg5)
202+ my_comp.set_me_runners(my_mg5, my_mg5_ufo, my_mg4, my_mg4_2)
203
204 # Run the actual comparison
205 my_comp.run_comparison(my_proc_list,
206- model='mssm', orders={'QED':4, 'QCD':4, 'HIG':1, 'HIW':1}, energy=2000)
207+ model=['heft_fix', 'heft', 'heft', 'heft_fix'], orders={'QED':0, 'QCD':3, 'HIG':1, 'HIW':1}, energy=2000)
208
209 # Do some cleanup
210 #my_comp.cleanup()
211
212- filename = "mssm_results.log"
213+ filename = "heft_results.log"
214
215 # Print the output
216 my_comp.output_result(filename=filename)

Subscribers

People subscribed via source and target branches