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

Hit Geant4 sensitive detectors with Celeritas steps. More...

#include <GeantSd.hh>

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

Public Types

Type aliases
using StepStateHostRef = HostRef< StepStateData >
 
using StepStateDeviceRef = DeviceRef< StepStateData >
 
using SPConstVecLV = std::shared_ptr< std::vector< G4LogicalVolume const * > const >
 
using HitProcessor = detail::HitProcessor
 
using SPProcessor = std::shared_ptr< HitProcessor >
 
using SPConstGeo = std::shared_ptr< GeoParams const >
 
using VecVolId = std::vector< VolumeId >
 
using VecParticle = std::vector< G4ParticleDefinition const * >
 
using StepPointBool = EnumArray< StepPoint, bool >
 
using Input = inp::GeantSd
 
- Public Types inherited from celeritas::StepInterface
using HostStepState = StepState< MemSpace::host >
 Detector filtering required for this interface.
 
using DeviceStepState = StepState< MemSpace::device >
 Detector filtering required for this interface.
 
using MapVolumeDetector = std::map< VolumeId, DetectorId >
 Detector filtering required for this interface.
 

Public Member Functions

 GeantSd (SPConstGeo geo, ParticleParams const &par, Input const &setup, StreamId::size_type num_streams)
 Map detector IDs on construction.
 
 CELER_DEFAULT_MOVE_DELETE_COPY (GeantSd)
 
 ~GeantSd ()
 Default destructor.
 
SPProcessor make_local_processor (StreamId sid)
 Create local hit processor.
 
Filters filters () const final
 Map volume names to detector IDs and exclude tracks with no deposition.
 
StepSelection selection () const final
 Selection of data required for this interface.
 
void process_steps (HostStepState) final
 Process detector tallies (CPU).
 
void process_steps (DeviceStepState) final
 Process CPU-generated hit data.
 
SPConstVecLV constgeant_vols () const
 Access the logical volumes that have SDs attached.
 
VecVolId constceler_vols () const
 Access the Celeritas volume IDs corresponding to the detectors.
 
VecParticle constgeant_particles () const
 Access mapped particles if recreating G4Tracks later.
 
StepPointBool constlocate_touchable () const
 Whether detailed volume information is reconstructed.
 
- Public Member Functions inherited from celeritas::StepInterface

Additional Inherited Members

- Protected Member Functions inherited from celeritas::StepInterface
 ~StepInterface ()=default
 Detector filtering required for this interface.
 

Detailed Description

Hit Geant4 sensitive detectors with Celeritas steps.

Construction:

Because of low-level use of Geant4 allocators through the associated Geant4 objects, the hit processors must be allocated and deallocated on the same thread in which they're used, so make_local_processor is deferred until after construction and called in the LocalTransporter constructor.

Member Function Documentation

◆ filters()

GeantSd::Filters celeritas::GeantSd::filters ( ) const
inlinefinalvirtual

Map volume names to detector IDs and exclude tracks with no deposition.

Implements celeritas::StepInterface.

◆ make_local_processor()

GeantSd::SPProcessor celeritas::GeantSd::make_local_processor ( StreamId  sid)
inline

Create local hit processor.

Due to Geant4 multithread semantics, this must be done on the same CPU thread on which the resulting processor used. It must be done once per thread and can be done separately.

◆ process_steps() [1/2]

void celeritas::GeantSd::process_steps ( DeviceStepState  )
finalvirtual

Process CPU-generated hit data.

Implements celeritas::StepInterface.

◆ process_steps() [2/2]

void celeritas::GeantSd::process_steps ( HostStepState  state)
inlinefinalvirtual

Process detector tallies (CPU).

Process detector tallies (GPU).

Implements celeritas::StepInterface.

◆ selection()

StepSelection celeritas::GeantSd::selection ( ) const
inlinefinalvirtual

Selection of data required for this interface.

Implements celeritas::StepInterface.


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