Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
km3pipe
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
13
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
km3pipe
Merge requests
!180
improve ndarray elements access in physics.py
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
improve ndarray elements access in physics.py
patch-1
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Zineb Aly
requested to merge
patch-1
into
master
4 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
👍
0
👎
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
5f07df03
1 commit,
4 years ago
1 file
+
6
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
km3pipe/physics.py
+
6
−
6
Options
@@ -122,18 +122,18 @@ def _cherenkov(calib_pos, calib_dir, track_pos, track_dir, track_t):
# (vector PMT) - (vector track position)
V
=
calib_pos
[
i
]
-
track_pos
L
=
np
.
sum
(
V
*
track_dir
)
out
[
i
][
0
]
=
np
.
sqrt
(
np
.
sum
(
V
*
V
)
-
L
*
L
)
# d_photon_closest
out
[
i
][
1
]
=
out
[
i
][
0
]
/
SIN_CHERENKOV
# d_photon
out
[
i
][
2
]
=
L
-
out
[
i
][
0
]
/
TAN_CHERENKOV
# d_track
out
[
i
][
3
]
=
(
out
[
i
,
0
]
=
np
.
sqrt
(
np
.
sum
(
V
*
V
)
-
L
*
L
)
# d_photon_closest
out
[
i
,
1
]
=
out
[
i
][
0
]
/
SIN_CHERENKOV
# d_photon
out
[
i
,
2
]
=
L
-
out
[
i
][
0
]
/
TAN_CHERENKOV
# d_track
out
[
i
,
3
]
=
(
track_t
+
out
[
i
][
2
]
/
C_LIGHT
+
out
[
i
][
1
]
/
V_LIGHT_WATER
)
# t_photon
V_photon
=
V
-
(
out
[
i
][
2
]
*
track_dir
)
# photon position
norm
=
np
.
sqrt
(
np
.
sum
(
V_photon
*
V_photon
))
out
[
i
][
5
:
8
]
=
V_photon
/
norm
# photon direction
out
[
i
,
5
:
8
]
=
V_photon
/
norm
# photon direction
# cos angle of impact of photon with respect to the PMT direction
out
[
i
][
4
]
=
np
.
sum
(
out
[
i
][
5
:
8
]
*
calib_dir
[
i
])
out
[
i
,
4
]
=
np
.
sum
(
out
[
i
][
5
:
8
]
*
calib_dir
[
i
])
return
out
Loading