Skip to content
Snippets Groups Projects
Commit fb1ca6d3 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Add finegrained scripts for single

parent 47b33adf
No related branches found
No related tags found
1 merge request!148Rename stage process to simulate, reconstruct, analyze
This commit is part of merge request !148. Comments created here will be created in the context of that merge request.
#!/bin/bash
source common.sh $*
# Analyze
root -l -b -q "benchmarks/single/analysis/analyze.cxx+(\"${JUGGLER_REC_FILE}\")"
if [[ "$?" -ne "0" ]] ; then
echo "ERROR analysis failed"
exit 1
fi
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_${JUGGLER_FILE_NAME_TAG}.edm4hep.root"
export JUGGLER_REC_FILE="rec_${JUGGLER_FILE_NAME_TAG}.root"
...@@ -4,10 +4,34 @@ single:compile: ...@@ -4,10 +4,34 @@ single:compile:
script: script:
- compile_analyses.py single - compile_analyses.py single
single:simulate: single:simulate_old:
extends: .phy_benchmark extends: .phy_benchmark
timeout: 24 hours timeout: 24 hours
stage: simulate stage: simulate
needs: ["common:detector", "single:compile"] needs: ["common:detector", "single:compile"]
script: script:
- bash benchmarks/single/single.sh e-_1GeV_45to135deg - bash benchmarks/single/single.sh e-_1GeV_45to135deg
single:simulate:
extends: .phy_benchmark
timeout: 2 hours
stage: simulate
needs: ["common:detector"]
script:
- bash benchmarks/single/simulate.sh e-_1GeV_45to135deg
single:reconstruct:
extends: .phy_benchmark
timeout: 2 hours
stage: reconstruct
needs: ["single:simulate"]
script:
- bash benchmarks/single/reconstruct.sh e-_1GeV_45to135deg
single:analyze:
extends: .phy_benchmark
timeout: 2 hours
stage: analyze
needs: ["single:reconstruct", "single:compile"]
script:
- bash benchmarks/single/analyze.sh e-_1GeV_45to135deg
#!/bin/bash
source common.sh $*
# Reconstruct
for rec in options/*.py ; do
unset tag
[[ $(basename ${rec} .py) =~ (.*)\.(.*) ]] && tag=".${BASH_REMATCH[2]}"
JUGGLER_REC_FILE=${JUGGLER_REC_FILE/.root/${tag:-}.root} \
gaudirun.py ${JUGGLER_GAUDI_OPTIONS:-} ${rec}
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running juggler"
exit 1
fi
done
#!/bin/bash
source common.sh $*
# Simulate
ddsim --runType run \
--printLevel WARNING \
--enableGun \
--steeringFile ${JUGGLER_GEN_FILE} \
--numberOfEvents ${JUGGLER_N_EVENTS} \
--part.minimalKineticEnergy 1*TeV \
--filter.tracker edep0 \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \
--outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running ddsim"
exit 1
fi
...@@ -29,14 +29,14 @@ for rec in options/*.py ; do ...@@ -29,14 +29,14 @@ for rec in options/*.py ; do
unset tag unset tag
[[ $(basename ${rec} .py) =~ (.*)\.(.*) ]] && tag=".${BASH_REMATCH[2]}" [[ $(basename ${rec} .py) =~ (.*)\.(.*) ]] && tag=".${BASH_REMATCH[2]}"
JUGGLER_REC_FILE=${JUGGLER_REC_FILE/.root/${tag:-}.root} \ JUGGLER_REC_FILE=${JUGGLER_REC_FILE/.root/${tag:-}.root} \
gaudirun.py ${rec} gaudirun.py ${JUGGLER_GAUDI_OPTIONS:-} ${rec}
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "ERROR running juggler" echo "ERROR running juggler"
exit 1 exit 1
fi fi
done done
# Analysis # Analyze
root -l -b -q "benchmarks/single/analysis/analyze.cxx+(\"${JUGGLER_REC_FILE}\")" root -l -b -q "benchmarks/single/analysis/analyze.cxx+(\"${JUGGLER_REC_FILE}\")"
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
echo "ERROR analysis failed" echo "ERROR analysis failed"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment