Skip to content

Commit

Permalink
Merge branch 'main' of github.com:eic/EICrecon into lgpl-license
Browse files Browse the repository at this point in the history
  • Loading branch information
faustus123 committed Oct 18, 2022
2 parents ccbb17b + a988f3a commit 9864497
Show file tree
Hide file tree
Showing 203 changed files with 8,192 additions and 2,399 deletions.
43 changes: 23 additions & 20 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,29 @@ jobs:
container:
image: alpine:latest
volumes:
- /home/runner/work/_temp:/home/runner/work/_temp
- /home/runner/work/_temp:/home/runner/work/_temp
# FIXME hard-coded: see https://github.com/actions/upload-pages-artifact/pull/14
steps:
- uses: actions/checkout@v2
- run: |
apk add doxygen graphviz
doxygen Doxyfile
- uses: actions/upload-artifact@v3
with:
name: docs
path: html/
if-no-files-found: error
- run: |
apk add tar bash
- uses: actions/checkout@v2
- run: |
apk add doxygen graphviz
doxygen Doxyfile
cp -r docs publishing_docs
mv html publishing_docs/doxygen
- uses: actions/upload-artifact@v3
with:
name: docs
path: publishing_docs/
if-no-files-found: error
- run:

apk add tar bash
# FIXME bash not really required: see https://github.com/actions/upload-pages-artifact/pull/14
- uses: actions/upload-pages-artifact@v1
if: github.ref == 'refs/heads/main'
with:
path: html/
retention-days: 7
- uses: actions/upload-pages-artifact@v1
if: github.ref == 'refs/heads/main'
with:
path: publishing_docs/
retention-days: 7

deploy-docs:
needs: build-docs
Expand All @@ -43,6 +46,6 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
31 changes: 24 additions & 7 deletions .github/workflows/linux-eic-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,41 @@ concurrency:
cancel-in-progress: true

jobs:
build-test:
build-gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v2
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
setup: /opt/detector/epic-nightly/setup.sh
run: |
# install this repo
cmake -B build -S . \
-DDETECTOR_LIBS_EPIC=/opt/detector/epic-nightly/lib/libepic.so \
-DDETECTOR_LIBS_IP6=/opt/detector/epic-nightly/lib/libip6.so
CC=gcc CXX=g++ cmake -B build -S .
cmake --build build -- install
- uses: actions/upload-artifact@v3
with:
name: build-eic-shell-epic-nightly
name: build-gcc-eic-shell
path: |
.
!src/
if-no-files-found: error

