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

Merge branch 'add_w2lists_def_readout' into 'master'

add w2lists_def readout

See merge request !72
parents b1985a63 64f37815
No related branches found
No related tags found
1 merge request!72add w2lists_def readout
Pipeline #29108 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
......@@ -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