Skip to content

Implement Multi-Process Interaction Support

Summary

We need to extend the current probing setup to support multiple physical interaction processes (e.g., Compton scattering, photoelectric absorption, Rayleigh scattering). This change will serve as a preliminary for the transport engine to more realistically model energy-dependent and material-specific photon interaction

Motivation

Currently, the probing setup supports only a single differential cross section model. However, real materials have multiple competing interaction processes, each with its own cross section and physics model. To simulate realistic particle behavior, we must:

  • Sample the interaction type based on relative cross sections.
  • Call the appropriate physical model for that interaction.

Tasks

  • Use the abstract interface for AbstractProcessDefinition, AbstractModelDefinition and AbstractPhaseSpaceLayout.

  • Implement the following subtypes:

    • Thomson
    • PhotoelectricAbsorbtion
    • Rayleigh
  • Create DifferentialCrossSection setup that holds:

    • A partial cross section (total cross section for the single process)
    • compute of the differential cross section
  • Modify the probing setup to hold a list of DifferentialCrossSection entries.

  • Implement interaction selection logic based on \sigma_i/\sum_i\sigma_i (e.g., roulette wheel selection).

  • Update the particle transport loop to:

    • Sample distance based on total \sigma_t = \sum_i\sigma_i
    • Select and apply the correct interaction.
    • Handle energy and momentum, or particle absorption.

Acceptance Criteria

  • A single voxel can contain multiple interaction processes.
  • The interaction chosen during transport reflects the statistical weight of its cross section.
  • All physical interactions behave as expected (e.g., energy loss in Thomson, absorption in photoelectric).
  • The simulation terminates correctly for absorbed particles.
  • Code is modular and extensible for future processes (e.g., pair production, fluorescence).
  • Unit tests for all components

Notes

Consider adding logging/debug flags to print the selected process during development.