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
182b0f6e
Verified
Commit
182b0f6e
authored
5 months ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Add an option to draw simplified DOMs
parent
5a9afef4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#58086
failed
5 months ago
Stage: test
Stage: docs
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+12
-0
12 additions, 0 deletions
README.md
src/core.jl
+17
-14
17 additions, 14 deletions
src/core.jl
with
29 additions
and
14 deletions
README.md
+
12
−
0
View file @
182b0f6e
...
...
@@ -46,6 +46,18 @@ As seen in the example above, the detector geometry is "updated" using `update!(
Tracks and hits can be added in a similar way, but using
`add!(hits)`
.
Check out the
`scripts/vhe_paper.jl`
script for more inspiration.
## Performance Issues
If you encounter any performance issues, you can remove e.g. the detailed DOM rendering
by passing
`simplified_doms=true`
to
`update!(detector; ...)`
, like
```
julia
julia
>
update!
(
d
;
simplified_doms
=
true
)
```
Make sure not to overuse
`add!(hits)`
, since each hit cloud adds some overhead to the
animation loop, even if not fully displayed.
## Keybindings
You can use
<kbd>
←
</kbd>
and
<kbd>
→
</kbd>
to go back and forth in time and
<kbd>
R
</kbd>
to reset the time.
...
...
This diff is collapsed.
Click to expand it.
src/core.jl
+
17
−
14
View file @
182b0f6e
...
...
@@ -264,7 +264,7 @@ function generate_hit_positions(hits; pmt_distance=5, hit_distance=2)
end
function
update!
(
rba
::
RBA
,
det
::
Detector
;
dom_diameter
=
0.4
,
pmt_diameter
=
0.076
,
dom_scaling
=
5
,
with_basegrid
=
true
)
function
update!
(
rba
::
RBA
,
det
::
Detector
;
simplified_doms
=
false
,
dom_diameter
=
0.4
,
pmt_diameter
=
0.076
,
dom_scaling
=
5
,
with_basegrid
=
true
)
scene
=
rba
.
scene
det_center
=
center
(
det
)
rba
.
center
=
det_center
...
...
@@ -287,25 +287,28 @@ function update!(rba::RBA, det::Detector; dom_diameter=0.4, pmt_diameter=0.076,
plots
=
rba
.
_plots
[
"Detector"
]
=
[]
opticalmodules
=
[
m
for
m
in
det
if
isopticalmodule
(
m
)]
pmt_positions
=
Position
{
Float64
}[]
for
m
in
det
!
isopticalmodule
(
m
)
&&
continue
for
pmt
in
m
push!
(
pmt_positions
,
pmt
.
pos
+
pmt
.
dir
*
dom_diameter
*
dom_scaling
-
pmt
.
dir
*
pmt_diameter
*
dom_scaling
)
end
end
push!
(
plots
,
meshscatter!
(
scene
,
pmt_positions
,
markersize
=
pmt_diameter
*
dom_scaling
,
color
=
RGBAf
(
1.0
,
1.0
,
1.0
,
0.4
)
))
push!
(
plots
,
meshscatter!
(
scene
,
[
m
.
pos
for
m
∈
opticalmodules
],
markersize
=
dom_diameter
*
dom_scaling
,
color
=
RGBAf
(
0.3
,
0.3
,
0.3
,
0.8
)
))
if
!
simplified_doms
pmt_positions
=
Position
{
Float64
}[]
for
m
in
det
!
isopticalmodule
(
m
)
&&
continue
for
pmt
in
m
push!
(
pmt_positions
,
pmt
.
pos
+
pmt
.
dir
*
dom_diameter
*
dom_scaling
-
pmt
.
dir
*
pmt_diameter
*
dom_scaling
)
end
end
push!
(
plots
,
meshscatter!
(
scene
,
pmt_positions
,
markersize
=
pmt_diameter
*
dom_scaling
,
color
=
RGBAf
(
1.0
,
1.0
,
1.0
,
0.4
)
))
end
# basemodules = [m for m ∈ det if isbasemodule(m)]
# push!(plots, meshscatter!(
# scene,
...
...
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