madspin.py do not support hepmc anymore

Bug #1951638 reported by Olivier Mattelaer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MadGraph5_aMC@NLO
Fix Released
Undecided
Unassigned

Bug Description

Hi!

I have installed mg5 v 3.3, and then installed maddump.

After downloading the model DM_mesons_2 I failed to launch the standard code with decays of pions into dark photons given in the appendix D.3 of https://arxiv.org/pdf/1812.06771.pdf.

Namely, I launched

import model DM_mesons_2
import_events decay example_MesonFlux.hepmc
decay pi0 > y1 a, y1 > xd xd~
define darkmatter xd
add process interaction @DIS
add process interaction @electron
output DP_electron
launch DP_electron
set flux_norm 2.0e20
set prod_xsec_in_norm false
set d_target_detector 5650.0
set detector_density 3.72
set off-axis false
set parallelepiped True
set x_side 187.0
set y_side 69.0
set depth 200.0
set ncores 16
set testplot True
set gvd11 -3.333333e-4
set gvu11 6.666666e-4
set gvd22 -3.333333e-4
set gvu22 6.666666e-4
set gvd33 -3.333333e-4
set gvu33 6.666666e-4
set gvl11 -1.000000e-3
set gvl22 -1.000000e-3
set gvl33 -1.000000e-3
set my1 scan1:[0.01*i for i in range(1,14)]
set mxd scan1:[0.01/3.*i for i in range(1,14)]
set wy1 auto

The log is

AttributeError : 'HEPMC_EventFile' object has no attribute 'zip_mode'
Please report this bug to developers

Could you please tell me how can this be? The error occurs at the very beginning of the run, at the stage of the loading of .hepmc file... I have fixed this particular error by editing the file hepmc_parser.py (please look at the debug file listed below), but then a new one occurs... This suggests that either the overall code is broken.

The debug file is

Traceback (most recent call last):
  File "/home/name/Downloads/mg5_te/madgraph/interface/extended_cmd.py", line 1544, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/name/Downloads/mg5_te/madgraph/interface/extended_cmd.py", line 1493, in onecmd_orig
    return func(arg, **opt)
  File "/home/name/Downloads/mg5_te/PLUGIN/maddump/new_interface/maddump_interface.py", line 482, in do_launch
    self._MDUMP.exec_cmd('launch')
  File "/home/name/Downloads/mg5_te/madgraph/interface/extended_cmd.py", line 1573, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/name/Downloads/mg5_te/madgraph/interface/extended_cmd.py", line 1493, in onecmd_orig
    return func(arg, **opt)
  File "/home/name/Downloads/mg5_te/PLUGIN/maddump/new_interface/maddump_run_interface.py", line 229, in do_launch
    self.run_launch()
  File "/home/name/Downloads/mg5_te/madgraph/interface/common_run_interface.py", line 7310, in new_fct
    original_fct(obj, *args, **opts)
  File "/home/name/Downloads/mg5_te/PLUGIN/maddump/new_interface/maddump_run_interface.py", line 267, in run_launch
    madspin_cmd.import_command_file(path)
  File "/home/name/Downloads/mg5_te/madgraph/interface/extended_cmd.py", line 1692, in import_command_file
    self.exec_cmd(line, precmd=True)
  File "/home/name/Downloads/mg5_te/madgraph/interface/extended_cmd.py", line 1573, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/name/Downloads/mg5_te/madgraph/interface/extended_cmd.py", line 1493, in onecmd_orig
    return func(arg, **opt)
  File "/home/name/Downloads/mg5_te/madgraph/various/misc.py", line 110, in f_with_no_logger
    out = f(self, *args, **opt)
  File "/home/name/Downloads/mg5_te/MadSpin/interface_madspin.py", line 606, in do_launch
    return self.run_bridge(line)
  File "/home/name/Downloads/mg5_te/MadSpin/interface_madspin.py", line 845, in run_bridge
    orig_lhe = hepmc_parser.HEPMC_EventFile(filename)
  File "/home/name/Downloads/mg5_te/madgraph/various/hepmc_parser.py", line 304, in __init__
    if 'b' in mode or self.zip_mode:
AttributeError: 'HEPMC_EventFile' object has no attribute 'zip_mode'
Value of current Options:
              text_editor : None
      notification_center : True
       auto_convert_model : False
       cluster_local_path : None
        f2py_compiler_py3 : None
       group_subprocesses : Auto
