Skip to content

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::edep
  • TallyScore::dose
  • TallyScore::hits
  • TallyScore::track_length
  • TallyEstimator::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_definition
  • make_filtered_tally_definition
  • make_tally_set_definition

These can bind against either:

  • RectilinearGrid
  • CsgGeometry

Filtered Tallies

TallyFilterKind currently supports:

  • energy
  • spatial_axis

Energy Filters

EnergyFilterDefinition is a list of energy-bin edges.

Spatial-Axis Filters

SpatialAxisFilterInputDefinition supports:

  • axis: x, y, or z
  • number of bins
  • optional minimum
  • optional maximum

The resolved runtime type is SpatialAxisFilterDefinition.

Runtime Accumulation

Runtime accumulation is handled by:

  • TallyAccumulator
  • FilteredTallyAccumulator
  • TallyAccumulatorSet

They consume:

  • EnergyDepositEvent
  • TrackStepEvent

and support history-based commit_history() accumulation.

At the public implementation level:

  • edep scores deposited energy from EnergyDepositEvent;
  • dose scores dose from deposited energy and tally mass;
  • hits counts positive-energy deposit events;
  • track_length scores length_cm * weight from TrackStepEvent.

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:

  • mean
  • variance
  • standard_error_mean
  • dose_gy
  • mean_dose_gy_per_history
  • standard_error_mean_dose_gy
  • standard_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.

NeoMC user documentation.