Skip to content

Commit

Permalink
Fixes for LCG98 (#409)
Browse files Browse the repository at this point in the history
* add lcg 98 and corresponding fixes

* fix

* fix

* fix

* fix

* fix
  • Loading branch information
vvolkl authored Oct 12, 2020
1 parent cffceb4 commit 658139d
Show file tree
Hide file tree
Showing 20 changed files with 78 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: false
matrix:
SETUP: ["init_key4hep.sh", 'init_lcg.sh']
SETUP: ["init_key4hep.sh", 'init_lcg_97a_FCC_2.sh', 'init_lcg_98.sh']
steps:
- uses: actions/checkout@v2
- name: Install CVMFS
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

*.log
build*
fcc-edm
install*
build.*.log
Makefile
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ find_package(DD4hep COMPONENTS DDG4 DDRec REQUIRED)
find_package(Geant4)



# Load macros and functions for Gaudi-based projects
find_package(GaudiProject)
#---------------------------------------------------------------
Expand Down Expand Up @@ -75,6 +76,7 @@ install(FILES ${CMAKE_BINARY_DIR}/setup.sh
WORLD_READ)


find_package(FCCEDM)

gaudi_project(FCCSW v0r13
USE Gaudi v33r1 )
Expand Down
4 changes: 2 additions & 2 deletions Detector/DetComponents/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ find_package(Eigen)

gaudi_add_module(DetComponents
src/*.cpp
INCLUDE_DIRS GaudiKernel ROOT DD4hep Geant4 FWCore DetInterface DetSegmentation DetCommon Eigen
LINK_LIBRARIES GaudiKernel ROOT DD4hep ${DD4hep_COMPONENT_LIBRARIES} DetSegmentation DetCommon FWCore)
INCLUDE_DIRS GaudiKernel ROOT DD4hep Geant4 FWCore DetInterface DetSegmentation DetCommon Eigen FCCEDM
LINK_LIBRARIES GaudiKernel ROOT DD4hep ${DD4hep_COMPONENT_LIBRARIES} DetSegmentation DetCommon FWCore FCCEDM)
target_link_libraries(DetComponents ${Geant4_LIBRARIES})
include(CTest)
gaudi_add_test(RedoSegmentationXYZ
Expand Down
4 changes: 2 additions & 2 deletions Detector/DetStudies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ find_package(CLHEP)

gaudi_add_module(DetStudies
src/components/*.cpp
INCLUDE_DIRS GaudiKernel ROOT DD4hep FWCore CLHEP
LINK_LIBRARIES GaudiKernel ROOT DD4hep ${DD4hep_COMPONENT_LIBRARIES} FWCore CLHEP)
INCLUDE_DIRS GaudiKernel ROOT DD4hep FWCore CLHEP FCCEDM
LINK_LIBRARIES GaudiKernel ROOT DD4hep ${DD4hep_COMPONENT_LIBRARIES} FWCore CLHEP FCCEDM)

install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/tests DESTINATION ${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}/DetStudies)

Expand Down
4 changes: 2 additions & 2 deletions Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/options DESTINATION ${CMAKE_INSTALL_

gaudi_add_module(Examples
src/*.cpp
INCLUDE_DIRS ROOT GaudiKernel Geant4 DD4hep SimG4Interface DetInterface DetCommon
LINK_LIBRARIES GaudiAlgLib FWCore DetCommon ROOT GaudiKernel DD4hep
INCLUDE_DIRS ROOT GaudiKernel Geant4 DD4hep SimG4Interface DetInterface DetCommon FCCEDM
LINK_LIBRARIES GaudiAlgLib FWCore DetCommon ROOT GaudiKernel DD4hep FCCEDM
)
target_link_libraries(Examples ${Geant4_LIBRARIES})

Expand Down
1 change: 0 additions & 1 deletion FWCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ gaudi_add_test(ReadTest
FRAMEWORK tests/options/simple_reader.py
DEPENDS ProduceForReadTest)
gaudi_add_test(CheckReadCollectionSize
ENVIRONMENT PYTHONPATH+=${PODIO_PYTHON_DIR}
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMAND python FWCore/tests/scripts/check_coll_after_read.py
DEPENDS ReadTest)
1 change: 1 addition & 0 deletions FWCore/scripts/fcc_dump_joboptions
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def _sanitize(s):
s: str
The sanitized string that should be compatible with gaudirun.py
"""
s = str(s)
s = s.replace('"False"', 'False')
s = s.replace('"True"', 'True')
s = s.replace('"[', '[')
Expand Down
9 changes: 6 additions & 3 deletions FWCore/tests/scripts/check_coll_after_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@
total_px_pileup = 0
total_px_merged = 0

for s, p in zip(particles_signal, particles_pileup):

for i in range(len(particles_signal)):
s = particles_signal[i]
total_px_signal += s.core().p4.px
for i in range(len(particles_pileup)):
p = particles_pileup[i]
total_px_pileup += p.core().p4.px
for m in particles_merged:
for i in range(len(particles_merged)):
m = particles_merged[i]
total_px_merged += m.core().p4.px

# check that we merged the right particles
Expand Down
4 changes: 2 additions & 2 deletions Sim/SimG4Components/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ gaudi_install_python_modules()

gaudi_add_module(SimG4Components
src/*.cpp
INCLUDE_DIRS Geant4 FWCore SimG4Common SimG4Interface DetCommon DD4hep ROOT
LINK_LIBRARIES GaudiAlgLib FWCore SimG4Common DetCommon DD4hep ROOT)
INCLUDE_DIRS Geant4 FWCore SimG4Common SimG4Interface DetCommon DD4hep ROOT FCCEDM
LINK_LIBRARIES GaudiAlgLib FWCore SimG4Common DetCommon DD4hep ROOT FCCEDM)
target_link_libraries(SimG4Components ${Geant4_LIBRARIES})


Expand Down
8 changes: 4 additions & 4 deletions Sim/SimG4Fast/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ find_package(ROOT COMPONENTS Tree)

gaudi_add_library(SimG4Fast
src/lib/*.cpp
INCLUDE_DIRS SimG4Common FWCore SimG4Components SimG4Interface Geant4 ROOT
LINK_LIBRARIES GaudiAlgLib SimG4Common ROOT
INCLUDE_DIRS SimG4Common FWCore SimG4Components SimG4Interface Geant4 ROOT FCCEDM
LINK_LIBRARIES GaudiAlgLib SimG4Common ROOT FCCEDM
PUBLIC_HEADERS SimG4Fast)
target_link_libraries(SimG4Fast ${Geant4_LIBRARIES})

gaudi_add_module(SimG4FastPlugins
src/components/*.cpp
INCLUDE_DIRS Geant4 SimG4Common SimG4Fast SimG4Interface
LINK_LIBRARIES GaudiAlgLib SimG4Fast SimG4Common)
INCLUDE_DIRS Geant4 SimG4Common SimG4Fast SimG4Interface FCCEDM
LINK_LIBRARIES GaudiAlgLib SimG4Fast SimG4Common FCCEDM)
target_link_libraries(SimG4FastPlugins ${Geant4_LIBRARIES})
4 changes: 2 additions & 2 deletions Test/TestFWCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ gaudi_depends_on_subdirs(GaudiAlg GaudiKernel FWCore Generation)

gaudi_add_module(TestFWCorePlugins
src/components/*.cpp
INCLUDE_DIRS FWCore
LINK_LIBRARIES GaudiKernel FWCore)
INCLUDE_DIRS FWCore FCCEDM
LINK_LIBRARIES GaudiKernel FWCore FCCEDM)


include(CTest)
Expand Down
4 changes: 2 additions & 2 deletions Test/TestGeneration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ gaudi_depends_on_subdirs(GaudiAlg GaudiKernel FWCore Generation)

gaudi_add_module(TestGenerationPlugins
src/components/*.cpp
INCLUDE_DIRS FWCore HepMC
LINK_LIBRARIES GaudiKernel FWCore HepMC)
INCLUDE_DIRS FWCore HepMC FCCEDM
LINK_LIBRARIES GaudiKernel FWCore HepMC FCCEDM)

include(CTest)
gaudi_add_test(EDM2HepMCConverstion
Expand Down
4 changes: 2 additions & 2 deletions Test/TestGeometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ find_package(ROOT COMPONENTS MathCore GenVector Geom REQUIRED)

gaudi_add_module(TestGeometry
src/components/*.cpp
INCLUDE_DIRS Geant4 FWCore SimG4Interface SimG4Common DetInterface DetCommon TestGeometryLib
LINK_LIBRARIES GaudiKernel FWCore DetCommon TestGeometryLib)
INCLUDE_DIRS Geant4 FWCore SimG4Interface SimG4Common DetInterface DetCommon TestGeometryLib FCCEDM
LINK_LIBRARIES GaudiKernel FWCore DetCommon TestGeometryLib FCCEDM)
target_link_libraries(TestGeometry ${Geant4_LIBRARIES})


Expand Down
4 changes: 2 additions & 2 deletions Test/TestReconstruction/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ find_package(ROOT COMPONENTS Geom)

gaudi_add_module(TestReconstructionPlugins
src/*.cpp
INCLUDE_DIRS FWCore DetInterface TrackingUtils Geant4 DetCommon DetSegmentation GaudiKernel
LINK_LIBRARIES FWCore GaudiAlgLib FWCore TrackingUtils DetCommon DetSegmentation)
INCLUDE_DIRS FWCore DetInterface TrackingUtils Geant4 DetCommon DetSegmentation GaudiKernel FCCEDM
LINK_LIBRARIES FWCore GaudiAlgLib FWCore TrackingUtils DetCommon DetSegmentation FCCEDM)
target_link_libraries(TestReconstructionPlugins ${Geant4_LIBRARIES})

include(CTest)
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindEvtGen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ FIND_PATH(EVTGEN_INCLUDE_DIR NAMES EvtGen/EvtGen.hh

FIND_PATH(EVTGEN_LIBRARY_DIR NAMES libEvtGen.so
HINTS ${searchpath}
PATH_SUFFIXES lib)
PATH_SUFFIXES lib lib64)

set(EVTGEN_LIBRARIES ${EVTGEN_LIBRARY_DIR}/libEvtGen.so ${EVTGEN_LIBRARY_DIR}/libEvtGenExternal.so)

Expand Down
2 changes: 1 addition & 1 deletion init.sh
9 changes: 9 additions & 0 deletions init_lcg_97a_FCC_2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
LCGPREFIX=/cvmfs/sft.cern.ch/lcg
export BINARY_TAG=x86_64-centos7-gcc8-opt
LCGPATH=$LCGPREFIX/views/LCG_97a_FCC_2/$BINARY_TAG
source $LCGPATH/bin/thisdd4hep_only.sh
source $LCGPATH/setup.sh


export Gaudi_DIR=$(dirname $(readlink -f "$(which gaudirun.py)"))/../
export CMAKE_PREFIX_PATH=$Gaudi_DIR:$CMAKE_PREFIX_PATH
29 changes: 29 additions & 0 deletions init_lcg_98.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
LCGPREFIX=/cvmfs/sft.cern.ch/lcg
export BINARY_TAG=x86_64-centos7-gcc8-opt
LCGPATH=$LCGPREFIX/views/LCG_98/$BINARY_TAG
source $LCGPATH/bin/thisdd4hep_only.sh
source $LCGPATH/setup.sh


# make sure Gaudi.xenv can be found

export Gaudi_DIR=$(dirname $(readlink -f "$(which gaudirun.py)"))/../
export CMAKE_PREFIX_PATH=$Gaudi_DIR:$CMAKE_PREFIX_PATH

# build FCC-dependencies on top of LCG

if [ ! -d "./fcc-edm" ]
then
git clone --depth=1 https://github.com/hep-fcc/fcc-edm
cd fcc-edm; mkdir build install; cd build;
cmake .. -DCMAKE_INSTALL_PREFIX=../install
make -j `getconf _NPROCESSORS_ONLN` install
cd ../
export CMAKE_PREFIX_PATH=$PWD/install:$CMAKE_PREFIX_PATH
export ROOT_INCLUDE_PATH=$PWD/install/include/datamodel:$PWD/install/:$ROOT_INCLUDE_PATH
export LD_LIBRARY_PATH=$PWD/install/lib/:$PWD/install/lib64/$LD_LIBRARY_PATH
touch .gaudi_project_ignore
cd ../
fi


7 changes: 7 additions & 0 deletions init_lcg.sh → test_lcg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ source $LCGPATH/bin/thisdd4hep_only.sh
export Gaudi_DIR=/cvmfs/sft.cern.ch/lcg/releases/Gaudi/v33r1-2775b/x86_64-centos7-gcc8-opt
export CMAKE_PREFIX_PATH=$Gaudi_DIR:$CMAKE_PREFIX_PATH
source /cvmfs/sft.cern.ch/lcg/views/LCG_97a_FCC_2/x86_64-centos7-gcc8-opt/setup.sh

export FCCSWBASEDIR=/cvmfs/sft.cern.ch/lcg/releases/fccsw/0.13-5b877/x86_64-centos7-gcc8-opt/
export FCCSWSHAREDIR=$FCCSWBASEDIR/share/FCCSW
export FCC_DETECTORS=$FCCSWSHAREDIR
export FCC_PYTHIACARDS=$FCCSWSHAREDIR
export FCCSW=/cvmfs/sft.cern.ch/lcg/releases/fccsw/0.13-5b877/x86_64-centos7-gcc8-opt/share/FCCSW

0 comments on commit 658139d

Please sign in to comment.