Skip to main content

SummaryTally

Struct SummaryTally 

Source
pub struct SummaryTally {
Show 15 fields pub histories: u64, pub budget: EnergyBudget, pub max_relative_residual: f64, pub primaries_stopped: u64, pub backscattered: u64, pub transmitted: u64, pub sputtered: u64, pub recoils_transmitted: u64, pub lateral: u64, pub recoils_lateral: u64, pub recoils: u64, pub depth_sum: f64, pub depth_sq_sum: f64, pub bin_width_m: f64, pub depth_hist: Vec<u64>,
}
Expand description

A minimal summary: counts, energy sums and a depth histogram of where primaries stop. Enough to test the engine; the full tallies come later.

Fields§

§histories: u64

Primary histories run.

§budget: EnergyBudget

Sum of the per-history energy budgets.

§max_relative_residual: f64

Largest |residual| / incident over all histories.

§primaries_stopped: u64

Primaries that came to rest in the target.

§backscattered: u64

Primaries that left through the front face.

§transmitted: u64

Primaries that left through the back face.

§sputtered: u64

Recoils that left through the front face.

§recoils_transmitted: u64

Recoils that left through the back face.

§lateral: u64

Primaries that left through a lateral face of a voxel grid.

§recoils_lateral: u64

Recoils that left through a lateral face of a voxel grid.

§recoils: u64

Displaced atoms (recoils created).

§depth_sum: f64

Sum of the rest depth of stopped primaries, m.

§depth_sq_sum: f64

Sum of squared rest depths of stopped primaries, m².

§bin_width_m: f64

Width of a depth bin, m.

§depth_hist: Vec<u64>

Stopped-primary counts per depth bin; the last bin collects overflow.

Implementations§

Source§

impl SummaryTally

Source

pub fn new(bin_width_m: f64, n_bins: usize) -> Self

Empty tally with n_bins depth bins of width bin_width_m.

Source

pub fn mean_depth(&self) -> f64

Mean rest depth of stopped primaries (the projected range), m.

Source

pub fn depth_std(&self) -> f64

Standard deviation of the rest depth of stopped primaries, m.

Trait Implementations§

Source§

impl BcaTally for SummaryTally

Source§

fn recoil(&mut self, _recoil: &Particle)

A target atom was displaced (transfer above E_d); recoil is its state at creation, before it is followed (or stopped, if below the recoil cutoff or if cascades are off).
Source§

fn stopped(&mut self, p: &Particle)

A particle came to rest at p.pos with kinetic energy p.energy_ev.
Source§

fn escaped(&mut self, p: &Particle, face: Face)

A particle left the target through face; p is its state outside (after refraction by the surface barrier).
Source§

fn end_history(&mut self, _index: u64, budget: &EnergyBudget)

A primary history ended; budget is its energy bookkeeping.
Source§

fn merge(&mut self, o: Self)

Fold other (a later chunk) into self.
Source§

fn begin_history(&mut self, _index: u64)

A primary history starts.
Source§

fn electronic( &mut self, _p: &Particle, _from: [f64; 3], _channel: ElectronicChannel, _energy_ev: f64, )

Electronic loss of energy_ev. For ElectronicChannel::NonLocal it was spread along the straight segment from from to p.pos; for ElectronicChannel::Local it was deposited at p.pos.
Source§

fn partner(&mut self, _p: &Particle, _impact_parameter_m: f64, _partners: usize)

A collision partner of p, reported before the collision changes p (so p is the incoming state, unlike in the other hooks): impact_parameter_m is the distance from the partner to the incoming straight path, and partners the number of partners of this collision step, each of which is reported by its own call. The amorphous model reports its hard collision and each weak collision as a step of one partner; the crystal flight model reports every simultaneous partner of a step with the same partners.
Source§

fn lattice( &mut self, _at: [f64; 3], _layer: usize, _kind: LatticeDeposit, _energy_ev: f64, )

Nuclear energy energy_ev left in the lattice at at in region layer (the layer index of a stack, the flat voxel index of a voxel grid).
Source§

impl Clone for SummaryTally

Source§

fn clone(&self) -> SummaryTally

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SummaryTally

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for SummaryTally

Source§

fn eq(&self, other: &SummaryTally) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SummaryTally

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V