File indexing completed on 2025-01-18 10:18:27
0001
0002 source strict-mode.sh
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 PROJECT_ROOT="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"/../..
0015 pushd ${PROJECT_ROOT}
0016
0017 echo "Running the DVMP benchmarks"
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 export REQUIRE_DECAY=1
0031 export REQUIRE_LEADING=1
0032 source parse_cmd.sh $@
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043 source benchmarks/Exclusive-Diffraction-Tagging/dvmp/env.sh
0044
0045
0046 GEN_FILE=${INPUT_PATH}/gen-${CONFIG}_${DECAY}_${JUGGLER_N_EVENTS}.hepmc
0047
0048 SIM_FILE=${TMP_PATH}/sim-${CONFIG}_${DECAY}.edm4hep.root
0049 SIM_LOG=${TMP_PATH}/sim-${CONFIG}_${DECAY}.log
0050
0051
0052 REC_FILE=${TMP_PATH}/rec-${CONFIG}_${DECAY}.root
0053 REC_LOG=${TMP_PATH}/sim-${CONFIG}_${DECAY}.log
0054
0055 PLOT_TAG=${CONFIG}_${DECAY}
0056
0057
0058
0059 echo "Running Geant4 simulation"
0060 ls -lrth
0061 ls -lrth input
0062 echo ${TMP_PATH}
0063 ls -lrth ${TMP_PATH}
0064 ddsim --runType batch \
0065 --part.minimalKineticEnergy 100*GeV \
0066 --filter.tracker edep0 \
0067 -v WARNING \
0068 --numberOfEvents ${JUGGLER_N_EVENTS} \
0069 --compactFile ${DETECTOR_PATH}/${DETECTOR_CONFIG}.xml \
0070 --inputFiles ${GEN_FILE} \
0071 --outputFile ${SIM_FILE}
0072 if [ "$?" -ne "0" ] ; then
0073 echo "ERROR running ddsim"
0074 exit 1
0075 fi
0076
0077
0078
0079 echo "Running the digitization and reconstruction"
0080
0081
0082
0083
0084
0085
0086
0087 export JUGGLER_SIM_FILE=${SIM_FILE}
0088 export JUGGLER_REC_FILE=${REC_FILE}
0089 if [ ${RECO} == "eicrecon" ] ; then
0090 eicrecon ${JUGGLER_SIM_FILE} -Ppodio:output_file=${JUGGLER_REC_FILE}
0091 if [[ "$?" -ne "0" ]] ; then
0092 echo "ERROR running eicrecon"
0093 exit 1
0094 fi
0095 fi
0096
0097 if [[ ${RECO} == "juggler" ]] ; then
0098 gaudirun.py options/reconstruction.py || [ $? -eq 4 ]
0099 if [ "$?" -ne "0" ] ; then
0100 echo "ERROR running juggler"
0101 exit 1
0102 fi
0103 fi
0104
0105
0106
0107
0108 CONFIG="${TMP_PATH}/${PLOT_TAG}.json"
0109 cat << EOF > ${CONFIG}
0110 {
0111 "rec_file": "${REC_FILE}",
0112 "vm_name": "${LEADING}",
0113 "decay": "${DECAY}",
0114 "detector": "${DETECTOR_CONFIG}",
0115 "output_prefix": "${RESULTS_PATH}/${PLOT_TAG}",
0116 "test_tag": "${LEADING}_${DECAY}_${BEAM_TAG}"
0117 }
0118 EOF
0119
0120
0121
0122 root -b -q "benchmarks/Exclusive-Diffraction-Tagging/dvmp/analysis/vm_mass.cxx+(\"${CONFIG}\")"
0123 if [ "$?" -ne "0" ] ; then
0124 echo "ERROR running vm_mass script"
0125 exit 1
0126 fi
0127 root -b -q "benchmarks/Exclusive-Diffraction-Tagging/dvmp/analysis/vm_invar.cxx+(\"${CONFIG}\")"
0128 if [ "$?" -ne "0" ] ; then
0129 echo "ERROR running vm_invar script"
0130 exit 1
0131 fi
0132
0133
0134
0135 echo "Finalizing DVMP benchmark"
0136
0137
0138
0139 if [ "${JUGGLER_N_EVENTS}" -lt "500" ] ; then
0140 cp ${REC_FILE} ${RESULTS_PATH}
0141 fi
0142
0143
0144 mv ${REC_LOG} ${RESULTS_PATH}
0145
0146
0147
0148
0149
0150
0151
0152 echo "DVMP benchmarks complete"