Merge lp:~maddm/maddm/question_696371 into lp:maddm

Proposed by Olivier Mattelaer
Status: Merged
Merged at revision: 30
Proposed branch: lp:~maddm/maddm/question_696371
Merge into: lp:maddm
Diff against target: 20 lines (+9/-1)
1 file modified
maddm_interface.py (+9/-1)
To merge this branch: bzr merge lp:~maddm/maddm/question_696371
Reviewer Review Type Date Requested Status
Daniele Massaro Approve
Review via email: mp+400919@code.launchpad.net

Description of the change

This allows the "hard core" user to using
add process s1 s2 > X Y Z @ID

While equivalent syntax were working at for direct-detection and relic, that one was not working due to the separate handling of variable where such process was store.

To post a comment you must log in.
Revision history for this message
Daniele Massaro (dmassaro) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'maddm_interface.py'
2--- maddm_interface.py 2020-12-15 22:51:37 +0000
3+++ maddm_interface.py 2021-04-10 09:51:13 +0000
4@@ -649,7 +649,15 @@
5 if '@' in line:
6 line = re.sub(r'''(?<=@)(%s\b)''' % '\\b|'.join(self.process_tag),
7 lambda x: `self.process_tag[x.group(0)]`, line)
8- return super(MadDM_interface, self).do_add(line)
9+
10+ if '@1995' not in line:
11+ return super(MadDM_interface, self).do_add(line)
12+ else:
13+ with misc.TMP_variable(self, ['_curr_proc_defs', '_curr_matrix_elements', '_curr_amps'],
14+ [self._ID_procs, self._ID_matrix_elements, self._ID_amps]):
15+ return super(MadDM_interface, self).do_add(line)
16+
17+
18
19 @misc.mute_logger(['madgraph', 'models'], [30,30])
20 def add_model(self,*args,**opts):

Subscribers

People subscribed via source and target branches

to all changes: