Skip to content

Commit

Permalink
Remove the check for TrackerHit3D from edm4hep (#99)
Browse files Browse the repository at this point in the history
* Remove the check for TrackerHit3D from edm4hep

* Remove the checks for CovMatri3f.h

---------

Co-authored-by: jmcarcell <[email protected]>
  • Loading branch information
jmcarcell and jmcarcell authored Dec 10, 2024
1 parent 6c80e81 commit 6fc1692
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 59 deletions.
14 changes: 3 additions & 11 deletions k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4EDM4hep2LcioConv.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "k4EDM4hep2LcioConv/MappingUtils.h"

// EDM4hep
#include "edm4hep/TrackerHit3DCollection.h"
#include <edm4hep/CaloHitContributionCollection.h>
#include <edm4hep/CaloHitMCParticleLinkCollection.h>
#include <edm4hep/CaloHitSimCaloHitLinkCollection.h>
Expand All @@ -21,19 +22,10 @@
#include <edm4hep/SimTrackerHitCollection.h>
#include <edm4hep/TrackCollection.h>
#include <edm4hep/TrackMCParticleLinkCollection.h>
#include <edm4hep/TrackerHitSimTrackerHitLinkCollection.h>
#include <edm4hep/VertexRecoParticleLinkCollection.h>
#if __has_include("edm4hep/TrackerHit3DCollection.h")
#include "edm4hep/TrackerHit3DCollection.h"
#else
#include "edm4hep/TrackerHitCollection.h"
namespace edm4hep {
using TrackerHit3DCollection = edm4hep::TrackerHitCollection;
using TrackerHit3D = edm4hep::TrackerHit;
} // namespace edm4hep
#endif
#include <edm4hep/TrackerHitPlaneCollection.h>
#include <edm4hep/TrackerHitSimTrackerHitLinkCollection.h>
#include <edm4hep/VertexCollection.h>
#include <edm4hep/VertexRecoParticleLinkCollection.h>
#include <edm4hep/utils/ParticleIDUtils.h>

#include "podio/Frame.h"
Expand Down
12 changes: 2 additions & 10 deletions k4EDM4hep2LcioConv/include/k4EDM4hep2LcioConv/k4Lcio2EDM4hepConv.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,11 @@
#include "edm4hep/SimTrackerHitCollection.h"
#include "edm4hep/TrackCollection.h"
#include "edm4hep/TrackMCParticleLinkCollection.h"
#include "edm4hep/TrackerHitSimTrackerHitLinkCollection.h"
#include "edm4hep/VertexRecoParticleLinkCollection.h"
#if __has_include("edm4hep/TrackerHit3DCollection.h")
#include "edm4hep/TrackerHit3DCollection.h"
#else
#include "edm4hep/TrackerHitCollection.h"
namespace edm4hep {
using TrackerHit3DCollection = edm4hep::TrackerHitCollection;
using MutableTrackerHit3D = edm4hep::TrackerHit;
} // namespace edm4hep
#endif
#include "edm4hep/TrackerHitPlaneCollection.h"
#include "edm4hep/TrackerHitSimTrackerHitLinkCollection.h"
#include "edm4hep/VertexCollection.h"
#include "edm4hep/VertexRecoParticleLinkCollection.h"
#include "edm4hep/utils/ParticleIDUtils.h"

// LCIO
Expand Down
14 changes: 3 additions & 11 deletions tests/src/CompareEDM4hepLCIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,13 @@
#include "edm4hep/SimTrackerHitCollection.h"
#include "edm4hep/TrackCollection.h"
#include "edm4hep/TrackMCParticleLinkCollection.h"
#include "edm4hep/TrackerHitSimTrackerHitLinkCollection.h"
#include "edm4hep/VertexRecoParticleLinkCollection.h"
#include <edm4hep/VertexRecoParticleLink.h>
#if __has_include("edm4hep/TrackerHit3DCollection.h")
#include "edm4hep/TrackerHit3DCollection.h"
#else
#include "edm4hep/TrackerHitCollection.h"
namespace edm4hep {
using TrackerHit3DCollection = edm4hep::TrackerHitCollection;
using TrackerHit3D = edm4hep::TrackerHit;
} // namespace edm4hep
#endif
#include "edm4hep/TrackerHitPlaneCollection.h"
#include "edm4hep/TrackerHitSimTrackerHitLinkCollection.h"
#include "edm4hep/VertexCollection.h"
#include "edm4hep/VertexRecoParticleLinkCollection.h"
#include "edm4hep/utils/ParticleIDUtils.h"
#include <edm4hep/VertexRecoParticleLink.h>

#include "podio/Frame.h"

Expand Down
10 changes: 2 additions & 8 deletions tests/src/ComparisonUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
#include "edm4hep/Vector2i.h"
#include "edm4hep/Vector3d.h"
#include "edm4hep/Vector3f.h"
#if __has_include("edm4hep/CovMatrix3f.h")
#include <edm4hep/CovMatrix2f.h>
#include <edm4hep/CovMatrix3f.h>
#include <edm4hep/CovMatrix4f.h>
#include <edm4hep/CovMatrix6f.h>
#endif

#include "EVENT/LCCollection.h"
#include "UTIL/LCIterator.h"
Expand Down Expand Up @@ -74,14 +72,10 @@ template <typename LCIO, typename EDM4hepT>
bool compareValuesNanSafe(LCIO lcioV, EDM4hepT edm4hepV, const std::string& msg) {
constexpr auto isVectorLike =
has_size_method<EDM4hepT>::value ||
isAnyOf<EDM4hepT, edm4hep::Vector3f, edm4hep::Vector3d, edm4hep::Vector2f, edm4hep::Vector2i
#if __has_include("edm4hep/CovMatrix3f.h")
,
isAnyOf<EDM4hepT, edm4hep::Vector3f, edm4hep::Vector3d, edm4hep::Vector2f, edm4hep::Vector2i,
// These also effectively behave like vectors for
// the purposes of this function
edm4hep::CovMatrix2f, edm4hep::CovMatrix3f, edm4hep::CovMatrix4f, edm4hep::CovMatrix6f
#endif
>;
edm4hep::CovMatrix2f, edm4hep::CovMatrix3f, edm4hep::CovMatrix4f, edm4hep::CovMatrix6f>;

if constexpr (isVectorLike) {
const auto vecSize = [](EDM4hepT& edm4hepVal) -> std::size_t {
Expand Down
11 changes: 2 additions & 9 deletions tests/src/EDM4hep2LCIOUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "edm4hep/ReconstructedParticleCollection.h"
#include "edm4hep/SimCalorimeterHitCollection.h"
#include "edm4hep/TrackCollection.h"
#include "edm4hep/TrackerHit3DCollection.h"
#include <edm4hep/CaloHitMCParticleLinkCollection.h>
#include <edm4hep/CaloHitSimCaloHitLinkCollection.h>
#include <edm4hep/ClusterMCParticleLinkCollection.h>
Expand All @@ -20,16 +21,8 @@
#include <edm4hep/TrackMCParticleLinkCollection.h>
#include <edm4hep/TrackerHitPlaneCollection.h>
#include <edm4hep/TrackerHitSimTrackerHitLinkCollection.h>
#include <edm4hep/VertexRecoParticleLinkCollection.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 <edm4hep/VertexCollection.h>
#include <edm4hep/VertexRecoParticleLinkCollection.h>

#include <cstddef>
#include <tuple>
Expand Down
13 changes: 3 additions & 10 deletions tests/src/ObjectMapping.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@
#include "UTIL/LCIterator.h"
#include "UTIL/PIDHandler.h"

#include "edm4hep/TrackCollection.h"
#include <edm4hep/RecDqdxCollection.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 "edm4hep/CalorimeterHitCollection.h"
#include "edm4hep/ClusterCollection.h"
#include "edm4hep/MCParticleCollection.h"
Expand All @@ -37,8 +27,11 @@ using TrackerHit3DCollection = edm4hep::TrackerHitCollection;
#include "edm4hep/ReconstructedParticleCollection.h"
#include "edm4hep/SimCalorimeterHitCollection.h"
#include "edm4hep/SimTrackerHitCollection.h"
#include "edm4hep/TrackCollection.h"
#include "edm4hep/TrackerHit3DCollection.h"
#include "edm4hep/TrackerHitPlaneCollection.h"
#include "edm4hep/VertexCollection.h"
#include <edm4hep/RecDqdxCollection.h>

#include "podio/Frame.h"

Expand Down

0 comments on commit 6fc1692

Please sign in to comment.