Skip to content

Never merge: Dealing with JEWEL output

Andrii Verbytskyi requested to merge jewel into master

The JEWEL MCEG, https://jewel.hepforge.org/, is a Monte Carlo event generator simulating QCD jet evolution in heavy-ion collisions.

JEWEL is written in Fortran, but outputs the generated events in HepMC-like format close to IO_GenEvent. However, as of version 2.4.0 the HepMC files produced with the JEWEL differs from the files produced by the HepMC2/HepMC3 -- JEWEL uses multiple spaces for the field separation in the output, i.e.

E          1 -1  0.000000E+00  0.000000E+00  0.000000E+00 0 0     1 1 2 0 1  0.703264E-11

vs.

E 1 -1 0.000000E+00 0.000000E+00 0.000000E+00 0 0 1 1 2 0 1 0.703264E-11

in the HepMC2/HepMC3. The HepMC2 as of version 2.6.11 is more forgiving when it comes to
deviations from the standard, and those files are still readable with HepMC2. However, the HepMC3 as of version 3.2.5 considers those files broken and fails to read them.

The possible solutions to deal with those files/JEWEL output:

  • Patch JEWEL. JEWEL is a very well structured code and the output format is defined with the following Fortran statements:
 5000 FORMAT(A2,I10,I3,3E14.6,2I2,I6,4I2,E14.6)
 5100 FORMAT(A2,2E14.6)
 5200 FORMAT(A2,6I7,2I2,1I7,4E14.6)
 5300 FORMAT(A2,2I2,5E14.6,2I2)
! 5400 FORMAT(A2,I6,6I2,I6,I2)
 5400 FORMAT(A2,2I6,5I2,I6,I2)
 5500 FORMAT(A2,I6,I6,5E14.6,3I2,I6,I2)

Those should be replaced with the

 5000 FORMAT(A2,2(I0,' '),3(E0.6,' '),7(I0,' '),E0.6)
 5100 FORMAT(A2,E0.6,' ',E0.6)
 5200 FORMAT(A2,9(I0,' '),3(E0.6,' '),E0.6)
 5300 FORMAT(A2,2(I0,' '),5(E0.6,' '),I0,' ',I0)
 5400 FORMAT(A2,8(I0,' '),I0)
 5500 FORMAT(A2,2(I0,' '),5(E0.6,' '),4(I0,' '),I0)

to produce the same output as HepMC2/HepMC3 produces.

  • Remove the extra spaces with any text-processing tool, e.g.
cat input_file_from_jewel.hepmc | tr -s ' ' > input_file_from_jewel_no_extra_spaces.hepmc
  • Use the patches to HepMC3 in this MR. Please see the test file test/inputJEWEL.hepmc and test code test/testJEWEL.cc that checks that JEWEL files are readable.
  • Use HepMC2
Edited by Andrii Verbytskyi

Merge request reports