Issue with using AmpOrder syntax and reweighting

Asked by Kelci Mohrman

Hi MG Experts,

I am trying to produce gridpacks with event reweighting using the dim6top_LO_UFO model. When I try to specify the amplitude order for the dimension 6 operators, I get an error when I then try to run the reweighting step. When I try to run with the following:

generate p p > t t~ h DIM6=1

everting runs fine . However, when I try to run with the following:

generate p p > t t~ h DIM6^2<=2

I get critical errors:

CRITICAL: pjoin(path_me,onedir,'SubProcesses','MadLoop5_resources', '%sHelConfigs.dat' % prefix.upper() ) = /afs/cern.ch/user/k/kmohrman/mc_test_dir/genproductions/bin/MadGraph5_aMCatNLO/gridruns/ttHeco2/ttHeco2_test_run0/process/madevent/rwgt/rw_me/SubProcesses/MadLoop5_resources/M3_HelConfigs.dat [reweight_interface.py at line 1729]
CRITICAL: os.path.exists(pjoin(path_me,onedir,'SubProcesses','MadLoop5_resources', '%sHelConfigs.dat' % prefix.upper())) = False [reweight_interface.py at line 1730]

The debug output mentions a dictionary key error. The resulting gridpacks all produce events as expected but without any reweighted points. Is there a way to remedy this issue?

Thanks!

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

Can you provide the reweight_card.dat such that I cans see by what you are reweighting.
In the oneline bug report I see some error related to Madloop but since the above is purely LO, I do not see any need to Madloop.
So I guess that your crash also depends of which type of re-weighting you are doing.

Cheers,

Olivier

Revision history for this message
Kelci Mohrman (kmohrman) said :
#2

Hi Olivier,

Thanks for the quick response. Here are the first few lines from the reweight card:

#******************************************************************
# Reweight Module *
#******************************************************************

change rwgt_dir rwgt

launch --rwgt_name=dummy_point
set ctW 0.012300

launch --rwgt_name=EFTrwgt0_ctW_-25.0
set ctW -25.000000

launch --rwgt_name=EFTrwgt1_ctW_-19.444444
set ctW -19.444444

launch --rwgt_name=EFTrwgt2_ctW_-13.888889
set ctW -13.888889

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#3

Thanks,

Is the rwgt directory already existing?
If yes how did you create that directory (if it does not exist then you should have a pure LO computation and it does not seem to be the case)

Cheers,

Olivier

Revision history for this message
Kelci Mohrman (kmohrman) said :
#4

Hi Olivier,

The rwgt directory does not exist until after we run the reweighting step. In case it is helpful, I included the trace back from the ME5_debug. Thanks again!

reweight pilotrun -from_cards
Traceback (most recent call last):
  File "/afs/cern.ch/user/k/kmohrman/mc_test_dir/genproductions/bin/MadGraph5_aMCatNLO/ttHSqr_test_run0/ttHSqr_test_run0_gridpack/work/process/madevent/bin/internal/extended_cmd.py", line 1438, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/afs/cern.ch/user/k/kmohrman/mc_test_dir/genproductions/bin/MadGraph5_aMCatNLO/ttHSqr_test_run0/ttHSqr_test_run0_gridpack/work/process/madevent/bin/internal/extended_cmd.py", line 1392, in onecmd_orig
    return func(arg, **opt)
  File "/afs/cern.ch/user/k/kmohrman/mc_test_dir/genproductions/bin/MadGraph5_aMCatNLO/ttHSqr_test_run0/ttHSqr_test_run0_gridpack/work/process/madevent/bin/internal/common_run_interface.py", line 1996, in do_reweight
    reweight_cmd.import_command_file(path)
  File "/afs/cern.ch/user/k/kmohrman/mc_test_dir/genproductions/bin/MadGraph5_aMCatNLO/ttHSqr_test_run0/ttHSqr_test_run0_gridpack/work/MG5_aMC_v2_6_0/madgraph/interface/extended_cmd.py", line 1580, in import_command_file
    self.exec_cmd(line, precmd=True)
  File "/afs/cern.ch/user/k/kmohrman/mc_test_dir/genproductions/bin/MadGraph5_aMCatNLO/ttHSqr_test_run0/ttHSqr_test_run0_gridpack/work/MG5_aMC_v2_6_0/madgraph/interface/extended_cmd.py", line 1465, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/afs/cern.ch/user/k/kmohrman/mc_test_dir/genproductions/bin/MadGraph5_aMCatNLO/ttHSqr_test_run0/ttHSqr_test_run0_gridpack/work/MG5_aMC_v2_6_0/madgraph/interface/extended_cmd.py", line 1392, in onecmd_orig
    return func(arg, **opt)
  File "/afs/cern.ch/user/k/kmohrman/mc_test_dir/genproductions/bin/MadGraph5_aMCatNLO/ttHSqr_test_run0/ttHSqr_test_run0_gridpack/work/MG5_aMC_v2_6_0/madgraph/various/misc.py", line 99, in f_with_no_logger
    out = f(self, *args, **opt)
  File "/afs/cern.ch/user/k/kmohrman/mc_test_dir/genproductions/bin/MadGraph5_aMCatNLO/ttHSqr_test_run0/ttHSqr_test_run0_gridpack/work/MG5_aMC_v2_6_0/madgraph/interface/reweight_interface.py", line 478, in do_launch
    self.load_module()
  File "/afs/cern.ch/user/k/kmohrman/mc_test_dir/genproductions/bin/MadGraph5_aMCatNLO/ttHSqr_test_run0/ttHSqr_test_run0_gridpack/work/MG5_aMC_v2_6_0/madgraph/interface/reweight_interface.py", line 1747, in load_module
    hel = hel_dict[prefix]
