Skip to content
25 changes: 25 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,31 @@ find_package(
atomic
regex)

# Find Eigen3 (required by ACTS)
find_package(Eigen3 CONFIG REQUIRED)

# GNUInstallDirs must be included before ACTS is configured as a sub-project;
# ACTS only calls include(GNUInstallDirs) when it is the top-level project, so
# CMAKE_INSTALL_INCLUDEDIR would otherwise be empty and its install() calls fail.
include(GNUInstallDirs)

# Find or fetch ACTS - must be at top level so both Ecal and Tracking can use it
find_package(Acts 47.0.0 QUIET)
if (NOT Acts_FOUND)
message(STATUS "Did not find Acts >= 47.0.0, downloading and compiling v47.0.0")
Comment thread
tomeichlersmith marked this conversation as resolved.
include(FetchContent)
FetchContent_Declare(
Acts
URL https://github.com/acts-project/acts/archive/refs/tags/v47.0.0.tar.gz
URL_HASH MD5=833c02edee49827f25be74c80d8ee654
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
)
FetchContent_MakeAvailable(Acts)
FetchContent_GetProperties(Acts)
include_directories(SYSTEM "${Acts_SOURCE_DIR}/Core/include")
else()
message(STATUS "Found Acts ${Acts_VERSION}")
endif()

# FunctionalCoreTest.cxx doesnt comply with clang-tidy but that's ok
set_source_files_properties(Framework/test/FunctionalCoreTest.cxx PROPERTIES COMPILE_OPTIONS "-Wno-null-dereference")
Expand Down
6 changes: 2 additions & 4 deletions Ecal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ setup_library(
find_package(ONNXRuntime 1.2.0)

find_package(Eigen3 CONFIG REQUIRED)

# Find ACTS for track finding in ECAL
find_package(Acts REQUIRED COMPONENTS Core)
# Acts is set up by the top-level CMakeLists.txt

setup_library(module Ecal
dependencies ROOT::Physics
Framework::Framework Recon::Event Recon::Recon Tools::Tools DetDescr::DetDescr
ONNXRuntime::Interface Ecal::Event Tracking::Event Tracking::Tracking SimCore::Event
Eigen3::Eigen ActsCore
Eigen3::Eigen Acts::Core
)

setup_test(dependencies Ecal::Ecal)
Expand Down
2 changes: 2 additions & 0 deletions Ecal/include/Ecal/EcalTrackFinderProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include "Acts/Surfaces/RectangleBounds.hpp"
#include "Acts/Surfaces/Surface.hpp"
#include "Acts/TrackFinding/CombinatorialKalmanFilter.hpp"
#include "Acts/TrackFinding/MeasurementSelector.hpp"
#include "Acts/TrackFinding/TrackStateCreator.hpp"
#include "Acts/TrackFitting/GainMatrixUpdater.hpp"

// C++
Expand Down
Loading
Loading