pub struct Particle {
pub species: usize,
pub z: u8,
pub mass_amu: f64,
pub energy_ev: f64,
pub pos: [f64; 3],
pub dir: [f64; 3],
pub layer: usize,
pub origin_layer: usize,
pub generation: u32,
}Expand description
A moving or stopped particle.
Fields§
§species: usizeSpecies index: 0 is the beam species, then the target elements in order of first appearance in the stack.
z: u8Atomic number.
mass_amu: f64Mass, u.
energy_ev: f64Kinetic energy, eV.
pos: [f64; 3]Position [x, y, z], m.
dir: [f64; 3]Unit direction.
layer: usizeIndex of the region the particle is in: the layer of a stack, the flat
voxel index of a voxel grid (see Geometry).
origin_layer: usizeRegion the particle started in: the entry region of a primary, the
region of the displacing collision for a recoil. Unlike layer it does
not change as the particle moves, so a tally that sees the particle
leave can tell where the atom came from.
generation: u320 for the primary, parent’s generation + 1 for recoils.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Particle
Auto Trait Implementations§
impl Freeze for Particle
impl RefUnwindSafe for Particle
impl Send for Particle
impl Sync for Particle
impl Unpin for Particle
impl UnsafeUnpin for Particle
impl UnwindSafe for Particle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more