Celeritas
0.5.0-56+6b053cd
|
Data characterizing the scintillation spectrum for all particles and materials. More...
#include <ScintillationData.hh>
Public Types | |
template<class T > | |
using | Items = Collection< T, W, M > |
template<class T > | |
using | OpticalMaterialItems = Collection< T, W, M, OpticalMaterialId > |
template<class T > | |
using | ScintPidItems = Collection< T, W, M, ParticleScintSpectrumId > |
Public Member Functions | |
CELER_FUNCTION | operator bool () const |
Whether all data are assigned and valid. | |
CELER_FUNCTION bool | scintillation_by_particle () const |
Whether sampling must happen by particle type. | |
ParticleScintSpectrumId | spectrum_index (ScintillationParticleId pid, OpticalMaterialId mat_id) const |
Retrieve spectrum index given optical particle and material ids. | |
template<Ownership W2, MemSpace M2> | |
ScintillationData & | operator= (ScintillationData< W2, M2 > const &other) |
Assign from another set of data. | |
Public Attributes | |
size_type | num_scint_particles {} |
Number of scintillation particles, used by this->spectrum_index. | |
OpticalMaterialItems< real_type > | resolution_scale |
Resolution scale for each material [OpticalMaterialid]. | |
OpticalMaterialItems< MatScintSpectrumRecord > | materials |
Material-dependent scintillation spectrum data [OpticalMaterialid]. | |
Collection< ScintillationParticleId, W, M, ParticleId > | pid_to_scintpid |
Index between ScintillationParticleId and ParticleId. | |
ScintPidItems< ParScintSpectrumRecord > | particles |
Particle/material scintillation spectrum data [ParticleScintSpectrumId]. | |
Items< real_type > | reals |
Backend storage for real values. | |
Items< ScintRecord > | scint_records |
Backend storage for scintillation components. | |
Data characterizing the scintillation spectrum for all particles and materials.
Sampling using material-only data or particle- and material-dependent data are mutually exclusive. Therefore, either materials
or particles
are loaded at the beginning of the simulation, but never both at the same time. The scintillation_by_particle()
function can be used to check that.
pid_to_scintpid
returns a ScintillationParticleId
given a ParticleId
.resolution_scale
is indexed by OpticalMaterialId
.materials
stores material-only scintillation data. Indexed by OpticalMaterialId
particles
stores scintillation spectrum for each particle type for each material, being a grid of size num_particles * num_materials
. Therefore it is indexed by ParticleScintSpectrumId
, which combines ScintillationParticleId
and OpticalMaterialId
. Use the spectrum_index()
function to retrieve the correct index.