|
Celeritas 0.7+972e6cd
|
A replacement for Geant4's G4Scintillation process which constructs GeneratorDistributionData from a PostStepDoIt call.
More...
#include <ScintillationOffload.hh>

Public Member Functions | |
| void | PreparePhysicsTable (G4ParticleDefinition const &) override |
| Prepare physics table for particle and enforce photon stacking. | |
| G4VParticleChange * | PostStepDoIt (G4Track const &aTrack, G4Step const &aStep) override |
| Create a generator distribution for the given track and step. | |
| G4VParticleChange * | AtRestDoIt (G4Track const &aTrack, G4Step const &aStep) override |
| Create a generator distribution for the given track and step. | |
| ScintillationOffload (ParticleTrackView const &particle, SimTrackView const &sim, Real3 const &pos, units::MevEnergy energy_deposition, NativeCRef< ScintillationData > const &shared, OffloadPreStepData const &pre_step, OffloadPrePostStepData const &pre_post_step) | |
| Construct with input parameters. | |
| template<class Generator > | |
| optical::GeneratorDistributionData | operator() (Generator &rng) |
| Collect the distribution data needed to sample scintillation photons. | |
A replacement for Geant4's G4Scintillation process which constructs GeneratorDistributionData from a PostStepDoIt call.
Sample the number of scintillation photons to be generated.
This process should have stacking photons set to false so that photons are not initialized in Geant4.
This populates the GeneratorDistributionData used by the ScintillationGenerator to generate optical photons using post-step and cached pre-step data.
The post-step speed is calculated from the particle's energy after continuous slowing down but before the particle loses energy in a discrete interaction.
The mean number of photons is a product of the energy deposition and a material-dependent yield fraction (photons per MeV). The actual number of photons sampled is determined by sampling:
|
inline |
Construct with input parameters.
|
override |
Create a generator distribution for the given track and step.
Since G4Scintillation has a qualified call to its own PostStepDoIt method, this override defers to ScintillationOffload::PostStepDoIt instead.
|
inline |
Collect the distribution data needed to sample scintillation photons.
If no photons are sampled an empty object is returned.
|
override |
Create a generator distribution for the given track and step.
Stacking photons should be disabled so that photons are not duplicated in Geant4. After calling the G4Scintillation::PostStepDoIt this function creates a GeneratorDistributionData and pushes it to the local offload, which should be LocalOpticalGenOffload.
|
override |
Prepare physics table for particle and enforce photon stacking.
Defers physics table preparation to G4Scintillation, but also enforces that stacking photons is false afterwards.