Skip to content
Snippets Groups Projects
Commit b549cf32 authored by Stefan Reck's avatar Stefan Reck
Browse files

add function

parent cba08523
No related branches found
No related tags found
1 merge request!72add w2lists_def readout
Pipeline #29002 passed with warnings
......@@ -5,6 +5,7 @@ import numpy as np
import awkward as ak
import uproot3
import km3io.definitions
from km3io.definitions import reconstruction as krec
from km3io.definitions import trigger as ktrg
from km3io.definitions import fitparameters as kfit
......@@ -536,3 +537,13 @@ def is_3dmuon(trigger_mask):
A value or an array of the trigger_mask, either of an event, or a hit.
"""
return is_bit_set(trigger_mask, ktrg.JTRIGGER3DMUON)
def get_w2defs_idx(f):
w2s_idx = {
"genhen": km3io.definitions.w2list_genhen_idx,
"gseagen": km3io.definitions.w2list_gseagen_idx,
}
sim_program = f.header.simul.program.lower()
return w2s_idx.get(sim_program)
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