Celeritas 0.6.0-rc.2.10+develop.de0a3a05
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
celeritas::TrackingManagerConstructor Class Referencefinal

Construct a Celeritas tracking manager that offloads EM tracks. More...

#include <TrackingManagerConstructor.hh>

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

Public Types

Type aliases
using LocalTransporterFromThread = std::function< LocalTransporter *(int)>
 

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
 Null-op: particles are constructed elsewhere.
 
void ConstructProcess () override
 Build and attach tracking manager.
 
SharedParams constshared_params () const
 Get the shared params associated with this TM.
 
LocalTransporterget_local_transporter () const
 Get the local transporter associated with the current thread ID.
 

Static Public Member Functions

static Span< G4ParticleDefinition *constOffloadParticles ()
 Get a list of supported particles that will be offloaded.
 

Detailed Description

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:

auto* physics_list = new FTFP_BERT;
physics_list->RegisterPhysics(new TrackingManagerConstructor{
Construct a Celeritas tracking manager that offloads EM tracks.
Definition TrackingManagerConstructor.hh:48
static TrackingManagerIntegration & Instance()
Access the public-facing integration singleton.
Definition TrackingManagerIntegration.cc:130

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:

auto* physics_list = new FTFP_BERT;
physics_list->RegisterPhysics(new TrackingManagerConstructor{
shared_params, [](int){ return &local_transporter; });
SharedParams const * shared_params() const
Get the shared params associated with this TM.
Definition TrackingManagerConstructor.hh:75
Note
If Celeritas is globally disabled, it will not add the track manager. If Celeritas is configured to "kill offload" mode (for testing maximum theoretical performance) then the tracking manager will be added but will not send the tracks to Celeritas: it will simply kill them.

Constructor & Destructor Documentation

◆ TrackingManagerConstructor() [1/2]

celeritas::TrackingManagerConstructor::TrackingManagerConstructor ( SharedParams const shared,
LocalTransporterFromThread  get_local 
)

Construct name and mode.

Error checking is deferred until ConstructProcess.

◆ TrackingManagerConstructor() [2/2]

celeritas::TrackingManagerConstructor::TrackingManagerConstructor ( TrackingManagerIntegration tmi)
explicit

Construct from tracking manager integration.

Since there's only ever one tracking manager integration, we can just use the behind-the-hood objects.


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