pub struct FullElectronTally { /* private fields */ }Expand description
Deposition, emission and energy-balance tally for the electron transport loop. See the module docs.
Implementations§
Source§impl FullElectronTally
impl FullElectronTally
Sourcepub fn new<G: Geometry>(
transport: &Transport<G>,
config: ElectronTallyConfig,
) -> Result<Self, ElectronTallyError>
pub fn new<G: Geometry>( transport: &Transport<G>, config: ElectronTallyConfig, ) -> Result<Self, ElectronTallyError>
Empty tally for runs of transport (its per-layer stopping thresholds
classify stopped events, its secondary model decides which hook
carries an inelastic deposit, its stack sets the number of layers).
Sourcepub fn config(&self) -> &ElectronTallyConfig
pub fn config(&self) -> &ElectronTallyConfig
The configuration.
Sourcepub fn with_voxel_grid(self, grid: VoxelTallyGrid) -> Self
pub fn with_voxel_grid(self, grid: VoxelTallyGrid) -> Self
Also tally the deposited energy per voxel of grid, for
FullElectronTally::voxel_report. The grid is independent of the
target: use VoxelTallyGrid::from_voxel_grid to tally on the voxels
of a crate::geometry::VoxelGrid target.
Sourcepub fn voxel_report(&self) -> Option<VoxelReport>
pub fn voxel_report(&self) -> Option<VoxelReport>
The per-voxel deposition as a VoxelReport (CSV and VTK export of
crate::tally::voxel), or None without
FullElectronTally::with_voxel_grid.
Each voxel’s energy is split by how it was deposited: electronic_ev
is the energy left at inelastic events (the
ElectronEnergyBudget::inelastic_ev channel), lattice_ev the
LO-phonon emission and polaron-trapping energy, and rest_ev the
energy of electrons that fell below the stopping threshold
(ElectronEnergyBudget::residual_ev); their sum over all voxels
and outside is ElectronEnergyBudget::deposited_ev.
implanted and displacements are zero: the electron tally records
neither, and the per-species defect fields (species_z, defects,
outside_defects) are empty: the electron tally has no species axis.
Deposits are point events at the collision (as for
CartesianGrid), so a flight crossing voxel faces is not split.
Sourcepub fn report(&self) -> ElectronReport
pub fn report(&self) -> ElectronReport
The plain-data result.
Trait Implementations§
Source§impl Clone for FullElectronTally
impl Clone for FullElectronTally
Source§fn clone(&self) -> FullElectronTally
fn clone(&self) -> FullElectronTally
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FullElectronTally
impl Debug for FullElectronTally
Source§impl ElectronTally for FullElectronTally
impl ElectronTally for FullElectronTally
Source§fn merge(&mut self, o: Self)
fn merge(&mut self, o: Self)
Field-wise merge.
§Panics
If other was built with a different configuration, cutoff,
thresholds, secondary model or stack.
Source§fn begin_history(&mut self, index: u64, start: &ElectronState)
fn begin_history(&mut self, index: u64, start: &ElectronState)
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)
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 table_lookup(
&mut self,
at: &ElectronState,
channel: TableChannel,
coverage: GridCoverage,
)
fn table_lookup( &mut self, at: &ElectronState, channel: TableChannel, coverage: GridCoverage, )
channel’s table in layer at.layer was evaluated at
at.energy_ev, which lies coverage against that table’s grid. Read moreSource§fn elastic(&mut self, after: &ElectronState, _theta: f64)
fn elastic(&mut self, after: &ElectronState, _theta: f64)
theta rad.Source§fn inelastic(&mut self, after: &ElectronState, w_ev: f64)
fn inelastic(&mut self, after: &ElectronState, w_ev: f64)
w_ev from the electron. after carries
the new direction if the secondary model deflected it.Source§fn secondary(
&mut self,
primary: &ElectronState,
event: &SecondaryEvent,
created: Option<&ElectronState>,
)
fn secondary( &mut self, primary: &ElectronState, event: &SecondaryEvent, created: Option<&ElectronState>, )
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, )
-ħω (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)
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)
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)
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)
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)
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)
fate.Source§fn stopped(&mut self, at: &ElectronState)
fn stopped(&mut self, at: &ElectronState)
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)
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)
EscapeRule::FrontOnly).Source§fn end_history(&mut self, _index: u64, fate: Fate)
fn end_history(&mut self, _index: u64, fate: Fate)
fate is the
primary’s.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, )
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§impl PartialEq for FullElectronTally
impl PartialEq for FullElectronTally
impl StructuralPartialEq for FullElectronTally
Auto Trait Implementations§
impl Freeze for FullElectronTally
impl RefUnwindSafe for FullElectronTally
impl Send for FullElectronTally
impl Sync for FullElectronTally
impl Unpin for FullElectronTally
impl UnsafeUnpin for FullElectronTally
impl UnwindSafe for FullElectronTally
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
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> ⓘ
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> ⓘ
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