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.
This updates the scintillation photon generator to create a single photon at a time by sampling from material yields instead of splitting the selected photons among them. It also fixes an error in the sampling (which assumed that component index for a material was the same as the component ID).
It keeps us from losing "stratified sampling" of the original implementation but it no longer unfairly rounds.
I refactored some of the data structures and builders to make this happen, and to reduce the amount of work I've removed the unused scintillate-by-particle construction code (which @stognini added and I believe @whokion mildly objected to because it may not be needed). The data structures and related import code are still there; we can either remove those at some future point or re-add the by-particle construction and implement sampling by particle.
This updates the scintillation photon generator to create a single photon at a time by sampling from material yields instead of splitting the selected photons among them. It also fixes an error in the sampling (which assumed that component index for a material was the same as the component ID).
It keeps us from losing "stratified sampling" of the original implementation but it no longer unfairly rounds.
I refactored some of the data structures and builders to make this happen, and to reduce the amount of work I've removed the unused scintillate-by-particle construction code (which @stognini added and I believe @whokion mildly objected to because it may not be needed). The data structures and related import code are still there; we can either remove those at some future point or re-add the by-particle construction and implement sampling by particle.