geant events for multiple scattering
This commit is contained in:
30
src/HEP/Geant/SteppingAction.hh
Normal file
30
src/HEP/Geant/SteppingAction.hh
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef U_GEANT_STEPPINGACTION_HH
|
||||
#define U_GEANT_STEPPINGACTION_HH
|
||||
|
||||
#include "G4UserSteppingAction.hh"
|
||||
#include "Core/Vector.h"
|
||||
#include "GeantEvent.h"
|
||||
|
||||
namespace uLib {
|
||||
namespace Geant {
|
||||
|
||||
/// SteppingAction collects scattering data at each Geant4 step and
|
||||
/// builds GeantEvent objects in the output buffer.
|
||||
class SteppingAction : public G4UserSteppingAction {
|
||||
public:
|
||||
/// @param output pointer to the results vector owned by the Scene
|
||||
SteppingAction(Vector<GeantEvent> *output);
|
||||
virtual ~SteppingAction();
|
||||
|
||||
virtual void UserSteppingAction(const G4Step *step) override;
|
||||
|
||||
private:
|
||||
Vector<GeantEvent> *m_Output; ///< destination for finished events
|
||||
GeantEvent m_Current; ///< event being built
|
||||
int m_LastEventID; ///< track event transitions
|
||||
};
|
||||
|
||||
} // namespace Geant
|
||||
} // namespace uLib
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user