LDMX Software
SteppingAction.h
1
6#ifndef SIMCORE_G4USER_STEPPINGACTION_H
7#define SIMCORE_G4USER_STEPPINGACTION_H
8
9/*~~~~~~~~~~~~~~~~*/
10/* C++ StdLib */
11/*~~~~~~~~~~~~~~~~*/
12#include <vector>
13
14/*~~~~~~~~~~~~*/
15/* Geant4 */
16/*~~~~~~~~~~~~*/
17#include "G4UserSteppingAction.hh"
18
19/*~~~~~~~~~~~~~*/
20/* SimCore */
21/*~~~~~~~~~~~~~*/
23
24namespace simcore {
25namespace g4user {
26
31class SteppingAction : public G4UserSteppingAction {
32 public:
35
41 void UserSteppingAction(const G4Step* step) override;
42
48 void registerAction(std::shared_ptr<UserAction> steppingAction) {
49 stepping_actions_.push_back(steppingAction);
50 }
51
52 private:
54 std::vector<std::shared_ptr<UserAction>> stepping_actions_;
55
56}; // SteppingAction
57
58} // namespace g4user
59} // namespace simcore
60
61#endif // SIMCORE_G4USER_STEPPINGACTION_H
File holding UserAction prototype and supporting macro.
Implements the Geant4 user stepping action.
void UserSteppingAction(const G4Step *step) override
Callback used to process a step.
void registerAction(std::shared_ptr< UserAction > steppingAction)
Register a user action of type SteppingAction with this class.
std::vector< std::shared_ptr< UserAction > > stepping_actions_
Collection of user stepping actions.
This namespace is meant to contain all the standard user actions that allow a Geant4 user to interfac...
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...