EWdim6 reweighting crashes in 5f scheme

Bug #1504089 reported by Matthias M
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Undecided
Unassigned

Bug Description

Dear authors,

I'm trying to study pp->WW production with anomalous couplings using the EWdim6 EFT. To avoid a large number of separate samples, I use the reweight feature. This has worked in the past, but since I upgraded to version 5.2.3.2.2 I see the following crash. The initial event generation works as expected, but after some successfully reweighted events the error below appears:

INFO: starts to compute weight for events with the following modification to the param_card:

INFO: set param_card dim6 1 0.0 # orig: 1.0
set param_card dim6 2 0.0 # orig: 1.0
set param_card dim6 3 0.0 # orig: 10.0

INFO: Event nb 0 current time: 20h40
INFO: Event nb 10 1m 37s
INFO: Event nb 20 3m 32s
INFO: Event nb 30 4m 51s
INFO: Event nb 40 5m 6s
INFO: Event nb 50 5m 26s
INFO: Event nb 60 5m 26s
INFO: Event nb 70 5m 26s
INFO: Event nb 80 5m 32s
Command "reweight run_01" interrupted with error:
KeyError : ((-5, 5), (-16, -3, 4, 15))
Please report this bug on https://bugs.launchpad.net/madgraph5
More information is found in 'MG5_aMC_v2_3_2_2/WW_aTGC_reweight/run_01_tag_3_debug.log'.
Please attach this file to your report.

The key makes me suspect, that there is an issue with the five-flavor scheme. Indeed when I run a comparable configuration in the 4f-scheme, 10k events are successfully reweighted.
Could there be a regression in the handling of the 5f scheme in the revamp of the reweigthing code?

Yours
   Matthias

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

Hi,

The main reason, is that you do not really do the computation in 5F since I see that
you have the mass of the b which is different of zero. I guess if you force the b mass to
be zero (at the model level) then you should not have any problem.
(Note the you can define such type of model via the “customise_model —save=NAME” options)

If you want to stick with this small inconsistency.
Here is a fix:

=== modified file 'madgraph/various/banner.py'
--- madgraph/various/banner.py 2015-10-01 16:00:08 +0000
+++ madgraph/various/banner.py 2015-10-09 10:34:09 +0000
@@ -536,7 +536,7 @@
      if len(arg) == 1:
          if tag == 'mg5proccard':
              try:
- return card.info[arg[0]]
+ return card.get(arg[0])
              except KeyError, error:
                  if 'default' in opt:
                      return opt['default']
@@ -850,11 +850,18 @@
          # update the counter to pass to the next element
          nline -= 1

- def __getattr__(self, tag, default=None):
+ def get(self, tag, default=None):
      if isinstance(tag, int):
          list.__getattr__(self, tag)
      elif tag == 'info' or tag == "__setstate__":
          return default #for pickle
+ elif tag == "multiparticles":
+ out = []
+ for line in self:
+ if line.startswith('define'):
+ name, content = line[7:].split('=',1)
+ out.append((name, content))
+ return out
      else:
          return self.info[tag]
=== modified file 'madgraph/interface/reweight_interface.py'
--- madgraph/interface/reweight_interface.py 2015-10-01 16:00:08 +0000
+++ madgraph/interface/reweight_interface.py 2015-10-09 10:32:30 +0000
@@ -921,6 +921,11 @@
      commandline="import model %s " % modelpath
      mgcmd.exec_cmd(commandline)

+ #multiparticles
+ print self.banner.get('proc_card', 'multiparticles')
+ for name, content in self.banner.get('proc_card', 'multiparticles'):
+ mgcmd.exec_cmd("define %s = %s" % (name, content))
+
      # 2. compute the production matrix element -----------------------------
      processes = [line[9:].strip() for line in self.banner.proc_card
                   if line.startswith('generate')]

Changed in mg5amcnlo:
status: New → Fix Committed
Revision history for this message
Matthias M (mmgdw) wrote :

Dear Olivier,

thank you for the quick reply. I can confirm that the patch resolves the problem. For my studies I've updated the model, though, which seems to be the more correct choice.

Changed in mg5amcnlo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.