Merge lp:~maddevelopers/mg5amcnlo/3.0.4-qcdonly into lp:~maddevelopers/mg5amcnlo/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
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_expansion T/F (default T)
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...

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)

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

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

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Template/NLO/Cards/FKS_params.dat'
--- Template/NLO/Cards/FKS_params.dat 2020-05-13 10:13:31 +0000
+++ Template/NLO/Cards/FKS_params.dat 2021-03-24 10:22:46 +0000
@@ -136,7 +136,7 @@
136! this to '-1' if you want to forbid the use of this method136! this to '-1' if you want to forbid the use of this method
137! altogether.137! altogether.
138#NHelForMCoverHels138#NHelForMCoverHels
139-11394
140! Default :: 4140! Default :: 4
141!141!
142! This parameter sets for which fraction of the events the virtual142! This parameter sets for which fraction of the events the virtual
143143
=== modified file 'madgraph/fks/fks_base.py'
--- madgraph/fks/fks_base.py 2021-02-26 15:58:51 +0000
+++ madgraph/fks/fks_base.py 2021-03-24 10:22:46 +0000
@@ -45,13 +45,14 @@
45 """A multi process class that contains informations on the born processes 45 """A multi process class that contains informations on the born processes
46 and the reals.46 and the reals.
47 """47 """
48 48
49 def default_setup(self):49 def default_setup(self):
50 """Default values for all properties"""50 """Default values for all properties"""
51 super(FKSMultiProcess, self).default_setup()51 super(FKSMultiProcess, self).default_setup()
52 self['real_amplitudes'] = diagram_generation.AmplitudeList()52 self['real_amplitudes'] = diagram_generation.AmplitudeList()
53 self['pdgs'] = []53 self['pdgs'] = []
54 self['born_processes'] = FKSProcessList()54 self['born_processes'] = FKSProcessList()
55
55 if not 'OLP' in list(self.keys()):56 if not 'OLP' in list(self.keys()):
56 self['OLP'] = 'MadLoop'57 self['OLP'] = 'MadLoop'
57 self['ncores_for_proc_gen'] = 058 self['ncores_for_proc_gen'] = 0
@@ -122,6 +123,13 @@
122 Real amplitudes are stored in real_amplitudes according on the pdgs of their123 Real amplitudes are stored in real_amplitudes according on the pdgs of their
123 legs (stored in pdgs, so that they need to be generated only once and then reicycled124 legs (stored in pdgs, so that they need to be generated only once and then reicycled
124 """125 """
126
127
128 if 'nlo_mixed_expansion' in options:
129 self['nlo_mixed_expansion'] = options['nlo_mixed_expansion']
130 del options['nlo_mixed_expansion']
131
132
125 #swhich the other loggers off133 #swhich the other loggers off
126 loggers_off = [logging.getLogger('madgraph.diagram_generation'), 134 loggers_off = [logging.getLogger('madgraph.diagram_generation'),
127 logging.getLogger('madgraph.loop_diagram_generation')]135 logging.getLogger('madgraph.loop_diagram_generation')]
@@ -241,7 +249,7 @@
241 for real in born.real_amps:249 for real in born.real_amps:
242 real.find_fks_j_from_i(born_pdg_list)250 real.find_fks_j_from_i(born_pdg_list)
243 if amps:251 if amps:
244 if self['process_definitions'][0].get('NLO_mode') == 'all':252 if self['process_definitions'][0].get('NLO_mode') in ['all']:
245 self.generate_virtuals()253 self.generate_virtuals()
246 254
247 elif not self['process_definitions'][0].get('NLO_mode') in ['all', 'real','LOonly']:255 elif not self['process_definitions'][0].get('NLO_mode') in ['all', 'real','LOonly']:
@@ -316,15 +324,31 @@
316 '%s at the output stage only.'%self['OLP'])324 '%s at the output stage only.'%self['OLP'])
317 return325 return
318326
327 if not self['nlo_mixed_expansion']:
328 # determine the orders to be used to generate the loop
329 loop_orders = {}
330 for born in self['born_processes']:
331 for coup, val in fks_common.find_orders(born.born_amp).items():
332 try:
333 loop_orders[coup] = max([loop_orders[coup], val])
334 except KeyError:
335 loop_orders[coup] = val
336
337
319 for i, born in enumerate(self['born_processes']):338 for i, born in enumerate(self['born_processes']):
320 myproc = copy.copy(born.born_amp['process'])339 myproc = copy.copy(born.born_amp['process'])
340 #misc.sprint(born.born_proc)
341 #misc.sprint(myproc.input_string())
342 #misc.sprint(myproc['orders'])
321 # if [orders] are not specified, then343 # if [orders] are not specified, then
322 # include all particles in the loops344 # include all particles in the loops
323 # i.e. allow all orders to be perturbed345 # i.e. allow all orders to be perturbed
324 # (this is the case for EW corrections, where only squared oders 346 # (this is the case for EW corrections, where only squared oders
325 # are imposed)347 # are imposed)
326 if not myproc['orders']:348 if not self['nlo_mixed_expansion']:
327 myproc['perturbation_couplings'] = myproc['model']['coupling_orders']349 myproc['orders'] = loop_orders
350 elif not myproc['orders']:
351 myproc['perturbation_couplings'] = myproc['model']['coupling_orders']
328 # take the orders that are actually used bu the matrix element352 # take the orders that are actually used bu the matrix element
329 myproc['legs'] = fks_common.to_legs(copy.copy(myproc['legs']))353 myproc['legs'] = fks_common.to_legs(copy.copy(myproc['legs']))
330 logger.info('Generating virtual matrix element with MadLoop for process%s (%d / %d)' \354 logger.info('Generating virtual matrix element with MadLoop for process%s (%d / %d)' \
@@ -335,6 +359,7 @@
335 myamp = loop_diagram_generation.LoopAmplitude(myproc)359 myamp = loop_diagram_generation.LoopAmplitude(myproc)
336 born.virt_amp = myamp360 born.virt_amp = myamp
337 except InvalidCmd:361 except InvalidCmd:
362 logger.debug('invalid command for loop')
338 pass363 pass
339364
340365
341366
=== modified file 'madgraph/fks/fks_common.py'
--- madgraph/fks/fks_common.py 2020-03-27 19:40:16 +0000
+++ madgraph/fks/fks_common.py 2021-03-24 10:22:46 +0000
@@ -52,14 +52,17 @@
52 return [((leg.get('id'), leg.get('number')), leg.get('number'))]52 return [((leg.get('id'), leg.get('number')), leg.get('number'))]
5353
5454
55def get_qed_qcd_orders_from_weighted(nexternal, weighted):55def get_qed_qcd_orders_from_weighted(nexternal, hierarchy, weighted):
56 """computes the QED/QCD orders from the knowledge of the n of ext particles56 """computes the QED/QCD orders from the knowledge of the n of ext particles
57 and of the weighted orders"""57 and of the weighted orders"""
58 qed_w = hierarchy['QED']
59 qcd_w = hierarchy['QCD']
58 # n vertices = nexternal - 2 =QED + QCD60 # n vertices = nexternal - 2 =QED + QCD
59 # weighted = 2*QED + QCD61 # weighted = qed_w*QED + qcd_w*QCD
60 QED = weighted - nexternal + 262
61 QCD = weighted - 2 * QED63 QED = (weighted - qcd_w * (nexternal - 2) ) / (qed_w - qcd_w)
62 return QED, QCD64 QCD = (weighted - qed_w * QED) / qcd_w
65 return int(QED), int(QCD)
6366
6467
65def link_rb_configs(born_amp, real_amp, i, j, ij):68def link_rb_configs(born_amp, real_amp, i, j, ij):
6669
=== modified file 'madgraph/interface/amcatnlo_interface.py'
--- madgraph/interface/amcatnlo_interface.py 2021-03-24 08:33:08 +0000
+++ madgraph/interface/amcatnlo_interface.py 2021-03-24 10:22:46 +0000
@@ -328,6 +328,7 @@
328 'real_processes', 'born_processes', 'virt_processes']328 'real_processes', 'born_processes', 'virt_processes']
329329
330 _nlo_modes_for_completion = ['all','real']330 _nlo_modes_for_completion = ['all','real']
331 display_expansion = False
331332
332 def __init__(self, mgme_dir = '', *completekey, **stdin):333 def __init__(self, mgme_dir = '', *completekey, **stdin):
333 """ Special init tasks for the Loop Interface """334 """ Special init tasks for the Loop Interface """
@@ -457,6 +458,26 @@
457 run_interface.check_compiler(self.options, block=False)458 run_interface.check_compiler(self.options, block=False)
458 #validate_model will reset self._generate_info; to avoid459 #validate_model will reset self._generate_info; to avoid
459 #this store it460 #this store it
461
462 if not aMCatNLOInterface.display_expansion:
463 if proc_type[2] != ['QCD'] and proc_type[1] == 'all':
464 aMCatNLOInterface.display_expansion = True
465 if 'QED' in proc_type[2]:
466 logger.info(
467"""------------------------------------------------------------------------
468This computation involves NLO EW corrections.
469Please also cite ref. 'arXiv:1804.10017' when using results from this code.
470------------------------------------------------------------------------
471""", '$MG:BOLD')
472 else:
473 logger.info(
474"""------------------------------------------------------------------------
475This computation involve not SM-QCD corrections at NLO.
476Please also cite ref. 'arXiv:1804.10017' when using results from this code.
477------------------------------------------------------------------------
478""", '$MG:BOLD')
479
480
460 geninfo = self._generate_info481 geninfo = self._generate_info
461 self.validate_model(proc_type[1], coupling_type=proc_type[2])482 self.validate_model(proc_type[1], coupling_type=proc_type[2])
462 self._generate_info = geninfo483 self._generate_info = geninfo
@@ -477,13 +498,13 @@
477 # set the orders498 # set the orders
478 # if some orders have been set by the user,499 # if some orders have been set by the user,
479 # check that all the orders of the model have been specified500 # check that all the orders of the model have been specified
480 # set to zero those which have not been specified and warn the user501 # set to default those which have not been specified and warn the user
481 if myprocdef['orders'] and not all([o in list(myprocdef['orders'].keys()) for o in myprocdef['model'].get_coupling_orders()]):502 if myprocdef['orders'] and not all([o in list(myprocdef['orders'].keys()) for o in myprocdef['model'].get_coupling_orders()]):
482 for o in myprocdef['model'].get_coupling_orders():503 for o in myprocdef['model'].get_coupling_orders():
483 if o not in list(myprocdef['orders'].keys()):504 if o not in list(myprocdef['orders'].keys()):
484 myprocdef['orders'][o] = 0505 myprocdef['orders'][o] = self.options['default_unset_couplings']
485 logger.warning(('%s order is missing in the process definition. It will be set to 0.\n' + \506 logger.warning(('%s order is missing in the process definition. It will be set to "default unser couplings": %s\n' + \
486 'If this is not what you need, please regenerate with the correct orders.') % o)507 'If this is not what you need, please regenerate with the correct orders.') % (o,myprocdef['orders'][o]))
487508
488 # this is in case no orders have been passed509 # this is in case no orders have been passed
489 if not myprocdef['squared_orders'] and not myprocdef['orders']:510 if not myprocdef['squared_orders'] and not myprocdef['orders']:
@@ -495,23 +516,43 @@
495 'Please specify them from the command line.')516 'Please specify them from the command line.')
496517
497 # this is a very rough attempt, and works only to guess QED/QCD518 # this is a very rough attempt, and works only to guess QED/QCD
498 qed, qcd = fks_common.get_qed_qcd_orders_from_weighted(len(myprocdef['legs']), weighted['WEIGHTED'])519 qed, qcd = fks_common.get_qed_qcd_orders_from_weighted(len(myprocdef['legs']),
520 self._curr_model.get('order_hierarchy'),
521 weighted['WEIGHTED'])
522
499 if qed < 0 or qcd < 0:523 if qed < 0 or qcd < 0:
500 raise MadGraph5Error('\nAutomatic process-order determination lead to negative constraints:\n' + \524 raise MadGraph5Error('\nAutomatic process-order determination lead to negative constraints:\n' + \
501 ('QED: %d, QCD: %d\n' % (qed, qcd)) + \525 ('QED: %d, QCD: %d\n' % (qed, qcd)) + \
502 'Please specify the coupling orders from the command line.')526 'Please specify the coupling orders from the command line.')
503 orders = {'QED': 2*qed, 'QCD': 2*qcd}527 if self.options['nlo_mixed_expansion']:
504 # set all the other coupling to zero528 orders = {'QED': 2*qed, 'QCD': 2*qcd}
505 for o in myprocdef['model'].get_coupling_orders():529 # set all the other coupling to zero
506 if o not in ['QED', 'QCD']:530 for o in myprocdef['model'].get_coupling_orders():
507 orders[o] = 0531 if o not in ['QED', 'QCD']:
508532 orders[o] = 0
509 myprocdef.set('squared_orders', orders)533
510 # warn the user of what happened534 myprocdef.set('squared_orders', orders)
511 logger.info(('Setting the born squared orders automatically in the process definition to %s.\n' + \535 # warn the user of what happened
512 'If this is not what you need, please regenerate with the correct orders.'), 536 logger.info(('Setting the born squared orders automatically in the process definition to %s.\n' + \
513 ' '.join(['%s<=%s' %(k,v) if v else '%s=%s' % (k,v) for k,v in myprocdef['squared_orders'].items()]), 537 'If this is not what you need, please regenerate with the correct orders.'),
514 '$MG:BOLD')538 ' '.join(['%s^2<=%s' %(k,v) if v else '%s=%s' % (k,v) for k,v in myprocdef['squared_orders'].items()]),
539 '$MG:BOLD')
540 else:
541 orders = {'QED': qed, 'QCD': qcd}
542 sqorders = {'QED': 2*qed, 'QCD': 2*qcd}
543 # set all the other coupling to zero
544 for o in myprocdef['model'].get_coupling_orders():
545 if o not in ['QED', 'QCD']:
546 orders[o] = 0
547 sqorders[o] = 0
548
549 myprocdef.set('orders', orders)
550 myprocdef.set('squared_orders', sqorders)
551 # warn the user of what happened
552 logger.info(('Setting the born orders automatically in the process definition to %s.\n' + \
553 'If this is not what you need, please regenerate with the correct orders.'),
554 ' '.join(['%s<=%s' %(k,v) if v else '%s=%s' % (k,v) for k,v in myprocdef['orders'].items()]),
555 '$MG:BOLD')
515556
516 # now check that all couplings that are there in orders also appear557 # now check that all couplings that are there in orders also appear
517 # in squared_orders. If not, set the corresponding one558 # in squared_orders. If not, set the corresponding one
@@ -530,6 +571,7 @@
530 myprocdef['born_sq_orders'] = copy.copy(myprocdef['squared_orders'])571 myprocdef['born_sq_orders'] = copy.copy(myprocdef['squared_orders'])
531 # split all orders in the model, for the moment it's the simplest solution572 # split all orders in the model, for the moment it's the simplest solution
532 # mz02/2014573 # mz02/2014
574 #if proc_type[1] != 'only':
533 myprocdef['split_orders'] += [o for o in myprocdef['model'].get('coupling_orders') \575 myprocdef['split_orders'] += [o for o in myprocdef['model'].get('coupling_orders') \
534 if o not in myprocdef['split_orders']]576 if o not in myprocdef['split_orders']]
535577
@@ -541,10 +583,15 @@
541583
542 # then increase the orders which are perturbed584 # then increase the orders which are perturbed
543 for pert in myprocdef['perturbation_couplings']:585 for pert in myprocdef['perturbation_couplings']:
586
587 if not self.options['nlo_mixed_expansion'] and pert not in proc_type[2]:
588 continue
589
590
544 # if orders have been specified increase them591 # if orders have been specified increase them
545 if list(myprocdef['orders'].keys()) != ['WEIGHTED']:592 if list(myprocdef['orders'].keys()) != ['WEIGHTED']:
546 try:593 try:
547 myprocdef['orders'][pert] += 2594 myprocdef['orders'][pert] += 1
548 except KeyError:595 except KeyError:
549 # if the order is not specified596 # if the order is not specified
550 # then MG does not put any bound on it597 # then MG does not put any bound on it
@@ -572,7 +619,7 @@
572 # This is necessary because when doing EW corrections one only specifies619 # This is necessary because when doing EW corrections one only specifies
573 # squared-orders constraints. In that case, all kind of splittings/loop-particles620 # squared-orders constraints. In that case, all kind of splittings/loop-particles
574 # must be included621 # must be included
575 if not myprocdef['orders']:622 if not myprocdef['orders'] and self.options['nlo_mixed_expansion']:
576 myprocdef['perturbation_couplings'] = list(myprocdef['model']['coupling_orders'])623 myprocdef['perturbation_couplings'] = list(myprocdef['model']['coupling_orders'])
577624
578 self._curr_proc_defs.append(myprocdef)625 self._curr_proc_defs.append(myprocdef)
@@ -595,11 +642,36 @@
595 fks_options = {'OLP': self.options['OLP'],642 fks_options = {'OLP': self.options['OLP'],
596 'ignore_six_quark_processes': self.options['ignore_six_quark_processes'],643 'ignore_six_quark_processes': self.options['ignore_six_quark_processes'],
597 'init_lep_split': self.options['include_lepton_initiated_processes'],644 'init_lep_split': self.options['include_lepton_initiated_processes'],
598 'ncores_for_proc_gen': self.ncores_for_proc_gen}645 'ncores_for_proc_gen': self.ncores_for_proc_gen,
646 'nlo_mixed_expansion': self.options['nlo_mixed_expansion']}
647
648 fksproc =fks_base.FKSMultiProcess(myprocdef,fks_options)
599 try:649 try:
600 self._fks_multi_proc.add(fks_base.FKSMultiProcess(myprocdef,fks_options))650 self._fks_multi_proc.add(fksproc)
601 except AttributeError: 651 except AttributeError:
602 self._fks_multi_proc = fks_base.FKSMultiProcess(myprocdef,fks_options)652 self._fks_multi_proc = fksproc
653
654 if not aMCatNLOInterface.display_expansion and self.options['nlo_mixed_expansion']:
655 base = {}
656 for amp in self._fks_multi_proc.get_born_amplitudes():
657 nb_part = len(amp['process']['legs'])
658 for diag in amp['diagrams']:
659 if nb_part not in base:
660 base[nb_part] = diag.get('orders')
661 elif base[nb_part] != diag.get('orders'):
662 aMCatNLOInterface.display_expansion = True
663 logger.info(
664"""------------------------------------------------------------------------
665This computation can involve not only purely SM-QCD corrections at NLO.
666Please also cite ref. 'arXiv:1804.10017' when using results from this code.
667------------------------------------------------------------------------
668""", '$MG:BOLD')
669 break
670 else:
671 continue
672 break
673
674
603675
604676
605 def do_output(self, line):677 def do_output(self, line):
606678
=== modified file 'madgraph/interface/common_run_interface.py'
--- madgraph/interface/common_run_interface.py 2021-03-24 08:33:08 +0000
+++ madgraph/interface/common_run_interface.py 2021-03-24 10:22:46 +0000
@@ -940,9 +940,15 @@
940 #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')))940 #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')))
941 import ufomodel as ufomodel941 import ufomodel as ufomodel
942 zero = ufomodel.parameters.ZERO942 zero = ufomodel.parameters.ZERO
943 no_width = [p for p in ufomodel.all_particles943 if self.proc_characteristics['nlo_mixed_expansion']:
944 if (str(p.pdg_code) in pids or str(-p.pdg_code) in pids)944 no_width = [p for p in ufomodel.all_particles
945 and p.width != zero]945 if (str(p.pdg_code) in pids or str(-p.pdg_code) in pids)
946 and p.width != zero]
947 else:
948 no_width = [p for p in ufomodel.all_particles
949 if (str(p.pdg_code) in pids or str(-p.pdg_code) in pids)
950 and p.width != zero and p.color!=1]
951
946 done = []952 done = []
947 for part in no_width:953 for part in no_width:
948 if abs(part.pdg_code) in done:954 if abs(part.pdg_code) in done:
949955
=== modified file 'madgraph/interface/madgraph_interface.py'
--- madgraph/interface/madgraph_interface.py 2021-03-24 08:33:08 +0000
+++ madgraph/interface/madgraph_interface.py 2021-03-24 10:22:46 +0000
@@ -820,7 +820,10 @@
820 logger.info(" > (default: True) [Used ONLY for tree-level output with madevent]")820 logger.info(" > (default: True) [Used ONLY for tree-level output with madevent]")
821 logger.info(" > set the width to zero for all T-channel propagator --no impact on complex-mass scheme mode")821 logger.info(" > set the width to zero for all T-channel propagator --no impact on complex-mass scheme mode")
822 logger.info("auto_convert_model <value>",'$MG:color:GREEN') 822 logger.info("auto_convert_model <value>",'$MG:color:GREEN')
823 logger.info(" > (default: False) If set on True any python2 UFO model will be automatically converted to pyton3 format") 823 logger.info(" > (default: False) If set on True any python2 UFO model will be automatically converted to pyton3 format")
824 logger.info("nlo_mixed_expansion <value>",'$MG:color:GREEN')
825 logger.info("deactivates mixed expansion support at NLO, goes back to MG5aMCv2 behavior")
826
824#===============================================================================827#===============================================================================
825# CheckValidForCmd828# CheckValidForCmd
826#===============================================================================829#===============================================================================
@@ -1531,7 +1534,7 @@
1531 if not args[1].isdigit():1534 if not args[1].isdigit():
1532 raise self.InvalidCmd('%s values should be a integer' % args[0])1535 raise self.InvalidCmd('%s values should be a integer' % args[0])
1533 1536
1534 if args[0] in ['loop_optimized_output', 'loop_color_flows', 'low_mem_multicore_nlo_generation']:1537 if args[0] in ['loop_optimized_output', 'loop_color_flows', 'low_mem_multicore_nlo_generation', 'nlo_mixed_expansion']:
1535 try:1538 try:
1536 args[1] = banner_module.ConfigFile.format_variable(args[1], bool, args[0])1539 args[1] = banner_module.ConfigFile.format_variable(args[1], bool, args[0])
1537 except Exception:1540 except Exception:
@@ -2583,7 +2586,7 @@
2583 if args[1] in ['group_subprocesses', 'complex_mass_scheme',\2586 if args[1] in ['group_subprocesses', 'complex_mass_scheme',\
2584 'loop_optimized_output', 'loop_color_flows',\2587 'loop_optimized_output', 'loop_color_flows',\
2585 'include_lepton_initiated_processes',\2588 'include_lepton_initiated_processes',\
2586 'low_mem_multicore_nlo_generation']:2589 'low_mem_multicore_nlo_generation', 'nlo_mixed_expansion']:
2587 return self.list_completion(text, ['False', 'True', 'default'])2590 return self.list_completion(text, ['False', 'True', 'default'])
2588 elif args[1] in ['ignore_six_quark_processes']:2591 elif args[1] in ['ignore_six_quark_processes']:
2589 return self.list_completion(text, list(self._multiparticles.keys()))2592 return self.list_completion(text, list(self._multiparticles.keys()))
@@ -2921,8 +2924,9 @@
2921 'max_t_for_channel',2924 'max_t_for_channel',
2922 'zerowidth_tchannel',2925 'zerowidth_tchannel',
2923 'default_unset_couplings',2926 'default_unset_couplings',
2927 'nlo_mixed_expansion'
2924 ]2928 ]
2925 _valid_nlo_modes = ['all','real','virt','sqrvirt','tree','noborn','LOonly']2929 _valid_nlo_modes = ['all','real','virt','sqrvirt','tree','noborn','LOonly', 'only']
2926 _valid_sqso_types = ['==','<=','=','>']2930 _valid_sqso_types = ['==','<=','=','>']
2927 _valid_amp_so_types = ['=','<=', '==', '>']2931 _valid_amp_so_types = ['=','<=', '==', '>']
2928 _OLP_supported = ['MadLoop', 'GoSam']2932 _OLP_supported = ['MadLoop', 'GoSam']
@@ -2989,6 +2993,7 @@
2989 'default_unset_couplings': 99, # 99 means infinity2993 'default_unset_couplings': 99, # 99 means infinity
2990 'max_t_for_channel': 99, # means no restrictions2994 'max_t_for_channel': 99, # means no restrictions
2991 'zerowidth_tchannel': True,2995 'zerowidth_tchannel': True,
2996 'nlo_mixed_expansion':True,
2992 }2997 }
29932998
2994 options_madevent = {'automatic_html_opening':True,2999 options_madevent = {'automatic_html_opening':True,
@@ -7768,6 +7773,8 @@
7768 logger.warning("Turning off option 'loop_color_flows'"+\7773 logger.warning("Turning off option 'loop_color_flows'"+\
7769 " since it is not available for non-optimized loop output.")7774 " since it is not available for non-optimized loop output.")
7770 self.do_set('loop_color_flows False',log=False)7775 self.do_set('loop_color_flows False',log=False)
7776 elif args[0] == "nlo_mixed_expansion":
7777 self.options[args[0]] = banner_module.ConfigFile.format_variable(args[1],bool,args[0])
7771 elif args[0] == 'loop_color_flows':7778 elif args[0] == 'loop_color_flows':
7772 if log:7779 if log:
7773 logger.info('set loop color flows to %s' % args[1])7780 logger.info('set loop color flows to %s' % args[1])
77747781
=== modified file 'madgraph/interface/master_interface.py'
--- madgraph/interface/master_interface.py 2020-08-21 10:29:35 +0000
+++ madgraph/interface/master_interface.py 2021-03-24 10:22:46 +0000
@@ -228,10 +228,10 @@
228 try:228 try:
229 return self.cmd.do_add(self, line, *args, **opts)229 return self.cmd.do_add(self, line, *args, **opts)
230 except fks_base.NoBornException:230 except fks_base.NoBornException:
231 logger.info("------------------------------------------------------------------------", '$MG:BOLD')231 logger.info("---------------------------------------------------------------------------", '$MG:BOLD')
232 logger.info(" No Born diagrams found. Now switching to the loop-induced mode. ", '$MG:BOLD')232 logger.info(" No Born diagrams found. Now switching to the loop-induced mode. ", '$MG:BOLD')
233 logger.info(" Please cite ref. 'arXiv:1507.00020' when using results from this mode. ", '$MG:BOLD')233 logger.info(" Please also cite ref. 'arXiv:1507.00020' when using results from this mode. ", '$MG:BOLD')
234 logger.info("------------------------------------------------------------------------", '$MG:BOLD') 234 logger.info("---------------------------------------------------------------------------", '$MG:BOLD')
235 self.change_principal_cmd('MadGraph',allow_switch)235 self.change_principal_cmd('MadGraph',allow_switch)
236 return self.cmd.create_loop_induced(self, line, *args, **opts)236 return self.cmd.create_loop_induced(self, line, *args, **opts)
237237
@@ -245,7 +245,7 @@
245 if not nlo_mode in self._valid_nlo_modes: raise self.InvalidCMD(\245 if not nlo_mode in self._valid_nlo_modes: raise self.InvalidCMD(\
246 'The NLO mode %s is not valid. Please chose one among: %s' \246 'The NLO mode %s is not valid. Please chose one among: %s' \
247 % (nlo_mode, ' '.join(self._valid_nlo_modes)))247 % (nlo_mode, ' '.join(self._valid_nlo_modes)))
248 elif nlo_mode == 'all':248 elif nlo_mode in ['all']:
249 self.change_principal_cmd('MadLoop')249 self.change_principal_cmd('MadLoop')
250 elif nlo_mode == 'real':250 elif nlo_mode == 'real':
251 raise self.InvalidCMD('Mode [real=...] not valid for checking processes.')251 raise self.InvalidCMD('Mode [real=...] not valid for checking processes.')
252252
=== modified file 'madgraph/iolibs/export_fks.py'
--- madgraph/iolibs/export_fks.py 2021-03-24 08:33:08 +0000
+++ madgraph/iolibs/export_fks.py 2021-03-24 10:22:46 +0000
@@ -812,6 +812,7 @@
812 812
813 self.proc_characteristic['grouped_matrix'] = False813 self.proc_characteristic['grouped_matrix'] = False
814 self.proc_characteristic['complex_mass_scheme'] = mg5options['complex_mass_scheme']814 self.proc_characteristic['complex_mass_scheme'] = mg5options['complex_mass_scheme']
815 self.proc_characteristic['nlo_mixed_expansion'] = mg5options['nlo_mixed_expansion']
815 # determine perturbation order816 # determine perturbation order
816 perturbation_order = []817 perturbation_order = []
817 firstprocess = history.get('generate')818 firstprocess = history.get('generate')
@@ -2328,6 +2329,7 @@
2328 else:2329 else:
2329 QED, QCD = fks_common.get_qed_qcd_orders_from_weighted(\2330 QED, QCD = fks_common.get_qed_qcd_orders_from_weighted(\
2330 len(process_list[0].get('legs')),2331 len(process_list[0].get('legs')),
2332 process_list[0].get('model').get('order_hierarchy'),
2331 orders['WEIGHTED'])2333 orders['WEIGHTED'])
23322334
2333 replace_dict = {}2335 replace_dict = {}
23342336
=== modified file 'madgraph/iolibs/export_v4.py'
--- madgraph/iolibs/export_v4.py 2021-03-24 08:33:08 +0000
+++ madgraph/iolibs/export_v4.py 2021-03-24 10:22:46 +0000
@@ -1030,8 +1030,9 @@
1030 logger.debug('WEIGHTED^2%s%s encoutered. Please check behavior for' + \1030 logger.debug('WEIGHTED^2%s%s encoutered. Please check behavior for' + \
1031 'https://bazaar.launchpad.net/~maddevelopers/mg5amcnlo/3.0.1/revision/613', \1031 'https://bazaar.launchpad.net/~maddevelopers/mg5amcnlo/3.0.1/revision/613', \
1032 (process.get_squared_order_type(user_sqso), sqsos[split_orders.index(user_sqso)]))1032 (process.get_squared_order_type(user_sqso), sqsos[split_orders.index(user_sqso)]))
10331033 if user_sqso not in split_orders:
1034 if (process.get_squared_order_type(user_sqso) =='==' and \1034 is_a_match = False
1035 elif (process.get_squared_order_type(user_sqso) =='==' and \
1035 value!=sqsos[split_orders.index(user_sqso)]) or \1036 value!=sqsos[split_orders.index(user_sqso)]) or \
1036 (process.get_squared_order_type(user_sqso) in ['<=','='] and \1037 (process.get_squared_order_type(user_sqso) in ['<=','='] and \
1037 value<sqsos[split_orders.index(user_sqso)]) or \1038 value<sqsos[split_orders.index(user_sqso)]) or \
@@ -3154,6 +3155,7 @@
31543155
31553156
3156 #proc_charac3157 #proc_charac
3158 self.proc_characteristics['nlo_mixed_expansion'] = mg5options['nlo_mixed_expansion']
3157 self.create_proc_charac()3159 self.create_proc_charac()
31583160
3159 # Write maxparticles.inc based on max of ME's/subprocess groups3161 # Write maxparticles.inc based on max of ME's/subprocess groups
@@ -4133,6 +4135,7 @@
4133 # indicate that the output type is not grouped4135 # indicate that the output type is not grouped
4134 if not isinstance(self, ProcessExporterFortranMEGroup):4136 if not isinstance(self, ProcessExporterFortranMEGroup):
4135 self.proc_characteristic['grouped_matrix'] = False4137 self.proc_characteristic['grouped_matrix'] = False
4138 self.proc_characteristic['nlo_mixed_expansion'] = mg5options['nlo_mixed_expansion']
4136 4139
4137 self.proc_characteristic['complex_mass_scheme'] = mg5options['complex_mass_scheme']4140 self.proc_characteristic['complex_mass_scheme'] = mg5options['complex_mass_scheme']
41384141
41394142
=== modified file 'madgraph/various/banner.py'
--- madgraph/various/banner.py 2021-03-24 08:33:08 +0000
+++ madgraph/various/banner.py 2021-03-24 10:22:46 +0000
@@ -1509,7 +1509,8 @@
1509 self.add_param('perturbation_order', [], typelist=str) 1509 self.add_param('perturbation_order', [], typelist=str)
1510 self.add_param('limitations', [], typelist=str) 1510 self.add_param('limitations', [], typelist=str)
1511 self.add_param('hel_recycling', False) 1511 self.add_param('hel_recycling', False)
1512 self.add_param('single_color', True) 1512 self.add_param('single_color', True)
1513 self.add_param('nlo_mixed_expansion', True)
15131514
1514 def read(self, finput):1515 def read(self, finput):
1515 """Read the input file, this can be a path to a file, 1516 """Read the input file, this can be a path to a file,

Subscribers

People subscribed via source and target branches

to all changes: