Skip to content
Snippets Groups Projects
Commit f968df1e authored by Chao Peng's avatar Chao Peng
Browse files

update bash script for barrel benchmark

parent 849a4172
No related branches found
No related tags found
1 merge request!84update bash script for barrel benchmark
......@@ -16,7 +16,7 @@ if [[ ! -n "${CB_EMCAL_NUMEV}" ]] ; then
fi
if [[ ! -n "${CB_EMCAL_IEV}" ]] ; then
export CB_EMCAL_IEV=5
export CB_EMCAL_IEV="0, 1, 2, 3, 4"
fi
if [[ ! -n "${CB_EMCAL_ENERGY}" ]] ; then
......@@ -37,8 +37,8 @@ echo "CB_EMCAL_NUMEV = ${CB_EMCAL_NUMEV}"
echo "CB_EMCAL_COMPACT_PATH = ${CB_EMCAL_COMPACT_PATH}"
# Generate the input events
python benchmarks/sampling_ecal/scripts/gen_particles.py ${CB_EMCAL_GEN_FILE} \
--angmin 90 --angmax 90 --parray ${CB_EMCAL_ENERGY} --particles="${particle}"
python benchmarks/sampling_ecal/scripts/gen_particles.py ${CB_EMCAL_GEN_FILE} -n ${CB_EMCAL_NUMEV}\
--angmin 60 --angmax 120 --parray ${CB_EMCAL_ENERGY} --particles="${particle}"
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running script: generating input events"
exit 1
......@@ -80,20 +80,26 @@ fi
# check required python modules
python -m pip install -r benchmarks/sampling_ecal/requirements.txt
# Run analysis script
python ${CB_EMCAL_SCRIPT_DIR}/draw_cluster_layers.py \
${CB_EMCAL_REC_FILE} -e ${CB_EMCAL_IEV} --topo-size=1.0 --compact=${CB_EMCAL_COMPACT_PATH} -o results/${particle}
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running analysis script: draw_cluster_layers"
exit 1
fi
python ${CB_EMCAL_SCRIPT_DIR}/draw_cluster.py \
${CB_EMCAL_REC_FILE} -e ${CB_EMCAL_IEV} --topo-size=2.0 --compact=${CB_EMCAL_COMPACT_PATH} -o results/${particle}
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running analysis script: draw_cluster"
exit 1
fi
IFS=',' read -ra ADDR <<< "$CB_EMCAL_IEV"
for iev in "${ADDR[@]}"; do
if [[ $iev -ge "${CB_EMCAL_NUMEV}" ]] ; then
continue
fi
python ${CB_EMCAL_SCRIPT_DIR}/draw_cluster_layers.py \
${CB_EMCAL_REC_FILE} -e iev --topo-size=1.0 --compact=${CB_EMCAL_COMPACT_PATH} -o results/${particle}
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running analysis script: draw_cluster_layers"
exit 1
fi
python ${CB_EMCAL_SCRIPT_DIR}/draw_cluster.py \
${CB_EMCAL_REC_FILE} -e iev --topo-size=2.0 --compact=${CB_EMCAL_COMPACT_PATH} -o results/${particle}
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running analysis script: draw_cluster"
exit 1
fi
done
python ${CB_EMCAL_SCRIPT_DIR}/energy_profile.py \
${CB_EMCAL_REC_FILE} --type=EM --energy=${CB_EMCAL_ENERGY} -o results/${particle} \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment