|
Celeritas 0.7+ef734374e
|
Record sensitive detector data for optical photons at the end of every step. More...
#include <DetectorAction.hh>

Public Types | |
Type aliases | |
| using | SPActionRegistry = std::shared_ptr< ActionRegistry > |
| using | SPAuxParamsRegistry = std::shared_ptr< AuxParamsRegistry > |
| using | CallbackFunc = inp::OpticalDetector::HitCallbackFunc |
Public Types inherited from celeritas::ActionTypeTraits< P, S > | |
| using | CoreParams = P |
| using | CoreStateHost = S< MemSpace::host > |
| using | CoreStateDevice = S< MemSpace::device > |
| using | SpanCoreStateHost = Span< S< MemSpace::host > *const > |
| using | SpanCoreStateDevice = Span< S< MemSpace::device > *const > |
Public Types inherited from celeritas::AuxParamsInterface | |
| using | UPState = std::unique_ptr< AuxStateInterface > |
| Default destructor. | |
Public Member Functions | |
| DetectorAction (ActionId, AuxId, CallbackFunc const &) | |
| Construct with action ID, aux ID, and callback function. | |
| void | step (CoreParams const &, CoreStateHost &) const final |
| Launch the detector action on host. | |
| void | step (CoreParams const &, CoreStateDevice &) const final |
| Launch the detector action on device. | |
| StepActionOrder | order () const final |
| Dependency ordering of the action. | |
Action interface | |
| ActionId | action_id () const final |
| ID of the action. | |
| std::string_view | label () const final |
| Short name for the action (also satisfies AuxParamsInterface::label) | |
| std::string_view | description () const final |
| Description of the action. | |
Aux interface | |
| AuxId | aux_id () const final |
| Index of this class instance in its registry. | |
| UPState | create_state (MemSpace, StreamId, size_type) const final |
| Build auxiliary state data for a stream. | |
Public Member Functions inherited from celeritas::StepActionInterface< P, S > | |
| virtual void | step (P const &, S< MemSpace::host > &) const =0 |
| Execute the action with host data. | |
| virtual void | step (P const &, S< MemSpace::device > &) const =0 |
| Execute the action with device data. | |
Public Member Functions inherited from celeritas::ActionInterface | |
| virtual | ~ActionInterface () noexcept=0 |
| Default destructor. | |
Public Member Functions inherited from celeritas::AuxParamsInterface | |
| virtual | ~AuxParamsInterface () |
| Default destructor. | |
Static Public Member Functions | |
| static std::shared_ptr< DetectorAction > | make_and_insert (SPActionRegistry const &, SPAuxParamsRegistry const &, CallbackFunc const &) |
| Create and add to optical params. | |
Additional Inherited Members | |
Protected Member Functions inherited from celeritas::ActionInterface | |
| ActionInterface (ActionInterface const &)=default | |
| ActionInterface & | operator= (ActionInterface const &)=default |
| ActionInterface (ActionInterface &&)=default | |
| ActionInterface & | operator= (ActionInterface &&)=default |
Protected Member Functions inherited from celeritas::AuxParamsInterface | |
| AuxParamsInterface ()=default | |
| AuxParamsInterface (AuxParamsInterface const &)=default | |
| Default destructor. | |
| AuxParamsInterface & | operator= (AuxParamsInterface const &)=default |
| Default destructor. | |
| AuxParamsInterface (AuxParamsInterface &&)=default | |
| Default destructor. | |
| AuxParamsInterface & | operator= (AuxParamsInterface &&)=default |
| Default destructor. | |
Record sensitive detector data for optical photons at the end of every step.
The DetectorExecutor is responsible for copying hit data for every photon into the state buffer at the end of every step on a kernel level. Even if a track was not in a detector, it is still copied into the state buffer with an invalid detector ID. All hits are copied into a persistent pinned-memory buffer (allocated once as auxiliary state, sized to the number of track slots), where invalid hits are pruned by slicing a span over the valid prefix. A span of only valid hits is then passed into the user provided callback function.
|
inlinefinalvirtual |
ID of the action.
Implements celeritas::ActionInterface.
|
inlinefinalvirtual |
Index of this class instance in its registry.
Implements celeritas::AuxParamsInterface.
|
finalvirtual |
Build auxiliary state data for a stream.
The pinned hit buffer is allocated and sized here once per stream so that step and load_hits_sync never need to reallocate.
Implements celeritas::AuxParamsInterface.
|
inlinefinalvirtual |
Description of the action.
Implements celeritas::ActionInterface.
|
inlinefinalvirtual |
Short name for the action (also satisfies AuxParamsInterface::label)
Implements celeritas::ActionInterface.
|
inlinefinalvirtual |
Dependency ordering of the action.
Implements celeritas::StepActionInterface< P, S >.