k4SimGeant4
Loading...
Searching...
No Matches
SimG4SaveTrajectory.h
Go to the documentation of this file.
1#ifndef SIMG4COMPONENTS_G4SAVETRAJECTORY
2#define SIMG4COMPONENTS_G4SAVETRAJECTORY
3
4// Gaudi
5#include "GaudiKernel/AlgTool.h"
6
7// FCCSW
9#include "k4FWCore/DataHandle.h"
10class IGeoSvc;
11
12#include "edm4hep/TrackerHit3DCollection.h"
13
21class SimG4SaveTrajectory : public AlgTool, virtual public ISimG4SaveOutputTool {
22public:
23 explicit SimG4SaveTrajectory(const std::string& aType, const std::string& aName, const IInterface* aParent);
24 virtual ~SimG4SaveTrajectory();
28 virtual StatusCode initialize();
32 virtual StatusCode finalize();
37 virtual StatusCode saveOutput(const G4Event& aEvent) final;
38
39private:
41 ServiceHandle<IGeoSvc> m_geoSvc;
43 mutable DataHandle<edm4hep::TrackerHit3DCollection> m_trackHits{"Hits/Trajectory", Gaudi::DataHandle::Writer, this};
44};
45
46#endif /* SIMG4COMPONENTS_G4SAVETRAJECTORY */
Interface to the output saving tool.
Definition ISimG4SaveOutputTool.h:17
Tool to save Geant4 Trajectory data.
Definition SimG4SaveTrajectory.h:21
virtual StatusCode finalize()
Finalize.
Definition SimG4SaveTrajectory.cpp:31
SimG4SaveTrajectory(const std::string &aType, const std::string &aName, const IInterface *aParent)
Definition SimG4SaveTrajectory.cpp:16
virtual StatusCode saveOutput(const G4Event &aEvent) final
Save the data output.
Definition SimG4SaveTrajectory.cpp:33
DataHandle< edm4hep::TrackerHit3DCollection > m_trackHits
Handle for trajectory hits including position information.
Definition SimG4SaveTrajectory.h:43
virtual StatusCode initialize()
Initialize.
Definition SimG4SaveTrajectory.cpp:24
virtual ~SimG4SaveTrajectory()
Definition SimG4SaveTrajectory.cpp:22
ServiceHandle< IGeoSvc > m_geoSvc
Pointer to the geometry service.
Definition SimG4SaveTrajectory.h:41