From ffaa5973cd41f2466f4b8adc8e9c9d53b9240c47 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Thu, 1 Feb 2024 17:06:34 +0100 Subject: [PATCH] Switch to TrackerHit3D transparently --- converter/src/DelphesEDM4HepConverter.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/converter/src/DelphesEDM4HepConverter.cc b/converter/src/DelphesEDM4HepConverter.cc index ddd8de6..0bdfe27 100644 --- a/converter/src/DelphesEDM4HepConverter.cc +++ b/converter/src/DelphesEDM4HepConverter.cc @@ -11,7 +11,14 @@ #include "edm4hep/ParticleIDCollection.h" #include "edm4hep/ReconstructedParticleCollection.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; +} +#endif #include "edm4hep/Vector3d.h" #include "podio/UserDataCollection.h" @@ -219,7 +226,7 @@ namespace k4SimDelphes { auto* mcRecoRelations = getCollection(m_mcRecoAssocCollName); auto* idCollection = getCollection(m_particleIDName); - auto* trackerHitColl = getCollection(TRACKERHIT_OUTPUT_NAME); + auto* trackerHitColl = getCollection(TRACKERHIT_OUTPUT_NAME); for (auto iCand = 0; iCand < delphesCollection->GetEntries(); ++iCand) { auto* delphesCand = static_cast(delphesCollection->At(iCand)); @@ -513,7 +520,7 @@ namespace k4SimDelphes { createCollection(m_particleIDName); } if (m_collections.find(TRACKERHIT_OUTPUT_NAME) == m_collections.end()) { - createCollection(TRACKERHIT_OUTPUT_NAME); + createCollection(TRACKERHIT_OUTPUT_NAME); } if (m_collections.find(CALORIMETERHIT_OUTPUT_NAME) == m_collections.end()) { createCollection(CALORIMETERHIT_OUTPUT_NAME);