tohdf5: run_id and is_cc is not read correctly during conversion
Version: km3pipe v8.1.3, jpp v9.0.8454
MWE:
# convert ORCA muon-neutrino-CC file from root to h5
tohdf5 -t -o ./test.h5 /sps/km3net/users/kmcprod/JTE_NEMOWATER/withMX/muon-CC/3-100GeV/JTE.KM3Sim.gseagen.muon-CC.3-100GeV-9.1E7-1bin-3.0gspec.ORCA115_9m_2016.99.root
ipython
In [1]: import h5py
In [2]: import numpy as np
In [3]: f = h5py.File('test.h5', 'r')
In [4]: f['event_info'][0]
Out[4]: (0.4484, 0.4484, 3.208e+11, 2080000., 1, 0, 100000000, 1.49999293e+08, 2, 1, 0)
In [5]: f['event_info'].dtype
Out[5]: dtype([('weight_w4', '<f8'), ('weight_w3', '<f8'), ('weight_w2', '<f8'), ('weight_w1', '<f8'), ('run_id', '<i8'), ('timestamp', '<i8'), ('nanoseconds', '<i8'), ('mc_time', '<f8'), ('event_id', '<i8'), ('mc_id', '<i8'), ('group_id', '<i8')])
In [6]: f['mc_tracks'][0]
Out[6]: (40.091, -33.184, 86.571, 0.349961, -0.860419, 0.370414, 26.748, 0., 0.156887, 49999293.33500001, 2., 0, 14, 1, 3.)
In [7]: f['mc_tracks'].dtype
Out[7]: dtype([('pos_z', '<f8'), ('pos_x', '<f8'), ('pos_y', '<f8'), ('dir_y', '<f8'), ('dir_x', '<f8'), ('dir_z', '<f8'), ('energy', '<f8'), ('length', '<f8'), ('bjorkeny', '<f8'), ('time', '<f8'), ('is_cc', '<f8'), ('group_id', '<i8'), ('type', '<i8'), ('id', '<i8'), ('interaction_channel', '<f8')])
As you can see, the run_id is mistakenly read as '1' instead of '99'.
Additionally, is_cc is set to 2. I think it should be either 0 or 1, at least that's how it was before.
Edited by Michael Moser