Skip to main content

Module exposure

Module exposure 

Source
Expand description

Exposure statistics: the distribution of the energy a small volume receives from a finite number of incident electrons.

A tally reports means over many histories. A small volume exposed to a few electrons receives an energy that fluctuates, both from the number of electrons and from the wide spread of the energy each one leaves there.

§The per-electron distribution X

ExposureAccumulator follows each primary history (the primary and all its secondaries) and sums the energy it deposits inside every configured ExposureVolume. That sum, X (eV), is binned into an ExposureHistogram: an exact atom at X = 0 (most histories deposit nothing in a small volume), bins equal-width bins of width bin_width_ev on (0, bins * bin_width_ev] (a bin is closed on its upper edge: bin j, j = 1..=bins, holds (j-1) w < X <= j w), and the running sums Σ X^k for k = 1..=4. A history with X beyond the last edge is counted in overflow_count and clamped into the last bin; the sums stay exact.

§Beam profile and the lateral-uniformity assumption

The beam is a BeamProfile: a point, a Gaussian of standard deviation sigma per lateral axis, or a uniform disc. The landing offset d of each electron is drawn from the counter-based stream rng::stream(seed, history index) at the start of its history, and the deposits are taken relative to the landing point (pos - start - d compared with the volume centre, i.e. the volume is shifted by -d). The stored X is therefore already averaged over the beam and the electrons stay independent and identically distributed.

This is valid only while the target is laterally uniform (a layered stack, as everywhere in the electron engine): then the history of an electron landing at d is the history of one landing at the axis, shifted by d. Laterally varying targets and beams are out of scope here.

§Compound Poisson statistics

With N ~ Poisson(λ) electrons incident (λ the mean number), the energy in the volume is S = X_1 + … + X_N, X_i independent copies of X. Conditioning on N (law of total expectation and variance) gives

E[S]   = E[N] E[X]                    = λ E[X]
Var[S] = E[N] Var[X] + Var[N] E[X]²   = λ E[X²]

because E[N] = Var[N] = λ. These are the textbook compound-Poisson results (see W. Feller, An Introduction to Probability Theory and Its Applications, vol. 1, 3rd ed., Wiley 1968, the chapter on compound distributions; and N. R. Campbell, Proc. Camb. Phil. Soc. 15, 117 (1909), for the mean and variance of such shot-noise sums). The derivation above is self-contained; the chapter-level citation was not checked against the page. The moments use the exact stored sums, with no binning error.

The full distribution of S uses Poisson thinning: the histories that deposit something number K ~ Poisson(λ (1 - p0)), p0 the mass at X = 0, and S is the sum of K draws from the conditional nonzero distribution f. So

P(S = s) = Σ_k Poisson(k; λ(1-p0)) · f^{*k}(s)

with f^{*k} the k-fold convolution of the binned f, built iteratively, and the k = 0 term the exact atom at S = 0. The sum is truncated where the Poisson tail is below tail_tolerance; the dropped mass is reported.

Binning bound. Representing each bin by its lower edge, centre or upper edge gives three distributions of S; the first is stochastically smaller and the last larger than the true one (up to the clamped overflow, reported). Every quantile and threshold probability is reported as low, central (bin centres) and high: the true value lies between low and high for quantiles and for P(S > b), and the same holds for P(S < a) with the roles of the two ends swapped (the field names refer to the representation, see Bracket). The width of the bracket on a quantile is at most K_max * bin_width_ev, K_max the largest number of depositing electrons kept.

Units: energies in eV, lengths in metres.

Structs§

Bracket
A value bracketed by the binning representations of X (see the module docs). low is the result with every bin at its lower edge, high at its upper edge, central at the bin centres. For a quantile and for P(S > b) the true value lies in [low, high]; for P(S < a) it lies in [high, low].
CompoundDistribution
The discrete distribution results of a compound-Poisson sum.
CompoundPoisson
Compound-Poisson summary of the energy S in a volume.
CompoundRequest
Which compound-Poisson outputs to compute.
ExposureAccumulator
Per-history accumulation of the deposit in each configured volume. Call begin_history, then deposit for every deposit, then end_history.
ExposureConfig
Settings of the exposure tally.
ExposureHistogram
The histogram of the per-electron deposit X in one volume, with exact moment sums. Mergeable; see the module docs.
ExposureReport
Exposure results of a run.
ExposureVolume
A target volume: a lateral shape over a depth range depth_lo_m <= x < depth_hi_m, centred at lateral offset (offset_y_m, offset_z_m) from the beam axis. Deposits exist only inside the target, so a volume extending beyond the film collects only the part inside it.
ExposureVolumeReport
Results for one volume.
QuantileResult
A reported quantile of S, eV.
ThresholdResult
A reported threshold probability.

Enums§

BeamProfile
Lateral profile of the beam.
ExposureError
Errors of the exposure configuration.
VolumeShape
Lateral shape of a target volume, centred on the volume’s offset.