Skip to content
Snippets Groups Projects
Commit 64f37815 authored by Stefan Reck's avatar Stefan Reck Committed by Tamas Gal
Browse files

add w2lists_def readout

parent b1985a63
No related branches found
No related tags found
1 merge request!72add w2lists_def readout
......@@ -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
......@@ -538,6 +539,24 @@ def is_3dmuon(trigger_mask):
return is_bit_set(trigger_mask, ktrg.JTRIGGER3DMUON)
def get_w2list_idx(f):
"""
Get the correct w2list_idx for the given file, or None if there is none.
Parameters
----------
f : km3io.OfflineReader
The file.
"""
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)
def is_nanobeacon(trigger_mask):
"""Returns True if the trigger mask contains the nano-beacon flag.
......
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