Skip to content

aashower-legacy in h5extractor for old ARCA MC files

Alba Domi requested to merge arca into master

I have implemented the aashower-legacy bool variable in h5extractor to deal with the old numbering of aanet reco_stages.

I have converted one ARCA v5 file numuNC. And I see now:

import h5py
>>> f = h5py.File('b.h5', 'r')
r = f['reco']
>>> s = r['rec_stages']
>>> s[0:300]
array([( 0,   1, 0), ( 0,   2, 0), ( 0,   3, 0), ( 0,   4, 0),
       ( 0,   5, 0), ( 1,   1, 0), ( 1,   2, 0), ( 1,   3, 0),
       ( 1,   4, 0), ( 2,   1, 0), ( 2,   2, 0), ( 2,   3, 0),
       ( 3,   1, 0), ( 3,   2, 0), ( 3,   3, 0), ( 4,   1, 0),
       ( 4,   2, 0), ( 4,   3, 0), ( 5,   1, 0), ( 5,   2, 0),
       ( 5,   3, 0), ( 6,   1, 0), ( 6,   2, 0), ( 6,   3, 0),
       ( 7,   1, 0), ( 7,   2, 0), ( 7,   3, 0), ( 8,   1, 0),
       ( 8,   2, 0), ( 8,   3, 0), ( 9,   1, 0), ( 9,   2, 0),
       ( 9,   3, 0), (10,   1, 0), (10,   2, 0), (10,   3, 0),
       (11,   1, 0), (11,   2, 0), (11,   3, 0), (12,   1, 0),
       (12,   2, 0), (12,   3, 0), (13,   1, 0), (13,   2, 0),
       (13,   3, 0), (14,   1, 0), (14,   2, 0), (15,   1, 0),
       (15,   2, 0), (16,   1, 0), (16,   2, 0), (17,   1, 0),
       (17,   2, 0), (18,   1, 0), (18,   2, 0), (19,   1, 0),
       (19,   2, 0), (20,   1, 0), (20,   2, 0), (21,   1, 0),
       (21,   2, 0), (22,   1, 0), (22,   2, 0), (23,   1, 0),
       (23,   2, 0), (24,   1, 0), (24,   2, 0), (25,   1, 0),
       (25,   2, 0), (26,   1, 0), (27,   1, 0), (28,   1, 0),
       (29,   1, 0), (30,   1, 0), (31,   1, 0), (32,   1, 0),
       (33,   1, 0), (34,   1, 0), (35,   1, 0), (36,   1, 0),
       (37,   1, 0), (38, 301, 0), (39, 301, 0), (39, 302, 0),
       (40, 301, 0), (40, 302, 0), (40, 303, 0), (41, 301, 0),
       (41, 302, 0), (41, 303, 0), (42, 301, 0), (42, 302, 0),
       (42, 303, 0), (43, 301, 0), (43, 302, 0), (43, 303, 0),
       (44, 301, 0), (44, 302, 0), (44, 303, 0), (45, 301, 0),
       (45, 302, 0), (45, 303, 0), (46, 301, 0), (46, 302, 0),
       (46, 303, 0), (47, 301, 0), (47, 302, 0), (47, 303, 0),
       (48, 301, 0), (48, 302, 0), (48, 303, 0), (49, 301, 0),
       (49, 302, 0), (49, 303, 0), (50, 301, 0), (50, 302, 0),
       (50, 303, 0), (51, 301, 0), (51, 302, 0), (51, 303, 0),
       (51, 304, 0), ( 0,   1, 1), ( 0,   2, 1), ( 0,   3, 1),
       ( 0,   4, 1), ( 0,   5, 1), ( 1,   1, 1), ( 1,   2, 1),
       ( 1,   3, 1), ( 1,   4, 1), ( 2,   1, 1), ( 2,   2, 1),
       ( 2,   3, 1), ( 3,   1, 1), ( 3,   2, 1), ( 3,   3, 1),
       ( 4,   1, 1), ( 4,   2, 1), ( 4,   3, 1), ( 5,   1, 1),
       ( 5,   2, 1), ( 5,   3, 1), ( 6,   1, 1), ( 6,   2, 1),
       ( 6,   3, 1), ( 7,   1, 1), ( 7,   2, 1), ( 7,   3, 1),
       ( 8,   1, 1), ( 8,   2, 1), ( 8,   3, 1), ( 9,   1, 1),
       ( 9,   2, 1), ( 9,   3, 1), (10,   1, 1), (10,   2, 1),
       (10,   3, 1), (11,   1, 1), (11,   2, 1), (11,   3, 1),
       (12,   1, 1), (12,   2, 1), (12,   3, 1), (13,   1, 1),
       (13,   2, 1), (13,   3, 1), (14,   1, 1), (14,   2, 1),
       (15,   1, 1), (15,   2, 1), (16,   1, 1), (16,   2, 1),
       (17,   1, 1), (17,   2, 1), (18,   1, 1), (18,   2, 1),
       (19,   1, 1), (19,   2, 1), (20,   1, 1), (20,   2, 1),
       (21,   1, 1), (21,   2, 1), (22,   1, 1), (22,   2, 1),
       (23,   1, 1), (23,   2, 1), (24,   1, 1), (24,   2, 1),
       (25,   1, 1), (25,   2, 1), (26,   1, 1), (27,   1, 1),
       (28,   1, 1), (29,   1, 1), (30,   1, 1), (31,   1, 1),
       (32,   1, 1), (33,   1, 1), (34,   1, 1), (35,   1, 1),
       (36,   1, 1), (37,   1, 1), (38, 301, 1), (39, 301, 1),
       (39, 302, 1), (40, 301, 1), (40, 302, 1), (40, 303, 1),
       (41, 301, 1), (41, 302, 1), (41, 303, 1), (42, 301, 1),
       (42, 302, 1), (42, 303, 1), (43, 301, 1), (43, 302, 1),
       (43, 303, 1), (44, 301, 1), (44, 302, 1), (44, 303, 1),
       (45, 301, 1), (45, 302, 1), (45, 303, 1), (46, 301, 1),
       (46, 302, 1), (46, 303, 1), (47, 301, 1), (47, 302, 1),
       (47, 303, 1), (48, 301, 1), (48, 302, 1), (48, 303, 1),
       (49, 301, 1), (49, 302, 1), (49, 303, 1), (50, 301, 1),
       (50, 302, 1), (50, 303, 1), (51, 301, 1), (51, 302, 1),
       (51, 303, 1), (51, 304, 1), ( 0, 301, 2), ( 1, 301, 2),
       ( 1, 302, 2), ( 2, 301, 2), ( 2, 302, 2), ( 2, 303, 2),
       ( 3, 301, 2), ( 3, 302, 2), ( 3, 303, 2), ( 4, 301, 2),
       ( 4, 302, 2), ( 4, 303, 2), ( 5, 301, 2), ( 5, 302, 2),
       ( 5, 303, 2), ( 6, 301, 2), ( 6, 302, 2), ( 6, 303, 2),
       ( 7, 301, 2), ( 7, 302, 2), ( 7, 303, 2), ( 8, 301, 2),
       ( 8, 302, 2), ( 8, 303, 2), ( 9, 301, 2), ( 9, 302, 2),
       ( 9, 303, 2), (10, 301, 2), (10, 302, 2), (10, 303, 2),
       (11, 301, 2), (11, 302, 2), (11, 303, 2), (12, 301, 2),
       (12, 302, 2), (12, 303, 2), (13, 301, 2), (13, 302, 2),
       (13, 303, 2), (13, 304, 2), ( 0, 301, 3), ( 1, 301, 3),
       ( 1, 302, 3), ( 2, 301, 3), ( 2, 302, 3), ( 2, 303, 3),
       ( 3, 301, 3), ( 3, 302, 3), ( 3, 303, 3), ( 4, 301, 3),
       ( 4, 302, 3), ( 4, 303, 3), ( 5, 301, 3), ( 5, 302, 3),
       ( 5, 303, 3), ( 6, 301, 3), ( 6, 302, 3), ( 6, 303, 3)],
      dtype=[('idx', '<i8'), ('rec_stage', '<i8'), ('group_id', '<i8')])

The conversion time was about 15 minutes for this run... I would say it is again quite slow? anyway that should be fine.

Merge request reports

Loading