lindhard/tally/mod.rs
1//! Tallies: turning particle histories into results.
2//!
3//! * [`hist`]: fixed-binning histograms with integer counts.
4//! * [`moments`]: mergeable one-pass moments (mean, `σ`, `γ`, `β`) with
5//! standard errors.
6//! * [`pearson`]: Pearson IV and dual-Pearson representations of a range
7//! profile.
8//! * [`ion`]: the [`crate::ion::bca::BcaTally`] that collects range, damage
9//! (NRT model estimates alongside cascade defect counts) and
10//! backscatter/transmission/sputter statistics, and its plain-data
11//! [`IonReport`].
12//! * [`electron`]: the [`crate::electron::transport::ElectronTally`] that
13//! collects 3D energy deposition (Cartesian and cylindrical grids),
14//! backscatter and secondary yields split at a configurable energy
15//! (50 eV by default), escape spectra, generation-volume moments and the
16//! energy balance, and its plain-data [`ElectronReport`].
17//! * [`exposure`]: per-electron energy deposited in small target volumes and the
18//! compound-Poisson distribution of the energy of a finite exposure.
19//! * [`psf`]: the radial point-spread function of a pencil beam in a depth
20//! slab (log radial bins, per-history errors) and its double- and
21//! triple-Gaussian fits, with CSV export and serde derives.
22//! * [`table_coverage`]: counts of the electron transport's cross-section
23//! rate evaluations inside and beyond each table's energy grid, per layer
24//! and channel (a numerical diagnostic, carried by the electron report).
25//! * [`voxel`]: the sparse 3D [`VoxelTally`] of implanted atoms, displacements
26//! and deposited energy on a regular grid (any geometry), with CSV and VTK
27//! export.
28//! * [`trajectory`]: the opt-in [`TrajectoryRecorder`] of per-history collision
29//! points of ions and their recoils, and the [`Recorded`] pairing with an
30//! ordinary tally.
31//!
32//! Every accumulator here merges deterministically: integer counts are exact
33//! sums, and floating-point accumulators are combined in the order the caller
34//! merges them, which [`crate::rng::run_particles`] fixes to chunk order. The
35//! report types derive `serde::Serialize`, with units documented per field
36//! (SI lengths in metres, energies in eV, angles in radians).
37
38pub mod dose;
39pub mod electron;
40pub mod exposure;
41pub mod hist;
42pub mod ion;
43pub mod moments;
44pub mod pearson;
45pub mod psf;
46pub mod psf_scan;
47pub mod table_coverage;
48pub mod trajectory;
49pub mod voxel;
50
51pub use dose::{
52 DepthDose, DepthDoseConfig, DoseConfig, DoseError, DoseReport, Estimate, InterfaceRefine,
53 InterfaceTransmission, LayerDose,
54};
55pub use electron::{
56 net_mean_se, CartesianCharge, CartesianDeposition, CartesianGrid, ChargeCells, ChargeCounts,
57 ChargeReport, CylindricalCharge, CylindricalDeposition, CylindricalGrid, DepositionReport,
58 ElectronEnergyBudget, ElectronReport, ElectronTallyConfig, ElectronTallyError,
59 ElectronTallyMetadata, EmissionClass, EscapedCharge, EventCapCounts, FaceEmission, FateCounts,
60 FullElectronTally, GenerationVolume, PrimaryStoppingPoints, StoppingPoints, Yields,
61 SE_BSE_SPLIT_EV,
62};
63pub use exposure::{
64 BeamProfile, Bracket, CompoundDistribution, CompoundPoisson, CompoundRequest,
65 ExposureAccumulator, ExposureConfig, ExposureError, ExposureHistogram, ExposureReport,
66 ExposureVolume, ExposureVolumeReport, QuantileResult, ThresholdResult, VolumeShape,
67};
68pub use hist::{Binning, BinningError, Histogram};
69pub use ion::{
70 CascadeDefects, DamageReport, EscapeReport, FaceEscape, IonReport, IonTally, IonTallyConfig,
71 LayerDamage, LayerRange, NrtDamage, RangeReport, SpeciesEscape,
72};
73pub use moments::{MomentSummary, Moments};
74pub use pearson::{type_iv_min_kurtosis, DualPearson, DualPearsonFit, PearsonError, PearsonIv};
75pub use psf::{
76 fit_psf, GaussianPsf, LogRadialBinning, PsfConfig, PsfError, PsfFit, PsfFitOptions, PsfModel,
77 PsfNormalization, PsfReport, PsfResidual, RadialAccumulator, RadialProfile,
78};
79pub use psf_scan::{
80 point_seed, scan_landing_points, PsfScanConfig, PsfScanError, PsfScanPoint, PsfScanReport,
81};
82pub use table_coverage::{LayerTableCoverage, TableCoverageCounts, TableCoverageTally};
83pub use trajectory::{
84 History, Recorded, Track, TrackEnd, TrajectoryConfig, TrajectoryPoint, TrajectoryRecorder,
85};
86pub use voxel::{
87 ExportProvenance, SpeciesDefects, VoxelCell, VoxelRecord, VoxelReport, VoxelTally,
88 VoxelTallyError, VoxelTallyGrid, EXPORT_FORMAT_VERSION,
89};