diff --git a/larndsim/config/config.yaml b/larndsim/config/config.yaml index b3947fcc..e9fc0546 100644 --- a/larndsim/config/config.yaml +++ b/larndsim/config/config.yaml @@ -57,6 +57,11 @@ module0: LIGHT_LUT_ID: [0, 1, 1, 1] MOD2MOD_VARIATION: True +2x2_lut_fp16: + <<: *2x2modvar + LIGHT_LUT: [/dvs_ro/cfs/cdirs/dune/www/data/2x2/simulation/larndsim_data/light_LUT/lightLUT_Mod0_06052024_time_norm_swapped_y_fp16.npz, /dvs_ro/cfs/cdirs/dune/www/data/2x2/simulation/larndsim_data/light_LUT/lightLUT_Mod123_06052024_time_norm_swapped_y_fp16.npz] + LIGHT_LUT_ID: [0, 1, 1, 1] + # 2x2 (differnt module configuration), single pixel threshold (defined in detector property) 2x2_single_threshold: <<: *2x2modvar @@ -82,14 +87,19 @@ ndlar: &ndlarmain LIGHT_DET_NOISE: 4Mod_LNoise_Mod1_2fftx192_MR5-ish.npy LIGHT_SIMULATED: False MOD2MOD_VARIATION: True - + +ndlar_mpvmpr: + <<: *ndlarmain + SIM_PROPERTIES: singles_sim_ndlar.yaml + ndlar_light: <<: *ndlarmain LIGHT_SIMULATED: True -ndlar_mpvmpr: +ndlar_light_lut_fp16: <<: *ndlarmain - SIM_PROPERTIES: singles_sim_ndlar.yaml + LIGHT_LUT: /dvs_ro/cfs/cdirs/dune/www/data/2x2/simulation/larndsim_data/light_LUT/lightLUT_FSD_250123_time_norm_fp16.npz + LIGHT_SIMULATED: True fsd: SIM_PROPERTIES: cosmic_sim.yaml @@ -104,3 +114,7 @@ fsd: LIGHT_LUT: /dvs_ro/cfs/cdirs/dune/www/data/2x2/simulation/larndsim_data/light_LUT/lightLUT_FSD_250123_time_norm.npz LIGHT_DET_NOISE: FSD_v01_bin06_larndsim_noise.npy LIGHT_SIMULATED: True + +fsd_lut_fp16: + <<: *fsd + LIGHT_LUT: /dvs_ro/cfs/cdirs/dune/www/data/2x2/simulation/larndsim_data/light_LUT/lightLUT_FSD_250123_time_norm_fp16.npz diff --git a/larndsim/light_sim.py b/larndsim/light_sim.py index 7c166918..162747fc 100644 --- a/larndsim/light_sim.py +++ b/larndsim/light_sim.py @@ -6,6 +6,7 @@ import numba as nb from numba import cuda +from numba import float32 import numpy as np import cupy as cp @@ -100,7 +101,7 @@ def sum_light_signals(segments, segment_voxel, segment_track_id, light_inc, op_c for iprof in range(time_profile.shape[0]): profile_time = track_time + iprof * units.ns / units.mus # FIXME: assumes light LUT time profile bins are 1ns (might not be true in general) if profile_time < end_tick_time and profile_time > start_tick_time: - photons = light_inc['n_photons_det'][itrk,op_channel[idet]] * time_profile[iprof] / light.LIGHT_TICK_SIZE + photons = light_inc['n_photons_det'][itrk,op_channel[idet]] * float32(time_profile[iprof]) / light.LIGHT_TICK_SIZE light_sample_inc[idet,itick] += photons if photons > sim.MC_TRUTH_THRESHOLD: