Skip to content
Snippets Groups Projects
Commit 6a60bbf7 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Unhide counter from mc_trks

parent 6817310d
No related branches found
No related tags found
1 merge request!70Unhide counter from mc_trks
......@@ -54,7 +54,7 @@ where = src
all =
dev =
black==21.6b0
km3net-testdata>=0.2.26
km3net-testdata>=0.3.3
ipykernel
matplotlib
memory_profiler
......
......@@ -83,6 +83,7 @@ class OfflineReader(EventReader):
"len": "mc_trks.len",
"status": "mc_trks.status",
"mother_id": "mc_trks.mother_id",
"counter": "mc_trks.counter",
"pdgid": "mc_trks.type",
"hit_ids": "mc_trks.hit_ids",
"usr": "mc_trks.usr", # TODO: trouble with uproot4
......
......@@ -491,6 +491,14 @@ class TestOfflineTracks(unittest.TestCase):
)
class TestMisc(unittest.TestCase):
def test_mc_tracks_counter(self):
r = OfflineReader(data_path("gseagen/DAT000001.gSeaGen.1.aa.root"))
np.testing.assert_allclose(
[0, 0, 6, 7, 0, 0, 2, 53, 0, 0, 6, 57, 0], r.mc_tracks.counter[0][:13]
)
class TestBranchIndexingMagic(unittest.TestCase):
def setUp(self):
self.events = OFFLINE_FILE.events
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment