Celeritas 0.6.0-dev.115+3b60a5fd
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::FastSimulationModel Class Referencefinal

Offload tracks to Celeritas via G4VFastSimulationModel interface. More...

#include <FastSimulationModel.hh>

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

Public Member Functions

 FastSimulationModel (G4String const &name, SharedParams const *params, LocalTransporter *local)
 Construct a model to be used in all volumes of the problem.
 
 FastSimulationModel (G4String const &name, G4Envelope *region, SharedParams const *params, LocalTransporter *local)
 Construct a model for a specific volume of space (an "envelope").
 
G4bool IsApplicable (G4ParticleDefinition const &particle) final
 Return true if this model can be applied to the input G4ParticleDefinition .
 
G4bool ModelTrigger (G4FastTrack const &track) final
 Return true if model can be applied given dynamic particle state in G4FastTrack .
 
void DoIt (G4FastTrack const &track, G4FastStep &step) final
 Offload the incoming track to Celeritas.
 
void Flush ()
 Complete processing of any buffered tracks.
 

Detailed Description

Offload tracks to Celeritas via G4VFastSimulationModel interface.

This class must be constructed locally on each worker thread/task, typically within the application's concrete implementation of G4VUserDetectorConstruction::ConstructSDandField().

Note that the argument G4Envelope is a type alias to G4Region.

Constructor & Destructor Documentation

◆ FastSimulationModel()

celeritas::FastSimulationModel::FastSimulationModel ( G4String const name,
G4Envelope region,
SharedParams const params,
LocalTransporter local 
)

Construct a model for a specific volume of space (an "envelope").

The envelope cannot be nullptr as this will cause a segmentation fault in the G4VFastSimulation base class constructor.

Member Function Documentation

◆ Flush()

void celeritas::FastSimulationModel::Flush ( )

Complete processing of any buffered tracks.

Note that this is called in G4EventManager::DoProcessing(G4Event*) by G4GlobalFastSimulationManager after the main tracking loop has completed. That is done to allow for models that may add "onload" particles back to Geant4.

◆ IsApplicable()

G4bool celeritas::FastSimulationModel::IsApplicable ( G4ParticleDefinition const particle)
final

Return true if this model can be applied to the input G4ParticleDefinition .

Purely checks if the particle is one that Celeritas has been setup to handle.

◆ ModelTrigger()

G4bool celeritas::FastSimulationModel::ModelTrigger ( G4FastTrack const track)
final

Return true if model can be applied given dynamic particle state in G4FastTrack .

Always returns true because we only make the decision to offload to Celeritas based on geometric region and particle type.


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