From 09a5767b770f770d553b0139425442f949437fcc Mon Sep 17 00:00:00 2001
From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com>
Date: Tue, 10 Dec 2024 10:39:57 +0100
Subject: [PATCH] Remove the check for TrackerHit3D from edm4hep (#265)

---
 CMakeLists.txt                                       |  2 +-
 .../components/ExampleFunctionalProducerMultiple.cpp |  7 -------
 .../ExampleFunctionalTransformerMultiple.cpp         |  7 -------
 .../components/k4FWCoreTest_CreateExampleEventData.h | 12 ------------
 4 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56da69cc..fa744a17 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,7 @@ project(k4FWCore)
 find_package(ROOT COMPONENTS RIO Tree REQUIRED)
 find_package(Gaudi REQUIRED)
 find_package(podio 1.0.1 REQUIRED)
-find_package(EDM4HEP REQUIRED)
+find_package(EDM4HEP 0.99 REQUIRED)
 
 include(cmake/Key4hepConfig.cmake)
 
diff --git a/test/k4FWCoreTest/src/components/ExampleFunctionalProducerMultiple.cpp b/test/k4FWCoreTest/src/components/ExampleFunctionalProducerMultiple.cpp
index 4c473f02..96a6dcb2 100644
--- a/test/k4FWCoreTest/src/components/ExampleFunctionalProducerMultiple.cpp
+++ b/test/k4FWCoreTest/src/components/ExampleFunctionalProducerMultiple.cpp
@@ -24,14 +24,7 @@
 #include "edm4hep/MCParticleCollection.h"
 #include "edm4hep/SimTrackerHitCollection.h"
 #include "edm4hep/TrackCollection.h"
-#if __has_include("edm4hep/TrackerHit3DCollection.h")
 #include "edm4hep/TrackerHit3DCollection.h"
-#else
-#include "edm4hep/TrackerHitCollection.h"
-namespace edm4hep {
-  using TrackerHit3DCollection = edm4hep::TrackerHitCollection;
-}  // namespace edm4hep
-#endif
 #include "podio/UserDataCollection.h"
 
 #include <string>
diff --git a/test/k4FWCoreTest/src/components/ExampleFunctionalTransformerMultiple.cpp b/test/k4FWCoreTest/src/components/ExampleFunctionalTransformerMultiple.cpp
index 3419079a..fcba44e7 100644
--- a/test/k4FWCoreTest/src/components/ExampleFunctionalTransformerMultiple.cpp
+++ b/test/k4FWCoreTest/src/components/ExampleFunctionalTransformerMultiple.cpp
@@ -22,15 +22,8 @@
 #include "edm4hep/MCParticleCollection.h"
 #include "edm4hep/SimTrackerHitCollection.h"
 #include "edm4hep/TrackCollection.h"
-#if __has_include("edm4hep/TrackerHit3DCollection.h")
 #include "edm4hep/TrackerHit3DCollection.h"
-#else
-#include "edm4hep/TrackerHitCollection.h"
 
-namespace edm4hep {
-  using TrackerHit3DCollection = edm4hep::TrackerHitCollection;
-}  // namespace edm4hep
-#endif
 #include "podio/UserDataCollection.h"
 
 #include "k4FWCore/Transformer.h"
diff --git a/test/k4FWCoreTest/src/components/k4FWCoreTest_CreateExampleEventData.h b/test/k4FWCoreTest/src/components/k4FWCoreTest_CreateExampleEventData.h
index 7e316a1b..9618630a 100644
--- a/test/k4FWCoreTest/src/components/k4FWCoreTest_CreateExampleEventData.h
+++ b/test/k4FWCoreTest/src/components/k4FWCoreTest_CreateExampleEventData.h
@@ -19,26 +19,14 @@
 #ifndef K4FWCORE_K4FWCORETEST_CREATEEXAMPLEEVENTDATA
 #define K4FWCORE_K4FWCORETEST_CREATEEXAMPLEEVENTDATA
 
-// GAUDI
 #include "Gaudi/Algorithm.h"
 
-// key4hep
 #include "k4FWCore/DataHandle.h"
 
-// edm4hep
-#if __has_include("edm4hep/TrackerHit3DCollection.h")
 #include "edm4hep/TrackerHit3DCollection.h"
-#else
-#include "edm4hep/TrackerHitCollection.h"
-namespace edm4hep {
-  using TrackerHit3DCollection = edm4hep::TrackerHitCollection;
-}  // namespace edm4hep
-#endif
 
-// podio
 #include "podio/UserDataCollection.h"
 
-// datamodel
 namespace edm4hep {
   class MCParticleCollection;
   class SimTrackerHitCollection;