Merge lp:~maddevelopers/mg5amcnlo/dim6_eft into lp:~mg5core1/mg5amcnlo/2.6.6

Proposed by Olivier Mattelaer
Status: Needs review
Proposed branch: lp:~maddevelopers/mg5amcnlo/dim6_eft
Merge into: lp:~mg5core1/mg5amcnlo/2.6.6
Diff against target: 3503 lines (+789/-420)
58 files modified
madgraph/core/base_objects.py (+3/-1)
madgraph/interface/common_run_interface.py (+1/-1)
madgraph/interface/extended_cmd.py (+0/-1)
madgraph/interface/madgraph_interface.py (+41/-13)
madgraph/interface/master_interface.py (+5/-0)
madgraph/interface/reweight_interface.py (+221/-50)
madgraph/iolibs/export_v4.py (+63/-21)
madgraph/iolibs/template_files/loop/loop_matrix_standalone.inc (+6/-6)
madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc (+14/-10)
madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc (+11/-8)
madgraph/iolibs/template_files/matrix_standalone_v4.inc (+9/-9)
madgraph/loop/loop_exporters.py (+34/-19)
madgraph/various/banner.py (+6/-3)
madgraph/various/rambo.py (+7/-0)
madgraph/various/shower_card.py (+0/-1)
models/import_ufo.py (+10/-2)
models/template_files/fortran/lha_read.f (+2/-2)
models/template_files/fortran/lha_read_mp.f (+3/-3)
tests/acceptance_tests/test_cmd_reweight.py (+4/-3)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f (+11/-8)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f (+9/-5)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f (+11/-8)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f (+9/-5)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f (+6/-6)
tests/input_files/IOTestsComparison/IOTest_Histogram/gnuplot_histo_output/HistoOut.gnuplot (+53/-54)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f (+9/-5)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f (+9/-5)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f (+9/-5)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f (+9/-5)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f (+9/-5)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f (+9/-5)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f (+9/-5)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f (+9/-5)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%born_matrix.f (+11/-8)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f (+9/-5)
tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f (+6/-6)
tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f (+11/-8)
tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_ampOrderQED2_eq_2_WGTsq_le_14_QCDsq_gt_4.f (+11/-8)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f (+9/-5)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/loop_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/loop_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f (+9/-5)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/born_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f (+9/-5)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/loop_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/born_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/loop_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/born_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/loop_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/born_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f (+9/-5)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/born_matrix.f (+6/-6)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f (+9/-5)
tests/unit_tests/various/test_rambo.py (+7/-2)
tests/unit_tests/various/test_shower_card.py (+0/-1)
To merge this branch: bzr merge lp:~maddevelopers/mg5amcnlo/dim6_eft
Reviewer Review Type Date Requested Status
MadTeam Pending
Review via email: mp+367512@code.launchpad.net

Commit message

change in the reweighting for the EFT validation effort

To post a comment you must log in.
lp:~maddevelopers/mg5amcnlo/dim6_eft updated
297. By olivier-mattelaer

merge with latest 2.6.6

298. By olivier-mattelaer

some cleaning + adapting test for new allowed input in RAMBO

Revision history for this message
marco zaro (marco-zaro) wrote :

Hi Olivier,
can you elaborate a bit more the relevant changes of this merge proposal?
thanks!
cheers,

Marco

On Thu, May 16, 2019 at 11:38 AM Olivier Mattelaer <
<email address hidden>> wrote:

> Olivier Mattelaer has proposed merging
> lp:~maddevelopers/mg5amcnlo/dim6_eft into lp:~mg5core1/mg5amcnlo/2.6.6.
>
> Commit message:
> change in the reweighting for the EFT validation effort
>
> Requested reviews:
> MadTeam (madteam)
>
> For more details, see:
> https://code.launchpad.net/~maddevelopers/mg5amcnlo/dim6_eft/+merge/367512
> --
> Your team mg5core1 is subscribed to branch lp:~mg5core1/mg5amcnlo/2.6.6.
>

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

The main point for this branch is to do some core change related to the
EFT validation effort (lead by Gauthier/Fabio). This is implemented as a plugin but the accord required some change in the re-weighting module (mainly for the formatting).

Those changes adds:
1) The following command: import process PATH is now supported. (allowing to provide a file with all your process definition whithout any generate/add process
2) Allow the re-weighting to distinguish process based on the process event written in the lhe file / @X [does not seems to work for loop]
3) More xml like formatting for the weight definition (including model version/...)
4) the support for NHEL=-2 in reweighting, which returns the sum over polarization (like -1) but clear all filter associated to the zero-helicity to avoid any possible bias)
5) a (not documented) flag --no_warning=nodiagram which prevent the code to crash if you do not have any diagram generated for a given process
6) possibility to call the reweighting interface as a standalone executable
7) improve the templating of the standalone output to support model with more than 1k parameters (and reduce RAM use for model with less parameters)

lp:~maddevelopers/mg5amcnlo/dim6_eft updated
299. By olivier-mattelaer

fix latest acceptance test

Unmerged revisions

299. By olivier-mattelaer

fix latest acceptance test

298. By olivier-mattelaer

some cleaning + adapting test for new allowed input in RAMBO

297. By olivier-mattelaer

merge with latest 2.6.6

296. By olivier-mattelaer

add reweight_card

295. By olivier-mattelaer

add more model information

294. By olivier-mattelaer

adding support for nincoming in standalone fortran as py lib

293. By olivier-mattelaer

merge with last 2.6.6

292. By olivier-mattelaer

avoid any issue with parameter with many input parameter in standalone mode

291. By olivier-mattelaer

fix issue with multiple launch in re=wgt outside of mg

290. By olivier-mattelaer

