diff --git a/src/algorithms/fardetectors/FarDetectorLinearTracking.cc b/src/algorithms/fardetectors/FarDetectorLinearTracking.cc index 5d93d42bc..4e1af9363 100644 --- a/src/algorithms/fardetectors/FarDetectorLinearTracking.cc +++ b/src/algorithms/fardetectors/FarDetectorLinearTracking.cc @@ -6,7 +6,15 @@ #include #include #include +#include +#if EDM4HEP_BUILD_VERSION < EDM4HEP_VERSION(0, 99, 0) #include +namespace edm4hep { + using TrackerHit3DCollection = TrackerHitCollection; +} +#else +#include +#endif #include #include #include @@ -71,7 +79,7 @@ namespace eicrecon { void FarDetectorLinearTracking::buildMatrixRecursive(int level, Eigen::MatrixXd* hitMatrix, - const std::vector>& hits, + const std::vector>& hits, gsl::not_null outputTracks ) const { // Iterate over hits in this layer diff --git a/src/algorithms/fardetectors/FarDetectorLinearTracking.h b/src/algorithms/fardetectors/FarDetectorLinearTracking.h index d9caea23f..0fadfbda3 100644 --- a/src/algorithms/fardetectors/FarDetectorLinearTracking.h +++ b/src/algorithms/fardetectors/FarDetectorLinearTracking.h @@ -7,7 +7,15 @@ #include #include #include +#include +#if EDM4HEP_BUILD_VERSION < EDM4HEP_VERSION(0, 99, 0) #include +namespace edm4hep { + using TrackerHit3DCollection = TrackerHitCollection; +} +#else +#include +#endif #include #include #include @@ -18,7 +26,7 @@ namespace eicrecon { using FarDetectorLinearTrackingAlgorithm = - algorithms::Algorithm>, + algorithms::Algorithm>, algorithms::Output>; class FarDetectorLinearTracking : public FarDetectorLinearTrackingAlgorithm, @@ -44,7 +52,7 @@ class FarDetectorLinearTracking : public FarDetectorLinearTrackingAlgorithm, void buildMatrixRecursive(int level, Eigen::MatrixXd* hitMatrix, - const std::vector>& hits, + const std::vector>& hits, gsl::not_null outputTracks) const; void checkHitCombination(Eigen::MatrixXd* hitMatrix, diff --git a/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc b/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc index b12a61b73..b129121dd 100644 --- a/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc +++ b/src/algorithms/fardetectors/FarDetectorTrackerCluster.cc @@ -174,7 +174,7 @@ FarDetectorTrackerCluster::ClusterHits(const edm4eic::RawTrackerHitCollection& i // Convert to global coordinates and create TrackerHits void FarDetectorTrackerCluster::ConvertClusters( const std::vector& clusters, - edm4hep::TrackerHitCollection& outputClusters) const { + edm4hep::TrackerHit3DCollection& outputClusters) const { // Get context of first hit const dd4hep::VolumeManagerContext* context = m_cellid_converter->findContext(clusters[0].cellID); diff --git a/src/algorithms/fardetectors/FarDetectorTrackerCluster.h b/src/algorithms/fardetectors/FarDetectorTrackerCluster.h index 6ac60e506..07e307f65 100644 --- a/src/algorithms/fardetectors/FarDetectorTrackerCluster.h +++ b/src/algorithms/fardetectors/FarDetectorTrackerCluster.h @@ -9,7 +9,15 @@ #include #include #include +#include +#if EDM4HEP_BUILD_VERSION < EDM4HEP_VERSION(0, 99, 0) #include +namespace edm4hep { + using TrackerHit3DCollection = TrackerHitCollection; +} +#else +#include +#endif #include #include #include @@ -32,7 +40,7 @@ namespace eicrecon { using FarDetectorTrackerClusterAlgorithm = algorithms::Algorithm>, - algorithms::Output>>; + algorithms::Output>>; class FarDetectorTrackerCluster : public FarDetectorTrackerClusterAlgorithm, public WithPodConfig { @@ -55,7 +63,7 @@ class FarDetectorTrackerCluster : public FarDetectorTrackerClusterAlgorithm, std::vector ClusterHits(const edm4eic::RawTrackerHitCollection&) const; /** Convert clusters to TrackerHits **/ - void ConvertClusters(const std::vector&, edm4hep::TrackerHitCollection&) const; + void ConvertClusters(const std::vector&, edm4hep::TrackerHit3DCollection&) const; private: const dd4hep::Detector* m_detector{nullptr};