Skip to content

Commit 8a1112b

Browse files
committed
Adapt Geant4 example in docs to changes in point types
1 parent 50acfac commit 8a1112b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/src/tutorials/geant4_ssd_lit.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using Geant4
1212
# The extension features a function that creates a `Geant4.G4JLApplcation` object from a SSD `Simulation` object and a particle source.
1313

1414
using Plots
15-
using Unitful
15+
using ArraysOfArrays, Unitful
1616

1717
# Two types of particle source are pre-defined in `SolidStateDetectors`:
1818
#
@@ -89,7 +89,7 @@ events = run_geant4_simulation(app, N_events)
8989

9090
plot(sim.detector, show_passives = false, size = (500,500), fmt = :png)
9191
plot!(source_1)
92-
plot!(CartesianPoint.(broadcast(p -> ustrip.(u"m", p), events[1:1000].pos.data)), ms = 0.5, msw = 0, color=:black, label = "")
92+
plot!(ustrip.(u"m", flatview(events[1:1000].pos)), ms = 0.5, msw = 0, color=:black, label = "")
9393
#jl savefig("events.pdf") # hide
9494
#md savefig("events.pdf") # hide
9595
#md savefig("events.svg"); nothing # hide

0 commit comments

Comments
 (0)