From 55ff79aa0c32d0c9dbd054356a600ff1f39a6afc Mon Sep 17 00:00:00 2001 From: Manu Le Guirriec <eleguirriec@km3net.de> Date: Thu, 23 Jun 2022 13:22:00 +0000 Subject: [PATCH] Create a tool to check nanobeacon flag in trigger mask --- src/km3io/tools.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/km3io/tools.py b/src/km3io/tools.py index c684219..c2d8a82 100644 --- a/src/km3io/tools.py +++ b/src/km3io/tools.py @@ -536,3 +536,14 @@ 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 is_nanobeacon(trigger_mask): + """Returns True if the trigger mask contains the nano-beacon flag. + + Parameters + ---------- + trigger_mask : int or array(int) + A value or an array of the trigger_mask, either of an event, or a hit. + """ + return is_bit_set(trigger_mask, ktrg.JTRIGGERNB) -- GitLab