Celeritas 0.7.0-dev.127+develop.e63889793
|
Construct a Celeritas tracking manager that offloads EM tracks. More...
#include <TrackingManagerConstructor.hh>
Public Types | |
Type aliases | |
using | LocalTransporterFromThread = std::function< LocalTransporter *(int)> |
using | VecG4PD = SetupOptions::VecG4PD |
Public Member Functions | |
TrackingManagerConstructor (SharedParams const *shared, LocalTransporterFromThread get_local) | |
Construct name and mode. | |
TrackingManagerConstructor (TrackingManagerIntegration *tmi) | |
Construct from tracking manager integration. | |
void | ConstructParticle () override |
Build list of particles to be offloaded. | |
void | ConstructProcess () override |
Build and attach tracking manager. | |
SharedParams const * | shared_params () const |
Get the shared params associated with this TM. | |
LocalTransporter * | get_local_transporter () const |
Get the local transporter associated with the current thread ID. | |
Construct a Celeritas tracking manager that offloads EM tracks.
This should be composed with your physics list after it is constructed, before the simulation begins. By default this uses the celeritas::TrackingManagerIntegration
helper:
but for manual integration it can be constructed with a function to get a reference to the thread-local LocalTransporter
from the Geant4 thread ID:
celeritas::TrackingManagerConstructor::TrackingManagerConstructor | ( | SharedParams const * | shared, |
LocalTransporterFromThread | get_local | ||
) |
Construct name and mode.
Error checking is deferred until ConstructProcess.
|
explicit |
Construct from tracking manager integration.
Since there's only ever one tracking manager integration, we can just use the behind-the-hood objects.
|
override |
Build list of particles to be offloaded.
Construct particles and determine which to offload.
This is called early in the application, when the physics list is passed to the run manager. It is only called once on a multithreaded run, during Geant4's Pre_Init
state.