Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RainbowAlga.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
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
Tamas Gal
RainbowAlga.jl
Commits
dac7f778
Verified
Commit
dac7f778
authored
1 month ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup
parent
6e27570c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/vhe_paper.jl
+1
-41
1 addition, 41 deletions
scripts/vhe_paper.jl
with
1 addition
and
41 deletions
scripts/vhe_paper.jl
+
1
−
41
View file @
dac7f778
...
...
@@ -23,7 +23,7 @@ function main()
event
=
first
(
f
.
offline
)
muon
=
bestjppmuon
(
event
)
#hits = select_hits(event.hits, muon)
#hits = select_
cherenkov_
hits(event.hits, muon)
hits
=
filter
(
h
->
h
.
dom_id
!=
808950076
&&
h
.
channel_id
!=
3
,
event
.
hits
)
hits
=
select_first_hits
(
hits
;
n
=
5
,
maxtot
=
256
)
...
...
@@ -116,44 +116,4 @@ function main()
end
"""
Select hits within a specific Cherenkov time window with respect to the given track.
"""
function
select_hits
(
hits
::
T
,
track
;
mintot
=
20
,
maxtot
=
255
,
tmin
=-
50
,
tmax
=
500
)
where
T
hits
=
filter
(
h
->
mintot
<
h
.
tot
<
maxtot
,
hits
)
out
=
T
()
for
hit
in
hits
chit
=
cherenkov
(
track
,
hit
)
if
tmin
<
chit
.
Δt
<
tmax
push!
(
out
,
hit
)
end
end
sort
(
out
;
by
=
h
->
h
.
t
)
end
"""
Select the first `n` hits on each PMT.
"""
function
select_first_hits
(
hits
::
T
;
n
=
1
,
mintot
=
20
,
maxtot
=
255
)
where
T
hits
=
filter
(
h
->
mintot
<
h
.
tot
<
maxtot
,
hits
)
out
=
T
()
sort!
(
hits
;
by
=
h
->
h
.
t
)
pmts
=
Dict
{
Tuple
{
Int
,
Int
},
Int
}()
for
hit
in
hits
pmtkey
=
(
hit
.
dom_id
,
hit
.
channel_id
)
if
!
(
pmtkey
in
keys
(
pmts
))
pmts
[
pmtkey
]
=
1
end
pmts
[
pmtkey
]
>
n
&&
continue
pmts
[
pmtkey
]
+=
1
push!
(
out
,
hit
)
end
out
end
main
()
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