2#include "Biasing/Utility/PartialEnergySorter.h"
7#include "G4EventManager.hh"
8#include "G4RunManager.hh"
16 : simcore::UserAction(name, parameters) {
30 const G4Track* aTrack,
31 const G4ClassificationOfNewTrack& currentTrackClassification) {
60 auto pre_energy{step->GetPreStepPoint()->GetKineticEnergy()};
61 auto post_energy{step->GetPostStepPoint()->GetKineticEnergy()};
71 step->GetTrack()->SetTrackStatus(fSuspend);
78DECLARE_ACTION(biasing::utility, PartialEnergySorter)
bool below_threshold_
Are we simulating below the threshold yet?
PartialEnergySorter(const std::string &name, framework::config::Parameters ¶meters)
Constructor.
double threshold_
Minimum Kinetic Energy [MeV] we want to simulate first.
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack, const G4ClassificationOfNewTrack ¤tTrackClass) override
Classify a "new" track.
void stepping(const G4Step *step) override
Checks if a particle steps from above the threshold to below it.
void BeginOfEventAction(const G4Event *event) override
At the beginning of a new event, we reset the counter for the number of particles above the energy th...
Class encapsulating parameters for configuring a processor.
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.