G4-ExampleB1/include/SteppingAction.hh

32 lines
586 B
C++
Raw Normal View History

2022-04-29 13:24:29 +08:00
#ifndef B1SteppingAction_h
#define B1SteppingAction_h 1
#include "G4UserSteppingAction.hh"
#include "globals.hh"
class G4LogicalVolume;
/// Stepping action class
namespace B1 {
class EventAction;
class SteppingAction : public G4UserSteppingAction {
public:
SteppingAction(EventAction* eventAction);
~SteppingAction() override;
// method from the base class
// 循环每个 step
void UserSteppingAction(const G4Step*) override;
private:
EventAction* fEventAction = nullptr;
G4LogicalVolume* fScoringVolume = nullptr;
};
} // namespace B1
#endif