diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 49ecec331ea4c095132634b4f229289f5e33429e..fbe2c907b7c9c6931e676ecad80eed4ab26f1faf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,8 +38,6 @@ stages: - compile - generate - simulate - - reconstruct - - analyze - collect - finish - status-report @@ -122,7 +120,6 @@ include: - local: 'benchmarks/dvcs/config.yml' - local: 'benchmarks/tcs/config.yml' - local: 'benchmarks/u_omega/config.yml' - - local: 'benchmarks/single/config.yml' - local: 'benchmarks/backgrounds/config.yml' summary: @@ -134,7 +131,6 @@ summary: - "dvcs:results" - "tcs:results" - "u_omega:results" - - "single:results" - "backgrounds:results" script: - collect_benchmarks.py diff --git a/benchmarks/single/analysis/analyze.cxx b/benchmarks/single/analysis/analyze.cxx deleted file mode 100644 index bdff812f523944d1d3485888dd0fdc2d280e6328..0000000000000000000000000000000000000000 --- a/benchmarks/single/analysis/analyze.cxx +++ /dev/null @@ -1,42 +0,0 @@ -#include <iostream> -#include <string> - -#include <ROOT/RDataFrame.hxx> - -#include <edm4eic/ReconstructedParticleData.h> - -int analyze(std::string file) -{ - // open dataframe - ROOT::RDataFrame df("events", file, {"GeneratedParticles", "ReconstructedChargedParticles"}); - - // count total events - auto count = df.Count(); - if (count == 0) { - std::cout << "Error: No events found" << std::endl; - return -1; - } - - auto n_tracks = [](const std::vector<edm4eic::ReconstructedParticleData> &p) { return (int) p.size(); }; - - auto d = df - .Define("n_tracks_gen", n_tracks, {"GeneratedParticles"}) - .Define("n_tracks_rec", n_tracks, {"ReconstructedChargedParticles"}) - ; - - auto stats_n_tracks_gen = d.Stats("n_tracks_gen"); - auto stats_n_tracks_rec = d.Stats("n_tracks_rec"); - double mean_num_track_thresh = 0.8; - if (file.find("135to177deg") != std::string::npos) { - mean_num_track_thresh = 0.6; - } - if (stats_n_tracks_rec->GetMean() < mean_num_track_thresh) { - std::cout << "Error: too few tracks per events (" << stats_n_tracks_rec->GetMean() << ")" << std::endl; - stats_n_tracks_gen->Print(); - stats_n_tracks_rec->Print(); - return -1; - } - - // success - return 0; -} diff --git a/benchmarks/single/analyze.sh b/benchmarks/single/analyze.sh deleted file mode 100644 index eebf96b6ef5d7283c7e75e67da547c23cb5d668f..0000000000000000000000000000000000000000 --- a/benchmarks/single/analyze.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -source strict-mode.sh - -source $(dirname $0)/common.sh $* - -# Analyze -/usr/bin/time -v \ -root -l -b -q "benchmarks/single/analysis/analyze.cxx+(\"${JUGGLER_REC_FILE}\")" -if [[ "$?" -ne "0" ]] ; then - echo "ERROR analysis failed" - exit 1 -fi - -python benchmarks/dis/analysis/truth_reconstruction.py --rec_file ${JUGGLER_REC_FILE} --config ${JUGGLER_FILE_NAME_TAG}_${DETECTOR_CONFIG} --results_path ${RESULTS_PATH} --nevents ${JUGGLER_N_EVENTS} -if [[ "$?" -ne "0" ]] ; then - echo "ERROR running truth_reconstruction script" - exit 1 -fi diff --git a/benchmarks/single/common.sh b/benchmarks/single/common.sh deleted file mode 100644 index 82d3648b3ffdab73fcf702d49fdcb61b7d972582..0000000000000000000000000000000000000000 --- a/benchmarks/single/common.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -source strict-mode.sh - -if [[ ! -n "${JUGGLER_N_EVENTS}" ]] ; then - export JUGGLER_N_EVENTS=100 -fi - -export JUGGLER_FILE_NAME_TAG="${1:-e-_1GeV_45to135deg}" -export JUGGLER_GEN_FILE="benchmarks/single/${JUGGLER_FILE_NAME_TAG}.steer" -export JUGGLER_SIM_FILE="sim_output/sim_${JUGGLER_FILE_NAME_TAG}.edm4hep.root" -export JUGGLER_REC_FILE_BASE="sim_output/rec_${JUGGLER_FILE_NAME_TAG}" -export JUGGLER_REC_FILE="${JUGGLER_REC_FILE_BASE}.tree.edm4eic.root" - -export BENCHMARK_TAG="single" -echo "Setting up the local environment for the ${BENCHMARK_TAG^^} benchmarks" - -RESULTS_PATH="results/${BENCHMARK_TAG}" -mkdir -p ${RESULTS_PATH} -mkdir -p "${RESULTS_PATH}/truth_reconstruction" -export RESULTS_PATH=`realpath ${RESULTS_PATH}` -echo "RESULTS_PATH: ${RESULTS_PATH}" diff --git a/benchmarks/single/config.yml b/benchmarks/single/config.yml deleted file mode 100644 index 0e5167fb470bf1c795a73aa9eeae00fe4dff3deb..0000000000000000000000000000000000000000 --- a/benchmarks/single/config.yml +++ /dev/null @@ -1,50 +0,0 @@ -single:compile: - extends: .compile_benchmark - stage: compile - script: - - compile_analyses.py single - -single:simulate: - extends: .phy_benchmark - timeout: 2 hours - stage: simulate - needs: ["common:detector"] - parallel: - matrix: - - particle: ['e-', 'pi-'] - energy: ['1GeV'] - angle: ['3to45deg', '45to135deg', '135to177deg'] - script: - - bash benchmarks/single/simulate.sh ${particle}_${energy}_${angle} - -single:reconstruct: - extends: .phy_benchmark - timeout: 2 hours - stage: reconstruct - needs: ["single:simulate"] - parallel: - matrix: - - particle: ['e-', 'pi-'] - energy: ['1GeV'] - angle: ['3to45deg', '45to135deg', '135to177deg'] - script: - - bash benchmarks/single/reconstruct.sh ${particle}_${energy}_${angle} - -single:analyze: - extends: .phy_benchmark - timeout: 2 hours - stage: analyze - needs: ["single:reconstruct", "single:compile"] - parallel: - matrix: - - particle: ['e-', 'pi-'] - energy: ['1GeV'] - angle: ['3to45deg', '45to135deg', '135to177deg'] - script: - - bash benchmarks/single/analyze.sh ${particle}_${energy}_${angle} - -single:results: - stage: collect - needs: ["single:analyze"] - script: - - ls -al diff --git a/benchmarks/single/e-_1GeV_135to177deg.steer b/benchmarks/single/e-_1GeV_135to177deg.steer deleted file mode 100644 index f5ddf317e5a8eeaad373432b928781c9be561b00..0000000000000000000000000000000000000000 --- a/benchmarks/single/e-_1GeV_135to177deg.steer +++ /dev/null @@ -1,11 +0,0 @@ -from DDSim.DD4hepSimulation import DD4hepSimulation -from g4units import mm, GeV, MeV, degree -SIM = DD4hepSimulation() - -SIM.gun.energy = 1*GeV -SIM.gun.particle = "e-" -SIM.gun.position = (0.0, 0.0, 0.0) -SIM.gun.direction = (0.0, 0.0, 1.0) -SIM.gun.distribution = "cos(theta)" -SIM.gun.thetaMin = 135*degree -SIM.gun.thetaMax = 177*degree diff --git a/benchmarks/single/e-_1GeV_3to45deg.steer b/benchmarks/single/e-_1GeV_3to45deg.steer deleted file mode 100644 index f547e2e116d6b7a7bb1896dae75ee09090195fb5..0000000000000000000000000000000000000000 --- a/benchmarks/single/e-_1GeV_3to45deg.steer +++ /dev/null @@ -1,11 +0,0 @@ -from DDSim.DD4hepSimulation import DD4hepSimulation -from g4units import mm, GeV, MeV, degree -SIM = DD4hepSimulation() - -SIM.gun.energy = 1*GeV -SIM.gun.particle = "e-" -SIM.gun.position = (0.0, 0.0, 0.0) -SIM.gun.direction = (0.0, 0.0, 1.0) -SIM.gun.distribution = "cos(theta)" -SIM.gun.thetaMin = 3*degree -SIM.gun.thetaMax = 45*degree diff --git a/benchmarks/single/e-_1GeV_45to135deg.steer b/benchmarks/single/e-_1GeV_45to135deg.steer deleted file mode 100644 index dff3f9515242b432ad37e648f222c7d6f3f7a243..0000000000000000000000000000000000000000 --- a/benchmarks/single/e-_1GeV_45to135deg.steer +++ /dev/null @@ -1,11 +0,0 @@ -from DDSim.DD4hepSimulation import DD4hepSimulation -from g4units import mm, GeV, MeV, degree -SIM = DD4hepSimulation() - -SIM.gun.energy = 1*GeV -SIM.gun.particle = "e-" -SIM.gun.position = (0.0, 0.0, 0.0) -SIM.gun.direction = (0.0, 0.0, 1.0) -SIM.gun.distribution = "cos(theta)" -SIM.gun.thetaMin = 45*degree -SIM.gun.thetaMax = 135*degree \ No newline at end of file diff --git a/benchmarks/single/pi-_1GeV_135to177deg.steer b/benchmarks/single/pi-_1GeV_135to177deg.steer deleted file mode 100644 index 6cedafa2aa22303c19d8fe99088f269948b5651d..0000000000000000000000000000000000000000 --- a/benchmarks/single/pi-_1GeV_135to177deg.steer +++ /dev/null @@ -1,11 +0,0 @@ -from DDSim.DD4hepSimulation import DD4hepSimulation -from g4units import mm, GeV, MeV, degree -SIM = DD4hepSimulation() - -SIM.gun.energy = 1*GeV -SIM.gun.particle = "pi-" -SIM.gun.position = (0.0, 0.0, 0.0) -SIM.gun.direction = (0.0, 0.0, 1.0) -SIM.gun.distribution = "cos(theta)" -SIM.gun.thetaMin = 135*degree -SIM.gun.thetaMax = 177*degree diff --git a/benchmarks/single/pi-_1GeV_3to45deg.steer b/benchmarks/single/pi-_1GeV_3to45deg.steer deleted file mode 100644 index 40d767e5e0037f91e293e53dd3fc7ad5c468a2f6..0000000000000000000000000000000000000000 --- a/benchmarks/single/pi-_1GeV_3to45deg.steer +++ /dev/null @@ -1,11 +0,0 @@ -from DDSim.DD4hepSimulation import DD4hepSimulation -from g4units import mm, GeV, MeV, degree -SIM = DD4hepSimulation() - -SIM.gun.energy = 1*GeV -SIM.gun.particle = "pi-" -SIM.gun.position = (0.0, 0.0, 0.0) -SIM.gun.direction = (0.0, 0.0, 1.0) -SIM.gun.distribution = "cos(theta)" -SIM.gun.thetaMin = 3*degree -SIM.gun.thetaMax = 45*degree diff --git a/benchmarks/single/pi-_1GeV_45to135deg.steer b/benchmarks/single/pi-_1GeV_45to135deg.steer deleted file mode 100644 index 3ec2dac75ef16e6de45dda21ac6caa43d10d0d99..0000000000000000000000000000000000000000 --- a/benchmarks/single/pi-_1GeV_45to135deg.steer +++ /dev/null @@ -1,11 +0,0 @@ -from DDSim.DD4hepSimulation import DD4hepSimulation -from g4units import mm, GeV, MeV, degree -SIM = DD4hepSimulation() - -SIM.gun.energy = 1*GeV -SIM.gun.particle = "pi-" -SIM.gun.position = (0.0, 0.0, 0.0) -SIM.gun.direction = (0.0, 0.0, 1.0) -SIM.gun.distribution = "cos(theta)" -SIM.gun.thetaMin = 45*degree -SIM.gun.thetaMax = 135*degree diff --git a/benchmarks/single/reconstruct.sh b/benchmarks/single/reconstruct.sh deleted file mode 100644 index bfcbed6ed6d6cb6ea2dcb048c68f4d2319dc09bf..0000000000000000000000000000000000000000 --- a/benchmarks/single/reconstruct.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -source strict-mode.sh - -source $(dirname $0)/common.sh $* - -# Reconstruct -if [ ${RECO} == "eicrecon" ] ; then - eicrecon ${JUGGLER_SIM_FILE} -Ppodio:output_file=${JUGGLER_REC_FILE} - if [[ "$?" -ne "0" ]] ; then - echo "ERROR running eicrecon" - exit 1 - fi -fi - -if [[ ${RECO} == "juggler" ]] ; then - gaudirun.py options/reconstruction.py || [ $? -eq 4 ] - if [ "$?" -ne "0" ] ; then - echo "ERROR running juggler" - exit 1 - fi -fi - -if [ -f jana.dot ] ; then cp jana.dot ${JUGGLER_REC_FILE_BASE}.dot ; fi - -rootls -t ${JUGGLER_REC_FILE_BASE}.tree.edm4eic.root diff --git a/benchmarks/single/simulate.sh b/benchmarks/single/simulate.sh deleted file mode 100644 index 5ab79f6d8f947e002c0082c6b95def7f3ff41abf..0000000000000000000000000000000000000000 --- a/benchmarks/single/simulate.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -source strict-mode.sh - -source $(dirname $0)/common.sh $* - -# Simulate -/usr/bin/time -v \ -ddsim --runType run \ - --printLevel WARNING \ - --enableGun \ - --steeringFile ${JUGGLER_GEN_FILE} \ - --numberOfEvents ${JUGGLER_N_EVENTS} \ - --part.minimalKineticEnergy 1*TeV \ - --filter.tracker edep0 \ - --compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \ - --outputFile ${JUGGLER_SIM_FILE} -if [[ "$?" -ne "0" ]] ; then - echo "ERROR running ddsim" - exit 1 -fi