Files
uLib/src/HEP/Geant/DetectorSteppingAction.hh
2026-03-20 00:16:55 +00:00

37 lines
998 B
C++

#ifndef U_GEANT_DETECTORSTEPPINGACTION_HH
#define U_GEANT_DETECTORSTEPPINGACTION_HH
#include "G4UserSteppingAction.hh"
#include "G4UserEventAction.hh"
#include "Core/Vector.h"
#include "HEP/Detectors/MuonEvent.h"
#include "HEP/Detectors/DetectorChamber.h"
#include <mutex>
namespace uLib {
namespace Geant {
class DetectorSteppingAction : public G4UserSteppingAction, public G4UserEventAction {
public:
DetectorSteppingAction(Vector<MuonEvent> *output, const Vector<HLine3f> &planes);
virtual ~DetectorSteppingAction();
virtual void UserSteppingAction(const G4Step *step) override;
virtual void BeginOfEventAction(const G4Event *event) override;
virtual void EndOfEventAction(const G4Event *event) override;
void SetVerbosity(int level) { m_Verbosity = level; }
private:
Vector<MuonEvent> *m_Output;
Vector<HLine3f> m_Planes; // World projection planes
MuonEvent m_Current;
int m_CrossCount = 0;
int m_Verbosity = 0;
};
} // namespace Geant
} // namespace uLib
#endif