Diagnostics

Diagnostics are information about the behavior of the computational simulation, primarily used to diagnose performance and accuracy. These are used to set up Diagnostics as well as additional output gleaned from the Monte Carlo particle transport states.

struct Diagnostics

Set up Celeritas built-in diagnostics.

Public Members

std::string output_file = {"-"}

Write Celeritas diagnostics to this file (“-” is stdout)

ExportFiles export_files

Export problem setup.

Timers timers

Write elapsed times for each step.

Counters counters

Store step/track counts.

std::string perfetto_file

Write Perfetto tracing data to this filename.

std::optional<SlotDiagnostic> slot

Activate slot diagnostics.

bool action = {false}

Accumulate post-step actions for each particle type.

bool status_checker = {false}

Add a ‘status checker’ for debugging new actions.

std::optional<McTruth> mctruth

Write detailed MC truth output.

std::optional<StepDiagnostic> step

Bin number of steps per track.

size_type log_frequency = {1}

Log the execution progress every N events.

struct ExportFiles

Write out problem data to separate files for debugging.

These options are meant for use in the context of a larger experiment framework, for exporting physics settings, detector geometry, and offloaded EM tracks for reproducing externally.

Todo:

Some of these will be one per run; others will be one per thread.

Public Members

std::string physics

Filename for ROOT dump of physics data.

std::string offload

Filename to dump a ROOT/HepMC3 copy of primaries.

std::string geometry

Filename to dump a GDML file of the active Geant4 geometry.

struct SlotDiagnostic

Export (possibly large!) diagnostic output about track slot contents.

Public Members

std::string basename

Prefix of file names for outputting on each stream.

struct Timers

Set up Celeritas timers.

Public Members

bool action = {false}

Accumulate elapsed time for each action.

bool step = {false}

Save elapsed time for each step.

struct Counters

Output track diagnostic counters.

These include the number of tracks generated, active, aborted, and alive; as well as the number of initializers (or the high water mark thereof).

Public Members

bool step = {false}

Write diagnostics for each step.

bool event = {false}

Write diagnostics for each event (or run, if multiple events)

struct McTruth

Write out MC truth data.

Public Members

std::string output_file

Path to saved ROOT mc truth file.

SimpleRootFilterInput filter

Filter saved data by track ID, particle type.

struct StepDiagnostic

Accumulate distributions of the number of steps per particle type.

Public Members

size_type bins = {1000}

Maximum number of steps per track to bin.