Error related to rwgt2py module when generating FxFx with top-mass reweighting

Asked by Maddie McKay on 2019-12-07

We are trying to generate events with top mass reweighting using via:
./bin/mg5_aMC file.dat

Where file.dat contains the following:

import model HC_NLO_X0_UFO-heft
generate p p > x0 [QCD]
add process p p > x0 j [QCD]
add process p p > x0 j j [QCD]
output topMass
launch topMass
shower=OFF
reweight=ON
set ickkw 3
set store_rwgt_info T
set pdlabel lhapdf
set parton_shower PYTHIA8
set nevents 2000
set req_acc 0.001
edit reweight_card --before_line='launch' change mode NLO_tree
edit reweight_card --before_line='launch' change output 2.0.
edit reweight_card --before_line='launch' change model loop_sm-no_b_mass
edit reweight_card --before_line='launch' change process p p > h [QCD]
edit reweight_card --before_line='launch' change process p p > h j [QCD] --add
edit reweight_card --before_line='launch' change process p p > h j j QED<=1 [QCD] --add
launch topMass -i
systematics topMass/Events/run_01/events.lhe.gz --remove_wgts=all --start_id=1001 --dyn=-1

However, we noticed that the reweighting is not being done, and this is in the log file:

#************************************************************
# MadGraph5_aMC@NLO
#
#
#
# 5
#
#
#
#
# VERSION 5.2.6.5 20xx-xx-xx
#
# The MadGraph5_aMC@NLO Development Team - Find us at
# https://server06.fynu.ucl.ac.be/projects/madgraph
# and
# http://amcatnlo.cern.ch
#
#************************************************************
#
# Command File for aMCatNLO
#
# run as ./bin/aMCatNLO.py filename
#
#************************************************************
reweight run_01 -from_cards
Traceback (most recent call last):
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/topMass/bin/internal/extended_cmd.py", line 1514, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/topMass/bin/internal/extended_cmd.py", line 1463, in onecmd_orig
    return func(arg, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/topMass/bin/internal/common_run_interface.py", line 2142, in do_reweight
    reweight_cmd.import_command_file(path)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/extended_cmd.py", line 1660, in import_command_file
    self.exec_cmd(line, precmd=True)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/extended_cmd.py", line 1543, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/extended_cmd.py", line 1463, in onecmd_orig
    return func(arg, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/various/misc.py", line 100, in f_with_no_logger
    out = f(self, args, *opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/reweight_interface.py", line 487, in do_launch
    self.create_standalone_directory()
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/various/misc.py", line 100, in f_with_no_logger
    out = f(self, args, *opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/reweight_interface.py", line 1601, in create_standalone_directory
    mymod = __import__('%s.Source.rwgt2py' % data['paths'][1], globals(), locals(), [],-1)
ImportError: No module named rwgt2py

Please let me know how we can proceed. Thanks in advance! :)

Question information

Language:
English Edit question
Status:
Answered
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Last query:
2019-12-07
Last reply:
2019-12-12
Rikkert Frederix (frederix) said : #1

Dear Maddie,

I don't know what the error is --- Olivier will be more qualified to answer that, but one mistake is in the process definition. When you generate the process in the HC_NLO_X0_UFO-heft model, you have to explicitly remove the top quarks from appearing (they are 'integrated out' in the HEFT model). Hence, you'll have to do

import model HC_NLO_X0_UFO-heft
generate p p > x0 / t t~ [QCD]
add process p p > x0 j / t t~ [QCD]
add process p p > x0 j j / t t~ [QCD]
output topMass
...

Of course, this won't fix the problem with not being able to import the rwgt2py module.

Cheers,
Rikkert

Hi,

I have two different jobs and since I'm consequently forbidden to do physics and support on MadGraph on Monday/Tuesday.
So thanks for your patience on that. (This is also why using launchpad is crucial to help me organise)

Concerning your bug, you should have a directory
rw_mevirt/Source
can you go inside that directory and report the following:
1) the output of the "ls" command
2). the output of the "make rwgt2py.so" command
3) the output of the "python" command followed by "import rwgt2py"
4) the output of the "which f2py" command

This should give details why the module is not created correctly.
I would also need your full debug file since I need to know the various option for the compiler that you use to run madgraph (it might have an impact for the command above actually).

Cheers,

Olivier

Maddie McKay (mamckay) said : #3

Hi Rikkert,

Ok, thanks for pointing this out!! This is good to know :)

Olivier,

That's understandable!
For the bug,

1) ls inside rw_mevirt/Source shows the following:
alfas_functions_lhapdf.f coupl.inc __init__.py makefile MODEL rwgt2py.cpython-36m-x86_64-linux-gnu.so setrun.f
alfas.inc DHELAS __init__.pyc make_opts PDF rwgt.f timing_variables.inc

2) make rwgt2py.so outputs:
make: True: Command not found
touch __init__.py
touch ../__init__.py
f2py -L../lib/ -lpdf -L/home/sabidi/SusHi/LHAPDF-Install/lib -lLHAPDF -lLHAPDF -lstdc++ -c rwgt.f -m rwgt2py --f77exec=gfortran
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building extension "rwgt2py" sources
f2py options: []
f2py:> /tmp/tmpafj_6iz9/src.linux-x86_64-3.6/rwgt2pymodule.c
creating /tmp/tmpafj_6iz9/src.linux-x86_64-3.6
Reading fortran codes...
 Reading file 'rwgt.f' (format:fix,strict)
Post-processing...
 Block: rwgt2py
   Block: initialise
analyzevars: character array "character*20 parm(20)" is considered as "character parm(20,20)"; "intent(c)" is forced.
   Block: test_pdf
   Block: get_wgt
Post-processing (stage 2)...
Building modules...
 Building module "rwgt2py"...
  Constructing wrapper function "initialise"...
    initialise(lpp,pdfid)
  Constructing wrapper function "test_pdf"...
    test_pdf()
  Constructing wrapper function "get_wgt"...
    new_wgt,all_wgt = get_wgt(scales2,pdg,bjx,wgt,g,qcdpower,ymur,ymuf,[n_ctr])
  Constructing COMMON block support for "beam_type"...
    save_lpp
 Wrote C/API module "rwgt2py" to file "/tmp/tmpafj_6iz9/src.linux-x86_64-3.6/rwgt2pymodule.c"
 Fortran 77 wrappers are saved to "/tmp/tmpafj_6iz9/src.linux-x86_64-3.6/rwgt2py-f2pywrappers.f"
  adding '/tmp/tmpafj_6iz9/src.linux-x86_64-3.6/fortranobject.c' to sources.
  adding '/tmp/tmpafj_6iz9/src.linux-x86_64-3.6' to include_dirs.
copying /home/sabidi/.local/lib/python3.6/site-packages/numpy/f2py/src/fortranobject.c -> /tmp/tmpafj_6iz9/src.linux-x86_64-3.6
copying /home/sabidi/.local/lib/python3.6/site-packages/numpy/f2py/src/fortranobject.h -> /tmp/tmpafj_6iz9/src.linux-x86_64-3.6
  adding '/tmp/tmpafj_6iz9/src.linux-x86_64-3.6/rwgt2py-f2pywrappers.f' to sources.
build_src: building npy-pkg config files
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']'
customize Gnu95FCompiler
Found executable /usr/bin/gfortran
customize Gnu95FCompiler
customize Gnu95FCompiler using build_ext
building 'rwgt2py' extension
compiling C sources
C compiler: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC

