Skip to content

Commit

Permalink
Update test_geant4
Browse files Browse the repository at this point in the history
  • Loading branch information
fhagemann committed Nov 5, 2024
1 parent a78a8c5 commit f466832
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ end
end

@timed_testset "Geant4 extension" begin
if Sys.WORD_SIZE == 64 include("Geant4.jl") end
if Sys.WORD_SIZE == 64 include("test_geant4.jl") end
end

display(testtimer())
7 changes: 7 additions & 0 deletions test/Geant4.jl → test/test_geant4.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# This file is a part of SolidStateDetectors.jl, licensed under the MIT License (MIT).

using Test

using SolidStateDetectors
using Geant4
using RadiationDetectorSignals
Expand Down Expand Up @@ -59,10 +63,13 @@ end
# Simulate 100 events
evts = run_geant4_simulation(app, 100)
@test evts isa Table
@test length(evts) == 100

# Generate waveforms
simulate!(sim, refinement_limits = [0.2,0.1,0.05,0.03,0.02])
wf = simulate_waveforms(evts, sim, Δt = 1u"ns", max_nsteps = 2000)
@test wf isa Table
@test :waveform in columnnames(wf)
@test length(wf) == length(evts) * sum(.!ismissing.(sim.weighting_potentials))

end

0 comments on commit f466832

Please sign in to comment.