Class RMGIsotopeFilterScheme

Inheritance Relationships

Base Type

Class Documentation

class RMGIsotopeFilterScheme : public RMGVOutputScheme

Output filter discarding events that did not produce any of a given isotope list.

Tracks created in the event are inspected; if no track corresponds to a (A, Z) pair in the configured isotope set, the event is discarded. With fDiscardPhotonsIfIsotopeNotProduced enabled, photon (and optical) tracks are deferred to a second stacking stage so that they are only tracked if a matching isotope is actually produced first, saving CPU on rejected events.

Public Functions

RMGIsotopeFilterScheme()
virtual bool ShouldDiscardEvent(const G4Event*) override

Discard the event if none of the registered isotopes was produced.

virtual std::optional<bool> StackingActionNewStage(int stage) override

Drive the two-stage stacking when photon deferral is enabled.

virtual std::optional<G4ClassificationOfNewTrack> StackingActionClassify(const G4Track*, int stage) override

Defer photons to stage 1; otherwise leave the classification unchanged.

virtual void TrackingActionPre(const G4Track*) override

Tag the current event if the track’s particle matches a registered isotope.

inline void AddIsotope(int a, int z)

Add an (A, Z) isotope to the keep list.