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
Commits
a6ebca73
Commit
a6ebca73
authored
5 years ago
by
Zineb Aly
Browse files
Options
Downloads
Patches
Plain Diff
add fit params from km3net Dataformat
parent
bd72ae76
No related branches found
No related tags found
1 merge request
!11
Add km3net dataformat
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
km3io/offline.py
+50
-11
50 additions, 11 deletions
km3io/offline.py
with
50 additions
and
11 deletions
km3io/offline.py
+
50
−
11
View file @
a6ebca73
import
uproot
import
uproot
import
warnings
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
# 110 MB based on the size of the largest basket found so far in km3net
BASKET_CACHE_SIZE
=
110
*
1024
**
2
BASKET_CACHE_SIZE
=
110
*
1024
**
2
...
@@ -28,6 +32,9 @@ class OfflineKeys:
...
@@ -28,6 +32,9 @@ class OfflineKeys:
self
.
_cut_hits_keys
=
None
self
.
_cut_hits_keys
=
None
self
.
_cut_tracks_keys
=
None
self
.
_cut_tracks_keys
=
None
self
.
_cut_events_keys
=
None
self
.
_cut_events_keys
=
None
self
.
_trigger
=
None
self
.
_fitparameters
=
None
self
.
_reconstruction
=
None
def
__str__
(
self
):
def
__str__
(
self
):
return
'
\n
'
.
join
([
return
'
\n
'
.
join
([
...
@@ -170,17 +177,7 @@ class OfflineKeys:
...
@@ -170,17 +177,7 @@ class OfflineKeys:
list of all
"
trks.fitinf
"
keys.
list of all
"
trks.fitinf
"
keys.
"""
"""
if
self
.
_fit_keys
is
None
:
if
self
.
_fit_keys
is
None
:
# these are hardcoded because they are not outsourced in offline
self
.
_fit_keys
=
[
*
self
.
fitparameters
.
keys
()]
# 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
'
]
return
self
.
_fit_keys
return
self
.
_fit_keys
@property
@property
...
@@ -228,6 +225,48 @@ class OfflineKeys:
...
@@ -228,6 +225,48 @@ class OfflineKeys:
]
]
return
self
.
_cut_events_keys
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
:
class
Reader
:
"""
Reader for one offline ROOT file
"""
"""
Reader for one offline ROOT file
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment