Skip to content

Commit

Permalink
Use TrackerHit3D once it becomes available
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Feb 1, 2024
1 parent 7653458 commit 051271f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 0 additions & 3 deletions SimG4Components/src/SimG4SaveTrajectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
#include "G4VTrajectory.hh"


// datamodel
#include "edm4hep/TrackerHitCollection.h"

DECLARE_COMPONENT(SimG4SaveTrajectory)

SimG4SaveTrajectory::SimG4SaveTrajectory(const std::string& aType, const std::string& aName,
Expand Down
10 changes: 7 additions & 3 deletions SimG4Components/src/SimG4SaveTrajectory.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
#include "SimG4Interface/ISimG4SaveOutputTool.h"
class IGeoSvc;

// datamodel
#if __has_include("edm4hep/TrackerHit3DCollection.h")
#include "edm4hep/TrackerHit3DCollection.h"
#else
#include "edm4hep/TrackerHitCollection.h"
namespace edm4hep {
class TrackerHitCollection;
using TrackerHit3DCollection = edm4hep::TrackerHitCollection;
}
#endif

/** @class SimG4SaveTrajectory SimG4Components/src/SimG4SaveTrajectory.h SimG4SaveTrajectory.h
*
Expand Down Expand Up @@ -43,7 +47,7 @@ class SimG4SaveTrajectory : public GaudiTool, virtual public ISimG4SaveOutputToo
/// Pointer to the geometry service
ServiceHandle<IGeoSvc> m_geoSvc;
/// Handle for trajectory hits including position information
DataHandle<edm4hep::TrackerHitCollection> m_trackHits{"Hits/Trajectory",
DataHandle<edm4hep::TrackerHit3DCollection> m_trackHits{"Hits/Trajectory",
Gaudi::DataHandle::Writer, this};
};

Expand Down

0 comments on commit 051271f

Please sign in to comment.