Celeritas
0.5.0-56+6b053cd
|
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 > |
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 Types inherited from celeritas::OutputInterface | |
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. More... | |
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). More... | |
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. | |
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. | |
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.
|
finalvirtual |
Process detector tallies (CPU).
Process detector tallies (GPU).
Implements celeritas::StepInterface.