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