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
9f4af33c
Commit
9f4af33c
authored
4 years ago
by
Zineb Aly
Browse files
Options
Downloads
Patches
Plain Diff
test default best track
parent
0861ae5a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#11596
failed
4 years ago
Stage: test
Stage: coverage
Stage: doc
Stage: release
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_offline.py
+17
-1
17 additions, 1 deletion
tests/test_offline.py
with
17 additions
and
1 deletion
tests/test_offline.py
+
17
−
1
View file @
9f4af33c
...
...
@@ -4,7 +4,7 @@ import awkward1 as ak1
from
pathlib
import
Path
from
km3io
import
OfflineReader
from
km3io.offline
import
_nested_mapper
,
Header
,
fitinf
,
fitparams
,
count_nested
,
_find
,
mask
,
best_track
from
km3io.offline
import
_nested_mapper
,
Header
,
fitinf
,
fitparams
,
count_nested
,
_find
,
mask
,
best_track
,
rec_types
SAMPLES_DIR
=
Path
(
__file__
).
parent
/
'
samples
'
OFFLINE_FILE
=
OfflineReader
(
SAMPLES_DIR
/
'
aanet_v2.0.0.root
'
)
...
...
@@ -41,6 +41,13 @@ class TestFitinf(unittest.TestCase):
assert
"
JGANDALF_BETA0_RAD
"
in
keys
class
TestRecoTypes
(
unittest
.
TestCase
):
def
test_reco_types
(
self
):
keys
=
set
(
rec_types
())
assert
"
JPP_RECONSTRUCTION_TYPE
"
in
keys
class
TestBestTrack
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
tracks
=
OFFLINE_FILE
.
events
.
tracks
...
...
@@ -50,10 +57,19 @@ class TestBestTrack(unittest.TestCase):
rec_stages_tracks
=
best_track
(
self
.
tracks
,
strategy
=
"
rec_stages
"
,
rec_stages
=
[
1
,
3
,
5
,
4
])
default_best
=
best_track
(
self
.
tracks
,
strategy
=
"
default
"
,
rec_type
=
"
JPP_RECONSTRUCTION_TYPE
"
)
assert
first_tracks
.
dir_z
[
0
]
==
self
.
tracks
.
dir_z
[
0
][
0
]
assert
first_tracks
.
dir_x
[
1
]
==
self
.
tracks
.
dir_x
[
1
][
0
]
assert
rec_stages_tracks
.
rec_stages
[
0
]
==
[
1
,
3
,
5
,
4
]
assert
rec_stages_tracks
.
rec_stages
[
1
]
==
[
1
,
3
,
5
,
4
]
assert
default_best
.
lik
[
0
]
==
ak1
.
max
(
self
.
tracks
.
lik
[
0
])
assert
default_best
.
lik
[
1
]
==
ak1
.
max
(
self
.
tracks
.
lik
[
1
])
assert
default_best
.
rec_type
[
0
]
==
4000
class
TestCountNested
(
unittest
.
TestCase
):
...
...
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