build-clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v2
- uses: eic/run-cvmfs-osg-eic-shell@main
with:
platform-release: "jug_xl:nightly"
run: |
# install this repo
CC=clang CXX=clang++ cmake -B build -S .
cmake --build build -- install
- uses: actions/upload-artifact@v3
with:
name: build-clang-eic-shell
path: |
.
!src/
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ src/services/io/podio/datamodel_glue.h
include/*
plugins/*
build/*
install/*

##### C++ basic gitignore #####

Expand Down Expand Up @@ -149,3 +150,9 @@ lib/

/tests
/build

src/tools/default_flags_table/__pycache__/

src/tools/default_flags_table/calibrations/

src/tools/default_flags_table/fieldmaps/
26 changes: 24 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

cmake_minimum_required(VERSION 3.16)

project(EICRecon VERSION 0.0.0)
project(EICRecon VERSION 0.2.3)

# Make C++17 a default
if(NOT "${CMAKE_CXX_STANDARD}")
Expand Down Expand Up @@ -63,6 +63,27 @@ message(STATUS "${CMAKE_PROJECT_NAME}: JANA2 CMake : ${JANA_DIR}")
message(STATUS "${CMAKE_PROJECT_NAME}: JANA2 includes: ${JANA_INCLUDE_DIR}")
message(STATUS "${CMAKE_PROJECT_NAME}: JANA2 library : ${JANA_LIBRARY}")

# PODIO, EDM4HEP, EDM4EIC event models
find_package(podio REQUIRED)
find_package(EDM4HEP REQUIRED)
find_package(EDM4EIC REQUIRED)
set(EDM4EIC_INCLUDE_DIR ${EDM4EIC_DIR}/../../include)

# DD4Hep is required for the most of the part
find_package(DD4hep REQUIRED)

# ACTS
find_package(Acts REQUIRED COMPONENTS Core PluginIdentification PluginTGeo PluginDD4hep)
set(Acts_VERSION_MIN "19.0.0")
set(Acts_VERSION "${Acts_VERSION_MAJOR}.${Acts_VERSION_MINOR}.${Acts_VERSION_PATCH}")
if(${Acts_VERSION} VERSION_LESS ${Acts_VERSION_MIN}
AND NOT "${Acts_VERSION}" STREQUAL "9.9.9")
message(FATAL_ERROR "Acts version ${Acts_VERSION_MIN} or higher required, but ${Acts_VERSION} found")
endif()
set(Acts_INCLUDE_DIRS ${Acts_DIR}/../../../include ${ActsDD4hep_DIR}/../../../include )

# CERN ROOT
find_package(ROOT REQUIRED)

# Set it ON for additional CMake printout
set(EICRECON_VERBOSE_CMAKE OFF)
Expand All @@ -78,15 +99,16 @@ list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) # Find Find<Modules>
# ------------------------------------------------------------------
print_grand_header(" B U I L D E I C R E C O N P A R T S ")
# ------------------------------------------------------------------
add_subdirectory( src/services )
add_subdirectory( src/algorithms )
add_subdirectory( src/benchmarks )
add_subdirectory( src/detectors )
add_subdirectory( src/examples )
add_subdirectory( src/global )
add_subdirectory( src/scripts )
add_subdirectory( src/services )
add_subdirectory( src/tests )
add_subdirectory( src/utilities )
add_subdirectory( src/tools/default_flags_table )



Expand Down
20 changes: 6 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,14 @@ The repository contains reconstruction source code for the EPIC detector. It's f
is to take real or simulated data and reconstruct it into physical values
for later analysis.

- [Documentation website](https://eic.github.io/EICrecon/#/)
- [Getting started instruction with eic-shell](https://eic.github.io/EICrecon/#/get-started/eic-shell)


If you are new to EIC software then you should start with the tutorials which
can be found here:
[https://indico.bnl.gov/category/443/](https://indico.bnl.gov/category/443/)

A preliminary tutorial on JANA2 is being developed here:
[https://faustus123.github.io/tutorial-jana2](https://faustus123.github.io/tutorial-jana2/index.html)


## Table of contents
1. [Getting started with eic-shell](./docs/Use_with_eic_shell.md)
2. [Creating a user plugin (custom histograms/trees)](./docs/HowTo_make_plugin.md)
3. [Adding a factory (algorithm)](./docs/HowTo_add_factory.md)
4. [Contributing and Conventions](./CONTRIBUTING.md)
5. [Logging](./docs/Logging.md)
6. [Manual Build instructions](./docs/Manual_Build.md)
* [Installation via EDPM](./docs/EDPM.md)
7. [Tracking implementation](./docs/tracking_implementation.md)

A preliminary tutorial on JANA2
[is being developed here](https://eic.github.io/EICrecon/#/tutorial/01-introduction)

85 changes: 81 additions & 4 deletions cmake/jana_plugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ macro(plugin_add _name)

# include logging by default
find_package(spdlog REQUIRED)
find_package(fmt REQUIRED)
set(fmt_INCLUDE_DIR ${fmt_DIR}/../../../include)

# include ROOT by default
find_package(ROOT REQUIRED)
Expand All @@ -29,7 +27,6 @@ macro(plugin_add _name)
target_include_directories(${_name}_plugin PUBLIC ${CMAKE_SOURCE_DIR}/src)
target_include_directories(${_name}_plugin SYSTEM PUBLIC ${JANA_INCLUDE_DIR} )
target_include_directories(${_name}_plugin SYSTEM PUBLIC ${ROOT_INCLUDE_DIRS} )
target_include_directories(${_name}_plugin SYSTEM PUBLIC ${fmt_INCLUDE_DIR} )
set_target_properties(${_name}_plugin PROPERTIES PREFIX "" OUTPUT_NAME "${_name}" SUFFIX ".so")
target_link_libraries(${_name}_plugin ${JANA_LIB} spdlog::spdlog)

Expand All @@ -42,7 +39,6 @@ macro(plugin_add _name)
add_library(${_name}_library STATIC "")
target_include_directories(${_name}_library PUBLIC ${CMAKE_SOURCE_DIR}/src)
target_include_directories(${_name}_library SYSTEM PUBLIC ${JANA_INCLUDE_DIR} )
target_include_directories(${_name}_library SYSTEM PUBLIC ${fmt_INCLUDE_DIR} )
set_target_properties(${_name}_library PROPERTIES PREFIX "lib" OUTPUT_NAME "${_name}" SUFFIX ".a")
target_link_libraries(${_name}_library ${JANA_LIB} spdlog::spdlog)

Expand Down Expand Up @@ -153,3 +149,84 @@ macro(plugin_glob_all _name)
print_file_names(" " ${HEADER_FILES}) # Prints header files

endmacro()


# Adds dd4hep for a plugin
macro(plugin_add_dd4hep _name)

if(NOT DD4hep_FOUND)
find_package(DD4hep REQUIRED)
endif()

plugin_include_directories(${_name} SYSTEM PUBLIC ${DD4hep_INCLUDE_DIRS})
plugin_link_libraries(${_name} DD4hep::DDCore DD4hep::DDRec)

endmacro()


# Adds ACTS tracking package for a plugin
macro(plugin_add_acts _name)

if(NOT Acts_FOUND)
find_package(Acts REQUIRED COMPONENTS Core PluginIdentification PluginTGeo PluginJson PluginDD4hep)
set(Acts_VERSION_MIN "19.0.0")
set(Acts_VERSION "${Acts_VERSION_MAJOR}.${Acts_VERSION_MINOR}.${Acts_VERSION_PATCH}")
if(${Acts_VERSION} VERSION_LESS ${Acts_VERSION_MIN}
AND NOT "${Acts_VERSION}" STREQUAL "9.9.9")
message(FATAL_ERROR "Acts version ${Acts_VERSION_MIN} or higher required, but ${Acts_VERSION} found")
endif()

set(Acts_INCLUDE_DIRS ${Acts_DIR}/../../../include ${ActsDD4hep_DIR}/../../../include )
endif()

# Add include directories (works same as target_include_directories)
plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC ${Acts_INCLUDE_DIRS})

# Add libraries (works same as target_include_directories)
plugin_link_libraries(${PLUGIN_NAME} ActsCore ActsPluginIdentification ActsPluginTGeo ActsPluginJson ActsPluginDD4hep)
endmacro()

# Adds podio, edm4hep, edm4eic for a plugin
macro(plugin_add_event_model _name)

if(NOT podio_FOUND)
find_package(podio REQUIRED)
endif()

if(NOT EDM4HEP_FOUND)
find_package(EDM4HEP REQUIRED)
endif()

if(NOT EDM4EIC_FOUND)
find_package(EDM4EIC REQUIRED)
set(EDM4EIC_INCLUDE_DIR ${EDM4EIC_DIR}/../../include)
endif()

# Add include directories
# (same as target_include_directories but for both plugin and library)
plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC ${podio_INCLUDE_DIR} ${EDM4EIC_INCLUDE_DIR} ${EDM4HEP_INCLUDE_DIR})

# Add libraries
# (same as target_include_directories but for both plugin and library)
plugin_link_libraries(${PLUGIN_NAME}
EDM4EIC::edm4eic
EDM4HEP::edm4hep
)
endmacro()


# Adds cern ROOT for a plugin
macro(plugin_add_cern_root _name)

if(NOT ROOT_FOUND)
#find_package(ROOT REQUIRED COMPONENTS Core Tree Hist RIO EG)
find_package(ROOT REQUIRED)
endif()

# Add include directories
plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC ${ROOT_INCLUDE_DIRS} )

# Add libraries
#plugin_link_libraries(${PLUGIN_NAME} ${ROOT_LIBRARIES} EDM4EIC::edm4eic algorithms_digi_library algorithms_tracking_library ROOT::EG)
plugin_link_libraries(${PLUGIN_NAME} ${ROOT_LIBRARIES})
endmacro()
4 changes: 4 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
.cache/
public
.idea/
Empty file added docs/.nojekyll
Empty file.
7 changes: 7 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# EICrecon

**JANA based reconstruction for the EPIC detector**

<img src="demo.png" style="max-height: 300px"/>


26 changes: 26 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
* [Home](/)
* Getting started
* [EIC shell (recommended)](get-started/eic-shell.md)
* [Manual build](get-started/manual-build.md)
* [EDPM](get-started/edpm.md)
* HowTo
* [Make Plugin](howto/make_plugin.md)
* [Add Factory](howto/add_factory.md)
* Design
* [Flags&Env](design/common_flags_env.md)
* [Cmake](design/cmake.md)
* [Logging](design/logging.md)
* [Tracking](design/tracking.md)
* [Particle Matching](design/particle_matching.md)
* [Gaudi Algorithms](design/gaudi-algorithms.md)
* Tutorials
* [Introduction](tutorial/01-introduction.md)
* [Work environment](tutorial/02-work-environment.md)
* [End user plugin](tutorial/03-end-user-plugin.md)
* [Factory](tutorial/04-factory.md)
* [Contributing](tutorial/05-contributing.md)
* Misc
* [References](misc/references.md)
* [This website](misc/this_website.md)
* Table flags
* [Table flags](table_flags/flags.md)
Binary file added docs/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9864497

Please sign in to comment.