Celeritas 0.7+972e6cd
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::ScintillationOffload Class Reference

A replacement for Geant4's G4Scintillation process which constructs GeneratorDistributionData from a PostStepDoIt call. More...

#include <ScintillationOffload.hh>

Inheritance diagram for celeritas::ScintillationOffload:
Inheritance graph
[legend]

Public Member Functions

void PreparePhysicsTable (G4ParticleDefinition const &) override
 Prepare physics table for particle and enforce photon stacking.
 
G4VParticleChangePostStepDoIt (G4Track const &aTrack, G4Step const &aStep) override
 Create a generator distribution for the given track and step.
 
G4VParticleChangeAtRestDoIt (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.
 

Detailed Description

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:

Constructor & Destructor Documentation

◆ ScintillationOffload()

celeritas::ScintillationOffload::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 
)
inline

Construct with input parameters.

Todo:
Use visible energy deposition when Birks law is implemented

Member Function Documentation

◆ AtRestDoIt()

G4VParticleChange * celeritas::ScintillationOffload::AtRestDoIt ( G4Track const aTrack,
G4Step const aStep 
)
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.

◆ operator()()

template<class Generator >
optical::GeneratorDistributionData celeritas::ScintillationOffload::operator() ( Generator rng)
inline

Collect the distribution data needed to sample scintillation photons.

If no photons are sampled an empty object is returned.

◆ PostStepDoIt()

G4VParticleChange * celeritas::ScintillationOffload::PostStepDoIt ( G4Track const aTrack,
G4Step const aStep 
)
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.

◆ PreparePhysicsTable()

void celeritas::ScintillationOffload::PreparePhysicsTable ( G4ParticleDefinition const particle)
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.


The documentation for this class was generated from the following files: