1#include "Biasing/Utility/DecayChildrenKeeper.h"
7#include "G4VProcess.hh"
12#include "SimCore/G4User/UserTrackInformation.h"
19 :
simcore::UserAction(name, parameters) {
20 parents_ = parameters.getParameter<std::vector<int>>(
"parents");
27 if (particle_map.find(track->GetParentID()) != particle_map.end()) {
28 const int& parent_pdg{particle_map.at(track->GetParentID()).getPdgID()};
30 if (parent_pdg == parent) {
#define DECLARE_ACTION(CLASS)
register a new UserAction with its factory
Filter to keep tracks that are the products of certain particle's decays.
std::vector< int > parents_
The PDG IDs for which to keep decay children.
void PostUserTrackingAction(const G4Track *track) override
Method called when a track is done being processed.
DecayChildrenKeeper(const std::string &name, framework::config::Parameters ¶meters)
Constructor.
~DecayChildrenKeeper()
Destructor.
Class encapsulating parameters for configuring a processor.
const std::map< int, ldmx::SimParticle > & getCurrentParticleMap() const
Get the current particle map.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...