From 1122f7de9537e58612d5bef62a4369b2ceff774c Mon Sep 17 00:00:00 2001 From: Anna Date: Wed, 6 Mar 2024 11:00:27 +0100 Subject: [PATCH 1/2] Make LCIO an optional dependency (#328) --- CMakeLists.txt | 55 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e2c52bc7..d1441d0b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,20 +51,20 @@ find_package ( ROOT REQUIRED COMPONENTS Geom GenVector) message ( STATUS "ROOT_VERSION: ${ROOT_VERSION}" ) find_package( Geant4 REQUIRED ) -find_package( LCIO REQUIRED) -# Shim for older LCIO versions -if(NOT TARGET LCIO::lcio) - add_library(LCIO::lcio INTERFACE IMPORTED GLOBAL) - set_target_properties(LCIO::lcio - PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "${LCIO_INCLUDE_DIRS}" - INTERFACE_LINK_LIBRARIES "${LCIO_LIBRARIES}" - ) +OPTION(K4GEO_USE_LCIO "Enable or disable the use of LCIO, which is needed for some detector constructors and plugins" ON) +if(K4GEO_USE_LCIO) + find_package(LCIO REQUIRED) + # Shim for older LCIO versions + if(NOT TARGET LCIO::lcio) + add_library(LCIO::lcio INTERFACE IMPORTED GLOBAL) + set_target_properties(LCIO::lcio + PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${LCIO_INCLUDE_DIRS}" + INTERFACE_LINK_LIBRARIES "${LCIO_LIBRARIES}" + ) + endif() endif() -add_subdirectory(detectorSegmentations) -add_subdirectory(detectorCommon) - file(GLOB sources ./detector/tracker/*.cpp ./detector/calorimeter/*.cpp @@ -76,6 +76,25 @@ file(GLOB sources ./detector/PID/ARC_geo_o1_v01.cpp ) +if(NOT K4GEO_USE_LCIO) + set(lcio_sources # in ./detector/tracker + TrackerEndcap_o2_v05_geo.cpp + SiTrackerEndcap_o2_v02ext_geo.cpp + TrackerBarrel_o1_v03_geo.cpp + TrackerBarrel_o1_v04_geo.cpp + TrackerBarrel_o1_v05_geo.cpp + TrackerEndcap_o1_v05_geo.cpp + TrackerEndcap_o2_v06_geo.cpp + VertexBarrel_detailed_o1_v01_geo.cpp + VertexEndcap_o1_v05_geo.cpp + ZPlanarTracker_geo.cpp + ) + foreach(lcio_source ${lcio_sources}) + list(FILTER sources EXCLUDE REGEX "${lcio_source}") + endforeach() + message(STATUS "Use of LCIO is DISABLED, some detectors that depend on LCIO will not be built: ${lcio_sources}") +endif() + file(GLOB G4sources ./plugins/TPCSDAction.cpp ./plugins/CaloPreShowerSDAction.cpp @@ -94,12 +113,20 @@ add_library(lcgeo ALIAS k4geo) target_include_directories(${PackageName} PRIVATE ${PROJECT_SOURCE_DIR}/detector/include ) target_include_directories(${PackageName}G4 PRIVATE ${PROJECT_SOURCE_DIR}/detector/include ) -target_link_libraries(${PackageName} DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers ROOT::Core LCIO::lcio detectorSegmentations) -target_link_libraries(${PackageName}G4 DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers DD4hep::DDG4 ROOT::Core ${Geant4_LIBRARIES} LCIO::lcio) +target_link_libraries(${PackageName} DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers ROOT::Core detectorSegmentations) +target_link_libraries(${PackageName}G4 DD4hep::DDCore DD4hep::DDRec DD4hep::DDParsers DD4hep::DDG4 ROOT::Core ${Geant4_LIBRARIES}) + +if(K4GEO_USE_LCIO) + target_link_libraries(${PackageName} LCIO::lcio) + target_link_libraries(${PackageName}G4 LCIO::lcio) +endif() #Create this_package.sh file, and install dd4hep_instantiate_package(${PackageName}) +add_subdirectory(detectorSegmentations) +add_subdirectory(detectorCommon) + # Destination directories are hardcoded because GNUdirectories are not included install(TARGETS ${PackageName} ${PackageName}G4 EXPORT ${PROJECT_NAME}Targets From 89955b056bd4bc86c572f16ed168977e5f6aa86d Mon Sep 17 00:00:00 2001 From: Brieuc Francois Date: Thu, 21 Mar 2024 11:55:00 +0100 Subject: [PATCH 2/2] Add CLD_o4_v05 description in FCCee README (#329) --- FCCee/CLD/compact/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/FCCee/CLD/compact/README.md b/FCCee/CLD/compact/README.md index ea10994bf..7dfa17656 100644 --- a/FCCee/CLD/compact/README.md +++ b/FCCee/CLD/compact/README.md @@ -37,4 +37,9 @@ Overlaps in the Inner and Outer Tracker. CLD_o3_v01 ---------- -This model is based on CLD_o2_v05. The tracker size is reduced to accomodate the ARC detector for PID. \ No newline at end of file +This model is based on CLD_o2_v05. The tracker size is reduced to accomodate the ARC detector for PID. + +CLD_o4_v05 +---------- + +This model is based on CLD_o2_v05. The ECAL barrel is replaced by the Noble Liquid calorimeter from ALLEGRO to enable PandoraPFA technical developments. To accomodate the thicker ALLEGRO calorimeter, the CLD detectors after ECAL were pushed towards higher radius.