1#include "Biasing/Utility/TrackProcessFilter.h"
7#include "G4VProcess.hh"
12#include "SimCore/G4User/UserTrackInformation.h"
19 :
simcore::UserAction(name, parameters) {
26 if (
const G4VProcess * process{track->GetCreatorProcess()}; process) {
27 auto name{process->GetProcessName()};
29 if (name.contains(
process_)) track_info->setSaveFlag(
true);
#define DECLARE_ACTION(CLASS)
register a new UserAction with its factory
Filter used to tag tracks for persistence based on the process they were created from.
void PostUserTrackingAction(const G4Track *track) override
Method called when a track is done being processed.
TrackProcessFilter(const std::string &name, framework::config::Parameters ¶meters)
Constructor.
std::string process_
The process to filter on.
~TrackProcessFilter()
Destructor.
Class encapsulating parameters for configuring a processor.
const T & get(const std::string &name) const
Retrieve the parameter of the given name.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...