Merge lp:~maddevelopers/mg5amcnlo/3.0.4-qcdonly into lp:~maddevelopers/mg5amcnlo/3.0.4
- 3.0.4-qcdonly
- Merge into 3.0.4
Proposed by
Olivier Mattelaer
Status: | Merged |
---|---|
Merged at revision: | 996 |
Proposed branch: | lp:~maddevelopers/mg5amcnlo/3.0.4-qcdonly |
Merge into: | lp:~maddevelopers/mg5amcnlo/3.0.4 |
Diff against target: |
490 lines (+165/-46) 10 files modified
Template/NLO/Cards/FKS_params.dat (+1/-1) madgraph/fks/fks_base.py (+29/-4) madgraph/fks/fks_common.py (+8/-5) madgraph/interface/amcatnlo_interface.py (+94/-22) madgraph/interface/common_run_interface.py (+9/-3) madgraph/interface/madgraph_interface.py (+11/-4) madgraph/interface/master_interface.py (+4/-4) madgraph/iolibs/export_fks.py (+2/-0) madgraph/iolibs/export_v4.py (+5/-2) madgraph/various/banner.py (+2/-1) |
To merge this branch: | bzr merge lp:~maddevelopers/mg5amcnlo/3.0.4-qcdonly |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
marco zaro | Approve | ||
Review via email: mp+399657@code.launchpad.net |
Commit message
add an option
set mixed_coupling_
to go back to v2 mode of generation of loop/CT.
However the new v3 phase-space is very very slow and that is handle...
Description of the change
To post a comment you must log in.
- 996. By marco zaro
-
fix for bug https:/
/bugs.launchpad .net/mg5amcnlo/ +bug/1918942
The problem was that the coupling hierarchy was hardcoded to be 1 for QCD and 2 for QED,
while this is not the case in general - 997. By olivier-mattelaer
-
reset NHelForMCoverHels to official default + avoid forcing widht to 0 in pure QCD case
- 998. By olivier-mattelaer
-
merge with latest 3.0.4 (including 2.9.3)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Template/NLO/Cards/FKS_params.dat' |
2 | --- Template/NLO/Cards/FKS_params.dat 2020-05-13 10:13:31 +0000 |
3 | +++ Template/NLO/Cards/FKS_params.dat 2021-03-24 10:22:46 +0000 |
4 | @@ -136,7 +136,7 @@ |
5 | ! this to '-1' if you want to forbid the use of this method |
6 | ! altogether. |
7 | #NHelForMCoverHels |
8 | --1 |
9 | +4 |
10 | ! Default :: 4 |
11 | ! |
12 | ! This parameter sets for which fraction of the events the virtual |
13 | |
14 | === modified file 'madgraph/fks/fks_base.py' |
15 | --- madgraph/fks/fks_base.py 2021-02-26 15:58:51 +0000 |
16 | +++ madgraph/fks/fks_base.py 2021-03-24 10:22:46 +0000 |
17 | @@ -45,13 +45,14 @@ |
18 | """A multi process class that contains informations on the born processes |
19 | and the reals. |
20 | """ |
21 | - |
22 | + |
23 | def default_setup(self): |
24 | """Default values for all properties""" |
25 | super(FKSMultiProcess, self).default_setup() |
26 | self['real_amplitudes'] = diagram_generation.AmplitudeList() |
27 | self['pdgs'] = [] |
28 | self['born_processes'] = FKSProcessList() |
29 | + |
30 | if not 'OLP' in list(self.keys()): |
31 | self['OLP'] = 'MadLoop' |
32 | self['ncores_for_proc_gen'] = 0 |
33 | @@ -122,6 +123,13 @@ |
34 | Real amplitudes are stored in real_amplitudes according on the pdgs of their |
35 | legs (stored in pdgs, so that they need to be generated only once and then reicycled |
36 | """ |
37 | + |
38 | + |
39 | + if 'nlo_mixed_expansion' in options: |
40 | + self['nlo_mixed_expansion'] = options['nlo_mixed_expansion'] |
41 | + del options['nlo_mixed_expansion'] |
42 | + |
43 | + |
44 | #swhich the other loggers off |
45 | loggers_off = [logging.getLogger('madgraph.diagram_generation'), |
46 | logging.getLogger('madgraph.loop_diagram_generation')] |
47 | @@ -241,7 +249,7 @@ |
48 | for real in born.real_amps: |
49 | real.find_fks_j_from_i(born_pdg_list) |
50 | if amps: |
51 | - if self['process_definitions'][0].get('NLO_mode') == 'all': |
52 | + if self['process_definitions'][0].get('NLO_mode') in ['all']: |
53 | self.generate_virtuals() |
54 | |
55 | elif not self['process_definitions'][0].get('NLO_mode') in ['all', 'real','LOonly']: |
56 | @@ -316,15 +324,31 @@ |
57 | '%s at the output stage only.'%self['OLP']) |
58 | return |
59 | |
60 | + if not self['nlo_mixed_expansion']: |
61 | + # determine the orders to be used to generate the loop |
62 | + loop_orders = {} |
63 | + for born in self['born_processes']: |
64 | + for coup, val in fks_common.find_orders(born.born_amp).items(): |
65 | + try: |
66 | + loop_orders[coup] = max([loop_orders[coup], val]) |
67 | + except KeyError: |
68 | + loop_orders[coup] = val |
69 | + |
70 | + |
71 | for i, born in enumerate(self['born_processes']): |
72 | myproc = copy.copy(born.born_amp['process']) |
73 | + #misc.sprint(born.born_proc) |
74 | + #misc.sprint(myproc.input_string()) |
75 | + #misc.sprint(myproc['orders']) |
76 | # if [orders] are not specified, then |
77 | # include all particles in the loops |
78 | # i.e. allow all orders to be perturbed |
79 | # (this is the case for EW corrections, where only squared oders |
80 | # are imposed) |
81 | - if not myproc['orders']: |
82 | - myproc['perturbation_couplings'] = myproc['model']['coupling_orders'] |
83 | + if not self['nlo_mixed_expansion']: |
84 | + myproc['orders'] = loop_orders |
85 | + elif not myproc['orders']: |
86 | + myproc['perturbation_couplings'] = myproc['model']['coupling_orders'] |
87 | # take the orders that are actually used bu the matrix element |
88 | myproc['legs'] = fks_common.to_legs(copy.copy(myproc['legs'])) |
89 | logger.info('Generating virtual matrix element with MadLoop for process%s (%d / %d)' \ |
90 | @@ -335,6 +359,7 @@ |
91 | myamp = loop_diagram_generation.LoopAmplitude(myproc) |
92 | born.virt_amp = myamp |
93 | except InvalidCmd: |
94 | + logger.debug('invalid command for loop') |
95 | pass |
96 | |
97 | |
98 | |
99 | === modified file 'madgraph/fks/fks_common.py' |
100 | --- madgraph/fks/fks_common.py 2020-03-27 19:40:16 +0000 |
101 | +++ madgraph/fks/fks_common.py 2021-03-24 10:22:46 +0000 |
102 | @@ -52,14 +52,17 @@ |
103 | return [((leg.get('id'), leg.get('number')), leg.get('number'))] |
104 | |
105 | |
106 | -def get_qed_qcd_orders_from_weighted(nexternal, weighted): |
107 | +def get_qed_qcd_orders_from_weighted(nexternal, hierarchy, weighted): |
108 | """computes the QED/QCD orders from the knowledge of the n of ext particles |
109 | and of the weighted orders""" |
110 | + qed_w = hierarchy['QED'] |
111 | + qcd_w = hierarchy['QCD'] |
112 | # n vertices = nexternal - 2 =QED + QCD |
113 | - # weighted = 2*QED + QCD |
114 | - QED = weighted - nexternal + 2 |
115 | - QCD = weighted - 2 * QED |
116 | - return QED, QCD |
117 | + # weighted = qed_w*QED + qcd_w*QCD |
118 | + |
119 | + QED = (weighted - qcd_w * (nexternal - 2) ) / (qed_w - qcd_w) |
120 | + QCD = (weighted - qed_w * QED) / qcd_w |
121 | + return int(QED), int(QCD) |
122 | |
123 | |
124 | def link_rb_configs(born_amp, real_amp, i, j, ij): |
125 | |
126 | === modified file 'madgraph/interface/amcatnlo_interface.py' |
127 | --- madgraph/interface/amcatnlo_interface.py 2021-03-24 08:33:08 +0000 |
128 | +++ madgraph/interface/amcatnlo_interface.py 2021-03-24 10:22:46 +0000 |
129 | @@ -328,6 +328,7 @@ |
130 | 'real_processes', 'born_processes', 'virt_processes'] |
131 | |
132 | _nlo_modes_for_completion = ['all','real'] |
133 | + display_expansion = False |
134 | |
135 | def __init__(self, mgme_dir = '', *completekey, **stdin): |
136 | """ Special init tasks for the Loop Interface """ |
137 | @@ -457,6 +458,26 @@ |
138 | run_interface.check_compiler(self.options, block=False) |
139 | #validate_model will reset self._generate_info; to avoid |
140 | #this store it |
141 | + |
142 | + if not aMCatNLOInterface.display_expansion: |
143 | + if proc_type[2] != ['QCD'] and proc_type[1] == 'all': |
144 | + aMCatNLOInterface.display_expansion = True |
145 | + if 'QED' in proc_type[2]: |
146 | + logger.info( |
147 | +"""------------------------------------------------------------------------ |
148 | +This computation involves NLO EW corrections. |
149 | +Please also cite ref. 'arXiv:1804.10017' when using results from this code. |
150 | +------------------------------------------------------------------------ |
151 | +""", '$MG:BOLD') |
152 | + else: |
153 | + logger.info( |
154 | +"""------------------------------------------------------------------------ |
155 | +This computation involve not SM-QCD corrections at NLO. |
156 | +Please also cite ref. 'arXiv:1804.10017' when using results from this code. |
157 | +------------------------------------------------------------------------ |
158 | +""", '$MG:BOLD') |
159 | + |
160 | + |
161 | geninfo = self._generate_info |
162 | self.validate_model(proc_type[1], coupling_type=proc_type[2]) |
163 | self._generate_info = geninfo |
164 | @@ -477,13 +498,13 @@ |
165 | # set the orders |
166 | # if some orders have been set by the user, |
167 | # check that all the orders of the model have been specified |
168 | - # set to zero those which have not been specified and warn the user |
169 | + # set to default those which have not been specified and warn the user |
170 | if myprocdef['orders'] and not all([o in list(myprocdef['orders'].keys()) for o in myprocdef['model'].get_coupling_orders()]): |
171 | for o in myprocdef['model'].get_coupling_orders(): |
172 | if o not in list(myprocdef['orders'].keys()): |
173 | - myprocdef['orders'][o] = 0 |
174 | - logger.warning(('%s order is missing in the process definition. It will be set to 0.\n' + \ |
175 | - 'If this is not what you need, please regenerate with the correct orders.') % o) |
176 | + myprocdef['orders'][o] = self.options['default_unset_couplings'] |
177 | + logger.warning(('%s order is missing in the process definition. It will be set to "default unser couplings": %s\n' + \ |
178 | + 'If this is not what you need, please regenerate with the correct orders.') % (o,myprocdef['orders'][o])) |
179 | |
180 | # this is in case no orders have been passed |
181 | if not myprocdef['squared_orders'] and not myprocdef['orders']: |
182 | @@ -495,23 +516,43 @@ |
183 | 'Please specify them from the command line.') |
184 | |
185 | # this is a very rough attempt, and works only to guess QED/QCD |
186 | - qed, qcd = fks_common.get_qed_qcd_orders_from_weighted(len(myprocdef['legs']), weighted['WEIGHTED']) |
187 | + qed, qcd = fks_common.get_qed_qcd_orders_from_weighted(len(myprocdef['legs']), |
188 | + self._curr_model.get('order_hierarchy'), |
189 | + weighted['WEIGHTED']) |
190 | + |
191 | if qed < 0 or qcd < 0: |
192 | raise MadGraph5Error('\nAutomatic process-order determination lead to negative constraints:\n' + \ |
193 | ('QED: %d, QCD: %d\n' % (qed, qcd)) + \ |
194 | 'Please specify the coupling orders from the command line.') |
195 | - orders = {'QED': 2*qed, 'QCD': 2*qcd} |
196 | - # set all the other coupling to zero |
197 | - for o in myprocdef['model'].get_coupling_orders(): |
198 | - if o not in ['QED', 'QCD']: |
199 | - orders[o] = 0 |
200 | - |
201 | - myprocdef.set('squared_orders', orders) |
202 | - # warn the user of what happened |
203 | - logger.info(('Setting the born squared orders automatically in the process definition to %s.\n' + \ |
204 | - 'If this is not what you need, please regenerate with the correct orders.'), |
205 | - ' '.join(['%s<=%s' %(k,v) if v else '%s=%s' % (k,v) for k,v in myprocdef['squared_orders'].items()]), |
206 | - '$MG:BOLD') |
207 | + if self.options['nlo_mixed_expansion']: |
208 | + orders = {'QED': 2*qed, 'QCD': 2*qcd} |
209 | + # set all the other coupling to zero |
210 | + for o in myprocdef['model'].get_coupling_orders(): |
211 | + if o not in ['QED', 'QCD']: |
212 | + orders[o] = 0 |
213 | + |
214 | + myprocdef.set('squared_orders', orders) |
215 | + # warn the user of what happened |
216 | + logger.info(('Setting the born squared orders automatically in the process definition to %s.\n' + \ |
217 | + 'If this is not what you need, please regenerate with the correct orders.'), |
218 | + ' '.join(['%s^2<=%s' %(k,v) if v else '%s=%s' % (k,v) for k,v in myprocdef['squared_orders'].items()]), |
219 | + '$MG:BOLD') |
220 | + else: |
221 | + orders = {'QED': qed, 'QCD': qcd} |
222 | + sqorders = {'QED': 2*qed, 'QCD': 2*qcd} |
223 | + # set all the other coupling to zero |
224 | + for o in myprocdef['model'].get_coupling_orders(): |
225 | + if o not in ['QED', 'QCD']: |
226 | + orders[o] = 0 |
227 | + sqorders[o] = 0 |
228 | + |
229 | + myprocdef.set('orders', orders) |
230 | + myprocdef.set('squared_orders', sqorders) |
231 | + # warn the user of what happened |
232 | + logger.info(('Setting the born orders automatically in the process definition to %s.\n' + \ |
233 | + 'If this is not what you need, please regenerate with the correct orders.'), |
234 | + ' '.join(['%s<=%s' %(k,v) if v else '%s=%s' % (k,v) for k,v in myprocdef['orders'].items()]), |
235 | + '$MG:BOLD') |
236 | |
237 | # now check that all couplings that are there in orders also appear |
238 | # in squared_orders. If not, set the corresponding one |
239 | @@ -530,6 +571,7 @@ |
240 | myprocdef['born_sq_orders'] = copy.copy(myprocdef['squared_orders']) |
241 | # split all orders in the model, for the moment it's the simplest solution |
242 | # mz02/2014 |
243 | + #if proc_type[1] != 'only': |
244 | myprocdef['split_orders'] += [o for o in myprocdef['model'].get('coupling_orders') \ |
245 | if o not in myprocdef['split_orders']] |
246 | |
247 | @@ -541,10 +583,15 @@ |
248 | |
249 | # then increase the orders which are perturbed |
250 | for pert in myprocdef['perturbation_couplings']: |
251 | + |
252 | + if not self.options['nlo_mixed_expansion'] and pert not in proc_type[2]: |
253 | + continue |
254 | + |
255 | + |
256 | # if orders have been specified increase them |
257 | if list(myprocdef['orders'].keys()) != ['WEIGHTED']: |
258 | try: |
259 | - myprocdef['orders'][pert] += 2 |
260 | + myprocdef['orders'][pert] += 1 |
261 | except KeyError: |
262 | # if the order is not specified |
263 | # then MG does not put any bound on it |
264 | @@ -572,7 +619,7 @@ |
265 | # This is necessary because when doing EW corrections one only specifies |
266 | # squared-orders constraints. In that case, all kind of splittings/loop-particles |
267 | # must be included |
268 | - if not myprocdef['orders']: |
269 | + if not myprocdef['orders'] and self.options['nlo_mixed_expansion']: |
270 | myprocdef['perturbation_couplings'] = list(myprocdef['model']['coupling_orders']) |
271 | |
272 | self._curr_proc_defs.append(myprocdef) |
273 | @@ -595,11 +642,36 @@ |
274 | fks_options = {'OLP': self.options['OLP'], |
275 | 'ignore_six_quark_processes': self.options['ignore_six_quark_processes'], |
276 | 'init_lep_split': self.options['include_lepton_initiated_processes'], |
277 | - 'ncores_for_proc_gen': self.ncores_for_proc_gen} |
278 | + 'ncores_for_proc_gen': self.ncores_for_proc_gen, |
279 | + 'nlo_mixed_expansion': self.options['nlo_mixed_expansion']} |
280 | + |
281 | + fksproc =fks_base.FKSMultiProcess(myprocdef,fks_options) |
282 | try: |
283 | - self._fks_multi_proc.add(fks_base.FKSMultiProcess(myprocdef,fks_options)) |
284 | + self._fks_multi_proc.add(fksproc) |
285 | except AttributeError: |
286 | - self._fks_multi_proc = fks_base.FKSMultiProcess(myprocdef,fks_options) |
287 | + self._fks_multi_proc = fksproc |
288 | + |
289 | + if not aMCatNLOInterface.display_expansion and self.options['nlo_mixed_expansion']: |
290 | + base = {} |
291 | + for amp in self._fks_multi_proc.get_born_amplitudes(): |
292 | + nb_part = len(amp['process']['legs']) |
293 | + for diag in amp['diagrams']: |
294 | + if nb_part not in base: |
295 | + base[nb_part] = diag.get('orders') |
296 | + elif base[nb_part] != diag.get('orders'): |
297 | + aMCatNLOInterface.display_expansion = True |
298 | + logger.info( |
299 | +"""------------------------------------------------------------------------ |
300 | +This computation can involve not only purely SM-QCD corrections at NLO. |
301 | +Please also cite ref. 'arXiv:1804.10017' when using results from this code. |
302 | +------------------------------------------------------------------------ |
303 | +""", '$MG:BOLD') |
304 | + break |
305 | + else: |
306 | + continue |
307 | + break |
308 | + |
309 | + |
310 | |
311 | |
312 | def do_output(self, line): |
313 | |
314 | === modified file 'madgraph/interface/common_run_interface.py' |
315 | --- madgraph/interface/common_run_interface.py 2021-03-24 08:33:08 +0000 |
316 | +++ madgraph/interface/common_run_interface.py 2021-03-24 10:22:46 +0000 |
317 | @@ -940,9 +940,15 @@ |
318 | #raise Exception, "%s %s %s" % (sys.path, os.path.exists(pjoin(self.me_dir,'bin','internal', 'ufomodel')), os.listdir(pjoin(self.me_dir,'bin','internal', 'ufomodel'))) |
319 | import ufomodel as ufomodel |
320 | zero = ufomodel.parameters.ZERO |
321 | - no_width = [p for p in ufomodel.all_particles |
322 | - if (str(p.pdg_code) in pids or str(-p.pdg_code) in pids) |
323 | - and p.width != zero] |
324 | + if self.proc_characteristics['nlo_mixed_expansion']: |
325 | + no_width = [p for p in ufomodel.all_particles |
326 | + if (str(p.pdg_code) in pids or str(-p.pdg_code) in pids) |
327 | + and p.width != zero] |
328 | + else: |
329 | + no_width = [p for p in ufomodel.all_particles |
330 | + if (str(p.pdg_code) in pids or str(-p.pdg_code) in pids) |
331 | + and p.width != zero and p.color!=1] |
332 | + |
333 | done = [] |
334 | for part in no_width: |
335 | if abs(part.pdg_code) in done: |
336 | |
337 | === modified file 'madgraph/interface/madgraph_interface.py' |
338 | --- madgraph/interface/madgraph_interface.py 2021-03-24 08:33:08 +0000 |
339 | +++ madgraph/interface/madgraph_interface.py 2021-03-24 10:22:46 +0000 |
340 | @@ -820,7 +820,10 @@ |
341 | logger.info(" > (default: True) [Used ONLY for tree-level output with madevent]") |
342 | logger.info(" > set the width to zero for all T-channel propagator --no impact on complex-mass scheme mode") |
343 | logger.info("auto_convert_model <value>",'$MG:color:GREEN') |
344 | - logger.info(" > (default: False) If set on True any python2 UFO model will be automatically converted to pyton3 format") |
345 | + logger.info(" > (default: False) If set on True any python2 UFO model will be automatically converted to pyton3 format") |
346 | + logger.info("nlo_mixed_expansion <value>",'$MG:color:GREEN') |
347 | + logger.info("deactivates mixed expansion support at NLO, goes back to MG5aMCv2 behavior") |
348 | + |
349 | #=============================================================================== |
350 | # CheckValidForCmd |
351 | #=============================================================================== |
352 | @@ -1531,7 +1534,7 @@ |
353 | if not args[1].isdigit(): |
354 | raise self.InvalidCmd('%s values should be a integer' % args[0]) |
355 | |
356 | - if args[0] in ['loop_optimized_output', 'loop_color_flows', 'low_mem_multicore_nlo_generation']: |
357 | + if args[0] in ['loop_optimized_output', 'loop_color_flows', 'low_mem_multicore_nlo_generation', 'nlo_mixed_expansion']: |
358 | try: |
359 | args[1] = banner_module.ConfigFile.format_variable(args[1], bool, args[0]) |
360 | except Exception: |
361 | @@ -2583,7 +2586,7 @@ |
362 | if args[1] in ['group_subprocesses', 'complex_mass_scheme',\ |
363 | 'loop_optimized_output', 'loop_color_flows',\ |
364 | 'include_lepton_initiated_processes',\ |
365 | - 'low_mem_multicore_nlo_generation']: |
366 | + 'low_mem_multicore_nlo_generation', 'nlo_mixed_expansion']: |
367 | return self.list_completion(text, ['False', 'True', 'default']) |
368 | elif args[1] in ['ignore_six_quark_processes']: |
369 | return self.list_completion(text, list(self._multiparticles.keys())) |
370 | @@ -2921,8 +2924,9 @@ |
371 | 'max_t_for_channel', |
372 | 'zerowidth_tchannel', |
373 | 'default_unset_couplings', |
374 | + 'nlo_mixed_expansion' |
375 | ] |
376 | - _valid_nlo_modes = ['all','real','virt','sqrvirt','tree','noborn','LOonly'] |
377 | + _valid_nlo_modes = ['all','real','virt','sqrvirt','tree','noborn','LOonly', 'only'] |
378 | _valid_sqso_types = ['==','<=','=','>'] |
379 | _valid_amp_so_types = ['=','<=', '==', '>'] |
380 | _OLP_supported = ['MadLoop', 'GoSam'] |
381 | @@ -2989,6 +2993,7 @@ |
382 | 'default_unset_couplings': 99, # 99 means infinity |
383 | 'max_t_for_channel': 99, # means no restrictions |
384 | 'zerowidth_tchannel': True, |
385 | + 'nlo_mixed_expansion':True, |
386 | } |
387 | |
388 | options_madevent = {'automatic_html_opening':True, |
389 | @@ -7768,6 +7773,8 @@ |
390 | logger.warning("Turning off option 'loop_color_flows'"+\ |
391 | " since it is not available for non-optimized loop output.") |
392 | self.do_set('loop_color_flows False',log=False) |
393 | + elif args[0] == "nlo_mixed_expansion": |
394 | + self.options[args[0]] = banner_module.ConfigFile.format_variable(args[1],bool,args[0]) |
395 | elif args[0] == 'loop_color_flows': |
396 | if log: |
397 | logger.info('set loop color flows to %s' % args[1]) |
398 | |
399 | === modified file 'madgraph/interface/master_interface.py' |
400 | --- madgraph/interface/master_interface.py 2020-08-21 10:29:35 +0000 |
401 | +++ madgraph/interface/master_interface.py 2021-03-24 10:22:46 +0000 |
402 | @@ -228,10 +228,10 @@ |
403 | try: |
404 | return self.cmd.do_add(self, line, *args, **opts) |
405 | except fks_base.NoBornException: |
406 | - logger.info("------------------------------------------------------------------------", '$MG:BOLD') |
407 | + logger.info("---------------------------------------------------------------------------", '$MG:BOLD') |
408 | logger.info(" No Born diagrams found. Now switching to the loop-induced mode. ", '$MG:BOLD') |
409 | - logger.info(" Please cite ref. 'arXiv:1507.00020' when using results from this mode. ", '$MG:BOLD') |
410 | - logger.info("------------------------------------------------------------------------", '$MG:BOLD') |
411 | + logger.info(" Please also cite ref. 'arXiv:1507.00020' when using results from this mode. ", '$MG:BOLD') |
412 | + logger.info("---------------------------------------------------------------------------", '$MG:BOLD') |
413 | self.change_principal_cmd('MadGraph',allow_switch) |
414 | return self.cmd.create_loop_induced(self, line, *args, **opts) |
415 | |
416 | @@ -245,7 +245,7 @@ |
417 | if not nlo_mode in self._valid_nlo_modes: raise self.InvalidCMD(\ |
418 | 'The NLO mode %s is not valid. Please chose one among: %s' \ |
419 | % (nlo_mode, ' '.join(self._valid_nlo_modes))) |
420 | - elif nlo_mode == 'all': |
421 | + elif nlo_mode in ['all']: |
422 | self.change_principal_cmd('MadLoop') |
423 | elif nlo_mode == 'real': |
424 | raise self.InvalidCMD('Mode [real=...] not valid for checking processes.') |
425 | |
426 | === modified file 'madgraph/iolibs/export_fks.py' |
427 | --- madgraph/iolibs/export_fks.py 2021-03-24 08:33:08 +0000 |
428 | +++ madgraph/iolibs/export_fks.py 2021-03-24 10:22:46 +0000 |
429 | @@ -812,6 +812,7 @@ |
430 | |
431 | self.proc_characteristic['grouped_matrix'] = False |
432 | self.proc_characteristic['complex_mass_scheme'] = mg5options['complex_mass_scheme'] |
433 | + self.proc_characteristic['nlo_mixed_expansion'] = mg5options['nlo_mixed_expansion'] |
434 | # determine perturbation order |
435 | perturbation_order = [] |
436 | firstprocess = history.get('generate') |
437 | @@ -2328,6 +2329,7 @@ |
438 | else: |
439 | QED, QCD = fks_common.get_qed_qcd_orders_from_weighted(\ |
440 | len(process_list[0].get('legs')), |
441 | + process_list[0].get('model').get('order_hierarchy'), |
442 | orders['WEIGHTED']) |
443 | |
444 | replace_dict = {} |
445 | |
446 | === modified file 'madgraph/iolibs/export_v4.py' |
447 | --- madgraph/iolibs/export_v4.py 2021-03-24 08:33:08 +0000 |
448 | +++ madgraph/iolibs/export_v4.py 2021-03-24 10:22:46 +0000 |
449 | @@ -1030,8 +1030,9 @@ |
450 | logger.debug('WEIGHTED^2%s%s encoutered. Please check behavior for' + \ |
451 | 'https://bazaar.launchpad.net/~maddevelopers/mg5amcnlo/3.0.1/revision/613', \ |
452 | (process.get_squared_order_type(user_sqso), sqsos[split_orders.index(user_sqso)])) |
453 | - |
454 | - if (process.get_squared_order_type(user_sqso) =='==' and \ |
455 | + if user_sqso not in split_orders: |
456 | + is_a_match = False |
457 | + elif (process.get_squared_order_type(user_sqso) =='==' and \ |
458 | value!=sqsos[split_orders.index(user_sqso)]) or \ |
459 | (process.get_squared_order_type(user_sqso) in ['<=','='] and \ |
460 | value<sqsos[split_orders.index(user_sqso)]) or \ |
461 | @@ -3154,6 +3155,7 @@ |
462 | |
463 | |
464 | #proc_charac |
465 | + self.proc_characteristics['nlo_mixed_expansion'] = mg5options['nlo_mixed_expansion'] |
466 | self.create_proc_charac() |
467 | |
468 | # Write maxparticles.inc based on max of ME's/subprocess groups |
469 | @@ -4133,6 +4135,7 @@ |
470 | # indicate that the output type is not grouped |
471 | if not isinstance(self, ProcessExporterFortranMEGroup): |
472 | self.proc_characteristic['grouped_matrix'] = False |
473 | + self.proc_characteristic['nlo_mixed_expansion'] = mg5options['nlo_mixed_expansion'] |
474 | |
475 | self.proc_characteristic['complex_mass_scheme'] = mg5options['complex_mass_scheme'] |
476 | |
477 | |
478 | === modified file 'madgraph/various/banner.py' |
479 | --- madgraph/various/banner.py 2021-03-24 08:33:08 +0000 |
480 | +++ madgraph/various/banner.py 2021-03-24 10:22:46 +0000 |
481 | @@ -1509,7 +1509,8 @@ |
482 | self.add_param('perturbation_order', [], typelist=str) |
483 | self.add_param('limitations', [], typelist=str) |
484 | self.add_param('hel_recycling', False) |
485 | - self.add_param('single_color', True) |
486 | + self.add_param('single_color', True) |
487 | + self.add_param('nlo_mixed_expansion', True) |
488 | |
489 | def read(self, finput): |
490 | """Read the input file, this can be a path to a file, |
Hi Olivier,
the changes to the code look fine.
As I wrote you on skype, I would warn the user if one has nlo_mixed_expansion = False but the LO diagrams have more than one coupling combination. While this may be OK in some cases (EFT), it may be completely wrong in other (I guess for these cases one has check-poles failing, etc..)
Thanks a lot!
Cheers,
Marco