1#include "Biasing/PhotoNuclearProductsFilter.h"
11#include "G4RunManager.hh"
18#include "SimCore/UserTrackInformation.h"
24 : simcore::UserAction(name, parameters) {
33 auto track{step->GetTrack()};
41 if ((trackInfo !=
nullptr) && !trackInfo->isPNGamma())
return;
44 auto secondaries{step->GetSecondary()};
50 bool productFound{
false};
51 for (
const auto& secondary : *secondaries) {
53 auto pdgID{std::abs(secondary->GetParticleDefinition()->GetPDGEncoding())};
58 if (secondary->GetKineticEnergy() > min_e) {
68 track->SetTrackStatus(fKillTrackAndSecondaries);
69 G4RunManager::GetRunManager()->AbortEvent();
81DECLARE_ACTION(biasing, PhotoNuclearProductsFilter)
~PhotoNuclearProductsFilter()
Destructor.
std::vector< int > productsPdgID_
Container to hold the PDG IDs of products of interest.
void stepping(const G4Step *step) override
Callback that allows a user to take some actions at the end of a step.
PhotoNuclearProductsFilter(const std::string &name, framework::config::Parameters ¶meters)
Constructor.
Class encapsulating parameters for configuring a processor.
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.