Celeritas 0.6.0-dev.115+3b60a5fd
|
Accumulate energy deposition in volumes. More...
#include <SimpleCalo.hh>
Public Types | |
Type aliases | |
using | VecLabel = std::vector< Label > |
using | EnergyUnits = units::Mev |
template<MemSpace M> | |
using | DetectorRef = celeritas::Collection< real_type, Ownership::reference, M, DetectorId > |
using | VecReal = std::vector< real_type > |
![]() | |
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. | |
![]() | |
enum class | Category { input , result , system , internal , size_ } |
Output category (TODO: could replace with string/cstring?) | |
Public Member Functions | |
SimpleCalo (std::string output_label, VecLabel labels, GeoParamsInterface const &geo, size_type max_streams) | |
Construct with sensitive regions. | |
SimpleCalo (VecLabel labels, GeoParamsInterface const &geo, size_type max_streams) | |
Construct with default label. | |
DetectorId::size_type | num_detectors () const |
Number of distinct sensitive volumes. | |
template<MemSpace M> | |
DetectorRef< M > const & | energy_deposition (StreamId) const |
VecReal | calc_total_energy_deposition () const |
Get accumulated energy deposition over all streams. | |
void | clear () |
Reset energy deposition to zero, usually at the start of an event. | |
template<MemSpace M> | |
auto | energy_deposition (StreamId stream_id) const -> DetectorRef< M > const & |
Get tallied stream-local data. | |
Step interface | |
Filters | filters () const final |
Map volume names to detector IDs and exclude tracks with no deposition. | |
StepSelection | selection () const final |
Only save energy deposition and pre-step volume. | |
void | process_steps (HostStepState) final |
Process detector tallies (CPU). | |
void | process_steps (DeviceStepState) final |
Map volume names to detector IDs and exclude tracks with no deposition. | |
Output interface | |
Category | category () const final |
Write output to the given JSON object. | |
std::string_view | label () const final |
Write output to the given JSON object. | |
void | output (JsonPimpl *) const final |
Write output to the given JSON object. | |
![]() |
Additional Inherited Members | |
![]() | |
~StepInterface ()=default | |
Detector filtering required for this interface. | |
Accumulate energy deposition in volumes.
auto celeritas::SimpleCalo::calc_total_energy_deposition | ( | ) | const |
Get accumulated energy deposition over all streams.
This accessor is useful only when integrating over events and over cores. It also integrates over devices in case you happen to be running Celeritas on both host and device for some weird reason.
The index in the vector corresponds to the detector ID and is in the same order as the input labels.
|
inlinefinalvirtual |
Write output to the given JSON object.
Implements celeritas::OutputInterface.
|
finalvirtual |
Map volume names to detector IDs and exclude tracks with no deposition.
Implements celeritas::StepInterface.
|
inlinefinalvirtual |
Write output to the given JSON object.
Implements celeritas::OutputInterface.
Write output to the given JSON object.
Implements celeritas::OutputInterface.
|
finalvirtual |
Map volume names to detector IDs and exclude tracks with no deposition.
Implements celeritas::StepInterface.
|
finalvirtual |
Process detector tallies (CPU).
Process detector tallies (GPU).
Implements celeritas::StepInterface.
|
finalvirtual |
Only save energy deposition and pre-step volume.
Implements celeritas::StepInterface.