Celeritas
0.5.0-86+4a8eea4
|
Sample the number of Cherenkov photons to be generated. More...
#include <CherenkovOffload.hh>
Public Member Functions | |
CELER_FUNCTION | CherenkovOffload (ParticleTrackView const &particle, SimTrackView const &sim, optical::MaterialView const &mat, Real3 const &pos, NativeCRef< optical::CherenkovData > const &shared, OffloadPreStepData const &step_data) |
Construct with optical material, Cherenkov, and step information. | |
template<class Generator > | |
CELER_FUNCTION optical::GeneratorDistributionData | operator() (Generator &rng) |
Return an GeneratorDistributionData object. More... | |
Sample the number of Cherenkov photons to be generated.
This populates the GeneratorDistributionData
used by the CherenkovGenerator
to generate optical photons using post-step and cached pre-step data.
The number of photons is sampled from a Poisson distribution with a mean
\[ \langle n \rangle = \ell_\text{step} \difd{N}{x} \]
where \( \ell_\text{step} \) is the step length.
|
inline |
Return an GeneratorDistributionData
object.
If no photons are sampled, an empty object is returned and can be verified via its own operator bool.