Celeritas 0.7.0-12+develop.4db216d5c
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
celeritas::StepCollector Class Reference

Gather and transfer track states at each step. More...

#include <StepCollector.hh>

Public Types

Type aliases
using SPStepInterface = std::shared_ptr< StepInterface >
 
using SPConstCoreGeo = std::shared_ptr< CoreGeoParams const >
 
using SPConstVolume = std::shared_ptr< VolumeParams const >
 
using VecInterface = std::vector< SPStepInterface >
 

Public Member Functions

 StepCollector (SPConstCoreGeo geo, SPConstVolume volume, VecInterface &&callbacks, AuxParamsRegistry *aux_registry, ActionRegistry *action_registry)
 Construct with options and register pre and/or post-step actions.
 
StepSelection const & selection () const
 See which data are being gathered.
 
template<MemSpace M>
StepStateData< Ownership::reference, M > const & step_state (CoreStateInterface const &core) const
 
template<MemSpace M>
StepStateData< Ownership::reference, M > const & step_state (CoreStateInterface const &core) const
 Access the step state stored in a core state's auxiliary data.
 

Static Public Member Functions

static std::shared_ptr< StepCollector > make_and_insert (CoreParams const &core, VecInterface callbacks)
 Construct and add to core params.
 

Detailed Description

Gather and transfer track states at each step.

This defines the interface to set up and manage a generic class for interfacing with the GPU track states at the beginning and/or end of every step.

During Stepper::warm_up, the gather kernels execute but the callbacks are skipped: warmup produces no step result with which to consume deferred hit data. Ordinary transport steps still invoke the callbacks, including when no tracks are active.

Todo:
The step collector serves two purposes: supporting "sensitive detectors" (mapping volume IDs to detector IDs and ignoring unmapped volumes) and supporting unfiltered output for "MC truth" . Right now only one or the other can be used, not both.
Todo:
Like the optical collector, this class is not used after it's created: it just serves to create helper classes. Perhaps move to the setup namespace?

Member Function Documentation

◆ step_state()

template<MemSpace M>
StepStateData< Ownership::reference, M > const & celeritas::StepCollector::step_state ( CoreStateInterface const &  core) const

Access the step state stored in a core state's auxiliary data.

This allows step interfaces to prepare for the state's capacity at setup time, e.g. to allocate host buffers sized to the scratch space. The memory space must match the core state's.


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