Celeritas 0.6.0-rc.2.10+develop.de0a3a05
Loading...
Searching...
No Matches
Public Types | Public Attributes | List of all members
celeritas::inp::GeantSd Struct Reference

Control options for Geant4 sensitive detector integration. More...

#include <Scoring.hh>

Public Types

using SetVolume = std::unordered_set< G4LogicalVolume const * >
 Provide either a set of labels or a set of pointers to Geant4 objects.
 
using SetString = std::unordered_set< std::string >
 
using VariantSetVolume = std::variant< SetVolume, SetString >
 
using PointAttrs = EnumArray< StepPoint, GeantSdStepPointAttributes >
 

Public Attributes

bool ignore_zero_deposition {true}
 Skip steps that do not deposit energy locally.
 
bool energy_deposition {true}
 Save energy deposition.
 
bool step_length {true}
 Save physical step length.
 
bool track {true}
 Create a track with the dynamic particle type and post-step data.
 
PointAttrs points
 Options for saving and converting beginning- and end-of-step data.
 
VariantSetVolume force_volumes
 Manually list LVs that don't have an SD on the master thread.
 
VariantSetVolume skip_volumes
 List LVs that should not have automatic hit mapping.
 

Detailed Description

Control options for Geant4 sensitive detector integration.

By default, Celeritas connects to Geant4 sensitive detectors so that it reconstructs full-fidelity hits with all available step information.

Various attributes on the step, track, and pre/post step points may be available depending on the selected options.

The force_volumes option can be used for unusual cases (i.e., when using a custom run manager) that do not define SDs on the "master" thread. Similarly, the skip_volumes option allows optimized GPU-defined SDs to be used in place of a Geant4 callback. For both options, the FindVolumes helper function can be used to determine LV pointers from the volume names.

Todo:

For improved granularity in models with duplicate names, we could add a vector of Label to VariantSetVolume .

change from unordered_set to set for better reproducibility in serialized output

The pre- and post-step attributes can be set with:

sd.points[StepPoint::pre].global_time = true;
sd.points[StepPoint::post].touchable = false;
See also
celeritas::GeantSd

The documentation for this struct was generated from the following file: