Merge lp:~mg5core2/mg5amcnlo/2.6.3 into lp:mg5amcnlo/lts
- 2.6.3
- Merge into series2.0
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
MadTeam | Pending | ||
Review via email: mp+347781@code.launchpad.net |
Commit message
Description of the change
Rikkert Frederix (frederix) wrote : | # |
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:/
> Your team mg5core2 is subscribed to branch lp:~mg5core2/mg5amcnlo/2.6.3.
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
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:/
> Your team MadTeam is requested to review the proposed merge of
> lp:~mg5core2/mg5amcnlo/2.6.3 into lp:mg5amcnlo.
>
- 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
1 | === modified file 'MadSpin/interface_madspin.py' | |||
2 | --- MadSpin/interface_madspin.py 2018-03-11 12:10:19 +0000 | |||
3 | +++ MadSpin/interface_madspin.py 2018-06-15 08:18:50 +0000 | |||
4 | @@ -35,6 +35,7 @@ | |||
5 | 35 | import madgraph.interface.madgraph_interface as mg_interface | 35 | import madgraph.interface.madgraph_interface as mg_interface |
6 | 36 | import madgraph.interface.master_interface as master_interface | 36 | import madgraph.interface.master_interface as master_interface |
7 | 37 | import madgraph.interface.madevent_interface as madevent_interface | 37 | import madgraph.interface.madevent_interface as madevent_interface |
8 | 38 | import madgraph.interface.common_run_interface as common_run_interface | ||
9 | 38 | import madgraph.interface.reweight_interface as rwgt_interface | 39 | import madgraph.interface.reweight_interface as rwgt_interface |
10 | 39 | import madgraph.various.misc as misc | 40 | import madgraph.various.misc as misc |
11 | 40 | import madgraph.iolibs.files as files | 41 | import madgraph.iolibs.files as files |
12 | @@ -53,6 +54,68 @@ | |||
13 | 53 | cmd_logger = logging.getLogger('cmdprint2') # -> print | 54 | cmd_logger = logging.getLogger('cmdprint2') # -> print |
14 | 54 | 55 | ||
15 | 55 | 56 | ||
16 | 57 | class MadSpinOptions(banner.ConfigFile): | ||
17 | 58 | |||
18 | 59 | def default_setup(self): | ||
19 | 60 | |||
20 | 61 | self.add_param("max_weight", -1) | ||
21 | 62 | self.add_param('curr_dir', os.path.realpath(os.getcwd())) | ||
22 | 63 | self.add_param('Nevents_for_max_weigth', 0) | ||
23 | 64 | self.add_param("max_weight_ps_point", 400) | ||
24 | 65 | self.add_param('BW_cut', -1) | ||
25 | 66 | self.add_param('nb_sigma', 0.) | ||
26 | 67 | self.add_param('ms_dir', '') | ||
27 | 68 | self.add_param('max_running_process', 100) | ||
28 | 69 | self.add_param('onlyhelicity', False) | ||
29 | 70 | self.add_param('spinmode', "madspin", allowed=['madspin','none','onshell']) | ||
30 | 71 | self.add_param('use_old_dir', False, comment='should be use only for faster debugging') | ||
31 | 72 | self.add_param('run_card', '' , comment='define cut for spinmode==none. Path to run_card to use') | ||
32 | 73 | self.add_param('fixed_order', False, comment='to activate fixed order handling of counter-event') | ||
33 | 74 | self.add_param('seed', 0, comment='control the seed of madspin') | ||
34 | 75 | self.add_param('cross_section', {'__type__':0.}, comment="forcing normalization of cross-section after MS (for none/onshell)" ) | ||
35 | 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") | ||
36 | 77 | self.add_param('input_format', 'auto', allowed=['auto','lhe', 'hepmc', 'lhe_no_banner']) | ||
37 | 78 | |||
38 | 79 | |||
39 | 80 | ############################################################################ | ||
40 | 81 | ## Special post-processing of the options ## | ||
41 | 82 | ############################################################################ | ||
42 | 83 | def post_set_ms_dir(self, value, change_userdefine, raiseerror): | ||
43 | 84 | """ special handling for set ms_dir """ | ||
44 | 85 | |||
45 | 86 | self.__setitem__('curr_dir', value, change_userdefine=change_userdefine) | ||
46 | 87 | |||
47 | 88 | ############################################################################ | ||
48 | 89 | def post_set_seed(self, value, change_userdefine, raiseerror): | ||
49 | 90 | """ special handling for set seed """ | ||
50 | 91 | |||
51 | 92 | random.seed(value) | ||
52 | 93 | |||
53 | 94 | ############################################################################ | ||
54 | 95 | def post_set_run_card(self, value, change_userdefine, raiseerror): | ||
55 | 96 | """ special handling for set run_card """ | ||
56 | 97 | |||
57 | 98 | if value == 'default': | ||
58 | 99 | self.run_card = None | ||
59 | 100 | elif os.path.isfile(value): | ||
60 | 101 | self.run_card = banner.RunCard(value) | ||
61 | 102 | |||
62 | 103 | args = value.split() | ||
63 | 104 | if len(args) >2: | ||
64 | 105 | if not self.options['run_card']: | ||
65 | 106 | self.run_card = banner.RunCardLO() | ||
66 | 107 | self.run_card.remove_all_cut() | ||
67 | 108 | self.run_card[args[0]] = ' '.join(args[1:]) | ||
68 | 109 | |||
69 | 110 | |||
70 | 111 | ############################################################################ | ||
71 | 112 | def post_fixed_order(self, value, change_userdefine, raiseerror): | ||
72 | 113 | """ special handling for set fixed_order """ | ||
73 | 114 | |||
74 | 115 | if value: | ||
75 | 116 | logger.warning('Fix order madspin fails to have the correct scale information. This can bias the results!') | ||
76 | 117 | logger.warning('Not all functionalities of MadSpin handle this mode correctly (only onshell mode so far).') | ||
77 | 118 | |||
78 | 56 | 119 | ||
79 | 57 | class MadSpinInterface(extended_cmd.Cmd): | 120 | class MadSpinInterface(extended_cmd.Cmd): |
80 | 58 | """Basic interface for madspin""" | 121 | """Basic interface for madspin""" |
81 | @@ -77,22 +140,7 @@ | |||
82 | 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. |
83 | 78 | # note amc@nlo does not support bridge. | 141 | # note amc@nlo does not support bridge. |
84 | 79 | 142 | ||
101 | 80 | self.options = {'max_weight': -1, | 143 | self.options = MadSpinOptions() |
86 | 81 | 'curr_dir': os.path.realpath(os.getcwd()), | ||
87 | 82 | 'Nevents_for_max_weigth': 0, | ||
88 | 83 | 'max_weight_ps_point': 400, | ||
89 | 84 | 'BW_cut':-1, | ||
90 | 85 | 'nb_sigma':0, | ||
91 | 86 | 'ms_dir':None, | ||
92 | 87 | 'max_running_process':100, | ||
93 | 88 | 'onlyhelicity': False, | ||
94 | 89 | 'spinmode': "madspin", | ||
95 | 90 | 'use_old_dir': False, #should be use only for faster debugging | ||
96 | 91 | 'run_card': None, # define cut for spinmode==none. | ||
97 | 92 | 'fixed_order': False # to activate fixed order handling of counter-event | ||
98 | 93 | } | ||
99 | 94 | |||
100 | 95 | |||
102 | 96 | 144 | ||
103 | 97 | self.events_file = None | 145 | self.events_file = None |
104 | 98 | self.decay_processes = {} | 146 | self.decay_processes = {} |
105 | @@ -107,7 +155,21 @@ | |||
106 | 107 | logger.info("Extracting the banner ...") | 155 | logger.info("Extracting the banner ...") |
107 | 108 | self.do_import(event_path) | 156 | self.do_import(event_path) |
108 | 109 | 157 | ||
110 | 110 | 158 | ||
111 | 159 | def setup_for_pure_decay(self): | ||
112 | 160 | """this is for spinmode=None -> simple decay | ||
113 | 161 | We go here if they are no banner. | ||
114 | 162 | -> this requires that a command import model appears in the card! | ||
115 | 163 | """ | ||
116 | 164 | |||
117 | 165 | logger.info("Setup the code for pure decay mode") | ||
118 | 166 | self.proc_option = [] | ||
119 | 167 | self.final_state_full = '' | ||
120 | 168 | self.final_state_compact = '' | ||
121 | 169 | self.prod_branches = '' | ||
122 | 170 | self.final_state = set() | ||
123 | 171 | |||
124 | 172 | |||
125 | 111 | def do_import(self, inputfile): | 173 | def do_import(self, inputfile): |
126 | 112 | """import the event file""" | 174 | """import the event file""" |
127 | 113 | 175 | ||
128 | @@ -126,6 +188,7 @@ | |||
129 | 126 | if not os.path.exists(inputfile): | 188 | if not os.path.exists(inputfile): |
130 | 127 | if inputfile.endswith('.gz'): | 189 | if inputfile.endswith('.gz'): |
131 | 128 | if not os.path.exists(inputfile[:-3]): | 190 | if not os.path.exists(inputfile[:-3]): |
132 | 191 | misc.sprint(os.getcwd(), os.listdir('.'), inputfile, os.path.exists(inputfile), os.path.exists(inputfile[:-3])) | ||
133 | 129 | raise self.InvalidCmd('No such file or directory : %s' % inputfile) | 192 | raise self.InvalidCmd('No such file or directory : %s' % inputfile) |
134 | 130 | else: | 193 | else: |
135 | 131 | inputfile = inputfile[:-3] | 194 | inputfile = inputfile[:-3] |
136 | @@ -134,14 +197,21 @@ | |||
137 | 134 | else: | 197 | else: |
138 | 135 | raise self.InvalidCmd('No such file or directory : %s' % inputfile) | 198 | raise self.InvalidCmd('No such file or directory : %s' % inputfile) |
139 | 136 | 199 | ||
140 | 200 | self.inputfile = inputfile | ||
141 | 201 | if self.options['spinmode'] == 'none' and \ | ||
142 | 202 | (self.options['input_format'] != 'lhe' or (self.options['input_format'] == 'auto' and '.lhe' in inputfile[:-5])): | ||
143 | 203 | self.banner = banner.Banner() | ||
144 | 204 | self.setup_for_pure_decay() | ||
145 | 205 | return | ||
146 | 206 | |||
147 | 137 | if inputfile.endswith('.gz'): | 207 | if inputfile.endswith('.gz'): |
148 | 138 | misc.gunzip(inputfile) | 208 | misc.gunzip(inputfile) |
149 | 139 | inputfile = inputfile[:-3] | 209 | inputfile = inputfile[:-3] |
150 | 140 | |||
151 | 141 | # Read the banner of the inputfile | 210 | # Read the banner of the inputfile |
152 | 142 | self.events_file = open(os.path.realpath(inputfile)) | 211 | self.events_file = open(os.path.realpath(inputfile)) |
153 | 143 | self.banner = banner.Banner(self.events_file) | 212 | self.banner = banner.Banner(self.events_file) |
154 | 144 | 213 | ||
155 | 214 | |||
156 | 145 | # Check the validity of the banner: | 215 | # Check the validity of the banner: |
157 | 146 | if 'slha' not in self.banner: | 216 | if 'slha' not in self.banner: |
158 | 147 | self.events_file = None | 217 | self.events_file = None |
159 | @@ -163,7 +233,6 @@ | |||
160 | 163 | self.options['nb_sigma'] = N_sigma | 233 | self.options['nb_sigma'] = N_sigma |
161 | 164 | if self.options['BW_cut'] == -1: | 234 | if self.options['BW_cut'] == -1: |
162 | 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')) |
163 | 166 | |||
164 | 167 | else: | 236 | else: |
165 | 168 | if not self.options['Nevents_for_max_weigth']: | 237 | if not self.options['Nevents_for_max_weigth']: |
166 | 169 | self.options['Nevents_for_max_weigth'] = 75 | 238 | self.options['Nevents_for_max_weigth'] = 75 |
167 | @@ -273,7 +342,7 @@ | |||
168 | 273 | 342 | ||
169 | 274 | 343 | ||
170 | 275 | #Check the param_card | 344 | #Check the param_card |
172 | 276 | if not bypass_check: | 345 | if not (bypass_check or self.options['input_format'] in ['hepmc', 'lhe_no_banner']): |
173 | 277 | if not hasattr(self.banner, 'param_card'): | 346 | if not hasattr(self.banner, 'param_card'): |
174 | 278 | self.banner.charge_card('slha') | 347 | self.banner.charge_card('slha') |
175 | 279 | param_card = check_param_card.ParamCard(card) | 348 | param_card = check_param_card.ParamCard(card) |
176 | @@ -395,42 +464,10 @@ | |||
177 | 395 | 464 | ||
178 | 396 | args = self.split_arg(line) | 465 | args = self.split_arg(line) |
179 | 397 | self.check_set(args) | 466 | self.check_set(args) |
216 | 398 | 467 | ||
217 | 399 | if args[0] not in ['ms_dir', 'run_card']: | 468 | self.options[args[0]] = ' '.join(args[1:]) |
218 | 400 | args[1] = args[1].lower() | 469 | |
219 | 401 | 470 | ||
184 | 402 | if args[0] in ['max_weight', 'BW_effect','ms_dir', 'spinmode']: | ||
185 | 403 | self.options[args[0]] = args[1] | ||
186 | 404 | if args[0] == 'ms_dir': | ||
187 | 405 | self.options['curr_dir'] = self.options['ms_dir'] | ||
188 | 406 | elif args[0] == 'seed': | ||
189 | 407 | random.seed(int(args[1])) | ||
190 | 408 | self.seed = int(args[1]) | ||
191 | 409 | elif args[0] == 'BW_cut': | ||
192 | 410 | self.options[args[0]] = float(args[1]) | ||
193 | 411 | elif args[0] in ['onlyhelicity', 'use_old_dir']: | ||
194 | 412 | self.options[args[0]] = banner.ConfigFile.format_variable(args[1], bool, args[0]) | ||
195 | 413 | elif args[0] in ['run_card']: | ||
196 | 414 | if args[1] == 'default': | ||
197 | 415 | self.options['run_card'] = None | ||
198 | 416 | elif os.path.isfile(args[1]): | ||
199 | 417 | self.options['run_card'] = banner.RunCard(args[1]) | ||
200 | 418 | elif len(args) >2: | ||
201 | 419 | if not self.options['run_card']: | ||
202 | 420 | self.options['run_card'] = banner.RunCardLO() | ||
203 | 421 | self.options['run_card'].remove_all_cut() | ||
204 | 422 | self.options['run_card'][args[1]] = args[2] | ||
205 | 423 | elif args[0] in 'fixed_order': | ||
206 | 424 | if args[1].lower() in ['t', 'true']: | ||
207 | 425 | self.options['fixed_order'] = True | ||
208 | 426 | logger.warning('Fix order madspin fails to have the correct scale information. This can bias the results!') | ||
209 | 427 | logger.warning('Not all functionality of MadSpin handle this mode correctly (only onshell mode so far).') | ||
210 | 428 | else: | ||
211 | 429 | self.options['fixed_order'] = False | ||
212 | 430 | logger.info('fixed_order options set to %s', self.options['fixed_order']) | ||
213 | 431 | else: | ||
214 | 432 | self.options[args[0]] = int(args[1]) | ||
215 | 433 | |||
220 | 434 | def complete_set(self, text, line, begidx, endidx): | 471 | def complete_set(self, text, line, begidx, endidx): |
221 | 435 | 472 | ||
222 | 436 | 473 | ||
223 | @@ -559,17 +596,17 @@ | |||
224 | 559 | 596 | ||
225 | 560 | model_line = self.banner.get('proc_card', 'full_model_line') | 597 | model_line = self.banner.get('proc_card', 'full_model_line') |
226 | 561 | 598 | ||
232 | 562 | if not self.seed: | 599 | if not self.options['seed']: |
233 | 563 | self.seed = random.randint(0, int(30081*30081)) | 600 | self.options['seed'] = random.randint(0, int(30081*30081)) |
234 | 564 | self.do_set('seed %s' % self.seed) | 601 | #self.do_set('seed %s' % self.seed) |
235 | 565 | logger.info('Will use seed %s' % self.seed) | 602 | logger.info('Will use seed %s' % self.options['seed']) |
236 | 566 | self.history.insert(0, 'set seed %s' % self.seed) | 603 | self.history.insert(0, 'set seed %s' % self.options['seed']) |
237 | 567 | 604 | ||
240 | 568 | if self.seed > 30081*30081: # can't use too big random number | 605 | if self.options['seed'] > 30081*30081: # can't use too big random number |
241 | 569 | msg = 'Random seed too large ' + str(self.seed) + ' > 30081*30081' | 606 | msg = 'Random seed too large ' + str(self.options['seed']) + ' > 30081*30081' |
242 | 570 | raise Exception, msg | 607 | raise Exception, msg |
243 | 571 | 608 | ||
245 | 572 | self.options['seed'] = self.seed | 609 | #self.options['seed'] = self.seed |
246 | 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]) |
247 | 574 | self.banner.add_text('madspin' , text) | 611 | self.banner.add_text('madspin' , text) |
248 | 575 | 612 | ||
249 | @@ -678,9 +715,9 @@ | |||
250 | 678 | 715 | ||
251 | 679 | # NOW we have all the information available for RUNNING | 716 | # NOW we have all the information available for RUNNING |
252 | 680 | 717 | ||
254 | 681 | if self.seed: | 718 | if self.options['seed']: |
255 | 682 | #seed is specified need to use that one: | 719 | #seed is specified need to use that one: |
257 | 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']) |
258 | 684 | #remove all ranmar_state | 721 | #remove all ranmar_state |
259 | 685 | for name in misc.glob(pjoin('*', 'SubProcesses','*','ranmar_state.dat'), | 722 | for name in misc.glob(pjoin('*', 'SubProcesses','*','ranmar_state.dat'), |
260 | 686 | self.options['ms_dir']): | 723 | self.options['ms_dir']): |
261 | @@ -741,30 +778,58 @@ | |||
262 | 741 | for name in misc.glob("decay_*_*", self.path_me): | 778 | for name in misc.glob("decay_*_*", self.path_me): |
263 | 742 | shutil.rmtree(name) | 779 | shutil.rmtree(name) |
264 | 743 | 780 | ||
268 | 744 | self.events_file.close() | 781 | if self.events_file: |
269 | 745 | orig_lhe = lhe_parser.EventFile(self.events_file.name) | 782 | self.events_file.close() |
270 | 746 | 783 | filename = self.events_file.name | |
271 | 784 | else: | ||
272 | 785 | filename = self.inputfile | ||
273 | 786 | |||
274 | 787 | if self.options['input_format'] == 'auto': | ||
275 | 788 | if '.lhe' in filename : | ||
276 | 789 | self.options['input_format'] = 'lhe' | ||
277 | 790 | elif '.hepmc' in filename: | ||
278 | 791 | self.options['input_format'] = 'hepmc' | ||
279 | 792 | else: | ||
280 | 793 | raise Exception, "fail to recognized input format automatically" | ||
281 | 794 | |||
282 | 795 | if self.options['input_format'] in ['lhe', 'lhe_no_banner']: | ||
283 | 796 | orig_lhe = lhe_parser.EventFile(filename) | ||
284 | 797 | if self.options['input_format'] == 'lhe_no_banner': | ||
285 | 798 | orig_lhe.allow_empty_event = True | ||
286 | 799 | |||
287 | 800 | elif self.options['input_format'] in ['hepmc']: | ||
288 | 801 | import madgraph.various.hepmc_parser as hepmc_parser | ||
289 | 802 | orig_lhe = hepmc_parser.HEPMC_EventFile(filename) | ||
290 | 803 | logger.info("Parsing input event to know how many decay to generate. This can takes few minuts.") | ||
291 | 804 | else: | ||
292 | 805 | raise Exception | ||
293 | 806 | |||
294 | 747 | to_decay = collections.defaultdict(int) | 807 | to_decay = collections.defaultdict(int) |
295 | 748 | nb_event = 0 | 808 | nb_event = 0 |
296 | 809 | |||
297 | 749 | for event in orig_lhe: | 810 | for event in orig_lhe: |
298 | 750 | nb_event +=1 | 811 | nb_event +=1 |
299 | 751 | for particle in event: | 812 | for particle in event: |
300 | 752 | if particle.status == 1 and particle.pdg in asked_to_decay: | 813 | if particle.status == 1 and particle.pdg in asked_to_decay: |
301 | 753 | # final state and tag as to decay | 814 | # final state and tag as to decay |
302 | 754 | to_decay[particle.pdg] += 1 | 815 | to_decay[particle.pdg] += 1 |
303 | 816 | if self.options['input_format'] == 'hepmc' and nb_event == 250: | ||
304 | 817 | for key in to_decay: | ||
305 | 818 | to_decay[key] *= 50.013 # to avoid accidental coincidence with nevents | ||
306 | 819 | break | ||
307 | 755 | 820 | ||
308 | 756 | # Handle the banner of the output file | 821 | # Handle the banner of the output file |
314 | 757 | if not self.seed: | 822 | if not self.options['seed']: |
315 | 758 | self.seed = random.randint(0, int(30081*30081)) | 823 | self.options['seed'] = random.randint(0, int(30081*30081)) |
316 | 759 | self.do_set('seed %s' % self.seed) | 824 | #self.do_set('seed %s' % self.seed) |
317 | 760 | logger.info('Will use seed %s' % self.seed) | 825 | logger.info('Will use seed %s' % self.options['seed']) |
318 | 761 | self.history.insert(0, 'set seed %s' % self.seed) | 826 | self.history.insert(0, 'set seed %s' % self.options['seed']) |
319 | 762 | 827 | ||
322 | 763 | if self.seed > 30081*30081: # can't use too big random number | 828 | if self.options['seed'] > 30081*30081: # can't use too big random number |
323 | 764 | msg = 'Random seed too large ' + str(self.seed) + ' > 30081*30081' | 829 | msg = 'Random seed too large ' + str(self.options['seed']) + ' > 30081*30081' |
324 | 765 | raise Exception, msg | 830 | raise Exception, msg |
325 | 766 | 831 | ||
327 | 767 | self.options['seed'] = self.seed | 832 | #self.options['seed'] = self.options['seed'] |
328 | 768 | 833 | ||
329 | 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]) |
330 | 770 | self.banner.add_text('madspin' , text) | 835 | self.banner.add_text('madspin' , text) |
331 | @@ -791,61 +856,104 @@ | |||
332 | 791 | evt_decayfile[pdg] = self.generate_events(pdg, nb_event, mg5) | 856 | evt_decayfile[pdg] = self.generate_events(pdg, nb_event, mg5) |
333 | 792 | else: | 857 | else: |
334 | 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) |
335 | 859 | elif self.options['cross_section']: | ||
336 | 860 | #cross-section hard-coded -> allow | ||
337 | 861 | part = self.model.get_particle(pdg) | ||
338 | 862 | name = part.get_name() | ||
339 | 863 | |||
340 | 864 | if name not in self.list_branches: | ||
341 | 865 | continue | ||
342 | 866 | else: | ||
343 | 867 | try: | ||
344 | 868 | evt_decayfile[pdg] = self.generate_events(pdg, nb_needed, mg5, cumul=True) | ||
345 | 869 | except common_run_interface.ZeroResult: | ||
346 | 870 | logger.warning("Branching ratio is zero for this particle. Not decaying it") | ||
347 | 871 | del to_decay[pdg] | ||
348 | 794 | else: | 872 | else: |
349 | 795 | part = self.model.get_particle(pdg) | 873 | part = self.model.get_particle(pdg) |
350 | 796 | name = part.get_name() | 874 | name = part.get_name() |
351 | 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: |
352 | 798 | continue | 876 | continue |
354 | 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.") |
355 | 800 | 878 | ||
356 | 801 | 879 | ||
357 | 802 | |||
358 | 803 | |||
359 | 804 | # Compute the branching ratio. | 880 | # Compute the branching ratio. |
385 | 805 | br = 1 | 881 | if not self.options['cross_section']: |
386 | 806 | for (pdg, event_files) in evt_decayfile.items(): | 882 | br = 1 |
387 | 807 | if not event_files: | 883 | for (pdg, event_files) in evt_decayfile.items(): |
388 | 808 | continue | 884 | if not event_files: |
389 | 809 | totwidth = float(self.banner.get('param', 'decay', abs(pdg)).value) | 885 | continue |
390 | 810 | if to_decay[pdg] == nb_event: | 886 | totwidth = float(self.banner.get('param', 'decay', abs(pdg)).value) |
391 | 811 | # Exactly one particle of this type to decay by event | 887 | if to_decay[pdg] == nb_event: |
392 | 812 | pwidth = sum([event_files[k].cross for k in event_files]) | 888 | # Exactly one particle of this type to decay by event |
393 | 813 | if pwidth > 1.01 * totwidth: | 889 | pwidth = sum([event_files[k].cross for k in event_files]) |
369 | 814 | logger.critical("Branching ratio larger than one for %s " % pdg) | ||
370 | 815 | br *= pwidth / totwidth | ||
371 | 816 | elif to_decay[pdg] % nb_event == 0: | ||
372 | 817 | # More than one particle of this type to decay by event | ||
373 | 818 | # Need to check the number of event file to check if we have to | ||
374 | 819 | # make separate type of decay or not. | ||
375 | 820 | nb_mult = to_decay[pdg] // nb_event | ||
376 | 821 | if nb_mult == len(event_files): | ||
377 | 822 | for k in event_files: | ||
378 | 823 | pwidth = event_files[k].cross | ||
379 | 824 | if pwidth > 1.01 * totwidth: | ||
380 | 825 | logger.critical("Branching ratio larger than one for %s " % pdg) | ||
381 | 826 | br *= pwidth / totwidth | ||
382 | 827 | br *= math.factorial(nb_mult) | ||
383 | 828 | else: | ||
384 | 829 | pwidth = sum(event_files[k].cross for k in event_files) | ||
394 | 830 | if pwidth > 1.01 * totwidth: | 890 | if pwidth > 1.01 * totwidth: |
395 | 831 | logger.critical("Branching ratio larger than one for %s " % pdg) | 891 | logger.critical("Branching ratio larger than one for %s " % pdg) |
399 | 832 | br *= (pwidth / totwidth)**nb_mult | 892 | br *= pwidth / totwidth |
400 | 833 | else: | 893 | elif to_decay[pdg] % nb_event == 0: |
401 | 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 |
402 | 895 | # Need to check the number of event file to check if we have to | ||
403 | 896 | # make separate type of decay or not. | ||
404 | 897 | nb_mult = to_decay[pdg] // nb_event | ||
405 | 898 | if nb_mult == len(event_files): | ||
406 | 899 | for k in event_files: | ||
407 | 900 | pwidth = event_files[k].cross | ||
408 | 901 | if pwidth > 1.01 * totwidth: | ||
409 | 902 | logger.critical("Branching ratio larger than one for %s " % pdg) | ||
410 | 903 | br *= pwidth / totwidth | ||
411 | 904 | br *= math.factorial(nb_mult) | ||
412 | 905 | else: | ||
413 | 906 | pwidth = sum(event_files[k].cross for k in event_files) | ||
414 | 907 | if pwidth > 1.01 * totwidth: | ||
415 | 908 | logger.critical("Branching ratio larger than one for %s " % pdg) | ||
416 | 909 | br *= (pwidth / totwidth)**nb_mult | ||
417 | 910 | else: | ||
418 | 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.") | ||
419 | 912 | else: | ||
420 | 913 | br = 1 | ||
421 | 835 | self.branching_ratio = br | 914 | self.branching_ratio = br |
422 | 836 | self.efficiency = 1 | 915 | self.efficiency = 1 |
424 | 837 | self.cross, self.error = self.banner.get_cross(witherror=True) | 916 | try: |
425 | 917 | self.cross, self.error = self.banner.get_cross(witherror=True) | ||
426 | 918 | except: | ||
427 | 919 | if self.options['input_format'] != 'lhe': | ||
428 | 920 | self.cross, self.error = 0, 0 | ||
429 | 838 | self.cross *= br | 921 | self.cross *= br |
430 | 839 | self.error *= br | 922 | self.error *= br |
431 | 840 | 923 | ||
432 | 841 | |||
433 | 842 | # modify the cross-section in the init block of the banner | 924 | # modify the cross-section in the init block of the banner |
437 | 843 | self.banner.scale_init_cross(self.branching_ratio) | 925 | if not self.options['cross_section']: |
438 | 844 | 926 | self.banner.scale_init_cross(self.branching_ratio) | |
439 | 845 | 927 | else: | |
440 | 928 | |||
441 | 929 | if self.options['input_format'] in ['lhe_no_banner','hepmc'] and 'init' not in self.banner: | ||
442 | 930 | self.cross = sum(self.options['cross_section'].values()) | ||
443 | 931 | self.error = 0 | ||
444 | 932 | self.branching_ratio = 1 | ||
445 | 933 | else: | ||
446 | 934 | self.banner.modify_init_cross(self.options['cross_section']) | ||
447 | 935 | new_cross, new_error = self.banner.get_cross(witherror=True) | ||
448 | 936 | self.branching_ratio = new_cross / self.cross | ||
449 | 937 | self.cross = new_cross | ||
450 | 938 | self.error = new_error | ||
451 | 939 | |||
452 | 846 | # 3. Merge the various file together. | 940 | # 3. Merge the various file together. |
455 | 847 | output_lhe = lhe_parser.EventFile(orig_lhe.name.replace('.lhe', '_decayed.lhe.gz'), 'w') | 941 | if self.options['input_format'] == 'hepmc': |
456 | 848 | self.banner.write(output_lhe, close_tag=False) | 942 | name = orig_lhe.name.replace('.hepmc', '_decayed.lhe') |
457 | 943 | if not name.endswith('.gz'): | ||
458 | 944 | name = '%s.gz' % name | ||
459 | 945 | |||
460 | 946 | output_lhe = lhe_parser.EventFile(name, 'w') | ||
461 | 947 | else: | ||
462 | 948 | name = orig_lhe.name.replace('.lhe', '_decayed.lhe') | ||
463 | 949 | if not name.endswith('.gz'): | ||
464 | 950 | name = '%s.gz' % name | ||
465 | 951 | output_lhe = lhe_parser.EventFile(name, 'w') | ||
466 | 952 | try: | ||
467 | 953 | self.banner.write(output_lhe, close_tag=False) | ||
468 | 954 | except Exception: | ||
469 | 955 | if self.options['input_format'] == 'lhe': | ||
470 | 956 | raise | ||
471 | 849 | 957 | ||
472 | 850 | # initialise object which store not use event due to wrong helicity | 958 | # initialise object which store not use event due to wrong helicity |
473 | 851 | bufferedEvents_decay = {} | 959 | bufferedEvents_decay = {} |
474 | @@ -856,8 +964,9 @@ | |||
475 | 856 | start = time.time() | 964 | start = time.time() |
476 | 857 | counter = 0 | 965 | counter = 0 |
477 | 858 | orig_lhe.seek(0) | 966 | orig_lhe.seek(0) |
478 | 967 | |||
479 | 859 | for event in orig_lhe: | 968 | for event in orig_lhe: |
481 | 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: |
482 | 861 | print "decaying event number %s [%s s]" % (counter, time.time()-start) | 970 | print "decaying event number %s [%s s]" % (counter, time.time()-start) |
483 | 862 | counter +=1 | 971 | counter +=1 |
484 | 863 | 972 | ||
485 | @@ -866,9 +975,13 @@ | |||
486 | 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] |
487 | 867 | random.shuffle(particles) | 976 | random.shuffle(particles) |
488 | 868 | ids = [particle.pid for particle in particles] | 977 | ids = [particle.pid for particle in particles] |
489 | 978 | br = 1 #br for that particular events (for special/weighted case) | ||
490 | 979 | hepmc_output = lhe_parser.Event() #for hepmc case: collect the decay particle | ||
491 | 869 | for i,particle in enumerate(particles): | 980 | for i,particle in enumerate(particles): |
492 | 981 | #misc.sprint(i, particle.pdg, particle.pid) | ||
493 | 982 | #misc.sprint(self.final_state, evt_decayfile) | ||
494 | 870 | # check if we need to decay the particle | 983 | # check if we need to decay the particle |
496 | 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): |
497 | 872 | continue # nothing to do for this particle | 985 | continue # nothing to do for this particle |
498 | 873 | # check how the decay need to be done | 986 | # check how the decay need to be done |
499 | 874 | nb_decay = len(evt_decayfile[particle.pdg]) | 987 | nb_decay = len(evt_decayfile[particle.pdg]) |
500 | @@ -893,9 +1006,16 @@ | |||
501 | 893 | decay_file_nb = j | 1006 | decay_file_nb = j |
502 | 894 | else: | 1007 | else: |
503 | 895 | break | 1008 | break |
505 | 896 | 1009 | ||
506 | 1010 | if self.options['new_wgt'] == 'BR': | ||
507 | 1011 | tot_width = float(self.banner.get('param', 'decay', abs(pdg)).value) | ||
508 | 1012 | if tot_width: | ||
509 | 1013 | br = decay_file.cross / tot_width | ||
510 | 897 | # ok start the procedure | 1014 | # ok start the procedure |
512 | 898 | helicity = particle.helicity | 1015 | if hasattr(particle,'helicity'): |
513 | 1016 | helicity = particle.helicity | ||
514 | 1017 | else: | ||
515 | 1018 | helicity = 9 | ||
516 | 899 | bufferedEvents = bufferedEvents_decay[particle.pdg][decay_file_nb] | 1019 | bufferedEvents = bufferedEvents_decay[particle.pdg][decay_file_nb] |
517 | 900 | 1020 | ||
518 | 901 | # now that we have the file to read. find the associate event | 1021 | # now that we have the file to read. find the associate event |
519 | @@ -927,14 +1047,36 @@ | |||
520 | 927 | # only add to the buffering if the buffer is not too large | 1047 | # only add to the buffering if the buffer is not too large |
521 | 928 | bufferedEvents[helicity].append(decay) | 1048 | bufferedEvents[helicity].append(decay) |
522 | 929 | # now that we have the event make the merge | 1049 | # now that we have the event make the merge |
524 | 930 | particle.add_decay(decay) | 1050 | if self.options['input_format'] != 'hepmc': |
525 | 1051 | particle.add_decay(decay) | ||
526 | 1052 | else: | ||
527 | 1053 | if len(hepmc_output) == 0: | ||
528 | 1054 | hepmc_output.append(lhe_parser.Particle(event=hepmc_output)) | ||
529 | 1055 | hepmc_output[0].color2 = 0 | ||
530 | 1056 | decayed_particle = lhe_parser.Particle(particle, hepmc_output) | ||
531 | 1057 | hepmc_output.append(decayed_particle) | ||
532 | 1058 | decayed_particle.add_decay(decay) | ||
533 | 931 | # change the weight associate to the event | 1059 | # change the weight associate to the event |
540 | 932 | event.wgt *= self.branching_ratio | 1060 | if self.options['new_wgt'] == 'cross-section': |
541 | 933 | wgts = event.parse_reweight() | 1061 | event.wgt *= self.branching_ratio |
542 | 934 | for key in wgts: | 1062 | br = self.branching_ratio |
543 | 935 | wgts[key] *= self.branching_ratio | 1063 | else: |
544 | 936 | # all particle have been decay if needed | 1064 | event.wgt *= br |
545 | 937 | output_lhe.write(str(event)) | 1065 | |
546 | 1066 | if self.options['input_format'] != 'hepmc': | ||
547 | 1067 | wgts = event.parse_reweight() | ||
548 | 1068 | for key in wgts: | ||
549 | 1069 | wgts[key] *= br | ||
550 | 1070 | # all particle have been decay if needed | ||
551 | 1071 | output_lhe.write(str(event)) | ||
552 | 1072 | else: | ||
553 | 1073 | hepmc_output.wgt = event.wgt | ||
554 | 1074 | hepmc_output.nexternal = len(hepmc_output) # the append does not update nexternal | ||
555 | 1075 | hepmc_output.assign_mother() | ||
556 | 1076 | output_lhe.write(str(hepmc_output)) | ||
557 | 1077 | else: | ||
558 | 1078 | if counter==0: | ||
559 | 1079 | raise Exception | ||
560 | 938 | output_lhe.write('</LesHouchesEvents>\n') | 1080 | output_lhe.write('</LesHouchesEvents>\n') |
561 | 939 | 1081 | ||
562 | 940 | 1082 | ||
563 | @@ -971,7 +1113,7 @@ | |||
564 | 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) |
565 | 972 | to generate events according to cross-section | 1114 | to generate events according to cross-section |
566 | 973 | """ | 1115 | """ |
568 | 974 | 1116 | nb_event = int(nb_event) # in case of hepmc request the nb_event is not an integer | |
569 | 975 | if cumul: | 1117 | if cumul: |
570 | 976 | width = 0. | 1118 | width = 0. |
571 | 977 | else: | 1119 | else: |
572 | @@ -1016,18 +1158,18 @@ | |||
573 | 1016 | logger.debug(error) | 1158 | logger.debug(error) |
574 | 1017 | pass | 1159 | pass |
575 | 1018 | if self.options["run_card"]: | 1160 | if self.options["run_card"]: |
577 | 1019 | run_card = self.options["run_card"] | 1161 | run_card = self.run_card |
578 | 1020 | else: | 1162 | else: |
579 | 1021 | run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat")) | 1163 | run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat")) |
580 | 1022 | 1164 | ||
582 | 1023 | run_card["iseed"] = self.seed | 1165 | run_card["iseed"] = self.options['seed'] |
583 | 1024 | run_card['gridpack'] = True | 1166 | run_card['gridpack'] = True |
584 | 1025 | run_card['systematics_program'] = 'False' | 1167 | run_card['systematics_program'] = 'False' |
585 | 1026 | run_card['use_syst'] = False | 1168 | run_card['use_syst'] = False |
586 | 1027 | run_card.write(pjoin(decay_dir, "Cards", "run_card.dat")) | 1169 | run_card.write(pjoin(decay_dir, "Cards", "run_card.dat")) |
587 | 1028 | param_card = self.banner['slha'] | 1170 | param_card = self.banner['slha'] |
588 | 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) |
590 | 1030 | self.seed += 1 | 1172 | self.options['seed'] += 1 |
591 | 1031 | # actually creation | 1173 | # actually creation |
592 | 1032 | me5_cmd.exec_cmd("generate_events run_01 -f") | 1174 | me5_cmd.exec_cmd("generate_events run_01 -f") |
593 | 1033 | if output_width: | 1175 | if output_width: |
594 | @@ -1057,10 +1199,16 @@ | |||
595 | 1057 | logger.debug(error) | 1199 | logger.debug(error) |
596 | 1058 | pass | 1200 | pass |
597 | 1059 | if self.options["run_card"]: | 1201 | if self.options["run_card"]: |
599 | 1060 | run_card = self.options["run_card"] | 1202 | run_card = self.run_card |
600 | 1061 | else: | 1203 | else: |
601 | 1062 | run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat")) | 1204 | run_card = banner.RunCard(pjoin(decay_dir, "Cards", "run_card.dat")) |
602 | 1063 | run_card["nevents"] = int(1.2*nb_event) | 1205 | run_card["nevents"] = int(1.2*nb_event) |
603 | 1206 | # Handle the banner of the output file | ||
604 | 1207 | if not self.seed: | ||
605 | 1208 | self.seed = random.randint(0, int(30081*30081)) | ||
606 | 1209 | self.do_set('seed %s' % self.seed) | ||
607 | 1210 | logger.info('Will use seed %s' % self.seed) | ||
608 | 1211 | self.history.insert(0, 'set seed %s' % self.seed) | ||
609 | 1064 | run_card["iseed"] = self.seed | 1212 | run_card["iseed"] = self.seed |
610 | 1065 | run_card["systematics_program"] = 'None' | 1213 | run_card["systematics_program"] = 'None' |
611 | 1066 | run_card.write(pjoin(decay_dir, "Cards", "run_card.dat")) | 1214 | run_card.write(pjoin(decay_dir, "Cards", "run_card.dat")) |
612 | @@ -1140,8 +1288,7 @@ | |||
613 | 1140 | if particle.status == 1 and particle.pdg in asked_to_decay: | 1288 | if particle.status == 1 and particle.pdg in asked_to_decay: |
614 | 1141 | # final state and tag as to decay | 1289 | # final state and tag as to decay |
615 | 1142 | to_decay[particle.pdg] += 1 | 1290 | to_decay[particle.pdg] += 1 |
618 | 1143 | #misc.sprint(to_decay) | 1291 | |
617 | 1144 | #misc.sprint("import the mode -> temporary with logging") | ||
619 | 1145 | with misc.MuteLogger(["madgraph", "madevent", "ALOHA", "cmdprint"], [50,50,50,50]): | 1292 | with misc.MuteLogger(["madgraph", "madevent", "ALOHA", "cmdprint"], [50,50,50,50]): |
620 | 1146 | mg5 = self.mg5cmd | 1293 | mg5 = self.mg5cmd |
621 | 1147 | if not self.model: | 1294 | if not self.model: |
622 | @@ -1436,10 +1583,6 @@ | |||
623 | 1436 | full_event = lhe_parser.Event(str(production)) | 1583 | full_event = lhe_parser.Event(str(production)) |
624 | 1437 | full_event = full_event.add_decays(decays) | 1584 | full_event = full_event.add_decays(decays) |
625 | 1438 | full_me = self.calculate_matrix_element(full_event) | 1585 | full_me = self.calculate_matrix_element(full_event) |
626 | 1439 | #misc.sprint(full_event) | ||
627 | 1440 | #misc.sprint([p.pdg for p in production]) | ||
628 | 1441 | #misc.sprint([p.pdg for p in full_event]) | ||
629 | 1442 | #misc.sprint(full_me, production_me, decay_me) | ||
630 | 1443 | return full_event, full_me/(production_me*decay_me) | 1586 | return full_event, full_me/(production_me*decay_me) |
631 | 1444 | 1587 | ||
632 | 1445 | 1588 | ||
633 | @@ -1457,7 +1600,6 @@ | |||
634 | 1457 | init = (-init[0],) | 1600 | init = (-init[0],) |
635 | 1458 | final = tuple(-i for i in final) | 1601 | final = tuple(-i for i in final) |
636 | 1459 | tag = (init, final) | 1602 | tag = (init, final) |
637 | 1460 | misc.sprint([k for k in self.all_me.keys() if len(k[0])==1]) | ||
638 | 1461 | orig_order = self.all_me[tag]['order'] | 1603 | orig_order = self.all_me[tag]['order'] |
639 | 1462 | 1604 | ||
640 | 1463 | pdir = self.all_me[tag]['pdir'] | 1605 | pdir = self.all_me[tag]['pdir'] |
641 | @@ -1520,7 +1662,6 @@ | |||
642 | 1520 | 1662 | ||
643 | 1521 | rwgt_interface.ReweightInterface.get_LO_definition_from_NLO() | 1663 | rwgt_interface.ReweightInterface.get_LO_definition_from_NLO() |
644 | 1522 | 1664 | ||
645 | 1523 | |||
646 | 1524 | 1665 | ||
647 | 1525 | 1666 | ||
648 | 1526 | if __name__ == '__main__': | 1667 | if __name__ == '__main__': |
649 | 1527 | 1668 | ||
650 | === modified file 'MadSpin/madspin' | |||
651 | --- MadSpin/madspin 2013-11-12 23:52:05 +0000 | |||
652 | +++ MadSpin/madspin 2018-06-15 08:18:50 +0000 | |||
653 | @@ -49,6 +49,7 @@ | |||
654 | 49 | if len(args) == 0: | 49 | if len(args) == 0: |
655 | 50 | args = '' | 50 | args = '' |
656 | 51 | 51 | ||
657 | 52 | |||
658 | 52 | import subprocess | 53 | import subprocess |
659 | 53 | 54 | ||
660 | 54 | # Check if optimize mode is (and should be) activated | 55 | # Check if optimize mode is (and should be) activated |
661 | @@ -114,23 +115,6 @@ | |||
662 | 114 | pass | 115 | pass |
663 | 115 | import MadSpin.interface_madspin as interface | 116 | import MadSpin.interface_madspin as interface |
664 | 116 | 117 | ||
665 | 117 | try: | ||
666 | 118 | cmd_line = interface.MadSpinInterface() | ||
667 | 119 | cmd_line.use_rawinput = True | ||
668 | 120 | cmd_line.cmdloop() | ||
669 | 121 | except: | ||
670 | 122 | pass | ||
671 | 123 | try: | ||
672 | 124 | cmd_line.exec_cmd('quit all', printcmd=False) | ||
673 | 125 | readline.set_history_length(100) | ||
674 | 126 | if not os.path.exists(os.path.join(os.environ['HOME'], '.mg5')): | ||
675 | 127 | os.mkdir(os.path.join(os.environ['HOME'], '.mg5')) | ||
676 | 128 | readline.write_history_file(history_file) | ||
677 | 129 | except Exception, error: | ||
678 | 130 | pass | ||
679 | 131 | |||
680 | 132 | sys.exit(0) | ||
681 | 133 | |||
682 | 134 | # Call the cmd interface main loop | 118 | # Call the cmd interface main loop |
683 | 135 | try: | 119 | try: |
684 | 136 | if options.file or args: | 120 | if options.file or args: |
685 | @@ -143,12 +127,14 @@ | |||
686 | 143 | cmd_line = interface.MasterCmdWeb() | 127 | cmd_line = interface.MasterCmdWeb() |
687 | 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') |
688 | 145 | cmd_line.use_rawinput = False | 129 | cmd_line.use_rawinput = False |
690 | 146 | cmd_line.run_cmd('import ' + input_file) | 130 | cmd_line.import_command_file(input_file) |
691 | 147 | cmd_line.run_cmd('quit') | 131 | cmd_line.run_cmd('quit') |
692 | 148 | else: | 132 | else: |
693 | 133 | print "using input+file", input_file | ||
694 | 149 | cmd_line = interface.MadSpinInterface() | 134 | cmd_line = interface.MadSpinInterface() |
695 | 150 | cmd_line.use_rawinput = False | 135 | cmd_line.use_rawinput = False |
697 | 151 | cmd_line.run_cmd('import ' + input_file) | 136 | cmd_line.haspiping = False |
698 | 137 | cmd_line.import_command_file(input_file) | ||
699 | 152 | cmd_line.run_cmd('quit') | 138 | cmd_line.run_cmd('quit') |
700 | 153 | else: | 139 | else: |
701 | 154 | # Interactive mode | 140 | # Interactive mode |
702 | @@ -160,8 +146,20 @@ | |||
703 | 160 | cmd_line = interface.MasterCmdWeb() | 146 | cmd_line = interface.MasterCmdWeb() |
704 | 161 | cmd_line.cmdloop() | 147 | cmd_line.cmdloop() |
705 | 162 | else: | 148 | else: |
708 | 163 | cmd_line = interface.MasterCmd(mgme_dir = options.mgme_dir) | 149 | try: |
709 | 164 | cmd_line.cmdloop() | 150 | cmd_line = interface.MadSpinInterface() |
710 | 151 | cmd_line.use_rawinput = True | ||
711 | 152 | cmd_line.cmdloop() | ||
712 | 153 | except: | ||
713 | 154 | pass | ||
714 | 155 | try: | ||
715 | 156 | cmd_line.exec_cmd('quit all', printcmd=False) | ||
716 | 157 | readline.set_history_length(100) | ||
717 | 158 | if not os.path.exists(os.path.join(os.environ['HOME'], '.mg5')): | ||
718 | 159 | os.mkdir(os.path.join(os.environ['HOME'], '.mg5')) | ||
719 | 160 | readline.write_history_file(history_file) | ||
720 | 161 | except Exception, error: | ||
721 | 162 | pass | ||
722 | 165 | except KeyboardInterrupt: | 163 | except KeyboardInterrupt: |
723 | 166 | print 'writting history and quit on KeyboardInterrupt' | 164 | print 'writting history and quit on KeyboardInterrupt' |
724 | 167 | pass | 165 | pass |
725 | 168 | 166 | ||
726 | === modified file 'Template/LO/Cards/run_card.dat' | |||
727 | --- Template/LO/Cards/run_card.dat 2018-04-25 21:20:23 +0000 | |||
728 | +++ Template/LO/Cards/run_card.dat 2018-06-15 08:18:50 +0000 | |||
729 | @@ -12,7 +12,7 @@ | |||
730 | 12 | # mind the format: value = variable ! comment * | 12 | # mind the format: value = variable ! comment * |
731 | 13 | # * | 13 | # * |
732 | 14 | # To display more options, you can type the command: * | 14 | # To display more options, you can type the command: * |
734 | 15 | * update full_run_card * | 15 | # update full_run_card * |
735 | 16 | #********************************************************************* | 16 | #********************************************************************* |
736 | 17 | # | 17 | # |
737 | 18 | #******************* | 18 | #******************* |
738 | 19 | 19 | ||
739 | === modified file 'Template/LO/SubProcesses/genps.f' | |||
740 | --- Template/LO/SubProcesses/genps.f 2018-04-20 08:38:20 +0000 | |||
741 | +++ Template/LO/SubProcesses/genps.f 2018-06-15 08:18:50 +0000 | |||
742 | @@ -104,7 +104,7 @@ | |||
743 | 104 | c | 104 | c |
744 | 105 | integer iconfig,mincfig,maxcfig,invar | 105 | integer iconfig,mincfig,maxcfig,invar |
745 | 106 | double precision p1(0:3,nexternal+1) | 106 | double precision p1(0:3,nexternal+1) |
747 | 107 | double precision x(maxinvar) | 107 | double precision x(*) |
748 | 108 | double precision wgt | 108 | double precision wgt |
749 | 109 | c | 109 | c |
750 | 110 | c Local | 110 | c Local |
751 | @@ -279,19 +279,18 @@ | |||
752 | 279 | cm_rap=.5d0*dlog((p0+p3)/(p0-p3)) | 279 | cm_rap=.5d0*dlog((p0+p3)/(p0-p3)) |
753 | 280 | set_cm_rap=.true. | 280 | set_cm_rap=.true. |
754 | 281 | c Set shat | 281 | c Set shat |
757 | 282 | s(-nbranch) = m2**2+2*xbk(1)*ebeam(1) * | 282 | s(-nbranch) = x(ndim)*stot |
756 | 283 | $ (ebeam(2)+sqrt(ebeam(2)**2-m2**2)) | ||
758 | 284 | elseif (abs(lpp(2)) .ge. 1) then | 283 | elseif (abs(lpp(2)) .ge. 1) then |
759 | 285 | call sample_get_x(sjac,x(ndim),ndim,mincfig,0d0,1d0) | 284 | call sample_get_x(sjac,x(ndim),ndim,mincfig,0d0,1d0) |
760 | 286 | xbk(2) = x(ndim) | 285 | xbk(2) = x(ndim) |
761 | 286 | |||
762 | 287 | c Set CM rapidity for use in the rap() function | 287 | c Set CM rapidity for use in the rap() function |
763 | 288 | p0=ebeam(1)+xbk(2)*ebeam(2) | 288 | p0=ebeam(1)+xbk(2)*ebeam(2) |
764 | 289 | p3=sqrt(ebeam(1)**2-m1**2)-xbk(2)*ebeam(2) | 289 | p3=sqrt(ebeam(1)**2-m1**2)-xbk(2)*ebeam(2) |
765 | 290 | cm_rap=.5d0*dlog((p0+p3)/(p0-p3)) | 290 | cm_rap=.5d0*dlog((p0+p3)/(p0-p3)) |
766 | 291 | set_cm_rap=.true. | 291 | set_cm_rap=.true. |
767 | 292 | c Set shat | 292 | c Set shat |
770 | 293 | s(-nbranch) = m1**2+2*(ebeam(1)+sqrt(ebeam(1)**2-m1**2)) | 293 | s(-nbranch) = x(ndim)*stot |
769 | 294 | $ * xbk(2)*ebeam(2) | ||
771 | 295 | else | 294 | else |
772 | 296 | c Set CM rapidity for use in the rap() function | 295 | c Set CM rapidity for use in the rap() function |
773 | 297 | p0=ebeam(1) + ebeam(2) | 296 | p0=ebeam(1) + ebeam(2) |
774 | @@ -663,7 +662,7 @@ | |||
775 | 663 | c double precision spole(-max_branch:0),swidth(-max_branch:0) | 662 | c double precision spole(-max_branch:0),swidth(-max_branch:0) |
776 | 664 | double precision jac,pswgt | 663 | double precision jac,pswgt |
777 | 665 | integer nbranch | 664 | integer nbranch |
779 | 666 | double precision x(40) ! ja 3/2/11 21->40 after strange segfault | 665 | double precision x(*) ! ja 3/2/11 21->40 after strange segfault |
780 | 667 | c | 666 | c |
781 | 668 | c Local | 667 | c Local |
782 | 669 | c | 668 | c |
783 | 670 | 669 | ||
784 | === modified file 'Template/LO/SubProcesses/reweight.f' | |||
785 | --- Template/LO/SubProcesses/reweight.f 2018-03-11 12:29:51 +0000 | |||
786 | +++ Template/LO/SubProcesses/reweight.f 2018-06-15 08:18:50 +0000 | |||
787 | @@ -1,3 +1,20 @@ | |||
788 | 1 | c for cross-checking change in this file. | ||
789 | 2 | c here is a minimal list of process that we have to | ||
790 | 3 | c test | ||
791 | 4 | c | ||
792 | 5 | c SM | ||
793 | 6 | c ---- | ||
794 | 7 | c p p > t t~ (up to 2jet) | ||
795 | 8 | c p p > w+ (up to 3 jet) | ||
796 | 9 | c p p > z t t~ j j (no MLM needed) | ||
797 | 10 | c | ||
798 | 11 | c | ||
799 | 12 | c HEFT | ||
800 | 13 | c ---- | ||
801 | 14 | c p p > h j b b~ | ||
802 | 15 | c q q > a a g q q | ||
803 | 16 | c g g > h g q q | ||
804 | 17 | |||
805 | 1 | double precision function gamma(q0) | 18 | double precision function gamma(q0) |
806 | 2 | c************************************************** | 19 | c************************************************** |
807 | 3 | c calculates the branching probability | 20 | c calculates the branching probability |
808 | @@ -522,7 +539,8 @@ | |||
809 | 522 | common/to_stot/stot,m1,m2 | 539 | common/to_stot/stot,m1,m2 |
810 | 523 | 540 | ||
811 | 524 | C local variables | 541 | C local variables |
813 | 525 | integer i, j, idi, idj, k | 542 | integer i, j, idi, idj, k,m |
814 | 543 | integer get_color | ||
815 | 526 | real*8 PI | 544 | real*8 PI |
816 | 527 | parameter( PI = 3.14159265358979323846d0 ) | 545 | parameter( PI = 3.14159265358979323846d0 ) |
817 | 528 | integer iforest(2,-max_branch:-1,lmaxconfigs) | 546 | integer iforest(2,-max_branch:-1,lmaxconfigs) |
818 | @@ -545,6 +563,7 @@ | |||
819 | 545 | logical chclusold,fail,increasecode | 563 | logical chclusold,fail,increasecode |
820 | 546 | save chclusold | 564 | save chclusold |
821 | 547 | integer tmpindex | 565 | integer tmpindex |
822 | 566 | integer pdgm, pdgid1, pdgid2 | ||
823 | 548 | 567 | ||
824 | 549 | logical isqcd,isjet,isparton,cluster,isjetvx,is_octet | 568 | logical isqcd,isjet,isparton,cluster,isjetvx,is_octet |
825 | 550 | integer ifsno | 569 | integer ifsno |
826 | @@ -746,8 +765,17 @@ | |||
827 | 746 | c The ishft gives the FS particle corresponding to imocl | 765 | c The ishft gives the FS particle corresponding to imocl |
828 | 747 | if(.not.is_octet(ipdgcl(ishft(1,ipart(1,imocl(n))-1),igraphs(1),iproc)))then | 766 | if(.not.is_octet(ipdgcl(ishft(1,ipart(1,imocl(n))-1),igraphs(1),iproc)))then |
829 | 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) |
832 | 749 | if (ipart(2,imocl(n)).eq.0) then ! q a > q case | 768 | ! also check for case of three scalar interaction (then do nothing) |
833 | 750 | iqjets(ipart(1,imocl(n)))=0 | 769 | pdgm = ipdgcl(imocl(n),igraphs(1),iproc) |
834 | 770 | pdgid1 = ipdgcl(idacl(n,1),igraphs(1),iproc) | ||
835 | 771 | pdgid2 = ipdgcl(idacl(n,2),igraphs(1),iproc) | ||
836 | 772 | |||
837 | 773 | if (.not.isqcd(pdgm).and..not.isqcd(pdgid1).and..not.isqcd(pdgid2)) then | ||
838 | 774 | ! this is to avoid to do weird stuff for w+ w- z (or h h h) | ||
839 | 775 | ! this fix an issue for qq_zttxqq G1594.08 | ||
840 | 776 | continue | ||
841 | 777 | elseif (ipart(2,imocl(n)).eq.0) then ! q a > q case | ||
842 | 778 | iqjets(ipart(1,imocl(n)))=0 | ||
843 | 751 | else ! octet. want to be sure that both are tagged as jet before removing one | 779 | else ! octet. want to be sure that both are tagged as jet before removing one |
844 | 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. |
845 | 753 | ! at least one of the two should be kept as jet | 781 | ! at least one of the two should be kept as jet |
846 | @@ -791,7 +819,57 @@ | |||
847 | 791 | goodjet(imocl(n))= | 819 | goodjet(imocl(n))= |
848 | 792 | $ (isjet(ipdgcl(imocl(n),igraphs(1),iproc)).and. | 820 | $ (isjet(ipdgcl(imocl(n),igraphs(1),iproc)).and. |
849 | 793 | $ goodjet(idacl(n,1)).and.goodjet(idacl(n,2))) | 821 | $ goodjet(idacl(n,1)).and.goodjet(idacl(n,2))) |
851 | 794 | endif | 822 | |
852 | 823 | c check case with g > g g | ||
853 | 824 | c where the hardest gluon is not goodjet but the other is. | ||
854 | 825 | c in that case change ipart(1,) of the mother gluon | ||
855 | 826 | c pure QCD jet | ||
856 | 827 | c need to take care of the following case: | ||
857 | 828 | c tttttttttt | ||
858 | 829 | c gggggggggggggggg | ||
859 | 830 | c ggggggggg tttttttttt | ||
860 | 831 | c gggggggg | ||
861 | 832 | c | ||
862 | 833 | c in that case the up gluon can be tag as the hardest one | ||
863 | 834 | c but this one is also lead to no QCD one. | ||
864 | 835 | c so in that case we have to change ipart(1) to the sofest gluon | ||
865 | 836 | pdgm = ipdgcl(imocl(n),igraphs(1),iproc) | ||
866 | 837 | pdgid1 = ipdgcl(idacl(n,1),igraphs(1),iproc) | ||
867 | 838 | pdgid2 = ipdgcl(idacl(n,2),igraphs(1),iproc) | ||
868 | 839 | if (is_octet(pdgm).and.is_octet(pdgid1).and.is_octet(pdgid2))then | ||
869 | 840 | c write(*,*) 'pure QCD vertex (2)' | ||
870 | 841 | c write(*,*) pdgm , '>', pdgid1,' ', pdgid2 | ||
871 | 842 | c write(*,*) 'ipart', ipart(1,imocl(n)), ipart(2,imocl(n)) | ||
872 | 843 | c write(*,*) 'id', imocl(n), idacl(n,1),idacl(n,2) | ||
873 | 844 | c write(*,*) 'ipart',ipart(1,imocl(n)),'/', ipart(2,imocl(n)), ipart(1,idacl(n,1)),'/', ipart(2,idacl(n,1)), | ||
874 | 845 | c $ ipart(1,idacl(n,2)),'/', ipart(2,idacl(n,2)) | ||
875 | 846 | c write(*,*) 'googjet', goodjet(idacl(n,1)),goodjet(idacl(n,2)) | ||
876 | 847 | if (ipart(1,imocl(n)).eq.ipart(1, idacl(n,1))) then | ||
877 | 848 | if (.not.goodjet(idacl(n,1)).and.goodjet(idacl(n,2))) then | ||
878 | 849 | c write(*,*) 'ggg with hard jet set a QED the second jet lead to', ipart(1,idacl(n,2)), ipart(2,idacl(n,2)) | ||
879 | 850 | do m =n_max_cl,n,-1 | ||
880 | 851 | if(ipart(1,m).eq.ipart(1,imocl(n)).and.ipart(2,m).eq.ipart(2,imocl(n)))then | ||
881 | 852 | ipart(1,m) = ipart(1,idacl(n,2)) | ||
882 | 853 | ipart(2,m) = ipart(2,idacl(n,2)) | ||
883 | 854 | endif | ||
884 | 855 | enddo | ||
885 | 856 | endif | ||
886 | 857 | else | ||
887 | 858 | if (.not.goodjet(idacl(n,2)).and.goodjet(idacl(n,1))) then | ||
888 | 859 | c write(*,*) 'ggg with hard jet set a QED the second jet lead to', ipart(1,idacl(n,1)), ipart(2,idacl(n,1)) | ||
889 | 860 | do m =n_max_cl,n,-1 | ||
890 | 861 | if(ipart(1,m).eq.ipart(1,imocl(n)).and.ipart(2,m).eq.ipart(2,imocl(n)))then | ||
891 | 862 | ipart(1,m) = ipart(1,idacl(n,1)) | ||
892 | 863 | ipart(2,m) = ipart(2,idacl(n,1)) | ||
893 | 864 | endif | ||
894 | 865 | enddo | ||
895 | 866 | endif | ||
896 | 867 | endif | ||
897 | 868 | endif | ||
898 | 869 | |||
899 | 870 | |||
900 | 871 | |||
901 | 872 | endif | ||
902 | 795 | enddo | 873 | enddo |
903 | 796 | 874 | ||
904 | 797 | if (btest(mlevel,4))then | 875 | if (btest(mlevel,4))then |
905 | 798 | 876 | ||
906 | === modified file 'Template/NLO/SubProcesses/montecarlocounter.f' | |||
907 | --- Template/NLO/SubProcesses/montecarlocounter.f 2017-12-16 08:06:58 +0000 | |||
908 | +++ Template/NLO/SubProcesses/montecarlocounter.f 2018-06-15 08:18:50 +0000 | |||
909 | @@ -19,7 +19,7 @@ | |||
910 | 19 | logical notagluon,found | 19 | logical notagluon,found |
911 | 20 | common/cnotagluon/notagluon | 20 | common/cnotagluon/notagluon |
912 | 21 | integer nglu,nsngl | 21 | integer nglu,nsngl |
914 | 22 | logical isspecial,isspecial0 | 22 | logical isspecial(max_bcol) |
915 | 23 | common/cisspecial/isspecial | 23 | common/cisspecial/isspecial |
916 | 24 | logical spec_case | 24 | logical spec_case |
917 | 25 | c | 25 | c |
918 | @@ -68,9 +68,9 @@ | |||
919 | 68 | 68 | ||
920 | 69 | fksfather=min(i_fks,j_fks) | 69 | fksfather=min(i_fks,j_fks) |
921 | 70 | 70 | ||
925 | 71 | c isspecial will be set equal to .true. only if the father is a gluon, | 71 | c isspecial will be set equal to .true. colour flow by colour flow only |
926 | 72 | c and another gluon will be found which is connected to it by both | 72 | c if the father is a gluon, and another gluon will be found which is |
927 | 73 | c colour and anticolour | 73 | c connected to it by both colour and anticolour |
928 | 74 | isspecial=.false. | 74 | isspecial=.false. |
929 | 75 | c | 75 | c |
930 | 76 | c consider only leading colour flows | 76 | c consider only leading colour flows |
931 | @@ -89,7 +89,6 @@ | |||
932 | 89 | do i=1,max_bcol | 89 | do i=1,max_bcol |
933 | 90 | if(.not.is_leading_cflow(i))cycle | 90 | if(.not.is_leading_cflow(i))cycle |
934 | 91 | c Loop over Born-level colour flows | 91 | c Loop over Born-level colour flows |
935 | 92 | isspecial0=.false. | ||
936 | 93 | c nglu and nsngl are the number of gluons (except for the father) and of | 92 | c nglu and nsngl are the number of gluons (except for the father) and of |
937 | 94 | c colour singlets in the Born process, according to the information | 93 | c colour singlets in the Born process, according to the information |
938 | 95 | c stored in ICOLUP | 94 | c stored in ICOLUP |
939 | @@ -178,19 +177,18 @@ | |||
940 | 178 | stop | 177 | stop |
941 | 179 | endif | 178 | endif |
942 | 180 | colorflow(k0,colorflow(k0,0))=i | 179 | colorflow(k0,colorflow(k0,0))=i |
944 | 181 | isspecial0=.true. | 180 | isspecial(i)=.true. |
945 | 182 | endif | 181 | endif |
946 | 183 | endif | 182 | endif |
947 | 184 | enddo | 183 | enddo |
948 | 185 | endif | 184 | endif |
949 | 186 | enddo | 185 | enddo |
950 | 187 | if( ((nglu+nsngl).gt.(nexternal-2)) .or. | 186 | if( ((nglu+nsngl).gt.(nexternal-2)) .or. |
952 | 188 | # (isspecial0.and.(nglu+nsngl).ne.(nexternal-2)) )then | 187 | # (isspecial(i).and.(nglu+nsngl).ne.(nexternal-2)) )then |
953 | 189 | write(*,*)'Error #4 in set_matrices' | 188 | write(*,*)'Error #4 in set_matrices' |
955 | 190 | write(*,*)isspecial0,nglu,nsngl | 189 | write(*,*)isspecial(i),nglu,nsngl |
956 | 191 | stop | 190 | stop |
957 | 192 | endif | 191 | endif |
958 | 193 | isspecial=isspecial.or.isspecial0 | ||
959 | 194 | enddo | 192 | enddo |
960 | 195 | call check_mc_matrices | 193 | call check_mc_matrices |
961 | 196 | return | 194 | return |
962 | @@ -213,7 +211,7 @@ | |||
963 | 213 | common/cfksfather/fksfather | 211 | common/cfksfather/fksfather |
964 | 214 | logical notagluon | 212 | logical notagluon |
965 | 215 | common/cnotagluon/notagluon | 213 | common/cnotagluon/notagluon |
967 | 216 | logical isspecial | 214 | logical isspecial(max_bcol) |
968 | 217 | common/cisspecial/isspecial | 215 | common/cisspecial/isspecial |
969 | 218 | logical is_leading_cflow(max_bcol) | 216 | logical is_leading_cflow(max_bcol) |
970 | 219 | integer num_leading_cflows | 217 | integer num_leading_cflows |
971 | @@ -275,8 +273,8 @@ | |||
972 | 275 | c | 273 | c |
973 | 276 | if( (notagluon.and.ntot.ne.num_leading_cflows) .or. | 274 | if( (notagluon.and.ntot.ne.num_leading_cflows) .or. |
974 | 277 | # ( (.not.notagluon).and. | 275 | # ( (.not.notagluon).and. |
977 | 278 | # ( (.not.isspecial).and.ntot.ne.(2*num_leading_cflows) .or. | 276 | # ( (.not.isspecial(1)).and.ntot.ne.(2*num_leading_cflows) .or. |
978 | 279 | # (isspecial.and.ntot.ne.num_leading_cflows) ) ) )then | 277 | # (isspecial(1).and.ntot.ne.num_leading_cflows) ) ) )then |
979 | 280 | write(*,*)'Error #6 in check_mc_matrices', | 278 | write(*,*)'Error #6 in check_mc_matrices', |
980 | 281 | # notagluon,ntot,num_leading_cflows,max_bcol | 279 | # notagluon,ntot,num_leading_cflows,max_bcol |
981 | 282 | stop | 280 | stop |
982 | @@ -429,7 +427,7 @@ | |||
983 | 429 | 427 | ||
984 | 430 | integer ipartners(0:nexternal-1),colorflow(nexternal-1,0:max_bcol) | 428 | integer ipartners(0:nexternal-1),colorflow(nexternal-1,0:max_bcol) |
985 | 431 | common /MC_info/ ipartners,colorflow | 429 | common /MC_info/ ipartners,colorflow |
987 | 432 | logical isspecial | 430 | logical isspecial(max_bcol) |
988 | 433 | common/cisspecial/isspecial | 431 | common/cisspecial/isspecial |
989 | 434 | 432 | ||
990 | 435 | integer fksfather | 433 | integer fksfather |
991 | @@ -633,7 +631,6 @@ | |||
992 | 633 | c go --> go g | 631 | c go --> go g |
993 | 634 | if(ileg.le.2)then | 632 | if(ileg.le.2)then |
994 | 635 | N_p=2 | 633 | N_p=2 |
995 | 636 | if(isspecial)N_p=1 | ||
996 | 637 | if(limit)then | 634 | if(limit)then |
997 | 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) |
998 | 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) |
999 | @@ -650,7 +647,6 @@ | |||
1000 | 650 | c | 647 | c |
1001 | 651 | elseif(ileg.eq.3)then | 648 | elseif(ileg.eq.3)then |
1002 | 652 | N_p=2 | 649 | N_p=2 |
1003 | 653 | if(isspecial)N_p=1 | ||
1004 | 654 | if(non_limit)then | 650 | if(non_limit)then |
1005 | 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) |
1006 | 656 | prefact=2/(s*N_p) | 652 | prefact=2/(s*N_p) |
1007 | @@ -661,7 +657,6 @@ | |||
1008 | 661 | c | 657 | c |
1009 | 662 | elseif(ileg.eq.4)then | 658 | elseif(ileg.eq.4)then |
1010 | 663 | N_p=2 | 659 | N_p=2 |
1011 | 664 | if(isspecial)N_p=1 | ||
1012 | 665 | if(limit)then | 660 | if(limit)then |
1013 | 666 | xkern(1)=(g**2/N_p)*( 8*vca* | 661 | xkern(1)=(g**2/N_p)*( 8*vca* |
1014 | 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 )/ |
1015 | @@ -697,7 +692,6 @@ | |||
1016 | 697 | c | 692 | c |
1017 | 698 | elseif(ileg.eq.4)then | 693 | elseif(ileg.eq.4)then |
1018 | 699 | N_p=2 | 694 | N_p=2 |
1019 | 700 | if(isspecial)N_p=1 | ||
1020 | 701 | if(limit)then | 695 | if(limit)then |
1021 | 702 | xkern(1)=(g**2/N_p)*( 4*vtf*(1-x)* | 696 | xkern(1)=(g**2/N_p)*( 4*vtf*(1-x)* |
1022 | 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) )/ |
1023 | @@ -730,7 +724,6 @@ | |||
1024 | 730 | c a --> a q | 724 | c a --> a q |
1025 | 731 | if(ileg.le.2)then | 725 | if(ileg.le.2)then |
1026 | 732 | N_p=2 | 726 | N_p=2 |
1027 | 733 | if(isspecial)N_p=1 | ||
1028 | 734 | if(limit)then | 727 | if(limit)then |
1029 | 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) |
1030 | 736 | xkern(2)=xkern(1)*(g_ew**2/g**2)*(qi2/vcf) | 729 | xkern(2)=xkern(1)*(g_ew**2/g**2)*(qi2/vcf) |
1031 | @@ -925,8 +918,10 @@ | |||
1032 | 925 | xkernazi(i)=xkernazi(i)*gfactazi*gfactsf*wcc | 918 | xkernazi(i)=xkernazi(i)*gfactazi*gfactsf*wcc |
1033 | 926 | enddo | 919 | enddo |
1034 | 927 | do cflows=1,colorflow(npartner,0) | 920 | do cflows=1,colorflow(npartner,0) |
1037 | 928 | born_red=born_red+bornbars(colorflow(npartner,cflows)) | 921 | N_p=1 |
1038 | 929 | born_red_tilde=born_red_tilde+bornbarstilde(colorflow(npartner,cflows)) | 922 | if(isspecial(cflows))N_p=2d0 |
1039 | 923 | born_red=born_red+N_p*bornbars(colorflow(npartner,cflows)) | ||
1040 | 924 | born_red_tilde=born_red_tilde+N_p*bornbarstilde(colorflow(npartner,cflows)) | ||
1041 | 930 | enddo | 925 | enddo |
1042 | 931 | c Change here, to include also xkern(2)! | 926 | c Change here, to include also xkern(2)! |
1043 | 932 | xmcxsec(npartner)=xkern(1)*born_red+xkernazi(1)*born_red_tilde | 927 | xmcxsec(npartner)=xkern(1)*born_red+xkernazi(1)*born_red_tilde |
1044 | @@ -1207,26 +1202,58 @@ | |||
1045 | 1207 | 1202 | ||
1046 | 1208 | 1203 | ||
1047 | 1209 | function gfunction(w,alpha,beta,delta) | 1204 | function gfunction(w,alpha,beta,delta) |
1049 | 1210 | c Gets smoothly to 0 as w goes to 1 | 1205 | c Gets smoothly to 0 as w goes to 1. |
1050 | 1206 | c Call with | ||
1051 | 1207 | c alpha > 1, or alpha < 0; if alpha < 0, gfunction = 1; | ||
1052 | 1208 | c 0 < |beta| <= 1; | ||
1053 | 1209 | c 0 < delta <= 2. | ||
1054 | 1211 | implicit none | 1210 | implicit none |
1055 | 1211 | double precision tiny | ||
1056 | 1212 | parameter (tiny=1.d-5) | ||
1057 | 1212 | double precision gfunction,alpha,beta,delta,w,wmin,wg,tt,tmp | 1213 | double precision gfunction,alpha,beta,delta,w,wmin,wg,tt,tmp |
1070 | 1213 | 1214 | logical firsttime | |
1071 | 1214 | if(beta.lt.0d0)then | 1215 | save firsttime |
1072 | 1215 | wmin=0d0 | 1216 | data firsttime /.true./ |
1073 | 1216 | else | 1217 | double precision cutoff,cutoff2 |
1074 | 1217 | wmin=max(0d0,1d0-delta) | 1218 | parameter(cutoff=1d0) |
1075 | 1218 | endif | 1219 | parameter(cutoff2=0.99d0) |
1076 | 1219 | wg=min(1d0-(1-wmin)*abs(beta),0.99d0) | 1220 | c |
1077 | 1220 | tt=(abs(w)-wg)/(1d0-wg) | 1221 | c set cutoff < 1 and cutoff2 = cutoff in the final version |
1078 | 1221 | if(tt.gt.1d0)then | 1222 | c |
1079 | 1222 | write(*,*)'Fatal error in gfunction',tt | 1223 | if(firsttime)then |
1080 | 1223 | stop | 1224 | firsttime=.false. |
1081 | 1224 | endif | 1225 | if(alpha.ge.0d0.and.alpha.lt.1d0)then |
1082 | 1226 | write(*,*)'Incorrect alpha in gfunction',alpha | ||
1083 | 1227 | stop | ||
1084 | 1228 | endif | ||
1085 | 1229 | if(abs(beta).gt.1d0)then | ||
1086 | 1230 | write(*,*)'Incorrect beta in gfunction',beta | ||
1087 | 1231 | stop | ||
1088 | 1232 | endif | ||
1089 | 1233 | if(delta.gt.2d0.or.delta.le.0d0)then | ||
1090 | 1234 | write(*,*)'Incorrect delta in gfunction',delta | ||
1091 | 1235 | stop | ||
1092 | 1236 | endif | ||
1093 | 1237 | endif | ||
1094 | 1238 | c | ||
1095 | 1225 | tmp=1d0 | 1239 | tmp=1d0 |
1096 | 1226 | if(alpha.gt.0d0)then | 1240 | if(alpha.gt.0d0)then |
1100 | 1227 | if(tt.gt.0d0.and.abs(w).lt.0.99d0) | 1241 | if(beta.lt.0d0)then |
1101 | 1228 | & tmp=(1-tt)**(2*alpha)/(tt**(2*alpha)+(1-tt)**(2*alpha)) | 1242 | wmin=0d0 |
1102 | 1229 | if(abs(w).ge.0.99d0)tmp=0d0 | 1243 | else |
1103 | 1244 | wmin=max(0d0,1d0-delta) | ||
1104 | 1245 | endif | ||
1105 | 1246 | wg=min(1d0-(1-wmin)*abs(beta),cutoff-tiny) | ||
1106 | 1247 | if(abs(w).gt.wg.and.abs(w).lt.cutoff2)then | ||
1107 | 1248 | tt=(abs(w)-wg)/(cutoff-wg) | ||
1108 | 1249 | if(tt.gt.1d0)then | ||
1109 | 1250 | write(*,*)'Fatal error in gfunction',tt | ||
1110 | 1251 | stop | ||
1111 | 1252 | endif | ||
1112 | 1253 | tmp=(1-tt)**(2*alpha)/(tt**(2*alpha)+(1-tt)**(2*alpha)) | ||
1113 | 1254 | elseif(abs(w).ge.cutoff2)then | ||
1114 | 1255 | tmp=0d0 | ||
1115 | 1256 | endif | ||
1116 | 1230 | endif | 1257 | endif |
1117 | 1231 | gfunction=tmp | 1258 | gfunction=tmp |
1118 | 1232 | return | 1259 | return |
1119 | @@ -2600,6 +2627,7 @@ | |||
1120 | 2600 | subroutine assign_ref_scale(p,xii,sh,ref_sc) | 2627 | subroutine assign_ref_scale(p,xii,sh,ref_sc) |
1121 | 2601 | implicit none | 2628 | implicit none |
1122 | 2602 | include "nexternal.inc" | 2629 | include "nexternal.inc" |
1123 | 2630 | include "madfks_mcatnlo.inc" | ||
1124 | 2603 | double precision p(0:3,nexternal-1),xii,sh,ref_sc | 2631 | double precision p(0:3,nexternal-1),xii,sh,ref_sc |
1125 | 2604 | integer i_scale,i | 2632 | integer i_scale,i |
1126 | 2605 | parameter(i_scale=1) | 2633 | parameter(i_scale=1) |
1127 | @@ -2619,7 +2647,7 @@ | |||
1128 | 2619 | stop | 2647 | stop |
1129 | 2620 | endif | 2648 | endif |
1130 | 2621 | c Safety threshold for the reference scale | 2649 | c Safety threshold for the reference scale |
1132 | 2622 | ref_sc=max(ref_sc,30d0) | 2650 | ref_sc=max(ref_sc,scaleMClow+scaleMCdelta) |
1133 | 2623 | 2651 | ||
1134 | 2624 | return | 2652 | return |
1135 | 2625 | end | 2653 | end |
1136 | 2626 | 2654 | ||
1137 | === modified file 'UpdateNotes.txt' | |||
1138 | --- UpdateNotes.txt 2018-04-29 13:58:31 +0000 | |||
1139 | +++ UpdateNotes.txt 2018-06-15 08:18:50 +0000 | |||
1140 | @@ -1,5 +1,33 @@ | |||
1141 | 1 | Update notes for MadGraph5_aMC@NLO (in reverse time order) | 1 | Update notes for MadGraph5_aMC@NLO (in reverse time order) |
1142 | 2 | 2 | ||
1143 | 3 | 2.6.3 (13/06/18) | ||
1144 | 4 | OM: When importing model, we now run one additional layer of optimisation: | ||
1145 | 5 | - if a vertex as two identical coupling for the same color structure then the associated lorentz | ||
1146 | 6 | structure are merged in a single one and the vertex is modified accordingly | ||
1147 | 7 | OM: When restricting a model, we also run one additional layer of optimisation | ||
1148 | 8 | - Opposite sign coupling are now identified and merged into a single one | ||
1149 | 9 | - if a vertex as two identical coupling (up to the sign) for the same color structure | ||
1150 | 10 | then the associated lorentz structure are merged in a single one and the | ||
1151 | 11 | vertex is modified accordingly | ||
1152 | 12 | VH+OM: changing the ALOHA naming scheme for combine routine when the function name starts to be too long. | ||
1153 | 13 | OM: adding a hidden parameter to the run_card (python_seed) to allow to control the randon number | ||
1154 | 14 | generated within python and be able to have full reproducibility of the events | ||
1155 | 15 | OM: Fixing some issue with the default dynamical scale choice for | ||
1156 | 16 | - non minimal QED sample | ||
1157 | 17 | - heft model when multiple radiation coming from the higgs decay/scattering | ||
1158 | 18 | This can also impact MLM since it use the same definition for the dynamical scale | ||
1159 | 19 | OM: Fix some issue for DIS scattering where the shat was wrongly defined for low energy scattering. | ||
1160 | 20 | Low energy scattering are not adviced since they break the factorization theorem. | ||
1161 | 21 | In particular the z-boost of the events are quite ill defined in that scenario. | ||
1162 | 22 | OM: changing the format of the param_card for NLO model to match expectation from the latest PY8 | ||
1163 | 23 | OM: Update of MadSpin to allow special input file for the case of spinmode=none. | ||
1164 | 24 | With that very simple mode of decay, you can now decay hepmc file or wrongly formatted leshouches event | ||
1165 | 25 | (in that mode we do not have spin correlation and width effect) | ||
1166 | 26 | PT: in montecarlocounter.f: improved colour-flow treatment in the case gluons are twice colour-connected to each other | ||
1167 | 27 | new gfunction(w) to get smoothly to 0 as w -> 1. (for NLO+PS run) | ||
1168 | 28 | OM: Fix some issue for the new QED model (including one in the handling of complex mass scheme of such model) | ||
1169 | 29 | OM: Fixing an issue of the param_card out of sync when running compute-widths | ||
1170 | 30 | OM: Adding Qnumbers block for ghost (the latest version of py8 was crashing due to their absence) | ||
1171 | 3 | 31 | ||
1172 | 4 | 2.6.2 (29/04/18) | 32 | 2.6.2 (29/04/18) |
1173 | 5 | 33 | ||
1174 | 6 | 34 | ||
1175 | === modified file 'VERSION' | |||
1176 | --- VERSION 2018-04-29 13:58:31 +0000 | |||
1177 | +++ VERSION 2018-06-15 08:18:50 +0000 | |||
1178 | @@ -1,5 +1,5 @@ | |||
1181 | 1 | version = 2.6.2 | 1 | version = 2.6.3 |
1182 | 2 | date = 2018-04-29 | 2 | date = 2018-06-13 |
1183 | 3 | 3 | ||
1184 | 4 | 4 | ||
1185 | 5 | 5 | ||
1186 | 6 | 6 | ||
1187 | === modified file 'aloha/aloha_writers.py' | |||
1188 | --- aloha/aloha_writers.py 2018-04-11 15:28:05 +0000 | |||
1189 | +++ aloha/aloha_writers.py 2018-06-15 08:18:50 +0000 | |||
1190 | @@ -1177,7 +1177,7 @@ | |||
1191 | 1177 | 1177 | ||
1192 | 1178 | def get_routine_name(name=None, outgoing=None, tag=None, abstract=None): | 1178 | def get_routine_name(name=None, outgoing=None, tag=None, abstract=None): |
1193 | 1179 | """ build the name of the aloha function """ | 1179 | """ build the name of the aloha function """ |
1195 | 1180 | 1180 | ||
1196 | 1181 | assert (name and outgoing is not None) or abstract | 1181 | assert (name and outgoing is not None) or abstract |
1197 | 1182 | 1182 | ||
1198 | 1183 | if tag is None: | 1183 | if tag is None: |
1199 | @@ -1205,6 +1205,14 @@ | |||
1200 | 1205 | def combine_name(name, other_names, outgoing, tag=None, unknown_propa=False): | 1205 | def combine_name(name, other_names, outgoing, tag=None, unknown_propa=False): |
1201 | 1206 | """ build the name for combined aloha function """ | 1206 | """ build the name for combined aloha function """ |
1202 | 1207 | 1207 | ||
1203 | 1208 | def myHash(target_string): | ||
1204 | 1209 | if len(target_string)<50: | ||
1205 | 1210 | return target_string | ||
1206 | 1211 | if '%(propa)s' in target_string: | ||
1207 | 1212 | return 'ALOHA_'+(str(hash(target_string.lower()))).replace('-','m')+'%(propa)s' | ||
1208 | 1213 | else: | ||
1209 | 1214 | return 'ALOHA_'+(str(hash(target_string.lower()))).replace('-','m') | ||
1210 | 1215 | |||
1211 | 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]): |
1212 | 1209 | # propagator need to be the last entry for the tag | 1217 | # propagator need to be the last entry for the tag |
1213 | 1210 | for i,t in enumerate(tag): | 1218 | for i,t in enumerate(tag): |
1214 | @@ -1238,9 +1246,11 @@ | |||
1215 | 1238 | if unknown_propa and outgoing: | 1246 | if unknown_propa and outgoing: |
1216 | 1239 | routine += '%(propa)s' | 1247 | routine += '%(propa)s' |
1217 | 1240 | if outgoing is not None: | 1248 | if outgoing is not None: |
1219 | 1241 | return routine +'_%s' % outgoing | 1249 | return myHash(routine)+'_%s' % outgoing |
1220 | 1250 | # return routine +'_%s' % outgoing | ||
1221 | 1242 | else: | 1251 | else: |
1223 | 1243 | return routine | 1252 | return myHash(routine) |
1224 | 1253 | # return routine | ||
1225 | 1244 | 1254 | ||
1226 | 1245 | if tag is not None: | 1255 | if tag is not None: |
1227 | 1246 | addon = ''.join(tag) | 1256 | addon = ''.join(tag) |
1228 | @@ -1257,10 +1267,15 @@ | |||
1229 | 1257 | if unknown_propa: | 1267 | if unknown_propa: |
1230 | 1258 | addon += '%(propa)s' | 1268 | addon += '%(propa)s' |
1231 | 1259 | 1269 | ||
1232 | 1270 | # if outgoing is not None: | ||
1233 | 1271 | # return '_'.join((name,) + tuple(other_names)) + addon + '_%s' % outgoing | ||
1234 | 1272 | # else: | ||
1235 | 1273 | # return '_'.join((name,) + tuple(other_names)) + addon | ||
1236 | 1274 | |||
1237 | 1260 | if outgoing is not None: | 1275 | if outgoing is not None: |
1239 | 1261 | return '_'.join((name,) + tuple(other_names)) + addon + '_%s' % outgoing | 1276 | return myHash('_'.join((name,) + tuple(other_names))) + addon + '_%s' % outgoing |
1240 | 1262 | else: | 1277 | else: |
1242 | 1263 | return '_'.join((name,) + tuple(other_names)) + addon | 1278 | return myHash('_'.join((name,) + tuple(other_names))) + addon |
1243 | 1264 | 1279 | ||
1244 | 1265 | class ALOHAWriterForCPP(WriteALOHA): | 1280 | class ALOHAWriterForCPP(WriteALOHA): |
1245 | 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.""" |
1246 | @@ -1736,7 +1751,7 @@ | |||
1247 | 1736 | # added to another file | 1751 | # added to another file |
1248 | 1737 | self.mode = 'no_include' | 1752 | self.mode = 'no_include' |
1249 | 1738 | 1753 | ||
1251 | 1739 | #name = combine_name(self.name, lor_names, offshell, self.tag) | 1754 | |
1252 | 1740 | 1755 | ||
1253 | 1741 | #h_text = self.write_combined_h(lor_names, offshell, **opt) | 1756 | #h_text = self.write_combined_h(lor_names, offshell, **opt) |
1254 | 1742 | cc_text, h_text = StringIO() , StringIO() | 1757 | cc_text, h_text = StringIO() , StringIO() |
1255 | 1743 | 1758 | ||
1256 | === modified file 'aloha/create_aloha.py' | |||
1257 | --- aloha/create_aloha.py 2018-04-26 18:04:25 +0000 | |||
1258 | +++ aloha/create_aloha.py 2018-06-15 08:18:50 +0000 | |||
1259 | @@ -470,8 +470,8 @@ | |||
1260 | 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') |
1261 | 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')" |
1262 | 472 | elif spin == 5 : | 472 | elif spin == 5 : |
1265 | 473 | tag = {'1': _spin2_mult + id, '2': 2 * _spin2_mult + id, | 473 | tag = {'1': _spin2_mult + id, '2': 'I2', |
1266 | 474 | '51': 'I2', '52': 'I3', 'id':id} | 474 | '51': 2 * _spin2_mult + id, '52': 'I3', 'id':id} |
1267 | 475 | 475 | ||
1268 | 476 | numerator = self.mod_propagator_expression(tag, numerator) | 476 | numerator = self.mod_propagator_expression(tag, numerator) |
1269 | 477 | if denominator: | 477 | if denominator: |
1270 | @@ -938,7 +938,7 @@ | |||
1271 | 938 | if self.has_key((lorentzname, outgoing)): | 938 | if self.has_key((lorentzname, outgoing)): |
1272 | 939 | self[(lorentzname, outgoing)].add_combine(list_l_name[1:]) | 939 | self[(lorentzname, outgoing)].add_combine(list_l_name[1:]) |
1273 | 940 | else: | 940 | else: |
1275 | 941 | lorentz = eval('self.model.lorentz.%s' % lorentzname) | 941 | lorentz = eval('self.model.lorentz.%s' % list_l_name[0]) |
1276 | 942 | assert lorentz.structure == 'external' | 942 | assert lorentz.structure == 'external' |
1277 | 943 | else: | 943 | else: |
1278 | 944 | l_lorentz = [] | 944 | l_lorentz = [] |
1279 | @@ -1240,7 +1240,6 @@ | |||
1280 | 1240 | 1240 | ||
1281 | 1241 | # avoid to add tag in global | 1241 | # avoid to add tag in global |
1282 | 1242 | old_tag = set(aloha_lib.KERNEL.use_tag) | 1242 | old_tag = set(aloha_lib.KERNEL.use_tag) |
1283 | 1243 | print 'create lib',tag | ||
1284 | 1244 | name, i = tag | 1243 | name, i = tag |
1285 | 1245 | if name == "Spin2Prop": | 1244 | if name == "Spin2Prop": |
1286 | 1246 | lib[('Spin2Prop',i)] = create( Spin2Propagator(_spin2_mult + i, \ | 1245 | lib[('Spin2Prop',i)] = create( Spin2Propagator(_spin2_mult + i, \ |
1287 | 1247 | 1246 | ||
1288 | === modified file 'madgraph/interface/amcatnlo_interface.py' | |||
1289 | --- madgraph/interface/amcatnlo_interface.py 2016-09-01 09:44:05 +0000 | |||
1290 | +++ madgraph/interface/amcatnlo_interface.py 2018-06-15 08:18:50 +0000 | |||
1291 | @@ -384,7 +384,7 @@ | |||
1292 | 384 | else: | 384 | else: |
1293 | 385 | for diag_type, get_amps in get_amps_dict.items(): | 385 | for diag_type, get_amps in get_amps_dict.items(): |
1294 | 386 | self._curr_amps = get_amps() | 386 | self._curr_amps = get_amps() |
1296 | 387 | self.draw(' '.join(args[1:]), type=diag_type) | 387 | self.draw(' '.join(args[1:]), Dtype=diag_type) |
1297 | 388 | # set _curr_amps back to empty | 388 | # set _curr_amps back to empty |
1298 | 389 | self._curr_amps = diagram_generation.AmplitudeList() | 389 | self._curr_amps = diagram_generation.AmplitudeList() |
1299 | 390 | 390 | ||
1300 | @@ -402,7 +402,7 @@ | |||
1301 | 402 | text += '\n\nReal diagrams:' | 402 | text += '\n\nReal diagrams:' |
1302 | 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']()) |
1303 | 404 | text += '\n\nLoop diagrams:\n' | 404 | text += '\n\nLoop diagrams:\n' |
1305 | 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']()) |
1306 | 406 | pydoc.pager(text) | 406 | pydoc.pager(text) |
1307 | 407 | 407 | ||
1308 | 408 | # set _curr_amps back to empty | 408 | # set _curr_amps back to empty |
1309 | 409 | 409 | ||
1310 | === modified file 'madgraph/interface/amcatnlo_run_interface.py' | |||
1311 | --- madgraph/interface/amcatnlo_run_interface.py 2018-03-22 14:00:54 +0000 | |||
1312 | +++ madgraph/interface/amcatnlo_run_interface.py 2018-06-15 08:18:50 +0000 | |||
1313 | @@ -2058,7 +2058,7 @@ | |||
1314 | 2058 | """-1 12 ! points, iterations | 2058 | """-1 12 ! points, iterations |
1315 | 2059 | %(accuracy)s ! desired fractional accuracy | 2059 | %(accuracy)s ! desired fractional accuracy |
1316 | 2060 | 1 -0.1 ! alpha, beta for Gsoft | 2060 | 1 -0.1 ! alpha, beta for Gsoft |
1318 | 2061 | 1 -0.1 ! alpha, beta for Gazi | 2061 | -1 -0.1 ! alpha, beta for Gazi |
1319 | 2062 | 1 ! Suppress amplitude (0 no, 1 yes)? | 2062 | 1 ! Suppress amplitude (0 no, 1 yes)? |
1320 | 2063 | 1 ! Exact helicity sum (0 yes, n = number/event)? | 2063 | 1 ! Exact helicity sum (0 yes, n = number/event)? |
1321 | 2064 | %(channel)s ! Enter Configuration Number: | 2064 | %(channel)s ! Enter Configuration Number: |
1322 | @@ -5325,7 +5325,7 @@ | |||
1323 | 5325 | cards.append('madspin_card.dat') | 5325 | cards.append('madspin_card.dat') |
1324 | 5326 | if switch['reweight'] != 'OFF': | 5326 | if switch['reweight'] != 'OFF': |
1325 | 5327 | cards.append('reweight_card.dat') | 5327 | cards.append('reweight_card.dat') |
1327 | 5328 | if switch['madanalysis'] == 'HADRON': | 5328 | if switch['madanalysis'] in ['HADRON', 'ON']: |
1328 | 5329 | cards.append('madanalysis5_hadron_card.dat') | 5329 | cards.append('madanalysis5_hadron_card.dat') |
1329 | 5330 | if 'aMC@' in mode: | 5330 | if 'aMC@' in mode: |
1330 | 5331 | cards.append('shower_card.dat') | 5331 | cards.append('shower_card.dat') |
1331 | 5332 | 5332 | ||
1332 | === modified file 'madgraph/interface/common_run_interface.py' | |||
1333 | --- madgraph/interface/common_run_interface.py 2018-04-28 21:38:38 +0000 | |||
1334 | +++ madgraph/interface/common_run_interface.py 2018-06-15 08:18:50 +0000 | |||
1335 | @@ -3338,11 +3338,12 @@ | |||
1336 | 3338 | line = 'compute_widths %s --path=%s' % (line, path) | 3338 | line = 'compute_widths %s --path=%s' % (line, path) |
1337 | 3339 | cmd.exec_cmd(line, model=model) | 3339 | cmd.exec_cmd(line, model=model) |
1338 | 3340 | interface.child = None | 3340 | interface.child = None |
1344 | 3341 | 3341 | del cmd | |
1345 | 3342 | 3342 | return | |
1346 | 3343 | 3343 | ||
1347 | 3344 | 3344 | ||
1348 | 3345 | raise Exception, 'fail to find a way to handle Auto width' | 3345 | |
1349 | 3346 | raise Exception, 'fail to find a way to handle Auto width' | ||
1350 | 3346 | 3347 | ||
1351 | 3347 | 3348 | ||
1352 | 3348 | def store_scan_result(self): | 3349 | def store_scan_result(self): |
1353 | @@ -3388,6 +3389,7 @@ | |||
1354 | 3388 | os.remove(pjoin(self.me_dir,'RunWeb')) | 3389 | os.remove(pjoin(self.me_dir,'RunWeb')) |
1355 | 3389 | except Exception: | 3390 | except Exception: |
1356 | 3390 | pass | 3391 | pass |
1357 | 3392 | |||
1358 | 3391 | try: | 3393 | try: |
1359 | 3392 | self.store_result() | 3394 | self.store_result() |
1360 | 3393 | except Exception: | 3395 | except Exception: |
1361 | @@ -3686,6 +3688,7 @@ | |||
1362 | 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) |
1363 | 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) |
1364 | 3688 | self.results.add_detail('run_mode', current['run_mode']) | 3690 | self.results.add_detail('run_mode', current['run_mode']) |
1365 | 3691 | self.to_store.append("event") | ||
1366 | 3689 | 3692 | ||
1367 | 3690 | self.run_name = new_run | 3693 | self.run_name = new_run |
1368 | 3691 | self.banner = madspin_cmd.banner | 3694 | self.banner = madspin_cmd.banner |
1369 | @@ -5739,8 +5742,12 @@ | |||
1370 | 5739 | 5742 | ||
1371 | 5740 | fail_due_to_format = 0 #parameter to avoid infinite loop | 5743 | fail_due_to_format = 0 #parameter to avoid infinite loop |
1372 | 5741 | def postcmd(self, stop, line): | 5744 | def postcmd(self, stop, line): |
1373 | 5742 | ending_question = cmd.OneLinePathCompletion.postcmd(self,stop,line) | ||
1374 | 5743 | 5745 | ||
1375 | 5746 | if line not in [None, '0', 'done', '']: | ||
1376 | 5747 | ending_question = cmd.OneLinePathCompletion.postcmd(self,stop,line) | ||
1377 | 5748 | else: | ||
1378 | 5749 | ending_question = True | ||
1379 | 5750 | |||
1380 | 5744 | if ending_question: | 5751 | if ending_question: |
1381 | 5745 | self.check_card_consistency() | 5752 | self.check_card_consistency() |
1382 | 5746 | if self.param_consistency: | 5753 | if self.param_consistency: |
1383 | @@ -6140,6 +6147,12 @@ | |||
1384 | 6140 | 6147 | ||
1385 | 6141 | def do_compute_widths(self, line): | 6148 | def do_compute_widths(self, line): |
1386 | 6142 | signal.alarm(0) # avoid timer if any | 6149 | signal.alarm(0) # avoid timer if any |
1387 | 6150 | |||
1388 | 6151 | # ensure that the card is in sync | ||
1389 | 6152 | if 'param' in self.modified_card: | ||
1390 | 6153 | self.write_card('param') | ||
1391 | 6154 | self.modified_card.discard('param') | ||
1392 | 6155 | |||
1393 | 6143 | path = self.paths['param'] | 6156 | path = self.paths['param'] |
1394 | 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) |
1395 | 6145 | text = open(path).read() | 6158 | text = open(path).read() |
1396 | @@ -6257,7 +6270,7 @@ | |||
1397 | 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') |
1398 | 6258 | elif len(args) > 0: | 6271 | elif len(args) > 0: |
1399 | 6259 | if args[0] in self.cards: | 6272 | if args[0] in self.cards: |
1401 | 6260 | card = args[0] | 6273 | card = args[0] |
1402 | 6261 | elif "%s.dat" % args[0] in self.cards: | 6274 | elif "%s.dat" % args[0] in self.cards: |
1403 | 6262 | card = "%s.dat" % args[0] | 6275 | card = "%s.dat" % args[0] |
1404 | 6263 | elif "%s_card.dat" % args[0] in self.cards: | 6276 | elif "%s_card.dat" % args[0] in self.cards: |
1405 | @@ -6267,7 +6280,11 @@ | |||
1406 | 6267 | else: | 6280 | else: |
1407 | 6268 | logger.error("unknow card %s. Please retry." % args[0]) | 6281 | logger.error("unknow card %s. Please retry." % args[0]) |
1408 | 6269 | return | 6282 | return |
1410 | 6270 | 6283 | # ensure that the card is in sync | |
1411 | 6284 | if card in self.modified_card: | ||
1412 | 6285 | self.write_card(card) | ||
1413 | 6286 | self.modified_card.discard(card) | ||
1414 | 6287 | |||
1415 | 6271 | if card in self.paths: | 6288 | if card in self.paths: |
1416 | 6272 | path = self.paths[card] | 6289 | path = self.paths[card] |
1417 | 6273 | elif os.path.exists(card): | 6290 | elif os.path.exists(card): |
1418 | @@ -6431,6 +6448,12 @@ | |||
1419 | 6431 | """Running ASperGe""" | 6448 | """Running ASperGe""" |
1420 | 6432 | signal.alarm(0) # avoid timer if any | 6449 | signal.alarm(0) # avoid timer if any |
1421 | 6433 | 6450 | ||
1422 | 6451 | # ensure that the card is in sync | ||
1423 | 6452 | if 'param' in self.modified_card: | ||
1424 | 6453 | self.write_card('param') | ||
1425 | 6454 | self.modified_card.discard('param') | ||
1426 | 6455 | |||
1427 | 6456 | |||
1428 | 6434 | path = pjoin(self.me_dir,'bin','internal','ufomodel','ASperGE') | 6457 | path = pjoin(self.me_dir,'bin','internal','ufomodel','ASperGE') |
1429 | 6435 | if not os.path.exists(path): | 6458 | if not os.path.exists(path): |
1430 | 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.') |
1431 | @@ -6541,8 +6564,8 @@ | |||
1432 | 6541 | 6564 | ||
1433 | 6542 | if answer in self.modified_card: | 6565 | if answer in self.modified_card: |
1434 | 6543 | self.write_card(answer) | 6566 | self.write_card(answer) |
1437 | 6544 | elif answer.replace('_card.dat','') in self.modified_card: | 6567 | elif os.path.basename(answer.replace('_card.dat','')) in self.modified_card: |
1438 | 6545 | self.write_card(answer.replace('_card.dat','')) | 6568 | self.write_card(os.path.basename(answer.replace('_card.dat',''))) |
1439 | 6546 | 6569 | ||
1440 | 6547 | try: | 6570 | try: |
1441 | 6548 | self.mother_interface.exec_cmd('open %s' % path) | 6571 | self.mother_interface.exec_cmd('open %s' % path) |
1442 | @@ -6613,7 +6636,7 @@ | |||
1443 | 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) |
1444 | 6614 | This should be use like this: | 6637 | This should be use like this: |
1445 | 6615 | 6638 | ||
1447 | 6616 | @scanhandling(arguments) | 6639 | @scanparamcardhandling(arguments) |
1448 | 6617 | def run_launch(self, *args, **opts) | 6640 | def run_launch(self, *args, **opts) |
1449 | 6618 | 6641 | ||
1450 | 6619 | possible arguments are listed above and should be function who takes a single | 6642 | possible arguments are listed above and should be function who takes a single |
1451 | @@ -6715,7 +6738,7 @@ | |||
1452 | 6715 | #param_card_iterator.write(card_path) #-> this is done by the with statement | 6738 | #param_card_iterator.write(card_path) #-> this is done by the with statement |
1453 | 6716 | name = misc.get_scan_name(orig_name, next_name) | 6739 | name = misc.get_scan_name(orig_name, next_name) |
1454 | 6717 | path = result_path(obj) % name | 6740 | path = result_path(obj) % name |
1456 | 6718 | logger.info("write all cross-section results in %s" % path ,'$MG:BOLD') | 6741 | logger.info("write scan results in %s" % path ,'$MG:BOLD') |
1457 | 6719 | order = summaryorder(obj)() | 6742 | order = summaryorder(obj)() |
1458 | 6720 | param_card_iterator.write_summary(path, order=order) | 6743 | param_card_iterator.write_summary(path, order=order) |
1459 | 6721 | return new_fct | 6744 | return new_fct |
1460 | 6722 | 6745 | ||
1461 | === modified file 'madgraph/interface/extended_cmd.py' | |||
1462 | --- madgraph/interface/extended_cmd.py 2018-03-23 16:46:49 +0000 | |||
1463 | +++ madgraph/interface/extended_cmd.py 2018-06-15 08:18:50 +0000 | |||
1464 | @@ -2350,6 +2350,8 @@ | |||
1465 | 2350 | color_for_XXXX(value) -> return the representation on the screen for value | 2350 | color_for_XXXX(value) -> return the representation on the screen for value |
1466 | 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 |
1467 | 2352 | match the status | 2352 | match the status |
1468 | 2353 | print_options_XXXX() -> return the text to disply below "other options" | ||
1469 | 2354 | default is other possible value (ordered correctly) | ||
1470 | 2353 | 2355 | ||
1471 | 2354 | consistency_XX_YY(val_XX, val_YY) | 2356 | consistency_XX_YY(val_XX, val_YY) |
1472 | 2355 | -> XX is the new key set by the user to a new value val_XX | 2357 | -> XX is the new key set by the user to a new value val_XX |
1473 | @@ -2553,6 +2555,12 @@ | |||
1474 | 2553 | value = self.get_allowed(base)[cur+1] | 2555 | value = self.get_allowed(base)[cur+1] |
1475 | 2554 | except IndexError: | 2556 | except IndexError: |
1476 | 2555 | value = self.get_allowed(base)[0] | 2557 | value = self.get_allowed(base)[0] |
1477 | 2558 | if value == "OFF" and cur == 0: | ||
1478 | 2559 | logger.warning("Invalid action: %s" % self.print_options(base)) | ||
1479 | 2560 | elif cur == 0: | ||
1480 | 2561 | logger.warning("Can not change value for this parameter") | ||
1481 | 2562 | |||
1482 | 2563 | |||
1483 | 2556 | elif line in ['', 'done', 'EOF', 'eof','0']: | 2564 | elif line in ['', 'done', 'EOF', 'eof','0']: |
1484 | 2557 | super(ControlSwitch, self).default(line) | 2565 | super(ControlSwitch, self).default(line) |
1485 | 2558 | return self.answer | 2566 | return self.answer |
1486 | @@ -2823,10 +2831,10 @@ | |||
1487 | 2823 | else: | 2831 | else: |
1488 | 2824 | return self.red % switch_value | 2832 | return self.red % switch_value |
1489 | 2825 | 2833 | ||
1491 | 2826 | def print_info(self,key): | 2834 | def print_options(self,key, keep_default=False): |
1492 | 2827 | 2835 | ||
1495 | 2828 | if hasattr(self, 'print_info_%s' % key): | 2836 | if hasattr(self, 'print_options_%s' % key) and not keep_default: |
1496 | 2829 | return getattr(self, 'print_info_%s' % key) | 2837 | return getattr(self, 'print_options_%s' % key)() |
1497 | 2830 | 2838 | ||
1498 | 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 |
1499 | 2832 | try: | 2840 | try: |
1500 | @@ -3087,7 +3095,7 @@ | |||
1501 | 3087 | to_display = self.switch[key] | 3095 | to_display = self.switch[key] |
1502 | 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) |
1503 | 3089 | 3097 | ||
1505 | 3090 | info = self.print_info(key) | 3098 | info = self.print_options(key) |
1506 | 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) |
1507 | 3092 | 3100 | ||
1508 | 3093 | if self.get_allowed(key): | 3101 | if self.get_allowed(key): |
1509 | @@ -3115,7 +3123,7 @@ | |||
1510 | 3115 | 'descrip': descrip, | 3123 | 'descrip': descrip, |
1511 | 3116 | 'name': key, | 3124 | 'name': key, |
1512 | 3117 | 'switch': self.color_for_value(key,self.switch[key]), | 3125 | 'switch': self.color_for_value(key,self.switch[key]), |
1514 | 3118 | 'add_info': self.print_info(key), | 3126 | 'add_info': self.print_options(key), |
1515 | 3119 | 'switch_nc': self.switch[key], | 3127 | 'switch_nc': self.switch[key], |
1516 | 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', |
1517 | 3121 | } | 3129 | } |
1518 | 3122 | 3130 | ||
1519 | === modified file 'madgraph/interface/madevent_interface.py' | |||
1520 | --- madgraph/interface/madevent_interface.py 2018-04-26 14:24:04 +0000 | |||
1521 | +++ madgraph/interface/madevent_interface.py 2018-06-15 08:18:50 +0000 | |||
1522 | @@ -530,6 +530,8 @@ | |||
1523 | 530 | if options['delphes_path']: | 530 | if options['delphes_path']: |
1524 | 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: |
1525 | 532 | self.available_module.add('Delphes') | 532 | self.available_module.add('Delphes') |
1526 | 533 | else: | ||
1527 | 534 | logger.warning("Delphes program installed but no parton shower module detected.\n Please install pythia8") | ||
1528 | 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']): |
1529 | 534 | self.available_module.add('MadSpin') | 536 | self.available_module.add('MadSpin') |
1530 | 535 | if misc.has_f2py() or options['f2py_compiler']: | 537 | if misc.has_f2py() or options['f2py_compiler']: |
1531 | @@ -658,7 +660,7 @@ | |||
1532 | 658 | self.switch['detector'] = 'Delphes' | 660 | self.switch['detector'] = 'Delphes' |
1533 | 659 | elif self.get_allowed_detector(): | 661 | elif self.get_allowed_detector(): |
1534 | 660 | self.switch['detector'] = 'OFF' | 662 | self.switch['detector'] = 'OFF' |
1536 | 661 | else: | 663 | else: |
1537 | 662 | self.switch['detector'] = 'Not Avail.' | 664 | self.switch['detector'] = 'Not Avail.' |
1538 | 663 | 665 | ||
1539 | 664 | # old mode to activate pgs | 666 | # old mode to activate pgs |
1540 | @@ -850,7 +852,7 @@ | |||
1541 | 850 | if 'reweight' not in self.available_module: | 852 | if 'reweight' not in self.available_module: |
1542 | 851 | self.allowed_reweight = [] | 853 | self.allowed_reweight = [] |
1543 | 852 | return | 854 | return |
1545 | 853 | self.allowed_reweight = ['ON', 'OFF'] | 855 | self.allowed_reweight = ['OFF', 'ON'] |
1546 | 854 | 856 | ||
1547 | 855 | # check for plugin mode | 857 | # check for plugin mode |
1548 | 856 | plugin_path = self.mother_interface.plugin_path | 858 | plugin_path = self.mother_interface.plugin_path |
1549 | @@ -5573,6 +5575,14 @@ | |||
1550 | 5573 | break | 5575 | break |
1551 | 5574 | else: | 5576 | else: |
1552 | 5575 | self.random = random.randint(1, 30107) | 5577 | self.random = random.randint(1, 30107) |
1553 | 5578 | |||
1554 | 5579 | #set random seed for python part of the code | ||
1555 | 5580 | if self.run_card['python_seed'] == -2: #-2 means same as run_card | ||
1556 | 5581 | import random | ||
1557 | 5582 | random.seed(self.random) | ||
1558 | 5583 | elif self.run_card['python_seed'] >= 0: | ||
1559 | 5584 | import random | ||
1560 | 5585 | random.seed(self.run_card['python_seed']) | ||
1561 | 5576 | 5586 | ||
1562 | 5577 | if self.run_card['ickkw'] == 2: | 5587 | if self.run_card['ickkw'] == 2: |
1563 | 5578 | logger.info('Running with CKKW matching') | 5588 | logger.info('Running with CKKW matching') |
1564 | @@ -5812,7 +5822,10 @@ | |||
1565 | 5812 | if self.random > 30081*30081: # can't use too big random number | 5822 | if self.random > 30081*30081: # can't use too big random number |
1566 | 5813 | raise MadGraph5Error,\ | 5823 | raise MadGraph5Error,\ |
1567 | 5814 | 'Random seed too large ' + str(self.random) + ' > 30081*30081' | 5824 | 'Random seed too large ' + str(self.random) + ' > 30081*30081' |
1569 | 5815 | 5825 | if self.run_card['python_seed'] == -2: | |
1570 | 5826 | import random | ||
1571 | 5827 | random.seed(self.random) | ||
1572 | 5828 | |||
1573 | 5816 | ############################################################################ | 5829 | ############################################################################ |
1574 | 5817 | def save_random(self): | 5830 | def save_random(self): |
1575 | 5818 | """save random number in appropirate file""" | 5831 | """save random number in appropirate file""" |
1576 | 5819 | 5832 | ||
1577 | === modified file 'madgraph/interface/madgraph_interface.py' | |||
1578 | --- madgraph/interface/madgraph_interface.py 2018-04-29 12:51:30 +0000 | |||
1579 | +++ madgraph/interface/madgraph_interface.py 2018-06-15 08:18:50 +0000 | |||
1580 | @@ -2782,11 +2782,11 @@ | |||
1581 | 2782 | 'gauge','lorentz', 'brs', 'cms'] | 2782 | 'gauge','lorentz', 'brs', 'cms'] |
1582 | 2783 | _import_formats = ['model_v4', 'model', 'proc_v4', 'command', 'banner'] | 2783 | _import_formats = ['model_v4', 'model', 'proc_v4', 'command', 'banner'] |
1583 | 2784 | _install_opts = ['Delphes', 'MadAnalysis4', 'ExRootAnalysis', | 2784 | _install_opts = ['Delphes', 'MadAnalysis4', 'ExRootAnalysis', |
1585 | 2785 | 'update', 'Golem95', 'PJFry', 'QCDLoop', 'maddm'] | 2785 | 'update', 'Golem95', 'PJFry', 'QCDLoop', 'maddm', 'maddump'] |
1586 | 2786 | 2786 | ||
1587 | 2787 | # The targets below are installed using the HEPToolsInstaller.py script | 2787 | # The targets below are installed using the HEPToolsInstaller.py script |
1588 | 2788 | _advanced_install_opts = ['pythia8','zlib','boost','lhapdf6','lhapdf5','collier', | 2788 | _advanced_install_opts = ['pythia8','zlib','boost','lhapdf6','lhapdf5','collier', |
1590 | 2789 | 'hepmc','mg5amc_py8_interface','ninja','oneloop','MadAnalysis5','MadAnalysis'] | 2789 | 'hepmc','mg5amc_py8_interface','ninja','oneloop','MadAnalysis5'] |
1591 | 2790 | 2790 | ||
1592 | 2791 | _install_opts.extend(_advanced_install_opts) | 2791 | _install_opts.extend(_advanced_install_opts) |
1593 | 2792 | 2792 | ||
1594 | @@ -5801,7 +5801,7 @@ | |||
1595 | 5801 | # Return true for successful installation | 5801 | # Return true for successful installation |
1596 | 5802 | return True | 5802 | return True |
1597 | 5803 | 5803 | ||
1599 | 5804 | install_plugin = ['maddm'] | 5804 | install_plugin = ['maddm', 'maddump'] |
1600 | 5805 | install_ad = {'pythia-pgs':['arXiv:0603175'], | 5805 | install_ad = {'pythia-pgs':['arXiv:0603175'], |
1601 | 5806 | 'Delphes':['arXiv:1307.6346'], | 5806 | 'Delphes':['arXiv:1307.6346'], |
1602 | 5807 | 'Delphes2':['arXiv:0903.2225'], | 5807 | 'Delphes2':['arXiv:0903.2225'], |
1603 | @@ -5819,7 +5819,9 @@ | |||
1604 | 5819 | 'MadAnalysis':['arXiv:1206.1599'], | 5819 | 'MadAnalysis':['arXiv:1206.1599'], |
1605 | 5820 | 'collier':['arXiv:1604.06792'], | 5820 | 'collier':['arXiv:1604.06792'], |
1606 | 5821 | 'oneloop':['arXiv:1007.4716'], | 5821 | 'oneloop':['arXiv:1007.4716'], |
1608 | 5822 | 'maddm':['arXiv:1505.04190']} | 5822 | 'maddm':['arXiv:1505.04190'], |
1609 | 5823 | 'maddump':['arXiv:1806.xxxxx']} | ||
1610 | 5824 | |||
1611 | 5823 | install_server = ['http://madgraph.phys.ucl.ac.be/package_info.dat', | 5825 | install_server = ['http://madgraph.phys.ucl.ac.be/package_info.dat', |
1612 | 5824 | 'http://madgraph.physics.illinois.edu/package_info.dat'] | 5826 | 'http://madgraph.physics.illinois.edu/package_info.dat'] |
1613 | 5825 | install_name = {'td_mac': 'td', 'td_linux':'td', 'Delphes2':'Delphes', | 5827 | install_name = {'td_mac': 'td', 'td_linux':'td', 'Delphes2':'Delphes', |
1614 | @@ -5869,6 +5871,7 @@ | |||
1615 | 5869 | # logger.info('{:^80}'.format("-"*70), '$MG:BOLD') | 5871 | # logger.info('{:^80}'.format("-"*70), '$MG:BOLD') |
1616 | 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') |
1617 | 5871 | 5873 | ||
1618 | 5874 | source = None | ||
1619 | 5872 | # Load file with path of the different program: | 5875 | # Load file with path of the different program: |
1620 | 5873 | import urllib | 5876 | import urllib |
1621 | 5874 | if paths: | 5877 | if paths: |
1622 | @@ -5916,15 +5919,16 @@ | |||
1623 | 5916 | 5919 | ||
1624 | 5917 | if args[0] == 'Delphes': | 5920 | if args[0] == 'Delphes': |
1625 | 5918 | args[0] = 'Delphes3' | 5921 | args[0] = 'Delphes3' |
1628 | 5919 | if args[0] == 'MadAnalysis4': | 5922 | |
1627 | 5920 | args[0] = 'MadAnalysis' | ||
1629 | 5921 | 5923 | ||
1630 | 5922 | try: | 5924 | try: |
1631 | 5923 | name = self.install_name | 5925 | name = self.install_name |
1632 | 5924 | name = name[args[0]] | 5926 | name = name[args[0]] |
1633 | 5925 | except KeyError: | 5927 | except KeyError: |
1634 | 5926 | name = args[0] | 5928 | name = args[0] |
1636 | 5927 | 5929 | if args[0] == 'MadAnalysis4': | |
1637 | 5930 | args[0] = 'MadAnalysis' | ||
1638 | 5931 | |||
1639 | 5928 | if args[0] in self._advanced_install_opts: | 5932 | if args[0] in self._advanced_install_opts: |
1640 | 5929 | # Now launch the advanced installation of the tool args[0] | 5933 | # Now launch the advanced installation of the tool args[0] |
1641 | 5930 | # path['HEPToolsInstaller'] is the online adress where to downlaod | 5934 | # path['HEPToolsInstaller'] is the online adress where to downlaod |
1642 | @@ -5962,6 +5966,23 @@ | |||
1643 | 5962 | except Exception: | 5966 | except Exception: |
1644 | 5963 | pass | 5967 | pass |
1645 | 5964 | 5968 | ||
1646 | 5969 | if args[0] not in path: | ||
1647 | 5970 | if not source: | ||
1648 | 5971 | if index ==1: | ||
1649 | 5972 | othersource = 'ucl' | ||
1650 | 5973 | else: | ||
1651 | 5974 | othersource = 'uiuc' | ||
1652 | 5975 | # try with the mirror | ||
1653 | 5976 | misc.sprint('try other mirror', othersource, ' '.join(args)) | ||
1654 | 5977 | return self.do_install('%s --source=%s' % (' '.join(args), othersource), | ||
1655 | 5978 | paths, additional_options) | ||
1656 | 5979 | else: | ||
1657 | 5980 | if 'xxx' in advertisements[name][0]: | ||
1658 | 5981 | logger.warning("Program not yet released. Please try later") | ||
1659 | 5982 | else: | ||
1660 | 5983 | raise Exception, "Online server are corrupted. No tarball available for %s" % name | ||
1661 | 5984 | return | ||
1662 | 5985 | |||
1663 | 5965 | # Load that path | 5986 | # Load that path |
1664 | 5966 | logger.info('Downloading %s' % path[args[0]]) | 5987 | logger.info('Downloading %s' % path[args[0]]) |
1665 | 5967 | misc.wget(path[args[0]], '%s.tgz' % name, cwd=MG5DIR) | 5988 | misc.wget(path[args[0]], '%s.tgz' % name, cwd=MG5DIR) |
1666 | @@ -6127,7 +6148,7 @@ | |||
1667 | 6127 | ff.close() | 6148 | ff.close() |
1668 | 6128 | import stat | 6149 | import stat |
1669 | 6129 | os.chmod(pjoin(MG5DIR, 'bin', '%s.py' % name), stat.S_IRWXU) | 6150 | os.chmod(pjoin(MG5DIR, 'bin', '%s.py' % name), stat.S_IRWXU) |
1671 | 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) |
1672 | 6131 | status=0 | 6152 | status=0 |
1673 | 6132 | 6153 | ||
1674 | 6133 | elif logger.level <= logging.INFO: | 6154 | elif logger.level <= logging.INFO: |
1675 | @@ -6193,7 +6214,7 @@ | |||
1676 | 6193 | if sys.platform == "darwin": | 6214 | if sys.platform == "darwin": |
1677 | 6194 | logger.info('Downloading TD for Mac') | 6215 | logger.info('Downloading TD for Mac') |
1678 | 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' |
1680 | 6196 | misc.wget(target, 'tg.tgz', cwd=pjoin(MG5DIR,'td')) | 6217 | misc.wget(target, 'td.tgz', cwd=pjoin(MG5DIR,'td')) |
1681 | 6197 | misc.call(['tar', '-xzpvf', 'td.tgz'], | 6218 | misc.call(['tar', '-xzpvf', 'td.tgz'], |
1682 | 6198 | cwd=pjoin(MG5DIR,'td')) | 6219 | cwd=pjoin(MG5DIR,'td')) |
1683 | 6199 | files.mv(MG5DIR + '/td/td_mac_intel',MG5DIR+'/td/td') | 6220 | files.mv(MG5DIR + '/td/td_mac_intel',MG5DIR+'/td/td') |
1684 | @@ -6235,6 +6256,8 @@ | |||
1685 | 6235 | files.cp(pjoin(card_dir,'delphes_card_ATLAS.tcl'), | 6256 | files.cp(pjoin(card_dir,'delphes_card_ATLAS.tcl'), |
1686 | 6236 | pjoin(MG5DIR,'Template', 'Common', 'Cards', 'delphes_card_ATLAS.dat')) | 6257 | pjoin(MG5DIR,'Template', 'Common', 'Cards', 'delphes_card_ATLAS.dat')) |
1687 | 6237 | 6258 | ||
1688 | 6259 | if not self.options['pythia-pgs_path'] and not self.options['pythia8_path']: | ||
1689 | 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.") | ||
1690 | 6238 | 6261 | ||
1691 | 6239 | #reset the position of the executable | 6262 | #reset the position of the executable |
1692 | 6240 | options_name = {'Delphes': 'delphes_path', | 6263 | options_name = {'Delphes': 'delphes_path', |
1693 | 6241 | 6264 | ||
1694 | === modified file 'madgraph/interface/reweight_interface.py' | |||
1695 | --- madgraph/interface/reweight_interface.py 2018-04-20 08:32:29 +0000 | |||
1696 | +++ madgraph/interface/reweight_interface.py 2018-06-15 08:18:50 +0000 | |||
1697 | @@ -467,6 +467,8 @@ | |||
1698 | 467 | if not self.has_standalone_dir: | 467 | if not self.has_standalone_dir: |
1699 | 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')): |
1700 | 469 | self.load_from_pickle() | 469 | self.load_from_pickle() |
1701 | 470 | if opts['rwgt_name']: | ||
1702 | 471 | self.options['rwgt_name'] = opts['rwgt_name'] | ||
1703 | 470 | if not self.rwgt_dir: | 472 | if not self.rwgt_dir: |
1704 | 471 | self.me_dir = self.rwgt_dir | 473 | self.me_dir = self.rwgt_dir |
1705 | 472 | self.load_module() # load the fortran information from the f2py module | 474 | self.load_module() # load the fortran information from the f2py module |
1706 | 473 | 475 | ||
1707 | === modified file 'madgraph/iolibs/export_v4.py' | |||
1708 | --- madgraph/iolibs/export_v4.py 2018-04-24 10:26:54 +0000 | |||
1709 | +++ madgraph/iolibs/export_v4.py 2018-06-15 08:18:50 +0000 | |||
1710 | @@ -1952,6 +1952,18 @@ | |||
1711 | 1952 | self.make_model_symbolic_link() | 1952 | self.make_model_symbolic_link() |
1712 | 1953 | 1953 | ||
1713 | 1954 | #=========================================================================== | 1954 | #=========================================================================== |
1714 | 1955 | # write a procdef_mg5 (an equivalent of the MG4 proc_card.dat) | ||
1715 | 1956 | #=========================================================================== | ||
1716 | 1957 | def write_procdef_mg5(self, file_pos, modelname, process_str): | ||
1717 | 1958 | """ write an equivalent of the MG4 proc_card in order that all the Madevent | ||
1718 | 1959 | Perl script of MadEvent4 are still working properly for pure MG5 run. | ||
1719 | 1960 | Not needed for StandAlone so just return | ||
1720 | 1961 | """ | ||
1721 | 1962 | |||
1722 | 1963 | return | ||
1723 | 1964 | |||
1724 | 1965 | |||
1725 | 1966 | #=========================================================================== | ||
1726 | 1955 | # Make the Helas and Model directories for Standalone directory | 1967 | # Make the Helas and Model directories for Standalone directory |
1727 | 1956 | #=========================================================================== | 1968 | #=========================================================================== |
1728 | 1957 | def make(self): | 1969 | def make(self): |
1729 | @@ -5395,8 +5407,8 @@ | |||
1730 | 5395 | self.params_dep = [] # (name, expression, type) | 5407 | self.params_dep = [] # (name, expression, type) |
1731 | 5396 | self.params_indep = [] # (name, expression, type) | 5408 | self.params_indep = [] # (name, expression, type) |
1732 | 5397 | self.params_ext = [] # external parameter | 5409 | self.params_ext = [] # external parameter |
1735 | 5398 | self.p_to_f = parsers.UFOExpressionParserFortran() | 5410 | self.p_to_f = parsers.UFOExpressionParserFortran(self.model) |
1736 | 5399 | self.mp_p_to_f = parsers.UFOExpressionParserMPFortran() | 5411 | self.mp_p_to_f = parsers.UFOExpressionParserMPFortran(self.model) |
1737 | 5400 | 5412 | ||
1738 | 5401 | def pass_parameter_to_case_insensitive(self): | 5413 | def pass_parameter_to_case_insensitive(self): |
1739 | 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""" |
1740 | @@ -6173,7 +6185,8 @@ | |||
1741 | 6173 | # already handle by default | 6185 | # already handle by default |
1742 | 6174 | if fct.name not in ["complexconjugate", "re", "im", "sec", | 6186 | if fct.name not in ["complexconjugate", "re", "im", "sec", |
1743 | 6175 | "csc", "asec", "acsc", "theta_function", "cond", | 6187 | "csc", "asec", "acsc", "theta_function", "cond", |
1745 | 6176 | "condif", "reglogp", "reglogm", "reglog", "recms", "arg", "cot"]: | 6188 | "condif", "reglogp", "reglogm", "reglog", "recms", "arg", "cot", |
1746 | 6189 | "grreglog","regsqrt"]: | ||
1747 | 6177 | additional_fct.append(fct.name) | 6190 | additional_fct.append(fct.name) |
1748 | 6178 | 6191 | ||
1749 | 6179 | 6192 | ||
1750 | @@ -6185,6 +6198,8 @@ | |||
1751 | 6185 | double complex reglogm | 6198 | double complex reglogm |
1752 | 6186 | double complex recms | 6199 | double complex recms |
1753 | 6187 | double complex arg | 6200 | double complex arg |
1754 | 6201 | double complex grreglog | ||
1755 | 6202 | double complex regsqrt | ||
1756 | 6188 | %s | 6203 | %s |
1757 | 6189 | """ % "\n".join([" double complex %s" % i for i in additional_fct])) | 6204 | """ % "\n".join([" double complex %s" % i for i in additional_fct])) |
1758 | 6190 | 6205 | ||
1759 | @@ -6197,6 +6212,8 @@ | |||
1760 | 6197 | %(complex_mp_format)s mp_reglogm | 6212 | %(complex_mp_format)s mp_reglogm |
1761 | 6198 | %(complex_mp_format)s mp_recms | 6213 | %(complex_mp_format)s mp_recms |
1762 | 6199 | %(complex_mp_format)s mp_arg | 6214 | %(complex_mp_format)s mp_arg |
1763 | 6215 | %(complex_mp_format)s mp_grreglog | ||
1764 | 6216 | %(complex_mp_format)s mp_regsqrt | ||
1765 | 6200 | %(additional)s | 6217 | %(additional)s |
1766 | 6201 | """ %\ | 6218 | """ %\ |
1767 | 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]), |
1768 | @@ -6285,6 +6302,62 @@ | |||
1769 | 6285 | endif | 6302 | endif |
1770 | 6286 | endif | 6303 | endif |
1771 | 6287 | end | 6304 | end |
1772 | 6305 | |||
1773 | 6306 | double complex function regsqrt(arg_in) | ||
1774 | 6307 | implicit none | ||
1775 | 6308 | double complex arg_in | ||
1776 | 6309 | double complex arg | ||
1777 | 6310 | arg=arg_in | ||
1778 | 6311 | if(dabs(dimag(arg)).eq.0.0d0)then | ||
1779 | 6312 | arg=dcmplx(dble(arg),0.0d0) | ||
1780 | 6313 | endif | ||
1781 | 6314 | if(dabs(dble(arg)).eq.0.0d0)then | ||
1782 | 6315 | arg=dcmplx(0.0d0,dimag(arg)) | ||
1783 | 6316 | endif | ||
1784 | 6317 | regsqrt=sqrt(arg) | ||
1785 | 6318 | end | ||
1786 | 6319 | |||
1787 | 6320 | double complex function grreglog(logsw,expr1_in,expr2_in) | ||
1788 | 6321 | implicit none | ||
1789 | 6322 | double complex TWOPII | ||
1790 | 6323 | parameter (TWOPII=2.0d0*3.1415926535897932d0*(0.0d0,1.0d0)) | ||
1791 | 6324 | double complex expr1_in,expr2_in | ||
1792 | 6325 | double complex expr1,expr2 | ||
1793 | 6326 | double precision logsw | ||
1794 | 6327 | double precision imagexpr | ||
1795 | 6328 | logical firstsheet | ||
1796 | 6329 | expr1=expr1_in | ||
1797 | 6330 | expr2=expr2_in | ||
1798 | 6331 | if(dabs(dimag(expr1)).eq.0.0d0)then | ||
1799 | 6332 | expr1=dcmplx(dble(expr1),0.0d0) | ||
1800 | 6333 | endif | ||
1801 | 6334 | if(dabs(dble(expr1)).eq.0.0d0)then | ||
1802 | 6335 | expr1=dcmplx(0.0d0,dimag(expr1)) | ||
1803 | 6336 | endif | ||
1804 | 6337 | if(dabs(dimag(expr2)).eq.0.0d0)then | ||
1805 | 6338 | expr2=dcmplx(dble(expr2),0.0d0) | ||
1806 | 6339 | endif | ||
1807 | 6340 | if(dabs(dble(expr2)).eq.0.0d0)then | ||
1808 | 6341 | expr2=dcmplx(0.0d0,dimag(expr2)) | ||
1809 | 6342 | endif | ||
1810 | 6343 | if(expr1.eq.(0.0d0,0.0d0))then | ||
1811 | 6344 | grreglog=(0.0d0,0.0d0) | ||
1812 | 6345 | else | ||
1813 | 6346 | imagexpr=dimag(expr1)*dimag(expr2) | ||
1814 | 6347 | firstsheet=imagexpr.ge.0.0d0 | ||
1815 | 6348 | firstsheet=firstsheet.or.dble(expr1).ge.0.0d0 | ||
1816 | 6349 | firstsheet=firstsheet.or.dble(expr2).ge.0.0d0 | ||
1817 | 6350 | if(firstsheet)then | ||
1818 | 6351 | grreglog=log(expr1) | ||
1819 | 6352 | else | ||
1820 | 6353 | if(dimag(expr1).gt.0.0d0)then | ||
1821 | 6354 | grreglog=log(expr1) - logsw*TWOPII | ||
1822 | 6355 | else | ||
1823 | 6356 | grreglog=log(expr1) + logsw*TWOPII | ||
1824 | 6357 | endif | ||
1825 | 6358 | endif | ||
1826 | 6359 | endif | ||
1827 | 6360 | end | ||
1828 | 6288 | 6361 | ||
1829 | 6289 | double complex function arg(comnum) | 6362 | double complex function arg(comnum) |
1830 | 6290 | implicit none | 6363 | implicit none |
1831 | @@ -6375,6 +6448,63 @@ | |||
1832 | 6375 | endif | 6448 | endif |
1833 | 6376 | endif | 6449 | endif |
1834 | 6377 | end | 6450 | end |
1835 | 6451 | |||
1836 | 6452 | %(complex_mp_format)s function mp_regsqrt(arg_in) | ||
1837 | 6453 | implicit none | ||
1838 | 6454 | %(complex_mp_format)s arg_in | ||
1839 | 6455 | %(complex_mp_format)s arg | ||
1840 | 6456 | arg=arg_in | ||
1841 | 6457 | if(abs(imagpart(arg)).eq.0.0e0_16)then | ||
1842 | 6458 | arg=cmplx(real(arg,kind=16),0.0e0_16) | ||
1843 | 6459 | endif | ||
1844 | 6460 | if(abs(real(arg,kind=16)).eq.0.0e0_16)then | ||
1845 | 6461 | arg=cmplx(0.0e0_16,imagpart(arg)) | ||
1846 | 6462 | endif | ||
1847 | 6463 | mp_regsqrt=sqrt(arg) | ||
1848 | 6464 | end | ||
1849 | 6465 | |||
1850 | 6466 | |||
1851 | 6467 | %(complex_mp_format)s function mp_grreglog(logsw,expr1_in,expr2_in) | ||
1852 | 6468 | implicit none | ||
1853 | 6469 | %(complex_mp_format)s TWOPII | ||
1854 | 6470 | parameter (TWOPII=2.0e0_16*3.14169258478796109557151794433593750e0_16*(0.0e0_16,1.0e0_16)) | ||
1855 | 6471 | %(complex_mp_format)s expr1_in,expr2_in | ||
1856 | 6472 | %(complex_mp_format)s expr1,expr2 | ||
1857 | 6473 | %(real_mp_format)s logsw | ||
1858 | 6474 | %(real_mp_format)s imagexpr | ||
1859 | 6475 | logical firstsheet | ||
1860 | 6476 | expr1=expr1_in | ||
1861 | 6477 | expr2=expr2_in | ||
1862 | 6478 | if(abs(imagpart(expr1)).eq.0.0e0_16)then | ||
1863 | 6479 | expr1=cmplx(real(expr1,kind=16),0.0e0_16) | ||
1864 | 6480 | endif | ||
1865 | 6481 | if(abs(real(expr1,kind=16)).eq.0.0e0_16)then | ||
1866 | 6482 | expr1=cmplx(0.0e0_16,imagpart(expr1)) | ||
1867 | 6483 | endif | ||
1868 | 6484 | if(abs(imagpart(expr2)).eq.0.0e0_16)then | ||
1869 | 6485 | expr2=cmplx(real(expr2,kind=16),0.0e0_16) | ||
1870 | 6486 | endif | ||
1871 | 6487 | if(abs(real(expr2,kind=16)).eq.0.0e0_16)then | ||
1872 | 6488 | expr2=cmplx(0.0e0_16,imagpart(expr2)) | ||
1873 | 6489 | endif | ||
1874 | 6490 | if(expr1.eq.(0.0e0_16,0.0e0_16))then | ||
1875 | 6491 | mp_grreglog=(0.0e0_16,0.0e0_16) | ||
1876 | 6492 | else | ||
1877 | 6493 | imagexpr=imagpart(expr1)*imagpart(expr2) | ||
1878 | 6494 | firstsheet=imagexpr.ge.0.0e0_16 | ||
1879 | 6495 | firstsheet=firstsheet.or.real(expr1,kind=16).ge.0.0e0_16 | ||
1880 | 6496 | firstsheet=firstsheet.or.real(expr2,kind=16).ge.0.0e0_16 | ||
1881 | 6497 | if(firstsheet)then | ||
1882 | 6498 | mp_grreglog=log(expr1) | ||
1883 | 6499 | else | ||
1884 | 6500 | if(imagpart(expr1).gt.0.0e0_16)then | ||
1885 | 6501 | mp_grreglog=log(expr1) - logsw*TWOPII | ||
1886 | 6502 | else | ||
1887 | 6503 | mp_grreglog=log(expr1) + logsw*TWOPII | ||
1888 | 6504 | endif | ||
1889 | 6505 | endif | ||
1890 | 6506 | endif | ||
1891 | 6507 | end | ||
1892 | 6378 | 6508 | ||
1893 | 6379 | %(complex_mp_format)s function mp_arg(comnum) | 6509 | %(complex_mp_format)s function mp_arg(comnum) |
1894 | 6380 | implicit none | 6510 | implicit none |
1895 | @@ -6386,7 +6516,7 @@ | |||
1896 | 6386 | else | 6516 | else |
1897 | 6387 | mp_arg=log(comnum/abs(comnum))/imm | 6517 | mp_arg=log(comnum/abs(comnum))/imm |
1898 | 6388 | endif | 6518 | endif |
1900 | 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}) |
1901 | 6390 | 6520 | ||
1902 | 6391 | 6521 | ||
1903 | 6392 | #check for the file functions.f | 6522 | #check for the file functions.f |
1904 | @@ -6404,7 +6534,8 @@ | |||
1905 | 6404 | for fct in ufo_fct: | 6534 | for fct in ufo_fct: |
1906 | 6405 | # already handle by default | 6535 | # already handle by default |
1907 | 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", |
1909 | 6407 | "theta_function", "cond", "reglog", "reglogp", "reglogm", "recms","arg"]: | 6537 | "theta_function", "cond", "reglog", "reglogp", "reglogm", "recms","arg", |
1910 | 6538 | "grreglog","regsqrt"]: | ||
1911 | 6408 | ufo_fct_template = """ | 6539 | ufo_fct_template = """ |
1912 | 6409 | double complex function %(name)s(%(args)s) | 6540 | double complex function %(name)s(%(args)s) |
1913 | 6410 | implicit none | 6541 | implicit none |
1914 | @@ -6440,7 +6571,8 @@ | |||
1915 | 6440 | for fct in ufo_fct: | 6571 | for fct in ufo_fct: |
1916 | 6441 | # already handle by default | 6572 | # already handle by default |
1917 | 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", |
1919 | 6443 | "theta_function", "cond", "reglog", "reglogp","reglogm", "recms","arg"]: | 6574 | "theta_function", "cond", "reglog", "reglogp","reglogm", "recms","arg", |
1920 | 6575 | "grreglog","regsqrt"]: | ||
1921 | 6444 | ufo_fct_template = """ | 6576 | ufo_fct_template = """ |
1922 | 6445 | %(complex_mp_format)s function mp_%(name)s(mp__%(args)s) | 6577 | %(complex_mp_format)s function mp_%(name)s(mp__%(args)s) |
1923 | 6446 | implicit none | 6578 | implicit none |
1924 | 6447 | 6579 | ||
1925 | === modified file 'madgraph/iolibs/file_writers.py' | |||
1926 | --- madgraph/iolibs/file_writers.py 2018-01-18 15:06:40 +0000 | |||
1927 | +++ madgraph/iolibs/file_writers.py 2018-06-15 08:18:50 +0000 | |||
1928 | @@ -393,11 +393,11 @@ | |||
1929 | 393 | splitline = line.split('\'') | 393 | splitline = line.split('\'') |
1930 | 394 | i = 0 | 394 | i = 0 |
1931 | 395 | while i < len(splitline): | 395 | while i < len(splitline): |
1933 | 396 | if i % 2 == 1: | 396 | if i % 2 == 1: |
1934 | 397 | # This is a quote - check for escaped \'s | 397 | # This is a quote - check for escaped \'s |
1935 | 398 | while splitline[i] and splitline[i][-1] == '\\': | 398 | while splitline[i] and splitline[i][-1] == '\\': |
1936 | 399 | splitline[i] = splitline[i] + '\'' + splitline.pop(i + 1) | 399 | splitline[i] = splitline[i] + '\'' + splitline.pop(i + 1) |
1938 | 400 | i = i + 1 | 400 | i = i + 1 |
1939 | 401 | return len(splitline)-1 | 401 | return len(splitline)-1 |
1940 | 402 | 402 | ||
1941 | 403 | #=============================================================================== | 403 | #=============================================================================== |
1942 | @@ -411,7 +411,7 @@ | |||
1943 | 411 | fct_names should be a list of functions to remove | 411 | fct_names should be a list of functions to remove |
1944 | 412 | """ | 412 | """ |
1945 | 413 | 413 | ||
1947 | 414 | f77_type = ['real*8', 'integer', 'double precision'] | 414 | f77_type = ['real*8', 'integer', 'double precision', 'logical'] |
1948 | 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*)' \ |
1949 | 416 | % {'type':'|'.join(f77_type)}, re.I) | 416 | % {'type':'|'.join(f77_type)}, re.I) |
1950 | 417 | 417 | ||
1951 | 418 | 418 | ||
1952 | === modified file 'madgraph/iolibs/files.py' | |||
1953 | --- madgraph/iolibs/files.py 2018-03-17 00:04:34 +0000 | |||
1954 | +++ madgraph/iolibs/files.py 2018-06-15 08:18:50 +0000 | |||
1955 | @@ -137,6 +137,7 @@ | |||
1956 | 137 | try: | 137 | try: |
1957 | 138 | shutil.copy(path1, path2) | 138 | shutil.copy(path1, path2) |
1958 | 139 | except IOError, why: | 139 | except IOError, why: |
1959 | 140 | import madgraph.various.misc as misc | ||
1960 | 140 | try: | 141 | try: |
1961 | 141 | if os.path.exists(path2): | 142 | if os.path.exists(path2): |
1962 | 142 | path2 = os.path.join(path2, os.path.split(path1)[1]) | 143 | path2 = os.path.join(path2, os.path.split(path1)[1]) |
1963 | @@ -146,6 +147,8 @@ | |||
1964 | 146 | raise | 147 | raise |
1965 | 147 | if log: | 148 | if log: |
1966 | 148 | logger.warning(why) | 149 | logger.warning(why) |
1967 | 150 | else: | ||
1968 | 151 | misc.sprint("fail to cp", why) | ||
1969 | 149 | except shutil.Error: | 152 | except shutil.Error: |
1970 | 150 | # idetical file | 153 | # idetical file |
1971 | 151 | pass | 154 | pass |
1972 | 152 | 155 | ||
1973 | === modified file 'madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc' | |||
1974 | --- madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc 2017-07-31 22:08:40 +0000 | |||
1975 | +++ madgraph/iolibs/template_files/matrix_standalone_splitOrders_v4.inc 2018-06-15 08:18:50 +0000 | |||
1976 | @@ -109,7 +109,7 @@ | |||
1977 | 109 | C | 109 | C |
1978 | 110 | INTEGER NHEL(NEXTERNAL,NCOMB) | 110 | INTEGER NHEL(NEXTERNAL,NCOMB) |
1979 | 111 | %(helicity_lines)s | 111 | %(helicity_lines)s |
1981 | 112 | COMMON/%(proc_prefix)sBORN_HEL_CONFIGS/NHEL | 112 | COMMON/%(proc_prefix)sPROCESS_NHEL/NHEL |
1982 | 113 | 113 | ||
1983 | 114 | INTEGER USERHEL | 114 | INTEGER USERHEL |
1984 | 115 | DATA USERHEL/-1/ | 115 | DATA USERHEL/-1/ |
1985 | @@ -357,7 +357,7 @@ | |||
1986 | 357 | C GLOBALS | 357 | C GLOBALS |
1987 | 358 | C | 358 | C |
1988 | 359 | INTEGER HELC(NEXTERNAL,NCOMB) | 359 | INTEGER HELC(NEXTERNAL,NCOMB) |
1990 | 360 | COMMON/%(proc_prefix)sBORN_HEL_CONFIGS/HELC | 360 | COMMON/%(proc_prefix)sPROCESS_NHEL/HELC |
1991 | 361 | 361 | ||
1992 | 362 | INTEGER POLARIZATIONS(0:NEXTERNAL,0:5) | 362 | INTEGER POLARIZATIONS(0:NEXTERNAL,0:5) |
1993 | 363 | COMMON/%(proc_prefix)sBORN_BEAM_POL/POLARIZATIONS | 363 | COMMON/%(proc_prefix)sBORN_BEAM_POL/POLARIZATIONS |
1994 | 364 | 364 | ||
1995 | === modified file 'madgraph/iolibs/template_files/matrix_standalone_v4.inc' | |||
1996 | --- madgraph/iolibs/template_files/matrix_standalone_v4.inc 2017-07-31 22:08:40 +0000 | |||
1997 | +++ madgraph/iolibs/template_files/matrix_standalone_v4.inc 2018-06-15 08:18:50 +0000 | |||
1998 | @@ -275,7 +275,7 @@ | |||
1999 | 275 | C GLOBALS | 275 | C GLOBALS |
2000 | 276 | C | 276 | C |
2001 | 277 | INTEGER HELC(NEXTERNAL,NCOMB) | 277 | INTEGER HELC(NEXTERNAL,NCOMB) |
2003 | 278 | COMMON/%(proc_prefix)sBORN_HEL_CONFIGS/HELC | 278 | COMMON/%(proc_prefix)sPROCESS_NHEL/HELC |
2004 | 279 | 279 | ||
2005 | 280 | INTEGER POLARIZATIONS(0:NEXTERNAL,0:5) | 280 | INTEGER POLARIZATIONS(0:NEXTERNAL,0:5) |
2006 | 281 | COMMON/%(proc_prefix)sBORN_BEAM_POL/POLARIZATIONS | 281 | COMMON/%(proc_prefix)sBORN_BEAM_POL/POLARIZATIONS |
2007 | 282 | 282 | ||
2008 | === modified file 'madgraph/iolibs/ufo_expression_parsers.py' | |||
2009 | --- madgraph/iolibs/ufo_expression_parsers.py 2018-04-24 19:44:41 +0000 | |||
2010 | +++ madgraph/iolibs/ufo_expression_parsers.py 2018-06-15 08:18:50 +0000 | |||
2011 | @@ -65,7 +65,7 @@ | |||
2012 | 65 | # List of tokens and literals | 65 | # List of tokens and literals |
2013 | 66 | tokens = ( | 66 | tokens = ( |
2014 | 67 | 'LOGICAL','LOGICALCOMB','POWER', 'CSC', 'SEC', 'ACSC', 'ASEC', 'TAN', 'ATAN', | 67 | 'LOGICAL','LOGICALCOMB','POWER', 'CSC', 'SEC', 'ACSC', 'ASEC', 'TAN', 'ATAN', |
2016 | 68 | 'SQRT', 'CONJ', 'RE', 'RE2', 'IM', 'PI', 'COMPLEX', 'FUNCTION', 'IF','ELSE', | 68 | 'SQRT', 'BUILTIN', 'CONJ', 'RE', 'RE2', 'IM', 'PI', 'COMPLEX', 'FUNCTION', 'IF','ELSE', |
2017 | 69 | 'VARIABLE', 'NUMBER','COND','REGLOG', 'REGLOGP', 'REGLOGM','RECMS','ARG' | 69 | 'VARIABLE', 'NUMBER','COND','REGLOG', 'REGLOGP', 'REGLOGM','RECMS','ARG' |
2018 | 70 | ) | 70 | ) |
2019 | 71 | literals = "=+-*/()," | 71 | literals = "=+-*/()," |
2020 | @@ -129,6 +129,9 @@ | |||
2021 | 129 | def t_CONJ(self, t): | 129 | def t_CONJ(self, t): |
2022 | 130 | r'complexconjugate' | 130 | r'complexconjugate' |
2023 | 131 | return t | 131 | return t |
2024 | 132 | def t_BUILTIN(self, t): | ||
2025 | 133 | r'(?<!\w)abs|bool|float|int|min|max(?=\()' | ||
2026 | 134 | return t | ||
2027 | 132 | def t_IM(self, t): | 135 | def t_IM(self, t): |
2028 | 133 | r'(?<!\w)im(?=\()' | 136 | r'(?<!\w)im(?=\()' |
2029 | 134 | return t | 137 | return t |
2030 | @@ -200,6 +203,7 @@ | |||
2031 | 200 | ('right','CONJ'), | 203 | ('right','CONJ'), |
2032 | 201 | ('right','RE'), | 204 | ('right','RE'), |
2033 | 202 | ('right','IM'), | 205 | ('right','IM'), |
2034 | 206 | ('right', 'BUILTIN'), | ||
2035 | 203 | ('right','FUNCTION'), | 207 | ('right','FUNCTION'), |
2036 | 204 | ('right','COMPLEX'), | 208 | ('right','COMPLEX'), |
2037 | 205 | ('right','COND'), | 209 | ('right','COND'), |
2038 | @@ -293,6 +297,14 @@ | |||
2039 | 293 | Fortran-style code.""" | 297 | Fortran-style code.""" |
2040 | 294 | 298 | ||
2041 | 295 | 299 | ||
2042 | 300 | builtin_equiv = {'abs': 'ABS', | ||
2043 | 301 | 'bool': 'LOGICAL', | ||
2044 | 302 | 'float': 'REAL', | ||
2045 | 303 | #'complex': 'COMPLEX', handle separatly | ||
2046 | 304 | 'int': 'INTEGER', | ||
2047 | 305 | 'min': 'MIN', | ||
2048 | 306 | 'max': 'MAX' | ||
2049 | 307 | } | ||
2050 | 296 | 308 | ||
2051 | 297 | # The following parser expressions need to be defined for each | 309 | # The following parser expressions need to be defined for each |
2052 | 298 | # output language/framework | 310 | # output language/framework |
2053 | @@ -305,9 +317,15 @@ | |||
2054 | 305 | '<':'.LT.', | 317 | '<':'.LT.', |
2055 | 306 | 'or':'.OR.', | 318 | 'or':'.OR.', |
2056 | 307 | 'and':'.AND.'} | 319 | 'and':'.AND.'} |
2057 | 320 | |||
2058 | 321 | types_def = { bool: lambda v: v , | ||
2059 | 322 | int :lambda v: 'INT(%s)' % v , | ||
2060 | 323 | float: lambda v: 'DBLE(%s)' % v, | ||
2061 | 324 | complex: lambda v: 'DCMPLX(%s)' % v } | ||
2062 | 308 | 325 | ||
2064 | 309 | def __init__(self, *args, **opts): | 326 | def __init__(self, model, *args, **opts): |
2065 | 310 | """ """ | 327 | """ """ |
2066 | 328 | self.model = model | ||
2067 | 311 | out = super(UFOExpressionParserFortran,self).__init__(*args, **opts) | 329 | out = super(UFOExpressionParserFortran,self).__init__(*args, **opts) |
2068 | 312 | self.to_define = set() | 330 | self.to_define = set() |
2069 | 313 | 331 | ||
2070 | @@ -321,6 +339,7 @@ | |||
2071 | 321 | 339 | ||
2072 | 322 | def p_expression_number(self, p): | 340 | def p_expression_number(self, p): |
2073 | 323 | "expression : NUMBER" | 341 | "expression : NUMBER" |
2074 | 342 | |||
2075 | 324 | if p[1].endswith('j'): | 343 | if p[1].endswith('j'): |
2076 | 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') |
2077 | 326 | else: | 345 | else: |
2078 | @@ -382,7 +401,8 @@ | |||
2079 | 382 | | REGLOGP group | 401 | | REGLOGP group |
2080 | 383 | | REGLOGM group | 402 | | REGLOGM group |
2081 | 384 | | TAN group | 403 | | TAN group |
2083 | 385 | | ATAN group''' | 404 | | ATAN group |
2084 | 405 | | BUILTIN group''' | ||
2085 | 386 | 406 | ||
2086 | 387 | if p[1] == 'csc': p[0] = '1d0/sin' + p[2] | 407 | if p[1] == 'csc': p[0] = '1d0/sin' + p[2] |
2087 | 388 | elif p[1] == 'sec': p[0] = '1d0/cos' + p[2] | 408 | elif p[1] == 'sec': p[0] = '1d0/cos' + p[2] |
2088 | @@ -398,9 +418,96 @@ | |||
2089 | 398 | elif p[1] == 'reglog': p[0] = 'reglog(DCMPLX' + p[2] +')' | 418 | elif p[1] == 'reglog': p[0] = 'reglog(DCMPLX' + p[2] +')' |
2090 | 399 | elif p[1] == 'reglogp': p[0] = 'reglogp(DCMPLX' + p[2] + ')' | 419 | elif p[1] == 'reglogp': p[0] = 'reglogp(DCMPLX' + p[2] + ')' |
2091 | 400 | elif p[1] == 'reglogm': p[0] = 'reglogm(DCMPLX' + p[2] + ')' | 420 | elif p[1] == 'reglogm': p[0] = 'reglogm(DCMPLX' + p[2] + ')' |
2092 | 421 | elif p[1] in self.builtin_equiv: p[0] = self.builtin_equiv[p[1]] + p[2] | ||
2093 | 401 | 422 | ||
2094 | 402 | if p[1] in ['reglog', 'reglogp', 'reglogm']: | 423 | if p[1] in ['reglog', 'reglogp', 'reglogm']: |
2095 | 403 | self.to_define.add(p[1]) | 424 | self.to_define.add(p[1]) |
2096 | 425 | |||
2097 | 426 | def create_modelfct(self): | ||
2098 | 427 | self.modelfct = dict([(f.name,f) for f in self.model.get('functions')]) | ||
2099 | 428 | |||
2100 | 429 | def p_expression_function1(self, p): | ||
2101 | 430 | "expression : FUNCTION '(' expression ')'" | ||
2102 | 431 | p1 = p[1] | ||
2103 | 432 | re_groups = self.re_cmath_function.match(p1) | ||
2104 | 433 | if re_groups: | ||
2105 | 434 | p1 = re_groups.group("name") | ||
2106 | 435 | p[0] = p1 + '(' + p[3] + ')' | ||
2107 | 436 | else: | ||
2108 | 437 | if not hasattr(self, 'modelfct'): | ||
2109 | 438 | self.create_modelfct() | ||
2110 | 439 | if p1 in self.modelfct: | ||
2111 | 440 | if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype: | ||
2112 | 441 | types = [self.types_def[complex] for _ in self.modelfct[p1].arguments] | ||
2113 | 442 | else: | ||
2114 | 443 | types = [self.types_def[t] for t in self.modelfct[p1].argstype] | ||
2115 | 444 | |||
2116 | 445 | p[0] = p1 + '(' + types[0](p[3]) + ')' | ||
2117 | 446 | else: | ||
2118 | 447 | p[0] = p1 + '(' + p[3] + ')' | ||
2119 | 448 | |||
2120 | 449 | |||
2121 | 450 | def p_expression_function2(self, p): | ||
2122 | 451 | '''expression : FUNCTION '(' expression ',' expression ')' | ||
2123 | 452 | | FUNCTION '(' boolexpression ',' expression ')' ''' | ||
2124 | 453 | |||
2125 | 454 | p1 = p[1] | ||
2126 | 455 | re_groups = self.re_cmath_function.match(p1) | ||
2127 | 456 | if re_groups: | ||
2128 | 457 | p1 = re_groups.group("name") | ||
2129 | 458 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ')' | ||
2130 | 459 | else: | ||
2131 | 460 | if not hasattr(self, 'modelfct'): | ||
2132 | 461 | self.create_modelfct() | ||
2133 | 462 | if p1 in self.modelfct: | ||
2134 | 463 | if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype: | ||
2135 | 464 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ')' | ||
2136 | 465 | else: | ||
2137 | 466 | types = [self.types_def[t] for t in self.modelfct[p1].argstype] | ||
2138 | 467 | |||
2139 | 468 | p[0] = p1 + '(' + types[0](p[3]) + ',' + types[1](p[5]) + ')' | ||
2140 | 469 | else: | ||
2141 | 470 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ')' | ||
2142 | 471 | |||
2143 | 472 | def p_expression_function3(self, p): | ||
2144 | 473 | "expression : FUNCTION '(' expression ',' expression ',' expression ')'" | ||
2145 | 474 | p1 = p[1] | ||
2146 | 475 | re_groups = self.re_cmath_function.match(p1) | ||
2147 | 476 | if re_groups: | ||
2148 | 477 | p1 = re_groups.group("name") | ||
2149 | 478 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ')' | ||
2150 | 479 | else: | ||
2151 | 480 | if not hasattr(self, 'modelfct'): | ||
2152 | 481 | self.create_modelfct() | ||
2153 | 482 | if p1 in self.modelfct: | ||
2154 | 483 | if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype: | ||
2155 | 484 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ')' | ||
2156 | 485 | else: | ||
2157 | 486 | types = [self.types_def[t] for t in self.modelfct[p1].argstype] | ||
2158 | 487 | |||
2159 | 488 | p[0] = p1 + '(' + types[0](p[3]) + ',' + types[1](p[5]) + ' , ' + types[2](p[7]) + ')' | ||
2160 | 489 | else: | ||
2161 | 490 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ')' | ||
2162 | 491 | |||
2163 | 492 | def p_expression_function4(self, p): | ||
2164 | 493 | "expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ')'" | ||
2165 | 494 | p1 = p[1] | ||
2166 | 495 | re_groups = self.re_cmath_function.match(p1) | ||
2167 | 496 | if re_groups: | ||
2168 | 497 | p1 = re_groups.group("name") | ||
2169 | 498 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ' , ' + p[9] + ')' | ||
2170 | 499 | else: | ||
2171 | 500 | if not hasattr(self, 'modelfct'): | ||
2172 | 501 | self.create_modelfct() | ||
2173 | 502 | if p1 in self.modelfct: | ||
2174 | 503 | if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype: | ||
2175 | 504 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ' , ' + p[9] + ')' | ||
2176 | 505 | else: | ||
2177 | 506 | types = [self.types_def[t] for t in self.modelfct[p1].argstype] | ||
2178 | 507 | p[0] = p1 + '(' + types[0](p[3]) + ',' + types[1](p[5]) + ' , ' + types[2](p[7]) + ' , ' + types[3](p[9]) + ')' | ||
2179 | 508 | |||
2180 | 509 | else: | ||
2181 | 510 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ' , ' + p[9] + ')' | ||
2182 | 404 | 511 | ||
2183 | 405 | def p_expression_real(self, p): | 512 | def p_expression_real(self, p): |
2184 | 406 | ''' expression : expression RE2 ''' | 513 | ''' expression : expression RE2 ''' |
2185 | @@ -432,6 +539,19 @@ | |||
2186 | 432 | Fortran-style code for quadruple precision computation.""" | 539 | Fortran-style code for quadruple precision computation.""" |
2187 | 433 | 540 | ||
2188 | 434 | mp_prefix = check_param_card.ParamCard.mp_prefix | 541 | mp_prefix = check_param_card.ParamCard.mp_prefix |
2189 | 542 | types_def = { bool: lambda v: v , | ||
2190 | 543 | int :lambda v: 'mp__%s' % v if not v.startswith(('(','mp__','1','2','3','4','5','6','7','8','9','0','-')) else v, | ||
2191 | 544 | float: lambda v: 'mp__%s' % v if not v.startswith(('(','mp__','1','2','3','4','5','6','7','8','9','0','-')) else v, | ||
2192 | 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} | ||
2193 | 546 | |||
2194 | 547 | builtin_equiv = {'abs': lambda v: 'ABS' +v, | ||
2195 | 548 | 'bool': lambda v: 'LOGICAL' +v , | ||
2196 | 549 | 'float': lambda v: 'REAL(' +v+", KIND=16)", | ||
2197 | 550 | 'complex': lambda v: 'COMPLEX(' +v+", KIND=16)", | ||
2198 | 551 | 'int': lambda v: 'INTEGER' +v , | ||
2199 | 552 | 'min': lambda v: 'MIN' +v , | ||
2200 | 553 | 'max': lambda v: 'MAX' +v | ||
2201 | 554 | } | ||
2202 | 435 | 555 | ||
2203 | 436 | # The following parser expressions need to be defined for each | 556 | # The following parser expressions need to be defined for each |
2204 | 437 | # output language/framework | 557 | # output language/framework |
2205 | @@ -462,6 +582,92 @@ | |||
2206 | 462 | except Exception: | 582 | except Exception: |
2207 | 463 | p[0] = p[1] + "**" + p[3] | 583 | p[0] = p[1] + "**" + p[3] |
2208 | 464 | 584 | ||
2209 | 585 | def p_expression_function1(self, p): | ||
2210 | 586 | "expression : FUNCTION '(' expression ')'" | ||
2211 | 587 | p1 = p[1] | ||
2212 | 588 | re_groups = self.re_cmath_function.match(p1) | ||
2213 | 589 | if re_groups: | ||
2214 | 590 | p1 = re_groups.group("name") | ||
2215 | 591 | p[0] = p1 + '(' + p[3] + ')' | ||
2216 | 592 | else: | ||
2217 | 593 | if not hasattr(self, 'modelfct'): | ||
2218 | 594 | self.create_modelfct() | ||
2219 | 595 | if p1 in self.modelfct: | ||
2220 | 596 | if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype: | ||
2221 | 597 | types = [self.types_def[complex] for _ in self.modelfct[p1].arguments] | ||
2222 | 598 | else: | ||
2223 | 599 | types = [self.types_def[t] for t in self.modelfct[p1].argstype] | ||
2224 | 600 | |||
2225 | 601 | p[0] = 'MP_' + p1 + '(' + types[0](p[3]) + ')' | ||
2226 | 602 | else: | ||
2227 | 603 | p[0] = 'MP_' + p1 + '(' + p[3] + ')' | ||
2228 | 604 | |||
2229 | 605 | |||
2230 | 606 | def p_expression_function2(self, p): | ||
2231 | 607 | '''expression : FUNCTION '(' expression ',' expression ')' | ||
2232 | 608 | | FUNCTION '(' boolexpression ',' expression ')' ''' | ||
2233 | 609 | |||
2234 | 610 | p1 = p[1] | ||
2235 | 611 | re_groups = self.re_cmath_function.match(p1) | ||
2236 | 612 | if re_groups: | ||
2237 | 613 | p1 = re_groups.group("name") | ||
2238 | 614 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ')' | ||
2239 | 615 | else: | ||
2240 | 616 | if not hasattr(self, 'modelfct'): | ||
2241 | 617 | self.create_modelfct() | ||
2242 | 618 | if p1 in self.modelfct: | ||
2243 | 619 | if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype: | ||
2244 | 620 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ')' | ||
2245 | 621 | else: | ||
2246 | 622 | types = [self.types_def[t] for t in self.modelfct[p1].argstype] | ||
2247 | 623 | |||
2248 | 624 | p[0] = 'MP_' + p1 + '(' + types[0](p[3]) + ',' + types[1](p[5]) + ')' | ||
2249 | 625 | else: | ||
2250 | 626 | p[0] = 'MP_' + p1 + '(' + p[3] + ',' + p[5] + ')' | ||
2251 | 627 | |||
2252 | 628 | def p_expression_function3(self, p): | ||
2253 | 629 | "expression : FUNCTION '(' expression ',' expression ',' expression ')'" | ||
2254 | 630 | p1 = p[1] | ||
2255 | 631 | re_groups = self.re_cmath_function.match(p1) | ||
2256 | 632 | if re_groups: | ||
2257 | 633 | p1 = re_groups.group("name") | ||
2258 | 634 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ')' | ||
2259 | 635 | else: | ||
2260 | 636 | if not hasattr(self, 'modelfct'): | ||
2261 | 637 | self.create_modelfct() | ||
2262 | 638 | if p1 in self.modelfct: | ||
2263 | 639 | if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype: | ||
2264 | 640 | p[0] = 'MP_' + p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ')' | ||
2265 | 641 | else: | ||
2266 | 642 | types = [self.types_def[t] for t in self.modelfct[p1].argstype] | ||
2267 | 643 | |||
2268 | 644 | p[0] = 'MP_' + p1 + '(' + types[0](p[3]) + ',' + types[1](p[5]) + ' , ' + types[2](p[7]) + ')' | ||
2269 | 645 | else: | ||
2270 | 646 | p[0] = 'MP_' + p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ')' | ||
2271 | 647 | |||
2272 | 648 | def p_expression_function4(self, p): | ||
2273 | 649 | "expression : FUNCTION '(' expression ',' expression ',' expression ',' expression ')'" | ||
2274 | 650 | p1 = p[1] | ||
2275 | 651 | re_groups = self.re_cmath_function.match(p1) | ||
2276 | 652 | if re_groups: | ||
2277 | 653 | p1 = re_groups.group("name") | ||
2278 | 654 | p[0] = p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ' , ' + p[9] + ')' | ||
2279 | 655 | else: | ||
2280 | 656 | if not hasattr(self, 'modelfct'): | ||
2281 | 657 | self.create_modelfct() | ||
2282 | 658 | if p1 in self.modelfct: | ||
2283 | 659 | if not hasattr(self.modelfct[p1], 'argstype') or not self.modelfct[p1].argstype: | ||
2284 | 660 | p[0] = 'MP_' + p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ' , ' + p[9] + ')' | ||
2285 | 661 | else: | ||
2286 | 662 | types = [self.types_def[t] for t in self.modelfct[p1].argstype] | ||
2287 | 663 | misc.sprint(types) | ||
2288 | 664 | p[0] = 'MP_' + p1 + '(' + types[0](p[3]) + ',' + types[1](p[5]) + ' , ' + types[2](p[7]) + ' , ' + types[3](p[9]) + ')' | ||
2289 | 665 | |||
2290 | 666 | else: | ||
2291 | 667 | p[0] = 'MP_' + p1 + '(' + p[3] + ',' + p[5] + ' , ' + p[7] + ' , ' + p[9] + ')' | ||
2292 | 668 | |||
2293 | 669 | |||
2294 | 670 | |||
2295 | 465 | def p_expression_if(self,p): | 671 | def p_expression_if(self,p): |
2296 | 466 | "expression : expression IF boolexpression ELSE expression " | 672 | "expression : expression IF boolexpression ELSE expression " |
2297 | 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]) |
2298 | @@ -502,7 +708,8 @@ | |||
2299 | 502 | | REGLOGP group | 708 | | REGLOGP group |
2300 | 503 | | REGLOGM group | 709 | | REGLOGM group |
2301 | 504 | | TAN group | 710 | | TAN group |
2303 | 505 | | ATAN group''' | 711 | | ATAN group |
2304 | 712 | | BUILTIN group''' | ||
2305 | 506 | 713 | ||
2306 | 507 | if p[1] == 'csc': p[0] = '1e0_16/cos' + p[2] | 714 | if p[1] == 'csc': p[0] = '1e0_16/cos' + p[2] |
2307 | 508 | elif p[1] == 'sec': p[0] = '1e0_16/sin' + p[2] | 715 | elif p[1] == 'sec': p[0] = '1e0_16/sin' + p[2] |
2308 | @@ -518,6 +725,7 @@ | |||
2309 | 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))' |
2310 | 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))' |
2311 | 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))' |
2312 | 728 | elif p[1] in self.builtin_equiv: p[0] = self.builtin_equiv[p[1]](p[2]) | ||
2313 | 521 | 729 | ||
2314 | 522 | if p[1] in ['reglog', 'reglogp', 'reglogm']: | 730 | if p[1] in ['reglog', 'reglogp', 'reglogm']: |
2315 | 523 | self.to_define.add(p[1]) | 731 | self.to_define.add(p[1]) |
2316 | @@ -557,6 +765,15 @@ | |||
2317 | 557 | '<':'<', | 765 | '<':'<', |
2318 | 558 | 'or':'||', | 766 | 'or':'||', |
2319 | 559 | 'and':'&&'} | 767 | 'and':'&&'} |
2320 | 768 | |||
2321 | 769 | builtin_equiv = {'abs': 'ABS', | ||
2322 | 770 | 'bool': 'bool', | ||
2323 | 771 | 'float': 'float', | ||
2324 | 772 | #'complex': 'COMPLEX', handle separatly | ||
2325 | 773 | 'int': 'int', | ||
2326 | 774 | 'min': 'min', | ||
2327 | 775 | 'max': 'max' | ||
2328 | 776 | } | ||
2329 | 560 | 777 | ||
2330 | 561 | # The following parser expressions need to be defined for each | 778 | # The following parser expressions need to be defined for each |
2331 | 562 | # output language/framework | 779 | # output language/framework |
2332 | @@ -634,7 +851,8 @@ | |||
2333 | 634 | | CONJ group | 851 | | CONJ group |
2334 | 635 | | REGLOG group | 852 | | REGLOG group |
2335 | 636 | | REGLOGP group | 853 | | REGLOGP group |
2337 | 637 | | REGLOGM group''' | 854 | | REGLOGM group |
2338 | 855 | | BUILTIN group ''' | ||
2339 | 638 | if p[1] == 'csc': p[0] = '1./cos' + p[2] | 856 | if p[1] == 'csc': p[0] = '1./cos' + p[2] |
2340 | 639 | elif p[1] == 'sec': p[0] = '1./sin' + p[2] | 857 | elif p[1] == 'sec': p[0] = '1./sin' + p[2] |
2341 | 640 | elif p[1] == 'acsc': p[0] = 'asin(1./' + p[2] + ')' | 858 | elif p[1] == 'acsc': p[0] = 'asin(1./' + p[2] + ')' |
2342 | @@ -649,6 +867,8 @@ | |||
2343 | 649 | elif p[1] == 'reglog': p[0] = 'reglog' + p[2] | 867 | elif p[1] == 'reglog': p[0] = 'reglog' + p[2] |
2344 | 650 | elif p[1] == 'reglogp': p[0] = 'reglogp' + p[2] | 868 | elif p[1] == 'reglogp': p[0] = 'reglogp' + p[2] |
2345 | 651 | elif p[1] == 'reglogm': p[0] = 'reglogm' + p[2] | 869 | elif p[1] == 'reglogm': p[0] = 'reglogm' + p[2] |
2346 | 870 | elif p[1] in self.buitin_equiv: p[0] = self.builtin_equiv[p[1]] + p[2] | ||
2347 | 871 | |||
2348 | 652 | 872 | ||
2349 | 653 | def p_expression_real(self, p): | 873 | def p_expression_real(self, p): |
2350 | 654 | ''' expression : expression RE2 ''' | 874 | ''' expression : expression RE2 ''' |
2351 | @@ -682,6 +902,15 @@ | |||
2352 | 682 | '<':'<', | 902 | '<':'<', |
2353 | 683 | 'or':' or ', | 903 | 'or':' or ', |
2354 | 684 | 'and':' and '} | 904 | 'and':' and '} |
2355 | 905 | |||
2356 | 906 | builtin_equiv = {'abs': 'abs', | ||
2357 | 907 | 'bool': 'bool', | ||
2358 | 908 | 'float': 'float', | ||
2359 | 909 | #'complex': 'COMPLEX', handle separatly | ||
2360 | 910 | 'int': 'int', | ||
2361 | 911 | 'min': 'min', | ||
2362 | 912 | 'max': 'max' | ||
2363 | 913 | } | ||
2364 | 685 | 914 | ||
2365 | 686 | def __init__(self, *args,**kw): | 915 | def __init__(self, *args,**kw): |
2366 | 687 | """Initialize the lex and yacc""" | 916 | """Initialize the lex and yacc""" |
2367 | @@ -790,7 +1019,8 @@ | |||
2368 | 790 | | CONJ group | 1019 | | CONJ group |
2369 | 791 | | REGLOG group | 1020 | | REGLOG group |
2370 | 792 | | REGLOGP group | 1021 | | REGLOGP group |
2372 | 793 | | REGLOGM group''' | 1022 | | REGLOGM group |
2373 | 1023 | | BUILTIN group''' | ||
2374 | 794 | if p[1] == 'csc': p[0] = 'csc' + p[2] | 1024 | if p[1] == 'csc': p[0] = 'csc' + p[2] |
2375 | 795 | elif p[1] == 'sec': p[0] = 'sec' + p[2] | 1025 | elif p[1] == 'sec': p[0] = 'sec' + p[2] |
2376 | 796 | elif p[1] == 'acsc': p[0] = 'acsc' + p[2] | 1026 | elif p[1] == 'acsc': p[0] = 'acsc' + p[2] |
2377 | @@ -805,6 +1035,7 @@ | |||
2378 | 805 | elif p[1] == 'reglog': p[0] = 'reglog' + p[2] | 1035 | elif p[1] == 'reglog': p[0] = 'reglog' + p[2] |
2379 | 806 | elif p[1] == 'reglogp': p[0] = 'reglogp' + p[2] | 1036 | elif p[1] == 'reglogp': p[0] = 'reglogp' + p[2] |
2380 | 807 | elif p[1] == 'reglogm': p[0] = 'reglogm' + p[2] | 1037 | elif p[1] == 'reglogm': p[0] = 'reglogm' + p[2] |
2381 | 1038 | elif p[1] in self.builtin_equiv: p[0] = self.builtin_equiv[p[1]] + p[2] | ||
2382 | 808 | 1039 | ||
2383 | 809 | def p_expression_real(self, p): | 1040 | def p_expression_real(self, p): |
2384 | 810 | ''' expression : expression RE2 ''' | 1041 | ''' expression : expression RE2 ''' |
2385 | 811 | 1042 | ||
2386 | === modified file 'madgraph/loop/loop_exporters.py' | |||
2387 | --- madgraph/loop/loop_exporters.py 2018-04-27 10:54:08 +0000 | |||
2388 | +++ madgraph/loop/loop_exporters.py 2018-06-15 08:18:50 +0000 | |||
2389 | @@ -411,6 +411,9 @@ | |||
2390 | 411 | shutil.copy(os.path.join(self.loop_dir,'StandAlone/', file), | 411 | shutil.copy(os.path.join(self.loop_dir,'StandAlone/', file), |
2391 | 412 | os.path.join(self.dir_path, file)) | 412 | os.path.join(self.dir_path, file)) |
2392 | 413 | 413 | ||
2393 | 414 | cp(pjoin(self.loop_dir,'StandAlone/Cards/MadLoopParams.dat'), | ||
2394 | 415 | pjoin(self.dir_path, 'Cards/MadLoopParams_default.dat')) | ||
2395 | 416 | |||
2396 | 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')) |
2397 | 415 | 418 | ||
2398 | 416 | # We might need to give a different name to the MadLoop makefile | 419 | # We might need to give a different name to the MadLoop makefile |
2399 | @@ -3041,7 +3044,18 @@ | |||
2400 | 3041 | context['MadEventOutput'] = True | 3044 | context['MadEventOutput'] = True |
2401 | 3042 | return context | 3045 | return context |
2402 | 3043 | 3046 | ||
2404 | 3044 | 3047 | #=========================================================================== | |
2405 | 3048 | # write a procdef_mg5 (an equivalent of the MG4 proc_card.dat) | ||
2406 | 3049 | #=========================================================================== | ||
2407 | 3050 | def write_procdef_mg5(self, file_pos, modelname, process_str): | ||
2408 | 3051 | """ write an equivalent of the MG4 proc_card in order that all the Madevent | ||
2409 | 3052 | Perl script of MadEvent4 are still working properly for pure MG5 run. | ||
2410 | 3053 | Not needed for StandAlone so we need to call the correct one | ||
2411 | 3054 | """ | ||
2412 | 3055 | |||
2413 | 3056 | return export_v4.ProcessExporterFortranMEGroup.write_procdef_mg5( | ||
2414 | 3057 | self, file_pos, modelname, process_str) | ||
2415 | 3058 | |||
2416 | 3045 | def get_source_libraries_list(self): | 3059 | def get_source_libraries_list(self): |
2417 | 3046 | """ Returns the list of libraries to be compiling when compiling the | 3060 | """ Returns the list of libraries to be compiling when compiling the |
2418 | 3047 | SOURCE directory. It is different for loop_induced processes and | 3061 | SOURCE directory. It is different for loop_induced processes and |
2419 | 3048 | 3062 | ||
2420 | === modified file 'madgraph/loop/loop_helas_objects.py' | |||
2421 | --- madgraph/loop/loop_helas_objects.py 2017-07-13 10:33:37 +0000 | |||
2422 | +++ madgraph/loop/loop_helas_objects.py 2018-06-15 08:18:50 +0000 | |||
2423 | @@ -22,6 +22,7 @@ | |||
2424 | 22 | import logging | 22 | import logging |
2425 | 23 | import itertools | 23 | import itertools |
2426 | 24 | import math | 24 | import math |
2427 | 25 | import os | ||
2428 | 25 | 26 | ||
2429 | 26 | import aloha | 27 | import aloha |
2430 | 27 | import aloha.create_aloha as create_aloha | 28 | import aloha.create_aloha as create_aloha |
2431 | @@ -2316,11 +2317,10 @@ | |||
2432 | 2316 | already created and can be specified here instead of being generated. | 2317 | already created and can be specified here instead of being generated. |
2433 | 2317 | This can make a difference for very complicated models.""" | 2318 | This can make a difference for very complicated models.""" |
2434 | 2318 | 2319 | ||
2437 | 2319 | 2320 | if not alohaModel:# is None: | |
2436 | 2320 | if alohaModel is None: | ||
2438 | 2321 | # Generate it here | 2321 | # Generate it here |
2439 | 2322 | model = self.get('processes')[0].get('model') | 2322 | model = self.get('processes')[0].get('model') |
2441 | 2323 | myAlohaModel = create_aloha.AbstractALOHAModel(model.get('name')) | 2323 | myAlohaModel = create_aloha.AbstractALOHAModel(os.path.basename(model.get('modelpath'))) |
2442 | 2324 | myAlohaModel.add_Lorentz_object(model.get('lorentz')) | 2324 | myAlohaModel.add_Lorentz_object(model.get('lorentz')) |
2443 | 2325 | else: | 2325 | else: |
2444 | 2326 | # Use the one provided | 2326 | # Use the one provided |
2445 | 2327 | 2327 | ||
2446 | === modified file 'madgraph/madevent/gen_crossxhtml.py' | |||
2447 | --- madgraph/madevent/gen_crossxhtml.py 2018-04-26 14:24:04 +0000 | |||
2448 | +++ madgraph/madevent/gen_crossxhtml.py 2018-06-15 08:18:50 +0000 | |||
2449 | @@ -394,7 +394,7 @@ | |||
2450 | 394 | 394 | ||
2451 | 395 | def output(self): | 395 | def output(self): |
2452 | 396 | """ write the output file """ | 396 | """ write the output file """ |
2454 | 397 | 397 | ||
2455 | 398 | # 1) Create the text for the status directory | 398 | # 1) Create the text for the status directory |
2456 | 399 | if self.status and self.current: | 399 | if self.status and self.current: |
2457 | 400 | if isinstance(self.status, str): | 400 | if isinstance(self.status, str): |
2458 | @@ -1319,10 +1319,14 @@ | |||
2459 | 1319 | def get_nb_line(self): | 1319 | def get_nb_line(self): |
2460 | 1320 | 1320 | ||
2461 | 1321 | nb_line = 0 | 1321 | nb_line = 0 |
2462 | 1322 | self.nb_line = nb_line | ||
2463 | 1322 | for key in ['parton', 'reweight', 'pythia', 'pythia8', 'pgs', | 1323 | for key in ['parton', 'reweight', 'pythia', 'pythia8', 'pgs', |
2464 | 1323 | 'delphes', 'shower', 'madanalysis5_hadron']: | 1324 | 'delphes', 'shower', 'madanalysis5_hadron']: |
2465 | 1324 | if len(getattr(self, key)): | 1325 | if len(getattr(self, key)): |
2466 | 1325 | nb_line += 1 | 1326 | nb_line += 1 |
2467 | 1327 | if nb_line ==0 and not os.path.exists(pjoin(self.me_dir, "Events", self["run_name"], "%(run)s_%(tag)s_banner.txt)" % \ | ||
2468 | 1328 | {"run":self["run_name"], 'tag': self["tag"]})): | ||
2469 | 1329 | return 0 | ||
2470 | 1326 | return max([nb_line,1]) | 1330 | return max([nb_line,1]) |
2471 | 1327 | 1331 | ||
2472 | 1328 | 1332 | ||
2473 | @@ -1344,6 +1348,13 @@ | |||
2474 | 1344 | <td> %(links)s</td> | 1348 | <td> %(links)s</td> |
2475 | 1345 | <td> %(action)s</td> | 1349 | <td> %(action)s</td> |
2476 | 1346 | </tr>""" | 1350 | </tr>""" |
2477 | 1351 | sub_part_template_parton_no_results = """ | ||
2478 | 1352 | <td rowspan=%(cross_span)s><center><a> %(cross).4g <font face=symbol>±</font> %(err).2g %(bias)s</a> %(syst)s </center></td> | ||
2479 | 1353 | <td rowspan=%(cross_span)s><center> %(nb_event)s<center></td><td> %(type)s </td> | ||
2480 | 1354 | <td> %(links)s</td> | ||
2481 | 1355 | <td> %(action)s</td> | ||
2482 | 1356 | </tr>""" | ||
2483 | 1357 | |||
2484 | 1347 | 1358 | ||
2485 | 1348 | sub_part_template_py8 = """ | 1359 | sub_part_template_py8 = """ |
2486 | 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> |
2487 | @@ -1373,6 +1384,8 @@ | |||
2488 | 1373 | 1384 | ||
2489 | 1374 | # Compute the HTMl output for subpart | 1385 | # Compute the HTMl output for subpart |
2490 | 1375 | nb_line = self.get_nb_line() | 1386 | nb_line = self.get_nb_line() |
2491 | 1387 | if nb_line == 0: | ||
2492 | 1388 | return "" | ||
2493 | 1376 | # Check that cross/nb_event/error are define | 1389 | # Check that cross/nb_event/error are define |
2494 | 1377 | if self.pythia and not self['nb_event']: | 1390 | if self.pythia and not self['nb_event']: |
2495 | 1378 | try: | 1391 | try: |
2496 | @@ -1429,7 +1442,10 @@ | |||
2497 | 1429 | elif ttype=='pythia8' and self['cross_pythia'] == -1: | 1442 | elif ttype=='pythia8' and self['cross_pythia'] == -1: |
2498 | 1430 | template = sub_part_template_py8 | 1443 | template = sub_part_template_py8 |
2499 | 1431 | else: | 1444 | else: |
2501 | 1432 | template = sub_part_template_parton | 1445 | if os.path.exists(pjoin(self.me_dir,'HTML', self['run_name'],'results.html')): |
2502 | 1446 | template = sub_part_template_parton | ||
2503 | 1447 | else: | ||
2504 | 1448 | template = sub_part_template_parton_no_results | ||
2505 | 1433 | first = ttype | 1449 | first = ttype |
2506 | 1434 | if ttype=='parton' and self['cross_pythia']: | 1450 | if ttype=='parton' and self['cross_pythia']: |
2507 | 1435 | local_dico['cross_span'] = 1 | 1451 | local_dico['cross_span'] = 1 |
2508 | 1436 | 1452 | ||
2509 | === modified file 'madgraph/madevent/sum_html.py' | |||
2510 | --- madgraph/madevent/sum_html.py 2018-04-26 14:41:07 +0000 | |||
2511 | +++ madgraph/madevent/sum_html.py 2018-06-15 08:18:50 +0000 | |||
2512 | @@ -575,6 +575,12 @@ | |||
2513 | 575 | mod_link = '../../SubProcesses/%(P)s/%(G)s/log.txt' % \ | 575 | mod_link = '../../SubProcesses/%(P)s/%(G)s/log.txt' % \ |
2514 | 576 | {'P': os.path.basename(self.name), | 576 | {'P': os.path.basename(self.name), |
2515 | 577 | 'G': oneresult.name} | 577 | 'G': oneresult.name} |
2516 | 578 | if not os.path.exists(link) and not os.path.exists(mod_link): | ||
2517 | 579 | P = os.path.basename(self.name) | ||
2518 | 580 | base = pjoin(me_dir, 'SubProcesses', P, os.path.dirname(link)) | ||
2519 | 581 | pos = [pjoin(base,c) for c in os.listdir(base) if c.endswith('.log')] | ||
2520 | 582 | if len(pos) == 1: | ||
2521 | 583 | link = pos[0] | ||
2522 | 578 | else: | 584 | else: |
2523 | 579 | link = '#%s' % oneresult.name | 585 | link = '#%s' % oneresult.name |
2524 | 580 | mod_link = link | 586 | mod_link = link |
2525 | 581 | 587 | ||
2526 | === modified file 'madgraph/various/banner.py' | |||
2527 | --- madgraph/various/banner.py 2018-04-26 09:15:05 +0000 | |||
2528 | +++ madgraph/various/banner.py 2018-06-15 08:18:50 +0000 | |||
2529 | @@ -188,7 +188,6 @@ | |||
2530 | 188 | """return the cross-section of the file""" | 188 | """return the cross-section of the file""" |
2531 | 189 | 189 | ||
2532 | 190 | if "init" not in self: | 190 | if "init" not in self: |
2533 | 191 | misc.sprint(self.keys()) | ||
2534 | 192 | raise Exception | 191 | raise Exception |
2535 | 193 | 192 | ||
2536 | 194 | text = self["init"].split('\n') | 193 | text = self["init"].split('\n') |
2537 | @@ -339,6 +338,12 @@ | |||
2538 | 339 | # assert "all" in cross | 338 | # assert "all" in cross |
2539 | 340 | assert "init" in self | 339 | assert "init" in self |
2540 | 341 | 340 | ||
2541 | 341 | cross = dict(cross) | ||
2542 | 342 | for key in cross.keys(): | ||
2543 | 343 | if isinstance(key, str) and key.isdigit() and int(key) not in cross: | ||
2544 | 344 | cross[int(key)] = cross[key] | ||
2545 | 345 | |||
2546 | 346 | |||
2547 | 342 | all_lines = self["init"].split('\n') | 347 | all_lines = self["init"].split('\n') |
2548 | 343 | new_data = [] | 348 | new_data = [] |
2549 | 344 | new_data.append(all_lines[0]) | 349 | new_data.append(all_lines[0]) |
2550 | @@ -353,7 +358,10 @@ | |||
2551 | 353 | if int(pid) not in cross: | 358 | if int(pid) not in cross: |
2552 | 354 | raise Exception | 359 | raise Exception |
2553 | 355 | pid = int(pid) | 360 | pid = int(pid) |
2555 | 356 | ratio = cross[pid]/float(xsec) | 361 | if float(xsec): |
2556 | 362 | ratio = cross[pid]/float(xsec) | ||
2557 | 363 | else: | ||
2558 | 364 | ratio = 0 | ||
2559 | 357 | line = " %+13.7e %+13.7e %+13.7e %i" % \ | 365 | line = " %+13.7e %+13.7e %+13.7e %i" % \ |
2560 | 358 | (float(cross[pid]), ratio* float(xerr), ratio*float(xmax), pid) | 366 | (float(cross[pid]), ratio* float(xerr), ratio*float(xmax), pid) |
2561 | 359 | new_data.append(line) | 367 | new_data.append(line) |
2562 | @@ -1003,17 +1011,23 @@ | |||
2563 | 1003 | 1011 | ||
2564 | 1004 | return log(text) | 1012 | return log(text) |
2565 | 1005 | 1013 | ||
2566 | 1014 | def post_set(self, name, value, change_userdefine, raiseerror): | ||
2567 | 1015 | |||
2568 | 1016 | if value is None: | ||
2569 | 1017 | value = self[name] | ||
2570 | 1018 | |||
2571 | 1019 | if hasattr(self, 'post_set_%s' % name): | ||
2572 | 1020 | return getattr(self, 'post_set_%s' % name)(value, change_userdefine, raiseerror) | ||
2573 | 1006 | 1021 | ||
2574 | 1007 | def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): | 1022 | def __setitem__(self, name, value, change_userdefine=False,raiseerror=False): |
2575 | 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. |
2576 | 1009 | change_userdefine on True if we have to add the parameter in user_set | 1024 | change_userdefine on True if we have to add the parameter in user_set |
2577 | 1010 | """ | 1025 | """ |
2579 | 1011 | 1026 | ||
2580 | 1012 | if not len(self): | 1027 | if not len(self): |
2581 | 1013 | #Should never happen but when deepcopy/pickle | 1028 | #Should never happen but when deepcopy/pickle |
2582 | 1014 | self.__init__() | 1029 | self.__init__() |
2585 | 1015 | 1030 | ||
2584 | 1016 | |||
2586 | 1017 | name = name.strip() | 1031 | name = name.strip() |
2587 | 1018 | lower_name = name.lower() | 1032 | lower_name = name.lower() |
2588 | 1019 | 1033 | ||
2589 | @@ -1031,13 +1045,17 @@ | |||
2590 | 1031 | if lower_name in self.user_set: | 1045 | if lower_name in self.user_set: |
2591 | 1032 | self.user_set.remove(lower_name) | 1046 | self.user_set.remove(lower_name) |
2592 | 1033 | #keep old value. | 1047 | #keep old value. |
2593 | 1048 | self.post_set(lower_name, 'auto', change_userdefine, raiseerror) | ||
2594 | 1034 | return | 1049 | return |
2595 | 1035 | elif lower_name in self.auto_set: | 1050 | elif lower_name in self.auto_set: |
2596 | 1036 | self.auto_set.remove(lower_name) | 1051 | self.auto_set.remove(lower_name) |
2597 | 1037 | 1052 | ||
2598 | 1038 | # 2. Find the type of the attribute that we want | 1053 | # 2. Find the type of the attribute that we want |
2599 | 1039 | if lower_name in self.list_parameter: | 1054 | if lower_name in self.list_parameter: |
2601 | 1040 | targettype = self.list_parameter[lower_name] | 1055 | targettype = self.list_parameter[lower_name] |
2602 | 1056 | |||
2603 | 1057 | |||
2604 | 1058 | |||
2605 | 1041 | if isinstance(value, str): | 1059 | if isinstance(value, str): |
2606 | 1042 | # split for each comma/space | 1060 | # split for each comma/space |
2607 | 1043 | value = value.strip() | 1061 | value = value.strip() |
2608 | @@ -1058,8 +1076,6 @@ | |||
2609 | 1058 | i+=2 | 1076 | i+=2 |
2610 | 1059 | new_value += current | 1077 | new_value += current |
2611 | 1060 | 1078 | ||
2612 | 1061 | |||
2613 | 1062 | |||
2614 | 1063 | value = new_value | 1079 | value = new_value |
2615 | 1064 | 1080 | ||
2616 | 1065 | elif not hasattr(value, '__iter__'): | 1081 | elif not hasattr(value, '__iter__'): |
2617 | @@ -1111,7 +1127,8 @@ | |||
2618 | 1111 | dict.__setitem__(self, lower_name, values) | 1127 | dict.__setitem__(self, lower_name, values) |
2619 | 1112 | if change_userdefine: | 1128 | if change_userdefine: |
2620 | 1113 | self.user_set.add(lower_name) | 1129 | self.user_set.add(lower_name) |
2622 | 1114 | return | 1130 | #check for specific action |
2623 | 1131 | return self.post_set(lower_name, None, change_userdefine, raiseerror) | ||
2624 | 1115 | elif lower_name in self.dict_parameter: | 1132 | elif lower_name in self.dict_parameter: |
2625 | 1116 | targettype = self.dict_parameter[lower_name] | 1133 | targettype = self.dict_parameter[lower_name] |
2626 | 1117 | full_reset = True #check if we just update the current dict or not | 1134 | full_reset = True #check if we just update the current dict or not |
2627 | @@ -1161,7 +1178,7 @@ | |||
2628 | 1161 | raise Exception, '%s should be of dict type'% lower_name | 1178 | raise Exception, '%s should be of dict type'% lower_name |
2629 | 1162 | if change_userdefine: | 1179 | if change_userdefine: |
2630 | 1163 | self.user_set.add(lower_name) | 1180 | self.user_set.add(lower_name) |
2632 | 1164 | return | 1181 | return self.post_set(lower_name, None, change_userdefine, raiseerror) |
2633 | 1165 | elif name in self: | 1182 | elif name in self: |
2634 | 1166 | targettype = type(self[name]) | 1183 | targettype = type(self[name]) |
2635 | 1167 | else: | 1184 | else: |
2636 | @@ -1175,7 +1192,7 @@ | |||
2637 | 1175 | self.lower_to_case[lower_name] = name | 1192 | self.lower_to_case[lower_name] = name |
2638 | 1176 | if change_userdefine: | 1193 | if change_userdefine: |
2639 | 1177 | self.user_set.add(lower_name) | 1194 | self.user_set.add(lower_name) |
2641 | 1178 | return | 1195 | return self.post_set(lower_name, None, change_userdefine, raiseerror) |
2642 | 1179 | 1196 | ||
2643 | 1180 | value = self.format_variable(value, targettype, name=name) | 1197 | value = self.format_variable(value, targettype, name=name) |
2644 | 1181 | #check that the value is allowed: | 1198 | #check that the value is allowed: |
2645 | @@ -1206,6 +1223,7 @@ | |||
2646 | 1206 | dict.__setitem__(self, lower_name, value) | 1223 | dict.__setitem__(self, lower_name, value) |
2647 | 1207 | if change_userdefine: | 1224 | if change_userdefine: |
2648 | 1208 | self.user_set.add(lower_name) | 1225 | self.user_set.add(lower_name) |
2649 | 1226 | self.post_set(lower_name, None, change_userdefine, raiseerror) | ||
2650 | 1209 | 1227 | ||
2651 | 1210 | 1228 | ||
2652 | 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, |
2653 | @@ -2368,7 +2386,10 @@ | |||
2654 | 2368 | name = nline[1].strip().lower() | 2386 | name = nline[1].strip().lower() |
2655 | 2369 | value = self[name] | 2387 | value = self[name] |
2656 | 2370 | if name in self.list_parameter: | 2388 | if name in self.list_parameter: |
2658 | 2371 | value = ', '.join([str(v) for v in value]) | 2389 | if self.list_parameter[name] != str: |
2659 | 2390 | value = ', '.join([str(v) for v in value]) | ||
2660 | 2391 | else: | ||
2661 | 2392 | value = "['%s']" % "', '".join(str(v) for v in value) | ||
2662 | 2372 | if python_template: | 2393 | if python_template: |
2663 | 2373 | text += line % {nline[1].strip():value, name:value} | 2394 | text += line % {nline[1].strip():value, name:value} |
2664 | 2374 | written.add(name) | 2395 | written.add(name) |
2665 | @@ -2732,6 +2753,7 @@ | |||
2666 | 2732 | self.add_param("time_of_flight", -1.0, include=False) | 2753 | self.add_param("time_of_flight", -1.0, include=False) |
2667 | 2733 | self.add_param("nevents", 10000) | 2754 | self.add_param("nevents", 10000) |
2668 | 2734 | self.add_param("iseed", 0) | 2755 | self.add_param("iseed", 0) |
2669 | 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") | ||
2670 | 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], |
2671 | 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') |
2672 | 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], |
2673 | 2738 | 2760 | ||
2674 | === added file 'madgraph/various/hepmc_parser.py' | |||
2675 | --- madgraph/various/hepmc_parser.py 1970-01-01 00:00:00 +0000 | |||
2676 | +++ madgraph/various/hepmc_parser.py 2018-06-15 08:18:50 +0000 | |||
2677 | @@ -0,0 +1,342 @@ | |||
2678 | 1 | from __future__ import division | ||
2679 | 2 | |||
2680 | 3 | import gzip | ||
2681 | 4 | |||
2682 | 5 | if '__main__' == __name__: | ||
2683 | 6 | import sys | ||
2684 | 7 | sys.path.append('../../') | ||
2685 | 8 | import misc | ||
2686 | 9 | import os | ||
2687 | 10 | import logging | ||
2688 | 11 | |||
2689 | 12 | class HEPMC_Particle(object): | ||
2690 | 13 | |||
2691 | 14 | def __init__(self, text=None, event=None): | ||
2692 | 15 | |||
2693 | 16 | self.barcode = 0 | ||
2694 | 17 | self.pdg = 0 | ||
2695 | 18 | self.px = 0 | ||
2696 | 19 | self.py = 0 | ||
2697 | 20 | self.pz = 0 | ||
2698 | 21 | self.E = 0 | ||
2699 | 22 | self.mass = 0 | ||
2700 | 23 | self.status = 0 | ||
2701 | 24 | self.polarization_theta = 0 | ||
2702 | 25 | self.polarization_phi = 0 | ||
2703 | 26 | self.vertex_barcode = 0 #vertex on which this particle is incoming | ||
2704 | 27 | self.nb_flow_list = 0 | ||
2705 | 28 | self.flows = [] | ||
2706 | 29 | |||
2707 | 30 | if text: | ||
2708 | 31 | self.parse(text, event) | ||
2709 | 32 | |||
2710 | 33 | @property | ||
2711 | 34 | def pdg_code(self): | ||
2712 | 35 | return self.pdg | ||
2713 | 36 | |||
2714 | 37 | pid = pdg_code | ||
2715 | 38 | |||
2716 | 39 | @property | ||
2717 | 40 | def helicity(self): | ||
2718 | 41 | return 9 | ||
2719 | 42 | |||
2720 | 43 | def parse(self,line=None, event=None): | ||
2721 | 44 | """ P 3 -2 0 0 3.0332529367341937e+01 3.0332529367341937e+01 0 21 0 0 -3 1 2 501""" | ||
2722 | 45 | |||
2723 | 46 | data = line.split() | ||
2724 | 47 | |||
2725 | 48 | self.barcode = int(data[1]) # 3 | ||
2726 | 49 | self.pdg = int(data[2]) #-2 | ||
2727 | 50 | self.px = float(data[3]) #0 | ||
2728 | 51 | self.py = float(data[4]) #0 | ||
2729 | 52 | self.pz = float(data[5]) #30.3 | ||
2730 | 53 | self.E = float(data[6]) # 30.3 | ||
2731 | 54 | self.mass = float(data[7]) # 0 | ||
2732 | 55 | self.status = int(data[8]) # 21 | ||
2733 | 56 | self.polarization_theta = float(data[9]) #0 | ||
2734 | 57 | self.polarization_phi = float(data[10]) #0 | ||
2735 | 58 | self.vertex_barcode = float(data[11]) #-3 vertex on which this particle is incoming | ||
2736 | 59 | self.nb_flow_list = int(data[12]) # 1 | ||
2737 | 60 | self.flows = [(int(data[13+2*i]),int(data[13+2*i+1])) | ||
2738 | 61 | for i in range(self.nb_flow_list)] # 2 501 | ||
2739 | 62 | |||
2740 | 63 | if event: | ||
2741 | 64 | event.curr_vertex.add_outcoming(self) | ||
2742 | 65 | |||
2743 | 66 | def __str__(self): | ||
2744 | 67 | """P 3 -2 0 0 3.0332529367341937e+01 3.0332529367341937e+01 0 21 0 0 -3 1 2 501""" | ||
2745 | 68 | |||
2746 | 69 | start = """P %i %i %17.16e %17.16e %17.16e %17.16e %17.16e %i %17.16e %17.16e %i %i %s\n""" %\ | ||
2747 | 70 | (self.barcode, self.pdg, self.px, self.py, self.pz, self.E, self.mass, | ||
2748 | 71 | self.status, self.polarization_theta, self.polarization_phi, | ||
2749 | 72 | self.vertex_barcode, self.nb_flow_list, ' '.join("%i %i" % f for f in self.flows)) | ||
2750 | 73 | |||
2751 | 74 | |||
2752 | 75 | return start.replace("%17.16e" % 0, '0') | ||
2753 | 76 | |||
2754 | 77 | |||
2755 | 78 | |||
2756 | 79 | |||
2757 | 80 | class HEPMC_Vertex(object): | ||
2758 | 81 | |||
2759 | 82 | def __init__(self, text=None, event=None): | ||
2760 | 83 | |||
2761 | 84 | self.barcode = 0 | ||
2762 | 85 | self.id = 0 | ||
2763 | 86 | self.x = 0 | ||
2764 | 87 | self.y = 0 | ||
2765 | 88 | self.z = 0 | ||
2766 | 89 | self.ctau = 0 | ||
2767 | 90 | self.nb_orphan = 0 | ||
2768 | 91 | self.nb_outgoing = 0 | ||
2769 | 92 | self.nb_weight = 0 | ||
2770 | 93 | self.weights = [] | ||
2771 | 94 | self.incoming = [] | ||
2772 | 95 | self.outcoming = [] | ||
2773 | 96 | |||
2774 | 97 | |||
2775 | 98 | if text: | ||
2776 | 99 | self.parse(text,event) | ||
2777 | 100 | |||
2778 | 101 | def parse(self, line, event=None): | ||
2779 | 102 | """V -8 0 0 0 0 0 0 2 0""" | ||
2780 | 103 | |||
2781 | 104 | data = line.split() | ||
2782 | 105 | self.barcode = int(data[1]) | ||
2783 | 106 | self.id = float(data[2]) | ||
2784 | 107 | self.x = float(data[3]) | ||
2785 | 108 | self.y = float(data[4]) | ||
2786 | 109 | self.z = float(data[5]) | ||
2787 | 110 | self.ctau = float(data[6]) | ||
2788 | 111 | self.nb_orphan = int(data[7]) | ||
2789 | 112 | self.nb_outgoing = int(data[8]) | ||
2790 | 113 | self.nb_weight = int(data[9]) | ||
2791 | 114 | self.weights = [float(data[10+i]) for i in range(self.nb_weight)] | ||
2792 | 115 | if event: | ||
2793 | 116 | event.vertex[self.barcode] = self | ||
2794 | 117 | |||
2795 | 118 | def add_incoming(self, particle): | ||
2796 | 119 | self.incoming.append(particle) | ||
2797 | 120 | |||
2798 | 121 | def add_outcoming(self, particle): | ||
2799 | 122 | self.outcoming.append(particle) | ||
2800 | 123 | |||
2801 | 124 | class HEPMC_Event(object): | ||
2802 | 125 | |||
2803 | 126 | def __init__(self, text=None): | ||
2804 | 127 | """The initialization of an empty Event (or one associate to a text file)""" | ||
2805 | 128 | # | ||
2806 | 129 | self.particles = {} #barcode to object | ||
2807 | 130 | self.vertex = {} #barcode to object | ||
2808 | 131 | |||
2809 | 132 | # First line information (E line) | ||
2810 | 133 | self.event_id = 0 | ||
2811 | 134 | self.nb_interaction = 0 | ||
2812 | 135 | self.scale = 0. | ||
2813 | 136 | self.alphas = 0. | ||
2814 | 137 | self.alphaew = 0. | ||
2815 | 138 | self.process_id = 0 | ||
2816 | 139 | self.barcode_vertex =0 | ||
2817 | 140 | self.nb_vertex = 0 | ||
2818 | 141 | self.barcode_beam1 = 0 | ||
2819 | 142 | self.barcode_beam2 = 0 | ||
2820 | 143 | self.nb_random_state = 0 | ||
2821 | 144 | self.randoms = [] | ||
2822 | 145 | self.nb_weight = 0 | ||
2823 | 146 | self.weights = [] | ||
2824 | 147 | |||
2825 | 148 | # not parse container (so far) | ||
2826 | 149 | self.N = '' | ||
2827 | 150 | self.U = '' | ||
2828 | 151 | self.C = '' | ||
2829 | 152 | self.H = '' | ||
2830 | 153 | self.F = '' | ||
2831 | 154 | |||
2832 | 155 | if text: | ||
2833 | 156 | self.parse(text) | ||
2834 | 157 | |||
2835 | 158 | @property | ||
2836 | 159 | def wgt(self): | ||
2837 | 160 | if self.weights: | ||
2838 | 161 | return self.weights[0] | ||
2839 | 162 | else: | ||
2840 | 163 | return 0. | ||
2841 | 164 | @wgt.setter | ||
2842 | 165 | def wgt(self, value): | ||
2843 | 166 | self.nb_weight = 1 | ||
2844 | 167 | self.weights = [value] | ||
2845 | 168 | |||
2846 | 169 | |||
2847 | 170 | def parse(self, text): | ||
2848 | 171 | |||
2849 | 172 | for line in text.split('\n'): | ||
2850 | 173 | if not line: | ||
2851 | 174 | continue | ||
2852 | 175 | if line[0] == 'P': | ||
2853 | 176 | P = HEPMC_Particle(line, self) | ||
2854 | 177 | self.add_particle(P) | ||
2855 | 178 | elif line[0] == 'V': | ||
2856 | 179 | V = HEPMC_Vertex(line, self) | ||
2857 | 180 | self.curr_vertex = V | ||
2858 | 181 | self.add_vertex(V) | ||
2859 | 182 | elif line[0] in ['E', 'N', 'U', 'H','F','C']: | ||
2860 | 183 | getattr(self, 'parse_%s' % line[0])(line) | ||
2861 | 184 | else: | ||
2862 | 185 | self.comment = '%s%s\n' % (self.comment,line) | ||
2863 | 186 | |||
2864 | 187 | # add the information about incoming particle | ||
2865 | 188 | for particle in self: | ||
2866 | 189 | try: | ||
2867 | 190 | self.vertex[particle.vertex_barcode].add_incoming(particle) | ||
2868 | 191 | except KeyError: | ||
2869 | 192 | if particle.vertex_barcode == 0: | ||
2870 | 193 | continue | ||
2871 | 194 | raise | ||
2872 | 195 | |||
2873 | 196 | def parse_E(self,line): | ||
2874 | 197 | """E 249 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 462 1 2 0 1 8.2247251000000005e-22""" | ||
2875 | 198 | |||
2876 | 199 | data = line.split() | ||
2877 | 200 | self.event_id = int(data[1]) | ||
2878 | 201 | self.nb_interaction = int(data[2]) | ||
2879 | 202 | self.scale = float(data[3]) | ||
2880 | 203 | self.alphas = float(data[4]) | ||
2881 | 204 | self.alphaew = float(data[5]) | ||
2882 | 205 | self.process_id = int(data[6]) | ||
2883 | 206 | self.barcode_vertex= int(data[7]) | ||
2884 | 207 | self.nb_vertex = int(data[8]) | ||
2885 | 208 | self.barcode_beam1 = int(data[9]) | ||
2886 | 209 | self.barcode_beam2 = int(data[10]) | ||
2887 | 210 | self.nb_random_state = int(data[11]) | ||
2888 | 211 | self.randoms = [float(data[12+i]) for i in range(self.nb_random_state)] | ||
2889 | 212 | self.nb_weight = int(data[12+self.nb_random_state]) | ||
2890 | 213 | self.weights = [float(data[13+self.nb_random_state+i]) | ||
2891 | 214 | for i in range(self.nb_weight)] | ||
2892 | 215 | |||
2893 | 216 | def parse_N(self,line): | ||
2894 | 217 | """just keep the information so far""" | ||
2895 | 218 | self.N = '%s\n' % line | ||
2896 | 219 | def parse_U(self,line): | ||
2897 | 220 | self.U = '%s\n' % line | ||
2898 | 221 | def parse_H(self,line): | ||
2899 | 222 | self.H = '%s\n' % line | ||
2900 | 223 | def parse_F(self,line): | ||
2901 | 224 | self.F = '%s\n' % line | ||
2902 | 225 | def parse_C(self,line): | ||
2903 | 226 | self.C = '%s\n' % line | ||
2904 | 227 | |||
2905 | 228 | def __iter__(self): | ||
2906 | 229 | return self.particles.values().__iter__() | ||
2907 | 230 | |||
2908 | 231 | #def __next__(self): | ||
2909 | 232 | # | ||
2910 | 233 | # self.particles.__next__() | ||
2911 | 234 | |||
2912 | 235 | def add_vertex(self, V): | ||
2913 | 236 | self.vertex[V.barcode] = V | ||
2914 | 237 | |||
2915 | 238 | def add_particle(self, P): | ||
2916 | 239 | self.particles[P.barcode] = P | ||
2917 | 240 | |||
2918 | 241 | class HEPMC_EventFile(object): | ||
2919 | 242 | |||
2920 | 243 | def __new__(self, path, mode='r', *args, **opt): | ||
2921 | 244 | |||
2922 | 245 | if not path.endswith(".gz"): | ||
2923 | 246 | return file.__new__(HEPMC_EventFileNoGzip, path, mode, *args, **opt) | ||
2924 | 247 | elif mode == 'r' and not os.path.exists(path) and os.path.exists(path[:-3]): | ||
2925 | 248 | return HEPMC_EventFile.__new__(HEPMC_EventFileNoGzip, path[:-3], mode, *args, **opt) | ||
2926 | 249 | else: | ||
2927 | 250 | try: | ||
2928 | 251 | return gzip.GzipFile.__new__(HEPMC_EventFileGzip, path, mode, *args, **opt) | ||
2929 | 252 | except IOError, error: | ||
2930 | 253 | raise | ||
2931 | 254 | except Exception, error: | ||
2932 | 255 | if mode == 'r': | ||
2933 | 256 | misc.gunzip(path) | ||
2934 | 257 | return file.__new__(HEPMC_EventFileNoGzip, path[:-3], mode, *args, **opt) | ||
2935 | 258 | |||
2936 | 259 | |||
2937 | 260 | def __init__(self, path, mode='r', *args, **opt): | ||
2938 | 261 | """open file and read the banner [if in read mode]""" | ||
2939 | 262 | |||
2940 | 263 | self.to_zip = False | ||
2941 | 264 | if path.endswith('.gz') and mode == 'w' and\ | ||
2942 | 265 | isinstance(self, HEPMC_EventFileNoGzip): | ||
2943 | 266 | path = path[:-3] | ||
2944 | 267 | self.to_zip = True # force to zip the file at close() with misc.gzip | ||
2945 | 268 | |||
2946 | 269 | self.parsing = True # check if/when we need to parse the event. | ||
2947 | 270 | self.eventgroup = False | ||
2948 | 271 | try: | ||
2949 | 272 | super(HEPMC_EventFile, self).__init__(path, mode, *args, **opt) | ||
2950 | 273 | except IOError: | ||
2951 | 274 | if '.gz' in path and isinstance(self, HEPMC_EventFileNoGzip) and\ | ||
2952 | 275 | mode == 'r' and os.path.exists(path[:-3]): | ||
2953 | 276 | super(HEPMC_EventFile, self).__init__(path[:-3], mode, *args, **opt) | ||
2954 | 277 | else: | ||
2955 | 278 | raise | ||
2956 | 279 | |||
2957 | 280 | self.header = '' | ||
2958 | 281 | if mode == 'r': | ||
2959 | 282 | line = '' | ||
2960 | 283 | while 'HepMC::IO_GenEvent-START_EVENT_LISTING' not in line: | ||
2961 | 284 | |||
2962 | 285 | try: | ||
2963 | 286 | line = super(HEPMC_EventFile, self).next() | ||
2964 | 287 | except StopIteration: | ||
2965 | 288 | self.seek(0) | ||
2966 | 289 | self.header = '' | ||
2967 | 290 | break | ||
2968 | 291 | self.header += line | ||
2969 | 292 | self.start_event = '' | ||
2970 | 293 | |||
2971 | 294 | def seek(self, value): | ||
2972 | 295 | self.start_event = "" | ||
2973 | 296 | super(HEPMC_EventFile, self).seek(value) | ||
2974 | 297 | |||
2975 | 298 | def next(self): | ||
2976 | 299 | """get next event""" | ||
2977 | 300 | text = self.start_event | ||
2978 | 301 | line = '' | ||
2979 | 302 | while 1: | ||
2980 | 303 | line = super(HEPMC_EventFile, self).next() | ||
2981 | 304 | if line.startswith('E'): | ||
2982 | 305 | self.start_event = line | ||
2983 | 306 | if text: | ||
2984 | 307 | return HEPMC_Event(text) | ||
2985 | 308 | else: | ||
2986 | 309 | text += line | ||
2987 | 310 | |||
2988 | 311 | elif line.lstrip().startswith('HepMC::IO_GenEvent-END_EVENT_LISTING'): | ||
2989 | 312 | if text: | ||
2990 | 313 | return HEPMC_Event(text) | ||
2991 | 314 | elif line.lstrip().startswith('HepMC::IO_GenEvent-START_EVENT_LISTING'): | ||
2992 | 315 | text = '' | ||
2993 | 316 | else: | ||
2994 | 317 | text += line | ||
2995 | 318 | |||
2996 | 319 | |||
2997 | 320 | class HEPMC_EventFileGzip(HEPMC_EventFile, gzip.GzipFile): | ||
2998 | 321 | """A way to read/write a gzipped lhef event""" | ||
2999 | 322 | |||
3000 | 323 | class HEPMC_EventFileNoGzip(HEPMC_EventFile, file): | ||
3001 | 324 | """A way to read a standard event file""" | ||
3002 | 325 | |||
3003 | 326 | def close(self,*args, **opts): | ||
3004 | 327 | |||
3005 | 328 | out = super(EventFileNoGzip, self).close(*args, **opts) | ||
3006 | 329 | if self.to_zip: | ||
3007 | 330 | misc.gzip(self.name) | ||
3008 | 331 | |||
3009 | 332 | |||
3010 | 333 | if "__main__" == __name__: | ||
3011 | 334 | path = "/Users/omatt/Documents/eclipse/2.3.3_PY8_install_cmd/PROC_sm_24/Events/run_01/tag_1_pythia8_events.hepmc.gz" | ||
3012 | 335 | evts = HEPMC_EventFile(path) | ||
3013 | 336 | nb_event = 0 | ||
3014 | 337 | nb_p = 0 | ||
3015 | 338 | for event in evts: | ||
3016 | 339 | nb_event +=1 | ||
3017 | 340 | for p in event: | ||
3018 | 341 | nb_p+=1 | ||
3019 | 342 | print nb_event, nb_p | ||
3020 | 0 | 343 | ||
3021 | === modified file 'madgraph/various/lhe_parser.py' | |||
3022 | --- madgraph/various/lhe_parser.py 2018-03-09 15:44:05 +0000 | |||
3023 | +++ madgraph/various/lhe_parser.py 2018-06-15 08:18:50 +0000 | |||
3024 | @@ -52,7 +52,28 @@ | |||
3025 | 52 | if event: | 52 | if event: |
3026 | 53 | self.event = event | 53 | self.event = event |
3027 | 54 | return | 54 | return |
3029 | 55 | 55 | else: | |
3030 | 56 | try: | ||
3031 | 57 | import madgraph.various.hepmc_parser as hepmc_parser | ||
3032 | 58 | except Exception: | ||
3033 | 59 | pass | ||
3034 | 60 | else: | ||
3035 | 61 | if isinstance(line, hepmc_parser.HEPMC_Particle): | ||
3036 | 62 | self.event = event | ||
3037 | 63 | self.event_id = len(event) #not yet in the event | ||
3038 | 64 | for key in ['pid', 'status', 'E','px','py','pz','mass']: | ||
3039 | 65 | setattr(self, key, getattr(line, key)) | ||
3040 | 66 | self.mother1 = 1 | ||
3041 | 67 | self.mother2 = 1 | ||
3042 | 68 | self.color1 = 0 | ||
3043 | 69 | self.color2 = 0 | ||
3044 | 70 | self.vtim = 0 | ||
3045 | 71 | self.comment = '' | ||
3046 | 72 | self.helicity = 9 | ||
3047 | 73 | self.rwgt = 0 | ||
3048 | 74 | return | ||
3049 | 75 | |||
3050 | 76 | |||
3051 | 56 | self.event = event | 77 | self.event = event |
3052 | 57 | self.event_id = len(event) #not yet in the event | 78 | self.event_id = len(event) #not yet in the event |
3053 | 58 | # LHE information | 79 | # LHE information |
3054 | @@ -154,6 +175,7 @@ | |||
3055 | 154 | class EventFile(object): | 175 | class EventFile(object): |
3056 | 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""" |
3057 | 156 | 177 | ||
3058 | 178 | allow_empty_event = False | ||
3059 | 157 | 179 | ||
3060 | 158 | def __new__(self, path, mode='r', *args, **opt): | 180 | def __new__(self, path, mode='r', *args, **opt): |
3061 | 159 | 181 | ||
3062 | @@ -261,7 +283,7 @@ | |||
3063 | 261 | text += line | 283 | text += line |
3064 | 262 | if self.parsing: | 284 | if self.parsing: |
3065 | 263 | out = Event(text) | 285 | out = Event(text) |
3067 | 264 | if len(out) == 0: | 286 | if len(out) == 0 and not self.allow_empty_event: |
3068 | 265 | raise Exception | 287 | raise Exception |
3069 | 266 | return out | 288 | return out |
3070 | 267 | else: | 289 | else: |
3071 | @@ -1246,6 +1268,27 @@ | |||
3072 | 1246 | self.assign_mother() | 1268 | self.assign_mother() |
3073 | 1247 | 1269 | ||
3074 | 1248 | def assign_mother(self): | 1270 | def assign_mother(self): |
3075 | 1271 | """convert the number in actual particle""" | ||
3076 | 1272 | #Security if not incoming particle. Define a fake particle and set all particle as | ||
3077 | 1273 | # decaying from that fake particle | ||
3078 | 1274 | if all(p.status != -1 for p in self): | ||
3079 | 1275 | if self.warning_order: | ||
3080 | 1276 | Event.warning_order = False | ||
3081 | 1277 | logger.warning("Weird format for lhe format: no incoming particle... adding a fake one") | ||
3082 | 1278 | |||
3083 | 1279 | mother = Particle(event=self) | ||
3084 | 1280 | mother.status = -1 | ||
3085 | 1281 | mother.pid = 0 | ||
3086 | 1282 | self.insert(0,mother) | ||
3087 | 1283 | mother.color2 = 0 | ||
3088 | 1284 | mother.event_id = 0 | ||
3089 | 1285 | self.nexternal += 1 | ||
3090 | 1286 | for p in self[1:]: | ||
3091 | 1287 | p.mother1 = 1 | ||
3092 | 1288 | p.mother2 = 1 | ||
3093 | 1289 | p.event_id += 1 | ||
3094 | 1290 | |||
3095 | 1291 | |||
3096 | 1249 | # assign the mother: | 1292 | # assign the mother: |
3097 | 1250 | for i,particle in enumerate(self): | 1293 | for i,particle in enumerate(self): |
3098 | 1251 | if i < particle.mother1 or i < particle.mother2: | 1294 | if i < particle.mother1 or i < particle.mother2: |
3099 | @@ -2055,7 +2098,7 @@ | |||
3100 | 2055 | 2098 | ||
3101 | 2056 | def __str__(self, event_id=''): | 2099 | def __str__(self, event_id=''): |
3102 | 2057 | """return a correctly formatted LHE event""" | 2100 | """return a correctly formatted LHE event""" |
3104 | 2058 | 2101 | ||
3105 | 2059 | out="""<event%(event_flag)s> | 2102 | out="""<event%(event_flag)s> |
3106 | 2060 | %(scale)s | 2103 | %(scale)s |
3107 | 2061 | %(particles)s | 2104 | %(particles)s |
3108 | @@ -2072,11 +2115,9 @@ | |||
3109 | 2072 | else: | 2115 | else: |
3110 | 2073 | event_flag = '' | 2116 | event_flag = '' |
3111 | 2074 | 2117 | ||
3114 | 2075 | if self.nexternal: | 2118 | scale_str = "%2d %6d %+13.7e %14.8e %14.8e %14.8e" % \ |
3113 | 2076 | scale_str = "%2d %6d %+13.7e %14.8e %14.8e %14.8e" % \ | ||
3115 | 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) |
3118 | 2078 | else: | 2120 | |
3117 | 2079 | scale_str = '' | ||
3119 | 2080 | 2121 | ||
3120 | 2081 | if self.reweight_data: | 2122 | if self.reweight_data: |
3121 | 2082 | # check that all key have an order if not add them at the end | 2123 | # check that all key have an order if not add them at the end |
3122 | @@ -2367,6 +2408,12 @@ | |||
3123 | 2367 | """ return |\vec p|^2 """ | 2408 | """ return |\vec p|^2 """ |
3124 | 2368 | return self.px**2 + self.py**2 + self.pz**2 | 2409 | return self.px**2 + self.py**2 + self.pz**2 |
3125 | 2369 | 2410 | ||
3126 | 2411 | @property | ||
3127 | 2412 | def theta(self): | ||
3128 | 2413 | """return the mass square""" | ||
3129 | 2414 | import math | ||
3130 | 2415 | return math.atan(math.sqrt((self.px**2+self.py**2)/self.pz**2)) | ||
3131 | 2416 | |||
3132 | 2370 | 2417 | ||
3133 | 2371 | def __add__(self, obj): | 2418 | def __add__(self, obj): |
3134 | 2372 | 2419 | ||
3135 | 2373 | 2420 | ||
3136 | === modified file 'madgraph/various/misc.py' | |||
3137 | --- madgraph/various/misc.py 2018-04-29 07:57:44 +0000 | |||
3138 | +++ madgraph/various/misc.py 2018-06-15 08:18:50 +0000 | |||
3139 | @@ -1082,7 +1082,8 @@ | |||
3140 | 1082 | return self.path | 1082 | return self.path |
3141 | 1083 | 1083 | ||
3142 | 1084 | class TMP_variable(object): | 1084 | class TMP_variable(object): |
3144 | 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 |
3145 | 1086 | context manager | ||
3146 | 1086 | """ | 1087 | """ |
3147 | 1087 | 1088 | ||
3148 | 1088 | def __init__(self, cls, attribute, value): | 1089 | def __init__(self, cls, attribute, value): |
3149 | @@ -1463,8 +1464,8 @@ | |||
3150 | 1463 | else: | 1464 | else: |
3151 | 1464 | return a == b | 1465 | return a == b |
3152 | 1465 | else: | 1466 | else: |
3155 | 1466 | power = sig_fig - int(math.log10(abs(a))) + 1 | 1467 | power = sig_fig - int(math.log10(abs(a))) |
3156 | 1467 | 1468 | ||
3157 | 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) |
3158 | 1469 | else: | 1470 | else: |
3159 | 1470 | return abs(a-b) < sig_fig | 1471 | return abs(a-b) < sig_fig |
3160 | 1471 | 1472 | ||
3161 | === modified file 'mg5decay/decay_objects.py' | |||
3162 | --- mg5decay/decay_objects.py 2017-07-04 09:24:42 +0000 | |||
3163 | +++ mg5decay/decay_objects.py 2018-06-15 08:18:50 +0000 | |||
3164 | @@ -4091,7 +4091,7 @@ | |||
3165 | 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']]) |
3166 | 4092 | self.init_regular_expression() | 4092 | self.init_regular_expression() |
3167 | 4093 | 4093 | ||
3169 | 4094 | structure = model.lorentz_dict[vertex['lorentz'][key[1]]].structure | 4094 | structure = model.lorentz_dict[vertex['lorentz'][key[1]]].structure |
3170 | 4095 | new_structure = self.lor_pattern.sub(self.simplify_lorentz, | 4095 | new_structure = self.lor_pattern.sub(self.simplify_lorentz, |
3171 | 4096 | structure) | 4096 | structure) |
3172 | 4097 | lor_value = eval(new_structure % q_dict_lor) | 4097 | lor_value = eval(new_structure % q_dict_lor) |
3173 | 4098 | 4098 | ||
3174 | === modified file 'models/import_ufo.py' | |||
3175 | --- models/import_ufo.py 2018-03-10 22:48:36 +0000 | |||
3176 | +++ models/import_ufo.py 2018-06-15 08:18:50 +0000 | |||
3177 | @@ -21,6 +21,7 @@ | |||
3178 | 21 | import re | 21 | import re |
3179 | 22 | import sys | 22 | import sys |
3180 | 23 | import time | 23 | import time |
3181 | 24 | import collections | ||
3182 | 24 | 25 | ||
3183 | 25 | 26 | ||
3184 | 26 | from madgraph import MadGraph5Error, MG5DIR, ReadWrite | 27 | from madgraph import MadGraph5Error, MG5DIR, ReadWrite |
3185 | @@ -497,7 +498,7 @@ | |||
3186 | 497 | color_info = self.find_color_anti_color_rep() | 498 | color_info = self.find_color_anti_color_rep() |
3187 | 498 | 499 | ||
3188 | 499 | # load the lorentz structure. | 500 | # load the lorentz structure. |
3190 | 500 | self.model.set('lorentz', self.ufomodel.all_lorentz) | 501 | self.model.set('lorentz', list(self.ufomodel.all_lorentz)) |
3191 | 501 | 502 | ||
3192 | 502 | # Substitute the expression of CT couplings which include CTparameters | 503 | # Substitute the expression of CT couplings which include CTparameters |
3193 | 503 | # in their definition with the corresponding dictionaries, e.g. | 504 | # in their definition with the corresponding dictionaries, e.g. |
3194 | @@ -529,6 +530,11 @@ | |||
3195 | 529 | for interaction_info in self.ufomodel.all_CTvertices: | 530 | for interaction_info in self.ufomodel.all_CTvertices: |
3196 | 530 | self.add_CTinteraction(interaction_info, color_info) | 531 | self.add_CTinteraction(interaction_info, color_info) |
3197 | 531 | 532 | ||
3198 | 533 | |||
3199 | 534 | for interaction in self.interactions: | ||
3200 | 535 | self.optimise_interaction(interaction) | ||
3201 | 536 | |||
3202 | 537 | |||
3203 | 532 | self.model.set('conserved_charge', self.conservecharge) | 538 | self.model.set('conserved_charge', self.conservecharge) |
3204 | 533 | 539 | ||
3205 | 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 |
3206 | @@ -576,7 +582,102 @@ | |||
3207 | 576 | del self.checked_lor | 582 | del self.checked_lor |
3208 | 577 | 583 | ||
3209 | 578 | return self.model | 584 | return self.model |
3211 | 579 | 585 | ||
3212 | 586 | def optimise_interaction(self, interaction): | ||
3213 | 587 | |||
3214 | 588 | # we want to check if the same coupling is used for two lorentz strucutre | ||
3215 | 589 | # for the same color structure. | ||
3216 | 590 | to_lor = {} | ||
3217 | 591 | for (color, lor), coup in interaction['couplings'].items(): | ||
3218 | 592 | key = (color, coup) | ||
3219 | 593 | if key in to_lor: | ||
3220 | 594 | to_lor[key].append(lor) | ||
3221 | 595 | else: | ||
3222 | 596 | to_lor[key] = [lor] | ||
3223 | 597 | |||
3224 | 598 | nb_reduce = [] | ||
3225 | 599 | optimize = False | ||
3226 | 600 | for key in to_lor: | ||
3227 | 601 | if len(to_lor[key]) >1: | ||
3228 | 602 | nb_reduce.append(len(to_lor[key])-1) | ||
3229 | 603 | optimize = True | ||
3230 | 604 | |||
3231 | 605 | if not optimize: | ||
3232 | 606 | return | ||
3233 | 607 | |||
3234 | 608 | if not hasattr(self, 'defined_lorentz_expr'): | ||
3235 | 609 | self.defined_lorentz_expr = {} | ||
3236 | 610 | self.lorentz_info = {} | ||
3237 | 611 | self.lorentz_combine = {} | ||
3238 | 612 | for lor in self.model['lorentz']: | ||
3239 | 613 | self.defined_lorentz_expr[lor.get('structure')] = lor.get('name') | ||
3240 | 614 | self.lorentz_info[lor.get('name')] = lor #(lor.get('structure'), lor.get('spins')) | ||
3241 | 615 | |||
3242 | 616 | for key in to_lor: | ||
3243 | 617 | if len(to_lor[key]) == 1: | ||
3244 | 618 | continue | ||
3245 | 619 | names = [interaction['lorentz'][i] for i in to_lor[key]] | ||
3246 | 620 | names.sort() | ||
3247 | 621 | |||
3248 | 622 | # get name of the new lorentz | ||
3249 | 623 | if tuple(names) in self.lorentz_combine: | ||
3250 | 624 | # already created new loretnz | ||
3251 | 625 | new_name = self.lorentz_combine[tuple(names)] | ||
3252 | 626 | else: | ||
3253 | 627 | new_name = self.add_merge_lorentz(names) | ||
3254 | 628 | |||
3255 | 629 | # remove the old couplings | ||
3256 | 630 | color, coup = key | ||
3257 | 631 | to_remove = [(color, lor) for lor in to_lor[key]] | ||
3258 | 632 | for rm in to_remove: | ||
3259 | 633 | del interaction['couplings'][rm] | ||
3260 | 634 | |||
3261 | 635 | #add the lorentz structure to the interaction | ||
3262 | 636 | if new_name not in [l for l in interaction.get('lorentz')]: | ||
3263 | 637 | interaction.get('lorentz').append(new_name) | ||
3264 | 638 | |||
3265 | 639 | #find the associate index | ||
3266 | 640 | new_l = interaction.get('lorentz').index(new_name) | ||
3267 | 641 | # adding the new combination (color,lor) associate to this sum of structure | ||
3268 | 642 | interaction['couplings'][(color, new_l)] = coup | ||
3269 | 643 | |||
3270 | 644 | |||
3271 | 645 | def add_merge_lorentz(self, names): | ||
3272 | 646 | """add a lorentz structure which is the sume of the list given above""" | ||
3273 | 647 | |||
3274 | 648 | |||
3275 | 649 | #create new_name | ||
3276 | 650 | ii = len(names[0]) | ||
3277 | 651 | while ii>0: | ||
3278 | 652 | if not all(n.startswith(names[0][:ii]) for n in names[1:]): | ||
3279 | 653 | ii -=1 | ||
3280 | 654 | else: | ||
3281 | 655 | base_name = names[0][:ii] | ||
3282 | 656 | break | ||
3283 | 657 | else: | ||
3284 | 658 | base_name = 'LMER' | ||
3285 | 659 | |||
3286 | 660 | i = 1 | ||
3287 | 661 | while '%s%s' %(base_name, i) in self.lorentz_info: | ||
3288 | 662 | i +=1 | ||
3289 | 663 | new_name = '%s%s' %(base_name, i) | ||
3290 | 664 | self.lorentz_combine[tuple(names)] = new_name | ||
3291 | 665 | assert new_name not in self.lorentz_info | ||
3292 | 666 | assert new_name not in [l.name for l in self.model['lorentz']] | ||
3293 | 667 | |||
3294 | 668 | # load the associate lorentz expression | ||
3295 | 669 | new_struct = ' + '.join([self.lorentz_info[n].get('structure') for n in names]) | ||
3296 | 670 | spins = self.lorentz_info[names[0]].get('spins') | ||
3297 | 671 | new_lor = self.add_lorentz(new_name, spins, new_struct) | ||
3298 | 672 | self.lorentz_info[new_name] = new_lor | ||
3299 | 673 | |||
3300 | 674 | return new_name | ||
3301 | 675 | |||
3302 | 676 | # We also have to create the new lorentz | ||
3303 | 677 | |||
3304 | 678 | |||
3305 | 679 | |||
3306 | 680 | |||
3307 | 580 | 681 | ||
3308 | 581 | def add_particle(self, particle_info): | 682 | def add_particle(self, particle_info): |
3309 | 582 | """ convert and add a particle in the particle list """ | 683 | """ convert and add a particle in the particle list """ |
3310 | @@ -980,7 +1081,6 @@ | |||
3311 | 980 | (intType if poleOrder==0 else (intType+str(poleOrder)+\ | 1081 | (intType if poleOrder==0 else (intType+str(poleOrder)+\ |
3312 | 981 | 'eps')),loop_particles) | 1082 | 'eps')),loop_particles) |
3313 | 982 | 1083 | ||
3314 | 983 | |||
3315 | 984 | def find_color_anti_color_rep(self, output=None): | 1084 | def find_color_anti_color_rep(self, output=None): |
3316 | 985 | """find which color are in the 3/3bar states""" | 1085 | """find which color are in the 3/3bar states""" |
3317 | 986 | # method look at the 3 3bar 8 configuration. | 1086 | # method look at the 3 3bar 8 configuration. |
3318 | @@ -1197,6 +1297,7 @@ | |||
3319 | 1197 | self.conservecharge.discard(charge) | 1297 | self.conservecharge.discard(charge) |
3320 | 1198 | 1298 | ||
3321 | 1199 | 1299 | ||
3322 | 1300 | |||
3323 | 1200 | def get_sign_flow(self, flow, nb_fermion): | 1301 | def get_sign_flow(self, flow, nb_fermion): |
3324 | 1201 | """ensure that the flow of particles/lorentz are coherent with flow | 1302 | """ensure that the flow of particles/lorentz are coherent with flow |
3325 | 1202 | and return a correct version if needed""" | 1303 | and return a correct version if needed""" |
3326 | @@ -1241,14 +1342,18 @@ | |||
3327 | 1241 | 1342 | ||
3328 | 1242 | def add_lorentz(self, name, spins , expr): | 1343 | def add_lorentz(self, name, spins , expr): |
3329 | 1243 | """ Add a Lorentz expression which is not present in the UFO """ | 1344 | """ Add a Lorentz expression which is not present in the UFO """ |
3336 | 1244 | 1345 | ||
3337 | 1245 | new = self.model['lorentz'][0].__class__(name = name, | 1346 | assert name not in [l.name for l in self.model['lorentz']] |
3338 | 1246 | spins = spins, | 1347 | with misc.TMP_variable(self.ufomodel.object_library, 'all_lorentz', |
3339 | 1247 | structure = expr) | 1348 | self.model['lorentz']): |
3340 | 1248 | 1349 | new = self.model['lorentz'][0].__class__(name = name, | |
3341 | 1249 | self.model['lorentz'].append(new) | 1350 | spins = spins, |
3342 | 1351 | structure = expr) | ||
3343 | 1352 | assert name in [l.name for l in self.model['lorentz']] | ||
3344 | 1353 | assert name not in [l.name for l in self.ufomodel.all_lorentz] | ||
3345 | 1354 | #self.model['lorentz'].append(new) # already done by above command | ||
3346 | 1250 | self.model.create_lorentz_dict() | 1355 | self.model.create_lorentz_dict() |
3348 | 1251 | return name | 1356 | return new |
3349 | 1252 | 1357 | ||
3350 | 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*)\)') |
3351 | 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*)\)') |
3352 | @@ -1657,6 +1762,7 @@ | |||
3353 | 1657 | super(RestrictModel, self).default_setup() | 1762 | super(RestrictModel, self).default_setup() |
3354 | 1658 | self.rule_card = check_param_card.ParamCardRule() | 1763 | self.rule_card = check_param_card.ParamCardRule() |
3355 | 1659 | self.restrict_card = None | 1764 | self.restrict_card = None |
3356 | 1765 | self.coupling_order_dict ={} | ||
3357 | 1660 | 1766 | ||
3358 | 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, |
3359 | 1662 | complex_mass_scheme=None): | 1768 | complex_mass_scheme=None): |
3360 | @@ -1702,6 +1808,10 @@ | |||
3361 | 1702 | self.del_coup += zero_couplings | 1808 | self.del_coup += zero_couplings |
3362 | 1703 | self.remove_couplings(self.del_coup) | 1809 | self.remove_couplings(self.del_coup) |
3363 | 1704 | 1810 | ||
3364 | 1811 | # modify interaction to avoid to have identical coupling with different lorentz | ||
3365 | 1812 | for interaction in self.get('interactions'): | ||
3366 | 1813 | self.optimise_interaction(interaction) | ||
3367 | 1814 | |||
3368 | 1705 | # deal with parameters | 1815 | # deal with parameters |
3369 | 1706 | parameters = self.detect_special_parameters() | 1816 | parameters = self.detect_special_parameters() |
3370 | 1707 | self.fix_parameter_values(*parameters, simplify=rm_parameter, | 1817 | self.fix_parameter_values(*parameters, simplify=rm_parameter, |
3371 | @@ -1772,17 +1882,58 @@ | |||
3372 | 1772 | return self.detect_identical_couplings(strict_zero=True) | 1882 | return self.detect_identical_couplings(strict_zero=True) |
3373 | 1773 | 1883 | ||
3374 | 1774 | 1884 | ||
3378 | 1775 | if value in dict_value_coupling: | 1885 | if value in dict_value_coupling or -1*value in dict_value_coupling: |
3379 | 1776 | iden_key.add(value) | 1886 | if value in dict_value_coupling: |
3380 | 1777 | dict_value_coupling[value].append(name) | 1887 | iden_key.add(value) |
3381 | 1888 | dict_value_coupling[value].append((name,1)) | ||
3382 | 1889 | else: | ||
3383 | 1890 | iden_key.add(-1*value) | ||
3384 | 1891 | dict_value_coupling[-1*value].append((name,-1)) | ||
3385 | 1778 | else: | 1892 | else: |
3388 | 1779 | dict_value_coupling[value] = [name] | 1893 | dict_value_coupling[value] = [(name,1)] |
3387 | 1780 | |||
3389 | 1781 | for key in iden_key: | 1894 | for key in iden_key: |
3391 | 1782 | iden_coupling.append(dict_value_coupling[key]) | 1895 | tmp = [] |
3392 | 1896 | if key in dict_value_coupling: | ||
3393 | 1897 | tmp += dict_value_coupling[key] | ||
3394 | 1898 | elif -1*key in dict_value_coupling: | ||
3395 | 1899 | tmp += dict_value_coupling[-1*key] | ||
3396 | 1900 | assert tmp | ||
3397 | 1901 | |||
3398 | 1902 | #ensure that all coupling have the same coupling order. | ||
3399 | 1903 | ords = [self.get_coupling_order(k) for k,c in tmp] | ||
3400 | 1904 | coup_by_ord = collections.defaultdict(list) | ||
3401 | 1905 | for o,t in zip(ords, tmp): | ||
3402 | 1906 | coup_by_ord[str(o)].append(t) | ||
3403 | 1907 | # add the remaining identical | ||
3404 | 1908 | for tmp3 in coup_by_ord.values(): | ||
3405 | 1909 | if len(tmp3) > 1: | ||
3406 | 1910 | if tmp3[0][1] == -1: #ensure that the first coupling has positif value | ||
3407 | 1911 | tmp3 = [(t0,-t1) for t0, t1 in tmp3] | ||
3408 | 1912 | iden_coupling.append(tmp3) | ||
3409 | 1913 | |||
3410 | 1914 | |||
3411 | 1915 | |||
3412 | 1783 | 1916 | ||
3413 | 1784 | return zero_coupling, iden_coupling | 1917 | return zero_coupling, iden_coupling |
3414 | 1785 | 1918 | ||
3415 | 1919 | def get_coupling_order(self, cname): | ||
3416 | 1920 | """return the coupling order associated to a coupling """ | ||
3417 | 1921 | |||
3418 | 1922 | if cname in self.coupling_order_dict: | ||
3419 | 1923 | return self.coupling_order_dict[cname] | ||
3420 | 1924 | |||
3421 | 1925 | for v in self['interactions']: | ||
3422 | 1926 | for c in v['couplings'].values(): | ||
3423 | 1927 | self.coupling_order_dict[c] = v['orders'] | ||
3424 | 1928 | |||
3425 | 1929 | if cname not in self.coupling_order_dict: | ||
3426 | 1930 | self.coupling_order_dict[cname] = None | ||
3427 | 1931 | #can happen when some vertex are discarded due to ghost/... | ||
3428 | 1932 | |||
3429 | 1933 | |||
3430 | 1934 | return self.coupling_order_dict[cname] | ||
3431 | 1935 | |||
3432 | 1936 | |||
3433 | 1786 | 1937 | ||
3434 | 1787 | def detect_special_parameters(self): | 1938 | def detect_special_parameters(self): |
3435 | 1788 | """ return the list of (name of) parameter which are zero """ | 1939 | """ return the list of (name of) parameter which are zero """ |
3436 | @@ -1898,17 +2049,52 @@ | |||
3437 | 1898 | return output | 2049 | return output |
3438 | 1899 | 2050 | ||
3439 | 1900 | 2051 | ||
3440 | 2052 | @staticmethod | ||
3441 | 2053 | def get_new_coupling_name(main, coupling, value, coeff): | ||
3442 | 2054 | """ We have main == coeff * coupling | ||
3443 | 2055 | coeff is only +1 or -1 | ||
3444 | 2056 | main can be either GC_X or -GC_X | ||
3445 | 2057 | coupling can be either GC_Y or -GC_Y | ||
3446 | 2058 | value is either GC_Y or -GC_Y | ||
3447 | 2059 | the return is either GC_X or -GC_X | ||
3448 | 2060 | such that we have value == OUTPUT | ||
3449 | 2061 | """ | ||
3450 | 2062 | assert coeff in [-1,1] | ||
3451 | 2063 | assert value == coupling or value == '-%s' % coupling or coupling == '-%s' % value | ||
3452 | 2064 | assert isinstance(main, str) | ||
3453 | 2065 | assert isinstance(coupling, str) | ||
3454 | 2066 | assert isinstance(value, str) | ||
3455 | 2067 | if coeff ==1: | ||
3456 | 2068 | if value == coupling: | ||
3457 | 2069 | return main # 4/4 | ||
3458 | 2070 | else: | ||
3459 | 2071 | if main.startswith('-'): | ||
3460 | 2072 | return main[1:] # 2/2 | ||
3461 | 2073 | else: | ||
3462 | 2074 | return '-%s' % main # 2/2 | ||
3463 | 2075 | else: | ||
3464 | 2076 | if value == coupling: | ||
3465 | 2077 | if main.startswith('-'): | ||
3466 | 2078 | return main[1:] # 2/2 | ||
3467 | 2079 | else: | ||
3468 | 2080 | return '-%s' % main # 2/2 | ||
3469 | 2081 | else: | ||
3470 | 2082 | return main # 4/4 | ||
3471 | 2083 | |||
3472 | 2084 | |||
3473 | 1901 | def merge_iden_couplings(self, couplings): | 2085 | def merge_iden_couplings(self, couplings): |
3474 | 1902 | """merge the identical couplings in the interactions and particle | 2086 | """merge the identical couplings in the interactions and particle |
3475 | 1903 | counterterms""" | 2087 | counterterms""" |
3476 | 1904 | 2088 | ||
3477 | 1905 | 2089 | ||
3478 | 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 '% \ |
3480 | 1907 | ', '.join([obj for obj in couplings])) | 2091 | ', '.join([str(obj) for obj in couplings])) |
3481 | 2092 | |||
3482 | 2093 | main = couplings[0][0] | ||
3483 | 2094 | assert couplings[0][1] == 1 | ||
3484 | 2095 | self.del_coup += [c[0] for c in couplings[1:]] # add the other coupl to the suppress list | ||
3485 | 1908 | 2096 | ||
3489 | 1909 | main = couplings[0] | 2097 | for coupling, coeff in couplings[1:]: |
3487 | 1910 | self.del_coup += couplings[1:] # add the other coupl to the suppress list | ||
3488 | 1911 | for coupling in couplings[1:]: | ||
3490 | 1912 | # check if param is linked to an interaction | 2098 | # check if param is linked to an interaction |
3491 | 1913 | if coupling not in self.coupling_pos: | 2099 | if coupling not in self.coupling_pos: |
3492 | 1914 | continue | 2100 | continue |
3493 | @@ -1917,13 +2103,12 @@ | |||
3494 | 1917 | isinstance(vert, base_objects.Interaction)] | 2103 | isinstance(vert, base_objects.Interaction)] |
3495 | 1918 | for vertex in vertices: | 2104 | for vertex in vertices: |
3496 | 1919 | for key, value in vertex['couplings'].items(): | 2105 | for key, value in vertex['couplings'].items(): |
3504 | 1920 | if value == coupling: | 2106 | if value == coupling or value == '-%s' % coupling or coupling == '-%s' % value: |
3505 | 1921 | vertex['couplings'][key] = main | 2107 | vertex['couplings'][key] = self.get_new_coupling_name(\ |
3506 | 1922 | elif value == '-%s' % coupling: | 2108 | main, coupling, value, coeff) |
3507 | 1923 | if main.startswith('-'): | 2109 | |
3508 | 1924 | vertex['couplings'][key] = main[1:] | 2110 | |
3509 | 1925 | else: | 2111 | |
3503 | 1926 | vertex['couplings'][key] = '-%s' % main | ||
3510 | 1927 | 2112 | ||
3511 | 1928 | # replace the coupling appearing in the particle counterterm | 2113 | # replace the coupling appearing in the particle counterterm |
3512 | 1929 | particles_ct = [ pct for pct in self.coupling_pos[coupling] if | 2114 | particles_ct = [ pct for pct in self.coupling_pos[coupling] if |
3513 | @@ -2183,11 +2368,109 @@ | |||
3514 | 2183 | data = self['parameters'][param_info[param]['dep']] | 2368 | data = self['parameters'][param_info[param]['dep']] |
3515 | 2184 | data.remove(param_info[param]['obj']) | 2369 | data.remove(param_info[param]['obj']) |
3516 | 2185 | 2370 | ||
3522 | 2186 | 2371 | def optimise_interaction(self, interaction): | |
3523 | 2187 | 2372 | ||
3524 | 2188 | 2373 | # we want to check if the same coupling (up to the sign) is used for two lorentz structure | |
3525 | 2189 | 2374 | # for the same color structure. | |
3526 | 2190 | 2375 | to_lor = {} | |
3527 | 2376 | for (color, lor), coup in interaction['couplings'].items(): | ||
3528 | 2377 | abscoup, coeff = (coup[1:],-1) if coup.startswith('-') else (coup, 1) | ||
3529 | 2378 | key = (color, abscoup) | ||
3530 | 2379 | if key in to_lor: | ||
3531 | 2380 | to_lor[key].append((lor,coeff)) | ||
3532 | 2381 | else: | ||
3533 | 2382 | to_lor[key] = [(lor,coeff)] | ||
3534 | 2383 | |||
3535 | 2384 | nb_reduce = [] | ||
3536 | 2385 | optimize = False | ||
3537 | 2386 | for key in to_lor: | ||
3538 | 2387 | if len(to_lor[key]) >1: | ||
3539 | 2388 | nb_reduce.append(len(to_lor[key])-1) | ||
3540 | 2389 | optimize = True | ||
3541 | 2390 | |||
3542 | 2391 | if not optimize: | ||
3543 | 2392 | return | ||
3544 | 2393 | |||
3545 | 2394 | if not hasattr(self, 'defined_lorentz_expr'): | ||
3546 | 2395 | self.defined_lorentz_expr = {} | ||
3547 | 2396 | self.lorentz_info = {} | ||
3548 | 2397 | self.lorentz_combine = {} | ||
3549 | 2398 | for lor in self.get('lorentz'): | ||
3550 | 2399 | self.defined_lorentz_expr[lor.get('structure')] = lor.get('name') | ||
3551 | 2400 | self.lorentz_info[lor.get('name')] = lor #(lor.get('structure'), lor.get('spins')) | ||
3552 | 2401 | |||
3553 | 2402 | for key in to_lor: | ||
3554 | 2403 | if len(to_lor[key]) == 1: | ||
3555 | 2404 | continue | ||
3556 | 2405 | names = ['u%s' % interaction['lorentz'][i[0]] if i[1] ==1 else \ | ||
3557 | 2406 | 'd%s' % interaction['lorentz'][i[0]] for i in to_lor[key]] | ||
3558 | 2407 | |||
3559 | 2408 | names.sort() | ||
3560 | 2409 | |||
3561 | 2410 | # get name of the new lorentz | ||
3562 | 2411 | if tuple(names) in self.lorentz_combine: | ||
3563 | 2412 | # already created new loretnz | ||
3564 | 2413 | new_name = self.lorentz_combine[tuple(names)] | ||
3565 | 2414 | else: | ||
3566 | 2415 | new_name = self.add_merge_lorentz(names) | ||
3567 | 2416 | |||
3568 | 2417 | # remove the old couplings | ||
3569 | 2418 | color, coup = key | ||
3570 | 2419 | to_remove = [(color, lor[0]) for lor in to_lor[key]] | ||
3571 | 2420 | for rm in to_remove: | ||
3572 | 2421 | del interaction['couplings'][rm] | ||
3573 | 2422 | |||
3574 | 2423 | #add the lorentz structure to the interaction | ||
3575 | 2424 | if new_name not in [l for l in interaction.get('lorentz')]: | ||
3576 | 2425 | interaction.get('lorentz').append(new_name) | ||
3577 | 2426 | |||
3578 | 2427 | #find the associate index | ||
3579 | 2428 | new_l = interaction.get('lorentz').index(new_name) | ||
3580 | 2429 | # adding the new combination (color,lor) associate to this sum of structure | ||
3581 | 2430 | interaction['couplings'][(color, new_l)] = coup | ||
3582 | 2431 | |||
3583 | 2432 | |||
3584 | 2433 | |||
3585 | 2434 | def add_merge_lorentz(self, names): | ||
3586 | 2435 | """add a lorentz structure which is the sume of the list given above""" | ||
3587 | 2436 | |||
3588 | 2437 | #create new_name | ||
3589 | 2438 | ii = len(names[0]) | ||
3590 | 2439 | while ii>1: | ||
3591 | 2440 | #do not count the initial "u/d letter whcih indicates the sign" | ||
3592 | 2441 | if not all(n[1:].startswith(names[0][1:ii]) for n in names[1:]): | ||
3593 | 2442 | ii -=1 | ||
3594 | 2443 | else: | ||
3595 | 2444 | base_name = names[0][1:ii] | ||
3596 | 2445 | break | ||
3597 | 2446 | else: | ||
3598 | 2447 | base_name = 'LMER' | ||
3599 | 2448 | i = 1 | ||
3600 | 2449 | while '%s%s' %(base_name, i) in self.lorentz_info: | ||
3601 | 2450 | i +=1 | ||
3602 | 2451 | new_name = '%s%s' %(base_name, i) | ||
3603 | 2452 | self.lorentz_combine[tuple(names)] = new_name | ||
3604 | 2453 | |||
3605 | 2454 | # load the associate lorentz expression | ||
3606 | 2455 | new_struct = ' + '.join([self.lorentz_info[n[1:]].get('structure') for n in names if n.startswith('u')]) | ||
3607 | 2456 | if any( n.startswith('d') for n in names ): | ||
3608 | 2457 | new_struct += '-' + ' - '.join(['1.*(%s)' %self.lorentz_info[n[1:]].get('structure') for n in names if n.startswith('d')]) | ||
3609 | 2458 | spins = self.lorentz_info[names[0][1:]].get('spins') | ||
3610 | 2459 | new_lor = self.add_lorentz(new_name, spins, new_struct) | ||
3611 | 2460 | self.lorentz_info[new_name] = new_lor | ||
3612 | 2461 | |||
3613 | 2462 | return new_name | ||
3614 | 2463 | |||
3615 | 2464 | def add_lorentz(self, name, spin, struct): | ||
3616 | 2465 | """adding lorentz structure to the current model""" | ||
3617 | 2466 | new = self['lorentz'][0].__class__(name = name, | ||
3618 | 2467 | spins = spin, | ||
3619 | 2468 | structure = struct) | ||
3620 | 2469 | self['lorentz'].append(new) | ||
3621 | 2470 | self.create_lorentz_dict() | ||
3622 | 2471 | |||
3623 | 2472 | return None | ||
3624 | 2473 | |||
3625 | 2191 | 2474 | ||
3626 | 2192 | 2475 | ||
3627 | 2193 | 2476 | ||
3628 | 2194 | 2477 | ||
3629 | === modified file 'models/write_param_card.py' | |||
3630 | --- models/write_param_card.py 2017-01-15 14:28:13 +0000 | |||
3631 | +++ models/write_param_card.py 2018-06-15 08:18:50 +0000 | |||
3632 | @@ -308,8 +308,8 @@ | |||
3633 | 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: |
3634 | 309 | continue | 309 | continue |
3635 | 310 | # don't write ghosts in the QNumbers block | 310 | # don't write ghosts in the QNumbers block |
3638 | 311 | if part["type"] == 'ghost': | 311 | #if part["type"] == 'ghost': |
3639 | 312 | continue | 312 | # continue |
3640 | 313 | text += self.qnumber_str % {'pdg': part["pdg_code"], | 313 | text += self.qnumber_str % {'pdg': part["pdg_code"], |
3641 | 314 | 'name': part["name"], | 314 | 'name': part["name"], |
3642 | 315 | 'charge': 3 * part["charge"], | 315 | 'charge': 3 * part["charge"], |
3643 | 316 | 316 | ||
3644 | === modified file 'tests/acceptance_tests/test_cmd_amcatnlo.py' | |||
3645 | --- tests/acceptance_tests/test_cmd_amcatnlo.py 2018-04-29 05:41:18 +0000 | |||
3646 | +++ tests/acceptance_tests/test_cmd_amcatnlo.py 2018-06-15 08:18:50 +0000 | |||
3647 | @@ -44,6 +44,7 @@ | |||
3648 | 44 | _pickle_path =os.path.join(_file_path, 'input_files') | 44 | _pickle_path =os.path.join(_file_path, 'input_files') |
3649 | 45 | 45 | ||
3650 | 46 | from madgraph import MG4DIR, MG5DIR, MadGraph5Error, InvalidCmd | 46 | from madgraph import MG4DIR, MG5DIR, MadGraph5Error, InvalidCmd |
3651 | 47 | from tests.acceptance_tests.test_cmd_madevent import check_html_page | ||
3652 | 47 | 48 | ||
3653 | 48 | pjoin = os.path.join | 49 | pjoin = os.path.join |
3654 | 49 | 50 | ||
3655 | @@ -190,7 +191,7 @@ | |||
3656 | 190 | self.assertTrue( 'HERWIG6 = parton_shower' in card) | 191 | self.assertTrue( 'HERWIG6 = parton_shower' in card) |
3657 | 191 | card = card.replace('HERWIG6 = parton_shower', 'HERWIGPP = parton_shower') | 192 | card = card.replace('HERWIG6 = parton_shower', 'HERWIGPP = parton_shower') |
3658 | 192 | open('%s/Cards/run_card.dat' % self.path, 'w').write(card) | 193 | open('%s/Cards/run_card.dat' % self.path, 'w').write(card) |
3660 | 193 | self.cmd_line.exec_cmd('set cluster_temp_path /tmp/') | 194 | self.cmd_line.exec_cmd('set cluster_temp_path /tmp/ --no_save') |
3661 | 194 | self.do('generate_events -pf') | 195 | self.do('generate_events -pf') |
3662 | 195 | # test the lhe event file exists | 196 | # test the lhe event file exists |
3663 | 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)) |
3664 | @@ -215,7 +216,7 @@ | |||
3665 | 215 | self.assertTrue( 'HERWIG6 = parton_shower' in card) | 216 | self.assertTrue( 'HERWIG6 = parton_shower' in card) |
3666 | 216 | card = card.replace('HERWIG6 = parton_shower', 'PYTHIA8 = parton_shower') | 217 | card = card.replace('HERWIG6 = parton_shower', 'PYTHIA8 = parton_shower') |
3667 | 217 | open('%s/Cards/run_card.dat' % self.path, 'w').write(card) | 218 | open('%s/Cards/run_card.dat' % self.path, 'w').write(card) |
3669 | 218 | self.cmd_line.exec_cmd('set cluster_temp_path /tmp/') | 219 | self.cmd_line.exec_cmd('set cluster_temp_path /tmp/ --no_save') |
3670 | 219 | self.cmd_line.exec_cmd('set pythia8_path None') | 220 | self.cmd_line.exec_cmd('set pythia8_path None') |
3671 | 220 | self.do('generate_events -pf') | 221 | self.do('generate_events -pf') |
3672 | 221 | # test the lhe event file exists | 222 | # test the lhe event file exists |
3673 | @@ -242,7 +243,7 @@ | |||
3674 | 242 | self.assertTrue( ' -1 = nevt_job' in card) | 243 | self.assertTrue( ' -1 = nevt_job' in card) |
3675 | 243 | card = card.replace(' -1 = nevt_job', '500 = nevt_job') | 244 | card = card.replace(' -1 = nevt_job', '500 = nevt_job') |
3676 | 244 | open('%s/Cards/run_card.dat' % self.path, 'w').write(card) | 245 | open('%s/Cards/run_card.dat' % self.path, 'w').write(card) |
3678 | 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') |
3679 | 246 | self.do('generate_events -pf') | 247 | self.do('generate_events -pf') |
3680 | 247 | # test the lhe event file exists | 248 | # test the lhe event file exists |
3681 | 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)) |
3682 | @@ -258,7 +259,7 @@ | |||
3683 | 258 | 259 | ||
3684 | 259 | nevents =20 | 260 | nevents =20 |
3685 | 260 | text = """ | 261 | text = """ |
3687 | 261 | set crash_on_error True | 262 | set crash_on_error True --no_save |
3688 | 262 | generate p p > t t~ [QCD] | 263 | generate p p > t t~ [QCD] |
3689 | 263 | output %s | 264 | output %s |
3690 | 264 | launch | 265 | launch |
3691 | @@ -378,7 +379,7 @@ | |||
3692 | 378 | def test_madspin_LOonly(self): | 379 | def test_madspin_LOonly(self): |
3693 | 379 | 380 | ||
3694 | 380 | text = """ | 381 | text = """ |
3696 | 381 | set crash_on_error True | 382 | set crash_on_error True --no_save |
3697 | 382 | generate p p > w+ [LOonly] | 383 | generate p p > w+ [LOonly] |
3698 | 383 | output %s | 384 | output %s |
3699 | 384 | launch | 385 | launch |
3700 | @@ -596,6 +597,9 @@ | |||
3701 | 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)) |
3702 | 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)) |
3703 | 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)) |
3704 | 600 | |||
3705 | 601 | check_html_page(self, pjoin(self.path, 'crossx.html')) | ||
3706 | 602 | check_html_page(self, pjoin(self.path, 'HTML', 'run_01', 'results.html')) | ||
3707 | 599 | 603 | ||
3708 | 600 | 604 | ||
3709 | 601 | def test_calculate_xsect_nlo(self): | 605 | def test_calculate_xsect_nlo(self): |
3710 | @@ -614,6 +618,9 @@ | |||
3711 | 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)) |
3712 | 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)) |
3713 | 616 | 620 | ||
3714 | 621 | check_html_page(self, pjoin(self.path, 'crossx.html')) | ||
3715 | 622 | check_html_page(self, pjoin(self.path, 'HTML', 'run_01', 'results.html')) | ||
3716 | 623 | |||
3717 | 617 | 624 | ||
3718 | 618 | def test_calculate_xsect_lo(self): | 625 | def test_calculate_xsect_lo(self): |
3719 | 619 | """test the param_card created is correct""" | 626 | """test the param_card created is correct""" |
3720 | 620 | 627 | ||
3721 | === modified file 'tests/acceptance_tests/test_cmd_madevent.py' | |||
3722 | --- tests/acceptance_tests/test_cmd_madevent.py 2018-04-26 14:24:04 +0000 | |||
3723 | +++ tests/acceptance_tests/test_cmd_madevent.py 2018-06-15 08:18:50 +0000 | |||
3724 | @@ -47,6 +47,22 @@ | |||
3725 | 47 | 47 | ||
3726 | 48 | pjoin = os.path.join | 48 | pjoin = os.path.join |
3727 | 49 | 49 | ||
3728 | 50 | def check_html_page(cls, link): | ||
3729 | 51 | """return True if all link in the html page are existing on disk. | ||
3730 | 52 | otherwise raise an assertion error""" | ||
3731 | 53 | |||
3732 | 54 | text=open(link).read() | ||
3733 | 55 | pattern = re.compile(r'href=[\"\']?(.*?)?[\"\'\s\#]', re.DOTALL) | ||
3734 | 56 | |||
3735 | 57 | cwd = os.path.dirname(link) | ||
3736 | 58 | with misc.chdir(cwd): | ||
3737 | 59 | for path in pattern.findall(text): | ||
3738 | 60 | if not path: | ||
3739 | 61 | continue # means is just a linke starting with # | ||
3740 | 62 | cls.assertTrue(os.path.exists(path), '%s/%s' %(cwd,path)) | ||
3741 | 63 | return True | ||
3742 | 64 | |||
3743 | 65 | |||
3744 | 50 | #=============================================================================== | 66 | #=============================================================================== |
3745 | 51 | # TestCmd | 67 | # TestCmd |
3746 | 52 | #=============================================================================== | 68 | #=============================================================================== |
3747 | @@ -588,6 +604,12 @@ | |||
3748 | 588 | text = fsock.read() | 604 | text = fsock.read() |
3749 | 589 | self.assertTrue(text.count('dynamical scheme') >= 3) | 605 | self.assertTrue(text.count('dynamical scheme') >= 3) |
3750 | 590 | 606 | ||
3751 | 607 | # check that the html link makes sense | ||
3752 | 608 | #check_html_page(self, pjoin(self.run_dir, 'crossx.html')) | ||
3753 | 609 | |||
3754 | 610 | |||
3755 | 611 | |||
3756 | 612 | |||
3757 | 591 | 613 | ||
3758 | 592 | def check_pythia_output(self, run_name='run_01', syst=False): | 614 | def check_pythia_output(self, run_name='run_01', syst=False): |
3759 | 593 | """ """ | 615 | """ """ |
3760 | @@ -825,6 +847,7 @@ | |||
3761 | 825 | stdout=stdout,stderr=stdout) | 847 | stdout=stdout,stderr=stdout) |
3762 | 826 | 848 | ||
3763 | 827 | self.check_parton_output(cross=4.541638, error=0.035) | 849 | self.check_parton_output(cross=4.541638, error=0.035) |
3764 | 850 | |||
3765 | 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) |
3766 | 829 | self.check_pythia_output() | 852 | self.check_pythia_output() |
3767 | 830 | self.assertEqual(cwd, os.getcwd()) | 853 | self.assertEqual(cwd, os.getcwd()) |
3768 | @@ -878,7 +901,11 @@ | |||
3769 | 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) |
3770 | 879 | ) | 902 | ) |
3771 | 880 | self.assertTrue(float(data[0]['error']) < 3 * error) | 903 | self.assertTrue(float(data[0]['error']) < 3 * error) |
3773 | 881 | 904 | ||
3774 | 905 | check_html_page(self, pjoin(self.run_dir, 'crossx.html')) | ||
3775 | 906 | if 'decayed' not in run_name: | ||
3776 | 907 | check_html_page(self, pjoin(self.run_dir,'HTML', run_name, 'results.html')) | ||
3777 | 908 | |||
3778 | 882 | def check_pythia_output(self, run_name='run_01'): | 909 | def check_pythia_output(self, run_name='run_01'): |
3779 | 883 | """ """ | 910 | """ """ |
3780 | 884 | # check that the number of event is fine: | 911 | # check that the number of event is fine: |
3781 | 885 | 912 | ||
3782 | === modified file 'tests/acceptance_tests/test_cmd_reweight.py' | |||
3783 | --- tests/acceptance_tests/test_cmd_reweight.py 2018-04-24 21:57:16 +0000 | |||
3784 | +++ tests/acceptance_tests/test_cmd_reweight.py 2018-06-15 08:18:50 +0000 | |||
3785 | @@ -292,8 +292,8 @@ | |||
3786 | 292 | rwgt_data = event.parse_reweight() | 292 | rwgt_data = event.parse_reweight() |
3787 | 293 | #solutions.append(rwgt_data['MYNLO_tree']) | 293 | #solutions.append(rwgt_data['MYNLO_tree']) |
3788 | 294 | if i < len(solutions): | 294 | if i < len(solutions): |
3791 | 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])) |
3792 | 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)) |
3793 | 297 | #misc.sprint(solutions) | 297 | #misc.sprint(solutions) |
3794 | 298 | 298 | ||
3795 | 299 | def test_scan_reweighting(self): | 299 | def test_scan_reweighting(self): |
3796 | 300 | 300 | ||
3797 | === added file 'tests/acceptance_tests/test_madspin.py' | |||
3798 | --- tests/acceptance_tests/test_madspin.py 1970-01-01 00:00:00 +0000 | |||
3799 | +++ tests/acceptance_tests/test_madspin.py 2018-06-15 08:18:50 +0000 | |||
3800 | @@ -0,0 +1,114 @@ | |||
3801 | 1 | from __future__ import division | ||
3802 | 2 | import subprocess | ||
3803 | 3 | import unittest | ||
3804 | 4 | import os | ||
3805 | 5 | import re | ||
3806 | 6 | import shutil | ||
3807 | 7 | import sys | ||
3808 | 8 | import logging | ||
3809 | 9 | import time | ||
3810 | 10 | import tempfile | ||
3811 | 11 | import math | ||
3812 | 12 | |||
3813 | 13 | logger = logging.getLogger('test_cmd') | ||
3814 | 14 | |||
3815 | 15 | import tests.unit_tests.iolibs.test_file_writers as test_file_writers | ||
3816 | 16 | |||
3817 | 17 | import madgraph.interface.master_interface as MGCmd | ||
3818 | 18 | import madgraph.interface.madevent_interface as MECmd | ||
3819 | 19 | import madgraph.interface.launch_ext_program as launch_ext | ||
3820 | 20 | import madgraph.iolibs.files as files | ||
3821 | 21 | |||
3822 | 22 | import madgraph.various.misc as misc | ||
3823 | 23 | import madgraph.various.lhe_parser as lhe_parser | ||
3824 | 24 | import madgraph.various.banner as banner_mod | ||
3825 | 25 | import madgraph.various.lhe_parser as lhe_parser | ||
3826 | 26 | import madgraph.various.banner as banner | ||
3827 | 27 | |||
3828 | 28 | _file_path = os.path.split(os.path.dirname(os.path.realpath(__file__)))[0] | ||
3829 | 29 | _pickle_path =os.path.join(_file_path, 'input_files') | ||
3830 | 30 | |||
3831 | 31 | from madgraph import MG4DIR, MG5DIR, MadGraph5Error, InvalidCmd | ||
3832 | 32 | |||
3833 | 33 | pjoin = os.path.join | ||
3834 | 34 | |||
3835 | 35 | #=============================================================================== | ||
3836 | 36 | # TestCmd | ||
3837 | 37 | #=============================================================================== | ||
3838 | 38 | class TestMadSpin(unittest.TestCase): | ||
3839 | 39 | """test that we can launch everything from a single file""" | ||
3840 | 40 | |||
3841 | 41 | def setUp(self): | ||
3842 | 42 | |||
3843 | 43 | self.debuging = False | ||
3844 | 44 | if self.debuging: | ||
3845 | 45 | self.path = pjoin(MG5DIR, 'MS_TEST') | ||
3846 | 46 | if os.path.exists(self.path): | ||
3847 | 47 | shutil.rmtree(self.path) | ||
3848 | 48 | os.mkdir(self.path) | ||
3849 | 49 | else: | ||
3850 | 50 | self.path = tempfile.mkdtemp(prefix='ms_test_mg5') | ||
3851 | 51 | self.run_dir = pjoin(self.path, 'MGPROC') | ||
3852 | 52 | |||
3853 | 53 | |||
3854 | 54 | def tearDown(self): | ||
3855 | 55 | |||
3856 | 56 | if not self.debuging: | ||
3857 | 57 | shutil.rmtree(self.path) | ||
3858 | 58 | self.assertFalse(self.debuging) | ||
3859 | 59 | |||
3860 | 60 | |||
3861 | 61 | def test_hepmc_decay(self): | ||
3862 | 62 | """ """ | ||
3863 | 63 | |||
3864 | 64 | cwd = os.getcwd() | ||
3865 | 65 | |||
3866 | 66 | files.cp(pjoin(MG5DIR, 'tests', 'input_files', 'test.hepmc.gz'), self.path) | ||
3867 | 67 | |||
3868 | 68 | |||
3869 | 69 | fsock = open(pjoin(self.path, 'test_hepmc'),'w') | ||
3870 | 70 | text = """ | ||
3871 | 71 | set spinmode none | ||
3872 | 72 | set cross_section {0:1.0} | ||
3873 | 73 | set new_wgt BR | ||
3874 | 74 | set input_format hepmc | ||
3875 | 75 | import ./test.hepmc.gz | ||
3876 | 76 | import model %s/tests/input_files/DM_pion %s/tests/input_files/DM_pion/param_pion.dat | ||
3877 | 77 | decay k0 > xr xr a | ||
3878 | 78 | launch | ||
3879 | 79 | """ % (MG5DIR, MG5DIR) | ||
3880 | 80 | |||
3881 | 81 | fsock.write(text) | ||
3882 | 82 | fsock.close() | ||
3883 | 83 | |||
3884 | 84 | import subprocess | ||
3885 | 85 | if logging.getLogger('madgraph').level <= 20: | ||
3886 | 86 | stdout=None | ||
3887 | 87 | stderr=None | ||
3888 | 88 | else: | ||
3889 | 89 | devnull =open(os.devnull,'w') | ||
3890 | 90 | stdout=devnull | ||
3891 | 91 | stderr=devnull | ||
3892 | 92 | |||
3893 | 93 | subprocess.call([pjoin(MG5DIR, 'MadSpin', 'madspin'), | ||
3894 | 94 | pjoin(self.path, 'test_hepmc')], | ||
3895 | 95 | cwd=pjoin(self.path), | ||
3896 | 96 | stdout=stdout,stderr=stdout) | ||
3897 | 97 | self.assertTrue(os.path.exists(pjoin(self.path, 'test_decayed.lhe.gz'))) | ||
3898 | 98 | lhe = lhe_parser.EventFile(pjoin(self.path, 'test_decayed.lhe.gz')) | ||
3899 | 99 | self.assertEqual(10, len(lhe)) | ||
3900 | 100 | |||
3901 | 101 | nb_dec = 0 | ||
3902 | 102 | nb_photon = 0 | ||
3903 | 103 | for event in lhe: | ||
3904 | 104 | self.assertEqual(event.nexternal, len(event)) | ||
3905 | 105 | for particle in event: | ||
3906 | 106 | if particle.pdg == 130: | ||
3907 | 107 | self.assertEqual(particle.status,2) | ||
3908 | 108 | nb_dec +=1 | ||
3909 | 109 | if particle.pdg ==22: | ||
3910 | 110 | nb_photon += 1 | ||
3911 | 111 | |||
3912 | 112 | self.assertEqual(nb_dec, 116) | ||
3913 | 113 | self.assertEqual(nb_photon, 116) | ||
3914 | 114 | |||
3915 | 0 | \ No newline at end of file | 115 | \ No newline at end of file |
3916 | 1 | 116 | ||
3917 | === modified file 'tests/acceptance_tests/test_madweight.py' | |||
3918 | --- tests/acceptance_tests/test_madweight.py 2015-10-24 19:53:10 +0000 | |||
3919 | +++ tests/acceptance_tests/test_madweight.py 2018-06-15 08:18:50 +0000 | |||
3920 | @@ -152,8 +152,8 @@ | |||
3921 | 152 | except Exception, error: | 152 | except Exception, error: |
3922 | 153 | pass | 153 | pass |
3923 | 154 | 154 | ||
3926 | 155 | cmd = """set automatic_html_opening False --no-save | 155 | cmd = """set automatic_html_opening False --no_save |
3927 | 156 | set cluster_temp_path /tmp --no-save | 156 | set cluster_temp_path /tmp --no_save |
3928 | 157 | generate p p > w+, w+ > e+ ve | 157 | generate p p > w+, w+ > e+ ve |
3929 | 158 | output madweight TEST_MW_W_prod -f | 158 | output madweight TEST_MW_W_prod -f |
3930 | 159 | launch | 159 | launch |
3931 | @@ -215,8 +215,8 @@ | |||
3932 | 215 | except Exception, error: | 215 | except Exception, error: |
3933 | 216 | pass | 216 | pass |
3934 | 217 | 217 | ||
3937 | 218 | cmd = """set automatic_html_opening False --no-save | 218 | cmd = """set automatic_html_opening False --no_save |
3938 | 219 | set cluster_temp_path /tmp --no-save | 219 | set cluster_temp_path /tmp --no_save |
3939 | 220 | generate p p > w+ j j, w+ > e+ ve | 220 | generate p p > w+ j j, w+ > e+ ve |
3940 | 221 | output madweight TEST_MW_W2J_prod | 221 | output madweight TEST_MW_W2J_prod |
3941 | 222 | launch | 222 | launch |
3942 | 223 | 223 | ||
3943 | === modified file 'tests/acceptance_tests/test_model_equivalence.py' | |||
3944 | --- tests/acceptance_tests/test_model_equivalence.py 2016-09-06 15:01:18 +0000 | |||
3945 | +++ tests/acceptance_tests/test_model_equivalence.py 2018-06-15 08:18:50 +0000 | |||
3946 | @@ -347,6 +347,7 @@ | |||
3947 | 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]} |
3948 | 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]} |
3949 | 349 | nb_value = 0 | 349 | nb_value = 0 |
3950 | 350 | checked_solutions = solutions.keys() | ||
3951 | 350 | for line in testprog.stdout: | 351 | for line in testprog.stdout: |
3952 | 351 | self.assertTrue('Warning' not in line) | 352 | self.assertTrue('Warning' not in line) |
3953 | 352 | if '=' not in line: | 353 | if '=' not in line: |
3954 | @@ -356,6 +357,7 @@ | |||
3955 | 356 | if variable.startswith('mdl_'): | 357 | if variable.startswith('mdl_'): |
3956 | 357 | variable = variable[4:] | 358 | variable = variable[4:] |
3957 | 358 | 359 | ||
3958 | 360 | checked_solutions.remove(variable) | ||
3959 | 359 | if ',' in line: | 361 | if ',' in line: |
3960 | 360 | value = eval(split[1]) | 362 | value = eval(split[1]) |
3961 | 361 | else: | 363 | else: |
3962 | @@ -375,8 +377,9 @@ | |||
3963 | 375 | # solutions[variable] = [singlevalue] | 377 | # solutions[variable] = [singlevalue] |
3964 | 376 | # else: | 378 | # else: |
3965 | 377 | # solutions[variable].append(singlevalue) | 379 | # solutions[variable].append(singlevalue) |
3968 | 378 | 380 | self.assertEqual(nb_value, 116 - len(checked_solutions)) | |
3969 | 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]])) |
3970 | 382 | |||
3971 | 380 | 383 | ||
3972 | 381 | 384 | ||
3973 | 382 | 385 | ||
3974 | 383 | 386 | ||
3975 | === added directory 'tests/input_files/DM_pion' | |||
3976 | === added file 'tests/input_files/DM_pion/CT_couplings.py' | |||
3977 | --- tests/input_files/DM_pion/CT_couplings.py 1970-01-01 00:00:00 +0000 | |||
3978 | +++ tests/input_files/DM_pion/CT_couplings.py 2018-06-15 08:18:50 +0000 | |||
3979 | @@ -0,0 +1,1731 @@ | |||
3980 | 1 | # This file was automatically created by FeynRules 2.3.2 | ||
3981 | 2 | # Mathematica version: 9.0 for Linux x86 (64-bit) (November 20, 2012) | ||
3982 | 3 | # Date: Thu 11 Jun 2015 17:39:54 | ||
3983 | 4 | |||
3984 | 5 | |||
3985 | 6 | from object_library import all_couplings, Coupling | ||
3986 | 7 | |||
3987 | 8 | from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot | ||
3988 | 9 | |||
3989 | 10 | |||
3990 | 11 | |||
3991 | 12 | R2GC_138_1 = Coupling(name = 'R2GC_138_1', | ||
3992 | 13 | value = '-(complex(0,1)*G**2)/(16.*cmath.pi**2)', | ||
3993 | 14 | order = {'QCD':2}) | ||
3994 | 15 | |||
3995 | 16 | R2GC_139_2 = Coupling(name = 'R2GC_139_2', | ||
3996 | 17 | value = '(complex(0,1)*G**2)/(48.*cmath.pi**2)', | ||
3997 | 18 | order = {'QCD':2}) | ||
3998 | 19 | |||
3999 | 20 | R2GC_140_3 = Coupling(name = 'R2GC_140_3', | ||
4000 | 21 | value = '(ee**2*complex(0,1)*G**2)/(216.*cmath.pi**2)', | ||
4001 | 22 | order = {'QCD':2,'QED':2}) | ||
4002 | 23 | |||
4003 | 24 | R2GC_140_4 = Coupling(name = 'R2GC_140_4', | ||
4004 | 25 | value = '(ee**2*complex(0,1)*G**2)/(54.*cmath.pi**2)', | ||
4005 | 26 | order = {'QCD':2,'QED':2}) | ||
4006 | 27 | |||
4007 | 28 | R2GC_141_5 = Coupling(name = 'R2GC_141_5', | ||
4008 | 29 | value = '-(ee*complex(0,1)*G**3)/(144.*cmath.pi**2)', | ||
4009 | 30 | order = {'QCD':3,'QED':1}) | ||
4010 | 31 | |||
4011 | 32 | R2GC_141_6 = Coupling(name = 'R2GC_141_6', | ||
4012 | 33 | value = '(ee*complex(0,1)*G**3)/(72.*cmath.pi**2)', | ||
4013 | 34 | order = {'QCD':3,'QED':1}) | ||
4014 | 35 | |||
4015 | 36 | R2GC_142_7 = Coupling(name = 'R2GC_142_7', | ||
4016 | 37 | value = '(complex(0,1)*G**3*gAd33)/(16.*cmath.pi**2)', | ||
4017 | 38 | order = {'DMV':1,'QCD':3}) | ||
4018 | 39 | |||
4019 | 40 | R2GC_142_8 = Coupling(name = 'R2GC_142_8', | ||
4020 | 41 | value = '(complex(0,1)*G**3*gAu22)/(16.*cmath.pi**2)', | ||
4021 | 42 | order = {'DMV':1,'QCD':3}) | ||
4022 | 43 | |||
4023 | 44 | R2GC_142_9 = Coupling(name = 'R2GC_142_9', | ||
4024 | 45 | value = '(complex(0,1)*G**3*gAd11)/(16.*cmath.pi**2)', | ||
4025 | 46 | order = {'DMV':1,'QCD':3}) | ||
4026 | 47 | |||
4027 | 48 | R2GC_142_10 = Coupling(name = 'R2GC_142_10', | ||
4028 | 49 | value = '(complex(0,1)*G**3*gAd22)/(16.*cmath.pi**2)', | ||
4029 | 50 | order = {'DMV':1,'QCD':3}) | ||
4030 | 51 | |||
4031 | 52 | R2GC_142_11 = Coupling(name = 'R2GC_142_11', | ||
4032 | 53 | value = '(complex(0,1)*G**3*gAu33)/(16.*cmath.pi**2)', | ||
4033 | 54 | order = {'DMV':1,'QCD':3}) | ||
4034 | 55 | |||
4035 | 56 | R2GC_142_12 = Coupling(name = 'R2GC_142_12', | ||
4036 | 57 | value = '(complex(0,1)*G**3*gAu11)/(16.*cmath.pi**2)', | ||
4037 | 58 | order = {'DMV':1,'QCD':3}) | ||
4038 | 59 | |||
4039 | 60 | R2GC_143_13 = Coupling(name = 'R2GC_143_13', | ||
4040 | 61 | value = '-(ee*complex(0,1)*G**2*gVd33)/(72.*cmath.pi**2)', | ||
4041 | 62 | order = {'DMV':1,'QCD':2,'QED':1}) | ||
4042 | 63 | |||
4043 | 64 | R2GC_143_14 = Coupling(name = 'R2GC_143_14', | ||
4044 | 65 | value = '(ee*complex(0,1)*G**2*gVu22)/(36.*cmath.pi**2)', | ||
4045 | 66 | order = {'DMV':1,'QCD':2,'QED':1}) | ||
4046 | 67 | |||
4047 | 68 | R2GC_143_15 = Coupling(name = 'R2GC_143_15', | ||
4048 | 69 | value = '-(ee*complex(0,1)*G**2*gVd11)/(72.*cmath.pi**2)', | ||
4049 | 70 | order = {'DMV':1,'QCD':2,'QED':1}) | ||
4050 | 71 | |||
4051 | 72 | R2GC_143_16 = Coupling(name = 'R2GC_143_16', | ||
4052 | 73 | value = '-(ee*complex(0,1)*G**2*gVd22)/(72.*cmath.pi**2)', | ||
4053 | 74 | order = {'DMV':1,'QCD':2,'QED':1}) | ||
4054 | 75 | |||
4055 | 76 | R2GC_143_17 = Coupling(name = 'R2GC_143_17', | ||
4056 | 77 | value = '(ee*complex(0,1)*G**2*gVu33)/(36.*cmath.pi**2)', | ||
4057 | 78 | order = {'DMV':1,'QCD':2,'QED':1}) | ||
4058 | 79 | |||
4059 | 80 | R2GC_143_18 = Coupling(name = 'R2GC_143_18', | ||
4060 | 81 | value = '(ee*complex(0,1)*G**2*gVu11)/(36.*cmath.pi**2)', | ||
4061 | 82 | order = {'DMV':1,'QCD':2,'QED':1}) | ||
4062 | 83 | |||
4063 | 84 | R2GC_144_19 = Coupling(name = 'R2GC_144_19', | ||
4064 | 85 | value = '(complex(0,1)*G**3*gVd33)/(48.*cmath.pi**2)', | ||
4065 | 86 | order = {'DMV':1,'QCD':3}) | ||
4066 | 87 | |||
4067 | 88 | R2GC_144_20 = Coupling(name = 'R2GC_144_20', | ||
4068 | 89 | value = '(complex(0,1)*G**3*gVu22)/(48.*cmath.pi**2)', | ||
4069 | 90 | order = {'DMV':1,'QCD':3}) | ||
4070 | 91 | |||
4071 | 92 | R2GC_144_21 = Coupling(name = 'R2GC_144_21', | ||
4072 | 93 | value = '(complex(0,1)*G**3*gVd11)/(48.*cmath.pi**2)', | ||
4073 | 94 | order = {'DMV':1,'QCD':3}) | ||
4074 | 95 | |||
4075 | 96 | R2GC_144_22 = Coupling(name = 'R2GC_144_22', | ||
4076 | 97 | value = '(complex(0,1)*G**3*gVd22)/(48.*cmath.pi**2)', | ||
4077 | 98 | order = {'DMV':1,'QCD':3}) | ||
4078 | 99 | |||
4079 | 100 | R2GC_144_23 = Coupling(name = 'R2GC_144_23', | ||
4080 | 101 | value = '(complex(0,1)*G**3*gVu33)/(48.*cmath.pi**2)', | ||
4081 | 102 | order = {'DMV':1,'QCD':3}) | ||
4082 | 103 | |||
4083 | 104 | R2GC_144_24 = Coupling(name = 'R2GC_144_24', | ||
4084 | 105 | value = '(complex(0,1)*G**3*gVu11)/(48.*cmath.pi**2)', | ||
4085 | 106 | order = {'DMV':1,'QCD':3}) | ||
4086 | 107 | |||
4087 | 108 | R2GC_145_25 = Coupling(name = 'R2GC_145_25', | ||
4088 | 109 | value = '(complex(0,1)*G**2*gAd33**2)/(24.*cmath.pi**2) + (complex(0,1)*G**2*gVd33**2)/(24.*cmath.pi**2)', | ||
4089 | 110 | order = {'DMV':2,'QCD':2}) | ||
4090 | 111 | |||
4091 | 112 | R2GC_145_26 = Coupling(name = 'R2GC_145_26', | ||
4092 | 113 | value = '(complex(0,1)*G**2*gAu22**2)/(24.*cmath.pi**2) + (complex(0,1)*G**2*gVu22**2)/(24.*cmath.pi**2)', | ||
4093 | 114 | order = {'DMV':2,'QCD':2}) | ||
4094 | 115 | |||
4095 | 116 | R2GC_145_27 = Coupling(name = 'R2GC_145_27', | ||
4096 | 117 | value = '(complex(0,1)*G**2*gAd11**2)/(24.*cmath.pi**2) + (complex(0,1)*G**2*gVd11**2)/(24.*cmath.pi**2)', | ||
4097 | 118 | order = {'DMV':2,'QCD':2}) | ||
4098 | 119 | |||
4099 | 120 | R2GC_145_28 = Coupling(name = 'R2GC_145_28', | ||
4100 | 121 | value = '(complex(0,1)*G**2*gAd22**2)/(24.*cmath.pi**2) + (complex(0,1)*G**2*gVd22**2)/(24.*cmath.pi**2)', | ||
4101 | 122 | order = {'DMV':2,'QCD':2}) | ||
4102 | 123 | |||
4103 | 124 | R2GC_145_29 = Coupling(name = 'R2GC_145_29', | ||
4104 | 125 | value = '(complex(0,1)*G**2*gAu33**2)/(24.*cmath.pi**2) + (complex(0,1)*G**2*gVu33**2)/(24.*cmath.pi**2)', | ||
4105 | 126 | order = {'DMV':2,'QCD':2}) | ||
4106 | 127 | |||
4107 | 128 | R2GC_145_30 = Coupling(name = 'R2GC_145_30', | ||
4108 | 129 | value = '(complex(0,1)*G**2*gAu11**2)/(24.*cmath.pi**2) + (complex(0,1)*G**2*gVu11**2)/(24.*cmath.pi**2)', | ||
4109 | 130 | order = {'DMV':2,'QCD':2}) | ||
4110 | 131 | |||
4111 | 132 | R2GC_146_31 = Coupling(name = 'R2GC_146_31', | ||
4112 | 133 | value = '-(complex(0,1)*G**2*MB**2)/(8.*cmath.pi**2)', | ||
4113 | 134 | order = {'QCD':2}) | ||
4114 | 135 | |||
4115 | 136 | R2GC_146_32 = Coupling(name = 'R2GC_146_32', | ||
4116 | 137 | value = '-(complex(0,1)*G**2*MC**2)/(8.*cmath.pi**2)', | ||
4117 | 138 | order = {'QCD':2}) | ||
4118 | 139 | |||
4119 | 140 | R2GC_146_33 = Coupling(name = 'R2GC_146_33', | ||
4120 | 141 | value = '-(complex(0,1)*G**2*MD**2)/(8.*cmath.pi**2)', | ||
4121 | 142 | order = {'QCD':2}) | ||
4122 | 143 | |||
4123 | 144 | R2GC_146_34 = Coupling(name = 'R2GC_146_34', | ||
4124 | 145 | value = '-(complex(0,1)*G**2*MS**2)/(8.*cmath.pi**2)', | ||
4125 | 146 | order = {'QCD':2}) | ||
4126 | 147 | |||
4127 | 148 | R2GC_146_35 = Coupling(name = 'R2GC_146_35', | ||
4128 | 149 | value = '-(complex(0,1)*G**2*MT**2)/(8.*cmath.pi**2)', | ||
4129 | 150 | order = {'QCD':2}) | ||
4130 | 151 | |||
4131 | 152 | R2GC_146_36 = Coupling(name = 'R2GC_146_36', | ||
4132 | 153 | value = '-(complex(0,1)*G**2*MU**2)/(8.*cmath.pi**2)', | ||
4133 | 154 | order = {'QCD':2}) | ||
4134 | 155 | |||
4135 | 156 | R2GC_147_37 = Coupling(name = 'R2GC_147_37', | ||
4136 | 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)', | ||
4137 | 158 | order = {'QCD':2,'QED':2}) | ||
4138 | 159 | |||
4139 | 160 | R2GC_147_38 = Coupling(name = 'R2GC_147_38', | ||
4140 | 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)', | ||
4141 | 162 | order = {'QCD':2,'QED':2}) | ||
4142 | 163 | |||
4143 | 164 | R2GC_148_39 = Coupling(name = 'R2GC_148_39', | ||
4144 | 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)', | ||
4145 | 166 | order = {'QCD':3,'QED':1}) | ||
4146 | 167 | |||
4147 | 168 | R2GC_148_40 = Coupling(name = 'R2GC_148_40', | ||
4148 | 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)', | ||
4149 | 170 | order = {'QCD':3,'QED':1}) | ||
4150 | 171 | |||
4151 | 172 | R2GC_149_41 = Coupling(name = 'R2GC_149_41', | ||
4152 | 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)', | ||
4153 | 174 | order = {'QCD':3,'QED':1}) | ||
4154 | 175 | |||
4155 | 176 | R2GC_149_42 = Coupling(name = 'R2GC_149_42', | ||
4156 | 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)', | ||
4157 | 178 | order = {'QCD':3,'QED':1}) | ||
4158 | 179 | |||
4159 | 180 | R2GC_150_43 = Coupling(name = 'R2GC_150_43', | ||
4160 | 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)', | ||
4161 | 182 | order = {'DMV':1,'QCD':2,'QED':1}) | ||
4162 | 183 | |||
4163 | 184 | R2GC_150_44 = Coupling(name = 'R2GC_150_44', | ||
4164 | 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)', | ||
4165 | 186 | order = {'DMV':1,'QCD':2,'QED':1}) | ||
4166 | 187 | |||
4167 | 188 | R2GC_150_45 = Coupling(name = 'R2GC_150_45', | ||
4168 | 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)', | ||
4169 | 190 | order = {'DMV':1,'QCD':2,'QED':1}) | ||
4170 | 191 | |||
4171 | 192 | R2GC_150_46 = Coupling(name = 'R2GC_150_46', | ||
4172 | 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)', | ||
4173 | 194 | order = {'DMV':1,'QCD':2,'QED':1}) | ||
4174 | 195 | |||
4175 | 196 | R2GC_150_47 = Coupling(name = 'R2GC_150_47', | ||
4176 | 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)', | ||
4177 | 198 | order = {'DMV':1,'QCD':2,'QED':1}) | ||
4178 | 199 | |||
4179 | 200 | R2GC_150_48 = Coupling(name = 'R2GC_150_48', | ||
4180 | 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)', | ||
4181 | 202 | order = {'DMV':1,'QCD':2,'QED':1}) | ||
4182 | 203 | |||
4183 | 204 | R2GC_151_49 = Coupling(name = 'R2GC_151_49', | ||
4184 | 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)', | ||
4185 | 206 | order = {'QCD':2,'QED':2}) | ||
4186 | 207 | |||
4187 | 208 | R2GC_151_50 = Coupling(name = 'R2GC_151_50', | ||
4188 | 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)', | ||
4189 | 210 | order = {'QCD':2,'QED':2}) | ||
4190 | 211 | |||
4191 | 212 | R2GC_152_51 = Coupling(name = 'R2GC_152_51', | ||
4192 | 213 | value = '-(complex(0,1)*G**2*MB*yb)/(8.*cmath.pi**2*cmath.sqrt(2))', | ||
4193 | 214 | order = {'QCD':2,'QED':1}) | ||
4194 | 215 | |||
4195 | 216 | R2GC_152_52 = Coupling(name = 'R2GC_152_52', | ||
4196 | 217 | value = '-(complex(0,1)*G**2*MC*yc)/(8.*cmath.pi**2*cmath.sqrt(2))', | ||
4197 | 218 | order = {'QCD':2,'QED':1}) | ||
4198 | 219 | |||
4199 | 220 | R2GC_152_53 = Coupling(name = 'R2GC_152_53', | ||
4200 | 221 | value = '-(complex(0,1)*G**2*MD*ydo)/(8.*cmath.pi**2*cmath.sqrt(2))', | ||
4201 | 222 | order = {'QCD':2,'QED':1}) | ||
4202 | 223 | |||
4203 | 224 | R2GC_152_54 = Coupling(name = 'R2GC_152_54', | ||
4204 | 225 | value = '-(complex(0,1)*G**2*MS*ys)/(8.*cmath.pi**2*cmath.sqrt(2))', | ||
4205 | 226 | order = {'QCD':2,'QED':1}) | ||
4206 | 227 | |||
4207 | 228 | R2GC_152_55 = Coupling(name = 'R2GC_152_55', | ||
4208 | 229 | value = '-(complex(0,1)*G**2*MT*yt)/(8.*cmath.pi**2*cmath.sqrt(2))', | ||
4209 | 230 | order = {'QCD':2,'QED':1}) | ||
4210 | 231 | |||
4211 | 232 | R2GC_152_56 = Coupling(name = 'R2GC_152_56', | ||
4212 | 233 | value = '-(complex(0,1)*G**2*MU*yup)/(8.*cmath.pi**2*cmath.sqrt(2))', | ||
4213 | 234 | order = {'QCD':2,'QED':1}) | ||
4214 | 235 | |||
4215 | 236 | R2GC_153_57 = Coupling(name = 'R2GC_153_57', | ||
4216 | 237 | value = '(complex(0,1)*G**2*gSd33*MB*yb)/(8.*cmath.pi**2*cmath.sqrt(2))', | ||
4217 | 238 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4218 | 239 | |||
4219 | 240 | R2GC_153_58 = Coupling(name = 'R2GC_153_58', | ||
4220 | 241 | value = '(complex(0,1)*G**2*gSu22*MC*yc)/(8.*cmath.pi**2*cmath.sqrt(2))', | ||
4221 | 242 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4222 | 243 | |||
4223 | 244 | R2GC_153_59 = Coupling(name = 'R2GC_153_59', | ||
4224 | 245 | value = '(complex(0,1)*G**2*gSd11*MD*ydo)/(8.*cmath.pi**2*cmath.sqrt(2))', | ||
4225 | 246 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4226 | 247 | |||
4227 | 248 | R2GC_153_60 = Coupling(name = 'R2GC_153_60', | ||
4228 | 249 | value = '(complex(0,1)*G**2*gSd22*MS*ys)/(8.*cmath.pi**2*cmath.sqrt(2))', | ||
4229 | 250 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4230 | 251 | |||
4231 | 252 | R2GC_153_61 = Coupling(name = 'R2GC_153_61', | ||
4232 | 253 | value = '(complex(0,1)*G**2*gSu33*MT*yt)/(8.*cmath.pi**2*cmath.sqrt(2))', | ||
4233 | 254 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4234 | 255 | |||
4235 | 256 | R2GC_153_62 = Coupling(name = 'R2GC_153_62', | ||
4236 | 257 | value = '(complex(0,1)*G**2*gSu11*MU*yup)/(8.*cmath.pi**2*cmath.sqrt(2))', | ||
4237 | 258 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4238 | 259 | |||
4239 | 260 | R2GC_154_63 = Coupling(name = 'R2GC_154_63', | ||
4240 | 261 | value = '-(complex(0,1)*G**2*yb**2)/(16.*cmath.pi**2)', | ||
4241 | 262 | order = {'QCD':2,'QED':2}) | ||
4242 | 263 | |||
4243 | 264 | R2GC_154_64 = Coupling(name = 'R2GC_154_64', | ||
4244 | 265 | value = '-(complex(0,1)*G**2*yc**2)/(16.*cmath.pi**2)', | ||
4245 | 266 | order = {'QCD':2,'QED':2}) | ||
4246 | 267 | |||
4247 | 268 | R2GC_154_65 = Coupling(name = 'R2GC_154_65', | ||
4248 | 269 | value = '-(complex(0,1)*G**2*ydo**2)/(16.*cmath.pi**2)', | ||
4249 | 270 | order = {'QCD':2,'QED':2}) | ||
4250 | 271 | |||
4251 | 272 | R2GC_154_66 = Coupling(name = 'R2GC_154_66', | ||
4252 | 273 | value = '-(complex(0,1)*G**2*ys**2)/(16.*cmath.pi**2)', | ||
4253 | 274 | order = {'QCD':2,'QED':2}) | ||
4254 | 275 | |||
4255 | 276 | R2GC_154_67 = Coupling(name = 'R2GC_154_67', | ||
4256 | 277 | value = '-(complex(0,1)*G**2*yt**2)/(16.*cmath.pi**2)', | ||
4257 | 278 | order = {'QCD':2,'QED':2}) | ||
4258 | 279 | |||
4259 | 280 | R2GC_154_68 = Coupling(name = 'R2GC_154_68', | ||
4260 | 281 | value = '-(complex(0,1)*G**2*yup**2)/(16.*cmath.pi**2)', | ||
4261 | 282 | order = {'QCD':2,'QED':2}) | ||
4262 | 283 | |||
4263 | 284 | R2GC_155_69 = Coupling(name = 'R2GC_155_69', | ||
4264 | 285 | value = '(complex(0,1)*G**2*gPd33*yb**2)/(16.*cmath.pi**2)', | ||
4265 | 286 | order = {'DMS':1,'QCD':2,'QED':2}) | ||
4266 | 287 | |||
4267 | 288 | R2GC_155_70 = Coupling(name = 'R2GC_155_70', | ||
4268 | 289 | value = '-(complex(0,1)*G**2*gPu22*yc**2)/(16.*cmath.pi**2)', | ||
4269 | 290 | order = {'DMS':1,'QCD':2,'QED':2}) | ||
4270 | 291 | |||
4271 | 292 | R2GC_155_71 = Coupling(name = 'R2GC_155_71', | ||
4272 | 293 | value = '(complex(0,1)*G**2*gPd11*ydo**2)/(16.*cmath.pi**2)', | ||
4273 | 294 | order = {'DMS':1,'QCD':2,'QED':2}) | ||
4274 | 295 | |||
4275 | 296 | R2GC_155_72 = Coupling(name = 'R2GC_155_72', | ||
4276 | 297 | value = '(complex(0,1)*G**2*gPd22*ys**2)/(16.*cmath.pi**2)', | ||
4277 | 298 | order = {'DMS':1,'QCD':2,'QED':2}) | ||
4278 | 299 | |||
4279 | 300 | R2GC_155_73 = Coupling(name = 'R2GC_155_73', | ||
4280 | 301 | value = '-(complex(0,1)*G**2*gPu33*yt**2)/(16.*cmath.pi**2)', | ||
4281 | 302 | order = {'DMS':1,'QCD':2,'QED':2}) | ||
4282 | 303 | |||
4283 | 304 | R2GC_155_74 = Coupling(name = 'R2GC_155_74', | ||
4284 | 305 | value = '-(complex(0,1)*G**2*gPu11*yup**2)/(16.*cmath.pi**2)', | ||
4285 | 306 | order = {'DMS':1,'QCD':2,'QED':2}) | ||
4286 | 307 | |||
4287 | 308 | R2GC_156_75 = Coupling(name = 'R2GC_156_75', | ||
4288 | 309 | value = '(complex(0,1)*G**2*gSd33*yb**2)/(16.*cmath.pi**2)', | ||
4289 | 310 | order = {'DMS':1,'QCD':2,'QED':2}) | ||
4290 | 311 | |||
4291 | 312 | R2GC_156_76 = Coupling(name = 'R2GC_156_76', | ||
4292 | 313 | value = '(complex(0,1)*G**2*gSu22*yc**2)/(16.*cmath.pi**2)', | ||
4293 | 314 | order = {'DMS':1,'QCD':2,'QED':2}) | ||
4294 | 315 | |||
4295 | 316 | R2GC_156_77 = Coupling(name = 'R2GC_156_77', | ||
4296 | 317 | value = '(complex(0,1)*G**2*gSd11*ydo**2)/(16.*cmath.pi**2)', | ||
4297 | 318 | order = {'DMS':1,'QCD':2,'QED':2}) | ||
4298 | 319 | |||
4299 | 320 | R2GC_156_78 = Coupling(name = 'R2GC_156_78', | ||
4300 | 321 | value = '(complex(0,1)*G**2*gSd22*ys**2)/(16.*cmath.pi**2)', | ||
4301 | 322 | order = {'DMS':1,'QCD':2,'QED':2}) | ||
4302 | 323 | |||
4303 | 324 | R2GC_156_79 = Coupling(name = 'R2GC_156_79', | ||
4304 | 325 | value = '(complex(0,1)*G**2*gSu33*yt**2)/(16.*cmath.pi**2)', | ||
4305 | 326 | order = {'DMS':1,'QCD':2,'QED':2}) | ||
4306 | 327 | |||
4307 | 328 | R2GC_156_80 = Coupling(name = 'R2GC_156_80', | ||
4308 | 329 | value = '(complex(0,1)*G**2*gSu11*yup**2)/(16.*cmath.pi**2)', | ||
4309 | 330 | order = {'DMS':1,'QCD':2,'QED':2}) | ||
4310 | 331 | |||
4311 | 332 | R2GC_157_81 = Coupling(name = 'R2GC_157_81', | ||
4312 | 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)', | ||
4313 | 334 | order = {'DMS':2,'QCD':2,'QED':2}) | ||
4314 | 335 | |||
4315 | 336 | R2GC_157_82 = Coupling(name = 'R2GC_157_82', | ||
4316 | 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)', | ||
4317 | 338 | order = {'DMS':2,'QCD':2,'QED':2}) | ||
4318 | 339 | |||
4319 | 340 | R2GC_157_83 = Coupling(name = 'R2GC_157_83', | ||
4320 | 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)', | ||
4321 | 342 | order = {'DMS':2,'QCD':2,'QED':2}) | ||
4322 | 343 | |||
4323 | 344 | R2GC_157_84 = Coupling(name = 'R2GC_157_84', | ||
4324 | 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)', | ||
4325 | 346 | order = {'DMS':2,'QCD':2,'QED':2}) | ||
4326 | 347 | |||
4327 | 348 | R2GC_157_85 = Coupling(name = 'R2GC_157_85', | ||
4328 | 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)', | ||
4329 | 350 | order = {'DMS':2,'QCD':2,'QED':2}) | ||
4330 | 351 | |||
4331 | 352 | R2GC_157_86 = Coupling(name = 'R2GC_157_86', | ||
4332 | 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)', | ||
4333 | 354 | order = {'DMS':2,'QCD':2,'QED':2}) | ||
4334 | 355 | |||
4335 | 356 | R2GC_158_87 = Coupling(name = 'R2GC_158_87', | ||
4336 | 357 | value = '(ee**2*complex(0,1)*G**2)/(96.*cmath.pi**2*sw**2)', | ||
4337 | 358 | order = {'QCD':2,'QED':2}) | ||
4338 | 359 | |||
4339 | 360 | R2GC_158_88 = Coupling(name = 'R2GC_158_88', | ||
4340 | 361 | value = '(CKM2x1*ee**2*complex(0,1)*G**2*complexconjugate(CKM2x1))/(96.*cmath.pi**2*sw**2)', | ||
4341 | 362 | order = {'QCD':2,'QED':2}) | ||
4342 | 363 | |||
4343 | 364 | R2GC_158_89 = Coupling(name = 'R2GC_158_89', | ||
4344 | 365 | value = '(CKM2x2*ee**2*complex(0,1)*G**2*complexconjugate(CKM2x2))/(96.*cmath.pi**2*sw**2)', | ||
4345 | 366 | order = {'QCD':2,'QED':2}) | ||
4346 | 367 | |||
4347 | 368 | R2GC_158_90 = Coupling(name = 'R2GC_158_90', | ||
4348 | 369 | value = '(CKM1x1*ee**2*complex(0,1)*G**2*complexconjugate(CKM1x1))/(96.*cmath.pi**2*sw**2)', | ||
4349 | 370 | order = {'QCD':2,'QED':2}) | ||
4350 | 371 | |||
4351 | 372 | R2GC_158_91 = Coupling(name = 'R2GC_158_91', | ||
4352 | 373 | value = '(CKM1x2*ee**2*complex(0,1)*G**2*complexconjugate(CKM1x2))/(96.*cmath.pi**2*sw**2)', | ||
4353 | 374 | order = {'QCD':2,'QED':2}) | ||
4354 | 375 | |||
4355 | 376 | R2GC_159_92 = Coupling(name = 'R2GC_159_92', | ||
4356 | 377 | value = '-(complex(0,1)*G**2*yb**2)/(16.*cmath.pi**2) - (complex(0,1)*G**2*yt**2)/(16.*cmath.pi**2)', | ||
4357 | 378 | order = {'QCD':2,'QED':2}) | ||
4358 | 379 | |||
4359 | 380 | R2GC_159_93 = Coupling(name = 'R2GC_159_93', | ||
4360 | 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)', | ||
4361 | 382 | order = {'QCD':2,'QED':2}) | ||
4362 | 383 | |||
4363 | 384 | R2GC_159_94 = Coupling(name = 'R2GC_159_94', | ||
4364 | 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)', | ||
4365 | 386 | order = {'QCD':2,'QED':2}) | ||
4366 | 387 | |||
4367 | 388 | R2GC_159_95 = Coupling(name = 'R2GC_159_95', | ||
4368 | 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)', | ||
4369 | 390 | order = {'QCD':2,'QED':2}) | ||
4370 | 391 | |||
4371 | 392 | R2GC_159_96 = Coupling(name = 'R2GC_159_96', | ||
4372 | 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)', | ||
4373 | 394 | order = {'QCD':2,'QED':2}) | ||
4374 | 395 | |||
4375 | 396 | R2GC_163_97 = Coupling(name = 'R2GC_163_97', | ||
4376 | 397 | value = '-G**4/(192.*cmath.pi**2)', | ||
4377 | 398 | order = {'QCD':4}) | ||
4378 | 399 | |||
4379 | 400 | R2GC_163_98 = Coupling(name = 'R2GC_163_98', | ||
4380 | 401 | value = 'G**4/(64.*cmath.pi**2)', | ||
4381 | 402 | order = {'QCD':4}) | ||
4382 | 403 | |||
4383 | 404 | R2GC_164_99 = Coupling(name = 'R2GC_164_99', | ||
4384 | 405 | value = '-(complex(0,1)*G**4)/(192.*cmath.pi**2)', | ||
4385 | 406 | order = {'QCD':4}) | ||
4386 | 407 | |||
4387 | 408 | R2GC_164_100 = Coupling(name = 'R2GC_164_100', | ||
4388 | 409 | value = '(complex(0,1)*G**4)/(64.*cmath.pi**2)', | ||
4389 | 410 | order = {'QCD':4}) | ||
4390 | 411 | |||
4391 | 412 | R2GC_165_101 = Coupling(name = 'R2GC_165_101', | ||
4392 | 413 | value = '(complex(0,1)*G**4)/(192.*cmath.pi**2)', | ||
4393 | 414 | order = {'QCD':4}) | ||
4394 | 415 | |||
4395 | 416 | R2GC_165_102 = Coupling(name = 'R2GC_165_102', | ||
4396 | 417 | value = '-(complex(0,1)*G**4)/(64.*cmath.pi**2)', | ||
4397 | 418 | order = {'QCD':4}) | ||
4398 | 419 | |||
4399 | 420 | R2GC_166_103 = Coupling(name = 'R2GC_166_103', | ||
4400 | 421 | value = '-(complex(0,1)*G**4)/(48.*cmath.pi**2)', | ||
4401 | 422 | order = {'QCD':4}) | ||
4402 | 423 | |||
4403 | 424 | R2GC_167_104 = Coupling(name = 'R2GC_167_104', | ||
4404 | 425 | value = '(complex(0,1)*G**4)/(288.*cmath.pi**2)', | ||
4405 | 426 | order = {'QCD':4}) | ||
4406 | 427 | |||
4407 | 428 | R2GC_167_105 = Coupling(name = 'R2GC_167_105', | ||
4408 | 429 | value = '-(complex(0,1)*G**4)/(32.*cmath.pi**2)', | ||
4409 | 430 | order = {'QCD':4}) | ||
4410 | 431 | |||
4411 | 432 | R2GC_168_106 = Coupling(name = 'R2GC_168_106', | ||
4412 | 433 | value = '-(complex(0,1)*G**4)/(16.*cmath.pi**2)', | ||
4413 | 434 | order = {'QCD':4}) | ||
4414 | 435 | |||
4415 | 436 | R2GC_168_107 = Coupling(name = 'R2GC_168_107', | ||
4416 | 437 | value = '(complex(0,1)*G**4)/(4.*cmath.pi**2)', | ||
4417 | 438 | order = {'QCD':4}) | ||
4418 | 439 | |||
4419 | 440 | R2GC_169_108 = Coupling(name = 'R2GC_169_108', | ||
4420 | 441 | value = '(-3*complex(0,1)*G**4)/(64.*cmath.pi**2)', | ||
4421 | 442 | order = {'QCD':4}) | ||
4422 | 443 | |||
4423 | 444 | R2GC_169_109 = Coupling(name = 'R2GC_169_109', | ||
4424 | 445 | value = '(-23*complex(0,1)*G**4)/(64.*cmath.pi**2)', | ||
4425 | 446 | order = {'QCD':4}) | ||
4426 | 447 | |||
4427 | 448 | R2GC_170_110 = Coupling(name = 'R2GC_170_110', | ||
4428 | 449 | value = '(ee*complex(0,1)*G**2)/(18.*cmath.pi**2)', | ||
4429 | 450 | order = {'QCD':2,'QED':1}) | ||
4430 | 451 | |||
4431 | 452 | R2GC_171_111 = Coupling(name = 'R2GC_171_111', | ||
4432 | 453 | value = '-(complex(0,1)*G**3)/(6.*cmath.pi**2)', | ||
4433 | 454 | order = {'QCD':3}) | ||
4434 | 455 | |||
4435 | 456 | R2GC_172_112 = Coupling(name = 'R2GC_172_112', | ||
4436 | 457 | value = '-(ee*complex(0,1)*G**2)/(9.*cmath.pi**2)', | ||
4437 | 458 | order = {'QCD':2,'QED':1}) | ||
4438 | 459 | |||
4439 | 460 | R2GC_182_113 = Coupling(name = 'R2GC_182_113', | ||
4440 | 461 | value = '(complex(0,1)*G**2)/(12.*cmath.pi**2)', | ||
4441 | 462 | order = {'QCD':2}) | ||
4442 | 463 | |||
4443 | 464 | R2GC_185_114 = Coupling(name = 'R2GC_185_114', | ||
4444 | 465 | value = '(complex(0,1)*G**2*gAd33)/(6.*cmath.pi**2)', | ||
4445 | 466 | order = {'DMV':1,'QCD':2}) | ||
4446 | 467 | |||
4447 | 468 | R2GC_186_115 = Coupling(name = 'R2GC_186_115', | ||
4448 | 469 | value = '-(complex(0,1)*G**2*gVd33)/(6.*cmath.pi**2)', | ||
4449 | 470 | order = {'DMV':1,'QCD':2}) | ||
4450 | 471 | |||
4451 | 472 | R2GC_187_116 = Coupling(name = 'R2GC_187_116', | ||
4452 | 473 | value = '(complex(0,1)*G**2*MB)/(6.*cmath.pi**2)', | ||
4453 | 474 | order = {'QCD':2}) | ||
4454 | 475 | |||
4455 | 476 | R2GC_188_117 = Coupling(name = 'R2GC_188_117', | ||
4456 | 477 | value = '(cw*ee*complex(0,1)*G**2)/(12.*cmath.pi**2*sw)', | ||
4457 | 478 | order = {'QCD':2,'QED':1}) | ||
4458 | 479 | |||
4459 | 480 | R2GC_189_118 = Coupling(name = 'R2GC_189_118', | ||
4460 | 481 | value = '(ee*complex(0,1)*G**2*sw)/(36.*cw*cmath.pi**2)', | ||
4461 | 482 | order = {'QCD':2,'QED':1}) | ||
4462 | 483 | |||
4463 | 484 | R2GC_190_119 = Coupling(name = 'R2GC_190_119', | ||
4464 | 485 | value = '(complex(0,1)*G**2*yb)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4465 | 486 | order = {'QCD':2,'QED':1}) | ||
4466 | 487 | |||
4467 | 488 | R2GC_191_120 = Coupling(name = 'R2GC_191_120', | ||
4468 | 489 | value = '-(G**2*yb)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4469 | 490 | order = {'QCD':2,'QED':1}) | ||
4470 | 491 | |||
4471 | 492 | R2GC_192_121 = Coupling(name = 'R2GC_192_121', | ||
4472 | 493 | value = '-(G**2*gPd33*yb)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4473 | 494 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4474 | 495 | |||
4475 | 496 | R2GC_193_122 = Coupling(name = 'R2GC_193_122', | ||
4476 | 497 | value = '-(complex(0,1)*G**2*gSd33*yb)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4477 | 498 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4478 | 499 | |||
4479 | 500 | R2GC_197_123 = Coupling(name = 'R2GC_197_123', | ||
4480 | 501 | value = '(complex(0,1)*G**2*gAu22)/(6.*cmath.pi**2)', | ||
4481 | 502 | order = {'DMV':1,'QCD':2}) | ||
4482 | 503 | |||
4483 | 504 | R2GC_198_124 = Coupling(name = 'R2GC_198_124', | ||
4484 | 505 | value = '-(complex(0,1)*G**2*gVu22)/(6.*cmath.pi**2)', | ||
4485 | 506 | order = {'DMV':1,'QCD':2}) | ||
4486 | 507 | |||
4487 | 508 | R2GC_199_125 = Coupling(name = 'R2GC_199_125', | ||
4488 | 509 | value = '(complex(0,1)*G**2*MC)/(6.*cmath.pi**2)', | ||
4489 | 510 | order = {'QCD':2}) | ||
4490 | 511 | |||
4491 | 512 | R2GC_200_126 = Coupling(name = 'R2GC_200_126', | ||
4492 | 513 | value = '-(cw*ee*complex(0,1)*G**2)/(12.*cmath.pi**2*sw)', | ||
4493 | 514 | order = {'QCD':2,'QED':1}) | ||
4494 | 515 | |||
4495 | 516 | R2GC_202_127 = Coupling(name = 'R2GC_202_127', | ||
4496 | 517 | value = '(G**2*yc)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4497 | 518 | order = {'QCD':2,'QED':1}) | ||
4498 | 519 | |||
4499 | 520 | R2GC_203_128 = Coupling(name = 'R2GC_203_128', | ||
4500 | 521 | value = '(complex(0,1)*G**2*yc)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4501 | 522 | order = {'QCD':2,'QED':1}) | ||
4502 | 523 | |||
4503 | 524 | R2GC_204_129 = Coupling(name = 'R2GC_204_129', | ||
4504 | 525 | value = '-(G**2*gPu22*yc)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4505 | 526 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4506 | 527 | |||
4507 | 528 | R2GC_205_130 = Coupling(name = 'R2GC_205_130', | ||
4508 | 529 | value = '-(complex(0,1)*G**2*gSu22*yc)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4509 | 530 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4510 | 531 | |||
4511 | 532 | R2GC_209_131 = Coupling(name = 'R2GC_209_131', | ||
4512 | 533 | value = '(complex(0,1)*G**2*gAd11)/(6.*cmath.pi**2)', | ||
4513 | 534 | order = {'DMV':1,'QCD':2}) | ||
4514 | 535 | |||
4515 | 536 | R2GC_210_132 = Coupling(name = 'R2GC_210_132', | ||
4516 | 537 | value = '-(complex(0,1)*G**2*gVd11)/(6.*cmath.pi**2)', | ||
4517 | 538 | order = {'DMV':1,'QCD':2}) | ||
4518 | 539 | |||
4519 | 540 | R2GC_211_133 = Coupling(name = 'R2GC_211_133', | ||
4520 | 541 | value = '(complex(0,1)*G**2*MD)/(6.*cmath.pi**2)', | ||
4521 | 542 | order = {'QCD':2}) | ||
4522 | 543 | |||
4523 | 544 | R2GC_212_134 = Coupling(name = 'R2GC_212_134', | ||
4524 | 545 | value = '-(CKM2x1*ee*complex(0,1)*G**2)/(6.*cmath.pi**2*sw*cmath.sqrt(2))', | ||
4525 | 546 | order = {'QCD':2,'QED':1}) | ||
4526 | 547 | |||
4527 | 548 | R2GC_215_135 = Coupling(name = 'R2GC_215_135', | ||
4528 | 549 | value = '-(CKM2x1*G**2*yc)/(3.*cmath.pi**2)', | ||
4529 | 550 | order = {'QCD':2,'QED':1}) | ||
4530 | 551 | |||
4531 | 552 | R2GC_216_136 = Coupling(name = 'R2GC_216_136', | ||
4532 | 553 | value = '(complex(0,1)*G**2*ydo)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4533 | 554 | order = {'QCD':2,'QED':1}) | ||
4534 | 555 | |||
4535 | 556 | R2GC_217_137 = Coupling(name = 'R2GC_217_137', | ||
4536 | 557 | value = '-(G**2*ydo)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4537 | 558 | order = {'QCD':2,'QED':1}) | ||
4538 | 559 | |||
4539 | 560 | R2GC_218_138 = Coupling(name = 'R2GC_218_138', | ||
4540 | 561 | value = '(CKM2x1*G**2*ydo)/(3.*cmath.pi**2)', | ||
4541 | 562 | order = {'QCD':2,'QED':1}) | ||
4542 | 563 | |||
4543 | 564 | R2GC_219_139 = Coupling(name = 'R2GC_219_139', | ||
4544 | 565 | value = '-(G**2*gPd11*ydo)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4545 | 566 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4546 | 567 | |||
4547 | 568 | R2GC_220_140 = Coupling(name = 'R2GC_220_140', | ||
4548 | 569 | value = '-(complex(0,1)*G**2*gSd11*ydo)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4549 | 570 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4550 | 571 | |||
4551 | 572 | R2GC_221_141 = Coupling(name = 'R2GC_221_141', | ||
4552 | 573 | value = '-(ee*complex(0,1)*G**2*complexconjugate(CKM2x1))/(6.*cmath.pi**2*sw*cmath.sqrt(2))', | ||
4553 | 574 | order = {'QCD':2,'QED':1}) | ||
4554 | 575 | |||
4555 | 576 | R2GC_222_142 = Coupling(name = 'R2GC_222_142', | ||
4556 | 577 | value = '(G**2*yc*complexconjugate(CKM2x1))/(3.*cmath.pi**2)', | ||
4557 | 578 | order = {'QCD':2,'QED':1}) | ||
4558 | 579 | |||
4559 | 580 | R2GC_223_143 = Coupling(name = 'R2GC_223_143', | ||
4560 | 581 | value = '-(G**2*ydo*complexconjugate(CKM2x1))/(3.*cmath.pi**2)', | ||
4561 | 582 | order = {'QCD':2,'QED':1}) | ||
4562 | 583 | |||
4563 | 584 | R2GC_227_144 = Coupling(name = 'R2GC_227_144', | ||
4564 | 585 | value = '(complex(0,1)*G**2*gAd22)/(6.*cmath.pi**2)', | ||
4565 | 586 | order = {'DMV':1,'QCD':2}) | ||
4566 | 587 | |||
4567 | 588 | R2GC_228_145 = Coupling(name = 'R2GC_228_145', | ||
4568 | 589 | value = '-(complex(0,1)*G**2*gVd22)/(6.*cmath.pi**2)', | ||
4569 | 590 | order = {'DMV':1,'QCD':2}) | ||
4570 | 591 | |||
4571 | 592 | R2GC_229_146 = Coupling(name = 'R2GC_229_146', | ||
4572 | 593 | value = '(complex(0,1)*G**2*MS)/(6.*cmath.pi**2)', | ||
4573 | 594 | order = {'QCD':2}) | ||
4574 | 595 | |||
4575 | 596 | R2GC_230_147 = Coupling(name = 'R2GC_230_147', | ||
4576 | 597 | value = '-(CKM2x2*ee*complex(0,1)*G**2)/(6.*cmath.pi**2*sw*cmath.sqrt(2))', | ||
4577 | 598 | order = {'QCD':2,'QED':1}) | ||
4578 | 599 | |||
4579 | 600 | R2GC_233_148 = Coupling(name = 'R2GC_233_148', | ||
4580 | 601 | value = '-(CKM2x2*G**2*yc)/(3.*cmath.pi**2)', | ||
4581 | 602 | order = {'QCD':2,'QED':1}) | ||
4582 | 603 | |||
4583 | 604 | R2GC_234_149 = Coupling(name = 'R2GC_234_149', | ||
4584 | 605 | value = '(complex(0,1)*G**2*ys)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4585 | 606 | order = {'QCD':2,'QED':1}) | ||
4586 | 607 | |||
4587 | 608 | R2GC_235_150 = Coupling(name = 'R2GC_235_150', | ||
4588 | 609 | value = '-(G**2*ys)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4589 | 610 | order = {'QCD':2,'QED':1}) | ||
4590 | 611 | |||
4591 | 612 | R2GC_236_151 = Coupling(name = 'R2GC_236_151', | ||
4592 | 613 | value = '(CKM2x2*G**2*ys)/(3.*cmath.pi**2)', | ||
4593 | 614 | order = {'QCD':2,'QED':1}) | ||
4594 | 615 | |||
4595 | 616 | R2GC_237_152 = Coupling(name = 'R2GC_237_152', | ||
4596 | 617 | value = '-(G**2*gPd22*ys)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4597 | 618 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4598 | 619 | |||
4599 | 620 | R2GC_238_153 = Coupling(name = 'R2GC_238_153', | ||
4600 | 621 | value = '-(complex(0,1)*G**2*gSd22*ys)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4601 | 622 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4602 | 623 | |||
4603 | 624 | R2GC_239_154 = Coupling(name = 'R2GC_239_154', | ||
4604 | 625 | value = '-(ee*complex(0,1)*G**2*complexconjugate(CKM2x2))/(6.*cmath.pi**2*sw*cmath.sqrt(2))', | ||
4605 | 626 | order = {'QCD':2,'QED':1}) | ||
4606 | 627 | |||
4607 | 628 | R2GC_240_155 = Coupling(name = 'R2GC_240_155', | ||
4608 | 629 | value = '(G**2*yc*complexconjugate(CKM2x2))/(3.*cmath.pi**2)', | ||
4609 | 630 | order = {'QCD':2,'QED':1}) | ||
4610 | 631 | |||
4611 | 632 | R2GC_241_156 = Coupling(name = 'R2GC_241_156', | ||
4612 | 633 | value = '-(G**2*ys*complexconjugate(CKM2x2))/(3.*cmath.pi**2)', | ||
4613 | 634 | order = {'QCD':2,'QED':1}) | ||
4614 | 635 | |||
4615 | 636 | R2GC_245_157 = Coupling(name = 'R2GC_245_157', | ||
4616 | 637 | value = '(complex(0,1)*G**2*gAu33)/(6.*cmath.pi**2)', | ||
4617 | 638 | order = {'DMV':1,'QCD':2}) | ||
4618 | 639 | |||
4619 | 640 | R2GC_246_158 = Coupling(name = 'R2GC_246_158', | ||
4620 | 641 | value = '-(complex(0,1)*G**2*gVu33)/(6.*cmath.pi**2)', | ||
4621 | 642 | order = {'DMV':1,'QCD':2}) | ||
4622 | 643 | |||
4623 | 644 | R2GC_247_159 = Coupling(name = 'R2GC_247_159', | ||
4624 | 645 | value = '(complex(0,1)*G**2*MT)/(6.*cmath.pi**2)', | ||
4625 | 646 | order = {'QCD':2}) | ||
4626 | 647 | |||
4627 | 648 | R2GC_248_160 = Coupling(name = 'R2GC_248_160', | ||
4628 | 649 | value = '-(ee*complex(0,1)*G**2)/(6.*cmath.pi**2*sw*cmath.sqrt(2))', | ||
4629 | 650 | order = {'QCD':2,'QED':1}) | ||
4630 | 651 | |||
4631 | 652 | R2GC_251_161 = Coupling(name = 'R2GC_251_161', | ||
4632 | 653 | value = '(G**2*yb)/(3.*cmath.pi**2)', | ||
4633 | 654 | order = {'QCD':2,'QED':1}) | ||
4634 | 655 | |||
4635 | 656 | R2GC_252_162 = Coupling(name = 'R2GC_252_162', | ||
4636 | 657 | value = '-(G**2*yb)/(3.*cmath.pi**2)', | ||
4637 | 658 | order = {'QCD':2,'QED':1}) | ||
4638 | 659 | |||
4639 | 660 | R2GC_253_163 = Coupling(name = 'R2GC_253_163', | ||
4640 | 661 | value = '(G**2*yt)/(3.*cmath.pi**2)', | ||
4641 | 662 | order = {'QCD':2,'QED':1}) | ||
4642 | 663 | |||
4643 | 664 | R2GC_254_164 = Coupling(name = 'R2GC_254_164', | ||
4644 | 665 | value = '-(G**2*yt)/(3.*cmath.pi**2)', | ||
4645 | 666 | order = {'QCD':2,'QED':1}) | ||
4646 | 667 | |||
4647 | 668 | R2GC_255_165 = Coupling(name = 'R2GC_255_165', | ||
4648 | 669 | value = '(G**2*yt)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4649 | 670 | order = {'QCD':2,'QED':1}) | ||
4650 | 671 | |||
4651 | 672 | R2GC_256_166 = Coupling(name = 'R2GC_256_166', | ||
4652 | 673 | value = '(complex(0,1)*G**2*yt)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4653 | 674 | order = {'QCD':2,'QED':1}) | ||
4654 | 675 | |||
4655 | 676 | R2GC_257_167 = Coupling(name = 'R2GC_257_167', | ||
4656 | 677 | value = '-(G**2*gPu33*yt)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4657 | 678 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4658 | 679 | |||
4659 | 680 | R2GC_258_168 = Coupling(name = 'R2GC_258_168', | ||
4660 | 681 | value = '-(complex(0,1)*G**2*gSu33*yt)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4661 | 682 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4662 | 683 | |||
4663 | 684 | R2GC_260_169 = Coupling(name = 'R2GC_260_169', | ||
4664 | 685 | value = 'G**3/(24.*cmath.pi**2)', | ||
4665 | 686 | order = {'QCD':3}) | ||
4666 | 687 | |||
4667 | 688 | R2GC_260_170 = Coupling(name = 'R2GC_260_170', | ||
4668 | 689 | value = '(11*G**3)/(64.*cmath.pi**2)', | ||
4669 | 690 | order = {'QCD':3}) | ||
4670 | 691 | |||
4671 | 692 | R2GC_261_171 = Coupling(name = 'R2GC_261_171', | ||
4672 | 693 | value = '(31*complex(0,1)*G**4)/(64.*cmath.pi**2)', | ||
4673 | 694 | order = {'QCD':4}) | ||
4674 | 695 | |||
4675 | 696 | R2GC_262_172 = Coupling(name = 'R2GC_262_172', | ||
4676 | 697 | value = '(5*complex(0,1)*G**4)/(48.*cmath.pi**2)', | ||
4677 | 698 | order = {'QCD':4}) | ||
4678 | 699 | |||
4679 | 700 | R2GC_262_173 = Coupling(name = 'R2GC_262_173', | ||
4680 | 701 | value = '(19*complex(0,1)*G**4)/(32.*cmath.pi**2)', | ||
4681 | 702 | order = {'QCD':4}) | ||
4682 | 703 | |||
4683 | 704 | R2GC_263_174 = Coupling(name = 'R2GC_263_174', | ||
4684 | 705 | value = '(23*complex(0,1)*G**4)/(192.*cmath.pi**2)', | ||
4685 | 706 | order = {'QCD':4}) | ||
4686 | 707 | |||
4687 | 708 | R2GC_264_175 = Coupling(name = 'R2GC_264_175', | ||
4688 | 709 | value = '(7*complex(0,1)*G**4)/(64.*cmath.pi**2)', | ||
4689 | 710 | order = {'QCD':4}) | ||
4690 | 711 | |||
4691 | 712 | R2GC_265_176 = Coupling(name = 'R2GC_265_176', | ||
4692 | 713 | value = '(-17*complex(0,1)*G**4)/(64.*cmath.pi**2)', | ||
4693 | 714 | order = {'QCD':4}) | ||
4694 | 715 | |||
4695 | 716 | R2GC_266_177 = Coupling(name = 'R2GC_266_177', | ||
4696 | 717 | value = '(-7*complex(0,1)*G**4)/(32.*cmath.pi**2)', | ||
4697 | 718 | order = {'QCD':4}) | ||
4698 | 719 | |||
4699 | 720 | R2GC_270_178 = Coupling(name = 'R2GC_270_178', | ||
4700 | 721 | value = '(complex(0,1)*G**2*gAu11)/(6.*cmath.pi**2)', | ||
4701 | 722 | order = {'DMV':1,'QCD':2}) | ||
4702 | 723 | |||
4703 | 724 | R2GC_271_179 = Coupling(name = 'R2GC_271_179', | ||
4704 | 725 | value = '-(complex(0,1)*G**2*gVu11)/(6.*cmath.pi**2)', | ||
4705 | 726 | order = {'DMV':1,'QCD':2}) | ||
4706 | 727 | |||
4707 | 728 | R2GC_272_180 = Coupling(name = 'R2GC_272_180', | ||
4708 | 729 | value = '(complex(0,1)*G**2*MU)/(6.*cmath.pi**2)', | ||
4709 | 730 | order = {'QCD':2}) | ||
4710 | 731 | |||
4711 | 732 | R2GC_273_181 = Coupling(name = 'R2GC_273_181', | ||
4712 | 733 | value = '-(CKM1x1*ee*complex(0,1)*G**2)/(6.*cmath.pi**2*sw*cmath.sqrt(2))', | ||
4713 | 734 | order = {'QCD':2,'QED':1}) | ||
4714 | 735 | |||
4715 | 736 | R2GC_274_182 = Coupling(name = 'R2GC_274_182', | ||
4716 | 737 | value = '-(CKM1x2*ee*complex(0,1)*G**2)/(6.*cmath.pi**2*sw*cmath.sqrt(2))', | ||
4717 | 738 | order = {'QCD':2,'QED':1}) | ||
4718 | 739 | |||
4719 | 740 | R2GC_277_183 = Coupling(name = 'R2GC_277_183', | ||
4720 | 741 | value = '(CKM1x1*G**2*ydo)/(3.*cmath.pi**2)', | ||
4721 | 742 | order = {'QCD':2,'QED':1}) | ||
4722 | 743 | |||
4723 | 744 | R2GC_278_184 = Coupling(name = 'R2GC_278_184', | ||
4724 | 745 | value = '(CKM1x2*G**2*ys)/(3.*cmath.pi**2)', | ||
4725 | 746 | order = {'QCD':2,'QED':1}) | ||
4726 | 747 | |||
4727 | 748 | R2GC_279_185 = Coupling(name = 'R2GC_279_185', | ||
4728 | 749 | value = '(G**2*yup)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4729 | 750 | order = {'QCD':2,'QED':1}) | ||
4730 | 751 | |||
4731 | 752 | R2GC_280_186 = Coupling(name = 'R2GC_280_186', | ||
4732 | 753 | value = '(complex(0,1)*G**2*yup)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4733 | 754 | order = {'QCD':2,'QED':1}) | ||
4734 | 755 | |||
4735 | 756 | R2GC_281_187 = Coupling(name = 'R2GC_281_187', | ||
4736 | 757 | value = '-(CKM1x1*G**2*yup)/(3.*cmath.pi**2)', | ||
4737 | 758 | order = {'QCD':2,'QED':1}) | ||
4738 | 759 | |||
4739 | 760 | R2GC_282_188 = Coupling(name = 'R2GC_282_188', | ||
4740 | 761 | value = '-(CKM1x2*G**2*yup)/(3.*cmath.pi**2)', | ||
4741 | 762 | order = {'QCD':2,'QED':1}) | ||
4742 | 763 | |||
4743 | 764 | R2GC_283_189 = Coupling(name = 'R2GC_283_189', | ||
4744 | 765 | value = '-(G**2*gPu11*yup)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4745 | 766 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4746 | 767 | |||
4747 | 768 | R2GC_284_190 = Coupling(name = 'R2GC_284_190', | ||
4748 | 769 | value = '-(complex(0,1)*G**2*gSu11*yup)/(3.*cmath.pi**2*cmath.sqrt(2))', | ||
4749 | 770 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4750 | 771 | |||
4751 | 772 | R2GC_285_191 = Coupling(name = 'R2GC_285_191', | ||
4752 | 773 | value = '-(ee*complex(0,1)*G**2*complexconjugate(CKM1x1))/(6.*cmath.pi**2*sw*cmath.sqrt(2))', | ||
4753 | 774 | order = {'QCD':2,'QED':1}) | ||
4754 | 775 | |||
4755 | 776 | R2GC_286_192 = Coupling(name = 'R2GC_286_192', | ||
4756 | 777 | value = '-(G**2*ydo*complexconjugate(CKM1x1))/(3.*cmath.pi**2)', | ||
4757 | 778 | order = {'QCD':2,'QED':1}) | ||
4758 | 779 | |||
4759 | 780 | R2GC_287_193 = Coupling(name = 'R2GC_287_193', | ||
4760 | 781 | value = '(G**2*yup*complexconjugate(CKM1x1))/(3.*cmath.pi**2)', | ||
4761 | 782 | order = {'QCD':2,'QED':1}) | ||
4762 | 783 | |||
4763 | 784 | R2GC_288_194 = Coupling(name = 'R2GC_288_194', | ||
4764 | 785 | value = '-(ee*complex(0,1)*G**2*complexconjugate(CKM1x2))/(6.*cmath.pi**2*sw*cmath.sqrt(2))', | ||
4765 | 786 | order = {'QCD':2,'QED':1}) | ||
4766 | 787 | |||
4767 | 788 | R2GC_289_195 = Coupling(name = 'R2GC_289_195', | ||
4768 | 789 | value = '-(G**2*ys*complexconjugate(CKM1x2))/(3.*cmath.pi**2)', | ||
4769 | 790 | order = {'QCD':2,'QED':1}) | ||
4770 | 791 | |||
4771 | 792 | R2GC_290_196 = Coupling(name = 'R2GC_290_196', | ||
4772 | 793 | value = '(G**2*yup*complexconjugate(CKM1x2))/(3.*cmath.pi**2)', | ||
4773 | 794 | order = {'QCD':2,'QED':1}) | ||
4774 | 795 | |||
4775 | 796 | UVGC_160_1 = Coupling(name = 'UVGC_160_1', | ||
4776 | 797 | value = {-1:'(51*G**3)/(128.*cmath.pi**2)'}, | ||
4777 | 798 | order = {'QCD':3}) | ||
4778 | 799 | |||
4779 | 800 | UVGC_161_2 = Coupling(name = 'UVGC_161_2', | ||
4780 | 801 | value = {-1:'G**3/(128.*cmath.pi**2)'}, | ||
4781 | 802 | order = {'QCD':3}) | ||
4782 | 803 | |||
4783 | 804 | UVGC_162_3 = Coupling(name = 'UVGC_162_3', | ||
4784 | 805 | value = {-1:'(3*complex(0,1)*G**2)/(64.*cmath.pi**2)'}, | ||
4785 | 806 | order = {'QCD':2}) | ||
4786 | 807 | |||
4787 | 808 | UVGC_162_4 = Coupling(name = 'UVGC_162_4', | ||
4788 | 809 | value = {-1:'(-3*complex(0,1)*G**2)/(64.*cmath.pi**2)'}, | ||
4789 | 810 | order = {'QCD':2}) | ||
4790 | 811 | |||
4791 | 812 | UVGC_163_5 = Coupling(name = 'UVGC_163_5', | ||
4792 | 813 | value = {-1:'(3*G**4)/(512.*cmath.pi**2)'}, | ||
4793 | 814 | order = {'QCD':4}) | ||
4794 | 815 | |||
4795 | 816 | UVGC_163_6 = Coupling(name = 'UVGC_163_6', | ||
4796 | 817 | value = {-1:'(-3*G**4)/(512.*cmath.pi**2)'}, | ||
4797 | 818 | order = {'QCD':4}) | ||
4798 | 819 | |||
4799 | 820 | UVGC_164_7 = Coupling(name = 'UVGC_164_7', | ||
4800 | 821 | value = {-1:'(3*complex(0,1)*G**4)/(512.*cmath.pi**2)'}, | ||
4801 | 822 | order = {'QCD':4}) | ||
4802 | 823 | |||
4803 | 824 | UVGC_164_8 = Coupling(name = 'UVGC_164_8', | ||
4804 | 825 | value = {-1:'(-3*complex(0,1)*G**4)/(512.*cmath.pi**2)'}, | ||
4805 | 826 | order = {'QCD':4}) | ||
4806 | 827 | |||
4807 | 828 | UVGC_166_9 = Coupling(name = 'UVGC_166_9', | ||
4808 | 829 | value = {-1:'-(complex(0,1)*G**4)/(128.*cmath.pi**2)'}, | ||
4809 | 830 | order = {'QCD':4}) | ||
4810 | 831 | |||
4811 | 832 | UVGC_166_10 = Coupling(name = 'UVGC_166_10', | ||
4812 | 833 | value = {-1:'(complex(0,1)*G**4)/(128.*cmath.pi**2)'}, | ||
4813 | 834 | order = {'QCD':4}) | ||
4814 | 835 | |||
4815 | 836 | UVGC_167_11 = Coupling(name = 'UVGC_167_11', | ||
4816 | 837 | value = {-1:'(-3*complex(0,1)*G**4)/(256.*cmath.pi**2)'}, | ||
4817 | 838 | order = {'QCD':4}) | ||
4818 | 839 | |||
4819 | 840 | UVGC_167_12 = Coupling(name = 'UVGC_167_12', | ||
4820 | 841 | value = {-1:'(3*complex(0,1)*G**4)/(256.*cmath.pi**2)'}, | ||
4821 | 842 | order = {'QCD':4}) | ||
4822 | 843 | |||
4823 | 844 | UVGC_168_13 = Coupling(name = 'UVGC_168_13', | ||
4824 | 845 | value = {-1:'-(complex(0,1)*G**4)/(24.*cmath.pi**2)'}, | ||
4825 | 846 | order = {'QCD':4}) | ||
4826 | 847 | |||
4827 | 848 | UVGC_168_14 = Coupling(name = 'UVGC_168_14', | ||
4828 | 849 | value = {-1:'(47*complex(0,1)*G**4)/(128.*cmath.pi**2)'}, | ||
4829 | 850 | order = {'QCD':4}) | ||
4830 | 851 | |||
4831 | 852 | UVGC_169_15 = Coupling(name = 'UVGC_169_15', | ||
4832 | 853 | value = {-1:'(-253*complex(0,1)*G**4)/(512.*cmath.pi**2)'}, | ||
4833 | 854 | order = {'QCD':4}) | ||
4834 | 855 | |||
4835 | 856 | UVGC_169_16 = Coupling(name = 'UVGC_169_16', | ||
4836 | 857 | value = {-1:'(5*complex(0,1)*G**4)/(512.*cmath.pi**2)'}, | ||
4837 | 858 | order = {'QCD':4}) | ||
4838 | 859 | |||
4839 | 860 | UVGC_170_17 = Coupling(name = 'UVGC_170_17', | ||
4840 | 861 | value = {-1:'(ee*complex(0,1)*G**2)/(36.*cmath.pi**2)'}, | ||
4841 | 862 | order = {'QCD':2,'QED':1}) | ||
4842 | 863 | |||
4843 | 864 | UVGC_171_18 = Coupling(name = 'UVGC_171_18', | ||
4844 | 865 | value = {-1:'(-13*complex(0,1)*G**3)/(48.*cmath.pi**2)'}, | ||
4845 | 866 | order = {'QCD':3}) | ||
4846 | 867 | |||
4847 | 868 | UVGC_172_19 = Coupling(name = 'UVGC_172_19', | ||
4848 | 869 | value = {-1:'-(ee*complex(0,1)*G**2)/(18.*cmath.pi**2)'}, | ||
4849 | 870 | order = {'QCD':2,'QED':1}) | ||
4850 | 871 | |||
4851 | 872 | UVGC_182_20 = Coupling(name = 'UVGC_182_20', | ||
4852 | 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)'}, | ||
4853 | 874 | order = {'QCD':2}) | ||
4854 | 875 | |||
4855 | 876 | UVGC_183_21 = Coupling(name = 'UVGC_183_21', | ||
4856 | 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)'}, | ||
4857 | 878 | order = {'QCD':2,'QED':1}) | ||
4858 | 879 | |||
4859 | 880 | UVGC_184_22 = Coupling(name = 'UVGC_184_22', | ||
4860 | 881 | value = {-1:'( 0 if MB else (complex(0,1)*G**3)/(48.*cmath.pi**2) )'}, | ||
4861 | 882 | order = {'QCD':3}) | ||
4862 | 883 | |||
4863 | 884 | UVGC_184_23 = Coupling(name = 'UVGC_184_23', | ||
4864 | 885 | value = {-1:'( 0 if MC else (complex(0,1)*G**3)/(48.*cmath.pi**2) )'}, | ||
4865 | 886 | order = {'QCD':3}) | ||
4866 | 887 | |||
4867 | 888 | UVGC_184_24 = Coupling(name = 'UVGC_184_24', | ||
4868 | 889 | value = {-1:'( 0 if MD else (complex(0,1)*G**3)/(48.*cmath.pi**2) )'}, | ||
4869 | 890 | order = {'QCD':3}) | ||
4870 | 891 | |||
4871 | 892 | UVGC_184_25 = Coupling(name = 'UVGC_184_25', | ||
4872 | 893 | value = {-1:'(-19*complex(0,1)*G**3)/(128.*cmath.pi**2)'}, | ||
4873 | 894 | order = {'QCD':3}) | ||
4874 | 895 | |||
4875 | 896 | UVGC_184_26 = Coupling(name = 'UVGC_184_26', | ||
4876 | 897 | value = {-1:'-(complex(0,1)*G**3)/(128.*cmath.pi**2)'}, | ||
4877 | 898 | order = {'QCD':3}) | ||
4878 | 899 | |||
4879 | 900 | UVGC_184_27 = Coupling(name = 'UVGC_184_27', | ||
4880 | 901 | value = {-1:'( 0 if MS else (complex(0,1)*G**3)/(48.*cmath.pi**2) )'}, | ||
4881 | 902 | order = {'QCD':3}) | ||
4882 | 903 | |||
4883 | 904 | UVGC_184_28 = Coupling(name = 'UVGC_184_28', | ||
4884 | 905 | value = {-1:'( 0 if MT else (complex(0,1)*G**3)/(48.*cmath.pi**2) )'}, | ||
4885 | 906 | order = {'QCD':3}) | ||
4886 | 907 | |||
4887 | 908 | UVGC_184_29 = Coupling(name = 'UVGC_184_29', | ||
4888 | 909 | value = {-1:'( 0 if MU else (complex(0,1)*G**3)/(48.*cmath.pi**2) )'}, | ||
4889 | 910 | order = {'QCD':3}) | ||
4890 | 911 | |||
4891 | 912 | UVGC_184_30 = Coupling(name = 'UVGC_184_30', | ||
4892 | 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)'}, | ||
4893 | 914 | order = {'QCD':3}) | ||
4894 | 915 | |||
4895 | 916 | UVGC_185_31 = Coupling(name = 'UVGC_185_31', | ||
4896 | 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)'}, | ||
4897 | 918 | order = {'DMV':1,'QCD':2}) | ||
4898 | 919 | |||
4899 | 920 | UVGC_186_32 = Coupling(name = 'UVGC_186_32', | ||
4900 | 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)'}, | ||
4901 | 922 | order = {'DMV':1,'QCD':2}) | ||
4902 | 923 | |||
4903 | 924 | UVGC_187_33 = Coupling(name = 'UVGC_187_33', | ||
4904 | 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)'}, | ||
4905 | 926 | order = {'QCD':2}) | ||
4906 | 927 | |||
4907 | 928 | UVGC_188_34 = Coupling(name = 'UVGC_188_34', | ||
4908 | 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)'}, | ||
4909 | 930 | order = {'QCD':2,'QED':1}) | ||
4910 | 931 | |||
4911 | 932 | UVGC_189_35 = Coupling(name = 'UVGC_189_35', | ||
4912 | 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)'}, | ||
4913 | 934 | order = {'QCD':2,'QED':1}) | ||
4914 | 935 | |||
4915 | 936 | UVGC_190_36 = Coupling(name = 'UVGC_190_36', | ||
4916 | 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))'}, | ||
4917 | 938 | order = {'QCD':2,'QED':1}) | ||
4918 | 939 | |||
4919 | 940 | UVGC_191_37 = Coupling(name = 'UVGC_191_37', | ||
4920 | 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))'}, | ||
4921 | 942 | order = {'QCD':2,'QED':1}) | ||
4922 | 943 | |||
4923 | 944 | UVGC_192_38 = Coupling(name = 'UVGC_192_38', | ||
4924 | 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))'}, | ||
4925 | 946 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4926 | 947 | |||
4927 | 948 | UVGC_193_39 = Coupling(name = 'UVGC_193_39', | ||
4928 | 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))'}, | ||
4929 | 950 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4930 | 951 | |||
4931 | 952 | UVGC_194_40 = Coupling(name = 'UVGC_194_40', | ||
4932 | 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)'}, | ||
4933 | 954 | order = {'QCD':2}) | ||
4934 | 955 | |||
4935 | 956 | UVGC_195_41 = Coupling(name = 'UVGC_195_41', | ||
4936 | 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)'}, | ||
4937 | 958 | order = {'QCD':2,'QED':1}) | ||
4938 | 959 | |||
4939 | 960 | UVGC_196_42 = Coupling(name = 'UVGC_196_42', | ||
4940 | 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)'}, | ||
4941 | 962 | order = {'QCD':3}) | ||
4942 | 963 | |||
4943 | 964 | UVGC_197_43 = Coupling(name = 'UVGC_197_43', | ||
4944 | 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)'}, | ||
4945 | 966 | order = {'DMV':1,'QCD':2}) | ||
4946 | 967 | |||
4947 | 968 | UVGC_198_44 = Coupling(name = 'UVGC_198_44', | ||
4948 | 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)'}, | ||
4949 | 970 | order = {'DMV':1,'QCD':2}) | ||
4950 | 971 | |||
4951 | 972 | UVGC_199_45 = Coupling(name = 'UVGC_199_45', | ||
4952 | 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)'}, | ||
4953 | 974 | order = {'QCD':2}) | ||
4954 | 975 | |||
4955 | 976 | UVGC_200_46 = Coupling(name = 'UVGC_200_46', | ||
4956 | 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)'}, | ||
4957 | 978 | order = {'QCD':2,'QED':1}) | ||
4958 | 979 | |||
4959 | 980 | UVGC_201_47 = Coupling(name = 'UVGC_201_47', | ||
4960 | 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)'}, | ||
4961 | 982 | order = {'QCD':2,'QED':1}) | ||
4962 | 983 | |||
4963 | 984 | UVGC_202_48 = Coupling(name = 'UVGC_202_48', | ||
4964 | 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))'}, | ||
4965 | 986 | order = {'QCD':2,'QED':1}) | ||
4966 | 987 | |||
4967 | 988 | UVGC_203_49 = Coupling(name = 'UVGC_203_49', | ||
4968 | 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))'}, | ||
4969 | 990 | order = {'QCD':2,'QED':1}) | ||
4970 | 991 | |||
4971 | 992 | UVGC_204_50 = Coupling(name = 'UVGC_204_50', | ||
4972 | 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))'}, | ||
4973 | 994 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4974 | 995 | |||
4975 | 996 | UVGC_205_51 = Coupling(name = 'UVGC_205_51', | ||
4976 | 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))'}, | ||
4977 | 998 | order = {'DMS':1,'QCD':2,'QED':1}) | ||
4978 | 999 | |||
4979 | 1000 | UVGC_206_52 = Coupling(name = 'UVGC_206_52', | ||
4980 | 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)'}, | ||
4981 | 1002 | order = {'QCD':2}) | ||
4982 | 1003 | |||
4983 | 1004 | UVGC_207_53 = Coupling(name = 'UVGC_207_53', | ||
4984 | 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)'}, | ||
4985 | 1006 | order = {'QCD':2,'QED':1}) | ||
4986 | 1007 | |||
4987 | 1008 | UVGC_208_54 = Coupling(name = 'UVGC_208_54', | ||
4988 | 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)'}, | ||
4989 | 1010 | order = {'QCD':3}) | ||
4990 | 1011 | |||
4991 | 1012 | UVGC_209_55 = Coupling(name = 'UVGC_209_55', | ||
4992 | 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)'}, | ||
4993 | 1014 | order = {'DMV':1,'QCD':2}) | ||
4994 | 1015 | |||
4995 | 1016 | UVGC_210_56 = Coupling(name = 'UVGC_210_56', | ||
4996 | 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)'}, | ||
4997 | 1018 | order = {'DMV':1,'QCD':2}) | ||
4998 | 1019 | |||
4999 | 1020 | UVGC_211_57 = Coupling(name = 'UVGC_211_57', | ||
5000 | 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)'}, |
Hi Olivier,
Should we also release 3.0.1 together with this?
Cheers,
Rik