Skip to content

Commit

Permalink
Merge pull request #173 from BrieucF/ctestALLEGROv03
Browse files Browse the repository at this point in the history
[FullSim] Add ALLEGRO_o1_v03 sim digi reco cetst
  • Loading branch information
BrieucF authored Jul 4, 2024
2 parents 25a73e9 + c7df30b commit 5f2c548
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 26 deletions.
46 changes: 20 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
name: linux
name: CTESTS

on:
push:
branches:
- main
pull_request:
workflow_dispatch:
schedule:
- cron: '16 5 * * *'

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
build:
strategy:
fail-fast: false
matrix:
SETUP: ['/cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh']
build_type: ["release", "nightly"]
image: ["alma9", "ubuntu22"]
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cvmfs-contrib/github-action-cvmfs@v2
- 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
- name: Test
run: |
docker exec CI_container /bin/bash -c 'cd ./Package;\
source ${{ matrix.SETUP }};\
ddsim --enableGun --gun.distribution uniform --gun.energy "10*GeV" --gun.particle e- --numberOfEvents 100 --outputFile ALLEGRO_sim.root --random.enableEventSeed --random.seed 42 --compactFile $K4GEO/FCCee/ALLEGRO/compact/ALLEGRO_o1_v02/ALLEGRO_o1_v02.xml;
mkdir data;
cd data;
curl -O -L http://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v02/elecNoise_ecalBarrelFCCee_theta.root;
curl -O -L http://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v02/cellNoise_map_electronicsNoiseLevel_thetamodulemerged.root;
curl -O -L http://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v02/neighbours_map_barrel_thetamodulemerged.root;
cd ..;
k4run FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v02/run_digi_reco.py'
- uses: actions/checkout@v4
- uses: key4hep/key4hep-actions/key4hep-build@main
with:
build_type: ${{ matrix.build_type }}
image: ${{ matrix.image }}
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ project(FCC-config)
include(GNUInstallDirs)

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

# TESTING
include(CTest)
add_test(NAME ALLEGRO_o1_v03 COMMAND ../FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/ctest_sim_digi_reco.sh)
23 changes: 23 additions & 0 deletions FCCee/FullSim/ALLEGRO/ALLEGRO_o1_v03/ctest_sim_digi_reco.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# set-up the environment
source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh

# run the SIM step
ddsim --enableGun --gun.distribution uniform --gun.energy "10*GeV" --gun.particle e- --numberOfEvents 10 --outputFile ALLEGRO_sim.root --random.enableEventSeed --random.seed 42 --compactFile $K4GEO/FCCee/ALLEGRO/compact/ALLEGRO_o1_v03/ALLEGRO_o1_v03.xml

# get the files needed for calibration, noise, neighbor finding, etc
if ! test -f ./neighbours_map_ecalB_thetamodulemerged_hcalB_thetaphi.root; then # assumes that if the last file exists, all the other as well
wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/capacitances_ecalBarrelFCCee_theta.root
wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/cellNoise_map_electronicsNoiseLevel_ecalB_thetamodulemerged.root
wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/cellNoise_map_electronicsNoiseLevel_ecalB_thetamodulemerged_hcalB_thetaphi.root
wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/elecNoise_ecalBarrelFCCee_theta.root
wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/lgbm_calibration-CaloClusters.onnx
wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/lgbm_calibration-CaloTopoClusters.onnx
wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/neighbours_map_ecalB_thetamodulemerged.root
wget https://fccsw.web.cern.ch/fccsw/filesForSimDigiReco/ALLEGRO/ALLEGRO_o1_v03/neighbours_map_ecalB_thetamodulemerged_hcalB_thetaphi.root
fi

# run the RECO step
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) # workaround to have ctests working
k4run $SCRIPT_DIR/run_digi_reco.py

0 comments on commit 5f2c548

Please sign in to comment.