File indexing completed on 2025-08-05 08:17:40
0001
0002
0003 #ifndef G4DETECTORS_BEAMLINEMAGNETSTEPPINGACTION_H
0004 #define G4DETECTORS_BEAMLINEMAGNETSTEPPINGACTION_H
0005
0006 #include <g4main/PHG4SteppingAction.h>
0007
0008 #include <string> // for string
0009
0010 class G4Step;
0011 class G4VPhysicalVolume;
0012 class PHCompositeNode;
0013 class BeamLineMagnetDetector;
0014 class PHG4Hit;
0015 class PHG4HitContainer;
0016 class PHParameters;
0017
0018 class BeamLineMagnetSteppingAction : public PHG4SteppingAction
0019 {
0020 public:
0021
0022 BeamLineMagnetSteppingAction(BeamLineMagnetDetector*, const PHParameters* parameters);
0023
0024
0025 ~BeamLineMagnetSteppingAction() override;
0026
0027
0028 bool UserSteppingAction(const G4Step*, bool) override;
0029
0030
0031 void SetInterfacePointers(PHCompositeNode*) override;
0032
0033 void SetHitNodeName(const std::string& type, const std::string& name) override;
0034
0035 private:
0036
0037 BeamLineMagnetDetector* m_Detector = nullptr;
0038 const PHParameters* m_Params = nullptr;
0039
0040 PHG4HitContainer* m_HitContainer = nullptr;
0041 PHG4HitContainer* m_AbsorberHitContainer = nullptr;
0042 PHG4Hit* m_Hit = nullptr;
0043 PHG4HitContainer* m_SaveHitContainer = nullptr;
0044
0045 G4VPhysicalVolume* m_SaveVolPre = nullptr;
0046 G4VPhysicalVolume* m_SaveVolPost = nullptr;
0047 int m_SaveTrackId = -1;
0048 int m_SavePreStepStatus = -1;
0049 int m_SavePostStepStatus = -1;
0050 double m_EdepSum = 0.;
0051 int m_ActiveFlag = 0;
0052 int m_AbsorberActiveFlag = 0;
0053 int m_BlackHoleFlag = 0;
0054
0055 std::string m_HitNodeName;
0056 std::string m_AbsorberNodeName;
0057 };
0058
0059 #endif