add detector simulation
This commit is contained in:
@@ -5,16 +5,16 @@
|
||||
#include "G4UserEventAction.hh"
|
||||
#include "Core/Vector.h"
|
||||
#include "GeantEvent.h"
|
||||
#include "HEP/Detectors/MuonEvent.h"
|
||||
#include "SimulationContext.h"
|
||||
|
||||
namespace uLib {
|
||||
namespace Geant {
|
||||
|
||||
/// SteppingAction collects scattering data at each Geant4 step and
|
||||
/// builds GeantEvent objects in the output buffer.
|
||||
/// SteppingAction collects scattering data at each Geant4 step.
|
||||
class SteppingAction : public G4UserSteppingAction, public G4UserEventAction {
|
||||
public:
|
||||
/// @param output pointer to the results vector owned by the Scene
|
||||
SteppingAction(Vector<GeantEvent> *output);
|
||||
SteppingAction(SimulationContext *context);
|
||||
virtual ~SteppingAction();
|
||||
|
||||
virtual void UserSteppingAction(const G4Step *step) override;
|
||||
@@ -24,10 +24,11 @@ public:
|
||||
void SetVerbosity(int level) { m_Verbosity = level; }
|
||||
|
||||
private:
|
||||
Vector<GeantEvent> *m_Output; ///< destination for finished events
|
||||
GeantEvent m_Current; ///< event being built
|
||||
int m_LastEventID; ///< track event transitions
|
||||
int m_Verbosity = 0;
|
||||
SimulationContext *m_Context;
|
||||
GeantEvent m_CurrentGeant;
|
||||
MuonEvent m_CurrentMuon;
|
||||
int m_MuonCrossCount = 0;
|
||||
int m_Verbosity = 0;
|
||||
};
|
||||
|
||||
} // namespace Geant
|
||||
|
||||
Reference in New Issue
Block a user