Skip to content

Commit

Permalink
Merge branch 'HEP-FCC:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
bistapf authored Jul 24, 2023
2 parents 4b70ddc + 83d8503 commit 30da3fb
Show file tree
Hide file tree
Showing 49 changed files with 2,893 additions and 670 deletions.
11 changes: 11 additions & 0 deletions .github/scripts/man2html.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

mkdir -p ./man/html
cd ./man/man1
for MANFILE in *; do
mandoc -Thtml -Ostyle=/css/mandoc.css "${MANFILE}" > "../html/${MANFILE::-1}html"
done
cd ../man7
for MANFILE in *; do
mandoc -Thtml -Ostyle=/css/mandoc.css "${MANFILE}" > "../html/${MANFILE::-1}html"
done
4 changes: 2 additions & 2 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
- SETUP: '/cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh'
NAME: nightly
steps:
- uses: actions/checkout@v2
- uses: cvmfs-contrib/github-action-cvmfs@v2
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v3
- name: Start container
run: |
docker run -it --name CI_container -v ${GITHUB_WORKSPACE}:/Package -v /cvmfs:/cvmfs:shared -d ghcr.io/aidasoft/centos7:latest /bin/bash
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ on: [push]
jobs:
docs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: cvmfs-contrib/github-action-cvmfs@v2
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v3
- name: Start container
run: |
docker run -it --name CI_container -v ${GITHUB_WORKSPACE}:/Package -v /cvmfs:/cvmfs:shared -d ghcr.io/aidasoft/centos7:latest /bin/bash
Expand All @@ -28,3 +26,19 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/doxygen/html
destination_dir: doc/latest
man:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install mandoc
run: |
sudo apt-get install -y mandoc
- name: Compile HTML pages
run: |
.github/scripts/man2html.sh
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./man/html
destination_dir: man/latest
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: cvmfs-contrib/github-action-cvmfs@v2
- uses: cvmfs-contrib/github-action-cvmfs@v3
- name: Start container
run: |
docker run -it --name CI_container -v ${GITHUB_WORKSPACE}:/Package -v /cvmfs:/cvmfs:shared -d ghcr.io/aidasoft/centos7:latest /bin/bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
matrix:
SETUP: ['/cvmfs/sw.hsf.org/key4hep/setup.sh', '/cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh']
steps:
- uses: actions/checkout@v2
- uses: cvmfs-contrib/github-action-cvmfs@v2
- uses: actions/checkout@v3
- uses: cvmfs-contrib/github-action-cvmfs@v3
- name: Start container
run: |
docker run -it --name CI_container -v ${GITHUB_WORKSPACE}:/Package -v /cvmfs:/cvmfs:shared -d ghcr.io/aidasoft/centos7:latest /bin/bash
Expand Down Expand Up @@ -45,5 +45,5 @@ jobs:
docker exec CI_container /bin/bash -c 'cd ./Package
source ${{ matrix.SETUP }}
source ./setup.sh
python config/FCCAnalysisRun.py examples/FCCee/higgs/mH-recoil/mumu/analysis_stage1.py --output myoutput.root --files-list root://eospublic.cern.ch//eos/experiment/fcc/ee/generation/DelphesEvents/spring2021/IDEA/p8_ee_Zbb_ecm91_EvtGen_Bc2TauNuTAUHADNU/events_131527278.root
fccanalysis run examples/FCCee/higgs/mH-recoil/mumu/analysis_stage1.py --output myoutput.root --files-list root://eospublic.cern.ch//eos/experiment/fcc/ee/generation/DelphesEvents/spring2021/IDEA/p8_ee_Zbb_ecm91_EvtGen_Bc2TauNuTAUHADNU/events_131527278.root
'
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,15 @@ file(COPY bin/fccanalysis
install(PROGRAMS bin/fccanalysis DESTINATION bin)


file(GLOB _run_python_files config/*.py)
install(FILES ${_run_python_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/python/config)
install(FILES config/doPlots.py PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ DESTINATION ${CMAKE_INSTALL_PREFIX}/python/config)
file(GLOB _run_python_files python/*.py)
install(FILES ${_run_python_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/python)


file(GLOB _man_files_1 man/man1/*.1)
install(FILES ${_man_files_1} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
file(GLOB _man_files_7 man/man7/*.7)
install(FILES ${_man_files_7} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man7)

#--- Descend into subdirectories ----------------------------------------------

set(ADDONS_LIBRARIES CACHE STRING "List of external libraries the RDF utilities will be linked against")
Expand Down
3 changes: 3 additions & 0 deletions addons/FastJet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ install(FILES
${CMAKE_CURRENT_LIST_DIR}/JetClustering.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/FastJet
)

file(GLOB _addon_python_files python/*.py)
install(FILES ${_addon_python_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/python/addons/FastJet)
3 changes: 3 additions & 0 deletions addons/ONNXRuntime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ if(BUILD_TESTING)
# add all integration tests
add_integration_test("examples/FCCee/weaver/analysis_inference.py")
endif()

file(GLOB _addon_python_files python/*.py)
install(FILES ${_addon_python_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/python/addons/ONNXRuntime)
6 changes: 3 additions & 3 deletions analyzers/dataframe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ message(STATUS " ====== DELPHES LIBRARY = " ${DELPHES_LIBRARY} )
message(STATUS " ====== DELPHES_EXTERNALS_TKCOV_INCLUDE_DIR = " ${DELPHES_EXTERNALS_TKCOV_INCLUDE_DIR} )


target_link_libraries(FCCAnalyses
target_link_libraries(FCCAnalyses PUBLIC
ROOT::Physics
ROOT::MathCore
ROOT::ROOTVecOps
Expand All @@ -73,11 +73,11 @@ target_link_libraries(FCCAnalyses
)

if(WITH_DD4HEP)
target_link_libraries(FCCAnalyses DD4hep::DDCore)
target_link_libraries(FCCAnalyses PUBLIC DD4hep::DDCore)
endif()

if(WITH_ACTS)
target_link_libraries(FCCAnalyses ActsCore)
target_link_libraries(FCCAnalyses PUBLIC ActsCore)
endif()

set_target_properties(FCCAnalyses PROPERTIES
Expand Down
78 changes: 78 additions & 0 deletions analyzers/dataframe/FCCAnalyses/ReconstructedTrack.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#ifndef RECONSTRUCTEDTRACK_ANALYZERS_H
#define RECONSTRUCTEDTRACK_ANALYZERS_H

#include <cmath>
#include <vector>

#include "edm4hep/Quantity.h"
#include "edm4hep/TrackData.h"
#include "edm4hep/TrackState.h"
#include "edm4hep/TrackerHitData.h"

namespace FCCAnalyses {

namespace ReconstructedTrack {

/// for FullSim:
ROOT::VecOps::RVec<edm4hep::TrackState>
TrackStates_at_IP(const ROOT::VecOps::RVec<edm4hep::TrackData> &in,
const ROOT::VecOps::RVec<edm4hep::TrackState> &trackstates);

/// returns the subset of tracks that are common to two collections
ROOT::VecOps::RVec<edm4hep::TrackState>
Intersection(const ROOT::VecOps::RVec<edm4hep::TrackState> &Col1,
const ROOT::VecOps::RVec<edm4hep::TrackState> &Col2);

/// removes a subset of tracks from a large collection
ROOT::VecOps::RVec<edm4hep::TrackState>
Remove(const ROOT::VecOps::RVec<edm4hep::TrackState> &Subset,
const ROOT::VecOps::RVec<edm4hep::TrackState> &LargerCollection);

/// Merge two collections of tracks
ROOT::VecOps::RVec<edm4hep::TrackState>
Merge(const ROOT::VecOps::RVec<edm4hep::TrackState> &Col1,
const ROOT::VecOps::RVec<edm4hep::TrackState> &Col2);

/// indices of a subset of tracks, in the full tracks collection
ROOT::VecOps::RVec<int>
get_indices(const ROOT::VecOps::RVec<edm4hep::TrackState> &some_tracks,
const ROOT::VecOps::RVec<edm4hep::TrackState> &FullTracks);

/// the lengths of a subset of tracks - passed as a vector of indices of these
/// tracks in the full tracks collection
ROOT::VecOps::RVec<float>
tracks_length(const ROOT::VecOps::RVec<int> &track_indices,
const ROOT::VecOps::RVec<float> &length);

ROOT::VecOps::RVec<float>
tracks_length(const ROOT::VecOps::RVec<edm4hep::TrackState> &some_tracks,
const ROOT::VecOps::RVec<edm4hep::TrackState> &FullTracks,
const ROOT::VecOps::RVec<float> &length);

/// the TOF times in ps (times of the hit at the calo entrance )
ROOT::VecOps::RVec<float> tracks_TOF(
const ROOT::VecOps::RVec<int> &track_indices,
const ROOT::VecOps::RVec<edm4hep::TrackData> &trackdata, // Eflowtrack
const ROOT::VecOps::RVec<edm4hep::TrackerHitData> &trackerhits);

ROOT::VecOps::RVec<float> tracks_TOF(
const ROOT::VecOps::RVec<edm4hep::TrackState> &some_tracks,
const ROOT::VecOps::RVec<edm4hep::TrackState> &FullTracks,
const ROOT::VecOps::RVec<edm4hep::TrackData> &trackdata, // Eflowtrack
const ROOT::VecOps::RVec<edm4hep::TrackerHitData> &trackerhits);

/// the dndx values
ROOT::VecOps::RVec<float> tracks_dNdx(
const ROOT::VecOps::RVec<int> &track_indices,
const ROOT::VecOps::RVec<edm4hep::TrackData> &trackdata, // Eflowtrack
const ROOT::VecOps::RVec<edm4hep::Quantity> &dNdx); // ETrackFlow_2

ROOT::VecOps::RVec<float> tracks_dNdx(
const ROOT::VecOps::RVec<edm4hep::TrackState> &some_tracks,
const ROOT::VecOps::RVec<edm4hep::TrackState> &FullTracks,
const ROOT::VecOps::RVec<edm4hep::TrackData> &trackdata, // Eflowtrack
const ROOT::VecOps::RVec<edm4hep::Quantity> &dNdx); // ETrackFlow_2

} // namespace ReconstructedTrack
} // namespace FCCAnalyses
#endif
33 changes: 33 additions & 0 deletions analyzers/dataframe/FCCAnalyses/defines.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#ifndef DEFINES_ANALYZERS_H
#define DEFINES_ANALYZERS_H

#include <cmath>
#include <vector>
#include <math.h>

#include "TLorentzVector.h"
#include "ROOT/RVec.hxx"
#include "edm4hep/ReconstructedParticleData.h"
#include "edm4hep/MCParticleData.h"
#include "edm4hep/ParticleIDData.h"
#include "ReconstructedParticle2MC.h"


namespace FCCAnalyses {


using Vec_b = ROOT::VecOps::RVec<bool>;
using Vec_d = ROOT::VecOps::RVec<double>;
using Vec_f = ROOT::VecOps::RVec<float>;
using Vec_i = ROOT::VecOps::RVec<int>;
using Vec_ui = ROOT::VecOps::RVec<unsigned int>;

using rp = edm4hep::ReconstructedParticleData;
using Vec_rp = ROOT::VecOps::RVec<edm4hep::ReconstructedParticleData>;
using Vec_mc = ROOT::VecOps::RVec<edm4hep::MCParticleData>;
using Vec_tlv = ROOT::VecOps::RVec<TLorentzVector>;


}

#endif
Loading

0 comments on commit 30da3fb

Please sign in to comment.