creating /tmp/tmpafj_6iz9/tmp
creating /tmp/tmpafj_6iz9/tmp/tmpafj_6iz9
creating /tmp/tmpafj_6iz9/tmp/tmpafj_6iz9/src.linux-x86_64-3.6
compile options: '-I/tmp/tmpafj_6iz9/src.linux-x86_64-3.6 -I/home/sabidi/.local/lib/python3.6/site-packages/numpy/core/include -I/usr/include/python3.6m -c'
x86_64-linux-gnu-gcc: /tmp/tmpafj_6iz9/src.linux-x86_64-3.6/rwgt2pymodule.c
x86_64-linux-gnu-gcc: /tmp/tmpafj_6iz9/src.linux-x86_64-3.6/fortranobject.c
In file included from /home/sabidi/.local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821:0,
                 from /home/sabidi/.local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /home/sabidi/.local/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from /tmp/tmpafj_6iz9/src.linux-x86_64-3.6/fortranobject.h:13,
                 from /tmp/tmpafj_6iz9/src.linux-x86_64-3.6/rwgt2pymodule.c:16:
/home/sabidi/.local/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
/tmp/tmpafj_6iz9/src.linux-x86_64-3.6/rwgt2pymodule.c:109:12: warning: ‘f2py_size’ defined but not used [-Wunused-function]
 static int f2py_size(PyArrayObject* var, ...)
            ^~~~~~~~~
In file included from /home/sabidi/.local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1821:0,
                 from /home/sabidi/.local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                 from /home/sabidi/.local/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from /tmp/tmpafj_6iz9/src.linux-x86_64-3.6/fortranobject.h:13,
                 from /tmp/tmpafj_6iz9/src.linux-x86_64-3.6/fortranobject.c:2:
/home/sabidi/.local/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
 #warning "Using deprecated NumPy API, disable it by " \
  ^~~~~~~
compiling Fortran sources
Fortran f77 compiler: gfortran -Wall -g -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops
Fortran f90 compiler: /usr/bin/gfortran -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops
Fortran fix compiler: /usr/bin/gfortran -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -fPIC -O3 -funroll-loops
compile options: '-I/tmp/tmpafj_6iz9/src.linux-x86_64-3.6 -I/home/sabidi/.local/lib/python3.6/site-packages/numpy/core/include -I/usr/include/python3.6m -c'
gfortran:f77: rwgt.f
gfortran:f77: /tmp/tmpafj_6iz9/src.linux-x86_64-3.6/rwgt2py-f2pywrappers.f
rwgt.f:77:25:

       double precision gs,add_wgt
                         1
Warning: Unused variable ‘gs’ declared at (1) [-Wunused-variable]
rwgt.f:69:18:

       integer i,kr
                  1
Warning: Unused variable ‘kr’ declared at (1) [-Wunused-variable]
/usr/bin/gfortran -Wall -g -Wall -g -shared /tmp/tmpafj_6iz9/tmp/tmpafj_6iz9/src.linux-x86_64-3.6/rwgt2pymodule.o /tmp/tmpafj_6iz9/tmp/tmpafj_6iz9/src.linux-x86_64-3.6/fortranobject.o /tmp/tmpafj_6iz9/rwgt.o /tmp/tmpafj_6iz9/tmp/tmpafj_6iz9/src.linux-x86_64-3.6/rwgt2py-f2pywrappers.o -L../lib/ -L/home/sabidi/SusHi/LHAPDF-Install/lib -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/usr/lib/gcc/x86_64-linux-gnu/7 -lpdf -lLHAPDF -lLHAPDF -lstdc++ -lgfortran -o ./rwgt2py.cpython-36m-x86_64-linux-gnu.so
Removing build directory /tmp/tmpafj_6iz9

3) "python" and "import rwgt2py" gives:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named rwgt2py

4) "which f2py" gives:
/home/sabidi/.local/bin/f2py

Finally, the debug.log file is as follows:

