3if [ -z $JPP_DIR ]; then
4 echo "Variable JPP_DIR undefined."
8source $JPP_DIR/setenv.sh $JPP_DIR
13set_variable WORKDIR ${TMPDIR:-/tmp}/
14set_variable: PRECISION RECONSTRUCTION_PRECISION 1.0
15set_variable: FORMAT GRAPHICS_FORMAT gif
16set_variable+ BATCH GRAPHICS_BATCH -B
19 usage "$script <detector file> <detector file>"
23 fatal "Wrong number of arguments."
26DETECTOR=($argv[1] $argv[2])
28JConvertDetectorFormat \
30 -o $WORKDIR/detector.datx
32# correct global time offset
36for (( i = 0; $i != 2; ++i )); do
40 -b $WORKDIR/detector.datx \
41 -o $WORKDIR/compare.root \
44 JPrintResult -f $WORKDIR/compare.root:T2 -F "GetMinimum" | read ZMIN
45 JPrintResult -f $WORKDIR/compare.root:T2 -F "GetMaximum" | read ZMAX
47 let "Z = 0.5 * ($ZMIN + $ZMAX)"
51 -a $WORKDIR/detector.datx \
52 -o $WORKDIR/detector.datx \
57printf "Correct global time offset %9.6f [ns].\n" $T
58printf "Test with precision %9.6f [ns].\n" $PRECISION
62 -b $WORKDIR/detector.datx \
63 -o $WORKDIR/compare.root \
64 -p "tcal = $PRECISION" \
69 -f $WORKDIR/compare.root:T2 \
74 -o detector.$FORMAT $BATCH