ignore_six_quark_processes : False
        max_t_for_channel : 99
    loop_optimized_output : True
    cluster_status_update : (600, 30)
           crash_on_error : False
                    ninja : ./HEPTools/lib
                  collier : ./HEPTools/lib
              auto_update : 7
             pythia8_path : None
                hwpp_path : None
low_mem_multicore_nlo_generation : False
                    golem : None
          pythia-pgs_path : ./pythia-pgs
        f2py_compiler_py2 : None
             delphes_path : ./Delphes
              thepeg_path : None
             cluster_type : condor
  default_unset_couplings : 99
        madanalysis5_path : None
         cluster_nb_retry : 1
                      OLP : MadLoop
 acknowledged_v3.1_syntax : False
                  fastjet : fastjet-config
include_lepton_initiated_processes : False
               eps_viewer : None
              web_browser : None
                 pineappl : pineappl
        cluster_temp_path : None
             cluster_size : 100
            cluster_queue : None
             syscalc_path : ./SysCalc
         madanalysis_path : ./MadAnalysis
                   lhapdf : lhapdf-config
             stdout_level : 20
                  nb_core : None
            f2py_compiler : None
               hepmc_path : None
       zerowidth_tchannel : True
                  td_path : ./td
   automatic_html_opening : True
       cluster_retry_wait : 300
      output_dependencies : external
      nlo_mixed_expansion : True
               lhapdf_py3 : None
               lhapdf_py2 : None
         fortran_compiler : None
mg5amc_py8_interface_path : None
         loop_color_flows : False
                  samurai : None
      exrootanalysis_path : ./ExRootAnalysis
                  timeout : 60
                    gauge : unitary
                 run_mode : 2
      complex_mass_scheme : False
             cpp_compiler : None
   max_npoint_for_channel : 0
######################################################################
## PARAM_CARD AUTOMATICALY GENERATED BY MG5 ####
######################################################################
###################################
## INFORMATION FOR CKMBLOCK
###################################
BLOCK CKMBLOCK #
      1 2.277360e-01 # cabi
###################################
## INFORMATION FOR DMINPUTS
###################################
BLOCK DMINPUTS #
      1 0.000000e+00 # gvxc
      2 1.000000e+00 # gvxd
      3 0.000000e+00 # gaxd
      4 -3.333333e-04 # gvd11
      5 6.666666e-04 # gvu11
      6 -3.333333e-04 # gvd22
      7 6.666666e-04 # gvu22
      8 -3.333333e-04 # gvd33
      9 6.666666e-04 # gvu33
      10 -1.000000e-03 # gvl11
      11 -1.000000e-03 # gvl22
      12 -1.000000e-03 # gvl33
      13 0.000000e+00 # gad11
      14 0.000000e+00 # gau11
      15 0.000000e+00 # gad22
      16 0.000000e+00 # gau22
      17 0.000000e+00 # gad33
      18 0.000000e+00 # gau33
      19 0.000000e+00 # gal11
      20 0.000000e+00 # gal22
      21 0.000000e+00 # gal33
      22 0.000000e+00 # gnu11
      23 0.000000e+00 # gnu22
      24 0.000000e+00 # gnu33
      25 0.000000e+00 # gvu31
      26 0.000000e+00 # gau31
      27 0.000000e+00 # gvd31
      28 0.000000e+00 # gad31
      29 0.000000e+00 # gvh
###################################
## INFORMATION FOR MASS
###################################
BLOCK MASS #
      6 1.720000e+02 # mt
      11 5.110000e-04 # me
      15 1.777000e+00 # mta
      23 9.118760e+01 # mz
      25 1.250000e+02 # mh
      111 1.349800e-01 # mpi0
      113 7.752600e-01 # mrho
      211 1.395706e-01 # mpi
      221 5.478620e-01 # meta
      223 7.826500e-01 # momega
      331 9.577800e-01 # metaprime
      5000001 scan1:[0.01*i for i in range(1,14)] # my1
      5000511 1.000000e+01 # mxr
      5000512 1.000000e+01 # mxc
      5000521 scan1:[0.01/3.*i for i in range(1,14)] # mxd
      1 0.000000e+00 # d : 0.0
      2 0.000000e+00 # u : 0.0
      3 0.000000e+00 # s : 0.0
      4 0.000000e+00 # c : 0.0
      5 0.000000e+00 # b : 0.0
      12 0.000000e+00 # ve : 0.0
      13 0.000000e+00 # mu- : 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.982436e+01 # w+ : cmath.sqrt(mz__exp__2/2. + cmath.sqrt(mz__exp__4/4. - (aew*cmath.pi*mz__exp__2)/(gf*sqrt__2)))
      9000002 9.118760e+01 # ghz : mz
      9000003 7.982436e+01 # ghwp : mw
      9000004 7.982436e+01 # ghwm : mw
