16#ifndef _RMG_ISOTOPE_FILTER_SCHEME_HH_
17#define _RMG_ISOTOPE_FILTER_SCHEME_HH_
22#include "G4AnalysisManager.hh"
23#include "G4GenericMessenger.hh"
24#include "G4VUserEventInformation.hh"
26#include "RMGVOutputScheme.hh"
38 RMGIsotopeFilterEventInformation() =
default;
39 void Print()
const override {}
52class RMGIsotopeFilterScheme :
public RMGVOutputScheme {
56 RMGIsotopeFilterScheme();
68 void AddIsotope(
int a,
int z) { fIsotopes.insert({a, z}); }
72 std::unique_ptr<G4GenericMessenger> fMessenger;
73 void DefineCommands();
75 std::set<std::pair<int, int>> fIsotopes;
77 bool fDiscardPhotonsIfIsotopeNotProduced =
false;
void AddIsotope(int a, int z)
Add an (A, Z) isotope to the keep list.
Definition RMGIsotopeFilterScheme.hh:68
std::optional< bool > StackingActionNewStage(int stage) override
Drive the two-stage stacking when photon deferral is enabled.
Definition RMGIsotopeFilterScheme.cc:80
bool ShouldDiscardEvent(const G4Event *) override
Discard the event if none of the registered isotopes was produced.
Definition RMGIsotopeFilterScheme.cc:50
std::optional< G4ClassificationOfNewTrack > StackingActionClassify(const G4Track *, int stage) override
Defer photons to stage 1; otherwise leave the classification unchanged.
Definition RMGIsotopeFilterScheme.cc:66
void TrackingActionPre(const G4Track *) override
Tag the current event if the track's particle matches a registered isotope.
Definition RMGIsotopeFilterScheme.cc:28