1#ifndef PHOTONUCLEARTOPOLOGYFILTERS_H
2#define PHOTONUCLEARTOPOLOGYFILTERS_H
7#include "SimCore/UserAction.h"
8#include "SimCore/UserTrackInformation.h"
12#include <G4RunManager.hh>
15#include "Framework/Configure/Parameters.h"
52 void stepping(
const G4Step* step)
override;
54 virtual bool rejectEvent(
const std::vector<G4Track*>& secondaries)
const = 0;
57 std::vector<simcore::TYPE>
getTypes()
override {
58 return {simcore::TYPE::STEPPING};
73 if (pdgCode > 1000000000) {
75 return ((pdgCode / 10) % 1000) <= 4;
94 return !(pdgcode < 10000 || (count_light_ions_ &&
isLightIon(pdgcode)));
97 constexpr bool isNeutron(
const int pdgID)
const {
return pdgID == 2112; }
99 bool count_light_ions_;
100 double hard_particle_threshold_;
109 bool rejectEvent(
const std::vector<G4Track*>& secondaries)
const override;
118 bool rejectEvent(
const std::vector<G4Track*>& secondaries)
const override;
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.