fix an issue related to NLO model for import process command

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'madgraph/core/base_objects.py'
2--- madgraph/core/base_objects.py 2018-12-03 22:10:49 +0000
3+++ madgraph/core/base_objects.py 2019-05-23 07:08:37 +0000
4@@ -1043,6 +1043,8 @@
5 self['expansion_order'] = None
6 self['version_tag'] = None # position of the directory (for security)
7 self['gauge'] = [0, 1]
8+ import collections
9+ self['model_info'] = collections.defaultdict(str)
10 self['case_sensitive'] = True
11 # attribute which might be define if needed
12 #self['name2pdg'] = {'name': pdg}
13@@ -1184,7 +1186,7 @@
14
15 if (name == 'order_hierarchy') and not self[name]:
16 if self['interactions']:
17- self['order_hierarchy'] = self.get_order_hierarchy()
18+ self['order_hierarchy'] = self.get_order_hierarchy()
19
20 if (name == 'expansion_order') and self[name] == None:
21 if self['interactions']:
22
23=== modified file 'madgraph/interface/common_run_interface.py'
24--- madgraph/interface/common_run_interface.py 2019-05-03 07:18:01 +0000
25+++ madgraph/interface/common_run_interface.py 2019-05-23 07:08:37 +0000
26@@ -5211,7 +5211,6 @@
27 def do_set(self, line):
28 """ edit the value of one parameter in the card"""
29
30-
31 args = self.split_arg(line)
32
33
34@@ -6696,6 +6695,7 @@
35
36 if card_name == 'unknown':
37 logger.warning('Fail to determine the type of the file. Not copied')
38+ return
39 if card_name != 'banner':
40 logger.info('copy %s as %s' % (pathname, card_name))
41 files.cp(path, self.paths[card_name.rsplit('_',1)[0]])
42
43=== modified file 'madgraph/interface/extended_cmd.py'
44--- madgraph/interface/extended_cmd.py 2019-04-24 11:02:09 +0000
45+++ madgraph/interface/extended_cmd.py 2019-05-23 07:08:37 +0000
46@@ -1652,7 +1652,6 @@
47 # filepath can be overwritten during the run (leading to weird results)
48 # Note also that we need a generator and not a list.
49 for line in self.inputfile:
50-
51 #remove pointless spaces and \n
52 line = line.replace('\n', '').strip()
53 # execute the line
54
55=== modified file 'madgraph/interface/madgraph_interface.py'
56--- madgraph/interface/madgraph_interface.py 2019-05-02 22:31:26 +0000
57+++ madgraph/interface/madgraph_interface.py 2019-05-23 07:08:37 +0000
58@@ -339,6 +339,9 @@
59 logger.info("")
60 logger.info(" import banner PATH [--no_launch]:",'$MG:BOLD')
61 logger.info(" Rerun the exact same run define in the valid banner.")
62+ logger.info("")
63+ logger.info(" import process PATH", '$MG:BOLD')
64+ logger.info(" generate the list of processes defined in the file")
65
66 def help_install(self):
67 logger.info("syntax: install " + "|".join(self._install_opts),'$MG:color:BLUE')
68@@ -2786,7 +2789,7 @@
69 _switch_opts = ['mg5','aMC@NLO','ML5']
70 _check_opts = ['full', 'timing', 'stability', 'profile', 'permutation',
71 'gauge','lorentz', 'brs', 'cms']
72- _import_formats = ['model_v4', 'model', 'proc_v4', 'command', 'banner']
73+ _import_formats = ['model_v4', 'model', 'proc_v4', 'command', 'banner', 'process']
74 _install_opts = ['Delphes', 'MadAnalysis4', 'ExRootAnalysis',
75 'update', 'Golem95', 'PJFry', 'QCDLoop', 'maddm', 'maddump',
76 'looptools']
77@@ -3008,8 +3011,13 @@
78 standalone_only = False
79 if '--standalone' in args:
80 standalone_only = True
81- args.remove('--standalone')
82-
83+ args.remove('--standalone')
84+
85+ allow_no_diagram = False
86+ if '--no_warning=nodiagram' in args:
87+ allow_no_diagram = True
88+ args.remove('--no_warning=nodiagram')
89+
90 # Check the validity of the arguments
91 self.check_add(args)
92
93@@ -3106,13 +3114,18 @@
94 self.options['ignore_six_quark_processes'] if \
95 "ignore_six_quark_processes" in self.options \
96 else []
97-
98- myproc = diagram_generation.MultiProcess(myprocdef,
99+ try:
100+ myproc = diagram_generation.MultiProcess(myprocdef,
101 collect_mirror_procs = collect_mirror_procs,
102 ignore_six_quark_processes = ignore_six_quark_processes,
103 optimize=optimize, diagram_filter=diagram_filter)
104-
105-
106+ except diagram_generation.NoDiagramException:
107+ if not allow_no_diagram:
108+ raise
109+ else:
110+ logger.warning('no diagram generated. No error raised due to flag')
111+ return
112+
113 for amp in myproc.get('amplitudes'):
114 if amp not in self._curr_amps:
115 self._curr_amps.append(amp)
116@@ -4732,9 +4745,10 @@
117 split_orders=list(set(perturbation_couplings_list+squared_orders.keys()))
118 try:
119 split_orders.sort(key=lambda elem: 0 if elem=='WEIGHTED' else
120- self._curr_model['order_hierarchy']
121+ self._curr_model.get('order_hierarchy')
122 [elem if not elem.endswith('.sqrt') else elem[:-5]])
123 except KeyError:
124+ misc.sprint(self._curr_model['order_hierarchy'], self._curr_model.get('modelpath'))
125 raise self.InvalidCmd, "The loaded model does not defined a "+\
126 " coupling order hierarchy for these couplings: %s"%\
127 str([so for so in split_orders if so!='WEIGHTED' and so not
128@@ -5234,6 +5248,7 @@
129 if os.path.sep in args[1] and "import" in self.history[-1]:
130 self.history[-1] = 'import model %s' % self._curr_model.get('modelpath+restriction')
131
132+
133 if self.options['gauge']=='unitary':
134 if not force and isinstance(self._curr_model,\
135 loop_base_objects.LoopModel) and \
136@@ -5285,7 +5300,23 @@
137 self.check_for_export_dir(args[1])
138 # Execute the card
139 self.import_command_file(args[1])
140-
141+ elif args[0] == 'process':
142+ if not os.path.isfile(args[1]):
143+ raise self.InvalidCmd("Path %s is not a valid pathname" % args[1])
144+ else:
145+ first = True
146+ for line in open(args[1]):
147+ line = line.split('#')[0].strip()
148+ if not line:
149+ continue
150+ if first:
151+ self.exec_cmd('generate %s' % line, precmd=True)
152+ first = False
153+ else:
154+ self.exec_cmd('add process %s' % line, precmd=True)
155+
156+
157+
158 elif args[0] == 'banner':
159 type = madevent_interface.MadEventCmd.detect_card_type(args[1])
160 if type != 'banner':
161@@ -5456,8 +5487,6 @@
162 (line.split()[0],why))
163 if self.history[-1] == 'define %s' % line.strip():
164 self.history.pop(-1)
165- else:
166- misc.sprint([self.history[-1], 'define %s' % line.strip()])
167
168 scheme = "old"
169 for qcd_container in ['p', 'j']:
170@@ -6011,7 +6040,7 @@
171 else:
172 othersource = 'uiuc'
173 # try with the mirror
174- misc.sprint('try other mirror', othersource, ' '.join(args))
175+ logger.debug('try other mirror', othersource, ' '.join(args))
176 return self.do_install('%s --source=%s' % (' '.join(args), othersource),
177 paths, additional_options)
178 else:
179@@ -6859,7 +6888,6 @@
180 self.check_launch(args, options)
181 options = options.__dict__
182 # args is now MODE PATH
183-
184 if args[0].startswith('standalone'):
185 if os.path.isfile(os.path.join(os.getcwd(),args[1],'Cards',\
186 'MadLoopParams.dat')) and not os.path.isfile(os.path.join(\
187
188=== modified file 'madgraph/interface/master_interface.py'
189--- madgraph/interface/master_interface.py 2018-04-02 14:02:36 +0000
190+++ madgraph/interface/master_interface.py 2019-05-23 07:08:37 +0000
191@@ -272,6 +272,10 @@
192
193 def do_import(self, *args, **opts):
194 self.cmd.do_import(self, *args, **opts)
195+ line = args[0]
196+ import_mode = args[0].split()[0]
197+ if import_mode in self._import_formats and not import_mode.startswith('model'):
198+ return
199 if self._curr_model:
200 if isinstance(self._curr_model, loop_base_objects.LoopModel) and \
201 self._curr_model['perturbation_couplings']!=[] and \
202@@ -610,6 +614,7 @@
203
204 def change_principal_cmd(self, name):
205
206+
207 old_cmd=self.current_interface
208 if name in self.interface_names.keys():
209 self.prompt= self.interface_names[name][0]+'>'
210
211=== modified file 'madgraph/interface/reweight_interface.py'
212--- madgraph/interface/reweight_interface.py 2019-05-09 10:05:05 +0000
213+++ madgraph/interface/reweight_interface.py 2019-05-23 07:08:37 +0000
214@@ -1,3 +1,4 @@
215+#! /usr/bin/env python
216 ################################################################################
217 #
218 # Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors
219@@ -26,8 +27,11 @@
220 import subprocess
221 from subprocess import Popen, PIPE, STDOUT
222
223-
224 pjoin = os.path.join
225+if "__main__" == __name__:
226+ local_path = os.path.dirname(os.path.realpath( __file__ ))
227+ root_path = pjoin(local_path, '..','..')
228+ sys.path.insert(0, root_path)
229
230 import madgraph.interface.extended_cmd as extended_cmd
231 import madgraph.interface.madgraph_interface as mg_interface
232@@ -66,13 +70,12 @@
233
234 prompt = 'Reweight>'
235 debug_output = 'Reweight_debug'
236- rwgt_dir_possibility = ['rw_me','rw_me_second','rw_mevirt','rw_mevirt_second']
237+ #rwgt_dir_possibility = ['rw_me','rw_me_second','rw_mevirt','rw_mevirt_second']
238
239 @misc.mute_logger()
240 def __init__(self, event_path=None, allow_madspin=False, mother=None, *completekey, **stdin):
241 """initialize the interface with potentially an event_path"""
242
243-
244 self.me_dir = os.getcwd()
245 if not event_path:
246 cmd_logger.info('************************************************************')
247@@ -95,6 +98,7 @@
248 self.f2pylib = {}
249 self.second_model = None
250 self.second_process = None
251+ self.nb_library = 1
252 self.dedicated_path = {}
253 self.soft_threshold = None
254 self.systematics = False # allow to run systematics in ouput2.0 mode
255@@ -154,6 +158,7 @@
256 if not self.lhe_input.banner:
257 value = self.ask("What is the path to banner", 0, [0], "please enter a path", timeout=0)
258 self.lhe_input.banner = open(value).read()
259+
260 self.banner = self.lhe_input.get_banner()
261
262 #get original cross-section/error
263@@ -361,6 +366,7 @@
264 if self.has_standalone_dir:
265 self.terminate_fortran_executables()
266 self.has_standalone_dir = False
267+
268 if args[-1] == "--add":
269 self.second_process.append(" ".join(args[1:-1]))
270 else:
271@@ -465,6 +471,16 @@
272 self.options['rwgt_name'] = opts['rwgt_name']
273
274 model_line = self.banner.get('proc_card', 'full_model_line')
275+ if not self.mother and not hasattr(self, 'output'):
276+ name, ext = self.lhe_input.name.rsplit('.',1)
277+ target = '%s_out.%s' % (name, ext)
278+
279+ if os.path.exists(target) and os.path.getmtime(target) > os.path.getmtime(self.lhe_input.name):
280+ nb_launch = len([1 for l in self.history if l.strip().startswith('launch')])
281+ if nb_launch > 1:
282+ files.mv(target, self.lhe_input.name)
283+ self.exec_cmd('import %s' % self.lhe_input.name)
284+
285
286 if not self.has_standalone_dir:
287 if self.rwgt_dir and os.path.exists(pjoin(self.rwgt_dir,'rw_me','rwgt.pkl')):
288@@ -506,7 +522,7 @@
289 path_me = self.me_dir
290
291 if self.second_model or self.second_process or self.dedicated_path:
292- rw_dir = pjoin(path_me, 'rw_me_second')
293+ rw_dir = pjoin(path_me, 'rw_me_%s' % self.nb_library)
294 else:
295 rw_dir = pjoin(path_me, 'rw_me')
296
297@@ -566,7 +582,7 @@
298 if self.output_type == "default":
299 for name in weight:
300 if 'orig' in name:
301- continue
302+ continue
303 event.reweight_data['%s%s' % (tag_name,name)] = weight[name]
304 #write this event with weight
305 output.write(str(event))
306@@ -583,7 +599,7 @@
307 output[(tag_name,name)].write(str(new_evt))
308
309 # check normalisation of the events:
310- if 'event_norm' in self.run_card:
311+ if self.run_card and 'event_norm' in self.run_card:
312 if self.run_card['event_norm'] in ['average','bias']:
313 for key, value in cross.items():
314 cross[key] = value / (event_nb+1)
315@@ -632,14 +648,16 @@
316 import madgraph.interface.madevent_interface as ME_interface
317
318 self.lhe_input.close()
319- if not self.mother:
320+ if hasattr(self, 'output_path'):
321+ target = self.output_path
322+ elif not self.mother:
323 name, ext = self.lhe_input.name.rsplit('.',1)
324 target = '%s_out.%s' % (name, ext)
325 elif self.output_type != "default" :
326 target = pjoin(self.mother.me_dir, 'Events', run_name, 'events.lhe')
327 else:
328 target = self.lhe_input.name
329-
330+
331 if self.output_type == "default":
332 files.mv(output.name, target)
333 logger.info('Event %s have now the additional weight' % self.lhe_input.name)
334@@ -694,7 +712,7 @@
335 path_me = self.me_dir
336
337 if self.second_model or self.second_process or self.dedicated_path:
338- rw_dir = pjoin(path_me, 'rw_me_second')
339+ rw_dir = pjoin(path_me, 'rw_me_%s' % self.nb_library)
340 else:
341 rw_dir = pjoin(path_me, 'rw_me')
342
343@@ -713,6 +731,8 @@
344 files.ln(ff.name, starting_dir=pjoin(path_me, 'rw_mevirt', 'Cards'))
345 cmd = common_run_interface.CommonRunCmd.ask_edit_card_static(cards=['param_card.dat'],
346 ask=self.ask, pwd=rw_dir, first_cmd=self.stored_line)
347+
348+
349 self.stored_line = None
350
351 # check for potential scan in the new card
352@@ -751,9 +771,8 @@
353 blockpat = re.compile(r'''<weightgroup name=\'mg_reweighting\'\s*weight_name_strategy=\'includeIdInWeightName\'>(?P<text>.*?)</weightgroup>''', re.I+re.M+re.S)
354 before, content, after = blockpat.split(self.banner['initrwgt'])
355 header_rwgt_other = before + after
356- 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)
357+ 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)
358 mg_rwgt_info = pattern.findall(content)
359-
360 maxid = 0
361 for k,(i, fulltag, nlotype, diff) in enumerate(mg_rwgt_info):
362 if i:
363@@ -796,12 +815,21 @@
364 else:
365 tag = str(rewgtid)
366
367+ version = misc.get_pkg_info()['version']
368+ try:
369+ model_version = self.mg5cmd._curr_model['model_info']['version']
370+ except TypeError:
371+ model_version = '0.0.0'
372+ str_version = "<weight_generator>MG5aMC_v%s</weight_generator>\n<weight_model_version>%s</weight_model_version>" %\
373+ (version, model_version)
374+
375 if not self.second_model and not self.dedicated_path:
376 old_param = check_param_card.ParamCard(s_orig.splitlines())
377 new_param = self.new_param_card
378 card_diff = old_param.create_diff(new_param)
379 if card_diff == '' and not self.second_process:
380 logger.warning(' REWEIGHTING: original card and new card are identical.')
381+ card_diff = "%s\n<weight_slha>%s</weight_slha>" % (str_version,card_diff)
382 try:
383 if old_param['sminputs'].get(3)- new_param['sminputs'].get(3) > 1e-3 * new_param['sminputs'].get(3):
384 logger.warning("We found different value of alpha_s. Note that the value of alpha_s used is the one associate with the event and not the one from the cards.")
385@@ -813,6 +841,7 @@
386 mg_rwgt_info.append((tag, name, card_diff))
387 else:
388 str_proc = "\n change process ".join([""]+self.second_process)
389+ str_proc = "\n<weight_card>\n%s\n</weight_card>\n"
390 for name in type_rwgt:
391 mg_rwgt_info.append((tag, name, str_proc + '\n'+ card_diff))
392 else:
393@@ -825,8 +854,8 @@
394 if self.dedicated_path:
395 for k,v in self.dedicated_path.items():
396 str_info += "\n change %s %s" % (k,v)
397- card_diff = str_info
398- str_info += '\n' + s_new
399+ card_diff = '<weight_slha>\n%s\n</weight_slha>' % str_info
400+ str_info = '\n<weight_card>\n%s\n</weight_card>\n%s\n<weight_slha>\n%s</weight_slha>\n' % (str_info,str_version,s_new)
401 for name in type_rwgt:
402 mg_rwgt_info.append((tag, name, str_info))
403 # re-create the banner.
404@@ -846,8 +875,11 @@
405 self.banner['initrwgt'] = self.banner['initrwgt'].replace('\n\n', '\n')
406
407 logger.info('starts to compute weight for events with the following modification to the param_card:')
408- logger.info(card_diff.replace('\n','\nKEEP:'))
409- self.run_card = banner.Banner(self.banner).charge_card('run_card')
410+ #logger.info(card_diff.replace('\n','\nKEEP:'))
411+ try:
412+ self.run_card = banner.Banner(self.banner).charge_card('run_card')
413+ except Exception:
414+ self.run_card = None
415
416 if self.options['rwgt_name']:
417 tag_name = self.options['rwgt_name']
418@@ -858,7 +890,7 @@
419 for (path,tag), module in self.f2pylib.items():
420 with misc.chdir(pjoin(os.path.dirname(rw_dir), path)):
421 with misc.stdchannel_redirected(sys.stdout, os.devnull):
422- if 'second' in path or tag == 3:
423+ if 'rw_me_' in path or tag == 3:
424 module.initialise(pjoin(rw_dir, 'Cards', 'param_card.dat'))
425 else:
426 module.initialise(pjoin(path_me, 'rw_me', 'Cards', 'param_card_orig.dat'))
427@@ -986,6 +1018,7 @@
428 misc.sprint(nhel, Pdir, hel_dict)
429 raise Exception, "Invalid matrix element for original computation (weight=0)"
430
431+
432 return {'orig': orig_wgt, '': w_new/w_orig*orig_wgt*jac}
433
434 def calculate_nlo_weight(self, event):
435@@ -1158,14 +1191,20 @@
436 if (not self.second_model and not self.second_process and not self.dedicated_path) or hypp_id==0:
437 orig_order, Pdir, hel_dict = self.id_to_path[tag]
438 else:
439- orig_order, Pdir, hel_dict = self.id_to_path_second[tag]
440+ if tag in self.id_to_path_second:
441+ orig_order, Pdir, hel_dict = self.id_to_path_second[tag]
442+ else:
443+ return 0.0
444
445 base = os.path.basename(os.path.dirname(Pdir))
446- if '_second' in base:
447+ if base == 'rw_me':
448+ moduletag = (base, 2+hypp_id)
449+ else:
450 moduletag = (base, 2)
451- else:
452- moduletag = (base, 2+hypp_id)
453+
454+
455
456+
457 module = self.f2pylib[moduletag]
458
459 p = event.get_momenta(orig_order)
460@@ -1175,7 +1214,7 @@
461 if self.helicity_reweighting and 9 not in hel_order:
462 nhel = hel_dict[tuple(hel_order)]
463 else:
464- nhel = -1
465+ nhel = -2
466
467 # For 2>N pass in the center of mass frame
468 # - required for helicity by helicity re-weighitng
469@@ -1193,8 +1232,12 @@
470
471 with misc.chdir(Pdir):
472 with misc.stdchannel_redirected(sys.stdout, os.devnull):
473- me_value = module.smatrixhel(pdg,p, event.aqcd, scale2, nhel)
474-
475+ if hasattr(event, 'ievent'):
476+ ievent = event.ievent
477+ else:
478+ ievent = -1
479+ me_value = module.smatrixhel(pdg, ievent, p, event.aqcd, scale2, nhel)
480+
481 # for loop we have also the stability status code
482 if isinstance(me_value, tuple):
483 me_value, code = me_value
484@@ -1202,7 +1245,7 @@
485 hundred_value = (code % 1000) //100
486 if hundred_value in [4]:
487 me_value = 0.
488-
489+
490 return me_value
491
492 def terminate_fortran_executables(self, new_card_only=False):
493@@ -1308,10 +1351,13 @@
494 nlo_order = nlo_order.replace('noborn', 'virt')
495 commandline += "add process %s [%s] %s;" % (base,nlo_order,post)
496 commandline = commandline.replace('add process', 'generate',1)
497- logger.info("RETRY with %s", commandline)
498- mgcmd.exec_cmd(commandline, precmd=True)
499- has_nlo = False
500+ if commandline:
501+ logger.info("RETRY with %s", commandline)
502+ mgcmd.exec_cmd(commandline, precmd=True)
503+ has_nlo = False
504 except Exception, error:
505+ misc.sprint(mgcmd._curr_model.get('modelpath'))
506+ misc.sprint(type(error))
507 raise
508
509 commandline = 'output standalone_rw %s --prefix=int' % pjoin(path_me,data['paths'][0])
510@@ -1504,7 +1550,13 @@
511 #self.id_to_path = {}
512 #data['id2path'] = self.id_to_path
513 else:
514- data['paths'] = ['rw_me_second', 'rw_mevirt_second']
515+ for key in self.f2pylib.keys():
516+ if 'rw_me_%s' % self.nb_library in key[0]:
517+ del self.f2pylib[key]
518+
519+
520+ self.nb_library += 1
521+ data['paths'] = ['rw_me_%s' % self.nb_library, 'rw_mevirt_%s' % self.nb_library]
522 # model
523 if self.second_model:
524 data['mg_names'] = True
525@@ -1536,14 +1588,19 @@
526 else:
527 path_me = self.rwgt_dir
528 data['path'] = path_me
529- try:
530- shutil.rmtree(pjoin(path_me,data['paths'][0]))
531- except Exception:
532- pass
533- try:
534- shutil.rmtree(pjoin(path_me, data['paths'][1]))
535- except Exception:
536- pass
537+ for i in range(2):
538+ pdir = pjoin(path_me,data['paths'][i])
539+ if os.path.exists(pdir):
540+ try:
541+ shutil.rmtree(pjoin(path_me,data['paths'][0]))
542+ except Exception, error:
543+ misc.sprint(error)
544+ pass
545+
546+
547+
548+
549+
550
551 # 1. prepare the interface----------------------------------------------
552 mgcmd = self.mg5cmd
553@@ -1691,12 +1748,16 @@
554 path_me = self.me_dir
555 else:
556 path_me = self.rwgt_dir
557- for onedir in self.rwgt_dir_possibility:
558+
559+ rwgt_dir_possibility = ['rw_me','rw_me_%s' % self.nb_library,'rw_mevirt','rw_mevirt_%s' % self.nb_library]
560+ for onedir in rwgt_dir_possibility:
561 if not os.path.isdir(pjoin(path_me,onedir)):
562 continue
563 pdir = pjoin(path_me, onedir, 'SubProcesses')
564 if self.mother:
565 nb_core = self.mother.options['nb_core'] if self.mother.options['run_mode'] !=0 else 1
566+ elif hasattr(self, 'nb_core'):
567+ nb_core = self.nb_core
568 else:
569 nb_core = 1
570 os.environ['MENUM'] = '2'
571@@ -1715,7 +1776,8 @@
572
573 self.id_to_path = {}
574 self.id_to_path_second = {}
575- for onedir in self.rwgt_dir_possibility:
576+ rwgt_dir_possibility = ['rw_me','rw_me_%s' % self.nb_library,'rw_mevirt','rw_mevirt_%s' % self.nb_library]
577+ for onedir in rwgt_dir_possibility:
578 if not os.path.exists(pjoin(path_me,onedir)):
579 continue
580 pdir = pjoin(path_me, onedir, 'SubProcesses')
581@@ -1724,14 +1786,18 @@
582 mod_name = '%s.SubProcesses.allmatrix%spy' % (onedir, tag)
583 #mymod = __import__('%s.SubProcesses.allmatrix%spy' % (onedir, tag), globals(), locals(), [],-1)
584 if mod_name in sys.modules.keys():
585+# if 'rw_me_' in mod_name:
586+# raise Exception
587 del sys.modules[mod_name]
588 tmp_mod_name = mod_name
589 while '.' in tmp_mod_name:
590 tmp_mod_name = tmp_mod_name.rsplit('.',1)[0]
591 del sys.modules[tmp_mod_name]
592- mymod = __import__(mod_name, globals(), locals(), [],-1)
593+ mymod = __import__(mod_name, globals(), locals(), [],-1)
594+ reload(mymod)
595 else:
596 mymod = __import__(mod_name, globals(), locals(), [],-1)
597+
598
599 S = mymod.SubProcesses
600 mymod = getattr(S, 'allmatrix%spy' % tag)
601@@ -1744,12 +1810,16 @@
602 break
603
604 data = self.id_to_path
605- if '_second' in onedir:
606+ if onedir not in ["rw_me", "rw_mevirt"]:
607 data = self.id_to_path_second
608
609+
610+
611 # get all the information
612 all_pdgs = mymod.get_pdg_order()
613- all_pdgs = [[pdg for pdg in pdgs if pdg!=0] for pdgs in mymod.get_pdg_order()]
614+ allids, all_pids = mymod.get_pdg_order()
615+ all_pdgs = [[pdg for pdg in pdgs if pdg!=0] for pdgs in allids]
616+ #all_pids = [pid for (pdgs, pid) in allids]
617 all_prefix = [''.join(j).strip().lower() for j in mymod.get_prefix()]
618 prefix_set = set(all_prefix)
619
620@@ -1772,7 +1842,7 @@
621 misc.sprint(os.path.exists(pjoin(path_me,onedir,'SubProcesses','MadLoop5_resources', '%sHelConfigs.dat' % prefix.upper())))
622 continue
623
624- for i,pdg in enumerate(all_pdgs):
625+ for i,(pdg,pid) in enumerate(zip(all_pdgs,all_pids)):
626 if self.is_decay:
627 incoming = [pdg[0]]
628 outgoing = pdg[1:]
629@@ -1785,7 +1855,7 @@
630 outgoing.sort()
631 tag = (tuple(incoming), tuple(outgoing))
632 if 'virt' in onedir:
633- tag = (tag, 'V')
634+ tag = (tag, 'V')
635 prefix = all_prefix[i]
636 hel = hel_dict[prefix]
637 if tag in data:
638@@ -1907,10 +1977,111 @@
639
640
641
642-
643-
644-
645-
646-
647-
648-
649+if "__main__" == __name__:
650+ # Check if optimize mode is (and should be) activated
651+ import optparse
652+ # Write out nice usage message if called with -h or --help
653+ usage = "usage: %prog [options] [FILE] "
654+ parser = optparse.OptionParser(usage=usage)
655+ parser.add_option("-l", "--logging", default='INFO',
656+ help="logging level (DEBUG|INFO|WARNING|ERROR|CRITICAL) [%default]")
657+ parser.add_option("-f", "--file", default='',
658+ help="Use script file FILE")
659+ parser.add_option("-d", "--mgme_dir", default='', dest = 'mgme_dir',
660+ help="Use MG_ME directory MGME_DIR")
661+ parser.add_option("","--debug", action="store_true", default=False, dest='debug', \
662+ help='force to launch debug mode')
663+ (options, args) = parser.parse_args()
664+ if len(args) == 0:
665+ args = ''
666+
667+ if __debug__ and not options.debug and \
668+ (not os.path.exists(os.path.join(root_path, 'bin','create_release.py'))):
669+ subprocess.call([sys.executable] + ['-O'] + sys.argv)
670+ sys.exit()
671+
672+
673+ import logging
674+ import logging.config
675+ import madgraph.interface.coloring_logging
676+
677+ try:
678+ import readline
679+ except ImportError:
680+ try:
681+ import pyreadline as readline
682+ except:
683+ print "For tab completion and history, install module readline."
684+ else:
685+ import rlcompleter
686+
687+ if 'r261:67515' in sys.version and 'GCC 4.2.1 (Apple Inc. build 5646)' in sys.version:
688+ readline.parse_and_bind("bind ^I rl_complete")
689+ readline.__doc__ = 'libedit'
690+
691+ elif hasattr(readline, '__doc__'):
692+ if 'libedit' not in readline.__doc__:
693+ readline.parse_and_bind("tab: complete")
694+ else:
695+ readline.parse_and_bind("bind ^I rl_complete")
696+ else:
697+ readline.__doc__ = 'GNU'
698+ readline.parse_and_bind("tab: complete")
699+
700+ # charge history file
701+ try:
702+ history_file = os.path.join(os.environ['HOME'], '.mg5', 'rwgthistory')
703+ readline.read_history_file(history_file)
704+ except:
705+ pass
706+
707+ try:
708+ import psyco
709+ psyco.full()
710+ except:
711+ pass
712+
713+ try:
714+ if __debug__ and options.logging == 'INFO':
715+ options.logging = 'DEBUG'
716+ logging.config.fileConfig(os.path.join(root_path, 'madgraph', 'interface', '.mg5_logging.conf'))
717+ logging.root.setLevel(eval('logging.' + options.logging))
718+ logging.getLogger('madgraph').setLevel(eval('logging.' + options.logging))
719+ logging.getLogger('madevent').setLevel(eval('logging.' + options.logging))
720+ except:
721+ pass
722+
723+ # Call the cmd interface main loop
724+ try:
725+ if options.file or args:
726+ # They are an input file
727+ if args:
728+ input_file = os.path.realpath(args[0])
729+ else:
730+ input_file = os.path.realpath(options.file)
731+ print "using input+file", input_file
732+ cmd_line = ReweightInterface()
733+ cmd_line.use_rawinput = False
734+ cmd_line.haspiping = False
735+ cmd_line.import_command_file(input_file)
736+ cmd_line.run_cmd('quit')
737+ else:
738+ # Interactive mode
739+ try:
740+ cmd_line = ReweightInterface()
741+ cmd_line.use_rawinput = True
742+ cmd_line.cmdloop()
743+ except:
744+ pass
745+ try:
746+ cmd_line.exec_cmd('quit all', printcmd=False)
747+ readline.set_history_length(100)
748+ if not os.path.exists(os.path.join(os.environ['HOME'], '.mg5')):
749+ os.mkdir(os.path.join(os.environ['HOME'], '.mg5'))
750+ readline.write_history_file(history_file)
751+ except Exception, error:
752+ pass
753+ except KeyboardInterrupt:
754+ print 'writting history and quit on KeyboardInterrupt'
755+ pass
756+
757
758=== modified file 'madgraph/iolibs/export_v4.py'
759--- madgraph/iolibs/export_v4.py 2018-12-22 20:33:20 +0000
760+++ madgraph/iolibs/export_v4.py 2019-05-23 07:08:37 +0000
761@@ -2066,17 +2066,18 @@
762
763 template = """
764 %(python_information)s
765- subroutine smatrixhel(pdgs, npdg, p, ALPHAS, SCALE2, nhel, ANS)
766+ subroutine smatrixhel(pdgs, procid, npdg, p, ALPHAS, SCALE2, nhel, ANS)
767 IMPLICIT NONE
768
769 CF2PY double precision, intent(in), dimension(0:3,npdg) :: p
770 CF2PY integer, intent(in), dimension(npdg) :: pdgs
771+CF2PY integer, intent(in):: procid
772 CF2PY integer, intent(in) :: npdg
773 CF2PY double precision, intent(out) :: ANS
774 CF2PY double precision, intent(in) :: ALPHAS
775 CF2PY double precision, intent(in) :: SCALE2
776 integer pdgs(*)
777- integer npdg, nhel
778+ integer npdg, nhel, procid
779 double precision p(*)
780 double precision ANS, ALPHAS, PI,SCALE2
781 include 'coupl.inc'
782@@ -2084,7 +2085,7 @@
783 PI = 3.141592653589793D0
784 G = 2* DSQRT(ALPHAS*PI)
785 CALL UPDATE_AS_PARAM()
786- if (scale2.ne.0d0) stop 1
787+ 1 if (scale2.ne.0d0) stop 1
788
789 %(smatrixhel)s
790
791@@ -2100,12 +2101,31 @@
792 RETURN
793 END
794
795- subroutine get_pdg_order(PDG)
796+ subroutine get_nincoming(pdgs, procid, npdg, N)
797+ IMPLICIT NONE
798+CF2PY integer, intent(in), dimension(npdg) :: pdgs
799+CF2PY integer, intent(in):: procid
800+CF2PY integer, intent(in) :: npdg
801+CF2PY INTEGER, intent(out) :: N
802+ integer pdgs(*)
803+ integer npdg, procid
804+ INTEGER N
805+ %(nincoming)s
806+ return
807+ end
808+
809+ subroutine get_pdg_order(PDG, PID)
810 IMPLICIT NONE
811 CF2PY INTEGER, intent(out) :: PDG(%(nb_me)i,%(maxpart)i)
812- INTEGER PDG(%(nb_me)i,%(maxpart)i), PDGS(%(nb_me)i,%(maxpart)i)
813+CF2PY INTEGER, intent(out) :: PID(%(nb_me)i)
814+
815+ INTEGER PDG(%(nb_me)i,%(maxpart)i), PDGS(%(nb_me)i,%(maxpart)i)
816+ INTEGER PID(%(nb_me)i),PIDs(%(nb_me)i)
817 DATA PDGS/ %(pdgs)s /
818+ DATA PIDS/ %(pids)s /
819+
820 PDG = PDGS
821+ PID = PIDS
822 RETURN
823 END
824
825@@ -2123,43 +2143,58 @@
826
827 allids = self.prefix_info.keys()
828 allprefix = [self.prefix_info[key][0] for key in allids]
829- min_nexternal = min([len(ids) for ids in allids])
830- max_nexternal = max([len(ids) for ids in allids])
831+ min_nexternal = min([len(ids[0]) for ids in allids])
832+ max_nexternal = max([len(ids[0]) for ids in allids])
833
834 info = []
835- for key, (prefix, tag) in self.prefix_info.items():
836- info.append('#PY %s : %s # %s' % (tag, key, prefix))
837-
838+ for (key, pid), (prefix, tag) in self.prefix_info.items():
839+ info.append('#PY %s : %s # %s %s' % (tag, key, prefix, pid))
840
841 text = []
842+ text_incomming = []
843 for n_ext in range(min_nexternal, max_nexternal+1):
844- current = [ids for ids in allids if len(ids)==n_ext]
845- if not current:
846+ current_id = [ids[0] for ids in allids if len(ids[0])==n_ext]
847+ current_pid = [ids[1] for ids in allids if len(ids[0])==n_ext]
848+ if not current_id:
849 continue
850 if min_nexternal != max_nexternal:
851 if n_ext == min_nexternal:
852 text.append(' if (npdg.eq.%i)then' % n_ext)
853+ text_incomming.append(' if (npdg.eq.%i)then' % n_ext)
854 else:
855 text.append(' else if (npdg.eq.%i)then' % n_ext)
856- for ii,pdgs in enumerate(current):
857+ text_incomming.append(' else if (npdg.eq.%i)then' % n_ext)
858+ for ii,pdgs in enumerate(current_id):
859+ pid = current_pid[ii]
860+ #misc.sprint([(i,pdg) for i,pdg in pdgs])
861 condition = '.and.'.join(['%i.eq.pdgs(%i)' %(pdg, i+1) for i, pdg in enumerate(pdgs)])
862 if ii==0:
863- text.append( ' if(%s) then ! %i' % (condition, i))
864+ text.append( ' if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition, pid, i))
865+ text_incomming.append( ' if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition, pid, i))
866 else:
867- text.append( ' else if(%s) then ! %i' % (condition,i))
868- text.append(' call %ssmatrixhel(p, nhel, ans)' % self.prefix_info[pdgs][0])
869+ text.append( ' else if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition,pid,i))
870+ text_incomming.append( ' else if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition,pid,i))
871+ text.append(' call %ssmatrixhel(p, nhel, ans)' % self.prefix_info[(pdgs,pid)][0])
872+ text_incomming.append(' N=%i' % len(tag[0]))
873+ text.append( ' else if(procid.gt.0) then !')
874+ text.append( ' procid = -1' )
875+ text.append( ' goto 1' )
876 text.append(' endif')
877+ text_incomming.append(' endif')
878 #close the function
879 if min_nexternal != max_nexternal:
880 text.append('endif')
881+ text_incomming.append(' endif')
882
883 formatting = {'python_information':'\n'.join(info),
884 'smatrixhel': '\n'.join(text),
885 'maxpart': max_nexternal,
886 'nb_me': len(allids),
887 'pdgs': ','.join(str(pdg[i]) if i<len(pdg) else '0'
888- for i in range(max_nexternal) for pdg in allids),
889- 'prefix':'\',\''.join(allprefix)
890+ for i in range(max_nexternal) for (pdg,pid) in allids),
891+ 'prefix':'\',\''.join(allprefix),
892+ 'pids': ','.join(str(pid) for (pdg,pid) in allids),
893+ 'nincoming':'\n'.join(text_incomming)
894 }
895 formatting['lenprefix'] = len(formatting['prefix'])
896 text = template % formatting
897@@ -2257,7 +2292,7 @@
898 raise Exception, '--prefix options supports only \'int\' and \'proc\''
899 for proc in matrix_element.get('processes'):
900 ids = [l.get('id') for l in proc.get('legs_with_decays')]
901- self.prefix_info[tuple(ids)] = [proc_prefix, proc.get_tag()]
902+ self.prefix_info[(tuple(ids), proc.get('id'))] = [proc_prefix, proc.get_tag()]
903
904 calls = self.write_matrix_element_v4(
905 writers.FortranWriter(filename),
906@@ -2509,6 +2544,7 @@
907 else:
908 matrix_template = "matrix_standalone_splitOrders_v4.inc"
909
910+
911 replace_dict['template_file'] = pjoin(_file_path, 'iolibs', 'template_files', matrix_template)
912 replace_dict['template_file2'] = pjoin(_file_path, \
913 'iolibs/template_files/split_orders_helping_functions.inc')
914@@ -5688,8 +5724,14 @@
915 else:
916 load_card = ''
917 lha_read_filename='lha_read.f'
918- cp( MG5DIR + '/models/template_files/fortran/' + lha_read_filename, \
919- os.path.join(self.dir_path,'lha_read.f'))
920+
921+ nb_para= len(self.params_dep + self.params_indep + self.params_ext)
922+ template = pjoin(MG5DIR, 'models', 'template_files', 'fortran', lha_read_filename)
923+ open(os.path.join(self.dir_path,'lha_read.f'),'w').write(
924+ open(template).read() % {'maxpara':nb_para})
925+
926+ #cp( MG5DIR + '/models/template_files/fortran/' + lha_read_filename, \
927+ # os.path.join(self.dir_path,'lha_read.f'))
928
929 file=file%{'includes':'\n '.join(includes),
930 'load_card':load_card}
931
932=== modified file 'madgraph/iolibs/template_files/loop/loop_matrix_standalone.inc'
933--- madgraph/iolibs/template_files/loop/loop_matrix_standalone.inc 2017-04-25 14:47:44 +0000
934+++ madgraph/iolibs/template_files/loop/loop_matrix_standalone.inc 2019-05-23 07:08:37 +0000
935@@ -448,7 +448,7 @@
936 C Make sure that lorentz rotation tests are not used if there is external loop wavefunction of spin 2 and that one specific helicity is asked
937 NROTATIONS_DP_BU = NROTATIONS_DP
938 NROTATIONS_QP_BU = NROTATIONS_QP
939-if(MAX_SPIN_EXTERNAL_PARTICLE.gt.3.AND.USERHEL.NE.-1) THEN
940+if(MAX_SPIN_EXTERNAL_PARTICLE.gt.3.AND.USERHEL.GT.-1) THEN
941 if(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
942 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was asked for this PS point, and there is a spin-2 (or higher) particle in the external states.'
943 WRITE(*,*) '##WARNING: As a result, MadLoop disabled the Lorentz rotation test for this phase-space point only.'
944@@ -481,7 +481,7 @@
945 ENDDO
946 101 CONTINUE
947 CLOSE(1)
948-IF (HelicityFilterLevel.eq.0) then
949+IF (HelicityFilterLevel.eq.0.or.userhel.eq.-2) then
950 FOUNDHELFILTER=.TRUE.
951 DO J=1,NCOMB
952 GOODHEL(J)=.TRUE.
953@@ -576,7 +576,7 @@
954 HELPICKED=1
955 CTMODE=CTMODEINIT
956 ELSE
957- IF (USERHEL.ne.-1) THEN
958+ IF (USERHEL.gt.0) THEN
959 IF(.NOT.GOODHEL(USERHEL)) THEN
960 ANS(1)=0.0d0
961 ANS(2)=0.0d0
962@@ -584,7 +584,7 @@
963 goto 9999
964 ENDIF
965 ENDIF
966- HELPICKED=USERHEL
967+ HELPICKED=MAX(USERHEL,-1)
968 IF (CTMODERUN.GT.-1) THEN
969 CTMODE=CTMODERUN
970 ELSE
971@@ -694,7 +694,7 @@
972 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
973 C Update of NEXTREF, will be used for loop induced only.
974 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)
975- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
976+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
977 BUFFR(1)=BUFFR(1)+ANS(1)
978 BUFFR(2)=BUFFR(2)+ANS(2)
979 BUFFR(3)=BUFFR(3)+ANS(3)
980@@ -785,7 +785,7 @@
981
982 DO K=1,3
983 ANS(K)=ANS(K)/DBLE(IDEN)
984- IF (USERHEL.NE.-1) THEN
985+ IF (USERHEL.GT.-1) THEN
986 ANS(K)=ANS(K)*HELAVGFACTOR
987 ELSE
988 DO J=1,NINITIAL
989
990=== modified file 'madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc'
991--- madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc 2017-07-31 22:08:40 +0000
992+++ madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc 2019-05-23 07:08:37 +0000
993@@ -642,6 +642,10 @@
994 CALL %(proc_prefix)sSET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
995 ENDIF
996
997+IF(USERHEL.eq.-2) THEN
998+ NTRY = 0
999+ENDIF
1000+
1001 IF(NTRY.EQ.0) THEN
1002 HELDOUBLECHECKED=(.NOT.DoubleCheckHelicityFilter).OR.(HelicityFilterLevel.eq.0)
1003 OPEN(1, FILE=LoopFilterFN, err=100, status='OLD', action='READ')
1004@@ -659,7 +663,7 @@
1005 101 CONTINUE
1006 CLOSE(1)
1007
1008-IF (HelicityFilterLevel.eq.0) then
1009+IF (HelicityFilterLevel.eq.0.or.userhel.eq.-2) then
1010 FOUNDHELFILTER=.TRUE.
1011 DO J=1,NCOMB
1012 GOODHEL(J)=1
1013@@ -816,7 +820,7 @@
1014 HELPICKED=1
1015 CTMODE=CTMODEINIT
1016 ELSE
1017- IF (USERHEL.ne.-1) then
1018+ IF (USERHEL.gt.0) then
1019 IF(GOODHEL(USERHEL).eq.-HELOFFSET) THEN
1020 DO I=0,NSQUAREDSO
1021 ANS(1,I)=0.0d0
1022@@ -826,7 +830,7 @@
1023 goto 9999
1024 ENDIF
1025 ENDIF
1026- HELPICKED=USERHEL
1027+ HELPICKED=MAX(USERHEL,-1)
1028 IF (CTMODERUN.NE.-1) THEN
1029 CTMODE=CTMODERUN
1030 ELSE
1031@@ -891,7 +895,7 @@
1032 C MadLoop jumps to this label during stability checks when it recomputes the same PS point with a different CTMode
1033 300 CONTINUE
1034 C Of course the trick of reusing coefficients when reducing at the amplitude level only works when computing one helicity at a time
1035-if (USERHEL.ne.-1) THEN
1036+if (USERHEL.gt.-1) THEN
1037 SKIP_LOOPNUM_COEFS_CONSTRUCTION = .TRUE.
1038 ENDIF
1039 308 CONTINUE
1040@@ -1147,7 +1151,7 @@
1041
1042 ## if(ComputeColorFlows){
1043 C We should compute the color flow either if it contributes to the final result (i.e. not used just for the filtering), or if the computation is only done from the color flows
1044-IF (((.NOT.DIRECT_ME_COMPUTATION).AND.ME_COMPUTATION_FROM_JAMP).OR.((H.EQ.USERHEL.OR.USERHEL.EQ.-1).and.(POLARIZATIONS(0,0).eq.-1.or.%(proc_prefix)sIS_HEL_SELECTED(H)))) THEN
1045+IF (((.NOT.DIRECT_ME_COMPUTATION).AND.ME_COMPUTATION_FROM_JAMP).OR.((H.EQ.USERHEL.OR.USERHEL.LE.-1).and.(POLARIZATIONS(0,0).eq.-1.or.%(proc_prefix)sIS_HEL_SELECTED(H)))) THEN
1046 C The cumulative quantities must only be computed if that helicity contributes according to user request (second argument of the subroutine below).
1047 CALL %(proc_prefix)sCOMPUTE_COLOR_FLOWS(HEL_MULT)
1048 IF(ME_COMPUTATION_FROM_JAMP) THEN
1049@@ -1172,7 +1176,7 @@
1050 ENDDO
1051 ENDIF
1052 C The if statement below is not strictly necessary but makes it clear when it is executed.
1053- ELSEIF(H.EQ.USERHEL.OR.USERHEL.EQ.-1) THEN
1054+ ELSEIF(H.EQ.USERHEL.OR.USERHEL.LE.-1) THEN
1055 C Make sure that that no polarization constraint filters out this helicity
1056 IF (POLARIZATIONS(0,0).eq.-1.or.%(proc_prefix)sIS_HEL_SELECTED(H)) THEN
1057 C If both computational method is used, then we must just update RES_FROM_JAMP
1058@@ -1183,7 +1187,7 @@
1059 ENDDO
1060 ENDIF
1061 ENDIF
1062- IF (H.EQ.USERHEL.OR.USERHEL.EQ.-1) THEN
1063+ IF (H.EQ.USERHEL.OR.USERHEL.LE.-1) THEN
1064 C Make sure that that no polarization constraint filters out this helicity
1065 IF (POLARIZATIONS(0,0).eq.-1.or.%(proc_prefix)sIS_HEL_SELECTED(H)) THEN
1066 CALL %(proc_prefix)sCOMPUTE_COLOR_FLOWS_DERIVED_QUANTITIES(HEL_MULT)
1067@@ -1315,7 +1319,7 @@
1068 1226 CONTINUE
1069
1070 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1071- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1072+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1073 C Make sure that that no polarization constraint filters out this helicity
1074 IF (POLARIZATIONS(0,0).eq.-1.or.%(proc_prefix)sIS_HEL_SELECTED(HELPICKED)) THEN
1075 C TO KEEP TRACK OF THE FINAL ANSWER TO BE RETURNED DURING CHECK PHASE
1076@@ -1527,7 +1531,7 @@
1077 ## }
1078 DO I=0,NSQUAREDSO
1079 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1080- IF (USERHEL.NE.-1) THEN
1081+ IF (USERHEL.GT.-1) THEN
1082 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1083 ELSE
1084 DO J=1,NINITIAL
1085@@ -1560,7 +1564,7 @@
1086 DO K=0,3
1087 ## }
1088 RES_FROM_JAMP(K,I)=RES_FROM_JAMP(K,I)/DBLE(IDEN)
1089- IF (USERHEL.NE.-1) THEN
1090+ IF (USERHEL.GT.-1) THEN
1091 RES_FROM_JAMP(K,I)=RES_FROM_JAMP(K,I)*HELAVGFACTOR
1092 ELSE
1093 DO L=1,NINITIAL
1094
1095=== modified file 'madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc'
1096--- madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc 2018-05-17 12:03:54 +0000
1097+++ madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc 2019-05-23 07:08:37 +0000
1098@@ -127,24 +127,27 @@
1099 C ----------
1100 C BEGIN CODE
1101 C ----------
1102- NTRY=NTRY+1
1103- DO IHEL=1,NEXTERNAL
1104- JC(IHEL) = +1
1105- ENDDO
1106- DO I=1,NSQAMPSO
1107- ANS(I) = 0D0
1108- ENDDO
1109 C When spin-2 particles are involved, the Helicity filtering is dangerous for the 2->1 topology.
1110 C This is because depending on the MC setup the initial PS points have back-to-back initial states
1111 C for which some of the spin-2 helicity configurations are zero. But they are no longer zero
1112 C if the point is boosted on the z-axis. Remember that HELAS helicity amplitudes are no longer
1113 C lorentz invariant with expternal spin-2 particles (only the helicity sum is).
1114 C For this reason, we simply remove the filterin when there is only three external particles.
1115- IF (NEXTERNAL.LE.3) THEN
1116+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
1117 DO IHEL=1,NCOMB
1118 GOODHEL(IHEL)=.TRUE.
1119 ENDDO
1120+ IF(USERHEL.EQ.-2) USERHEL = -1
1121 ENDIF
1122+
1123+ NTRY=NTRY+1
1124+ DO IHEL=1,NEXTERNAL
1125+ JC(IHEL) = +1
1126+ ENDDO
1127+ DO I=1,NSQAMPSO
1128+ ANS(I) = 0D0
1129+ ENDDO
1130+
1131 DO IHEL=1,NCOMB
1132 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
1133 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN
1134
1135=== modified file 'madgraph/iolibs/template_files/matrix_standalone_v4.inc'
1136--- madgraph/iolibs/template_files/matrix_standalone_v4.inc 2018-05-17 12:03:54 +0000
1137+++ madgraph/iolibs/template_files/matrix_standalone_v4.inc 2019-05-23 07:08:37 +0000
1138@@ -78,7 +78,6 @@
1139 LOGICAL GOODHEL(NCOMB)
1140 DATA NTRY/0/
1141 DATA GOODHEL/NCOMB*.FALSE./
1142-
1143 C
1144 C GLOBAL VARIABLES
1145 C
1146@@ -101,21 +100,22 @@
1147 C ----------
1148 C BEGIN CODE
1149 C ----------
1150- IF(USERHEL.EQ.-1) NTRY=NTRY+1
1151- DO IHEL=1,NEXTERNAL
1152- JC(IHEL) = +1
1153- ENDDO
1154 C When spin-2 particles are involved, the Helicity filtering is dangerous for the 2->1 topology.
1155 C This is because depending on the MC setup the initial PS points have back-to-back initial states
1156 C for which some of the spin-2 helicity configurations are zero. But they are no longer zero
1157 C if the point is boosted on the z-axis. Remember that HELAS helicity amplitudes are no longer
1158 C lorentz invariant with expternal spin-2 particles (only the helicity sum is).
1159 C For this reason, we simply remove the filterin when there is only three external particles.
1160- IF (NEXTERNAL.LE.3) THEN
1161- DO IHEL=1,NCOMB
1162- GOODHEL(IHEL)=.TRUE.
1163- ENDDO
1164+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
1165+ DO IHEL=1,NCOMB
1166+ GOODHEL(IHEL)=.TRUE.
1167+ ENDDO
1168+ IF(USERHEL.EQ.-2) USERHEL=-1
1169 ENDIF
1170+ IF(USERHEL.EQ.-1) NTRY=NTRY+1
1171+ DO IHEL=1,NEXTERNAL
1172+ JC(IHEL) = +1
1173+ ENDDO
1174 ANS = 0D0
1175 DO IHEL=1,NCOMB
1176 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
1177
1178=== modified file 'madgraph/loop/loop_exporters.py'
1179--- madgraph/loop/loop_exporters.py 2018-06-03 12:13:47 +0000
1180+++ madgraph/loop/loop_exporters.py 2019-05-23 07:08:37 +0000
1181@@ -304,11 +304,12 @@
1182 CALL SETMADLOOPPATH(PATH)
1183 END
1184
1185- subroutine smatrixhel(pdgs, npdg, p, ALPHAS, SCALES2, nhel, ANS, RETURNCODE)
1186+ subroutine smatrixhel(pdgs, procid, npdg, p, ALPHAS, SCALES2, nhel, ANS, RETURNCODE)
1187 IMPLICIT NONE
1188
1189 CF2PY double precision, intent(in), dimension(0:3,npdg) :: p
1190 CF2PY integer, intent(in), dimension(npdg) :: pdgs
1191+CF2PY integer, intent(in):: procid
1192 CF2PY integer, intent(in) :: npdg
1193 CF2PY double precision, intent(out) :: ANS
1194 CF2PY integer, intent(out) :: RETURNCODE
1195@@ -316,22 +317,26 @@
1196 CF2PY double precision, intent(in) :: SCALES2
1197
1198 integer pdgs(*)
1199- integer npdg, nhel, RETURNCODE
1200+ integer npdg, nhel, RETURNCODE, procid
1201 double precision p(*)
1202 double precision ANS, ALPHAS, PI,SCALES2
1203-
1204+ 1 continue
1205 %(smatrixhel)s
1206
1207 return
1208 end
1209
1210- subroutine get_pdg_order(OUT)
1211+ subroutine get_pdg_order(PDG,PID)
1212 IMPLICIT NONE
1213-CF2PY INTEGER, intent(out) :: OUT(%(nb_me)i,%(maxpart)i)
1214+CF2PY INTEGER, intent(out) :: PDG(%(nb_me)i,%(maxpart)i)
1215+CF2PY INTEGER, intent(out) :: PID(%(nb_me)i)
1216
1217- INTEGER OUT(%(nb_me)i,%(maxpart)i), PDGS(%(nb_me)i,%(maxpart)i)
1218+ INTEGER PDG(%(nb_me)i,%(maxpart)i), PDGS(%(nb_me)i,%(maxpart)i)
1219+ INTEGER PID(%(nb_me)i),PIDs(%(nb_me)i)
1220 DATA PDGS/ %(pdgs)s /
1221- OUT=PDGS
1222+ DATA PIDS/ %(pids)s /
1223+ PDG=PDGS
1224+ PID=PIDS
1225 RETURN
1226 END
1227
1228@@ -348,31 +353,39 @@
1229
1230 allids = self.prefix_info.keys()
1231 allprefix = [self.prefix_info[key][0] for key in allids]
1232- min_nexternal = min([len(ids) for ids in allids])
1233- max_nexternal = max([len(ids) for ids in allids])
1234+ min_nexternal = min([len(ids[0]) for ids in allids])
1235+ max_nexternal = max([len(ids[0]) for ids in allids])
1236
1237 info = []
1238- for key, (prefix, tag) in self.prefix_info.items():
1239- info.append('#PY %s : %s # %s' % (tag, key, prefix))
1240+ for (key, pid), (prefix, tag) in self.prefix_info.items():
1241+ info.append('#PY %s : %s # %s %s' % (tag, key, prefix, pid))
1242
1243
1244 text = []
1245 for n_ext in range(min_nexternal, max_nexternal+1):
1246- current = [ids for ids in allids if len(ids)==n_ext]
1247- if not current:
1248+ current_id = [ids[0] for ids in allids if len(ids[0])==n_ext]
1249+ current_pid = [ids[1] for ids in allids if len(ids[0])==n_ext]
1250+ if not current_id:
1251 continue
1252 if min_nexternal != max_nexternal:
1253 if n_ext == min_nexternal:
1254 text.append(' if (npdg.eq.%i)then' % n_ext)
1255 else:
1256 text.append(' else if (npdg.eq.%i)then' % n_ext)
1257- for ii,pdgs in enumerate(current):
1258+ for ii,pdgs in enumerate(current_id):
1259+ pid = current_pid[ii]
1260 condition = '.and.'.join(['%i.eq.pdgs(%i)' %(pdg, i+1) for i, pdg in enumerate(pdgs)])
1261 if ii==0:
1262- text.append( ' if(%s) then ! %i' % (condition, i))
1263+ text.append( ' if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition, pid, i))
1264+ #text.append( ' if(%s) then ! %i' % (condition, i))
1265 else:
1266- text.append( ' else if(%s) then ! %i' % (condition,i))
1267- text.append(' call %sget_me(p, ALPHAS, DSQRT(SCALES2), NHEL, ANS, RETURNCODE)' % self.prefix_info[pdgs][0])
1268+ text.append( ' else if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition,pid,i))
1269+ #text.append( ' else if(%s) then ! %i' % (condition,i))
1270+ text.append(' call %sget_me(p, ALPHAS, DSQRT(SCALES2), NHEL, ANS, RETURNCODE)' % self.prefix_info[(pdgs,pid)][0])
1271+ text.append( ' else if(procid.gt.0) then !')
1272+ text.append( ' procid = -1' )
1273+ text.append( ' goto 1' )
1274+ #text.append( ' call smatrixhel(pdgs, -1, npdg, p, ALPHAS, SCALES2, nhel, ANS, RETURNCODE)')
1275 text.append(' endif')
1276 #close the function
1277 if min_nexternal != max_nexternal:
1278@@ -384,7 +397,8 @@
1279 'nb_me': len(allids),
1280 'pdgs': ','.join([str(pdg[i]) if i<len(pdg) else '0'
1281 for i in range(max_nexternal) \
1282- for pdg in allids]),
1283+ for (pdg,pid) in allids]),
1284+ 'pids': ','.join(str(pid) for (pdg,pid) in allids),
1285 'prefix':'\',\''.join(allprefix)
1286 }
1287
1288@@ -393,6 +407,7 @@
1289 fsock = writers.FortranWriter(pjoin(self.dir_path, 'SubProcesses', 'all_matrix.f'),'w')
1290 fsock.writelines(text)
1291 fsock.close()
1292+
1293
1294
1295
1296@@ -984,7 +999,7 @@
1297 if 'prefix' in self.cmd_options and self.cmd_options['prefix'] in ['int','proc']:
1298 for proc in matrix_element.get('processes'):
1299 ids = [l.get('id') for l in proc.get('legs_with_decays')]
1300- self.prefix_info[tuple(ids)] = [dict['proc_prefix'], proc.get_tag()]
1301+ self.prefix_info[(tuple(ids), proc.get('id'))] = [dict['proc_prefix'], proc.get_tag()]
1302
1303 # The proc_id is used for MadEvent grouping, so none of our concern here
1304 # and it is simply set to an empty string.
1305
1306=== modified file 'madgraph/various/banner.py'
1307--- madgraph/various/banner.py 2019-05-07 13:01:35 +0000
1308+++ madgraph/various/banner.py 2019-05-23 07:08:37 +0000
1309@@ -384,9 +384,12 @@
1310 header = open(pjoin(MG5DIR,'Template', 'LO', 'Source', 'banner_header.txt')).read()
1311
1312 if not self.lhe_version:
1313- self.lhe_version = self.get('run_card', 'lhe_version', default=1.0)
1314- if float(self.lhe_version) < 3:
1315- self.lhe_version = 1.0
1316+ if 'mgruncard' in self:
1317+ self.lhe_version = self.get('run_card', 'lhe_version', default=1.0)
1318+ if float(self.lhe_version) < 3:
1319+ self.lhe_version = 1.0
1320+ else:
1321+ self.lhe_version = 3.0
1322
1323 ff.write(header % { 'version':float(self.lhe_version)})
1324
1325
1326=== modified file 'madgraph/various/rambo.py'
1327--- madgraph/various/rambo.py 2015-10-01 16:00:08 +0000
1328+++ madgraph/various/rambo.py 2019-05-23 07:08:37 +0000
1329@@ -1,6 +1,7 @@
1330 from __future__ import division
1331 import math
1332 import random
1333+import madgraph.various.misc as misc
1334
1335 class FortranList(list):
1336
1337@@ -91,6 +92,12 @@
1338 V= FortranList(N)
1339 IWARN = [0,0]
1340 # Check input object
1341+ if isinstance(XM, list) and not isinstance(XM, FortranList):
1342+ tmp = FortranList(1, N)
1343+ for i,val in enumerate(XM):
1344+ tmp[i+1] = val
1345+ XM = tmp
1346+
1347 assert isinstance(XM, FortranList)
1348 assert XM.min == 1
1349 assert XM.max == N+1
1350
1351=== modified file 'madgraph/various/shower_card.py'
1352--- madgraph/various/shower_card.py 2019-05-03 07:40:21 +0000
1353+++ madgraph/various/shower_card.py 2019-05-23 07:08:37 +0000
1354@@ -117,7 +117,6 @@
1355 if not i in list_dm:
1356 self['dm_'+str(i)] = ''
1357
1358- misc.sprint(self['nsplit_jobs'])
1359 self.text=content
1360
1361
1362
1363=== modified file 'models/import_ufo.py'
1364--- models/import_ufo.py 2019-02-14 13:39:51 +0000
1365+++ models/import_ufo.py 2019-05-23 07:08:37 +0000
1366@@ -585,7 +585,7 @@
1367 else:
1368 pass
1369 else:
1370- self.model.set('order_hierarchy', hierarchy)
1371+ self.model.set('order_hierarchy', hierarchy)
1372
1373 # Also set expansion_order, i.e., maximum coupling order per process
1374 expansion_order={}
1375@@ -602,11 +602,19 @@
1376 pass
1377 else:
1378 self.model.set('expansion_order', expansion_order)
1379- self.model.set('expansion_order', expansion_order)
1380+
1381
1382 #clean memory
1383 del self.checked_lor
1384
1385+ for name in dir(self.ufomodel):
1386+ if name.startswith('__') and name.endswith('__'):
1387+ value = getattr(self.ufomodel, name)
1388+ if not isinstance(value, (str, int)):
1389+ continue
1390+ self.model['model_info'][name[2:-2]] = value
1391+
1392+
1393 return self.model
1394
1395 def optimise_interaction(self, interaction):
1396
1397=== modified file 'models/template_files/fortran/lha_read.f'
1398--- models/template_files/fortran/lha_read.f 2016-10-27 15:40:27 +0000
1399+++ models/template_files/fortran/lha_read.f 2019-05-23 07:08:37 +0000
1400@@ -179,7 +179,7 @@
1401 implicit none
1402
1403 integer maxpara
1404- parameter (maxpara=1000)
1405+ parameter (maxpara=%(maxpara)i)
1406 character*20 param(maxpara),value(maxpara),val,par
1407 character*20 blockname
1408 integer npara
1409@@ -280,7 +280,7 @@
1410 c parameters
1411 c
1412 integer maxpara
1413- parameter (maxpara=1000)
1414+ parameter (maxpara=%(maxpara)i)
1415 c
1416 c arguments
1417 c
1418
1419=== modified file 'models/template_files/fortran/lha_read_mp.f'
1420--- models/template_files/fortran/lha_read_mp.f 2016-10-27 15:40:27 +0000
1421+++ models/template_files/fortran/lha_read_mp.f 2019-05-23 07:08:37 +0000
1422@@ -199,7 +199,7 @@
1423 implicit none
1424
1425 integer maxpara
1426- parameter (maxpara=1000)
1427+ parameter (maxpara=%(maxpara)i)
1428 character*20 param(maxpara),value(maxpara),val,par
1429 character*20 blockname
1430 integer npara
1431@@ -300,7 +300,7 @@
1432 c parameters
1433 c
1434 integer maxpara
1435- parameter (maxpara=1000)
1436+ parameter (maxpara=%(maxpara)i)
1437 c
1438 c arguments
1439 c
1440@@ -356,7 +356,7 @@
1441 c parameters
1442 c
1443 integer maxpara
1444- parameter (maxpara=1000)
1445+ parameter (maxpara=%(maxpara)i)
1446 c
1447 c arguments
1448 c
1449
1450=== modified file 'tests/acceptance_tests/test_cmd_reweight.py'
1451--- tests/acceptance_tests/test_cmd_reweight.py 2018-06-01 12:14:52 +0000
1452+++ tests/acceptance_tests/test_cmd_reweight.py 2019-05-23 07:08:37 +0000
1453@@ -207,7 +207,7 @@
1454 ff.write(cmd_lines)
1455 ff.close()
1456
1457- with misc.stdchannel_redirected(sys.stdout, os.devnull):
1458+ if 1:#with misc.stdchannel_redirected(sys.stdout, os.devnull):
1459 me_cmd.run_cmd('reweight run_01 --from_cards')
1460
1461 lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'events.lhe.gz'))
1462@@ -281,7 +281,7 @@
1463 ff.write(cmd_lines)
1464 ff.close()
1465
1466- with misc.stdchannel_redirected(sys.stdout, os.devnull):
1467+ if 1 :#with misc.stdchannel_redirected(sys.stdout, os.devnull):
1468 me_cmd.run_cmd('reweight run_01 --from_cards')
1469
1470 lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'events.lhe.gz'))
1471@@ -312,7 +312,8 @@
1472 ff.write(cmd_lines)
1473 ff.close()
1474
1475- with misc.stdchannel_redirected(sys.stdout, os.devnull):
1476+ #with misc.stdchannel_redirected(sys.stdout, os.devnull):
1477+ if 1:
1478 me_cmd.run_cmd('reweight run_01 --from_cards')
1479
1480
1481
1482=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f'
1483--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f 2018-05-18 12:22:47 +0000
1484+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f 2019-05-23 07:08:37 +0000
1485@@ -141,13 +141,6 @@
1486 C ----------
1487 C BEGIN CODE
1488 C ----------
1489- NTRY=NTRY+1
1490- DO IHEL=1,NEXTERNAL
1491- JC(IHEL) = +1
1492- ENDDO
1493- DO I=1,NSQAMPSO
1494- ANS(I) = 0D0
1495- ENDDO
1496 C When spin-2 particles are involved, the Helicity filtering is
1497 C dangerous for the 2->1 topology.
1498 C This is because depending on the MC setup the initial PS points
1499@@ -160,11 +153,21 @@
1500 C helicity sum is).
1501 C For this reason, we simply remove the filterin when there is
1502 C only three external particles.
1503- IF (NEXTERNAL.LE.3) THEN
1504+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
1505 DO IHEL=1,NCOMB
1506 GOODHEL(IHEL)=.TRUE.
1507 ENDDO
1508+ IF(USERHEL.EQ.-2) USERHEL = -1
1509 ENDIF
1510+
1511+ NTRY=NTRY+1
1512+ DO IHEL=1,NEXTERNAL
1513+ JC(IHEL) = +1
1514+ ENDDO
1515+ DO I=1,NSQAMPSO
1516+ ANS(I) = 0D0
1517+ ENDDO
1518+
1519 DO IHEL=1,NCOMB
1520 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
1521 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN
1522
1523=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f'
1524--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f 2018-11-08 22:24:49 +0000
1525+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f 2019-05-23 07:08:37 +0000
1526@@ -636,6 +636,10 @@
1527 CALL SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
1528 ENDIF
1529
1530+ IF(USERHEL.EQ.-2) THEN
1531+ NTRY = 0
1532+ ENDIF
1533+
1534 IF(NTRY.EQ.0) THEN
1535 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
1536 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
1537@@ -655,7 +659,7 @@
1538 101 CONTINUE
1539 CLOSE(1)
1540
1541- IF (HELICITYFILTERLEVEL.EQ.0) THEN
1542+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
1543 FOUNDHELFILTER=.TRUE.
1544 DO J=1,NCOMB
1545 GOODHEL(J)=1
1546@@ -796,7 +800,7 @@
1547 HELPICKED=1
1548 CTMODE=CTMODEINIT
1549 ELSE
1550- IF (USERHEL.NE.-1) THEN
1551+ IF (USERHEL.GT.0) THEN
1552 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
1553 DO I=0,NSQUAREDSO
1554 ANS(1,I)=0.0D0
1555@@ -806,7 +810,7 @@
1556 GOTO 9999
1557 ENDIF
1558 ENDIF
1559- HELPICKED=USERHEL
1560+ HELPICKED=MAX(USERHEL,-1)
1561 IF (CTMODERUN.NE.-1) THEN
1562 CTMODE=CTMODERUN
1563 ELSE
1564@@ -1069,7 +1073,7 @@
1565 1226 CONTINUE
1566
1567 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1568- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1569+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1570 C Make sure that that no polarization constraint filters out
1571 C this helicity
1572 IF (POLARIZATIONS(0,0).EQ.-1.OR.IS_HEL_SELECTED(HELPICKED))
1573@@ -1287,7 +1291,7 @@
1574 DO K=1,3
1575 DO I=0,NSQUAREDSO
1576 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1577- IF (USERHEL.NE.-1) THEN
1578+ IF (USERHEL.GT.-1) THEN
1579 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1580 ELSE
1581 DO J=1,NINITIAL
1582
1583=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f'
1584--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f 2018-05-18 12:22:47 +0000
1585+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f 2019-05-23 07:08:37 +0000
1586@@ -141,13 +141,6 @@
1587 C ----------
1588 C BEGIN CODE
1589 C ----------
1590- NTRY=NTRY+1
1591- DO IHEL=1,NEXTERNAL
1592- JC(IHEL) = +1
1593- ENDDO
1594- DO I=1,NSQAMPSO
1595- ANS(I) = 0D0
1596- ENDDO
1597 C When spin-2 particles are involved, the Helicity filtering is
1598 C dangerous for the 2->1 topology.
1599 C This is because depending on the MC setup the initial PS points
1600@@ -160,11 +153,21 @@
1601 C helicity sum is).
1602 C For this reason, we simply remove the filterin when there is
1603 C only three external particles.
1604- IF (NEXTERNAL.LE.3) THEN
1605+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
1606 DO IHEL=1,NCOMB
1607 GOODHEL(IHEL)=.TRUE.
1608 ENDDO
1609+ IF(USERHEL.EQ.-2) USERHEL = -1
1610 ENDIF
1611+
1612+ NTRY=NTRY+1
1613+ DO IHEL=1,NEXTERNAL
1614+ JC(IHEL) = +1
1615+ ENDDO
1616+ DO I=1,NSQAMPSO
1617+ ANS(I) = 0D0
1618+ ENDDO
1619+
1620 DO IHEL=1,NCOMB
1621 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
1622 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN
1623
1624=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f'
1625--- tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f 2018-11-08 22:24:49 +0000
1626+++ tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f 2019-05-23 07:08:37 +0000
1627@@ -636,6 +636,10 @@
1628 CALL SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
1629 ENDIF
1630
1631+ IF(USERHEL.EQ.-2) THEN
1632+ NTRY = 0
1633+ ENDIF
1634+
1635 IF(NTRY.EQ.0) THEN
1636 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
1637 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
1638@@ -655,7 +659,7 @@
1639 101 CONTINUE
1640 CLOSE(1)
1641
1642- IF (HELICITYFILTERLEVEL.EQ.0) THEN
1643+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
1644 FOUNDHELFILTER=.TRUE.
1645 DO J=1,NCOMB
1646 GOODHEL(J)=1
1647@@ -796,7 +800,7 @@
1648 HELPICKED=1
1649 CTMODE=CTMODEINIT
1650 ELSE
1651- IF (USERHEL.NE.-1) THEN
1652+ IF (USERHEL.GT.0) THEN
1653 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
1654 DO I=0,NSQUAREDSO
1655 ANS(1,I)=0.0D0
1656@@ -806,7 +810,7 @@
1657 GOTO 9999
1658 ENDIF
1659 ENDIF
1660- HELPICKED=USERHEL
1661+ HELPICKED=MAX(USERHEL,-1)
1662 IF (CTMODERUN.NE.-1) THEN
1663 CTMODE=CTMODERUN
1664 ELSE
1665@@ -1069,7 +1073,7 @@
1666 1226 CONTINUE
1667
1668 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1669- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1670+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1671 C Make sure that that no polarization constraint filters out
1672 C this helicity
1673 IF (POLARIZATIONS(0,0).EQ.-1.OR.IS_HEL_SELECTED(HELPICKED))
1674@@ -1287,7 +1291,7 @@
1675 DO K=1,3
1676 DO I=0,NSQUAREDSO
1677 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1678- IF (USERHEL.NE.-1) THEN
1679+ IF (USERHEL.GT.-1) THEN
1680 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1681 ELSE
1682 DO J=1,NINITIAL
1683
1684=== modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f'
1685--- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f 2018-05-18 12:22:47 +0000
1686+++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f 2019-05-23 07:08:37 +0000
1687@@ -80,7 +80,6 @@
1688 LOGICAL GOODHEL(NCOMB)
1689 DATA NTRY/0/
1690 DATA GOODHEL/NCOMB*.FALSE./
1691-
1692 C
1693 C GLOBAL VARIABLES
1694 C
1695@@ -134,10 +133,6 @@
1696 C ----------
1697 C BEGIN CODE
1698 C ----------
1699- IF(USERHEL.EQ.-1) NTRY=NTRY+1
1700- DO IHEL=1,NEXTERNAL
1701- JC(IHEL) = +1
1702- ENDDO
1703 C When spin-2 particles are involved, the Helicity filtering is
1704 C dangerous for the 2->1 topology.
1705 C This is because depending on the MC setup the initial PS points
1706@@ -150,11 +145,16 @@
1707 C helicity sum is).
1708 C For this reason, we simply remove the filterin when there is
1709 C only three external particles.
1710- IF (NEXTERNAL.LE.3) THEN
1711+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
1712 DO IHEL=1,NCOMB
1713 GOODHEL(IHEL)=.TRUE.
1714 ENDDO
1715+ IF(USERHEL.EQ.-2) USERHEL=-1
1716 ENDIF
1717+ IF(USERHEL.EQ.-1) NTRY=NTRY+1
1718+ DO IHEL=1,NEXTERNAL
1719+ JC(IHEL) = +1
1720+ ENDDO
1721 ANS = 0D0
1722 DO IHEL=1,NCOMB
1723 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
1724
1725=== modified file 'tests/input_files/IOTestsComparison/IOTest_Histogram/gnuplot_histo_output/HistoOut.gnuplot'
1726--- tests/input_files/IOTestsComparison/IOTest_Histogram/gnuplot_histo_output/HistoOut.gnuplot 2016-06-09 00:59:23 +0000
1727+++ tests/input_files/IOTestsComparison/IOTest_Histogram/gnuplot_histo_output/HistoOut.gnuplot 2019-05-23 07:08:37 +0000
1728@@ -26,62 +26,61 @@
1729 # color-blind individuals with either protanopia or deuteranopia. Bang
1730 # Wong [2011] Nature Methods 8, 441.
1731
1732-set style line 1 lt 1 lc rgb "#009e73" lw 1.3
1733+set style line 1 lt 1 lc rgb "#009e73" lw 1.3
1734 set style line 101 lt 1 lc rgb "#009e73" lw 1.3 dt (6,3)
1735-set style line 11 lt 2 lc rgb "#009e73" lw 1.3 dt (6,3)
1736-set style line 21 lt 4 lc rgb "#009e73" lw 1.3 dt (3,2)
1737-set style line 31 lt 6 lc rgb "#009e73" lw 1.3 dt (2,1)
1738-set style line 41 lt 8 lc rgb "#009e73" lw 1.3 dt (4,3)
1739-
1740-set style line 2 lt 1 lc rgb "#0072b2" lw 1.3
1741-set style line 102 lt 1 lc rgb "#0072b2" lw 1.3 dt (6,3)
1742-set style line 12 lt 2 lc rgb "#0072b2" lw 1.3 dt (6,3)
1743-set style line 22 lt 4 lc rgb "#0072b2" lw 1.3 dt (3,2)
1744-set style line 32 lt 6 lc rgb "#0072b2" lw 1.3 dt (2,1)
1745-set style line 42 lt 8 lc rgb "#0072b2" lw 1.3 dt (4,3)
1746-
1747-
1748-set style line 3 lt 1 lc rgb "#d55e00" lw 1.3
1749+set style line 11 lt 2 lc rgb "#009e73" lw 1.3 dt (6,3)
1750+set style line 21 lt 4 lc rgb "#009e73" lw 1.3 dt (3,2)
1751+set style line 31 lt 6 lc rgb "#009e73" lw 1.3 dt (2,1)
1752+set style line 41 lt 8 lc rgb "#009e73" lw 1.3 dt (4,3)
1753+
1754+set style line 2 lt 1 lc rgb "#0072b2" lw 1.3
1755+set style line 102 lt 1 lc rgb "#0072b2" lw 1.3 dt (6,3)
1756+set style line 12 lt 2 lc rgb "#0072b2" lw 1.3 dt (6,3)
1757+set style line 22 lt 4 lc rgb "#0072b2" lw 1.3 dt (3,2)
1758+set style line 32 lt 6 lc rgb "#0072b2" lw 1.3 dt (2,1)
1759+set style line 42 lt 8 lc rgb "#0072b2" lw 1.3 dt (4,3)
1760+
1761+set style line 3 lt 1 lc rgb "#d55e00" lw 1.3
1762 set style line 103 lt 1 lc rgb "#d55e00" lw 1.3 dt (6,3)
1763-set style line 13 lt 2 lc rgb "#d55e00" lw 1.3 dt (6,3)
1764-set style line 23 lt 4 lc rgb "#d55e00" lw 1.3 dt (3,2)
1765-set style line 33 lt 6 lc rgb "#d55e00" lw 1.3 dt (2,1)
1766-set style line 43 lt 8 lc rgb "#d55e00" lw 1.3 dt (4,3)
1767-
1768-set style line 4 lt 1 lc rgb "#f0e442" lw 1.3
1769-set style line 104 lt 1 lc rgb "#f0e442" lw 1.3 dt (6,3)
1770-set style line 14 lt 2 lc rgb "#f0e442" lw 1.3 dt (6,3)
1771-set style line 24 lt 4 lc rgb "#f0e442" lw 1.3 dt (3,2)
1772-set style line 34 lt 6 lc rgb "#f0e442" lw 1.3 dt (2,1)
1773-set style line 44 lt 8 lc rgb "#f0e442" lw 1.3 dt (4,3)
1774-
1775-set style line 5 lt 1 lc rgb "#56b4e9" lw 1.3
1776-set style line 105 lt 1 lc rgb "#56b4e9" lw 1.3 dt (6,3)
1777-set style line 15 lt 2 lc rgb "#56b4e9" lw 1.3 dt (6,3)
1778-set style line 25 lt 4 lc rgb "#56b4e9" lw 1.3 dt (3,2)
1779-set style line 35 lt 6 lc rgb "#56b4e9" lw 1.3 dt (2,1)
1780-set style line 45 lt 8 lc rgb "#56b4e9" lw 1.3 dt (4,3)
1781-
1782-set style line 6 lt 1 lc rgb "#cc79a7" lw 1.3
1783-set style line 106 lt 1 lc rgb "#cc79a7" lw 1.3 dt (6,3)
1784-set style line 16 lt 2 lc rgb "#cc79a7" lw 1.3 dt (6,3)
1785-set style line 26 lt 4 lc rgb "#cc79a7" lw 1.3 dt (3,2)
1786-set style line 36 lt 6 lc rgb "#cc79a7" lw 1.3 dt (2,1)
1787-set style line 46 lt 8 lc rgb "#cc79a7" lw 1.3 dt (4,3)
1788-
1789-set style line 7 lt 1 lc rgb "#e69f00" lw 1.3
1790-set style line 107 lt 1 lc rgb "#e69f00" lw 1.3 dt (6,3)
1791-set style line 17 lt 2 lc rgb "#e69f00" lw 1.3 dt (6,3)
1792-set style line 27 lt 4 lc rgb "#e69f00" lw 1.3 dt (3,2)
1793-set style line 37 lt 6 lc rgb "#e69f00" lw 1.3 dt (2,1)
1794-set style line 47 lt 8 lc rgb "#e69f00" lw 1.3 dt (4,3)
1795-
1796-set style line 8 lt 1 lc rgb "black" lw 1.3
1797-set style line 108 lt 1 lc rgb "black" lw 1.3 dt (6,3)
1798-set style line 18 lt 2 lc rgb "black" lw 1.3 dt (6,3)
1799-set style line 28 lt 4 lc rgb "black" lw 1.3 dt (3,2)
1800-set style line 38 lt 6 lc rgb "black" lw 1.3 dt (2,1)
1801-set style line 48 lt 8 lc rgb "black" lw 1.3 dt (4,3)
1802+set style line 13 lt 2 lc rgb "#d55e00" lw 1.3 dt (6,3)
1803+set style line 23 lt 4 lc rgb "#d55e00" lw 1.3 dt (3,2)
1804+set style line 33 lt 6 lc rgb "#d55e00" lw 1.3 dt (2,1)
1805+set style line 43 lt 8 lc rgb "#d55e00" lw 1.3 dt (4,3)
1806+
1807+set style line 4 lt 1 lc rgb "#f0e442" lw 1.3
1808+set style line 104 lt 1 lc rgb "#f0e442" lw 1.3 dt (6,3)
1809+set style line 14 lt 2 lc rgb "#f0e442" lw 1.3 dt (6,3)
1810+set style line 24 lt 4 lc rgb "#f0e442" lw 1.3 dt (3,2)
1811+set style line 34 lt 6 lc rgb "#f0e442" lw 1.3 dt (2,1)
1812+set style line 44 lt 8 lc rgb "#f0e442" lw 1.3 dt (4,3)
1813+
1814+set style line 5 lt 1 lc rgb "#56b4e9" lw 1.3
1815+set style line 105 lt 1 lc rgb "#56b4e9" lw 1.3 dt (6,3)
1816+set style line 15 lt 2 lc rgb "#56b4e9" lw 1.3 dt (6,3)
1817+set style line 25 lt 4 lc rgb "#56b4e9" lw 1.3 dt (3,2)
1818+set style line 35 lt 6 lc rgb "#56b4e9" lw 1.3 dt (2,1)
1819+set style line 45 lt 8 lc rgb "#56b4e9" lw 1.3 dt (4,3)
1820+
1821+set style line 6 lt 1 lc rgb "#cc79a7" lw 1.3
1822+set style line 106 lt 1 lc rgb "#cc79a7" lw 1.3 dt (6,3)
1823+set style line 16 lt 2 lc rgb "#cc79a7" lw 1.3 dt (6,3)
1824+set style line 26 lt 4 lc rgb "#cc79a7" lw 1.3 dt (3,2)
1825+set style line 36 lt 6 lc rgb "#cc79a7" lw 1.3 dt (2,1)
1826+set style line 46 lt 8 lc rgb "#cc79a7" lw 1.3 dt (4,3)
1827+
1828+set style line 7 lt 1 lc rgb "#e69f00" lw 1.3
1829+set style line 107 lt 1 lc rgb "#e69f00" lw 1.3 dt (6,3)
1830+set style line 17 lt 2 lc rgb "#e69f00" lw 1.3 dt (6,3)
1831+set style line 27 lt 4 lc rgb "#e69f00" lw 1.3 dt (3,2)
1832+set style line 37 lt 6 lc rgb "#e69f00" lw 1.3 dt (2,1)
1833+set style line 47 lt 8 lc rgb "#e69f00" lw 1.3 dt (4,3)
1834+
1835+set style line 8 lt 1 lc rgb "black" lw 1.3
1836+set style line 108 lt 1 lc rgb "black" lw 1.3 dt (6,3)
1837+set style line 18 lt 2 lc rgb "black" lw 1.3 dt (6,3)
1838+set style line 28 lt 4 lc rgb "black" lw 1.3 dt (3,2)
1839+set style line 38 lt 6 lc rgb "black" lw 1.3 dt (2,1)
1840+set style line 48 lt 8 lc rgb "black" lw 1.3 dt (4,3)
1841
1842
1843 set style line 999 lt 1 lc rgb "gray" lw 1.3
1844
1845=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f'
1846--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f 2018-05-25 09:13:24 +0000
1847+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f 2019-05-23 07:08:37 +0000
1848@@ -644,6 +644,10 @@
1849 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
1850 ENDIF
1851
1852+ IF(USERHEL.EQ.-2) THEN
1853+ NTRY = 0
1854+ ENDIF
1855+
1856 IF(NTRY.EQ.0) THEN
1857 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
1858 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
1859@@ -663,7 +667,7 @@
1860 101 CONTINUE
1861 CLOSE(1)
1862
1863- IF (HELICITYFILTERLEVEL.EQ.0) THEN
1864+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
1865 FOUNDHELFILTER=.TRUE.
1866 DO J=1,NCOMB
1867 GOODHEL(J)=1
1868@@ -804,7 +808,7 @@
1869 HELPICKED=1
1870 CTMODE=CTMODEINIT
1871 ELSE
1872- IF (USERHEL.NE.-1) THEN
1873+ IF (USERHEL.GT.0) THEN
1874 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
1875 DO I=0,NSQUAREDSO
1876 ANS(1,I)=0.0D0
1877@@ -814,7 +818,7 @@
1878 GOTO 9999
1879 ENDIF
1880 ENDIF
1881- HELPICKED=USERHEL
1882+ HELPICKED=MAX(USERHEL,-1)
1883 IF (CTMODERUN.NE.-1) THEN
1884 CTMODE=CTMODERUN
1885 ELSE
1886@@ -1099,7 +1103,7 @@
1887 1226 CONTINUE
1888
1889 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1890- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1891+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1892 C Make sure that that no polarization constraint filters out
1893 C this helicity
1894 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
1895@@ -1317,7 +1321,7 @@
1896 DO K=1,3
1897 DO I=0,NSQUAREDSO
1898 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1899- IF (USERHEL.NE.-1) THEN
1900+ IF (USERHEL.GT.-1) THEN
1901 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1902 ELSE
1903 DO J=1,NINITIAL
1904
1905=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f'
1906--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f 2018-05-25 09:13:24 +0000
1907+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f 2019-05-23 07:08:37 +0000
1908@@ -644,6 +644,10 @@
1909 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
1910 ENDIF
1911
1912+ IF(USERHEL.EQ.-2) THEN
1913+ NTRY = 0
1914+ ENDIF
1915+
1916 IF(NTRY.EQ.0) THEN
1917 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
1918 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
1919@@ -663,7 +667,7 @@
1920 101 CONTINUE
1921 CLOSE(1)
1922
1923- IF (HELICITYFILTERLEVEL.EQ.0) THEN
1924+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
1925 FOUNDHELFILTER=.TRUE.
1926 DO J=1,NCOMB
1927 GOODHEL(J)=1
1928@@ -804,7 +808,7 @@
1929 HELPICKED=1
1930 CTMODE=CTMODEINIT
1931 ELSE
1932- IF (USERHEL.NE.-1) THEN
1933+ IF (USERHEL.GT.0) THEN
1934 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
1935 DO I=0,NSQUAREDSO
1936 ANS(1,I)=0.0D0
1937@@ -814,7 +818,7 @@
1938 GOTO 9999
1939 ENDIF
1940 ENDIF
1941- HELPICKED=USERHEL
1942+ HELPICKED=MAX(USERHEL,-1)
1943 IF (CTMODERUN.NE.-1) THEN
1944 CTMODE=CTMODERUN
1945 ELSE
1946@@ -1100,7 +1104,7 @@
1947 1226 CONTINUE
1948
1949 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1950- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1951+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1952 C Make sure that that no polarization constraint filters out
1953 C this helicity
1954 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
1955@@ -1318,7 +1322,7 @@
1956 DO K=1,3
1957 DO I=0,NSQUAREDSO
1958 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1959- IF (USERHEL.NE.-1) THEN
1960+ IF (USERHEL.GT.-1) THEN
1961 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1962 ELSE
1963 DO J=1,NINITIAL
1964
1965=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f'
1966--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f 2018-05-25 09:13:24 +0000
1967+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f 2019-05-23 07:08:37 +0000
1968@@ -636,6 +636,10 @@
1969 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
1970 ENDIF
1971
1972+ IF(USERHEL.EQ.-2) THEN
1973+ NTRY = 0
1974+ ENDIF
1975+
1976 IF(NTRY.EQ.0) THEN
1977 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
1978 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
1979@@ -655,7 +659,7 @@
1980 101 CONTINUE
1981 CLOSE(1)
1982
1983- IF (HELICITYFILTERLEVEL.EQ.0) THEN
1984+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
1985 FOUNDHELFILTER=.TRUE.
1986 DO J=1,NCOMB
1987 GOODHEL(J)=1
1988@@ -796,7 +800,7 @@
1989 HELPICKED=1
1990 CTMODE=CTMODEINIT
1991 ELSE
1992- IF (USERHEL.NE.-1) THEN
1993+ IF (USERHEL.GT.0) THEN
1994 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
1995 DO I=0,NSQUAREDSO
1996 ANS(1,I)=0.0D0
1997@@ -806,7 +810,7 @@
1998 GOTO 9999
1999 ENDIF
2000 ENDIF
2001- HELPICKED=USERHEL
2002+ HELPICKED=MAX(USERHEL,-1)
2003 IF (CTMODERUN.NE.-1) THEN
2004 CTMODE=CTMODERUN
2005 ELSE
2006@@ -1069,7 +1073,7 @@
2007 1226 CONTINUE
2008
2009 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2010- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2011+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2012 C Make sure that that no polarization constraint filters out
2013 C this helicity
2014 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
2015@@ -1287,7 +1291,7 @@
2016 DO K=1,3
2017 DO I=0,NSQUAREDSO
2018 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
2019- IF (USERHEL.NE.-1) THEN
2020+ IF (USERHEL.GT.-1) THEN
2021 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
2022 ELSE
2023 DO J=1,NINITIAL
2024
2025=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f'
2026--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f 2018-05-25 09:13:24 +0000
2027+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f 2019-05-23 07:08:37 +0000
2028@@ -644,6 +644,10 @@
2029 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
2030 ENDIF
2031
2032+ IF(USERHEL.EQ.-2) THEN
2033+ NTRY = 0
2034+ ENDIF
2035+
2036 IF(NTRY.EQ.0) THEN
2037 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
2038 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
2039@@ -663,7 +667,7 @@
2040 101 CONTINUE
2041 CLOSE(1)
2042
2043- IF (HELICITYFILTERLEVEL.EQ.0) THEN
2044+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
2045 FOUNDHELFILTER=.TRUE.
2046 DO J=1,NCOMB
2047 GOODHEL(J)=1
2048@@ -804,7 +808,7 @@
2049 HELPICKED=1
2050 CTMODE=CTMODEINIT
2051 ELSE
2052- IF (USERHEL.NE.-1) THEN
2053+ IF (USERHEL.GT.0) THEN
2054 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
2055 DO I=0,NSQUAREDSO
2056 ANS(1,I)=0.0D0
2057@@ -814,7 +818,7 @@
2058 GOTO 9999
2059 ENDIF
2060 ENDIF
2061- HELPICKED=USERHEL
2062+ HELPICKED=MAX(USERHEL,-1)
2063 IF (CTMODERUN.NE.-1) THEN
2064 CTMODE=CTMODERUN
2065 ELSE
2066@@ -1100,7 +1104,7 @@
2067 1226 CONTINUE
2068
2069 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2070- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2071+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2072 C Make sure that that no polarization constraint filters out
2073 C this helicity
2074 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
2075@@ -1318,7 +1322,7 @@
2076 DO K=1,3
2077 DO I=0,NSQUAREDSO
2078 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
2079- IF (USERHEL.NE.-1) THEN
2080+ IF (USERHEL.GT.-1) THEN
2081 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
2082 ELSE
2083 DO J=1,NINITIAL
2084
2085=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f'
2086--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f 2018-05-25 09:13:24 +0000
2087+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f 2019-05-23 07:08:37 +0000
2088@@ -644,6 +644,10 @@
2089 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
2090 ENDIF
2091
2092+ IF(USERHEL.EQ.-2) THEN
2093+ NTRY = 0
2094+ ENDIF
2095+
2096 IF(NTRY.EQ.0) THEN
2097 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
2098 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
2099@@ -663,7 +667,7 @@
2100 101 CONTINUE
2101 CLOSE(1)
2102
2103- IF (HELICITYFILTERLEVEL.EQ.0) THEN
2104+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
2105 FOUNDHELFILTER=.TRUE.
2106 DO J=1,NCOMB
2107 GOODHEL(J)=1
2108@@ -804,7 +808,7 @@
2109 HELPICKED=1
2110 CTMODE=CTMODEINIT
2111 ELSE
2112- IF (USERHEL.NE.-1) THEN
2113+ IF (USERHEL.GT.0) THEN
2114 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
2115 DO I=0,NSQUAREDSO
2116 ANS(1,I)=0.0D0
2117@@ -814,7 +818,7 @@
2118 GOTO 9999
2119 ENDIF
2120 ENDIF
2121- HELPICKED=USERHEL
2122+ HELPICKED=MAX(USERHEL,-1)
2123 IF (CTMODERUN.NE.-1) THEN
2124 CTMODE=CTMODERUN
2125 ELSE
2126@@ -1100,7 +1104,7 @@
2127 1226 CONTINUE
2128
2129 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2130- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2131+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2132 C Make sure that that no polarization constraint filters out
2133 C this helicity
2134 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
2135@@ -1318,7 +1322,7 @@
2136 DO K=1,3
2137 DO I=0,NSQUAREDSO
2138 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
2139- IF (USERHEL.NE.-1) THEN
2140+ IF (USERHEL.GT.-1) THEN
2141 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
2142 ELSE
2143 DO J=1,NINITIAL
2144
2145=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f'
2146--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f 2018-05-25 09:13:24 +0000
2147+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f 2019-05-23 07:08:37 +0000
2148@@ -644,6 +644,10 @@
2149 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
2150 ENDIF
2151
2152+ IF(USERHEL.EQ.-2) THEN
2153+ NTRY = 0
2154+ ENDIF
2155+
2156 IF(NTRY.EQ.0) THEN
2157 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
2158 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
2159@@ -663,7 +667,7 @@
2160 101 CONTINUE
2161 CLOSE(1)
2162
2163- IF (HELICITYFILTERLEVEL.EQ.0) THEN
2164+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
2165 FOUNDHELFILTER=.TRUE.
2166 DO J=1,NCOMB
2167 GOODHEL(J)=1
2168@@ -804,7 +808,7 @@
2169 HELPICKED=1
2170 CTMODE=CTMODEINIT
2171 ELSE
2172- IF (USERHEL.NE.-1) THEN
2173+ IF (USERHEL.GT.0) THEN
2174 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
2175 DO I=0,NSQUAREDSO
2176 ANS(1,I)=0.0D0
2177@@ -814,7 +818,7 @@
2178 GOTO 9999
2179 ENDIF
2180 ENDIF
2181- HELPICKED=USERHEL
2182+ HELPICKED=MAX(USERHEL,-1)
2183 IF (CTMODERUN.NE.-1) THEN
2184 CTMODE=CTMODERUN
2185 ELSE
2186@@ -1099,7 +1103,7 @@
2187 1226 CONTINUE
2188
2189 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2190- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2191+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2192 C Make sure that that no polarization constraint filters out
2193 C this helicity
2194 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
2195@@ -1317,7 +1321,7 @@
2196 DO K=1,3
2197 DO I=0,NSQUAREDSO
2198 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
2199- IF (USERHEL.NE.-1) THEN
2200+ IF (USERHEL.GT.-1) THEN
2201 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
2202 ELSE
2203 DO J=1,NINITIAL
2204
2205=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f'
2206--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f 2018-05-25 09:13:24 +0000
2207+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f 2019-05-23 07:08:37 +0000
2208@@ -636,6 +636,10 @@
2209 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
2210 ENDIF
2211
2212+ IF(USERHEL.EQ.-2) THEN
2213+ NTRY = 0
2214+ ENDIF
2215+
2216 IF(NTRY.EQ.0) THEN
2217 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
2218 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
2219@@ -655,7 +659,7 @@
2220 101 CONTINUE
2221 CLOSE(1)
2222
2223- IF (HELICITYFILTERLEVEL.EQ.0) THEN
2224+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
2225 FOUNDHELFILTER=.TRUE.
2226 DO J=1,NCOMB
2227 GOODHEL(J)=1
2228@@ -796,7 +800,7 @@
2229 HELPICKED=1
2230 CTMODE=CTMODEINIT
2231 ELSE
2232- IF (USERHEL.NE.-1) THEN
2233+ IF (USERHEL.GT.0) THEN
2234 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
2235 DO I=0,NSQUAREDSO
2236 ANS(1,I)=0.0D0
2237@@ -806,7 +810,7 @@
2238 GOTO 9999
2239 ENDIF
2240 ENDIF
2241- HELPICKED=USERHEL
2242+ HELPICKED=MAX(USERHEL,-1)
2243 IF (CTMODERUN.NE.-1) THEN
2244 CTMODE=CTMODERUN
2245 ELSE
2246@@ -1069,7 +1073,7 @@
2247 1226 CONTINUE
2248
2249 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2250- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2251+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2252 C Make sure that that no polarization constraint filters out
2253 C this helicity
2254 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
2255@@ -1287,7 +1291,7 @@
2256 DO K=1,3
2257 DO I=0,NSQUAREDSO
2258 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
2259- IF (USERHEL.NE.-1) THEN
2260+ IF (USERHEL.GT.-1) THEN
2261 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
2262 ELSE
2263 DO J=1,NINITIAL
2264
2265=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f'
2266--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f 2017-08-15 19:34:40 +0000
2267+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f 2019-05-23 07:08:37 +0000
2268@@ -636,6 +636,10 @@
2269 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
2270 ENDIF
2271
2272+ IF(USERHEL.EQ.-2) THEN
2273+ NTRY = 0
2274+ ENDIF
2275+
2276 IF(NTRY.EQ.0) THEN
2277 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
2278 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
2279@@ -655,7 +659,7 @@
2280 101 CONTINUE
2281 CLOSE(1)
2282
2283- IF (HELICITYFILTERLEVEL.EQ.0) THEN
2284+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
2285 FOUNDHELFILTER=.TRUE.
2286 DO J=1,NCOMB
2287 GOODHEL(J)=1
2288@@ -796,7 +800,7 @@
2289 HELPICKED=1
2290 CTMODE=CTMODEINIT
2291 ELSE
2292- IF (USERHEL.NE.-1) THEN
2293+ IF (USERHEL.GT.0) THEN
2294 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
2295 DO I=0,NSQUAREDSO
2296 ANS(1,I)=0.0D0
2297@@ -806,7 +810,7 @@
2298 GOTO 9999
2299 ENDIF
2300 ENDIF
2301- HELPICKED=USERHEL
2302+ HELPICKED=MAX(USERHEL,-1)
2303 IF (CTMODERUN.NE.-1) THEN
2304 CTMODE=CTMODERUN
2305 ELSE
2306@@ -1069,7 +1073,7 @@
2307 1226 CONTINUE
2308
2309 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2310- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2311+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2312 C Make sure that that no polarization constraint filters out
2313 C this helicity
2314 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
2315@@ -1287,7 +1291,7 @@
2316 DO K=1,3
2317 DO I=0,NSQUAREDSO
2318 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
2319- IF (USERHEL.NE.-1) THEN
2320+ IF (USERHEL.GT.-1) THEN
2321 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
2322 ELSE
2323 DO J=1,NINITIAL
2324
2325=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%born_matrix.f'
2326--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%born_matrix.f 2018-05-18 12:22:47 +0000
2327+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%born_matrix.f 2019-05-23 07:08:37 +0000
2328@@ -144,13 +144,6 @@
2329 C ----------
2330 C BEGIN CODE
2331 C ----------
2332- NTRY=NTRY+1
2333- DO IHEL=1,NEXTERNAL
2334- JC(IHEL) = +1
2335- ENDDO
2336- DO I=1,NSQAMPSO
2337- ANS(I) = 0D0
2338- ENDDO
2339 C When spin-2 particles are involved, the Helicity filtering is
2340 C dangerous for the 2->1 topology.
2341 C This is because depending on the MC setup the initial PS points
2342@@ -163,11 +156,21 @@
2343 C helicity sum is).
2344 C For this reason, we simply remove the filterin when there is
2345 C only three external particles.
2346- IF (NEXTERNAL.LE.3) THEN
2347+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
2348 DO IHEL=1,NCOMB
2349 GOODHEL(IHEL)=.TRUE.
2350 ENDDO
2351+ IF(USERHEL.EQ.-2) USERHEL = -1
2352 ENDIF
2353+
2354+ NTRY=NTRY+1
2355+ DO IHEL=1,NEXTERNAL
2356+ JC(IHEL) = +1
2357+ ENDDO
2358+ DO I=1,NSQAMPSO
2359+ ANS(I) = 0D0
2360+ ENDDO
2361+
2362 DO IHEL=1,NCOMB
2363 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
2364 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN
2365
2366=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f'
2367--- tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f 2018-11-08 22:24:49 +0000
2368+++ tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f 2019-05-23 07:08:37 +0000
2369@@ -636,6 +636,10 @@
2370 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
2371 ENDIF
2372
2373+ IF(USERHEL.EQ.-2) THEN
2374+ NTRY = 0
2375+ ENDIF
2376+
2377 IF(NTRY.EQ.0) THEN
2378 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
2379 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
2380@@ -655,7 +659,7 @@
2381 101 CONTINUE
2382 CLOSE(1)
2383
2384- IF (HELICITYFILTERLEVEL.EQ.0) THEN
2385+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
2386 FOUNDHELFILTER=.TRUE.
2387 DO J=1,NCOMB
2388 GOODHEL(J)=1
2389@@ -796,7 +800,7 @@
2390 HELPICKED=1
2391 CTMODE=CTMODEINIT
2392 ELSE
2393- IF (USERHEL.NE.-1) THEN
2394+ IF (USERHEL.GT.0) THEN
2395 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
2396 DO I=0,NSQUAREDSO
2397 ANS(1,I)=0.0D0
2398@@ -806,7 +810,7 @@
2399 GOTO 9999
2400 ENDIF
2401 ENDIF
2402- HELPICKED=USERHEL
2403+ HELPICKED=MAX(USERHEL,-1)
2404 IF (CTMODERUN.NE.-1) THEN
2405 CTMODE=CTMODERUN
2406 ELSE
2407@@ -1069,7 +1073,7 @@
2408 1226 CONTINUE
2409
2410 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2411- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2412+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2413 C Make sure that that no polarization constraint filters out
2414 C this helicity
2415 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
2416@@ -1287,7 +1291,7 @@
2417 DO K=1,3
2418 DO I=0,NSQUAREDSO
2419 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
2420- IF (USERHEL.NE.-1) THEN
2421+ IF (USERHEL.GT.-1) THEN
2422 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
2423 ELSE
2424 DO J=1,NINITIAL
2425
2426=== modified file 'tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f'
2427--- tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f 2018-05-18 12:22:47 +0000
2428+++ tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f 2019-05-23 07:08:37 +0000
2429@@ -80,7 +80,6 @@
2430 LOGICAL GOODHEL(NCOMB)
2431 DATA NTRY/0/
2432 DATA GOODHEL/NCOMB*.FALSE./
2433-
2434 C
2435 C GLOBAL VARIABLES
2436 C
2437@@ -166,10 +165,6 @@
2438 C ----------
2439 C BEGIN CODE
2440 C ----------
2441- IF(USERHEL.EQ.-1) NTRY=NTRY+1
2442- DO IHEL=1,NEXTERNAL
2443- JC(IHEL) = +1
2444- ENDDO
2445 C When spin-2 particles are involved, the Helicity filtering is
2446 C dangerous for the 2->1 topology.
2447 C This is because depending on the MC setup the initial PS points
2448@@ -182,11 +177,16 @@
2449 C helicity sum is).
2450 C For this reason, we simply remove the filterin when there is
2451 C only three external particles.
2452- IF (NEXTERNAL.LE.3) THEN
2453+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
2454 DO IHEL=1,NCOMB
2455 GOODHEL(IHEL)=.TRUE.
2456 ENDDO
2457+ IF(USERHEL.EQ.-2) USERHEL=-1
2458 ENDIF
2459+ IF(USERHEL.EQ.-1) NTRY=NTRY+1
2460+ DO IHEL=1,NEXTERNAL
2461+ JC(IHEL) = +1
2462+ ENDDO
2463 ANS = 0D0
2464 DO IHEL=1,NCOMB
2465 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
2466
2467=== modified file 'tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f'
2468--- tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f 2018-05-18 12:22:47 +0000
2469+++ tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f 2019-05-23 07:08:37 +0000
2470@@ -192,13 +192,6 @@
2471 C ----------
2472 C BEGIN CODE
2473 C ----------
2474- NTRY=NTRY+1
2475- DO IHEL=1,NEXTERNAL
2476- JC(IHEL) = +1
2477- ENDDO
2478- DO I=1,NSQAMPSO
2479- ANS(I) = 0D0
2480- ENDDO
2481 C When spin-2 particles are involved, the Helicity filtering is
2482 C dangerous for the 2->1 topology.
2483 C This is because depending on the MC setup the initial PS points
2484@@ -211,11 +204,21 @@
2485 C helicity sum is).
2486 C For this reason, we simply remove the filterin when there is
2487 C only three external particles.
2488- IF (NEXTERNAL.LE.3) THEN
2489+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
2490 DO IHEL=1,NCOMB
2491 GOODHEL(IHEL)=.TRUE.
2492 ENDDO
2493+ IF(USERHEL.EQ.-2) USERHEL = -1
2494 ENDIF
2495+
2496+ NTRY=NTRY+1
2497+ DO IHEL=1,NEXTERNAL
2498+ JC(IHEL) = +1
2499+ ENDDO
2500+ DO I=1,NSQAMPSO
2501+ ANS(I) = 0D0
2502+ ENDDO
2503+
2504 DO IHEL=1,NCOMB
2505 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
2506 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN
2507
2508=== modified file 'tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_ampOrderQED2_eq_2_WGTsq_le_14_QCDsq_gt_4.f'
2509--- tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_ampOrderQED2_eq_2_WGTsq_le_14_QCDsq_gt_4.f 2018-05-18 12:22:47 +0000
2510+++ tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_ampOrderQED2_eq_2_WGTsq_le_14_QCDsq_gt_4.f 2019-05-23 07:08:37 +0000
2511@@ -192,13 +192,6 @@
2512 C ----------
2513 C BEGIN CODE
2514 C ----------
2515- NTRY=NTRY+1
2516- DO IHEL=1,NEXTERNAL
2517- JC(IHEL) = +1
2518- ENDDO
2519- DO I=1,NSQAMPSO
2520- ANS(I) = 0D0
2521- ENDDO
2522 C When spin-2 particles are involved, the Helicity filtering is
2523 C dangerous for the 2->1 topology.
2524 C This is because depending on the MC setup the initial PS points
2525@@ -211,11 +204,21 @@
2526 C helicity sum is).
2527 C For this reason, we simply remove the filterin when there is
2528 C only three external particles.
2529- IF (NEXTERNAL.LE.3) THEN
2530+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
2531 DO IHEL=1,NCOMB
2532 GOODHEL(IHEL)=.TRUE.
2533 ENDDO
2534+ IF(USERHEL.EQ.-2) USERHEL = -1
2535 ENDIF
2536+
2537+ NTRY=NTRY+1
2538+ DO IHEL=1,NEXTERNAL
2539+ JC(IHEL) = +1
2540+ ENDDO
2541+ DO I=1,NSQAMPSO
2542+ ANS(I) = 0D0
2543+ ENDDO
2544+
2545 DO IHEL=1,NCOMB
2546 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
2547 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN
2548
2549=== modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f'
2550--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f 2018-11-08 22:24:49 +0000
2551+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f 2019-05-23 07:08:37 +0000
2552@@ -636,6 +636,10 @@
2553 CALL MG5_1_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
2554 ENDIF
2555
2556+ IF(USERHEL.EQ.-2) THEN
2557+ NTRY = 0
2558+ ENDIF
2559+
2560 IF(NTRY.EQ.0) THEN
2561 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
2562 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
2563@@ -655,7 +659,7 @@
2564 101 CONTINUE
2565 CLOSE(1)
2566
2567- IF (HELICITYFILTERLEVEL.EQ.0) THEN
2568+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
2569 FOUNDHELFILTER=.TRUE.
2570 DO J=1,NCOMB
2571 GOODHEL(J)=1
2572@@ -796,7 +800,7 @@
2573 HELPICKED=1
2574 CTMODE=CTMODEINIT
2575 ELSE
2576- IF (USERHEL.NE.-1) THEN
2577+ IF (USERHEL.GT.0) THEN
2578 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
2579 DO I=0,NSQUAREDSO
2580 ANS(1,I)=0.0D0
2581@@ -806,7 +810,7 @@
2582 GOTO 9999
2583 ENDIF
2584 ENDIF
2585- HELPICKED=USERHEL
2586+ HELPICKED=MAX(USERHEL,-1)
2587 IF (CTMODERUN.NE.-1) THEN
2588 CTMODE=CTMODERUN
2589 ELSE
2590@@ -1069,7 +1073,7 @@
2591 1226 CONTINUE
2592
2593 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2594- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2595+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2596 C Make sure that that no polarization constraint filters out
2597 C this helicity
2598 IF (POLARIZATIONS(0,0).EQ.-1.OR.MG5_1_IS_HEL_SELECTED(HELPICK
2599@@ -1287,7 +1291,7 @@
2600 DO K=1,3
2601 DO I=0,NSQUAREDSO
2602 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
2603- IF (USERHEL.NE.-1) THEN
2604+ IF (USERHEL.GT.-1) THEN
2605 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
2606 ELSE
2607 DO J=1,NINITIAL
2608
2609=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f'
2610--- tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f 2018-05-18 12:22:47 +0000
2611+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f 2019-05-23 07:08:37 +0000
2612@@ -80,7 +80,6 @@
2613 LOGICAL GOODHEL(NCOMB)
2614 DATA NTRY/0/
2615 DATA GOODHEL/NCOMB*.FALSE./
2616-
2617 C
2618 C GLOBAL VARIABLES
2619 C
2620@@ -134,10 +133,6 @@
2621 C ----------
2622 C BEGIN CODE
2623 C ----------
2624- IF(USERHEL.EQ.-1) NTRY=NTRY+1
2625- DO IHEL=1,NEXTERNAL
2626- JC(IHEL) = +1
2627- ENDDO
2628 C When spin-2 particles are involved, the Helicity filtering is
2629 C dangerous for the 2->1 topology.
2630 C This is because depending on the MC setup the initial PS points
2631@@ -150,11 +145,16 @@
2632 C helicity sum is).
2633 C For this reason, we simply remove the filterin when there is
2634 C only three external particles.
2635- IF (NEXTERNAL.LE.3) THEN
2636+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
2637 DO IHEL=1,NCOMB
2638 GOODHEL(IHEL)=.TRUE.
2639 ENDDO
2640+ IF(USERHEL.EQ.-2) USERHEL=-1
2641 ENDIF
2642+ IF(USERHEL.EQ.-1) NTRY=NTRY+1
2643+ DO IHEL=1,NEXTERNAL
2644+ JC(IHEL) = +1
2645+ ENDDO
2646 ANS = 0D0
2647 DO IHEL=1,NCOMB
2648 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
2649
2650=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/loop_matrix.f'
2651--- tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/loop_matrix.f 2017-08-14 07:04:15 +0000
2652+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/loop_matrix.f 2019-05-23 07:08:37 +0000
2653@@ -492,7 +492,7 @@
2654 C helicity is asked
2655 NROTATIONS_DP_BU = NROTATIONS_DP
2656 NROTATIONS_QP_BU = NROTATIONS_QP
2657- IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.NE.-1) THEN
2658+ IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.GT.-1) THEN
2659 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
2660 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'
2661 $ //' asked for this PS point, and there is a spin-2 (or'
2662@@ -531,7 +531,7 @@
2663 ENDDO
2664 101 CONTINUE
2665 CLOSE(1)
2666- IF (HELICITYFILTERLEVEL.EQ.0) THEN
2667+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
2668 FOUNDHELFILTER=.TRUE.
2669 DO J=1,NCOMB
2670 GOODHEL(J)=.TRUE.
2671@@ -636,7 +636,7 @@
2672 HELPICKED=1
2673 CTMODE=CTMODEINIT
2674 ELSE
2675- IF (USERHEL.NE.-1) THEN
2676+ IF (USERHEL.GT.0) THEN
2677 IF(.NOT.GOODHEL(USERHEL)) THEN
2678 ANS(1)=0.0D0
2679 ANS(2)=0.0D0
2680@@ -644,7 +644,7 @@
2681 GOTO 9999
2682 ENDIF
2683 ENDIF
2684- HELPICKED=USERHEL
2685+ HELPICKED=MAX(USERHEL,-1)
2686 IF (CTMODERUN.GT.-1) THEN
2687 CTMODE=CTMODERUN
2688 ELSE
2689@@ -898,7 +898,7 @@
2690 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2691 C Update of NEXTREF, will be used for loop induced only.
2692 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)
2693- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2694+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2695 BUFFR(1)=BUFFR(1)+ANS(1)
2696 BUFFR(2)=BUFFR(2)+ANS(2)
2697 BUFFR(3)=BUFFR(3)+ANS(3)
2698@@ -1010,7 +1010,7 @@
2699
2700 DO K=1,3
2701 ANS(K)=ANS(K)/DBLE(IDEN)
2702- IF (USERHEL.NE.-1) THEN
2703+ IF (USERHEL.GT.-1) THEN
2704 ANS(K)=ANS(K)*HELAVGFACTOR
2705 ELSE
2706 DO J=1,NINITIAL
2707
2708=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f'
2709--- tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f 2018-05-18 12:22:47 +0000
2710+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f 2019-05-23 07:08:37 +0000
2711@@ -80,7 +80,6 @@
2712 LOGICAL GOODHEL(NCOMB)
2713 DATA NTRY/0/
2714 DATA GOODHEL/NCOMB*.FALSE./
2715-
2716 C
2717 C GLOBAL VARIABLES
2718 C
2719@@ -150,10 +149,6 @@
2720 C ----------
2721 C BEGIN CODE
2722 C ----------
2723- IF(USERHEL.EQ.-1) NTRY=NTRY+1
2724- DO IHEL=1,NEXTERNAL
2725- JC(IHEL) = +1
2726- ENDDO
2727 C When spin-2 particles are involved, the Helicity filtering is
2728 C dangerous for the 2->1 topology.
2729 C This is because depending on the MC setup the initial PS points
2730@@ -166,11 +161,16 @@
2731 C helicity sum is).
2732 C For this reason, we simply remove the filterin when there is
2733 C only three external particles.
2734- IF (NEXTERNAL.LE.3) THEN
2735+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
2736 DO IHEL=1,NCOMB
2737 GOODHEL(IHEL)=.TRUE.
2738 ENDDO
2739+ IF(USERHEL.EQ.-2) USERHEL=-1
2740 ENDIF
2741+ IF(USERHEL.EQ.-1) NTRY=NTRY+1
2742+ DO IHEL=1,NEXTERNAL
2743+ JC(IHEL) = +1
2744+ ENDDO
2745 ANS = 0D0
2746 DO IHEL=1,NCOMB
2747 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
2748
2749=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/loop_matrix.f'
2750--- tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/loop_matrix.f 2017-08-15 19:34:40 +0000
2751+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/loop_matrix.f 2019-05-23 07:08:37 +0000
2752@@ -492,7 +492,7 @@
2753 C helicity is asked
2754 NROTATIONS_DP_BU = NROTATIONS_DP
2755 NROTATIONS_QP_BU = NROTATIONS_QP
2756- IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.NE.-1) THEN
2757+ IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.GT.-1) THEN
2758 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
2759 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'
2760 $ //' asked for this PS point, and there is a spin-2 (or'
2761@@ -531,7 +531,7 @@
2762 ENDDO
2763 101 CONTINUE
2764 CLOSE(1)
2765- IF (HELICITYFILTERLEVEL.EQ.0) THEN
2766+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
2767 FOUNDHELFILTER=.TRUE.
2768 DO J=1,NCOMB
2769 GOODHEL(J)=.TRUE.
2770@@ -636,7 +636,7 @@
2771 HELPICKED=1
2772 CTMODE=CTMODEINIT
2773 ELSE
2774- IF (USERHEL.NE.-1) THEN
2775+ IF (USERHEL.GT.0) THEN
2776 IF(.NOT.GOODHEL(USERHEL)) THEN
2777 ANS(1)=0.0D0
2778 ANS(2)=0.0D0
2779@@ -644,7 +644,7 @@
2780 GOTO 9999
2781 ENDIF
2782 ENDIF
2783- HELPICKED=USERHEL
2784+ HELPICKED=MAX(USERHEL,-1)
2785 IF (CTMODERUN.GT.-1) THEN
2786 CTMODE=CTMODERUN
2787 ELSE
2788@@ -2014,7 +2014,7 @@
2789 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2790 C Update of NEXTREF, will be used for loop induced only.
2791 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)
2792- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2793+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2794 BUFFR(1)=BUFFR(1)+ANS(1)
2795 BUFFR(2)=BUFFR(2)+ANS(2)
2796 BUFFR(3)=BUFFR(3)+ANS(3)
2797@@ -2126,7 +2126,7 @@
2798
2799 DO K=1,3
2800 ANS(K)=ANS(K)/DBLE(IDEN)
2801- IF (USERHEL.NE.-1) THEN
2802+ IF (USERHEL.GT.-1) THEN
2803 ANS(K)=ANS(K)*HELAVGFACTOR
2804 ELSE
2805 DO J=1,NINITIAL
2806
2807=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f'
2808--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f 2018-05-18 12:22:47 +0000
2809+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f 2019-05-23 07:08:37 +0000
2810@@ -80,7 +80,6 @@
2811 LOGICAL GOODHEL(NCOMB)
2812 DATA NTRY/0/
2813 DATA GOODHEL/NCOMB*.FALSE./
2814-
2815 C
2816 C GLOBAL VARIABLES
2817 C
2818@@ -134,10 +133,6 @@
2819 C ----------
2820 C BEGIN CODE
2821 C ----------
2822- IF(USERHEL.EQ.-1) NTRY=NTRY+1
2823- DO IHEL=1,NEXTERNAL
2824- JC(IHEL) = +1
2825- ENDDO
2826 C When spin-2 particles are involved, the Helicity filtering is
2827 C dangerous for the 2->1 topology.
2828 C This is because depending on the MC setup the initial PS points
2829@@ -150,11 +145,16 @@
2830 C helicity sum is).
2831 C For this reason, we simply remove the filterin when there is
2832 C only three external particles.
2833- IF (NEXTERNAL.LE.3) THEN
2834+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
2835 DO IHEL=1,NCOMB
2836 GOODHEL(IHEL)=.TRUE.
2837 ENDDO
2838+ IF(USERHEL.EQ.-2) USERHEL=-1
2839 ENDIF
2840+ IF(USERHEL.EQ.-1) NTRY=NTRY+1
2841+ DO IHEL=1,NEXTERNAL
2842+ JC(IHEL) = +1
2843+ ENDDO
2844 ANS = 0D0
2845 DO IHEL=1,NCOMB
2846 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
2847
2848=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f'
2849--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f 2017-08-15 19:34:40 +0000
2850+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f 2019-05-23 07:08:37 +0000
2851@@ -636,6 +636,10 @@
2852 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
2853 ENDIF
2854
2855+ IF(USERHEL.EQ.-2) THEN
2856+ NTRY = 0
2857+ ENDIF
2858+
2859 IF(NTRY.EQ.0) THEN
2860 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
2861 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
2862@@ -655,7 +659,7 @@
2863 101 CONTINUE
2864 CLOSE(1)
2865
2866- IF (HELICITYFILTERLEVEL.EQ.0) THEN
2867+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
2868 FOUNDHELFILTER=.TRUE.
2869 DO J=1,NCOMB
2870 GOODHEL(J)=1
2871@@ -796,7 +800,7 @@
2872 HELPICKED=1
2873 CTMODE=CTMODEINIT
2874 ELSE
2875- IF (USERHEL.NE.-1) THEN
2876+ IF (USERHEL.GT.0) THEN
2877 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
2878 DO I=0,NSQUAREDSO
2879 ANS(1,I)=0.0D0
2880@@ -806,7 +810,7 @@
2881 GOTO 9999
2882 ENDIF
2883 ENDIF
2884- HELPICKED=USERHEL
2885+ HELPICKED=MAX(USERHEL,-1)
2886 IF (CTMODERUN.NE.-1) THEN
2887 CTMODE=CTMODERUN
2888 ELSE
2889@@ -1063,7 +1067,7 @@
2890 1226 CONTINUE
2891
2892 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2893- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2894+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2895 C Make sure that that no polarization constraint filters out
2896 C this helicity
2897 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
2898@@ -1281,7 +1285,7 @@
2899 DO K=1,3
2900 DO I=0,NSQUAREDSO
2901 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
2902- IF (USERHEL.NE.-1) THEN
2903+ IF (USERHEL.GT.-1) THEN
2904 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
2905 ELSE
2906 DO J=1,NINITIAL
2907
2908=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/born_matrix.f'
2909--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/born_matrix.f 2018-05-18 12:22:47 +0000
2910+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/born_matrix.f 2019-05-23 07:08:37 +0000
2911@@ -80,7 +80,6 @@
2912 LOGICAL GOODHEL(NCOMB)
2913 DATA NTRY/0/
2914 DATA GOODHEL/NCOMB*.FALSE./
2915-
2916 C
2917 C GLOBAL VARIABLES
2918 C
2919@@ -150,10 +149,6 @@
2920 C ----------
2921 C BEGIN CODE
2922 C ----------
2923- IF(USERHEL.EQ.-1) NTRY=NTRY+1
2924- DO IHEL=1,NEXTERNAL
2925- JC(IHEL) = +1
2926- ENDDO
2927 C When spin-2 particles are involved, the Helicity filtering is
2928 C dangerous for the 2->1 topology.
2929 C This is because depending on the MC setup the initial PS points
2930@@ -166,11 +161,16 @@
2931 C helicity sum is).
2932 C For this reason, we simply remove the filterin when there is
2933 C only three external particles.
2934- IF (NEXTERNAL.LE.3) THEN
2935+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
2936 DO IHEL=1,NCOMB
2937 GOODHEL(IHEL)=.TRUE.
2938 ENDDO
2939+ IF(USERHEL.EQ.-2) USERHEL=-1
2940 ENDIF
2941+ IF(USERHEL.EQ.-1) NTRY=NTRY+1
2942+ DO IHEL=1,NEXTERNAL
2943+ JC(IHEL) = +1
2944+ ENDDO
2945 ANS = 0D0
2946 DO IHEL=1,NCOMB
2947 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
2948
2949=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f'
2950--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f 2017-08-14 07:04:15 +0000
2951+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f 2019-05-23 07:08:37 +0000
2952@@ -636,6 +636,10 @@
2953 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
2954 ENDIF
2955
2956+ IF(USERHEL.EQ.-2) THEN
2957+ NTRY = 0
2958+ ENDIF
2959+
2960 IF(NTRY.EQ.0) THEN
2961 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
2962 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
2963@@ -655,7 +659,7 @@
2964 101 CONTINUE
2965 CLOSE(1)
2966
2967- IF (HELICITYFILTERLEVEL.EQ.0) THEN
2968+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
2969 FOUNDHELFILTER=.TRUE.
2970 DO J=1,NCOMB
2971 GOODHEL(J)=1
2972@@ -796,7 +800,7 @@
2973 HELPICKED=1
2974 CTMODE=CTMODEINIT
2975 ELSE
2976- IF (USERHEL.NE.-1) THEN
2977+ IF (USERHEL.GT.0) THEN
2978 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
2979 DO I=0,NSQUAREDSO
2980 ANS(1,I)=0.0D0
2981@@ -806,7 +810,7 @@
2982 GOTO 9999
2983 ENDIF
2984 ENDIF
2985- HELPICKED=USERHEL
2986+ HELPICKED=MAX(USERHEL,-1)
2987 IF (CTMODERUN.NE.-1) THEN
2988 CTMODE=CTMODERUN
2989 ELSE
2990@@ -1063,7 +1067,7 @@
2991 1226 CONTINUE
2992
2993 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2994- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2995+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2996 C Make sure that that no polarization constraint filters out
2997 C this helicity
2998 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
2999@@ -1281,7 +1285,7 @@
3000 DO K=1,3
3001 DO I=0,NSQUAREDSO
3002 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
3003- IF (USERHEL.NE.-1) THEN
3004+ IF (USERHEL.GT.-1) THEN
3005 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
3006 ELSE
3007 DO J=1,NINITIAL
3008
3009=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/loop_matrix.f'
3010--- tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/loop_matrix.f 2017-08-15 19:34:40 +0000
3011+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/loop_matrix.f 2019-05-23 07:08:37 +0000
3012@@ -490,7 +490,7 @@
3013 C helicity is asked
3014 NROTATIONS_DP_BU = NROTATIONS_DP
3015 NROTATIONS_QP_BU = NROTATIONS_QP
3016- IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.NE.-1) THEN
3017+ IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.GT.-1) THEN
3018 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
3019 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'
3020 $ //' asked for this PS point, and there is a spin-2 (or'
3021@@ -529,7 +529,7 @@
3022 ENDDO
3023 101 CONTINUE
3024 CLOSE(1)
3025- IF (HELICITYFILTERLEVEL.EQ.0) THEN
3026+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
3027 FOUNDHELFILTER=.TRUE.
3028 DO J=1,NCOMB
3029 GOODHEL(J)=.TRUE.
3030@@ -634,7 +634,7 @@
3031 HELPICKED=1
3032 CTMODE=CTMODEINIT
3033 ELSE
3034- IF (USERHEL.NE.-1) THEN
3035+ IF (USERHEL.GT.0) THEN
3036 IF(.NOT.GOODHEL(USERHEL)) THEN
3037 ANS(1)=0.0D0
3038 ANS(2)=0.0D0
3039@@ -642,7 +642,7 @@
3040 GOTO 9999
3041 ENDIF
3042 ENDIF
3043- HELPICKED=USERHEL
3044+ HELPICKED=MAX(USERHEL,-1)
3045 IF (CTMODERUN.GT.-1) THEN
3046 CTMODE=CTMODERUN
3047 ELSE
3048@@ -922,7 +922,7 @@
3049 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
3050 C Update of NEXTREF, will be used for loop induced only.
3051 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)
3052- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
3053+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
3054 BUFFR(1)=BUFFR(1)+ANS(1)
3055 BUFFR(2)=BUFFR(2)+ANS(2)
3056 BUFFR(3)=BUFFR(3)+ANS(3)
3057@@ -1034,7 +1034,7 @@
3058
3059 DO K=1,3
3060 ANS(K)=ANS(K)/DBLE(IDEN)
3061- IF (USERHEL.NE.-1) THEN
3062+ IF (USERHEL.GT.-1) THEN
3063 ANS(K)=ANS(K)*HELAVGFACTOR
3064 ELSE
3065 DO J=1,NINITIAL
3066
3067=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/born_matrix.f'
3068--- tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/born_matrix.f 2018-05-18 12:22:47 +0000
3069+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/born_matrix.f 2019-05-23 07:08:37 +0000
3070@@ -80,7 +80,6 @@
3071 LOGICAL GOODHEL(NCOMB)
3072 DATA NTRY/0/
3073 DATA GOODHEL/NCOMB*.FALSE./
3074-
3075 C
3076 C GLOBAL VARIABLES
3077 C
3078@@ -118,10 +117,6 @@
3079 C ----------
3080 C BEGIN CODE
3081 C ----------
3082- IF(USERHEL.EQ.-1) NTRY=NTRY+1
3083- DO IHEL=1,NEXTERNAL
3084- JC(IHEL) = +1
3085- ENDDO
3086 C When spin-2 particles are involved, the Helicity filtering is
3087 C dangerous for the 2->1 topology.
3088 C This is because depending on the MC setup the initial PS points
3089@@ -134,11 +129,16 @@
3090 C helicity sum is).
3091 C For this reason, we simply remove the filterin when there is
3092 C only three external particles.
3093- IF (NEXTERNAL.LE.3) THEN
3094+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
3095 DO IHEL=1,NCOMB
3096 GOODHEL(IHEL)=.TRUE.
3097 ENDDO
3098+ IF(USERHEL.EQ.-2) USERHEL=-1
3099 ENDIF
3100+ IF(USERHEL.EQ.-1) NTRY=NTRY+1
3101+ DO IHEL=1,NEXTERNAL
3102+ JC(IHEL) = +1
3103+ ENDDO
3104 ANS = 0D0
3105 DO IHEL=1,NCOMB
3106 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
3107
3108=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/loop_matrix.f'
3109--- tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/loop_matrix.f 2017-08-15 19:34:40 +0000
3110+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/loop_matrix.f 2019-05-23 07:08:37 +0000
3111@@ -492,7 +492,7 @@
3112 C helicity is asked
3113 NROTATIONS_DP_BU = NROTATIONS_DP
3114 NROTATIONS_QP_BU = NROTATIONS_QP
3115- IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.NE.-1) THEN
3116+ IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.GT.-1) THEN
3117 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
3118 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'
3119 $ //' asked for this PS point, and there is a spin-2 (or'
3120@@ -531,7 +531,7 @@
3121 ENDDO
3122 101 CONTINUE
3123 CLOSE(1)
3124- IF (HELICITYFILTERLEVEL.EQ.0) THEN
3125+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
3126 FOUNDHELFILTER=.TRUE.
3127 DO J=1,NCOMB
3128 GOODHEL(J)=.TRUE.
3129@@ -636,7 +636,7 @@
3130 HELPICKED=1
3131 CTMODE=CTMODEINIT
3132 ELSE
3133- IF (USERHEL.NE.-1) THEN
3134+ IF (USERHEL.GT.0) THEN
3135 IF(.NOT.GOODHEL(USERHEL)) THEN
3136 ANS(1)=0.0D0
3137 ANS(2)=0.0D0
3138@@ -644,7 +644,7 @@
3139 GOTO 9999
3140 ENDIF
3141 ENDIF
3142- HELPICKED=USERHEL
3143+ HELPICKED=MAX(USERHEL,-1)
3144 IF (CTMODERUN.GT.-1) THEN
3145 CTMODE=CTMODERUN
3146 ELSE
3147@@ -888,7 +888,7 @@
3148 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
3149 C Update of NEXTREF, will be used for loop induced only.
3150 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)
3151- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
3152+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
3153 BUFFR(1)=BUFFR(1)+ANS(1)
3154 BUFFR(2)=BUFFR(2)+ANS(2)
3155 BUFFR(3)=BUFFR(3)+ANS(3)
3156@@ -1000,7 +1000,7 @@
3157
3158 DO K=1,3
3159 ANS(K)=ANS(K)/DBLE(IDEN)
3160- IF (USERHEL.NE.-1) THEN
3161+ IF (USERHEL.GT.-1) THEN
3162 ANS(K)=ANS(K)*HELAVGFACTOR
3163 ELSE
3164 DO J=1,NINITIAL
3165
3166=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/born_matrix.f'
3167--- tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/born_matrix.f 2018-05-18 12:22:47 +0000
3168+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/born_matrix.f 2019-05-23 07:08:37 +0000
3169@@ -80,7 +80,6 @@
3170 LOGICAL GOODHEL(NCOMB)
3171 DATA NTRY/0/
3172 DATA GOODHEL/NCOMB*.FALSE./
3173-
3174 C
3175 C GLOBAL VARIABLES
3176 C
3177@@ -118,10 +117,6 @@
3178 C ----------
3179 C BEGIN CODE
3180 C ----------
3181- IF(USERHEL.EQ.-1) NTRY=NTRY+1
3182- DO IHEL=1,NEXTERNAL
3183- JC(IHEL) = +1
3184- ENDDO
3185 C When spin-2 particles are involved, the Helicity filtering is
3186 C dangerous for the 2->1 topology.
3187 C This is because depending on the MC setup the initial PS points
3188@@ -134,11 +129,16 @@
3189 C helicity sum is).
3190 C For this reason, we simply remove the filterin when there is
3191 C only three external particles.
3192- IF (NEXTERNAL.LE.3) THEN
3193+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
3194 DO IHEL=1,NCOMB
3195 GOODHEL(IHEL)=.TRUE.
3196 ENDDO
3197+ IF(USERHEL.EQ.-2) USERHEL=-1
3198 ENDIF
3199+ IF(USERHEL.EQ.-1) NTRY=NTRY+1
3200+ DO IHEL=1,NEXTERNAL
3201+ JC(IHEL) = +1
3202+ ENDDO
3203 ANS = 0D0
3204 DO IHEL=1,NCOMB
3205 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
3206
3207=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/loop_matrix.f'
3208--- tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/loop_matrix.f 2017-08-14 07:04:15 +0000
3209+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/loop_matrix.f 2019-05-23 07:08:37 +0000
3210@@ -492,7 +492,7 @@
3211 C helicity is asked
3212 NROTATIONS_DP_BU = NROTATIONS_DP
3213 NROTATIONS_QP_BU = NROTATIONS_QP
3214- IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.NE.-1) THEN
3215+ IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.GT.-1) THEN
3216 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
3217 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'
3218 $ //' asked for this PS point, and there is a spin-2 (or'
3219@@ -531,7 +531,7 @@
3220 ENDDO
3221 101 CONTINUE
3222 CLOSE(1)
3223- IF (HELICITYFILTERLEVEL.EQ.0) THEN
3224+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
3225 FOUNDHELFILTER=.TRUE.
3226 DO J=1,NCOMB
3227 GOODHEL(J)=.TRUE.
3228@@ -636,7 +636,7 @@
3229 HELPICKED=1
3230 CTMODE=CTMODEINIT
3231 ELSE
3232- IF (USERHEL.NE.-1) THEN
3233+ IF (USERHEL.GT.0) THEN
3234 IF(.NOT.GOODHEL(USERHEL)) THEN
3235 ANS(1)=0.0D0
3236 ANS(2)=0.0D0
3237@@ -644,7 +644,7 @@
3238 GOTO 9999
3239 ENDIF
3240 ENDIF
3241- HELPICKED=USERHEL
3242+ HELPICKED=MAX(USERHEL,-1)
3243 IF (CTMODERUN.GT.-1) THEN
3244 CTMODE=CTMODERUN
3245 ELSE
3246@@ -1151,7 +1151,7 @@
3247 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
3248 C Update of NEXTREF, will be used for loop induced only.
3249 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)
3250- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
3251+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
3252 BUFFR(1)=BUFFR(1)+ANS(1)
3253 BUFFR(2)=BUFFR(2)+ANS(2)
3254 BUFFR(3)=BUFFR(3)+ANS(3)
3255@@ -1263,7 +1263,7 @@
3256
3257 DO K=1,3
3258 ANS(K)=ANS(K)/DBLE(IDEN)
3259- IF (USERHEL.NE.-1) THEN
3260+ IF (USERHEL.GT.-1) THEN
3261 ANS(K)=ANS(K)*HELAVGFACTOR
3262 ELSE
3263 DO J=1,NINITIAL
3264
3265=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/born_matrix.f'
3266--- tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/born_matrix.f 2018-05-18 12:22:47 +0000
3267+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/born_matrix.f 2019-05-23 07:08:37 +0000
3268@@ -80,7 +80,6 @@
3269 LOGICAL GOODHEL(NCOMB)
3270 DATA NTRY/0/
3271 DATA GOODHEL/NCOMB*.FALSE./
3272-
3273 C
3274 C GLOBAL VARIABLES
3275 C
3276@@ -118,10 +117,6 @@
3277 C ----------
3278 C BEGIN CODE
3279 C ----------
3280- IF(USERHEL.EQ.-1) NTRY=NTRY+1
3281- DO IHEL=1,NEXTERNAL
3282- JC(IHEL) = +1
3283- ENDDO
3284 C When spin-2 particles are involved, the Helicity filtering is
3285 C dangerous for the 2->1 topology.
3286 C This is because depending on the MC setup the initial PS points
3287@@ -134,11 +129,16 @@
3288 C helicity sum is).
3289 C For this reason, we simply remove the filterin when there is
3290 C only three external particles.
3291- IF (NEXTERNAL.LE.3) THEN
3292+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
3293 DO IHEL=1,NCOMB
3294 GOODHEL(IHEL)=.TRUE.
3295 ENDDO
3296+ IF(USERHEL.EQ.-2) USERHEL=-1
3297 ENDIF
3298+ IF(USERHEL.EQ.-1) NTRY=NTRY+1
3299+ DO IHEL=1,NEXTERNAL
3300+ JC(IHEL) = +1
3301+ ENDDO
3302 ANS = 0D0
3303 DO IHEL=1,NCOMB
3304 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
3305
3306=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f'
3307--- tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f 2017-08-14 07:04:15 +0000
3308+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f 2019-05-23 07:08:37 +0000
3309@@ -636,6 +636,10 @@
3310 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
3311 ENDIF
3312
3313+ IF(USERHEL.EQ.-2) THEN
3314+ NTRY = 0
3315+ ENDIF
3316+
3317 IF(NTRY.EQ.0) THEN
3318 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
3319 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
3320@@ -655,7 +659,7 @@
3321 101 CONTINUE
3322 CLOSE(1)
3323
3324- IF (HELICITYFILTERLEVEL.EQ.0) THEN
3325+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
3326 FOUNDHELFILTER=.TRUE.
3327 DO J=1,NCOMB
3328 GOODHEL(J)=1
3329@@ -796,7 +800,7 @@
3330 HELPICKED=1
3331 CTMODE=CTMODEINIT
3332 ELSE
3333- IF (USERHEL.NE.-1) THEN
3334+ IF (USERHEL.GT.0) THEN
3335 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
3336 DO I=0,NSQUAREDSO
3337 ANS(1,I)=0.0D0
3338@@ -806,7 +810,7 @@
3339 GOTO 9999
3340 ENDIF
3341 ENDIF
3342- HELPICKED=USERHEL
3343+ HELPICKED=MAX(USERHEL,-1)
3344 IF (CTMODERUN.NE.-1) THEN
3345 CTMODE=CTMODERUN
3346 ELSE
3347@@ -1063,7 +1067,7 @@
3348 1226 CONTINUE
3349
3350 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
3351- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
3352+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
3353 C Make sure that that no polarization constraint filters out
3354 C this helicity
3355 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
3356@@ -1281,7 +1285,7 @@
3357 DO K=1,3
3358 DO I=0,NSQUAREDSO
3359 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
3360- IF (USERHEL.NE.-1) THEN
3361+ IF (USERHEL.GT.-1) THEN
3362 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
3363 ELSE
3364 DO J=1,NINITIAL
3365
3366=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/born_matrix.f'
3367--- tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/born_matrix.f 2018-05-18 12:22:47 +0000
3368+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/born_matrix.f 2019-05-23 07:08:37 +0000
3369@@ -80,7 +80,6 @@
3370 LOGICAL GOODHEL(NCOMB)
3371 DATA NTRY/0/
3372 DATA GOODHEL/NCOMB*.FALSE./
3373-
3374 C
3375 C GLOBAL VARIABLES
3376 C
3377@@ -118,10 +117,6 @@
3378 C ----------
3379 C BEGIN CODE
3380 C ----------
3381- IF(USERHEL.EQ.-1) NTRY=NTRY+1
3382- DO IHEL=1,NEXTERNAL
3383- JC(IHEL) = +1
3384- ENDDO
3385 C When spin-2 particles are involved, the Helicity filtering is
3386 C dangerous for the 2->1 topology.
3387 C This is because depending on the MC setup the initial PS points
3388@@ -134,11 +129,16 @@
3389 C helicity sum is).
3390 C For this reason, we simply remove the filterin when there is
3391 C only three external particles.
3392- IF (NEXTERNAL.LE.3) THEN
3393+ IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
3394 DO IHEL=1,NCOMB
3395 GOODHEL(IHEL)=.TRUE.
3396 ENDDO
3397+ IF(USERHEL.EQ.-2) USERHEL=-1
3398 ENDIF
3399+ IF(USERHEL.EQ.-1) NTRY=NTRY+1
3400+ DO IHEL=1,NEXTERNAL
3401+ JC(IHEL) = +1
3402+ ENDDO
3403 ANS = 0D0
3404 DO IHEL=1,NCOMB
3405 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
3406
3407=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f'
3408--- tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f 2017-08-14 07:04:15 +0000
3409+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f 2019-05-23 07:08:37 +0000
3410@@ -636,6 +636,10 @@
3411 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
3412 ENDIF
3413
3414+ IF(USERHEL.EQ.-2) THEN
3415+ NTRY = 0
3416+ ENDIF
3417+
3418 IF(NTRY.EQ.0) THEN
3419 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
3420 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
3421@@ -655,7 +659,7 @@
3422 101 CONTINUE
3423 CLOSE(1)
3424
3425- IF (HELICITYFILTERLEVEL.EQ.0) THEN
3426+ IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
3427 FOUNDHELFILTER=.TRUE.
3428 DO J=1,NCOMB
3429 GOODHEL(J)=1
3430@@ -796,7 +800,7 @@
3431 HELPICKED=1
3432 CTMODE=CTMODEINIT
3433 ELSE
3434- IF (USERHEL.NE.-1) THEN
3435+ IF (USERHEL.GT.0) THEN
3436 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
3437 DO I=0,NSQUAREDSO
3438 ANS(1,I)=0.0D0
3439@@ -806,7 +810,7 @@
3440 GOTO 9999
3441 ENDIF
3442 ENDIF
3443- HELPICKED=USERHEL
3444+ HELPICKED=MAX(USERHEL,-1)
3445 IF (CTMODERUN.NE.-1) THEN
3446 CTMODE=CTMODERUN
3447 ELSE
3448@@ -1063,7 +1067,7 @@
3449 1226 CONTINUE
3450
3451 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
3452- IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
3453+ IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
3454 C Make sure that that no polarization constraint filters out
3455 C this helicity
3456 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
3457@@ -1281,7 +1285,7 @@
3458 DO K=1,3
3459 DO I=0,NSQUAREDSO
3460 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
3461- IF (USERHEL.NE.-1) THEN
3462+ IF (USERHEL.GT.-1) THEN
3463 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
3464 ELSE
3465 DO J=1,NINITIAL
3466
3467=== modified file 'tests/unit_tests/various/test_rambo.py'
3468--- tests/unit_tests/various/test_rambo.py 2015-10-01 16:00:08 +0000
3469+++ tests/unit_tests/various/test_rambo.py 2019-05-23 07:08:37 +0000
3470@@ -34,8 +34,6 @@
3471 # not enough energy
3472 self.assertRaises(rambo.RAMBOError, rambo.RAMBO, 2,150,self.m2)
3473
3474- # not valid mass
3475- self.assertRaises(AssertionError, rambo.RAMBO, 2,1500,[1,2])
3476
3477 # not valid mass
3478 self.assertRaises(AssertionError, rambo.RAMBO, 2,1500,self.m1)
3479@@ -57,6 +55,13 @@
3480 for i in range(1,3):
3481 self.assertAlmostEqual(self.m2[i]**2, P[(4,i)]**2 - P[(1,i)]**2 - P[(2,i)]**2 - P[(3,i)]**2)
3482
3483+ mass = [100,20]
3484+ P, wgt = rambo.RAMBO(2,500, [100,20])
3485+ for i in range(1,3):
3486+ m = mass[i-1]
3487+ self.assertAlmostEqual(m**2, P[(4,i)]**2 - P[(1,i)]**2 - P[(2,i)]**2 - P[(3,i)]**2)
3488+
3489+
3490
3491 class test_wavefunctions(unittest.TestCase):
3492 """ check that the wavefunctions TXXXX, IXXXXX, ... are correctly define"""
3493
3494=== modified file 'tests/unit_tests/various/test_shower_card.py'
3495--- tests/unit_tests/various/test_shower_card.py 2019-04-24 11:02:30 +0000
3496+++ tests/unit_tests/various/test_shower_card.py 2019-05-23 07:08:37 +0000
3497@@ -527,7 +527,6 @@
3498 new_text = self.card.text
3499 old_card = shower_card.ShowerCard(new_text, testing=True)
3500 new_text = old_card.set_param('ue_enabled', '.false.', write_to=True)
3501- misc.sprint(new_text)
3502 new_card = shower_card.ShowerCard(new_text, testing=True)
3503 self.assertFalse(new_card['ue_enabled'])
3504

Subscribers

People subscribed via source and target branches

to all changes: