Merge lp:~mg5core2/mg5amcnlo/2.6.3 into lp:mg5amcnlo/lts

Proposed by Olivier Mattelaer
Status: Merged
Merged at revision: 278
Proposed branch: lp:~mg5core2/mg5amcnlo/2.6.3
Merge into: lp:mg5amcnlo/lts
Diff against target: 15327 lines (+10841/-748)
107 files modified
MadSpin/interface_madspin.py (+280/-139)
MadSpin/madspin (+19/-21)
Template/LO/Cards/run_card.dat (+1/-1)
Template/LO/SubProcesses/genps.f (+5/-6)
Template/LO/SubProcesses/reweight.f (+82/-4)
Template/NLO/SubProcesses/montecarlocounter.f (+65/-37)
UpdateNotes.txt (+28/-0)
VERSION (+2/-2)
aloha/aloha_writers.py (+21/-6)
aloha/create_aloha.py (+3/-4)
madgraph/interface/amcatnlo_interface.py (+2/-2)
madgraph/interface/amcatnlo_run_interface.py (+2/-2)
madgraph/interface/common_run_interface.py (+35/-12)
madgraph/interface/extended_cmd.py (+13/-5)
madgraph/interface/madevent_interface.py (+16/-3)
madgraph/interface/madgraph_interface.py (+32/-9)
madgraph/interface/reweight_interface.py (+2/-0)
madgraph/iolibs/export_v4.py (+138/-6)
madgraph/iolibs/file_writers.py (+3/-3)
madgraph/iolibs/files.py (+3/-0)
madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc (+2/-2)
madgraph/iolibs/template_files/matrix_standalone_v4.inc (+1/-1)
madgraph/iolibs/ufo_expression_parsers.py (+237/-6)
madgraph/loop/loop_exporters.py (+15/-1)
madgraph/loop/loop_helas_objects.py (+3/-3)
madgraph/madevent/gen_crossxhtml.py (+18/-2)
madgraph/madevent/sum_html.py (+6/-0)
madgraph/various/banner.py (+34/-12)
madgraph/various/hepmc_parser.py (+342/-0)
madgraph/various/lhe_parser.py (+54/-7)
madgraph/various/misc.py (+4/-3)
mg5decay/decay_objects.py (+1/-1)
models/import_ufo.py (+315/-32)
models/write_param_card.py (+2/-2)
tests/acceptance_tests/test_cmd_amcatnlo.py (+12/-5)
tests/acceptance_tests/test_cmd_madevent.py (+28/-1)
tests/acceptance_tests/test_cmd_reweight.py (+2/-2)
tests/acceptance_tests/test_madspin.py (+114/-0)
tests/acceptance_tests/test_madweight.py (+4/-4)
tests/acceptance_tests/test_model_equivalence.py (+5/-2)
tests/input_files/DM_pion/CT_couplings.py (+1731/-0)
tests/input_files/DM_pion/CT_vertices.py (+1291/-0)
tests/input_files/DM_pion/__init__.py (+48/-0)
tests/input_files/DM_pion/coupling_orders.py (+25/-0)
tests/input_files/DM_pion/couplings.py (+563/-0)
tests/input_files/DM_pion/decays.py (+113/-0)
tests/input_files/DM_pion/function_library.py (+71/-0)
tests/input_files/DM_pion/lorentz.py (+182/-0)
tests/input_files/DM_pion/object_library.py (+377/-0)
tests/input_files/DM_pion/param_pion.dat (+183/-0)
tests/input_files/DM_pion/parameters.py (+858/-0)
tests/input_files/DM_pion/particles.py (+489/-0)
tests/input_files/DM_pion/propagators.py (+35/-0)
tests/input_files/DM_pion/py.py (+67/-0)
tests/input_files/DM_pion/vertices.py (+1007/-0)
tests/input_files/DM_pion/write_param_card.py (+207/-0)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_dxu_wp%V0_dxu_wp%born_matrix.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportFKSTest/test_ppw_fksall/%SubProcesses%P0_udx_wp%V0_udx_wp%born_matrix.f (+2/-2)
tests/input_files/IOTestsComparison/IOExportV4IOTest/export_matrix_element_v4_standalone/matrix.f (+1/-1)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_eq_4.f (+10/-9)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_0_QEDAmpAndQEDsq_gt_2.f (+8/-7)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QCDsq_gt_4.f (+5/-5)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_QEDsq_le_4.f (+13/-10)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_WGTsq_le_10_QEDAmpAndQEDsq_gt_2.f (+8/-7)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDQEDpert_default.f (+10/-9)
tests/input_files/IOTestsComparison/LoopSquaredOrder_IOTest/Loop_sqso_uux_ddx/loop_matrix_QCDpert_default.f (+5/-5)
tests/input_files/IOTestsComparison/MadLoop_output_from_the_interface/TIR_output/%ggttx_IOTest%SubProcesses%P0_gg_ttx%born_matrix.f (+2/-2)
tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_NoSQSO.f (+1/-1)
tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_QCDsq_le_6.f (+2/-2)
tests/input_files/IOTestsComparison/SquaredOrder_IOTest/sqso_uux_uuxuuxx/matrix_ampOrderQED2_eq_2_WGTsq_le_14_QCDsq_gt_4.f (+2/-2)
tests/input_files/IOTestsComparison/TestCmdMatchBox/MatchBoxOutput/%TEST%SubProcesses%P0_wpwm_wpwm%matrix.f (+8/-8)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%model_functions.f (+114/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/%..%..%Source%MODEL%model_functions.inc (+4/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/dux_mumvmxg/born_matrix.f (+1/-1)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%model_functions.f (+114/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/%..%..%Source%MODEL%model_functions.inc (+4/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_default/gg_wmtbx/born_matrix.f (+1/-1)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%model_functions.f (+114/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/%..%..%Source%MODEL%model_functions.inc (+4/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/dux_mumvmxg/born_matrix.f (+1/-1)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%model_functions.f (+114/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/%..%..%Source%MODEL%model_functions.inc (+4/-0)
tests/input_files/IOTestsComparison/long_ML_SMQCD_optimized/gg_wmtbx/born_matrix.f (+1/-1)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%model_functions.f (+114/-0)
tests/input_files/IOTestsComparison/short_ML_SMQCD_LoopInduced/gg_hh/%..%..%Source%MODEL%model_functions.inc (+4/-0)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/ddx_ttx/born_matrix.f (+1/-1)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%model_functions.f (+114/-0)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/%..%..%Source%MODEL%model_functions.inc (+4/-0)
tests/input_files/IOTestsComparison/short_ML_SMQCD_default/gg_ttx/born_matrix.f (+1/-1)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/ddx_ttx/born_matrix.f (+1/-1)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%model_functions.f (+114/-0)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/%..%..%Source%MODEL%model_functions.inc (+4/-0)
tests/input_files/IOTestsComparison/short_ML_SMQCD_optimized/gg_ttx/born_matrix.f (+1/-1)
tests/parallel_tests/me_comparator.py (+1/-3)
tests/parallel_tests/test_ML5.py (+1/-1)
tests/parallel_tests/test_ML5MSSMQCD.py (+1/-1)
tests/parallel_tests/test_aloha.py (+168/-2)
tests/parallel_tests/test_cmd_amcatnlo.py (+1/-1)
tests/time_db (+260/-259)
tests/unit_tests/iolibs/test_export_v4.py (+1/-1)
tests/unit_tests/iolibs/test_helas_call_writers.py (+30/-30)
tests/unit_tests/iolibs/test_link_to_ufo.py (+7/-2)
tests/unit_tests/iolibs/test_ufo_parsers.py (+53/-3)
tests/unit_tests/various/test_banner.py (+19/-0)
tests/unit_tests/various/test_decay.py (+2/-2)
tests/unit_tests/various/test_import_ufo.py (+138/-8)
tests/unit_tests/various/test_misc.py (+48/-7)
To merge this branch: bzr merge lp:~mg5core2/mg5amcnlo/2.6.3
Reviewer Review Type Date Requested Status
MadTeam Pending
Review via email: mp+347781@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Rikkert Frederix (frederix) wrote :

Hi Olivier,

Should we also release 3.0.1 together with this?

Cheers,
Rik

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

Hi,

I do not know what is the status of 3.0.1 (in term of merging with 2.6.3, test, ...)
I'm kind of disconnected of 3.0.1.
I'm obviously fine to release 3.0.1

Cheers,

Olivier

> On 12 Jun 2018, at 11:13, Rikkert Frederix <email address hidden> wrote:
>
> Hi Olivier,
>
> Should we also release 3.0.1 together with this?
>
> Cheers,
> Rik
>
> --
> https://code.launchpad.net/~mg5core2/mg5amcnlo/2.6.3/+merge/347781
> Your team mg5core2 is subscribed to branch lp:~mg5core2/mg5amcnlo/2.6.3.

lp:~mg5core2/mg5amcnlo/2.6.3 updated
314. By olivier-mattelaer

improvment in the model to optimise the creation of aloha routine

315. By olivier-mattelaer

fixing IOTest linked to HuaSheng change

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

Hi,

I have freezed this branch.

Concerning 3.0.1, I have started the merge of 2.6.3 within 3.0.1 but this was a tricky one
(I need some input from Paolo) and would need some additional test for the loop_qcd_qed model.
since even the tests were in conflicts...
So this will require at least a week before we can release 3.0.1

Olivier

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

H olivier,
If you want I can also have a look at the merge
What are the problematic files?
Cheers,
Marco

On Wed, Jun 13, 2018, 17:44 Olivier Mattelaer <
<email address hidden>> wrote:

> Hi,
>
> I have freezed this branch.
>
> Concerning 3.0.1, I have started the merge of 2.6.3 within 3.0.1 but this
> was a tricky one
> (I need some input from Paolo) and would need some additional test for the
> loop_qcd_qed model.
> since even the tests were in conflicts...
> So this will require at least a week before we can release 3.0.1
>
> Olivier
>
>
> --
> https://code.launchpad.net/~mg5core2/mg5amcnlo/2.6.3/+merge/347781
> Your team MadTeam is requested to review the proposed merge of
> lp:~mg5core2/mg5amcnlo/2.6.3 into lp:mg5amcnlo.
>

lp:~mg5core2/mg5amcnlo/2.6.3 updated
316. By olivier-mattelaer

avoid two coupling with different coupling order to be merged when restricting model

317. By olivier-mattelaer

fix an issue with the latest change for loop_sm

318. By olivier-mattelaer

small fix for MA5@NLO

319. By olivier-mattelaer

change linked to the tests.

320. By olivier-mattelaer

avoid side effects on the test by modifying configuration file. + fix an issue with aloha model with restriction file

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'MadSpin/interface_madspin.py'
--- MadSpin/interface_madspin.py 2018-03-11 12:10:19 +0000
+++ MadSpin/interface_madspin.py 2018-06-15 08:18:50 +0000
@@ -35,6 +35,7 @@
35import madgraph.interface.madgraph_interface as mg_interface35import madgraph.interface.madgraph_interface as mg_interface
36import madgraph.interface.master_interface as master_interface36import madgraph.interface.master_interface as master_interface
37import madgraph.interface.madevent_interface as madevent_interface37import madgraph.interface.madevent_interface as madevent_interface
38import madgraph.interface.common_run_interface as common_run_interface
38import madgraph.interface.reweight_interface as rwgt_interface39import madgraph.interface.reweight_interface as rwgt_interface
39import madgraph.various.misc as misc40import madgraph.various.misc as misc
40import madgraph.iolibs.files as files41import madgraph.iolibs.files as files
@@ -53,6 +54,68 @@
53cmd_logger = logging.getLogger('cmdprint2') # -> print54cmd_logger = logging.getLogger('cmdprint2') # -> print
5455
5556
57class MadSpinOptions(banner.ConfigFile):
58
59 def default_setup(self):
60
61 self.add_param("max_weight", -1)
62 self.add_param('curr_dir', os.path.realpath(os.getcwd()))
63 self.add_param('Nevents_for_max_weigth', 0)
64 self.add_param("max_weight_ps_point", 400)
65 self.add_param('BW_cut', -1)
66 self.add_param('nb_sigma', 0.)
67 self.add_param('ms_dir', '')
68 self.add_param('max_running_process', 100)
69 self.add_param('onlyhelicity', False)
70 self.add_param('spinmode', "madspin", allowed=['madspin','none','onshell'])
71 self.add_param('use_old_dir', False, comment='should be use only for faster debugging')
72 self.add_param('run_card', '' , comment='define cut for spinmode==none. Path to run_card to use')
73 self.add_param('fixed_order', False, comment='to activate fixed order handling of counter-event')
74 self.add_param('seed', 0, comment='control the seed of madspin')
75 self.add_param('cross_section', {'__type__':0.}, comment="forcing normalization of cross-section after MS (for none/onshell)" )
76 self.add_param('new_wgt', 'cross-section' ,allowed=['cross-section', 'BR'], comment="if not consistent number of particles, choose what to do for the weight. (BR: means local according to number of part, cross use the force cross-section")
77 self.add_param('input_format', 'auto', allowed=['auto','lhe', 'hepmc', 'lhe_no_banner'])
78
79
80 ############################################################################
81 ## Special post-processing of the options ##
82 ############################################################################
83 def post_set_ms_dir(self, value, change_userdefine, raiseerror):
84 """ special handling for set ms_dir """
85
86 self.__setitem__('curr_dir', value, change_userdefine=change_userdefine)
87
88 ############################################################################
89 def post_set_seed(self, value, change_userdefine, raiseerror):
90 """ special handling for set seed """
91
92 random.seed(value)
93
94 ############################################################################
95 def post_set_run_card(self, value, change_userdefine, raiseerror):
96 """ special handling for set run_card """
97
98 if value == 'default':
99 self.run_card = None
100 elif os.path.isfile(value):
101 self.run_card = banner.RunCard(value)
102
103 args = value.split()
104 if len(args) >2:
105 if not self.options['run_card']:
106 self.run_card = banner.RunCardLO()
107 self.run_card.remove_all_cut()
108 self.run_card[args[0]] = ' '.join(args[1:])
109
110
111 ############################################################################
112 def post_fixed_order(self, value, change_userdefine, raiseerror):
113 """ special handling for set fixed_order """
114
115 if value:
116 logger.warning('Fix order madspin fails to have the correct scale information. This can bias the results!')
117 logger.warning('Not all functionalities of MadSpin handle this mode correctly (only onshell mode so far).')
118
56119
57class MadSpinInterface(extended_cmd.Cmd):120class MadSpinInterface(extended_cmd.Cmd):
58 """Basic interface for madspin"""121 """Basic interface for madspin"""
@@ -77,22 +140,7 @@
77 self.mode = "madspin" # can be flat/bridge change the way the decay is done.140 self.mode = "madspin" # can be flat/bridge change the way the decay is done.
78 # note amc@nlo does not support bridge.141 # note amc@nlo does not support bridge.
79 142
80 self.options = {'max_weight': -1, 143 self.options = MadSpinOptions()
81 'curr_dir': os.path.realpath(os.getcwd()),
82 'Nevents_for_max_weigth': 0,
83 'max_weight_ps_point': 400,
84 'BW_cut':-1,
85 'nb_sigma':0,
86 'ms_dir':None,
87 'max_running_process':100,
88 'onlyhelicity': False,
89 'spinmode': "madspin",
90 'use_old_dir': False, #should be use only for faster debugging
91 'run_card': None, # define cut for spinmode==none.
92 'fixed_order': False # to activate fixed order handling of counter-event
93 }
94
95
96 144
97 self.events_file = None145 self.events_file = None
98 self.decay_processes = {}146 self.decay_processes = {}
@@ -107,7 +155,21 @@
107 logger.info("Extracting the banner ...")155 logger.info("Extracting the banner ...")
108 self.do_import(event_path)156 self.do_import(event_path)
109 157
110 158
159 def setup_for_pure_decay(self):
160 """this is for spinmode=None -> simple decay
161 We go here if they are no banner.
162 -> this requires that a command import model appears in the card!
163 """
164
165 logger.info("Setup the code for pure decay mode")
166 self.proc_option = []
167 self.final_state_full = ''
168 self.final_state_compact = ''
169 self.prod_branches = ''
170 self.final_state = set()
171
172
111 def do_import(self, inputfile):173 def do_import(self, inputfile):
112 """import the event file"""174 """import the event file"""
113 175
@@ -126,6 +188,7 @@
126 if not os.path.exists(inputfile):188 if not os.path.exists(inputfile):
127 if inputfile.endswith('.gz'):189 if inputfile.endswith('.gz'):
128 if not os.path.exists(inputfile[:-3]):190 if not os.path.exists(inputfile[:-3]):
191 misc.sprint(os.getcwd(), os.listdir('.'), inputfile, os.path.exists(inputfile), os.path.exists(inputfile[:-3]))
129 raise self.InvalidCmd('No such file or directory : %s' % inputfile)192 raise self.InvalidCmd('No such file or directory : %s' % inputfile)
130 else: 193 else:
131 inputfile = inputfile[:-3]194 inputfile = inputfile[:-3]
@@ -134,14 +197,21 @@
134 else: 197 else:
135 raise self.InvalidCmd('No such file or directory : %s' % inputfile)198 raise self.InvalidCmd('No such file or directory : %s' % inputfile)
136199
200 self.inputfile = inputfile
201 if self.options['spinmode'] == 'none' and \
202 (self.options['input_format'] != 'lhe' or (self.options['input_format'] == 'auto' and '.lhe' in inputfile[:-5])):
203 self.banner = banner.Banner()
204 self.setup_for_pure_decay()
205 return
206
137 if inputfile.endswith('.gz'):207 if inputfile.endswith('.gz'):
138 misc.gunzip(inputfile)208 misc.gunzip(inputfile)
139 inputfile = inputfile[:-3]209 inputfile = inputfile[:-3]
140
141 # Read the banner of the inputfile210 # Read the banner of the inputfile
142 self.events_file = open(os.path.realpath(inputfile))211 self.events_file = open(os.path.realpath(inputfile))
143 self.banner = banner.Banner(self.events_file)212 self.banner = banner.Banner(self.events_file)
144 213
214
145 # Check the validity of the banner:215 # Check the validity of the banner:
146 if 'slha' not in self.banner:216 if 'slha' not in self.banner:
147 self.events_file = None217 self.events_file = None
@@ -163,7 +233,6 @@
163 self.options['nb_sigma'] = N_sigma233 self.options['nb_sigma'] = N_sigma
164 if self.options['BW_cut'] == -1:234 if self.options['BW_cut'] == -1:
165 self.options['BW_cut'] = float(self.banner.get_detail('run_card', 'bwcutoff'))235 self.options['BW_cut'] = float(self.banner.get_detail('run_card', 'bwcutoff'))
166
167 else:236 else:
168 if not self.options['Nevents_for_max_weigth']:237 if not self.options['Nevents_for_max_weigth']:
169 self.options['Nevents_for_max_weigth'] = 75238 self.options['Nevents_for_max_weigth'] = 75
@@ -273,7 +342,7 @@
273 342
274343
275 #Check the param_card344 #Check the param_card
276 if not bypass_check:345 if not (bypass_check or self.options['input_format'] in ['hepmc', 'lhe_no_banner']):
277 if not hasattr(self.banner, 'param_card'):346 if not hasattr(self.banner, 'param_card'):
278 self.banner.charge_card('slha')347 self.banner.charge_card('slha')
279 param_card = check_param_card.ParamCard(card)348 param_card = check_param_card.ParamCard(card)
@@ -395,42 +464,10 @@
395 464
396 args = self.split_arg(line)465 args = self.split_arg(line)
397 self.check_set(args)466 self.check_set(args)
398 467
399 if args[0] not in ['ms_dir', 'run_card']:468 self.options[args[0]] = ' '.join(args[1:])
400 args[1] = args[1].lower()469
401 470
402 if args[0] in ['max_weight', 'BW_effect','ms_dir', 'spinmode']:
403 self.options[args[0]] = args[1]
404 if args[0] == 'ms_dir':
405 self.options['curr_dir'] = self.options['ms_dir']
406 elif args[0] == 'seed':
407 random.seed(int(args[1]))
408 self.seed = int(args[1])
409 elif args[0] == 'BW_cut':
410 self.options[args[0]] = float(args[1])
411 elif args[0] in ['onlyhelicity', 'use_old_dir']:
412 self.options[args[0]] = banner.ConfigFile.format_variable(args[1], bool, args[0])
413 elif args[0] in ['run_card']:
414 if args[1] == 'default':
415 self.options['run_card'] = None
416 elif os.path.isfile(args[1]):
417 self.options['run_card'] = banner.RunCard(args[1])
418 elif len(args) >2:
419 if not self.options['run_card']:
420 self.options['run_card'] = banner.RunCardLO()
421 self.options['run_card'].remove_all_cut()
422 self.options['run_card'][args[1]] = args[2]
423 elif args[0] in 'fixed_order':
424 if args[1].lower() in ['t', 'true']:
425 self.options['fixed_order'] = True
426 logger.warning('Fix order madspin fails to have the correct scale information. This can bias the results!')
427 logger.warning('Not all functionality of MadSpin handle this mode correctly (only onshell mode so far).')
428 else:
429 self.options['fixed_order'] = False
430 logger.info('fixed_order options set to %s', self.options['fixed_order'])
431 else:
432 self.options[args[0]] = int(args[1])
433
434 def complete_set(self, text, line, begidx, endidx):471 def complete_set(self, text, line, begidx, endidx):
435 472
436473
@@ -559,17 +596,17 @@
559596
560 model_line = self.banner.get('proc_card', 'full_model_line')597 model_line = self.banner.get('proc_card', 'full_model_line')
561598
562 if not self.seed:599 if not self.options['seed']:
563 self.seed = random.randint(0, int(30081*30081))600 self.options['seed'] = random.randint(0, int(30081*30081))
564 self.do_set('seed %s' % self.seed)601 #self.do_set('seed %s' % self.seed)
565 logger.info('Will use seed %s' % self.seed)602 logger.info('Will use seed %s' % self.options['seed'])
566 self.history.insert(0, 'set seed %s' % self.seed)603 self.history.insert(0, 'set seed %s' % self.options['seed'])
567604
568 if self.seed > 30081*30081: # can't use too big random number605 if self.options['seed'] > 30081*30081: # can't use too big random number
569 msg = 'Random seed too large ' + str(self.seed) + ' > 30081*30081'606 msg = 'Random seed too large ' + str(self.options['seed']) + ' > 30081*30081'
570 raise Exception, msg607 raise Exception, msg
571608
572 self.options['seed'] = self.seed609 #self.options['seed'] = self.seed
573 text = '%s\n' % '\n'.join([ line for line in self.history if line])610 text = '%s\n' % '\n'.join([ line for line in self.history if line])
574 self.banner.add_text('madspin' , text)611 self.banner.add_text('madspin' , text)
575 612
@@ -678,9 +715,9 @@
678 715
679 # NOW we have all the information available for RUNNING716 # NOW we have all the information available for RUNNING
680 717
681 if self.seed:718 if self.options['seed']:
682 #seed is specified need to use that one:719 #seed is specified need to use that one:
683 open(pjoin(self.options['ms_dir'],'seeds.dat'),'w').write('%s\n'%self.seed)720 open(pjoin(self.options['ms_dir'],'seeds.dat'),'w').write('%s\n'%self.options['seed'])
684 #remove all ranmar_state721 #remove all ranmar_state
685 for name in misc.glob(pjoin('*', 'SubProcesses','*','ranmar_state.dat'), 722 for name in misc.glob(pjoin('*', 'SubProcesses','*','ranmar_state.dat'),
686 self.options['ms_dir']):723 self.options['ms_dir']):
@@ -741,30 +778,58 @@
741 for name in misc.glob("decay_*_*", self.path_me):778 for name in misc.glob("decay_*_*", self.path_me):
742 shutil.rmtree(name)779 shutil.rmtree(name)
743780
744 self.events_file.close()781 if self.events_file:
745 orig_lhe = lhe_parser.EventFile(self.events_file.name)782 self.events_file.close()
746 783 filename = self.events_file.name
784 else:
785 filename = self.inputfile
786
787 if self.options['input_format'] == 'auto':
788 if '.lhe' in filename :
789 self.options['input_format'] = 'lhe'
790 elif '.hepmc' in filename:
791 self.options['input_format'] = 'hepmc'
792 else:
793 raise Exception, "fail to recognized input format automatically"
794
795 if self.options['input_format'] in ['lhe', 'lhe_no_banner']:
796 orig_lhe = lhe_parser.EventFile(filename)
797 if self.options['input_format'] == 'lhe_no_banner':
798 orig_lhe.allow_empty_event = True
799
800 elif self.options['input_format'] in ['hepmc']:
801 import madgraph.various.hepmc_parser as hepmc_parser
802 orig_lhe = hepmc_parser.HEPMC_EventFile(filename)
803 logger.info("Parsing input event to know how many decay to generate. This can takes few minuts.")
804 else:
805 raise Exception
806
747 to_decay = collections.defaultdict(int)807 to_decay = collections.defaultdict(int)
748 nb_event = 0808 nb_event = 0
809
749 for event in orig_lhe:810 for event in orig_lhe:
750 nb_event +=1811 nb_event +=1
751 for particle in event:812 for particle in event:
752 if particle.status == 1 and particle.pdg in asked_to_decay:813 if particle.status == 1 and particle.pdg in asked_to_decay:
753 # final state and tag as to decay814 # final state and tag as to decay
754 to_decay[particle.pdg] += 1815 to_decay[particle.pdg] += 1
816 if self.options['input_format'] == 'hepmc' and nb_event == 250:
817 for key in to_decay:
818 to_decay[key] *= 50.013 # to avoid accidental coincidence with nevents
819 break
755820
756 # Handle the banner of the output file821 # Handle the banner of the output file
757 if not self.seed:822 if not self.options['seed']:
758 self.seed = random.randint(0, int(30081*30081))823 self.options['seed'] = random.randint(0, int(30081*30081))
759 self.do_set('seed %s' % self.seed)824 #self.do_set('seed %s' % self.seed)
760 logger.info('Will use seed %s' % self.seed)825 logger.info('Will use seed %s' % self.options['seed'])
761 self.history.insert(0, 'set seed %s' % self.seed)826 self.history.insert(0, 'set seed %s' % self.options['seed'])
762827
763 if self.seed > 30081*30081: # can't use too big random number828 if self.options['seed'] > 30081*30081: # can't use too big random number
764 msg = 'Random seed too large ' + str(self.seed) + ' > 30081*30081'829 msg = 'Random seed too large ' + str(self.options['seed']) + ' > 30081*30081'
765 raise Exception, msg830 raise Exception, msg
766831
767 self.options['seed'] = self.seed832 #self.options['seed'] = self.options['seed']
768 833
769 text = '%s\n' % '\n'.join([ line for line in self.history if line])834 text = '%s\n' % '\n'.join([ line for line in self.history if line])
770 self.banner.add_text('madspin' , text)835 self.banner.add_text('madspin' , text)
@@ -791,61 +856,104 @@
791 evt_decayfile[pdg] = self.generate_events(pdg, nb_event, mg5)856 evt_decayfile[pdg] = self.generate_events(pdg, nb_event, mg5)
792 else:857 else:
793 evt_decayfile[pdg] = self.generate_events(pdg, nb_needed, mg5, cumul=True)858 evt_decayfile[pdg] = self.generate_events(pdg, nb_needed, mg5, cumul=True)
859 elif self.options['cross_section']:
860 #cross-section hard-coded -> allow
861 part = self.model.get_particle(pdg)
862 name = part.get_name()
863
864 if name not in self.list_branches:
865 continue
866 else:
867 try:
868 evt_decayfile[pdg] = self.generate_events(pdg, nb_needed, mg5, cumul=True)
869 except common_run_interface.ZeroResult:
870 logger.warning("Branching ratio is zero for this particle. Not decaying it")
871 del to_decay[pdg]
794 else:872 else:
795 part = self.model.get_particle(pdg)873 part = self.model.get_particle(pdg)
796 name = part.get_name()874 name = part.get_name()
797 if name not in self.list_branches or len(self.list_branches[name]) == 0:875 if name not in self.list_branches or len(self.list_branches[name]) == 0:
798 continue876 continue
799 raise self.InvalidCmd("The bridge mode of MadSpin does not support event files where events do not *all* share the same set of final state particles to be decayed.")877 raise self.InvalidCmd("The bridge mode of MadSpin does not support event files where events do not *all* share the same set of final state particles to be decayed. One workaround is to force the final cross-section manually.")
800 878
801 879
802
803
804 # Compute the branching ratio.880 # Compute the branching ratio.
805 br = 1881 if not self.options['cross_section']:
806 for (pdg, event_files) in evt_decayfile.items():882 br = 1
807 if not event_files:883 for (pdg, event_files) in evt_decayfile.items():
808 continue884 if not event_files:
809 totwidth = float(self.banner.get('param', 'decay', abs(pdg)).value)885 continue
810 if to_decay[pdg] == nb_event:886 totwidth = float(self.banner.get('param', 'decay', abs(pdg)).value)
811 # Exactly one particle of this type to decay by event887 if to_decay[pdg] == nb_event:
812 pwidth = sum([event_files[k].cross for k in event_files])888 # Exactly one particle of this type to decay by event
813 if pwidth > 1.01 * totwidth:889 pwidth = sum([event_files[k].cross for k in event_files])
814 logger.critical("Branching ratio larger than one for %s " % pdg)
815 br *= pwidth / totwidth
816 elif to_decay[pdg] % nb_event == 0:
817 # More than one particle of this type to decay by event
818 # Need to check the number of event file to check if we have to
819 # make separate type of decay or not.
820 nb_mult = to_decay[pdg] // nb_event
821 if nb_mult == len(event_files):
822 for k in event_files:
823 pwidth = event_files[k].cross
824 if pwidth > 1.01 * totwidth:
825 logger.critical("Branching ratio larger than one for %s " % pdg)
826 br *= pwidth / totwidth
827 br *= math.factorial(nb_mult)
828 else:
829 pwidth = sum(event_files[k].cross for k in event_files)
830 if pwidth > 1.01 * totwidth:890 if pwidth > 1.01 * totwidth:
831 logger.critical("Branching ratio larger than one for %s " % pdg) 891 logger.critical("Branching ratio larger than one for %s " % pdg)
832 br *= (pwidth / totwidth)**nb_mult892 br *= pwidth / totwidth
833 else:893 elif to_decay[pdg] % nb_event == 0:
834 raise self.InvalidCmd("The bridge mode of MadSpin does not support event files where events do not *all* share the same set of final state particles to be decayed.")894 # More than one particle of this type to decay by event
895 # Need to check the number of event file to check if we have to
896 # make separate type of decay or not.
897 nb_mult = to_decay[pdg] // nb_event
898 if nb_mult == len(event_files):
899 for k in event_files:
900 pwidth = event_files[k].cross
901 if pwidth > 1.01 * totwidth:
902 logger.critical("Branching ratio larger than one for %s " % pdg)
903 br *= pwidth / totwidth
904 br *= math.factorial(nb_mult)
905 else:
906 pwidth = sum(event_files[k].cross for k in event_files)
907 if pwidth > 1.01 * totwidth:
908 logger.critical("Branching ratio larger than one for %s " % pdg)
909 br *= (pwidth / totwidth)**nb_mult
910 else:
911 raise self.InvalidCmd("The bridge mode of MadSpin does not support event files where events do not *all* share the same set of final state particles to be decayed.")
912 else:
913 br = 1
835 self.branching_ratio = br914 self.branching_ratio = br
836 self.efficiency = 1915 self.efficiency = 1
837 self.cross, self.error = self.banner.get_cross(witherror=True)916 try:
917 self.cross, self.error = self.banner.get_cross(witherror=True)
918 except:
919 if self.options['input_format'] != 'lhe':
920 self.cross, self.error = 0, 0
838 self.cross *= br921 self.cross *= br
839 self.error *= br922 self.error *= br
840 923
841
842 # modify the cross-section in the init block of the banner924 # modify the cross-section in the init block of the banner
843 self.banner.scale_init_cross(self.branching_ratio)925 if not self.options['cross_section']:
844 926 self.banner.scale_init_cross(self.branching_ratio)
845 927 else:
928
929 if self.options['input_format'] in ['lhe_no_banner','hepmc'] and 'init' not in self.banner:
930 self.cross = sum(self.options['cross_section'].values())
931 self.error = 0
932 self.branching_ratio = 1
933 else:
934 self.banner.modify_init_cross(self.options['cross_section'])
935 new_cross, new_error = self.banner.get_cross(witherror=True)
936 self.branching_ratio = new_cross / self.cross
937 self.cross = new_cross
938 self.error = new_error
939
846 # 3. Merge the various file together.940 # 3. Merge the various file together.
847 output_lhe = lhe_parser.EventFile(orig_lhe.name.replace('.lhe', '_decayed.lhe.gz'), 'w')941 if self.options['input_format'] == 'hepmc':
848 self.banner.write(output_lhe, close_tag=False)942 name = orig_lhe.name.replace('.hepmc', '_decayed.lhe')
943 if not name.endswith('.gz'):
944 name = '%s.gz' % name
945
946 output_lhe = lhe_parser.EventFile(name, 'w')
947 else:
948 name = orig_lhe.name.replace('.lhe', '_decayed.lhe')
949 if not name.endswith('.gz'):
950 name = '%s.gz' % name
951 output_lhe = lhe_parser.EventFile(name, 'w')
952 try:
953 self.banner.write(output_lhe, close_tag=False)
954 except Exception:
955 if self.options['input_format'] == 'lhe':
956 raise
849 957
850 # initialise object which store not use event due to wrong helicity958 # initialise object which store not use event due to wrong helicity
851 bufferedEvents_decay = {}959 bufferedEvents_decay = {}
@@ -856,8 +964,9 @@
856 start = time.time()964 start = time.time()
857 counter = 0965 counter = 0
858 orig_lhe.seek(0)966 orig_lhe.seek(0)
967
859 for event in orig_lhe:968 for event in orig_lhe:
860 if counter and counter % 1000 == 0 and float(str(counter)[1:]) ==0:969 if counter and counter % 100 == 0 and float(str(counter)[1:]) ==0:
861 print "decaying event number %s [%s s]" % (counter, time.time()-start)970 print "decaying event number %s [%s s]" % (counter, time.time()-start)
862 counter +=1971 counter +=1
863 972
@@ -866,9 +975,13 @@
866 particles = [p for p in event if int(p.status) == 1.0]975 particles = [p for p in event if int(p.status) == 1.0]
867 random.shuffle(particles)976 random.shuffle(particles)
868 ids = [particle.pid for particle in particles]977 ids = [particle.pid for particle in particles]
978 br = 1 #br for that particular events (for special/weighted case)
979 hepmc_output = lhe_parser.Event() #for hepmc case: collect the decay particle
869 for i,particle in enumerate(particles):980 for i,particle in enumerate(particles):
981 #misc.sprint(i, particle.pdg, particle.pid)
982 #misc.sprint(self.final_state, evt_decayfile)
870 # check if we need to decay the particle 983 # check if we need to decay the particle
871 if particle.pdg not in self.final_state or particle.pdg not in evt_decayfile:984 if not (particle.pdg in self.final_state or particle.pdg in evt_decayfile):
872 continue # nothing to do for this particle985 continue # nothing to do for this particle
873 # check how the decay need to be done986 # check how the decay need to be done
874 nb_decay = len(evt_decayfile[particle.pdg])987 nb_decay = len(evt_decayfile[particle.pdg])
@@ -893,9 +1006,16 @@
893 decay_file_nb = j1006 decay_file_nb = j
894 else:1007 else:
895 break1008 break
896 1009
1010 if self.options['new_wgt'] == 'BR':
1011 tot_width = float(self.banner.get('param', 'decay', abs(pdg)).value)
1012 if tot_width:
1013 br = decay_file.cross / tot_width
897 # ok start the procedure1014 # ok start the procedure
898 helicity = particle.helicity1015 if hasattr(particle,'helicity'):
1016 helicity = particle.helicity
1017 else:
1018 helicity = 9
899 bufferedEvents = bufferedEvents_decay[particle.pdg][decay_file_nb]1019 bufferedEvents = bufferedEvents_decay[particle.pdg][decay_file_nb]
900 1020
901 # now that we have the file to read. find the associate event1021 # now that we have the file to read. find the associate event
@@ -927,14 +1047,36 @@
927 # only add to the buffering if the buffer is not too large1047 # only add to the buffering if the buffer is not too large
928 bufferedEvents[helicity].append(decay)1048 bufferedEvents[helicity].append(decay)
929 # now that we have the event make the merge1049 # now that we have the event make the merge
930 particle.add_decay(decay)1050 if self.options['input_format'] != 'hepmc':
1051 particle.add_decay(decay)
1052 else:
1053 if len(hepmc_output) == 0:
1054 hepmc_output.append(lhe_parser.Particle(event=hepmc_output))
1055 hepmc_output[0].color2 = 0
1056 decayed_particle = lhe_parser.Particle(particle, hepmc_output)
1057 hepmc_output.append(decayed_particle)
1058 decayed_particle.add_decay(decay)
931 # change the weight associate to the event1059 # change the weight associate to the event
932 event.wgt *= self.branching_ratio1060 if self.options['new_wgt'] == 'cross-section':
933 wgts = event.parse_reweight()1061 event.wgt *= self.branching_ratio
934 for key in wgts:1062 br = self.branching_ratio
935 wgts[key] *= self.branching_ratio1063 else:
936 # all particle have been decay if needed1064 event.wgt *= br
937 output_lhe.write(str(event))1065
1066 if self.options['input_format'] != 'hepmc':
1067 wgts = event.parse_reweight()
1068 for key in wgts:
1069 wgts[key] *= br
1070 # all particle have been decay if needed
1071 output_lhe.write(str(event))
1072 else:
1073 hepmc_output.wgt = event.wgt
1074 hepmc_output.nexternal = len(hepmc_output) # the append does not update nexternal
1075 hepmc_output.assign_mother()
1076 output_lhe.write(str(hepmc_output))
1077 else:
1078 if counter==0:
1079 raise Exception
938 output_lhe.write('</LesHouchesEvents>\n') 1080 output_lhe.write('</LesHouchesEvents>\n')
939 1081
940 1082
@@ -971,7 +1113,7 @@
971 cumul allow to merge all the definition in one run (add process)1113 cumul allow to merge all the definition in one run (add process)
972 to generate events according to cross-section1114 to generate events according to cross-section
973 """1115 """
974 1116 nb_event = int(nb_event) # in case of hepmc request the nb_event is not an integer
975 if cumul:1117 if cumul:
976 width = 0.1118 width = 0.
977 else: 1119 else:
@@ -1016,18 +1158,18 @@
1016 logger.debug(error)1158 logger.debug(error)
1017 pass 1159 pass
1018 if self.options["run_card"]:1160 if self.options["run_card"]:
1019 run_card = self.options["run_card"]1161 run_card = self.run_card
1020 else:1162 else:
1021 run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat")) 1163 run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat"))
1022 1164
1023 run_card["iseed"] = self.seed1165 run_card["iseed"] = self.options['seed']
1024 run_card['gridpack'] = True1166 run_card['gridpack'] = True
1025 run_card['systematics_program'] = 'False'1167 run_card['systematics_program'] = 'False'
1026 run_card['use_syst'] = False1168 run_card['use_syst'] = False
1027 run_card.write(pjoin(decay_dir, "Cards", "run_card.dat"))1169 run_card.write(pjoin(decay_dir, "Cards", "run_card.dat"))
1028 param_card = self.banner['slha']1170 param_card = self.banner['slha']
1029 open(pjoin(decay_dir, "Cards", "param_card.dat"),"w").write(param_card)1171 open(pjoin(decay_dir, "Cards", "param_card.dat"),"w").write(param_card)
1030 self.seed += 11172 self.options['seed'] += 1
1031 # actually creation1173 # actually creation
1032 me5_cmd.exec_cmd("generate_events run_01 -f")1174 me5_cmd.exec_cmd("generate_events run_01 -f")
1033 if output_width:1175 if output_width:
@@ -1057,10 +1199,16 @@
1057 logger.debug(error)1199 logger.debug(error)
1058 pass 1200 pass
1059 if self.options["run_card"]:1201 if self.options["run_card"]:
1060 run_card = self.options["run_card"]1202 run_card = self.run_card
1061 else:1203 else:
1062 run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat"))1204 run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat"))
1063 run_card["nevents"] = int(1.2*nb_event)1205 run_card["nevents"] = int(1.2*nb_event)
1206 # Handle the banner of the output file
1207 if not self.seed:
1208 self.seed = random.randint(0, int(30081*30081))
1209 self.do_set('seed %s' % self.seed)
1210 logger.info('Will use seed %s' % self.seed)
1211 self.history.insert(0, 'set seed %s' % self.seed)
1064 run_card["iseed"] = self.seed1212 run_card["iseed"] = self.seed
1065 run_card["systematics_program"] = 'None'1213 run_card["systematics_program"] = 'None'
1066 run_card.write(pjoin(decay_dir, "Cards", "run_card.dat"))1214 run_card.write(pjoin(decay_dir, "Cards", "run_card.dat"))
@@ -1140,8 +1288,7 @@
1140 if particle.status == 1 and particle.pdg in asked_to_decay:1288 if particle.status == 1 and particle.pdg in asked_to_decay:
1141 # final state and tag as to decay1289 # final state and tag as to decay
1142 to_decay[particle.pdg] += 11290 to_decay[particle.pdg] += 1
1143 #misc.sprint(to_decay)1291
1144 #misc.sprint("import the mode -> temporary with logging")
1145 with misc.MuteLogger(["madgraph", "madevent", "ALOHA", "cmdprint"], [50,50,50,50]):1292 with misc.MuteLogger(["madgraph", "madevent", "ALOHA", "cmdprint"], [50,50,50,50]):
1146 mg5 = self.mg5cmd1293 mg5 = self.mg5cmd
1147 if not self.model:1294 if not self.model:
@@ -1436,10 +1583,6 @@
1436 full_event = lhe_parser.Event(str(production))1583 full_event = lhe_parser.Event(str(production))
1437 full_event = full_event.add_decays(decays)1584 full_event = full_event.add_decays(decays)
1438 full_me = self.calculate_matrix_element(full_event)1585 full_me = self.calculate_matrix_element(full_event)
1439 #misc.sprint(full_event)
1440 #misc.sprint([p.pdg for p in production])
1441 #misc.sprint([p.pdg for p in full_event])
1442 #misc.sprint(full_me, production_me, decay_me)
1443 return full_event, full_me/(production_me*decay_me)1586 return full_event, full_me/(production_me*decay_me)
1444 1587
1445 1588
@@ -1457,7 +1600,6 @@
1457 init = (-init[0],)1600 init = (-init[0],)
1458 final = tuple(-i for i in final)1601 final = tuple(-i for i in final)
1459 tag = (init, final)1602 tag = (init, final)
1460 misc.sprint([k for k in self.all_me.keys() if len(k[0])==1])
1461 orig_order = self.all_me[tag]['order']1603 orig_order = self.all_me[tag]['order']
1462 1604
1463 pdir = self.all_me[tag]['pdir']1605 pdir = self.all_me[tag]['pdir']
@@ -1520,7 +1662,6 @@
1520 1662
1521 rwgt_interface.ReweightInterface.get_LO_definition_from_NLO() 1663 rwgt_interface.ReweightInterface.get_LO_definition_from_NLO()
1522 1664
1523
15241665
15251666
1526if __name__ == '__main__':1667if __name__ == '__main__':
15271668
=== modified file 'MadSpin/madspin'
--- MadSpin/madspin 2013-11-12 23:52:05 +0000
+++ MadSpin/madspin 2018-06-15 08:18:50 +0000
@@ -49,6 +49,7 @@
49if len(args) == 0:49if len(args) == 0:
50 args = ''50 args = ''
5151
52
52import subprocess53import subprocess
5354
54# Check if optimize mode is (and should be) activated55# Check if optimize mode is (and should be) activated
@@ -114,23 +115,6 @@
114 pass115 pass
115import MadSpin.interface_madspin as interface116import MadSpin.interface_madspin as interface
116117
117try:
118 cmd_line = interface.MadSpinInterface()
119 cmd_line.use_rawinput = True
120 cmd_line.cmdloop()
121except:
122 pass
123try:
124 cmd_line.exec_cmd('quit all', printcmd=False)
125 readline.set_history_length(100)
126 if not os.path.exists(os.path.join(os.environ['HOME'], '.mg5')):
127 os.mkdir(os.path.join(os.environ['HOME'], '.mg5'))
128 readline.write_history_file(history_file)
129except Exception, error:
130 pass
131
132sys.exit(0)
133
134# Call the cmd interface main loop118# Call the cmd interface main loop
135try:119try:
136 if options.file or args:120 if options.file or args:
@@ -143,12 +127,14 @@
143 cmd_line = interface.MasterCmdWeb()127 cmd_line = interface.MasterCmdWeb()
144 cmd_line.debug_output = os.path.join(os.path.dirname(input_file),'generation.log')128 cmd_line.debug_output = os.path.join(os.path.dirname(input_file),'generation.log')
145 cmd_line.use_rawinput = False129 cmd_line.use_rawinput = False
146 cmd_line.run_cmd('import ' + input_file)130 cmd_line.import_command_file(input_file)
147 cmd_line.run_cmd('quit')131 cmd_line.run_cmd('quit')
148 else:132 else:
133 print "using input+file", input_file
149 cmd_line = interface.MadSpinInterface()134 cmd_line = interface.MadSpinInterface()
150 cmd_line.use_rawinput = False135 cmd_line.use_rawinput = False
151 cmd_line.run_cmd('import ' + input_file)136 cmd_line.haspiping = False
137 cmd_line.import_command_file(input_file)
152 cmd_line.run_cmd('quit')138 cmd_line.run_cmd('quit')
153 else:139 else:
154 # Interactive mode140 # Interactive mode
@@ -160,8 +146,20 @@
160 cmd_line = interface.MasterCmdWeb()146 cmd_line = interface.MasterCmdWeb()
161 cmd_line.cmdloop()147 cmd_line.cmdloop()
162 else:148 else:
163 cmd_line = interface.MasterCmd(mgme_dir = options.mgme_dir)149 try:
164 cmd_line.cmdloop()150 cmd_line = interface.MadSpinInterface()
151 cmd_line.use_rawinput = True
152 cmd_line.cmdloop()
153 except:
154 pass
155 try:
156 cmd_line.exec_cmd('quit all', printcmd=False)
157 readline.set_history_length(100)
158 if not os.path.exists(os.path.join(os.environ['HOME'], '.mg5')):
159 os.mkdir(os.path.join(os.environ['HOME'], '.mg5'))
160 readline.write_history_file(history_file)
161 except Exception, error:
162 pass
165except KeyboardInterrupt:163except KeyboardInterrupt:
166 print 'writting history and quit on KeyboardInterrupt' 164 print 'writting history and quit on KeyboardInterrupt'
167 pass165 pass
168166
=== modified file 'Template/LO/Cards/run_card.dat'
--- Template/LO/Cards/run_card.dat 2018-04-25 21:20:23 +0000
+++ Template/LO/Cards/run_card.dat 2018-06-15 08:18:50 +0000
@@ -12,7 +12,7 @@
12# mind the format: value = variable ! comment *12# mind the format: value = variable ! comment *
13# *13# *
14# To display more options, you can type the command: *14# To display more options, you can type the command: *
15* update full_run_card *15# update full_run_card *
16#*********************************************************************16#*********************************************************************
17#17#
18#******************* 18#*******************
1919
=== modified file 'Template/LO/SubProcesses/genps.f'
--- Template/LO/SubProcesses/genps.f 2018-04-20 08:38:20 +0000
+++ Template/LO/SubProcesses/genps.f 2018-06-15 08:18:50 +0000
@@ -104,7 +104,7 @@
104c104c
105 integer iconfig,mincfig,maxcfig,invar105 integer iconfig,mincfig,maxcfig,invar
106 double precision p1(0:3,nexternal+1)106 double precision p1(0:3,nexternal+1)
107 double precision x(maxinvar)107 double precision x(*)
108 double precision wgt108 double precision wgt
109c109c
110c Local110c Local
@@ -279,19 +279,18 @@
279 cm_rap=.5d0*dlog((p0+p3)/(p0-p3))279 cm_rap=.5d0*dlog((p0+p3)/(p0-p3))
280 set_cm_rap=.true.280 set_cm_rap=.true.
281c Set shat281c Set shat
282 s(-nbranch) = m2**2+2*xbk(1)*ebeam(1) *282 s(-nbranch) = x(ndim)*stot
283 $ (ebeam(2)+sqrt(ebeam(2)**2-m2**2))
284 elseif (abs(lpp(2)) .ge. 1) then283 elseif (abs(lpp(2)) .ge. 1) then
285 call sample_get_x(sjac,x(ndim),ndim,mincfig,0d0,1d0)284 call sample_get_x(sjac,x(ndim),ndim,mincfig,0d0,1d0)
286 xbk(2) = x(ndim)285 xbk(2) = x(ndim)
286
287c Set CM rapidity for use in the rap() function287c Set CM rapidity for use in the rap() function
288 p0=ebeam(1)+xbk(2)*ebeam(2)288 p0=ebeam(1)+xbk(2)*ebeam(2)
289 p3=sqrt(ebeam(1)**2-m1**2)-xbk(2)*ebeam(2)289 p3=sqrt(ebeam(1)**2-m1**2)-xbk(2)*ebeam(2)
290 cm_rap=.5d0*dlog((p0+p3)/(p0-p3))290 cm_rap=.5d0*dlog((p0+p3)/(p0-p3))
291 set_cm_rap=.true.291 set_cm_rap=.true.
292c Set shat292c Set shat
293 s(-nbranch) = m1**2+2*(ebeam(1)+sqrt(ebeam(1)**2-m1**2))293 s(-nbranch) = x(ndim)*stot
294 $ * xbk(2)*ebeam(2)
295 else294 else
296c Set CM rapidity for use in the rap() function295c Set CM rapidity for use in the rap() function
297 p0=ebeam(1) + ebeam(2)296 p0=ebeam(1) + ebeam(2)
@@ -663,7 +662,7 @@
663c double precision spole(-max_branch:0),swidth(-max_branch:0)662c double precision spole(-max_branch:0),swidth(-max_branch:0)
664 double precision jac,pswgt663 double precision jac,pswgt
665 integer nbranch664 integer nbranch
666 double precision x(40) ! ja 3/2/11 21->40 after strange segfault665 double precision x(*) ! ja 3/2/11 21->40 after strange segfault
667c666c
668c Local667c Local
669c668c
670669
=== modified file 'Template/LO/SubProcesses/reweight.f'
--- Template/LO/SubProcesses/reweight.f 2018-03-11 12:29:51 +0000
+++ Template/LO/SubProcesses/reweight.f 2018-06-15 08:18:50 +0000
@@ -1,3 +1,20 @@
1c for cross-checking change in this file.
2c here is a minimal list of process that we have to
3c test
4c
5c SM
6c ----
7c p p > t t~ (up to 2jet)
8c p p > w+ (up to 3 jet)
9c p p > z t t~ j j (no MLM needed)
10c
11c
12c HEFT
13c ----
14c p p > h j b b~
15c q q > a a g q q
16c g g > h g q q
17
1 double precision function gamma(q0)18 double precision function gamma(q0)
2c**************************************************19c**************************************************
3c calculates the branching probability20c calculates the branching probability
@@ -522,7 +539,8 @@
522 common/to_stot/stot,m1,m2539 common/to_stot/stot,m1,m2
523540
524C local variables541C local variables
525 integer i, j, idi, idj, k542 integer i, j, idi, idj, k,m
543 integer get_color
526 real*8 PI544 real*8 PI
527 parameter( PI = 3.14159265358979323846d0 )545 parameter( PI = 3.14159265358979323846d0 )
528 integer iforest(2,-max_branch:-1,lmaxconfigs)546 integer iforest(2,-max_branch:-1,lmaxconfigs)
@@ -545,6 +563,7 @@
545 logical chclusold,fail,increasecode563 logical chclusold,fail,increasecode
546 save chclusold564 save chclusold
547 integer tmpindex565 integer tmpindex
566 integer pdgm, pdgid1, pdgid2
548567
549 logical isqcd,isjet,isparton,cluster,isjetvx,is_octet568 logical isqcd,isjet,isparton,cluster,isjetvx,is_octet
550 integer ifsno569 integer ifsno
@@ -746,8 +765,17 @@
746c The ishft gives the FS particle corresponding to imocl765c The ishft gives the FS particle corresponding to imocl
747 if(.not.is_octet(ipdgcl(ishft(1,ipart(1,imocl(n))-1),igraphs(1),iproc)))then766 if(.not.is_octet(ipdgcl(ishft(1,ipart(1,imocl(n))-1),igraphs(1),iproc)))then
748 ! split case for q a > q and for g > g h (with the gluon splitting into quark)767 ! split case for q a > q and for g > g h (with the gluon splitting into quark)
749 if (ipart(2,imocl(n)).eq.0) then ! q a > q case768 ! also check for case of three scalar interaction (then do nothing)
750 iqjets(ipart(1,imocl(n)))=0769 pdgm = ipdgcl(imocl(n),igraphs(1),iproc)
770 pdgid1 = ipdgcl(idacl(n,1),igraphs(1),iproc)
771 pdgid2 = ipdgcl(idacl(n,2),igraphs(1),iproc)
772
773 if (.not.isqcd(pdgm).and..not.isqcd(pdgid1).and..not.isqcd(pdgid2)) then
774 ! this is to avoid to do weird stuff for w+ w- z (or h h h)
775 ! this fix an issue for qq_zttxqq G1594.08
776 continue
777 elseif (ipart(2,imocl(n)).eq.0) then ! q a > q case
778 iqjets(ipart(1,imocl(n)))=0
751 else ! octet. want to be sure that both are tagged as jet before removing one779 else ! octet. want to be sure that both are tagged as jet before removing one
752 ! this prevent that both are removed in case of g > g h , g > q1 q2, q1 > a q1.780 ! this prevent that both are removed in case of g > g h , g > q1 q2, q1 > a q1.
753 ! at least one of the two should be kept as jet781 ! at least one of the two should be kept as jet
@@ -791,7 +819,57 @@
791 goodjet(imocl(n))=819 goodjet(imocl(n))=
792 $ (isjet(ipdgcl(imocl(n),igraphs(1),iproc)).and.820 $ (isjet(ipdgcl(imocl(n),igraphs(1),iproc)).and.
793 $ goodjet(idacl(n,1)).and.goodjet(idacl(n,2)))821 $ goodjet(idacl(n,1)).and.goodjet(idacl(n,2)))
794 endif822
823c check case with g > g g
824c where the hardest gluon is not goodjet but the other is.
825c in that case change ipart(1,) of the mother gluon
826c pure QCD jet
827c need to take care of the following case:
828c tttttttttt
829c gggggggggggggggg
830c ggggggggg tttttttttt
831c gggggggg
832c
833c in that case the up gluon can be tag as the hardest one
834c but this one is also lead to no QCD one.
835c so in that case we have to change ipart(1) to the sofest gluon
836 pdgm = ipdgcl(imocl(n),igraphs(1),iproc)
837 pdgid1 = ipdgcl(idacl(n,1),igraphs(1),iproc)
838 pdgid2 = ipdgcl(idacl(n,2),igraphs(1),iproc)
839 if (is_octet(pdgm).and.is_octet(pdgid1).and.is_octet(pdgid2))then
840c write(*,*) 'pure QCD vertex (2)'
841c write(*,*) pdgm , '>', pdgid1,' ', pdgid2
842c write(*,*) 'ipart', ipart(1,imocl(n)), ipart(2,imocl(n))
843c write(*,*) 'id', imocl(n), idacl(n,1),idacl(n,2)
844c write(*,*) 'ipart',ipart(1,imocl(n)),'/', ipart(2,imocl(n)), ipart(1,idacl(n,1)),'/', ipart(2,idacl(n,1)),
845c $ ipart(1,idacl(n,2)),'/', ipart(2,idacl(n,2))
846c write(*,*) 'googjet', goodjet(idacl(n,1)),goodjet(idacl(n,2))
847 if (ipart(1,imocl(n)).eq.ipart(1, idacl(n,1))) then
848 if (.not.goodjet(idacl(n,1)).and.goodjet(idacl(n,2))) then
849c write(*,*) 'ggg with hard jet set a QED the second jet lead to', ipart(1,idacl(n,2)), ipart(2,idacl(n,2))
850 do m =n_max_cl,n,-1
851 if(ipart(1,m).eq.ipart(1,imocl(n)).and.ipart(2,m).eq.ipart(2,imocl(n)))then
852 ipart(1,m) = ipart(1,idacl(n,2))
853 ipart(2,m) = ipart(2,idacl(n,2))
854 endif
855 enddo
856 endif
857 else
858 if (.not.goodjet(idacl(n,2)).and.goodjet(idacl(n,1))) then
859c write(*,*) 'ggg with hard jet set a QED the second jet lead to', ipart(1,idacl(n,1)), ipart(2,idacl(n,1))
860 do m =n_max_cl,n,-1
861 if(ipart(1,m).eq.ipart(1,imocl(n)).and.ipart(2,m).eq.ipart(2,imocl(n)))then
862 ipart(1,m) = ipart(1,idacl(n,1))
863 ipart(2,m) = ipart(2,idacl(n,1))
864 endif
865 enddo
866 endif
867 endif
868 endif
869
870
871
872 endif
795 enddo873 enddo
796874
797 if (btest(mlevel,4))then875 if (btest(mlevel,4))then
798876
=== modified file 'Template/NLO/SubProcesses/montecarlocounter.f'
--- Template/NLO/SubProcesses/montecarlocounter.f 2017-12-16 08:06:58 +0000
+++ Template/NLO/SubProcesses/montecarlocounter.f 2018-06-15 08:18:50 +0000
@@ -19,7 +19,7 @@
19 logical notagluon,found19 logical notagluon,found
20 common/cnotagluon/notagluon20 common/cnotagluon/notagluon
21 integer nglu,nsngl21 integer nglu,nsngl
22 logical isspecial,isspecial022 logical isspecial(max_bcol)
23 common/cisspecial/isspecial23 common/cisspecial/isspecial
24 logical spec_case24 logical spec_case
25c25c
@@ -68,9 +68,9 @@
6868
69 fksfather=min(i_fks,j_fks)69 fksfather=min(i_fks,j_fks)
7070
71c isspecial will be set equal to .true. only if the father is a gluon,71c isspecial will be set equal to .true. colour flow by colour flow only
72c and another gluon will be found which is connected to it by both72c if the father is a gluon, and another gluon will be found which is
73c colour and anticolour73c connected to it by both colour and anticolour
74 isspecial=.false.74 isspecial=.false.
75c75c
76c consider only leading colour flows76c consider only leading colour flows
@@ -89,7 +89,6 @@
89 do i=1,max_bcol89 do i=1,max_bcol
90 if(.not.is_leading_cflow(i))cycle90 if(.not.is_leading_cflow(i))cycle
91c Loop over Born-level colour flows91c Loop over Born-level colour flows
92 isspecial0=.false.
93c nglu and nsngl are the number of gluons (except for the father) and of 92c nglu and nsngl are the number of gluons (except for the father) and of
94c colour singlets in the Born process, according to the information 93c colour singlets in the Born process, according to the information
95c stored in ICOLUP94c stored in ICOLUP
@@ -178,19 +177,18 @@
178 stop177 stop
179 endif178 endif
180 colorflow(k0,colorflow(k0,0))=i179 colorflow(k0,colorflow(k0,0))=i
181 isspecial0=.true.180 isspecial(i)=.true.
182 endif181 endif
183 endif182 endif
184 enddo183 enddo
185 endif184 endif
186 enddo185 enddo
187 if( ((nglu+nsngl).gt.(nexternal-2)) .or.186 if( ((nglu+nsngl).gt.(nexternal-2)) .or.
188 # (isspecial0.and.(nglu+nsngl).ne.(nexternal-2)) )then187 # (isspecial(i).and.(nglu+nsngl).ne.(nexternal-2)) )then
189 write(*,*)'Error #4 in set_matrices'188 write(*,*)'Error #4 in set_matrices'
190 write(*,*)isspecial0,nglu,nsngl189 write(*,*)isspecial(i),nglu,nsngl
191 stop190 stop
192 endif191 endif
193 isspecial=isspecial.or.isspecial0
194 enddo192 enddo
195 call check_mc_matrices193 call check_mc_matrices
196 return194 return
@@ -213,7 +211,7 @@
213 common/cfksfather/fksfather211 common/cfksfather/fksfather
214 logical notagluon212 logical notagluon
215 common/cnotagluon/notagluon213 common/cnotagluon/notagluon
216 logical isspecial214 logical isspecial(max_bcol)
217 common/cisspecial/isspecial215 common/cisspecial/isspecial
218 logical is_leading_cflow(max_bcol)216 logical is_leading_cflow(max_bcol)
219 integer num_leading_cflows217 integer num_leading_cflows
@@ -275,8 +273,8 @@
275c273c
276 if( (notagluon.and.ntot.ne.num_leading_cflows) .or.274 if( (notagluon.and.ntot.ne.num_leading_cflows) .or.
277 # ( (.not.notagluon).and.275 # ( (.not.notagluon).and.
278 # ( (.not.isspecial).and.ntot.ne.(2*num_leading_cflows) .or.276 # ( (.not.isspecial(1)).and.ntot.ne.(2*num_leading_cflows) .or.
279 # (isspecial.and.ntot.ne.num_leading_cflows) ) ) )then277 # (isspecial(1).and.ntot.ne.num_leading_cflows) ) ) )then
280 write(*,*)'Error #6 in check_mc_matrices',278 write(*,*)'Error #6 in check_mc_matrices',
281 # notagluon,ntot,num_leading_cflows,max_bcol279 # notagluon,ntot,num_leading_cflows,max_bcol
282 stop280 stop
@@ -429,7 +427,7 @@
429427
430 integer ipartners(0:nexternal-1),colorflow(nexternal-1,0:max_bcol)428 integer ipartners(0:nexternal-1),colorflow(nexternal-1,0:max_bcol)
431 common /MC_info/ ipartners,colorflow429 common /MC_info/ ipartners,colorflow
432 logical isspecial430 logical isspecial(max_bcol)
433 common/cisspecial/isspecial431 common/cisspecial/isspecial
434432
435 integer fksfather433 integer fksfather
@@ -633,7 +631,6 @@
633c go --> go g631c go --> go g
634 if(ileg.le.2)then632 if(ileg.le.2)then
635 N_p=2633 N_p=2
636 if(isspecial)N_p=1
637 if(limit)then634 if(limit)then
638 xkern(1)=(g**2/N_p)*8*vca*(1-x*(1-x))**2/(s*x**2)635 xkern(1)=(g**2/N_p)*8*vca*(1-x*(1-x))**2/(s*x**2)
639 xkernazi(1)=-(g**2/N_p)*16*vca*(1-x)**2/(s*x**2)636 xkernazi(1)=-(g**2/N_p)*16*vca*(1-x)**2/(s*x**2)
@@ -650,7 +647,6 @@
650c647c
651 elseif(ileg.eq.3)then648 elseif(ileg.eq.3)then
652 N_p=2649 N_p=2
653 if(isspecial)N_p=1
654 if(non_limit)then650 if(non_limit)then
655 xfact=(2-(1-x)*(1-(kn0/kn)*yj))/kn*knbar*(1-x)*(1-yj)651 xfact=(2-(1-x)*(1-(kn0/kn)*yj))/kn*knbar*(1-x)*(1-yj)
656 prefact=2/(s*N_p)652 prefact=2/(s*N_p)
@@ -661,7 +657,6 @@
661c657c
662 elseif(ileg.eq.4)then658 elseif(ileg.eq.4)then
663 N_p=2659 N_p=2
664 if(isspecial)N_p=1
665 if(limit)then660 if(limit)then
666 xkern(1)=(g**2/N_p)*( 8*vca*661 xkern(1)=(g**2/N_p)*( 8*vca*
667 & (s**2*(1-(1-x)*x)-s*(1+x)*xm12+xm12**2)**2 )/662 & (s**2*(1-(1-x)*x)-s*(1+x)*xm12+xm12**2)**2 )/
@@ -697,7 +692,6 @@
697c692c
698 elseif(ileg.eq.4)then693 elseif(ileg.eq.4)then
699 N_p=2694 N_p=2
700 if(isspecial)N_p=1
701 if(limit)then695 if(limit)then
702 xkern(1)=(g**2/N_p)*( 4*vtf*(1-x)*696 xkern(1)=(g**2/N_p)*( 4*vtf*(1-x)*
703 & (s**2*(1-2*(1-x)*x)-2*s*x*xm12+xm12**2) )/697 & (s**2*(1-2*(1-x)*x)-2*s*x*xm12+xm12**2) )/
@@ -730,7 +724,6 @@
730c a --> a q724c a --> a q
731 if(ileg.le.2)then725 if(ileg.le.2)then
732 N_p=2726 N_p=2
733 if(isspecial)N_p=1
734 if(limit)then727 if(limit)then
735 xkern(1)=(g**2/N_p)*4*vcf*(1-x)*((1-x)**2+1)/(s*x**2)728 xkern(1)=(g**2/N_p)*4*vcf*(1-x)*((1-x)**2+1)/(s*x**2)
736 xkern(2)=xkern(1)*(g_ew**2/g**2)*(qi2/vcf)729 xkern(2)=xkern(1)*(g_ew**2/g**2)*(qi2/vcf)
@@ -925,8 +918,10 @@
925 xkernazi(i)=xkernazi(i)*gfactazi*gfactsf*wcc918 xkernazi(i)=xkernazi(i)*gfactazi*gfactsf*wcc
926 enddo919 enddo
927 do cflows=1,colorflow(npartner,0)920 do cflows=1,colorflow(npartner,0)
928 born_red=born_red+bornbars(colorflow(npartner,cflows))921 N_p=1
929 born_red_tilde=born_red_tilde+bornbarstilde(colorflow(npartner,cflows))922 if(isspecial(cflows))N_p=2d0
923 born_red=born_red+N_p*bornbars(colorflow(npartner,cflows))
924 born_red_tilde=born_red_tilde+N_p*bornbarstilde(colorflow(npartner,cflows))
930 enddo925 enddo
931c Change here, to include also xkern(2)!926c Change here, to include also xkern(2)!
932 xmcxsec(npartner)=xkern(1)*born_red+xkernazi(1)*born_red_tilde927 xmcxsec(npartner)=xkern(1)*born_red+xkernazi(1)*born_red_tilde
@@ -1207,26 +1202,58 @@
12071202
12081203
1209 function gfunction(w,alpha,beta,delta)1204 function gfunction(w,alpha,beta,delta)
1210c Gets smoothly to 0 as w goes to 11205c Gets smoothly to 0 as w goes to 1.
1206c Call with
1207c alpha > 1, or alpha < 0; if alpha < 0, gfunction = 1;
1208c 0 < |beta| <= 1;
1209c 0 < delta <= 2.
1211 implicit none1210 implicit none
1211 double precision tiny
1212 parameter (tiny=1.d-5)
1212 double precision gfunction,alpha,beta,delta,w,wmin,wg,tt,tmp1213 double precision gfunction,alpha,beta,delta,w,wmin,wg,tt,tmp
12131214 logical firsttime
1214 if(beta.lt.0d0)then1215 save firsttime
1215 wmin=0d01216 data firsttime /.true./
1216 else1217 double precision cutoff,cutoff2
1217 wmin=max(0d0,1d0-delta)1218 parameter(cutoff=1d0)
1218 endif1219 parameter(cutoff2=0.99d0)
1219 wg=min(1d0-(1-wmin)*abs(beta),0.99d0)1220c
1220 tt=(abs(w)-wg)/(1d0-wg)1221c set cutoff < 1 and cutoff2 = cutoff in the final version
1221 if(tt.gt.1d0)then1222c
1222 write(*,*)'Fatal error in gfunction',tt1223 if(firsttime)then
1223 stop1224 firsttime=.false.
1224 endif1225 if(alpha.ge.0d0.and.alpha.lt.1d0)then
1226 write(*,*)'Incorrect alpha in gfunction',alpha
1227 stop
1228 endif
1229 if(abs(beta).gt.1d0)then
1230 write(*,*)'Incorrect beta in gfunction',beta
1231 stop
1232 endif
1233 if(delta.gt.2d0.or.delta.le.0d0)then
1234 write(*,*)'Incorrect delta in gfunction',delta
1235 stop
1236 endif
1237 endif
1238c
1225 tmp=1d01239 tmp=1d0
1226 if(alpha.gt.0d0)then1240 if(alpha.gt.0d0)then
1227 if(tt.gt.0d0.and.abs(w).lt.0.99d0)1241 if(beta.lt.0d0)then
1228 & tmp=(1-tt)**(2*alpha)/(tt**(2*alpha)+(1-tt)**(2*alpha))1242 wmin=0d0
1229 if(abs(w).ge.0.99d0)tmp=0d01243 else
1244 wmin=max(0d0,1d0-delta)
1245 endif
1246 wg=min(1d0-(1-wmin)*abs(beta),cutoff-tiny)
1247 if(abs(w).gt.wg.and.abs(w).lt.cutoff2)then
1248 tt=(abs(w)-wg)/(cutoff-wg)
1249 if(tt.gt.1d0)then
1250 write(*,*)'Fatal error in gfunction',tt
1251 stop
1252 endif
1253 tmp=(1-tt)**(2*alpha)/(tt**(2*alpha)+(1-tt)**(2*alpha))
1254 elseif(abs(w).ge.cutoff2)then
1255 tmp=0d0
1256 endif
1230 endif1257 endif
1231 gfunction=tmp1258 gfunction=tmp
1232 return1259 return
@@ -2600,6 +2627,7 @@
2600 subroutine assign_ref_scale(p,xii,sh,ref_sc)2627 subroutine assign_ref_scale(p,xii,sh,ref_sc)
2601 implicit none2628 implicit none
2602 include "nexternal.inc"2629 include "nexternal.inc"
2630 include "madfks_mcatnlo.inc"
2603 double precision p(0:3,nexternal-1),xii,sh,ref_sc2631 double precision p(0:3,nexternal-1),xii,sh,ref_sc
2604 integer i_scale,i2632 integer i_scale,i
2605 parameter(i_scale=1)2633 parameter(i_scale=1)
@@ -2619,7 +2647,7 @@
2619 stop2647 stop
2620 endif2648 endif
2621c Safety threshold for the reference scale2649c Safety threshold for the reference scale
2622 ref_sc=max(ref_sc,30d0)2650 ref_sc=max(ref_sc,scaleMClow+scaleMCdelta)
26232651
2624 return2652 return
2625 end2653 end
26262654
=== modified file 'UpdateNotes.txt'
--- UpdateNotes.txt 2018-04-29 13:58:31 +0000
+++ UpdateNotes.txt 2018-06-15 08:18:50 +0000
@@ -1,5 +1,33 @@
1Update notes for MadGraph5_aMC@NLO (in reverse time order)1Update notes for MadGraph5_aMC@NLO (in reverse time order)
22
32.6.3 (13/06/18)
4 OM: When importing model, we now run one additional layer of optimisation:
5 - if a vertex as two identical coupling for the same color structure then the associated lorentz
6 structure are merged in a single one and the vertex is modified accordingly
7 OM: When restricting a model, we also run one additional layer of optimisation
8 - Opposite sign coupling are now identified and merged into a single one
9 - if a vertex as two identical coupling (up to the sign) for the same color structure
10 then the associated lorentz structure are merged in a single one and the
11 vertex is modified accordingly
12 VH+OM: changing the ALOHA naming scheme for combine routine when the function name starts to be too long.
13 OM: adding a hidden parameter to the run_card (python_seed) to allow to control the randon number
14 generated within python and be able to have full reproducibility of the events
15 OM: Fixing some issue with the default dynamical scale choice for
16 - non minimal QED sample
17 - heft model when multiple radiation coming from the higgs decay/scattering
18 This can also impact MLM since it use the same definition for the dynamical scale
19 OM: Fix some issue for DIS scattering where the shat was wrongly defined for low energy scattering.
20 Low energy scattering are not adviced since they break the factorization theorem.
21 In particular the z-boost of the events are quite ill defined in that scenario.
22 OM: changing the format of the param_card for NLO model to match expectation from the latest PY8
23 OM: Update of MadSpin to allow special input file for the case of spinmode=none.
24 With that very simple mode of decay, you can now decay hepmc file or wrongly formatted leshouches event
25 (in that mode we do not have spin correlation and width effect)
26 PT: in montecarlocounter.f: improved colour-flow treatment in the case gluons are twice colour-connected to each other
27 new gfunction(w) to get smoothly to 0 as w -> 1. (for NLO+PS run)
28 OM: Fix some issue for the new QED model (including one in the handling of complex mass scheme of such model)
29 OM: Fixing an issue of the param_card out of sync when running compute-widths
30 OM: Adding Qnumbers block for ghost (the latest version of py8 was crashing due to their absence)
331
42.6.2 (29/04/18)322.6.2 (29/04/18)
533
634
=== modified file 'VERSION'
--- VERSION 2018-04-29 13:58:31 +0000
+++ VERSION 2018-06-15 08:18:50 +0000
@@ -1,5 +1,5 @@
1version = 2.6.21version = 2.6.3
2date = 2018-04-292date = 2018-06-13
33
44
55
66
=== modified file 'aloha/aloha_writers.py'
--- aloha/aloha_writers.py 2018-04-11 15:28:05 +0000
+++ aloha/aloha_writers.py 2018-06-15 08:18:50 +0000
@@ -1177,7 +1177,7 @@
11771177
1178def get_routine_name(name=None, outgoing=None, tag=None, abstract=None):1178def get_routine_name(name=None, outgoing=None, tag=None, abstract=None):
1179 """ build the name of the aloha function """1179 """ build the name of the aloha function """
1180 1180
1181 assert (name and outgoing is not None) or abstract1181 assert (name and outgoing is not None) or abstract
11821182
1183 if tag is None:1183 if tag is None:
@@ -1205,6 +1205,14 @@
1205def combine_name(name, other_names, outgoing, tag=None, unknown_propa=False):1205def combine_name(name, other_names, outgoing, tag=None, unknown_propa=False):
1206 """ build the name for combined aloha function """1206 """ build the name for combined aloha function """
12071207
1208 def myHash(target_string):
1209 if len(target_string)<50:
1210 return target_string
1211 if '%(propa)s' in target_string:
1212 return 'ALOHA_'+(str(hash(target_string.lower()))).replace('-','m')+'%(propa)s'
1213 else:
1214 return 'ALOHA_'+(str(hash(target_string.lower()))).replace('-','m')
1215
1208 if tag and any(t.startswith('P') for t in tag[:-1]):1216 if tag and any(t.startswith('P') for t in tag[:-1]):
1209 # propagator need to be the last entry for the tag1217 # propagator need to be the last entry for the tag
1210 for i,t in enumerate(tag):1218 for i,t in enumerate(tag):
@@ -1238,9 +1246,11 @@
1238 if unknown_propa and outgoing:1246 if unknown_propa and outgoing:
1239 routine += '%(propa)s'1247 routine += '%(propa)s'
1240 if outgoing is not None:1248 if outgoing is not None:
1241 return routine +'_%s' % outgoing1249 return myHash(routine)+'_%s' % outgoing
1250# return routine +'_%s' % outgoing
1242 else:1251 else:
1243 return routine1252 return myHash(routine)
1253# return routine
12441254
1245 if tag is not None:1255 if tag is not None:
1246 addon = ''.join(tag)1256 addon = ''.join(tag)
@@ -1257,10 +1267,15 @@
1257 if unknown_propa:1267 if unknown_propa:
1258 addon += '%(propa)s'1268 addon += '%(propa)s'
12591269
1270# if outgoing is not None:
1271# return '_'.join((name,) + tuple(other_names)) + addon + '_%s' % outgoing
1272# else:
1273# return '_'.join((name,) + tuple(other_names)) + addon
1274
1260 if outgoing is not None:1275 if outgoing is not None:
1261 return '_'.join((name,) + tuple(other_names)) + addon + '_%s' % outgoing1276 return myHash('_'.join((name,) + tuple(other_names))) + addon + '_%s' % outgoing
1262 else:1277 else:
1263 return '_'.join((name,) + tuple(other_names)) + addon1278 return myHash('_'.join((name,) + tuple(other_names))) + addon
12641279
1265class ALOHAWriterForCPP(WriteALOHA): 1280class ALOHAWriterForCPP(WriteALOHA):
1266 """Routines for writing out helicity amplitudes as C++ .h and .cc files."""1281 """Routines for writing out helicity amplitudes as C++ .h and .cc files."""
@@ -1736,7 +1751,7 @@
1736 # added to another file1751 # added to another file
1737 self.mode = 'no_include'1752 self.mode = 'no_include'
1738 1753
1739 #name = combine_name(self.name, lor_names, offshell, self.tag)1754
1740 1755
1741 #h_text = self.write_combined_h(lor_names, offshell, **opt)1756 #h_text = self.write_combined_h(lor_names, offshell, **opt)
1742 cc_text, h_text = StringIO() , StringIO() 1757 cc_text, h_text = StringIO() , StringIO()
17431758
=== modified file 'aloha/create_aloha.py'
--- aloha/create_aloha.py 2018-04-26 18:04:25 +0000
+++ aloha/create_aloha.py 2018-06-15 08:18:50 +0000
@@ -470,8 +470,8 @@
470 propaR = deltaL('pr1',id) * deltaL('pr2', 'I2') * delta('pr2', spin_id) * delta('pr1', 'I3')470 propaR = deltaL('pr1',id) * deltaL('pr2', 'I2') * delta('pr2', spin_id) * delta('pr1', 'I3')
471 #numerator += "*deltaL('pr_1',id) * deltaL('pr_2', 'I2') * delta('pr_1', spin_id) * delta('pr_2', 'I3')"471 #numerator += "*deltaL('pr_1',id) * deltaL('pr_2', 'I2') * delta('pr_1', spin_id) * delta('pr_2', 'I3')"
472 elif spin == 5 :472 elif spin == 5 :
473 tag = {'1': _spin2_mult + id, '2': 2 * _spin2_mult + id, 473 tag = {'1': _spin2_mult + id, '2': 'I2',
474 '51': 'I2', '52': 'I3', 'id':id}474 '51': 2 * _spin2_mult + id, '52': 'I3', 'id':id}
475 475
476 numerator = self.mod_propagator_expression(tag, numerator)476 numerator = self.mod_propagator_expression(tag, numerator)
477 if denominator:477 if denominator:
@@ -938,7 +938,7 @@
938 if self.has_key((lorentzname, outgoing)):938 if self.has_key((lorentzname, outgoing)):
939 self[(lorentzname, outgoing)].add_combine(list_l_name[1:])939 self[(lorentzname, outgoing)].add_combine(list_l_name[1:])
940 else:940 else:
941 lorentz = eval('self.model.lorentz.%s' % lorentzname)941 lorentz = eval('self.model.lorentz.%s' % list_l_name[0])
942 assert lorentz.structure == 'external'942 assert lorentz.structure == 'external'
943 else:943 else:
944 l_lorentz = []944 l_lorentz = []
@@ -1240,7 +1240,6 @@
1240 1240
1241 # avoid to add tag in global1241 # avoid to add tag in global
1242 old_tag = set(aloha_lib.KERNEL.use_tag)1242 old_tag = set(aloha_lib.KERNEL.use_tag)
1243 print 'create lib',tag
1244 name, i = tag1243 name, i = tag
1245 if name == "Spin2Prop":1244 if name == "Spin2Prop":
1246 lib[('Spin2Prop',i)] = create( Spin2Propagator(_spin2_mult + i, \1245 lib[('Spin2Prop',i)] = create( Spin2Propagator(_spin2_mult + i, \
12471246
=== modified file 'madgraph/interface/amcatnlo_interface.py'
--- madgraph/interface/amcatnlo_interface.py 2016-09-01 09:44:05 +0000
+++ madgraph/interface/amcatnlo_interface.py 2018-06-15 08:18:50 +0000
@@ -384,7 +384,7 @@
384 else:384 else:
385 for diag_type, get_amps in get_amps_dict.items():385 for diag_type, get_amps in get_amps_dict.items():
386 self._curr_amps = get_amps()386 self._curr_amps = get_amps()
387 self.draw(' '.join(args[1:]), type=diag_type)387 self.draw(' '.join(args[1:]), Dtype=diag_type)
388 # set _curr_amps back to empty388 # set _curr_amps back to empty
389 self._curr_amps = diagram_generation.AmplitudeList()389 self._curr_amps = diagram_generation.AmplitudeList()
390390
@@ -402,7 +402,7 @@
402 text += '\n\nReal diagrams:'402 text += '\n\nReal diagrams:'
403 text += '\n'.join(amp.nice_string() for amp in get_amps_dict['real']())403 text += '\n'.join(amp.nice_string() for amp in get_amps_dict['real']())
404 text += '\n\nLoop diagrams:\n'404 text += '\n\nLoop diagrams:\n'
405 text += '\n'.join(amp.nice_string() for amp in get_amps_dict['virt']())405 text += '\n'.join(amp.nice_string() for amp in get_amps_dict['loop']())
406 pydoc.pager(text)406 pydoc.pager(text)
407407
408 # set _curr_amps back to empty408 # set _curr_amps back to empty
409409
=== modified file 'madgraph/interface/amcatnlo_run_interface.py'
--- madgraph/interface/amcatnlo_run_interface.py 2018-03-22 14:00:54 +0000
+++ madgraph/interface/amcatnlo_run_interface.py 2018-06-15 08:18:50 +0000
@@ -2058,7 +2058,7 @@
2058"""-1 12 ! points, iterations2058"""-1 12 ! points, iterations
2059%(accuracy)s ! desired fractional accuracy2059%(accuracy)s ! desired fractional accuracy
20601 -0.1 ! alpha, beta for Gsoft20601 -0.1 ! alpha, beta for Gsoft
2061 1 -0.1 ! alpha, beta for Gazi2061-1 -0.1 ! alpha, beta for Gazi
20621 ! Suppress amplitude (0 no, 1 yes)?20621 ! Suppress amplitude (0 no, 1 yes)?
20631 ! Exact helicity sum (0 yes, n = number/event)?20631 ! Exact helicity sum (0 yes, n = number/event)?
2064%(channel)s ! Enter Configuration Number:2064%(channel)s ! Enter Configuration Number:
@@ -5325,7 +5325,7 @@
5325 cards.append('madspin_card.dat')5325 cards.append('madspin_card.dat')
5326 if switch['reweight'] != 'OFF':5326 if switch['reweight'] != 'OFF':
5327 cards.append('reweight_card.dat')5327 cards.append('reweight_card.dat')
5328 if switch['madanalysis'] == 'HADRON':5328 if switch['madanalysis'] in ['HADRON', 'ON']:
5329 cards.append('madanalysis5_hadron_card.dat') 5329 cards.append('madanalysis5_hadron_card.dat')
5330 if 'aMC@' in mode:5330 if 'aMC@' in mode:
5331 cards.append('shower_card.dat')5331 cards.append('shower_card.dat')
53325332
=== modified file 'madgraph/interface/common_run_interface.py'
--- madgraph/interface/common_run_interface.py 2018-04-28 21:38:38 +0000
+++ madgraph/interface/common_run_interface.py 2018-06-15 08:18:50 +0000
@@ -3338,11 +3338,12 @@
3338 line = 'compute_widths %s --path=%s' % (line, path)3338 line = 'compute_widths %s --path=%s' % (line, path)
3339 cmd.exec_cmd(line, model=model)3339 cmd.exec_cmd(line, model=model)
3340 interface.child = None3340 interface.child = None
3341 3341 del cmd
3342 3342 return
3343 3343
3344 3344
3345 raise Exception, 'fail to find a way to handle Auto width'3345
3346 raise Exception, 'fail to find a way to handle Auto width'
3346 3347
3347 3348
3348 def store_scan_result(self):3349 def store_scan_result(self):
@@ -3388,6 +3389,7 @@
3388 os.remove(pjoin(self.me_dir,'RunWeb'))3389 os.remove(pjoin(self.me_dir,'RunWeb'))
3389 except Exception:3390 except Exception:
3390 pass3391 pass
3392
3391 try:3393 try:
3392 self.store_result()3394 self.store_result()
3393 except Exception:3395 except Exception:
@@ -3686,6 +3688,7 @@
3686 self.results.add_detail('cross', madspin_cmd.cross)#cross * madspin_cmd.branching_ratio)3688 self.results.add_detail('cross', madspin_cmd.cross)#cross * madspin_cmd.branching_ratio)
3687 self.results.add_detail('error', madspin_cmd.error+ cross * madspin_cmd.err_branching_ratio)3689 self.results.add_detail('error', madspin_cmd.error+ cross * madspin_cmd.err_branching_ratio)
3688 self.results.add_detail('run_mode', current['run_mode'])3690 self.results.add_detail('run_mode', current['run_mode'])
3691 self.to_store.append("event")
36893692
3690 self.run_name = new_run3693 self.run_name = new_run
3691 self.banner = madspin_cmd.banner3694 self.banner = madspin_cmd.banner
@@ -5739,8 +5742,12 @@
5739 5742
5740 fail_due_to_format = 0 #parameter to avoid infinite loop5743 fail_due_to_format = 0 #parameter to avoid infinite loop
5741 def postcmd(self, stop, line):5744 def postcmd(self, stop, line):
5742 ending_question = cmd.OneLinePathCompletion.postcmd(self,stop,line)
57435745
5746 if line not in [None, '0', 'done', '']:
5747 ending_question = cmd.OneLinePathCompletion.postcmd(self,stop,line)
5748 else:
5749 ending_question = True
5750
5744 if ending_question:5751 if ending_question:
5745 self.check_card_consistency()5752 self.check_card_consistency()
5746 if self.param_consistency:5753 if self.param_consistency:
@@ -6140,6 +6147,12 @@
61406147
6141 def do_compute_widths(self, line):6148 def do_compute_widths(self, line):
6142 signal.alarm(0) # avoid timer if any6149 signal.alarm(0) # avoid timer if any
6150
6151 # ensure that the card is in sync
6152 if 'param' in self.modified_card:
6153 self.write_card('param')
6154 self.modified_card.discard('param')
6155
6143 path = self.paths['param']6156 path = self.paths['param']
6144 pattern = re.compile(r'''decay\s+(\+?\-?\d+)\s+auto(@NLO|)''',re.I)6157 pattern = re.compile(r'''decay\s+(\+?\-?\d+)\s+auto(@NLO|)''',re.I)
6145 text = open(path).read()6158 text = open(path).read()
@@ -6257,7 +6270,7 @@
6257 logger.info("add in the pythia8_card the parameter \"%s\" with value \"%s\"" % (name, value), '$MG:BOLD')6270 logger.info("add in the pythia8_card the parameter \"%s\" with value \"%s\"" % (name, value), '$MG:BOLD')
6258 elif len(args) > 0:6271 elif len(args) > 0:
6259 if args[0] in self.cards:6272 if args[0] in self.cards:
6260 card = args[0]6273 card = args[0]
6261 elif "%s.dat" % args[0] in self.cards:6274 elif "%s.dat" % args[0] in self.cards:
6262 card = "%s.dat" % args[0]6275 card = "%s.dat" % args[0]
6263 elif "%s_card.dat" % args[0] in self.cards: 6276 elif "%s_card.dat" % args[0] in self.cards:
@@ -6267,7 +6280,11 @@
6267 else:6280 else:
6268 logger.error("unknow card %s. Please retry." % args[0])6281 logger.error("unknow card %s. Please retry." % args[0])
6269 return6282 return
6270 6283 # ensure that the card is in sync
6284 if card in self.modified_card:
6285 self.write_card(card)
6286 self.modified_card.discard(card)
6287
6271 if card in self.paths:6288 if card in self.paths:
6272 path = self.paths[card]6289 path = self.paths[card]
6273 elif os.path.exists(card):6290 elif os.path.exists(card):
@@ -6431,6 +6448,12 @@
6431 """Running ASperGe"""6448 """Running ASperGe"""
6432 signal.alarm(0) # avoid timer if any6449 signal.alarm(0) # avoid timer if any
64336450
6451 # ensure that the card is in sync
6452 if 'param' in self.modified_card:
6453 self.write_card('param')
6454 self.modified_card.discard('param')
6455
6456
6434 path = pjoin(self.me_dir,'bin','internal','ufomodel','ASperGE')6457 path = pjoin(self.me_dir,'bin','internal','ufomodel','ASperGE')
6435 if not os.path.exists(path):6458 if not os.path.exists(path):
6436 logger.error('ASperge has not been detected in the current model, therefore it will not be run.')6459 logger.error('ASperge has not been detected in the current model, therefore it will not be run.')
@@ -6541,8 +6564,8 @@
65416564
6542 if answer in self.modified_card:6565 if answer in self.modified_card:
6543 self.write_card(answer)6566 self.write_card(answer)
6544 elif answer.replace('_card.dat','') in self.modified_card:6567 elif os.path.basename(answer.replace('_card.dat','')) in self.modified_card:
6545 self.write_card(answer.replace('_card.dat',''))6568 self.write_card(os.path.basename(answer.replace('_card.dat','')))
65466569
6547 try:6570 try:
6548 self.mother_interface.exec_cmd('open %s' % path)6571 self.mother_interface.exec_cmd('open %s' % path)
@@ -6613,7 +6636,7 @@
6613 """ This is a decorator for customizing/using scan over the param_card (or technically other)6636 """ This is a decorator for customizing/using scan over the param_card (or technically other)
6614 This should be use like this:6637 This should be use like this:
6615 6638
6616 @scanhandling(arguments)6639 @scanparamcardhandling(arguments)
6617 def run_launch(self, *args, **opts)6640 def run_launch(self, *args, **opts)
66186641
6619 possible arguments are listed above and should be function who takes a single6642 possible arguments are listed above and should be function who takes a single
@@ -6715,7 +6738,7 @@
6715 #param_card_iterator.write(card_path) #-> this is done by the with statement6738 #param_card_iterator.write(card_path) #-> this is done by the with statement
6716 name = misc.get_scan_name(orig_name, next_name)6739 name = misc.get_scan_name(orig_name, next_name)
6717 path = result_path(obj) % name 6740 path = result_path(obj) % name
6718 logger.info("write all cross-section results in %s" % path ,'$MG:BOLD')6741 logger.info("write scan results in %s" % path ,'$MG:BOLD')
6719 order = summaryorder(obj)()6742 order = summaryorder(obj)()
6720 param_card_iterator.write_summary(path, order=order)6743 param_card_iterator.write_summary(path, order=order)
6721 return new_fct6744 return new_fct
67226745
=== modified file 'madgraph/interface/extended_cmd.py'
--- madgraph/interface/extended_cmd.py 2018-03-23 16:46:49 +0000
+++ madgraph/interface/extended_cmd.py 2018-06-15 08:18:50 +0000
@@ -2350,6 +2350,8 @@
2350 color_for_XXXX(value) -> return the representation on the screen for value2350 color_for_XXXX(value) -> return the representation on the screen for value
2351 get_cardcmd_for_XXXX(value)> return the command to run to customize the cards to 2351 get_cardcmd_for_XXXX(value)> return the command to run to customize the cards to
2352 match the status2352 match the status
2353 print_options_XXXX() -> return the text to disply below "other options"
2354 default is other possible value (ordered correctly)
23532355
2354 consistency_XX_YY(val_XX, val_YY)2356 consistency_XX_YY(val_XX, val_YY)
2355 -> XX is the new key set by the user to a new value val_XX2357 -> XX is the new key set by the user to a new value val_XX
@@ -2553,6 +2555,12 @@
2553 value = self.get_allowed(base)[cur+1]2555 value = self.get_allowed(base)[cur+1]
2554 except IndexError:2556 except IndexError:
2555 value = self.get_allowed(base)[0]2557 value = self.get_allowed(base)[0]
2558 if value == "OFF" and cur == 0:
2559 logger.warning("Invalid action: %s" % self.print_options(base))
2560 elif cur == 0:
2561 logger.warning("Can not change value for this parameter")
2562
2563
2556 elif line in ['', 'done', 'EOF', 'eof','0']:2564 elif line in ['', 'done', 'EOF', 'eof','0']:
2557 super(ControlSwitch, self).default(line)2565 super(ControlSwitch, self).default(line)
2558 return self.answer2566 return self.answer
@@ -2823,10 +2831,10 @@
2823 else:2831 else:
2824 return self.red % switch_value2832 return self.red % switch_value
28252833
2826 def print_info(self,key):2834 def print_options(self,key, keep_default=False):
2827 2835
2828 if hasattr(self, 'print_info_%s' % key):2836 if hasattr(self, 'print_options_%s' % key) and not keep_default:
2829 return getattr(self, 'print_info_%s' % key)2837 return getattr(self, 'print_options_%s' % key)()
28302838
2831 #re-order the options in order to have those in cycling order 2839 #re-order the options in order to have those in cycling order
2832 try:2840 try:
@@ -3087,7 +3095,7 @@
3087 to_display = self.switch[key]3095 to_display = self.switch[key]
3088 if len(to_display) > max_len_switch: max_len_switch=len(to_display)3096 if len(to_display) > max_len_switch: max_len_switch=len(to_display)
3089 3097
3090 info = self.print_info(key)3098 info = self.print_options(key)
3091 if len(info)> max_len_add_info: max_len_add_info = len(info)3099 if len(info)> max_len_add_info: max_len_add_info = len(info)
30923100
3093 if self.get_allowed(key):3101 if self.get_allowed(key):
@@ -3115,7 +3123,7 @@
3115 'descrip': descrip,3123 'descrip': descrip,
3116 'name': key,3124 'name': key,
3117 'switch': self.color_for_value(key,self.switch[key]),3125 'switch': self.color_for_value(key,self.switch[key]),
3118 'add_info': self.print_info(key),3126 'add_info': self.print_options(key),
3119 'switch_nc': self.switch[key],3127 'switch_nc': self.switch[key],
3120 'strike_switch': u'\u0336'.join(' %s ' %self.switch[key].upper()) + u'\u0336',3128 'strike_switch': u'\u0336'.join(' %s ' %self.switch[key].upper()) + u'\u0336',
3121 }3129 }
31223130
=== modified file 'madgraph/interface/madevent_interface.py'
--- madgraph/interface/madevent_interface.py 2018-04-26 14:24:04 +0000
+++ madgraph/interface/madevent_interface.py 2018-06-15 08:18:50 +0000
@@ -530,6 +530,8 @@
530 if options['delphes_path']:530 if options['delphes_path']:
531 if 'PY6' in self.available_module or 'PY8' in self.available_module:531 if 'PY6' in self.available_module or 'PY8' in self.available_module:
532 self.available_module.add('Delphes')532 self.available_module.add('Delphes')
533 else:
534 logger.warning("Delphes program installed but no parton shower module detected.\n Please install pythia8")
533 if not MADEVENT or ('mg5_path' in options and options['mg5_path']):535 if not MADEVENT or ('mg5_path' in options and options['mg5_path']):
534 self.available_module.add('MadSpin')536 self.available_module.add('MadSpin')
535 if misc.has_f2py() or options['f2py_compiler']:537 if misc.has_f2py() or options['f2py_compiler']:
@@ -658,7 +660,7 @@
658 self.switch['detector'] = 'Delphes'660 self.switch['detector'] = 'Delphes'
659 elif self.get_allowed_detector():661 elif self.get_allowed_detector():
660 self.switch['detector'] = 'OFF'662 self.switch['detector'] = 'OFF'
661 else: 663 else:
662 self.switch['detector'] = 'Not Avail.'664 self.switch['detector'] = 'Not Avail.'
663 665
664# old mode to activate pgs 666# old mode to activate pgs
@@ -850,7 +852,7 @@
850 if 'reweight' not in self.available_module:852 if 'reweight' not in self.available_module:
851 self.allowed_reweight = []853 self.allowed_reweight = []
852 return854 return
853 self.allowed_reweight = ['ON', 'OFF']855 self.allowed_reweight = ['OFF', 'ON']
854 856
855 # check for plugin mode857 # check for plugin mode
856 plugin_path = self.mother_interface.plugin_path858 plugin_path = self.mother_interface.plugin_path
@@ -5573,6 +5575,14 @@
5573 break5575 break
5574 else:5576 else:
5575 self.random = random.randint(1, 30107)5577 self.random = random.randint(1, 30107)
5578
5579 #set random seed for python part of the code
5580 if self.run_card['python_seed'] == -2: #-2 means same as run_card
5581 import random
5582 random.seed(self.random)
5583 elif self.run_card['python_seed'] >= 0:
5584 import random
5585 random.seed(self.run_card['python_seed'])
5576 5586
5577 if self.run_card['ickkw'] == 2:5587 if self.run_card['ickkw'] == 2:
5578 logger.info('Running with CKKW matching')5588 logger.info('Running with CKKW matching')
@@ -5812,7 +5822,10 @@
5812 if self.random > 30081*30081: # can't use too big random number5822 if self.random > 30081*30081: # can't use too big random number
5813 raise MadGraph5Error,\5823 raise MadGraph5Error,\
5814 'Random seed too large ' + str(self.random) + ' > 30081*30081'5824 'Random seed too large ' + str(self.random) + ' > 30081*30081'
58155825 if self.run_card['python_seed'] == -2:
5826 import random
5827 random.seed(self.random)
5828
5816 ############################################################################5829 ############################################################################
5817 def save_random(self):5830 def save_random(self):
5818 """save random number in appropirate file"""5831 """save random number in appropirate file"""
58195832
=== modified file 'madgraph/interface/madgraph_interface.py'
--- madgraph/interface/madgraph_interface.py 2018-04-29 12:51:30 +0000
+++ madgraph/interface/madgraph_interface.py 2018-06-15 08:18:50 +0000
@@ -2782,11 +2782,11 @@
2782 'gauge','lorentz', 'brs', 'cms']2782 'gauge','lorentz', 'brs', 'cms']
2783 _import_formats = ['model_v4', 'model', 'proc_v4', 'command', 'banner']2783 _import_formats = ['model_v4', 'model', 'proc_v4', 'command', 'banner']
2784 _install_opts = ['Delphes', 'MadAnalysis4', 'ExRootAnalysis',2784 _install_opts = ['Delphes', 'MadAnalysis4', 'ExRootAnalysis',
2785 'update', 'Golem95', 'PJFry', 'QCDLoop', 'maddm']2785 'update', 'Golem95', 'PJFry', 'QCDLoop', 'maddm', 'maddump']
2786 2786
2787 # The targets below are installed using the HEPToolsInstaller.py script2787 # The targets below are installed using the HEPToolsInstaller.py script
2788 _advanced_install_opts = ['pythia8','zlib','boost','lhapdf6','lhapdf5','collier',2788 _advanced_install_opts = ['pythia8','zlib','boost','lhapdf6','lhapdf5','collier',
2789 'hepmc','mg5amc_py8_interface','ninja','oneloop','MadAnalysis5','MadAnalysis']2789 'hepmc','mg5amc_py8_interface','ninja','oneloop','MadAnalysis5']
27902790
2791 _install_opts.extend(_advanced_install_opts)2791 _install_opts.extend(_advanced_install_opts)
27922792
@@ -5801,7 +5801,7 @@
5801 # Return true for successful installation5801 # Return true for successful installation
5802 return True5802 return True
58035803
5804 install_plugin = ['maddm']5804 install_plugin = ['maddm', 'maddump']
5805 install_ad = {'pythia-pgs':['arXiv:0603175'],5805 install_ad = {'pythia-pgs':['arXiv:0603175'],
5806 'Delphes':['arXiv:1307.6346'],5806 'Delphes':['arXiv:1307.6346'],
5807 'Delphes2':['arXiv:0903.2225'],5807 'Delphes2':['arXiv:0903.2225'],
@@ -5819,7 +5819,9 @@
5819 'MadAnalysis':['arXiv:1206.1599'],5819 'MadAnalysis':['arXiv:1206.1599'],
5820 'collier':['arXiv:1604.06792'],5820 'collier':['arXiv:1604.06792'],
5821 'oneloop':['arXiv:1007.4716'],5821 'oneloop':['arXiv:1007.4716'],
5822 'maddm':['arXiv:1505.04190']}5822 'maddm':['arXiv:1505.04190'],
5823 'maddump':['arXiv:1806.xxxxx']}
5824
5823 install_server = ['http://madgraph.phys.ucl.ac.be/package_info.dat',5825 install_server = ['http://madgraph.phys.ucl.ac.be/package_info.dat',
5824 'http://madgraph.physics.illinois.edu/package_info.dat']5826 'http://madgraph.physics.illinois.edu/package_info.dat']
5825 install_name = {'td_mac': 'td', 'td_linux':'td', 'Delphes2':'Delphes',5827 install_name = {'td_mac': 'td', 'td_linux':'td', 'Delphes2':'Delphes',
@@ -5869,6 +5871,7 @@
5869# logger.info('{:^80}'.format("-"*70), '$MG:BOLD')5871# logger.info('{:^80}'.format("-"*70), '$MG:BOLD')
5870 logger.info(" You are installing '%s', please cite ref(s): \033[92m%s\033[0m. " % (args[0], ', '.join(advertisements[args[0]])), '$MG:BOLD')5872 logger.info(" You are installing '%s', please cite ref(s): \033[92m%s\033[0m. " % (args[0], ', '.join(advertisements[args[0]])), '$MG:BOLD')
58715873
5874 source = None
5872 # Load file with path of the different program:5875 # Load file with path of the different program:
5873 import urllib5876 import urllib
5874 if paths:5877 if paths:
@@ -5916,15 +5919,16 @@
59165919
5917 if args[0] == 'Delphes':5920 if args[0] == 'Delphes':
5918 args[0] = 'Delphes3'5921 args[0] = 'Delphes3'
5919 if args[0] == 'MadAnalysis4':5922
5920 args[0] = 'MadAnalysis'
59215923
5922 try:5924 try:
5923 name = self.install_name5925 name = self.install_name
5924 name = name[args[0]]5926 name = name[args[0]]
5925 except KeyError:5927 except KeyError:
5926 name = args[0]5928 name = args[0]
59275929 if args[0] == 'MadAnalysis4':
5930 args[0] = 'MadAnalysis'
5931
5928 if args[0] in self._advanced_install_opts:5932 if args[0] in self._advanced_install_opts:
5929 # Now launch the advanced installation of the tool args[0]5933 # Now launch the advanced installation of the tool args[0]
5930 # path['HEPToolsInstaller'] is the online adress where to downlaod5934 # path['HEPToolsInstaller'] is the online adress where to downlaod
@@ -5962,6 +5966,23 @@
5962 except Exception:5966 except Exception:
5963 pass5967 pass
59645968
5969 if args[0] not in path:
5970 if not source:
5971 if index ==1:
5972 othersource = 'ucl'
5973 else:
5974 othersource = 'uiuc'
5975 # try with the mirror
5976 misc.sprint('try other mirror', othersource, ' '.join(args))
5977 return self.do_install('%s --source=%s' % (' '.join(args), othersource),
5978 paths, additional_options)
5979 else:
5980 if 'xxx' in advertisements[name][0]:
5981 logger.warning("Program not yet released. Please try later")
5982 else:
5983 raise Exception, "Online server are corrupted. No tarball available for %s" % name
5984 return
5985
5965 # Load that path5986 # Load that path
5966 logger.info('Downloading %s' % path[args[0]])5987 logger.info('Downloading %s' % path[args[0]])
5967 misc.wget(path[args[0]], '%s.tgz' % name, cwd=MG5DIR)5988 misc.wget(path[args[0]], '%s.tgz' % name, cwd=MG5DIR)
@@ -6127,7 +6148,7 @@
6127 ff.close()6148 ff.close()
6128 import stat6149 import stat
6129 os.chmod(pjoin(MG5DIR, 'bin', '%s.py' % name), stat.S_IRWXU)6150 os.chmod(pjoin(MG5DIR, 'bin', '%s.py' % name), stat.S_IRWXU)
6130 logger.info('To use this module, you need to quite MG5aMC and run the executable bin/%s.py' % name)6151 logger.info('To use this module, you need to quit MG5aMC and run the executable bin/%s.py' % name)
6131 status=06152 status=0
6132 6153
6133 elif logger.level <= logging.INFO:6154 elif logger.level <= logging.INFO:
@@ -6193,7 +6214,7 @@
6193 if sys.platform == "darwin":6214 if sys.platform == "darwin":
6194 logger.info('Downloading TD for Mac')6215 logger.info('Downloading TD for Mac')
6195 target = 'http://madgraph.phys.ucl.ac.be/Downloads/td_mac_intel.tar.gz'6216 target = 'http://madgraph.phys.ucl.ac.be/Downloads/td_mac_intel.tar.gz'
6196 misc.wget(target, 'tg.tgz', cwd=pjoin(MG5DIR,'td'))6217 misc.wget(target, 'td.tgz', cwd=pjoin(MG5DIR,'td'))
6197 misc.call(['tar', '-xzpvf', 'td.tgz'],6218 misc.call(['tar', '-xzpvf', 'td.tgz'],
6198 cwd=pjoin(MG5DIR,'td'))6219 cwd=pjoin(MG5DIR,'td'))
6199 files.mv(MG5DIR + '/td/td_mac_intel',MG5DIR+'/td/td')6220 files.mv(MG5DIR + '/td/td_mac_intel',MG5DIR+'/td/td')
@@ -6235,6 +6256,8 @@
6235 files.cp(pjoin(card_dir,'delphes_card_ATLAS.tcl'),6256 files.cp(pjoin(card_dir,'delphes_card_ATLAS.tcl'),
6236 pjoin(MG5DIR,'Template', 'Common', 'Cards', 'delphes_card_ATLAS.dat'))6257 pjoin(MG5DIR,'Template', 'Common', 'Cards', 'delphes_card_ATLAS.dat'))
6237 6258
6259 if not self.options['pythia-pgs_path'] and not self.options['pythia8_path']:
6260 logger.warning("We noticed that no parton-shower module are installed/linked. \n In order to use Delphes from MG5aMC please install/link pythia8.")
62386261
6239 #reset the position of the executable6262 #reset the position of the executable
6240 options_name = {'Delphes': 'delphes_path',6263 options_name = {'Delphes': 'delphes_path',
62416264
=== modified file 'madgraph/interface/reweight_interface.py'
--- madgraph/interface/reweight_interface.py 2018-04-20 08:32:29 +0000
+++ madgraph/interface/reweight_interface.py 2018-06-15 08:18:50 +0000
@@ -467,6 +467,8 @@
467 if not self.has_standalone_dir: 467 if not self.has_standalone_dir:
468 if self.rwgt_dir and os.path.exists(pjoin(self.rwgt_dir,'rw_me','rwgt.pkl')):468 if self.rwgt_dir and os.path.exists(pjoin(self.rwgt_dir,'rw_me','rwgt.pkl')):
469 self.load_from_pickle()469 self.load_from_pickle()
470 if opts['rwgt_name']:
471 self.options['rwgt_name'] = opts['rwgt_name']
470 if not self.rwgt_dir:472 if not self.rwgt_dir:
471 self.me_dir = self.rwgt_dir473 self.me_dir = self.rwgt_dir
472 self.load_module() # load the fortran information from the f2py module474 self.load_module() # load the fortran information from the f2py module
473475
=== modified file 'madgraph/iolibs/export_v4.py'
--- madgraph/iolibs/export_v4.py 2018-04-24 10:26:54 +0000
+++ madgraph/iolibs/export_v4.py 2018-06-15 08:18:50 +0000
@@ -1952,6 +1952,18 @@
1952 self.make_model_symbolic_link()1952 self.make_model_symbolic_link()
19531953
1954 #===========================================================================1954 #===========================================================================
1955 # write a procdef_mg5 (an equivalent of the MG4 proc_card.dat)
1956 #===========================================================================
1957 def write_procdef_mg5(self, file_pos, modelname, process_str):
1958 """ write an equivalent of the MG4 proc_card in order that all the Madevent
1959 Perl script of MadEvent4 are still working properly for pure MG5 run.
1960 Not needed for StandAlone so just return
1961 """
1962
1963 return
1964
1965
1966 #===========================================================================
1955 # Make the Helas and Model directories for Standalone directory1967 # Make the Helas and Model directories for Standalone directory
1956 #===========================================================================1968 #===========================================================================
1957 def make(self):1969 def make(self):
@@ -5395,8 +5407,8 @@
5395 self.params_dep = [] # (name, expression, type)5407 self.params_dep = [] # (name, expression, type)
5396 self.params_indep = [] # (name, expression, type)5408 self.params_indep = [] # (name, expression, type)
5397 self.params_ext = [] # external parameter5409 self.params_ext = [] # external parameter
5398 self.p_to_f = parsers.UFOExpressionParserFortran()5410 self.p_to_f = parsers.UFOExpressionParserFortran(self.model)
5399 self.mp_p_to_f = parsers.UFOExpressionParserMPFortran() 5411 self.mp_p_to_f = parsers.UFOExpressionParserMPFortran(self.model)
5400 5412
5401 def pass_parameter_to_case_insensitive(self):5413 def pass_parameter_to_case_insensitive(self):
5402 """modify the parameter if some of them are identical up to the case"""5414 """modify the parameter if some of them are identical up to the case"""
@@ -6173,7 +6185,8 @@
6173 # already handle by default6185 # already handle by default
6174 if fct.name not in ["complexconjugate", "re", "im", "sec", 6186 if fct.name not in ["complexconjugate", "re", "im", "sec",
6175 "csc", "asec", "acsc", "theta_function", "cond", 6187 "csc", "asec", "acsc", "theta_function", "cond",
6176 "condif", "reglogp", "reglogm", "reglog", "recms", "arg", "cot"]:6188 "condif", "reglogp", "reglogm", "reglog", "recms", "arg", "cot",
6189 "grreglog","regsqrt"]:
6177 additional_fct.append(fct.name)6190 additional_fct.append(fct.name)
61786191
6179 6192
@@ -6185,6 +6198,8 @@
6185 double complex reglogm6198 double complex reglogm
6186 double complex recms6199 double complex recms
6187 double complex arg6200 double complex arg
6201 double complex grreglog
6202 double complex regsqrt
6188 %s6203 %s
6189 """ % "\n".join([" double complex %s" % i for i in additional_fct]))6204 """ % "\n".join([" double complex %s" % i for i in additional_fct]))
61906205
@@ -6197,6 +6212,8 @@
6197 %(complex_mp_format)s mp_reglogm6212 %(complex_mp_format)s mp_reglogm
6198 %(complex_mp_format)s mp_recms6213 %(complex_mp_format)s mp_recms
6199 %(complex_mp_format)s mp_arg6214 %(complex_mp_format)s mp_arg
6215 %(complex_mp_format)s mp_grreglog
6216 %(complex_mp_format)s mp_regsqrt
6200 %(additional)s6217 %(additional)s
6201 """ %\6218 """ %\
6202 {"additional": "\n".join([" %s mp_%s" % (self.mp_complex_format, i) for i in additional_fct]),6219 {"additional": "\n".join([" %s mp_%s" % (self.mp_complex_format, i) for i in additional_fct]),
@@ -6285,6 +6302,62 @@
6285 endif6302 endif
6286 endif6303 endif
6287 end6304 end
6305
6306 double complex function regsqrt(arg_in)
6307 implicit none
6308 double complex arg_in
6309 double complex arg
6310 arg=arg_in
6311 if(dabs(dimag(arg)).eq.0.0d0)then
6312 arg=dcmplx(dble(arg),0.0d0)
6313 endif
6314 if(dabs(dble(arg)).eq.0.0d0)then
6315 arg=dcmplx(0.0d0,dimag(arg))
6316 endif
6317 regsqrt=sqrt(arg)
6318 end
6319
6320 double complex function grreglog(logsw,expr1_in,expr2_in)
6321 implicit none
6322 double complex TWOPII
6323 parameter (TWOPII=2.0d0*3.1415926535897932d0*(0.0d0,1.0d0))
6324 double complex expr1_in,expr2_in
6325 double complex expr1,expr2
6326 double precision logsw
6327 double precision imagexpr
6328 logical firstsheet
6329 expr1=expr1_in
6330 expr2=expr2_in
6331 if(dabs(dimag(expr1)).eq.0.0d0)then
6332 expr1=dcmplx(dble(expr1),0.0d0)
6333 endif
6334 if(dabs(dble(expr1)).eq.0.0d0)then
6335 expr1=dcmplx(0.0d0,dimag(expr1))
6336 endif
6337 if(dabs(dimag(expr2)).eq.0.0d0)then
6338 expr2=dcmplx(dble(expr2),0.0d0)
6339 endif
6340 if(dabs(dble(expr2)).eq.0.0d0)then
6341 expr2=dcmplx(0.0d0,dimag(expr2))
6342 endif
6343 if(expr1.eq.(0.0d0,0.0d0))then
6344 grreglog=(0.0d0,0.0d0)
6345 else
6346 imagexpr=dimag(expr1)*dimag(expr2)
6347 firstsheet=imagexpr.ge.0.0d0
6348 firstsheet=firstsheet.or.dble(expr1).ge.0.0d0
6349 firstsheet=firstsheet.or.dble(expr2).ge.0.0d0
6350 if(firstsheet)then
6351 grreglog=log(expr1)
6352 else
6353 if(dimag(expr1).gt.0.0d0)then
6354 grreglog=log(expr1) - logsw*TWOPII
6355 else
6356 grreglog=log(expr1) + logsw*TWOPII
6357 endif
6358 endif
6359 endif
6360 end
6288 6361
6289 double complex function arg(comnum)6362 double complex function arg(comnum)
6290 implicit none6363 implicit none
@@ -6375,6 +6448,63 @@
6375 endif 6448 endif
6376 endif6449 endif
6377 end6450 end
6451
6452 %(complex_mp_format)s function mp_regsqrt(arg_in)
6453 implicit none
6454 %(complex_mp_format)s arg_in
6455 %(complex_mp_format)s arg
6456 arg=arg_in
6457 if(abs(imagpart(arg)).eq.0.0e0_16)then
6458 arg=cmplx(real(arg,kind=16),0.0e0_16)
6459 endif
6460 if(abs(real(arg,kind=16)).eq.0.0e0_16)then
6461 arg=cmplx(0.0e0_16,imagpart(arg))
6462 endif
6463 mp_regsqrt=sqrt(arg)
6464 end
6465
6466
6467 %(complex_mp_format)s function mp_grreglog(logsw,expr1_in,expr2_in)
6468 implicit none
6469 %(complex_mp_format)s TWOPII
6470 parameter (TWOPII=2.0e0_16*3.14169258478796109557151794433593750e0_16*(0.0e0_16,1.0e0_16))
6471 %(complex_mp_format)s expr1_in,expr2_in
6472 %(complex_mp_format)s expr1,expr2
6473 %(real_mp_format)s logsw
6474 %(real_mp_format)s imagexpr
6475 logical firstsheet
6476 expr1=expr1_in
6477 expr2=expr2_in
6478 if(abs(imagpart(expr1)).eq.0.0e0_16)then
6479 expr1=cmplx(real(expr1,kind=16),0.0e0_16)
6480 endif
6481 if(abs(real(expr1,kind=16)).eq.0.0e0_16)then
6482 expr1=cmplx(0.0e0_16,imagpart(expr1))
6483 endif
6484 if(abs(imagpart(expr2)).eq.0.0e0_16)then
6485 expr2=cmplx(real(expr2,kind=16),0.0e0_16)
6486 endif
6487 if(abs(real(expr2,kind=16)).eq.0.0e0_16)then
6488 expr2=cmplx(0.0e0_16,imagpart(expr2))
6489 endif
6490 if(expr1.eq.(0.0e0_16,0.0e0_16))then
6491 mp_grreglog=(0.0e0_16,0.0e0_16)
6492 else
6493 imagexpr=imagpart(expr1)*imagpart(expr2)
6494 firstsheet=imagexpr.ge.0.0e0_16
6495 firstsheet=firstsheet.or.real(expr1,kind=16).ge.0.0e0_16
6496 firstsheet=firstsheet.or.real(expr2,kind=16).ge.0.0e0_16
6497 if(firstsheet)then
6498 mp_grreglog=log(expr1)
6499 else
6500 if(imagpart(expr1).gt.0.0e0_16)then
6501 mp_grreglog=log(expr1) - logsw*TWOPII
6502 else
6503 mp_grreglog=log(expr1) + logsw*TWOPII
6504 endif
6505 endif
6506 endif
6507 end
6378 6508
6379 %(complex_mp_format)s function mp_arg(comnum)6509 %(complex_mp_format)s function mp_arg(comnum)
6380 implicit none6510 implicit none
@@ -6386,7 +6516,7 @@
6386 else6516 else
6387 mp_arg=log(comnum/abs(comnum))/imm6517 mp_arg=log(comnum/abs(comnum))/imm
6388 endif6518 endif
6389 end"""%{'complex_mp_format':self.mp_complex_format})6519 end"""%{'complex_mp_format':self.mp_complex_format,'real_mp_format':self.mp_real_format})
63906520
63916521
6392 #check for the file functions.f6522 #check for the file functions.f
@@ -6404,7 +6534,8 @@
6404 for fct in ufo_fct:6534 for fct in ufo_fct:
6405 # already handle by default6535 # already handle by default
6406 if fct.name not in ["complexconjugate", "re", "im", "sec", "csc", "asec", "acsc", "condif",6536 if fct.name not in ["complexconjugate", "re", "im", "sec", "csc", "asec", "acsc", "condif",
6407 "theta_function", "cond", "reglog", "reglogp", "reglogm", "recms","arg"]:6537 "theta_function", "cond", "reglog", "reglogp", "reglogm", "recms","arg",
6538 "grreglog","regsqrt"]:
6408 ufo_fct_template = """6539 ufo_fct_template = """
6409 double complex function %(name)s(%(args)s)6540 double complex function %(name)s(%(args)s)
6410 implicit none6541 implicit none
@@ -6440,7 +6571,8 @@
6440 for fct in ufo_fct:6571 for fct in ufo_fct:
6441 # already handle by default6572 # already handle by default
6442 if fct.name not in ["complexconjugate", "re", "im", "sec", "csc", "asec", "acsc","condif",6573 if fct.name not in ["complexconjugate", "re", "im", "sec", "csc", "asec", "acsc","condif",
6443 "theta_function", "cond", "reglog", "reglogp","reglogm", "recms","arg"]:6574 "theta_function", "cond", "reglog", "reglogp","reglogm", "recms","arg",
6575 "grreglog","regsqrt"]:
6444 ufo_fct_template = """6576 ufo_fct_template = """
6445 %(complex_mp_format)s function mp_%(name)s(mp__%(args)s)6577 %(complex_mp_format)s function mp_%(name)s(mp__%(args)s)
6446 implicit none6578 implicit none
64476579
=== modified file 'madgraph/iolibs/file_writers.py'
--- madgraph/iolibs/file_writers.py 2018-01-18 15:06:40 +0000
+++ madgraph/iolibs/file_writers.py 2018-06-15 08:18:50 +0000
@@ -393,11 +393,11 @@
393 splitline = line.split('\'')393 splitline = line.split('\'')
394 i = 0394 i = 0
395 while i < len(splitline):395 while i < len(splitline):
396 if i % 2 == 1:396 if i % 2 == 1:
397 # This is a quote - check for escaped \'s397 # This is a quote - check for escaped \'s
398 while splitline[i] and splitline[i][-1] == '\\':398 while splitline[i] and splitline[i][-1] == '\\':
399 splitline[i] = splitline[i] + '\'' + splitline.pop(i + 1)399 splitline[i] = splitline[i] + '\'' + splitline.pop(i + 1)
400 i = i + 1400 i = i + 1
401 return len(splitline)-1401 return len(splitline)-1
402402
403#===============================================================================403#===============================================================================
@@ -411,7 +411,7 @@
411 fct_names should be a list of functions to remove411 fct_names should be a list of functions to remove
412 """412 """
413413
414 f77_type = ['real*8', 'integer', 'double precision']414 f77_type = ['real*8', 'integer', 'double precision', 'logical']
415 pattern = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \415 pattern = re.compile('^\s+(?:SUBROUTINE|(?:%(type)s)\s+function)\s+([a-zA-Z]\w*)' \
416 % {'type':'|'.join(f77_type)}, re.I)416 % {'type':'|'.join(f77_type)}, re.I)
417 417
418418
=== modified file 'madgraph/iolibs/files.py'
--- madgraph/iolibs/files.py 2018-03-17 00:04:34 +0000
+++ madgraph/iolibs/files.py 2018-06-15 08:18:50 +0000
@@ -137,6 +137,7 @@
137 try:137 try:
138 shutil.copy(path1, path2)138 shutil.copy(path1, path2)
139 except IOError, why:139 except IOError, why:
140 import madgraph.various.misc as misc
140 try: 141 try:
141 if os.path.exists(path2):142 if os.path.exists(path2):
142 path2 = os.path.join(path2, os.path.split(path1)[1])143 path2 = os.path.join(path2, os.path.split(path1)[1])
@@ -146,6 +147,8 @@
146 raise147 raise
147 if log:148 if log:
148 logger.warning(why)149 logger.warning(why)
150 else:
151 misc.sprint("fail to cp", why)
149 except shutil.Error:152 except shutil.Error:
150 # idetical file153 # idetical file
151 pass154 pass
152155
=== modified file 'madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc'
--- madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc 2017-07-31 22:08:40 +0000
+++ madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc 2018-06-15 08:18:50 +0000
@@ -109,7 +109,7 @@
109C109C
110 INTEGER NHEL(NEXTERNAL,NCOMB)110 INTEGER NHEL(NEXTERNAL,NCOMB)
111%(helicity_lines)s111%(helicity_lines)s
112 COMMON/%(proc_prefix)sBORN_HEL_CONFIGS/NHEL112 COMMON/%(proc_prefix)sPROCESS_NHEL/NHEL
113 113
114 INTEGER USERHEL114 INTEGER USERHEL
115 DATA USERHEL/-1/ 115 DATA USERHEL/-1/
@@ -357,7 +357,7 @@
357C GLOBALS357C GLOBALS
358C358C
359 INTEGER HELC(NEXTERNAL,NCOMB)359 INTEGER HELC(NEXTERNAL,NCOMB)
360 COMMON/%(proc_prefix)sBORN_HEL_CONFIGS/HELC360 COMMON/%(proc_prefix)sPROCESS_NHEL/HELC
361361
362 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)362 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
363 COMMON/%(proc_prefix)sBORN_BEAM_POL/POLARIZATIONS363 COMMON/%(proc_prefix)sBORN_BEAM_POL/POLARIZATIONS
364364
=== modified file 'madgraph/iolibs/template_files/matrix_standalone_v4.inc'
--- madgraph/iolibs/template_files/matrix_standalone_v4.inc 2017-07-31 22:08:40 +0000
+++ madgraph/iolibs/template_files/matrix_standalone_v4.inc 2018-06-15 08:18:50 +0000
@@ -275,7 +275,7 @@
275C GLOBALS275C GLOBALS
276C276C
277 INTEGER HELC(NEXTERNAL,NCOMB)277 INTEGER HELC(NEXTERNAL,NCOMB)
278 COMMON/%(proc_prefix)sBORN_HEL_CONFIGS/HELC278 COMMON/%(proc_prefix)sPROCESS_NHEL/HELC
279279
280 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)280 INTEGER POLARIZATIONS(0:NEXTERNAL,0:5)
281 COMMON/%(proc_prefix)sBORN_BEAM_POL/POLARIZATIONS281 COMMON/%(proc_prefix)sBORN_BEAM_POL/POLARIZATIONS
282282
=== modified file 'madgraph/iolibs/ufo_expression_parsers.py'
--- madgraph/iolibs/ufo_expression_parsers.py 2018-04-24 19:44:41 +0000
+++ madgraph/iolibs/ufo_expression_parsers.py 2018-06-15 08:18:50 +0000
@@ -65,7 +65,7 @@
65 # List of tokens and literals65 # List of tokens and literals
66 tokens = (66 tokens = (
67 'LOGICAL','LOGICALCOMB','POWER', 'CSC', 'SEC', 'ACSC', 'ASEC', 'TAN', 'ATAN',67 'LOGICAL','LOGICALCOMB','POWER', 'CSC', 'SEC', 'ACSC', 'ASEC', 'TAN', 'ATAN',
68 'SQRT', 'CONJ', 'RE', 'RE2', 'IM', 'PI', 'COMPLEX', 'FUNCTION', 'IF','ELSE',68 'SQRT', 'BUILTIN', 'CONJ', 'RE', 'RE2', 'IM', 'PI', 'COMPLEX', 'FUNCTION', 'IF','ELSE',
69 'VARIABLE', 'NUMBER','COND','REGLOG', 'REGLOGP', 'REGLOGM','RECMS','ARG'69 'VARIABLE', 'NUMBER','COND','REGLOG', 'REGLOGP', 'REGLOGM','RECMS','ARG'
70 )70 )
71 literals = "=+-*/(),"71 literals = "=+-*/(),"
@@ -129,6 +129,9 @@
129 def t_CONJ(self, t):129 def t_CONJ(self, t):
130 r'complexconjugate'130 r'complexconjugate'
131 return t131 return t
132 def t_BUILTIN(self, t):
133 r'(?<!\w)abs|bool|float|int|min|max(?=\()'
134 return t
132 def t_IM(self, t):135 def t_IM(self, t):
133 r'(?<!\w)im(?=\()'136 r'(?<!\w)im(?=\()'
134 return t137 return t
@@ -200,6 +203,7 @@
200 ('right','CONJ'),203 ('right','CONJ'),
201 ('right','RE'),204 ('right','RE'),
202 ('right','IM'),205 ('right','IM'),
206 ('right', 'BUILTIN'),
203 ('right','FUNCTION'),207 ('right','FUNCTION'),
204 ('right','COMPLEX'),208 ('right','COMPLEX'),
205 ('right','COND'),209 ('right','COND'),
@@ -293,6 +297,14 @@
293 Fortran-style code."""297 Fortran-style code."""
294298
295299
300 builtin_equiv = {'abs': 'ABS',
301 'bool': 'LOGICAL',
302 'float': 'REAL',
303 #'complex': 'COMPLEX', handle separatly
304 'int': 'INTEGER',
305 'min': 'MIN',
306 'max': 'MAX'
307 }
296308
297 # The following parser expressions need to be defined for each309 # The following parser expressions need to be defined for each
298 # output language/framework310 # output language/framework
@@ -305,9 +317,15 @@
305 '<':'.LT.',317 '<':'.LT.',
306 'or':'.OR.',318 'or':'.OR.',
307 'and':'.AND.'}319 'and':'.AND.'}
320
321 types_def = { bool: lambda v: v ,
322 int :lambda v: 'INT(%s)' % v ,
323 float: lambda v: 'DBLE(%s)' % v,
324 complex: lambda v: 'DCMPLX(%s)' % v }
308325
309 def __init__(self, *args, **opts):326 def __init__(self, model, *args, **opts):
310 """ """327 """ """
328 self.model = model
311 out = super(UFOExpressionParserFortran,self).__init__(*args, **opts)329 out = super(UFOExpressionParserFortran,self).__init__(*args, **opts)
312 self.to_define = set()330 self.to_define = set()
313 331
@@ -321,6 +339,7 @@
321339
322 def p_expression_number(self, p):340 def p_expression_number(self, p):
323 "expression : NUMBER"341 "expression : NUMBER"
342
324 if p[1].endswith('j'):343 if p[1].endswith('j'):
325 p[0] = ('DCMPLX(0d0, %e)' % float(p[1][:-1])).replace('e', 'd')344 p[0] = ('DCMPLX(0d0, %e)' % float(p[1][:-1])).replace('e', 'd')
326 else:345 else:
@@ -382,7 +401,8 @@
382 | REGLOGP group401 | REGLOGP group
383 | REGLOGM group402 | REGLOGM group
384 | TAN group403 | TAN group
385 | ATAN group'''404 | ATAN group
405 | BUILTIN group'''
386406
387 if p[1] == 'csc': p[0] = '1d0/sin' + p[2]407 if p[1] == 'csc': p[0] = '1d0/sin' + p[2]
388 elif p[1] == 'sec': p[0] = '1d0/cos' + p[2]408 elif p[1] == 'sec': p[0] = '1d0/cos' + p[2]
@@ -398,9 +418,96 @@
398 elif p[1] == 'reglog': p[0] = 'reglog(DCMPLX' + p[2] +')'418 elif p[1] == 'reglog': p[0] = 'reglog(DCMPLX' + p[2] +')'
399 elif p[1] == 'reglogp': p[0] = 'reglogp(DCMPLX' + p[2] + ')'419 elif p[1] == 'reglogp': p[0] = 'reglogp(DCMPLX' + p[2] + ')'
400 elif p[1] == 'reglogm': p[0] = 'reglogm(DCMPLX' + p[2] + ')'420 elif p[1] == 'reglogm': p[0] = 'reglogm(DCMPLX' + p[2] + ')'
421 elif p[1] in self.builtin_equiv: p[0] = self.builtin_equiv[p[1]] + p[2]
401422
402 if p[1] in ['reglog', 'reglogp', 'reglogm']:423 if p[1] in ['reglog', 'reglogp', 'reglogm']:
403 self.to_define.add(p[1])424 self.to_define.add(p[1])
425
426 def create_modelfct(self):
427 self.modelfct = dict([(f.name,f) for f in self.model.get('functions')])
428
429 def p_expression_function1(self, p):
430 "expression : FUNCTION '(' expression ')'"
431 p1 = p[1]
432 re_groups = self.re_cmath_function.match(p1)
433 if re_groups:
434 p1 = re_groups.group("name")
435 p[0] = p1 + '(' + p[3] + ')'
436 else:
437 if not hasattr(self, 'modelfct'):
438 self.create_modelfct()
439 if p1 in self.modelfct:
440 if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype:
441 types = [self.types_def[complex] for _ in self.modelfct[p1].arguments]
442 else:
443 types = [self.types_def[t] for t in self.modelfct[p1].argstype]
444
445 p[0] = p1 + '(' + types[0](p[3]) + ')'
446 else:
447 p[0] = p1 + '(' + p[3] + ')'
448
449
450 def p_expression_function2(self, p):
451 '''expression : FUNCTION '(' expression ',' expression ')'
452 | FUNCTION '(' boolexpression ',' expression ')' '''
453
454 p1 = p[1]
455 re_groups = self.re_cmath_function.match(p1)
456 if re_groups:
457 p1 = re_groups.group("name")
458 p[0] = p1 + '(' + p[3] + ',' + p[5] + ')'
459 else:
460 if not hasattr(self, 'modelfct'):
461 self.create_modelfct()
462 if p1 in self.modelfct:
463 if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype:
464 p[0] = p1 + '(' + p[3] + ',' + p[5] + ')'
465 else:
466 types = [self.types_def[t] for t in self.modelfct[p1].argstype]
467
468 p[0] = p1 + '(' + types[0](p[3]) + ',' + types[1](p[5]) + ')'
469 else:
470 p[0] = p1 + '(' + p[3] + ',' + p[5] + ')'
471
472 def p_expression_function3(self, p):
473 "expression : FUNCTION '(' expression ',' expression ',' expression ')'"
474 p1 = p[1]
475 re_groups = self.re_cmath_function.match(p1)
476 if re_groups:
477 p1 = re_groups.group("name")
478 p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ')'
479 else:
480 if not hasattr(self, 'modelfct'):
481 self.create_modelfct()
482 if p1 in self.modelfct:
483 if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype:
484 p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ')'
485 else:
486 types = [self.types_def[t] for t in self.modelfct[p1].argstype]
487
488 p[0] = p1 + '(' + types[0](p[3]) + ',' + types[1](p[5]) + ' , ' + types[2](p[7]) + ')'
489 else:
490 p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ')'
491
492 def p_expression_function4(self, p):
493 "expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ')'"
494 p1 = p[1]
495 re_groups = self.re_cmath_function.match(p1)
496 if re_groups:
497 p1 = re_groups.group("name")
498 p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ' , ' + p[9] + ')'
499 else:
500 if not hasattr(self, 'modelfct'):
501 self.create_modelfct()
502 if p1 in self.modelfct:
503 if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype:
504 p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ' , ' + p[9] + ')'
505 else:
506 types = [self.types_def[t] for t in self.modelfct[p1].argstype]
507 p[0] = p1 + '(' + types[0](p[3]) + ',' + types[1](p[5]) + ' , ' + types[2](p[7]) + ' , ' + types[3](p[9]) + ')'
508
509 else:
510 p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ' , ' + p[9] + ')'
404511
405 def p_expression_real(self, p):512 def p_expression_real(self, p):
406 ''' expression : expression RE2 '''513 ''' expression : expression RE2 '''
@@ -432,6 +539,19 @@
432 Fortran-style code for quadruple precision computation."""539 Fortran-style code for quadruple precision computation."""
433540
434 mp_prefix = check_param_card.ParamCard.mp_prefix541 mp_prefix = check_param_card.ParamCard.mp_prefix
542 types_def = { bool: lambda v: v ,
543 int :lambda v: 'mp__%s' % v if not v.startswith(('(','mp__','1','2','3','4','5','6','7','8','9','0','-')) else v,
544 float: lambda v: 'mp__%s' % v if not v.startswith(('(','mp__','1','2','3','4','5','6','7','8','9','0','-')) else v,
545 complex: lambda v: 'CMPLX(mp__%s, KIND=16)' % v if not v.startswith(('(','mp__','1','2','3','4','5','6','7','8','9','0','-' )) else 'CMPLX(%s, KIND=16)' % v}
546
547 builtin_equiv = {'abs': lambda v: 'ABS' +v,
548 'bool': lambda v: 'LOGICAL' +v ,
549 'float': lambda v: 'REAL(' +v+", KIND=16)",
550 'complex': lambda v: 'COMPLEX(' +v+", KIND=16)",
551 'int': lambda v: 'INTEGER' +v ,
552 'min': lambda v: 'MIN' +v ,
553 'max': lambda v: 'MAX' +v
554 }
435555
436 # The following parser expressions need to be defined for each556 # The following parser expressions need to be defined for each
437 # output language/framework557 # output language/framework
@@ -462,6 +582,92 @@
462 except Exception:582 except Exception:
463 p[0] = p[1] + "**" + p[3]583 p[0] = p[1] + "**" + p[3]
464584
585 def p_expression_function1(self, p):
586 "expression : FUNCTION '(' expression ')'"
587 p1 = p[1]
588 re_groups = self.re_cmath_function.match(p1)
589 if re_groups:
590 p1 = re_groups.group("name")
591 p[0] = p1 + '(' + p[3] + ')'
592 else:
593 if not hasattr(self, 'modelfct'):
594 self.create_modelfct()
595 if p1 in self.modelfct:
596 if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype:
597 types = [self.types_def[complex] for _ in self.modelfct[p1].arguments]
598 else:
599 types = [self.types_def[t] for t in self.modelfct[p1].argstype]
600
601 p[0] = 'MP_' + p1 + '(' + types[0](p[3]) + ')'
602 else:
603 p[0] = 'MP_' + p1 + '(' + p[3] + ')'
604
605
606 def p_expression_function2(self, p):
607 '''expression : FUNCTION '(' expression ',' expression ')'
608 | FUNCTION '(' boolexpression ',' expression ')' '''
609
610 p1 = p[1]
611 re_groups = self.re_cmath_function.match(p1)
612 if re_groups:
613 p1 = re_groups.group("name")
614 p[0] = p1 + '(' + p[3] + ',' + p[5] + ')'
615 else:
616 if not hasattr(self, 'modelfct'):
617 self.create_modelfct()
618 if p1 in self.modelfct:
619 if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype:
620 p[0] = p1 + '(' + p[3] + ',' + p[5] + ')'
621 else:
622 types = [self.types_def[t] for t in self.modelfct[p1].argstype]
623
624 p[0] = 'MP_' + p1 + '(' + types[0](p[3]) + ',' + types[1](p[5]) + ')'
625 else:
626 p[0] = 'MP_' + p1 + '(' + p[3] + ',' + p[5] + ')'
627
628 def p_expression_function3(self, p):
629 "expression : FUNCTION '(' expression ',' expression ',' expression ')'"
630 p1 = p[1]
631 re_groups = self.re_cmath_function.match(p1)
632 if re_groups:
633 p1 = re_groups.group("name")
634 p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ')'
635 else:
636 if not hasattr(self, 'modelfct'):
637 self.create_modelfct()
638 if p1 in self.modelfct:
639 if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype:
640 p[0] = 'MP_' + p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ')'
641 else:
642 types = [self.types_def[t] for t in self.modelfct[p1].argstype]
643
644 p[0] = 'MP_' + p1 + '(' + types[0](p[3]) + ',' + types[1](p[5]) + ' , ' + types[2](p[7]) + ')'
645 else:
646 p[0] = 'MP_' + p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ')'
647
648 def p_expression_function4(self, p):
649 "expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ')'"
650 p1 = p[1]
651 re_groups = self.re_cmath_function.match(p1)
652 if re_groups:
653 p1 = re_groups.group("name")
654 p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ' , ' + p[9] + ')'
655 else:
656 if not hasattr(self, 'modelfct'):
657 self.create_modelfct()
658 if p1 in self.modelfct:
659 if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype:
660 p[0] = 'MP_' + p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ' , ' + p[9] + ')'
661 else:
662 types = [self.types_def[t] for t in self.modelfct[p1].argstype]
663 misc.sprint(types)
664 p[0] = 'MP_' + p1 + '(' + types[0](p[3]) + ',' + types[1](p[5]) + ' , ' + types[2](p[7]) + ' , ' + types[3](p[9]) + ')'
665
666 else:
667 p[0] = 'MP_' + p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ' , ' + p[9] + ')'
668
669
670
465 def p_expression_if(self,p):671 def p_expression_if(self,p):
466 "expression : expression IF boolexpression ELSE expression "672 "expression : expression IF boolexpression ELSE expression "
467 p[0] = 'MP_CONDIF(%s,CMPLX(%s,KIND=16),CMPLX(%s,KIND=16))' % (p[3], p[1], p[5])673 p[0] = 'MP_CONDIF(%s,CMPLX(%s,KIND=16),CMPLX(%s,KIND=16))' % (p[3], p[1], p[5])
@@ -502,7 +708,8 @@
502 | REGLOGP group708 | REGLOGP group
503 | REGLOGM group709 | REGLOGM group
504 | TAN group710 | TAN group
505 | ATAN group'''711 | ATAN group
712 | BUILTIN group'''
506 713
507 if p[1] == 'csc': p[0] = '1e0_16/cos' + p[2]714 if p[1] == 'csc': p[0] = '1e0_16/cos' + p[2]
508 elif p[1] == 'sec': p[0] = '1e0_16/sin' + p[2]715 elif p[1] == 'sec': p[0] = '1e0_16/sin' + p[2]
@@ -518,6 +725,7 @@
518 elif p[1] == 'reglog': p[0] = 'mp_reglog(CMPLX(' + p[2] +',KIND=16))'725 elif p[1] == 'reglog': p[0] = 'mp_reglog(CMPLX(' + p[2] +',KIND=16))'
519 elif p[1] == 'reglogp': p[0] = 'mp_reglogp(CMPLX(' + p[2] + ',KIND=16))'726 elif p[1] == 'reglogp': p[0] = 'mp_reglogp(CMPLX(' + p[2] + ',KIND=16))'
520 elif p[1] == 'reglogm': p[0] = 'mp_reglogm(CMPLX(' + p[2] + ',KIND=16))'727 elif p[1] == 'reglogm': p[0] = 'mp_reglogm(CMPLX(' + p[2] + ',KIND=16))'
728 elif p[1] in self.builtin_equiv: p[0] = self.builtin_equiv[p[1]](p[2])
521729
522 if p[1] in ['reglog', 'reglogp', 'reglogm']:730 if p[1] in ['reglog', 'reglogp', 'reglogm']:
523 self.to_define.add(p[1])731 self.to_define.add(p[1])
@@ -557,6 +765,15 @@
557 '<':'<',765 '<':'<',
558 'or':'||',766 'or':'||',
559 'and':'&&'}767 'and':'&&'}
768
769 builtin_equiv = {'abs': 'ABS',
770 'bool': 'bool',
771 'float': 'float',
772 #'complex': 'COMPLEX', handle separatly
773 'int': 'int',
774 'min': 'min',
775 'max': 'max'
776 }
560777
561 # The following parser expressions need to be defined for each778 # The following parser expressions need to be defined for each
562 # output language/framework779 # output language/framework
@@ -634,7 +851,8 @@
634 | CONJ group851 | CONJ group
635 | REGLOG group 852 | REGLOG group
636 | REGLOGP group853 | REGLOGP group
637 | REGLOGM group'''854 | REGLOGM group
855 | BUILTIN group '''
638 if p[1] == 'csc': p[0] = '1./cos' + p[2]856 if p[1] == 'csc': p[0] = '1./cos' + p[2]
639 elif p[1] == 'sec': p[0] = '1./sin' + p[2]857 elif p[1] == 'sec': p[0] = '1./sin' + p[2]
640 elif p[1] == 'acsc': p[0] = 'asin(1./' + p[2] + ')'858 elif p[1] == 'acsc': p[0] = 'asin(1./' + p[2] + ')'
@@ -649,6 +867,8 @@
649 elif p[1] == 'reglog': p[0] = 'reglog' + p[2]867 elif p[1] == 'reglog': p[0] = 'reglog' + p[2]
650 elif p[1] == 'reglogp': p[0] = 'reglogp' + p[2]868 elif p[1] == 'reglogp': p[0] = 'reglogp' + p[2]
651 elif p[1] == 'reglogm': p[0] = 'reglogm' + p[2]869 elif p[1] == 'reglogm': p[0] = 'reglogm' + p[2]
870 elif p[1] in self.buitin_equiv: p[0] = self.builtin_equiv[p[1]] + p[2]
871
652872
653 def p_expression_real(self, p):873 def p_expression_real(self, p):
654 ''' expression : expression RE2 '''874 ''' expression : expression RE2 '''
@@ -682,6 +902,15 @@
682 '<':'<',902 '<':'<',
683 'or':' or ',903 'or':' or ',
684 'and':' and '}904 'and':' and '}
905
906 builtin_equiv = {'abs': 'abs',
907 'bool': 'bool',
908 'float': 'float',
909 #'complex': 'COMPLEX', handle separatly
910 'int': 'int',
911 'min': 'min',
912 'max': 'max'
913 }
685914
686 def __init__(self, *args,**kw):915 def __init__(self, *args,**kw):
687 """Initialize the lex and yacc"""916 """Initialize the lex and yacc"""
@@ -790,7 +1019,8 @@
790 | CONJ group1019 | CONJ group
791 | REGLOG group1020 | REGLOG group
792 | REGLOGP group1021 | REGLOGP group
793 | REGLOGM group'''1022 | REGLOGM group
1023 | BUILTIN group'''
794 if p[1] == 'csc': p[0] = 'csc' + p[2]1024 if p[1] == 'csc': p[0] = 'csc' + p[2]
795 elif p[1] == 'sec': p[0] = 'sec' + p[2]1025 elif p[1] == 'sec': p[0] = 'sec' + p[2]
796 elif p[1] == 'acsc': p[0] = 'acsc' + p[2]1026 elif p[1] == 'acsc': p[0] = 'acsc' + p[2]
@@ -805,6 +1035,7 @@
805 elif p[1] == 'reglog': p[0] = 'reglog' + p[2]1035 elif p[1] == 'reglog': p[0] = 'reglog' + p[2]
806 elif p[1] == 'reglogp': p[0] = 'reglogp' + p[2]1036 elif p[1] == 'reglogp': p[0] = 'reglogp' + p[2]
807 elif p[1] == 'reglogm': p[0] = 'reglogm' + p[2]1037 elif p[1] == 'reglogm': p[0] = 'reglogm' + p[2]
1038 elif p[1] in self.builtin_equiv: p[0] = self.builtin_equiv[p[1]] + p[2]
8081039
809 def p_expression_real(self, p):1040 def p_expression_real(self, p):
810 ''' expression : expression RE2 '''1041 ''' expression : expression RE2 '''
8111042
=== modified file 'madgraph/loop/loop_exporters.py'
--- madgraph/loop/loop_exporters.py 2018-04-27 10:54:08 +0000
+++ madgraph/loop/loop_exporters.py 2018-06-15 08:18:50 +0000
@@ -411,6 +411,9 @@
411 shutil.copy(os.path.join(self.loop_dir,'StandAlone/', file),411 shutil.copy(os.path.join(self.loop_dir,'StandAlone/', file),
412 os.path.join(self.dir_path, file))412 os.path.join(self.dir_path, file))
413413
414 cp(pjoin(self.loop_dir,'StandAlone/Cards/MadLoopParams.dat'),
415 pjoin(self.dir_path, 'Cards/MadLoopParams_default.dat'))
416
414 ln(pjoin(self.dir_path, 'Cards','MadLoopParams.dat'), pjoin(self.dir_path,'SubProcesses'))417 ln(pjoin(self.dir_path, 'Cards','MadLoopParams.dat'), pjoin(self.dir_path,'SubProcesses'))
415418
416 # We might need to give a different name to the MadLoop makefile419 # We might need to give a different name to the MadLoop makefile
@@ -3041,7 +3044,18 @@
3041 context['MadEventOutput'] = True3044 context['MadEventOutput'] = True
3042 return context3045 return context
3043 3046
3044 3047 #===========================================================================
3048 # write a procdef_mg5 (an equivalent of the MG4 proc_card.dat)
3049 #===========================================================================
3050 def write_procdef_mg5(self, file_pos, modelname, process_str):
3051 """ write an equivalent of the MG4 proc_card in order that all the Madevent
3052 Perl script of MadEvent4 are still working properly for pure MG5 run.
3053 Not needed for StandAlone so we need to call the correct one
3054 """
3055
3056 return export_v4.ProcessExporterFortranMEGroup.write_procdef_mg5(
3057 self, file_pos, modelname, process_str)
3058
3045 def get_source_libraries_list(self):3059 def get_source_libraries_list(self):
3046 """ Returns the list of libraries to be compiling when compiling the3060 """ Returns the list of libraries to be compiling when compiling the
3047 SOURCE directory. It is different for loop_induced processes and 3061 SOURCE directory. It is different for loop_induced processes and
30483062
=== modified file 'madgraph/loop/loop_helas_objects.py'
--- madgraph/loop/loop_helas_objects.py 2017-07-13 10:33:37 +0000
+++ madgraph/loop/loop_helas_objects.py 2018-06-15 08:18:50 +0000
@@ -22,6 +22,7 @@
22import logging22import logging
23import itertools23import itertools
24import math24import math
25import os
2526
26import aloha27import aloha
27import aloha.create_aloha as create_aloha28import aloha.create_aloha as create_aloha
@@ -2316,11 +2317,10 @@
2316 already created and can be specified here instead of being generated.2317 already created and can be specified here instead of being generated.
2317 This can make a difference for very complicated models."""2318 This can make a difference for very complicated models."""
2318 2319
2319 2320 if not alohaModel:# is None:
2320 if alohaModel is None:
2321 # Generate it here2321 # Generate it here
2322 model = self.get('processes')[0].get('model')2322 model = self.get('processes')[0].get('model')
2323 myAlohaModel = create_aloha.AbstractALOHAModel(model.get('name'))2323 myAlohaModel = create_aloha.AbstractALOHAModel(os.path.basename(model.get('modelpath')))
2324 myAlohaModel.add_Lorentz_object(model.get('lorentz'))2324 myAlohaModel.add_Lorentz_object(model.get('lorentz'))
2325 else:2325 else:
2326 # Use the one provided2326 # Use the one provided
23272327
=== modified file 'madgraph/madevent/gen_crossxhtml.py'
--- madgraph/madevent/gen_crossxhtml.py 2018-04-26 14:24:04 +0000
+++ madgraph/madevent/gen_crossxhtml.py 2018-06-15 08:18:50 +0000
@@ -394,7 +394,7 @@
394 394
395 def output(self):395 def output(self):
396 """ write the output file """396 """ write the output file """
397 397
398 # 1) Create the text for the status directory 398 # 1) Create the text for the status directory
399 if self.status and self.current:399 if self.status and self.current:
400 if isinstance(self.status, str):400 if isinstance(self.status, str):
@@ -1319,10 +1319,14 @@
1319 def get_nb_line(self):1319 def get_nb_line(self):
1320 1320
1321 nb_line = 01321 nb_line = 0
1322 self.nb_line = nb_line
1322 for key in ['parton', 'reweight', 'pythia', 'pythia8', 'pgs', 1323 for key in ['parton', 'reweight', 'pythia', 'pythia8', 'pgs',
1323 'delphes', 'shower', 'madanalysis5_hadron']:1324 'delphes', 'shower', 'madanalysis5_hadron']:
1324 if len(getattr(self, key)):1325 if len(getattr(self, key)):
1325 nb_line += 11326 nb_line += 1
1327 if nb_line ==0 and not os.path.exists(pjoin(self.me_dir, "Events", self["run_name"], "%(run)s_%(tag)s_banner.txt)" % \
1328 {"run":self["run_name"], 'tag': self["tag"]})):
1329 return 0
1326 return max([nb_line,1])1330 return max([nb_line,1])
1327 1331
1328 1332
@@ -1344,6 +1348,13 @@
1344 <td> %(links)s</td>1348 <td> %(links)s</td>
1345 <td> %(action)s</td>1349 <td> %(action)s</td>
1346 </tr>"""1350 </tr>"""
1351 sub_part_template_parton_no_results = """
1352 <td rowspan=%(cross_span)s><center><a> %(cross).4g <font face=symbol>&#177;</font> %(err).2g %(bias)s</a> %(syst)s </center></td>
1353 <td rowspan=%(cross_span)s><center> %(nb_event)s<center></td><td> %(type)s </td>
1354 <td> %(links)s</td>
1355 <td> %(action)s</td>
1356 </tr>"""
1357
13471358
1348 sub_part_template_py8 = """1359 sub_part_template_py8 = """
1349 <td rowspan=%(cross_span)s><center><a href="./Events/%(run)s/%(tag)s_merged_xsecs.txt"> merged xsection</a> %(syst)s </center></td>1360 <td rowspan=%(cross_span)s><center><a href="./Events/%(run)s/%(tag)s_merged_xsecs.txt"> merged xsection</a> %(syst)s </center></td>
@@ -1373,6 +1384,8 @@
1373 1384
1374 # Compute the HTMl output for subpart1385 # Compute the HTMl output for subpart
1375 nb_line = self.get_nb_line()1386 nb_line = self.get_nb_line()
1387 if nb_line == 0:
1388 return ""
1376 # Check that cross/nb_event/error are define1389 # Check that cross/nb_event/error are define
1377 if self.pythia and not self['nb_event']:1390 if self.pythia and not self['nb_event']:
1378 try:1391 try:
@@ -1429,7 +1442,10 @@
1429 elif ttype=='pythia8' and self['cross_pythia'] == -1:1442 elif ttype=='pythia8' and self['cross_pythia'] == -1:
1430 template = sub_part_template_py81443 template = sub_part_template_py8
1431 else:1444 else:
1432 template = sub_part_template_parton1445 if os.path.exists(pjoin(self.me_dir,'HTML', self['run_name'],'results.html')):
1446 template = sub_part_template_parton
1447 else:
1448 template = sub_part_template_parton_no_results
1433 first = ttype1449 first = ttype
1434 if ttype=='parton' and self['cross_pythia']:1450 if ttype=='parton' and self['cross_pythia']:
1435 local_dico['cross_span'] = 11451 local_dico['cross_span'] = 1
14361452
=== modified file 'madgraph/madevent/sum_html.py'
--- madgraph/madevent/sum_html.py 2018-04-26 14:41:07 +0000
+++ madgraph/madevent/sum_html.py 2018-06-15 08:18:50 +0000
@@ -575,6 +575,12 @@
575 mod_link = '../../SubProcesses/%(P)s/%(G)s/log.txt' % \575 mod_link = '../../SubProcesses/%(P)s/%(G)s/log.txt' % \
576 {'P': os.path.basename(self.name),576 {'P': os.path.basename(self.name),
577 'G': oneresult.name}577 'G': oneresult.name}
578 if not os.path.exists(link) and not os.path.exists(mod_link):
579 P = os.path.basename(self.name)
580 base = pjoin(me_dir, 'SubProcesses', P, os.path.dirname(link))
581 pos = [pjoin(base,c) for c in os.listdir(base) if c.endswith('.log')]
582 if len(pos) == 1:
583 link = pos[0]
578 else:584 else:
579 link = '#%s' % oneresult.name585 link = '#%s' % oneresult.name
580 mod_link = link586 mod_link = link
581587
=== modified file 'madgraph/various/banner.py'
--- madgraph/various/banner.py 2018-04-26 09:15:05 +0000
+++ madgraph/various/banner.py 2018-06-15 08:18:50 +0000
@@ -188,7 +188,6 @@
188 """return the cross-section of the file"""188 """return the cross-section of the file"""
189189
190 if "init" not in self:190 if "init" not in self:
191 misc.sprint(self.keys())
192 raise Exception191 raise Exception
193 192
194 text = self["init"].split('\n')193 text = self["init"].split('\n')
@@ -339,6 +338,12 @@
339# assert "all" in cross338# assert "all" in cross
340 assert "init" in self339 assert "init" in self
341 340
341 cross = dict(cross)
342 for key in cross.keys():
343 if isinstance(key, str) and key.isdigit() and int(key) not in cross:
344 cross[int(key)] = cross[key]
345
346
342 all_lines = self["init"].split('\n')347 all_lines = self["init"].split('\n')
343 new_data = []348 new_data = []
344 new_data.append(all_lines[0])349 new_data.append(all_lines[0])
@@ -353,7 +358,10 @@
353 if int(pid) not in cross:358 if int(pid) not in cross:
354 raise Exception359 raise Exception
355 pid = int(pid)360 pid = int(pid)
356 ratio = cross[pid]/float(xsec)361 if float(xsec):
362 ratio = cross[pid]/float(xsec)
363 else:
364 ratio = 0
357 line = " %+13.7e %+13.7e %+13.7e %i" % \365 line = " %+13.7e %+13.7e %+13.7e %i" % \
358 (float(cross[pid]), ratio* float(xerr), ratio*float(xmax), pid)366 (float(cross[pid]), ratio* float(xerr), ratio*float(xmax), pid)
359 new_data.append(line)367 new_data.append(line)
@@ -1003,17 +1011,23 @@
1003 1011
1004 return log(text)1012 return log(text)
10051013
1014 def post_set(self, name, value, change_userdefine, raiseerror):
1015
1016 if value is None:
1017 value = self[name]
1018
1019 if hasattr(self, 'post_set_%s' % name):
1020 return getattr(self, 'post_set_%s' % name)(value, change_userdefine, raiseerror)
1006 1021
1007 def __setitem__(self, name, value, change_userdefine=False,raiseerror=False):1022 def __setitem__(self, name, value, change_userdefine=False,raiseerror=False):
1008 """set the attribute and set correctly the type if the value is a string.1023 """set the attribute and set correctly the type if the value is a string.
1009 change_userdefine on True if we have to add the parameter in user_set1024 change_userdefine on True if we have to add the parameter in user_set
1010 """1025 """
1011 1026
1012 if not len(self):1027 if not len(self):
1013 #Should never happen but when deepcopy/pickle1028 #Should never happen but when deepcopy/pickle
1014 self.__init__()1029 self.__init__()
1015 1030
1016
1017 name = name.strip()1031 name = name.strip()
1018 lower_name = name.lower() 1032 lower_name = name.lower()
10191033
@@ -1031,13 +1045,17 @@
1031 if lower_name in self.user_set:1045 if lower_name in self.user_set:
1032 self.user_set.remove(lower_name)1046 self.user_set.remove(lower_name)
1033 #keep old value.1047 #keep old value.
1048 self.post_set(lower_name, 'auto', change_userdefine, raiseerror)
1034 return 1049 return
1035 elif lower_name in self.auto_set:1050 elif lower_name in self.auto_set:
1036 self.auto_set.remove(lower_name)1051 self.auto_set.remove(lower_name)
1037 1052
1038 # 2. Find the type of the attribute that we want1053 # 2. Find the type of the attribute that we want
1039 if lower_name in self.list_parameter:1054 if lower_name in self.list_parameter:
1040 targettype = self.list_parameter[lower_name] 1055 targettype = self.list_parameter[lower_name]
1056
1057
1058
1041 if isinstance(value, str):1059 if isinstance(value, str):
1042 # split for each comma/space1060 # split for each comma/space
1043 value = value.strip()1061 value = value.strip()
@@ -1058,8 +1076,6 @@
1058 i+=21076 i+=2
1059 new_value += current1077 new_value += current
1060 1078
1061
1062
1063 value = new_value 1079 value = new_value
1064 1080
1065 elif not hasattr(value, '__iter__'):1081 elif not hasattr(value, '__iter__'):
@@ -1111,7 +1127,8 @@
1111 dict.__setitem__(self, lower_name, values) 1127 dict.__setitem__(self, lower_name, values)
1112 if change_userdefine:1128 if change_userdefine:
1113 self.user_set.add(lower_name)1129 self.user_set.add(lower_name)
1114 return 1130 #check for specific action
1131 return self.post_set(lower_name, None, change_userdefine, raiseerror)
1115 elif lower_name in self.dict_parameter:1132 elif lower_name in self.dict_parameter:
1116 targettype = self.dict_parameter[lower_name] 1133 targettype = self.dict_parameter[lower_name]
1117 full_reset = True #check if we just update the current dict or not1134 full_reset = True #check if we just update the current dict or not
@@ -1161,7 +1178,7 @@
1161 raise Exception, '%s should be of dict type'% lower_name1178 raise Exception, '%s should be of dict type'% lower_name
1162 if change_userdefine:1179 if change_userdefine:
1163 self.user_set.add(lower_name)1180 self.user_set.add(lower_name)
1164 return1181 return self.post_set(lower_name, None, change_userdefine, raiseerror)
1165 elif name in self: 1182 elif name in self:
1166 targettype = type(self[name])1183 targettype = type(self[name])
1167 else:1184 else:
@@ -1175,7 +1192,7 @@
1175 self.lower_to_case[lower_name] = name1192 self.lower_to_case[lower_name] = name
1176 if change_userdefine:1193 if change_userdefine:
1177 self.user_set.add(lower_name)1194 self.user_set.add(lower_name)
1178 return1195 return self.post_set(lower_name, None, change_userdefine, raiseerror)
1179 1196
1180 value = self.format_variable(value, targettype, name=name)1197 value = self.format_variable(value, targettype, name=name)
1181 #check that the value is allowed:1198 #check that the value is allowed:
@@ -1206,6 +1223,7 @@
1206 dict.__setitem__(self, lower_name, value)1223 dict.__setitem__(self, lower_name, value)
1207 if change_userdefine:1224 if change_userdefine:
1208 self.user_set.add(lower_name)1225 self.user_set.add(lower_name)
1226 self.post_set(lower_name, None, change_userdefine, raiseerror)
12091227
12101228
1211 def add_param(self, name, value, system=False, comment=False, typelist=None,1229 def add_param(self, name, value, system=False, comment=False, typelist=None,
@@ -2368,7 +2386,10 @@
2368 name = nline[1].strip().lower()2386 name = nline[1].strip().lower()
2369 value = self[name]2387 value = self[name]
2370 if name in self.list_parameter:2388 if name in self.list_parameter:
2371 value = ', '.join([str(v) for v in value])2389 if self.list_parameter[name] != str:
2390 value = ', '.join([str(v) for v in value])
2391 else:
2392 value = "['%s']" % "', '".join(str(v) for v in value)
2372 if python_template:2393 if python_template:
2373 text += line % {nline[1].strip():value, name:value}2394 text += line % {nline[1].strip():value, name:value}
2374 written.add(name)2395 written.add(name)
@@ -2732,6 +2753,7 @@
2732 self.add_param("time_of_flight", -1.0, include=False)2753 self.add_param("time_of_flight", -1.0, include=False)
2733 self.add_param("nevents", 10000) 2754 self.add_param("nevents", 10000)
2734 self.add_param("iseed", 0)2755 self.add_param("iseed", 0)
2756 self.add_param("python_seed", -1, include=False, hidden=True, comment="controlling python seed [handling in particular the final unweighting].\n -1 means use default from random module.\n -2 means set to same value as iseed")
2735 self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9, -2,-3],2757 self.add_param("lpp1", 1, fortran_name="lpp(1)", allowed=[-1,1,0,2,3,9, -2,-3],
2736 comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF from proton\n -1: PDF from anti-proton\n 2:photon from proton, 3:photon from electron, 9: PLUGIN MODE')2758 comment='first beam energy distribution:\n 0: fixed energy\n 1: PDF from proton\n -1: PDF from anti-proton\n 2:photon from proton, 3:photon from electron, 9: PLUGIN MODE')
2737 self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9],2759 self.add_param("lpp2", 1, fortran_name="lpp(2)", allowed=[-1,1,0,2,3,9],
27382760
=== added file 'madgraph/various/hepmc_parser.py'
--- madgraph/various/hepmc_parser.py 1970-01-01 00:00:00 +0000
+++ madgraph/various/hepmc_parser.py 2018-06-15 08:18:50 +0000
@@ -0,0 +1,342 @@
1from __future__ import division
2
3import gzip
4
5if '__main__' == __name__:
6 import sys
7 sys.path.append('../../')
8import misc
9import os
10import logging
11
12class HEPMC_Particle(object):
13
14 def __init__(self, text=None, event=None):
15
16 self.barcode = 0
17 self.pdg = 0
18 self.px = 0
19 self.py = 0
20 self.pz = 0
21 self.E = 0
22 self.mass = 0
23 self.status = 0
24 self.polarization_theta = 0
25 self.polarization_phi = 0
26 self.vertex_barcode = 0 #vertex on which this particle is incoming
27 self.nb_flow_list = 0
28 self.flows = []
29
30 if text:
31 self.parse(text, event)
32
33 @property
34 def pdg_code(self):
35 return self.pdg
36
37 pid = pdg_code
38
39 @property
40 def helicity(self):
41 return 9
42
43 def parse(self,line=None, event=None):
44 """ P 3 -2 0 0 3.0332529367341937e+01 3.0332529367341937e+01 0 21 0 0 -3 1 2 501"""
45
46 data = line.split()
47
48 self.barcode = int(data[1]) # 3
49 self.pdg = int(data[2]) #-2
50 self.px = float(data[3]) #0
51 self.py = float(data[4]) #0
52 self.pz = float(data[5]) #30.3
53 self.E = float(data[6]) # 30.3
54 self.mass = float(data[7]) # 0
55 self.status = int(data[8]) # 21
56 self.polarization_theta = float(data[9]) #0
57 self.polarization_phi = float(data[10]) #0
58 self.vertex_barcode = float(data[11]) #-3 vertex on which this particle is incoming
59 self.nb_flow_list = int(data[12]) # 1
60 self.flows = [(int(data[13+2*i]),int(data[13+2*i+1]))
61 for i in range(self.nb_flow_list)] # 2 501
62
63 if event:
64 event.curr_vertex.add_outcoming(self)
65
66 def __str__(self):
67 """P 3 -2 0 0 3.0332529367341937e+01 3.0332529367341937e+01 0 21 0 0 -3 1 2 501"""
68
69 start = """P %i %i %17.16e %17.16e %17.16e %17.16e %17.16e %i %17.16e %17.16e %i %i %s\n""" %\
70 (self.barcode, self.pdg, self.px, self.py, self.pz, self.E, self.mass,
71 self.status, self.polarization_theta, self.polarization_phi,
72 self.vertex_barcode, self.nb_flow_list, ' '.join("%i %i" % f for f in self.flows))
73
74
75 return start.replace("%17.16e" % 0, '0')
76
77
78
79
80class HEPMC_Vertex(object):
81
82 def __init__(self, text=None, event=None):
83
84 self.barcode = 0
85 self.id = 0
86 self.x = 0
87 self.y = 0
88 self.z = 0
89 self.ctau = 0
90 self.nb_orphan = 0
91 self.nb_outgoing = 0
92 self.nb_weight = 0
93 self.weights = []
94 self.incoming = []
95 self.outcoming = []
96
97
98 if text:
99 self.parse(text,event)
100
101 def parse(self, line, event=None):
102 """V -8 0 0 0 0 0 0 2 0"""
103
104 data = line.split()
105 self.barcode = int(data[1])
106 self.id = float(data[2])
107 self.x = float(data[3])
108 self.y = float(data[4])
109 self.z = float(data[5])
110 self.ctau = float(data[6])
111 self.nb_orphan = int(data[7])
112 self.nb_outgoing = int(data[8])
113 self.nb_weight = int(data[9])
114 self.weights = [float(data[10+i]) for i in range(self.nb_weight)]
115 if event:
116 event.vertex[self.barcode] = self
117
118 def add_incoming(self, particle):
119 self.incoming.append(particle)
120
121 def add_outcoming(self, particle):
122 self.outcoming.append(particle)
123
124class HEPMC_Event(object):
125
126 def __init__(self, text=None):
127 """The initialization of an empty Event (or one associate to a text file)"""
128 #
129 self.particles = {} #barcode to object
130 self.vertex = {} #barcode to object
131
132 # First line information (E line)
133 self.event_id = 0
134 self.nb_interaction = 0
135 self.scale = 0.
136 self.alphas = 0.
137 self.alphaew = 0.
138 self.process_id = 0
139 self.barcode_vertex =0
140 self.nb_vertex = 0
141 self.barcode_beam1 = 0
142 self.barcode_beam2 = 0
143 self.nb_random_state = 0
144 self.randoms = []
145 self.nb_weight = 0
146 self.weights = []
147
148 # not parse container (so far)
149 self.N = ''
150 self.U = ''
151 self.C = ''
152 self.H = ''
153 self.F = ''
154
155 if text:
156 self.parse(text)
157
158 @property
159 def wgt(self):
160 if self.weights:
161 return self.weights[0]
162 else:
163 return 0.
164 @wgt.setter
165 def wgt(self, value):
166 self.nb_weight = 1
167 self.weights = [value]
168
169
170 def parse(self, text):
171
172 for line in text.split('\n'):
173 if not line:
174 continue
175 if line[0] == 'P':
176 P = HEPMC_Particle(line, self)
177 self.add_particle(P)
178 elif line[0] == 'V':
179 V = HEPMC_Vertex(line, self)
180 self.curr_vertex = V
181 self.add_vertex(V)
182 elif line[0] in ['E', 'N', 'U', 'H','F','C']:
183 getattr(self, 'parse_%s' % line[0])(line)
184 else:
185 self.comment = '%s%s\n' % (self.comment,line)
186
187 # add the information about incoming particle
188 for particle in self:
189 try:
190 self.vertex[particle.vertex_barcode].add_incoming(particle)
191 except KeyError:
192 if particle.vertex_barcode == 0:
193 continue
194 raise
195
196 def parse_E(self,line):
197 """E 249 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 462 1 2 0 1 8.2247251000000005e-22"""
198
199 data = line.split()
200 self.event_id = int(data[1])
201 self.nb_interaction = int(data[2])
202 self.scale = float(data[3])
203 self.alphas = float(data[4])
204 self.alphaew = float(data[5])
205 self.process_id = int(data[6])
206 self.barcode_vertex= int(data[7])
207 self.nb_vertex = int(data[8])
208 self.barcode_beam1 = int(data[9])
209 self.barcode_beam2 = int(data[10])
210 self.nb_random_state = int(data[11])
211 self.randoms = [float(data[12+i]) for i in range(self.nb_random_state)]
212 self.nb_weight = int(data[12+self.nb_random_state])
213 self.weights = [float(data[13+self.nb_random_state+i])
214 for i in range(self.nb_weight)]
215
216 def parse_N(self,line):
217 """just keep the information so far"""
218 self.N = '%s\n' % line
219 def parse_U(self,line):
220 self.U = '%s\n' % line
221 def parse_H(self,line):
222 self.H = '%s\n' % line
223 def parse_F(self,line):
224 self.F = '%s\n' % line
225 def parse_C(self,line):
226 self.C = '%s\n' % line
227
228 def __iter__(self):
229 return self.particles.values().__iter__()
230
231 #def __next__(self):
232 #
233 # self.particles.__next__()
234
235 def add_vertex(self, V):
236 self.vertex[V.barcode] = V
237
238 def add_particle(self, P):
239 self.particles[P.barcode] = P
240
241class HEPMC_EventFile(object):
242
243 def __new__(self, path, mode='r', *args, **opt):
244
245 if not path.endswith(".gz"):
246 return file.__new__(HEPMC_EventFileNoGzip, path, mode, *args, **opt)
247 elif mode == 'r' and not os.path.exists(path) and os.path.exists(path[:-3]):
248 return HEPMC_EventFile.__new__(HEPMC_EventFileNoGzip, path[:-3], mode, *args, **opt)
249 else:
250 try:
251 return gzip.GzipFile.__new__(HEPMC_EventFileGzip, path, mode, *args, **opt)
252 except IOError, error:
253 raise
254 except Exception, error:
255 if mode == 'r':
256 misc.gunzip(path)
257 return file.__new__(HEPMC_EventFileNoGzip, path[:-3], mode, *args, **opt)
258
259
260 def __init__(self, path, mode='r', *args, **opt):
261 """open file and read the banner [if in read mode]"""
262
263 self.to_zip = False
264 if path.endswith('.gz') and mode == 'w' and\
265 isinstance(self, HEPMC_EventFileNoGzip):
266 path = path[:-3]
267 self.to_zip = True # force to zip the file at close() with misc.gzip
268
269 self.parsing = True # check if/when we need to parse the event.
270 self.eventgroup = False
271 try:
272 super(HEPMC_EventFile, self).__init__(path, mode, *args, **opt)
273 except IOError:
274 if '.gz' in path and isinstance(self, HEPMC_EventFileNoGzip) and\
275 mode == 'r' and os.path.exists(path[:-3]):
276 super(HEPMC_EventFile, self).__init__(path[:-3], mode, *args, **opt)
277 else:
278 raise
279
280 self.header = ''
281 if mode == 'r':
282 line = ''
283 while 'HepMC::IO_GenEvent-START_EVENT_LISTING' not in line:
284
285 try:
286 line = super(HEPMC_EventFile, self).next()
287 except StopIteration:
288 self.seek(0)
289 self.header = ''
290 break
291 self.header += line
292 self.start_event = ''
293
294 def seek(self, value):
295 self.start_event = ""
296 super(HEPMC_EventFile, self).seek(value)
297
298 def next(self):
299 """get next event"""
300 text = self.start_event
301 line = ''
302 while 1:
303 line = super(HEPMC_EventFile, self).next()
304 if line.startswith('E'):
305 self.start_event = line
306 if text:
307 return HEPMC_Event(text)
308 else:
309 text += line
310
311 elif line.lstrip().startswith('HepMC::IO_GenEvent-END_EVENT_LISTING'):
312 if text:
313 return HEPMC_Event(text)
314 elif line.lstrip().startswith('HepMC::IO_GenEvent-START_EVENT_LISTING'):
315 text = ''
316 else:
317 text += line
318
319
320class HEPMC_EventFileGzip(HEPMC_EventFile, gzip.GzipFile):
321 """A way to read/write a gzipped lhef event"""
322
323class HEPMC_EventFileNoGzip(HEPMC_EventFile, file):
324 """A way to read a standard event file"""
325
326 def close(self,*args, **opts):
327
328 out = super(EventFileNoGzip, self).close(*args, **opts)
329 if self.to_zip:
330 misc.gzip(self.name)
331
332
333if "__main__" == __name__:
334 path = "/Users/omatt/Documents/eclipse/2.3.3_PY8_install_cmd/PROC_sm_24/Events/run_01/tag_1_pythia8_events.hepmc.gz"
335 evts = HEPMC_EventFile(path)
336 nb_event = 0
337 nb_p = 0
338 for event in evts:
339 nb_event +=1
340 for p in event:
341 nb_p+=1
342 print nb_event, nb_p
0343
=== modified file 'madgraph/various/lhe_parser.py'
--- madgraph/various/lhe_parser.py 2018-03-09 15:44:05 +0000
+++ madgraph/various/lhe_parser.py 2018-06-15 08:18:50 +0000
@@ -52,7 +52,28 @@
52 if event:52 if event:
53 self.event = event53 self.event = event
54 return54 return
55 55 else:
56 try:
57 import madgraph.various.hepmc_parser as hepmc_parser
58 except Exception:
59 pass
60 else:
61 if isinstance(line, hepmc_parser.HEPMC_Particle):
62 self.event = event
63 self.event_id = len(event) #not yet in the event
64 for key in ['pid', 'status', 'E','px','py','pz','mass']:
65 setattr(self, key, getattr(line, key))
66 self.mother1 = 1
67 self.mother2 = 1
68 self.color1 = 0
69 self.color2 = 0
70 self.vtim = 0
71 self.comment = ''
72 self.helicity = 9
73 self.rwgt = 0
74 return
75
76
56 self.event = event77 self.event = event
57 self.event_id = len(event) #not yet in the event78 self.event_id = len(event) #not yet in the event
58 # LHE information79 # LHE information
@@ -154,6 +175,7 @@
154class EventFile(object):175class EventFile(object):
155 """A class to allow to read both gzip and not gzip file"""176 """A class to allow to read both gzip and not gzip file"""
156 177
178 allow_empty_event = False
157179
158 def __new__(self, path, mode='r', *args, **opt):180 def __new__(self, path, mode='r', *args, **opt):
159 181
@@ -261,7 +283,7 @@
261 text += line283 text += line
262 if self.parsing:284 if self.parsing:
263 out = Event(text)285 out = Event(text)
264 if len(out) == 0:286 if len(out) == 0 and not self.allow_empty_event:
265 raise Exception287 raise Exception
266 return out288 return out
267 else:289 else:
@@ -1246,6 +1268,27 @@
1246 self.assign_mother()1268 self.assign_mother()
1247 1269
1248 def assign_mother(self):1270 def assign_mother(self):
1271 """convert the number in actual particle"""
1272 #Security if not incoming particle. Define a fake particle and set all particle as
1273 # decaying from that fake particle
1274 if all(p.status != -1 for p in self):
1275 if self.warning_order:
1276 Event.warning_order = False
1277 logger.warning("Weird format for lhe format: no incoming particle... adding a fake one")
1278
1279 mother = Particle(event=self)
1280 mother.status = -1
1281 mother.pid = 0
1282 self.insert(0,mother)
1283 mother.color2 = 0
1284 mother.event_id = 0
1285 self.nexternal += 1
1286 for p in self[1:]:
1287 p.mother1 = 1
1288 p.mother2 = 1
1289 p.event_id += 1
1290
1291
1249 # assign the mother:1292 # assign the mother:
1250 for i,particle in enumerate(self):1293 for i,particle in enumerate(self):
1251 if i < particle.mother1 or i < particle.mother2:1294 if i < particle.mother1 or i < particle.mother2:
@@ -2055,7 +2098,7 @@
2055 2098
2056 def __str__(self, event_id=''):2099 def __str__(self, event_id=''):
2057 """return a correctly formatted LHE event"""2100 """return a correctly formatted LHE event"""
2058 2101
2059 out="""<event%(event_flag)s>2102 out="""<event%(event_flag)s>
2060%(scale)s2103%(scale)s
2061%(particles)s2104%(particles)s
@@ -2072,11 +2115,9 @@
2072 else:2115 else:
2073 event_flag = ''2116 event_flag = ''
20742117
2075 if self.nexternal:2118 scale_str = "%2d %6d %+13.7e %14.8e %14.8e %14.8e" % \
2076 scale_str = "%2d %6d %+13.7e %14.8e %14.8e %14.8e" % \
2077 (self.nexternal,self.ievent,self.wgt,self.scale,self.aqed,self.aqcd)2119 (self.nexternal,self.ievent,self.wgt,self.scale,self.aqed,self.aqcd)
2078 else:2120
2079 scale_str = ''
2080 2121
2081 if self.reweight_data:2122 if self.reweight_data:
2082 # check that all key have an order if not add them at the end2123 # check that all key have an order if not add them at the end
@@ -2367,6 +2408,12 @@
2367 """ return |\vec p|^2 """2408 """ return |\vec p|^2 """
2368 return self.px**2 + self.py**2 + self.pz**22409 return self.px**2 + self.py**2 + self.pz**2
2369 2410
2411 @property
2412 def theta(self):
2413 """return the mass square"""
2414 import math
2415 return math.atan(math.sqrt((self.px**2+self.py**2)/self.pz**2))
2416
2370 2417
2371 def __add__(self, obj):2418 def __add__(self, obj):
2372 2419
23732420
=== modified file 'madgraph/various/misc.py'
--- madgraph/various/misc.py 2018-04-29 07:57:44 +0000
+++ madgraph/various/misc.py 2018-06-15 08:18:50 +0000
@@ -1082,7 +1082,8 @@
1082 return self.path1082 return self.path
1083 1083
1084class TMP_variable(object):1084class TMP_variable(object):
1085 """create a temporary directory and ensure this one to be cleaned.1085 """replace an attribute of a class with another value for the time of the
1086 context manager
1086 """1087 """
10871088
1088 def __init__(self, cls, attribute, value):1089 def __init__(self, cls, attribute, value):
@@ -1463,8 +1464,8 @@
1463 else:1464 else:
1464 return a == b 1465 return a == b
1465 else:1466 else:
1466 power = sig_fig - int(math.log10(abs(a))) + 11467 power = sig_fig - int(math.log10(abs(a)))
1467 1468
1468 return ( a==b or abs(int(a*10**power) - int(b*10**power)) < 10)1469 return ( a==b or abs(int(a*10**power) - int(b*10**power)) < 10)
1469 else:1470 else:
1470 return abs(a-b) < sig_fig1471 return abs(a-b) < sig_fig
14711472
=== modified file 'mg5decay/decay_objects.py'
--- mg5decay/decay_objects.py 2017-07-04 09:24:42 +0000
+++ mg5decay/decay_objects.py 2018-06-15 08:18:50 +0000
@@ -4091,7 +4091,7 @@
4091 model.lorentz_dict = dict([(l.name, l) for l in model['lorentz']])4091 model.lorentz_dict = dict([(l.name, l) for l in model['lorentz']])
4092 self.init_regular_expression()4092 self.init_regular_expression()
4093 4093
4094 structure = model.lorentz_dict[vertex['lorentz'][key[1]]].structure 4094 structure = model.lorentz_dict[vertex['lorentz'][key[1]]].structure
4095 new_structure = self.lor_pattern.sub(self.simplify_lorentz,4095 new_structure = self.lor_pattern.sub(self.simplify_lorentz,
4096 structure)4096 structure)
4097 lor_value = eval(new_structure % q_dict_lor)4097 lor_value = eval(new_structure % q_dict_lor)
40984098
=== modified file 'models/import_ufo.py'
--- models/import_ufo.py 2018-03-10 22:48:36 +0000
+++ models/import_ufo.py 2018-06-15 08:18:50 +0000
@@ -21,6 +21,7 @@
21import re21import re
22import sys22import sys
23import time23import time
24import collections
2425
2526
26from madgraph import MadGraph5Error, MG5DIR, ReadWrite27from madgraph import MadGraph5Error, MG5DIR, ReadWrite
@@ -497,7 +498,7 @@
497 color_info = self.find_color_anti_color_rep()498 color_info = self.find_color_anti_color_rep()
498499
499 # load the lorentz structure.500 # load the lorentz structure.
500 self.model.set('lorentz', self.ufomodel.all_lorentz)501 self.model.set('lorentz', list(self.ufomodel.all_lorentz))
501 502
502 # Substitute the expression of CT couplings which include CTparameters503 # Substitute the expression of CT couplings which include CTparameters
503 # in their definition with the corresponding dictionaries, e.g.504 # in their definition with the corresponding dictionaries, e.g.
@@ -529,6 +530,11 @@
529 for interaction_info in self.ufomodel.all_CTvertices:530 for interaction_info in self.ufomodel.all_CTvertices:
530 self.add_CTinteraction(interaction_info, color_info)531 self.add_CTinteraction(interaction_info, color_info)
531 532
533
534 for interaction in self.interactions:
535 self.optimise_interaction(interaction)
536
537
532 self.model.set('conserved_charge', self.conservecharge)538 self.model.set('conserved_charge', self.conservecharge)
533539
534 # If we deal with a Loop model here, the order hierarchy MUST be 540 # If we deal with a Loop model here, the order hierarchy MUST be
@@ -576,7 +582,102 @@
576 del self.checked_lor582 del self.checked_lor
577583
578 return self.model584 return self.model
579 585
586 def optimise_interaction(self, interaction):
587
588 # we want to check if the same coupling is used for two lorentz strucutre
589 # for the same color structure.
590 to_lor = {}
591 for (color, lor), coup in interaction['couplings'].items():
592 key = (color, coup)
593 if key in to_lor:
594 to_lor[key].append(lor)
595 else:
596 to_lor[key] = [lor]
597
598 nb_reduce = []
599 optimize = False
600 for key in to_lor:
601 if len(to_lor[key]) >1:
602 nb_reduce.append(len(to_lor[key])-1)
603 optimize = True
604
605 if not optimize:
606 return
607
608 if not hasattr(self, 'defined_lorentz_expr'):
609 self.defined_lorentz_expr = {}
610 self.lorentz_info = {}
611 self.lorentz_combine = {}
612 for lor in self.model['lorentz']:
613 self.defined_lorentz_expr[lor.get('structure')] = lor.get('name')
614 self.lorentz_info[lor.get('name')] = lor #(lor.get('structure'), lor.get('spins'))
615
616 for key in to_lor:
617 if len(to_lor[key]) == 1:
618 continue
619 names = [interaction['lorentz'][i] for i in to_lor[key]]
620 names.sort()
621
622 # get name of the new lorentz
623 if tuple(names) in self.lorentz_combine:
624 # already created new loretnz
625 new_name = self.lorentz_combine[tuple(names)]
626 else:
627 new_name = self.add_merge_lorentz(names)
628
629 # remove the old couplings
630 color, coup = key
631 to_remove = [(color, lor) for lor in to_lor[key]]
632 for rm in to_remove:
633 del interaction['couplings'][rm]
634
635 #add the lorentz structure to the interaction
636 if new_name not in [l for l in interaction.get('lorentz')]:
637 interaction.get('lorentz').append(new_name)
638
639 #find the associate index
640 new_l = interaction.get('lorentz').index(new_name)
641 # adding the new combination (color,lor) associate to this sum of structure
642 interaction['couplings'][(color, new_l)] = coup
643
644
645 def add_merge_lorentz(self, names):
646 """add a lorentz structure which is the sume of the list given above"""
647
648
649 #create new_name
650 ii = len(names[0])
651 while ii>0:
652 if not all(n.startswith(names[0][:ii]) for n in names[1:]):
653 ii -=1
654 else:
655 base_name = names[0][:ii]
656 break
657 else:
658 base_name = 'LMER'
659
660 i = 1
661 while '%s%s' %(base_name, i) in self.lorentz_info:
662 i +=1
663 new_name = '%s%s' %(base_name, i)
664 self.lorentz_combine[tuple(names)] = new_name
665 assert new_name not in self.lorentz_info
666 assert new_name not in [l.name for l in self.model['lorentz']]
667
668 # load the associate lorentz expression
669 new_struct = ' + '.join([self.lorentz_info[n].get('structure') for n in names])
670 spins = self.lorentz_info[names[0]].get('spins')
671 new_lor = self.add_lorentz(new_name, spins, new_struct)
672 self.lorentz_info[new_name] = new_lor
673
674 return new_name
675
676 # We also have to create the new lorentz
677
678
679
680
580 681
581 def add_particle(self, particle_info):682 def add_particle(self, particle_info):
582 """ convert and add a particle in the particle list """683 """ convert and add a particle in the particle list """
@@ -980,7 +1081,6 @@
980 (intType if poleOrder==0 else (intType+str(poleOrder)+\1081 (intType if poleOrder==0 else (intType+str(poleOrder)+\
981 'eps')),loop_particles)1082 'eps')),loop_particles)
9821083
983
984 def find_color_anti_color_rep(self, output=None):1084 def find_color_anti_color_rep(self, output=None):
985 """find which color are in the 3/3bar states"""1085 """find which color are in the 3/3bar states"""
986 # method look at the 3 3bar 8 configuration.1086 # method look at the 3 3bar 8 configuration.
@@ -1197,6 +1297,7 @@
1197 self.conservecharge.discard(charge)1297 self.conservecharge.discard(charge)
1198 1298
1199 1299
1300
1200 def get_sign_flow(self, flow, nb_fermion):1301 def get_sign_flow(self, flow, nb_fermion):
1201 """ensure that the flow of particles/lorentz are coherent with flow 1302 """ensure that the flow of particles/lorentz are coherent with flow
1202 and return a correct version if needed"""1303 and return a correct version if needed"""
@@ -1241,14 +1342,18 @@
12411342
1242 def add_lorentz(self, name, spins , expr):1343 def add_lorentz(self, name, spins , expr):
1243 """ Add a Lorentz expression which is not present in the UFO """1344 """ Add a Lorentz expression which is not present in the UFO """
1244 1345
1245 new = self.model['lorentz'][0].__class__(name = name,1346 assert name not in [l.name for l in self.model['lorentz']]
1246 spins = spins,1347 with misc.TMP_variable(self.ufomodel.object_library, 'all_lorentz',
1247 structure = expr)1348 self.model['lorentz']):
1248 1349 new = self.model['lorentz'][0].__class__(name = name,
1249 self.model['lorentz'].append(new)1350 spins = spins,
1351 structure = expr)
1352 assert name in [l.name for l in self.model['lorentz']]
1353 assert name not in [l.name for l in self.ufomodel.all_lorentz]
1354 #self.model['lorentz'].append(new) # already done by above command
1250 self.model.create_lorentz_dict()1355 self.model.create_lorentz_dict()
1251 return name1356 return new
1252 1357
1253 _pat_T = re.compile(r'T\((?P<first>\d*),(?P<second>\d*)\)')1358 _pat_T = re.compile(r'T\((?P<first>\d*),(?P<second>\d*)\)')
1254 _pat_id = re.compile(r'Identity\((?P<first>\d*),(?P<second>\d*)\)')1359 _pat_id = re.compile(r'Identity\((?P<first>\d*),(?P<second>\d*)\)')
@@ -1657,6 +1762,7 @@
1657 super(RestrictModel, self).default_setup()1762 super(RestrictModel, self).default_setup()
1658 self.rule_card = check_param_card.ParamCardRule()1763 self.rule_card = check_param_card.ParamCardRule()
1659 self.restrict_card = None1764 self.restrict_card = None
1765 self.coupling_order_dict ={}
1660 1766
1661 def restrict_model(self, param_card, rm_parameter=True, keep_external=False,1767 def restrict_model(self, param_card, rm_parameter=True, keep_external=False,
1662 complex_mass_scheme=None):1768 complex_mass_scheme=None):
@@ -1702,6 +1808,10 @@
1702 self.del_coup += zero_couplings1808 self.del_coup += zero_couplings
1703 self.remove_couplings(self.del_coup)1809 self.remove_couplings(self.del_coup)
1704 1810
1811 # modify interaction to avoid to have identical coupling with different lorentz
1812 for interaction in self.get('interactions'):
1813 self.optimise_interaction(interaction)
1814
1705 # deal with parameters1815 # deal with parameters
1706 parameters = self.detect_special_parameters()1816 parameters = self.detect_special_parameters()
1707 self.fix_parameter_values(*parameters, simplify=rm_parameter, 1817 self.fix_parameter_values(*parameters, simplify=rm_parameter,
@@ -1772,17 +1882,58 @@
1772 return self.detect_identical_couplings(strict_zero=True)1882 return self.detect_identical_couplings(strict_zero=True)
17731883
1774 1884
1775 if value in dict_value_coupling:1885 if value in dict_value_coupling or -1*value in dict_value_coupling:
1776 iden_key.add(value)1886 if value in dict_value_coupling:
1777 dict_value_coupling[value].append(name)1887 iden_key.add(value)
1888 dict_value_coupling[value].append((name,1))
1889 else:
1890 iden_key.add(-1*value)
1891 dict_value_coupling[-1*value].append((name,-1))
1778 else:1892 else:
1779 dict_value_coupling[value] = [name]1893 dict_value_coupling[value] = [(name,1)]
1780
1781 for key in iden_key:1894 for key in iden_key:
1782 iden_coupling.append(dict_value_coupling[key])1895 tmp = []
1896 if key in dict_value_coupling:
1897 tmp += dict_value_coupling[key]
1898 elif -1*key in dict_value_coupling:
1899 tmp += dict_value_coupling[-1*key]
1900 assert tmp
1901
1902 #ensure that all coupling have the same coupling order.
1903 ords = [self.get_coupling_order(k) for k,c in tmp]
1904 coup_by_ord = collections.defaultdict(list)
1905 for o,t in zip(ords, tmp):
1906 coup_by_ord[str(o)].append(t)
1907 # add the remaining identical
1908 for tmp3 in coup_by_ord.values():
1909 if len(tmp3) > 1:
1910 if tmp3[0][1] == -1: #ensure that the first coupling has positif value
1911 tmp3 = [(t0,-t1) for t0, t1 in tmp3]
1912 iden_coupling.append(tmp3)
1913
1914
1915
17831916
1784 return zero_coupling, iden_coupling1917 return zero_coupling, iden_coupling
1785 1918
1919 def get_coupling_order(self, cname):
1920 """return the coupling order associated to a coupling """
1921
1922 if cname in self.coupling_order_dict:
1923 return self.coupling_order_dict[cname]
1924
1925 for v in self['interactions']:
1926 for c in v['couplings'].values():
1927 self.coupling_order_dict[c] = v['orders']
1928
1929 if cname not in self.coupling_order_dict:
1930 self.coupling_order_dict[cname] = None
1931 #can happen when some vertex are discarded due to ghost/...
1932
1933
1934 return self.coupling_order_dict[cname]
1935
1936
1786 1937
1787 def detect_special_parameters(self):1938 def detect_special_parameters(self):
1788 """ return the list of (name of) parameter which are zero """1939 """ return the list of (name of) parameter which are zero """
@@ -1898,17 +2049,52 @@
1898 return output2049 return output
18992050
19002051
2052 @staticmethod
2053 def get_new_coupling_name(main, coupling, value, coeff):
2054 """ We have main == coeff * coupling
2055 coeff is only +1 or -1
2056 main can be either GC_X or -GC_X
2057 coupling can be either GC_Y or -GC_Y
2058 value is either GC_Y or -GC_Y
2059 the return is either GC_X or -GC_X
2060 such that we have value == OUTPUT
2061 """
2062 assert coeff in [-1,1]
2063 assert value == coupling or value == '-%s' % coupling or coupling == '-%s' % value
2064 assert isinstance(main, str)
2065 assert isinstance(coupling, str)
2066 assert isinstance(value, str)
2067 if coeff ==1:
2068 if value == coupling:
2069 return main # 4/4
2070 else:
2071 if main.startswith('-'):
2072 return main[1:] # 2/2
2073 else:
2074 return '-%s' % main # 2/2
2075 else:
2076 if value == coupling:
2077 if main.startswith('-'):
2078 return main[1:] # 2/2
2079 else:
2080 return '-%s' % main # 2/2
2081 else:
2082 return main # 4/4
2083
2084
1901 def merge_iden_couplings(self, couplings):2085 def merge_iden_couplings(self, couplings):
1902 """merge the identical couplings in the interactions and particle 2086 """merge the identical couplings in the interactions and particle
1903 counterterms"""2087 counterterms"""
19042088
1905 2089
1906 logger_mod.debug(' Fuse the Following coupling (they have the same value): %s '% \2090 logger_mod.debug(' Fuse the Following coupling (they have the same value): %s '% \
1907 ', '.join([obj for obj in couplings]))2091 ', '.join([str(obj) for obj in couplings]))
2092
2093 main = couplings[0][0]
2094 assert couplings[0][1] == 1
2095 self.del_coup += [c[0] for c in couplings[1:]] # add the other coupl to the suppress list
1908 2096
1909 main = couplings[0]2097 for coupling, coeff in couplings[1:]:
1910 self.del_coup += couplings[1:] # add the other coupl to the suppress list
1911 for coupling in couplings[1:]:
1912 # check if param is linked to an interaction2098 # check if param is linked to an interaction
1913 if coupling not in self.coupling_pos:2099 if coupling not in self.coupling_pos:
1914 continue2100 continue
@@ -1917,13 +2103,12 @@
1917 isinstance(vert, base_objects.Interaction)]2103 isinstance(vert, base_objects.Interaction)]
1918 for vertex in vertices:2104 for vertex in vertices:
1919 for key, value in vertex['couplings'].items():2105 for key, value in vertex['couplings'].items():
1920 if value == coupling:2106 if value == coupling or value == '-%s' % coupling or coupling == '-%s' % value:
1921 vertex['couplings'][key] = main2107 vertex['couplings'][key] = self.get_new_coupling_name(\
1922 elif value == '-%s' % coupling:2108 main, coupling, value, coeff)
1923 if main.startswith('-'):2109
1924 vertex['couplings'][key] = main[1:]2110
1925 else:2111
1926 vertex['couplings'][key] = '-%s' % main
1927 2112
1928 # replace the coupling appearing in the particle counterterm2113 # replace the coupling appearing in the particle counterterm
1929 particles_ct = [ pct for pct in self.coupling_pos[coupling] if 2114 particles_ct = [ pct for pct in self.coupling_pos[coupling] if
@@ -2183,11 +2368,109 @@
2183 data = self['parameters'][param_info[param]['dep']]2368 data = self['parameters'][param_info[param]['dep']]
2184 data.remove(param_info[param]['obj'])2369 data.remove(param_info[param]['obj'])
21852370
2186 2371 def optimise_interaction(self, interaction):
21872372
21882373 # we want to check if the same coupling (up to the sign) is used for two lorentz structure
21892374 # for the same color structure.
2190 2375 to_lor = {}
2376 for (color, lor), coup in interaction['couplings'].items():
2377 abscoup, coeff = (coup[1:],-1) if coup.startswith('-') else (coup, 1)
2378 key = (color, abscoup)
2379 if key in to_lor:
2380 to_lor[key].append((lor,coeff))
2381 else:
2382 to_lor[key] = [(lor,coeff)]
2383
2384 nb_reduce = []
2385 optimize = False
2386 for key in to_lor:
2387 if len(to_lor[key]) >1:
2388 nb_reduce.append(len(to_lor[key])-1)
2389 optimize = True
2390
2391 if not optimize:
2392 return
2393
2394 if not hasattr(self, 'defined_lorentz_expr'):
2395 self.defined_lorentz_expr = {}
2396 self.lorentz_info = {}
2397 self.lorentz_combine = {}
2398 for lor in self.get('lorentz'):
2399 self.defined_lorentz_expr[lor.get('structure')] = lor.get('name')
2400 self.lorentz_info[lor.get('name')] = lor #(lor.get('structure'), lor.get('spins'))
2401
2402 for key in to_lor:
2403 if len(to_lor[key]) == 1:
2404 continue
2405 names = ['u%s' % interaction['lorentz'][i[0]] if i[1] ==1 else \
2406 'd%s' % interaction['lorentz'][i[0]] for i in to_lor[key]]
2407
2408 names.sort()
2409
2410 # get name of the new lorentz
2411 if tuple(names) in self.lorentz_combine:
2412 # already created new loretnz
2413 new_name = self.lorentz_combine[tuple(names)]
2414 else:
2415 new_name = self.add_merge_lorentz(names)
2416
2417 # remove the old couplings
2418 color, coup = key
2419 to_remove = [(color, lor[0]) for lor in to_lor[key]]
2420 for rm in to_remove:
2421 del interaction['couplings'][rm]
2422
2423 #add the lorentz structure to the interaction
2424 if new_name not in [l for l in interaction.get('lorentz')]:
2425 interaction.get('lorentz').append(new_name)
2426
2427 #find the associate index
2428 new_l = interaction.get('lorentz').index(new_name)
2429 # adding the new combination (color,lor) associate to this sum of structure
2430 interaction['couplings'][(color, new_l)] = coup
2431
2432
2433
2434 def add_merge_lorentz(self, names):
2435 """add a lorentz structure which is the sume of the list given above"""
2436
2437 #create new_name
2438 ii = len(names[0])
2439 while ii>1:
2440 #do not count the initial "u/d letter whcih indicates the sign"
2441 if not all(n[1:].startswith(names[0][1:ii]) for n in names[1:]):
2442 ii -=1
2443 else:
2444 base_name = names[0][1:ii]
2445 break
2446 else:
2447 base_name = 'LMER'
2448 i = 1
2449 while '%s%s' %(base_name, i) in self.lorentz_info:
2450 i +=1
2451 new_name = '%s%s' %(base_name, i)
2452 self.lorentz_combine[tuple(names)] = new_name
2453
2454 # load the associate lorentz expression
2455 new_struct = ' + '.join([self.lorentz_info[n[1:]].get('structure') for n in names if n.startswith('u')])
2456 if any( n.startswith('d') for n in names ):
2457 new_struct += '-' + ' - '.join(['1.*(%s)' %self.lorentz_info[n[1:]].get('structure') for n in names if n.startswith('d')])
2458 spins = self.lorentz_info[names[0][1:]].get('spins')
2459 new_lor = self.add_lorentz(new_name, spins, new_struct)
2460 self.lorentz_info[new_name] = new_lor
2461
2462 return new_name
2463
2464 def add_lorentz(self, name, spin, struct):
2465 """adding lorentz structure to the current model"""
2466 new = self['lorentz'][0].__class__(name = name,
2467 spins = spin,
2468 structure = struct)
2469 self['lorentz'].append(new)
2470 self.create_lorentz_dict()
2471
2472 return None
2473
2191 2474
2192 2475
2193 2476
21942477
=== modified file 'models/write_param_card.py'
--- models/write_param_card.py 2017-01-15 14:28:13 +0000
+++ models/write_param_card.py 2018-06-15 08:18:50 +0000
@@ -308,8 +308,8 @@
308 if part["pdg_code"] in self.sm_pdg or part["pdg_code"] < 0:308 if part["pdg_code"] in self.sm_pdg or part["pdg_code"] < 0:
309 continue309 continue
310 # don't write ghosts in the QNumbers block310 # don't write ghosts in the QNumbers block
311 if part["type"] == 'ghost':311 #if part["type"] == 'ghost':
312 continue312 # continue
313 text += self.qnumber_str % {'pdg': part["pdg_code"],313 text += self.qnumber_str % {'pdg': part["pdg_code"],
314 'name': part["name"],314 'name': part["name"],
315 'charge': 3 * part["charge"],315 'charge': 3 * part["charge"],
316316
=== modified file 'tests/acceptance_tests/test_cmd_amcatnlo.py'
--- tests/acceptance_tests/test_cmd_amcatnlo.py 2018-04-29 05:41:18 +0000
+++ tests/acceptance_tests/test_cmd_amcatnlo.py 2018-06-15 08:18:50 +0000
@@ -44,6 +44,7 @@
44_pickle_path =os.path.join(_file_path, 'input_files')44_pickle_path =os.path.join(_file_path, 'input_files')
4545
46from madgraph import MG4DIR, MG5DIR, MadGraph5Error, InvalidCmd46from madgraph import MG4DIR, MG5DIR, MadGraph5Error, InvalidCmd
47from tests.acceptance_tests.test_cmd_madevent import check_html_page
4748
48pjoin = os.path.join49pjoin = os.path.join
4950
@@ -190,7 +191,7 @@
190 self.assertTrue( 'HERWIG6 = parton_shower' in card)191 self.assertTrue( 'HERWIG6 = parton_shower' in card)
191 card = card.replace('HERWIG6 = parton_shower', 'HERWIGPP = parton_shower')192 card = card.replace('HERWIG6 = parton_shower', 'HERWIGPP = parton_shower')
192 open('%s/Cards/run_card.dat' % self.path, 'w').write(card)193 open('%s/Cards/run_card.dat' % self.path, 'w').write(card)
193 self.cmd_line.exec_cmd('set cluster_temp_path /tmp/')194 self.cmd_line.exec_cmd('set cluster_temp_path /tmp/ --no_save')
194 self.do('generate_events -pf')195 self.do('generate_events -pf')
195 # test the lhe event file exists196 # test the lhe event file exists
196 self.assertTrue(os.path.exists('%s/Events/run_01/events.lhe.gz' % self.path))197 self.assertTrue(os.path.exists('%s/Events/run_01/events.lhe.gz' % self.path))
@@ -215,7 +216,7 @@
215 self.assertTrue( 'HERWIG6 = parton_shower' in card)216 self.assertTrue( 'HERWIG6 = parton_shower' in card)
216 card = card.replace('HERWIG6 = parton_shower', 'PYTHIA8 = parton_shower')217 card = card.replace('HERWIG6 = parton_shower', 'PYTHIA8 = parton_shower')
217 open('%s/Cards/run_card.dat' % self.path, 'w').write(card)218 open('%s/Cards/run_card.dat' % self.path, 'w').write(card)
218 self.cmd_line.exec_cmd('set cluster_temp_path /tmp/')219 self.cmd_line.exec_cmd('set cluster_temp_path /tmp/ --no_save')
219 self.cmd_line.exec_cmd('set pythia8_path None')220 self.cmd_line.exec_cmd('set pythia8_path None')
220 self.do('generate_events -pf')221 self.do('generate_events -pf')
221 # test the lhe event file exists222 # test the lhe event file exists
@@ -242,7 +243,7 @@
242 self.assertTrue( ' -1 = nevt_job' in card)243 self.assertTrue( ' -1 = nevt_job' in card)
243 card = card.replace(' -1 = nevt_job', '500 = nevt_job')244 card = card.replace(' -1 = nevt_job', '500 = nevt_job')
244 open('%s/Cards/run_card.dat' % self.path, 'w').write(card)245 open('%s/Cards/run_card.dat' % self.path, 'w').write(card)
245 self.cmd_line.exec_cmd('set cluster_temp_path /tmp/ --no-save')246 self.cmd_line.exec_cmd('set cluster_temp_path /tmp/ --no_save')
246 self.do('generate_events -pf')247 self.do('generate_events -pf')
247 # test the lhe event file exists248 # test the lhe event file exists
248 self.assertTrue(os.path.exists('%s/Events/run_01/events.lhe.gz' % self.path))249 self.assertTrue(os.path.exists('%s/Events/run_01/events.lhe.gz' % self.path))
@@ -258,7 +259,7 @@
258259
259 nevents =20260 nevents =20
260 text = """261 text = """
261 set crash_on_error True262 set crash_on_error True --no_save
262 generate p p > t t~ [QCD]263 generate p p > t t~ [QCD]
263 output %s264 output %s
264 launch265 launch
@@ -378,7 +379,7 @@
378 def test_madspin_LOonly(self):379 def test_madspin_LOonly(self):
379 380
380 text = """381 text = """
381 set crash_on_error True382 set crash_on_error True --no_save
382 generate p p > w+ [LOonly]383 generate p p > w+ [LOonly]
383 output %s384 output %s
384 launch385 launch
@@ -596,6 +597,9 @@
596 self.assertTrue(os.path.exists('%s/Events/run_01/alllogs_0.html' % self.path))597 self.assertTrue(os.path.exists('%s/Events/run_01/alllogs_0.html' % self.path))
597 self.assertTrue(os.path.exists('%s/Events/run_01/alllogs_1.html' % self.path))598 self.assertTrue(os.path.exists('%s/Events/run_01/alllogs_1.html' % self.path))
598 self.assertTrue(os.path.exists('%s/Events/run_01/alllogs_2.html' % self.path))599 self.assertTrue(os.path.exists('%s/Events/run_01/alllogs_2.html' % self.path))
600
601 check_html_page(self, pjoin(self.path, 'crossx.html'))
602 check_html_page(self, pjoin(self.path, 'HTML', 'run_01', 'results.html'))
599 603
600604
601 def test_calculate_xsect_nlo(self):605 def test_calculate_xsect_nlo(self):
@@ -614,6 +618,9 @@
614 self.assertTrue(os.path.exists('%s/Events/run_01/alllogs_0.html' % self.path))618 self.assertTrue(os.path.exists('%s/Events/run_01/alllogs_0.html' % self.path))
615 self.assertTrue(os.path.exists('%s/Events/run_01/alllogs_1.html' % self.path))619 self.assertTrue(os.path.exists('%s/Events/run_01/alllogs_1.html' % self.path))
616620
621 check_html_page(self, pjoin(self.path, 'crossx.html'))
622 check_html_page(self, pjoin(self.path, 'HTML', 'run_01', 'results.html'))
623
617624
618 def test_calculate_xsect_lo(self):625 def test_calculate_xsect_lo(self):
619 """test the param_card created is correct"""626 """test the param_card created is correct"""
620627
=== modified file 'tests/acceptance_tests/test_cmd_madevent.py'
--- tests/acceptance_tests/test_cmd_madevent.py 2018-04-26 14:24:04 +0000
+++ tests/acceptance_tests/test_cmd_madevent.py 2018-06-15 08:18:50 +0000
@@ -47,6 +47,22 @@
4747
48pjoin = os.path.join48pjoin = os.path.join
4949
50def check_html_page(cls, link):
51 """return True if all link in the html page are existing on disk.
52 otherwise raise an assertion error"""
53
54 text=open(link).read()
55 pattern = re.compile(r'href=[\"\']?(.*?)?[\"\'\s\#]', re.DOTALL)
56
57 cwd = os.path.dirname(link)
58 with misc.chdir(cwd):
59 for path in pattern.findall(text):
60 if not path:
61 continue # means is just a linke starting with #
62 cls.assertTrue(os.path.exists(path), '%s/%s' %(cwd,path))
63 return True
64
65
50#===============================================================================66#===============================================================================
51# TestCmd67# TestCmd
52#===============================================================================68#===============================================================================
@@ -588,6 +604,12 @@
588 text = fsock.read()604 text = fsock.read()
589 self.assertTrue(text.count('dynamical scheme') >= 3)605 self.assertTrue(text.count('dynamical scheme') >= 3)
590 606
607 # check that the html link makes sense
608 #check_html_page(self, pjoin(self.run_dir, 'crossx.html'))
609
610
611
612
591 613
592 def check_pythia_output(self, run_name='run_01', syst=False):614 def check_pythia_output(self, run_name='run_01', syst=False):
593 """ """615 """ """
@@ -825,6 +847,7 @@
825 stdout=stdout,stderr=stdout)847 stdout=stdout,stderr=stdout)
826 848
827 self.check_parton_output(cross=4.541638, error=0.035)849 self.check_parton_output(cross=4.541638, error=0.035)
850
828 self.check_parton_output('run_02', cross=4.41887317, error=0.035)851 self.check_parton_output('run_02', cross=4.41887317, error=0.035)
829 self.check_pythia_output()852 self.check_pythia_output()
830 self.assertEqual(cwd, os.getcwd())853 self.assertEqual(cwd, os.getcwd())
@@ -878,7 +901,11 @@
878 'cross is %s and not %s. NB_SIGMA %s' % (float(data[0]['cross']), cross, float(data[0]['cross'])/new_error)901 'cross is %s and not %s. NB_SIGMA %s' % (float(data[0]['cross']), cross, float(data[0]['cross'])/new_error)
879 )902 )
880 self.assertTrue(float(data[0]['error']) < 3 * error)903 self.assertTrue(float(data[0]['error']) < 3 * error)
881 904
905 check_html_page(self, pjoin(self.run_dir, 'crossx.html'))
906 if 'decayed' not in run_name:
907 check_html_page(self, pjoin(self.run_dir,'HTML', run_name, 'results.html'))
908
882 def check_pythia_output(self, run_name='run_01'):909 def check_pythia_output(self, run_name='run_01'):
883 """ """910 """ """
884 # check that the number of event is fine:911 # check that the number of event is fine:
885912
=== modified file 'tests/acceptance_tests/test_cmd_reweight.py'
--- tests/acceptance_tests/test_cmd_reweight.py 2018-04-24 21:57:16 +0000
+++ tests/acceptance_tests/test_cmd_reweight.py 2018-06-15 08:18:50 +0000
@@ -292,8 +292,8 @@
292 rwgt_data = event.parse_reweight()292 rwgt_data = event.parse_reweight()
293 #solutions.append(rwgt_data['MYNLO_tree'])293 #solutions.append(rwgt_data['MYNLO_tree'])
294 if i < len(solutions):294 if i < len(solutions):
295 self.assertTrue(misc.equal(rwgt_data['MYNLO_tree'], solutions[i]))295 self.assertTrue(misc.equal(rwgt_data['MYNLO_tree'], solutions[i],3), '(event %s) %s != %s ' % (i, rwgt_data['MYNLO_tree'], solutions[i]))
296 self.assertTrue(misc.equal(rwgt_data['MYNLO_tree'], event2.wgt))296 self.assertTrue(misc.equal(rwgt_data['MYNLO_tree'], event2.wgt, 3), '(event %s) %s != %s ' % (i, rwgt_data['MYNLO_tree'], event2.wgt))
297 #misc.sprint(solutions)297 #misc.sprint(solutions)
298 298
299 def test_scan_reweighting(self):299 def test_scan_reweighting(self):
300300
=== added file 'tests/acceptance_tests/test_madspin.py'
--- tests/acceptance_tests/test_madspin.py 1970-01-01 00:00:00 +0000
+++ tests/acceptance_tests/test_madspin.py 2018-06-15 08:18:50 +0000
@@ -0,0 +1,114 @@
1from __future__ import division
2import subprocess
3import unittest
4import os
5import re
6import shutil
7import sys
8import logging
9import time
10import tempfile
11import math
12
13logger = logging.getLogger('test_cmd')
14
15import tests.unit_tests.iolibs.test_file_writers as test_file_writers
16
17import madgraph.interface.master_interface as MGCmd
18import madgraph.interface.madevent_interface as MECmd
19import madgraph.interface.launch_ext_program as launch_ext
20import madgraph.iolibs.files as files
21
22import madgraph.various.misc as misc
23import madgraph.various.lhe_parser as lhe_parser
24import madgraph.various.banner as banner_mod
25import madgraph.various.lhe_parser as lhe_parser
26import madgraph.various.banner as banner
27
28_file_path = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0]
29_pickle_path =os.path.join(_file_path, 'input_files')
30
31from madgraph import MG4DIR, MG5DIR, MadGraph5Error, InvalidCmd
32
33pjoin = os.path.join
34
35#===============================================================================
36# TestCmd
37#===============================================================================
38class TestMadSpin(unittest.TestCase):
39 """test that we can launch everything from a single file"""
40
41 def setUp(self):
42
43 self.debuging = False
44 if self.debuging:
45 self.path = pjoin(MG5DIR, 'MS_TEST')
46 if os.path.exists(self.path):
47 shutil.rmtree(self.path)
48 os.mkdir(self.path)
49 else:
50 self.path = tempfile.mkdtemp(prefix='ms_test_mg5')
51 self.run_dir = pjoin(self.path, 'MGPROC')
52
53
54 def tearDown(self):
55
56 if not self.debuging:
57 shutil.rmtree(self.path)
58 self.assertFalse(self.debuging)
59
60
61 def test_hepmc_decay(self):
62 """ """
63
64 cwd = os.getcwd()
65
66 files.cp(pjoin(MG5DIR, 'tests', 'input_files', 'test.hepmc.gz'), self.path)
67
68
69 fsock = open(pjoin(self.path, 'test_hepmc'),'w')
70 text = """
71 set spinmode none
72 set cross_section {0:1.0}
73 set new_wgt BR
74 set input_format hepmc
75 import ./test.hepmc.gz
76 import model %s/tests/input_files/DM_pion %s/tests/input_files/DM_pion/param_pion.dat
77 decay k0 > xr xr a
78 launch
79 """ % (MG5DIR, MG5DIR)
80
81 fsock.write(text)
82 fsock.close()
83
84 import subprocess
85 if logging.getLogger('madgraph').level <= 20:
86 stdout=None
87 stderr=None
88 else:
89 devnull =open(os.devnull,'w')
90 stdout=devnull
91 stderr=devnull
92
93 subprocess.call([pjoin(MG5DIR, 'MadSpin', 'madspin'),
94 pjoin(self.path, 'test_hepmc')],
95 cwd=pjoin(self.path),
96 stdout=stdout,stderr=stdout)
97 self.assertTrue(os.path.exists(pjoin(self.path, 'test_decayed.lhe.gz')))
98 lhe = lhe_parser.EventFile(pjoin(self.path, 'test_decayed.lhe.gz'))
99 self.assertEqual(10, len(lhe))
100
101 nb_dec = 0
102 nb_photon = 0
103 for event in lhe:
104 self.assertEqual(event.nexternal, len(event))
105 for particle in event:
106 if particle.pdg == 130:
107 self.assertEqual(particle.status,2)
108 nb_dec +=1
109 if particle.pdg ==22:
110 nb_photon += 1
111
112 self.assertEqual(nb_dec, 116)
113 self.assertEqual(nb_photon, 116)
114
0\ No newline at end of file115\ No newline at end of file
1116
=== modified file 'tests/acceptance_tests/test_madweight.py'
--- tests/acceptance_tests/test_madweight.py 2015-10-24 19:53:10 +0000
+++ tests/acceptance_tests/test_madweight.py 2018-06-15 08:18:50 +0000
@@ -152,8 +152,8 @@
152 except Exception, error:152 except Exception, error:
153 pass153 pass
154 154
155 cmd = """set automatic_html_opening False --no-save155 cmd = """set automatic_html_opening False --no_save
156 set cluster_temp_path /tmp --no-save156 set cluster_temp_path /tmp --no_save
157 generate p p > w+, w+ > e+ ve157 generate p p > w+, w+ > e+ ve
158 output madweight TEST_MW_W_prod -f158 output madweight TEST_MW_W_prod -f
159 launch159 launch
@@ -215,8 +215,8 @@
215 except Exception, error:215 except Exception, error:
216 pass216 pass
217 217
218 cmd = """set automatic_html_opening False --no-save218 cmd = """set automatic_html_opening False --no_save
219 set cluster_temp_path /tmp --no-save219 set cluster_temp_path /tmp --no_save
220 generate p p > w+ j j, w+ > e+ ve220 generate p p > w+ j j, w+ > e+ ve
221 output madweight TEST_MW_W2J_prod221 output madweight TEST_MW_W2J_prod
222 launch222 launch
223223
=== modified file 'tests/acceptance_tests/test_model_equivalence.py'
--- tests/acceptance_tests/test_model_equivalence.py 2016-09-06 15:01:18 +0000
+++ tests/acceptance_tests/test_model_equivalence.py 2018-06-15 08:18:50 +0000
@@ -347,6 +347,7 @@
347 solutions = {'ymtau ': [1.7769999504089355], 'I4x33 ': [0.024123685681481218, 0.0], 'MTA ': [1.7769999504089355], 'GC_81 ': [0.0, 67.544], 'GC_5 ': [0.0, 0.094836], 'MZ ': [91.18800354003906], 'GC_27 ': [0.94484, 0.0], 'I1x33 ': [0.024123685681481218, 0.0], 'I3x33 ': [0.9448443987662922, 0.0], 'GC_95 ': [0.66811, 0.0], 'GC_60 ': [-0.37035, 0.0], 'ee__exp__2 ': [0.09483552005165403], 'aEWM1 ': [132.5070037841797], 'ytau ': [0.01020661671581679], 'GC_69 ': [-0.0, -190.38], 'GC_35 ': [-0.0, -0.42671], 'cw__exp__2 ': [0.7777535472599892], 'Gf ': [1.16639e-05], 'GC_59 ': [0.0, 0.08231], 'GC_21 ': [-0.94484, -0.0], 'ee ': [0.307953762847045], 'WZ ': [2.441404104232788], 'sw2 ': [0.22224645274001076], 'WT ': [1.5083359479904175], 'GC_80 ': [-0.0, -33.772], 'GC_57 ': [-0.0, -0.35482], 'sqrt__sw2 ': [0.4714302204356555], 'GC_67 ': [13.239, 0.0], 'GC_76 ': [-29.784, 0.0], 'GC_36 ': [0.0, 0.33188], 'GC_68 ': [-0.0, -63.46], 'GC_56 ': [0.10058, 0.0], 'sw__exp__2 ': [0.22224645274001076], 'GC_3 ': [-0.0, -0.30795], 'GC_54 ': [-0.10058, 0.0], 'WW ': [2.047600030899048], 'GC_70 ': [-26.266, 0.0], 'GC_66 ': [-13.239, 0.0], 'GC_38 ': [-0.0, -0.32662], 'GC_83 ': [-0.0, -0.017058], 'GC_77 ': [-16.545, 0.0], 'gw ': [0.653232969584471], 'MH ': [125.0], 'ymb ': [4.199999809265137], 'complexi ': [0.0, 1.0], 'GC_37 ': [-0.32662, 0.0], 'conjg__CKM1x1 ': [1.0], 'GC_2 ': [0.0, 0.2053], 'GC_51 ': [0.0, 0.28804], 'GC_71 ': [-0.0, -26.266], 'GC_39 ': [0.0, 0.32662], 'GC_82 ': [-0.017058, 0.0], 'GC_55 ': [-0.0, -0.10058], 'GC_78 ': [16.545, 0.0], 'GC_98 ': [-0.0072172, 0.0], 'GC_30 ': [-0.024124, -0.0], 'GC_15 ': [0.024124, 0.0], 'cw ': [0.881903366168873], 'yt ': [0.9448443987662922], 'sqrt__aEW ': [0.08687215260631942], 'vev ': [246.2184581018163], 'GC_79 ': [29.784, 0.0], 'GC_72 ': [0.0, 52.532], 'GC_1 ': [-0.0, -0.10265], 'conjg__CKM3x3 ': [1.0], 'GC_52 ': [-0.0, -0.57609], 'GC_100 ': [0.0, 0.46191], 'GC_65 ': [0.0, 0.27432], 'GC_12 ': [0.0, 1.4828], 'I2x33 ': [0.9448443987662922, 0.0], 'GC_94 ': [-0.0, -0.66811], 'sqrt__aS ': [0.3435112817874484], 'GC_31 ': [-0.0, -0.25774], 'aS ': [0.11800000071525575], 'MW__exp__2 ': [6467.21673128622], 'MZ__exp__4 ': [69143415.65084904], 'yb ': [0.024123685681481218], 'GC_99 ': [-0.0, -0.0072172], 'WH ': [0.006382339168339968], 'GC_96 ': [-0.010207, 0.0], 'MH__exp__2 ': [15625.0], 'GC_63 ': [0.0, 0.12671], 'GC_53 ': [0.0, 0.57609], 'GC_73 ': [26.266, 0.0], 'GC_64 ': [0.0, 0.084653], 'sw ': [0.4714302204356555], 'GC_9 ': [0.053768, 0.0], 'GC_32 ': [-0.0, -0.51548], 'muH ': [88.38834764831844], 'GC_7 ': [-0.053768, 0.0], 'aEW ': [0.0075467708984556505], 'vev__exp__2 ': [60623.52911003587], 'MZ__exp__2 ': [8315.251989618177], 'GC_97 ': [0.010207, 0.0], 'GC_62 ': [0.0, 0.37035], 'GC_74 ': [-24.765, 0.0], 'g1 ': [0.34919218438279087], 'GC_10 ': [-1.2177, 0.0], 'GC_8 ': [0.0, 0.053768], 'CKM3x3 ': [1.0], 'MW ': [80.41900727617956], 'MT ': [172.0], 'GC_33 ': [-0.0, -0.77321], 'GC_6 ': [0.0, 0.18967], 'GC_4 ': [0.0, 0.30795], 'MB ': [4.699999809265137], 'GC_61 ': [0.0, -0.20573], 'ymt ': [164.5], 'GC_75 ': [24.765, 0.0], 'G__exp__2 ': [1.4828317414825511], 'lam ': [0.1288691060169027], 'GC_50 ': [-0.0, -0.28804], 'GC_34 ': [0.0, 0.21336], 'GC_11 ': [0.0, 1.2177], 'sqrt__2 ': [1.4142135623730951], 'GC_58 ': [-0.0, -0.027437]}347 solutions = {'ymtau ': [1.7769999504089355], 'I4x33 ': [0.024123685681481218, 0.0], 'MTA ': [1.7769999504089355], 'GC_81 ': [0.0, 67.544], 'GC_5 ': [0.0, 0.094836], 'MZ ': [91.18800354003906], 'GC_27 ': [0.94484, 0.0], 'I1x33 ': [0.024123685681481218, 0.0], 'I3x33 ': [0.9448443987662922, 0.0], 'GC_95 ': [0.66811, 0.0], 'GC_60 ': [-0.37035, 0.0], 'ee__exp__2 ': [0.09483552005165403], 'aEWM1 ': [132.5070037841797], 'ytau ': [0.01020661671581679], 'GC_69 ': [-0.0, -190.38], 'GC_35 ': [-0.0, -0.42671], 'cw__exp__2 ': [0.7777535472599892], 'Gf ': [1.16639e-05], 'GC_59 ': [0.0, 0.08231], 'GC_21 ': [-0.94484, -0.0], 'ee ': [0.307953762847045], 'WZ ': [2.441404104232788], 'sw2 ': [0.22224645274001076], 'WT ': [1.5083359479904175], 'GC_80 ': [-0.0, -33.772], 'GC_57 ': [-0.0, -0.35482], 'sqrt__sw2 ': [0.4714302204356555], 'GC_67 ': [13.239, 0.0], 'GC_76 ': [-29.784, 0.0], 'GC_36 ': [0.0, 0.33188], 'GC_68 ': [-0.0, -63.46], 'GC_56 ': [0.10058, 0.0], 'sw__exp__2 ': [0.22224645274001076], 'GC_3 ': [-0.0, -0.30795], 'GC_54 ': [-0.10058, 0.0], 'WW ': [2.047600030899048], 'GC_70 ': [-26.266, 0.0], 'GC_66 ': [-13.239, 0.0], 'GC_38 ': [-0.0, -0.32662], 'GC_83 ': [-0.0, -0.017058], 'GC_77 ': [-16.545, 0.0], 'gw ': [0.653232969584471], 'MH ': [125.0], 'ymb ': [4.199999809265137], 'complexi ': [0.0, 1.0], 'GC_37 ': [-0.32662, 0.0], 'conjg__CKM1x1 ': [1.0], 'GC_2 ': [0.0, 0.2053], 'GC_51 ': [0.0, 0.28804], 'GC_71 ': [-0.0, -26.266], 'GC_39 ': [0.0, 0.32662], 'GC_82 ': [-0.017058, 0.0], 'GC_55 ': [-0.0, -0.10058], 'GC_78 ': [16.545, 0.0], 'GC_98 ': [-0.0072172, 0.0], 'GC_30 ': [-0.024124, -0.0], 'GC_15 ': [0.024124, 0.0], 'cw ': [0.881903366168873], 'yt ': [0.9448443987662922], 'sqrt__aEW ': [0.08687215260631942], 'vev ': [246.2184581018163], 'GC_79 ': [29.784, 0.0], 'GC_72 ': [0.0, 52.532], 'GC_1 ': [-0.0, -0.10265], 'conjg__CKM3x3 ': [1.0], 'GC_52 ': [-0.0, -0.57609], 'GC_100 ': [0.0, 0.46191], 'GC_65 ': [0.0, 0.27432], 'GC_12 ': [0.0, 1.4828], 'I2x33 ': [0.9448443987662922, 0.0], 'GC_94 ': [-0.0, -0.66811], 'sqrt__aS ': [0.3435112817874484], 'GC_31 ': [-0.0, -0.25774], 'aS ': [0.11800000071525575], 'MW__exp__2 ': [6467.21673128622], 'MZ__exp__4 ': [69143415.65084904], 'yb ': [0.024123685681481218], 'GC_99 ': [-0.0, -0.0072172], 'WH ': [0.006382339168339968], 'GC_96 ': [-0.010207, 0.0], 'MH__exp__2 ': [15625.0], 'GC_63 ': [0.0, 0.12671], 'GC_53 ': [0.0, 0.57609], 'GC_73 ': [26.266, 0.0], 'GC_64 ': [0.0, 0.084653], 'sw ': [0.4714302204356555], 'GC_9 ': [0.053768, 0.0], 'GC_32 ': [-0.0, -0.51548], 'muH ': [88.38834764831844], 'GC_7 ': [-0.053768, 0.0], 'aEW ': [0.0075467708984556505], 'vev__exp__2 ': [60623.52911003587], 'MZ__exp__2 ': [8315.251989618177], 'GC_97 ': [0.010207, 0.0], 'GC_62 ': [0.0, 0.37035], 'GC_74 ': [-24.765, 0.0], 'g1 ': [0.34919218438279087], 'GC_10 ': [-1.2177, 0.0], 'GC_8 ': [0.0, 0.053768], 'CKM3x3 ': [1.0], 'MW ': [80.41900727617956], 'MT ': [172.0], 'GC_33 ': [-0.0, -0.77321], 'GC_6 ': [0.0, 0.18967], 'GC_4 ': [0.0, 0.30795], 'MB ': [4.699999809265137], 'GC_61 ': [0.0, -0.20573], 'ymt ': [164.5], 'GC_75 ': [24.765, 0.0], 'G__exp__2 ': [1.4828317414825511], 'lam ': [0.1288691060169027], 'GC_50 ': [-0.0, -0.28804], 'GC_34 ': [0.0, 0.21336], 'GC_11 ': [0.0, 1.2177], 'sqrt__2 ': [1.4142135623730951], 'GC_58 ': [-0.0, -0.027437]}
348 #solutions = {'GC_5 ': [0.0, 0.094836], 'mdl_MW ': [80.41900727617956], 'mdl_yb ': [0.024123685681481218], 'mdl_sw__exp__2 ': [0.22224645274001076], 'mdl_conjg__CKM3x3 ': [1.0], 'GC_56 ': [0.10058, 0.0], 'mdl_MH ': [125.0], 'GC_95 ': [0.66811, 0.0], 'mdl_I4x33 ': [0.024123685681481218, 0.0], 'mdl_complexi ': [0.0, 1.0], 'aEWM1 ': [132.5070037841797], 'GC_69 ': [-0.0, -190.38], 'GC_35 ': [-0.0, -0.42671], 'mdl_Gf ': [1.16639e-05], 'mdl_gw ': [0.653232969584471], 'mdl_conjg__CKM1x1 ': [1.0], 'mdl_sqrt__aEW ': [0.08687215260631942], 'GC_59 ': [0.0, 0.08231], 'GC_21 ': [-0.94484, -0.0], 'GC_4 ': [0.0, 0.30795], 'mdl_cw ': [0.881903366168873], 'GC_80 ': [-0.0, -33.772], 'GC_64 ': [0.0, 0.084653], 'GC_57 ': [-0.0, -0.35482], 'GC_76 ': [-29.784, 0.0], 'GC_67 ': [13.239, 0.0], 'mdl_vev__exp__2 ': [60623.52911003587], 'mdl_I3x33 ': [0.9448443987662922, 0.0], 'GC_36 ': [0.0, 0.33188], 'mdl_I1x33 ': [0.024123685681481218, 0.0], 'GC_81 ': [0.0, 67.544], 'mdl_sw2 ': [0.22224645274001076], 'GC_68 ': [-0.0, -63.46], 'mdl_ytau ': [0.01020661671581679], 'GC_100 ': [0.0, 0.46191], 'GC_3 ': [-0.0, -0.30795], 'GC_54 ': [-0.10058, 0.0], 'GC_70 ': [-26.266, 0.0], 'GC_66 ': [-13.239, 0.0], 'GC_38 ': [-0.0, -0.32662], 'GC_83 ': [-0.0, -0.017058], 'GC_77 ': [-16.545, 0.0], 'GC_27 ': [0.94484, 0.0], 'GC_10 ': [-1.2177, 0.0], 'GC_37 ': [-0.32662, 0.0], 'GC_60 ': [-0.37035, 0.0], 'GC_2 ': [0.0, 0.2053], 'mdl_muH ': [88.38834764831844], 'mdl_MT ': [172.0], 'mdl_WH ': [0.006382339168339968], 'GC_51 ': [0.0, 0.28804], 'GC_71 ': [-0.0, -26.266], 'GC_39 ': [0.0, 0.32662], 'GC_82 ': [-0.017058, 0.0], 'mdl_sw ': [0.4714302204356555], 'GC_55 ': [-0.0, -0.10058], 'GC_61 ': [0.0, -0.20573], 'mdl_cw__exp__2 ': [0.7777535472599892], 'mdl_ymt ': [164.5], 'GC_78 ': [16.545, 0.0], 'mdl_CKM3x3 ': [1.0], 'GC_30 ': [-0.024124, -0.0], 'GC_15 ': [0.024124, 0.0], 'mdl_aEW ': [0.0075467708984556505], 'mdl_sqrt__sw2 ': [0.4714302204356555], 'mdl_I2x33 ': [0.9448443987662922, 0.0], 'GC_72 ': [0.0, 52.532], 'GC_1 ': [-0.0, -0.10265], 'GC_52 ': [-0.0, -0.57609], 'GC_65 ': [0.0, 0.27432], 'GC_12 ': [0.0, 1.4828], 'mdl_ymb ': [4.199999809265137], 'mdl_ee ': [0.307953762847045], 'GC_79 ': [29.784, 0.0], 'mdl_sqrt__2 ': [1.4142135623730951], 'GC_31 ': [-0.0, -0.25774], 'aS ': [0.11800000071525575], 'GC_99 ': [-0.0, -0.0072172], 'mdl_vev ': [246.2184581018163], 'GC_96 ': [-0.010207, 0.0], 'GC_63 ': [0.0, 0.12671], 'GC_53 ': [0.0, 0.57609], 'GC_73 ': [26.266, 0.0], 'mdl_MZ__exp__2 ': [8315.251989618177], 'mdl_WZ ': [2.441404104232788], 'GC_9 ': [0.053768, 0.0], 'mdl_g1 ': [0.34919218438279087], 'GC_32 ': [-0.0, -0.51548], 'mdl_G ': [1.2177157884673053], 'mdl_WT ': [1.5083359479904175], 'GC_7 ': [-0.053768, 0.0], 'mdl_G__exp__2 ': [1.4828317414825511], 'GC_97 ': [0.010207, 0.0], 'GC_62 ': [0.0, 0.37035], 'GC_74 ': [-24.765, 0.0], 'mdl_MZ ': [91.18800354003906], 'mdl_MZ__exp__4 ': [69143415.65084904], 'GC_8 ': [0.0, 0.053768], 'mdl_yt ': [0.9448443987662922], 'GC_98 ': [-0.0072172, 0.0], 'mdl_ee__exp__2 ': [0.09483552005165403], 'mdl_MB ': [4.699999809265137], 'GC_33 ': [-0.0, -0.77321], 'mdl_ymtau ': [1.7769999504089355], 'mdl_WW ': [2.047600030899048], 'GC_6 ': [0.0, 0.18967], 'mdl_MTA ': [1.7769999504089355], 'GC_75 ': [24.765, 0.0], 'GC_94 ': [-0.0, -0.66811], 'mdl_MW__exp__2 ': [6467.21673128622], 'mdl_MH__exp__2 ': [15625.0], 'GC_50 ': [-0.0, -0.28804], 'GC_34 ': [0.0, 0.21336], 'GC_11 ': [0.0, 1.2177], 'mdl_sqrt__aS ': [0.3435112817874484], 'GC_58 ': [-0.0, -0.027437], 'mdl_lam ': [0.1288691060169027]}348 #solutions = {'GC_5 ': [0.0, 0.094836], 'mdl_MW ': [80.41900727617956], 'mdl_yb ': [0.024123685681481218], 'mdl_sw__exp__2 ': [0.22224645274001076], 'mdl_conjg__CKM3x3 ': [1.0], 'GC_56 ': [0.10058, 0.0], 'mdl_MH ': [125.0], 'GC_95 ': [0.66811, 0.0], 'mdl_I4x33 ': [0.024123685681481218, 0.0], 'mdl_complexi ': [0.0, 1.0], 'aEWM1 ': [132.5070037841797], 'GC_69 ': [-0.0, -190.38], 'GC_35 ': [-0.0, -0.42671], 'mdl_Gf ': [1.16639e-05], 'mdl_gw ': [0.653232969584471], 'mdl_conjg__CKM1x1 ': [1.0], 'mdl_sqrt__aEW ': [0.08687215260631942], 'GC_59 ': [0.0, 0.08231], 'GC_21 ': [-0.94484, -0.0], 'GC_4 ': [0.0, 0.30795], 'mdl_cw ': [0.881903366168873], 'GC_80 ': [-0.0, -33.772], 'GC_64 ': [0.0, 0.084653], 'GC_57 ': [-0.0, -0.35482], 'GC_76 ': [-29.784, 0.0], 'GC_67 ': [13.239, 0.0], 'mdl_vev__exp__2 ': [60623.52911003587], 'mdl_I3x33 ': [0.9448443987662922, 0.0], 'GC_36 ': [0.0, 0.33188], 'mdl_I1x33 ': [0.024123685681481218, 0.0], 'GC_81 ': [0.0, 67.544], 'mdl_sw2 ': [0.22224645274001076], 'GC_68 ': [-0.0, -63.46], 'mdl_ytau ': [0.01020661671581679], 'GC_100 ': [0.0, 0.46191], 'GC_3 ': [-0.0, -0.30795], 'GC_54 ': [-0.10058, 0.0], 'GC_70 ': [-26.266, 0.0], 'GC_66 ': [-13.239, 0.0], 'GC_38 ': [-0.0, -0.32662], 'GC_83 ': [-0.0, -0.017058], 'GC_77 ': [-16.545, 0.0], 'GC_27 ': [0.94484, 0.0], 'GC_10 ': [-1.2177, 0.0], 'GC_37 ': [-0.32662, 0.0], 'GC_60 ': [-0.37035, 0.0], 'GC_2 ': [0.0, 0.2053], 'mdl_muH ': [88.38834764831844], 'mdl_MT ': [172.0], 'mdl_WH ': [0.006382339168339968], 'GC_51 ': [0.0, 0.28804], 'GC_71 ': [-0.0, -26.266], 'GC_39 ': [0.0, 0.32662], 'GC_82 ': [-0.017058, 0.0], 'mdl_sw ': [0.4714302204356555], 'GC_55 ': [-0.0, -0.10058], 'GC_61 ': [0.0, -0.20573], 'mdl_cw__exp__2 ': [0.7777535472599892], 'mdl_ymt ': [164.5], 'GC_78 ': [16.545, 0.0], 'mdl_CKM3x3 ': [1.0], 'GC_30 ': [-0.024124, -0.0], 'GC_15 ': [0.024124, 0.0], 'mdl_aEW ': [0.0075467708984556505], 'mdl_sqrt__sw2 ': [0.4714302204356555], 'mdl_I2x33 ': [0.9448443987662922, 0.0], 'GC_72 ': [0.0, 52.532], 'GC_1 ': [-0.0, -0.10265], 'GC_52 ': [-0.0, -0.57609], 'GC_65 ': [0.0, 0.27432], 'GC_12 ': [0.0, 1.4828], 'mdl_ymb ': [4.199999809265137], 'mdl_ee ': [0.307953762847045], 'GC_79 ': [29.784, 0.0], 'mdl_sqrt__2 ': [1.4142135623730951], 'GC_31 ': [-0.0, -0.25774], 'aS ': [0.11800000071525575], 'GC_99 ': [-0.0, -0.0072172], 'mdl_vev ': [246.2184581018163], 'GC_96 ': [-0.010207, 0.0], 'GC_63 ': [0.0, 0.12671], 'GC_53 ': [0.0, 0.57609], 'GC_73 ': [26.266, 0.0], 'mdl_MZ__exp__2 ': [8315.251989618177], 'mdl_WZ ': [2.441404104232788], 'GC_9 ': [0.053768, 0.0], 'mdl_g1 ': [0.34919218438279087], 'GC_32 ': [-0.0, -0.51548], 'mdl_G ': [1.2177157884673053], 'mdl_WT ': [1.5083359479904175], 'GC_7 ': [-0.053768, 0.0], 'mdl_G__exp__2 ': [1.4828317414825511], 'GC_97 ': [0.010207, 0.0], 'GC_62 ': [0.0, 0.37035], 'GC_74 ': [-24.765, 0.0], 'mdl_MZ ': [91.18800354003906], 'mdl_MZ__exp__4 ': [69143415.65084904], 'GC_8 ': [0.0, 0.053768], 'mdl_yt ': [0.9448443987662922], 'GC_98 ': [-0.0072172, 0.0], 'mdl_ee__exp__2 ': [0.09483552005165403], 'mdl_MB ': [4.699999809265137], 'GC_33 ': [-0.0, -0.77321], 'mdl_ymtau ': [1.7769999504089355], 'mdl_WW ': [2.047600030899048], 'GC_6 ': [0.0, 0.18967], 'mdl_MTA ': [1.7769999504089355], 'GC_75 ': [24.765, 0.0], 'GC_94 ': [-0.0, -0.66811], 'mdl_MW__exp__2 ': [6467.21673128622], 'mdl_MH__exp__2 ': [15625.0], 'GC_50 ': [-0.0, -0.28804], 'GC_34 ': [0.0, 0.21336], 'GC_11 ': [0.0, 1.2177], 'mdl_sqrt__aS ': [0.3435112817874484], 'GC_58 ': [-0.0, -0.027437], 'mdl_lam ': [0.1288691060169027]}
349 nb_value = 0349 nb_value = 0
350 checked_solutions = solutions.keys()
350 for line in testprog.stdout:351 for line in testprog.stdout:
351 self.assertTrue('Warning' not in line)352 self.assertTrue('Warning' not in line)
352 if '=' not in line:353 if '=' not in line:
@@ -356,6 +357,7 @@
356 if variable.startswith('mdl_'):357 if variable.startswith('mdl_'):
357 variable = variable[4:]358 variable = variable[4:]
358359
360 checked_solutions.remove(variable)
359 if ',' in line:361 if ',' in line:
360 value = eval(split[1])362 value = eval(split[1])
361 else:363 else:
@@ -375,8 +377,9 @@
375 # solutions[variable] = [singlevalue]377 # solutions[variable] = [singlevalue]
376 # else:378 # else:
377 # solutions[variable].append(singlevalue)379 # solutions[variable].append(singlevalue)
378 380 self.assertEqual(nb_value, 116 - len(checked_solutions))
379 self.assertEqual(nb_value, 116)381 self.assertEqual(set(checked_solutions), set(['GC_%s ' % i for i in [27,67,54,38,78,15,79,96,73,9,74,4,50]]))
382
380 383
381 384
382385
383386
=== added directory 'tests/input_files/DM_pion'
=== added file 'tests/input_files/DM_pion/CT_couplings.py'
--- tests/input_files/DM_pion/CT_couplings.py 1970-01-01 00:00:00 +0000
+++ tests/input_files/DM_pion/CT_couplings.py 2018-06-15 08:18:50 +0000
@@ -0,0 +1,1731 @@
1# This file was automatically created by FeynRules 2.3.2
2# Mathematica version: 9.0 for Linux x86 (64-bit) (November 20, 2012)
3# Date: Thu 11 Jun 2015 17:39:54
4
5
6from object_library import all_couplings, Coupling
7
8from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot
9
10
11
12R2GC_138_1 = Coupling(name = 'R2GC_138_1',
13 value = '-(complex(0,1)*G**2)/(16.*cmath.pi**2)',
14 order = {'QCD':2})
15
16R2GC_139_2 = Coupling(name = 'R2GC_139_2',
17 value = '(complex(0,1)*G**2)/(48.*cmath.pi**2)',
18 order = {'QCD':2})
19
20R2GC_140_3 = Coupling(name = 'R2GC_140_3',
21 value = '(ee**2*complex(0,1)*G**2)/(216.*cmath.pi**2)',
22 order = {'QCD':2,'QED':2})
23
24R2GC_140_4 = Coupling(name = 'R2GC_140_4',
25 value = '(ee**2*complex(0,1)*G**2)/(54.*cmath.pi**2)',
26 order = {'QCD':2,'QED':2})
27
28R2GC_141_5 = Coupling(name = 'R2GC_141_5',
29 value = '-(ee*complex(0,1)*G**3)/(144.*cmath.pi**2)',
30 order = {'QCD':3,'QED':1})
31
32R2GC_141_6 = Coupling(name = 'R2GC_141_6',
33 value = '(ee*complex(0,1)*G**3)/(72.*cmath.pi**2)',
34 order = {'QCD':3,'QED':1})
35
36R2GC_142_7 = Coupling(name = 'R2GC_142_7',
37 value = '(complex(0,1)*G**3*gAd33)/(16.*cmath.pi**2)',
38 order = {'DMV':1,'QCD':3})
39
40R2GC_142_8 = Coupling(name = 'R2GC_142_8',
41 value = '(complex(0,1)*G**3*gAu22)/(16.*cmath.pi**2)',
42 order = {'DMV':1,'QCD':3})
43
44R2GC_142_9 = Coupling(name = 'R2GC_142_9',
45 value = '(complex(0,1)*G**3*gAd11)/(16.*cmath.pi**2)',
46 order = {'DMV':1,'QCD':3})
47
48R2GC_142_10 = Coupling(name = 'R2GC_142_10',
49 value = '(complex(0,1)*G**3*gAd22)/(16.*cmath.pi**2)',
50 order = {'DMV':1,'QCD':3})
51
52R2GC_142_11 = Coupling(name = 'R2GC_142_11',
53 value = '(complex(0,1)*G**3*gAu33)/(16.*cmath.pi**2)',
54 order = {'DMV':1,'QCD':3})
55
56R2GC_142_12 = Coupling(name = 'R2GC_142_12',
57 value = '(complex(0,1)*G**3*gAu11)/(16.*cmath.pi**2)',
58 order = {'DMV':1,'QCD':3})
59
60R2GC_143_13 = Coupling(name = 'R2GC_143_13',
61 value = '-(ee*complex(0,1)*G**2*gVd33)/(72.*cmath.pi**2)',
62 order = {'DMV':1,'QCD':2,'QED':1})
63
64R2GC_143_14 = Coupling(name = 'R2GC_143_14',
65 value = '(ee*complex(0,1)*G**2*gVu22)/(36.*cmath.pi**2)',
66 order = {'DMV':1,'QCD':2,'QED':1})
67
68R2GC_143_15 = Coupling(name = 'R2GC_143_15',
69 value = '-(ee*complex(0,1)*G**2*gVd11)/(72.*cmath.pi**2)',
70 order = {'DMV':1,'QCD':2,'QED':1})
71
72R2GC_143_16 = Coupling(name = 'R2GC_143_16',
73 value = '-(ee*complex(0,1)*G**2*gVd22)/(72.*cmath.pi**2)',
74 order = {'DMV':1,'QCD':2,'QED':1})
75
76R2GC_143_17 = Coupling(name = 'R2GC_143_17',
77 value = '(ee*complex(0,1)*G**2*gVu33)/(36.*cmath.pi**2)',
78 order = {'DMV':1,'QCD':2,'QED':1})
79
80R2GC_143_18 = Coupling(name = 'R2GC_143_18',
81 value = '(ee*complex(0,1)*G**2*gVu11)/(36.*cmath.pi**2)',
82 order = {'DMV':1,'QCD':2,'QED':1})
83
84R2GC_144_19 = Coupling(name = 'R2GC_144_19',
85 value = '(complex(0,1)*G**3*gVd33)/(48.*cmath.pi**2)',
86 order = {'DMV':1,'QCD':3})
87
88R2GC_144_20 = Coupling(name = 'R2GC_144_20',
89 value = '(complex(0,1)*G**3*gVu22)/(48.*cmath.pi**2)',
90 order = {'DMV':1,'QCD':3})
91
92R2GC_144_21 = Coupling(name = 'R2GC_144_21',
93 value = '(complex(0,1)*G**3*gVd11)/(48.*cmath.pi**2)',
94 order = {'DMV':1,'QCD':3})
95
96R2GC_144_22 = Coupling(name = 'R2GC_144_22',
97 value = '(complex(0,1)*G**3*gVd22)/(48.*cmath.pi**2)',
98 order = {'DMV':1,'QCD':3})
99
100R2GC_144_23 = Coupling(name = 'R2GC_144_23',
101 value = '(complex(0,1)*G**3*gVu33)/(48.*cmath.pi**2)',
102 order = {'DMV':1,'QCD':3})
103
104R2GC_144_24 = Coupling(name = 'R2GC_144_24',
105 value = '(complex(0,1)*G**3*gVu11)/(48.*cmath.pi**2)',
106 order = {'DMV':1,'QCD':3})
107
108R2GC_145_25 = Coupling(name = 'R2GC_145_25',
109 value = '(complex(0,1)*G**2*gAd33**2)/(24.*cmath.pi**2) + (complex(0,1)*G**2*gVd33**2)/(24.*cmath.pi**2)',
110 order = {'DMV':2,'QCD':2})
111
112R2GC_145_26 = Coupling(name = 'R2GC_145_26',
113 value = '(complex(0,1)*G**2*gAu22**2)/(24.*cmath.pi**2) + (complex(0,1)*G**2*gVu22**2)/(24.*cmath.pi**2)',
114 order = {'DMV':2,'QCD':2})
115
116R2GC_145_27 = Coupling(name = 'R2GC_145_27',
117 value = '(complex(0,1)*G**2*gAd11**2)/(24.*cmath.pi**2) + (complex(0,1)*G**2*gVd11**2)/(24.*cmath.pi**2)',
118 order = {'DMV':2,'QCD':2})
119
120R2GC_145_28 = Coupling(name = 'R2GC_145_28',
121 value = '(complex(0,1)*G**2*gAd22**2)/(24.*cmath.pi**2) + (complex(0,1)*G**2*gVd22**2)/(24.*cmath.pi**2)',
122 order = {'DMV':2,'QCD':2})
123
124R2GC_145_29 = Coupling(name = 'R2GC_145_29',
125 value = '(complex(0,1)*G**2*gAu33**2)/(24.*cmath.pi**2) + (complex(0,1)*G**2*gVu33**2)/(24.*cmath.pi**2)',
126 order = {'DMV':2,'QCD':2})
127
128R2GC_145_30 = Coupling(name = 'R2GC_145_30',
129 value = '(complex(0,1)*G**2*gAu11**2)/(24.*cmath.pi**2) + (complex(0,1)*G**2*gVu11**2)/(24.*cmath.pi**2)',
130 order = {'DMV':2,'QCD':2})
131
132R2GC_146_31 = Coupling(name = 'R2GC_146_31',
133 value = '-(complex(0,1)*G**2*MB**2)/(8.*cmath.pi**2)',
134 order = {'QCD':2})
135
136R2GC_146_32 = Coupling(name = 'R2GC_146_32',
137 value = '-(complex(0,1)*G**2*MC**2)/(8.*cmath.pi**2)',
138 order = {'QCD':2})
139
140R2GC_146_33 = Coupling(name = 'R2GC_146_33',
141 value = '-(complex(0,1)*G**2*MD**2)/(8.*cmath.pi**2)',
142 order = {'QCD':2})
143
144R2GC_146_34 = Coupling(name = 'R2GC_146_34',
145 value = '-(complex(0,1)*G**2*MS**2)/(8.*cmath.pi**2)',
146 order = {'QCD':2})
147
148R2GC_146_35 = Coupling(name = 'R2GC_146_35',
149 value = '-(complex(0,1)*G**2*MT**2)/(8.*cmath.pi**2)',
150 order = {'QCD':2})
151
152R2GC_146_36 = Coupling(name = 'R2GC_146_36',
153 value = '-(complex(0,1)*G**2*MU**2)/(8.*cmath.pi**2)',
154 order = {'QCD':2})
155
156R2GC_147_37 = Coupling(name = 'R2GC_147_37',
157 value = '(cw*ee**2*complex(0,1)*G**2)/(288.*cmath.pi**2*sw) - (ee**2*complex(0,1)*G**2*sw)/(864.*cw*cmath.pi**2)',
158 order = {'QCD':2,'QED':2})
159
160R2GC_147_38 = Coupling(name = 'R2GC_147_38',
161 value = '(cw*ee**2*complex(0,1)*G**2)/(144.*cmath.pi**2*sw) - (5*ee**2*complex(0,1)*G**2*sw)/(432.*cw*cmath.pi**2)',
162 order = {'QCD':2,'QED':2})
163
164R2GC_148_39 = Coupling(name = 'R2GC_148_39',
165 value = '-(cw*ee*complex(0,1)*G**3)/(192.*cmath.pi**2*sw) + (ee*complex(0,1)*G**3*sw)/(576.*cw*cmath.pi**2)',
166 order = {'QCD':3,'QED':1})
167
168R2GC_148_40 = Coupling(name = 'R2GC_148_40',
169 value = '(cw*ee*complex(0,1)*G**3)/(192.*cmath.pi**2*sw) - (5*ee*complex(0,1)*G**3*sw)/(576.*cw*cmath.pi**2)',
170 order = {'QCD':3,'QED':1})
171
172R2GC_149_41 = Coupling(name = 'R2GC_149_41',
173 value = '(-3*cw*ee*complex(0,1)*G**3)/(64.*cmath.pi**2*sw) - (3*ee*complex(0,1)*G**3*sw)/(64.*cw*cmath.pi**2)',
174 order = {'QCD':3,'QED':1})
175
176R2GC_149_42 = Coupling(name = 'R2GC_149_42',
177 value = '(3*cw*ee*complex(0,1)*G**3)/(64.*cmath.pi**2*sw) + (3*ee*complex(0,1)*G**3*sw)/(64.*cw*cmath.pi**2)',
178 order = {'QCD':3,'QED':1})
179
180R2GC_150_43 = Coupling(name = 'R2GC_150_43',
181 value = '(cw*ee*complex(0,1)*G**2*gAd33)/(96.*cmath.pi**2*sw) - (cw*ee*complex(0,1)*G**2*gVd33)/(96.*cmath.pi**2*sw) + (ee*complex(0,1)*G**2*gAd33*sw)/(96.*cw*cmath.pi**2) + (ee*complex(0,1)*G**2*gVd33*sw)/(288.*cw*cmath.pi**2)',
182 order = {'DMV':1,'QCD':2,'QED':1})
183
184R2GC_150_44 = Coupling(name = 'R2GC_150_44',
185 value = '-(cw*ee*complex(0,1)*G**2*gAu22)/(96.*cmath.pi**2*sw) + (cw*ee*complex(0,1)*G**2*gVu22)/(96.*cmath.pi**2*sw) - (ee*complex(0,1)*G**2*gAu22*sw)/(96.*cw*cmath.pi**2) - (5*ee*complex(0,1)*G**2*gVu22*sw)/(288.*cw*cmath.pi**2)',
186 order = {'DMV':1,'QCD':2,'QED':1})
187
188R2GC_150_45 = Coupling(name = 'R2GC_150_45',
189 value = '(cw*ee*complex(0,1)*G**2*gAd11)/(96.*cmath.pi**2*sw) - (cw*ee*complex(0,1)*G**2*gVd11)/(96.*cmath.pi**2*sw) + (ee*complex(0,1)*G**2*gAd11*sw)/(96.*cw*cmath.pi**2) + (ee*complex(0,1)*G**2*gVd11*sw)/(288.*cw*cmath.pi**2)',
190 order = {'DMV':1,'QCD':2,'QED':1})
191
192R2GC_150_46 = Coupling(name = 'R2GC_150_46',
193 value = '(cw*ee*complex(0,1)*G**2*gAd22)/(96.*cmath.pi**2*sw) - (cw*ee*complex(0,1)*G**2*gVd22)/(96.*cmath.pi**2*sw) + (ee*complex(0,1)*G**2*gAd22*sw)/(96.*cw*cmath.pi**2) + (ee*complex(0,1)*G**2*gVd22*sw)/(288.*cw*cmath.pi**2)',
194 order = {'DMV':1,'QCD':2,'QED':1})
195
196R2GC_150_47 = Coupling(name = 'R2GC_150_47',
197 value = '-(cw*ee*complex(0,1)*G**2*gAu33)/(96.*cmath.pi**2*sw) + (cw*ee*complex(0,1)*G**2*gVu33)/(96.*cmath.pi**2*sw) - (ee*complex(0,1)*G**2*gAu33*sw)/(96.*cw*cmath.pi**2) - (5*ee*complex(0,1)*G**2*gVu33*sw)/(288.*cw*cmath.pi**2)',
198 order = {'DMV':1,'QCD':2,'QED':1})
199
200R2GC_150_48 = Coupling(name = 'R2GC_150_48',
201 value = '-(cw*ee*complex(0,1)*G**2*gAu11)/(96.*cmath.pi**2*sw) + (cw*ee*complex(0,1)*G**2*gVu11)/(96.*cmath.pi**2*sw) - (ee*complex(0,1)*G**2*gAu11*sw)/(96.*cw*cmath.pi**2) - (5*ee*complex(0,1)*G**2*gVu11*sw)/(288.*cw*cmath.pi**2)',
202 order = {'DMV':1,'QCD':2,'QED':1})
203
204R2GC_151_49 = Coupling(name = 'R2GC_151_49',
205 value = '(ee**2*complex(0,1)*G**2)/(288.*cmath.pi**2) + (cw**2*ee**2*complex(0,1)*G**2)/(192.*cmath.pi**2*sw**2) + (5*ee**2*complex(0,1)*G**2*sw**2)/(1728.*cw**2*cmath.pi**2)',
206 order = {'QCD':2,'QED':2})
207
208R2GC_151_50 = Coupling(name = 'R2GC_151_50',
209 value = '-(ee**2*complex(0,1)*G**2)/(288.*cmath.pi**2) + (cw**2*ee**2*complex(0,1)*G**2)/(192.*cmath.pi**2*sw**2) + (17*ee**2*complex(0,1)*G**2*sw**2)/(1728.*cw**2*cmath.pi**2)',
210 order = {'QCD':2,'QED':2})
211
212R2GC_152_51 = Coupling(name = 'R2GC_152_51',
213 value = '-(complex(0,1)*G**2*MB*yb)/(8.*cmath.pi**2*cmath.sqrt(2))',
214 order = {'QCD':2,'QED':1})
215
216R2GC_152_52 = Coupling(name = 'R2GC_152_52',
217 value = '-(complex(0,1)*G**2*MC*yc)/(8.*cmath.pi**2*cmath.sqrt(2))',
218 order = {'QCD':2,'QED':1})
219
220R2GC_152_53 = Coupling(name = 'R2GC_152_53',
221 value = '-(complex(0,1)*G**2*MD*ydo)/(8.*cmath.pi**2*cmath.sqrt(2))',
222 order = {'QCD':2,'QED':1})
223
224R2GC_152_54 = Coupling(name = 'R2GC_152_54',
225 value = '-(complex(0,1)*G**2*MS*ys)/(8.*cmath.pi**2*cmath.sqrt(2))',
226 order = {'QCD':2,'QED':1})
227
228R2GC_152_55 = Coupling(name = 'R2GC_152_55',
229 value = '-(complex(0,1)*G**2*MT*yt)/(8.*cmath.pi**2*cmath.sqrt(2))',
230 order = {'QCD':2,'QED':1})
231
232R2GC_152_56 = Coupling(name = 'R2GC_152_56',
233 value = '-(complex(0,1)*G**2*MU*yup)/(8.*cmath.pi**2*cmath.sqrt(2))',
234 order = {'QCD':2,'QED':1})
235
236R2GC_153_57 = Coupling(name = 'R2GC_153_57',
237 value = '(complex(0,1)*G**2*gSd33*MB*yb)/(8.*cmath.pi**2*cmath.sqrt(2))',
238 order = {'DMS':1,'QCD':2,'QED':1})
239
240R2GC_153_58 = Coupling(name = 'R2GC_153_58',
241 value = '(complex(0,1)*G**2*gSu22*MC*yc)/(8.*cmath.pi**2*cmath.sqrt(2))',
242 order = {'DMS':1,'QCD':2,'QED':1})
243
244R2GC_153_59 = Coupling(name = 'R2GC_153_59',
245 value = '(complex(0,1)*G**2*gSd11*MD*ydo)/(8.*cmath.pi**2*cmath.sqrt(2))',
246 order = {'DMS':1,'QCD':2,'QED':1})
247
248R2GC_153_60 = Coupling(name = 'R2GC_153_60',
249 value = '(complex(0,1)*G**2*gSd22*MS*ys)/(8.*cmath.pi**2*cmath.sqrt(2))',
250 order = {'DMS':1,'QCD':2,'QED':1})
251
252R2GC_153_61 = Coupling(name = 'R2GC_153_61',
253 value = '(complex(0,1)*G**2*gSu33*MT*yt)/(8.*cmath.pi**2*cmath.sqrt(2))',
254 order = {'DMS':1,'QCD':2,'QED':1})
255
256R2GC_153_62 = Coupling(name = 'R2GC_153_62',
257 value = '(complex(0,1)*G**2*gSu11*MU*yup)/(8.*cmath.pi**2*cmath.sqrt(2))',
258 order = {'DMS':1,'QCD':2,'QED':1})
259
260R2GC_154_63 = Coupling(name = 'R2GC_154_63',
261 value = '-(complex(0,1)*G**2*yb**2)/(16.*cmath.pi**2)',
262 order = {'QCD':2,'QED':2})
263
264R2GC_154_64 = Coupling(name = 'R2GC_154_64',
265 value = '-(complex(0,1)*G**2*yc**2)/(16.*cmath.pi**2)',
266 order = {'QCD':2,'QED':2})
267
268R2GC_154_65 = Coupling(name = 'R2GC_154_65',
269 value = '-(complex(0,1)*G**2*ydo**2)/(16.*cmath.pi**2)',
270 order = {'QCD':2,'QED':2})
271
272R2GC_154_66 = Coupling(name = 'R2GC_154_66',
273 value = '-(complex(0,1)*G**2*ys**2)/(16.*cmath.pi**2)',
274 order = {'QCD':2,'QED':2})
275
276R2GC_154_67 = Coupling(name = 'R2GC_154_67',
277 value = '-(complex(0,1)*G**2*yt**2)/(16.*cmath.pi**2)',
278 order = {'QCD':2,'QED':2})
279
280R2GC_154_68 = Coupling(name = 'R2GC_154_68',
281 value = '-(complex(0,1)*G**2*yup**2)/(16.*cmath.pi**2)',
282 order = {'QCD':2,'QED':2})
283
284R2GC_155_69 = Coupling(name = 'R2GC_155_69',
285 value = '(complex(0,1)*G**2*gPd33*yb**2)/(16.*cmath.pi**2)',
286 order = {'DMS':1,'QCD':2,'QED':2})
287
288R2GC_155_70 = Coupling(name = 'R2GC_155_70',
289 value = '-(complex(0,1)*G**2*gPu22*yc**2)/(16.*cmath.pi**2)',
290 order = {'DMS':1,'QCD':2,'QED':2})
291
292R2GC_155_71 = Coupling(name = 'R2GC_155_71',
293 value = '(complex(0,1)*G**2*gPd11*ydo**2)/(16.*cmath.pi**2)',
294 order = {'DMS':1,'QCD':2,'QED':2})
295
296R2GC_155_72 = Coupling(name = 'R2GC_155_72',
297 value = '(complex(0,1)*G**2*gPd22*ys**2)/(16.*cmath.pi**2)',
298 order = {'DMS':1,'QCD':2,'QED':2})
299
300R2GC_155_73 = Coupling(name = 'R2GC_155_73',
301 value = '-(complex(0,1)*G**2*gPu33*yt**2)/(16.*cmath.pi**2)',
302 order = {'DMS':1,'QCD':2,'QED':2})
303
304R2GC_155_74 = Coupling(name = 'R2GC_155_74',
305 value = '-(complex(0,1)*G**2*gPu11*yup**2)/(16.*cmath.pi**2)',
306 order = {'DMS':1,'QCD':2,'QED':2})
307
308R2GC_156_75 = Coupling(name = 'R2GC_156_75',
309 value = '(complex(0,1)*G**2*gSd33*yb**2)/(16.*cmath.pi**2)',
310 order = {'DMS':1,'QCD':2,'QED':2})
311
312R2GC_156_76 = Coupling(name = 'R2GC_156_76',
313 value = '(complex(0,1)*G**2*gSu22*yc**2)/(16.*cmath.pi**2)',
314 order = {'DMS':1,'QCD':2,'QED':2})
315
316R2GC_156_77 = Coupling(name = 'R2GC_156_77',
317 value = '(complex(0,1)*G**2*gSd11*ydo**2)/(16.*cmath.pi**2)',
318 order = {'DMS':1,'QCD':2,'QED':2})
319
320R2GC_156_78 = Coupling(name = 'R2GC_156_78',
321 value = '(complex(0,1)*G**2*gSd22*ys**2)/(16.*cmath.pi**2)',
322 order = {'DMS':1,'QCD':2,'QED':2})
323
324R2GC_156_79 = Coupling(name = 'R2GC_156_79',
325 value = '(complex(0,1)*G**2*gSu33*yt**2)/(16.*cmath.pi**2)',
326 order = {'DMS':1,'QCD':2,'QED':2})
327
328R2GC_156_80 = Coupling(name = 'R2GC_156_80',
329 value = '(complex(0,1)*G**2*gSu11*yup**2)/(16.*cmath.pi**2)',
330 order = {'DMS':1,'QCD':2,'QED':2})
331
332R2GC_157_81 = Coupling(name = 'R2GC_157_81',
333 value = '-(complex(0,1)*G**2*gPd33**2*yb**2)/(16.*cmath.pi**2) - (complex(0,1)*G**2*gSd33**2*yb**2)/(16.*cmath.pi**2)',
334 order = {'DMS':2,'QCD':2,'QED':2})
335
336R2GC_157_82 = Coupling(name = 'R2GC_157_82',
337 value = '-(complex(0,1)*G**2*gPu22**2*yc**2)/(16.*cmath.pi**2) - (complex(0,1)*G**2*gSu22**2*yc**2)/(16.*cmath.pi**2)',
338 order = {'DMS':2,'QCD':2,'QED':2})
339
340R2GC_157_83 = Coupling(name = 'R2GC_157_83',
341 value = '-(complex(0,1)*G**2*gPd11**2*ydo**2)/(16.*cmath.pi**2) - (complex(0,1)*G**2*gSd11**2*ydo**2)/(16.*cmath.pi**2)',
342 order = {'DMS':2,'QCD':2,'QED':2})
343
344R2GC_157_84 = Coupling(name = 'R2GC_157_84',
345 value = '-(complex(0,1)*G**2*gPd22**2*ys**2)/(16.*cmath.pi**2) - (complex(0,1)*G**2*gSd22**2*ys**2)/(16.*cmath.pi**2)',
346 order = {'DMS':2,'QCD':2,'QED':2})
347
348R2GC_157_85 = Coupling(name = 'R2GC_157_85',
349 value = '-(complex(0,1)*G**2*gPu33**2*yt**2)/(16.*cmath.pi**2) - (complex(0,1)*G**2*gSu33**2*yt**2)/(16.*cmath.pi**2)',
350 order = {'DMS':2,'QCD':2,'QED':2})
351
352R2GC_157_86 = Coupling(name = 'R2GC_157_86',
353 value = '-(complex(0,1)*G**2*gPu11**2*yup**2)/(16.*cmath.pi**2) - (complex(0,1)*G**2*gSu11**2*yup**2)/(16.*cmath.pi**2)',
354 order = {'DMS':2,'QCD':2,'QED':2})
355
356R2GC_158_87 = Coupling(name = 'R2GC_158_87',
357 value = '(ee**2*complex(0,1)*G**2)/(96.*cmath.pi**2*sw**2)',
358 order = {'QCD':2,'QED':2})
359
360R2GC_158_88 = Coupling(name = 'R2GC_158_88',
361 value = '(CKM2x1*ee**2*complex(0,1)*G**2*complexconjugate(CKM2x1))/(96.*cmath.pi**2*sw**2)',
362 order = {'QCD':2,'QED':2})
363
364R2GC_158_89 = Coupling(name = 'R2GC_158_89',
365 value = '(CKM2x2*ee**2*complex(0,1)*G**2*complexconjugate(CKM2x2))/(96.*cmath.pi**2*sw**2)',
366 order = {'QCD':2,'QED':2})
367
368R2GC_158_90 = Coupling(name = 'R2GC_158_90',
369 value = '(CKM1x1*ee**2*complex(0,1)*G**2*complexconjugate(CKM1x1))/(96.*cmath.pi**2*sw**2)',
370 order = {'QCD':2,'QED':2})
371
372R2GC_158_91 = Coupling(name = 'R2GC_158_91',
373 value = '(CKM1x2*ee**2*complex(0,1)*G**2*complexconjugate(CKM1x2))/(96.*cmath.pi**2*sw**2)',
374 order = {'QCD':2,'QED':2})
375
376R2GC_159_92 = Coupling(name = 'R2GC_159_92',
377 value = '-(complex(0,1)*G**2*yb**2)/(16.*cmath.pi**2) - (complex(0,1)*G**2*yt**2)/(16.*cmath.pi**2)',
378 order = {'QCD':2,'QED':2})
379
380R2GC_159_93 = Coupling(name = 'R2GC_159_93',
381 value = '-(CKM2x1*complex(0,1)*G**2*yc**2*complexconjugate(CKM2x1))/(16.*cmath.pi**2) - (CKM2x1*complex(0,1)*G**2*ydo**2*complexconjugate(CKM2x1))/(16.*cmath.pi**2)',
382 order = {'QCD':2,'QED':2})
383
384R2GC_159_94 = Coupling(name = 'R2GC_159_94',
385 value = '-(CKM2x2*complex(0,1)*G**2*yc**2*complexconjugate(CKM2x2))/(16.*cmath.pi**2) - (CKM2x2*complex(0,1)*G**2*ys**2*complexconjugate(CKM2x2))/(16.*cmath.pi**2)',
386 order = {'QCD':2,'QED':2})
387
388R2GC_159_95 = Coupling(name = 'R2GC_159_95',
389 value = '-(CKM1x1*complex(0,1)*G**2*ydo**2*complexconjugate(CKM1x1))/(16.*cmath.pi**2) - (CKM1x1*complex(0,1)*G**2*yup**2*complexconjugate(CKM1x1))/(16.*cmath.pi**2)',
390 order = {'QCD':2,'QED':2})
391
392R2GC_159_96 = Coupling(name = 'R2GC_159_96',
393 value = '-(CKM1x2*complex(0,1)*G**2*ys**2*complexconjugate(CKM1x2))/(16.*cmath.pi**2) - (CKM1x2*complex(0,1)*G**2*yup**2*complexconjugate(CKM1x2))/(16.*cmath.pi**2)',
394 order = {'QCD':2,'QED':2})
395
396R2GC_163_97 = Coupling(name = 'R2GC_163_97',
397 value = '-G**4/(192.*cmath.pi**2)',
398 order = {'QCD':4})
399
400R2GC_163_98 = Coupling(name = 'R2GC_163_98',
401 value = 'G**4/(64.*cmath.pi**2)',
402 order = {'QCD':4})
403
404R2GC_164_99 = Coupling(name = 'R2GC_164_99',
405 value = '-(complex(0,1)*G**4)/(192.*cmath.pi**2)',
406 order = {'QCD':4})
407
408R2GC_164_100 = Coupling(name = 'R2GC_164_100',
409 value = '(complex(0,1)*G**4)/(64.*cmath.pi**2)',
410 order = {'QCD':4})
411
412R2GC_165_101 = Coupling(name = 'R2GC_165_101',
413 value = '(complex(0,1)*G**4)/(192.*cmath.pi**2)',
414 order = {'QCD':4})
415
416R2GC_165_102 = Coupling(name = 'R2GC_165_102',
417 value = '-(complex(0,1)*G**4)/(64.*cmath.pi**2)',
418 order = {'QCD':4})
419
420R2GC_166_103 = Coupling(name = 'R2GC_166_103',
421 value = '-(complex(0,1)*G**4)/(48.*cmath.pi**2)',
422 order = {'QCD':4})
423
424R2GC_167_104 = Coupling(name = 'R2GC_167_104',
425 value = '(complex(0,1)*G**4)/(288.*cmath.pi**2)',
426 order = {'QCD':4})
427
428R2GC_167_105 = Coupling(name = 'R2GC_167_105',
429 value = '-(complex(0,1)*G**4)/(32.*cmath.pi**2)',
430 order = {'QCD':4})
431
432R2GC_168_106 = Coupling(name = 'R2GC_168_106',
433 value = '-(complex(0,1)*G**4)/(16.*cmath.pi**2)',
434 order = {'QCD':4})
435
436R2GC_168_107 = Coupling(name = 'R2GC_168_107',
437 value = '(complex(0,1)*G**4)/(4.*cmath.pi**2)',
438 order = {'QCD':4})
439
440R2GC_169_108 = Coupling(name = 'R2GC_169_108',
441 value = '(-3*complex(0,1)*G**4)/(64.*cmath.pi**2)',
442 order = {'QCD':4})
443
444R2GC_169_109 = Coupling(name = 'R2GC_169_109',
445 value = '(-23*complex(0,1)*G**4)/(64.*cmath.pi**2)',
446 order = {'QCD':4})
447
448R2GC_170_110 = Coupling(name = 'R2GC_170_110',
449 value = '(ee*complex(0,1)*G**2)/(18.*cmath.pi**2)',
450 order = {'QCD':2,'QED':1})
451
452R2GC_171_111 = Coupling(name = 'R2GC_171_111',
453 value = '-(complex(0,1)*G**3)/(6.*cmath.pi**2)',
454 order = {'QCD':3})
455
456R2GC_172_112 = Coupling(name = 'R2GC_172_112',
457 value = '-(ee*complex(0,1)*G**2)/(9.*cmath.pi**2)',
458 order = {'QCD':2,'QED':1})
459
460R2GC_182_113 = Coupling(name = 'R2GC_182_113',
461 value = '(complex(0,1)*G**2)/(12.*cmath.pi**2)',
462 order = {'QCD':2})
463
464R2GC_185_114 = Coupling(name = 'R2GC_185_114',
465 value = '(complex(0,1)*G**2*gAd33)/(6.*cmath.pi**2)',
466 order = {'DMV':1,'QCD':2})
467
468R2GC_186_115 = Coupling(name = 'R2GC_186_115',
469 value = '-(complex(0,1)*G**2*gVd33)/(6.*cmath.pi**2)',
470 order = {'DMV':1,'QCD':2})
471
472R2GC_187_116 = Coupling(name = 'R2GC_187_116',
473 value = '(complex(0,1)*G**2*MB)/(6.*cmath.pi**2)',
474 order = {'QCD':2})
475
476R2GC_188_117 = Coupling(name = 'R2GC_188_117',
477 value = '(cw*ee*complex(0,1)*G**2)/(12.*cmath.pi**2*sw)',
478 order = {'QCD':2,'QED':1})
479
480R2GC_189_118 = Coupling(name = 'R2GC_189_118',
481 value = '(ee*complex(0,1)*G**2*sw)/(36.*cw*cmath.pi**2)',
482 order = {'QCD':2,'QED':1})
483
484R2GC_190_119 = Coupling(name = 'R2GC_190_119',
485 value = '(complex(0,1)*G**2*yb)/(3.*cmath.pi**2*cmath.sqrt(2))',
486 order = {'QCD':2,'QED':1})
487
488R2GC_191_120 = Coupling(name = 'R2GC_191_120',
489 value = '-(G**2*yb)/(3.*cmath.pi**2*cmath.sqrt(2))',
490 order = {'QCD':2,'QED':1})
491
492R2GC_192_121 = Coupling(name = 'R2GC_192_121',
493 value = '-(G**2*gPd33*yb)/(3.*cmath.pi**2*cmath.sqrt(2))',
494 order = {'DMS':1,'QCD':2,'QED':1})
495
496R2GC_193_122 = Coupling(name = 'R2GC_193_122',
497 value = '-(complex(0,1)*G**2*gSd33*yb)/(3.*cmath.pi**2*cmath.sqrt(2))',
498 order = {'DMS':1,'QCD':2,'QED':1})
499
500R2GC_197_123 = Coupling(name = 'R2GC_197_123',
501 value = '(complex(0,1)*G**2*gAu22)/(6.*cmath.pi**2)',
502 order = {'DMV':1,'QCD':2})
503
504R2GC_198_124 = Coupling(name = 'R2GC_198_124',
505 value = '-(complex(0,1)*G**2*gVu22)/(6.*cmath.pi**2)',
506 order = {'DMV':1,'QCD':2})
507
508R2GC_199_125 = Coupling(name = 'R2GC_199_125',
509 value = '(complex(0,1)*G**2*MC)/(6.*cmath.pi**2)',
510 order = {'QCD':2})
511
512R2GC_200_126 = Coupling(name = 'R2GC_200_126',
513 value = '-(cw*ee*complex(0,1)*G**2)/(12.*cmath.pi**2*sw)',
514 order = {'QCD':2,'QED':1})
515
516R2GC_202_127 = Coupling(name = 'R2GC_202_127',
517 value = '(G**2*yc)/(3.*cmath.pi**2*cmath.sqrt(2))',
518 order = {'QCD':2,'QED':1})
519
520R2GC_203_128 = Coupling(name = 'R2GC_203_128',
521 value = '(complex(0,1)*G**2*yc)/(3.*cmath.pi**2*cmath.sqrt(2))',
522 order = {'QCD':2,'QED':1})
523
524R2GC_204_129 = Coupling(name = 'R2GC_204_129',
525 value = '-(G**2*gPu22*yc)/(3.*cmath.pi**2*cmath.sqrt(2))',
526 order = {'DMS':1,'QCD':2,'QED':1})
527
528R2GC_205_130 = Coupling(name = 'R2GC_205_130',
529 value = '-(complex(0,1)*G**2*gSu22*yc)/(3.*cmath.pi**2*cmath.sqrt(2))',
530 order = {'DMS':1,'QCD':2,'QED':1})
531
532R2GC_209_131 = Coupling(name = 'R2GC_209_131',
533 value = '(complex(0,1)*G**2*gAd11)/(6.*cmath.pi**2)',
534 order = {'DMV':1,'QCD':2})
535
536R2GC_210_132 = Coupling(name = 'R2GC_210_132',
537 value = '-(complex(0,1)*G**2*gVd11)/(6.*cmath.pi**2)',
538 order = {'DMV':1,'QCD':2})
539
540R2GC_211_133 = Coupling(name = 'R2GC_211_133',
541 value = '(complex(0,1)*G**2*MD)/(6.*cmath.pi**2)',
542 order = {'QCD':2})
543
544R2GC_212_134 = Coupling(name = 'R2GC_212_134',
545 value = '-(CKM2x1*ee*complex(0,1)*G**2)/(6.*cmath.pi**2*sw*cmath.sqrt(2))',
546 order = {'QCD':2,'QED':1})
547
548R2GC_215_135 = Coupling(name = 'R2GC_215_135',
549 value = '-(CKM2x1*G**2*yc)/(3.*cmath.pi**2)',
550 order = {'QCD':2,'QED':1})
551
552R2GC_216_136 = Coupling(name = 'R2GC_216_136',
553 value = '(complex(0,1)*G**2*ydo)/(3.*cmath.pi**2*cmath.sqrt(2))',
554 order = {'QCD':2,'QED':1})
555
556R2GC_217_137 = Coupling(name = 'R2GC_217_137',
557 value = '-(G**2*ydo)/(3.*cmath.pi**2*cmath.sqrt(2))',
558 order = {'QCD':2,'QED':1})
559
560R2GC_218_138 = Coupling(name = 'R2GC_218_138',
561 value = '(CKM2x1*G**2*ydo)/(3.*cmath.pi**2)',
562 order = {'QCD':2,'QED':1})
563
564R2GC_219_139 = Coupling(name = 'R2GC_219_139',
565 value = '-(G**2*gPd11*ydo)/(3.*cmath.pi**2*cmath.sqrt(2))',
566 order = {'DMS':1,'QCD':2,'QED':1})
567
568R2GC_220_140 = Coupling(name = 'R2GC_220_140',
569 value = '-(complex(0,1)*G**2*gSd11*ydo)/(3.*cmath.pi**2*cmath.sqrt(2))',
570 order = {'DMS':1,'QCD':2,'QED':1})
571
572R2GC_221_141 = Coupling(name = 'R2GC_221_141',
573 value = '-(ee*complex(0,1)*G**2*complexconjugate(CKM2x1))/(6.*cmath.pi**2*sw*cmath.sqrt(2))',
574 order = {'QCD':2,'QED':1})
575
576R2GC_222_142 = Coupling(name = 'R2GC_222_142',
577 value = '(G**2*yc*complexconjugate(CKM2x1))/(3.*cmath.pi**2)',
578 order = {'QCD':2,'QED':1})
579
580R2GC_223_143 = Coupling(name = 'R2GC_223_143',
581 value = '-(G**2*ydo*complexconjugate(CKM2x1))/(3.*cmath.pi**2)',
582 order = {'QCD':2,'QED':1})
583
584R2GC_227_144 = Coupling(name = 'R2GC_227_144',
585 value = '(complex(0,1)*G**2*gAd22)/(6.*cmath.pi**2)',
586 order = {'DMV':1,'QCD':2})
587
588R2GC_228_145 = Coupling(name = 'R2GC_228_145',
589 value = '-(complex(0,1)*G**2*gVd22)/(6.*cmath.pi**2)',
590 order = {'DMV':1,'QCD':2})
591
592R2GC_229_146 = Coupling(name = 'R2GC_229_146',
593 value = '(complex(0,1)*G**2*MS)/(6.*cmath.pi**2)',
594 order = {'QCD':2})
595
596R2GC_230_147 = Coupling(name = 'R2GC_230_147',
597 value = '-(CKM2x2*ee*complex(0,1)*G**2)/(6.*cmath.pi**2*sw*cmath.sqrt(2))',
598 order = {'QCD':2,'QED':1})
599
600R2GC_233_148 = Coupling(name = 'R2GC_233_148',
601 value = '-(CKM2x2*G**2*yc)/(3.*cmath.pi**2)',
602 order = {'QCD':2,'QED':1})
603
604R2GC_234_149 = Coupling(name = 'R2GC_234_149',
605 value = '(complex(0,1)*G**2*ys)/(3.*cmath.pi**2*cmath.sqrt(2))',
606 order = {'QCD':2,'QED':1})
607
608R2GC_235_150 = Coupling(name = 'R2GC_235_150',
609 value = '-(G**2*ys)/(3.*cmath.pi**2*cmath.sqrt(2))',
610 order = {'QCD':2,'QED':1})
611
612R2GC_236_151 = Coupling(name = 'R2GC_236_151',
613 value = '(CKM2x2*G**2*ys)/(3.*cmath.pi**2)',
614 order = {'QCD':2,'QED':1})
615
616R2GC_237_152 = Coupling(name = 'R2GC_237_152',
617 value = '-(G**2*gPd22*ys)/(3.*cmath.pi**2*cmath.sqrt(2))',
618 order = {'DMS':1,'QCD':2,'QED':1})
619
620R2GC_238_153 = Coupling(name = 'R2GC_238_153',
621 value = '-(complex(0,1)*G**2*gSd22*ys)/(3.*cmath.pi**2*cmath.sqrt(2))',
622 order = {'DMS':1,'QCD':2,'QED':1})
623
624R2GC_239_154 = Coupling(name = 'R2GC_239_154',
625 value = '-(ee*complex(0,1)*G**2*complexconjugate(CKM2x2))/(6.*cmath.pi**2*sw*cmath.sqrt(2))',
626 order = {'QCD':2,'QED':1})
627
628R2GC_240_155 = Coupling(name = 'R2GC_240_155',
629 value = '(G**2*yc*complexconjugate(CKM2x2))/(3.*cmath.pi**2)',
630 order = {'QCD':2,'QED':1})
631
632R2GC_241_156 = Coupling(name = 'R2GC_241_156',
633 value = '-(G**2*ys*complexconjugate(CKM2x2))/(3.*cmath.pi**2)',
634 order = {'QCD':2,'QED':1})
635
636R2GC_245_157 = Coupling(name = 'R2GC_245_157',
637 value = '(complex(0,1)*G**2*gAu33)/(6.*cmath.pi**2)',
638 order = {'DMV':1,'QCD':2})
639
640R2GC_246_158 = Coupling(name = 'R2GC_246_158',
641 value = '-(complex(0,1)*G**2*gVu33)/(6.*cmath.pi**2)',
642 order = {'DMV':1,'QCD':2})
643
644R2GC_247_159 = Coupling(name = 'R2GC_247_159',
645 value = '(complex(0,1)*G**2*MT)/(6.*cmath.pi**2)',
646 order = {'QCD':2})
647
648R2GC_248_160 = Coupling(name = 'R2GC_248_160',
649 value = '-(ee*complex(0,1)*G**2)/(6.*cmath.pi**2*sw*cmath.sqrt(2))',
650 order = {'QCD':2,'QED':1})
651
652R2GC_251_161 = Coupling(name = 'R2GC_251_161',
653 value = '(G**2*yb)/(3.*cmath.pi**2)',
654 order = {'QCD':2,'QED':1})
655
656R2GC_252_162 = Coupling(name = 'R2GC_252_162',
657 value = '-(G**2*yb)/(3.*cmath.pi**2)',
658 order = {'QCD':2,'QED':1})
659
660R2GC_253_163 = Coupling(name = 'R2GC_253_163',
661 value = '(G**2*yt)/(3.*cmath.pi**2)',
662 order = {'QCD':2,'QED':1})
663
664R2GC_254_164 = Coupling(name = 'R2GC_254_164',
665 value = '-(G**2*yt)/(3.*cmath.pi**2)',
666 order = {'QCD':2,'QED':1})
667
668R2GC_255_165 = Coupling(name = 'R2GC_255_165',
669 value = '(G**2*yt)/(3.*cmath.pi**2*cmath.sqrt(2))',
670 order = {'QCD':2,'QED':1})
671
672R2GC_256_166 = Coupling(name = 'R2GC_256_166',
673 value = '(complex(0,1)*G**2*yt)/(3.*cmath.pi**2*cmath.sqrt(2))',
674 order = {'QCD':2,'QED':1})
675
676R2GC_257_167 = Coupling(name = 'R2GC_257_167',
677 value = '-(G**2*gPu33*yt)/(3.*cmath.pi**2*cmath.sqrt(2))',
678 order = {'DMS':1,'QCD':2,'QED':1})
679
680R2GC_258_168 = Coupling(name = 'R2GC_258_168',
681 value = '-(complex(0,1)*G**2*gSu33*yt)/(3.*cmath.pi**2*cmath.sqrt(2))',
682 order = {'DMS':1,'QCD':2,'QED':1})
683
684R2GC_260_169 = Coupling(name = 'R2GC_260_169',
685 value = 'G**3/(24.*cmath.pi**2)',
686 order = {'QCD':3})
687
688R2GC_260_170 = Coupling(name = 'R2GC_260_170',
689 value = '(11*G**3)/(64.*cmath.pi**2)',
690 order = {'QCD':3})
691
692R2GC_261_171 = Coupling(name = 'R2GC_261_171',
693 value = '(31*complex(0,1)*G**4)/(64.*cmath.pi**2)',
694 order = {'QCD':4})
695
696R2GC_262_172 = Coupling(name = 'R2GC_262_172',
697 value = '(5*complex(0,1)*G**4)/(48.*cmath.pi**2)',
698 order = {'QCD':4})
699
700R2GC_262_173 = Coupling(name = 'R2GC_262_173',
701 value = '(19*complex(0,1)*G**4)/(32.*cmath.pi**2)',
702 order = {'QCD':4})
703
704R2GC_263_174 = Coupling(name = 'R2GC_263_174',
705 value = '(23*complex(0,1)*G**4)/(192.*cmath.pi**2)',
706 order = {'QCD':4})
707
708R2GC_264_175 = Coupling(name = 'R2GC_264_175',
709 value = '(7*complex(0,1)*G**4)/(64.*cmath.pi**2)',
710 order = {'QCD':4})
711
712R2GC_265_176 = Coupling(name = 'R2GC_265_176',
713 value = '(-17*complex(0,1)*G**4)/(64.*cmath.pi**2)',
714 order = {'QCD':4})
715
716R2GC_266_177 = Coupling(name = 'R2GC_266_177',
717 value = '(-7*complex(0,1)*G**4)/(32.*cmath.pi**2)',
718 order = {'QCD':4})
719
720R2GC_270_178 = Coupling(name = 'R2GC_270_178',
721 value = '(complex(0,1)*G**2*gAu11)/(6.*cmath.pi**2)',
722 order = {'DMV':1,'QCD':2})
723
724R2GC_271_179 = Coupling(name = 'R2GC_271_179',
725 value = '-(complex(0,1)*G**2*gVu11)/(6.*cmath.pi**2)',
726 order = {'DMV':1,'QCD':2})
727
728R2GC_272_180 = Coupling(name = 'R2GC_272_180',
729 value = '(complex(0,1)*G**2*MU)/(6.*cmath.pi**2)',
730 order = {'QCD':2})
731
732R2GC_273_181 = Coupling(name = 'R2GC_273_181',
733 value = '-(CKM1x1*ee*complex(0,1)*G**2)/(6.*cmath.pi**2*sw*cmath.sqrt(2))',
734 order = {'QCD':2,'QED':1})
735
736R2GC_274_182 = Coupling(name = 'R2GC_274_182',
737 value = '-(CKM1x2*ee*complex(0,1)*G**2)/(6.*cmath.pi**2*sw*cmath.sqrt(2))',
738 order = {'QCD':2,'QED':1})
739
740R2GC_277_183 = Coupling(name = 'R2GC_277_183',
741 value = '(CKM1x1*G**2*ydo)/(3.*cmath.pi**2)',
742 order = {'QCD':2,'QED':1})
743
744R2GC_278_184 = Coupling(name = 'R2GC_278_184',
745 value = '(CKM1x2*G**2*ys)/(3.*cmath.pi**2)',
746 order = {'QCD':2,'QED':1})
747
748R2GC_279_185 = Coupling(name = 'R2GC_279_185',
749 value = '(G**2*yup)/(3.*cmath.pi**2*cmath.sqrt(2))',
750 order = {'QCD':2,'QED':1})
751
752R2GC_280_186 = Coupling(name = 'R2GC_280_186',
753 value = '(complex(0,1)*G**2*yup)/(3.*cmath.pi**2*cmath.sqrt(2))',
754 order = {'QCD':2,'QED':1})
755
756R2GC_281_187 = Coupling(name = 'R2GC_281_187',
757 value = '-(CKM1x1*G**2*yup)/(3.*cmath.pi**2)',
758 order = {'QCD':2,'QED':1})
759
760R2GC_282_188 = Coupling(name = 'R2GC_282_188',
761 value = '-(CKM1x2*G**2*yup)/(3.*cmath.pi**2)',
762 order = {'QCD':2,'QED':1})
763
764R2GC_283_189 = Coupling(name = 'R2GC_283_189',
765 value = '-(G**2*gPu11*yup)/(3.*cmath.pi**2*cmath.sqrt(2))',
766 order = {'DMS':1,'QCD':2,'QED':1})
767
768R2GC_284_190 = Coupling(name = 'R2GC_284_190',
769 value = '-(complex(0,1)*G**2*gSu11*yup)/(3.*cmath.pi**2*cmath.sqrt(2))',
770 order = {'DMS':1,'QCD':2,'QED':1})
771
772R2GC_285_191 = Coupling(name = 'R2GC_285_191',
773 value = '-(ee*complex(0,1)*G**2*complexconjugate(CKM1x1))/(6.*cmath.pi**2*sw*cmath.sqrt(2))',
774 order = {'QCD':2,'QED':1})
775
776R2GC_286_192 = Coupling(name = 'R2GC_286_192',
777 value = '-(G**2*ydo*complexconjugate(CKM1x1))/(3.*cmath.pi**2)',
778 order = {'QCD':2,'QED':1})
779
780R2GC_287_193 = Coupling(name = 'R2GC_287_193',
781 value = '(G**2*yup*complexconjugate(CKM1x1))/(3.*cmath.pi**2)',
782 order = {'QCD':2,'QED':1})
783
784R2GC_288_194 = Coupling(name = 'R2GC_288_194',
785 value = '-(ee*complex(0,1)*G**2*complexconjugate(CKM1x2))/(6.*cmath.pi**2*sw*cmath.sqrt(2))',
786 order = {'QCD':2,'QED':1})
787
788R2GC_289_195 = Coupling(name = 'R2GC_289_195',
789 value = '-(G**2*ys*complexconjugate(CKM1x2))/(3.*cmath.pi**2)',
790 order = {'QCD':2,'QED':1})
791
792R2GC_290_196 = Coupling(name = 'R2GC_290_196',
793 value = '(G**2*yup*complexconjugate(CKM1x2))/(3.*cmath.pi**2)',
794 order = {'QCD':2,'QED':1})
795
796UVGC_160_1 = Coupling(name = 'UVGC_160_1',
797 value = {-1:'(51*G**3)/(128.*cmath.pi**2)'},
798 order = {'QCD':3})
799
800UVGC_161_2 = Coupling(name = 'UVGC_161_2',
801 value = {-1:'G**3/(128.*cmath.pi**2)'},
802 order = {'QCD':3})
803
804UVGC_162_3 = Coupling(name = 'UVGC_162_3',
805 value = {-1:'(3*complex(0,1)*G**2)/(64.*cmath.pi**2)'},
806 order = {'QCD':2})
807
808UVGC_162_4 = Coupling(name = 'UVGC_162_4',
809 value = {-1:'(-3*complex(0,1)*G**2)/(64.*cmath.pi**2)'},
810 order = {'QCD':2})
811
812UVGC_163_5 = Coupling(name = 'UVGC_163_5',
813 value = {-1:'(3*G**4)/(512.*cmath.pi**2)'},
814 order = {'QCD':4})
815
816UVGC_163_6 = Coupling(name = 'UVGC_163_6',
817 value = {-1:'(-3*G**4)/(512.*cmath.pi**2)'},
818 order = {'QCD':4})
819
820UVGC_164_7 = Coupling(name = 'UVGC_164_7',
821 value = {-1:'(3*complex(0,1)*G**4)/(512.*cmath.pi**2)'},
822 order = {'QCD':4})
823
824UVGC_164_8 = Coupling(name = 'UVGC_164_8',
825 value = {-1:'(-3*complex(0,1)*G**4)/(512.*cmath.pi**2)'},
826 order = {'QCD':4})
827
828UVGC_166_9 = Coupling(name = 'UVGC_166_9',
829 value = {-1:'-(complex(0,1)*G**4)/(128.*cmath.pi**2)'},
830 order = {'QCD':4})
831
832UVGC_166_10 = Coupling(name = 'UVGC_166_10',
833 value = {-1:'(complex(0,1)*G**4)/(128.*cmath.pi**2)'},
834 order = {'QCD':4})
835
836UVGC_167_11 = Coupling(name = 'UVGC_167_11',
837 value = {-1:'(-3*complex(0,1)*G**4)/(256.*cmath.pi**2)'},
838 order = {'QCD':4})
839
840UVGC_167_12 = Coupling(name = 'UVGC_167_12',
841 value = {-1:'(3*complex(0,1)*G**4)/(256.*cmath.pi**2)'},
842 order = {'QCD':4})
843
844UVGC_168_13 = Coupling(name = 'UVGC_168_13',
845 value = {-1:'-(complex(0,1)*G**4)/(24.*cmath.pi**2)'},
846 order = {'QCD':4})
847
848UVGC_168_14 = Coupling(name = 'UVGC_168_14',
849 value = {-1:'(47*complex(0,1)*G**4)/(128.*cmath.pi**2)'},
850 order = {'QCD':4})
851
852UVGC_169_15 = Coupling(name = 'UVGC_169_15',
853 value = {-1:'(-253*complex(0,1)*G**4)/(512.*cmath.pi**2)'},
854 order = {'QCD':4})
855
856UVGC_169_16 = Coupling(name = 'UVGC_169_16',
857 value = {-1:'(5*complex(0,1)*G**4)/(512.*cmath.pi**2)'},
858 order = {'QCD':4})
859
860UVGC_170_17 = Coupling(name = 'UVGC_170_17',
861 value = {-1:'(ee*complex(0,1)*G**2)/(36.*cmath.pi**2)'},
862 order = {'QCD':2,'QED':1})
863
864UVGC_171_18 = Coupling(name = 'UVGC_171_18',
865 value = {-1:'(-13*complex(0,1)*G**3)/(48.*cmath.pi**2)'},
866 order = {'QCD':3})
867
868UVGC_172_19 = Coupling(name = 'UVGC_172_19',
869 value = {-1:'-(ee*complex(0,1)*G**2)/(18.*cmath.pi**2)'},
870 order = {'QCD':2,'QED':1})
871
872UVGC_182_20 = Coupling(name = 'UVGC_182_20',
873 value = {-1:'( (complex(0,1)*G**2)/(6.*cmath.pi**2) if MB else -(complex(0,1)*G**2)/(12.*cmath.pi**2) ) + (complex(0,1)*G**2)/(12.*cmath.pi**2)',0:'( (5*complex(0,1)*G**2)/(12.*cmath.pi**2) - (complex(0,1)*G**2*reglog(MB/MU_R))/(2.*cmath.pi**2) if MB else (complex(0,1)*G**2)/(12.*cmath.pi**2) ) - (complex(0,1)*G**2)/(12.*cmath.pi**2)'},
874 order = {'QCD':2})
875
876UVGC_183_21 = Coupling(name = 'UVGC_183_21',
877 value = {-1:'( (ee*complex(0,1)*G**2)/(18.*cmath.pi**2) if MB else -(ee*complex(0,1)*G**2)/(36.*cmath.pi**2) )',0:'( (5*ee*complex(0,1)*G**2)/(36.*cmath.pi**2) - (ee*complex(0,1)*G**2*reglog(MB/MU_R))/(6.*cmath.pi**2) if MB else (ee*complex(0,1)*G**2)/(36.*cmath.pi**2) ) - (ee*complex(0,1)*G**2)/(36.*cmath.pi**2)'},
878 order = {'QCD':2,'QED':1})
879
880UVGC_184_22 = Coupling(name = 'UVGC_184_22',
881 value = {-1:'( 0 if MB else (complex(0,1)*G**3)/(48.*cmath.pi**2) )'},
882 order = {'QCD':3})
883
884UVGC_184_23 = Coupling(name = 'UVGC_184_23',
885 value = {-1:'( 0 if MC else (complex(0,1)*G**3)/(48.*cmath.pi**2) )'},
886 order = {'QCD':3})
887
888UVGC_184_24 = Coupling(name = 'UVGC_184_24',
889 value = {-1:'( 0 if MD else (complex(0,1)*G**3)/(48.*cmath.pi**2) )'},
890 order = {'QCD':3})
891
892UVGC_184_25 = Coupling(name = 'UVGC_184_25',
893 value = {-1:'(-19*complex(0,1)*G**3)/(128.*cmath.pi**2)'},
894 order = {'QCD':3})
895
896UVGC_184_26 = Coupling(name = 'UVGC_184_26',
897 value = {-1:'-(complex(0,1)*G**3)/(128.*cmath.pi**2)'},
898 order = {'QCD':3})
899
900UVGC_184_27 = Coupling(name = 'UVGC_184_27',
901 value = {-1:'( 0 if MS else (complex(0,1)*G**3)/(48.*cmath.pi**2) )'},
902 order = {'QCD':3})
903
904UVGC_184_28 = Coupling(name = 'UVGC_184_28',
905 value = {-1:'( 0 if MT else (complex(0,1)*G**3)/(48.*cmath.pi**2) )'},
906 order = {'QCD':3})
907
908UVGC_184_29 = Coupling(name = 'UVGC_184_29',
909 value = {-1:'( 0 if MU else (complex(0,1)*G**3)/(48.*cmath.pi**2) )'},
910 order = {'QCD':3})
911
912UVGC_184_30 = Coupling(name = 'UVGC_184_30',
913 value = {-1:'( -(complex(0,1)*G**3)/(6.*cmath.pi**2) if MB else (complex(0,1)*G**3)/(12.*cmath.pi**2) )',0:'( (-5*complex(0,1)*G**3)/(12.*cmath.pi**2) + (complex(0,1)*G**3*reglog(MB/MU_R))/(2.*cmath.pi**2) if MB else -(complex(0,1)*G**3)/(12.*cmath.pi**2) ) + (complex(0,1)*G**3)/(12.*cmath.pi**2)'},
914 order = {'QCD':3})
915
916UVGC_185_31 = Coupling(name = 'UVGC_185_31',
917 value = {-1:'( (complex(0,1)*G**2*gAd33)/(6.*cmath.pi**2) if MB else -(complex(0,1)*G**2*gAd33)/(12.*cmath.pi**2) ) + (complex(0,1)*G**2*gAd33)/(12.*cmath.pi**2)',0:'( (5*complex(0,1)*G**2*gAd33)/(12.*cmath.pi**2) - (complex(0,1)*G**2*gAd33*reglog(MB/MU_R))/(2.*cmath.pi**2) if MB else (complex(0,1)*G**2*gAd33)/(12.*cmath.pi**2) ) - (complex(0,1)*G**2*gAd33)/(12.*cmath.pi**2)'},
918 order = {'DMV':1,'QCD':2})
919
920UVGC_186_32 = Coupling(name = 'UVGC_186_32',
921 value = {-1:'( -(complex(0,1)*G**2*gVd33)/(6.*cmath.pi**2) if MB else (complex(0,1)*G**2*gVd33)/(12.*cmath.pi**2) ) - (complex(0,1)*G**2*gVd33)/(12.*cmath.pi**2)',0:'( (-5*complex(0,1)*G**2*gVd33)/(12.*cmath.pi**2) + (complex(0,1)*G**2*gVd33*reglog(MB/MU_R))/(2.*cmath.pi**2) if MB else -(complex(0,1)*G**2*gVd33)/(12.*cmath.pi**2) ) + (complex(0,1)*G**2*gVd33)/(12.*cmath.pi**2)'},
922 order = {'DMV':1,'QCD':2})
923
924UVGC_187_33 = Coupling(name = 'UVGC_187_33',
925 value = {-1:'( (complex(0,1)*G**2*MB)/(6.*cmath.pi**2) if MB else -(complex(0,1)*G**2*MB)/(12.*cmath.pi**2) ) + (complex(0,1)*G**2*MB)/(3.*cmath.pi**2)',0:'( (3*complex(0,1)*G**2*MB)/(4.*cmath.pi**2) - (complex(0,1)*G**2*MB*reglog(MB/MU_R))/cmath.pi**2 if MB else (complex(0,1)*G**2*MB)/(12.*cmath.pi**2) ) - (complex(0,1)*G**2*MB)/(12.*cmath.pi**2)'},
926 order = {'QCD':2})
927
928UVGC_188_34 = Coupling(name = 'UVGC_188_34',
929 value = {-1:'( (cw*ee*complex(0,1)*G**2)/(12.*cmath.pi**2*sw) if MB else -(cw*ee*complex(0,1)*G**2)/(24.*cmath.pi**2*sw) ) + (cw*ee*complex(0,1)*G**2)/(24.*cmath.pi**2*sw)',0:'( (5*cw*ee*complex(0,1)*G**2)/(24.*cmath.pi**2*sw) - (cw*ee*complex(0,1)*G**2*reglog(MB/MU_R))/(4.*cmath.pi**2*sw) if MB else (cw*ee*complex(0,1)*G**2)/(24.*cmath.pi**2*sw) ) - (cw*ee*complex(0,1)*G**2)/(24.*cmath.pi**2*sw)'},
930 order = {'QCD':2,'QED':1})
931
932UVGC_189_35 = Coupling(name = 'UVGC_189_35',
933 value = {-1:'( (ee*complex(0,1)*G**2*sw)/(36.*cw*cmath.pi**2) if MB else -(ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2) ) + (ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2)',0:'( (5*ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2) - (ee*complex(0,1)*G**2*sw*reglog(MB/MU_R))/(12.*cw*cmath.pi**2) if MB else (ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2) ) - (ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2)'},
934 order = {'QCD':2,'QED':1})
935
936UVGC_190_36 = Coupling(name = 'UVGC_190_36',
937 value = {-1:'( (complex(0,1)*G**2*yb)/(6.*cmath.pi**2*cmath.sqrt(2)) if MB else -(complex(0,1)*G**2*yb)/(12.*cmath.pi**2*cmath.sqrt(2)) ) + (complex(0,1)*G**2*yb)/(3.*cmath.pi**2*cmath.sqrt(2))',0:'( (3*complex(0,1)*G**2*yb)/(4.*cmath.pi**2*cmath.sqrt(2)) - (complex(0,1)*G**2*yb*reglog(MB/MU_R))/(cmath.pi**2*cmath.sqrt(2)) if MB else (complex(0,1)*G**2*yb)/(12.*cmath.pi**2*cmath.sqrt(2)) ) - (complex(0,1)*G**2*yb)/(12.*cmath.pi**2*cmath.sqrt(2))'},
938 order = {'QCD':2,'QED':1})
939
940UVGC_191_37 = Coupling(name = 'UVGC_191_37',
941 value = {-1:'( -(G**2*yb)/(6.*cmath.pi**2*cmath.sqrt(2)) if MB else (G**2*yb)/(12.*cmath.pi**2*cmath.sqrt(2)) ) - (G**2*yb)/(3.*cmath.pi**2*cmath.sqrt(2))',0:'( (-3*G**2*yb)/(4.*cmath.pi**2*cmath.sqrt(2)) + (G**2*yb*reglog(MB/MU_R))/(cmath.pi**2*cmath.sqrt(2)) if MB else -(G**2*yb)/(12.*cmath.pi**2*cmath.sqrt(2)) ) + (G**2*yb)/(12.*cmath.pi**2*cmath.sqrt(2))'},
942 order = {'QCD':2,'QED':1})
943
944UVGC_192_38 = Coupling(name = 'UVGC_192_38',
945 value = {-1:'( -(G**2*gPd33*yb)/(6.*cmath.pi**2*cmath.sqrt(2)) if MB else (G**2*gPd33*yb)/(12.*cmath.pi**2*cmath.sqrt(2)) ) - (G**2*gPd33*yb)/(3.*cmath.pi**2*cmath.sqrt(2))',0:'( (-5*G**2*gPd33*yb)/(12.*cmath.pi**2*cmath.sqrt(2)) + (G**2*gPd33*yb*reglog(MB/MU_R))/(2.*cmath.pi**2*cmath.sqrt(2)) if MB else -(G**2*gPd33*yb)/(12.*cmath.pi**2*cmath.sqrt(2)) ) + (G**2*gPd33*yb)/(12.*cmath.pi**2*cmath.sqrt(2))'},
946 order = {'DMS':1,'QCD':2,'QED':1})
947
948UVGC_193_39 = Coupling(name = 'UVGC_193_39',
949 value = {-1:'( -(complex(0,1)*G**2*gSd33*yb)/(6.*cmath.pi**2*cmath.sqrt(2)) if MB else (complex(0,1)*G**2*gSd33*yb)/(12.*cmath.pi**2*cmath.sqrt(2)) ) - (complex(0,1)*G**2*gSd33*yb)/(3.*cmath.pi**2*cmath.sqrt(2))',0:'( (-5*complex(0,1)*G**2*gSd33*yb)/(12.*cmath.pi**2*cmath.sqrt(2)) + (complex(0,1)*G**2*gSd33*yb*reglog(MB/MU_R))/(2.*cmath.pi**2*cmath.sqrt(2)) if MB else -(complex(0,1)*G**2*gSd33*yb)/(12.*cmath.pi**2*cmath.sqrt(2)) ) + (complex(0,1)*G**2*gSd33*yb)/(12.*cmath.pi**2*cmath.sqrt(2))'},
950 order = {'DMS':1,'QCD':2,'QED':1})
951
952UVGC_194_40 = Coupling(name = 'UVGC_194_40',
953 value = {-1:'( (complex(0,1)*G**2)/(6.*cmath.pi**2) if MC else -(complex(0,1)*G**2)/(12.*cmath.pi**2) ) + (complex(0,1)*G**2)/(12.*cmath.pi**2)',0:'( (5*complex(0,1)*G**2)/(12.*cmath.pi**2) - (complex(0,1)*G**2*reglog(MC/MU_R))/(2.*cmath.pi**2) if MC else (complex(0,1)*G**2)/(12.*cmath.pi**2) ) - (complex(0,1)*G**2)/(12.*cmath.pi**2)'},
954 order = {'QCD':2})
955
956UVGC_195_41 = Coupling(name = 'UVGC_195_41',
957 value = {-1:'( -(ee*complex(0,1)*G**2)/(9.*cmath.pi**2) if MC else (ee*complex(0,1)*G**2)/(18.*cmath.pi**2) )',0:'( (-5*ee*complex(0,1)*G**2)/(18.*cmath.pi**2) + (ee*complex(0,1)*G**2*reglog(MC/MU_R))/(3.*cmath.pi**2) if MC else -(ee*complex(0,1)*G**2)/(18.*cmath.pi**2) ) + (ee*complex(0,1)*G**2)/(18.*cmath.pi**2)'},
958 order = {'QCD':2,'QED':1})
959
960UVGC_196_42 = Coupling(name = 'UVGC_196_42',
961 value = {-1:'( -(complex(0,1)*G**3)/(6.*cmath.pi**2) if MC else (complex(0,1)*G**3)/(12.*cmath.pi**2) )',0:'( (-5*complex(0,1)*G**3)/(12.*cmath.pi**2) + (complex(0,1)*G**3*reglog(MC/MU_R))/(2.*cmath.pi**2) if MC else -(complex(0,1)*G**3)/(12.*cmath.pi**2) ) + (complex(0,1)*G**3)/(12.*cmath.pi**2)'},
962 order = {'QCD':3})
963
964UVGC_197_43 = Coupling(name = 'UVGC_197_43',
965 value = {-1:'( (complex(0,1)*G**2*gAu22)/(6.*cmath.pi**2) if MC else -(complex(0,1)*G**2*gAu22)/(12.*cmath.pi**2) ) + (complex(0,1)*G**2*gAu22)/(12.*cmath.pi**2)',0:'( (5*complex(0,1)*G**2*gAu22)/(12.*cmath.pi**2) - (complex(0,1)*G**2*gAu22*reglog(MC/MU_R))/(2.*cmath.pi**2) if MC else (complex(0,1)*G**2*gAu22)/(12.*cmath.pi**2) ) - (complex(0,1)*G**2*gAu22)/(12.*cmath.pi**2)'},
966 order = {'DMV':1,'QCD':2})
967
968UVGC_198_44 = Coupling(name = 'UVGC_198_44',
969 value = {-1:'( -(complex(0,1)*G**2*gVu22)/(6.*cmath.pi**2) if MC else (complex(0,1)*G**2*gVu22)/(12.*cmath.pi**2) ) - (complex(0,1)*G**2*gVu22)/(12.*cmath.pi**2)',0:'( (-5*complex(0,1)*G**2*gVu22)/(12.*cmath.pi**2) + (complex(0,1)*G**2*gVu22*reglog(MC/MU_R))/(2.*cmath.pi**2) if MC else -(complex(0,1)*G**2*gVu22)/(12.*cmath.pi**2) ) + (complex(0,1)*G**2*gVu22)/(12.*cmath.pi**2)'},
970 order = {'DMV':1,'QCD':2})
971
972UVGC_199_45 = Coupling(name = 'UVGC_199_45',
973 value = {-1:'( (complex(0,1)*G**2*MC)/(6.*cmath.pi**2) if MC else -(complex(0,1)*G**2*MC)/(12.*cmath.pi**2) ) + (complex(0,1)*G**2*MC)/(3.*cmath.pi**2)',0:'( (3*complex(0,1)*G**2*MC)/(4.*cmath.pi**2) - (complex(0,1)*G**2*MC*reglog(MC/MU_R))/cmath.pi**2 if MC else (complex(0,1)*G**2*MC)/(12.*cmath.pi**2) ) - (complex(0,1)*G**2*MC)/(12.*cmath.pi**2)'},
974 order = {'QCD':2})
975
976UVGC_200_46 = Coupling(name = 'UVGC_200_46',
977 value = {-1:'( -(cw*ee*complex(0,1)*G**2)/(12.*cmath.pi**2*sw) if MC else (cw*ee*complex(0,1)*G**2)/(24.*cmath.pi**2*sw) ) - (cw*ee*complex(0,1)*G**2)/(24.*cmath.pi**2*sw)',0:'( (-5*cw*ee*complex(0,1)*G**2)/(24.*cmath.pi**2*sw) + (cw*ee*complex(0,1)*G**2*reglog(MC/MU_R))/(4.*cmath.pi**2*sw) if MC else -(cw*ee*complex(0,1)*G**2)/(24.*cmath.pi**2*sw) ) + (cw*ee*complex(0,1)*G**2)/(24.*cmath.pi**2*sw)'},
978 order = {'QCD':2,'QED':1})
979
980UVGC_201_47 = Coupling(name = 'UVGC_201_47',
981 value = {-1:'( (ee*complex(0,1)*G**2*sw)/(36.*cw*cmath.pi**2) if MC else -(ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2) ) + (ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2)',0:'( (5*ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2) - (ee*complex(0,1)*G**2*sw*reglog(MC/MU_R))/(12.*cw*cmath.pi**2) if MC else (ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2) ) - (ee*complex(0,1)*G**2*sw)/(72.*cw*cmath.pi**2)'},
982 order = {'QCD':2,'QED':1})
983
984UVGC_202_48 = Coupling(name = 'UVGC_202_48',
985 value = {-1:'( (G**2*yc)/(6.*cmath.pi**2*cmath.sqrt(2)) if MC else -(G**2*yc)/(12.*cmath.pi**2*cmath.sqrt(2)) ) + (G**2*yc)/(3.*cmath.pi**2*cmath.sqrt(2))',0:'( (3*G**2*yc)/(4.*cmath.pi**2*cmath.sqrt(2)) - (G**2*yc*reglog(MC/MU_R))/(cmath.pi**2*cmath.sqrt(2)) if MC else (G**2*yc)/(12.*cmath.pi**2*cmath.sqrt(2)) ) - (G**2*yc)/(12.*cmath.pi**2*cmath.sqrt(2))'},
986 order = {'QCD':2,'QED':1})
987
988UVGC_203_49 = Coupling(name = 'UVGC_203_49',
989 value = {-1:'( (complex(0,1)*G**2*yc)/(6.*cmath.pi**2*cmath.sqrt(2)) if MC else -(complex(0,1)*G**2*yc)/(12.*cmath.pi**2*cmath.sqrt(2)) ) + (complex(0,1)*G**2*yc)/(3.*cmath.pi**2*cmath.sqrt(2))',0:'( (3*complex(0,1)*G**2*yc)/(4.*cmath.pi**2*cmath.sqrt(2)) - (complex(0,1)*G**2*yc*reglog(MC/MU_R))/(cmath.pi**2*cmath.sqrt(2)) if MC else (complex(0,1)*G**2*yc)/(12.*cmath.pi**2*cmath.sqrt(2)) ) - (complex(0,1)*G**2*yc)/(12.*cmath.pi**2*cmath.sqrt(2))'},
990 order = {'QCD':2,'QED':1})
991
992UVGC_204_50 = Coupling(name = 'UVGC_204_50',
993 value = {-1:'( -(G**2*gPu22*yc)/(6.*cmath.pi**2*cmath.sqrt(2)) if MC else (G**2*gPu22*yc)/(12.*cmath.pi**2*cmath.sqrt(2)) ) - (G**2*gPu22*yc)/(3.*cmath.pi**2*cmath.sqrt(2))',0:'( (-5*G**2*gPu22*yc)/(12.*cmath.pi**2*cmath.sqrt(2)) + (G**2*gPu22*yc*reglog(MC/MU_R))/(2.*cmath.pi**2*cmath.sqrt(2)) if MC else -(G**2*gPu22*yc)/(12.*cmath.pi**2*cmath.sqrt(2)) ) + (G**2*gPu22*yc)/(12.*cmath.pi**2*cmath.sqrt(2))'},
994 order = {'DMS':1,'QCD':2,'QED':1})
995
996UVGC_205_51 = Coupling(name = 'UVGC_205_51',
997 value = {-1:'( -(complex(0,1)*G**2*gSu22*yc)/(6.*cmath.pi**2*cmath.sqrt(2)) if MC else (complex(0,1)*G**2*gSu22*yc)/(12.*cmath.pi**2*cmath.sqrt(2)) ) - (complex(0,1)*G**2*gSu22*yc)/(3.*cmath.pi**2*cmath.sqrt(2))',0:'( (-5*complex(0,1)*G**2*gSu22*yc)/(12.*cmath.pi**2*cmath.sqrt(2)) + (complex(0,1)*G**2*gSu22*yc*reglog(MC/MU_R))/(2.*cmath.pi**2*cmath.sqrt(2)) if MC else -(complex(0,1)*G**2*gSu22*yc)/(12.*cmath.pi**2*cmath.sqrt(2)) ) + (complex(0,1)*G**2*gSu22*yc)/(12.*cmath.pi**2*cmath.sqrt(2))'},
998 order = {'DMS':1,'QCD':2,'QED':1})
999
1000UVGC_206_52 = Coupling(name = 'UVGC_206_52',
1001 value = {-1:'( (complex(0,1)*G**2)/(6.*cmath.pi**2) if MD else -(complex(0,1)*G**2)/(12.*cmath.pi**2) ) + (complex(0,1)*G**2)/(12.*cmath.pi**2)',0:'( (5*complex(0,1)*G**2)/(12.*cmath.pi**2) - (complex(0,1)*G**2*reglog(MD/MU_R))/(2.*cmath.pi**2) if MD else (complex(0,1)*G**2)/(12.*cmath.pi**2) ) - (complex(0,1)*G**2)/(12.*cmath.pi**2)'},
1002 order = {'QCD':2})
1003
1004UVGC_207_53 = Coupling(name = 'UVGC_207_53',
1005 value = {-1:'( (ee*complex(0,1)*G**2)/(18.*cmath.pi**2) if MD else -(ee*complex(0,1)*G**2)/(36.*cmath.pi**2) )',0:'( (5*ee*complex(0,1)*G**2)/(36.*cmath.pi**2) - (ee*complex(0,1)*G**2*reglog(MD/MU_R))/(6.*cmath.pi**2) if MD else (ee*complex(0,1)*G**2)/(36.*cmath.pi**2) ) - (ee*complex(0,1)*G**2)/(36.*cmath.pi**2)'},
1006 order = {'QCD':2,'QED':1})
1007
1008UVGC_208_54 = Coupling(name = 'UVGC_208_54',
1009 value = {-1:'( -(complex(0,1)*G**3)/(6.*cmath.pi**2) if MD else (complex(0,1)*G**3)/(12.*cmath.pi**2) )',0:'( (-5*complex(0,1)*G**3)/(12.*cmath.pi**2) + (complex(0,1)*G**3*reglog(MD/MU_R))/(2.*cmath.pi**2) if MD else -(complex(0,1)*G**3)/(12.*cmath.pi**2) ) + (complex(0,1)*G**3)/(12.*cmath.pi**2)'},
1010 order = {'QCD':3})
1011
1012UVGC_209_55 = Coupling(name = 'UVGC_209_55',
1013 value = {-1:'( (complex(0,1)*G**2*gAd11)/(6.*cmath.pi**2) if MD else -(complex(0,1)*G**2*gAd11)/(12.*cmath.pi**2) ) + (complex(0,1)*G**2*gAd11)/(12.*cmath.pi**2)',0:'( (5*complex(0,1)*G**2*gAd11)/(12.*cmath.pi**2) - (complex(0,1)*G**2*gAd11*reglog(MD/MU_R))/(2.*cmath.pi**2) if MD else (complex(0,1)*G**2*gAd11)/(12.*cmath.pi**2) ) - (complex(0,1)*G**2*gAd11)/(12.*cmath.pi**2)'},
1014 order = {'DMV':1,'QCD':2})
1015
1016UVGC_210_56 = Coupling(name = 'UVGC_210_56',
1017 value = {-1:'( -(complex(0,1)*G**2*gVd11)/(6.*cmath.pi**2) if MD else (complex(0,1)*G**2*gVd11)/(12.*cmath.pi**2) ) - (complex(0,1)*G**2*gVd11)/(12.*cmath.pi**2)',0:'( (-5*complex(0,1)*G**2*gVd11)/(12.*cmath.pi**2) + (complex(0,1)*G**2*gVd11*reglog(MD/MU_R))/(2.*cmath.pi**2) if MD else -(complex(0,1)*G**2*gVd11)/(12.*cmath.pi**2) ) + (complex(0,1)*G**2*gVd11)/(12.*cmath.pi**2)'},
1018 order = {'DMV':1,'QCD':2})
1019
1020UVGC_211_57 = Coupling(name = 'UVGC_211_57',
1021 value = {-1:'( (complex(0,1)*G**2*MD)/(6.*cmath.pi**2) if MD else -(complex(0,1)*G**2*MD)/(12.*cmath.pi**2) ) + (complex(0,1)*G**2*MD)/(3.*cmath.pi**2)',0:'( (3*complex(0,1)*G**2*MD)/(4.*cmath.pi**2) - (complex(0,1)*G**2*MD*reglog(MD/MU_R))/cmath.pi**2 if MD else (complex(0,1)*G**2*MD)/(12.*cmath.pi**2) ) - (complex(0,1)*G**2*MD)/(12.*cmath.pi**2)'},
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: