.hepmc to .root script not working

Asked by krunal on 2017-08-17


I wanted to convert .hepmc to .root using madanalysis5 and was suggested a script by Shiba (https://answers.launchpad.net/mg5amcnlo/+question/656057) which is not working in my case. Following is the output:

ma5>set main.fastsim.package = delphes
ma5>set main.fastsim.detector = cms
ma5>import /home/krunal/Downloads/MG5_aMC_v2_5_4/PROC_sm_1/Events/run_01/data.hepmc as tdd
MA5: -> Storing the file 'data.hepmc' in the dataset 'tdd'.
MA5: Creating folder 'ANALYSIS_1'...
MA5: Copying 'SampleAnalyzer' source files...
Traceback (most recent call last):
  File "./bin/ma5", line 70, in <module>
    madanalysis.core.launcher.LaunchMA5(version, date, ma5dir)
  File "/home/krunal/Downloads/madanalysis5_new/madanalysis/core/launcher.py", line 394, in LaunchMA5
    repeat = MainSession(mode,arglist,ma5dir,version,date)
  File "/home/krunal/Downloads/madanalysis5_new/madanalysis/core/launcher.py", line 299, in MainSession
  File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "/home/krunal/Downloads/madanalysis5_new/madanalysis/interpreter/interpreter.py", line 283, in do_submit
  File "/home/krunal/Downloads/madanalysis5_new/madanalysis/interpreter/cmd_submit.py", line 86, in do
    return self.do_submit(args,history)
  File "/home/krunal/Downloads/madanalysis5_new/madanalysis/interpreter/cmd_submit.py", line 237, in do_submit
    if not self.submit(filename,history):
  File "/home/krunal/Downloads/madanalysis5_new/madanalysis/interpreter/cmd_submit.py", line 430, in submit
    if not jobber.CopyLHEAnalysis():
  File "/home/krunal/Downloads/madanalysis5_new/madanalysis/IOinterface/job_writer.py", line 327, in CopyLHEAnalysis
  File "/home/krunal/Downloads/madanalysis5_new/madanalysis/IOinterface/job_writer.py", line 291, in CreateDelphesCard
UnboundLocalError: local variable 'theFile' referenced before assignment

I am unable to get any .root file in the end.

PS: I have not installed "Delphes-MA5tune" as my version of ROOT is above 6. Also, I installed zlib 1.2.11 version.

Thank you!

Question information

English Edit question
MadAnalysis 5 Edit question
No assignee Edit question
Last query:
Last reply:
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Benjamin Fuks (fuks) said : #2

This has been fixed in version 1.6beta. Do you mind updating your ma5 version and retry?



Can you help with this problem?

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

To post a message you must log in.