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