File indexing completed on 2025-01-18 09:11:37
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include <vector>
0012
0013 #include <G4UserSteppingAction.hh>
0014 #include <HepMC3/GenParticle.h>
0015 #include <HepMC3/GenVertex.h>
0016 #include <globals.hh>
0017
0018 namespace ActsExamples::Geant4::HepMC3 {
0019
0020
0021 class SteppingAction : public G4UserSteppingAction {
0022 public:
0023 explicit SteppingAction(std::vector<std::string> eventRejectionProcess);
0024 ~SteppingAction() override;
0025
0026
0027 static SteppingAction* instance();
0028
0029
0030
0031 void UserSteppingAction(const G4Step* step) override;
0032
0033
0034 void clear();
0035
0036
0037 bool eventAborted() { return m_eventAborted; }
0038
0039 private:
0040
0041 static SteppingAction* s_instance;
0042
0043 std::shared_ptr<::HepMC3::GenVertex> m_previousVertex = nullptr;
0044
0045 std::vector<std::string> m_eventRejectionProcess;
0046
0047 bool m_eventAborted = false;
0048 };
0049 }