DUNE / larnd-sim

Simulation framework for a pixelated Liquid Argon TPC
Apache License 2.0
10 stars 27 forks source link

Upgrade/implement batching #96

Closed peter-madigan closed 1 year ago

peter-madigan commented 1 year ago

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.

peter-madigan commented 1 year ago

Addresses #90