2#include "Biasing/PrimaryToEcalFilter.h"
7#include "G4EventManager.hh"
8#include "G4RunManager.hh"
15 : simcore::UserAction(name, parameters) {
21 if (
int parentID{step->GetTrack()->GetParentID()}; parentID != 0)
return;
23 if (G4EventManager::GetEventManager()->GetConstCurrentEvent()->IsAborted())
28 if (
auto region{step->GetTrack()
33 region.compareTo(
"CalorimeterRegion") == 0)
38 if (
auto energy{step->GetPostStepPoint()->GetTotalEnergy()};
46 step->GetTrack()->SetTrackStatus(fKillTrackAndSecondaries);
47 G4RunManager::GetRunManager()->AbortEvent();
54DECLARE_ACTION(biasing, PrimaryToEcalFilter)
void stepping(const G4Step *step) override
Only process if the track is a primary (parentID == 0) and if the event is not aborted and the partic...
double threshold_
Energy [MeV] below which a primary should be vetoed.
PrimaryToEcalFilter(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.