###################################
## INFORMATION FOR SMINPUTS
###################################
BLOCK SMINPUTS #
      1 1.279000e+02 # aewm1
      2 1.166370e-05 # gf
      3 1.184000e-01 # as (note that parameter not used if you use a pdf set)
###################################
## INFORMATION FOR YUKAWA
###################################
BLOCK YUKAWA #
      6 1.720000e+02 # ymt
      15 1.777000e+00 # ymtau
###################################
## INFORMATION FOR DECAY
###################################
DECAY 6 1.508336e+00 # wt
DECAY 23 2.495200e+00 # wz
DECAY 24 2.085000e+00 # ww
DECAY 25 4.070000e-03 # wh
DECAY 113 1.491000e-01 # wrho
DECAY 5000001 auto # wy1
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
DECAY 111 0.000000e+00 # pi0 : 0.0
DECAY 211 0.000000e+00 # pi+ : 0.0
DECAY 221 0.000000e+00 # eta : 0.0
DECAY 223 0.000000e+00 # omega : 0.0
DECAY 331 0.000000e+00 # etaprime : 0.0
DECAY 5000511 0.000000e+00 # xr : 0.0
DECAY 5000512 0.000000e+00 # xc : 0.0
DECAY 5000521 0.000000e+00 # xd : 0.0
DECAY 9000002 2.495200e+00 # ghz : wz
DECAY 9000003 2.085000e+00 # ghwp : ww
DECAY 9000004 2.085000e+00 # ghwm : ww
###################################
## INFORMATION FOR QNUMBERS 111
###################################
BLOCK QNUMBERS 111 # pi0
      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/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 211
###################################
BLOCK QNUMBERS 211 # pi+
      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 1 # particle/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 221
###################################
BLOCK QNUMBERS 221 # eta
      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/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 223
###################################
BLOCK QNUMBERS 223 # omega
      1 0 # 3 times electric charge
      2 3 # number of spin states (2s+1)
      3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
      4 0 # particle/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 113
###################################
BLOCK QNUMBERS 113 # rho
      1 0 # 3 times electric charge
      2 3 # number of spin states (2s+1)
      3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
      4 0 # particle/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 331
###################################
BLOCK QNUMBERS 331 # etaprime
      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/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 9000001
###################################
BLOCK QNUMBERS 9000001 # gha
      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 1 # particle/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 9000002
###################################
BLOCK QNUMBERS 9000002 # ghz
      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 1 # particle/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 9000003
###################################
BLOCK QNUMBERS 9000003 # ghwp
      1 3 # 3 times electric charge
      2 1 # number of spin states (2s+1)
      3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
      4 1 # particle/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 9000004
###################################
BLOCK QNUMBERS 9000004 # ghwm
      1 -3 # 3 times electric charge
      2 1 # number of spin states (2s+1)
      3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
      4 1 # particle/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 82
###################################
BLOCK QNUMBERS 82 # ghg
      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)
###################################
## INFORMATION FOR QNUMBERS 5000511
###################################
BLOCK QNUMBERS 5000511 # xr
      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/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 5000512
###################################
BLOCK QNUMBERS 5000512 # xc
      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 1 # particle/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 5000521
###################################
BLOCK QNUMBERS 5000521 # xd
      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 1 # particle/antiparticle distinction (0=own anti)
###################################
## INFORMATION FOR QNUMBERS 5000001
###################################
BLOCK QNUMBERS 5000001 # y1
      1 0 # 3 times electric charge
      2 3 # number of spin states (2s+1)
      3 1 # colour rep (1: singlet, 3: triplet, 8: octet)
      4 0 # particle/antiparticle distinction (0=own anti)

affects: maddump → mg5amcnlo
Changed in mg5amcnlo:
status: New → Fix Committed
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) wrote :

Here is the patch that fix that issue.

https://bazaar.launchpad.net/~maddevelopers/mg5amcnlo/LTS_dev/revision/362

Hope that it will fix all the maddump issue.

Cheers,

Olivier

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

Other bug subscribers

Related questions

Remote bug watches

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