#************************************************************
#* MadGraph5_aMC@NLO *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 5.2.6.5 20xx-xx-xx *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* and *
#* http://amcatnlo.cern.ch *
#* *
#************************************************************
#* *
#* Command File for aMCatNLO *
#* *
#* run as ./bin/aMCatNLO.py filename *
#* *
#************************************************************
reweight run_02 -from_cards
Traceback (most recent call last):
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/topMass/bin/internal/extended_cmd.py", line 1514, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/topMass/bin/internal/extended_cmd.py", line 1463, in onecmd_orig
    return func(arg, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/topMass/bin/internal/common_run_interface.py", line 2142, in do_reweight
    reweight_cmd.import_command_file(path)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/extended_cmd.py", line 1660, in import_command_file
    self.exec_cmd(line, precmd=True)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/extended_cmd.py", line 1543, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/extended_cmd.py", line 1463, in onecmd_orig
    return func(arg, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/various/misc.py", line 100, in f_with_no_logger
    out = f(self, *args, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/reweight_interface.py", line 487, in do_launch
    self.create_standalone_directory()
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/various/misc.py", line 100, in f_with_no_logger
    out = f(self, *args, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/reweight_interface.py", line 1601, in create_standalone_directory
    mymod = __import__('%s.Source.rwgt2py' % data['paths'][1], globals(), locals(), [],-1)
ImportError: No module named rwgt2py
Value of current Options:
              text_editor : None
              web_browser : None
        cluster_temp_path : None
                  timeout : 60
       cluster_local_path : None
            cluster_queue : None
         madanalysis_path : None
                   lhapdf : lhapdf-config
             cluster_size : 100
           cluster_memory : None
                    pjfry : None
    cluster_status_update : (600, 30)
             cluster_time : None
            f2py_compiler : None
                    ninja : /home/sabidi/SusHi/MG5_aMC_v2_6_5/HEPTools/lib
               hepmc_path : None
             pythia8_path : None
                hwpp_path : None
   automatic_html_opening : True
       cluster_retry_wait : 300
             stdout_level : None
          pythia-pgs_path : None
                 mg5_path : /home/sabidi/SusHi/MG5_aMC_v2_6_5
                  td_path : None
             delphes_path : None
              thepeg_path : None
             cluster_type : condor
        madanalysis5_path : None
      exrootanalysis_path : None
         fortran_compiler : None
                  nb_core : 4
                  collier : /home/sabidi/SusHi/MG5_aMC_v2_6_5/HEPTools/lib
              auto_update : 7
         cluster_nb_retry : 1
               eps_viewer : None
             syscalc_path : None
                  fastjet : None
                    golem : None
             cpp_compiler : None
      notification_center : True
                 run_mode : 2
#************************************************************
#* MadGraph5_aMC@NLO *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 2.6.5 2018-02-03 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* *
#************************************************************
#* *
#* Command File for MadGraph5_aMC@NLO *
#* *
#* run as ./bin/mg5_aMC filename *
#* *
#************************************************************
set default_unset_couplings 99
set group_subprocesses Auto
set ignore_six_quark_processes False
set loop_optimized_output True
set loop_color_flows False
set gauge unitary
set complex_mass_scheme False
set max_npoint_for_channel 0
import model HC_NLO_X0_UFO-heft
define p = g u c d s u~ c~ d~ s~
define j = g u c d s u~ c~ d~ s~
define l+ = e+ mu+
define l- = e- mu-
define vl = ve vm vt
define vl~ = ve~ vm~ vt~
define p = 21 2 4 1 3 -2 -4 -1 -3 5 -5 # pass to 5 flavors
define j = p
generate p p > x0 [QCD]
add process p p > x0 j [QCD]
add process p p > x0 j j [QCD]
output topMass
######################################################################
## Process generated with '-heft' model restrictions ##
## 5F scheme (MB=0) ##
## GLUON FUSION AT NLO using the Higgs Effective Field Theory ##
## (i.e. in the limit Mtop->infinity) ##
## ##
## These restrictions should be used only to generate ##
## X0 (plus jets) in the gluon fusion channel ##
## ##
## NB: ##
## Please be sure that before generating this process, ##
## you have correctly set the content of the multiparticles ##
## 'p' (proton) and 'j' (jet) inside MG5_aMC, ##
## accordingly to the massless flavour scheme ##
## 5F: p, j = g d d~ u u~ s s~ c c~ b b~ ##
## ##
## Please be sure that you have filtered out all the top quark ##
## loops using '/ t' in the generation command ##
######################################################################

###################################
## INFORMATION FOR FRBLOCK
###################################
Block frblock
    1 1.000000e+03 # Lambda
    2 1.000000e+00 # cosa
    3 1.000000e+00 # kSM
    8 1.000000e+00 # kHll
    9 1.000000e+00 # kAll
   10 1.000000e+00 # kHaa
   11 1.000000e+00 # kAaa
   12 1.000000e+00 # kHza
   13 1.000000e+00 # kAza
   14 1.000000e+00 # kHgg
   15 1.000000e+00 # kAgg
   16 0.000000e+00 # kHzz
   17 0.000000e+00 # kAzz
   18 0.000000e+00 # kHww
   19 0.000000e+00 # kAww
   20 0.000000e+00 # kHda
   21 0.000000e+00 # kHdz
   22 0.000000e+00 # kHdwR (real part of kHdw)
   23 0.000000e+00 # kHdwI (imaginary part of kHdw)

###################################
### INFORMATION FOR LOOP
####################################
Block loop
  1 9.118800e+01 # MU_R

###################################
## INFORMATION FOR SMINPUTS
###################################
Block SMINPUTS
    1 1.325070e+02 # aEWM1
    2 1.166390e-05 # Gf
    3 1.180000e-01 # aS

###################################
## INFORMATION FOR MASS
###################################
Block MASS
    6 1.730000e+02 # MT
   15 1.777000e+00 # MTA
   23 9.118800e+01 # MZ
   25 1.250000e+02 # MX0
## Dependent parameters, given by model restrictions.
## Those values should be edited following the
## analytical expression. MG5 ignores those values
## but they are important for interfacing the output of MG5
## to external program such as Pythia.
  1 0.000000 # d : 0.0
  2 0.000000 # u : 0.0
  3 0.000000 # s : 0.0
  4 0.000000 # c : 0.0
  5 0.000000 # b : 0.0
  11 0.000000 # e- : 0.0
  12 0.000000 # ve : 0.0
  13 0.000000 # mu- : 0.0
  14 0.000000 # vm : 0.0
  16 0.000000 # vt : 0.0
  21 0.000000 # g : 0.0
  22 0.000000 # a : 0.0
  24 80.419002 # w+ : cmath.sqrt(MZ__exp__2/2. + cmath.sqrt(MZ__exp__4/4. - (aEW*cmath.pi*MZ__exp__2)/(Gf*sqrt__2)))
  82 0.000000 # gh : 0.0
###################################
## INFORMATION FOR YUKAWA
###################################
Block YUKAWA
   15 1.777000e+00 # ymtau

###################################
## INFORMATION FOR DECAY
###################################
DECAY 6 1.491500e+00 # top width
DECAY 23 2.441404e+00 # Z width
DECAY 24 2.047600e+00 # W width
DECAY 25 4.070000e-03 # X0 width
## Dependent parameters, given by model restrictions.
## Those values should be edited following the
## analytical expression. MG5 ignores those values
## but they are important for interfacing the output of MG5
## to external program such as Pythia.
DECAY 1 0.000000 # d : 0.0
DECAY 2 0.000000 # u : 0.0
DECAY 3 0.000000 # s : 0.0
DECAY 4 0.000000 # c : 0.0
DECAY 5 0.000000 # b : 0.0
DECAY 11 0.000000 # e- : 0.0
DECAY 12 0.000000 # ve : 0.0
DECAY 13 0.000000 # mu- : 0.0
DECAY 14 0.000000 # vm : 0.0
DECAY 15 0.000000 # ta- : 0.0
DECAY 16 0.000000 # vt : 0.0
DECAY 21 0.000000 # g : 0.0
DECAY 22 0.000000 # a : 0.0
DECAY 82 0.000000 # gh : 0.0
#===========================================================
# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)
#===========================================================

Block QNUMBERS 82 # gh
        1 0 # 3 times electric charge
        2 1 # number of spin states (2S+1)
        3 8 # colour rep (1: singlet, 3: triplet, 8: octet)
        4 1 # Particle/Antiparticle distinction (0=own anti)

(and the rest is the run_card which I can copy as well if it's helpful!)

Thanks!
-Maddie

Hi,

So looks like the compilations works correctly but creates code for python3 and not for python2.
So you need to specify the path for f2py (for python2) in the configuration file of MG5aMC, and then it should work.

Cheers,

Olivier

Hi Oliver,

Thanks a lot of the help! This definitely fixed the original issues, however are running in another issue:

The log file is as follow:

sabidi@andrea-Dell:~/SusHi/MG5_aMC_v2_6_5/topMassTest$ cat run_01_tag_2_debug.log
#************************************************************
#* MadGraph5_aMC@NLO *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 5.2.6.5 20xx-xx-xx *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* and *
#* http://amcatnlo.cern.ch *
#* *
#************************************************************
#* *
#* Command File for aMCatNLO *
#* *
#* run as ./bin/aMCatNLO.py filename *
#* *
#************************************************************
reweight run_01 -from_cards
Traceback (most recent call last):
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/topMassTest/bin/internal/extended_cmd.py", line 1514, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/topMassTest/bin/internal/extended_cmd.py", line 1463, in onecmd_orig
    return func(arg, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/topMassTest/bin/internal/common_run_interface.py", line 2142, in do_reweight
    reweight_cmd.import_command_file(path)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/extended_cmd.py", line 1660, in import_command_file
    self.exec_cmd(line, precmd=True)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/extended_cmd.py", line 1543, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/extended_cmd.py", line 1463, in onecmd_orig
    return func(arg, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/various/misc.py", line 100, in f_with_no_logger
    out = f(self, *args, **opt)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/reweight_interface.py", line 546, in do_launch
    weight = self.calculate_weight(event)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/reweight_interface.py", line 954, in calculate_weight
    return self.calculate_nlo_weight(event)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/reweight_interface.py", line 1023, in calculate_nlo_weight
    w_new = self.calculate_matrix_element(cevent, 1)
  File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/reweight_interface.py", line 1157, in calculate_matrix_element
    orig_order, Pdir, hel_dict = self.id_to_path_second[tag]
KeyError: ((21, 21), (21, 25))
Value of current Options:
              text_editor : None
              web_browser : None
        cluster_temp_path : None
                  timeout : 60
       cluster_local_path : None
            cluster_queue : None
         madanalysis_path : None
                   lhapdf : lhapdf-config
             cluster_size : 100
           cluster_memory : None
                    pjfry : None
    cluster_status_update : (600, 30)
             cluster_time : None
            f2py_compiler : /usr/bin/f2py
                    ninja : /home/sabidi/SusHi/MG5_aMC_v2_6_5/HEPTools/lib
               hepmc_path : None
             pythia8_path : None
                hwpp_path : None
   automatic_html_opening : True
       cluster_retry_wait : 300
             stdout_level : None
          pythia-pgs_path : None
                 mg5_path : /home/sabidi/SusHi/MG5_aMC_v2_6_5
                  td_path : None
             delphes_path : None
              thepeg_path : None
             cluster_type : condor
        madanalysis5_path : None
      exrootanalysis_path : None
         fortran_compiler : None
                  nb_core : 4
                  collier : /home/sabidi/SusHi/MG5_aMC_v2_6_5/HEPTools/lib
              auto_update : 7
         cluster_nb_retry : 1
               eps_viewer : None
             syscalc_path : None
                  fastjet : None
                    golem : None
             cpp_compiler : None
      notification_center : True
                 run_mode : 2
#************************************************************
#* MadGraph5_aMC@NLO *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 2.6.5 2018-02-03 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https://server06.fynu.ucl.ac.be/projects/madgraph *
#* *
#************************************************************
#* *
#* Command File for MadGraph5_aMC@NLO *
#* *
#* run as ./bin/mg5_aMC filename *
#* *
#************************************************************
set default_unset_couplings 99
set group_subprocesses Auto
set ignore_six_quark_processes False
set loop_optimized_output True
set loop_color_flows False
set gauge unitary
set complex_mass_scheme False
set max_npoint_for_channel 0
import model sm
define p = g u c d s u~ c~ d~ s~
define j = g u c d s u~ c~ d~ s~
define l+ = e+ mu+
define l- = e- mu-
define vl = ve vm vt
define vl~ = ve~ vm~ vt~
import model HC_NLO_X0_UFO-heft
define p = 21 2 4 1 3 -2 -4 -1 -3 5 -5 # pass to 5 flavors
define j = p
generate p p > x0 [QCD]
output topMassTest
######################################################################
## Process generated with '-heft' model restrictions ##
## 5F scheme (MB=0) ##
## GLUON FUSION AT NLO using the Higgs Effective Field Theory ##
## (i.e. in the limit Mtop->infinity) ##
## ##
## These restrictions should be used only to generate ##
## X0 (plus jets) in the gluon fusion channel ##
## ##
## NB: ##
## Please be sure that before generating this process, ##
## you have correctly set the content of the multiparticles ##
## 'p' (proton) and 'j' (jet) inside MG5_aMC, ##
## accordingly to the massless flavour scheme ##
## 5F: p, j = g d d~ u u~ s s~ c c~ b b~ ##
## ##
## Please be sure that you have filtered out all the top quark ##
## loops using '/ t' in the generation command ##
######################################################################

###################################
## INFORMATION FOR FRBLOCK
###################################
Block frblock
    1 1.000000e+03 # Lambda
    2 1.000000e+00 # cosa
    3 1.000000e+00 # kSM
    8 1.000000e+00 # kHll
    9 1.000000e+00 # kAll
   10 1.000000e+00 # kHaa
   11 1.000000e+00 # kAaa
   12 1.000000e+00 # kHza
   13 1.000000e+00 # kAza
   14 1.000000e+00 # kHgg
   15 1.000000e+00 # kAgg
   16 0.000000e+00 # kHzz
   17 0.000000e+00 # kAzz
   18 0.000000e+00 # kHww
   19 0.000000e+00 # kAww
   20 0.000000e+00 # kHda
   21 0.000000e+00 # kHdz
   22 0.000000e+00 # kHdwR (real part of kHdw)
   23 0.000000e+00 # kHdwI (imaginary part of kHdw)

###################################
### INFORMATION FOR LOOP
####################################
Block loop
  1 9.118800e+01 # MU_R

###################################
## INFORMATION FOR SMINPUTS
###################################
Block SMINPUTS
    1 1.325070e+02 # aEWM1
    2 1.166390e-05 # Gf
    3 1.180000e-01 # aS

###################################
## INFORMATION FOR MASS
###################################
Block MASS
    6 1.730000e+02 # MT
   15 1.777000e+00 # MTA
   23 9.118800e+01 # MZ
   25 1.250000e+02 # MX0
## Dependent parameters, given by model restrictions.
## Those values should be edited following the
## analytical expression. MG5 ignores those values
## but they are important for interfacing the output of MG5
## to external program such as Pythia.
  1 0.000000 # d : 0.0
  2 0.000000 # u : 0.0
  3 0.000000 # s : 0.0
  4 0.000000 # c : 0.0
  5 0.000000 # b : 0.0
  11 0.000000 # e- : 0.0
  12 0.000000 # ve : 0.0
  13 0.000000 # mu- : 0.0
  14 0.000000 # vm : 0.0
  16 0.000000 # vt : 0.0
  21 0.000000 # g : 0.0
  22 0.000000 # a : 0.0
  24 80.419002 # w+ : cmath.sqrt(MZ__exp__2/2. + cmath.sqrt(MZ__exp__4/4. - (aEW*cmath.pi*MZ__exp__2)/(Gf*sqrt__2)))
  82 0.000000 # gh : 0.0

###################################
## INFORMATION FOR YUKAWA
###################################
Block YUKAWA
   15 1.777000e+00 # ymtau

###################################
## INFORMATION FOR DECAY
###################################
DECAY 6 1.491500e+00 # top width
DECAY 23 2.441404e+00 # Z width
DECAY 24 2.047600e+00 # W width
DECAY 25 4.070000e-03 # X0 width
## Dependent parameters, given by model restrictions.
## Those values should be edited following the
## analytical expression. MG5 ignores those values
## but they are important for interfacing the output of MG5
## to external program such as Pythia.
DECAY 1 0.000000 # d : 0.0
DECAY 2 0.000000 # u : 0.0
DECAY 3 0.000000 # s : 0.0
DECAY 4 0.000000 # c : 0.0
DECAY 5 0.000000 # b : 0.0
DECAY 11 0.000000 # e- : 0.0
DECAY 12 0.000000 # ve : 0.0
DECAY 13 0.000000 # mu- : 0.0
DECAY 14 0.000000 # vm : 0.0
DECAY 15 0.000000 # ta- : 0.0
DECAY 16 0.000000 # vt : 0.0
DECAY 21 0.000000 # g : 0.0
DECAY 22 0.000000 # a : 0.0
DECAY 82 0.000000 # gh : 0.0
#===========================================================
# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)
#===========================================================

Block QNUMBERS 82 # gh
        1 0 # 3 times electric charge
        2 1 # number of spin states (2S+1)
        3 8 # colour rep (1: singlet, 3: triplet, 8: octet)
        4 1 # Particle/Antiparticle distinction (0=own anti)
#***********************************************************************
# MadGraph5_aMC@NLO *
# *
# run_card.dat aMC@NLO *
# *
# This file is used to set the parameters of the run. *
# *
# Some notation/conventions: *
# *
# Lines starting with a hash (#) are info or comments *
# *
# mind the format: value = variable ! comment *
# *
# Some of the values of variables can be list. These can either be *
# comma or space separated. *
# *
# To display additional parameter, you can use the command: *
# update to_full *
#***********************************************************************
#
#*******************
# Running parameters
#*******************
#
#***********************************************************************
# Tag name for the run (one word) *
#***********************************************************************
  tag_1 = run_tag ! name of the run
#***********************************************************************
# Number of LHE events (and their normalization) and the required *
# (relative) accuracy on the Xsec. *
# These values are ignored for fixed order runs *
#***********************************************************************
  2000 = nevents ! Number of unweighted events requested
  0.001 = req_acc ! Required accuracy (-1=auto determined from nevents)
  -1 = nevt_job ! Max number of events per job in event generation.
                 ! (-1= no split).
#***********************************************************************
# Normalize the weights of LHE events such that they sum or average to *
# the total cross section *
#***********************************************************************
  average = event_norm ! valid settings: average, sum, bias
#***********************************************************************
# Number of points per itegration channel (ignored for aMC@NLO runs) *
#***********************************************************************
  0.01 = req_acc_fo ! Required accuracy (-1=ignored, and use the
                     ! number of points and iter. below)
# These numbers are ignored except if req_acc_FO is equal to -1
  5000 = npoints_fo_grid ! number of points to setup grids
  4 = niters_fo_grid ! number of iter. to setup grids
  10000 = npoints_fo ! number of points to compute Xsec
  6 = niters_fo ! number of iter. to compute Xsec
#***********************************************************************
# Random number seed *
#***********************************************************************
  0 = iseed ! rnd seed (0=assigned automatically=default))
#***********************************************************************
# Collider type and energy *
#***********************************************************************
  1 = lpp1 ! beam 1 type (0 = no PDF)
  1 = lpp2 ! beam 2 type (0 = no PDF)
  6500.0 = ebeam1 ! beam 1 energy in GeV
  6500.0 = ebeam2 ! beam 2 energy in GeV
#***********************************************************************
# PDF choice: this automatically fixes also alpha_s(MZ) and its evol. *
#***********************************************************************
  lhapdf = pdlabel ! PDF set
  244600 = lhaid ! If pdlabel=lhapdf, this is the lhapdf number. Only
              ! numbers for central PDF sets are allowed. Can be a list;
              ! PDF sets beyond the first are included via reweighting.
#***********************************************************************
# Include the NLO Monte Carlo subtr. terms for the following parton *
# shower (HERWIG6 | HERWIGPP | PYTHIA6Q | PYTHIA6PT | PYTHIA8) *
# WARNING: PYTHIA6PT works only for processes without FSR!!!! *
#***********************************************************************
  PYTHIA8 = parton_shower
  1.0 = shower_scale_factor ! multiply default shower starting
                                  ! scale by this factor
#***********************************************************************
# Renormalization and factorization scales *
# (Default functional form for the non-fixed scales is the sum of *
# the transverse masses divided by two of all final state particles *
# and partons. This can be changed in SubProcesses/set_scales.f or via *
# dynamical_scale_choice option) *
#***********************************************************************
  False = fixed_ren_scale ! if .true. use fixed ren scale
  False = fixed_fac_scale ! if .true. use fixed fac scale
  91.118 = mur_ref_fixed ! fixed ren reference scale
  91.118 = muf_ref_fixed ! fixed fact reference scale
  -1 = dynamical_scale_choice ! Choose one (or more) of the predefined
           ! dynamical choices. Can be a list; scale choices beyond the
           ! first are included via reweighting
  1.0 = mur_over_ref ! ratio of current muR over reference muR
  1.0 = muf_over_ref ! ratio of current muF over reference muF
#***********************************************************************
# Reweight variables for scale dependence and PDF uncertainty *
#***********************************************************************
  1.0, 2.0, 0.5 = rw_rscale ! muR factors to be included by reweighting
  1.0, 2.0, 0.5 = rw_fscale ! muF factors to be included by reweighting
  True = reweight_scale ! Reweight to get scale variation using the
            ! rw_rscale and rw_fscale factors. Should be a list of
            ! booleans of equal length to dynamical_scale_choice to
            ! specify for which choice to include scale dependence.
  False = reweight_pdf ! Reweight to get PDF uncertainty. Should be a
            ! list booleans of equal length to lhaid to specify for
            ! which PDF set to include the uncertainties.
#***********************************************************************
# Store reweight information in the LHE file for off-line model- *
# parameter reweighting at NLO+PS accuracy *
#***********************************************************************
  True = store_rwgt_info ! Store info for reweighting in LHE file
#***********************************************************************
# ickkw parameter: *
# 0: No merging *
# 3: FxFx Merging - WARNING! Applies merging only at the hard-event *
# level. After showering an MLM-type merging should be applied as *
# well. See http://amcatnlo.cern.ch/FxFx_merging.htm for details. *
# 4: UNLOPS merging (with pythia8 only). No interface from within *
# MG5_aMC available, but available in Pythia8. *
# -1: NNLL+NLO jet-veto computation. See arxiv:1412.8408 [hep-ph]. *
#***********************************************************************
  3 = ickkw
#***********************************************************************
#
#***********************************************************************
# BW cutoff (M+/-bwcutoff*Gamma). Determines which resonances are *
# written in the LHE event file *
#***********************************************************************
  15.0 = bwcutoff
#***********************************************************************
# Cuts on the jets. Jet clustering is performed by FastJet. *
# - When matching to a parton shower, these generation cuts should be *
# considerably softer than the analysis cuts. *
# - More specific cuts can be specified in SubProcesses/cuts.f *
#***********************************************************************
  1.0 = jetalgo ! FastJet jet algorithm (1=kT, 0=C/A, -1=anti-kT)
  0.7 = jetradius ! The radius parameter for the jet algorithm
  10.0 = ptj ! Min jet transverse momentum
  -1.0 = etaj ! Max jet abs(pseudo-rap) (a value .lt.0 means no cut)
#***********************************************************************
# Cuts on the charged leptons (e+, e-, mu+, mu-, tau+ and tau-) *
# More specific cuts can be specified in SubProcesses/cuts.f *
#***********************************************************************
  0.0 = ptl ! Min lepton transverse momentum
  -1.0 = etal ! Max lepton abs(pseudo-rap) (a value .lt.0 means no cut)
  0.0 = drll ! Min distance between opposite sign lepton pairs
  0.0 = drll_sf ! Min distance between opp. sign same-flavor lepton pairs
  0.0 = mll ! Min inv. mass of all opposite sign lepton pairs
  30.0 = mll_sf ! Min inv. mass of all opp. sign same-flavor lepton pairs
#***********************************************************************
# Photon-isolation cuts, according to hep-ph/9801442. When ptgmin=0, *
# all the other parameters are ignored. *
# More specific cuts can be specified in SubProcesses/cuts.f *
#***********************************************************************
  20.0 = ptgmin ! Min photon transverse momentum
  -1.0 = etagamma ! Max photon abs(pseudo-rap)
  0.4 = r0gamma ! Radius of isolation code
  1.0 = xn ! n parameter of eq.(3.4) in hep-ph/9801442
  1.0 = epsgamma ! epsilon_gamma parameter of eq.(3.4) in hep-ph/9801442
  True = isoem ! isolate photons from EM energy (photons and leptons)
#***********************************************************************
# Cuts associated to MASSIVE particles identified by their PDG codes. *
# All cuts are applied to both particles and anti-particles, so use *
# POSITIVE PDG CODES only. Example of the syntax is {6 : 100} or *
# {6:100, 25:200} for multiple particles *
#***********************************************************************
  {} = pt_min_pdg ! Min pT for a massive particle
  {} = pt_max_pdg ! Max pT for a massive particle
  {} = mxx_min_pdg ! inv. mass for any pair of (anti)particles
#***********************************************************************
# For aMCfast+APPLGRID use in PDF fitting (http://amcfast.hepforge.org)*
#***********************************************************************
  0 = iappl ! aMCfast switch (0=OFF, 1=prepare grids, 2=fill grids)
#***********************************************************************

And the inputs instructions that we are using (based on Rikkert suggestion, and only doing 0j for quick testing):

import model HC_NLO_X0_UFO-heft
generate p p > x0 / t t~ [QCD]
#add process p p > x0 j / t t~ [QCD]
#add process p p > x0 j j / t t~ [QCD]

output topMassREWEIGHTH
launch topMassREWEIGHTH # launch the run with EFT theory
shower=OFF
reweight=ON # ask for re-weighting
set ickkw 3
set store_rwgt_info T # should be automatically set but better to do it anyway.
set pdlabel lhapdf # do not use internal pdf to avoid missmatch with lhapdf due to the lhapdf bug
set parton_shower PYTHIA8
set nevents 2000
set req_acc 0.001
edit reweight_card --before_line='launch' change mode NLO_tree # set to loop_improved mode
edit reweight_card --before_line='launch' change output 2.0. # specify that we request a new output file (lhef version 2)
edit reweight_card --before_line='launch' change model loop_sm-no_b_mass
edit reweight_card --before_line='launch' change process p p > h [QCD]
#edit reweight_card --before_line='launch' change process p p > h j [QCD] --add
#edit reweight_card --before_line='launch' change process p p > h j j QED<=1 [QCD] --add
# Job are done now, just have to force to recompute the scale/pdf uncertainty
launch topMassREWEIGHTH -i
systematics topMassREWEIGHTH/Events/run_01/events.lhe.gz --remove_wgts=all --start_id=1001 --dyn=-1

Thanks a lotm
Haider

Hi,

It complains that you do not have specify any matrix-element to reweight
(counter-)event with g g > h g topology.
So you need to add the line

> edit reweight_card --before_line='launch' change process p p > h j [QCD] --add

in order to provide the associated matrix-element.

Cheers,

Olivier

> On 12 Dec 2019, at 20:21, Syed Haider Abidi <email address hidden> wrote:
>
> Question #686780 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/686780
>
> Syed Haider Abidi posted a new comment:
> Hi Oliver,
>
> Thanks a lot of the help! This definitely fixed the original issues,
> however are running in another issue:
>
> The log file is as follow:
>
> sabidi@andrea-Dell:~/SusHi/MG5_aMC_v2_6_5/topMassTest$ cat run_01_tag_2_debug.log
> #************************************************************
> #* MadGraph5_aMC@NLO *
> #* *
> #* * * *
> #* * * * * *
> #* * * * * 5 * * * * *
> #* * * * * *
> #* * * *
> #* *
> #* *
> #* VERSION 5.2.6.5 20xx-xx-xx *
> #* *
> #* The MadGraph5_aMC@NLO Development Team - Find us at *
> #* https://server06.fynu.ucl.ac.be/projects/madgraph *
> #* and *
> #* http://amcatnlo.cern.ch *
> #* *
> #************************************************************
> #* *
> #* Command File for aMCatNLO *
> #* *
> #* run as ./bin/aMCatNLO.py filename *
> #* *
> #************************************************************
> reweight run_01 -from_cards
> Traceback (most recent call last):
> File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/topMassTest/bin/internal/extended_cmd.py", line 1514, in onecmd
> return self.onecmd_orig(line, **opt)
> File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/topMassTest/bin/internal/extended_cmd.py", line 1463, in onecmd_orig
> return func(arg, **opt)
> File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/topMassTest/bin/internal/common_run_interface.py", line 2142, in do_reweight
> reweight_cmd.import_command_file(path)
> File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/extended_cmd.py", line 1660, in import_command_file
> self.exec_cmd(line, precmd=True)
> File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/extended_cmd.py", line 1543, in exec_cmd
> stop = Cmd.onecmd_orig(current_interface, line, **opt)
> File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/extended_cmd.py", line 1463, in onecmd_orig
> return func(arg, **opt)
> File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/various/misc.py", line 100, in f_with_no_logger
> out = f(self, *args, **opt)
> File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/reweight_interface.py", line 546, in do_launch
> weight = self.calculate_weight(event)
> File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/reweight_interface.py", line 954, in calculate_weight
> return self.calculate_nlo_weight(event)
> File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/reweight_interface.py", line 1023, in calculate_nlo_weight
> w_new = self.calculate_matrix_element(cevent, 1)
> File "/home/sabidi/SusHi/MG5_aMC_v2_6_5/madgraph/interface/reweight_interface.py", line 1157, in calculate_matrix_element
> orig_order, Pdir, hel_dict = self.id_to_path_second[tag]
> KeyError: ((21, 21), (21, 25))
> Value of current Options:
> text_editor : None
> web_browser : None
> cluster_temp_path : None
> timeout : 60
> cluster_local_path : None
> cluster_queue : None
> madanalysis_path : None
> lhapdf : lhapdf-config
> cluster_size : 100
> cluster_memory : None
> pjfry : None
> cluster_status_update : (600, 30)
> cluster_time : None
> f2py_compiler : /usr/bin/f2py
> ninja : /home/sabidi/SusHi/MG5_aMC_v2_6_5/HEPTools/lib
> hepmc_path : None
> pythia8_path : None
> hwpp_path : None
> automatic_html_opening : True
> cluster_retry_wait : 300
> stdout_level : None
> pythia-pgs_path : None
> mg5_path : /home/sabidi/SusHi/MG5_aMC_v2_6_5
> td_path : None
> delphes_path : None
> thepeg_path : None
> cluster_type : condor
> madanalysis5_path : None
> exrootanalysis_path : None
> fortran_compiler : None
> nb_core : 4
> collier : /home/sabidi/SusHi/MG5_aMC_v2_6_5/HEPTools/lib
> auto_update : 7
> cluster_nb_retry : 1
> eps_viewer : None
> syscalc_path : None
> fastjet : None
> golem : None
> cpp_compiler : None
> notification_center : True
> run_mode : 2
> #************************************************************
> #* MadGraph5_aMC@NLO *
> #* *
> #* * * *
> #* * * * * *
> #* * * * * 5 * * * * *
> #* * * * * *
> #* * * *
> #* *
> #* *
> #* VERSION 2.6.5 2018-02-03 *
> #* *
> #* The MadGraph5_aMC@NLO Development Team - Find us at *
> #* https://server06.fynu.ucl.ac.be/projects/madgraph *
> #* *
> #************************************************************
> #* *
> #* Command File for MadGraph5_aMC@NLO *
> #* *
> #* run as ./bin/mg5_aMC filename *
> #* *
> #************************************************************
> set default_unset_couplings 99
> set group_subprocesses Auto
> set ignore_six_quark_processes False
> set loop_optimized_output True
> set loop_color_flows False
> set gauge unitary
> set complex_mass_scheme False
> set max_npoint_for_channel 0
> import model sm
> define p = g u c d s u~ c~ d~ s~
> define j = g u c d s u~ c~ d~ s~
> define l+ = e+ mu+
> define l- = e- mu-
> define vl = ve vm vt
> define vl~ = ve~ vm~ vt~
> import model HC_NLO_X0_UFO-heft
> define p = 21 2 4 1 3 -2 -4 -1 -3 5 -5 # pass to 5 flavors
> define j = p
> generate p p > x0 [QCD]
> output topMassTest
> ######################################################################
> ## Process generated with '-heft' model restrictions ##
> ## 5F scheme (MB=0) ##
> ## GLUON FUSION AT NLO using the Higgs Effective Field Theory ##
> ## (i.e. in the limit Mtop->infinity) ##
> ## ##
> ## These restrictions should be used only to generate ##
> ## X0 (plus jets) in the gluon fusion channel ##
> ## ##
> ## NB: ##
> ## Please be sure that before generating this process, ##
> ## you have correctly set the content of the multiparticles ##
> ## 'p' (proton) and 'j' (jet) inside MG5_aMC, ##
> ## accordingly to the massless flavour scheme ##
> ## 5F: p, j = g d d~ u u~ s s~ c c~ b b~ ##
> ## ##
> ## Please be sure that you have filtered out all the top quark ##
> ## loops using '/ t' in the generation command ##
> ######################################################################
>
> ###################################
> ## INFORMATION FOR FRBLOCK
> ###################################
> Block frblock
> 1 1.000000e+03 # Lambda
> 2 1.000000e+00 # cosa
> 3 1.000000e+00 # kSM
> 8 1.000000e+00 # kHll
> 9 1.000000e+00 # kAll
> 10 1.000000e+00 # kHaa
> 11 1.000000e+00 # kAaa
> 12 1.000000e+00 # kHza
> 13 1.000000e+00 # kAza
> 14 1.000000e+00 # kHgg
> 15 1.000000e+00 # kAgg
> 16 0.000000e+00 # kHzz
> 17 0.000000e+00 # kAzz
> 18 0.000000e+00 # kHww
> 19 0.000000e+00 # kAww
> 20 0.000000e+00 # kHda
> 21 0.000000e+00 # kHdz
> 22 0.000000e+00 # kHdwR (real part of kHdw)
> 23 0.000000e+00 # kHdwI (imaginary part of kHdw)
>
> ###################################
> ### INFORMATION FOR LOOP
> ####################################
> Block loop
> 1 9.118800e+01 # MU_R
>
> ###################################
> ## INFORMATION FOR SMINPUTS
> ###################################
> Block SMINPUTS
> 1 1.325070e+02 # aEWM1
> 2 1.166390e-05 # Gf
> 3 1.180000e-01 # aS
>
> ###################################
> ## INFORMATION FOR MASS
> ###################################
> Block MASS
> 6 1.730000e+02 # MT
> 15 1.777000e+00 # MTA
> 23 9.118800e+01 # MZ
> 25 1.250000e+02 # MX0
> ## Dependent parameters, given by model restrictions.
> ## Those values should be edited following the
> ## analytical expression. MG5 ignores those values
> ## but they are important for interfacing the output of MG5
> ## to external program such as Pythia.
> 1 0.000000 # d : 0.0
> 2 0.000000 # u : 0.0
> 3 0.000000 # s : 0.0
> 4 0.000000 # c : 0.0
> 5 0.000000 # b : 0.0
> 11 0.000000 # e- : 0.0
> 12 0.000000 # ve : 0.0
> 13 0.000000 # mu- : 0.0
> 14 0.000000 # vm : 0.0
> 16 0.000000 # vt : 0.0
> 21 0.000000 # g : 0.0
> 22 0.000000 # a : 0.0
> 24 80.419002 # w+ : cmath.sqrt(MZ__exp__2/2. + cmath.sqrt(MZ__exp__4/4. - (aEW*cmath.pi*MZ__exp__2)/(Gf*sqrt__2)))
> 82 0.000000 # gh : 0.0
>
> ###################################
> ## INFORMATION FOR YUKAWA
> ###################################
> Block YUKAWA
> 15 1.777000e+00 # ymtau
>
> ###################################
> ## INFORMATION FOR DECAY
> ###################################
> DECAY 6 1.491500e+00 # top width
> DECAY 23 2.441404e+00 # Z width
> DECAY 24 2.047600e+00 # W width
> DECAY 25 4.070000e-03 # X0 width
> ## Dependent parameters, given by model restrictions.
> ## Those values should be edited following the
> ## analytical expression. MG5 ignores those values
> ## but they are important for interfacing the output of MG5
> ## to external program such as Pythia.
> DECAY 1 0.000000 # d : 0.0
> DECAY 2 0.000000 # u : 0.0
> DECAY 3 0.000000 # s : 0.0
> DECAY 4 0.000000 # c : 0.0
> DECAY 5 0.000000 # b : 0.0
> DECAY 11 0.000000 # e- : 0.0
> DECAY 12 0.000000 # ve : 0.0
> DECAY 13 0.000000 # mu- : 0.0
> DECAY 14 0.000000 # vm : 0.0
> DECAY 15 0.000000 # ta- : 0.0
> DECAY 16 0.000000 # vt : 0.0
> DECAY 21 0.000000 # g : 0.0
> DECAY 22 0.000000 # a : 0.0
> DECAY 82 0.000000 # gh : 0.0
> #===========================================================
> # QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)
> #===========================================================
>
> Block QNUMBERS 82 # gh
> 1 0 # 3 times electric charge
> 2 1 # number of spin states (2S+1)
> 3 8 # colour rep (1: singlet, 3: triplet, 8: octet)
> 4 1 # Particle/Antiparticle distinction (0=own anti)
> #***********************************************************************
> # MadGraph5_aMC@NLO *
> # *
> # run_card.dat aMC@NLO *
> # *
> # This file is used to set the parameters of the run. *
> # *
> # Some notation/conventions: *
> # *
> # Lines starting with a hash (#) are info or comments *
> # *
> # mind the format: value = variable ! comment *
> # *
> # Some of the values of variables can be list. These can either be *
> # comma or space separated. *
> # *
> # To display additional parameter, you can use the command: *
> # update to_full *
> #***********************************************************************
> #
> #*******************
> # Running parameters
> #*******************
> #
> #***********************************************************************
> # Tag name for the run (one word) *
> #***********************************************************************
> tag_1 = run_tag ! name of the run
> #***********************************************************************
> # Number of LHE events (and their normalization) and the required *
> # (relative) accuracy on the Xsec. *
> # These values are ignored for fixed order runs *
> #***********************************************************************
> 2000 = nevents ! Number of unweighted events requested
> 0.001 = req_acc ! Required accuracy (-1=auto determined from nevents)
> -1 = nevt_job ! Max number of events per job in event generation.
> ! (-1= no split).
> #***********************************************************************
> # Normalize the weights of LHE events such that they sum or average to *
> # the total cross section *
> #***********************************************************************
> average = event_norm ! valid settings: average, sum, bias
> #***********************************************************************
> # Number of points per itegration channel (ignored for aMC@NLO runs) *
> #***********************************************************************
> 0.01 = req_acc_fo ! Required accuracy (-1=ignored, and use the
> ! number of points and iter. below)
> # These numbers are ignored except if req_acc_FO is equal to -1
> 5000 = npoints_fo_grid ! number of points to setup grids
> 4 = niters_fo_grid ! number of iter. to setup grids
> 10000 = npoints_fo ! number of points to compute Xsec
> 6 = niters_fo ! number of iter. to compute Xsec
> #***********************************************************************
> # Random number seed *
> #***********************************************************************
> 0 = iseed ! rnd seed (0=assigned automatically=default))
> #***********************************************************************
> # Collider type and energy *
> #***********************************************************************
> 1 = lpp1 ! beam 1 type (0 = no PDF)
> 1 = lpp2 ! beam 2 type (0 = no PDF)
> 6500.0 = ebeam1 ! beam 1 energy in GeV
> 6500.0 = ebeam2 ! beam 2 energy in GeV
> #***********************************************************************
> # PDF choice: this automatically fixes also alpha_s(MZ) and its evol. *
> #***********************************************************************
> lhapdf = pdlabel ! PDF set
> 244600 = lhaid ! If pdlabel=lhapdf, this is the lhapdf number. Only
> ! numbers for central PDF sets are allowed. Can be a list;
> ! PDF sets beyond the first are included via reweighting.
> #***********************************************************************
> # Include the NLO Monte Carlo subtr. terms for the following parton *
> # shower (HERWIG6 | HERWIGPP | PYTHIA6Q | PYTHIA6PT | PYTHIA8) *
> # WARNING: PYTHIA6PT works only for processes without FSR!!!! *
> #***********************************************************************
> PYTHIA8 = parton_shower
> 1.0 = shower_scale_factor ! multiply default shower starting
> ! scale by this factor
> #***********************************************************************
> # Renormalization and factorization scales *
> # (Default functional form for the non-fixed scales is the sum of *
> # the transverse masses divided by two of all final state particles *
> # and partons. This can be changed in SubProcesses/set_scales.f or via *
> # dynamical_scale_choice option) *
> #***********************************************************************
> False = fixed_ren_scale ! if .true. use fixed ren scale
> False = fixed_fac_scale ! if .true. use fixed fac scale
> 91.118 = mur_ref_fixed ! fixed ren reference scale
> 91.118 = muf_ref_fixed ! fixed fact reference scale
> -1 = dynamical_scale_choice ! Choose one (or more) of the predefined
> ! dynamical choices. Can be a list; scale choices beyond the
> ! first are included via reweighting
> 1.0 = mur_over_ref ! ratio of current muR over reference muR
> 1.0 = muf_over_ref ! ratio of current muF over reference muF
> #***********************************************************************
> # Reweight variables for scale dependence and PDF uncertainty *
> #***********************************************************************
> 1.0, 2.0, 0.5 = rw_rscale ! muR factors to be included by reweighting
> 1.0, 2.0, 0.5 = rw_fscale ! muF factors to be included by reweighting
> True = reweight_scale ! Reweight to get scale variation using the
> ! rw_rscale and rw_fscale factors. Should be a list of
> ! booleans of equal length to dynamical_scale_choice to
> ! specify for which choice to include scale dependence.
> False = reweight_pdf ! Reweight to get PDF uncertainty. Should be a
> ! list booleans of equal length to lhaid to specify for
> ! which PDF set to include the uncertainties.
> #***********************************************************************
> # Store reweight information in the LHE file for off-line model- *
> # parameter reweighting at NLO+PS accuracy *
> #***********************************************************************
> True = store_rwgt_info ! Store info for reweighting in LHE file
> #***********************************************************************
> # ickkw parameter: *
> # 0: No merging *
> # 3: FxFx Merging - WARNING! Applies merging only at the hard-event *
> # level. After showering an MLM-type merging should be applied as *
> # well. See http://amcatnlo.cern.ch/FxFx_merging.htm for details. *
> # 4: UNLOPS merging (with pythia8 only). No interface from within *
> # MG5_aMC available, but available in Pythia8. *
> # -1: NNLL+NLO jet-veto computation. See arxiv:1412.8408 [hep-ph]. *
> #***********************************************************************
> 3 = ickkw
> #***********************************************************************
> #
> #***********************************************************************
> # BW cutoff (M+/-bwcutoff*Gamma). Determines which resonances are *
> # written in the LHE event file *
> #***********************************************************************
> 15.0 = bwcutoff
> #***********************************************************************
> # Cuts on the jets. Jet clustering is performed by FastJet. *
> # - When matching to a parton shower, these generation cuts should be *
> # considerably softer than the analysis cuts. *
> # - More specific cuts can be specified in SubProcesses/cuts.f *
> #***********************************************************************
> 1.0 = jetalgo ! FastJet jet algorithm (1=kT, 0=C/A, -1=anti-kT)
> 0.7 = jetradius ! The radius parameter for the jet algorithm
> 10.0 = ptj ! Min jet transverse momentum
> -1.0 = etaj ! Max jet abs(pseudo-rap) (a value .lt.0 means no cut)
> #***********************************************************************
> # Cuts on the charged leptons (e+, e-, mu+, mu-, tau+ and tau-) *
> # More specific cuts can be specified in SubProcesses/cuts.f *
> #***********************************************************************
> 0.0 = ptl ! Min lepton transverse momentum
> -1.0 = etal ! Max lepton abs(pseudo-rap) (a value .lt.0 means no cut)
> 0.0 = drll ! Min distance between opposite sign lepton pairs
> 0.0 = drll_sf ! Min distance between opp. sign same-flavor lepton pairs
> 0.0 = mll ! Min inv. mass of all opposite sign lepton pairs
> 30.0 = mll_sf ! Min inv. mass of all opp. sign same-flavor lepton pairs
> #***********************************************************************
> # Photon-isolation cuts, according to hep-ph/9801442. When ptgmin=0, *
> # all the other parameters are ignored. *
> # More specific cuts can be specified in SubProcesses/cuts.f *
> #***********************************************************************
> 20.0 = ptgmin ! Min photon transverse momentum
> -1.0 = etagamma ! Max photon abs(pseudo-rap)
> 0.4 = r0gamma ! Radius of isolation code
> 1.0 = xn ! n parameter of eq.(3.4) in hep-ph/9801442
> 1.0 = epsgamma ! epsilon_gamma parameter of eq.(3.4) in hep-ph/9801442
> True = isoem ! isolate photons from EM energy (photons and leptons)
> #***********************************************************************
> # Cuts associated to MASSIVE particles identified by their PDG codes. *
> # All cuts are applied to both particles and anti-particles, so use *
> # POSITIVE PDG CODES only. Example of the syntax is {6 : 100} or *
> # {6:100, 25:200} for multiple particles *
> #***********************************************************************
> {} = pt_min_pdg ! Min pT for a massive particle
> {} = pt_max_pdg ! Max pT for a massive particle
> {} = mxx_min_pdg ! inv. mass for any pair of (anti)particles
> #***********************************************************************
> # For aMCfast+APPLGRID use in PDF fitting (http://amcfast.hepforge.org)*
> #***********************************************************************
> 0 = iappl ! aMCfast switch (0=OFF, 1=prepare grids, 2=fill grids)
> #***********************************************************************
>
>
> And the inputs instructions that we are using (based on Rikkert
> suggestion, and only doing 0j for quick testing):
>
>
> import model HC_NLO_X0_UFO-heft
> generate p p > x0 / t t~ [QCD]
> #add process p p > x0 j / t t~ [QCD]
> #add process p p > x0 j j / t t~ [QCD]
>
> output topMassREWEIGHTH
> launch topMassREWEIGHTH # launch the run with EFT theory
> shower=OFF
> reweight=ON # ask for re-weighting
> set ickkw 3
> set store_rwgt_info T # should be automatically set but better to do it anyway.
> set pdlabel lhapdf # do not use internal pdf to avoid missmatch with lhapdf due to the lhapdf bug
> set parton_shower PYTHIA8
> set nevents 2000
> set req_acc 0.001
> edit reweight_card --before_line='launch' change mode NLO_tree # set to loop_improved mode
> edit reweight_card --before_line='launch' change output 2.0. # specify that we request a new output file (lhef version 2)
> edit reweight_card --before_line='launch' change model loop_sm-no_b_mass
> edit reweight_card --before_line='launch' change process p p > h [QCD]
> #edit reweight_card --before_line='launch' change process p p > h j [QCD] --add
> #edit reweight_card --before_line='launch' change process p p > h j j QED<=1 [QCD] --add
> # Job are done now, just have to force to recompute the scale/pdf uncertainty
> launch topMassREWEIGHTH -i
> systematics topMassREWEIGHTH/Events/run_01/events.lhe.gz --remove_wgts=all --start_id=1001 --dyn=-1
>
>
> Thanks a lotm
> Haider
>
> --
> 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 Maddie McKay for more information if necessary.

To post a message you must log in.