diff --git a/.build.ci.sh b/.build.ci.sh index e0b5edb0a0a7e589a43b74b7fafc6e16334476a9..011fd6aec2830f401761aa721d7f205ada99e475 100644 --- a/.build.ci.sh +++ b/.build.ci.sh @@ -2,7 +2,7 @@ # This is wrapper to run the build.sh on CI echo "LCG_RELEASE: ${LCG_RELEASE}" - +echo "CEPCSW_BLDTOOL: ${CEPCSW_BLDTOOL}" buildpid= logfile=mylog.txt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e74e4aedb362cf60ae35d0fd3a4f99f90650774b..3c584234a70003eb0d07a572539ec5e5b70e1655 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,9 +6,9 @@ name: CI on: # Triggers the workflow on push or pull request events but only for the master branch push: - branches: [ master ] + branches: [ master, lcg98 ] pull_request: - branches: [ master ] + branches: [ master, lcg98 ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -21,7 +21,8 @@ jobs: runs-on: self-hosted strategy: matrix: - LCG_RELEASE: [LCG_97, KEY4HEP_STACK] + LCG_RELEASE: [LCG_98, KEY4HEP_STACK] + CEPCSW_BLDTOOL: [make, ninja] # Steps represent a sequence of tasks that will be executed as part of the job steps: @@ -43,4 +44,5 @@ jobs: pwd bash ./.build.ci.sh env: - LCG_RELEASE: ${{strategy.LCG_RELEASE}} + LCG_RELEASE: ${{matrix.LCG_RELEASE}} + CEPCSW_BLDTOOL: ${{matrix.CEPCSW_BLDTOOL}} diff --git a/Analysis/CMakeLists.txt b/Analysis/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..7e666e5bb77e848d9218a4ee66b5018fcd871a94 --- /dev/null +++ b/Analysis/CMakeLists.txt @@ -0,0 +1,3 @@ + +add_subdirectory(TotalInvMass) +add_subdirectory(TrackInspect) diff --git a/Analysis/TotalInvMass/CMakeLists.txt b/Analysis/TotalInvMass/CMakeLists.txt index f51ee995440c5b76114495421ba3bc2fd26b8528..6a9be88ec6a7332efd371b9aa91c4f5a0956623b 100644 --- a/Analysis/TotalInvMass/CMakeLists.txt +++ b/Analysis/TotalInvMass/CMakeLists.txt @@ -1,18 +1,18 @@ -gaudi_subdir(TotalInvMass v0r0) -find_package(CLHEP REQUIRED;CONFIG) -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -find_package(EDM4HEP REQUIRED) -find_package(GEAR REQUIRED) -find_package(GSL REQUIRED ) -find_package(LCIO REQUIRED ) -find_package(podio REQUIRED ) -find_package(k4FWCore REQUIRED) - -set(TotalInvMass_srcs src/TotalInvMass.cc) - -gaudi_add_module(TotalInvMass ${TotalInvMass_srcs} - INCLUDE_DIRS k4FWCore GaudiKernel GaudiAlgLib ${CLHEP_INCLUDE_DIR} DD4hep gear ${GSL_INCLUDE_DIRS} ${LCIO_INCLUDE_DIRS} - LINK_LIBRARIES k4FWCore GaudiKernel GaudiAlgLib ${CLHEP_LIBRARIES} DD4hep ${GEAR_LIBRARIES} ${GSL_LIBRARIES} ${LCIO_LIBRARIES} - EDM4HEP::edm4hep EDM4HEP::edm4hepDict +gaudi_add_module(TotalInvMass + SOURCES src/TotalInvMass.cc + LINK k4FWCore::k4FWCore + Gaudi::GaudiKernel + Gaudi::GaudiAlgLib + ${CLHEP_LIBRARIES} + ${GSL_LIBRARIES} + ${LCIO_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict + ${ROOT_LIBRARIES} ) + +install(TARGETS TotalInvMass + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Analysis/TotalInvMass/src/TotalInvMass.hh b/Analysis/TotalInvMass/src/TotalInvMass.hh index 98a36eeacf870e3728475947e7fb3811ed037cc4..97d48d5ad80a82aa59ab6c3769b04bbae016afd8 100644 --- a/Analysis/TotalInvMass/src/TotalInvMass.hh +++ b/Analysis/TotalInvMass/src/TotalInvMass.hh @@ -2,7 +2,7 @@ #define _TotalInvMass_hh_ #include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiKernel/Property.h" +#include <Gaudi/Property.h> #include "k4FWCore/DataHandle.h" diff --git a/Analysis/TrackInspect/CMakeLists.txt b/Analysis/TrackInspect/CMakeLists.txt index 44a4d4b7d24e54556816793cbb7e0d09f5a2cfe3..fa42c0508250c1fb1f7e7f2afcb68c8452cbe3ce 100644 --- a/Analysis/TrackInspect/CMakeLists.txt +++ b/Analysis/TrackInspect/CMakeLists.txt @@ -1,18 +1,16 @@ -gaudi_subdir(TrackInspect v0r0) - -find_package(EDM4HEP REQUIRED) -find_package(AIDA REQUIRED) -find_package(ROOT REQUIRED) -find_package(CLHEP REQUIRED;CONFIG) - -gaudi_depends_on_subdirs( - Utilities/DataHelper -) - -set(TrackInspect_srcs src/*.cpp) # Modules -gaudi_add_module(TrackInspect ${TrackInspect_srcs} - INCLUDE_DIRS AIDA ROOT - LINK_LIBRARIES DataHelperLib GaudiKernel EDM4HEP ROOT ${CLHEP_LIBRARIES} +gaudi_add_module(TrackInspect + SOURCES src/TrackInspectAlg.cpp + LINK DataHelperLib + Gaudi::GaudiKernel + EDM4HEP::edm4hep + ${ROOT_LIBRARIES} + ${CLHEP_LIBRARIES} ) + +install(TARGETS TrackInspect + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e47f29f1c1614c9b661a6d8c6fad1c0fec9a8c7..88bc141817cee1f1435ed8c8a659002b4580a087 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,19 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0) +CMAKE_MINIMUM_REQUIRED(VERSION 3.15) + +project(CEPCSW) find_package(ROOT COMPONENTS RIO Tree) -find_package(GaudiProject) +find_package(Gaudi) + + +include(GNUInstallDirs) +include(CTest) + +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/InstallArea/ CACHE PATH + "Install path prefix, prepended onto install directories." FORCE ) +endif() # Set up C++ Standard # ``-DCMAKE_CXX_STANDARD=<standard>`` when invoking CMake @@ -12,8 +23,26 @@ if(NOT CMAKE_CXX_STANDARD MATCHES "14|17") message(FATAL_ERROR "Unsupported C++ standard: ${CMAKE_CXX_STANDARD}") endif() +include(cmake/CEPCSWDependencies.cmake) + +add_subdirectory(Analysis) +add_subdirectory(Detector) +add_subdirectory(Digitisers) +add_subdirectory(Examples) +add_subdirectory(Generator) +add_subdirectory(Reconstruction) +add_subdirectory(Service) +add_subdirectory(Simulation) +add_subdirectory(Utilities) + +############################################################################## +# INSTALL +############################################################################## + +install(EXPORT ${PROJECT_NAME}Targets + NAMESPACE ${PROJECT_NAME}:: + FILE "${PROJECT_NAME}Targets.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/" + ) -gaudi_project(CEPCSW v0r1 - USE Gaudi v33r1 - USE k4FWCore v0r1 -) \ No newline at end of file +gaudi_install(CMAKE cmake/${PROJECT_NAME}Config.cmake) diff --git a/Detector/CMakeLists.txt b/Detector/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..be45fff6cab99071fd9915a4452980e4a22b9340 --- /dev/null +++ b/Detector/CMakeLists.txt @@ -0,0 +1,8 @@ + +add_subdirectory(DetCEPCv4) +add_subdirectory(DetCRD) +add_subdirectory(DetDriftChamber) +add_subdirectory(DetEcalMatrix) +add_subdirectory(DetInterface) +add_subdirectory(DetSegmentation) +add_subdirectory(GeomSvc) diff --git a/Detector/DetCEPCv4/CMakeLists.txt b/Detector/DetCEPCv4/CMakeLists.txt index 69bcc73e14484665c6ec628ae20e3fce63c765f3..af544b5a525f85518960a57f679f8d0923a442f7 100644 --- a/Detector/DetCEPCv4/CMakeLists.txt +++ b/Detector/DetCEPCv4/CMakeLists.txt @@ -3,10 +3,6 @@ # Ref to Package: DetFCCeeIDEA # Based on package: lcgeo ################################################################################ -gaudi_subdir(DetCEPCv4 v0r0) - -gaudi_depends_on_subdirs(GaudiKernel) - find_package(DD4hep COMPONENTS DDRec DDG4 DDParsers REQUIRED) # find_package(DD4hep) @@ -18,42 +14,39 @@ include( DD4hep ) find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED) -install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION Detector/DetCEPCv4) - -set(DetCEPCv4_src - src/tracker/VXD04_geo.cpp - src/tracker/FTD_Simple_Staggered_geo.cpp - src/tracker/FTD_cepc_geo.cpp - src/tracker/SIT_Simple_Pixel_geo.cpp - src/tracker/SIT_Simple_Planar_geo.cpp - src/tracker/TPC10_geo.cpp - src/tracker/SET_Simple_Planar_geo.cpp - src/calorimeter/SEcal05_Helpers.cpp - src/calorimeter/SEcal05_Barrel.cpp - src/calorimeter/SEcal05_Endcaps.cpp - src/calorimeter/SEcal05_ECRing.cpp - src/calorimeter/SHcalRpc01_Barrel.cpp - src/calorimeter/SHcalRpc01_Endcaps.cpp - src/calorimeter/SHcalRpc01_EndcapRing.cpp - src/other/BoxSupport_o1_v01_geo.cpp - src/other/TubeSupport_o1_v01_geo.cpp -) +# install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION Detector/DetCEPCv4) gaudi_add_module(DetCEPCv4 - ${DetCEPCv4_src} - INCLUDE_DIRS - # DD4hep - # ROOT - # Geant4 - src/include - LINK_LIBRARIES - # GaudiKernel - #DD4hep - ${DD4hep_COMPONENT_LIBRARIES} - # ROOT - # Geant4 + SOURCES src/tracker/VXD04_geo.cpp + src/tracker/FTD_Simple_Staggered_geo.cpp + src/tracker/FTD_cepc_geo.cpp + src/tracker/SIT_Simple_Pixel_geo.cpp + src/tracker/SIT_Simple_Planar_geo.cpp + src/tracker/TPC10_geo.cpp + src/tracker/SET_Simple_Planar_geo.cpp + src/calorimeter/SEcal05_Helpers.cpp + src/calorimeter/SEcal05_Barrel.cpp + src/calorimeter/SEcal05_Endcaps.cpp + src/calorimeter/SEcal05_ECRing.cpp + src/calorimeter/SHcalRpc01_Barrel.cpp + src/calorimeter/SHcalRpc01_Endcaps.cpp + src/calorimeter/SHcalRpc01_EndcapRing.cpp + src/other/BoxSupport_o1_v01_geo.cpp + src/other/TubeSupport_o1_v01_geo.cpp + + LINK ${DD4hep_COMPONENT_LIBRARIES} ) +target_include_directories(DetCEPCv4 PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>/src/include + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) + set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) message(STATUS "LIBRARY_OUTPUT_PATH -> ${LIBRARY_OUTPUT_PATH}") dd4hep_generate_rootmap(DetCEPCv4) + +install(TARGETS DetCEPCv4 + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Detector/DetCRD/CMakeLists.txt b/Detector/DetCRD/CMakeLists.txt index 3bdd6f88554a66e520204d2350dad67825f3597b..55e3317890aa2f7420ac0b7298a9bcb66b631004 100644 --- a/Detector/DetCRD/CMakeLists.txt +++ b/Detector/DetCRD/CMakeLists.txt @@ -2,10 +2,6 @@ # Package: DetCRD # CEPC Reference Detector (CRD) ################################################################################ -gaudi_subdir(DetCRD v0r0) - -gaudi_depends_on_subdirs(GaudiKernel) - find_package(DD4hep COMPONENTS DDRec DDG4 DDParsers REQUIRED) # find_package(DD4hep) @@ -17,28 +13,20 @@ include( DD4hep ) find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED) -install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION Detector/DetCRD) - -set(DetCRD_src - src/Calorimeter/CRDEcal.cpp - src/Other/CRDBeamPipe_v01_geo.cpp -) +# install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION Detector/DetCRD) gaudi_add_module(DetCRD - ${DetCRD_src} - INCLUDE_DIRS - # DD4hep - # ROOT - # Geant4 - src/include - LINK_LIBRARIES - # GaudiKernel - DD4hep - ${DD4hep_COMPONENT_LIBRARIES} - # ROOT - # Geant4 + SOURCES src/Calorimeter/CRDEcal.cpp + src/Other/CRDBeamPipe_v01_geo.cpp + LINK ${DD4hep_COMPONENT_LIBRARIES} ) set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) message(STATUS "LIBRARY_OUTPUT_PATH -> ${LIBRARY_OUTPUT_PATH}") dd4hep_generate_rootmap(DetCRD) + +install(TARGETS DetCRD + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Detector/DetDriftChamber/CMakeLists.txt b/Detector/DetDriftChamber/CMakeLists.txt index 0c1cc85b2d26105a245427a369270ad4027769a5..fbf8e01ce18666fac8cda6937368dd0fd605c2b2 100644 --- a/Detector/DetDriftChamber/CMakeLists.txt +++ b/Detector/DetDriftChamber/CMakeLists.txt @@ -2,11 +2,6 @@ # Package: DetDriftChamber # Based on package: lcgeo ################################################################################ -gaudi_subdir(DetDriftChamber v0r0) - -gaudi_depends_on_subdirs(Detector/DetSegmentation) -#gaudi_depends_on_subdirs(GaudiKernel) - find_package(DD4hep COMPONENTS DDRec DDG4 DDParsers REQUIRED) find_package(Geant4) @@ -17,22 +12,21 @@ include( DD4hep ) find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED) -install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION Detector/DetDriftChamber) - -set(DetDriftChamber_src - src/driftchamber/DriftChamber.cpp -) +# install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION Detector/DetDriftChamber) gaudi_add_module(DetDriftChamber - ${DetDriftChamber_src} - INCLUDE_DIRS - # DD4hep ROOT Geant4 src/include - LINK_LIBRARIES GaudiKernel DD4hep ROOT DetSegmentation - # GaudiKernel - #DD4hep ${DD4hep_COMPONENT_LIBRARIES} + SOURCES src/driftchamber/DriftChamber.cpp + LINK DetSegmentation + ${DD4hep_COMPONENT_LIBRARIES} # ROOT Geant4 ) set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) message(STATUS "LIBRARY_OUTPUT_PATH -> ${LIBRARY_OUTPUT_PATH}") dd4hep_generate_rootmap(DetDriftChamber) + +install(TARGETS DetDriftChamber + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Detector/DetEcalMatrix/CMakeLists.txt b/Detector/DetEcalMatrix/CMakeLists.txt index 54407d226fed4c44d41a0294e3ac8a8f0ebef1db..10b59035d664eb2c7993dfa818738c2bb2541426 100644 --- a/Detector/DetEcalMatrix/CMakeLists.txt +++ b/Detector/DetEcalMatrix/CMakeLists.txt @@ -2,9 +2,6 @@ # Package: DetEcalMatrix # Based on package: lcgeo ################################################################################ -gaudi_subdir(DetEcalMatrix v0r0) - -gaudi_depends_on_subdirs(GaudiKernel) find_package(DD4hep COMPONENTS DDRec DDG4 DDParsers REQUIRED) @@ -16,22 +13,20 @@ include( DD4hep ) find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED) -install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION Detector/DetEcalMatrix) - -set(DetEcalMatrix_src - src/calorimeter/EcalMatrix.cpp -) - +# TODO: how to handle +# install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/compact DESTINATION Detector/DetEcalMatrix) gaudi_add_module(DetEcalMatrix - ${DetEcalMatrix_src} - INCLUDE_DIRS - # DD4hep ROOT Geant4 src/include - LINK_LIBRARIES - # GaudiKernel - DD4hep ${DD4hep_COMPONENT_LIBRARIES} - # ROOT Geant4 + SOURCES src/calorimeter/EcalMatrix.cpp + LINK ${DD4hep_COMPONENT_LIBRARIES} + # ROOT Geant4 ) set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) message(STATUS "LIBRARY_OUTPUT_PATH -> ${LIBRARY_OUTPUT_PATH}") dd4hep_generate_rootmap(DetEcalMatrix) + +install(TARGETS DetEcalMatrix + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Detector/DetInterface/CMakeLists.txt b/Detector/DetInterface/CMakeLists.txt index 0467315516667b8ae5ba630ab34301d072eeca84..d0365a9acd6a7e27ceaf1005443369c59409040b 100644 --- a/Detector/DetInterface/CMakeLists.txt +++ b/Detector/DetInterface/CMakeLists.txt @@ -1,8 +1,11 @@ ################################################################################ # Package: DetInterface ################################################################################ -gaudi_subdir(DetInterface v1r0) -gaudi_depends_on_subdirs(GaudiKernel) +gaudi_add_header_only_library(DetInterface) -gaudi_install_headers(DetInterface) +install(TARGETS DetInterface + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Detector/DetInterface/DetInterface/IGeomSvc.h b/Detector/DetInterface/include/DetInterface/IGeomSvc.h similarity index 100% rename from Detector/DetInterface/DetInterface/IGeomSvc.h rename to Detector/DetInterface/include/DetInterface/IGeomSvc.h diff --git a/Detector/DetSegmentation/CMakeLists.txt b/Detector/DetSegmentation/CMakeLists.txt index f6b2611e35080a64fdb67ecb30a2e67729a5364b..9b0273348b5b524c7624a6cc1016873e742fce96 100644 --- a/Detector/DetSegmentation/CMakeLists.txt +++ b/Detector/DetSegmentation/CMakeLists.txt @@ -1,33 +1,32 @@ ################################################################################# ##Package : DetSegmentation ################################################################################# -gaudi_subdir(DetSegmentation v1r0) - -gaudi_depends_on_subdirs(GaudiKernel) find_package(DD4hep COMPONENTS DDRec DDG4 DDParsers REQUIRED) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${DD4hep_ROOT}/cmake ) include(DD4hep) -find_package(ROOT COMPONENTS MathCore Physics GenVector Geom REQUIRED) - gaudi_add_library(DetSegmentation - src/*.cpp - INCLUDE_DIRS DD4hep ROOT - LINK_LIBRARIES GaudiKernel DD4hep ROOT ${DD4hep_COMPONENT_LIBRARIES} - PUBLIC_HEADERS DetSegmentation) + SOURCES src/GridDriftChamber.cpp + LINK Gaudi::GaudiKernel + ${DD4hep_COMPONENT_LIBRARIES} + ${ROOT_LIBRARIES} +) gaudi_add_module(DetSegmentationPlugin - src/plugins/*.cpp - INCLUDE_DIRS DD4hep ROOT - LINK_LIBRARIES GaudiKernel DD4hep ROOT ${DD4hep_COMPONENT_LIBRARIES} DetSegmentation) + SOURCES src/plugins/SegmentationFactories.cpp + LINK Gaudi::GaudiKernel + ${ROOT_LIBRARIES} + ${DD4hep_COMPONENT_LIBRARIES} + DetSegmentation) set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}) message(STATUS "LIBRARY_OUTPUT_PATH -> ${LIBRARY_OUTPUT_PATH}") dd4hep_generate_rootmap(DetSegmentationPlugin) -include(CTest) -gaudi_add_test(TestSegmentationPhiEta - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - FRAMEWORK tests/options/phiEtaSegmentation.py) +install(TARGETS DetSegmentation DetSegmentationPlugin + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Detector/DetSegmentation/DetSegmentation/GridDriftChamber.h b/Detector/DetSegmentation/include/DetSegmentation/GridDriftChamber.h similarity index 100% rename from Detector/DetSegmentation/DetSegmentation/GridDriftChamber.h rename to Detector/DetSegmentation/include/DetSegmentation/GridDriftChamber.h diff --git a/Detector/GeomSvc/CMakeLists.txt b/Detector/GeomSvc/CMakeLists.txt index 58c69f7eaec67c8f136f0b002aa676dc5ed84fb1..137aa0e58561f914a5f8b194b5038c11b9f7d308 100644 --- a/Detector/GeomSvc/CMakeLists.txt +++ b/Detector/GeomSvc/CMakeLists.txt @@ -4,31 +4,18 @@ # Desc: implement the IGeomSvc interface. ############################################################################## -gaudi_subdir(GeomSvc v0r0) - -gaudi_depends_on_subdirs( - k4FWCore - Detector/DetInterface -) - -find_package(ROOT COMPONENTS MathCore GenVector Geom Tree) -find_package(DD4hep COMPONENTS DDG4 DDRec REQUIRED) -find_package(GEAR REQUIRED) - -message("GEAR_LIBRARIES: ${GEAR_LIBRARIES}") - gaudi_add_module(GeomSvc - src/GeomSvc.cpp - INCLUDE_DIRS - # DetInterface - # DD4hep - # GaudiKernel - # ROOT - LINK_LIBRARIES - DD4hep + SOURCES src/GeomSvc.cpp + LINK + DetInterface ${DD4hep_COMPONENT_LIBRARIES} - GaudiKernel + Gaudi::GaudiKernel ${GEAR_LIBRARIES} ${ROOT_LIBRARIES} - # ROOT ) + +install(TARGETS GeomSvc + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Detector/GeomSvc/src/GeomSvc.h b/Detector/GeomSvc/src/GeomSvc.h index 7c4207af96982af2e4f4055b07d5b4f67ee6cc2b..20d559a790c47c5f928d8db4a094f97b8cbeded7 100644 --- a/Detector/GeomSvc/src/GeomSvc.h +++ b/Detector/GeomSvc/src/GeomSvc.h @@ -57,9 +57,9 @@ private: dd4hep::Detector* m_dd4hep_geo; - gear::ZPlanarParametersImpl* m_vxdParameters; - dd4hep::rec::ZPlanarData* m_vxdData; - dd4hep::rec::ConicalSupportData* m_beamPipeData; + gear::ZPlanarParametersImpl* m_vxdParameters{nullptr}; + dd4hep::rec::ZPlanarData* m_vxdData{nullptr}; + dd4hep::rec::ConicalSupportData* m_beamPipeData{nullptr}; //gear::GearParametersImpl* m_vxdInfra; std::map<std::string, std::map<std::string,double> > m_detParameters; diff --git a/Digitisers/CMakeLists.txt b/Digitisers/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..6f6f2e40403e248ab60d5ab5ddbe435334b0c29d --- /dev/null +++ b/Digitisers/CMakeLists.txt @@ -0,0 +1,4 @@ +add_subdirectory(DCHDigi) +add_subdirectory(G2CDArbor) +add_subdirectory(SimHitMerge) +add_subdirectory(SimpleDigi) diff --git a/Digitisers/DCHDigi/CMakeLists.txt b/Digitisers/DCHDigi/CMakeLists.txt index fa9dc143874c99b4550a6f7f259e0a962507bae6..8246da79bab1c211208b1f8ca28f5e117d564668 100644 --- a/Digitisers/DCHDigi/CMakeLists.txt +++ b/Digitisers/DCHDigi/CMakeLists.txt @@ -1,25 +1,19 @@ -gaudi_subdir(DCHDigi v0r0) - -find_package(CLHEP REQUIRED;CONFIG) -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -find_package(EDM4HEP REQUIRED ) -include_directories(${EDM4HEP_INCLUDE_DIR}) - -find_package(podio REQUIRED ) -find_package(ROOT COMPONENTS MathCore Physics GenVector Geom REQUIRED) - -set(srcs - src/*.cpp -) - -gaudi_depends_on_subdirs( - Detector/DetInterface - Detector/DetSegmentation -) ## Modules -gaudi_add_module(DCHDigi ${srcs} - INCLUDE_DIRS k4FWCore GaudiKernel GaudiAlgLib ${CLHEP_INCLUDE_DIR} DD4hep ROOT - LINK_LIBRARIES k4FWCore GaudiKernel GaudiAlgLib ${CLHEP_LIBRARIES} DD4hep ${DD4hep_COMPONENT_LIBRARIES} DDRec ROOT DetSegmentation - -Wl,--no-as-needed - EDM4HEP::edm4hep EDM4HEP::edm4hepDict +gaudi_add_module(DCHDigi + SOURCES src/DCHDigiAlg.cpp + LINK DetInterface + DetSegmentation + k4FWCore::k4FWCore + Gaudi::GaudiKernel + Gaudi::GaudiAlgLib + ${CLHEP_LIBRARIES} + ${DD4hep_COMPONENT_LIBRARIES} + ${ROOT_LIBRARIES} + DetSegmentation + EDM4HEP::edm4hep EDM4HEP::edm4hepDict ) +install(TARGETS DCHDigi + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Digitisers/G2CDArbor/CMakeLists.txt b/Digitisers/G2CDArbor/CMakeLists.txt index cbc70cd8ea041643734cd2e337dbb12516718e1b..cc6bf3892ef7ebbff268e2f9560acc8609699fbe 100644 --- a/Digitisers/G2CDArbor/CMakeLists.txt +++ b/Digitisers/G2CDArbor/CMakeLists.txt @@ -1,28 +1,20 @@ -gaudi_subdir(G2CDArbor v0r0) - -find_package(CLHEP REQUIRED;CONFIG) -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -find_package(EDM4HEP REQUIRED) -find_package(GEAR REQUIRED) -find_package(GSL REQUIRED ) -find_package(LCIO REQUIRED ) -find_package(podio REQUIRED ) -find_package(k4FWCore REQUIRED) - -message("EDM4HEP_INCLUDE_DIRS: ${EDM4HEP_INCLUDE_DIR}") -message("EDM4HEP_LIB: ${EDM4HEP_LIBRARIES}") -include_directories(${EDM4HEP_INCLUDE_DIR}) - -gaudi_depends_on_subdirs( - Service/GearSvc - Detector/DetInterface -) - -set(G2CDArbor_srcs src/*.cpp) - # Modules -gaudi_add_module(G2CDArbor ${G2CDArbor_srcs} - INCLUDE_DIRS k4FWCore GaudiKernel GaudiAlgLib ${CLHEP_INCLUDE_DIR} DD4hep gear ${GSL_INCLUDE_DIRS} ${LCIO_INCLUDE_DIRS} - LINK_LIBRARIES k4FWCore GaudiKernel GaudiAlgLib ${CLHEP_LIBRARIES} DD4hep ${GEAR_LIBRARIES} ${GSL_LIBRARIES} ${LCIO_LIBRARIES} - EDM4HEP::edm4hep EDM4HEP::edm4hepDict +gaudi_add_module(G2CDArbor + SOURCES src/G2CDArborAlg.cpp + LINK k4FWCore::k4FWCore + GearSvc + DetInterface + Gaudi::GaudiKernel + Gaudi::GaudiAlgLib + ${CLHEP_LIBRARIES} + ${GEAR_LIBRARIES} + ${GSL_LIBRARIES} + ${LCIO_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict ) +install(TARGETS G2CDArbor + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) + diff --git a/Digitisers/G2CDArbor/src/G2CDArborAlg.h b/Digitisers/G2CDArbor/src/G2CDArborAlg.h index 4c9a1985d9da20adc45733d5dbd4fc37043dd1de..910675c9e930e4b3fe9a3c8390604898bf8dfaf2 100644 --- a/Digitisers/G2CDArbor/src/G2CDArborAlg.h +++ b/Digitisers/G2CDArbor/src/G2CDArborAlg.h @@ -3,7 +3,7 @@ #include "k4FWCore/DataHandle.h" #include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiKernel/Property.h" +#include "Gaudi/Property.h" #include "edm4hep/EventHeader.h" #include "edm4hep/EventHeaderCollection.h" #include "edm4hep/SimCalorimeterHitConst.h" diff --git a/Digitisers/SimHitMerge/CMakeLists.txt b/Digitisers/SimHitMerge/CMakeLists.txt index 680d80a9dde0329eb068a9b6fd913654495809be..4c89a1b84a5878fc6862bc1bf81e750551a2c7ed 100644 --- a/Digitisers/SimHitMerge/CMakeLists.txt +++ b/Digitisers/SimHitMerge/CMakeLists.txt @@ -1,20 +1,18 @@ -gaudi_subdir(SimHitMergeAlg v0r0) - -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -find_package(EDM4HEP REQUIRED) -find_package(podio REQUIRED ) -find_package(k4FWCore REQUIRED) - -include_directories(${EDM4HEP_INCLUDE_DIR}) - -gaudi_depends_on_subdirs( - Detector/DetInterface -) -set(SimHitMergeAlg_srcs src/*.cpp) # Modules -gaudi_add_module(SimHitMerge ${SimHitMergeAlg_srcs} - INCLUDE_DIRS k4FWCore GaudiKernel GaudiAlgLib DD4hep - LINK_LIBRARIES k4FWCore GaudiKernel GaudiAlgLib DD4hep DDRec - EDM4HEP::edm4hep EDM4HEP::edm4hepDict +gaudi_add_module(SimHitMerge + SOURCES src/SimHitMergeAlg.cpp + LINK DetInterface + k4FWCore::k4FWCore + Gaudi::GaudiKernel + Gaudi::GaudiAlgLib + ${DD4hep_COMPONENT_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict ) + +install(TARGETS SimHitMerge + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) + diff --git a/Digitisers/SimHitMerge/src/SimHitMergeAlg.h b/Digitisers/SimHitMerge/src/SimHitMergeAlg.h index 8bded1c038538fdf346c858b4bdfe55c7796a8db..d91de40f0a111a99d9c0ca36f2e9177703e8ff96 100644 --- a/Digitisers/SimHitMerge/src/SimHitMergeAlg.h +++ b/Digitisers/SimHitMerge/src/SimHitMergeAlg.h @@ -3,7 +3,7 @@ #include "k4FWCore/DataHandle.h" #include "GaudiAlg/GaudiAlgorithm.h" -#include "GaudiKernel/Property.h" +#include "Gaudi/Property.h" #include "edm4hep/EventHeader.h" #include "edm4hep/EventHeaderCollection.h" #include "edm4hep/SimCalorimeterHitConst.h" diff --git a/Digitisers/SimpleDigi/CMakeLists.txt b/Digitisers/SimpleDigi/CMakeLists.txt index 052a27dfcf36b9fbc09f222a46ae20f5afdf96f4..4e2687bc123eeb14f5b013af3cf0461ec48605db 100644 --- a/Digitisers/SimpleDigi/CMakeLists.txt +++ b/Digitisers/SimpleDigi/CMakeLists.txt @@ -1,24 +1,24 @@ -gaudi_subdir(SimpleDigi v0r0) - -find_package(CLHEP REQUIRED;CONFIG) -find_package(GEAR REQUIRED) -find_package(GSL REQUIRED ) -find_package(LCIO REQUIRED ) -find_package(podio REQUIRED ) -find_package(k4FWCore REQUIRED) -find_package(EDM4HEP REQUIRED) - -gaudi_depends_on_subdirs( - Service/GearSvc - Service/EventSeeder - Service/TrackSystemSvc - Utilities/DataHelper -) - -set(SimpleDigi_srcs src/*.cpp) - # Modules -gaudi_add_module(SimpleDigi ${SimpleDigi_srcs} - INCLUDE_DIRS k4FWCore GaudiKernel GaudiAlgLib ${CLHEP_INCLUDE_DIR} gear ${GSL_INCLUDE_DIRS} ${LCIO_INCLUDE_DIRS} - LINK_LIBRARIES k4FWCore GaudiKernel GaudiAlgLib ${CLHEP_LIBRARIES} ${GEAR_LIBRARIES} ${GSL_LIBRARIES} ${LCIO_LIBRARIES} EDM4HEP::edm4hep EDM4HEP::edm4hepDict DataHelperLib +gaudi_add_module(SimpleDigi + SOURCES src/PlanarDigiAlg.cpp + src/TPCDigiAlg.cpp + src/voxel.cpp + LINK GearSvc + EventSeeder + TrackSystemSvcLib + DataHelperLib + k4FWCore::k4FWCore + Gaudi::GaudiKernel + Gaudi::GaudiAlgLib + ${CLHEP_LIBRARIES} + ${GEAR_LIBRARIES} + ${GSL_LIBRARIES} + ${LCIO_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict ) + +install(TARGETS SimpleDigi + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt index e11457877fd94d615f12dcf8d5f7bd7388f91c24..9c00a9eaa78745d8e3ddac59f1377379e7d3db6b 100644 --- a/Examples/CMakeLists.txt +++ b/Examples/CMakeLists.txt @@ -1,58 +1,29 @@ - -gaudi_subdir(Examples v0r0) - -find_package(podio REQUIRED) -#find_package(plcio REQUIRED) -find_package(LCIO REQUIRED) -find_package(EDM4HEP REQUIRED) -find_package(k4FWCore REQUIRED) -find_package(DD4hep COMPONENTS DDRec DDParsers REQUIRED) - -gaudi_depends_on_subdirs( - Detector/DetInterface -) - -set(Examples_srcs - src/HelloWorld/*.cpp - src/FirstSvc/*.cpp - src/SecondAlg/*.cpp - # src/PlcioTest/*.cpp - src/Edm4hepTest/*.cpp - src/DumpIDAlg/*.cpp -) - # Headers and Libraries -gaudi_install_headers(Examples) - # Modules -gaudi_add_module(Examples ${Examples_srcs} - INCLUDE_DIRS k4FWCore GaudiAlgLib GaudiKernel ${podio_INCLUDE_DIRS} ${LCIO_INCLUDE_DIRS} - LINK_LIBRARIES k4FWCore GaudiAlgLib GaudiKernel ${LCIO_LIBRARIES} - DD4hep ${DD4hep_COMPONENT_LIBRARIES} - # Force loading the libraries. - -Wl,--no-as-needed EDM4HEP::edm4hep EDM4HEP::edm4hepDict ${podio_LIBRARIES} podio::podioRootIO -Wl,--as-needed +gaudi_add_module(Examples + SOURCES src/HelloWorld/HelloAlg.cpp + src/FirstSvc/FirstSvc.cpp + src/SecondAlg/SecondAlg.cpp + src/Edm4hepTest/Edm4hepReadAlg.cpp + src/Edm4hepTest/Edm4hepReadDCAlg.cpp + src/Edm4hepTest/Edm4hepWriteAlg.cpp + src/DumpIDAlg/DumpIDAlg.cpp + LINK DetInterface + k4FWCore::k4FWCore + Gaudi::GaudiAlgLib Gaudi::GaudiKernel + ${LCIO_LIBRARIES} + ${DD4hep_COMPONENT_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict + ${podio_LIBRARIES} podio::podioRootIO ) -# Unit tests -gaudi_add_test(HelloAlg - FRAMEWORK options/helloalg.py) - -gaudi_add_test(SecondAlg - FRAMEWORK options/secondalg.py) - -gaudi_add_test(PlcioWriteAlg - FRAMEWORK options/plcio_write.py) - -gaudi_add_test(PlcioReadAlg - FRAMEWORK options/plcio_read.py) - -gaudi_add_test(Edm4hepWriteAlg - FRAMEWORK options/edm4hep_write.py) - -gaudi_add_test(Edm4hepReadAlg - FRAMEWORK options/edm4hep_read.py) - -gaudi_add_test(LCIOReadAlg - FRAMEWORK options/LCIO_read.py) +target_include_directories(Examples PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>/include + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) +install(TARGETS Examples + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Examples/Examples/IFirstSvc.h b/Examples/include/Examples/IFirstSvc.h similarity index 100% rename from Examples/Examples/IFirstSvc.h rename to Examples/include/Examples/IFirstSvc.h diff --git a/Examples/options/tut_detsim_SDT.py b/Examples/options/tut_detsim_SDT.py index 4aa215871c5357e1ba5099a9d73ef7327b817cbc..d040cbd404134e03eda3f52604e6dcf3eb3b0e0b 100644 --- a/Examples/options/tut_detsim_SDT.py +++ b/Examples/options/tut_detsim_SDT.py @@ -36,7 +36,7 @@ dsvc = k4DataSvc("EventDataSvc") geometry_option = "det.xml" if not os.getenv("DETDRIFTCHAMBERROOT"): - print("Can't find the geometry. Please setup envvar DETCEPCV4ROOT." ) + print("Can't find the geometry. Please setup envvar DETDRIFTCHAMBERROOT." ) sys.exit(-1) geometry_path = os.path.join(os.getenv("DETDRIFTCHAMBERROOT"), "compact", geometry_option) diff --git a/Examples/src/HelloWorld/HelloAlg.h b/Examples/src/HelloWorld/HelloAlg.h index 9c689ca91c4363403285348c14d378aa0cf56054..357ac4f8e3a1ae41f0112a52ae46d577cf04dcc0 100644 --- a/Examples/src/HelloWorld/HelloAlg.h +++ b/Examples/src/HelloWorld/HelloAlg.h @@ -2,7 +2,7 @@ #define HelloAlg_h #include <GaudiKernel/Algorithm.h> -#include "GaudiKernel/Property.h" +#include <Gaudi/Property.h> class HelloAlg: public Algorithm { public: diff --git a/Examples/src/SecondAlg/SecondAlg.h b/Examples/src/SecondAlg/SecondAlg.h index e96306c826dc503a2c6c6cc3f11b74608ca81baf..9026b0b37425b2b0dd480f9f0363b59f4046fff2 100644 --- a/Examples/src/SecondAlg/SecondAlg.h +++ b/Examples/src/SecondAlg/SecondAlg.h @@ -2,7 +2,7 @@ #define SecondAlg_h #include <GaudiKernel/Algorithm.h> -#include <GaudiKernel/Property.h> +#include <Gaudi/Property.h> #include "Examples/IFirstSvc.h" diff --git a/Generator/CMakeLists.txt b/Generator/CMakeLists.txt index 7eb4c9ca590664ef22db4ec00c5834c3c804ced8..0a244a3aa61afe39e9c8fa48ab7344a5866db4de 100644 --- a/Generator/CMakeLists.txt +++ b/Generator/CMakeLists.txt @@ -1,61 +1,34 @@ ######################################## -gaudi_subdir(Generator v0r0) -set(GenAlgo_srcs - src/IGenTool.cpp - src/GenAlgo.cpp - src/GenEvent.cpp - src/GenReader.cpp - src/StdHepRdr.cpp - src/GenPrinter.cpp - # src/LCAscHepRdr.cc - # src/HepevtRdr.cpp - src/SLCIORdr.cpp - src/HepMCRdr.cpp - src/GtGunTool.cpp -) -set(GenAlgo_incs src) find_package(Geant4 REQUIRED) include(${Geant4_USE_FILE}) -find_package(ROOT COMPONENTS RIO Tree TreePlayer MathCore Net Graf3d Graf Gpad EG REQUIRED) -find_package(LCIO) -find_package(podio) -find_package(EDM4HEP) -find_package(HepMC) -find_package(CLHEP REQUIRED;CONFIG) -find_package(k4FWCore REQUIRED) - -if(ROOT_FOUND) - message("found ROOT: ${ROOT_INCLUDE_DIRS} ${ROOT_LIBRARIES}") -endif(ROOT_FOUND) -if(LCIO_FOUND) - message("found LCIO: ${LCIO_INCLUDE_DIRS} ${LCIO_LIBRARIES}") -endif(LCIO_FOUND) -if(podio_FOUND) - message("found podio: ${podio_INCLUDE_DIRS} ${podio_LIBRARIES}") -endif(podio_FOUND) -if(HepMC_FOUND) - message("found HepMC: ${HepMC_INCLUDE_DIRS} ${HepMC_LIBRARY_DIR}") -endif(HepMC_FOUND) -if(CLHEP_FOUND) - message("found CLHEP: ${CLHEP_INCLUDE_DIRS} ${CLHEP_LIBRARY_DIR}") -endif(CLHEP_FOUND) -############## for producing plcio library ############# -INCLUDE_DIRECTORIES(${GenAlgo_incs}) +gaudi_add_module(GenAlgo + SOURCES src/IGenTool.cpp + src/GenAlgo.cpp + src/GenEvent.cpp + src/GenReader.cpp + src/StdHepRdr.cpp + src/GenPrinter.cpp + # src/LCAscHepRdr.cc + # src/HepevtRdr.cpp + src/SLCIORdr.cpp + src/HepMCRdr.cpp + src/GtGunTool.cpp -gaudi_add_module(GenAlgo ${GenAlgo_srcs} - INCLUDE_DIRS - k4FWCore - LINK_LIBRARIES - ROOT - k4FWCore - GaudiAlgLib GaudiKernel - HepMC - CLHEP - LCIO - EDM4HEP::edm4hep EDM4HEP::edm4hepDict - ) -#gaudi_add_test(Reader FRAMEWORK options/read.py) + LINK ${ROOT_LIBRARIES} + k4FWCore::k4FWCore + Gaudi::GaudiAlgLib + Gaudi::GaudiKernel + ${HEPMC_LIBRARIES} + ${CLHEP_LIBRARIES} + ${LCIO_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict + ROOT::EG +) -########################### +install(TARGETS GenAlgo + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Generator/src/GenAlgo.h b/Generator/src/GenAlgo.h index cd26745385eae2dcc7270ceee205d65678da7372..2eb6ac616f0a54f9acca641d197016b0fadf6b1f 100644 --- a/Generator/src/GenAlgo.h +++ b/Generator/src/GenAlgo.h @@ -3,7 +3,7 @@ #include <GaudiKernel/Algorithm.h> -#include "GaudiKernel/Property.h" +#include <Gaudi/Property.h> #include <GaudiKernel/ToolHandle.h> #include "GaudiAlg/GaudiAlgorithm.h" diff --git a/Generator/src/GtGunTool.h b/Generator/src/GtGunTool.h index 0c62f4c386a34ad5468a99052998d4f04cda0611..fa4f887007a824d63445cbe940369f48e237b6b6 100644 --- a/Generator/src/GtGunTool.h +++ b/Generator/src/GtGunTool.h @@ -12,7 +12,7 @@ */ #include <GaudiKernel/AlgTool.h> -#include <GaudiKernel/Property.h> +#include <Gaudi/Property.h> #include "IGenTool.h" #include <vector> diff --git a/README.md b/README.md index 38d12a14f9f6ce83b206b1bec33c4ff17edc85ff..a438dd0d99cf5f83501fe0152baf3482d4efd3c0 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,7 @@ CEPC offline software prototype based on [Key4hep](https://github.com/key4hep). ## Quick start -Start an SL6 container in lxslc7 (OS: CentOS7): -``` -$ /cvmfs/container.ihep.ac.cn/bin/hep_container shell SL6 -``` +SSH to lxslc7 (CentOS 7). Before run following commands, please make sure you setup the CVMFS: diff --git a/Reconstruction/CMakeLists.txt b/Reconstruction/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..e506b90c7c3096915bb1d881d3109984958fa517 --- /dev/null +++ b/Reconstruction/CMakeLists.txt @@ -0,0 +1,5 @@ +add_subdirectory(DCHDedx) +add_subdirectory(Digi_Calo) +add_subdirectory(PFA) +add_subdirectory(SiliconTracking) +add_subdirectory(Tracking) diff --git a/Reconstruction/DCHDedx/CMakeLists.txt b/Reconstruction/DCHDedx/CMakeLists.txt index 3167363915e71288cd35e089f94e250e7c49da8f..3303351eb6232aa252044695fe6228d6a93208d4 100644 --- a/Reconstruction/DCHDedx/CMakeLists.txt +++ b/Reconstruction/DCHDedx/CMakeLists.txt @@ -1,26 +1,19 @@ -gaudi_subdir(DCHDedx v0r0) - -find_package(EDM4HEP REQUIRED ) -find_package(DD4hep COMPONENTS DDCore DDRec REQUIRED) - - -gaudi_depends_on_subdirs( - k4FWCore - Simulation/DetSimInterface - Detector/DetInterface - Detector/DetSegmentation -) - -set(srcs - src/*.cpp -) # Modules -gaudi_add_module(DCHDedx ${srcs} - INCLUDE_DIRS GaudiKernel - LINK_LIBRARIES GaudiAlgLib GaudiKernel - DetSegmentation - -Wl,--no-as-needed - EDM4HEP::edm4hep EDM4HEP::edm4hepDict - -Wl,--as-needed +gaudi_add_module(DCHDedx + SOURCES src/RecDCHDedxAlg.cpp + LINK DetSimInterface + DetInterface + DetSegmentation + k4FWCore::k4FWCore + Gaudi::GaudiAlgLib + Gaudi::GaudiKernel + DetSegmentation + EDM4HEP::edm4hep EDM4HEP::edm4hepDict ) + +install(TARGETS DCHDedx + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Reconstruction/Digi_Calo/CMakeLists.txt b/Reconstruction/Digi_Calo/CMakeLists.txt index 179346ca39c4764bab67a382633635546a35e9a2..e3c5b9d4686d117ec7489f90011acc324af150bf 100644 --- a/Reconstruction/Digi_Calo/CMakeLists.txt +++ b/Reconstruction/Digi_Calo/CMakeLists.txt @@ -1,26 +1,18 @@ -gaudi_subdir(Digi_Calo v0r0) -find_package(CLHEP REQUIRED;CONFIG) -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -find_package(EDM4HEP REQUIRED ) -message("EDM4HEP_INCLUDE_DIRS: ${EDM4HEP_INCLUDE_DIR}") -message("EDM4HEP_LIB: ${EDM4HEP_LIBRARIES}") -include_directories(${EDM4HEP_INCLUDE_DIR}) - -find_package(CLHEP REQUIRED) -find_package(podio REQUIRED ) - -set(srcs - src/*.cpp -) - -gaudi_depends_on_subdirs( - Detector/DetInterface -) ## Modules -gaudi_add_module(Digi_Calo ${srcs} - INCLUDE_DIRS k4FWCore GaudiKernel GaudiAlgLib ${CLHEP_INCLUDE_DIR} DD4hep - LINK_LIBRARIES k4FWCore GaudiKernel GaudiAlgLib ${CLHEP_LIBRARIES} DD4hep ${DD4hep_COMPONENT_LIBRARIES} DDRec - -Wl,--no-as-needed - EDM4HEP::edm4hep EDM4HEP::edm4hepDict +gaudi_add_module(Digi_Calo + SOURCES src/CaloDigiAlg.cpp + LINK DetInterface + k4FWCore::k4FWCore + Gaudi::GaudiKernel + Gaudi::GaudiAlgLib + ${CLHEP_LIBRARIES} + ${DD4hep_COMPONENT_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict ) +install(TARGETS Digi_Calo + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) + diff --git a/Reconstruction/PFA/CMakeLists.txt b/Reconstruction/PFA/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..b3a1b42645d41829b472ce79e403cb99e0aa26d5 --- /dev/null +++ b/Reconstruction/PFA/CMakeLists.txt @@ -0,0 +1,2 @@ + +add_subdirectory(Pandora) diff --git a/Reconstruction/PFA/Pandora/CMakeLists.txt b/Reconstruction/PFA/Pandora/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..ea3f290b015f21bdd64fcaa56459853c88f7578e --- /dev/null +++ b/Reconstruction/PFA/Pandora/CMakeLists.txt @@ -0,0 +1,3 @@ + +add_subdirectory(GaudiPandora) +add_subdirectory(MatrixPandora) diff --git a/Reconstruction/PFA/Pandora/GaudiPandora/CMakeLists.txt b/Reconstruction/PFA/Pandora/GaudiPandora/CMakeLists.txt index 7b07fd673ed3592ae2e2200aa34960666cca55d9..80307e39ad0df371f0a6fd107cf04155a8571136 100644 --- a/Reconstruction/PFA/Pandora/GaudiPandora/CMakeLists.txt +++ b/Reconstruction/PFA/Pandora/GaudiPandora/CMakeLists.txt @@ -1,48 +1,36 @@ -gaudi_subdir(GaudiPandora v0r0) -find_package(LCIO REQUIRED ) -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -find_package(GEAR REQUIRED) -find_package(CLHEP REQUIRED;CONFIG) -message("ENV GEAR: $ENV{GEAR}") - -find_package(EDM4HEP REQUIRED ) -include_directories(${EDM4HEP_INCLUDE_DIR}) - -find_package(PandoraSDK REQUIRED ) -include_directories(${PandoraSDK_INCLUDE_DIRS}) -link_libraries(${PandoraSDK_LIBRARIES}) -find_package(LCContent REQUIRED ) -include_directories(${LCContent_INCLUDE_DIRS}) -link_libraries(${LCContent_LIBRARIES}) - - -find_package(ROOT COMPONENTS MathCore Physics GenVector Geom REQUIRED) - - -gaudi_depends_on_subdirs( - Service/EventSeeder - Service/GearSvc - Utilities/DataHelper - Detector/DetInterface +# Modules +gaudi_add_module(GaudiPandora + SOURCES src/PandoraPFAlg.cpp + src/MCParticleCreator.cpp + src/GeometryCreator.cpp + src/CaloHitCreator.cpp + src/TrackCreator.cpp + src/PfoCreator.cpp + src/Utility.cpp + LINK EventSeeder + GearSvc + DataHelperLib + DetInterface + Gaudi::GaudiKernel + k4FWCore::k4FWCore + ${PandoraSDK_LIBRARIES} + ${LCContent_LIBRARIES} + ${CLHEP_LIBRARIES} + ${ROOT_LIBRARIES} + ${LCIO_LIBRARIES} + ${GEAR_LIBRARIES} + ${DD4hep_COMPONENT_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict ) -set(dir_srcs - src/PandoraPFAlg.cpp - src/MCParticleCreator.cpp - src/GeometryCreator.cpp - src/CaloHitCreator.cpp - src/TrackCreator.cpp - src/PfoCreator.cpp - src/Utility.cpp -) -set(dir_include include) -# Modules -gaudi_add_module(GaudiPandora ${dir_srcs} - INCLUDE_DIRS ${dir_include} GaudiKernel k4FWCore CLHEP ${LCIO_INCLUDE_DIRS} ROOT gear DD4hep - LINK_LIBRARIES GaudiKernel k4FWCore CLHEP ROOT ${LCIO_LIBRARIES} ${GEAR_LIBRARIES} DataHelperLib DD4hep ${DD4hep_COMPONENT_LIBRARIES} DDRec - -Wl,--no-as-needed - EDM4HEP::edm4hep EDM4HEP::edm4hepDict - -Wl,--as-needed +target_include_directories(GaudiPandora PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>/include + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) + +install(TARGETS GaudiPandora + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) -) diff --git a/Reconstruction/PFA/Pandora/MatrixPandora/CMakeLists.txt b/Reconstruction/PFA/Pandora/MatrixPandora/CMakeLists.txt index 16cd82d27ec2a26c0860ea72fbde7170b28d7515..84ba59b342928ec9b6819285eb2aad4c8a265788 100644 --- a/Reconstruction/PFA/Pandora/MatrixPandora/CMakeLists.txt +++ b/Reconstruction/PFA/Pandora/MatrixPandora/CMakeLists.txt @@ -1,45 +1,34 @@ -gaudi_subdir(MatrixPandora v0r0) - -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -find_package(CLHEP REQUIRED;CONFIG) -find_package(LCIO REQUIRED ) -find_package(GEAR REQUIRED) -find_package(EDM4HEP REQUIRED ) -include_directories(${EDM4HEP_INCLUDE_DIR}) - -find_package(PandoraSDK REQUIRED ) -find_package(LCContent REQUIRED ) -include_directories(${PandoraSDK_INCLUDE_DIRS}) -link_libraries(${PandoraSDK_LIBRARIES}) -include_directories(${LCContent_INCLUDE_DIRS}) -link_libraries(${LCContent_LIBRARIES}) - - -list(APPEND CMAKE_MODULE_PATH "$ENV{ROOTSYS}/etc/cmake/") -find_package(ROOT 5.26.00 REQUIRED COMPONENTS Eve Geom RGL EG) +# Modules +gaudi_add_module(MatrixPandora + SOURCES src/PandoraMatrixAlg.cpp + src/MCParticleCreator.cpp + src/GeometryCreator.cpp + src/CaloHitCreator.cpp + src/TrackCreator.cpp + src/PfoCreator.cpp + LINK EventSeeder + GearSvc + DetInterface + DataHelperLib + Gaudi::GaudiKernel + k4FWCore::k4FWCore + ${PandoraSDK_LIBRARIES} + ${LCContent_LIBRARIES} + ${CLHEP_LIBRARIES} + ${ROOT_LIBRARIES} + ${LCIO_LIBRARIES} + ${GEAR_LIBRARIES} + ${DD4hep_COMPONENT_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict +) +target_include_directories(MatrixPandora PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>/include + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) -gaudi_depends_on_subdirs( - Service/EventSeeder - Service/GearSvc - Detector/DetInterface - Utilities/DataHelper -) +install(TARGETS MatrixPandora + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) -set(dir_srcs - src/PandoraMatrixAlg.cpp - src/MCParticleCreator.cpp - src/GeometryCreator.cpp - src/CaloHitCreator.cpp - src/TrackCreator.cpp - src/PfoCreator.cpp -) -set(dir_include include) -# Modules -gaudi_add_module(MatrixPandora ${dir_srcs} - INCLUDE_DIRS ${dir_include} GaudiKernel k4FWCore ${CLHEP_INCLUDE_DIR} ${LCIO_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} gear DD4hep - LINK_LIBRARIES GaudiKernel k4FWCore ${CLHEP_LIBRARIES} ROOT ${LCIO_LIBRARIES} ${GEAR_LIBRARIES} DD4hep ${DD4hep_COMPONENT_LIBRARIES} DDRec DataHelperLib - -Wl,--no-as-needed - EDM4HEP::edm4hep EDM4HEP::edm4hepDict - -Wl,--as-needed -) diff --git a/Reconstruction/SiliconTracking/CMakeLists.txt b/Reconstruction/SiliconTracking/CMakeLists.txt index 32864bf2a894d7efb3525f3d92fd1871742a189e..9eb87350466e1836ee641b685b1a9ac24e084126 100644 --- a/Reconstruction/SiliconTracking/CMakeLists.txt +++ b/Reconstruction/SiliconTracking/CMakeLists.txt @@ -1,23 +1,23 @@ -gaudi_subdir(SiliconTracking v0r0) - -find_package(GEAR REQUIRED) -find_package(GSL REQUIRED ) -find_package(LCIO REQUIRED ) -find_package(EDM4HEP REQUIRED ) -find_package(DD4hep COMPONENTS DDCore DDRec REQUIRED) - -gaudi_depends_on_subdirs( - Service/GearSvc - Service/EventSeeder - Service/TrackSystemSvc - Utilities/DataHelper - Utilities/KiTrack -) - -set(SiliconTracking_srcs src/*.cpp) # Modules -gaudi_add_module(SiliconTracking ${SiliconTracking_srcs} - INCLUDE_DIRS GaudiKernel k4FWCore gear ${GSL_INCLUDE_DIRS} ${LCIO_INCLUDE_DIRS} - LINK_LIBRARIES TrackSystemSvcLib DataHelperLib KiTrackLib GaudiKernel k4FWCore ${GEAR_LIBRARIES} ${GSL_LIBRARIES} ${LCIO_LIBRARIES} +gaudi_add_module(SiliconTracking + SOURCES src/ForwardTrackingAlg.cpp + src/SiliconTrackingAlg.cpp + src/SpacePointBuilderAlg.cpp + src/TrackSubsetAlg.cpp + LINK GearSvc + EventSeeder + TrackSystemSvcLib + DataHelperLib + KiTrackLib + Gaudi::GaudiKernel + k4FWCore::k4FWCore + ${GEAR_LIBRARIES} + ${GSL_LIBRARIES} + ${LCIO_LIBRARIES} ) +install(TARGETS SiliconTracking + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Reconstruction/Tracking/CMakeLists.txt b/Reconstruction/Tracking/CMakeLists.txt index 166add75f15af42d8d3bdb8ee087fc3553108192..3dd11b3332d73041ae8ca50f21bd48012423c9cd 100644 --- a/Reconstruction/Tracking/CMakeLists.txt +++ b/Reconstruction/Tracking/CMakeLists.txt @@ -1,31 +1,29 @@ -gaudi_subdir(Tracking v0r0) -find_package(GEAR REQUIRED) -find_package(GSL REQUIRED ) -find_package(LCIO REQUIRED ) -find_package(EDM4HEP REQUIRED ) -find_package(DD4hep COMPONENTS DDCore DDRec REQUIRED) - - -gaudi_depends_on_subdirs( - Service/GearSvc - Service/EventSeeder - Service/TrackSystemSvc - Detector/DetSegmentation +# Modules +gaudi_add_module(Tracking + SOURCES src/Clupatra/ClupatraAlg.cpp + src/Clupatra/clupatra_new.cpp + src/FullLDCTracking/FullLDCTrackingAlg.cpp + src/TruthTracker/TruthTrackerAlg.cpp + LINK GearSvc + EventSeeder + TrackSystemSvcLib + DetSegmentation + Gaudi::GaudiAlgLib + Gaudi::GaudiKernel + ${GEAR_LIBRARIES} + ${GSL_LIBRARIES} + ${LCIO_LIBRARIES} + DetSegmentation + EDM4HEP::edm4hep EDM4HEP::edm4hepDict ) -set(Tracking_srcs - src/Clupatra/*.cpp - src/FullLDCTracking/*.cpp - src/TruthTracker/*.cpp -) +target_include_directories(Tracking PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>/include + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) -# Modules -gaudi_add_module(Tracking ${Tracking_srcs} - INCLUDE_DIRS GaudiKernel gear ${GSL_INCLUDE_DIRS} ${LCIO_INCLUDE_DIRS} - LINK_LIBRARIES GaudiAlgLib GaudiKernel ${GEAR_LIBRARIES} ${GSL_LIBRARIES} ${LCIO_LIBRARIES} TrackSystemSvcLib - DetSegmentation - -Wl,--no-as-needed - EDM4HEP::edm4hep EDM4HEP::edm4hepDict - -Wl,--as-needed -) +install(TARGETS Tracking + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Reconstruction/Tracking/Tracking/TrackingHelper.h b/Reconstruction/Tracking/include/Tracking/TrackingHelper.h similarity index 100% rename from Reconstruction/Tracking/Tracking/TrackingHelper.h rename to Reconstruction/Tracking/include/Tracking/TrackingHelper.h diff --git a/Service/CMakeLists.txt b/Service/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..24ff600bbc724865bb12782e5710849a7b1fd3c2 --- /dev/null +++ b/Service/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(EventSeeder) +add_subdirectory(GearSvc) +add_subdirectory(TrackSystemSvc) diff --git a/Service/EventSeeder/CMakeLists.txt b/Service/EventSeeder/CMakeLists.txt index 8bf504d85fbab7043e0fcd82e7b45043fc9b7347..3c45a7468265daa6e1b57b60a597becaad5396bd 100644 --- a/Service/EventSeeder/CMakeLists.txt +++ b/Service/EventSeeder/CMakeLists.txt @@ -1,14 +1,16 @@ -gaudi_subdir(EventSeeder v0r0) -#find_package(GEAR REQUIRED) +gaudi_add_header_only_library(EventSeeder) -set(EventSeeder_srcs - src/*.cpp +gaudi_add_module(EventSeederPlugins + SOURCES src/MarlinEvtSeeder.cpp + LINK EventSeeder + Gaudi::GaudiKernel ) -gaudi_install_headers(EventSeeder) +install(TARGETS EventSeeder EventSeederPlugins + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) + -gaudi_add_module(EventSeeder ${EventSeeder_srcs} - INCLUDE_DIRS GaudiKernel - LINK_LIBRARIES GaudiKernel -) diff --git a/Service/EventSeeder/EventSeeder/IEventSeeder.h b/Service/EventSeeder/include/EventSeeder/IEventSeeder.h similarity index 100% rename from Service/EventSeeder/EventSeeder/IEventSeeder.h rename to Service/EventSeeder/include/EventSeeder/IEventSeeder.h diff --git a/Service/GearSvc/CMakeLists.txt b/Service/GearSvc/CMakeLists.txt index ef21d4200381ba3020153cb6866737932e0d66ac..248cf3dfebc8ce42bca6f4e45c1803293989f853 100644 --- a/Service/GearSvc/CMakeLists.txt +++ b/Service/GearSvc/CMakeLists.txt @@ -1,19 +1,18 @@ -gaudi_subdir(GearSvc v0r0) -find_package(GEAR REQUIRED) -find_package(DD4hep COMPONENTS DDCore DDRec REQUIRED) +gaudi_add_header_only_library(GearSvc) -gaudi_depends_on_subdirs( - Detector/DetInterface +gaudi_add_module(GearSvcPlugins + SOURCES src/GearSvc.cpp + LINK GearSvc + Gaudi::GaudiKernel + ${GEAR_LIBRARIES} + ${DD4hep_COMPONENT_LIBRARIES} + DetInterface ) -set(GearSvc_srcs - src/*.cpp -) - -gaudi_install_headers(GearSvc) +install(TARGETS GearSvc GearSvcPlugins + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) -gaudi_add_module(GearSvc ${GearSvc_srcs} - INCLUDE_DIRS GaudiKernel gear - LINK_LIBRARIES GaudiKernel ${GEAR_LIBRARIES} ${DD4hep_COMPONENT_LIBRARIES} -) diff --git a/Service/GearSvc/GearSvc/IGearSvc.h b/Service/GearSvc/include/GearSvc/IGearSvc.h similarity index 100% rename from Service/GearSvc/GearSvc/IGearSvc.h rename to Service/GearSvc/include/GearSvc/IGearSvc.h diff --git a/Service/TrackSystemSvc/CMakeLists.txt b/Service/TrackSystemSvc/CMakeLists.txt index d12bfb8758945e3b5b43083f23de9245b6af2afe..67710976b6990942ab95d781ccf8fbf9ad1ca90a 100644 --- a/Service/TrackSystemSvc/CMakeLists.txt +++ b/Service/TrackSystemSvc/CMakeLists.txt @@ -1,34 +1,37 @@ -gaudi_subdir(TrackSystemSvc v0r0) +# gaudi_subdir(TrackSystemSvc v0r0) -find_package(CLHEP REQUIRED;CONFIG) -find_package(ROOT 6.14 REQUIRED COMPONENTS Matrix Physics) -find_package(GEAR REQUIRED) -find_package(LCIO REQUIRED) -find_package(EDM4HEP REQUIRED) -#find_package(KalTest REQUIRED) -#find_package(KalDet REQUIRED) -find_package(DD4hep COMPONENTS DDCore DDRec REQUIRED) +gaudi_add_library(TrackSystemSvcLib + SOURCES src/HelixFit.cc + src/HelixTrack.cc + src/IMarlinTrack.cc + src/IMarlinTrkSystem.cc + src/LCIOTrackPropagators.cc + src/MarlinKalTest.cc + src/MarlinKalTestTrack.cc + src/MarlinTrkUtils.cc -gaudi_depends_on_subdirs(Service/GearSvc Detector/DetInterface Utilities/DataHelper Utilities/KalTest Utilities/KalDet) - -set(TrackSystemSvc_srcs src/*.cpp) -set(TrackSystemSvcLib_srcs src/*.cc) - -gaudi_install_headers(TrackSystemSvc) - -#message( "${INCLUDE_DIRS}" ) -#message( "${LINK_LIBRARIES}" ) - -gaudi_add_library(TrackSystemSvcLib ${TrackSystemSvcLib_srcs} - PUBLIC_HEADERS TrackSystemSvc - INCLUDE_DIRS GaudiKernel ROOT ${CLHEP_INCLUDE_DIR} gear ${LCIO_INCLUDE_DIRS} ${EDM4HEP_INCLUDE_DIRS} - LINK_LIBRARIES DataHelperLib KalTestLib KalDetLib GaudiKernel ROOT ${CLHEP_LIBRARIES} ${GEAR_LIBRARIES} ${LCIO_LIBRARIES} - -Wl,--no-as-needed - EDM4HEP::edm4hep EDM4HEP::edm4hepDict - -Wl,--as-needed + LINK DataHelperLib + KalTestLib + KalDetLib + GearSvc + Gaudi::GaudiKernel + ${ROOT_LIBRARIES} + ${CLHEP_LIBRARIES} + ${GEAR_LIBRARIES} + ${LCIO_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict ) -gaudi_add_module(TrackSystemSvc ${TrackSystemSvc_srcs} - INCLUDE_DIRS GaudiKernel gear - LINK_LIBRARIES TrackSystemSvcLib GaudiKernel ${GEAR_LIBRARIES} +gaudi_add_module(TrackSystemSvc + SOURCES src/TrackSystemSvc.cpp + LINK TrackSystemSvcLib + Gaudi::GaudiKernel + ${GEAR_LIBRARIES} ) + +install(TARGETS TrackSystemSvcLib TrackSystemSvc + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) + diff --git a/Service/TrackSystemSvc/TrackSystemSvc/ConfigFlags.h b/Service/TrackSystemSvc/include/TrackSystemSvc/ConfigFlags.h similarity index 100% rename from Service/TrackSystemSvc/TrackSystemSvc/ConfigFlags.h rename to Service/TrackSystemSvc/include/TrackSystemSvc/ConfigFlags.h diff --git a/Service/TrackSystemSvc/TrackSystemSvc/HelixFit.h b/Service/TrackSystemSvc/include/TrackSystemSvc/HelixFit.h similarity index 100% rename from Service/TrackSystemSvc/TrackSystemSvc/HelixFit.h rename to Service/TrackSystemSvc/include/TrackSystemSvc/HelixFit.h diff --git a/Service/TrackSystemSvc/TrackSystemSvc/HelixTrack.h b/Service/TrackSystemSvc/include/TrackSystemSvc/HelixTrack.h similarity index 100% rename from Service/TrackSystemSvc/TrackSystemSvc/HelixTrack.h rename to Service/TrackSystemSvc/include/TrackSystemSvc/HelixTrack.h diff --git a/Service/TrackSystemSvc/TrackSystemSvc/IMarlinTrack.h b/Service/TrackSystemSvc/include/TrackSystemSvc/IMarlinTrack.h similarity index 100% rename from Service/TrackSystemSvc/TrackSystemSvc/IMarlinTrack.h rename to Service/TrackSystemSvc/include/TrackSystemSvc/IMarlinTrack.h diff --git a/Service/TrackSystemSvc/TrackSystemSvc/IMarlinTrkSystem.h b/Service/TrackSystemSvc/include/TrackSystemSvc/IMarlinTrkSystem.h similarity index 100% rename from Service/TrackSystemSvc/TrackSystemSvc/IMarlinTrkSystem.h rename to Service/TrackSystemSvc/include/TrackSystemSvc/IMarlinTrkSystem.h diff --git a/Service/TrackSystemSvc/TrackSystemSvc/ITrackSystemSvc.h b/Service/TrackSystemSvc/include/TrackSystemSvc/ITrackSystemSvc.h similarity index 100% rename from Service/TrackSystemSvc/TrackSystemSvc/ITrackSystemSvc.h rename to Service/TrackSystemSvc/include/TrackSystemSvc/ITrackSystemSvc.h diff --git a/Service/TrackSystemSvc/TrackSystemSvc/LCIOTrackPropagators.h b/Service/TrackSystemSvc/include/TrackSystemSvc/LCIOTrackPropagators.h similarity index 100% rename from Service/TrackSystemSvc/TrackSystemSvc/LCIOTrackPropagators.h rename to Service/TrackSystemSvc/include/TrackSystemSvc/LCIOTrackPropagators.h diff --git a/Service/TrackSystemSvc/TrackSystemSvc/MarlinTrkUtils.h b/Service/TrackSystemSvc/include/TrackSystemSvc/MarlinTrkUtils.h similarity index 100% rename from Service/TrackSystemSvc/TrackSystemSvc/MarlinTrkUtils.h rename to Service/TrackSystemSvc/include/TrackSystemSvc/MarlinTrkUtils.h diff --git a/Simulation/CMakeLists.txt b/Simulation/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..3ce6540c7301bfc59af6ade09e7cc41de7802f23 --- /dev/null +++ b/Simulation/CMakeLists.txt @@ -0,0 +1,8 @@ + +add_subdirectory(DetSimAna) +add_subdirectory(DetSimCore) +add_subdirectory(DetSimDedx) +add_subdirectory(DetSimFastModel) +add_subdirectory(DetSimGeom) +add_subdirectory(DetSimInterface) +add_subdirectory(DetSimSD) diff --git a/Simulation/DetSimAna/CMakeLists.txt b/Simulation/DetSimAna/CMakeLists.txt index e0c9aca523f0e6f33ffc9b33c40a2d7aca33c971..794bcc2faab238a6196d8c8b949b98316b4add9a 100644 --- a/Simulation/DetSimAna/CMakeLists.txt +++ b/Simulation/DetSimAna/CMakeLists.txt @@ -1,44 +1,17 @@ -gaudi_subdir(DetSimAna v0r0) - -gaudi_depends_on_subdirs( - FWCore - Simulation/DetSimInterface -) - find_package(Geant4 REQUIRED ui_all vis_all) include(${Geant4_USE_FILE}) -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -# For EDM & I/O -find_package(podio REQUIRED) -find_package(EDM4HEP REQUIRED) -# find_package(LCIO REQUIRED) - -set(DetSimAna_srcs -# src/ExampleAnaElemTool.cpp - src/Edm4hepWriterAnaElemTool.cpp +gaudi_add_module(DetSimAna + SOURCES src/Edm4hepWriterAnaElemTool.cpp + LINK DetSimInterface + ${DD4hep_COMPONENT_LIBRARIES} + Gaudi::GaudiKernel + EDM4HEP::edm4hep EDM4HEP::edm4hepDict ) -message("podio_LIBRARIES: ${podio_LIBRARIES}") -gaudi_add_module(DetSimAna ${DetSimAna_srcs} - INCLUDE_DIRS - # DetSimInterface - # FWCore - # DD4hep - # GaudiKernel - # Geant4 - # ${plcio_INCLUDE_DIRS} - # ${podio_INCLUDE_DIRS} - LINK_LIBRARIES - # DetSimInterface - # FWCore - DD4hep - ${DD4hep_COMPONENT_LIBRARIES} - GaudiKernel - # Geant4 - -Wl,--no-as-needed - EDM4HEP::edm4hep EDM4HEP::edm4hepDict - -Wl,--as-needed - # ${podio_LIBRARIES} -) +install(TARGETS DetSimAna + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Simulation/DetSimCore/CMakeLists.txt b/Simulation/DetSimCore/CMakeLists.txt index 49ee4777117113ebc52384e4c2f1c60d6c885cc3..9c225fc7332999dc1bd7ca9088a33d8b6b0e46f9 100644 --- a/Simulation/DetSimCore/CMakeLists.txt +++ b/Simulation/DetSimCore/CMakeLists.txt @@ -1,44 +1,32 @@ -gaudi_subdir(DetSimCore v0r0) - -gaudi_depends_on_subdirs( - k4FWCore - Simulation/DetSimInterface -) - find_package(Geant4 REQUIRED ui_all vis_all) include(${Geant4_USE_FILE}) -find_package(podio REQUIRED) -find_package(EDM4HEP REQUIRED) -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -set(DetSimCore_srcs - src/DetSimAlg.cpp - src/DetSimSvc.cpp - src/DetectorConstruction.cpp - src/PrimaryGeneratorAction.cpp - src/G4PrimaryCnvTool.cpp - src/ActionInitialization.cpp - src/RunAction.cpp - src/EventAction.cpp - src/TrackingAction.cpp - src/SteppingAction.cpp -) message(" Geant4_LIBRARIES: ${Geant4_LIBRARIES}") -gaudi_add_module(DetSimCore ${DetSimCore_srcs} - INCLUDE_DIRS - # DetSimInterface - # GaudiKernel - # Geant4 - # plcio ${plcio_INCLUDE_DIRS} ${podio_INCLUDE_DIRS} - LINK_LIBRARIES - DetSimInterface - GaudiKernel - # Geant4 - # ${Geant4_LIBRARIES} - DD4hep ${DD4hep_COMPONENT_LIBRARIES} - EDM4HEP::edm4hep EDM4HEP::edm4hepDict - # podio +gaudi_add_module(DetSimCore + SOURCES src/DetSimAlg.cpp + src/DetSimSvc.cpp + src/DetectorConstruction.cpp + src/PrimaryGeneratorAction.cpp + src/G4PrimaryCnvTool.cpp + src/ActionInitialization.cpp + src/RunAction.cpp + src/EventAction.cpp + src/TrackingAction.cpp + src/SteppingAction.cpp + LINK DetSimInterface + Gaudi::GaudiKernel + ${Geant4_LIBRARIES} + ${DD4hep_COMPONENT_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict ) + +install(TARGETS DetSimCore + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) + + diff --git a/Simulation/DetSimCore/src/DetSimAlg.h b/Simulation/DetSimCore/src/DetSimAlg.h index 86754631d96ac78cec77510f1b75ba9bcf55983b..36646d9e8b449058aa7588cc8bbe89d3acff5342 100644 --- a/Simulation/DetSimCore/src/DetSimAlg.h +++ b/Simulation/DetSimCore/src/DetSimAlg.h @@ -5,7 +5,7 @@ #include <vector> #include <GaudiKernel/Algorithm.h> -#include <GaudiKernel/Property.h> +#include <Gaudi/Property.h> #include <GaudiKernel/ToolHandle.h> #include <DetSimInterface/IDetSimSvc.h> diff --git a/Simulation/DetSimDedx/CMakeLists.txt b/Simulation/DetSimDedx/CMakeLists.txt index e90963eb2b7a45a1a451fd8d76c047bd3fb6c813..fb8e4d3a65429de7514834b96268b8cae7b611fb 100644 --- a/Simulation/DetSimDedx/CMakeLists.txt +++ b/Simulation/DetSimDedx/CMakeLists.txt @@ -1,29 +1,15 @@ -gaudi_subdir(DetSimDedx v0r0) - -gaudi_depends_on_subdirs( - k4FWCore - Simulation/DetSimInterface -) find_package(Geant4 REQUIRED ui_all vis_all) include(${Geant4_USE_FILE}) -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -find_package(EDM4HEP REQUIRED ) -include_directories(${EDM4HEP_INCLUDE_DIR}) -set(DetSimDedx_srcs - src/DummyDedxSimTool.cpp - src/BetheBlochEquationDedxSimTool.cpp - src/GFDndxSimTool.cpp -) +gaudi_add_module(DetSimDedx + SOURCES src/DummyDedxSimTool.cpp + src/BetheBlochEquationDedxSimTool.cpp + src/GFDndxSimTool.cpp -gaudi_add_module(DetSimDedx ${DetSimDedx_srcs} - INCLUDE_DIRS - LINK_LIBRARIES - DD4hep - ${DD4hep_COMPONENT_LIBRARIES} - GaudiKernel - -Wl,--no-as-needed - EDM4HEP::edm4hep EDM4HEP::edm4hepDict + LINK DetSimInterface + ${DD4hep_COMPONENT_LIBRARIES} + Gaudi::GaudiKernel + EDM4HEP::edm4hep EDM4HEP::edm4hepDict ) diff --git a/Simulation/DetSimFastModel/CMakeLists.txt b/Simulation/DetSimFastModel/CMakeLists.txt index 3f968544a0953d2def1653b6d176c4992a65bd7b..50ceb1e33fdd4634f93dffb710a1d020dc58aea4 100644 --- a/Simulation/DetSimFastModel/CMakeLists.txt +++ b/Simulation/DetSimFastModel/CMakeLists.txt @@ -1,24 +1,13 @@ -gaudi_subdir(DetSimFastModel v0r0) - -gaudi_depends_on_subdirs( - k4FWCore - Simulation/DetSimInterface -) find_package(Geant4 REQUIRED ui_all vis_all) include(${Geant4_USE_FILE}) -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -set(DetSimFastModel_srcs - src/DummyFastSimG4Tool.cpp - src/DummyFastSimG4Model.cpp -) -gaudi_add_module(DetSimFastModel ${DetSimFastModel_srcs} - INCLUDE_DIRS - LINK_LIBRARIES - DD4hep - ${DD4hep_COMPONENT_LIBRARIES} - GaudiKernel +gaudi_add_module(DetSimFastModel + SOURCES src/DummyFastSimG4Tool.cpp + src/DummyFastSimG4Model.cpp + LINK DetSimInterface + ${DD4hep_COMPONENT_LIBRARIES} + Gaudi::GaudiKernel ) diff --git a/Simulation/DetSimGeom/CMakeLists.txt b/Simulation/DetSimGeom/CMakeLists.txt index a3b5f3249132d19400359fd728b2dbe676df34a9..aec488006934729263b1872cf49bfea7c9f4538c 100644 --- a/Simulation/DetSimGeom/CMakeLists.txt +++ b/Simulation/DetSimGeom/CMakeLists.txt @@ -1,29 +1,21 @@ -gaudi_subdir(DetSimGeom v0r0) - -gaudi_depends_on_subdirs( - Simulation/DetSimInterface - Detector/DetInterface -) - find_package(Geant4 REQUIRED ui_all vis_all) include(${Geant4_USE_FILE}) -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -set(DetSimGeom_srcs - src/WorldDetElemTool.cpp - src/AnExampleDetElemTool.cpp +gaudi_add_module(DetSimGeom + SOURCES src/WorldDetElemTool.cpp + src/AnExampleDetElemTool.cpp + LINK DetSimInterface + DetInterface + ${DD4hep_COMPONENT_LIBRARIES} + Gaudi::GaudiKernel + ${Geant4_LIBRARIES} ) -gaudi_add_module(DetSimGeom ${DetSimGeom_srcs} - INCLUDE_DIRS - # DetSimInterface - # DetInterface - # DD4hep - # GaudiKernel - # Geant4 - LINK_LIBRARIES - DD4hep ${DD4hep_COMPONENT_LIBRARIES} - GaudiKernel - # Geant4 -) +install(TARGETS DetSimGeom + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) + + diff --git a/Simulation/DetSimGeom/src/AnExampleDetElemTool.h b/Simulation/DetSimGeom/src/AnExampleDetElemTool.h index 908de073479727ff2b035c8b703ad9e4fca38522..1ad3702f910e3c9643670c76e8fb0891b09291ed 100644 --- a/Simulation/DetSimGeom/src/AnExampleDetElemTool.h +++ b/Simulation/DetSimGeom/src/AnExampleDetElemTool.h @@ -2,7 +2,7 @@ #define AnExampleDetElemTool_h #include "GaudiKernel/AlgTool.h" -#include "GaudiKernel/Property.h" +#include <Gaudi/Property.h> #include <GaudiKernel/ToolHandle.h> #include "G4SystemOfUnits.hh" diff --git a/Simulation/DetSimInterface/CMakeLists.txt b/Simulation/DetSimInterface/CMakeLists.txt index 8950d300d14e0df6f5319d26bd209a2a79a28b31..ed99eead6c48943bbe639731e2705a8e70423d31 100644 --- a/Simulation/DetSimInterface/CMakeLists.txt +++ b/Simulation/DetSimInterface/CMakeLists.txt @@ -1,15 +1,15 @@ -gaudi_subdir(DetSimInterface v0r0) - -gaudi_depends_on_subdirs(GaudiKernel) # DetSimInterface (headers only) -set(DetSimInterface_srcs - src/IDetSimSvc.cpp -) -gaudi_add_library(DetSimInterface ${DetSimInterface_srcs} - PUBLIC_HEADERS DetSimInterface - LINK_LIBRARIES GaudiKernel +gaudi_add_library(DetSimInterface + SOURCES src/IDetSimSvc.cpp + LINK Gaudi::GaudiKernel ) +install(TARGETS DetSimInterface + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) + diff --git a/Simulation/DetSimInterface/DetSimInterface/IAnaElemTool.h b/Simulation/DetSimInterface/include/DetSimInterface/IAnaElemTool.h similarity index 100% rename from Simulation/DetSimInterface/DetSimInterface/IAnaElemTool.h rename to Simulation/DetSimInterface/include/DetSimInterface/IAnaElemTool.h diff --git a/Simulation/DetSimInterface/DetSimInterface/IDedxSimTool.h b/Simulation/DetSimInterface/include/DetSimInterface/IDedxSimTool.h similarity index 100% rename from Simulation/DetSimInterface/DetSimInterface/IDedxSimTool.h rename to Simulation/DetSimInterface/include/DetSimInterface/IDedxSimTool.h diff --git a/Simulation/DetSimInterface/DetSimInterface/IDetElemTool.h b/Simulation/DetSimInterface/include/DetSimInterface/IDetElemTool.h similarity index 100% rename from Simulation/DetSimInterface/DetSimInterface/IDetElemTool.h rename to Simulation/DetSimInterface/include/DetSimInterface/IDetElemTool.h diff --git a/Simulation/DetSimInterface/DetSimInterface/IDetSimSvc.h b/Simulation/DetSimInterface/include/DetSimInterface/IDetSimSvc.h similarity index 100% rename from Simulation/DetSimInterface/DetSimInterface/IDetSimSvc.h rename to Simulation/DetSimInterface/include/DetSimInterface/IDetSimSvc.h diff --git a/Simulation/DetSimInterface/DetSimInterface/IFastSimG4Tool.h b/Simulation/DetSimInterface/include/DetSimInterface/IFastSimG4Tool.h similarity index 100% rename from Simulation/DetSimInterface/DetSimInterface/IFastSimG4Tool.h rename to Simulation/DetSimInterface/include/DetSimInterface/IFastSimG4Tool.h diff --git a/Simulation/DetSimInterface/DetSimInterface/IG4PrimaryCnvTool.h b/Simulation/DetSimInterface/include/DetSimInterface/IG4PrimaryCnvTool.h similarity index 100% rename from Simulation/DetSimInterface/DetSimInterface/IG4PrimaryCnvTool.h rename to Simulation/DetSimInterface/include/DetSimInterface/IG4PrimaryCnvTool.h diff --git a/Simulation/DetSimInterface/DetSimInterface/ISensDetTool.h b/Simulation/DetSimInterface/include/DetSimInterface/ISensDetTool.h similarity index 100% rename from Simulation/DetSimInterface/DetSimInterface/ISensDetTool.h rename to Simulation/DetSimInterface/include/DetSimInterface/ISensDetTool.h diff --git a/Simulation/DetSimSD/CMakeLists.txt b/Simulation/DetSimSD/CMakeLists.txt index 33d00e18e00177f47582ad8ab7679c1debc2d08b..eed28a788b4893b6a771aa965f15759b3f2addfa 100644 --- a/Simulation/DetSimSD/CMakeLists.txt +++ b/Simulation/DetSimSD/CMakeLists.txt @@ -1,41 +1,30 @@ -gaudi_subdir(DetSimSD v0r0) - -gaudi_depends_on_subdirs( - k4FWCore - Detector/DetInterface - Simulation/DetSimInterface -) - find_package(Geant4 REQUIRED ui_all vis_all) include(${Geant4_USE_FILE}) -find_package(DD4hep COMPONENTS DDG4 REQUIRED) -set(DetSimSD_srcs - src/CalorimeterSensDetTool.cpp +gaudi_add_module(DetSimSD + SOURCES src/CalorimeterSensDetTool.cpp + src/DDG4SensitiveDetector.cpp + src/CaloSensitiveDetector.cpp - src/DDG4SensitiveDetector.cpp - src/CaloSensitiveDetector.cpp + src/DriftChamberSensDetTool.cpp + src/DriftChamberSensitiveDetector.cpp - src/DriftChamberSensDetTool.cpp - src/DriftChamberSensitiveDetector.cpp + src/TimeProjectionChamberSensDetTool.cpp + src/TimeProjectionChamberSensitiveDetector.cpp - src/TimeProjectionChamberSensDetTool.cpp - src/TimeProjectionChamberSensitiveDetector.cpp + LINK DetSimInterface + DetInterface + ${DD4hep_COMPONENT_LIBRARIES} + Gaudi::GaudiKernel ) +target_include_directories(DetSimSD PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>/include + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) + +install(TARGETS DetSimSD + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) -gaudi_add_module(DetSimSD ${DetSimSD_srcs} - INCLUDE_DIRS - # DetSimInterface - # k4FWCore - # DD4hep - # GaudiKernel - # Geant4 - LINK_LIBRARIES - # DetSimInterface - # k4FWCore - DD4hep - ${DD4hep_COMPONENT_LIBRARIES} - GaudiKernel - # Geant4 -) diff --git a/Simulation/DetSimSD/DetSimSD/CaloSensitiveDetector.h b/Simulation/DetSimSD/include/DetSimSD/CaloSensitiveDetector.h similarity index 100% rename from Simulation/DetSimSD/DetSimSD/CaloSensitiveDetector.h rename to Simulation/DetSimSD/include/DetSimSD/CaloSensitiveDetector.h diff --git a/Simulation/DetSimSD/DetSimSD/DDG4SensitiveDetector.h b/Simulation/DetSimSD/include/DetSimSD/DDG4SensitiveDetector.h similarity index 100% rename from Simulation/DetSimSD/DetSimSD/DDG4SensitiveDetector.h rename to Simulation/DetSimSD/include/DetSimSD/DDG4SensitiveDetector.h diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..7558d9c2f012f9e95edddcec2811687f25450506 --- /dev/null +++ b/Utilities/CMakeLists.txt @@ -0,0 +1,5 @@ +add_subdirectory(DataHelper) +add_subdirectory(KalTest) +add_subdirectory(KalDet) +add_subdirectory(KiTrack) + diff --git a/Utilities/DataHelper/CMakeLists.txt b/Utilities/DataHelper/CMakeLists.txt index a93dc10a07a2ab5cd239c4dea1cd1ef23565cecf..0583b24bdabbbe3328ac3c8d357502ba2115fe9c 100644 --- a/Utilities/DataHelper/CMakeLists.txt +++ b/Utilities/DataHelper/CMakeLists.txt @@ -1,19 +1,28 @@ -gaudi_subdir(DataHelper v0r0) -find_package(CLHEP REQUIRED;CONFIG) -find_package(EDM4HEP REQUIRED) -find_package(GSL REQUIRED ) -message("GSL: ${GSL_LIBRARIES} ") -message("GSL INCLUDE_DIRS: ${GSL_INCLUDE_DIRS} ") - -# gaudi_depends_on_subdirs() - -set(DataHelperLib_srcs src/*.cc src/*.cpp) - -#gaudi_install_headers(DataHelper) - -gaudi_add_library(DataHelperLib ${DataHelperLib_srcs} - PUBLIC_HEADERS DataHelper - INCLUDE_DIRS ${CLHEP_INCLUDE_DIR} ${GSL_INCLUDE_DIRS} - LINK_LIBRARIES EDM4HEP::edm4hep EDM4HEP::edm4hepDict ${GSL_LIBRARIES} ${CLHEP_LIBRARIES} +gaudi_add_library(DataHelperLib + SOURCES src/CaloHitExtended.cc + src/Circle.cc + src/ClusterExtended.cc + src/ClusterShapes.cc + src/GroupTracks.cc + src/HelixClass.cc + src/LCCylinder.cc + src/LCLine3D.cc + src/LCPlane3D.cc + src/LineClass.cc + src/Navigation.cpp + src/SimpleHelix.cc + src/TrackerHitExtended.cc + src/TrackExtended.cc + src/TrackHitPair.cc + LINK EDM4HEP::edm4hep + EDM4HEP::edm4hepDict + ${GSL_LIBRARIES} + ${CLHEP_LIBRARIES} ) + +install(TARGETS DataHelperLib + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Utilities/DataHelper/DataHelper/CaloHitExtended.h b/Utilities/DataHelper/include/DataHelper/CaloHitExtended.h similarity index 100% rename from Utilities/DataHelper/DataHelper/CaloHitExtended.h rename to Utilities/DataHelper/include/DataHelper/CaloHitExtended.h diff --git a/Utilities/DataHelper/DataHelper/Circle.h b/Utilities/DataHelper/include/DataHelper/Circle.h similarity index 100% rename from Utilities/DataHelper/DataHelper/Circle.h rename to Utilities/DataHelper/include/DataHelper/Circle.h diff --git a/Utilities/DataHelper/DataHelper/ClusterExtended.h b/Utilities/DataHelper/include/DataHelper/ClusterExtended.h similarity index 100% rename from Utilities/DataHelper/DataHelper/ClusterExtended.h rename to Utilities/DataHelper/include/DataHelper/ClusterExtended.h diff --git a/Utilities/DataHelper/DataHelper/ClusterShapes.h b/Utilities/DataHelper/include/DataHelper/ClusterShapes.h similarity index 100% rename from Utilities/DataHelper/DataHelper/ClusterShapes.h rename to Utilities/DataHelper/include/DataHelper/ClusterShapes.h diff --git a/Utilities/DataHelper/DataHelper/GroupTracks.h b/Utilities/DataHelper/include/DataHelper/GroupTracks.h similarity index 100% rename from Utilities/DataHelper/DataHelper/GroupTracks.h rename to Utilities/DataHelper/include/DataHelper/GroupTracks.h diff --git a/Utilities/DataHelper/DataHelper/HelixClass.h b/Utilities/DataHelper/include/DataHelper/HelixClass.h similarity index 100% rename from Utilities/DataHelper/DataHelper/HelixClass.h rename to Utilities/DataHelper/include/DataHelper/HelixClass.h diff --git a/Utilities/DataHelper/DataHelper/LCCylinder.h b/Utilities/DataHelper/include/DataHelper/LCCylinder.h similarity index 100% rename from Utilities/DataHelper/DataHelper/LCCylinder.h rename to Utilities/DataHelper/include/DataHelper/LCCylinder.h diff --git a/Utilities/DataHelper/DataHelper/LCGeometryTypes.h b/Utilities/DataHelper/include/DataHelper/LCGeometryTypes.h similarity index 100% rename from Utilities/DataHelper/DataHelper/LCGeometryTypes.h rename to Utilities/DataHelper/include/DataHelper/LCGeometryTypes.h diff --git a/Utilities/DataHelper/DataHelper/LCLine3D.h b/Utilities/DataHelper/include/DataHelper/LCLine3D.h similarity index 100% rename from Utilities/DataHelper/DataHelper/LCLine3D.h rename to Utilities/DataHelper/include/DataHelper/LCLine3D.h diff --git a/Utilities/DataHelper/DataHelper/LCPlane3D.h b/Utilities/DataHelper/include/DataHelper/LCPlane3D.h similarity index 100% rename from Utilities/DataHelper/DataHelper/LCPlane3D.h rename to Utilities/DataHelper/include/DataHelper/LCPlane3D.h diff --git a/Utilities/DataHelper/DataHelper/LineClass.h b/Utilities/DataHelper/include/DataHelper/LineClass.h similarity index 100% rename from Utilities/DataHelper/DataHelper/LineClass.h rename to Utilities/DataHelper/include/DataHelper/LineClass.h diff --git a/Utilities/DataHelper/DataHelper/Navigation.h b/Utilities/DataHelper/include/DataHelper/Navigation.h similarity index 100% rename from Utilities/DataHelper/DataHelper/Navigation.h rename to Utilities/DataHelper/include/DataHelper/Navigation.h diff --git a/Utilities/DataHelper/DataHelper/SimpleHelix.h b/Utilities/DataHelper/include/DataHelper/SimpleHelix.h similarity index 100% rename from Utilities/DataHelper/DataHelper/SimpleHelix.h rename to Utilities/DataHelper/include/DataHelper/SimpleHelix.h diff --git a/Utilities/DataHelper/DataHelper/TrackExtended.h b/Utilities/DataHelper/include/DataHelper/TrackExtended.h similarity index 100% rename from Utilities/DataHelper/DataHelper/TrackExtended.h rename to Utilities/DataHelper/include/DataHelper/TrackExtended.h diff --git a/Utilities/DataHelper/DataHelper/TrackHitPair.h b/Utilities/DataHelper/include/DataHelper/TrackHitPair.h similarity index 100% rename from Utilities/DataHelper/DataHelper/TrackHitPair.h rename to Utilities/DataHelper/include/DataHelper/TrackHitPair.h diff --git a/Utilities/DataHelper/DataHelper/TrackerHitExtended.h b/Utilities/DataHelper/include/DataHelper/TrackerHitExtended.h similarity index 100% rename from Utilities/DataHelper/DataHelper/TrackerHitExtended.h rename to Utilities/DataHelper/include/DataHelper/TrackerHitExtended.h diff --git a/Utilities/DataHelper/DataHelper/Trajectory.h b/Utilities/DataHelper/include/DataHelper/Trajectory.h similarity index 100% rename from Utilities/DataHelper/DataHelper/Trajectory.h rename to Utilities/DataHelper/include/DataHelper/Trajectory.h diff --git a/Utilities/KalDet/CMakeLists.txt b/Utilities/KalDet/CMakeLists.txt index f7843bd2b474f63625b0316b3f11e7587370f590..faacdc5b6132c6762b8098a79a6b90184f59526c 100644 --- a/Utilities/KalDet/CMakeLists.txt +++ b/Utilities/KalDet/CMakeLists.txt @@ -3,30 +3,16 @@ # Desc: import from ILCSoft ############################################################################## -gaudi_subdir(KalDet v0r0) - -find_package(CLHEP REQUIRED;CONFIG) -find_package(LCIO) -find_package(GEAR) -find_package(ROOT COMPONENTS MathCore) -find_package(EDM4HEP REQUIRED) -find_package(DD4hep COMPONENTS DDCore DDRec REQUIRED) - -gaudi_depends_on_subdirs( - Detector/DetInterface - Utilities/KalTest -) - get_target_property(to_incl KalTestLib SOURCE_DIR) if (to_incl) - LIST( APPEND DICT_INCLUDE_DIRS ${to_incl}) + LIST( APPEND DICT_INCLUDE_DIRS ${to_incl}/include) else() message(FATAL_ERROR "Failed to get the source dir for package KalTestLib") endif() set( DICT_CINT_DEFINITIONS "HANDLE_DICT_EXCEPTIONS=IGNORED_FOR_CINT" ) set( DICT_INPUT_DIRS gen kern lctpc/gearTPC ) -set( DICT_OUTPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/rootdict ) +set( DICT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/rootdict ) foreach( DICT_DIR ${DICT_INPUT_DIRS} ) list( APPEND DICT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/${DICT_DIR} ) @@ -75,7 +61,22 @@ include_directories( ${DICT_INCLUDE_DIRS} ) set( KalDetLib_srcs ${LIB_SOURCES} ${COMMON_SOURCES} ) -gaudi_add_library(KalDetLib ${KalDetLib_srcs} - PUBLIC_HEADERS kaldet - LINK_LIBRARIES GaudiKernel ROOT ${CLHEP_LIBRARIES} LCIO ${GEAR_LIBRARIES} KalTestLib EDM4HEP::edm4hep EDM4HEP::edm4hepDict ${DD4hep_COMPONENT_LIBRARIES} +gaudi_add_library(KalDetLib + SOURCES ${KalDetLib_srcs} + LINK DetInterface + KalTestLib + Gaudi::GaudiKernel + ${ROOT_LIBRARIES} + ${CLHEP_LIBRARIES} + ${LCIO_LIBRARIES} + ${GEAR_LIBRARIES} + EDM4HEP::edm4hep EDM4HEP::edm4hepDict + ${DD4hep_COMPONENT_LIBRARIES} ) + +install(TARGETS KalDetLib + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) + diff --git a/Utilities/KalDet/kaldet/EXEventGen.h b/Utilities/KalDet/include/kaldet/EXEventGen.h similarity index 100% rename from Utilities/KalDet/kaldet/EXEventGen.h rename to Utilities/KalDet/include/kaldet/EXEventGen.h diff --git a/Utilities/KalDet/kaldet/EXTPCHit.h b/Utilities/KalDet/include/kaldet/EXTPCHit.h similarity index 100% rename from Utilities/KalDet/kaldet/EXTPCHit.h rename to Utilities/KalDet/include/kaldet/EXTPCHit.h diff --git a/Utilities/KalDet/kaldet/EXTPCKalDetector.h b/Utilities/KalDet/include/kaldet/EXTPCKalDetector.h similarity index 100% rename from Utilities/KalDet/kaldet/EXTPCKalDetector.h rename to Utilities/KalDet/include/kaldet/EXTPCKalDetector.h diff --git a/Utilities/KalDet/kaldet/EXTPCMeasLayer.h b/Utilities/KalDet/include/kaldet/EXTPCMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/EXTPCMeasLayer.h rename to Utilities/KalDet/include/kaldet/EXTPCMeasLayer.h diff --git a/Utilities/KalDet/kaldet/EXVKalDetector.h b/Utilities/KalDet/include/kaldet/EXVKalDetector.h similarity index 100% rename from Utilities/KalDet/kaldet/EXVKalDetector.h rename to Utilities/KalDet/include/kaldet/EXVKalDetector.h diff --git a/Utilities/KalDet/kaldet/EXVMeasLayer.h b/Utilities/KalDet/include/kaldet/EXVMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/EXVMeasLayer.h rename to Utilities/KalDet/include/kaldet/EXVMeasLayer.h diff --git a/Utilities/KalDet/kaldet/GearTPCCylinderHit.h b/Utilities/KalDet/include/kaldet/GearTPCCylinderHit.h similarity index 100% rename from Utilities/KalDet/kaldet/GearTPCCylinderHit.h rename to Utilities/KalDet/include/kaldet/GearTPCCylinderHit.h diff --git a/Utilities/KalDet/kaldet/GearTPCCylinderMeasLayer.h b/Utilities/KalDet/include/kaldet/GearTPCCylinderMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/GearTPCCylinderMeasLayer.h rename to Utilities/KalDet/include/kaldet/GearTPCCylinderMeasLayer.h diff --git a/Utilities/KalDet/kaldet/GearTPCHit.h b/Utilities/KalDet/include/kaldet/GearTPCHit.h similarity index 100% rename from Utilities/KalDet/kaldet/GearTPCHit.h rename to Utilities/KalDet/include/kaldet/GearTPCHit.h diff --git a/Utilities/KalDet/kaldet/GearTPCKalDetector.h b/Utilities/KalDet/include/kaldet/GearTPCKalDetector.h similarity index 100% rename from Utilities/KalDet/kaldet/GearTPCKalDetector.h rename to Utilities/KalDet/include/kaldet/GearTPCKalDetector.h diff --git a/Utilities/KalDet/kaldet/GearTPCMeasLayer.h b/Utilities/KalDet/include/kaldet/GearTPCMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/GearTPCMeasLayer.h rename to Utilities/KalDet/include/kaldet/GearTPCMeasLayer.h diff --git a/Utilities/KalDet/kaldet/ILDConeMeasLayer.h b/Utilities/KalDet/include/kaldet/ILDConeMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDConeMeasLayer.h rename to Utilities/KalDet/include/kaldet/ILDConeMeasLayer.h diff --git a/Utilities/KalDet/kaldet/ILDCylinderHit.h b/Utilities/KalDet/include/kaldet/ILDCylinderHit.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDCylinderHit.h rename to Utilities/KalDet/include/kaldet/ILDCylinderHit.h diff --git a/Utilities/KalDet/kaldet/ILDCylinderMeasLayer.h b/Utilities/KalDet/include/kaldet/ILDCylinderMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDCylinderMeasLayer.h rename to Utilities/KalDet/include/kaldet/ILDCylinderMeasLayer.h diff --git a/Utilities/KalDet/kaldet/ILDDiscMeasLayer.h b/Utilities/KalDet/include/kaldet/ILDDiscMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDDiscMeasLayer.h rename to Utilities/KalDet/include/kaldet/ILDDiscMeasLayer.h diff --git a/Utilities/KalDet/kaldet/ILDFTDDiscBasedKalDetector.h b/Utilities/KalDet/include/kaldet/ILDFTDDiscBasedKalDetector.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDFTDDiscBasedKalDetector.h rename to Utilities/KalDet/include/kaldet/ILDFTDDiscBasedKalDetector.h diff --git a/Utilities/KalDet/kaldet/ILDFTDKalDetector.h b/Utilities/KalDet/include/kaldet/ILDFTDKalDetector.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDFTDKalDetector.h rename to Utilities/KalDet/include/kaldet/ILDFTDKalDetector.h diff --git a/Utilities/KalDet/kaldet/ILDMeasurementSurfaceStoreFiller.h b/Utilities/KalDet/include/kaldet/ILDMeasurementSurfaceStoreFiller.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDMeasurementSurfaceStoreFiller.h rename to Utilities/KalDet/include/kaldet/ILDMeasurementSurfaceStoreFiller.h diff --git a/Utilities/KalDet/kaldet/ILDParallelPlanarMeasLayer.h b/Utilities/KalDet/include/kaldet/ILDParallelPlanarMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDParallelPlanarMeasLayer.h rename to Utilities/KalDet/include/kaldet/ILDParallelPlanarMeasLayer.h diff --git a/Utilities/KalDet/kaldet/ILDParallelPlanarStripMeasLayer.h b/Utilities/KalDet/include/kaldet/ILDParallelPlanarStripMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDParallelPlanarStripMeasLayer.h rename to Utilities/KalDet/include/kaldet/ILDParallelPlanarStripMeasLayer.h diff --git a/Utilities/KalDet/kaldet/ILDPlanarHit.h b/Utilities/KalDet/include/kaldet/ILDPlanarHit.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDPlanarHit.h rename to Utilities/KalDet/include/kaldet/ILDPlanarHit.h diff --git a/Utilities/KalDet/kaldet/ILDPlanarMeasLayer.h b/Utilities/KalDet/include/kaldet/ILDPlanarMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDPlanarMeasLayer.h rename to Utilities/KalDet/include/kaldet/ILDPlanarMeasLayer.h diff --git a/Utilities/KalDet/kaldet/ILDPlanarStripHit.h b/Utilities/KalDet/include/kaldet/ILDPlanarStripHit.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDPlanarStripHit.h rename to Utilities/KalDet/include/kaldet/ILDPlanarStripHit.h diff --git a/Utilities/KalDet/kaldet/ILDPolygonBarrelMeasLayer.h b/Utilities/KalDet/include/kaldet/ILDPolygonBarrelMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDPolygonBarrelMeasLayer.h rename to Utilities/KalDet/include/kaldet/ILDPolygonBarrelMeasLayer.h diff --git a/Utilities/KalDet/kaldet/ILDRotatedTrapMeaslayer.h b/Utilities/KalDet/include/kaldet/ILDRotatedTrapMeaslayer.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDRotatedTrapMeaslayer.h rename to Utilities/KalDet/include/kaldet/ILDRotatedTrapMeaslayer.h diff --git a/Utilities/KalDet/kaldet/ILDSETKalDetector.h b/Utilities/KalDet/include/kaldet/ILDSETKalDetector.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDSETKalDetector.h rename to Utilities/KalDet/include/kaldet/ILDSETKalDetector.h diff --git a/Utilities/KalDet/kaldet/ILDSITCylinderKalDetector.h b/Utilities/KalDet/include/kaldet/ILDSITCylinderKalDetector.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDSITCylinderKalDetector.h rename to Utilities/KalDet/include/kaldet/ILDSITCylinderKalDetector.h diff --git a/Utilities/KalDet/kaldet/ILDSITKalDetector.h b/Utilities/KalDet/include/kaldet/ILDSITKalDetector.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDSITKalDetector.h rename to Utilities/KalDet/include/kaldet/ILDSITKalDetector.h diff --git a/Utilities/KalDet/kaldet/ILDSegmentedDiscMeasLayer.h b/Utilities/KalDet/include/kaldet/ILDSegmentedDiscMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDSegmentedDiscMeasLayer.h rename to Utilities/KalDet/include/kaldet/ILDSegmentedDiscMeasLayer.h diff --git a/Utilities/KalDet/kaldet/ILDSegmentedDiscStripMeasLayer.h b/Utilities/KalDet/include/kaldet/ILDSegmentedDiscStripMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDSegmentedDiscStripMeasLayer.h rename to Utilities/KalDet/include/kaldet/ILDSegmentedDiscStripMeasLayer.h diff --git a/Utilities/KalDet/kaldet/ILDSupportKalDetector.h b/Utilities/KalDet/include/kaldet/ILDSupportKalDetector.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDSupportKalDetector.h rename to Utilities/KalDet/include/kaldet/ILDSupportKalDetector.h diff --git a/Utilities/KalDet/kaldet/ILDTPCKalDetector.h b/Utilities/KalDet/include/kaldet/ILDTPCKalDetector.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDTPCKalDetector.h rename to Utilities/KalDet/include/kaldet/ILDTPCKalDetector.h diff --git a/Utilities/KalDet/kaldet/ILDVMeasLayer.h b/Utilities/KalDet/include/kaldet/ILDVMeasLayer.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDVMeasLayer.h rename to Utilities/KalDet/include/kaldet/ILDVMeasLayer.h diff --git a/Utilities/KalDet/kaldet/ILDVTrackHit.h b/Utilities/KalDet/include/kaldet/ILDVTrackHit.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDVTrackHit.h rename to Utilities/KalDet/include/kaldet/ILDVTrackHit.h diff --git a/Utilities/KalDet/kaldet/ILDVXDKalDetector.h b/Utilities/KalDet/include/kaldet/ILDVXDKalDetector.h similarity index 100% rename from Utilities/KalDet/kaldet/ILDVXDKalDetector.h rename to Utilities/KalDet/include/kaldet/ILDVXDKalDetector.h diff --git a/Utilities/KalDet/kaldet/LCTPCKalDetector.h b/Utilities/KalDet/include/kaldet/LCTPCKalDetector.h similarity index 100% rename from Utilities/KalDet/kaldet/LCTPCKalDetector.h rename to Utilities/KalDet/include/kaldet/LCTPCKalDetector.h diff --git a/Utilities/KalDet/kaldet/MaterialDataBase.h b/Utilities/KalDet/include/kaldet/MaterialDataBase.h similarity index 100% rename from Utilities/KalDet/kaldet/MaterialDataBase.h rename to Utilities/KalDet/include/kaldet/MaterialDataBase.h diff --git a/Utilities/KalTest/CMakeLists.txt b/Utilities/KalTest/CMakeLists.txt index 1b20a31d7280316c67d7ab12a05d23a0d31c633c..d1a29b90d61522b3804673af3636b3ba62641694 100644 --- a/Utilities/KalTest/CMakeLists.txt +++ b/Utilities/KalTest/CMakeLists.txt @@ -3,15 +3,9 @@ # Desc: import from ILCSoft ############################################################################## -gaudi_subdir(KalTest v0r0) - -find_package(ROOT REQUIRED COMPONENTS MathCore) - -gaudi_depends_on_subdirs() - set( DICT_CINT_DEFINITIONS "HANDLE_DICT_EXCEPTIONS=IGNORED_FOR_CINT" ) set( DICT_INPUT_DIRS geomlib kallib kaltracklib utils ) -set( DICT_OUTPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/rootdict ) +set( DICT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/rootdict ) foreach( DICT ${DICT_INPUT_DIRS} ) list( APPEND DICT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src/${DICT} ) @@ -54,7 +48,18 @@ include_directories( ${ROOT_INCLUDE_DIRS} ) set(KalTestLib_srcs ${LIB_SOURCES}) -gaudi_add_library(KalTestLib ${KalTestLib_srcs} - PUBLIC_HEADERS kaltest - LINK_LIBRARIES GaudiKernel ROOT +gaudi_add_library(KalTestLib + SOURCES ${KalTestLib_srcs} + LINK Gaudi::GaudiKernel + ${ROOT_LIBRARIES} ) + +target_include_directories(KalTestLib PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>/include + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) + +install(TARGETS KalTestLib + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Utilities/KalTest/kaltest/KalTrackDim.h b/Utilities/KalTest/include/kaltest/KalTrackDim.h similarity index 100% rename from Utilities/KalTest/kaltest/KalTrackDim.h rename to Utilities/KalTest/include/kaltest/KalTrackDim.h diff --git a/Utilities/KalTest/kaltest/TAttDrawable.h b/Utilities/KalTest/include/kaltest/TAttDrawable.h similarity index 100% rename from Utilities/KalTest/kaltest/TAttDrawable.h rename to Utilities/KalTest/include/kaltest/TAttDrawable.h diff --git a/Utilities/KalTest/kaltest/TAttElement.h b/Utilities/KalTest/include/kaltest/TAttElement.h similarity index 100% rename from Utilities/KalTest/kaltest/TAttElement.h rename to Utilities/KalTest/include/kaltest/TAttElement.h diff --git a/Utilities/KalTest/kaltest/TAttLockable.h b/Utilities/KalTest/include/kaltest/TAttLockable.h similarity index 100% rename from Utilities/KalTest/kaltest/TAttLockable.h rename to Utilities/KalTest/include/kaltest/TAttLockable.h diff --git a/Utilities/KalTest/kaltest/TCircle.h b/Utilities/KalTest/include/kaltest/TCircle.h similarity index 100% rename from Utilities/KalTest/kaltest/TCircle.h rename to Utilities/KalTest/include/kaltest/TCircle.h diff --git a/Utilities/KalTest/kaltest/TCutCone.h b/Utilities/KalTest/include/kaltest/TCutCone.h similarity index 100% rename from Utilities/KalTest/kaltest/TCutCone.h rename to Utilities/KalTest/include/kaltest/TCutCone.h diff --git a/Utilities/KalTest/kaltest/TCylinder.h b/Utilities/KalTest/include/kaltest/TCylinder.h similarity index 100% rename from Utilities/KalTest/kaltest/TCylinder.h rename to Utilities/KalTest/include/kaltest/TCylinder.h diff --git a/Utilities/KalTest/kaltest/THelicalTrack.h b/Utilities/KalTest/include/kaltest/THelicalTrack.h similarity index 100% rename from Utilities/KalTest/kaltest/THelicalTrack.h rename to Utilities/KalTest/include/kaltest/THelicalTrack.h diff --git a/Utilities/KalTest/kaltest/THype.h b/Utilities/KalTest/include/kaltest/THype.h similarity index 100% rename from Utilities/KalTest/kaltest/THype.h rename to Utilities/KalTest/include/kaltest/THype.h diff --git a/Utilities/KalTest/kaltest/TKalDetCradle.h b/Utilities/KalTest/include/kaltest/TKalDetCradle.h similarity index 100% rename from Utilities/KalTest/kaltest/TKalDetCradle.h rename to Utilities/KalTest/include/kaltest/TKalDetCradle.h diff --git a/Utilities/KalTest/kaltest/TKalFilterCond.h b/Utilities/KalTest/include/kaltest/TKalFilterCond.h similarity index 100% rename from Utilities/KalTest/kaltest/TKalFilterCond.h rename to Utilities/KalTest/include/kaltest/TKalFilterCond.h diff --git a/Utilities/KalTest/kaltest/TKalMatrix.h b/Utilities/KalTest/include/kaltest/TKalMatrix.h similarity index 100% rename from Utilities/KalTest/kaltest/TKalMatrix.h rename to Utilities/KalTest/include/kaltest/TKalMatrix.h diff --git a/Utilities/KalTest/kaltest/TKalTrack.h b/Utilities/KalTest/include/kaltest/TKalTrack.h similarity index 100% rename from Utilities/KalTest/kaltest/TKalTrack.h rename to Utilities/KalTest/include/kaltest/TKalTrack.h diff --git a/Utilities/KalTest/kaltest/TKalTrackSite.h b/Utilities/KalTest/include/kaltest/TKalTrackSite.h similarity index 100% rename from Utilities/KalTest/kaltest/TKalTrackSite.h rename to Utilities/KalTest/include/kaltest/TKalTrackSite.h diff --git a/Utilities/KalTest/kaltest/TKalTrackState.h b/Utilities/KalTest/include/kaltest/TKalTrackState.h similarity index 100% rename from Utilities/KalTest/kaltest/TKalTrackState.h rename to Utilities/KalTest/include/kaltest/TKalTrackState.h diff --git a/Utilities/KalTest/kaltest/TPlane.h b/Utilities/KalTest/include/kaltest/TPlane.h similarity index 100% rename from Utilities/KalTest/kaltest/TPlane.h rename to Utilities/KalTest/include/kaltest/TPlane.h diff --git a/Utilities/KalTest/kaltest/TStraightTrack.h b/Utilities/KalTest/include/kaltest/TStraightTrack.h similarity index 100% rename from Utilities/KalTest/kaltest/TStraightTrack.h rename to Utilities/KalTest/include/kaltest/TStraightTrack.h diff --git a/Utilities/KalTest/kaltest/TTube.h b/Utilities/KalTest/include/kaltest/TTube.h similarity index 100% rename from Utilities/KalTest/kaltest/TTube.h rename to Utilities/KalTest/include/kaltest/TTube.h diff --git a/Utilities/KalTest/kaltest/TVCurve.h b/Utilities/KalTest/include/kaltest/TVCurve.h similarity index 100% rename from Utilities/KalTest/kaltest/TVCurve.h rename to Utilities/KalTest/include/kaltest/TVCurve.h diff --git a/Utilities/KalTest/kaltest/TVKalDetector.h b/Utilities/KalTest/include/kaltest/TVKalDetector.h similarity index 100% rename from Utilities/KalTest/kaltest/TVKalDetector.h rename to Utilities/KalTest/include/kaltest/TVKalDetector.h diff --git a/Utilities/KalTest/kaltest/TVKalSite.h b/Utilities/KalTest/include/kaltest/TVKalSite.h similarity index 100% rename from Utilities/KalTest/kaltest/TVKalSite.h rename to Utilities/KalTest/include/kaltest/TVKalSite.h diff --git a/Utilities/KalTest/kaltest/TVKalState.h b/Utilities/KalTest/include/kaltest/TVKalState.h similarity index 100% rename from Utilities/KalTest/kaltest/TVKalState.h rename to Utilities/KalTest/include/kaltest/TVKalState.h diff --git a/Utilities/KalTest/kaltest/TVKalSystem.h b/Utilities/KalTest/include/kaltest/TVKalSystem.h similarity index 100% rename from Utilities/KalTest/kaltest/TVKalSystem.h rename to Utilities/KalTest/include/kaltest/TVKalSystem.h diff --git a/Utilities/KalTest/kaltest/TVMeasLayer.h b/Utilities/KalTest/include/kaltest/TVMeasLayer.h similarity index 100% rename from Utilities/KalTest/kaltest/TVMeasLayer.h rename to Utilities/KalTest/include/kaltest/TVMeasLayer.h diff --git a/Utilities/KalTest/kaltest/TVSolid.h b/Utilities/KalTest/include/kaltest/TVSolid.h similarity index 100% rename from Utilities/KalTest/kaltest/TVSolid.h rename to Utilities/KalTest/include/kaltest/TVSolid.h diff --git a/Utilities/KalTest/kaltest/TVSurface.h b/Utilities/KalTest/include/kaltest/TVSurface.h similarity index 100% rename from Utilities/KalTest/kaltest/TVSurface.h rename to Utilities/KalTest/include/kaltest/TVSurface.h diff --git a/Utilities/KalTest/kaltest/TVTrack.h b/Utilities/KalTest/include/kaltest/TVTrack.h similarity index 100% rename from Utilities/KalTest/kaltest/TVTrack.h rename to Utilities/KalTest/include/kaltest/TVTrack.h diff --git a/Utilities/KalTest/kaltest/TVTrackHit.h b/Utilities/KalTest/include/kaltest/TVTrackHit.h similarity index 100% rename from Utilities/KalTest/kaltest/TVTrackHit.h rename to Utilities/KalTest/include/kaltest/TVTrackHit.h diff --git a/Utilities/KiTrack/CMakeLists.txt b/Utilities/KiTrack/CMakeLists.txt index 7a20e00dc7f34a62d6a97bad8e0c4886d6db62a9..6beed3c6cdd723246c7332fcc76dabfe55a99677 100644 --- a/Utilities/KiTrack/CMakeLists.txt +++ b/Utilities/KiTrack/CMakeLists.txt @@ -1,22 +1,74 @@ -gaudi_subdir(KiTrack v0r0) -find_package(CLHEP REQUIRED;CONFIG) -find_package(ROOT REQUIRED) -#find_package(DD4hep REQUIRED) -find_package(GSL REQUIRED) -find_package(EDM4HEP REQUIRED) -find_package(LCIO REQUIRED) -find_package(DD4hep COMPONENTS DDCore DDRec REQUIRED) +gaudi_add_library(KiTrackLib + SOURCES src/KiTrack/Automaton.cc + src/KiTrack/HopfieldNeuralNet.cc + src/KiTrack/IHit.cc + src/KiTrack/SegmentBuilder.cc + src/KiTrack/Segment.cc -gaudi_depends_on_subdirs(Service/TrackSystemSvc Utilities/DataHelper) + src/Criteria/Crit2_DeltaPhi.cc + src/Criteria/Crit2_DeltaPhi_MV.cc + src/Criteria/Crit2_DeltaRho.cc + src/Criteria/Crit2_DeltaTheta_MV.cc + src/Criteria/Crit2_Distance_MV.cc + src/Criteria/Crit2_HelixWithIP.cc + src/Criteria/Crit2_RZRatio.cc + src/Criteria/Crit2_StraightTrackRatio.cc + src/Criteria/Crit3_2DAngle.cc + src/Criteria/Crit3_2DAngleTimesR.cc + src/Criteria/Crit3_3DAngle.cc + src/Criteria/Crit3_3DAngleTimesR.cc + src/Criteria/Crit3_ChangeRZRatio.cc + src/Criteria/Crit3_IPCircleDist.cc + src/Criteria/Crit3_IPCircleDistTimesR.cc + src/Criteria/Crit3_NoZigZag_MV.cc + src/Criteria/Crit3_PT.cc + src/Criteria/Crit3_PT_MV.cc + src/Criteria/Crit4_2DAngleChange.cc + src/Criteria/Crit4_3DAngleChange.cc + src/Criteria/Crit4_3DAngleChangeNormed.cc + src/Criteria/Crit4_DistOfCircleCenters.cc + src/Criteria/Crit4_DistToExtrapolation.cc + src/Criteria/Crit4_NoZigZag.cc + src/Criteria/Crit4_PhiZRatioChange.cc + src/Criteria/Crit4_RChange.cc + src/Criteria/Criteria.cc + src/Criteria/SimpleCircle.cc -set(KiTrackLib_srcs src/KiTrack/*.cc src/Criteria/*.cc src/ILDImpl/*.cc src/Tools/*.cc) + src/ILDImpl/FTDHit01.cc + src/ILDImpl/FTDHitSimple.cc + src/ILDImpl/FTDNeighborPetalSecCon.cc + src/ILDImpl/FTDSectorConnector.cc + src/ILDImpl/FTDTrack.cc + src/ILDImpl/MiniVector.cc + src/ILDImpl/MiniVectorHit01.cc + src/ILDImpl/SectorSystemFTD.cc + src/ILDImpl/SectorSystemVXD.cc + src/ILDImpl/VXDHit01.cc + src/ILDImpl/VXDHitSimple.cc + src/ILDImpl/VXDSectorConnector.cc + src/ILDImpl/VXDTrack.cc -#gaudi_install_headers(src) -include_directories(src) + src/Tools/Fitter.cc + src/Tools/FTDHelixFitter.cc + src/Tools/KiTrackMarlinTools.cc + src/Tools/Timer.cc -gaudi_add_library(KiTrackLib ${KiTrackLib_srcs} - PUBLIC_HEADERS KiTrack - LINK_LIBRARIES DataHelperLib TrackSystemSvcLib ROOT ${CLHEP_LIBRARIES} GSL EDM4HEP::edm4hep LCIO - # DD4hep + LINK DataHelperLib + TrackSystemSvcLib + ${ROOT_LIBRARIES} + ${CLHEP_LIBRARIES} + ${GSL_LIBRARIES} + EDM4HEP::edm4hep + ${LCIO_LIBRARIES} ) + +target_include_directories(KiTrackLib PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) + +install(TARGETS KiTrackLib + EXPORT CEPCSWTargets + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + COMPONENT dev) diff --git a/Utilities/KiTrack/Criteria/Criteria.h b/Utilities/KiTrack/include/Criteria/Criteria.h similarity index 100% rename from Utilities/KiTrack/Criteria/Criteria.h rename to Utilities/KiTrack/include/Criteria/Criteria.h diff --git a/Utilities/KiTrack/Criteria/ICriterion.h b/Utilities/KiTrack/include/Criteria/ICriterion.h similarity index 100% rename from Utilities/KiTrack/Criteria/ICriterion.h rename to Utilities/KiTrack/include/Criteria/ICriterion.h diff --git a/Utilities/KiTrack/ILDImpl/FTDHit01.h b/Utilities/KiTrack/include/ILDImpl/FTDHit01.h similarity index 100% rename from Utilities/KiTrack/ILDImpl/FTDHit01.h rename to Utilities/KiTrack/include/ILDImpl/FTDHit01.h diff --git a/Utilities/KiTrack/ILDImpl/FTDHitSimple.h b/Utilities/KiTrack/include/ILDImpl/FTDHitSimple.h similarity index 100% rename from Utilities/KiTrack/ILDImpl/FTDHitSimple.h rename to Utilities/KiTrack/include/ILDImpl/FTDHitSimple.h diff --git a/Utilities/KiTrack/ILDImpl/FTDNeighborPetalSecCon.h b/Utilities/KiTrack/include/ILDImpl/FTDNeighborPetalSecCon.h similarity index 100% rename from Utilities/KiTrack/ILDImpl/FTDNeighborPetalSecCon.h rename to Utilities/KiTrack/include/ILDImpl/FTDNeighborPetalSecCon.h diff --git a/Utilities/KiTrack/ILDImpl/FTDSectorConnector.h b/Utilities/KiTrack/include/ILDImpl/FTDSectorConnector.h similarity index 100% rename from Utilities/KiTrack/ILDImpl/FTDSectorConnector.h rename to Utilities/KiTrack/include/ILDImpl/FTDSectorConnector.h diff --git a/Utilities/KiTrack/ILDImpl/FTDTrack.h b/Utilities/KiTrack/include/ILDImpl/FTDTrack.h similarity index 100% rename from Utilities/KiTrack/ILDImpl/FTDTrack.h rename to Utilities/KiTrack/include/ILDImpl/FTDTrack.h diff --git a/Utilities/KiTrack/ILDImpl/IFTDHit.h b/Utilities/KiTrack/include/ILDImpl/IFTDHit.h similarity index 100% rename from Utilities/KiTrack/ILDImpl/IFTDHit.h rename to Utilities/KiTrack/include/ILDImpl/IFTDHit.h diff --git a/Utilities/KiTrack/ILDImpl/SectorSystemFTD.h b/Utilities/KiTrack/include/ILDImpl/SectorSystemFTD.h similarity index 100% rename from Utilities/KiTrack/ILDImpl/SectorSystemFTD.h rename to Utilities/KiTrack/include/ILDImpl/SectorSystemFTD.h diff --git a/Utilities/KiTrack/ILDImpl/SectorSystemVXD.h b/Utilities/KiTrack/include/ILDImpl/SectorSystemVXD.h similarity index 100% rename from Utilities/KiTrack/ILDImpl/SectorSystemVXD.h rename to Utilities/KiTrack/include/ILDImpl/SectorSystemVXD.h diff --git a/Utilities/KiTrack/ILDImpl/VXDHitSimple.h b/Utilities/KiTrack/include/ILDImpl/VXDHitSimple.h similarity index 100% rename from Utilities/KiTrack/ILDImpl/VXDHitSimple.h rename to Utilities/KiTrack/include/ILDImpl/VXDHitSimple.h diff --git a/Utilities/KiTrack/KiTrack/Automaton.h b/Utilities/KiTrack/include/KiTrack/Automaton.h similarity index 100% rename from Utilities/KiTrack/KiTrack/Automaton.h rename to Utilities/KiTrack/include/KiTrack/Automaton.h diff --git a/Utilities/KiTrack/KiTrack/HopfieldNeuralNet.h b/Utilities/KiTrack/include/KiTrack/HopfieldNeuralNet.h similarity index 100% rename from Utilities/KiTrack/KiTrack/HopfieldNeuralNet.h rename to Utilities/KiTrack/include/KiTrack/HopfieldNeuralNet.h diff --git a/Utilities/KiTrack/KiTrack/IHit.h b/Utilities/KiTrack/include/KiTrack/IHit.h similarity index 100% rename from Utilities/KiTrack/KiTrack/IHit.h rename to Utilities/KiTrack/include/KiTrack/IHit.h diff --git a/Utilities/KiTrack/KiTrack/ISectorConnector.h b/Utilities/KiTrack/include/KiTrack/ISectorConnector.h similarity index 100% rename from Utilities/KiTrack/KiTrack/ISectorConnector.h rename to Utilities/KiTrack/include/KiTrack/ISectorConnector.h diff --git a/Utilities/KiTrack/KiTrack/ISectorSystem.h b/Utilities/KiTrack/include/KiTrack/ISectorSystem.h similarity index 100% rename from Utilities/KiTrack/KiTrack/ISectorSystem.h rename to Utilities/KiTrack/include/KiTrack/ISectorSystem.h diff --git a/Utilities/KiTrack/KiTrack/ITrack.h b/Utilities/KiTrack/include/KiTrack/ITrack.h similarity index 100% rename from Utilities/KiTrack/KiTrack/ITrack.h rename to Utilities/KiTrack/include/KiTrack/ITrack.h diff --git a/Utilities/KiTrack/KiTrack/KiTrackExceptions.h b/Utilities/KiTrack/include/KiTrack/KiTrackExceptions.h similarity index 100% rename from Utilities/KiTrack/KiTrack/KiTrackExceptions.h rename to Utilities/KiTrack/include/KiTrack/KiTrackExceptions.h diff --git a/Utilities/KiTrack/KiTrack/Segment.h b/Utilities/KiTrack/include/KiTrack/Segment.h similarity index 100% rename from Utilities/KiTrack/KiTrack/Segment.h rename to Utilities/KiTrack/include/KiTrack/Segment.h diff --git a/Utilities/KiTrack/KiTrack/SegmentBuilder.h b/Utilities/KiTrack/include/KiTrack/SegmentBuilder.h similarity index 100% rename from Utilities/KiTrack/KiTrack/SegmentBuilder.h rename to Utilities/KiTrack/include/KiTrack/SegmentBuilder.h diff --git a/Utilities/KiTrack/KiTrack/Subset.h b/Utilities/KiTrack/include/KiTrack/Subset.h similarity index 100% rename from Utilities/KiTrack/KiTrack/Subset.h rename to Utilities/KiTrack/include/KiTrack/Subset.h diff --git a/Utilities/KiTrack/KiTrack/SubsetHopfieldNN.h b/Utilities/KiTrack/include/KiTrack/SubsetHopfieldNN.h similarity index 100% rename from Utilities/KiTrack/KiTrack/SubsetHopfieldNN.h rename to Utilities/KiTrack/include/KiTrack/SubsetHopfieldNN.h diff --git a/Utilities/KiTrack/KiTrack/SubsetSimple.h b/Utilities/KiTrack/include/KiTrack/SubsetSimple.h similarity index 100% rename from Utilities/KiTrack/KiTrack/SubsetSimple.h rename to Utilities/KiTrack/include/KiTrack/SubsetSimple.h diff --git a/Utilities/KiTrack/Tools/FTDHelixFitter.h b/Utilities/KiTrack/include/Tools/FTDHelixFitter.h similarity index 100% rename from Utilities/KiTrack/Tools/FTDHelixFitter.h rename to Utilities/KiTrack/include/Tools/FTDHelixFitter.h diff --git a/Utilities/KiTrack/Tools/Fitter.h b/Utilities/KiTrack/include/Tools/Fitter.h similarity index 100% rename from Utilities/KiTrack/Tools/Fitter.h rename to Utilities/KiTrack/include/Tools/Fitter.h diff --git a/Utilities/KiTrack/Tools/KiTrackMarlinTools.h b/Utilities/KiTrack/include/Tools/KiTrackMarlinTools.h similarity index 100% rename from Utilities/KiTrack/Tools/KiTrackMarlinTools.h rename to Utilities/KiTrack/include/Tools/KiTrackMarlinTools.h diff --git a/Utilities/KiTrack/src/ILDImpl/#FTDTrack.cc# b/Utilities/KiTrack/src/ILDImpl/#FTDTrack.cc# deleted file mode 100644 index 6d928c374e857ebcc3f08f657a8f873024955dbb..0000000000000000000000000000000000000000 --- a/Utilities/KiTrack/src/ILDImpl/#FTDTrack.cc# +++ /dev/null @@ -1,132 +0,0 @@ -#include "ILDImpl/FTDTrack.h" - - -#include <algorithm> -#include <math.h> - -//#include "UTIL/LCTrackerConf.h" - -// Root, for calculating the chi2 probability. -#include "Math/ProbFunc.h" - - - -using namespace KiTrackMarlin; - -/** @return if the absolute z value of hit a is bigger than that of hit b */ -bool compare_IHit_z( IHit* a, IHit* b ){ - - return ( fabs( a->getZ() ) < fabs( b->getZ() ) ); //compare their z values - -} - - - -FTDTrack::FTDTrack( MarlinTrk::IMarlinTrkSystem* trkSystem ){ - - _trkSystem = trkSystem; - _chi2Prob = 0.; - - _lcioTrack = new edm4hep::Track(); - - -} - -FTDTrack::FTDTrack( std::vector< IFTDHit* > hits , MarlinTrk::IMarlinTrkSystem* trkSystem ){ - - - _trkSystem = trkSystem; - _chi2Prob = 0.; - - _lcioTrack = new edm4hep::Track(); - - for( unsigned i=0; i < hits.size(); i++ ){ - - addHit( hits[i] ); - - - } - -} - - -FTDTrack::FTDTrack( const FTDTrack& f ){ - - //make a new copied lcio track - _lcioTrack = new edm4hep::Track( *f._lcioTrack ); - - - _hits = f._hits; - _chi2Prob = f._chi2Prob; - _trkSystem = f._trkSystem; - -} - -FTDTrack & FTDTrack::operator= (const FTDTrack & f){ - - if (this == &f) return *this; //protect against self assignment - - //make a new copied lcio track - _lcioTrack = new edm4hep::Track( *f._lcioTrack ); - - - _hits = f._hits; - _chi2Prob = f._chi2Prob; - _trkSystem = f._trkSystem; - - return *this; - -} - - - -void FTDTrack::addHit( IFTDHit* hit ){ - if ( hit != NULL ){ - _hits.push_back( hit ); - // and sort the track again - sort( _hits.begin(), _hits.end(), compare_IHit_z ); - _lcioTrack->addToTrackerHits( *hit->getTrackerHit() ); - } -} - - - - - -void FTDTrack::fit() { - - - Fitter fitter( _lcioTrack , _trkSystem ); - - - _lcioTrack->setChi2( fitter.getChi2( 1/*by fucd AtIP=1 in LCIO, changed to CepC rule in future: lcio::TrackState::AtIP*/ ) ); - _lcioTrack->setNdf( fitter.getNdf( 1/*lcio::TrackState::AtIP*/ ) ); - _chi2Prob = fitter.getChi2Prob( 1/*lcio::TrackState::AtIP*/ ); - - edm4hep::TrackState trkState( *fitter.getTrackState( 1/*lcio::TrackState::AtIP*/ ) ) ; - trkState.location = 1/*lcio::TrackState::AtIP*/ ; - _lcioTrack->addToTrackStates( trkState ); - - -} - - -double FTDTrack::getQI() const{ - - - double QI = _chi2Prob; - - // make sure QI is between 0 and 1 - if (QI > 1. ) QI = 1.; - if (QI < 0. ) QI = 0.; - - return QI; - -} - - - - - - - diff --git a/build-k4.sh b/build-k4.sh index f7e7560497b51e2dae4bbf8a3e6ecd0611d3c535..a483d8993ef03f377d1fdd74fecf76d4f1d6adbe 100755 --- a/build-k4.sh +++ b/build-k4.sh @@ -20,7 +20,8 @@ function error:() { } function check-cepcsw-envvar() { - source /cvmfs/sw.hsf.org/key4hep/setup.sh + # source /cvmfs/sw.hsf.org/key4hep/setup.sh + source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh # fix the order of compiler local ccdir=$(dirname $CC) export PATH=$ccdir:$PATH @@ -29,6 +30,10 @@ function check-cepcsw-envvar() { function build-dir() { local blddir=build + if [ -n "${bldtool}" ]; then + blddir=${blddir}.${bldtool} + fi + # If detect the extra env var, append it to the build dir if [ -n "${k4_version}" ]; then blddir=${blddir}.${k4_version} @@ -57,6 +62,16 @@ function run-cmake() { error: "Failed to create $blddir" return 1 fi + local bldgen + if [ -n "$bldtool" ] ; then + case $bldtool in + ninja) + bldgen="-G Ninja" + ;; + *) + ;; + esac + fi cd $blddir @@ -77,7 +92,7 @@ function run-cmake() { local cmake_modules=${pandorapfa_cmake_modules} - cmake .. -DHOST_BINARY_TAG=${k4_platform} \ + cmake .. -DHOST_BINARY_TAG=${k4_platform} ${bldgen} \ -DCMAKE_MODULE_PATH=${cmake_modules} || { error: "Failed to cmake" return 1 @@ -86,7 +101,7 @@ function run-cmake() { } function run-make() { - make + cmake --build . } ############################################################################## @@ -96,6 +111,7 @@ function run-make() { # The current default platform k4_platform=x86_64-linux-gcc9-opt k4_version=master +bldtool=${CEPCSW_BLDTOOL} # make, ninja # set in env var check-cepcsw-envvar || exit -1 diff --git a/build.sh b/build.sh index b7f11d7f4e35995e09bc749de5e3acd41ad13103..718e78011df25d88fdbb932d30d2ffe8fa35c668 100755 --- a/build.sh +++ b/build.sh @@ -30,6 +30,10 @@ function check-cepcsw-envvar() { function build-dir() { local blddir=build + if [ -n "${bldtool}" ]; then + blddir=${blddir}.${bldtool} + fi + # If detect the extra env var, append it to the build dir if [ -n "${lcg_version}" ]; then blddir=${blddir}.${lcg_version} @@ -58,10 +62,20 @@ function run-cmake() { error: "Failed to create $blddir" return 1 fi + local bldgen + if [ -n "$bldtool" ] ; then + case $bldtool in + ninja) + bldgen="-G Ninja" + ;; + *) + ;; + esac + fi cd $blddir - cmake .. -DHOST_BINARY_TAG=${lcg_platform} || { + cmake .. -DHOST_BINARY_TAG=${lcg_platform} ${bldgen} || { error: "Failed to cmake" return 1 } @@ -69,7 +83,7 @@ function run-cmake() { } function run-make() { - make + cmake --build . } ############################################################################## @@ -77,8 +91,10 @@ function run-make() { ############################################################################## # The current default platform -lcg_platform=x86_64-slc6-gcc8-opt -lcg_version=97.0.2 +lcg_platform=x86_64-centos7-gcc8-opt +lcg_version=98.0.0 + +bldtool=${CEPCSW_BLDTOOL} # make, ninja # set in env var check-cepcsw-envvar || exit -1 diff --git a/cmake/CEPCSWConfig.cmake b/cmake/CEPCSWConfig.cmake new file mode 100644 index 0000000000000000000000000000000000000000..4f9445ac3683765653b333811ce5ca8803cec5c6 --- /dev/null +++ b/cmake/CEPCSWConfig.cmake @@ -0,0 +1,13 @@ +include(CMakeFindDependencyMacro) +find_dependency(podio REQUIRED) +find_dependency(Gaudi REQUIRED) +find_dependency(k4FWCore REQUIRED) +find_dependency(EDM4HEP REQUIRED) +find_dependency(ROOT REQUIRED) + +# - Include the targets file to create the imported targets that a client can +# link to (libraries) or execute (programs) +include("${CMAKE_CURRENT_LIST_DIR}/CEPCSWTargets.cmake") + +get_property(TEST_CEPCSW_LIBRARY TARGET CEPCSW::GeomSvc PROPERTY LOCATION) +find_package_handle_standard_args(CEPCSW DEFAULT_MSG CMAKE_CURRENT_LIST_FILE TEST_CEPCSW_LIBRARY) diff --git a/cmake/CEPCSWDependencies.cmake b/cmake/CEPCSWDependencies.cmake new file mode 100644 index 0000000000000000000000000000000000000000..92d8911e3e65a9a6f09548c2aec2b73a082e4c61 --- /dev/null +++ b/cmake/CEPCSWDependencies.cmake @@ -0,0 +1,33 @@ +#[[ + +Find all the dependencies here, so in each package user don't need to find the packages again. + +- CLHEP +- DD4hep +- EDM4hep +- Gaudi +- Geant4 +- GEAR +- GSL +- HepMC +- k4FWCore +- LCContent +- LCIO +- PandoraSDK +- podio +- ROOT +#]] + +find_package(CLHEP REQUIRED;CONFIG) +find_package(DD4hep COMPONENTS DDCore DDG4 DDParsers DDRec REQUIRED) +find_package(EDM4HEP REQUIRED) +find_package(Geant4 REQUIRED ui_all vis_all) +find_package(GEAR REQUIRED) +find_package(GSL REQUIRED) +find_package(HepMC) +find_package(k4FWCore REQUIRED) +find_package(LCContent REQUIRED) +find_package(LCIO REQUIRED) +find_package(PandoraSDK REQUIRED) +find_package(podio REQUIRED) +find_package(ROOT COMPONENTS EG Graf Graf3d Gpad MathCore Net RIO Tree TreePlayer REQUIRED) diff --git a/run.sh b/run.sh index d5739c556c2b6d2c6f3e6a9c00e815f6c2a9d898..991b9f174f543cb691dc22b1c1a670fd8a748a4f 100755 --- a/run.sh +++ b/run.sh @@ -62,8 +62,8 @@ function run-job() { ############################################################################## # The current default platform -lcg_platform=x86_64-slc6-gcc8-opt -lcg_version=97.0.2 +lcg_platform=x86_64-centos7-gcc8-opt +lcg_version=98.0.0 check-cepcsw-envvar || exit -1 diff --git a/setup.sh b/setup.sh index bf0d11953647b9626c0d71c8d206733fba7beb68..44ff6369a32f24d7c1ae39bde6748d9488c7329c 100644 --- a/setup.sh +++ b/setup.sh @@ -30,7 +30,7 @@ function cepcsw-external() { } function setup-external() { - local f=$(cepcsw-external)/setup.sh + local f=$(cepcsw-external)/setup-${CEPCSW_LCG_VERSION}.sh if [ ! -f $f ]; then error: "Failed to find setup script $f" return @@ -49,7 +49,7 @@ function setup-external() { # CEPCSW_LCG_VERSION=${1}; shift if [ -z "$CEPCSW_LCG_VERSION" ]; then - CEPCSW_LCG_VERSION=97.0.2 + CEPCSW_LCG_VERSION=98.0.0 fi export CEPCSW_LCG_VERSION