celeritas icon indicating copy to clipboard operation
celeritas copied to clipboard

Switch to grid-based sampling for scintillation spectra

Open sethrj opened this issue 2 months ago • 1 comments

Following on to #1974, no experiments or users have the custom Celeritas scintillation mean/stdev distributions: they all use grid-based inputs in energy space. So let's use those, but still convert to wavelength space.

  • [ ] Establish whether the user inputs are probability per bin, or a spectrum, etc. (add a test with nonuniform energy points): look at geant4 source code
  • [ ] Convert probability/energy into CDF vs wavelength
  • [ ] For lambda/sigma Gaussian inputs in unit tests (good for validation) use erf as integrated normal distribution to determine PDF/CDF
  • [ ] Replace gaussian sampler in scintillation with the appropriate sampler
  • [ ] For validation, have a nonuniform spectrum and bin the primary photon energies uniformly and compare between celeritas and g4 and see if they match expected spectrum

sethrj avatar Oct 14 '25 15:10 sethrj

@Rashika-Gupta For the CDF sampling, please see WavelengthShiftGenerator:103-11, and the to-do about this comment https://github.com/celeritas-project/celeritas/pull/1507/files#r1844973621

sethrj avatar Oct 15 '25 19:10 sethrj