Tallies
This page summarizes the currently public tally and scoring surface.
Current Scoring Scope
The public tally surface now supports several scalar scoring modes.
Scalar Tally Controls
TallyDefinition and ScalarTallyDefinition support:
TallyScore::edepTallyScore::doseTallyScore::hitsTallyScore::track_lengthTallyEstimator::analog- optional region filter
- optional tally-region filter
- optional
mass_g
mass_g is required for explicit dose scoring and also enables dose-derived views on energy-deposit tallies.
Tally Construction
The high-level authoring type is TallySetInputDefinition, which contains:
- scalar tallies;
- filtered tallies.
Use:
make_tally_definitionmake_filtered_tally_definitionmake_tally_set_definition
These can bind against either:
RectilinearGridCsgGeometry
Filtered Tallies
TallyFilterKind currently supports:
energyspatial_axis
Energy Filters
EnergyFilterDefinition is a list of energy-bin edges.
Spatial-Axis Filters
SpatialAxisFilterInputDefinition supports:
- axis:
x,y, orz - number of bins
- optional minimum
- optional maximum
The resolved runtime type is SpatialAxisFilterDefinition.
Runtime Accumulation
Runtime accumulation is handled by:
TallyAccumulatorFilteredTallyAccumulatorTallyAccumulatorSet
They consume:
EnergyDepositEventTrackStepEvent
and support history-based commit_history() accumulation.
At the public implementation level:
edepscores deposited energy fromEnergyDepositEvent;dosescores dose from deposited energy and tally mass;hitscounts positive-energy deposit events;track_lengthscoreslength_cm * weightfromTrackStepEvent.
Result Types
Scalar Results
TallyResult reports:
- tally score kind;
- total sum;
- sum of squares;
- number of histories;
- number of nonzero histories;
- optional mass.
Derived methods include:
meanvariancestandard_error_meandose_gymean_dose_gy_per_historystandard_error_mean_dose_gystandard_error_dose_gy_per_run
Filtered Results
FilteredTallyResult reports:
- per-bin sums;
- per-bin sum of squares;
- counts;
- nonzero histories;
- underflow;
- overflow;
- total histories.
Derived methods include:
mean(bin)variance(bin)standard_error_mean(bin)
User-Facing Interpretation
The current tally surface is still compact, but it is broader than pure edep:
- scalar tallies provide integral edep, dose, hits, or track-length results;
- filtered tallies provide energy-binned or coordinate-binned breakdowns;
- geometry can bind scores either by region name or by tally-region ID;
- step-based and deposit-based scoring share the same accumulator framework.