Skip to content

Commit

Permalink
Add Gaudi algorithm to perform MVA calibration of cluster energies (#68)
Browse files Browse the repository at this point in the history
* add code to perform MVA calibration of cluster energies

* move find_package to main cmake file and update list of dependencies in README

* implement comments from PR review

* implement comments from PR review

* fix a couple of warnings

* get rid of a warning from another class (not related to this PR..)
  • Loading branch information
giovannimarchiori committed Feb 29, 2024
1 parent 3085a54 commit c432481
Show file tree
Hide file tree
Showing 7 changed files with 530 additions and 4 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ find_package(k4FWCore) # implicit: Gaudi
find_package(EDM4HEP 0.10.1) # implicit: Podio
find_package(DD4hep)
find_package(k4geo)
find_package(ONNXRuntime)
#---------------------------------------------------------------


Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh
* k4FWCore
* DD4hep
* k4geo
* ONNXRuntime


## Building
Expand Down
6 changes: 3 additions & 3 deletions RecCalorimeter/src/components/CorrectCaloClusters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ edm4hep::ClusterCollection* CorrectCaloClusters::initializeOutputClusters(
for (auto const& inCluster: *inClusters) {
auto outCluster = inCluster.clone();
verbose() << "Cluster position:" << endmsg;
verbose() << " x: " << outCluster.position().x << endmsg;
verbose() << " y: " << outCluster.position().y << endmsg;
verbose() << " z: " << outCluster.position().z << endmsg;
verbose() << " x: " << outCluster.getPosition().x << endmsg;
verbose() << " y: " << outCluster.getPosition().y << endmsg;
verbose() << " z: " << outCluster.getPosition().z << endmsg;
outClusters->push_back(outCluster);
}

Expand Down
9 changes: 8 additions & 1 deletion RecFCCeeCalorimeter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# Package: RecFCCeeCalorimeter
################################################################################

# ONNX DEPENDENCIES
# includes
include_directories("${ONNXRUNTIME_INCLUDE_DIRS}")
# libs
link_directories("${ONNXRUNTIME_LIBRARY_DIRS}")

file(GLOB _module_sources src/components/*.cpp)
gaudi_add_module(k4RecFCCeeCalorimeterPlugins
SOURCES ${_module_sources}
Expand All @@ -16,8 +22,8 @@ gaudi_add_module(k4RecFCCeeCalorimeterPlugins
DD4hep::DDG4
ROOT::Core
ROOT::Hist
${ONNXRUNTIME_LIBRARY}
)

install(TARGETS k4RecFCCeeCalorimeterPlugins
EXPORT k4RecCalorimeterTargets
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin
Expand Down Expand Up @@ -51,3 +57,4 @@ add_test(NAME FCCeeLAr_benchmarkCalibration
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)
set_test_env(FCCeeLAr_benchmarkCalibration)

Loading

0 comments on commit c432481

Please sign in to comment.