This PR updates the run loop within simulate_pixels.py to batch the simulation based on the TPC/Module rather than the track segment index. It introduces a TPCBatcher iterator that returns a mask into a track segment array. The batch size can be modified via the EVENT_BATCH_SIZE, which sets the number of TPCs to simulate at once (so 2 TPCs = 1 Module).
The light simulation has been updated to only simulate the "active channels" (those of TPCs that have non-zero deposited energy within the current batch), allowing for more performance flexibility when simulating a detector with many TPCs.
Also modified are the tuned light simulation parameters for Module 0, and the creation of a new sub-module larndsim.util which contains the CudaDict helper class and the new batching classes.
This PR updates the run loop within
simulate_pixels.py
to batch the simulation based on the TPC/Module rather than the track segment index. It introduces aTPCBatcher
iterator that returns a mask into a track segment array. The batch size can be modified via theEVENT_BATCH_SIZE
, which sets the number of TPCs to simulate at once (so 2 TPCs = 1 Module).The light simulation has been updated to only simulate the "active channels" (those of TPCs that have non-zero deposited energy within the current batch), allowing for more performance flexibility when simulating a detector with many TPCs.
Also modified are the tuned light simulation parameters for Module 0, and the creation of a new sub-module
larndsim.util
which contains theCudaDict
helper class and the new batching classes.