3 # --------------------------------------------------------------------------------------------
 
    5 # Steering script for the compass calibration procedure of the D0ORCA015 (138) 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                    15255-15334
 
   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 D0ORCA015 input detector file"
 
   33 # Some compasses have to be disabled because their unconsistent behavior perturbs the pre-calibration
 
   34 # Compass ORCA.0001.16, ORCA.0018.11
 
   37     -W "808488997 set COMPASS_DISABLE"    \
 
   38     -W "817333825 set COMPASS_DISABLE"    \
 
   41 rm -f $WORKDIR/compass-*.root
 
   43 JCompass.sh  detector.datx                      $RUNS[*]  $WORKDIR/compass-\[before\].root
 
   45 JConvertDetectorFormat -a detector.datx -o ${TMPDIR:-/tmp}/detector.datx
 
   47 JCompass.sh  ${TMPDIR:-/tmp}/detector.datx  $RUNS[*]  $WORKDIR/compass-\[after\].root
 
   49 set_variable     GRAPHICS_BATCH
 
   51 $JPP_DIR/examples/JCompass/plot-compass.sh  detector.datx  $WORKDIR/compass-\[before\].root  $WORKDIR/compass-\[after\].root