Celeritas 0.7.0-dev.331+develop.9b5caf6
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::optical::DetectorAction Class Referencefinal

Record sensitive detector data for optical photons at the end of every step. More...

#include <DetectorAction.hh>

Inheritance diagram for celeritas::optical::DetectorAction:
Inheritance graph
[legend]

Public Types

Type aliases
using CallbackFunc = typename 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 Member Functions

 DetectorAction (ActionId, CallbackFunc const &)
 Construct with action ID.
 
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.
 
- 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::StaticConcreteAction
 StaticConcreteAction (ActionId id, std::string_view label) noexcept(! 0)
 Construct a concrete action from a label and ID.
 
 StaticConcreteAction (ActionId id, std::string_view label, std::string_view description) noexcept(! 0)
 Construct a concrete action from an ID, a unique label, and a description.
 
 StaticConcreteAction (StaticConcreteAction const &)=delete
 
StaticConcreteActionoperator= (StaticConcreteAction const &)=delete
 
 StaticConcreteAction (StaticConcreteAction &&)=delete
 
StaticConcreteActionoperator= (StaticConcreteAction &&)=delete
 
ActionId action_id () const final
 ID of this action for verification.
 
std::string_view label () const final
 Short label.
 
std::string_view description () const final
 Descriptive label.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::ActionInterface
 ActionInterface (ActionInterface const &)=default
 
ActionInterfaceoperator= (ActionInterface const &)=default
 
 ActionInterface (ActionInterface &&)=default
 
ActionInterfaceoperator= (ActionInterface &&)=default
 

Detailed Description

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 pinned memory on the host, where invalid hits are erased. A span of only valid hits is then passed into the user provided callback function.

Member Function Documentation

◆ order()

StepActionOrder celeritas::optical::DetectorAction::order ( ) const
inlinefinalvirtual

Dependency ordering of the action.

Implements celeritas::StepActionInterface< P, S >.

◆ step()

void celeritas::optical::DetectorAction::step ( CoreParams const params,
CoreStateHost &  state 
) const
final

Launch the detector action on host.

Todo:
avoid reallocating the temporary storage at every step, or as an optimization just call contiguous chunks of hits.

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