Skip to content

Commit

Permalink
Add tests for reading impurity density values from crystal metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
fhagemann committed Nov 15, 2024
1 parent ca9d766 commit b8d5433
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/test_ext_ssd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ include("testing_utils.jl")
sim = Simulation{Float64}(l200, detname, crystal_impurity = true)
@test sim isa Simulation

# Compare active volume from SSD to active volume from LegendDataManagement
SolidStateDetectors.apply_initial_state!(sim, ElectricPotential, Grid(sim, max_tick_distance = 0.1u"mm"))

# Check that all crystals are p-type
@test all(sim.q_eff_imp.data .<= 0)

# Compare active volume from SSD to active volume from LegendDataManagement
active_volume_ssd = SolidStateDetectors.get_active_volume(sim.point_types)
active_volume_ldm = LegendDataManagement.get_active_volume(l200.metadata.hardware.detectors.germanium.diodes[Symbol(detname)], 0.0)
@test isapprox(active_volume_ssd, active_volume_ldm, rtol = 0.01)
Expand Down

0 comments on commit b8d5433

Please sign in to comment.