3# --------------------------------------------------------------------------------------------
5# Steering script for the compass calibration procedure of the D0ARCW003 (236) detector.
7# --------------------------------------------------------------------------------------------
9if [ -z $JPP_DIR ]; then
10 echo "Variable JPP_DIR undefined."
14source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
16set_variable WORKDIR ${TMPDIR:-/tmp}/
20 usage "$script <detector file>"
24 fatal "Wrong number of arguments."
27set_variable DETECTOR $1
29if [[ ! -f $DETECTOR ]]; then
30 fatal "Missing pre-calibrated D0ARCW003 input detector file"
33rm -f $WORKDIR/compass-*.root
35JCompass.sh detector.datx $RUNS[*] $WORKDIR/compass-\[before\].root
37JConvertDetectorFormat -a detector.datx -o ${TMPDIR:-/tmp}/detector.datx
39JCompass.sh ${TMPDIR:-/tmp}/detector.datx $RUNS[*] $WORKDIR/compass-\[after\].root
41set_variable GRAPHICS_BATCH
43$JPP_DIR/examples/JCompass/plot-compass.sh detector.datx $WORKDIR/compass-\[before\].root $WORKDIR/compass-\[after\].root