MadGraph overwrites entire param_card.dat when updating dependent parameter aS
Hi,
I have encountered a weird issue while helping a student with MadGraph. When generating the decays of a new particle using `generate n1 > all all` with a custom model (that works fine with my own install; I can attach it if needed), MadGraph seems to update the value of the strong coupling constant in order to match the one of its default PDF set.
INFO: Update the dependent parameter of the param_card.dat
WARNING: update the strong coupling value (alpha_s) to the value from the pdf selected: 0.13
So far, so good. However, instead of changing only the value of aS to 0.13 (from the model-specified default 0.118), it overwrites the entire param_card.dat, that has just been edited, thus discarding our changes (we checked that the file changed on-disk after our edits, and is then reset by MadGraph). This does not happen if aS is already set to 0.13, either manually or after running MadGraph a first time. This is quite unintuitive behaviour, and to me it looks like a bug. The expected behaviour would be to just "set aS 0.13" while preserving the values of the other parameters.
In order to find out which part of the code was responsible, we made param_card.dat read-only after editing it, in order to cause MadGraph to crash and produce a backtrace. The relevant part seems to be the following (I’ll attach the full logs below):
File "/Users/
self.
File "/Users/
self.
File "/Users/
param_
File "/Users/
open(
I should probably mention that the "build-in" PDFs do not seem to work in my student’s install, however the externally-
Here is the system information, in case it can be helpful:
- MadGraph5_aMC@NLO version 3.4.2 (2023-01-20)
- macOS Monterey 12.5
- Python 3.10.9 (installed within pyenv)
- $ pip freeze
attrs==22.2.0
click==8.1.3
cycler==0.11.0
jsonpatch==1.32
jsonpointer
jsonschema=
kiwisolver=
lxml==4.9.2
matplotlib=
numpy==1.24.2
pyhf==0.6.3
pyparsing=
pyrsistent=
python-
PyYAML==6.0
scipy==1.10.1
six==1.16.0
tqdm==4.64.1
Although we have figured out how to work around this issue, I would really appreciate if you could take a quick look at it, in case there is some bug hiding behind it. I have used the search function in Launchpad to search for similar issues, but I did not see anything that was obviously related.
I remain at your disposal should you need extra information, log files, etc...
Many thanks in advance,
Jean-Loup
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Olivier Mattelaer
- Solved:
- Last query:
- Last reply:
Revision history for this message
![]() |
#1 |
run_01_
---
<LesHouchesEvents version="3.0">
<header>
<!--
#******
# *
# MadGraph5_aMC@NLO *
# *
# Going Beyond *
# *
# http://
# http://
# http://
# *
# The MadGraph5_aMC@NLO team *
# *
#......
# *
# This file contains all the information necessary to reproduce *
# the events generated: *
# *
# 1. software version *
# 2. proc_card : code generation info including model *
# 3. param_card : model primary parameters in the LH format *
# 4. run_card : running parameters (collider and cuts) *
# 5. pythia_card : present only if pythia has been run *
# 6. pgs_card : present only if pgs has been run *
# 7. delphes_cards : present only if delphes has been run *
# *
# *
#******
-->
<MGVersion>
3.4.2
</MGVersion>
<MG5ProcCard>
<![CDATA[
#******
#* MadGraph5_aMC@NLO *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 3.4.2 2023-01-20 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https:/
#* *
#******
#* *
#* Command File for MadGraph5_aMC@NLO *
#* *
#* run as ./bin/mg5_aMC filename *
#* *
#******
set group_subprocesses Auto
set ignore_
set low_mem_
set complex_mass_scheme False
set include_
set gauge unitary
set loop_optimized_
set loop_color_flows False
set max_npoint_
set default_
set max_t_for_channel 99
set zerowidth_tchannel True
set nlo_mixed_expansion True
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 /Users/
_HeavyN_
generate n1 > all all
output /Users/
]]>
</MG5ProcCard>
<MGProcCard>
#******
# MadGraph/MadEvent *
# http://
# *
# proc_card.dat *
#******
# *
# This Files is generated by MADGRAPH 5 *
# *
# WARNING: This Files is generated for MADEVENT (compatibility issue)*
# This files is NOT a valid MG4 proc_card.dat *
# Running this in MG4 will NEVER reproduce the result of MG5*
# *
#******
#******
# Process(es) requested : mg2 input *
#******
# Begin PROCESS # This is TAG. Do not modify this line
n1 > all all #Process
# Be carefull the coupling are here in MG5 convention
end_coup # End the couplings input
done # this tells MG there are no more procs
# End PROCESS # This is TAG. Do not modify this line
#******
# Model information *
#******
# Begin MODEL # This is TAG. Do not modify this line
SM_HeavyN_
# End MODEL # This is TAG. Do not modify this line
#******
# Start multiparticle definitions *
#******
# Begin MULTIPARTICLES # This is TAG. Do not modify this line
# End MULTIPARTICLES # This is TAG. Do not modify this line
</MGProcCard>
<MGRunCard>
<![CDATA[
#******
# MadGraph5_aMC@NLO *
# *
# run_card.dat MadEvent *
# *
# This file is used to set the parameters of the run. *
# *
# Some notation/
# *
# Lines starting with a '# ' are info or comments *
# *
# mind the format: value = variable ! comment *
# *
# To display more options, you can type the command: *
# update to_full *
#******
#
#******
# Tag name for the run (one word) *
#******
tag_1 = run_tag ! name of the run
#******
# Number of events and rnd seed *
# Warning: Do not generate more than 1M events in a single run *
#******
10000 = nevents ! Number of unweighted events requested
21 = iseed ! rnd seed (0=assigned automatically=
#******
# Collider type and energy *
# lpp: 0=No PDF, 1=proton, -1=antiproton, 2=elastic photon of proton,*
# +/-3=PDF of electron/positron beam *
# +/-4=PDF of muon/antimuon beam *
#******
1 = lpp1 ! beam 1 type
1 = lpp2 ! beam 2 type
6500.0 = ebeam1 ! beam 1 total energy in GeV
6500.0 = ebeam2 ! beam 2 total energy in GeV
# To see polarised beam options: type "update beam_pol"
#******
# PDF CHOICE: this automatically fixes alpha_s and its evol. *
# pdlabel: lhapdf=LHAPDF (installation needed) [1412.7420] *
# iww=Improved Weizsaecker-
# eva=Effective W/Z/A Approx. [21yy.zzzzz] *
# none=No PDF, same as lhapdf with lppx=0 *
#******
nn23lo1 = pdlabel ! PDF set
230000 = lhaid ! if pdlabel=lhapdf, this is the lhapdf number
# To see heavy ion options: type "update ion_pdf"
#******
# Renormalization and factorization scales *
#******
False = fixed_ren_scale ! if .true. use fixed ren scale
False = fixed_fac_scale ! if .true. use fixed fac scale
91.188 = scale ! fixed ren scale
91.188 = dsqrt_q2fact1 ! fixed fact scale for pdf1
91.188 = dsqrt_q2fact2 ! fixed fact scale for pdf2
-1 = dynamical_
1.0 = scalefact ! scale factor for event-by-event scales
#******
# Type and output format
#******
False = gridpack !True = setting up the grid pack
-1.0 = time_of_flight ! threshold (in mm) below which the invariant livetime is not written (-1 means not written)
average = event_norm ! average/sum. Normalization of the weight in the LHEF
# To see MLM/CKKW merging options: type "update MLM" or "update CKKW"
#******
#
#******
# Phase-Space Optimization strategy (basic options)
#******
0 = nhel ! using helicities importance sampling or not.
2 = sde_strategy ! default integration strategy (hep-ph/2021.00773)
! 2 is new strategy (using only the denominator)
# To see advanced option for Phase-Space optimization: type "update psoptim"
#******
# Generation bias, check the wiki page below for more information: *
# 'cp3.irmp.
#******
None = bias_module ! Bias type of bias, [None, ptj_bias, -custom_folder-]
{} = bias_parameters ! Specifies the parameters of the module.
#
#******
# Parton level cuts definition *
#******
0.0 = dsqrt_shat ! minimal shat for full process
#
#
#******
# BW cutoff (M+/-bwcutoff*
#******
15.0 = bwcutoff ! (M+/-bwcutoff*
#******
# Standard Cuts *
#******
# Minimum and maximum pt's (for max, -1 means no cut) *
#******
0.0 = ptl ! minimum pt for the charged leptons
0.0 = misset ! minimum missing Et (sum of neutrino's momenta)
-1.0 = ptlmax ! maximum pt for the charged leptons
-1.0 = missetmax ! maximum missing Et (sum of neutrino's momenta)
{} = pt_min_pdg ! pt cut for other particles (use pdg code). Applied on particle and anti-particle
{} = pt_max_pdg ! pt cut for other particles (syntax e.g. {6: 100, 25: 50})
#
# For display option for energy cut in the partonic center of mass frame type 'update ecut'
#
#******
# Maximum and minimum absolute rapidity (for max, -1 means no cut) *
#******
-1.0 = etal ! max rap for the charged leptons
0.0 = etalmin ! main rap for the charged leptons
{} = eta_min_pdg ! rap cut for other particles (use pdg code). Applied on particle and anti-particle
{} = eta_max_pdg ! rap cut for other particles (syntax e.g. {6: 2.5, 23: 5})
#******
# Minimum and maximum DeltaR distance *
#******
#******
# Minimum and maximum invariant mass for pairs *
#******
{} = mxx_min_pdg ! min invariant mass of a pair of particles X/X~ (e.g. {6:250})
{'default': False} = mxx_only_
#******
# Inclusive cuts *
#******
0.0 = ptheavy ! minimum pt for at least one heavy final state
#******
# maximal pdg code for quark to be considered as a light jet *
# (otherwise b cuts are applied) *
#******
4 = maxjetflavor ! Maximum jet pdg code
#******
#
#******
# Store info for systematics studies *
# WARNING: Do not use for interference type of computation *
#******
False = use_syst ! Enable systematics studies
#
systematics = systematics_program ! none, systematics [python], SysCalc [depreceted, C++]
['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'] = systematics_
]]>
</MGRunCard>
<slha>
#######
## PARAM_CARD AUTOMATICALY GENERATED BY MG5 ####
#######
#######
## INFORMATION FOR ALPCOUPLINGS
#######
BLOCK ALPCOUPLINGS #
1 1.000000e-05 # fainverse
2 1.000000e+00 # cb
3 1.000000e+00 # cw
4 1.000000e+00 # cg
#######
## INFORMATION FOR ALPSCOUPLINGS
#######
BLOCK ALPSCOUPLINGS #
5 1.000000e+00 # cq
6 1.000000e+00 # cl
7 5.000000e-01 # cu
8 1.000000e-01 # cd
9 5.000000e-01 # ce
10 1.000000e+00 # cn
#######
## INFORMATION FOR CKMBLOCK
#######
BLOCK CKMBLOCK #
1 2.277360e-01 # cabi
#######
## INFORMATION FOR MASS
#######
BLOCK MASS #
1 5.040000e-03 # md
2 2.550000e-03 # mu
3 1.010000e-01 # ms
4 1.270000e+00 # mc
5 4.700000e+00 # mb
6 1.733000e+02 # mt
11 5.110000e-04 # me
13 1.056600e-01 # mmu
15 1.777000e+00 # mta
23 9.118760e+01 # mz
25 1.257000e+02 # mh
9900012 1.000000e+03 # mn1
9900036 1.000000e-06 # malp
12 0.000000e+00 # ve : 0.0
14 0.000000e+00 # vm : 0.0
16 0.000000e+00 # vt : 0.0
21 0.000000e+00 # g : 0.0
22 0.000000e+00 # a : 0.0
24 7.995123e+01 # w+ : cmath.sqrt(
#######
## INFORMATION FOR NUMIXING
#######
BLOCK NUMIXING #
1 3.330000e-01 # ven
2 3.330000e-01 # vmun
3 3.330000e-01 # vtan
#######
## INFORMATION FOR SMINPUTS
#######
BLOCK SMINPUTS #
1 1.279400e+02 # aewm1
2 1.174560e-05 # gf
3 1.300000e-01 # as (note that parameter not used if you use a pdf set)
#######
## INFORMATION FOR YUKAWA
#######
BLOCK YUKAWA #
1 5.040000e-03 # ymdo
2 2.550000e-03 # ymup
3 1.010000e-01 # yms
4 1.270000e+00 # ymc
5 4.700000e+00 # ymb
6 1.733000e+02 # ymt
11 5.110000e-04 # yme
13 1.056600e-01 # ymm
15 1.777000e+00 # ymtau
#######
## INFORMATION FOR DECAY
#######
DECAY 6 1.350000e+00 # wt
DECAY 23 2.495200e+00 # wz
DECAY 24 2.085000e+00 # ww
DECAY 25 4.170000e-03 # wh
DECAY 9900012 1.000000e+00 # wn1
DECAY 9900036 1.000000e-09 # walp
DECAY 1 0.000000e+00 # d : 0.0
DECAY 2 0.000000e+00 # u : 0.0
DECAY 3 0.000000e+00 # s : 0.0
DECAY 4 0.000000e+00 # c : 0.0
DECAY 5 0.000000e+00 # b : 0.0
DECAY 11 0.000000e+00 # e- : 0.0
DECAY 12 0.000000e+00 # ve : 0.0
DECAY 13 0.000000e+00 # mu- : 0.0
DECAY 14 0.000000e+00 # vm : 0.0
DECAY 15 0.000000e+00 # ta- : 0.0
DECAY 16 0.000000e+00 # vt : 0.0
DECAY 21 0.000000e+00 # g : 0.0
DECAY 22 0.000000e+00 # a : 0.0
#######
## INFORMATION FOR QNUMBERS 9900012
#######
BLOCK QNUMBERS 9900012 # n1
1 0 # 3 times electric charge
2 2 # number of spin states (2s+1)
3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
4 0 # particle/
#######
## INFORMATION FOR QNUMBERS 9900036
#######
BLOCK QNUMBERS 9900036 # alp
1 0 # 3 times electric charge
2 1 # number of spin states (2s+1)
3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
4 0 # particle/
</slha>
<MGGenerationInfo>
# Number of Events : 10000
# Integrated weight (pb) : 436.23299999999995
</MGGenerationInfo>
</header>
</LesHouchesEvents>
Revision history for this message
![]() |
#2 |
ME5_debug (after making param_card.dat read-only)
---
#******
#* MadGraph5_
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 3.4.2 2023-01-20 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https:/
#* *
#******
#* *
#* Command File for MadEvent *
#* *
#* run as ./bin/madevent.py filename *
#* *
#******
generate_events run_01
Traceback (most recent call last):
File "/Users/
return self.onecmd_
File "/Users/
return func(arg, **opt)
File "/Users/
switch_mode = self.ask_
File "/Users/
self.
File "/Users/
self.
File "/Users/
out = ask(question, '0', possible_answer, timeout=
File "/Users/
value = Cmd.timed_
File "/Users/
result = fct(question)
File "/Users/
return self.cmdloop()
File "/Users/
super(
File "/Users/
stop = self.postcmd(stop, line)
File "/Users/
self.
File "/Users/
self.
File "/Users/
param_
File "/Users/
open(
PermissionError: [Errno 13] Permission denied: '/Users/
Related File: /Users/
automatic_
cluster_
#******
#* MadGraph5_aMC@NLO *
#* *
#* * * *
#* * * * * *
#* * * * * 5 * * * * *
#* * * * * *
#* * * *
#* *
#* *
#* VERSION 3.4.2 2023-01-20 *
#* *
#* The MadGraph5_aMC@NLO Development Team - Find us at *
#* https:/
#* *
#******
#* *
#* Command File for MadGraph5_aMC@NLO *
#* *
#* run as ./bin/mg5_aMC filename *
#* *
#******
set group_subprocesses Auto
set ignore_
set low_mem_
set complex_mass_scheme False
set include_
set gauge unitary
set loop_optimized_
set loop_color_flows False
set max_npoint_
set default_
set max_t_for_channel 99
set zerowidth_tchannel True
set nlo_mixed_expansion True
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 /Users/
_HeavyN_
generate n1 > all all
output prueba5
#######
## PARAM_CARD AUTOMATICALY GENERATED BY MG5 FOLLOWING UFO MODEL ####
#######
## ##
## Width set on Auto will be computed following the information ##
## present in the decay.py files of the model. ##
## See arXiv:1402.1178 for more details. ##
## ##
#######
#######
## INFORMATION FOR ALPCOUPLINGS
#######
Block alpcouplings
1 1.000000e-05 # faInverse
2 1.000000e+00 # cB
3 1.000000e+00 # cw
4 1.000000e+00 # cG
#######
## INFORMATION FOR ALPSCOUPLINGS
#######
Block alpscouplings
5 1.000000e+00 # cQ
6 1.000000e+00 # cL
7 5.000000e-01 # cu
8 1.000000e-01 # cd
9 5.000000e-01 # ce
10 1.000000e+00 # cN
#######
## INFORMATION FOR CKMBLOCK
#######
Block ckmblock
1 2.277360e-01 # cabi
#######
## INFORMATION FOR MASS
#######
Block mass
1 5.040000e-03 # MD
2 2.550000e-03 # MU
3 1.010000e-01 # MS
4 1.270000e+00 # MC
5 4.700000e+00 # MB
6 1.733000e+02 # MT
11 5.110000e-04 # Me
13 1.056600e-01 # MMU
15 1.777000e+00 # MTA
23 9.118760e+01 # MZ
25 1.257000e+02 # MH
9900012 2.000000e+02 # mN1
9900036 1.000000e-06 # malp
## 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.
12 0.000000e+00 # ve : 0.0
14 0.000000e+00 # vm : 0.0
16 0.000000e+00 # vt : 0.0
21 0.000000e+00 # g : 0.0
22 0.000000e+00 # a : 0.0
24 7.995123e+01 # w+ : cmath.sqrt(
#######
## INFORMATION FOR NUMIXING
#######
Block numixing
1 3.330000e-01 # VeN
2 3.330000e-01 # VmuN
3 3.330000e-01 # VtaN
#######
## INFORMATION FOR SMINPUTS
#######
Block sminputs
1 1.279400e+02 # aEWM1
2 1.174560e-05 # Gf
3 1.184000e-01 # aS (Note that Parameter not used if you use a PDF set)
#######
## INFORMATION FOR YUKAWA
#######
Block yukawa
1 5.040000e-03 # ymdo
2 2.550000e-03 # ymup
3 1.010000e-01 # yms
4 1.270000e+00 # ymc
5 4.700000e+00 # ymb
6 1.733000e+02 # ymt
11 5.110000e-04 # yme
13 1.056600e-01 # ymm
15 1.777000e+00 # ymtau
#######
## INFORMATION FOR DECAY
#######
DECAY 6 1.350000e+00 # WT
DECAY 23 2.495200e+00 # WZ
DECAY 24 2.085000e+00 # WW
DECAY 25 4.170000e-03 # WH
DECAY 9900012 1.000000e+00 # WN1
DECAY 9900036 1.000000e-09 # Walp
## 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.000000e+00 # d : 0.0
DECAY 2 0.000000e+00 # u : 0.0
DECAY 3 0.000000e+00 # s : 0.0
DECAY 4 0.000000e+00 # c : 0.0
DECAY 5 0.000000e+00 # b : 0.0
DECAY 11 0.000000e+00 # e- : 0.0
DECAY 12 0.000000e+00 # ve : 0.0
DECAY 13 0.000000e+00 # mu- : 0.0
DECAY 14 0.000000e+00 # vm : 0.0
DECAY 15 0.000000e+00 # ta- : 0.0
DECAY 16 0.000000e+00 # vt : 0.0
DECAY 21 0.000000e+00 # g : 0.0
DECAY 22 0.000000e+00 # a : 0.0
#======
# QUANTUM NUMBERS OF NEW STATE(S) (NON SM PDG CODE)
#======
Block QNUMBERS 9900012 # n1
1 0 # 3 times electric charge
2 2 # number of spin states (2S+1)
3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
4 0 # Particle/
Block QNUMBERS 9900036 # alp
1 0 # 3 times electric charge
2 1 # number of spin states (2S+1)
3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
4 0 # Particle/
#******
# MadGraph5_aMC@NLO *
# *
# run_card.dat MadEvent *
# *
# This file is used to set the parameters of the run. *
# *
# Some notation/
# *
# Lines starting with a '# ' are info or comments *
# *
# mind the format: value = variable ! comment *
# *
# To display more options, you can type the command: *
# update to_full *
#******
#
#******
# Tag name for the run (one word) *
#******
tag_1 = run_tag ! name of the run
#******
# Number of events and rnd seed *
# Warning: Do not generate more than 1M events in a single run *
#******
10000 = nevents ! Number of unweighted events requested
0 = iseed ! rnd seed (0=assigned automatically=
#******
# Collider type and energy *
# lpp: 0=No PDF, 1=proton, -1=antiproton, 2=elastic photon of proton,*
# +/-3=PDF of electron/positron beam *
# +/-4=PDF of muon/antimuon beam *
#******
1 = lpp1 ! beam 1 type
1 = lpp2 ! beam 2 type
6500.0 = ebeam1 ! beam 1 total energy in GeV
6500.0 = ebeam2 ! beam 2 total energy in GeV
# To see polarised beam options: type "update beam_pol"
#******
# PDF CHOICE: this automatically fixes alpha_s and its evol. *
# pdlabel: lhapdf=LHAPDF (installation needed) [1412.7420] *
# iww=Improved Weizsaecker-
# eva=Effective W/Z/A Approx. [21yy.zzzzz] *
# none=No PDF, same as lhapdf with lppx=0 *
#******
nn23lo1 = pdlabel ! PDF set
230000 = lhaid ! if pdlabel=lhapdf, this is the lhapdf number
# To see heavy ion options: type "update ion_pdf"
#******
# Renormalization and factorization scales *
#******
False = fixed_ren_scale ! if .true. use fixed ren scale
False = fixed_fac_scale ! if .true. use fixed fac scale
91.188 = scale ! fixed ren scale
91.188 = dsqrt_q2fact1 ! fixed fact scale for pdf1
91.188 = dsqrt_q2fact2 ! fixed fact scale for pdf2
-1 = dynamical_
1.0 = scalefact ! scale factor for event-by-event scales
#******
# Type and output format
#******
False = gridpack !True = setting up the grid pack
-1.0 = time_of_flight ! threshold (in mm) below which the invariant livetime is not written (-1 means not written)
average = event_norm ! average/sum. Normalization of the weight in the LHEF
# To see MLM/CKKW merging options: type "update MLM" or "update CKKW"
#******
#
#******
# Phase-Space Optimization strategy (basic options)
#******
0 = nhel ! using helicities importance sampling or not.
2 = sde_strategy ! default integration strategy (hep-ph/2021.00773)
! 2 is new strategy (using only the denominator)
# To see advanced option for Phase-Space optimization: type "update psoptim"
#******
# Generation bias, check the wiki page below for more information: *
# 'cp3.irmp.
#******
None = bias_module ! Bias type of bias, [None, ptj_bias, -custom_folder-]
{} = bias_parameters ! Specifies the parameters of the module.
#
#******
# Parton level cuts definition *
#******
0.0 = dsqrt_shat ! minimal shat for full process
#
#
#******
# BW cutoff (M+/-bwcutoff*
#******
15.0 = bwcutoff ! (M+/-bwcutoff*
#******
# Standard Cuts *
#******
# Minimum and maximum pt's (for max, -1 means no cut) *
#******
0.0 = ptl ! minimum pt for the charged leptons
0.0 = misset ! minimum missing Et (sum of neutrino's momenta)
-1.0 = ptlmax ! maximum pt for the charged leptons
-1.0 = missetmax ! maximum missing Et (sum of neutrino's momenta)
{} = pt_min_pdg ! pt cut for other particles (use pdg code). Applied on particle and anti-particle
{} = pt_max_pdg ! pt cut for other particles (syntax e.g. {6: 100, 25: 50})
#
# For display option for energy cut in the partonic center of mass frame type 'update ecut'
#
#******
# Maximum and minimum absolute rapidity (for max, -1 means no cut) *
#******
-1.0 = etal ! max rap for the charged leptons
0.0 = etalmin ! main rap for the charged leptons
{} = eta_min_pdg ! rap cut for other particles (use pdg code). Applied on particle and anti-particle
{} = eta_max_pdg ! rap cut for other particles (syntax e.g. {6: 2.5, 23: 5})
#******
# Minimum and maximum DeltaR distance *
#******
#******
# Minimum and maximum invariant mass for pairs *
#******
{} = mxx_min_pdg ! min invariant mass of a pair of particles X/X~ (e.g. {6:250})
{'default': False} = mxx_only_
#******
# Inclusive cuts *
#******
0.0 = ptheavy ! minimum pt for at least one heavy final state
#******
# maximal pdg code for quark to be considered as a light jet *
# (otherwise b cuts are applied) *
#******
4 = maxjetflavor ! Maximum jet pdg code
#******
#
#******
# Store info for systematics studies *
# WARNING: Do not use for interference type of computation *
#******
False = use_syst ! Enable systematics studies
#
systematics = systematics_program ! none, systematics [python], SysCalc [depreceted, C++]
['--mur=0.5,1,2', '--muf=0.5,1,2', '--pdf=errorset'] = systematics_
Revision history for this message
![]() |
#3 |
I could not find a way to attach files to this issue, however I can email you our UFO model "SM_HeavyN_
Revision history for this message
![]() |
#4 |
Hi Jean-Loup,
Thanks for the information, this is the first time that someone reported the issue of parameter discarded due to this new feature of MG5aMC. I will try to reproduce this bug.
In case this is model/benchmark specific, can I ask you which of the parameter you tried to change and that the change was discarded? And maybe which method you use to edit the file?
For the model you can send it to me at <email address hidden> (Can I ask you to put a link to this webpage? This will be so helpfull)
Thanks,
Olivier
Revision history for this message
![]() |
#5 |
Hi Olivier,
We edited param_card.dat by entering the corresponding number when prompted by MadGraph, which opened our text editor in the background, and then making the edits and saving the file (we used Aquamacs, but I don’t think this matters since we checked that Cards/param_
In our tests, any parameters that we modified got reset to their default value, although for the example I sent, I think we only changed the HNL mass "mn1" to be 200. (but in the banner file you can only see the default value of 1e3, since it was already reset).
Interestingly, the capitalisation of comments (variable names after the "#") is also changed. After the "reset", they are all lowercase, so MadGraph is not just copying param_card_
Regarding the model, I will send it to you separately by email. Currently it is not published, because it is not quite production-ready (it has a bunch of bad defaults, among other things).
Unfortunately, I was myself not able to reproduce this bug on my own install. However, if needed I can ask the student to run some more tests and report the logs and output.
Thanks again for your help,
Jean-Loup
Revision history for this message
![]() |
#6 |
Hi,
Thanks for the additional details and the model.
Unfortunately, I'm not able to reproduce the error.
Is Aquamacs tells madgraph correctly when the edition of the file is done?
One way to test is to re-open the file a second time and do not perform edition that second time (or do and check if only those second edition are discarded).
What I have in mind is that the following happen
1) you open the file
2) aquamacs returns the hand to MG5aMC that reads the file to learn the content and propose to the user to edit another file/enter command to edit futher
3) you edit the file opened by aquamacs
4) you quit the interface
In that sequence, MG5aMC might indeed read the file too early.
and therefore not realize that some parameter have been changed.
Maybe I should add a check that the file was not edited after the late read on disk but if that is the issue, it might be difficult to be bulletproof (but I can certainly improve).
Cheers,
Olivier
Revision history for this message
![]() |
#7 |
Hi Olivier,
I see! I may have wrongly assumed that MadGraph only processes the cards when entering "done" and launching the generation.
Indeed, Aquamacs opens in the background and immediately returns the hand to MadGraph, which displays the prompt again. I noticed it, but since the file was changed, I thought the issue was to be found somewhere else. It would also explain why it does not occur on my laptop (I use vim).
I will check with the student if this is indeed the cause, using e.g. nano in non-graphical mode instead of Aquamacs (it should still be more beginner-friendly than vim).
Is it expected, however, that MadGraph overwrites the file when entering "done"? (I see how this could actually make sense, to ensure that the recorded parameters are consistent with its internal parameters.)
Maybe a simple "INFO: configuration unchanged" or similar could help, displayed as soon as MadGraph reads the file and sees no change (e.g. same hash before and after). It would at least make it clearer to the user that MadGraph processes the cards immediately (to my shame, I have used it for years without ever noticing).
So, I will check and report if this solves the issue.
Many thanks again for your help and insights!
Cheers,
Jean-Loup
Revision history for this message
![]() |
#8 |
Indeed, it seems that we missed this last line in mg5_configurati
#! Prefered Text Editor
#! Default: use the shell default Editor
#! or try to find one available on the system
#! Be careful: Only shell based editor are allowed
I actually used emacs successfully in graphical mode in the past (and on Linux), but indeed it wasn’t returning immediately.
Revision history for this message
![]() |
#9 |
Hi,
OK, thanks for the confirmation of what the problem is.
So this is nothing super new in a way but this issue might have been enhanced with the new handling of alphas.
I do agree with you that I could add at least a warning if nothing changed. a
And maybe a threshold like if the file is open in less than a .5s which and then act accordingly.
Thanks for the report.
Olivier
Revision history for this message
![]() |
#10 |
Hi,
here is a patch:
> diff --git a/madgraph/
> index 83ae78151.
> --- a/madgraph/
> +++ b/madgraph/
> @@ -7493,6 +7493,7 @@ class AskforEditCard(
> elif os.path.
> self.write_
>
> + start = time.time()
> try:
> self.mother_
> except InvalidCmd as error:
> @@ -7510,6 +7511,9 @@ You can also copy/paste, your event file here.''')
> self.open_
> else:
> raise
> + if time.time() - start < .35:
> + print(time.
> + self.mother_
> self.reload_
>
> def reload_card(self, path):
This is a basic timer that check if the file was closed directly or not and ask user confirmation for when the file is actually edited.
I have checked by using VSCode and on my machine the time measure for the operation was then:
0.2s. While if I use emacs and close the editor directly (manually without editting) I'm at best at 0.38.
So I have put the threshold at 0.35s. Can you check how long it take for aquamacs?
To check if 0.35s is reasonable or not?
Thanks,
Olivier
> On 8 Mar 2023, at 23:20, Jean-Loup Tastet <email address hidden> wrote:
>
> Question #705763 on MadGraph5_aMC@NLO changed:
> https:/
>
> Jean-Loup Tastet posted a new comment:
> Indeed, it seems that we missed this last line in mg5_configurati
> My bad.
>
> #! Prefered Text Editor
> #! Default: use the shell default Editor
> #! or try to find one available on the system
> #! Be careful: Only shell based editor are allowed
>
> I actually used emacs successfully in graphical mode in the past (and on
> Linux), but indeed it wasn’t returning immediately.
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.
Revision history for this message
![]() |
#11 |
Hi Olivier,
I applied the patch to my install, but I didn’t manage to trigger it. I installed Aquamacs to try to reproduce the issue, but it worked correctly and only returned the hand to MadGraph after saving and closing the file (even when adding an "&" after the path).
The student also applied the patch, but had already switched to nano (which successfully fixed the issue!), so it didn’t get triggered either.
So I don’t know what was going wrong, and now the original mg5_configurati
I know some editors that can take significantly more time to open than 0.35 s (e.g. Spacemacs can take several seconds because it checks for updates), but if they open in the background this shouldn’t matter anyway (?). It also doesn’t return immediately, so I couldn’t time it.
So the threshold looks quite reasonable to me. Honestly, it could even be a bit larger, because it seems quite uncommon to open a file to close it immediately (without even looking at it), and in this case having to press "y" is not a big annoyance.
If you want, I can ask again the student to re-try with Aquamacs. Just let me know.
In any case, many thanks again for your help and helping us solve our problem!
Cheers,
Jean-Loup
Revision history for this message
![]() |
#12 |
Thanks Olivier Mattelaer, that solved my question.