diff --git a/src/pmt.jl b/src/pmt.jl index 648993318f18aa1365c54ce8f34081487fe96700..5781bfae7d5e8eedd0811730f6e8c89039eca939 100644 --- a/src/pmt.jl +++ b/src/pmt.jl @@ -17,8 +17,6 @@ end const KM3NeTPMT = PMTModel( 45.4e-4, # The quantum efficiency includes absorption in glass and gel. - # Yields slightly different values compared to the Jpp getQE() function, - # very probably due to the interpolation implementation. LinearInterpolator( [ 0, diff --git a/test/runtests.jl b/test/runtests.jl index b06e1b9d2a20982668579751ee2dacf4c4744dc6..7559138a1dafd5ae69c173edc79aae1247210bc8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,26 +2,44 @@ using LumenManufaktur using Test @testset "direct light from muon" begin - params = LMParameters(dispersion_model = DispersionARCA) + params = LMParameters(dispersion_model = DispersionORCA) pmt = LumenManufaktur.KM3NeTPMT # The relative tolerances are based on comparisons between - # LumenManufaktur.jl v01.1.1 and Jpp v18.6.0-rc.1-26-g83ce39ff1 + # LumenManufaktur.jl v0.5.1 and Jpp v18.6.0-rc.1-26-g83ce39ff1 @test isapprox( 0.0304415, directlightfrommuon(params, pmt, 30, 2.33319, π), - rtol = 0.017, + rtol = 0.000001, ) @test isapprox( 0.00152972, directlightfrommuon(params, pmt, 23, 4.78319, π / 2), - rtol = 0.017, + rtol = 0.0001, ) @test isapprox( 2.63515e-05, directlightfrommuon(params, pmt, 42, 1.78319, π / 3), - rtol = 0.025, + rtol = 0.0001, + ) + @test isapprox( + 13.0251, + directlightfrommuon(params, pmt, 1.15, 2.85599, π / 2, 0.01), + rtol = 0.000001, ) @test 0 ≈ directlightfrommuon(params, pmt, 5, 0.78319, 0.5708) + + @test isapprox( + 0.00414637, + scatteredlightfrommuon(params, pmt, 2.0, 0.5, π / 2, π, 1.23), + rtol = 0.000001, + ) +# + @test isapprox( + 0.00432646, + directlightfromdeltarays(params, pmt, 1.5, π/2, π/3, 1.23), + rtol = 0.000001 + ) + end