Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
km3io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
km3py
km3io
Merge requests
!72
add w2lists_def readout
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
add w2lists_def readout
add_w2lists_def_readout
into
master
Overview
4
Commits
4
Pipelines
4
Changes
1
Merged
Stefan Reck
requested to merge
add_w2lists_def_readout
into
master
2 years ago
Overview
4
Commits
4
Pipelines
4
Changes
1
Expand
Add function to automatically read out w2list_XXX_idx from definitions for an offline file
0
0
Merge request reports
Compare
master
version 3
1e203885
2 years ago
version 2
41720972
2 years ago
version 1
b549cf32
2 years ago
master (base)
and
latest version
latest version
f4f48a33
4 commits,
2 years ago
version 3
1e203885
3 commits,
2 years ago
version 2
41720972
2 commits,
2 years ago
version 1
b549cf32
1 commit,
2 years ago
1 file
+
19
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/km3io/tools.py
+
19
−
0
Options
@@ -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.
Loading