3# --------------------------------------------------------------------------------------------
5# Steering script for the compass calibration procedure of the D0ARCA006 (75) 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}/
17set_array RUNS 9690-9701
20 usage "$script <detector file>"
24 fatal "Wrong number of arguments."
27set_variable DETECTOR $1
29if [[ ! -f $DETECTOR ]]; then
30 fatal "Missing pre-calibrated D0ORCA007 input detector file"
33JEditDetector -a $DETECTOR -o detector.datx
35rm -f $WORKDIR/compass-*.root
37JCompass.sh detector.datx $RUNS[*] $WORKDIR/compass-\[before\].root
39JConvertDetectorFormat -a detector.datx -o ${TMPDIR:-/tmp}/detector.datx
41JCompass.sh ${TMPDIR:-/tmp}/detector.datx $RUNS[*] $WORKDIR/compass-\[after\].root
43set_variable GRAPHICS_BATCH
45$JPP_DIR/examples/JCompass/plot-compass.sh $DETECTOR $WORKDIR/compass-\[before\].root $WORKDIR/compass-\[after\].root