@@ -1453,6 +1453,10 @@ def find_output_type(self, path):
14531453 raise self.InvalidCmd('%s : Not a valid directory' % path)
14541454 if os.path.isfile(pjoin(bin_path,'madevent')):
14551455 return 'madevent'
1456+ elif os.path.isfile(pjoin(subproc_path, 'madmatrix.mk')):
1457+ # standalone_mg7 writes SubProcesses/madmatrix.mk explicitly
1458+ # (the regular mg7 export does not).
1459+ return 'standalone_mg7'
14561460 elif os.path.isfile(pjoin(card_path, 'run_card.toml')):
14571461 return 'mg7'
14581462 elif os.path.isdir(src_path):
@@ -2990,7 +2994,8 @@ class MadGraphCmd(HelpToCmd, CheckValidForCmd, CompleteForCmd, CmdExtended):
29902994 _v4_export_formats = ['madevent', 'standalone', 'standalone_msP','standalone_msF',
29912995 'matrix', 'standalone_rw', 'madweight']
29922996 _export_formats = _v4_export_formats + ['standalone_cpp', 'pythia8', 'aloha',
2993- 'matchbox_cpp', 'matchbox', 'mg7_v5', 'mg7']
2997+ 'matchbox_cpp', 'matchbox', 'mg7_v5', 'mg7',
2998+ 'standalone_mg7']
29942999 _set_options = ['group_subprocesses',
29953000 'ignore_six_quark_processes',
29963001 'stdout_level',
@@ -3185,7 +3190,7 @@ def setup(self):
31853190
31863191 self._v4_export_formats = ['madevent', 'standalone','standalone_msP','standalone_msF',
31873192 'matrix', 'standalone_rw']
3188- self._export_formats = self._v4_export_formats + ['standalone_cpp', 'pythia8', 'mg7_v5', 'mg7']
3193+ self._export_formats = self._v4_export_formats + ['standalone_cpp', 'pythia8', 'mg7_v5', 'mg7', 'standalone_mg7' ]
31893194 self._nlo_modes_for_completion = ['all','virt','real']
31903195
31913196 def do_quit(self, line):
@@ -7598,7 +7603,17 @@ def do_launch(self, line):
75987603 options = options.__dict__
75997604 # args is now MODE PATH
76007605
7601- if args[0].startswith('standalone'):
7606+ if args[0] == 'standalone_mg7':
7607+ class ext_program:
7608+ @staticmethod
7609+ def run():
7610+ os.chdir(args[1])
7611+ try:
7612+ subprocess.run(os.path.join("bin", "generate_events"))
7613+ except KeyboardInterrupt:
7614+ pass
7615+
7616+ elif args[0].startswith('standalone'):
76027617 if os.path.isfile(os.path.join(os.getcwd(),args[1],'Cards',\
76037618 'MadLoopParams.dat')) and not os.path.isfile(os.path.join(\
76047619 os.getcwd(),args[1],'SubProcesses','check_poles.f')):
@@ -9239,6 +9254,7 @@ def do_output(self, line):
92399254 config['madweight'] = {'check': True, 'exporter': 'v4', 'output':'Template'}
92409255 config['mg7_v5'] = {'check': True, 'exporter': 'cpp', 'output': 'Template'}
92419256 config['mg7'] = {'check': True, 'exporter': 'cpp', 'output': 'Template'}
9257+ config['standalone_mg7'] = {'check': True, 'exporter': 'cpp', 'output': 'Template'}
92429258
92439259 if self._export_format == 'plugin':
92449260 options = {'check': self._export_plugin.check, 'exporter':self._export_plugin.exporter, 'output':self._export_plugin.output}
0 commit comments