Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NeRCA.jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
Tamas Gal
NeRCA.jl
Merge requests
!3
Muonscanfit
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Muonscanfit
muonscanfit
into
master
Overview
0
Commits
88
Pipelines
40
Changes
1
Merged
Tamas Gal
requested to merge
muonscanfit
into
master
1 year ago
Overview
0
Commits
88
Pipelines
40
Changes
1
Expand
0
0
Merge request reports
Viewing commit
f72f9fd0
Prev
Next
Show latest version
1 file
+
6
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Verified
f72f9fd0
Improve HitR1/HitL1 interface
· f72f9fd0
Tamas Gal
authored
1 year ago
src/hits.jl
+
6
−
6
Options
@@ -66,11 +66,11 @@ struct HitR1 <: AbstractReducedHit
end
Base
.
isless
(
lhs
::
HitR1
,
rhs
::
HitR1
)
=
lhs
.
dom_id
==
rhs
.
dom_id
?
time
(
lhs
)
<
time
(
rhs
)
:
lhs
.
dom_id
<
rhs
.
dom_id
const
HitR2
=
HitR1
function
HitR1
(
m
::
DetectorModule
,
hits
::
Vector
{
HitL0
})
function
HitR1
(
dom_id
::
Integer
,
hits
::
Vector
{
HitL0
})
combined_hit
=
combine
(
hits
)
h
=
first
(
hits
)
count
=
weight
=
length
(
hits
)
HitR1
(
m
.
id
,
h
.
pos
,
combined_hit
.
t
,
combined_hit
.
tot
,
count
,
weight
)
HitR1
(
dom_
id
,
h
.
pos
,
combined_hit
.
t
,
combined_hit
.
tot
,
count
,
weight
)
end
# function HitR1(m::DetectorModule, hit::HitL1)
# count = weight = length(hit)
@@ -292,16 +292,16 @@ end
"""
Calibrates hits.
"""
function
calibrate
(
T
::
Type
{
HitR1
},
det
::
Detector
,
hits
)
function
KM3io.
calibrate
(
T
::
Type
{
HitR1
},
det
::
Detector
,
hits
)
rhits
=
sizehint!
(
Vector
{
T
}(),
length
(
hits
))
for
hit
∈
hits
pmt
=
det
[
hit
.
dom_id
][
hit
.
channel_id
]
t
=
hit
.
t
+
pmt
.
t₀
push!
(
rhits
,
T
(
hit
.
dom_id
,
pmt
.
pos
,
Hit
(
t
,
hit
.
tot
)
))
push!
(
rhits
,
T
(
hit
.
dom_id
,
pmt
.
pos
,
t
,
hit
.
tot
,
1
,
0
))
end
rhits
end
function
calibrate
(
T
::
Type
{
HitL0
},
m
::
DetectorModule
,
hits
)
function
KM3io.
calibrate
(
T
::
Type
{
HitL0
},
m
::
DetectorModule
,
hits
)
chits
=
sizehint!
(
Vector
{
T
}(),
length
(
hits
))
for
hit
∈
hits
pmt
=
m
[
hit
.
channel_id
]
@@ -377,7 +377,7 @@ function _findL1!(out::Vector{H}, m::DetectorModule, hits, Δt, combine::Bool) w
if
ref_idx
!=
end_idx
coincident_hits
=
[
chits
[
i
]
for
i
∈
ref_idx
:
end_idx
]
# push!(out, H(m, HitL1(m.id, coincident_hits)))
push!
(
out
,
H
(
m
,
coincident_hits
))
push!
(
out
,
H
(
m
.
id
,
coincident_hits
))
if
combine
ref_idx
=
end_idx
end
Loading