KeyError: 'm4_'

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#5

This still does not make sense to me.

But according to your description above, this should correspond to the following script:

import model dim6top_LO_UFO
generate p p > t t~ h DIM6^2<=2
output PROC_DIM6 -f
launch
reweight=ON
edit reweight --after_line="banner" change rwgt_dir PROC_DIM6/rwgt
edit reweight --replace_line="launch" launch --rwgt_name=dummy_point
edit reweight --after_line="launch --rwgt_name=dummy_point" set ctW 0.012300
edit reweight launch --rwgt_name=EFTrwgt0_ctW_-25.0
edit reweight set ctW -25.000000

This is currently running now to see if I reproduce your error (but I doubt about it since this run does not have any dependencies to MadLoop). Can you run it as well just to check that this indeed correspond to what you are trying to do

Cheers,

Olivier

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#6

HI,

As I was expecting, the above script does not crash (I tested with 2.6.4 version).

Cheers,

Olivier

Revision history for this message
Kelci Mohrman (kmohrman) said :
#7

Hi Olivier,

In my setup, MadGraph creates the process directory and then runs the generate_events command; I then separately run the reweighting module and run into this issue. As far as I can tell, it is running in the LO mode using madevent. This is using version 2.6.0.

I tried running interactively, but the reweighting step fails due to unrelated path dependency issues with f2py.

Thanks very much!

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#8

Hi Kelci,

I have also try to run those two step separatly.
But as expected it is still working (again in 2.6.4).

I'm sorry but your bug report does not make any sense to me.
Your bug is clearly loop related while your process does not have any loop.

My best guess is that the directory rwgt was already existing and setup for some loop process (likely not related at all to your process) and therefore leading to that bug. Please be sure to remove that directory (or test my script above)
If this is not true, then
1) please try with 2.6.4
2) if you reproduce the issue, please send me detailled instruction (if possible as a suite of command like above)

Cheers,

Olivier

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#9
Revision history for this message
Kelci Mohrman (kmohrman) said :
#10

Hello Olivier,

Running on 2.6.4, the reweighting seems to work fine, as you said. We are wondering if you would happen to know what might have changed between 2.6.0 and 2.6.4 that causes the reweighting to fail in the older version?

Thanks again!

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#11

Hi Kelci,

Since your error does not make ANY sense, passing from 2.6.0 to 2.6.4 should not change anything.
(But likely remove the pre-existing rwgt directory).
Now between those two versions, a couple of bug fix have been implemented including some related to the re-weighting feature.
(I have in mind some bug related to the --name tag for example)

Cheers,

Olivier

Revision history for this message
Kelci Mohrman (kmohrman) said :
#12

Hi Olivier,

Sorry for not making any sense.

There does not seem to be a rwgt directory prior to calling the reweight module.

There are a number of patches that get applied to our MadGraph 2.6.0 version, so it's possible that one of these changes is causing the issue. Is there a particular place in the MadGraph code where it switches to an NLO computation?

Thanks for the timely responses; we really appreciate your help!

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#13

Hi,

> Sorry for not making any sense.

Not your fault but this makes things difficult to comment.

> There are a number of patches that get applied to our MadGraph 2.6.0
> version, so it's possible that one of these changes is causing the
> issue.

Well I do not know which patches you are using (and from where you got those patches)
so can not comment on that.

> Is there a particular place in the MadGraph code where it
> switches to an NLO computation?

It can switch at basically any process definition. where you can always replace a LO matrix-element by a loop-induced one. But those should be a user request change.

Cheers,

Olivier

> On 15 Nov 2018, at 22:17, Kelci Mohrman <email address hidden> wrote:
>
> Question #676113 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/676113
>
> Status: Answered => Open
>
> Kelci Mohrman is still having a problem:
> Hi Olivier,
>
> Sorry for not making any sense.
>
> There does not seem to be a rwgt directory prior to calling the reweight
> module.
>
> There are a number of patches that get applied to our MadGraph 2.6.0
> version, so it's possible that one of these changes is causing the
> issue. Is there a particular place in the MadGraph code where it
> switches to an NLO computation?
>
> Thanks for the timely responses; we really appreciate your help!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Kelci Mohrman (kmohrman) said :
#14

Hello Olivier,

Thank you again for the help.

Is it possible that the LHAPDF configuration can cause MadGraph to switch to an NLO calculation? We are also wondering if PDF reweighting could conflict with the AmpOrder syntax (DIM6^2<=2) we are trying to use?

Thanks!

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#15

I would say no.

Now everything is possible but it is not likely.

Cheers,

Olivier

> On 22 Nov 2018, at 01:57, Kelci Mohrman <email address hidden> wrote:
>
> Question #676113 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/676113
>
> Status: Answered => Open
>
> Kelci Mohrman is still having a problem:
> Hello Olivier,
>
> Thank you again for the help.
>
> Is it possible that the LHAPDF configuration can cause MadGraph to
> switch to an NLO calculation? We are also wondering if PDF reweighting
> could conflict with the AmpOrder syntax (DIM6^2<=2) we are trying to
> use?
>
> Thanks!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Can you help with this problem?

Provide an answer of your own, or ask Kelci Mohrman for more information if necessary.

To post a message you must log in.