Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TrackerHit3D once it becomes available #62

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading