celeritas
celeritas copied to clipboard
Switch to grid-based sampling for scintillation spectra
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
erfas 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
@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