4 if [ -z $JPP_DIR ]; 
then 
    5     echo "Variable JPP_DIR undefined." 
    9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/
null 
   21     usage "$script <detector file> <string identifier> [<detector file>]" 
   24 if (( $# == 0 || $# > 3 )); 
then 
   25     fatal 
"Wrong number of arguments." 
   31 set_variable  
FORMULA             "[0] * exp(-0.5 * (x-[1])*(x-[1]) / ([2]*[2]))" 
   34 source JAcoustics.sh --
 
   38 get_tripods 
$WORKDIR/tripod.txt TRIPODS
 
   47         -
f "hydrophone.root:${MODULE}.${TRIPOD}"     \
 
   53         P1=$((0.5*($RESULT[-1] + $RESULT[1])))           # average
 
   54         P2=$((0.5*($RESULT[-1] - $RESULT[1])))           # width
 
   57             -
f "hydrophone.root:${MODULE}.${TRIPOD}"     \
 
   60             -
@"p0 = GetMaximum * 0.8"                    \
 
   68         VALUE=$((1.0e+6 * $P1[1]))                              # [us]
 
   69         TOTAL=$(($TOTAL + 1.0))
 
   71         if (( $TOTAL == 1.0 )); 
then 
   76             STDEV[2]=$(($STDEV[1] + ($VALUE - 
$XMEAN[1]) * ($VALUE - 
$XMEAN[2])))
 
   81         printf 
"string %4d tripod %2d %5.0f %3.0f us\n" $STRING $TRIPOD $(($P1[1] * 1.0e6)) $(($P2[1] * 1.0e6))
 
   85 if (( $TOTAL > 1.0 )); 
then 
   86     printf 
"string %4d mean  RMS %5.0f %3.0f us\n" $STRING $XMEAN[1] $((sqrt($TOTAL * $STDEV[1] / ($TOTAL * ($TOTAL - 1.0)))))
 
   92     -
f hydrophone.
root:$MODULE                   \
 
  101 P1=$((0.5*($RESULT[-1] + $RESULT[1])))           # average
 
  102 P2=$((0.5*($RESULT[-1] - $RESULT[1])))           # width
 
  108     -
@"p0 = GetMaximum * 0.8"                    \
 
  116 printf 
"string %4d t0    %6.0f +/- %6.0f us\n" $STRING $(($P1[1] * 1.0e6)) $(($P1[2] * 1.0e6))
 
  117 printf 
"string %4d sigma %6.0f +/- %6.0f us\n" $STRING $(($P2[1] * 1.0e6)) $(($P2[2] * 1.0e6))
 
  119 if (( ${#} == 3 )); 
then 
  125     let TIME_OFFSET_NS=
"$P1[1] * 1.0e9" 
  127     printf 
"Add time offset %12.6d to hydrophone.\n" $TIME_OFFSET_NS
 
  132         -
M "$MODULE SUB $TIME_OFFSET_NS"     \
 
  140     -\^ 
"number of events [a.u.]"                \
 
  143     -
o hydrophonet0_${
STRING}.$FORMAT            $BATCH
 
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
 
Q(UTCMax_s-UTCMin_s)-livetime_s
 
*set_variable DETECTOR_ID $argv[1] set_array RUNS $argv[2,-2]
 
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary. 
 
clean eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY set_variable STRING
 
o $QUALITY_ROOT d $DEBUG!JPlot1D f
 
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
 
static const double H
Planck constant [eV s]. 
 
then fatal Invalid string $STRING
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR if do_usage *then usage $script[(input file)+] fi set_variable DEBUG set_variable WORKDIR TMPDIR
 
do set_variable OUTPUT_DIRECTORY $WORKDIR T
 
set_variable NUMBER_OF_ITERATIONS set_variable EPSILON cat acoustics_fit_parameters txt<< EOF $CONFIGURATION[*]Nmin=3;sigma_s=100.0e-6;stdev=10.0;mestimator=0;fixStrings=0;EOF for STRING in $STRINGS[*];do#fit stretching and(z) position of given string set_variable DETECTOR_TMP ${TMPDIR:-/tmp}/detector_A.datx JEditDetector-a $DETECTOR-o $DETECTOR_TMP-r $STRING JEditDetector-a $DETECTOR-o $DETECTOR-k $STRING for MUL in 0.005 0.001;do DX_M=0.2 for((N=0;$N< $NUMBER_OF_ITERATIONS;++N));do CHI2[3]=$CHI2[1] fitPositionOfString $STRING Z $DX_M fitStretchingOfString $STRING $MUL if(($CHI2[3]-$CHI2[1]< $EPSILON));then break fi done if(($N >=$NUMBER_OF_ITERATIONS));then printf"warning: reached maximum number of iterations %d - converenge %7.3f\n"$N $(($CHI2[3]-$CHI2[1])) fi done JMergeDetector-a $DETECTOR-a $DETECTOR_TMP-o $DETECTOR rm-f $DETECTOR_TMP JConvertDetectorFormat-a $DETECTOR-o $DETECTOR-r-d 0 > &dev null done
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
 
then JConvertDetectorFormat a $DETECTOR[1] o
 
do JPlot2D f $WORKDIR detector root
 
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
 
then set_variable MODULE getModule a $DETECTOR L $STRING $FLOOR JEditDetector a $DETECTOR M $MODULE add $X o $DETECTOR else echo No update of detector $DETECTOR
 
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
 
do set_variable MODULE getModule a $WORKDIR detector_a datx L $STRING JEditDetector a $WORKDIR detector_a datx M $MODULE setz o $WORKDIR detector_a datx JEditDetector a $WORKDIR detector_b datx M $MODULE setz o $WORKDIR detector_b datx done echo Output stored at $WORKDIR detector_a datx and $WORKDIR tripod_a txt JDrawDetector2D a $WORKDIR detector_a datx a $WORKDIR detector_b datx L BL o detector $FORMAT $BATCH JDrawDetector2D T $WORKDIR tripod_a txt T $WORKDIR tripod_b txt L BL o tripod $FORMAT $BATCH JCompareDetector a $WORKDIR detector_a datx b $WORKDIR detector_b datx o $WORKDIR abc root &dev null for KEY in X Y Z
 
then printf string mean RMS us n $STRING $XMEAN((sqrt($TOTAL *$STDEV[1]/($TOTAL *($TOTAL-1.0))))) fi typeset-Z 4 STRING JOpera1D-f hydrophone.root
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
 
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
 
then fatal Invalid tripod $TRIPOD
 
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
 
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number