vtkGeantEvent

This commit is contained in:
AndreaRigoni
2026-03-16 17:51:53 +00:00
parent c63a1ae047
commit d8ef413216
31 changed files with 509 additions and 155 deletions

View File

@@ -2,6 +2,7 @@
#define U_GEANT_STEPPINGACTION_HH
#include "G4UserSteppingAction.hh"
#include "G4UserEventAction.hh"
#include "Core/Vector.h"
#include "GeantEvent.h"
@@ -10,13 +11,15 @@ namespace Geant {
/// SteppingAction collects scattering data at each Geant4 step and
/// builds GeantEvent objects in the output buffer.
class SteppingAction : public G4UserSteppingAction {
class SteppingAction : public G4UserSteppingAction, public G4UserEventAction {
public:
/// @param output pointer to the results vector owned by the Scene
SteppingAction(Vector<GeantEvent> *output);
virtual ~SteppingAction();
virtual void UserSteppingAction(const G4Step *step) override;
virtual void BeginOfEventAction(const G4Event *event) override;
virtual void EndOfEventAction(const G4Event *event) override;
private:
Vector<GeantEvent> *m_Output; ///< destination for finished events