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

Proposed by Olivier Mattelaer on 2019-05-16
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 2019-05-16 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 on 2019-05-16
297. By olivier-mattelaer on 2019-05-16

merge with latest 2.6.6

298. By olivier-mattelaer on 2019-05-16

some cleaning + adapting test for new allowed input in RAMBO

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.
>

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 on 2019-05-23
299. By olivier-mattelaer on 2019-05-23

fix latest acceptance test

Unmerged revisions

299. By olivier-mattelaer on 2019-05-23

fix latest acceptance test

298. By olivier-mattelaer on 2019-05-16

some cleaning + adapting test for new allowed input in RAMBO

297. By olivier-mattelaer on 2019-05-16

merge with latest 2.6.6

296. By olivier-mattelaer on 2019-04-26

add reweight_card

295. By olivier-mattelaer on 2019-04-19

add more model information

294. By olivier-mattelaer on 2019-04-18

adding support for nincoming in standalone fortran as py lib

293. By olivier-mattelaer on 2019-04-18

merge with last 2.6.6

292. By olivier-mattelaer on 2019-01-17

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

291. By olivier-mattelaer on 2019-01-13

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

290. By olivier-mattelaer on 2019-01-11

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
=== modified file 'madgraph/core/base_objects.py'
--- madgraph/core/base_objects.py 2018-12-03 22:10:49 +0000
+++ madgraph/core/base_objects.py 2019-05-23 07:08:37 +0000
@@ -1043,6 +1043,8 @@
1043 self['expansion_order'] = None1043 self['expansion_order'] = None
1044 self['version_tag'] = None # position of the directory (for security)1044 self['version_tag'] = None # position of the directory (for security)
1045 self['gauge'] = [0, 1]1045 self['gauge'] = [0, 1]
1046 import collections
1047 self['model_info'] = collections.defaultdict(str)
1046 self['case_sensitive'] = True1048 self['case_sensitive'] = True
1047 # attribute which might be define if needed1049 # attribute which might be define if needed
1048 #self['name2pdg'] = {'name': pdg}1050 #self['name2pdg'] = {'name': pdg}
@@ -1184,7 +1186,7 @@
11841186
1185 if (name == 'order_hierarchy') and not self[name]:1187 if (name == 'order_hierarchy') and not self[name]:
1186 if self['interactions']:1188 if self['interactions']:
1187 self['order_hierarchy'] = self.get_order_hierarchy() 1189 self['order_hierarchy'] = self.get_order_hierarchy()
11881190
1189 if (name == 'expansion_order') and self[name] == None:1191 if (name == 'expansion_order') and self[name] == None:
1190 if self['interactions']:1192 if self['interactions']:
11911193
=== modified file 'madgraph/interface/common_run_interface.py'
--- madgraph/interface/common_run_interface.py 2019-05-03 07:18:01 +0000
+++ madgraph/interface/common_run_interface.py 2019-05-23 07:08:37 +0000
@@ -5211,7 +5211,6 @@
5211 def do_set(self, line):5211 def do_set(self, line):
5212 """ edit the value of one parameter in the card"""5212 """ edit the value of one parameter in the card"""
5213 5213
5214
5215 args = self.split_arg(line)5214 args = self.split_arg(line)
5216 5215
5217 5216
@@ -6696,6 +6695,7 @@
66966695
6697 if card_name == 'unknown':6696 if card_name == 'unknown':
6698 logger.warning('Fail to determine the type of the file. Not copied')6697 logger.warning('Fail to determine the type of the file. Not copied')
6698 return
6699 if card_name != 'banner':6699 if card_name != 'banner':
6700 logger.info('copy %s as %s' % (pathname, card_name))6700 logger.info('copy %s as %s' % (pathname, card_name))
6701 files.cp(path, self.paths[card_name.rsplit('_',1)[0]])6701 files.cp(path, self.paths[card_name.rsplit('_',1)[0]])
67026702
=== modified file 'madgraph/interface/extended_cmd.py'
--- madgraph/interface/extended_cmd.py 2019-04-24 11:02:09 +0000
+++ madgraph/interface/extended_cmd.py 2019-05-23 07:08:37 +0000
@@ -1652,7 +1652,6 @@
1652 # filepath can be overwritten during the run (leading to weird results)1652 # filepath can be overwritten during the run (leading to weird results)
1653 # Note also that we need a generator and not a list.1653 # Note also that we need a generator and not a list.
1654 for line in self.inputfile:1654 for line in self.inputfile:
1655
1656 #remove pointless spaces and \n1655 #remove pointless spaces and \n
1657 line = line.replace('\n', '').strip()1656 line = line.replace('\n', '').strip()
1658 # execute the line1657 # execute the line
16591658
=== modified file 'madgraph/interface/madgraph_interface.py'
--- madgraph/interface/madgraph_interface.py 2019-05-02 22:31:26 +0000
+++ madgraph/interface/madgraph_interface.py 2019-05-23 07:08:37 +0000
@@ -339,6 +339,9 @@
339 logger.info("")339 logger.info("")
340 logger.info(" import banner PATH [--no_launch]:",'$MG:BOLD')340 logger.info(" import banner PATH [--no_launch]:",'$MG:BOLD')
341 logger.info(" Rerun the exact same run define in the valid banner.")341 logger.info(" Rerun the exact same run define in the valid banner.")
342 logger.info("")
343 logger.info(" import process PATH", '$MG:BOLD')
344 logger.info(" generate the list of processes defined in the file")
342345
343 def help_install(self):346 def help_install(self):
344 logger.info("syntax: install " + "|".join(self._install_opts),'$MG:color:BLUE')347 logger.info("syntax: install " + "|".join(self._install_opts),'$MG:color:BLUE')
@@ -2786,7 +2789,7 @@
2786 _switch_opts = ['mg5','aMC@NLO','ML5']2789 _switch_opts = ['mg5','aMC@NLO','ML5']
2787 _check_opts = ['full', 'timing', 'stability', 'profile', 'permutation',2790 _check_opts = ['full', 'timing', 'stability', 'profile', 'permutation',
2788 'gauge','lorentz', 'brs', 'cms']2791 'gauge','lorentz', 'brs', 'cms']
2789 _import_formats = ['model_v4', 'model', 'proc_v4', 'command', 'banner']2792 _import_formats = ['model_v4', 'model', 'proc_v4', 'command', 'banner', 'process']
2790 _install_opts = ['Delphes', 'MadAnalysis4', 'ExRootAnalysis',2793 _install_opts = ['Delphes', 'MadAnalysis4', 'ExRootAnalysis',
2791 'update', 'Golem95', 'PJFry', 'QCDLoop', 'maddm', 'maddump',2794 'update', 'Golem95', 'PJFry', 'QCDLoop', 'maddm', 'maddump',
2792 'looptools']2795 'looptools']
@@ -3008,8 +3011,13 @@
3008 standalone_only = False3011 standalone_only = False
3009 if '--standalone' in args:3012 if '--standalone' in args:
3010 standalone_only = True3013 standalone_only = True
3011 args.remove('--standalone') 3014 args.remove('--standalone')
30123015
3016 allow_no_diagram = False
3017 if '--no_warning=nodiagram' in args:
3018 allow_no_diagram = True
3019 args.remove('--no_warning=nodiagram')
3020
3013 # Check the validity of the arguments3021 # Check the validity of the arguments
3014 self.check_add(args)3022 self.check_add(args)
30153023
@@ -3106,13 +3114,18 @@
3106 self.options['ignore_six_quark_processes'] if \3114 self.options['ignore_six_quark_processes'] if \
3107 "ignore_six_quark_processes" in self.options \3115 "ignore_six_quark_processes" in self.options \
3108 else []3116 else []
31093117 try:
3110 myproc = diagram_generation.MultiProcess(myprocdef,3118 myproc = diagram_generation.MultiProcess(myprocdef,
3111 collect_mirror_procs = collect_mirror_procs,3119 collect_mirror_procs = collect_mirror_procs,
3112 ignore_six_quark_processes = ignore_six_quark_processes,3120 ignore_six_quark_processes = ignore_six_quark_processes,
3113 optimize=optimize, diagram_filter=diagram_filter)3121 optimize=optimize, diagram_filter=diagram_filter)
31143122 except diagram_generation.NoDiagramException:
31153123 if not allow_no_diagram:
3124 raise
3125 else:
3126 logger.warning('no diagram generated. No error raised due to flag')
3127 return
3128
3116 for amp in myproc.get('amplitudes'):3129 for amp in myproc.get('amplitudes'):
3117 if amp not in self._curr_amps:3130 if amp not in self._curr_amps:
3118 self._curr_amps.append(amp)3131 self._curr_amps.append(amp)
@@ -4732,9 +4745,10 @@
4732 split_orders=list(set(perturbation_couplings_list+squared_orders.keys()))4745 split_orders=list(set(perturbation_couplings_list+squared_orders.keys()))
4733 try:4746 try:
4734 split_orders.sort(key=lambda elem: 0 if elem=='WEIGHTED' else4747 split_orders.sort(key=lambda elem: 0 if elem=='WEIGHTED' else
4735 self._curr_model['order_hierarchy']4748 self._curr_model.get('order_hierarchy')
4736 [elem if not elem.endswith('.sqrt') else elem[:-5]])4749 [elem if not elem.endswith('.sqrt') else elem[:-5]])
4737 except KeyError:4750 except KeyError:
4751 misc.sprint(self._curr_model['order_hierarchy'], self._curr_model.get('modelpath'))
4738 raise self.InvalidCmd, "The loaded model does not defined a "+\4752 raise self.InvalidCmd, "The loaded model does not defined a "+\
4739 " coupling order hierarchy for these couplings: %s"%\4753 " coupling order hierarchy for these couplings: %s"%\
4740 str([so for so in split_orders if so!='WEIGHTED' and so not 4754 str([so for so in split_orders if so!='WEIGHTED' and so not
@@ -5234,6 +5248,7 @@
5234 if os.path.sep in args[1] and "import" in self.history[-1]:5248 if os.path.sep in args[1] and "import" in self.history[-1]:
5235 self.history[-1] = 'import model %s' % self._curr_model.get('modelpath+restriction')5249 self.history[-1] = 'import model %s' % self._curr_model.get('modelpath+restriction')
52365250
5251
5237 if self.options['gauge']=='unitary':5252 if self.options['gauge']=='unitary':
5238 if not force and isinstance(self._curr_model,\5253 if not force and isinstance(self._curr_model,\
5239 loop_base_objects.LoopModel) and \5254 loop_base_objects.LoopModel) and \
@@ -5285,7 +5300,23 @@
5285 self.check_for_export_dir(args[1])5300 self.check_for_export_dir(args[1])
5286 # Execute the card5301 # Execute the card
5287 self.import_command_file(args[1])5302 self.import_command_file(args[1])
52885303 elif args[0] == 'process':
5304 if not os.path.isfile(args[1]):
5305 raise self.InvalidCmd("Path %s is not a valid pathname" % args[1])
5306 else:
5307 first = True
5308 for line in open(args[1]):
5309 line = line.split('#')[0].strip()
5310 if not line:
5311 continue
5312 if first:
5313 self.exec_cmd('generate %s' % line, precmd=True)
5314 first = False
5315 else:
5316 self.exec_cmd('add process %s' % line, precmd=True)
5317
5318
5319
5289 elif args[0] == 'banner':5320 elif args[0] == 'banner':
5290 type = madevent_interface.MadEventCmd.detect_card_type(args[1])5321 type = madevent_interface.MadEventCmd.detect_card_type(args[1])
5291 if type != 'banner':5322 if type != 'banner':
@@ -5456,8 +5487,6 @@
5456 (line.split()[0],why))5487 (line.split()[0],why))
5457 if self.history[-1] == 'define %s' % line.strip():5488 if self.history[-1] == 'define %s' % line.strip():
5458 self.history.pop(-1)5489 self.history.pop(-1)
5459 else:
5460 misc.sprint([self.history[-1], 'define %s' % line.strip()])
54615490
5462 scheme = "old"5491 scheme = "old"
5463 for qcd_container in ['p', 'j']:5492 for qcd_container in ['p', 'j']:
@@ -6011,7 +6040,7 @@
6011 else:6040 else:
6012 othersource = 'uiuc'6041 othersource = 'uiuc'
6013 # try with the mirror6042 # try with the mirror
6014 misc.sprint('try other mirror', othersource, ' '.join(args))6043 logger.debug('try other mirror', othersource, ' '.join(args))
6015 return self.do_install('%s --source=%s' % (' '.join(args), othersource), 6044 return self.do_install('%s --source=%s' % (' '.join(args), othersource),
6016 paths, additional_options) 6045 paths, additional_options)
6017 else:6046 else:
@@ -6859,7 +6888,6 @@
6859 self.check_launch(args, options)6888 self.check_launch(args, options)
6860 options = options.__dict__6889 options = options.__dict__
6861 # args is now MODE PATH6890 # args is now MODE PATH
6862
6863 if args[0].startswith('standalone'):6891 if args[0].startswith('standalone'):
6864 if os.path.isfile(os.path.join(os.getcwd(),args[1],'Cards',\6892 if os.path.isfile(os.path.join(os.getcwd(),args[1],'Cards',\
6865 'MadLoopParams.dat')) and not os.path.isfile(os.path.join(\6893 'MadLoopParams.dat')) and not os.path.isfile(os.path.join(\
68666894
=== modified file 'madgraph/interface/master_interface.py'
--- madgraph/interface/master_interface.py 2018-04-02 14:02:36 +0000
+++ madgraph/interface/master_interface.py 2019-05-23 07:08:37 +0000
@@ -272,6 +272,10 @@
272272
273 def do_import(self, *args, **opts):273 def do_import(self, *args, **opts):
274 self.cmd.do_import(self, *args, **opts)274 self.cmd.do_import(self, *args, **opts)
275 line = args[0]
276 import_mode = args[0].split()[0]
277 if import_mode in self._import_formats and not import_mode.startswith('model'):
278 return
275 if self._curr_model:279 if self._curr_model:
276 if isinstance(self._curr_model, loop_base_objects.LoopModel) and \280 if isinstance(self._curr_model, loop_base_objects.LoopModel) and \
277 self._curr_model['perturbation_couplings']!=[] and \281 self._curr_model['perturbation_couplings']!=[] and \
@@ -610,6 +614,7 @@
610 614
611 def change_principal_cmd(self, name):615 def change_principal_cmd(self, name):
612616
617
613 old_cmd=self.current_interface618 old_cmd=self.current_interface
614 if name in self.interface_names.keys():619 if name in self.interface_names.keys():
615 self.prompt= self.interface_names[name][0]+'>'620 self.prompt= self.interface_names[name][0]+'>'
616621
=== modified file 'madgraph/interface/reweight_interface.py'
--- madgraph/interface/reweight_interface.py 2019-05-09 10:05:05 +0000
+++ madgraph/interface/reweight_interface.py 2019-05-23 07:08:37 +0000
@@ -1,3 +1,4 @@
1#! /usr/bin/env python
1################################################################################2################################################################################
2#3#
3# Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors4# Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors
@@ -26,8 +27,11 @@
26import subprocess27import subprocess
27from subprocess import Popen, PIPE, STDOUT28from subprocess import Popen, PIPE, STDOUT
2829
29
30pjoin = os.path.join30pjoin = os.path.join
31if "__main__" == __name__:
32 local_path = os.path.dirname(os.path.realpath( __file__ ))
33 root_path = pjoin(local_path, '..','..')
34 sys.path.insert(0, root_path)
3135
32import madgraph.interface.extended_cmd as extended_cmd36import madgraph.interface.extended_cmd as extended_cmd
33import madgraph.interface.madgraph_interface as mg_interface37import madgraph.interface.madgraph_interface as mg_interface
@@ -66,13 +70,12 @@
66 70
67 prompt = 'Reweight>'71 prompt = 'Reweight>'
68 debug_output = 'Reweight_debug'72 debug_output = 'Reweight_debug'
69 rwgt_dir_possibility = ['rw_me','rw_me_second','rw_mevirt','rw_mevirt_second']73 #rwgt_dir_possibility = ['rw_me','rw_me_second','rw_mevirt','rw_mevirt_second']
70 74
71 @misc.mute_logger()75 @misc.mute_logger()
72 def __init__(self, event_path=None, allow_madspin=False, mother=None, *completekey, **stdin):76 def __init__(self, event_path=None, allow_madspin=False, mother=None, *completekey, **stdin):
73 """initialize the interface with potentially an event_path"""77 """initialize the interface with potentially an event_path"""
74 78
75
76 self.me_dir = os.getcwd()79 self.me_dir = os.getcwd()
77 if not event_path:80 if not event_path:
78 cmd_logger.info('************************************************************')81 cmd_logger.info('************************************************************')
@@ -95,6 +98,7 @@
95 self.f2pylib = {}98 self.f2pylib = {}
96 self.second_model = None99 self.second_model = None
97 self.second_process = None100 self.second_process = None
101 self.nb_library = 1
98 self.dedicated_path = {}102 self.dedicated_path = {}
99 self.soft_threshold = None103 self.soft_threshold = None
100 self.systematics = False # allow to run systematics in ouput2.0 mode104 self.systematics = False # allow to run systematics in ouput2.0 mode
@@ -154,6 +158,7 @@
154 if not self.lhe_input.banner:158 if not self.lhe_input.banner:
155 value = self.ask("What is the path to banner", 0, [0], "please enter a path", timeout=0)159 value = self.ask("What is the path to banner", 0, [0], "please enter a path", timeout=0)
156 self.lhe_input.banner = open(value).read()160 self.lhe_input.banner = open(value).read()
161
157 self.banner = self.lhe_input.get_banner()162 self.banner = self.lhe_input.get_banner()
158 163
159 #get original cross-section/error164 #get original cross-section/error
@@ -361,6 +366,7 @@
361 if self.has_standalone_dir:366 if self.has_standalone_dir:
362 self.terminate_fortran_executables()367 self.terminate_fortran_executables()
363 self.has_standalone_dir = False368 self.has_standalone_dir = False
369
364 if args[-1] == "--add":370 if args[-1] == "--add":
365 self.second_process.append(" ".join(args[1:-1]))371 self.second_process.append(" ".join(args[1:-1]))
366 else:372 else:
@@ -465,6 +471,16 @@
465 self.options['rwgt_name'] = opts['rwgt_name']471 self.options['rwgt_name'] = opts['rwgt_name']
466472
467 model_line = self.banner.get('proc_card', 'full_model_line')473 model_line = self.banner.get('proc_card', 'full_model_line')
474 if not self.mother and not hasattr(self, 'output'):
475 name, ext = self.lhe_input.name.rsplit('.',1)
476 target = '%s_out.%s' % (name, ext)
477
478 if os.path.exists(target) and os.path.getmtime(target) > os.path.getmtime(self.lhe_input.name):
479 nb_launch = len([1 for l in self.history if l.strip().startswith('launch')])
480 if nb_launch > 1:
481 files.mv(target, self.lhe_input.name)
482 self.exec_cmd('import %s' % self.lhe_input.name)
483
468484
469 if not self.has_standalone_dir: 485 if not self.has_standalone_dir:
470 if self.rwgt_dir and os.path.exists(pjoin(self.rwgt_dir,'rw_me','rwgt.pkl')):486 if self.rwgt_dir and os.path.exists(pjoin(self.rwgt_dir,'rw_me','rwgt.pkl')):
@@ -506,7 +522,7 @@
506 path_me = self.me_dir 522 path_me = self.me_dir
507 523
508 if self.second_model or self.second_process or self.dedicated_path:524 if self.second_model or self.second_process or self.dedicated_path:
509 rw_dir = pjoin(path_me, 'rw_me_second')525 rw_dir = pjoin(path_me, 'rw_me_%s' % self.nb_library)
510 else:526 else:
511 rw_dir = pjoin(path_me, 'rw_me')527 rw_dir = pjoin(path_me, 'rw_me')
512 528
@@ -566,7 +582,7 @@
566 if self.output_type == "default":582 if self.output_type == "default":
567 for name in weight:583 for name in weight:
568 if 'orig' in name:584 if 'orig' in name:
569 continue 585 continue
570 event.reweight_data['%s%s' % (tag_name,name)] = weight[name]586 event.reweight_data['%s%s' % (tag_name,name)] = weight[name]
571 #write this event with weight587 #write this event with weight
572 output.write(str(event))588 output.write(str(event))
@@ -583,7 +599,7 @@
583 output[(tag_name,name)].write(str(new_evt))599 output[(tag_name,name)].write(str(new_evt))
584600
585 # check normalisation of the events:601 # check normalisation of the events:
586 if 'event_norm' in self.run_card:602 if self.run_card and 'event_norm' in self.run_card:
587 if self.run_card['event_norm'] in ['average','bias']:603 if self.run_card['event_norm'] in ['average','bias']:
588 for key, value in cross.items():604 for key, value in cross.items():
589 cross[key] = value / (event_nb+1)605 cross[key] = value / (event_nb+1)
@@ -632,14 +648,16 @@
632 import madgraph.interface.madevent_interface as ME_interface648 import madgraph.interface.madevent_interface as ME_interface
633649
634 self.lhe_input.close()650 self.lhe_input.close()
635 if not self.mother:651 if hasattr(self, 'output_path'):
652 target = self.output_path
653 elif not self.mother:
636 name, ext = self.lhe_input.name.rsplit('.',1)654 name, ext = self.lhe_input.name.rsplit('.',1)
637 target = '%s_out.%s' % (name, ext) 655 target = '%s_out.%s' % (name, ext)
638 elif self.output_type != "default" :656 elif self.output_type != "default" :
639 target = pjoin(self.mother.me_dir, 'Events', run_name, 'events.lhe')657 target = pjoin(self.mother.me_dir, 'Events', run_name, 'events.lhe')
640 else:658 else:
641 target = self.lhe_input.name659 target = self.lhe_input.name
642 660
643 if self.output_type == "default":661 if self.output_type == "default":
644 files.mv(output.name, target)662 files.mv(output.name, target)
645 logger.info('Event %s have now the additional weight' % self.lhe_input.name)663 logger.info('Event %s have now the additional weight' % self.lhe_input.name)
@@ -694,7 +712,7 @@
694 path_me = self.me_dir 712 path_me = self.me_dir
695 713
696 if self.second_model or self.second_process or self.dedicated_path:714 if self.second_model or self.second_process or self.dedicated_path:
697 rw_dir = pjoin(path_me, 'rw_me_second')715 rw_dir = pjoin(path_me, 'rw_me_%s' % self.nb_library)
698 else:716 else:
699 rw_dir = pjoin(path_me, 'rw_me')717 rw_dir = pjoin(path_me, 'rw_me')
700 718
@@ -713,6 +731,8 @@
713 files.ln(ff.name, starting_dir=pjoin(path_me, 'rw_mevirt', 'Cards'))731 files.ln(ff.name, starting_dir=pjoin(path_me, 'rw_mevirt', 'Cards'))
714 cmd = common_run_interface.CommonRunCmd.ask_edit_card_static(cards=['param_card.dat'],732 cmd = common_run_interface.CommonRunCmd.ask_edit_card_static(cards=['param_card.dat'],
715 ask=self.ask, pwd=rw_dir, first_cmd=self.stored_line)733 ask=self.ask, pwd=rw_dir, first_cmd=self.stored_line)
734
735
716 self.stored_line = None736 self.stored_line = None
717 737
718 # check for potential scan in the new card 738 # check for potential scan in the new card
@@ -751,9 +771,8 @@
751 blockpat = re.compile(r'''<weightgroup name=\'mg_reweighting\'\s*weight_name_strategy=\'includeIdInWeightName\'>(?P<text>.*?)</weightgroup>''', re.I+re.M+re.S)771 blockpat = re.compile(r'''<weightgroup name=\'mg_reweighting\'\s*weight_name_strategy=\'includeIdInWeightName\'>(?P<text>.*?)</weightgroup>''', re.I+re.M+re.S)
752 before, content, after = blockpat.split(self.banner['initrwgt'])772 before, content, after = blockpat.split(self.banner['initrwgt'])
753 header_rwgt_other = before + after773 header_rwgt_other = before + after
754 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)774 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)
755 mg_rwgt_info = pattern.findall(content)775 mg_rwgt_info = pattern.findall(content)
756
757 maxid = 0776 maxid = 0
758 for k,(i, fulltag, nlotype, diff) in enumerate(mg_rwgt_info):777 for k,(i, fulltag, nlotype, diff) in enumerate(mg_rwgt_info):
759 if i:778 if i:
@@ -796,12 +815,21 @@
796 else:815 else:
797 tag = str(rewgtid)816 tag = str(rewgtid)
798 817
818 version = misc.get_pkg_info()['version']
819 try:
820 model_version = self.mg5cmd._curr_model['model_info']['version']
821 except TypeError:
822 model_version = '0.0.0'
823 str_version = "<weight_generator>MG5aMC_v%s</weight_generator>\n<weight_model_version>%s</weight_model_version>" %\
824 (version, model_version)
825
799 if not self.second_model and not self.dedicated_path:826 if not self.second_model and not self.dedicated_path:
800 old_param = check_param_card.ParamCard(s_orig.splitlines())827 old_param = check_param_card.ParamCard(s_orig.splitlines())
801 new_param = self.new_param_card828 new_param = self.new_param_card
802 card_diff = old_param.create_diff(new_param)829 card_diff = old_param.create_diff(new_param)
803 if card_diff == '' and not self.second_process:830 if card_diff == '' and not self.second_process:
804 logger.warning(' REWEIGHTING: original card and new card are identical.')831 logger.warning(' REWEIGHTING: original card and new card are identical.')
832 card_diff = "%s\n<weight_slha>%s</weight_slha>" % (str_version,card_diff)
805 try:833 try:
806 if old_param['sminputs'].get(3)- new_param['sminputs'].get(3) > 1e-3 * new_param['sminputs'].get(3):834 if old_param['sminputs'].get(3)- new_param['sminputs'].get(3) > 1e-3 * new_param['sminputs'].get(3):
807 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.")835 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.")
@@ -813,6 +841,7 @@
813 mg_rwgt_info.append((tag, name, card_diff))841 mg_rwgt_info.append((tag, name, card_diff))
814 else:842 else:
815 str_proc = "\n change process ".join([""]+self.second_process)843 str_proc = "\n change process ".join([""]+self.second_process)
844 str_proc = "\n<weight_card>\n%s\n</weight_card>\n"
816 for name in type_rwgt:845 for name in type_rwgt:
817 mg_rwgt_info.append((tag, name, str_proc + '\n'+ card_diff))846 mg_rwgt_info.append((tag, name, str_proc + '\n'+ card_diff))
818 else:847 else:
@@ -825,8 +854,8 @@
825 if self.dedicated_path:854 if self.dedicated_path:
826 for k,v in self.dedicated_path.items():855 for k,v in self.dedicated_path.items():
827 str_info += "\n change %s %s" % (k,v)856 str_info += "\n change %s %s" % (k,v)
828 card_diff = str_info857 card_diff = '<weight_slha>\n%s\n</weight_slha>' % str_info
829 str_info += '\n' + s_new858 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)
830 for name in type_rwgt:859 for name in type_rwgt:
831 mg_rwgt_info.append((tag, name, str_info))860 mg_rwgt_info.append((tag, name, str_info))
832 # re-create the banner.861 # re-create the banner.
@@ -846,8 +875,11 @@
846 self.banner['initrwgt'] = self.banner['initrwgt'].replace('\n\n', '\n')875 self.banner['initrwgt'] = self.banner['initrwgt'].replace('\n\n', '\n')
847876
848 logger.info('starts to compute weight for events with the following modification to the param_card:')877 logger.info('starts to compute weight for events with the following modification to the param_card:')
849 logger.info(card_diff.replace('\n','\nKEEP:'))878 #logger.info(card_diff.replace('\n','\nKEEP:'))
850 self.run_card = banner.Banner(self.banner).charge_card('run_card')879 try:
880 self.run_card = banner.Banner(self.banner).charge_card('run_card')
881 except Exception:
882 self.run_card = None
851883
852 if self.options['rwgt_name']:884 if self.options['rwgt_name']:
853 tag_name = self.options['rwgt_name']885 tag_name = self.options['rwgt_name']
@@ -858,7 +890,7 @@
858 for (path,tag), module in self.f2pylib.items():890 for (path,tag), module in self.f2pylib.items():
859 with misc.chdir(pjoin(os.path.dirname(rw_dir), path)):891 with misc.chdir(pjoin(os.path.dirname(rw_dir), path)):
860 with misc.stdchannel_redirected(sys.stdout, os.devnull):892 with misc.stdchannel_redirected(sys.stdout, os.devnull):
861 if 'second' in path or tag == 3:893 if 'rw_me_' in path or tag == 3:
862 module.initialise(pjoin(rw_dir, 'Cards', 'param_card.dat'))894 module.initialise(pjoin(rw_dir, 'Cards', 'param_card.dat'))
863 else:895 else:
864 module.initialise(pjoin(path_me, 'rw_me', 'Cards', 'param_card_orig.dat'))896 module.initialise(pjoin(path_me, 'rw_me', 'Cards', 'param_card_orig.dat'))
@@ -986,6 +1018,7 @@
986 misc.sprint(nhel, Pdir, hel_dict) 1018 misc.sprint(nhel, Pdir, hel_dict)
987 raise Exception, "Invalid matrix element for original computation (weight=0)"1019 raise Exception, "Invalid matrix element for original computation (weight=0)"
9881020
1021
989 return {'orig': orig_wgt, '': w_new/w_orig*orig_wgt*jac}1022 return {'orig': orig_wgt, '': w_new/w_orig*orig_wgt*jac}
990 1023
991 def calculate_nlo_weight(self, event):1024 def calculate_nlo_weight(self, event):
@@ -1158,14 +1191,20 @@
1158 if (not self.second_model and not self.second_process and not self.dedicated_path) or hypp_id==0:1191 if (not self.second_model and not self.second_process and not self.dedicated_path) or hypp_id==0:
1159 orig_order, Pdir, hel_dict = self.id_to_path[tag]1192 orig_order, Pdir, hel_dict = self.id_to_path[tag]
1160 else:1193 else:
1161 orig_order, Pdir, hel_dict = self.id_to_path_second[tag] 1194 if tag in self.id_to_path_second:
1195 orig_order, Pdir, hel_dict = self.id_to_path_second[tag]
1196 else:
1197 return 0.0
1162 1198
1163 base = os.path.basename(os.path.dirname(Pdir))1199 base = os.path.basename(os.path.dirname(Pdir))
1164 if '_second' in base:1200 if base == 'rw_me':
1201 moduletag = (base, 2+hypp_id)
1202 else:
1165 moduletag = (base, 2)1203 moduletag = (base, 2)
1166 else:1204
1167 moduletag = (base, 2+hypp_id)1205
1168 1206
1207
1169 module = self.f2pylib[moduletag]1208 module = self.f2pylib[moduletag]
11701209
1171 p = event.get_momenta(orig_order)1210 p = event.get_momenta(orig_order)
@@ -1175,7 +1214,7 @@
1175 if self.helicity_reweighting and 9 not in hel_order:1214 if self.helicity_reweighting and 9 not in hel_order:
1176 nhel = hel_dict[tuple(hel_order)] 1215 nhel = hel_dict[tuple(hel_order)]
1177 else:1216 else:
1178 nhel = -11217 nhel = -2
1179 1218
1180 # For 2>N pass in the center of mass frame1219 # For 2>N pass in the center of mass frame
1181 # - required for helicity by helicity re-weighitng1220 # - required for helicity by helicity re-weighitng
@@ -1193,8 +1232,12 @@
11931232
1194 with misc.chdir(Pdir):1233 with misc.chdir(Pdir):
1195 with misc.stdchannel_redirected(sys.stdout, os.devnull):1234 with misc.stdchannel_redirected(sys.stdout, os.devnull):
1196 me_value = module.smatrixhel(pdg,p, event.aqcd, scale2, nhel)1235 if hasattr(event, 'ievent'):
1197 1236 ievent = event.ievent
1237 else:
1238 ievent = -1
1239 me_value = module.smatrixhel(pdg, ievent, p, event.aqcd, scale2, nhel)
1240
1198 # for loop we have also the stability status code1241 # for loop we have also the stability status code
1199 if isinstance(me_value, tuple):1242 if isinstance(me_value, tuple):
1200 me_value, code = me_value1243 me_value, code = me_value
@@ -1202,7 +1245,7 @@
1202 hundred_value = (code % 1000) //1001245 hundred_value = (code % 1000) //100
1203 if hundred_value in [4]:1246 if hundred_value in [4]:
1204 me_value = 0.1247 me_value = 0.
1205 1248
1206 return me_value1249 return me_value
1207 1250
1208 def terminate_fortran_executables(self, new_card_only=False):1251 def terminate_fortran_executables(self, new_card_only=False):
@@ -1308,10 +1351,13 @@
1308 nlo_order = nlo_order.replace('noborn', 'virt')1351 nlo_order = nlo_order.replace('noborn', 'virt')
1309 commandline += "add process %s [%s] %s;" % (base,nlo_order,post)1352 commandline += "add process %s [%s] %s;" % (base,nlo_order,post)
1310 commandline = commandline.replace('add process', 'generate',1)1353 commandline = commandline.replace('add process', 'generate',1)
1311 logger.info("RETRY with %s", commandline)1354 if commandline:
1312 mgcmd.exec_cmd(commandline, precmd=True)1355 logger.info("RETRY with %s", commandline)
1313 has_nlo = False1356 mgcmd.exec_cmd(commandline, precmd=True)
1357 has_nlo = False
1314 except Exception, error:1358 except Exception, error:
1359 misc.sprint(mgcmd._curr_model.get('modelpath'))
1360 misc.sprint(type(error))
1315 raise1361 raise
1316 1362
1317 commandline = 'output standalone_rw %s --prefix=int' % pjoin(path_me,data['paths'][0])1363 commandline = 'output standalone_rw %s --prefix=int' % pjoin(path_me,data['paths'][0])
@@ -1504,7 +1550,13 @@
1504 #self.id_to_path = {}1550 #self.id_to_path = {}
1505 #data['id2path'] = self.id_to_path1551 #data['id2path'] = self.id_to_path
1506 else:1552 else:
1507 data['paths'] = ['rw_me_second', 'rw_mevirt_second']1553 for key in self.f2pylib.keys():
1554 if 'rw_me_%s' % self.nb_library in key[0]:
1555 del self.f2pylib[key]
1556
1557
1558 self.nb_library += 1
1559 data['paths'] = ['rw_me_%s' % self.nb_library, 'rw_mevirt_%s' % self.nb_library]
1508 # model1560 # model
1509 if self.second_model:1561 if self.second_model:
1510 data['mg_names'] = True1562 data['mg_names'] = True
@@ -1536,14 +1588,19 @@
1536 else:1588 else:
1537 path_me = self.rwgt_dir1589 path_me = self.rwgt_dir
1538 data['path'] = path_me1590 data['path'] = path_me
1539 try:1591 for i in range(2):
1540 shutil.rmtree(pjoin(path_me,data['paths'][0]))1592 pdir = pjoin(path_me,data['paths'][i])
1541 except Exception: 1593 if os.path.exists(pdir):
1542 pass1594 try:
1543 try:1595 shutil.rmtree(pjoin(path_me,data['paths'][0]))
1544 shutil.rmtree(pjoin(path_me, data['paths'][1]))1596 except Exception, error:
1545 except Exception: 1597 misc.sprint(error)
1546 pass1598 pass
1599
1600
1601
1602
1603
15471604
1548 # 1. prepare the interface----------------------------------------------1605 # 1. prepare the interface----------------------------------------------
1549 mgcmd = self.mg5cmd1606 mgcmd = self.mg5cmd
@@ -1691,12 +1748,16 @@
1691 path_me = self.me_dir1748 path_me = self.me_dir
1692 else:1749 else:
1693 path_me = self.rwgt_dir1750 path_me = self.rwgt_dir
1694 for onedir in self.rwgt_dir_possibility:1751
1752 rwgt_dir_possibility = ['rw_me','rw_me_%s' % self.nb_library,'rw_mevirt','rw_mevirt_%s' % self.nb_library]
1753 for onedir in rwgt_dir_possibility:
1695 if not os.path.isdir(pjoin(path_me,onedir)):1754 if not os.path.isdir(pjoin(path_me,onedir)):
1696 continue1755 continue
1697 pdir = pjoin(path_me, onedir, 'SubProcesses')1756 pdir = pjoin(path_me, onedir, 'SubProcesses')
1698 if self.mother:1757 if self.mother:
1699 nb_core = self.mother.options['nb_core'] if self.mother.options['run_mode'] !=0 else 11758 nb_core = self.mother.options['nb_core'] if self.mother.options['run_mode'] !=0 else 1
1759 elif hasattr(self, 'nb_core'):
1760 nb_core = self.nb_core
1700 else:1761 else:
1701 nb_core = 11762 nb_core = 1
1702 os.environ['MENUM'] = '2'1763 os.environ['MENUM'] = '2'
@@ -1715,7 +1776,8 @@
1715 1776
1716 self.id_to_path = {}1777 self.id_to_path = {}
1717 self.id_to_path_second = {}1778 self.id_to_path_second = {}
1718 for onedir in self.rwgt_dir_possibility:1779 rwgt_dir_possibility = ['rw_me','rw_me_%s' % self.nb_library,'rw_mevirt','rw_mevirt_%s' % self.nb_library]
1780 for onedir in rwgt_dir_possibility:
1719 if not os.path.exists(pjoin(path_me,onedir)):1781 if not os.path.exists(pjoin(path_me,onedir)):
1720 continue 1782 continue
1721 pdir = pjoin(path_me, onedir, 'SubProcesses')1783 pdir = pjoin(path_me, onedir, 'SubProcesses')
@@ -1724,14 +1786,18 @@
1724 mod_name = '%s.SubProcesses.allmatrix%spy' % (onedir, tag)1786 mod_name = '%s.SubProcesses.allmatrix%spy' % (onedir, tag)
1725 #mymod = __import__('%s.SubProcesses.allmatrix%spy' % (onedir, tag), globals(), locals(), [],-1)1787 #mymod = __import__('%s.SubProcesses.allmatrix%spy' % (onedir, tag), globals(), locals(), [],-1)
1726 if mod_name in sys.modules.keys():1788 if mod_name in sys.modules.keys():
1789# if 'rw_me_' in mod_name:
1790# raise Exception
1727 del sys.modules[mod_name]1791 del sys.modules[mod_name]
1728 tmp_mod_name = mod_name1792 tmp_mod_name = mod_name
1729 while '.' in tmp_mod_name:1793 while '.' in tmp_mod_name:
1730 tmp_mod_name = tmp_mod_name.rsplit('.',1)[0]1794 tmp_mod_name = tmp_mod_name.rsplit('.',1)[0]
1731 del sys.modules[tmp_mod_name]1795 del sys.modules[tmp_mod_name]
1732 mymod = __import__(mod_name, globals(), locals(), [],-1) 1796 mymod = __import__(mod_name, globals(), locals(), [],-1)
1797 reload(mymod)
1733 else:1798 else:
1734 mymod = __import__(mod_name, globals(), locals(), [],-1) 1799 mymod = __import__(mod_name, globals(), locals(), [],-1)
1800
1735 1801
1736 S = mymod.SubProcesses1802 S = mymod.SubProcesses
1737 mymod = getattr(S, 'allmatrix%spy' % tag)1803 mymod = getattr(S, 'allmatrix%spy' % tag)
@@ -1744,12 +1810,16 @@
1744 break1810 break
17451811
1746 data = self.id_to_path1812 data = self.id_to_path
1747 if '_second' in onedir:1813 if onedir not in ["rw_me", "rw_mevirt"]:
1748 data = self.id_to_path_second1814 data = self.id_to_path_second
17491815
1816
1817
1750 # get all the information1818 # get all the information
1751 all_pdgs = mymod.get_pdg_order()1819 all_pdgs = mymod.get_pdg_order()
1752 all_pdgs = [[pdg for pdg in pdgs if pdg!=0] for pdgs in mymod.get_pdg_order()]1820 allids, all_pids = mymod.get_pdg_order()
1821 all_pdgs = [[pdg for pdg in pdgs if pdg!=0] for pdgs in allids]
1822 #all_pids = [pid for (pdgs, pid) in allids]
1753 all_prefix = [''.join(j).strip().lower() for j in mymod.get_prefix()]1823 all_prefix = [''.join(j).strip().lower() for j in mymod.get_prefix()]
1754 prefix_set = set(all_prefix)1824 prefix_set = set(all_prefix)
17551825
@@ -1772,7 +1842,7 @@
1772 misc.sprint(os.path.exists(pjoin(path_me,onedir,'SubProcesses','MadLoop5_resources', '%sHelConfigs.dat' % prefix.upper())))1842 misc.sprint(os.path.exists(pjoin(path_me,onedir,'SubProcesses','MadLoop5_resources', '%sHelConfigs.dat' % prefix.upper())))
1773 continue1843 continue
17741844
1775 for i,pdg in enumerate(all_pdgs):1845 for i,(pdg,pid) in enumerate(zip(all_pdgs,all_pids)):
1776 if self.is_decay:1846 if self.is_decay:
1777 incoming = [pdg[0]]1847 incoming = [pdg[0]]
1778 outgoing = pdg[1:]1848 outgoing = pdg[1:]
@@ -1785,7 +1855,7 @@
1785 outgoing.sort()1855 outgoing.sort()
1786 tag = (tuple(incoming), tuple(outgoing))1856 tag = (tuple(incoming), tuple(outgoing))
1787 if 'virt' in onedir:1857 if 'virt' in onedir:
1788 tag = (tag, 'V')1858 tag = (tag, 'V')
1789 prefix = all_prefix[i]1859 prefix = all_prefix[i]
1790 hel = hel_dict[prefix]1860 hel = hel_dict[prefix]
1791 if tag in data:1861 if tag in data:
@@ -1907,10 +1977,111 @@
1907 1977
1908 1978
1909 1979
1910 1980if "__main__" == __name__:
19111981 # Check if optimize mode is (and should be) activated
19121982 import optparse
19131983 # Write out nice usage message if called with -h or --help
19141984 usage = "usage: %prog [options] [FILE] "
19151985 parser = optparse.OptionParser(usage=usage)
1916 1986 parser.add_option("-l", "--logging", default='INFO',
1987 help="logging level (DEBUG|INFO|WARNING|ERROR|CRITICAL) [%default]")
1988 parser.add_option("-f", "--file", default='',
1989 help="Use script file FILE")
1990 parser.add_option("-d", "--mgme_dir", default='', dest = 'mgme_dir',
1991 help="Use MG_ME directory MGME_DIR")
1992 parser.add_option("","--debug", action="store_true", default=False, dest='debug', \
1993 help='force to launch debug mode')
1994 (options, args) = parser.parse_args()
1995 if len(args) == 0:
1996 args = ''
1997
1998 if __debug__ and not options.debug and \
1999 (not os.path.exists(os.path.join(root_path, 'bin','create_release.py'))):
2000 subprocess.call([sys.executable] + ['-O'] + sys.argv)
2001 sys.exit()
2002
2003
2004 import logging
2005 import logging.config
2006 import madgraph.interface.coloring_logging
2007
2008 try:
2009 import readline
2010 except ImportError:
2011 try:
2012 import pyreadline as readline
2013 except:
2014 print "For tab completion and history, install module readline."
2015 else:
2016 import rlcompleter
2017
2018 if 'r261:67515' in sys.version and 'GCC 4.2.1 (Apple Inc. build 5646)' in sys.version:
2019 readline.parse_and_bind("bind ^I rl_complete")
2020 readline.__doc__ = 'libedit'
2021
2022 elif hasattr(readline, '__doc__'):
2023 if 'libedit' not in readline.__doc__:
2024 readline.parse_and_bind("tab: complete")
2025 else:
2026 readline.parse_and_bind("bind ^I rl_complete")
2027 else:
2028 readline.__doc__ = 'GNU'
2029 readline.parse_and_bind("tab: complete")
2030
2031 # charge history file
2032 try:
2033 history_file = os.path.join(os.environ['HOME'], '.mg5', 'rwgthistory')
2034 readline.read_history_file(history_file)
2035 except:
2036 pass
2037
2038 try:
2039 import psyco
2040 psyco.full()
2041 except:
2042 pass
2043
2044 try:
2045 if __debug__ and options.logging == 'INFO':
2046 options.logging = 'DEBUG'
2047 logging.config.fileConfig(os.path.join(root_path, 'madgraph', 'interface', '.mg5_logging.conf'))
2048 logging.root.setLevel(eval('logging.' + options.logging))
2049 logging.getLogger('madgraph').setLevel(eval('logging.' + options.logging))
2050 logging.getLogger('madevent').setLevel(eval('logging.' + options.logging))
2051 except:
2052 pass
2053
2054 # Call the cmd interface main loop
2055 try:
2056 if options.file or args:
2057 # They are an input file
2058 if args:
2059 input_file = os.path.realpath(args[0])
2060 else:
2061 input_file = os.path.realpath(options.file)
2062 print "using input+file", input_file
2063 cmd_line = ReweightInterface()
2064 cmd_line.use_rawinput = False
2065 cmd_line.haspiping = False
2066 cmd_line.import_command_file(input_file)
2067 cmd_line.run_cmd('quit')
2068 else:
2069 # Interactive mode
2070 try:
2071 cmd_line = ReweightInterface()
2072 cmd_line.use_rawinput = True
2073 cmd_line.cmdloop()
2074 except:
2075 pass
2076 try:
2077 cmd_line.exec_cmd('quit all', printcmd=False)
2078 readline.set_history_length(100)
2079 if not os.path.exists(os.path.join(os.environ['HOME'], '.mg5')):
2080 os.mkdir(os.path.join(os.environ['HOME'], '.mg5'))
2081 readline.write_history_file(history_file)
2082 except Exception, error:
2083 pass
2084 except KeyboardInterrupt:
2085 print 'writting history and quit on KeyboardInterrupt'
2086 pass
2087
19172088
=== modified file 'madgraph/iolibs/export_v4.py'
--- madgraph/iolibs/export_v4.py 2018-12-22 20:33:20 +0000
+++ madgraph/iolibs/export_v4.py 2019-05-23 07:08:37 +0000
@@ -2066,17 +2066,18 @@
2066 2066
2067 template = """2067 template = """
2068%(python_information)s2068%(python_information)s
2069 subroutine smatrixhel(pdgs, npdg, p, ALPHAS, SCALE2, nhel, ANS)2069 subroutine smatrixhel(pdgs, procid, npdg, p, ALPHAS, SCALE2, nhel, ANS)
2070 IMPLICIT NONE2070 IMPLICIT NONE
20712071
2072CF2PY double precision, intent(in), dimension(0:3,npdg) :: p2072CF2PY double precision, intent(in), dimension(0:3,npdg) :: p
2073CF2PY integer, intent(in), dimension(npdg) :: pdgs2073CF2PY integer, intent(in), dimension(npdg) :: pdgs
2074CF2PY integer, intent(in):: procid
2074CF2PY integer, intent(in) :: npdg2075CF2PY integer, intent(in) :: npdg
2075CF2PY double precision, intent(out) :: ANS2076CF2PY double precision, intent(out) :: ANS
2076CF2PY double precision, intent(in) :: ALPHAS2077CF2PY double precision, intent(in) :: ALPHAS
2077CF2PY double precision, intent(in) :: SCALE22078CF2PY double precision, intent(in) :: SCALE2
2078 integer pdgs(*)2079 integer pdgs(*)
2079 integer npdg, nhel2080 integer npdg, nhel, procid
2080 double precision p(*)2081 double precision p(*)
2081 double precision ANS, ALPHAS, PI,SCALE22082 double precision ANS, ALPHAS, PI,SCALE2
2082 include 'coupl.inc'2083 include 'coupl.inc'
@@ -2084,7 +2085,7 @@
2084 PI = 3.141592653589793D02085 PI = 3.141592653589793D0
2085 G = 2* DSQRT(ALPHAS*PI)2086 G = 2* DSQRT(ALPHAS*PI)
2086 CALL UPDATE_AS_PARAM()2087 CALL UPDATE_AS_PARAM()
2087 if (scale2.ne.0d0) stop 12088 1 if (scale2.ne.0d0) stop 1
20882089
2089%(smatrixhel)s2090%(smatrixhel)s
20902091
@@ -2100,12 +2101,31 @@
2100 RETURN2101 RETURN
2101 END2102 END
21022103
2103 subroutine get_pdg_order(PDG)2104 subroutine get_nincoming(pdgs, procid, npdg, N)
2105 IMPLICIT NONE
2106CF2PY integer, intent(in), dimension(npdg) :: pdgs
2107CF2PY integer, intent(in):: procid
2108CF2PY integer, intent(in) :: npdg
2109CF2PY INTEGER, intent(out) :: N
2110 integer pdgs(*)
2111 integer npdg, procid
2112 INTEGER N
2113 %(nincoming)s
2114 return
2115 end
2116
2117 subroutine get_pdg_order(PDG, PID)
2104 IMPLICIT NONE2118 IMPLICIT NONE
2105CF2PY INTEGER, intent(out) :: PDG(%(nb_me)i,%(maxpart)i) 2119CF2PY INTEGER, intent(out) :: PDG(%(nb_me)i,%(maxpart)i)
2106 INTEGER PDG(%(nb_me)i,%(maxpart)i), PDGS(%(nb_me)i,%(maxpart)i)2120CF2PY INTEGER, intent(out) :: PID(%(nb_me)i)
2121
2122 INTEGER PDG(%(nb_me)i,%(maxpart)i), PDGS(%(nb_me)i,%(maxpart)i)
2123 INTEGER PID(%(nb_me)i),PIDs(%(nb_me)i)
2107 DATA PDGS/ %(pdgs)s /2124 DATA PDGS/ %(pdgs)s /
2125 DATA PIDS/ %(pids)s /
2126
2108 PDG = PDGS2127 PDG = PDGS
2128 PID = PIDS
2109 RETURN2129 RETURN
2110 END 2130 END
21112131
@@ -2123,43 +2143,58 @@
2123 2143
2124 allids = self.prefix_info.keys()2144 allids = self.prefix_info.keys()
2125 allprefix = [self.prefix_info[key][0] for key in allids]2145 allprefix = [self.prefix_info[key][0] for key in allids]
2126 min_nexternal = min([len(ids) for ids in allids])2146 min_nexternal = min([len(ids[0]) for ids in allids])
2127 max_nexternal = max([len(ids) for ids in allids])2147 max_nexternal = max([len(ids[0]) for ids in allids])
21282148
2129 info = []2149 info = []
2130 for key, (prefix, tag) in self.prefix_info.items():2150 for (key, pid), (prefix, tag) in self.prefix_info.items():
2131 info.append('#PY %s : %s # %s' % (tag, key, prefix))2151 info.append('#PY %s : %s # %s %s' % (tag, key, prefix, pid))
2132
21332152
2134 text = []2153 text = []
2154 text_incomming = []
2135 for n_ext in range(min_nexternal, max_nexternal+1):2155 for n_ext in range(min_nexternal, max_nexternal+1):
2136 current = [ids for ids in allids if len(ids)==n_ext]2156 current_id = [ids[0] for ids in allids if len(ids[0])==n_ext]
2137 if not current:2157 current_pid = [ids[1] for ids in allids if len(ids[0])==n_ext]
2158 if not current_id:
2138 continue2159 continue
2139 if min_nexternal != max_nexternal:2160 if min_nexternal != max_nexternal:
2140 if n_ext == min_nexternal:2161 if n_ext == min_nexternal:
2141 text.append(' if (npdg.eq.%i)then' % n_ext)2162 text.append(' if (npdg.eq.%i)then' % n_ext)
2163 text_incomming.append(' if (npdg.eq.%i)then' % n_ext)
2142 else:2164 else:
2143 text.append(' else if (npdg.eq.%i)then' % n_ext)2165 text.append(' else if (npdg.eq.%i)then' % n_ext)
2144 for ii,pdgs in enumerate(current):2166 text_incomming.append(' else if (npdg.eq.%i)then' % n_ext)
2167 for ii,pdgs in enumerate(current_id):
2168 pid = current_pid[ii]
2169 #misc.sprint([(i,pdg) for i,pdg in pdgs])
2145 condition = '.and.'.join(['%i.eq.pdgs(%i)' %(pdg, i+1) for i, pdg in enumerate(pdgs)])2170 condition = '.and.'.join(['%i.eq.pdgs(%i)' %(pdg, i+1) for i, pdg in enumerate(pdgs)])
2146 if ii==0:2171 if ii==0:
2147 text.append( ' if(%s) then ! %i' % (condition, i))2172 text.append( ' if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition, pid, i))
2173 text_incomming.append( ' if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition, pid, i))
2148 else:2174 else:
2149 text.append( ' else if(%s) then ! %i' % (condition,i))2175 text.append( ' else if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition,pid,i))
2150 text.append(' call %ssmatrixhel(p, nhel, ans)' % self.prefix_info[pdgs][0])2176 text_incomming.append( ' else if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition,pid,i))
2177 text.append(' call %ssmatrixhel(p, nhel, ans)' % self.prefix_info[(pdgs,pid)][0])
2178 text_incomming.append(' N=%i' % len(tag[0]))
2179 text.append( ' else if(procid.gt.0) then !')
2180 text.append( ' procid = -1' )
2181 text.append( ' goto 1' )
2151 text.append(' endif')2182 text.append(' endif')
2183 text_incomming.append(' endif')
2152 #close the function2184 #close the function
2153 if min_nexternal != max_nexternal:2185 if min_nexternal != max_nexternal:
2154 text.append('endif')2186 text.append('endif')
2187 text_incomming.append(' endif')
21552188
2156 formatting = {'python_information':'\n'.join(info), 2189 formatting = {'python_information':'\n'.join(info),
2157 'smatrixhel': '\n'.join(text),2190 'smatrixhel': '\n'.join(text),
2158 'maxpart': max_nexternal,2191 'maxpart': max_nexternal,
2159 'nb_me': len(allids),2192 'nb_me': len(allids),
2160 'pdgs': ','.join(str(pdg[i]) if i<len(pdg) else '0' 2193 'pdgs': ','.join(str(pdg[i]) if i<len(pdg) else '0'
2161 for i in range(max_nexternal) for pdg in allids),2194 for i in range(max_nexternal) for (pdg,pid) in allids),
2162 'prefix':'\',\''.join(allprefix)2195 'prefix':'\',\''.join(allprefix),
2196 'pids': ','.join(str(pid) for (pdg,pid) in allids),
2197 'nincoming':'\n'.join(text_incomming)
2163 }2198 }
2164 formatting['lenprefix'] = len(formatting['prefix'])2199 formatting['lenprefix'] = len(formatting['prefix'])
2165 text = template % formatting2200 text = template % formatting
@@ -2257,7 +2292,7 @@
2257 raise Exception, '--prefix options supports only \'int\' and \'proc\''2292 raise Exception, '--prefix options supports only \'int\' and \'proc\''
2258 for proc in matrix_element.get('processes'):2293 for proc in matrix_element.get('processes'):
2259 ids = [l.get('id') for l in proc.get('legs_with_decays')]2294 ids = [l.get('id') for l in proc.get('legs_with_decays')]
2260 self.prefix_info[tuple(ids)] = [proc_prefix, proc.get_tag()] 2295 self.prefix_info[(tuple(ids), proc.get('id'))] = [proc_prefix, proc.get_tag()]
2261 2296
2262 calls = self.write_matrix_element_v4(2297 calls = self.write_matrix_element_v4(
2263 writers.FortranWriter(filename),2298 writers.FortranWriter(filename),
@@ -2509,6 +2544,7 @@
2509 else:2544 else:
2510 matrix_template = "matrix_standalone_splitOrders_v4.inc"2545 matrix_template = "matrix_standalone_splitOrders_v4.inc"
25112546
2547
2512 replace_dict['template_file'] = pjoin(_file_path, 'iolibs', 'template_files', matrix_template)2548 replace_dict['template_file'] = pjoin(_file_path, 'iolibs', 'template_files', matrix_template)
2513 replace_dict['template_file2'] = pjoin(_file_path, \2549 replace_dict['template_file2'] = pjoin(_file_path, \
2514 'iolibs/template_files/split_orders_helping_functions.inc')2550 'iolibs/template_files/split_orders_helping_functions.inc')
@@ -5688,8 +5724,14 @@
5688 else:5724 else:
5689 load_card = ''5725 load_card = ''
5690 lha_read_filename='lha_read.f'5726 lha_read_filename='lha_read.f'
5691 cp( MG5DIR + '/models/template_files/fortran/' + lha_read_filename, \5727
5692 os.path.join(self.dir_path,'lha_read.f'))5728 nb_para= len(self.params_dep + self.params_indep + self.params_ext)
5729 template = pjoin(MG5DIR, 'models', 'template_files', 'fortran', lha_read_filename)
5730 open(os.path.join(self.dir_path,'lha_read.f'),'w').write(
5731 open(template).read() % {'maxpara':nb_para})
5732
5733 #cp( MG5DIR + '/models/template_files/fortran/' + lha_read_filename, \
5734 # os.path.join(self.dir_path,'lha_read.f'))
5693 5735
5694 file=file%{'includes':'\n '.join(includes),5736 file=file%{'includes':'\n '.join(includes),
5695 'load_card':load_card}5737 'load_card':load_card}
56965738
=== modified file 'madgraph/iolibs/template_files/loop/loop_matrix_standalone.inc'
--- madgraph/iolibs/template_files/loop/loop_matrix_standalone.inc 2017-04-25 14:47:44 +0000
+++ madgraph/iolibs/template_files/loop/loop_matrix_standalone.inc 2019-05-23 07:08:37 +0000
@@ -448,7 +448,7 @@
448C Make sure that lorentz rotation tests are not used if there is external loop wavefunction of spin 2 and that one specific helicity is asked448C 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
449NROTATIONS_DP_BU = NROTATIONS_DP449NROTATIONS_DP_BU = NROTATIONS_DP
450NROTATIONS_QP_BU = NROTATIONS_QP450NROTATIONS_QP_BU = NROTATIONS_QP
451if(MAX_SPIN_EXTERNAL_PARTICLE.gt.3.AND.USERHEL.NE.-1) THEN451if(MAX_SPIN_EXTERNAL_PARTICLE.gt.3.AND.USERHEL.GT.-1) THEN
452 if(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN452 if(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
453 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.'453 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.'
454 WRITE(*,*) '##WARNING: As a result, MadLoop disabled the Lorentz rotation test for this phase-space point only.'454 WRITE(*,*) '##WARNING: As a result, MadLoop disabled the Lorentz rotation test for this phase-space point only.'
@@ -481,7 +481,7 @@
481 ENDDO481 ENDDO
482101 CONTINUE482101 CONTINUE
483CLOSE(1)483CLOSE(1)
484IF (HelicityFilterLevel.eq.0) then484IF (HelicityFilterLevel.eq.0.or.userhel.eq.-2) then
485 FOUNDHELFILTER=.TRUE.485 FOUNDHELFILTER=.TRUE.
486 DO J=1,NCOMB486 DO J=1,NCOMB
487 GOODHEL(J)=.TRUE.487 GOODHEL(J)=.TRUE.
@@ -576,7 +576,7 @@
576 HELPICKED=1576 HELPICKED=1
577 CTMODE=CTMODEINIT577 CTMODE=CTMODEINIT
578ELSE578ELSE
579 IF (USERHEL.ne.-1) THEN579 IF (USERHEL.gt.0) THEN
580 IF(.NOT.GOODHEL(USERHEL)) THEN580 IF(.NOT.GOODHEL(USERHEL)) THEN
581 ANS(1)=0.0d0581 ANS(1)=0.0d0
582 ANS(2)=0.0d0582 ANS(2)=0.0d0
@@ -584,7 +584,7 @@
584 goto 9999584 goto 9999
585 ENDIF585 ENDIF
586 ENDIF586 ENDIF
587 HELPICKED=USERHEL 587 HELPICKED=MAX(USERHEL,-1)
588 IF (CTMODERUN.GT.-1) THEN588 IF (CTMODERUN.GT.-1) THEN
589 CTMODE=CTMODERUN589 CTMODE=CTMODERUN
590 ELSE590 ELSE
@@ -694,7 +694,7 @@
694IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN694IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
695C Update of NEXTREF, will be used for loop induced only.695C Update of NEXTREF, will be used for loop induced only.
696 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)696 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)
697 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN697 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
698 BUFFR(1)=BUFFR(1)+ANS(1)698 BUFFR(1)=BUFFR(1)+ANS(1)
699 BUFFR(2)=BUFFR(2)+ANS(2)699 BUFFR(2)=BUFFR(2)+ANS(2)
700 BUFFR(3)=BUFFR(3)+ANS(3)700 BUFFR(3)=BUFFR(3)+ANS(3)
@@ -785,7 +785,7 @@
785785
786DO K=1,3786DO K=1,3
787 ANS(K)=ANS(K)/DBLE(IDEN)787 ANS(K)=ANS(K)/DBLE(IDEN)
788 IF (USERHEL.NE.-1) THEN788 IF (USERHEL.GT.-1) THEN
789 ANS(K)=ANS(K)*HELAVGFACTOR789 ANS(K)=ANS(K)*HELAVGFACTOR
790 ELSE790 ELSE
791 DO J=1,NINITIAL791 DO J=1,NINITIAL
792792
=== modified file 'madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc'
--- madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc 2017-07-31 22:08:40 +0000
+++ madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc 2019-05-23 07:08:37 +0000
@@ -642,6 +642,10 @@
642 CALL %(proc_prefix)sSET_N_EVALS(N_DP_EVAL,N_QP_EVAL)642 CALL %(proc_prefix)sSET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
643ENDIF643ENDIF
644644
645IF(USERHEL.eq.-2) THEN
646 NTRY = 0
647ENDIF
648
645IF(NTRY.EQ.0) THEN649IF(NTRY.EQ.0) THEN
646 HELDOUBLECHECKED=(.NOT.DoubleCheckHelicityFilter).OR.(HelicityFilterLevel.eq.0)650 HELDOUBLECHECKED=(.NOT.DoubleCheckHelicityFilter).OR.(HelicityFilterLevel.eq.0)
647OPEN(1, FILE=LoopFilterFN, err=100, status='OLD', action='READ')651OPEN(1, FILE=LoopFilterFN, err=100, status='OLD', action='READ')
@@ -659,7 +663,7 @@
659101 CONTINUE663101 CONTINUE
660CLOSE(1)664CLOSE(1)
661665
662IF (HelicityFilterLevel.eq.0) then666IF (HelicityFilterLevel.eq.0.or.userhel.eq.-2) then
663 FOUNDHELFILTER=.TRUE.667 FOUNDHELFILTER=.TRUE.
664 DO J=1,NCOMB668 DO J=1,NCOMB
665 GOODHEL(J)=1669 GOODHEL(J)=1
@@ -816,7 +820,7 @@
816 HELPICKED=1820 HELPICKED=1
817 CTMODE=CTMODEINIT821 CTMODE=CTMODEINIT
818ELSE822ELSE
819 IF (USERHEL.ne.-1) then823 IF (USERHEL.gt.0) then
820 IF(GOODHEL(USERHEL).eq.-HELOFFSET) THEN824 IF(GOODHEL(USERHEL).eq.-HELOFFSET) THEN
821 DO I=0,NSQUAREDSO825 DO I=0,NSQUAREDSO
822 ANS(1,I)=0.0d0826 ANS(1,I)=0.0d0
@@ -826,7 +830,7 @@
826 goto 9999830 goto 9999
827 ENDIF831 ENDIF
828 ENDIF832 ENDIF
829 HELPICKED=USERHEL833 HELPICKED=MAX(USERHEL,-1)
830 IF (CTMODERUN.NE.-1) THEN834 IF (CTMODERUN.NE.-1) THEN
831 CTMODE=CTMODERUN835 CTMODE=CTMODERUN
832 ELSE836 ELSE
@@ -891,7 +895,7 @@
891C MadLoop jumps to this label during stability checks when it recomputes the same PS point with a different CTMode895C MadLoop jumps to this label during stability checks when it recomputes the same PS point with a different CTMode
892300 CONTINUE896300 CONTINUE
893C Of course the trick of reusing coefficients when reducing at the amplitude level only works when computing one helicity at a time897C Of course the trick of reusing coefficients when reducing at the amplitude level only works when computing one helicity at a time
894if (USERHEL.ne.-1) THEN898if (USERHEL.gt.-1) THEN
895 SKIP_LOOPNUM_COEFS_CONSTRUCTION = .TRUE.899 SKIP_LOOPNUM_COEFS_CONSTRUCTION = .TRUE.
896ENDIF900ENDIF
897308 CONTINUE901308 CONTINUE
@@ -1147,7 +1151,7 @@
11471151
1148## if(ComputeColorFlows){1152## if(ComputeColorFlows){
1149C 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 flows1153C 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
1150IF (((.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)))) THEN1154IF (((.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
1151C The cumulative quantities must only be computed if that helicity contributes according to user request (second argument of the subroutine below).1155C The cumulative quantities must only be computed if that helicity contributes according to user request (second argument of the subroutine below).
1152 CALL %(proc_prefix)sCOMPUTE_COLOR_FLOWS(HEL_MULT)1156 CALL %(proc_prefix)sCOMPUTE_COLOR_FLOWS(HEL_MULT)
1153 IF(ME_COMPUTATION_FROM_JAMP) THEN1157 IF(ME_COMPUTATION_FROM_JAMP) THEN
@@ -1172,7 +1176,7 @@
1172 ENDDO1176 ENDDO
1173 ENDIF1177 ENDIF
1174C The if statement below is not strictly necessary but makes it clear when it is executed.1178C The if statement below is not strictly necessary but makes it clear when it is executed.
1175 ELSEIF(H.EQ.USERHEL.OR.USERHEL.EQ.-1) THEN1179 ELSEIF(H.EQ.USERHEL.OR.USERHEL.LE.-1) THEN
1176C Make sure that that no polarization constraint filters out this helicity1180C Make sure that that no polarization constraint filters out this helicity
1177 IF (POLARIZATIONS(0,0).eq.-1.or.%(proc_prefix)sIS_HEL_SELECTED(H)) THEN1181 IF (POLARIZATIONS(0,0).eq.-1.or.%(proc_prefix)sIS_HEL_SELECTED(H)) THEN
1178C If both computational method is used, then we must just update RES_FROM_JAMP1182C If both computational method is used, then we must just update RES_FROM_JAMP
@@ -1183,7 +1187,7 @@
1183 ENDDO1187 ENDDO
1184 ENDIF1188 ENDIF
1185 ENDIF1189 ENDIF
1186 IF (H.EQ.USERHEL.OR.USERHEL.EQ.-1) THEN1190 IF (H.EQ.USERHEL.OR.USERHEL.LE.-1) THEN
1187C Make sure that that no polarization constraint filters out this helicity1191C Make sure that that no polarization constraint filters out this helicity
1188 IF (POLARIZATIONS(0,0).eq.-1.or.%(proc_prefix)sIS_HEL_SELECTED(H)) THEN1192 IF (POLARIZATIONS(0,0).eq.-1.or.%(proc_prefix)sIS_HEL_SELECTED(H)) THEN
1189 CALL %(proc_prefix)sCOMPUTE_COLOR_FLOWS_DERIVED_QUANTITIES(HEL_MULT)1193 CALL %(proc_prefix)sCOMPUTE_COLOR_FLOWS_DERIVED_QUANTITIES(HEL_MULT)
@@ -1315,7 +1319,7 @@
13151226 CONTINUE13191226 CONTINUE
13161320
1317IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1321IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1318 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1322 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1319C Make sure that that no polarization constraint filters out this helicity1323C Make sure that that no polarization constraint filters out this helicity
1320 IF (POLARIZATIONS(0,0).eq.-1.or.%(proc_prefix)sIS_HEL_SELECTED(HELPICKED)) THEN1324 IF (POLARIZATIONS(0,0).eq.-1.or.%(proc_prefix)sIS_HEL_SELECTED(HELPICKED)) THEN
1321C TO KEEP TRACK OF THE FINAL ANSWER TO BE RETURNED DURING CHECK PHASE1325C TO KEEP TRACK OF THE FINAL ANSWER TO BE RETURNED DURING CHECK PHASE
@@ -1527,7 +1531,7 @@
1527## }1531## }
1528 DO I=0,NSQUAREDSO1532 DO I=0,NSQUAREDSO
1529 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1533 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1530 IF (USERHEL.NE.-1) THEN1534 IF (USERHEL.GT.-1) THEN
1531 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1535 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1532 ELSE1536 ELSE
1533 DO J=1,NINITIAL1537 DO J=1,NINITIAL
@@ -1560,7 +1564,7 @@
1560 DO K=0,31564 DO K=0,3
1561## }1565## }
1562 RES_FROM_JAMP(K,I)=RES_FROM_JAMP(K,I)/DBLE(IDEN)1566 RES_FROM_JAMP(K,I)=RES_FROM_JAMP(K,I)/DBLE(IDEN)
1563 IF (USERHEL.NE.-1) THEN1567 IF (USERHEL.GT.-1) THEN
1564 RES_FROM_JAMP(K,I)=RES_FROM_JAMP(K,I)*HELAVGFACTOR1568 RES_FROM_JAMP(K,I)=RES_FROM_JAMP(K,I)*HELAVGFACTOR
1565 ELSE1569 ELSE
1566 DO L=1,NINITIAL1570 DO L=1,NINITIAL
15671571
=== modified file 'madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc'
--- madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc 2018-05-17 12:03:54 +0000
+++ madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc 2019-05-23 07:08:37 +0000
@@ -127,24 +127,27 @@
127C ----------127C ----------
128C BEGIN CODE128C BEGIN CODE
129C ----------129C ----------
130 NTRY=NTRY+1
131 DO IHEL=1,NEXTERNAL
132 JC(IHEL) = +1
133 ENDDO
134 DO I=1,NSQAMPSO
135 ANS(I) = 0D0
136 ENDDO
137C When spin-2 particles are involved, the Helicity filtering is dangerous for the 2->1 topology.130C When spin-2 particles are involved, the Helicity filtering is dangerous for the 2->1 topology.
138C This is because depending on the MC setup the initial PS points have back-to-back initial states131C This is because depending on the MC setup the initial PS points have back-to-back initial states
139C for which some of the spin-2 helicity configurations are zero. But they are no longer zero132C for which some of the spin-2 helicity configurations are zero. But they are no longer zero
140C if the point is boosted on the z-axis. Remember that HELAS helicity amplitudes are no longer133C if the point is boosted on the z-axis. Remember that HELAS helicity amplitudes are no longer
141C lorentz invariant with expternal spin-2 particles (only the helicity sum is).134C lorentz invariant with expternal spin-2 particles (only the helicity sum is).
142C For this reason, we simply remove the filterin when there is only three external particles.135C For this reason, we simply remove the filterin when there is only three external particles.
143 IF (NEXTERNAL.LE.3) THEN136 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
144 DO IHEL=1,NCOMB137 DO IHEL=1,NCOMB
145 GOODHEL(IHEL)=.TRUE.138 GOODHEL(IHEL)=.TRUE.
146 ENDDO139 ENDDO
140 IF(USERHEL.EQ.-2) USERHEL = -1
147 ENDIF141 ENDIF
142
143 NTRY=NTRY+1
144 DO IHEL=1,NEXTERNAL
145 JC(IHEL) = +1
146 ENDDO
147 DO I=1,NSQAMPSO
148 ANS(I) = 0D0
149 ENDDO
150
148 DO IHEL=1,NCOMB151 DO IHEL=1,NCOMB
149 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN152 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
150 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN153 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN
151154
=== modified file 'madgraph/iolibs/template_files/matrix_standalone_v4.inc'
--- madgraph/iolibs/template_files/matrix_standalone_v4.inc 2018-05-17 12:03:54 +0000
+++ madgraph/iolibs/template_files/matrix_standalone_v4.inc 2019-05-23 07:08:37 +0000
@@ -78,7 +78,6 @@
78 LOGICAL GOODHEL(NCOMB)78 LOGICAL GOODHEL(NCOMB)
79 DATA NTRY/0/79 DATA NTRY/0/
80 DATA GOODHEL/NCOMB*.FALSE./80 DATA GOODHEL/NCOMB*.FALSE./
81
82C81C
83C GLOBAL VARIABLES82C GLOBAL VARIABLES
84C83C
@@ -101,21 +100,22 @@
101C ----------100C ----------
102C BEGIN CODE101C BEGIN CODE
103C ----------102C ----------
104 IF(USERHEL.EQ.-1) NTRY=NTRY+1
105 DO IHEL=1,NEXTERNAL
106 JC(IHEL) = +1
107 ENDDO
108C When spin-2 particles are involved, the Helicity filtering is dangerous for the 2->1 topology.103C When spin-2 particles are involved, the Helicity filtering is dangerous for the 2->1 topology.
109C This is because depending on the MC setup the initial PS points have back-to-back initial states104C This is because depending on the MC setup the initial PS points have back-to-back initial states
110C for which some of the spin-2 helicity configurations are zero. But they are no longer zero105C for which some of the spin-2 helicity configurations are zero. But they are no longer zero
111C if the point is boosted on the z-axis. Remember that HELAS helicity amplitudes are no longer106C if the point is boosted on the z-axis. Remember that HELAS helicity amplitudes are no longer
112C lorentz invariant with expternal spin-2 particles (only the helicity sum is).107C lorentz invariant with expternal spin-2 particles (only the helicity sum is).
113C For this reason, we simply remove the filterin when there is only three external particles.108C For this reason, we simply remove the filterin when there is only three external particles.
114 IF (NEXTERNAL.LE.3) THEN109 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
115 DO IHEL=1,NCOMB110 DO IHEL=1,NCOMB
116 GOODHEL(IHEL)=.TRUE.111 GOODHEL(IHEL)=.TRUE.
117 ENDDO112 ENDDO
113 IF(USERHEL.EQ.-2) USERHEL=-1
118 ENDIF114 ENDIF
115 IF(USERHEL.EQ.-1) NTRY=NTRY+1
116 DO IHEL=1,NEXTERNAL
117 JC(IHEL) = +1
118 ENDDO
119 ANS = 0D0119 ANS = 0D0
120 DO IHEL=1,NCOMB120 DO IHEL=1,NCOMB
121 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN 121 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
122122
=== modified file 'madgraph/loop/loop_exporters.py'
--- madgraph/loop/loop_exporters.py 2018-06-03 12:13:47 +0000
+++ madgraph/loop/loop_exporters.py 2019-05-23 07:08:37 +0000
@@ -304,11 +304,12 @@
304 CALL SETMADLOOPPATH(PATH)304 CALL SETMADLOOPPATH(PATH)
305 END305 END
306306
307 subroutine smatrixhel(pdgs, npdg, p, ALPHAS, SCALES2, nhel, ANS, RETURNCODE)307 subroutine smatrixhel(pdgs, procid, npdg, p, ALPHAS, SCALES2, nhel, ANS, RETURNCODE)
308 IMPLICIT NONE308 IMPLICIT NONE
309309
310CF2PY double precision, intent(in), dimension(0:3,npdg) :: p310CF2PY double precision, intent(in), dimension(0:3,npdg) :: p
311CF2PY integer, intent(in), dimension(npdg) :: pdgs311CF2PY integer, intent(in), dimension(npdg) :: pdgs
312CF2PY integer, intent(in):: procid
312CF2PY integer, intent(in) :: npdg313CF2PY integer, intent(in) :: npdg
313CF2PY double precision, intent(out) :: ANS314CF2PY double precision, intent(out) :: ANS
314CF2PY integer, intent(out) :: RETURNCODE315CF2PY integer, intent(out) :: RETURNCODE
@@ -316,22 +317,26 @@
316CF2PY double precision, intent(in) :: SCALES2317CF2PY double precision, intent(in) :: SCALES2
317318
318 integer pdgs(*)319 integer pdgs(*)
319 integer npdg, nhel, RETURNCODE320 integer npdg, nhel, RETURNCODE, procid
320 double precision p(*)321 double precision p(*)
321 double precision ANS, ALPHAS, PI,SCALES2322 double precision ANS, ALPHAS, PI,SCALES2
322323 1 continue
323%(smatrixhel)s324%(smatrixhel)s
324325
325 return326 return
326 end327 end
327 328
328 subroutine get_pdg_order(OUT)329 subroutine get_pdg_order(PDG,PID)
329 IMPLICIT NONE330 IMPLICIT NONE
330CF2PY INTEGER, intent(out) :: OUT(%(nb_me)i,%(maxpart)i) 331CF2PY INTEGER, intent(out) :: PDG(%(nb_me)i,%(maxpart)i)
332CF2PY INTEGER, intent(out) :: PID(%(nb_me)i)
331 333
332 INTEGER OUT(%(nb_me)i,%(maxpart)i), PDGS(%(nb_me)i,%(maxpart)i)334 INTEGER PDG(%(nb_me)i,%(maxpart)i), PDGS(%(nb_me)i,%(maxpart)i)
335 INTEGER PID(%(nb_me)i),PIDs(%(nb_me)i)
333 DATA PDGS/ %(pdgs)s /336 DATA PDGS/ %(pdgs)s /
334 OUT=PDGS337 DATA PIDS/ %(pids)s /
338 PDG=PDGS
339 PID=PIDS
335 RETURN340 RETURN
336 END341 END
337 342
@@ -348,31 +353,39 @@
348 353
349 allids = self.prefix_info.keys()354 allids = self.prefix_info.keys()
350 allprefix = [self.prefix_info[key][0] for key in allids]355 allprefix = [self.prefix_info[key][0] for key in allids]
351 min_nexternal = min([len(ids) for ids in allids])356 min_nexternal = min([len(ids[0]) for ids in allids])
352 max_nexternal = max([len(ids) for ids in allids])357 max_nexternal = max([len(ids[0]) for ids in allids])
353358
354 info = []359 info = []
355 for key, (prefix, tag) in self.prefix_info.items():360 for (key, pid), (prefix, tag) in self.prefix_info.items():
356 info.append('#PY %s : %s # %s' % (tag, key, prefix))361 info.append('#PY %s : %s # %s %s' % (tag, key, prefix, pid))
357 362
358363
359 text = []364 text = []
360 for n_ext in range(min_nexternal, max_nexternal+1):365 for n_ext in range(min_nexternal, max_nexternal+1):
361 current = [ids for ids in allids if len(ids)==n_ext]366 current_id = [ids[0] for ids in allids if len(ids[0])==n_ext]
362 if not current:367 current_pid = [ids[1] for ids in allids if len(ids[0])==n_ext]
368 if not current_id:
363 continue369 continue
364 if min_nexternal != max_nexternal:370 if min_nexternal != max_nexternal:
365 if n_ext == min_nexternal:371 if n_ext == min_nexternal:
366 text.append(' if (npdg.eq.%i)then' % n_ext)372 text.append(' if (npdg.eq.%i)then' % n_ext)
367 else:373 else:
368 text.append(' else if (npdg.eq.%i)then' % n_ext)374 text.append(' else if (npdg.eq.%i)then' % n_ext)
369 for ii,pdgs in enumerate(current):375 for ii,pdgs in enumerate(current_id):
376 pid = current_pid[ii]
370 condition = '.and.'.join(['%i.eq.pdgs(%i)' %(pdg, i+1) for i, pdg in enumerate(pdgs)])377 condition = '.and.'.join(['%i.eq.pdgs(%i)' %(pdg, i+1) for i, pdg in enumerate(pdgs)])
371 if ii==0:378 if ii==0:
372 text.append( ' if(%s) then ! %i' % (condition, i))379 text.append( ' if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition, pid, i))
380 #text.append( ' if(%s) then ! %i' % (condition, i))
373 else:381 else:
374 text.append( ' else if(%s) then ! %i' % (condition,i))382 text.append( ' else if(%s.and.(procid.le.0.or.procid.eq.%d)) then ! %i' % (condition,pid,i))
375 text.append(' call %sget_me(p, ALPHAS, DSQRT(SCALES2), NHEL, ANS, RETURNCODE)' % self.prefix_info[pdgs][0])383 #text.append( ' else if(%s) then ! %i' % (condition,i))
384 text.append(' call %sget_me(p, ALPHAS, DSQRT(SCALES2), NHEL, ANS, RETURNCODE)' % self.prefix_info[(pdgs,pid)][0])
385 text.append( ' else if(procid.gt.0) then !')
386 text.append( ' procid = -1' )
387 text.append( ' goto 1' )
388 #text.append( ' call smatrixhel(pdgs, -1, npdg, p, ALPHAS, SCALES2, nhel, ANS, RETURNCODE)')
376 text.append(' endif')389 text.append(' endif')
377 #close the function390 #close the function
378 if min_nexternal != max_nexternal:391 if min_nexternal != max_nexternal:
@@ -384,7 +397,8 @@
384 'nb_me': len(allids),397 'nb_me': len(allids),
385 'pdgs': ','.join([str(pdg[i]) if i<len(pdg) else '0' 398 'pdgs': ','.join([str(pdg[i]) if i<len(pdg) else '0'
386 for i in range(max_nexternal) \399 for i in range(max_nexternal) \
387 for pdg in allids]),400 for (pdg,pid) in allids]),
401 'pids': ','.join(str(pid) for (pdg,pid) in allids),
388 'prefix':'\',\''.join(allprefix)402 'prefix':'\',\''.join(allprefix)
389 }403 }
390 404
@@ -393,6 +407,7 @@
393 fsock = writers.FortranWriter(pjoin(self.dir_path, 'SubProcesses', 'all_matrix.f'),'w')407 fsock = writers.FortranWriter(pjoin(self.dir_path, 'SubProcesses', 'all_matrix.f'),'w')
394 fsock.writelines(text)408 fsock.writelines(text)
395 fsock.close()409 fsock.close()
410
396 411
397 412
398 413
@@ -984,7 +999,7 @@
984 if 'prefix' in self.cmd_options and self.cmd_options['prefix'] in ['int','proc']:999 if 'prefix' in self.cmd_options and self.cmd_options['prefix'] in ['int','proc']:
985 for proc in matrix_element.get('processes'):1000 for proc in matrix_element.get('processes'):
986 ids = [l.get('id') for l in proc.get('legs_with_decays')]1001 ids = [l.get('id') for l in proc.get('legs_with_decays')]
987 self.prefix_info[tuple(ids)] = [dict['proc_prefix'], proc.get_tag()]1002 self.prefix_info[(tuple(ids), proc.get('id'))] = [dict['proc_prefix'], proc.get_tag()]
9881003
989 # The proc_id is used for MadEvent grouping, so none of our concern here1004 # The proc_id is used for MadEvent grouping, so none of our concern here
990 # and it is simply set to an empty string. 1005 # and it is simply set to an empty string.
9911006
=== modified file 'madgraph/various/banner.py'
--- madgraph/various/banner.py 2019-05-07 13:01:35 +0000
+++ madgraph/various/banner.py 2019-05-23 07:08:37 +0000
@@ -384,9 +384,12 @@
384 header = open(pjoin(MG5DIR,'Template', 'LO', 'Source', 'banner_header.txt')).read()384 header = open(pjoin(MG5DIR,'Template', 'LO', 'Source', 'banner_header.txt')).read()
385 385
386 if not self.lhe_version:386 if not self.lhe_version:
387 self.lhe_version = self.get('run_card', 'lhe_version', default=1.0)387 if 'mgruncard' in self:
388 if float(self.lhe_version) < 3:388 self.lhe_version = self.get('run_card', 'lhe_version', default=1.0)
389 self.lhe_version = 1.0389 if float(self.lhe_version) < 3:
390 self.lhe_version = 1.0
391 else:
392 self.lhe_version = 3.0
390 393
391 ff.write(header % { 'version':float(self.lhe_version)})394 ff.write(header % { 'version':float(self.lhe_version)})
392395
393396
=== modified file 'madgraph/various/rambo.py'
--- madgraph/various/rambo.py 2015-10-01 16:00:08 +0000
+++ madgraph/various/rambo.py 2019-05-23 07:08:37 +0000
@@ -1,6 +1,7 @@
1from __future__ import division1from __future__ import division
2import math2import math
3import random3import random
4import madgraph.various.misc as misc
45
5class FortranList(list):6class FortranList(list):
6 7
@@ -91,6 +92,12 @@
91 V= FortranList(N)92 V= FortranList(N)
92 IWARN = [0,0]93 IWARN = [0,0]
93# Check input object94# Check input object
95 if isinstance(XM, list) and not isinstance(XM, FortranList):
96 tmp = FortranList(1, N)
97 for i,val in enumerate(XM):
98 tmp[i+1] = val
99 XM = tmp
100
94 assert isinstance(XM, FortranList)101 assert isinstance(XM, FortranList)
95 assert XM.min == 1102 assert XM.min == 1
96 assert XM.max == N+1 103 assert XM.max == N+1
97104
=== modified file 'madgraph/various/shower_card.py'
--- madgraph/various/shower_card.py 2019-05-03 07:40:21 +0000
+++ madgraph/various/shower_card.py 2019-05-23 07:08:37 +0000
@@ -117,7 +117,6 @@
117 if not i in list_dm: 117 if not i in list_dm:
118 self['dm_'+str(i)] = ''118 self['dm_'+str(i)] = ''
119119
120 misc.sprint(self['nsplit_jobs'])
121 self.text=content120 self.text=content
122121
123122
124123
=== modified file 'models/import_ufo.py'
--- models/import_ufo.py 2019-02-14 13:39:51 +0000
+++ models/import_ufo.py 2019-05-23 07:08:37 +0000
@@ -585,7 +585,7 @@
585 else:585 else:
586 pass586 pass
587 else:587 else:
588 self.model.set('order_hierarchy', hierarchy) 588 self.model.set('order_hierarchy', hierarchy)
589 589
590 # Also set expansion_order, i.e., maximum coupling order per process590 # Also set expansion_order, i.e., maximum coupling order per process
591 expansion_order={}591 expansion_order={}
@@ -602,11 +602,19 @@
602 pass602 pass
603 else:603 else:
604 self.model.set('expansion_order', expansion_order)604 self.model.set('expansion_order', expansion_order)
605 self.model.set('expansion_order', expansion_order) 605
606 606
607 #clean memory607 #clean memory
608 del self.checked_lor608 del self.checked_lor
609609
610 for name in dir(self.ufomodel):
611 if name.startswith('__') and name.endswith('__'):
612 value = getattr(self.ufomodel, name)
613 if not isinstance(value, (str, int)):
614 continue
615 self.model['model_info'][name[2:-2]] = value
616
617
610 return self.model618 return self.model
611 619
612 def optimise_interaction(self, interaction):620 def optimise_interaction(self, interaction):
613621
=== modified file 'models/template_files/fortran/lha_read.f'
--- models/template_files/fortran/lha_read.f 2016-10-27 15:40:27 +0000
+++ models/template_files/fortran/lha_read.f 2019-05-23 07:08:37 +0000
@@ -179,7 +179,7 @@
179 implicit none179 implicit none
180180
181 integer maxpara181 integer maxpara
182 parameter (maxpara=1000)182 parameter (maxpara=%(maxpara)i)
183 character*20 param(maxpara),value(maxpara),val,par183 character*20 param(maxpara),value(maxpara),val,par
184 character*20 blockname184 character*20 blockname
185 integer npara185 integer npara
@@ -280,7 +280,7 @@
280c parameters280c parameters
281c281c
282 integer maxpara282 integer maxpara
283 parameter (maxpara=1000)283 parameter (maxpara=%(maxpara)i)
284c284c
285c arguments285c arguments
286c286c
287287
=== modified file 'models/template_files/fortran/lha_read_mp.f'
--- models/template_files/fortran/lha_read_mp.f 2016-10-27 15:40:27 +0000
+++ models/template_files/fortran/lha_read_mp.f 2019-05-23 07:08:37 +0000
@@ -199,7 +199,7 @@
199 implicit none199 implicit none
200200
201 integer maxpara201 integer maxpara
202 parameter (maxpara=1000)202 parameter (maxpara=%(maxpara)i)
203 character*20 param(maxpara),value(maxpara),val,par203 character*20 param(maxpara),value(maxpara),val,par
204 character*20 blockname204 character*20 blockname
205 integer npara205 integer npara
@@ -300,7 +300,7 @@
300c parameters300c parameters
301c301c
302 integer maxpara302 integer maxpara
303 parameter (maxpara=1000)303 parameter (maxpara=%(maxpara)i)
304c304c
305c arguments305c arguments
306c306c
@@ -356,7 +356,7 @@
356c parameters356c parameters
357c357c
358 integer maxpara358 integer maxpara
359 parameter (maxpara=1000)359 parameter (maxpara=%(maxpara)i)
360c360c
361c arguments361c arguments
362c362c
363363
=== modified file 'tests/acceptance_tests/test_cmd_reweight.py'
--- tests/acceptance_tests/test_cmd_reweight.py 2018-06-01 12:14:52 +0000
+++ tests/acceptance_tests/test_cmd_reweight.py 2019-05-23 07:08:37 +0000
@@ -207,7 +207,7 @@
207 ff.write(cmd_lines)207 ff.write(cmd_lines)
208 ff.close()208 ff.close()
209 209
210 with misc.stdchannel_redirected(sys.stdout, os.devnull):210 if 1:#with misc.stdchannel_redirected(sys.stdout, os.devnull):
211 me_cmd.run_cmd('reweight run_01 --from_cards')211 me_cmd.run_cmd('reweight run_01 --from_cards')
212 212
213 lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'events.lhe.gz'))213 lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'events.lhe.gz'))
@@ -281,7 +281,7 @@
281 ff.write(cmd_lines)281 ff.write(cmd_lines)
282 ff.close()282 ff.close()
283 283
284 with misc.stdchannel_redirected(sys.stdout, os.devnull):284 if 1 :#with misc.stdchannel_redirected(sys.stdout, os.devnull):
285 me_cmd.run_cmd('reweight run_01 --from_cards')285 me_cmd.run_cmd('reweight run_01 --from_cards')
286 286
287 lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'events.lhe.gz'))287 lhe = lhe_parser.EventFile(pjoin(self.run_dir,'Events','run_01', 'events.lhe.gz'))
@@ -312,7 +312,8 @@
312 ff.write(cmd_lines)312 ff.write(cmd_lines)
313 ff.close()313 ff.close()
314 314
315 with misc.stdchannel_redirected(sys.stdout, os.devnull):315 #with misc.stdchannel_redirected(sys.stdout, os.devnull):
316 if 1:
316 me_cmd.run_cmd('reweight run_01 --from_cards')317 me_cmd.run_cmd('reweight run_01 --from_cards')
317 318
318319
319320
=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f'
--- 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
+++ 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
@@ -141,13 +141,6 @@
141C ----------141C ----------
142C BEGIN CODE142C BEGIN CODE
143C ----------143C ----------
144 NTRY=NTRY+1
145 DO IHEL=1,NEXTERNAL
146 JC(IHEL) = +1
147 ENDDO
148 DO I=1,NSQAMPSO
149 ANS(I) = 0D0
150 ENDDO
151C When spin-2 particles are involved, the Helicity filtering is144C When spin-2 particles are involved, the Helicity filtering is
152C dangerous for the 2->1 topology.145C dangerous for the 2->1 topology.
153C This is because depending on the MC setup the initial PS points146C This is because depending on the MC setup the initial PS points
@@ -160,11 +153,21 @@
160C helicity sum is).153C helicity sum is).
161C For this reason, we simply remove the filterin when there is154C For this reason, we simply remove the filterin when there is
162C only three external particles.155C only three external particles.
163 IF (NEXTERNAL.LE.3) THEN156 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
164 DO IHEL=1,NCOMB157 DO IHEL=1,NCOMB
165 GOODHEL(IHEL)=.TRUE.158 GOODHEL(IHEL)=.TRUE.
166 ENDDO159 ENDDO
160 IF(USERHEL.EQ.-2) USERHEL = -1
167 ENDIF161 ENDIF
162
163 NTRY=NTRY+1
164 DO IHEL=1,NEXTERNAL
165 JC(IHEL) = +1
166 ENDDO
167 DO I=1,NSQAMPSO
168 ANS(I) = 0D0
169 ENDDO
170
168 DO IHEL=1,NCOMB171 DO IHEL=1,NCOMB
169 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN172 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
170 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN173 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN
171174
=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%loop_matrix.f'
--- 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
+++ 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
@@ -636,6 +636,10 @@
636 CALL SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)636 CALL SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
637 ENDIF637 ENDIF
638638
639 IF(USERHEL.EQ.-2) THEN
640 NTRY = 0
641 ENDIF
642
639 IF(NTRY.EQ.0) THEN643 IF(NTRY.EQ.0) THEN
640 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)644 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
641 $ .OR.(HELICITYFILTERLEVEL.EQ.0)645 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -655,7 +659,7 @@
655 101 CONTINUE659 101 CONTINUE
656 CLOSE(1)660 CLOSE(1)
657661
658 IF (HELICITYFILTERLEVEL.EQ.0) THEN662 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
659 FOUNDHELFILTER=.TRUE.663 FOUNDHELFILTER=.TRUE.
660 DO J=1,NCOMB664 DO J=1,NCOMB
661 GOODHEL(J)=1665 GOODHEL(J)=1
@@ -796,7 +800,7 @@
796 HELPICKED=1800 HELPICKED=1
797 CTMODE=CTMODEINIT801 CTMODE=CTMODEINIT
798 ELSE802 ELSE
799 IF (USERHEL.NE.-1) THEN803 IF (USERHEL.GT.0) THEN
800 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN804 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
801 DO I=0,NSQUAREDSO805 DO I=0,NSQUAREDSO
802 ANS(1,I)=0.0D0806 ANS(1,I)=0.0D0
@@ -806,7 +810,7 @@
806 GOTO 9999810 GOTO 9999
807 ENDIF811 ENDIF
808 ENDIF812 ENDIF
809 HELPICKED=USERHEL813 HELPICKED=MAX(USERHEL,-1)
810 IF (CTMODERUN.NE.-1) THEN814 IF (CTMODERUN.NE.-1) THEN
811 CTMODE=CTMODERUN815 CTMODE=CTMODERUN
812 ELSE816 ELSE
@@ -1069,7 +1073,7 @@
1069 1226 CONTINUE1073 1226 CONTINUE
10701074
1071 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1075 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1072 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1076 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1073C Make sure that that no polarization constraint filters out1077C Make sure that that no polarization constraint filters out
1074C this helicity1078C this helicity
1075 IF (POLARIZATIONS(0,0).EQ.-1.OR.IS_HEL_SELECTED(HELPICKED))1079 IF (POLARIZATIONS(0,0).EQ.-1.OR.IS_HEL_SELECTED(HELPICKED))
@@ -1287,7 +1291,7 @@
1287 DO K=1,31291 DO K=1,3
1288 DO I=0,NSQUAREDSO1292 DO I=0,NSQUAREDSO
1289 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1293 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1290 IF (USERHEL.NE.-1) THEN1294 IF (USERHEL.GT.-1) THEN
1291 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1295 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1292 ELSE1296 ELSE
1293 DO J=1,NINITIAL1297 DO J=1,NINITIAL
12941298
=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f'
--- 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
+++ 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
@@ -141,13 +141,6 @@
141C ----------141C ----------
142C BEGIN CODE142C BEGIN CODE
143C ----------143C ----------
144 NTRY=NTRY+1
145 DO IHEL=1,NEXTERNAL
146 JC(IHEL) = +1
147 ENDDO
148 DO I=1,NSQAMPSO
149 ANS(I) = 0D0
150 ENDDO
151C When spin-2 particles are involved, the Helicity filtering is144C When spin-2 particles are involved, the Helicity filtering is
152C dangerous for the 2->1 topology.145C dangerous for the 2->1 topology.
153C This is because depending on the MC setup the initial PS points146C This is because depending on the MC setup the initial PS points
@@ -160,11 +153,21 @@
160C helicity sum is).153C helicity sum is).
161C For this reason, we simply remove the filterin when there is154C For this reason, we simply remove the filterin when there is
162C only three external particles.155C only three external particles.
163 IF (NEXTERNAL.LE.3) THEN156 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
164 DO IHEL=1,NCOMB157 DO IHEL=1,NCOMB
165 GOODHEL(IHEL)=.TRUE.158 GOODHEL(IHEL)=.TRUE.
166 ENDDO159 ENDDO
160 IF(USERHEL.EQ.-2) USERHEL = -1
167 ENDIF161 ENDIF
162
163 NTRY=NTRY+1
164 DO IHEL=1,NEXTERNAL
165 JC(IHEL) = +1
166 ENDDO
167 DO I=1,NSQAMPSO
168 ANS(I) = 0D0
169 ENDDO
170
168 DO IHEL=1,NCOMB171 DO IHEL=1,NCOMB
169 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN172 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
170 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN173 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN
171174
=== modified file 'tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%loop_matrix.f'
--- 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
+++ 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
@@ -636,6 +636,10 @@
636 CALL SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)636 CALL SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
637 ENDIF637 ENDIF
638638
639 IF(USERHEL.EQ.-2) THEN
640 NTRY = 0
641 ENDIF
642
639 IF(NTRY.EQ.0) THEN643 IF(NTRY.EQ.0) THEN
640 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)644 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
641 $ .OR.(HELICITYFILTERLEVEL.EQ.0)645 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -655,7 +659,7 @@
655 101 CONTINUE659 101 CONTINUE
656 CLOSE(1)660 CLOSE(1)
657661
658 IF (HELICITYFILTERLEVEL.EQ.0) THEN662 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
659 FOUNDHELFILTER=.TRUE.663 FOUNDHELFILTER=.TRUE.
660 DO J=1,NCOMB664 DO J=1,NCOMB
661 GOODHEL(J)=1665 GOODHEL(J)=1
@@ -796,7 +800,7 @@
796 HELPICKED=1800 HELPICKED=1
797 CTMODE=CTMODEINIT801 CTMODE=CTMODEINIT
798 ELSE802 ELSE
799 IF (USERHEL.NE.-1) THEN803 IF (USERHEL.GT.0) THEN
800 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN804 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
801 DO I=0,NSQUAREDSO805 DO I=0,NSQUAREDSO
802 ANS(1,I)=0.0D0806 ANS(1,I)=0.0D0
@@ -806,7 +810,7 @@
806 GOTO 9999810 GOTO 9999
807 ENDIF811 ENDIF
808 ENDIF812 ENDIF
809 HELPICKED=USERHEL813 HELPICKED=MAX(USERHEL,-1)
810 IF (CTMODERUN.NE.-1) THEN814 IF (CTMODERUN.NE.-1) THEN
811 CTMODE=CTMODERUN815 CTMODE=CTMODERUN
812 ELSE816 ELSE
@@ -1069,7 +1073,7 @@
1069 1226 CONTINUE1073 1226 CONTINUE
10701074
1071 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1075 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1072 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1076 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1073C Make sure that that no polarization constraint filters out1077C Make sure that that no polarization constraint filters out
1074C this helicity1078C this helicity
1075 IF (POLARIZATIONS(0,0).EQ.-1.OR.IS_HEL_SELECTED(HELPICKED))1079 IF (POLARIZATIONS(0,0).EQ.-1.OR.IS_HEL_SELECTED(HELPICKED))
@@ -1287,7 +1291,7 @@
1287 DO K=1,31291 DO K=1,3
1288 DO I=0,NSQUAREDSO1292 DO I=0,NSQUAREDSO
1289 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1293 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1290 IF (USERHEL.NE.-1) THEN1294 IF (USERHEL.GT.-1) THEN
1291 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1295 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1292 ELSE1296 ELSE
1293 DO J=1,NINITIAL1297 DO J=1,NINITIAL
12941298
=== modified file 'tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f'
--- tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f 2018-05-18 12:22:47 +0000
+++ tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f 2019-05-23 07:08:37 +0000
@@ -80,7 +80,6 @@
80 LOGICAL GOODHEL(NCOMB)80 LOGICAL GOODHEL(NCOMB)
81 DATA NTRY/0/81 DATA NTRY/0/
82 DATA GOODHEL/NCOMB*.FALSE./82 DATA GOODHEL/NCOMB*.FALSE./
83
84C 83C
85C GLOBAL VARIABLES84C GLOBAL VARIABLES
86C 85C
@@ -134,10 +133,6 @@
134C ----------133C ----------
135C BEGIN CODE134C BEGIN CODE
136C ----------135C ----------
137 IF(USERHEL.EQ.-1) NTRY=NTRY+1
138 DO IHEL=1,NEXTERNAL
139 JC(IHEL) = +1
140 ENDDO
141C When spin-2 particles are involved, the Helicity filtering is136C When spin-2 particles are involved, the Helicity filtering is
142C dangerous for the 2->1 topology.137C dangerous for the 2->1 topology.
143C This is because depending on the MC setup the initial PS points138C This is because depending on the MC setup the initial PS points
@@ -150,11 +145,16 @@
150C helicity sum is).145C helicity sum is).
151C For this reason, we simply remove the filterin when there is146C For this reason, we simply remove the filterin when there is
152C only three external particles.147C only three external particles.
153 IF (NEXTERNAL.LE.3) THEN148 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
154 DO IHEL=1,NCOMB149 DO IHEL=1,NCOMB
155 GOODHEL(IHEL)=.TRUE.150 GOODHEL(IHEL)=.TRUE.
156 ENDDO151 ENDDO
152 IF(USERHEL.EQ.-2) USERHEL=-1
157 ENDIF153 ENDIF
154 IF(USERHEL.EQ.-1) NTRY=NTRY+1
155 DO IHEL=1,NEXTERNAL
156 JC(IHEL) = +1
157 ENDDO
158 ANS = 0D0158 ANS = 0D0
159 DO IHEL=1,NCOMB159 DO IHEL=1,NCOMB
160 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN160 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
161161
=== modified file 'tests/input_files/IOTestsComparison/IOTest_Histogram/gnuplot_histo_output/HistoOut.gnuplot'
--- tests/input_files/IOTestsComparison/IOTest_Histogram/gnuplot_histo_output/HistoOut.gnuplot 2016-06-09 00:59:23 +0000
+++ tests/input_files/IOTestsComparison/IOTest_Histogram/gnuplot_histo_output/HistoOut.gnuplot 2019-05-23 07:08:37 +0000
@@ -26,62 +26,61 @@
26# color-blind individuals with either protanopia or deuteranopia. Bang26# color-blind individuals with either protanopia or deuteranopia. Bang
27# Wong [2011] Nature Methods 8, 441.27# Wong [2011] Nature Methods 8, 441.
2828
29set style line 1 lt 1 lc rgb "#009e73" lw 1.329set style line 1 lt 1 lc rgb "#009e73" lw 1.3
30set style line 101 lt 1 lc rgb "#009e73" lw 1.3 dt (6,3)30set style line 101 lt 1 lc rgb "#009e73" lw 1.3 dt (6,3)
31set style line 11 lt 2 lc rgb "#009e73" lw 1.3 dt (6,3)31set style line 11 lt 2 lc rgb "#009e73" lw 1.3 dt (6,3)
32set style line 21 lt 4 lc rgb "#009e73" lw 1.3 dt (3,2)32set style line 21 lt 4 lc rgb "#009e73" lw 1.3 dt (3,2)
33set style line 31 lt 6 lc rgb "#009e73" lw 1.3 dt (2,1)33set style line 31 lt 6 lc rgb "#009e73" lw 1.3 dt (2,1)
34set style line 41 lt 8 lc rgb "#009e73" lw 1.3 dt (4,3)34set style line 41 lt 8 lc rgb "#009e73" lw 1.3 dt (4,3)
3535
36set style line 2 lt 1 lc rgb "#0072b2" lw 1.336set style line 2 lt 1 lc rgb "#0072b2" lw 1.3
37set style line 102 lt 1 lc rgb "#0072b2" lw 1.3 dt (6,3)37set style line 102 lt 1 lc rgb "#0072b2" lw 1.3 dt (6,3)
38set style line 12 lt 2 lc rgb "#0072b2" lw 1.3 dt (6,3)38set style line 12 lt 2 lc rgb "#0072b2" lw 1.3 dt (6,3)
39set style line 22 lt 4 lc rgb "#0072b2" lw 1.3 dt (3,2)39set style line 22 lt 4 lc rgb "#0072b2" lw 1.3 dt (3,2)
40set style line 32 lt 6 lc rgb "#0072b2" lw 1.3 dt (2,1)40set style line 32 lt 6 lc rgb "#0072b2" lw 1.3 dt (2,1)
41set style line 42 lt 8 lc rgb "#0072b2" lw 1.3 dt (4,3)41set style line 42 lt 8 lc rgb "#0072b2" lw 1.3 dt (4,3)
4242
4343set style line 3 lt 1 lc rgb "#d55e00" lw 1.3
44set style line 3 lt 1 lc rgb "#d55e00" lw 1.3
45set style line 103 lt 1 lc rgb "#d55e00" lw 1.3 dt (6,3)44set style line 103 lt 1 lc rgb "#d55e00" lw 1.3 dt (6,3)
46set style line 13 lt 2 lc rgb "#d55e00" lw 1.3 dt (6,3)45set style line 13 lt 2 lc rgb "#d55e00" lw 1.3 dt (6,3)
47set style line 23 lt 4 lc rgb "#d55e00" lw 1.3 dt (3,2)46set style line 23 lt 4 lc rgb "#d55e00" lw 1.3 dt (3,2)
48set style line 33 lt 6 lc rgb "#d55e00" lw 1.3 dt (2,1)47set style line 33 lt 6 lc rgb "#d55e00" lw 1.3 dt (2,1)
49set style line 43 lt 8 lc rgb "#d55e00" lw 1.3 dt (4,3)48set style line 43 lt 8 lc rgb "#d55e00" lw 1.3 dt (4,3)
5049
51set style line 4 lt 1 lc rgb "#f0e442" lw 1.350set style line 4 lt 1 lc rgb "#f0e442" lw 1.3
52set style line 104 lt 1 lc rgb "#f0e442" lw 1.3 dt (6,3)51set style line 104 lt 1 lc rgb "#f0e442" lw 1.3 dt (6,3)
53set style line 14 lt 2 lc rgb "#f0e442" lw 1.3 dt (6,3)52set style line 14 lt 2 lc rgb "#f0e442" lw 1.3 dt (6,3)
54set style line 24 lt 4 lc rgb "#f0e442" lw 1.3 dt (3,2)53set style line 24 lt 4 lc rgb "#f0e442" lw 1.3 dt (3,2)
55set style line 34 lt 6 lc rgb "#f0e442" lw 1.3 dt (2,1)54set style line 34 lt 6 lc rgb "#f0e442" lw 1.3 dt (2,1)
56set style line 44 lt 8 lc rgb "#f0e442" lw 1.3 dt (4,3)55set style line 44 lt 8 lc rgb "#f0e442" lw 1.3 dt (4,3)
5756
58set style line 5 lt 1 lc rgb "#56b4e9" lw 1.357set style line 5 lt 1 lc rgb "#56b4e9" lw 1.3
59set style line 105 lt 1 lc rgb "#56b4e9" lw 1.3 dt (6,3)58set style line 105 lt 1 lc rgb "#56b4e9" lw 1.3 dt (6,3)
60set style line 15 lt 2 lc rgb "#56b4e9" lw 1.3 dt (6,3)59set style line 15 lt 2 lc rgb "#56b4e9" lw 1.3 dt (6,3)
61set style line 25 lt 4 lc rgb "#56b4e9" lw 1.3 dt (3,2)60set style line 25 lt 4 lc rgb "#56b4e9" lw 1.3 dt (3,2)
62set style line 35 lt 6 lc rgb "#56b4e9" lw 1.3 dt (2,1)61set style line 35 lt 6 lc rgb "#56b4e9" lw 1.3 dt (2,1)
63set style line 45 lt 8 lc rgb "#56b4e9" lw 1.3 dt (4,3)62set style line 45 lt 8 lc rgb "#56b4e9" lw 1.3 dt (4,3)
6463
65set style line 6 lt 1 lc rgb "#cc79a7" lw 1.364set style line 6 lt 1 lc rgb "#cc79a7" lw 1.3
66set style line 106 lt 1 lc rgb "#cc79a7" lw 1.3 dt (6,3)65set style line 106 lt 1 lc rgb "#cc79a7" lw 1.3 dt (6,3)
67set style line 16 lt 2 lc rgb "#cc79a7" lw 1.3 dt (6,3)66set style line 16 lt 2 lc rgb "#cc79a7" lw 1.3 dt (6,3)
68set style line 26 lt 4 lc rgb "#cc79a7" lw 1.3 dt (3,2)67set style line 26 lt 4 lc rgb "#cc79a7" lw 1.3 dt (3,2)
69set style line 36 lt 6 lc rgb "#cc79a7" lw 1.3 dt (2,1)68set style line 36 lt 6 lc rgb "#cc79a7" lw 1.3 dt (2,1)
70set style line 46 lt 8 lc rgb "#cc79a7" lw 1.3 dt (4,3)69set style line 46 lt 8 lc rgb "#cc79a7" lw 1.3 dt (4,3)
7170
72set style line 7 lt 1 lc rgb "#e69f00" lw 1.371set style line 7 lt 1 lc rgb "#e69f00" lw 1.3
73set style line 107 lt 1 lc rgb "#e69f00" lw 1.3 dt (6,3)72set style line 107 lt 1 lc rgb "#e69f00" lw 1.3 dt (6,3)
74set style line 17 lt 2 lc rgb "#e69f00" lw 1.3 dt (6,3)73set style line 17 lt 2 lc rgb "#e69f00" lw 1.3 dt (6,3)
75set style line 27 lt 4 lc rgb "#e69f00" lw 1.3 dt (3,2)74set style line 27 lt 4 lc rgb "#e69f00" lw 1.3 dt (3,2)
76set style line 37 lt 6 lc rgb "#e69f00" lw 1.3 dt (2,1)75set style line 37 lt 6 lc rgb "#e69f00" lw 1.3 dt (2,1)
77set style line 47 lt 8 lc rgb "#e69f00" lw 1.3 dt (4,3)76set style line 47 lt 8 lc rgb "#e69f00" lw 1.3 dt (4,3)
7877
79set style line 8 lt 1 lc rgb "black" lw 1.378set style line 8 lt 1 lc rgb "black" lw 1.3
80set style line 108 lt 1 lc rgb "black" lw 1.3 dt (6,3)79set style line 108 lt 1 lc rgb "black" lw 1.3 dt (6,3)
81set style line 18 lt 2 lc rgb "black" lw 1.3 dt (6,3)80set style line 18 lt 2 lc rgb "black" lw 1.3 dt (6,3)
82set style line 28 lt 4 lc rgb "black" lw 1.3 dt (3,2)81set style line 28 lt 4 lc rgb "black" lw 1.3 dt (3,2)
83set style line 38 lt 6 lc rgb "black" lw 1.3 dt (2,1)82set style line 38 lt 6 lc rgb "black" lw 1.3 dt (2,1)
84set style line 48 lt 8 lc rgb "black" lw 1.3 dt (4,3)83set style line 48 lt 8 lc rgb "black" lw 1.3 dt (4,3)
8584
8685
87set style line 999 lt 1 lc rgb "gray" lw 1.386set style line 999 lt 1 lc rgb "gray" lw 1.3
8887
=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f'
--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f 2018-05-25 09:13:24 +0000
+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f 2019-05-23 07:08:37 +0000
@@ -644,6 +644,10 @@
644 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)644 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
645 ENDIF645 ENDIF
646646
647 IF(USERHEL.EQ.-2) THEN
648 NTRY = 0
649 ENDIF
650
647 IF(NTRY.EQ.0) THEN651 IF(NTRY.EQ.0) THEN
648 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)652 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
649 $ .OR.(HELICITYFILTERLEVEL.EQ.0)653 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -663,7 +667,7 @@
663 101 CONTINUE667 101 CONTINUE
664 CLOSE(1)668 CLOSE(1)
665669
666 IF (HELICITYFILTERLEVEL.EQ.0) THEN670 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
667 FOUNDHELFILTER=.TRUE.671 FOUNDHELFILTER=.TRUE.
668 DO J=1,NCOMB672 DO J=1,NCOMB
669 GOODHEL(J)=1673 GOODHEL(J)=1
@@ -804,7 +808,7 @@
804 HELPICKED=1808 HELPICKED=1
805 CTMODE=CTMODEINIT809 CTMODE=CTMODEINIT
806 ELSE810 ELSE
807 IF (USERHEL.NE.-1) THEN811 IF (USERHEL.GT.0) THEN
808 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN812 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
809 DO I=0,NSQUAREDSO813 DO I=0,NSQUAREDSO
810 ANS(1,I)=0.0D0814 ANS(1,I)=0.0D0
@@ -814,7 +818,7 @@
814 GOTO 9999818 GOTO 9999
815 ENDIF819 ENDIF
816 ENDIF820 ENDIF
817 HELPICKED=USERHEL821 HELPICKED=MAX(USERHEL,-1)
818 IF (CTMODERUN.NE.-1) THEN822 IF (CTMODERUN.NE.-1) THEN
819 CTMODE=CTMODERUN823 CTMODE=CTMODERUN
820 ELSE824 ELSE
@@ -1099,7 +1103,7 @@
1099 1226 CONTINUE1103 1226 CONTINUE
11001104
1101 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1105 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1102 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1106 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1103C Make sure that that no polarization constraint filters out1107C Make sure that that no polarization constraint filters out
1104C this helicity1108C this helicity
1105 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1109 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1317,7 +1321,7 @@
1317 DO K=1,31321 DO K=1,3
1318 DO I=0,NSQUAREDSO1322 DO I=0,NSQUAREDSO
1319 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1323 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1320 IF (USERHEL.NE.-1) THEN1324 IF (USERHEL.GT.-1) THEN
1321 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1325 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1322 ELSE1326 ELSE
1323 DO J=1,NINITIAL1327 DO J=1,NINITIAL
13241328
=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f'
--- 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
+++ 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
@@ -644,6 +644,10 @@
644 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)644 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
645 ENDIF645 ENDIF
646646
647 IF(USERHEL.EQ.-2) THEN
648 NTRY = 0
649 ENDIF
650
647 IF(NTRY.EQ.0) THEN651 IF(NTRY.EQ.0) THEN
648 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)652 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
649 $ .OR.(HELICITYFILTERLEVEL.EQ.0)653 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -663,7 +667,7 @@
663 101 CONTINUE667 101 CONTINUE
664 CLOSE(1)668 CLOSE(1)
665669
666 IF (HELICITYFILTERLEVEL.EQ.0) THEN670 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
667 FOUNDHELFILTER=.TRUE.671 FOUNDHELFILTER=.TRUE.
668 DO J=1,NCOMB672 DO J=1,NCOMB
669 GOODHEL(J)=1673 GOODHEL(J)=1
@@ -804,7 +808,7 @@
804 HELPICKED=1808 HELPICKED=1
805 CTMODE=CTMODEINIT809 CTMODE=CTMODEINIT
806 ELSE810 ELSE
807 IF (USERHEL.NE.-1) THEN811 IF (USERHEL.GT.0) THEN
808 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN812 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
809 DO I=0,NSQUAREDSO813 DO I=0,NSQUAREDSO
810 ANS(1,I)=0.0D0814 ANS(1,I)=0.0D0
@@ -814,7 +818,7 @@
814 GOTO 9999818 GOTO 9999
815 ENDIF819 ENDIF
816 ENDIF820 ENDIF
817 HELPICKED=USERHEL821 HELPICKED=MAX(USERHEL,-1)
818 IF (CTMODERUN.NE.-1) THEN822 IF (CTMODERUN.NE.-1) THEN
819 CTMODE=CTMODERUN823 CTMODE=CTMODERUN
820 ELSE824 ELSE
@@ -1100,7 +1104,7 @@
1100 1226 CONTINUE1104 1226 CONTINUE
11011105
1102 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1106 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1103 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1107 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1104C Make sure that that no polarization constraint filters out1108C Make sure that that no polarization constraint filters out
1105C this helicity1109C this helicity
1106 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1110 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1318,7 +1322,7 @@
1318 DO K=1,31322 DO K=1,3
1319 DO I=0,NSQUAREDSO1323 DO I=0,NSQUAREDSO
1320 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1324 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1321 IF (USERHEL.NE.-1) THEN1325 IF (USERHEL.GT.-1) THEN
1322 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1326 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1323 ELSE1327 ELSE
1324 DO J=1,NINITIAL1328 DO J=1,NINITIAL
13251329
=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f'
--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f 2018-05-25 09:13:24 +0000
+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f 2019-05-23 07:08:37 +0000
@@ -636,6 +636,10 @@
636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
637 ENDIF637 ENDIF
638638
639 IF(USERHEL.EQ.-2) THEN
640 NTRY = 0
641 ENDIF
642
639 IF(NTRY.EQ.0) THEN643 IF(NTRY.EQ.0) THEN
640 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)644 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
641 $ .OR.(HELICITYFILTERLEVEL.EQ.0)645 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -655,7 +659,7 @@
655 101 CONTINUE659 101 CONTINUE
656 CLOSE(1)660 CLOSE(1)
657661
658 IF (HELICITYFILTERLEVEL.EQ.0) THEN662 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
659 FOUNDHELFILTER=.TRUE.663 FOUNDHELFILTER=.TRUE.
660 DO J=1,NCOMB664 DO J=1,NCOMB
661 GOODHEL(J)=1665 GOODHEL(J)=1
@@ -796,7 +800,7 @@
796 HELPICKED=1800 HELPICKED=1
797 CTMODE=CTMODEINIT801 CTMODE=CTMODEINIT
798 ELSE802 ELSE
799 IF (USERHEL.NE.-1) THEN803 IF (USERHEL.GT.0) THEN
800 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN804 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
801 DO I=0,NSQUAREDSO805 DO I=0,NSQUAREDSO
802 ANS(1,I)=0.0D0806 ANS(1,I)=0.0D0
@@ -806,7 +810,7 @@
806 GOTO 9999810 GOTO 9999
807 ENDIF811 ENDIF
808 ENDIF812 ENDIF
809 HELPICKED=USERHEL813 HELPICKED=MAX(USERHEL,-1)
810 IF (CTMODERUN.NE.-1) THEN814 IF (CTMODERUN.NE.-1) THEN
811 CTMODE=CTMODERUN815 CTMODE=CTMODERUN
812 ELSE816 ELSE
@@ -1069,7 +1073,7 @@
1069 1226 CONTINUE1073 1226 CONTINUE
10701074
1071 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1075 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1072 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1076 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1073C Make sure that that no polarization constraint filters out1077C Make sure that that no polarization constraint filters out
1074C this helicity1078C this helicity
1075 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1079 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1287,7 +1291,7 @@
1287 DO K=1,31291 DO K=1,3
1288 DO I=0,NSQUAREDSO1292 DO I=0,NSQUAREDSO
1289 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1293 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1290 IF (USERHEL.NE.-1) THEN1294 IF (USERHEL.GT.-1) THEN
1291 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1295 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1292 ELSE1296 ELSE
1293 DO J=1,NINITIAL1297 DO J=1,NINITIAL
12941298
=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f'
--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f 2018-05-25 09:13:24 +0000
+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f 2019-05-23 07:08:37 +0000
@@ -644,6 +644,10 @@
644 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)644 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
645 ENDIF645 ENDIF
646646
647 IF(USERHEL.EQ.-2) THEN
648 NTRY = 0
649 ENDIF
650
647 IF(NTRY.EQ.0) THEN651 IF(NTRY.EQ.0) THEN
648 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)652 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
649 $ .OR.(HELICITYFILTERLEVEL.EQ.0)653 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -663,7 +667,7 @@
663 101 CONTINUE667 101 CONTINUE
664 CLOSE(1)668 CLOSE(1)
665669
666 IF (HELICITYFILTERLEVEL.EQ.0) THEN670 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
667 FOUNDHELFILTER=.TRUE.671 FOUNDHELFILTER=.TRUE.
668 DO J=1,NCOMB672 DO J=1,NCOMB
669 GOODHEL(J)=1673 GOODHEL(J)=1
@@ -804,7 +808,7 @@
804 HELPICKED=1808 HELPICKED=1
805 CTMODE=CTMODEINIT809 CTMODE=CTMODEINIT
806 ELSE810 ELSE
807 IF (USERHEL.NE.-1) THEN811 IF (USERHEL.GT.0) THEN
808 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN812 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
809 DO I=0,NSQUAREDSO813 DO I=0,NSQUAREDSO
810 ANS(1,I)=0.0D0814 ANS(1,I)=0.0D0
@@ -814,7 +818,7 @@
814 GOTO 9999818 GOTO 9999
815 ENDIF819 ENDIF
816 ENDIF820 ENDIF
817 HELPICKED=USERHEL821 HELPICKED=MAX(USERHEL,-1)
818 IF (CTMODERUN.NE.-1) THEN822 IF (CTMODERUN.NE.-1) THEN
819 CTMODE=CTMODERUN823 CTMODE=CTMODERUN
820 ELSE824 ELSE
@@ -1100,7 +1104,7 @@
1100 1226 CONTINUE1104 1226 CONTINUE
11011105
1102 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1106 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1103 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1107 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1104C Make sure that that no polarization constraint filters out1108C Make sure that that no polarization constraint filters out
1105C this helicity1109C this helicity
1106 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1110 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1318,7 +1322,7 @@
1318 DO K=1,31322 DO K=1,3
1319 DO I=0,NSQUAREDSO1323 DO I=0,NSQUAREDSO
1320 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1324 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1321 IF (USERHEL.NE.-1) THEN1325 IF (USERHEL.GT.-1) THEN
1322 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1326 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1323 ELSE1327 ELSE
1324 DO J=1,NINITIAL1328 DO J=1,NINITIAL
13251329
=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f'
--- 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
+++ 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
@@ -644,6 +644,10 @@
644 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)644 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
645 ENDIF645 ENDIF
646646
647 IF(USERHEL.EQ.-2) THEN
648 NTRY = 0
649 ENDIF
650
647 IF(NTRY.EQ.0) THEN651 IF(NTRY.EQ.0) THEN
648 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)652 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
649 $ .OR.(HELICITYFILTERLEVEL.EQ.0)653 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -663,7 +667,7 @@
663 101 CONTINUE667 101 CONTINUE
664 CLOSE(1)668 CLOSE(1)
665669
666 IF (HELICITYFILTERLEVEL.EQ.0) THEN670 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
667 FOUNDHELFILTER=.TRUE.671 FOUNDHELFILTER=.TRUE.
668 DO J=1,NCOMB672 DO J=1,NCOMB
669 GOODHEL(J)=1673 GOODHEL(J)=1
@@ -804,7 +808,7 @@
804 HELPICKED=1808 HELPICKED=1
805 CTMODE=CTMODEINIT809 CTMODE=CTMODEINIT
806 ELSE810 ELSE
807 IF (USERHEL.NE.-1) THEN811 IF (USERHEL.GT.0) THEN
808 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN812 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
809 DO I=0,NSQUAREDSO813 DO I=0,NSQUAREDSO
810 ANS(1,I)=0.0D0814 ANS(1,I)=0.0D0
@@ -814,7 +818,7 @@
814 GOTO 9999818 GOTO 9999
815 ENDIF819 ENDIF
816 ENDIF820 ENDIF
817 HELPICKED=USERHEL821 HELPICKED=MAX(USERHEL,-1)
818 IF (CTMODERUN.NE.-1) THEN822 IF (CTMODERUN.NE.-1) THEN
819 CTMODE=CTMODERUN823 CTMODE=CTMODERUN
820 ELSE824 ELSE
@@ -1100,7 +1104,7 @@
1100 1226 CONTINUE1104 1226 CONTINUE
11011105
1102 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1106 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1103 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1107 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1104C Make sure that that no polarization constraint filters out1108C Make sure that that no polarization constraint filters out
1105C this helicity1109C this helicity
1106 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1110 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1318,7 +1322,7 @@
1318 DO K=1,31322 DO K=1,3
1319 DO I=0,NSQUAREDSO1323 DO I=0,NSQUAREDSO
1320 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1324 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1321 IF (USERHEL.NE.-1) THEN1325 IF (USERHEL.GT.-1) THEN
1322 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1326 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1323 ELSE1327 ELSE
1324 DO J=1,NINITIAL1328 DO J=1,NINITIAL
13251329
=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f'
--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f 2018-05-25 09:13:24 +0000
+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f 2019-05-23 07:08:37 +0000
@@ -644,6 +644,10 @@
644 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)644 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
645 ENDIF645 ENDIF
646646
647 IF(USERHEL.EQ.-2) THEN
648 NTRY = 0
649 ENDIF
650
647 IF(NTRY.EQ.0) THEN651 IF(NTRY.EQ.0) THEN
648 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)652 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
649 $ .OR.(HELICITYFILTERLEVEL.EQ.0)653 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -663,7 +667,7 @@
663 101 CONTINUE667 101 CONTINUE
664 CLOSE(1)668 CLOSE(1)
665669
666 IF (HELICITYFILTERLEVEL.EQ.0) THEN670 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
667 FOUNDHELFILTER=.TRUE.671 FOUNDHELFILTER=.TRUE.
668 DO J=1,NCOMB672 DO J=1,NCOMB
669 GOODHEL(J)=1673 GOODHEL(J)=1
@@ -804,7 +808,7 @@
804 HELPICKED=1808 HELPICKED=1
805 CTMODE=CTMODEINIT809 CTMODE=CTMODEINIT
806 ELSE810 ELSE
807 IF (USERHEL.NE.-1) THEN811 IF (USERHEL.GT.0) THEN
808 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN812 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
809 DO I=0,NSQUAREDSO813 DO I=0,NSQUAREDSO
810 ANS(1,I)=0.0D0814 ANS(1,I)=0.0D0
@@ -814,7 +818,7 @@
814 GOTO 9999818 GOTO 9999
815 ENDIF819 ENDIF
816 ENDIF820 ENDIF
817 HELPICKED=USERHEL821 HELPICKED=MAX(USERHEL,-1)
818 IF (CTMODERUN.NE.-1) THEN822 IF (CTMODERUN.NE.-1) THEN
819 CTMODE=CTMODERUN823 CTMODE=CTMODERUN
820 ELSE824 ELSE
@@ -1099,7 +1103,7 @@
1099 1226 CONTINUE1103 1226 CONTINUE
11001104
1101 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1105 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1102 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1106 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1103C Make sure that that no polarization constraint filters out1107C Make sure that that no polarization constraint filters out
1104C this helicity1108C this helicity
1105 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1109 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1317,7 +1321,7 @@
1317 DO K=1,31321 DO K=1,3
1318 DO I=0,NSQUAREDSO1322 DO I=0,NSQUAREDSO
1319 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1323 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1320 IF (USERHEL.NE.-1) THEN1324 IF (USERHEL.GT.-1) THEN
1321 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1325 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1322 ELSE1326 ELSE
1323 DO J=1,NINITIAL1327 DO J=1,NINITIAL
13241328
=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f'
--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f 2018-05-25 09:13:24 +0000
+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f 2019-05-23 07:08:37 +0000
@@ -636,6 +636,10 @@
636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
637 ENDIF637 ENDIF
638638
639 IF(USERHEL.EQ.-2) THEN
640 NTRY = 0
641 ENDIF
642
639 IF(NTRY.EQ.0) THEN643 IF(NTRY.EQ.0) THEN
640 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)644 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
641 $ .OR.(HELICITYFILTERLEVEL.EQ.0)645 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -655,7 +659,7 @@
655 101 CONTINUE659 101 CONTINUE
656 CLOSE(1)660 CLOSE(1)
657661
658 IF (HELICITYFILTERLEVEL.EQ.0) THEN662 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
659 FOUNDHELFILTER=.TRUE.663 FOUNDHELFILTER=.TRUE.
660 DO J=1,NCOMB664 DO J=1,NCOMB
661 GOODHEL(J)=1665 GOODHEL(J)=1
@@ -796,7 +800,7 @@
796 HELPICKED=1800 HELPICKED=1
797 CTMODE=CTMODEINIT801 CTMODE=CTMODEINIT
798 ELSE802 ELSE
799 IF (USERHEL.NE.-1) THEN803 IF (USERHEL.GT.0) THEN
800 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN804 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
801 DO I=0,NSQUAREDSO805 DO I=0,NSQUAREDSO
802 ANS(1,I)=0.0D0806 ANS(1,I)=0.0D0
@@ -806,7 +810,7 @@
806 GOTO 9999810 GOTO 9999
807 ENDIF811 ENDIF
808 ENDIF812 ENDIF
809 HELPICKED=USERHEL813 HELPICKED=MAX(USERHEL,-1)
810 IF (CTMODERUN.NE.-1) THEN814 IF (CTMODERUN.NE.-1) THEN
811 CTMODE=CTMODERUN815 CTMODE=CTMODERUN
812 ELSE816 ELSE
@@ -1069,7 +1073,7 @@
1069 1226 CONTINUE1073 1226 CONTINUE
10701074
1071 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1075 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1072 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1076 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1073C Make sure that that no polarization constraint filters out1077C Make sure that that no polarization constraint filters out
1074C this helicity1078C this helicity
1075 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1079 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1287,7 +1291,7 @@
1287 DO K=1,31291 DO K=1,3
1288 DO I=0,NSQUAREDSO1292 DO I=0,NSQUAREDSO
1289 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1293 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1290 IF (USERHEL.NE.-1) THEN1294 IF (USERHEL.GT.-1) THEN
1291 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1295 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1292 ELSE1296 ELSE
1293 DO J=1,NINITIAL1297 DO J=1,NINITIAL
12941298
=== modified file 'tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f'
--- tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f 2017-08-15 19:34:40 +0000
+++ tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QEDpert_default.f 2019-05-23 07:08:37 +0000
@@ -636,6 +636,10 @@
636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
637 ENDIF637 ENDIF
638638
639 IF(USERHEL.EQ.-2) THEN
640 NTRY = 0
641 ENDIF
642
639 IF(NTRY.EQ.0) THEN643 IF(NTRY.EQ.0) THEN
640 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)644 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
641 $ .OR.(HELICITYFILTERLEVEL.EQ.0)645 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -655,7 +659,7 @@
655 101 CONTINUE659 101 CONTINUE
656 CLOSE(1)660 CLOSE(1)
657661
658 IF (HELICITYFILTERLEVEL.EQ.0) THEN662 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
659 FOUNDHELFILTER=.TRUE.663 FOUNDHELFILTER=.TRUE.
660 DO J=1,NCOMB664 DO J=1,NCOMB
661 GOODHEL(J)=1665 GOODHEL(J)=1
@@ -796,7 +800,7 @@
796 HELPICKED=1800 HELPICKED=1
797 CTMODE=CTMODEINIT801 CTMODE=CTMODEINIT
798 ELSE802 ELSE
799 IF (USERHEL.NE.-1) THEN803 IF (USERHEL.GT.0) THEN
800 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN804 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
801 DO I=0,NSQUAREDSO805 DO I=0,NSQUAREDSO
802 ANS(1,I)=0.0D0806 ANS(1,I)=0.0D0
@@ -806,7 +810,7 @@
806 GOTO 9999810 GOTO 9999
807 ENDIF811 ENDIF
808 ENDIF812 ENDIF
809 HELPICKED=USERHEL813 HELPICKED=MAX(USERHEL,-1)
810 IF (CTMODERUN.NE.-1) THEN814 IF (CTMODERUN.NE.-1) THEN
811 CTMODE=CTMODERUN815 CTMODE=CTMODERUN
812 ELSE816 ELSE
@@ -1069,7 +1073,7 @@
1069 1226 CONTINUE1073 1226 CONTINUE
10701074
1071 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1075 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1072 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1076 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1073C Make sure that that no polarization constraint filters out1077C Make sure that that no polarization constraint filters out
1074C this helicity1078C this helicity
1075 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1079 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1287,7 +1291,7 @@
1287 DO K=1,31291 DO K=1,3
1288 DO I=0,NSQUAREDSO1292 DO I=0,NSQUAREDSO
1289 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1293 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1290 IF (USERHEL.NE.-1) THEN1294 IF (USERHEL.GT.-1) THEN
1291 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1295 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1292 ELSE1296 ELSE
1293 DO J=1,NINITIAL1297 DO J=1,NINITIAL
12941298
=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%born_matrix.f'
--- 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
+++ 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
@@ -144,13 +144,6 @@
144C ----------144C ----------
145C BEGIN CODE145C BEGIN CODE
146C ----------146C ----------
147 NTRY=NTRY+1
148 DO IHEL=1,NEXTERNAL
149 JC(IHEL) = +1
150 ENDDO
151 DO I=1,NSQAMPSO
152 ANS(I) = 0D0
153 ENDDO
154C When spin-2 particles are involved, the Helicity filtering is147C When spin-2 particles are involved, the Helicity filtering is
155C dangerous for the 2->1 topology.148C dangerous for the 2->1 topology.
156C This is because depending on the MC setup the initial PS points149C This is because depending on the MC setup the initial PS points
@@ -163,11 +156,21 @@
163C helicity sum is).156C helicity sum is).
164C For this reason, we simply remove the filterin when there is157C For this reason, we simply remove the filterin when there is
165C only three external particles.158C only three external particles.
166 IF (NEXTERNAL.LE.3) THEN159 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
167 DO IHEL=1,NCOMB160 DO IHEL=1,NCOMB
168 GOODHEL(IHEL)=.TRUE.161 GOODHEL(IHEL)=.TRUE.
169 ENDDO162 ENDDO
163 IF(USERHEL.EQ.-2) USERHEL = -1
170 ENDIF164 ENDIF
165
166 NTRY=NTRY+1
167 DO IHEL=1,NEXTERNAL
168 JC(IHEL) = +1
169 ENDDO
170 DO I=1,NSQAMPSO
171 ANS(I) = 0D0
172 ENDDO
173
171 DO IHEL=1,NCOMB174 DO IHEL=1,NCOMB
172 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN175 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
173 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN176 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN
174177
=== modified file 'tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%loop_matrix.f'
--- 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
+++ 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
@@ -636,6 +636,10 @@
636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
637 ENDIF637 ENDIF
638638
639 IF(USERHEL.EQ.-2) THEN
640 NTRY = 0
641 ENDIF
642
639 IF(NTRY.EQ.0) THEN643 IF(NTRY.EQ.0) THEN
640 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)644 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
641 $ .OR.(HELICITYFILTERLEVEL.EQ.0)645 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -655,7 +659,7 @@
655 101 CONTINUE659 101 CONTINUE
656 CLOSE(1)660 CLOSE(1)
657661
658 IF (HELICITYFILTERLEVEL.EQ.0) THEN662 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
659 FOUNDHELFILTER=.TRUE.663 FOUNDHELFILTER=.TRUE.
660 DO J=1,NCOMB664 DO J=1,NCOMB
661 GOODHEL(J)=1665 GOODHEL(J)=1
@@ -796,7 +800,7 @@
796 HELPICKED=1800 HELPICKED=1
797 CTMODE=CTMODEINIT801 CTMODE=CTMODEINIT
798 ELSE802 ELSE
799 IF (USERHEL.NE.-1) THEN803 IF (USERHEL.GT.0) THEN
800 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN804 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
801 DO I=0,NSQUAREDSO805 DO I=0,NSQUAREDSO
802 ANS(1,I)=0.0D0806 ANS(1,I)=0.0D0
@@ -806,7 +810,7 @@
806 GOTO 9999810 GOTO 9999
807 ENDIF811 ENDIF
808 ENDIF812 ENDIF
809 HELPICKED=USERHEL813 HELPICKED=MAX(USERHEL,-1)
810 IF (CTMODERUN.NE.-1) THEN814 IF (CTMODERUN.NE.-1) THEN
811 CTMODE=CTMODERUN815 CTMODE=CTMODERUN
812 ELSE816 ELSE
@@ -1069,7 +1073,7 @@
1069 1226 CONTINUE1073 1226 CONTINUE
10701074
1071 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1075 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1072 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1076 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1073C Make sure that that no polarization constraint filters out1077C Make sure that that no polarization constraint filters out
1074C this helicity1078C this helicity
1075 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1079 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1287,7 +1291,7 @@
1287 DO K=1,31291 DO K=1,3
1288 DO I=0,NSQUAREDSO1292 DO I=0,NSQUAREDSO
1289 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1293 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1290 IF (USERHEL.NE.-1) THEN1294 IF (USERHEL.GT.-1) THEN
1291 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1295 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1292 ELSE1296 ELSE
1293 DO J=1,NINITIAL1297 DO J=1,NINITIAL
12941298
=== modified file 'tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f'
--- tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f 2018-05-18 12:22:47 +0000
+++ tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f 2019-05-23 07:08:37 +0000
@@ -80,7 +80,6 @@
80 LOGICAL GOODHEL(NCOMB)80 LOGICAL GOODHEL(NCOMB)
81 DATA NTRY/0/81 DATA NTRY/0/
82 DATA GOODHEL/NCOMB*.FALSE./82 DATA GOODHEL/NCOMB*.FALSE./
83
84C 83C
85C GLOBAL VARIABLES84C GLOBAL VARIABLES
86C 85C
@@ -166,10 +165,6 @@
166C ----------165C ----------
167C BEGIN CODE166C BEGIN CODE
168C ----------167C ----------
169 IF(USERHEL.EQ.-1) NTRY=NTRY+1
170 DO IHEL=1,NEXTERNAL
171 JC(IHEL) = +1
172 ENDDO
173C When spin-2 particles are involved, the Helicity filtering is168C When spin-2 particles are involved, the Helicity filtering is
174C dangerous for the 2->1 topology.169C dangerous for the 2->1 topology.
175C This is because depending on the MC setup the initial PS points170C This is because depending on the MC setup the initial PS points
@@ -182,11 +177,16 @@
182C helicity sum is).177C helicity sum is).
183C For this reason, we simply remove the filterin when there is178C For this reason, we simply remove the filterin when there is
184C only three external particles.179C only three external particles.
185 IF (NEXTERNAL.LE.3) THEN180 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
186 DO IHEL=1,NCOMB181 DO IHEL=1,NCOMB
187 GOODHEL(IHEL)=.TRUE.182 GOODHEL(IHEL)=.TRUE.
188 ENDDO183 ENDDO
184 IF(USERHEL.EQ.-2) USERHEL=-1
189 ENDIF185 ENDIF
186 IF(USERHEL.EQ.-1) NTRY=NTRY+1
187 DO IHEL=1,NEXTERNAL
188 JC(IHEL) = +1
189 ENDDO
190 ANS = 0D0190 ANS = 0D0
191 DO IHEL=1,NCOMB191 DO IHEL=1,NCOMB
192 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN192 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
193193
=== modified file 'tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f'
--- tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f 2018-05-18 12:22:47 +0000
+++ tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f 2019-05-23 07:08:37 +0000
@@ -192,13 +192,6 @@
192C ----------192C ----------
193C BEGIN CODE193C BEGIN CODE
194C ----------194C ----------
195 NTRY=NTRY+1
196 DO IHEL=1,NEXTERNAL
197 JC(IHEL) = +1
198 ENDDO
199 DO I=1,NSQAMPSO
200 ANS(I) = 0D0
201 ENDDO
202C When spin-2 particles are involved, the Helicity filtering is195C When spin-2 particles are involved, the Helicity filtering is
203C dangerous for the 2->1 topology.196C dangerous for the 2->1 topology.
204C This is because depending on the MC setup the initial PS points197C This is because depending on the MC setup the initial PS points
@@ -211,11 +204,21 @@
211C helicity sum is).204C helicity sum is).
212C For this reason, we simply remove the filterin when there is205C For this reason, we simply remove the filterin when there is
213C only three external particles.206C only three external particles.
214 IF (NEXTERNAL.LE.3) THEN207 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
215 DO IHEL=1,NCOMB208 DO IHEL=1,NCOMB
216 GOODHEL(IHEL)=.TRUE.209 GOODHEL(IHEL)=.TRUE.
217 ENDDO210 ENDDO
211 IF(USERHEL.EQ.-2) USERHEL = -1
218 ENDIF212 ENDIF
213
214 NTRY=NTRY+1
215 DO IHEL=1,NEXTERNAL
216 JC(IHEL) = +1
217 ENDDO
218 DO I=1,NSQAMPSO
219 ANS(I) = 0D0
220 ENDDO
221
219 DO IHEL=1,NCOMB222 DO IHEL=1,NCOMB
220 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN223 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
221 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN224 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN
222225
=== modified file 'tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_ampOrderQED2_eq_2_WGTsq_le_14_QCDsq_gt_4.f'
--- 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
+++ 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
@@ -192,13 +192,6 @@
192C ----------192C ----------
193C BEGIN CODE193C BEGIN CODE
194C ----------194C ----------
195 NTRY=NTRY+1
196 DO IHEL=1,NEXTERNAL
197 JC(IHEL) = +1
198 ENDDO
199 DO I=1,NSQAMPSO
200 ANS(I) = 0D0
201 ENDDO
202C When spin-2 particles are involved, the Helicity filtering is195C When spin-2 particles are involved, the Helicity filtering is
203C dangerous for the 2->1 topology.196C dangerous for the 2->1 topology.
204C This is because depending on the MC setup the initial PS points197C This is because depending on the MC setup the initial PS points
@@ -211,11 +204,21 @@
211C helicity sum is).204C helicity sum is).
212C For this reason, we simply remove the filterin when there is205C For this reason, we simply remove the filterin when there is
213C only three external particles.206C only three external particles.
214 IF (NEXTERNAL.LE.3) THEN207 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
215 DO IHEL=1,NCOMB208 DO IHEL=1,NCOMB
216 GOODHEL(IHEL)=.TRUE.209 GOODHEL(IHEL)=.TRUE.
217 ENDDO210 ENDDO
211 IF(USERHEL.EQ.-2) USERHEL = -1
218 ENDIF212 ENDIF
213
214 NTRY=NTRY+1
215 DO IHEL=1,NEXTERNAL
216 JC(IHEL) = +1
217 ENDDO
218 DO I=1,NSQAMPSO
219 ANS(I) = 0D0
220 ENDDO
221
219 DO IHEL=1,NCOMB222 DO IHEL=1,NCOMB
220 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN223 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
221 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN224 IF (GOODHEL(IHEL) .OR. NTRY .LT. 2 .OR.USERHEL.NE.-1) THEN
222225
=== modified file 'tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f'
--- tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f 2018-11-08 22:24:49 +0000
+++ tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P1_uux_uux%loop_matrix.f 2019-05-23 07:08:37 +0000
@@ -636,6 +636,10 @@
636 CALL MG5_1_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)636 CALL MG5_1_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
637 ENDIF637 ENDIF
638638
639 IF(USERHEL.EQ.-2) THEN
640 NTRY = 0
641 ENDIF
642
639 IF(NTRY.EQ.0) THEN643 IF(NTRY.EQ.0) THEN
640 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)644 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
641 $ .OR.(HELICITYFILTERLEVEL.EQ.0)645 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -655,7 +659,7 @@
655 101 CONTINUE659 101 CONTINUE
656 CLOSE(1)660 CLOSE(1)
657661
658 IF (HELICITYFILTERLEVEL.EQ.0) THEN662 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
659 FOUNDHELFILTER=.TRUE.663 FOUNDHELFILTER=.TRUE.
660 DO J=1,NCOMB664 DO J=1,NCOMB
661 GOODHEL(J)=1665 GOODHEL(J)=1
@@ -796,7 +800,7 @@
796 HELPICKED=1800 HELPICKED=1
797 CTMODE=CTMODEINIT801 CTMODE=CTMODEINIT
798 ELSE802 ELSE
799 IF (USERHEL.NE.-1) THEN803 IF (USERHEL.GT.0) THEN
800 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN804 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
801 DO I=0,NSQUAREDSO805 DO I=0,NSQUAREDSO
802 ANS(1,I)=0.0D0806 ANS(1,I)=0.0D0
@@ -806,7 +810,7 @@
806 GOTO 9999810 GOTO 9999
807 ENDIF811 ENDIF
808 ENDIF812 ENDIF
809 HELPICKED=USERHEL813 HELPICKED=MAX(USERHEL,-1)
810 IF (CTMODERUN.NE.-1) THEN814 IF (CTMODERUN.NE.-1) THEN
811 CTMODE=CTMODERUN815 CTMODE=CTMODERUN
812 ELSE816 ELSE
@@ -1069,7 +1073,7 @@
1069 1226 CONTINUE1073 1226 CONTINUE
10701074
1071 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1075 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1072 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1076 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1073C Make sure that that no polarization constraint filters out1077C Make sure that that no polarization constraint filters out
1074C this helicity1078C this helicity
1075 IF (POLARIZATIONS(0,0).EQ.-1.OR.MG5_1_IS_HEL_SELECTED(HELPICK1079 IF (POLARIZATIONS(0,0).EQ.-1.OR.MG5_1_IS_HEL_SELECTED(HELPICK
@@ -1287,7 +1291,7 @@
1287 DO K=1,31291 DO K=1,3
1288 DO I=0,NSQUAREDSO1292 DO I=0,NSQUAREDSO
1289 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1293 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1290 IF (USERHEL.NE.-1) THEN1294 IF (USERHEL.GT.-1) THEN
1291 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1295 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1292 ELSE1296 ELSE
1293 DO J=1,NINITIAL1297 DO J=1,NINITIAL
12941298
=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f'
--- tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f 2018-05-18 12:22:47 +0000
+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f 2019-05-23 07:08:37 +0000
@@ -80,7 +80,6 @@
80 LOGICAL GOODHEL(NCOMB)80 LOGICAL GOODHEL(NCOMB)
81 DATA NTRY/0/81 DATA NTRY/0/
82 DATA GOODHEL/NCOMB*.FALSE./82 DATA GOODHEL/NCOMB*.FALSE./
83
84C 83C
85C GLOBAL VARIABLES84C GLOBAL VARIABLES
86C 85C
@@ -134,10 +133,6 @@
134C ----------133C ----------
135C BEGIN CODE134C BEGIN CODE
136C ----------135C ----------
137 IF(USERHEL.EQ.-1) NTRY=NTRY+1
138 DO IHEL=1,NEXTERNAL
139 JC(IHEL) = +1
140 ENDDO
141C When spin-2 particles are involved, the Helicity filtering is136C When spin-2 particles are involved, the Helicity filtering is
142C dangerous for the 2->1 topology.137C dangerous for the 2->1 topology.
143C This is because depending on the MC setup the initial PS points138C This is because depending on the MC setup the initial PS points
@@ -150,11 +145,16 @@
150C helicity sum is).145C helicity sum is).
151C For this reason, we simply remove the filterin when there is146C For this reason, we simply remove the filterin when there is
152C only three external particles.147C only three external particles.
153 IF (NEXTERNAL.LE.3) THEN148 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
154 DO IHEL=1,NCOMB149 DO IHEL=1,NCOMB
155 GOODHEL(IHEL)=.TRUE.150 GOODHEL(IHEL)=.TRUE.
156 ENDDO151 ENDDO
152 IF(USERHEL.EQ.-2) USERHEL=-1
157 ENDIF153 ENDIF
154 IF(USERHEL.EQ.-1) NTRY=NTRY+1
155 DO IHEL=1,NEXTERNAL
156 JC(IHEL) = +1
157 ENDDO
158 ANS = 0D0158 ANS = 0D0
159 DO IHEL=1,NCOMB159 DO IHEL=1,NCOMB
160 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN160 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
161161
=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/loop_matrix.f'
--- tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/loop_matrix.f 2017-08-14 07:04:15 +0000
+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/loop_matrix.f 2019-05-23 07:08:37 +0000
@@ -492,7 +492,7 @@
492C helicity is asked492C helicity is asked
493 NROTATIONS_DP_BU = NROTATIONS_DP493 NROTATIONS_DP_BU = NROTATIONS_DP
494 NROTATIONS_QP_BU = NROTATIONS_QP494 NROTATIONS_QP_BU = NROTATIONS_QP
495 IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.NE.-1) THEN495 IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.GT.-1) THEN
496 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN496 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
497 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'497 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'
498 $ //' asked for this PS point, and there is a spin-2 (or'498 $ //' asked for this PS point, and there is a spin-2 (or'
@@ -531,7 +531,7 @@
531 ENDDO531 ENDDO
532 101 CONTINUE532 101 CONTINUE
533 CLOSE(1)533 CLOSE(1)
534 IF (HELICITYFILTERLEVEL.EQ.0) THEN534 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
535 FOUNDHELFILTER=.TRUE.535 FOUNDHELFILTER=.TRUE.
536 DO J=1,NCOMB536 DO J=1,NCOMB
537 GOODHEL(J)=.TRUE.537 GOODHEL(J)=.TRUE.
@@ -636,7 +636,7 @@
636 HELPICKED=1636 HELPICKED=1
637 CTMODE=CTMODEINIT637 CTMODE=CTMODEINIT
638 ELSE638 ELSE
639 IF (USERHEL.NE.-1) THEN639 IF (USERHEL.GT.0) THEN
640 IF(.NOT.GOODHEL(USERHEL)) THEN640 IF(.NOT.GOODHEL(USERHEL)) THEN
641 ANS(1)=0.0D0641 ANS(1)=0.0D0
642 ANS(2)=0.0D0642 ANS(2)=0.0D0
@@ -644,7 +644,7 @@
644 GOTO 9999644 GOTO 9999
645 ENDIF645 ENDIF
646 ENDIF646 ENDIF
647 HELPICKED=USERHEL647 HELPICKED=MAX(USERHEL,-1)
648 IF (CTMODERUN.GT.-1) THEN648 IF (CTMODERUN.GT.-1) THEN
649 CTMODE=CTMODERUN649 CTMODE=CTMODERUN
650 ELSE650 ELSE
@@ -898,7 +898,7 @@
898 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN898 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
899C Update of NEXTREF, will be used for loop induced only.899C Update of NEXTREF, will be used for loop induced only.
900 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)900 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)
901 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN901 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
902 BUFFR(1)=BUFFR(1)+ANS(1)902 BUFFR(1)=BUFFR(1)+ANS(1)
903 BUFFR(2)=BUFFR(2)+ANS(2)903 BUFFR(2)=BUFFR(2)+ANS(2)
904 BUFFR(3)=BUFFR(3)+ANS(3)904 BUFFR(3)=BUFFR(3)+ANS(3)
@@ -1010,7 +1010,7 @@
10101010
1011 DO K=1,31011 DO K=1,3
1012 ANS(K)=ANS(K)/DBLE(IDEN)1012 ANS(K)=ANS(K)/DBLE(IDEN)
1013 IF (USERHEL.NE.-1) THEN1013 IF (USERHEL.GT.-1) THEN
1014 ANS(K)=ANS(K)*HELAVGFACTOR1014 ANS(K)=ANS(K)*HELAVGFACTOR
1015 ELSE1015 ELSE
1016 DO J=1,NINITIAL1016 DO J=1,NINITIAL
10171017
=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f'
--- tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f 2018-05-18 12:22:47 +0000
+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f 2019-05-23 07:08:37 +0000
@@ -80,7 +80,6 @@
80 LOGICAL GOODHEL(NCOMB)80 LOGICAL GOODHEL(NCOMB)
81 DATA NTRY/0/81 DATA NTRY/0/
82 DATA GOODHEL/NCOMB*.FALSE./82 DATA GOODHEL/NCOMB*.FALSE./
83
84C 83C
85C GLOBAL VARIABLES84C GLOBAL VARIABLES
86C 85C
@@ -150,10 +149,6 @@
150C ----------149C ----------
151C BEGIN CODE150C BEGIN CODE
152C ----------151C ----------
153 IF(USERHEL.EQ.-1) NTRY=NTRY+1
154 DO IHEL=1,NEXTERNAL
155 JC(IHEL) = +1
156 ENDDO
157C When spin-2 particles are involved, the Helicity filtering is152C When spin-2 particles are involved, the Helicity filtering is
158C dangerous for the 2->1 topology.153C dangerous for the 2->1 topology.
159C This is because depending on the MC setup the initial PS points154C This is because depending on the MC setup the initial PS points
@@ -166,11 +161,16 @@
166C helicity sum is).161C helicity sum is).
167C For this reason, we simply remove the filterin when there is162C For this reason, we simply remove the filterin when there is
168C only three external particles.163C only three external particles.
169 IF (NEXTERNAL.LE.3) THEN164 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
170 DO IHEL=1,NCOMB165 DO IHEL=1,NCOMB
171 GOODHEL(IHEL)=.TRUE.166 GOODHEL(IHEL)=.TRUE.
172 ENDDO167 ENDDO
168 IF(USERHEL.EQ.-2) USERHEL=-1
173 ENDIF169 ENDIF
170 IF(USERHEL.EQ.-1) NTRY=NTRY+1
171 DO IHEL=1,NEXTERNAL
172 JC(IHEL) = +1
173 ENDDO
174 ANS = 0D0174 ANS = 0D0
175 DO IHEL=1,NCOMB175 DO IHEL=1,NCOMB
176 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN176 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
177177
=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/loop_matrix.f'
--- tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/loop_matrix.f 2017-08-15 19:34:40 +0000
+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/loop_matrix.f 2019-05-23 07:08:37 +0000
@@ -492,7 +492,7 @@
492C helicity is asked492C helicity is asked
493 NROTATIONS_DP_BU = NROTATIONS_DP493 NROTATIONS_DP_BU = NROTATIONS_DP
494 NROTATIONS_QP_BU = NROTATIONS_QP494 NROTATIONS_QP_BU = NROTATIONS_QP
495 IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.NE.-1) THEN495 IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.GT.-1) THEN
496 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN496 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
497 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'497 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'
498 $ //' asked for this PS point, and there is a spin-2 (or'498 $ //' asked for this PS point, and there is a spin-2 (or'
@@ -531,7 +531,7 @@
531 ENDDO531 ENDDO
532 101 CONTINUE532 101 CONTINUE
533 CLOSE(1)533 CLOSE(1)
534 IF (HELICITYFILTERLEVEL.EQ.0) THEN534 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
535 FOUNDHELFILTER=.TRUE.535 FOUNDHELFILTER=.TRUE.
536 DO J=1,NCOMB536 DO J=1,NCOMB
537 GOODHEL(J)=.TRUE.537 GOODHEL(J)=.TRUE.
@@ -636,7 +636,7 @@
636 HELPICKED=1636 HELPICKED=1
637 CTMODE=CTMODEINIT637 CTMODE=CTMODEINIT
638 ELSE638 ELSE
639 IF (USERHEL.NE.-1) THEN639 IF (USERHEL.GT.0) THEN
640 IF(.NOT.GOODHEL(USERHEL)) THEN640 IF(.NOT.GOODHEL(USERHEL)) THEN
641 ANS(1)=0.0D0641 ANS(1)=0.0D0
642 ANS(2)=0.0D0642 ANS(2)=0.0D0
@@ -644,7 +644,7 @@
644 GOTO 9999644 GOTO 9999
645 ENDIF645 ENDIF
646 ENDIF646 ENDIF
647 HELPICKED=USERHEL647 HELPICKED=MAX(USERHEL,-1)
648 IF (CTMODERUN.GT.-1) THEN648 IF (CTMODERUN.GT.-1) THEN
649 CTMODE=CTMODERUN649 CTMODE=CTMODERUN
650 ELSE650 ELSE
@@ -2014,7 +2014,7 @@
2014 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN2014 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
2015C Update of NEXTREF, will be used for loop induced only.2015C Update of NEXTREF, will be used for loop induced only.
2016 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)2016 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)
2017 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN2017 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
2018 BUFFR(1)=BUFFR(1)+ANS(1)2018 BUFFR(1)=BUFFR(1)+ANS(1)
2019 BUFFR(2)=BUFFR(2)+ANS(2)2019 BUFFR(2)=BUFFR(2)+ANS(2)
2020 BUFFR(3)=BUFFR(3)+ANS(3)2020 BUFFR(3)=BUFFR(3)+ANS(3)
@@ -2126,7 +2126,7 @@
21262126
2127 DO K=1,32127 DO K=1,3
2128 ANS(K)=ANS(K)/DBLE(IDEN)2128 ANS(K)=ANS(K)/DBLE(IDEN)
2129 IF (USERHEL.NE.-1) THEN2129 IF (USERHEL.GT.-1) THEN
2130 ANS(K)=ANS(K)*HELAVGFACTOR2130 ANS(K)=ANS(K)*HELAVGFACTOR
2131 ELSE2131 ELSE
2132 DO J=1,NINITIAL2132 DO J=1,NINITIAL
21332133
=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f'
--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f 2018-05-18 12:22:47 +0000
+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f 2019-05-23 07:08:37 +0000
@@ -80,7 +80,6 @@
80 LOGICAL GOODHEL(NCOMB)80 LOGICAL GOODHEL(NCOMB)
81 DATA NTRY/0/81 DATA NTRY/0/
82 DATA GOODHEL/NCOMB*.FALSE./82 DATA GOODHEL/NCOMB*.FALSE./
83
84C 83C
85C GLOBAL VARIABLES84C GLOBAL VARIABLES
86C 85C
@@ -134,10 +133,6 @@
134C ----------133C ----------
135C BEGIN CODE134C BEGIN CODE
136C ----------135C ----------
137 IF(USERHEL.EQ.-1) NTRY=NTRY+1
138 DO IHEL=1,NEXTERNAL
139 JC(IHEL) = +1
140 ENDDO
141C When spin-2 particles are involved, the Helicity filtering is136C When spin-2 particles are involved, the Helicity filtering is
142C dangerous for the 2->1 topology.137C dangerous for the 2->1 topology.
143C This is because depending on the MC setup the initial PS points138C This is because depending on the MC setup the initial PS points
@@ -150,11 +145,16 @@
150C helicity sum is).145C helicity sum is).
151C For this reason, we simply remove the filterin when there is146C For this reason, we simply remove the filterin when there is
152C only three external particles.147C only three external particles.
153 IF (NEXTERNAL.LE.3) THEN148 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
154 DO IHEL=1,NCOMB149 DO IHEL=1,NCOMB
155 GOODHEL(IHEL)=.TRUE.150 GOODHEL(IHEL)=.TRUE.
156 ENDDO151 ENDDO
152 IF(USERHEL.EQ.-2) USERHEL=-1
157 ENDIF153 ENDIF
154 IF(USERHEL.EQ.-1) NTRY=NTRY+1
155 DO IHEL=1,NEXTERNAL
156 JC(IHEL) = +1
157 ENDDO
158 ANS = 0D0158 ANS = 0D0
159 DO IHEL=1,NCOMB159 DO IHEL=1,NCOMB
160 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN160 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
161161
=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f'
--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f 2017-08-15 19:34:40 +0000
+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/loop_matrix.f 2019-05-23 07:08:37 +0000
@@ -636,6 +636,10 @@
636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
637 ENDIF637 ENDIF
638638
639 IF(USERHEL.EQ.-2) THEN
640 NTRY = 0
641 ENDIF
642
639 IF(NTRY.EQ.0) THEN643 IF(NTRY.EQ.0) THEN
640 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)644 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
641 $ .OR.(HELICITYFILTERLEVEL.EQ.0)645 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -655,7 +659,7 @@
655 101 CONTINUE659 101 CONTINUE
656 CLOSE(1)660 CLOSE(1)
657661
658 IF (HELICITYFILTERLEVEL.EQ.0) THEN662 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
659 FOUNDHELFILTER=.TRUE.663 FOUNDHELFILTER=.TRUE.
660 DO J=1,NCOMB664 DO J=1,NCOMB
661 GOODHEL(J)=1665 GOODHEL(J)=1
@@ -796,7 +800,7 @@
796 HELPICKED=1800 HELPICKED=1
797 CTMODE=CTMODEINIT801 CTMODE=CTMODEINIT
798 ELSE802 ELSE
799 IF (USERHEL.NE.-1) THEN803 IF (USERHEL.GT.0) THEN
800 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN804 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
801 DO I=0,NSQUAREDSO805 DO I=0,NSQUAREDSO
802 ANS(1,I)=0.0D0806 ANS(1,I)=0.0D0
@@ -806,7 +810,7 @@
806 GOTO 9999810 GOTO 9999
807 ENDIF811 ENDIF
808 ENDIF812 ENDIF
809 HELPICKED=USERHEL813 HELPICKED=MAX(USERHEL,-1)
810 IF (CTMODERUN.NE.-1) THEN814 IF (CTMODERUN.NE.-1) THEN
811 CTMODE=CTMODERUN815 CTMODE=CTMODERUN
812 ELSE816 ELSE
@@ -1063,7 +1067,7 @@
1063 1226 CONTINUE1067 1226 CONTINUE
10641068
1065 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1069 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1066 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1070 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1067C Make sure that that no polarization constraint filters out1071C Make sure that that no polarization constraint filters out
1068C this helicity1072C this helicity
1069 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1073 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1281,7 +1285,7 @@
1281 DO K=1,31285 DO K=1,3
1282 DO I=0,NSQUAREDSO1286 DO I=0,NSQUAREDSO
1283 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1287 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1284 IF (USERHEL.NE.-1) THEN1288 IF (USERHEL.GT.-1) THEN
1285 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1289 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1286 ELSE1290 ELSE
1287 DO J=1,NINITIAL1291 DO J=1,NINITIAL
12881292
=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/born_matrix.f'
--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/born_matrix.f 2018-05-18 12:22:47 +0000
+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/born_matrix.f 2019-05-23 07:08:37 +0000
@@ -80,7 +80,6 @@
80 LOGICAL GOODHEL(NCOMB)80 LOGICAL GOODHEL(NCOMB)
81 DATA NTRY/0/81 DATA NTRY/0/
82 DATA GOODHEL/NCOMB*.FALSE./82 DATA GOODHEL/NCOMB*.FALSE./
83
84C 83C
85C GLOBAL VARIABLES84C GLOBAL VARIABLES
86C 85C
@@ -150,10 +149,6 @@
150C ----------149C ----------
151C BEGIN CODE150C BEGIN CODE
152C ----------151C ----------
153 IF(USERHEL.EQ.-1) NTRY=NTRY+1
154 DO IHEL=1,NEXTERNAL
155 JC(IHEL) = +1
156 ENDDO
157C When spin-2 particles are involved, the Helicity filtering is152C When spin-2 particles are involved, the Helicity filtering is
158C dangerous for the 2->1 topology.153C dangerous for the 2->1 topology.
159C This is because depending on the MC setup the initial PS points154C This is because depending on the MC setup the initial PS points
@@ -166,11 +161,16 @@
166C helicity sum is).161C helicity sum is).
167C For this reason, we simply remove the filterin when there is162C For this reason, we simply remove the filterin when there is
168C only three external particles.163C only three external particles.
169 IF (NEXTERNAL.LE.3) THEN164 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
170 DO IHEL=1,NCOMB165 DO IHEL=1,NCOMB
171 GOODHEL(IHEL)=.TRUE.166 GOODHEL(IHEL)=.TRUE.
172 ENDDO167 ENDDO
168 IF(USERHEL.EQ.-2) USERHEL=-1
173 ENDIF169 ENDIF
170 IF(USERHEL.EQ.-1) NTRY=NTRY+1
171 DO IHEL=1,NEXTERNAL
172 JC(IHEL) = +1
173 ENDDO
174 ANS = 0D0174 ANS = 0D0
175 DO IHEL=1,NCOMB175 DO IHEL=1,NCOMB
176 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN176 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
177177
=== modified file 'tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f'
--- tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f 2017-08-14 07:04:15 +0000
+++ tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/loop_matrix.f 2019-05-23 07:08:37 +0000
@@ -636,6 +636,10 @@
636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
637 ENDIF637 ENDIF
638638
639 IF(USERHEL.EQ.-2) THEN
640 NTRY = 0
641 ENDIF
642
639 IF(NTRY.EQ.0) THEN643 IF(NTRY.EQ.0) THEN
640 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)644 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
641 $ .OR.(HELICITYFILTERLEVEL.EQ.0)645 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -655,7 +659,7 @@
655 101 CONTINUE659 101 CONTINUE
656 CLOSE(1)660 CLOSE(1)
657661
658 IF (HELICITYFILTERLEVEL.EQ.0) THEN662 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
659 FOUNDHELFILTER=.TRUE.663 FOUNDHELFILTER=.TRUE.
660 DO J=1,NCOMB664 DO J=1,NCOMB
661 GOODHEL(J)=1665 GOODHEL(J)=1
@@ -796,7 +800,7 @@
796 HELPICKED=1800 HELPICKED=1
797 CTMODE=CTMODEINIT801 CTMODE=CTMODEINIT
798 ELSE802 ELSE
799 IF (USERHEL.NE.-1) THEN803 IF (USERHEL.GT.0) THEN
800 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN804 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
801 DO I=0,NSQUAREDSO805 DO I=0,NSQUAREDSO
802 ANS(1,I)=0.0D0806 ANS(1,I)=0.0D0
@@ -806,7 +810,7 @@
806 GOTO 9999810 GOTO 9999
807 ENDIF811 ENDIF
808 ENDIF812 ENDIF
809 HELPICKED=USERHEL813 HELPICKED=MAX(USERHEL,-1)
810 IF (CTMODERUN.NE.-1) THEN814 IF (CTMODERUN.NE.-1) THEN
811 CTMODE=CTMODERUN815 CTMODE=CTMODERUN
812 ELSE816 ELSE
@@ -1063,7 +1067,7 @@
1063 1226 CONTINUE1067 1226 CONTINUE
10641068
1065 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1069 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1066 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1070 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1067C Make sure that that no polarization constraint filters out1071C Make sure that that no polarization constraint filters out
1068C this helicity1072C this helicity
1069 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1073 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1281,7 +1285,7 @@
1281 DO K=1,31285 DO K=1,3
1282 DO I=0,NSQUAREDSO1286 DO I=0,NSQUAREDSO
1283 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1287 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1284 IF (USERHEL.NE.-1) THEN1288 IF (USERHEL.GT.-1) THEN
1285 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1289 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1286 ELSE1290 ELSE
1287 DO J=1,NINITIAL1291 DO J=1,NINITIAL
12881292
=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/loop_matrix.f'
--- tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/loop_matrix.f 2017-08-15 19:34:40 +0000
+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/loop_matrix.f 2019-05-23 07:08:37 +0000
@@ -490,7 +490,7 @@
490C helicity is asked490C helicity is asked
491 NROTATIONS_DP_BU = NROTATIONS_DP491 NROTATIONS_DP_BU = NROTATIONS_DP
492 NROTATIONS_QP_BU = NROTATIONS_QP492 NROTATIONS_QP_BU = NROTATIONS_QP
493 IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.NE.-1) THEN493 IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.GT.-1) THEN
494 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN494 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
495 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'495 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'
496 $ //' asked for this PS point, and there is a spin-2 (or'496 $ //' asked for this PS point, and there is a spin-2 (or'
@@ -529,7 +529,7 @@
529 ENDDO529 ENDDO
530 101 CONTINUE530 101 CONTINUE
531 CLOSE(1)531 CLOSE(1)
532 IF (HELICITYFILTERLEVEL.EQ.0) THEN532 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
533 FOUNDHELFILTER=.TRUE.533 FOUNDHELFILTER=.TRUE.
534 DO J=1,NCOMB534 DO J=1,NCOMB
535 GOODHEL(J)=.TRUE.535 GOODHEL(J)=.TRUE.
@@ -634,7 +634,7 @@
634 HELPICKED=1634 HELPICKED=1
635 CTMODE=CTMODEINIT635 CTMODE=CTMODEINIT
636 ELSE636 ELSE
637 IF (USERHEL.NE.-1) THEN637 IF (USERHEL.GT.0) THEN
638 IF(.NOT.GOODHEL(USERHEL)) THEN638 IF(.NOT.GOODHEL(USERHEL)) THEN
639 ANS(1)=0.0D0639 ANS(1)=0.0D0
640 ANS(2)=0.0D0640 ANS(2)=0.0D0
@@ -642,7 +642,7 @@
642 GOTO 9999642 GOTO 9999
643 ENDIF643 ENDIF
644 ENDIF644 ENDIF
645 HELPICKED=USERHEL645 HELPICKED=MAX(USERHEL,-1)
646 IF (CTMODERUN.GT.-1) THEN646 IF (CTMODERUN.GT.-1) THEN
647 CTMODE=CTMODERUN647 CTMODE=CTMODERUN
648 ELSE648 ELSE
@@ -922,7 +922,7 @@
922 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN922 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
923C Update of NEXTREF, will be used for loop induced only.923C Update of NEXTREF, will be used for loop induced only.
924 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)924 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)
925 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN925 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
926 BUFFR(1)=BUFFR(1)+ANS(1)926 BUFFR(1)=BUFFR(1)+ANS(1)
927 BUFFR(2)=BUFFR(2)+ANS(2)927 BUFFR(2)=BUFFR(2)+ANS(2)
928 BUFFR(3)=BUFFR(3)+ANS(3)928 BUFFR(3)=BUFFR(3)+ANS(3)
@@ -1034,7 +1034,7 @@
10341034
1035 DO K=1,31035 DO K=1,3
1036 ANS(K)=ANS(K)/DBLE(IDEN)1036 ANS(K)=ANS(K)/DBLE(IDEN)
1037 IF (USERHEL.NE.-1) THEN1037 IF (USERHEL.GT.-1) THEN
1038 ANS(K)=ANS(K)*HELAVGFACTOR1038 ANS(K)=ANS(K)*HELAVGFACTOR
1039 ELSE1039 ELSE
1040 DO J=1,NINITIAL1040 DO J=1,NINITIAL
10411041
=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/born_matrix.f'
--- tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/born_matrix.f 2018-05-18 12:22:47 +0000
+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/born_matrix.f 2019-05-23 07:08:37 +0000
@@ -80,7 +80,6 @@
80 LOGICAL GOODHEL(NCOMB)80 LOGICAL GOODHEL(NCOMB)
81 DATA NTRY/0/81 DATA NTRY/0/
82 DATA GOODHEL/NCOMB*.FALSE./82 DATA GOODHEL/NCOMB*.FALSE./
83
84C 83C
85C GLOBAL VARIABLES84C GLOBAL VARIABLES
86C 85C
@@ -118,10 +117,6 @@
118C ----------117C ----------
119C BEGIN CODE118C BEGIN CODE
120C ----------119C ----------
121 IF(USERHEL.EQ.-1) NTRY=NTRY+1
122 DO IHEL=1,NEXTERNAL
123 JC(IHEL) = +1
124 ENDDO
125C When spin-2 particles are involved, the Helicity filtering is120C When spin-2 particles are involved, the Helicity filtering is
126C dangerous for the 2->1 topology.121C dangerous for the 2->1 topology.
127C This is because depending on the MC setup the initial PS points122C This is because depending on the MC setup the initial PS points
@@ -134,11 +129,16 @@
134C helicity sum is).129C helicity sum is).
135C For this reason, we simply remove the filterin when there is130C For this reason, we simply remove the filterin when there is
136C only three external particles.131C only three external particles.
137 IF (NEXTERNAL.LE.3) THEN132 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
138 DO IHEL=1,NCOMB133 DO IHEL=1,NCOMB
139 GOODHEL(IHEL)=.TRUE.134 GOODHEL(IHEL)=.TRUE.
140 ENDDO135 ENDDO
136 IF(USERHEL.EQ.-2) USERHEL=-1
141 ENDIF137 ENDIF
138 IF(USERHEL.EQ.-1) NTRY=NTRY+1
139 DO IHEL=1,NEXTERNAL
140 JC(IHEL) = +1
141 ENDDO
142 ANS = 0D0142 ANS = 0D0
143 DO IHEL=1,NCOMB143 DO IHEL=1,NCOMB
144 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN144 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
145145
=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/loop_matrix.f'
--- tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/loop_matrix.f 2017-08-15 19:34:40 +0000
+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/loop_matrix.f 2019-05-23 07:08:37 +0000
@@ -492,7 +492,7 @@
492C helicity is asked492C helicity is asked
493 NROTATIONS_DP_BU = NROTATIONS_DP493 NROTATIONS_DP_BU = NROTATIONS_DP
494 NROTATIONS_QP_BU = NROTATIONS_QP494 NROTATIONS_QP_BU = NROTATIONS_QP
495 IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.NE.-1) THEN495 IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.GT.-1) THEN
496 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN496 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
497 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'497 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'
498 $ //' asked for this PS point, and there is a spin-2 (or'498 $ //' asked for this PS point, and there is a spin-2 (or'
@@ -531,7 +531,7 @@
531 ENDDO531 ENDDO
532 101 CONTINUE532 101 CONTINUE
533 CLOSE(1)533 CLOSE(1)
534 IF (HELICITYFILTERLEVEL.EQ.0) THEN534 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
535 FOUNDHELFILTER=.TRUE.535 FOUNDHELFILTER=.TRUE.
536 DO J=1,NCOMB536 DO J=1,NCOMB
537 GOODHEL(J)=.TRUE.537 GOODHEL(J)=.TRUE.
@@ -636,7 +636,7 @@
636 HELPICKED=1636 HELPICKED=1
637 CTMODE=CTMODEINIT637 CTMODE=CTMODEINIT
638 ELSE638 ELSE
639 IF (USERHEL.NE.-1) THEN639 IF (USERHEL.GT.0) THEN
640 IF(.NOT.GOODHEL(USERHEL)) THEN640 IF(.NOT.GOODHEL(USERHEL)) THEN
641 ANS(1)=0.0D0641 ANS(1)=0.0D0
642 ANS(2)=0.0D0642 ANS(2)=0.0D0
@@ -644,7 +644,7 @@
644 GOTO 9999644 GOTO 9999
645 ENDIF645 ENDIF
646 ENDIF646 ENDIF
647 HELPICKED=USERHEL647 HELPICKED=MAX(USERHEL,-1)
648 IF (CTMODERUN.GT.-1) THEN648 IF (CTMODERUN.GT.-1) THEN
649 CTMODE=CTMODERUN649 CTMODE=CTMODERUN
650 ELSE650 ELSE
@@ -888,7 +888,7 @@
888 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN888 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
889C Update of NEXTREF, will be used for loop induced only.889C Update of NEXTREF, will be used for loop induced only.
890 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)890 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)
891 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN891 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
892 BUFFR(1)=BUFFR(1)+ANS(1)892 BUFFR(1)=BUFFR(1)+ANS(1)
893 BUFFR(2)=BUFFR(2)+ANS(2)893 BUFFR(2)=BUFFR(2)+ANS(2)
894 BUFFR(3)=BUFFR(3)+ANS(3)894 BUFFR(3)=BUFFR(3)+ANS(3)
@@ -1000,7 +1000,7 @@
10001000
1001 DO K=1,31001 DO K=1,3
1002 ANS(K)=ANS(K)/DBLE(IDEN)1002 ANS(K)=ANS(K)/DBLE(IDEN)
1003 IF (USERHEL.NE.-1) THEN1003 IF (USERHEL.GT.-1) THEN
1004 ANS(K)=ANS(K)*HELAVGFACTOR1004 ANS(K)=ANS(K)*HELAVGFACTOR
1005 ELSE1005 ELSE
1006 DO J=1,NINITIAL1006 DO J=1,NINITIAL
10071007
=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/born_matrix.f'
--- tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/born_matrix.f 2018-05-18 12:22:47 +0000
+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/born_matrix.f 2019-05-23 07:08:37 +0000
@@ -80,7 +80,6 @@
80 LOGICAL GOODHEL(NCOMB)80 LOGICAL GOODHEL(NCOMB)
81 DATA NTRY/0/81 DATA NTRY/0/
82 DATA GOODHEL/NCOMB*.FALSE./82 DATA GOODHEL/NCOMB*.FALSE./
83
84C 83C
85C GLOBAL VARIABLES84C GLOBAL VARIABLES
86C 85C
@@ -118,10 +117,6 @@
118C ----------117C ----------
119C BEGIN CODE118C BEGIN CODE
120C ----------119C ----------
121 IF(USERHEL.EQ.-1) NTRY=NTRY+1
122 DO IHEL=1,NEXTERNAL
123 JC(IHEL) = +1
124 ENDDO
125C When spin-2 particles are involved, the Helicity filtering is120C When spin-2 particles are involved, the Helicity filtering is
126C dangerous for the 2->1 topology.121C dangerous for the 2->1 topology.
127C This is because depending on the MC setup the initial PS points122C This is because depending on the MC setup the initial PS points
@@ -134,11 +129,16 @@
134C helicity sum is).129C helicity sum is).
135C For this reason, we simply remove the filterin when there is130C For this reason, we simply remove the filterin when there is
136C only three external particles.131C only three external particles.
137 IF (NEXTERNAL.LE.3) THEN132 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
138 DO IHEL=1,NCOMB133 DO IHEL=1,NCOMB
139 GOODHEL(IHEL)=.TRUE.134 GOODHEL(IHEL)=.TRUE.
140 ENDDO135 ENDDO
136 IF(USERHEL.EQ.-2) USERHEL=-1
141 ENDIF137 ENDIF
138 IF(USERHEL.EQ.-1) NTRY=NTRY+1
139 DO IHEL=1,NEXTERNAL
140 JC(IHEL) = +1
141 ENDDO
142 ANS = 0D0142 ANS = 0D0
143 DO IHEL=1,NCOMB143 DO IHEL=1,NCOMB
144 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN144 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
145145
=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/loop_matrix.f'
--- tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/loop_matrix.f 2017-08-14 07:04:15 +0000
+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/loop_matrix.f 2019-05-23 07:08:37 +0000
@@ -492,7 +492,7 @@
492C helicity is asked492C helicity is asked
493 NROTATIONS_DP_BU = NROTATIONS_DP493 NROTATIONS_DP_BU = NROTATIONS_DP
494 NROTATIONS_QP_BU = NROTATIONS_QP494 NROTATIONS_QP_BU = NROTATIONS_QP
495 IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.NE.-1) THEN495 IF(MAX_SPIN_EXTERNAL_PARTICLE.GT.3.AND.USERHEL.GT.-1) THEN
496 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN496 IF(.NOT.WARNED_LORENTZ_STAB_TEST_OFF) THEN
497 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'497 WRITE(*,*) '##WARNING: Evaluation of a specific helicity was'
498 $ //' asked for this PS point, and there is a spin-2 (or'498 $ //' asked for this PS point, and there is a spin-2 (or'
@@ -531,7 +531,7 @@
531 ENDDO531 ENDDO
532 101 CONTINUE532 101 CONTINUE
533 CLOSE(1)533 CLOSE(1)
534 IF (HELICITYFILTERLEVEL.EQ.0) THEN534 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
535 FOUNDHELFILTER=.TRUE.535 FOUNDHELFILTER=.TRUE.
536 DO J=1,NCOMB536 DO J=1,NCOMB
537 GOODHEL(J)=.TRUE.537 GOODHEL(J)=.TRUE.
@@ -636,7 +636,7 @@
636 HELPICKED=1636 HELPICKED=1
637 CTMODE=CTMODEINIT637 CTMODE=CTMODEINIT
638 ELSE638 ELSE
639 IF (USERHEL.NE.-1) THEN639 IF (USERHEL.GT.0) THEN
640 IF(.NOT.GOODHEL(USERHEL)) THEN640 IF(.NOT.GOODHEL(USERHEL)) THEN
641 ANS(1)=0.0D0641 ANS(1)=0.0D0
642 ANS(2)=0.0D0642 ANS(2)=0.0D0
@@ -644,7 +644,7 @@
644 GOTO 9999644 GOTO 9999
645 ENDIF645 ENDIF
646 ENDIF646 ENDIF
647 HELPICKED=USERHEL647 HELPICKED=MAX(USERHEL,-1)
648 IF (CTMODERUN.GT.-1) THEN648 IF (CTMODERUN.GT.-1) THEN
649 CTMODE=CTMODERUN649 CTMODE=CTMODERUN
650 ELSE650 ELSE
@@ -1151,7 +1151,7 @@
1151 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1151 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1152C Update of NEXTREF, will be used for loop induced only.1152C Update of NEXTREF, will be used for loop induced only.
1153 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)1153 NEXTREF = NEXTREF + ANS(1) + ANS(2) + ANS(3)
1154 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1154 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1155 BUFFR(1)=BUFFR(1)+ANS(1)1155 BUFFR(1)=BUFFR(1)+ANS(1)
1156 BUFFR(2)=BUFFR(2)+ANS(2)1156 BUFFR(2)=BUFFR(2)+ANS(2)
1157 BUFFR(3)=BUFFR(3)+ANS(3)1157 BUFFR(3)=BUFFR(3)+ANS(3)
@@ -1263,7 +1263,7 @@
12631263
1264 DO K=1,31264 DO K=1,3
1265 ANS(K)=ANS(K)/DBLE(IDEN)1265 ANS(K)=ANS(K)/DBLE(IDEN)
1266 IF (USERHEL.NE.-1) THEN1266 IF (USERHEL.GT.-1) THEN
1267 ANS(K)=ANS(K)*HELAVGFACTOR1267 ANS(K)=ANS(K)*HELAVGFACTOR
1268 ELSE1268 ELSE
1269 DO J=1,NINITIAL1269 DO J=1,NINITIAL
12701270
=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/born_matrix.f'
--- tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/born_matrix.f 2018-05-18 12:22:47 +0000
+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/born_matrix.f 2019-05-23 07:08:37 +0000
@@ -80,7 +80,6 @@
80 LOGICAL GOODHEL(NCOMB)80 LOGICAL GOODHEL(NCOMB)
81 DATA NTRY/0/81 DATA NTRY/0/
82 DATA GOODHEL/NCOMB*.FALSE./82 DATA GOODHEL/NCOMB*.FALSE./
83
84C 83C
85C GLOBAL VARIABLES84C GLOBAL VARIABLES
86C 85C
@@ -118,10 +117,6 @@
118C ----------117C ----------
119C BEGIN CODE118C BEGIN CODE
120C ----------119C ----------
121 IF(USERHEL.EQ.-1) NTRY=NTRY+1
122 DO IHEL=1,NEXTERNAL
123 JC(IHEL) = +1
124 ENDDO
125C When spin-2 particles are involved, the Helicity filtering is120C When spin-2 particles are involved, the Helicity filtering is
126C dangerous for the 2->1 topology.121C dangerous for the 2->1 topology.
127C This is because depending on the MC setup the initial PS points122C This is because depending on the MC setup the initial PS points
@@ -134,11 +129,16 @@
134C helicity sum is).129C helicity sum is).
135C For this reason, we simply remove the filterin when there is130C For this reason, we simply remove the filterin when there is
136C only three external particles.131C only three external particles.
137 IF (NEXTERNAL.LE.3) THEN132 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
138 DO IHEL=1,NCOMB133 DO IHEL=1,NCOMB
139 GOODHEL(IHEL)=.TRUE.134 GOODHEL(IHEL)=.TRUE.
140 ENDDO135 ENDDO
136 IF(USERHEL.EQ.-2) USERHEL=-1
141 ENDIF137 ENDIF
138 IF(USERHEL.EQ.-1) NTRY=NTRY+1
139 DO IHEL=1,NEXTERNAL
140 JC(IHEL) = +1
141 ENDDO
142 ANS = 0D0142 ANS = 0D0
143 DO IHEL=1,NCOMB143 DO IHEL=1,NCOMB
144 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN144 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
145145
=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f'
--- tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f 2017-08-14 07:04:15 +0000
+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/loop_matrix.f 2019-05-23 07:08:37 +0000
@@ -636,6 +636,10 @@
636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
637 ENDIF637 ENDIF
638638
639 IF(USERHEL.EQ.-2) THEN
640 NTRY = 0
641 ENDIF
642
639 IF(NTRY.EQ.0) THEN643 IF(NTRY.EQ.0) THEN
640 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)644 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
641 $ .OR.(HELICITYFILTERLEVEL.EQ.0)645 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -655,7 +659,7 @@
655 101 CONTINUE659 101 CONTINUE
656 CLOSE(1)660 CLOSE(1)
657661
658 IF (HELICITYFILTERLEVEL.EQ.0) THEN662 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
659 FOUNDHELFILTER=.TRUE.663 FOUNDHELFILTER=.TRUE.
660 DO J=1,NCOMB664 DO J=1,NCOMB
661 GOODHEL(J)=1665 GOODHEL(J)=1
@@ -796,7 +800,7 @@
796 HELPICKED=1800 HELPICKED=1
797 CTMODE=CTMODEINIT801 CTMODE=CTMODEINIT
798 ELSE802 ELSE
799 IF (USERHEL.NE.-1) THEN803 IF (USERHEL.GT.0) THEN
800 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN804 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
801 DO I=0,NSQUAREDSO805 DO I=0,NSQUAREDSO
802 ANS(1,I)=0.0D0806 ANS(1,I)=0.0D0
@@ -806,7 +810,7 @@
806 GOTO 9999810 GOTO 9999
807 ENDIF811 ENDIF
808 ENDIF812 ENDIF
809 HELPICKED=USERHEL813 HELPICKED=MAX(USERHEL,-1)
810 IF (CTMODERUN.NE.-1) THEN814 IF (CTMODERUN.NE.-1) THEN
811 CTMODE=CTMODERUN815 CTMODE=CTMODERUN
812 ELSE816 ELSE
@@ -1063,7 +1067,7 @@
1063 1226 CONTINUE1067 1226 CONTINUE
10641068
1065 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1069 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1066 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1070 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1067C Make sure that that no polarization constraint filters out1071C Make sure that that no polarization constraint filters out
1068C this helicity1072C this helicity
1069 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1073 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1281,7 +1285,7 @@
1281 DO K=1,31285 DO K=1,3
1282 DO I=0,NSQUAREDSO1286 DO I=0,NSQUAREDSO
1283 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1287 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1284 IF (USERHEL.NE.-1) THEN1288 IF (USERHEL.GT.-1) THEN
1285 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1289 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1286 ELSE1290 ELSE
1287 DO J=1,NINITIAL1291 DO J=1,NINITIAL
12881292
=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/born_matrix.f'
--- tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/born_matrix.f 2018-05-18 12:22:47 +0000
+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/born_matrix.f 2019-05-23 07:08:37 +0000
@@ -80,7 +80,6 @@
80 LOGICAL GOODHEL(NCOMB)80 LOGICAL GOODHEL(NCOMB)
81 DATA NTRY/0/81 DATA NTRY/0/
82 DATA GOODHEL/NCOMB*.FALSE./82 DATA GOODHEL/NCOMB*.FALSE./
83
84C 83C
85C GLOBAL VARIABLES84C GLOBAL VARIABLES
86C 85C
@@ -118,10 +117,6 @@
118C ----------117C ----------
119C BEGIN CODE118C BEGIN CODE
120C ----------119C ----------
121 IF(USERHEL.EQ.-1) NTRY=NTRY+1
122 DO IHEL=1,NEXTERNAL
123 JC(IHEL) = +1
124 ENDDO
125C When spin-2 particles are involved, the Helicity filtering is120C When spin-2 particles are involved, the Helicity filtering is
126C dangerous for the 2->1 topology.121C dangerous for the 2->1 topology.
127C This is because depending on the MC setup the initial PS points122C This is because depending on the MC setup the initial PS points
@@ -134,11 +129,16 @@
134C helicity sum is).129C helicity sum is).
135C For this reason, we simply remove the filterin when there is130C For this reason, we simply remove the filterin when there is
136C only three external particles.131C only three external particles.
137 IF (NEXTERNAL.LE.3) THEN132 IF(USERHEL.EQ.-2.OR.NEXTERNAL.LE.3) THEN
138 DO IHEL=1,NCOMB133 DO IHEL=1,NCOMB
139 GOODHEL(IHEL)=.TRUE.134 GOODHEL(IHEL)=.TRUE.
140 ENDDO135 ENDDO
136 IF(USERHEL.EQ.-2) USERHEL=-1
141 ENDIF137 ENDIF
138 IF(USERHEL.EQ.-1) NTRY=NTRY+1
139 DO IHEL=1,NEXTERNAL
140 JC(IHEL) = +1
141 ENDDO
142 ANS = 0D0142 ANS = 0D0
143 DO IHEL=1,NCOMB143 DO IHEL=1,NCOMB
144 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN144 IF (USERHEL.EQ.-1.OR.USERHEL.EQ.IHEL) THEN
145145
=== modified file 'tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f'
--- tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f 2017-08-14 07:04:15 +0000
+++ tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/loop_matrix.f 2019-05-23 07:08:37 +0000
@@ -636,6 +636,10 @@
636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)636 CALL ML5_0_SET_N_EVALS(N_DP_EVAL,N_QP_EVAL)
637 ENDIF637 ENDIF
638638
639 IF(USERHEL.EQ.-2) THEN
640 NTRY = 0
641 ENDIF
642
639 IF(NTRY.EQ.0) THEN643 IF(NTRY.EQ.0) THEN
640 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)644 HELDOUBLECHECKED=(.NOT.DOUBLECHECKHELICITYFILTER)
641 $ .OR.(HELICITYFILTERLEVEL.EQ.0)645 $ .OR.(HELICITYFILTERLEVEL.EQ.0)
@@ -655,7 +659,7 @@
655 101 CONTINUE659 101 CONTINUE
656 CLOSE(1)660 CLOSE(1)
657661
658 IF (HELICITYFILTERLEVEL.EQ.0) THEN662 IF (HELICITYFILTERLEVEL.EQ.0.OR.USERHEL.EQ.-2) THEN
659 FOUNDHELFILTER=.TRUE.663 FOUNDHELFILTER=.TRUE.
660 DO J=1,NCOMB664 DO J=1,NCOMB
661 GOODHEL(J)=1665 GOODHEL(J)=1
@@ -796,7 +800,7 @@
796 HELPICKED=1800 HELPICKED=1
797 CTMODE=CTMODEINIT801 CTMODE=CTMODEINIT
798 ELSE802 ELSE
799 IF (USERHEL.NE.-1) THEN803 IF (USERHEL.GT.0) THEN
800 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN804 IF(GOODHEL(USERHEL).EQ.-HELOFFSET) THEN
801 DO I=0,NSQUAREDSO805 DO I=0,NSQUAREDSO
802 ANS(1,I)=0.0D0806 ANS(1,I)=0.0D0
@@ -806,7 +810,7 @@
806 GOTO 9999810 GOTO 9999
807 ENDIF811 ENDIF
808 ENDIF812 ENDIF
809 HELPICKED=USERHEL813 HELPICKED=MAX(USERHEL,-1)
810 IF (CTMODERUN.NE.-1) THEN814 IF (CTMODERUN.NE.-1) THEN
811 CTMODE=CTMODERUN815 CTMODE=CTMODERUN
812 ELSE816 ELSE
@@ -1063,7 +1067,7 @@
1063 1226 CONTINUE1067 1226 CONTINUE
10641068
1065 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN1069 IF (CHECKPHASE.OR.(.NOT.HELDOUBLECHECKED)) THEN
1066 IF((USERHEL.EQ.-1).OR.(USERHEL.EQ.HELPICKED)) THEN1070 IF((USERHEL.LE.-1).OR.(USERHEL.EQ.HELPICKED)) THEN
1067C Make sure that that no polarization constraint filters out1071C Make sure that that no polarization constraint filters out
1068C this helicity1072C this helicity
1069 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK1073 IF (POLARIZATIONS(0,0).EQ.-1.OR.ML5_0_IS_HEL_SELECTED(HELPICK
@@ -1281,7 +1285,7 @@
1281 DO K=1,31285 DO K=1,3
1282 DO I=0,NSQUAREDSO1286 DO I=0,NSQUAREDSO
1283 ANS(K,I)=ANS(K,I)/DBLE(IDEN)1287 ANS(K,I)=ANS(K,I)/DBLE(IDEN)
1284 IF (USERHEL.NE.-1) THEN1288 IF (USERHEL.GT.-1) THEN
1285 ANS(K,I)=ANS(K,I)*HELAVGFACTOR1289 ANS(K,I)=ANS(K,I)*HELAVGFACTOR
1286 ELSE1290 ELSE
1287 DO J=1,NINITIAL1291 DO J=1,NINITIAL
12881292
=== modified file 'tests/unit_tests/various/test_rambo.py'
--- tests/unit_tests/various/test_rambo.py 2015-10-01 16:00:08 +0000
+++ tests/unit_tests/various/test_rambo.py 2019-05-23 07:08:37 +0000
@@ -34,8 +34,6 @@
34 # not enough energy34 # not enough energy
35 self.assertRaises(rambo.RAMBOError, rambo.RAMBO, 2,150,self.m2)35 self.assertRaises(rambo.RAMBOError, rambo.RAMBO, 2,150,self.m2)
36 36
37 # not valid mass
38 self.assertRaises(AssertionError, rambo.RAMBO, 2,1500,[1,2])
39 37
40 # not valid mass38 # not valid mass
41 self.assertRaises(AssertionError, rambo.RAMBO, 2,1500,self.m1)39 self.assertRaises(AssertionError, rambo.RAMBO, 2,1500,self.m1)
@@ -57,6 +55,13 @@
57 for i in range(1,3):55 for i in range(1,3):
58 self.assertAlmostEqual(self.m2[i]**2, P[(4,i)]**2 - P[(1,i)]**2 - P[(2,i)]**2 - P[(3,i)]**2)56 self.assertAlmostEqual(self.m2[i]**2, P[(4,i)]**2 - P[(1,i)]**2 - P[(2,i)]**2 - P[(3,i)]**2)
59 57
58 mass = [100,20]
59 P, wgt = rambo.RAMBO(2,500, [100,20])
60 for i in range(1,3):
61 m = mass[i-1]
62 self.assertAlmostEqual(m**2, P[(4,i)]**2 - P[(1,i)]**2 - P[(2,i)]**2 - P[(3,i)]**2)
63
64
6065
61class test_wavefunctions(unittest.TestCase):66class test_wavefunctions(unittest.TestCase):
62 """ check that the wavefunctions TXXXX, IXXXXX, ... are correctly define"""67 """ check that the wavefunctions TXXXX, IXXXXX, ... are correctly define"""
6368
=== modified file 'tests/unit_tests/various/test_shower_card.py'
--- tests/unit_tests/various/test_shower_card.py 2019-04-24 11:02:30 +0000
+++ tests/unit_tests/various/test_shower_card.py 2019-05-23 07:08:37 +0000
@@ -527,7 +527,6 @@
527 new_text = self.card.text527 new_text = self.card.text
528 old_card = shower_card.ShowerCard(new_text, testing=True)528 old_card = shower_card.ShowerCard(new_text, testing=True)
529 new_text = old_card.set_param('ue_enabled', '.false.', write_to=True)529 new_text = old_card.set_param('ue_enabled', '.false.', write_to=True)
530 misc.sprint(new_text)
531 new_card = shower_card.ShowerCard(new_text, testing=True)530 new_card = shower_card.ShowerCard(new_text, testing=True)
532 self.assertFalse(new_card['ue_enabled'])531 self.assertFalse(new_card['ue_enabled'])
533532

Subscribers

People subscribed via source and target branches

to all changes: