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
!11
Add km3net dataformat
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add km3net dataformat
add-km3net-Dataformat
into
master
Overview
7
Commits
9
Pipelines
7
Changes
2
Merged
Zineb Aly
requested to merge
add-km3net-Dataformat
into
master
5 years ago
Overview
7
Commits
9
Pipelines
7
Changes
2
Expand
This closes issue
#21 (closed)
Edited
5 years ago
by
Zineb Aly
0
0
Merge request reports
Compare
master
version 6
ee159c0a
5 years ago
version 5
3321d2a9
5 years ago
version 4
6fe49012
5 years ago
version 3
adba4126
5 years ago
version 2
698e68d7
5 years ago
version 1
a0f31a7b
5 years ago
master (base)
and
version 1
latest version
20d89e6f
9 commits,
5 years ago
version 6
ee159c0a
8 commits,
5 years ago
version 5
3321d2a9
7 commits,
5 years ago
version 4
6fe49012
6 commits,
5 years ago
version 3
adba4126
5 commits,
5 years ago
version 2
698e68d7
3 commits,
5 years ago
version 1
a0f31a7b
2 commits,
5 years ago
2 files
+
77
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
km3io/offline.py
+
50
−
11
Options
import
uproot
import
warnings
import
km3io.definitions.trigger
import
km3io.definitions.fitparameters
import
km3io.definitions.reconstruction
# 110 MB based on the size of the largest basket found so far in km3net
BASKET_CACHE_SIZE
=
110
*
1024
**
2
@@ -28,6 +32,9 @@ class OfflineKeys:
self
.
_cut_hits_keys
=
None
self
.
_cut_tracks_keys
=
None
self
.
_cut_events_keys
=
None
self
.
_trigger
=
None
self
.
_fitparameters
=
None
self
.
_reconstruction
=
None
def
__str__
(
self
):
return
'
\n
'
.
join
([
@@ -170,17 +177,7 @@ class OfflineKeys:
list of all
"
trks.fitinf
"
keys.
"""
if
self
.
_fit_keys
is
None
:
# these are hardcoded because they are not outsourced in offline
# files
self
.
_fit_keys
=
[
'
JGANDALF_BETA0_RAD
'
,
'
JGANDALF_BETA1_RAD
'
,
'
JGANDALF_CHI2
'
,
'
JGANDALF_NUMBER_OF_HITS
'
,
'
JENERGY_ENERGY
'
,
'
JENERGY_CHI2
'
,
'
JGANDALF_LAMBDA
'
,
'
JGANDALF_NUMBER_OF_ITERATIONS
'
,
'
JSTART_NPE_MIP
'
,
'
JSTART_NPE_MIP_TOTAL
'
,
'
JSTART_LENGTH_METRES
'
,
'
JVETO_NPE
'
,
'
JVETO_NUMBER_OF_HITS
'
,
'
JENERGY_MUON_RANGE_METRES
'
,
'
JENERGY_NOISE_LIKELIHOOD
'
,
'
JENERGY_NDF
'
,
'
JENERGY_NUMBER_OF_HITS
'
,
'
JCOPY_Z_M
'
]
self
.
_fit_keys
=
[
*
self
.
fitparameters
.
keys
()]
return
self
.
_fit_keys
@property
@@ -228,6 +225,48 @@ class OfflineKeys:
]
return
self
.
_cut_events_keys
@property
def
trigger
(
self
):
"""
trigger parameters and their index from km3net-Dataformat.
Returns
-------
dict
dictionary of trigger parameters and their index in an Offline
file.
"""
if
self
.
_trigger
is
None
:
self
.
_trigger
=
km3io
.
definitions
.
trigger
.
data
return
self
.
_trigger
@property
def
reconstruction
(
self
):
"""
reconstruction parameters and their index from km3net-Dataformat.
Returns
-------
dict
dictionary of reconstruction parameters and their index in an
Offline file.
"""
if
self
.
_reconstruction
is
None
:
self
.
_reconstruction
=
km3io
.
definitions
.
reconstruction
.
data
return
self
.
_reconstruction
@property
def
fitparameters
(
self
):
"""
fit parameters parameters and their index from km3net-Dataformat.
Returns
-------
dict
dictionary of fit parameters and their index in an Offline
file.
"""
if
self
.
_fitparameters
is
None
:
self
.
_fitparameters
=
km3io
.
definitions
.
fitparameters
.
data
return
self
.
_fitparameters
class
Reader
:
"""
Reader for one offline ROOT file
"""
Loading