Maddump .hempc error

Asked by Andrew McAdams

Hi! I am using the following code:

import model modelN_UFO
import_events decay Upsilon-distr.hepmc
decay ups4s > b+ b-
add process displaced_decay ups4s
output test
launch test

where the file Upsilon-distr.hepmc has the form

HepMC::Version 2.06.09
HepMC::IO_GenEvent-START_EVENT_LISTING
E 0 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
E 1 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
E 2 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
E 3 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
E 4 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
E 5 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
E 6 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
E 7 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
E 8 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
E 9 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
E 10 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
E 11 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
...
E 100000 -1 -1.0000000000000000e+00 -1.0000000000000000e+00 -1.0000000000000000e+00 0 0 1 0 0 0 0
U GEV MM
V -1 0 0 0 0 0 0 1 0
P 1 300553 0.0000000000000000e+00 0.0000000000000000e+00 3.0000000000000000e+00 1.099710871092943e+01 1.02800000000000000e+01 0 0 0 0 0
HepMC::IO_GenEvent-END_EVENT_LISTING

When launching, it says
AttributeError : 'HEPMC_EventFile' object has no attribute 'zip_mode'. Could you please tell me where I may made an error?

Question information

Language:
English Edit question
Status:
Answered
For:
maddump Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Andrew McAdams (mcadams1994) said :
#1

The debug file is

Traceback (most recent call last):
  File "/home/name/Downloads/mg5/madgraph/interface/extended_cmd.py", line 1541, in onecmd
    return self.onecmd_orig(line, **opt)
  File "/home/name/Downloads/mg5/madgraph/interface/extended_cmd.py", line 1490, in onecmd_orig
    return func(arg, **opt)
  File "/home/name/Downloads/mg5/PLUGIN/maddump/new_interface/maddump_interface.py", line 482, in do_launch
    self._MDUMP.exec_cmd('launch')
  File "/home/name/Downloads/mg5/madgraph/interface/extended_cmd.py", line 1570, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/name/Downloads/mg5/madgraph/interface/extended_cmd.py", line 1490, in onecmd_orig
    return func(arg, **opt)
  File "/home/name/Downloads/mg5/PLUGIN/maddump/new_interface/maddump_run_interface.py", line 229, in do_launch
    self.run_launch()
  File "/home/name/Downloads/mg5/madgraph/interface/common_run_interface.py", line 7111, in new_fct
    original_fct(obj, *args, **opts)
  File "/home/name/Downloads/mg5/PLUGIN/maddump/new_interface/maddump_run_interface.py", line 267, in run_launch
    madspin_cmd.import_command_file(path)
  File "/home/name/Downloads/mg5/madgraph/interface/extended_cmd.py", line 1689, in import_command_file
    self.exec_cmd(line, precmd=True)
  File "/home/name/Downloads/mg5/madgraph/interface/extended_cmd.py", line 1570, in exec_cmd
    stop = Cmd.onecmd_orig(current_interface, line, **opt)
  File "/home/name/Downloads/mg5/madgraph/interface/extended_cmd.py", line 1490, in onecmd_orig
    return func(arg, **opt)
  File "/home/name/Downloads/mg5/madgraph/various/misc.py", line 109, in f_with_no_logger
    out = f(self, *args, **opt)
  File "/home/name/Downloads/mg5/MadSpin/interface_madspin.py", line 606, in do_launch
    return self.run_bridge(line)
  File "/home/name/Downloads/mg5/MadSpin/interface_madspin.py", line 845, in run_bridge
    orig_lhe = hepmc_parser.HEPMC_EventFile(filename)
  File "/home/name/Downloads/mg5/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 : /home/name/Downloads/mg5/HEPTools/lib
                  collier : /home/name/Downloads/mg5/HEPTools/lib
              auto_update : 7
             pythia8_path : ./HEPTools/pythia8
                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
                 applgrid : applgrid-config
               eps_viewer : None
                  fastjet : fastjet-config
                 run_mode : 2
              web_browser : None
   automatic_html_opening : True
        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
                  amcfast : amcfast-config
       cluster_retry_wait : 300
      output_dependencies : external
               lhapdf_py3 : None
               lhapdf_py2 : None
         fortran_compiler : None
mg5amc_py8_interface_path : /home/name/Downloads/mg5/HEPTools/MG5aMC_PY8_interface
         loop_color_flows : False
                  samurai : None
      exrootanalysis_path : ./ExRootAnalysis
                  timeout : 60
                    gauge : unitary
      complex_mass_scheme : False
             cpp_compiler : None
   max_npoint_for_channel : 0

Revision history for this message
Andrew McAdams (mcadams1994) said :
#2

The same is the case when launching the DM from dark photons from Appendix D.3 here https://arxiv.org/pdf/1812.06771.pdf:

import model DM_mesons_2
import_events decay path/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

Revision history for this message
Andrew McAdams (mcadams1994) said :
#3

I have solved this problem, but I have a feeling that it should not appear a priori. The file hepmc_parcer.py contained a few errors.

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

For hepmc error, you can report them directly to the MG5aMCNLO project.
And if you do have patch do not hesitate to provide them

Cheers,

Olivier

Can you help with this problem?

Provide an answer of your own, or ask Andrew McAdams for more information if necessary.

To post a message you must log in.