Class RMGGrabmayrGCReader

Nested Relationships

Nested Types

Class Documentation

class RMGGrabmayrGCReader

Thread-local reader of pre-computed (n,gamma) cascade tables.

Loads per-isotope cascade files registered through messenger commands and serves them to RMGNeutronCaptureProcess one cascade at a time. The reader is a thread-local singleton: every worker keeps its own file handles and its own read position.

Public Functions

~RMGGrabmayrGCReader()
G4bool IsApplicable(G4int z, G4int a)

Whether a cascade file has been registered for the (Z, A) isotope.

void CloseFiles()

Close all open cascade files held by this thread.

GammaCascadeLine GetNextEntry(G4int z, G4int a, G4double neutron_energy_keV)

Read and return the next cascade entry for the (Z, A) isotope.

Selects the cascade file whose neutron kinetic-energy range contains neutron_energy_keV (or the single registered file, if only one). If the energy falls outside every registered range it is clamped to the nearest bin (a one-time warning is emitted per isotope). The reader cycles back to the beginning when the file is exhausted.

Public Static Functions

static RMGGrabmayrGCReader *GetInstance()

Thread-local singleton accessor.