1#ifndef PHOTONUCLEARTOPOLOGYFILTERS_H
2#define PHOTONUCLEARTOPOLOGYFILTERS_H
13#include "Framework/Configure/Parameters.h"
50 void stepping(
const G4Step* step)
override;
52 virtual bool rejectEvent(
const std::vector<G4Track*>& secondaries)
const = 0;
55 std::vector<simcore::TYPE>
getTypes()
override {
56 return {simcore::TYPE::STEPPING};
71 if (pdgCode > 1000000000) {
73 return ((pdgCode / 10) % 1000) <= 4;
92 return !(pdgcode < 10000 || (count_light_ions_ &&
isLightIon(pdgcode)));
95 constexpr bool isNeutron(
const int pdgID)
const {
return pdgID == 2112; }
97 bool count_light_ions_;
98 double hard_particle_threshold_;
107 bool rejectEvent(
const std::vector<G4Track*>& secondaries)
const override;
116 bool rejectEvent(
const std::vector<G4Track*>& secondaries)
const override;
File holding UserAction prototype and supporting macro.
Abstract base class for a user action used to filter out photo-nuclear events that don't match the to...
PhotoNuclearTopologyFilter(const std::string &name, framework::config::Parameters ¶meters)
Constructor.
void stepping(const G4Step *step) override
Callback that allows a user to take some actions at the end of a step.
constexpr bool isLightIon(const int pdgCode) const
Check if the PDG code corresponds to a light ion nucleus.
constexpr bool skipCountingParticle(const int pdgcode) const
Whether or not to include a particular particle type in any counting.
std::vector< simcore::TYPE > getTypes() override
Retrieve the type of actions this class defines.
~PhotoNuclearTopologyFilter()=default
Destructor.
Class encapsulating parameters for configuring a processor.
Interface that defines a user action.