1#ifndef SIMG4COMPONENTS_G4SAVETRAJECTORY
2#define SIMG4COMPONENTS_G4SAVETRAJECTORY
5#include "GaudiKernel/AlgTool.h"
8#include "k4FWCore/DataHandle.h"
12#if __has_include("edm4hep/TrackerHit3DCollection.h")
13#include "edm4hep/TrackerHit3DCollection.h"
15#include "edm4hep/TrackerHitCollection.h"
30 explicit SimG4SaveTrajectory(
const std::string& aType,
const std::string& aName,
const IInterface* aParent);
44 virtual StatusCode
saveOutput(
const G4Event& aEvent)
final;
50 mutable DataHandle<edm4hep::TrackerHit3DCollection>
m_trackHits{
"Hits/Trajectory",
51 Gaudi::DataHandle::Writer,
this};
Tool to save Geant4 Trajectory data.
Definition SimG4SaveTrajectory.h:28
virtual StatusCode finalize()
Finalize.
Definition SimG4SaveTrajectory.cpp:33
SimG4SaveTrajectory(const std::string &aType, const std::string &aName, const IInterface *aParent)
Definition SimG4SaveTrajectory.cpp:17
virtual StatusCode saveOutput(const G4Event &aEvent) final
Save the data output.
Definition SimG4SaveTrajectory.cpp:35
DataHandle< edm4hep::TrackerHit3DCollection > m_trackHits
Handle for trajectory hits including position information.
Definition SimG4SaveTrajectory.h:50
virtual StatusCode initialize()
Initialize.
Definition SimG4SaveTrajectory.cpp:26
virtual ~SimG4SaveTrajectory()
Definition SimG4SaveTrajectory.cpp:24
ServiceHandle< IGeoSvc > m_geoSvc
Pointer to the geometry service.
Definition SimG4SaveTrajectory.h:48
Definition EventInformation.h:10
edm4hep::TrackerHitCollection TrackerHit3DCollection
Definition SimG4SaveTrajectory.h:17