16#ifndef _RMG_TRACK_OUTPUT_SCHEME_HH_
17#define _RMG_TRACK_OUTPUT_SCHEME_HH_
23#include "G4AnalysisManager.hh"
24#include "G4GenericMessenger.hh"
26#include "RMGVOutputScheme.hh"
49class RMGTrackOutputScheme :
public RMGVOutputScheme {
53 RMGTrackOutputScheme();
76 [[nodiscard]]
bool StoreAlways()
const override {
return fStoreAlways; }
81 throw std::logic_error(
"step output scheme has no detectors");
84 void AddParticleFilter(
const int pdg) { fFilterParticle.insert(pdg); }
85 void AddProcessFilter(
const std::string proc) { fFilterProcess.insert(proc); }
86 void SetEnergyFilter(
double energy) { fFilterEnergy = energy; }
90 std::unique_ptr<G4GenericMessenger> fMessenger;
91 void DefineCommands();
93 bool fStoreSinglePrecisionEnergy =
false;
94 bool fStoreSinglePrecisionPosition =
false;
95 bool fStoreAlways =
false;
96 bool fStoreOpticalPhotons =
false;
98 std::map<std::string, uint32_t> fProcessMap;
99 std::set<int> fStoredProcessIDs;
101 std::set<std::string> fFilterProcess;
102 std::set<int> fFilterParticle;
103 double fFilterEnergy = -1;
105 struct RMGTrackEntry {
118 double kinetic_energy;
121 std::vector<RMGTrackEntry> fTrackEntries;
void EndOfRunAction(const G4Run *) override
handles the storage of the process map.
Definition RMGTrackOutputScheme.cc:157
void TrackingActionPre(const G4Track *) override
Called in RMGTrackingAction::PreUserTrackingAction to collect information about the track before it i...
Definition RMGTrackOutputScheme.cc:60
void AssignOutputNames(G4AnalysisManager *) override
Sets the names of the output columns, invoked in RMGRunAction::SetupAnalysisManager.
Definition RMGTrackOutputScheme.cc:32
void StoreEvent(const G4Event *) override
Store the information from the event, invoked in RMGEventAction::EndOfEventAction.
Definition RMGTrackOutputScheme.cc:119
bool StoreAlways() const override
Invoked in RMGEventAction::EndOfEventAction and decides whether to always store this OutputScheme.
Definition RMGTrackOutputScheme.hh:76
void ClearBeforeEvent() override
Clears the event data and frees memory before the next event is processed.
Definition RMGTrackOutputScheme.cc:155