15 #include "G4GenericMessenger.hh"
25 _messenger =
new G4GenericMessenger(
this,
"/GGS/userActions/acceptanceCheckAction/");
26 _messenger->DeclareProperty(
"reSimulateKilled", _reSimulateKilled,
"Simulate again events outside acceptance")
27 .SetDefaultValue(
"true");
37 if (track->GetParentID() == 0) {
48 track->GetDynamicParticle()->GetPrimaryParticle()->SetUserInformation(userInfo);
49 if (G4EventManager::GetEventManager()->GetStackManager()->GetNTotalTrack() == 0) {
51 if (_reSimulateKilled)
57 return G4UserStackingAction::ClassifyNewTrack(track);
G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *track)
Override of the ClassifyNewTrack method.
Data class to store informations about the primary particle.
Class for GGS detector construction.
bool isTrackKilled
True if the particle's track has been killed.
GGSAcceptanceCheckAction()
Constructor.
void SimulateAgainKilledEvent()
Simulates again a killed event.
const GGSVGeometryConstruction * GetGeometry() const
Returns a pointer to the geometry.
static GGSRunManager * GetRunManager()
Static getter function the run manager.
~GGSAcceptanceCheckAction()
Destructor.
void KillEvent()
Kills the current event.
An action to kill primary tracks outside acceptance.
#define RegisterUA(uaClassName)
Macro for registration of user actions classes.
virtual bool IsInsideAcceptance(const G4ThreeVector &, const G4ThreeVector &) const
Checks if a particle is inside the instrument's acceptance.