celeritas-project / celeritas

Celeritas is a new Monte Carlo transport code designed to accelerate scientific discovery in high energy physics by improving detector simulation throughput and energy efficiency using GPUs.
https://celeritas-project.github.io/celeritas/user/index.html
Other
58 stars 32 forks source link

Add "tracking cut" to handle errors and kill tracks #1311

Closed sethrj closed 2 weeks ago

sethrj commented 2 weeks ago

This replaces #1290 by defining a "tracking cut" that, if set as a post-step action, will kill a track and deposit its energy locally. It is currently used both for "looping" tracks and for initialization errors, replacing a host-only validation/assertion with a host+device error status. Only the host warns the user: we should perhaps add another "track counter" that uses an atomic increment/copy or "mapped" memory to inform the user of the total number of errors per step.

I'm very open to suggestions for using a different terminology... we're using the Geant4 "cut" term, but elsewhere we apply particle physics "cutoff" values, but this class really just kills a track to deposit its energy so it's not exactly a cutoff.