|
Celeritas 0.7.0-dev.245+develop.a7be925e
|
Physics data for a track. More...
#include <PhysicsTrackView.hh>
Public Types | |
Type aliases | |
| using | Initializer_t = PhysicsTrackInitializer |
| using | PhysicsParamsRef = NativeCRef< PhysicsParamsData > |
| using | PhysicsStateRef = NativeRef< PhysicsStateData > |
| using | Energy = units::MevEnergy |
| using | ModelFinder = GridIdFinder< Energy, ParticleModelId > |
| using | UniformTableId = OpaqueId< UniformTable > |
Public Member Functions | |
| PhysicsTrackView (PhysicsParamsRef const ¶ms, PhysicsStateRef const &states, ParticleTrackView const &particle, PhysMatId material, TrackSlotId tid) | |
| Construct from shared and state data. | |
| PhysicsTrackView & | operator= (Initializer_t const &) |
| Initialize the track view. | |
| void | interaction_mfp (real_type) |
| Set the distance to the next interaction, in mean free paths. | |
| void | reset_interaction_mfp () |
| Set the distance to the next interaction, in mean free paths. | |
| void | dedx_range (real_type) |
| Set the energy loss range for the current material and particle energy. | |
| void | msc_range (MscRange const &) |
| Set the range properties for multiple scattering. | |
| bool | has_interaction_mfp () const |
| Whether the remaining MFP has been calculated. | |
| real_type | interaction_mfp () const |
| Remaining MFP to interaction. | |
| real_type | dedx_range () const |
| Energy loss range. | |
| MscRange const & | msc_range () const |
| Persistent range properties for multiple scattering within a same volume. | |
| PhysMatId | material_id () const |
| Current material identifier. | |
| ParticleProcessId::size_type | num_particle_processes () const |
| Number of processes that apply to this track. | |
| ProcessId | process (ParticleProcessId) const |
| Process ID for the given within-particle process index. | |
| XsGridId | macro_xs_grid (ParticleProcessId) const |
| Return macro xs value grid data for the given process if available. | |
| UniformGridId | energy_loss_grid () const |
| Return the energy loss grid data if available. | |
| UniformGridId | range_grid () const |
| Return the range grid data if available. | |
| UniformGridId | inverse_range_grid () const |
| Return the inverse range grid data if available. | |
| IntegralXsProcess const & | integral_xs_process (ParticleProcessId ppid) const |
| Get data for processes that use the integral approach. | |
| real_type | calc_xs (ParticleProcessId ppid, MaterialView const &material, Energy energy) const |
| Calculate macroscopic cross section for the process. | |
| real_type | calc_max_xs (IntegralXsProcess const &process, ParticleProcessId ppid, MaterialView const &material, Energy energy) const |
| Estimate maximum macroscopic cross section for the process over the step. | |
| ModelFinder | make_model_finder (ParticleProcessId) const |
| Models that apply to the given process ID. | |
| UniformTableId | cdf_table (ParticleModelId) const |
| Return value table data for the given particle/model/material. | |
| TabulatedElementSelector | make_element_selector (UniformTableId, Energy) const |
| Construct an element selector to sample an element from tabulated xs data. | |
| ParticleProcessId | at_rest_process () const |
| ID of the particle's at-rest process. | |
| ModelId | action_to_model (ActionId) const |
| Convert an action to a model ID for diagnostics, false if not a model. | |
| ActionId | model_to_action (ModelId) const |
| Convert a selected model ID into a simulation action ID. | |
| ModelId | model_id (ParticleModelId) const |
| Get the model ID corresponding to the given ParticleModelId. | |
| real_type | range_to_step (real_type range) const |
| Calculate scaled step range. | |
| PhysicsParamsScalars const & | scalars () const |
| Access scalar properties (options, IDs). | |
| ParticleScalars const & | particle_scalars () const |
| Access particle-dependent scalar properties. | |
| size_type | num_particles () const |
| Number of particle types. | |
| template<class T > | |
| T | make_calculator (UniformGridId) const |
| Construct a grid calculator of the given type. | |
| ModelId | hardwired_model (ParticleProcessId ppid, Energy energy) const |
| Get a hardwired model for on-the-fly cross section calculation. | |
Physics data for a track.
The physics track view provides an interface for data and operations common to most processes and models.
|
inline |
Construct from shared and state data.
Particle and material IDs are derived from other class states.
|
inline |
ID of the particle's at-rest process.
If the particle can have a discrete interaction at rest, this returns the ParticleProcessId of that process. Otherwise, it returns a null ID.
|
inline |
Estimate maximum macroscopic cross section for the process over the step.
If this is a particle with an energy loss process, this returns the estimate of the maximum cross section over the step. If the energy of the global maximum of the cross section (calculated at initialization) is in the interval \( [\xi E_0, E_0) \), where \( E_0 \) is the pre-step energy and \( \xi \) is min_eprime_over_e (defined by default as \( \xi = 1 -
\alpha \), where \( \alpha \) is max_step_over_range), \(
\sigma_{\max} \) is set to the global maximum. Otherwise, \(
\sigma_{\max} = \max( \sigma(E_0), \sigma(\xi E_0) ) \). If the cross section is not monotonic in the interval \( [\xi E_0, E_0) \) and the interval does not contain the global maximum, the post-step cross section \( \sigma(E_1) \) may be larger than \( \sigma_{\max} \).
|
inline |
Return value table data for the given particle/model/material.
A null result means either the model is material independent or the material only has one element, so no cross section CDF tables are stored.
Set the energy loss range for the current material and particle energy.
This value will be calculated once at the beginning of each step.
|
inline |
Get a hardwired model for on-the-fly cross section calculation.
This returns the model ID that applies to the given process ID and energy if the process is hardwired to calculate macroscopic cross sections on the fly. If the result is null, tables should be used for this process/energy.
|
inline |
Get data for processes that use the integral approach.
Particles that have energy loss processes will have a different energy at the pre- and post-step points. This means the assumption that the cross section is constant along the step is no longer valid. Instead, Monte Carlo integration can be used to sample the interaction length for the discrete process with the correct probability from the exact distribution,
\[ p = 1 - \exp \left( -\int_{E_0}^{E_1} n \sigma(E) \dif s \right), \]
where \( E_0 \) is the pre-step energy, \( E_1 \) is the post-step energy, n is the atom density, and s is the interaction length.
At the start of the step, the maximum value of the cross section over the step \( \sigma_{max} \) is estimated and used as the macroscopic cross section for the process rather than \( \sigma_{E_0} \). After the step, the new value of the cross section \( \sigma(E_1) \) is calculated, and the discrete interaction for the process occurs with probability
\[ p = \frac{\sigma(E_1)}{\sigma_{\max}}. \]
See section 7.4 of the Geant4 Physics Reference (release 10.6) for details.
Set the distance to the next interaction, in mean free paths.
This value will be decremented at each step.
|
inline |
Return the inverse range grid data if available.
If spline interpolation is used, the inverse grid is explicitly stored with the derivatives calculated using the range as the x values and the energy as the y values.
The grid and values are identical to the range grid (i.e., not inverted) even if the inverse grid is explicitly stored: the inversion is done in the InverseRangeCalculator .
|
inline |
Construct a grid calculator of the given type.
The calculator must take two arguments: a reference to UniformGridRecord and a reference to the backend reals storage.
Set the range properties for multiple scattering.
These values will be calculated at the first step in every tracking volume.
|
inline |
Access particle-dependent scalar properties.
These properties are different for light particles (electrons/positrons) and heavy particles (muons/hadrons).
Calculate scaled step range.
This is the updated step function given by Eq. 7.4 of Geant4 Physics Reference Manual, Release 10.6:
\[ s = \alpha r + \rho (1 - \alpha) (2 - \frac{\rho}{r}) \]
where alpha is max_step_over_range and rho is min_range .
Below min_range, no step scaling is applied, but the step can still be arbitrarily small.
|
inline |
Set the distance to the next interaction, in mean free paths.
This value will be decremented at each step.