pub struct TableCoverageTally { /* private fields */ }Expand description
Counts the rate evaluations of every table of a run against its grid (see
the module docs). Usable on its own as an ElectronTally;
crate::tally::FullElectronTally carries one and puts its
TableCoverageTally::layers in
ElectronReport::table_coverage.
Implementations§
Source§impl TableCoverageTally
impl TableCoverageTally
Sourcepub fn new<G: Geometry>(transport: &Transport<G>) -> Self
pub fn new<G: Geometry>(transport: &Transport<G>) -> Self
Empty counts for the tables of transport, one entry per layer.
Sourcepub fn layers(&self) -> &[LayerTableCoverage]
pub fn layers(&self) -> &[LayerTableCoverage]
The counts, by layer.
Sourcepub fn record(
&mut self,
layer: usize,
channel: TableChannel,
coverage: GridCoverage,
)
pub fn record( &mut self, layer: usize, channel: TableChannel, coverage: GridCoverage, )
Count one evaluation.
Sourcepub fn merge_from(&mut self, o: &Self)
pub fn merge_from(&mut self, o: &Self)
Add o’s counts (a later chunk) to these.
§Panics
If o was built for tables with a different number of layers or
different grid bounds.
Trait Implementations§
Source§impl Clone for TableCoverageTally
impl Clone for TableCoverageTally
Source§fn clone(&self) -> TableCoverageTally
fn clone(&self) -> TableCoverageTally
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TableCoverageTally
impl Debug for TableCoverageTally
Source§impl ElectronTally for TableCoverageTally
impl ElectronTally for TableCoverageTally
Source§fn table_lookup(
&mut self,
at: &ElectronState,
channel: TableChannel,
coverage: GridCoverage,
)
fn table_lookup( &mut self, at: &ElectronState, channel: TableChannel, coverage: GridCoverage, )
The rate of
channel’s table in layer at.layer was evaluated at
at.energy_ev, which lies coverage against that table’s grid. Read moreSource§fn begin_history(&mut self, _index: u64, _start: &ElectronState)
fn begin_history(&mut self, _index: u64, _start: &ElectronState)
A primary history starts. With
BoundaryModel::StepBarrier, start
is the primary in vacuum, before it meets the front face.Source§fn step(&mut self, _from: [f64; 3], _end: &ElectronState, _length_m: f64)
fn step(&mut self, _from: [f64; 3], _end: &ElectronState, _length_m: f64)
A flight segment of
length_m ended at end.pos (at a collision, a
layer face or the target face). It started at from with energy
end.energy_ev (the energy does not change in flight).Source§fn elastic(&mut self, _after: &ElectronState, _theta: f64)
fn elastic(&mut self, _after: &ElectronState, _theta: f64)
An elastic collision deflected the electron by
theta rad.Source§fn inelastic(&mut self, _after: &ElectronState, _w_ev: f64)
fn inelastic(&mut self, _after: &ElectronState, _w_ev: f64)
An inelastic collision took
w_ev from the electron. after carries
the new direction if the secondary model deflected it.Source§fn inner_shell(
&mut self,
_after: &ElectronState,
_shell: &InnerShell,
_w_ev: f64,
)
fn inner_shell( &mut self, _after: &ElectronState, _shell: &InnerShell, _w_ev: f64, )
Called right after
ElectronTally::inelastic for every inelastic
event drawn from an inner-shell channel
(Transport::with_inner_shells), with or without a secondary
model: the shell (its element, subshell and binding energy) and the
loss w_ev (the same as passed to ElectronTally::inelastic). Not
called for valence events. Comes before ElectronTally::secondary.Source§fn secondary(
&mut self,
_primary: &ElectronState,
_event: &SecondaryEvent,
_created: Option<&ElectronState>,
)
fn secondary( &mut self, _primary: &ElectronState, _event: &SecondaryEvent, _created: Option<&ElectronState>, )
Called right after
ElectronTally::inelastic (and
ElectronTally::inner_shell, for a shell event) for every inelastic
event when a SecondaryModel is on: the event’s energy bookkeeping,
and the secondary that was created (None if none was). The
secondary is transported later, between
ElectronTally::begin_secondary and
ElectronTally::end_secondary.Source§fn phonon(
&mut self,
_after: &ElectronState,
_kind: PhononEvent,
_hbar_omega_ev: f64,
_theta: f64,
)
fn phonon( &mut self, _after: &ElectronState, _kind: PhononEvent, _hbar_omega_ev: f64, _theta: f64, )
A Fröhlich LO-phonon event changed the energy by
-ħω (emission) or
+ħω (absorption), hbar_omega_ev given, and deflected the electron by
theta rad. after is the state after the event.Source§fn polaron_trapped(&mut self, _at: &ElectronState)
fn polaron_trapped(&mut self, _at: &ElectronState)
The electron was trapped as a polaron at
at and deposits its whole
remaining energy at.energy_ev there. The history (or the secondary)
then ends with Fate::PolaronTrapped (no ElectronTally::stopped
call).Source§fn interface(
&mut self,
_at: &ElectronState,
_from_layer: usize,
_to_layer: usize,
)
fn interface( &mut self, _at: &ElectronState, _from_layer: usize, _to_layer: usize, )
The electron crossed from layer
from_layer into to_layer; at is
its state on the face, inside the new layer (after refraction, with
BoundaryModel::StepBarrier).Source§fn barrier(
&mut self,
_at: &ElectronState,
_boundary: Boundary,
_delta_u_ev: f64,
)
fn barrier( &mut self, _at: &ElectronState, _boundary: Boundary, _delta_u_ev: f64, )
With
BoundaryModel::StepBarrier: the electron got through the face
boundary, and its kinetic energy changed by delta_u_ev (the step
U' - U). at is its state just past the face (in vacuum, for a
surface). Comes before ElectronTally::interface or
ElectronTally::escaped.Source§fn reflected(&mut self, _at: &ElectronState, _boundary: Boundary)
fn reflected(&mut self, _at: &ElectronState, _boundary: Boundary)
With
BoundaryModel::StepBarrier: the electron was reflected at the
face boundary; at is its state after the reflection. At the
primary’s entry this is followed by ElectronTally::escaped.Source§fn begin_secondary(&mut self, _start: &ElectronState, _generation: u32)
fn begin_secondary(&mut self, _start: &ElectronState, _generation: u32)
A secondary of the given
generation (1 for a secondary of the
primary, 2 for one of a secondary, …) starts at start.Source§fn end_secondary(&mut self, _fate: Fate)
fn end_secondary(&mut self, _fate: Fate)
The current secondary ended with
fate.Source§fn stopped(&mut self, _at: &ElectronState)
fn stopped(&mut self, _at: &ElectronState)
The electron fell below the stopping threshold (or was trapped) at
at. A stop has at.energy_ev below the threshold of at.layer, a
trapped electron at least that energy
(Transport::stopping_thresholds_ev).Source§fn escaped(&mut self, _at: &ElectronState, _face: Face)
fn escaped(&mut self, _at: &ElectronState, _face: Face)
The electron left the target through
face; at.energy_ev is the
energy it leaves with (its vacuum energy, with the step barrier).Source§fn absorbed(&mut self, _at: &ElectronState)
fn absorbed(&mut self, _at: &ElectronState)
The electron was absorbed at the back face (
EscapeRule::FrontOnly).Source§fn end_history(&mut self, _index: u64, _fate: Fate)
fn end_history(&mut self, _index: u64, _fate: Fate)
The history ended (its last secondary included);
fate is the
primary’s.Source§impl PartialEq for TableCoverageTally
impl PartialEq for TableCoverageTally
impl StructuralPartialEq for TableCoverageTally
Auto Trait Implementations§
impl Freeze for TableCoverageTally
impl RefUnwindSafe for TableCoverageTally
impl Send for TableCoverageTally
impl Sync for TableCoverageTally
impl Unpin for TableCoverageTally
impl UnsafeUnpin for TableCoverageTally
impl UnwindSafe for TableCoverageTally
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