|
Celeritas 0.7.0-dev.168+develop.6e17e5869
|
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 | OptMatItems = Collection< T, W, M, OptMatId > |
| template<class T > | |
| using | ParticleItems = Collection< T, W, M, ParticleId > |
| template<class T > | |
| using | ParScintSpectrumItems = Collection< T, W, M, ParScintSpectrumId > |
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. | |
| ParScintSpectrumId | spectrum_index (ScintParticleId pid, OptMatId mid) 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. | |
| OptMatItems< real_type > | resolution_scale |
| Resolution scale for each material [OptMatId]. | |
| OptMatItems< MatScintSpectrum > | materials |
| Material-dependent scintillation spectrum data [OptMatId]. | |
| ParticleItems< ScintParticleId > | pid_to_scintpid |
Index between ScintParticleId and ParticleId. | |
| ParScintSpectrumItems< ParScintSpectrum > | particles |
| Particle/material scintillation spectrum data [ParScintSpectrumId]. | |
| 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 maps a ParticleId to a ScintParticleId .resolution_scale is indexed by OptMatId .materials stores particle-independent scintillation data.particles stores the scintillation spectrum for each particle type and material. It has size num_particles * num_materials and is indexed by ParScintSpectrumId , which can be calculated from a OptMatId and ScintParticleId using the spectrum_index() helper method.