4 # -------------------------------------------------------------------------------------------- 
    6 # Steering script for tuning of (x,y,z) positions of the strings and tripods as well as 
    7 # the (z) positions of the modules. 
    9 # -------------------------------------------------------------------------------------------- 
   11 if [ -z $JPP_DIR ]; 
then 
   12     echo "Variable JPP_DIR undefined." 
   16 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/
null 
   26     usage "$script <detector file> <tripod file> <stage> (input file)+"\
 
   27           "\nInput files correspond to the output of JAcousticsEventBuilder[.sh]."\
 
   28           "\nFirst stage is 1 (or A) and last stage is 3." 
   32     fatal 
"Wrong number of arguments." 
   42 eval `JPrintDetector -
a $DETECTOR -O IDENTIFIER`
 
   46 source JAcoustics.sh    $DETECTOR_ID
 
   48 # copy (part of) configuration 
   58 get_tripods $TRIPOD_FILE TRIPODS
 
   60 if [[ -
n "ACOUSTICS_STRINGS" ]] 
then 
   62    ACOUSTICS_STRINGS=(`
echo $ACOUSTICS_STRINGS`)
 
   64    STRINGS=(${STRINGS:|ACOUSTICS_STRINGS})
 
   67 if [[ -
n "ACOUSTICS_TRIPODS" ]] 
then 
   69    for ID in `
echo $ACOUSTICS_TRIPODS`; 
do 
   70        unset 
"TRIPODS[${ID}]" 
   79 typeset -
a CHI2                              # chi2(old,
new)
 
   84 # -------------------------------------------------------------------------------------------- 
   85 # Get center-of-gravity of tripods. 
   88 # -------------------------------------------------------------------------------------------- 
   95     for value 
in "${(@v)TRIPODS}"; 
do 
   99         let X_CENTER=
"$X_CENTER + $X" 
  100         let Y_CENTER=
"$Y_CENTER + $Y" 
  101         let Z_CENTER=
"$Z_CENTER + $Z" 
  104     let X_CENTER=
"$X_CENTER / ${#TRIPODS}" 
  105     let Y_CENTER=
"$Y_CENTER / ${#TRIPODS}" 
  106     let Z_CENTER=
"$Z_CENTER / ${#TRIPODS}" 
  108     printf 
"%12.3f %12.3f %12.3f" $X_CENTER $Y_CENTER $Z_CENTER
 
  112 # -------------------------------------------------------------------------------------------- 
  116 # -------------------------------------------------------------------------------------------- 
  123         -
f "$INPUT_FILES[*]"                      \
 
  128         -@ 
$WORKDIR/acoustics_fit_parameters.txt  \
 
  129         -! 
$WORKDIR/disable.txt                   \
        $HYDROPHONE                               \
 
  138 # -------------------------------------------------------------------------------------------- 
  139 # Fit given coordinate of string position. 
  141 # \param  1       string identifier 
  142 # \param  2       coordinate (X|Y|Z) 
  144 # -------------------------------------------------------------------------------------------- 
  145 function fitPositionOfString()
 
  155     if [[ 
"$2" == 
"Z" ]]; 
then 
  156         OPTION=-s                  # optical modules only
 
  158         OPTION=-
S                  # all modules
 
  161     for (( ; $N != $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  167         if (( $CHI2[2] >= $CHI2[1] )); 
then 
  177     for (( ; $N != $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  183         if (( $CHI2[2] >= $CHI2[1] )); 
then 
  193     printf 
"string     %04d  %s %6d %7.3f\n" $1 $2 $N $CHI2[1]
 
  197 # -------------------------------------------------------------------------------------------- 
  198 # Fit stretching of string. 
  200 # \param  1       string identifier 
  201 # \param  2       multiplication factor 
  202 # -------------------------------------------------------------------------------------------- 
  203 function fitStretchingOfString()
 
  207     let 
Z=
"$CAN_ZMAX_M * $2" 
  209     for (( ; $N != $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  215         if (( $CHI2[2] >= $CHI2[1] )); 
then 
  225     for (( ; $N != $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  231         if (( $CHI2[2] >= $CHI2[1] )); 
then 
  241     printf 
"string     %04d  M %6d %7.3f\n" $1 $N $CHI2[1]
 
  245 # -------------------------------------------------------------------------------------------- 
  246 # Fit given coordinate of tripod position. 
  248 # \param  1       tripod identifier 
  249 # \param  2       coordinate (X|Y|Z) 
  251 # -------------------------------------------------------------------------------------------- 
  252 function fitPositionOfTripod()
 
  256     BUFFER=(
X 0.0 
Y 0.0 Z 0.0)
 
  262     for (( ; $N != $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  264         JEditTripod -
f $TRIPOD_FILE -
T "$1 add $BUFFER[*]" -
r -
d 0 >& /dev/
null 
  268         if (( $CHI2[2] >= $CHI2[1] )); 
then 
  270             JEditTripod -
f $TRIPOD_FILE -
T "$1 sub $BUFFER[*]" -
r -
d 0 >& /dev/
null 
  278     for (( ; $N != $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  280         JEditTripod -
f $TRIPOD_FILE -
T "$1 sub $BUFFER[*]" -
r -
d 0 >& /dev/
null 
  284         if (( $CHI2[2] >= $CHI2[1] )); 
then 
  286             JEditTripod -
f $TRIPOD_FILE -
T "$1 add $BUFFER[*]" -
r -
d 0 >& /dev/
null 
  294     printf 
"tripod       %2d  %s %6d %7.3f\n" $1 $2 $N $CHI2[1]
 
  298 # -------------------------------------------------------------------------------------------- 
  299 # Fit module z-position. 
  301 # \param  1       string identifier 
  304 # -------------------------------------------------------------------------------------------- 
  305 function fitPositionOfModule()
 
  309     BUFFER=(
X 0.0 
Y 0.0 Z $3)
 
  316     for (( i=0 ; 
$i != $NUMBER_OF_STEPS && $N != $NUMBER_OF_ITERATIONS; ++i, ++
N )); 
do 
  322         if (( $CHI2[2] >= $CHI2[1] )); 
then 
  332     for (( i=0 ; 
$i != $NUMBER_OF_STEPS && $N != $NUMBER_OF_ITERATIONS; ++i, ++
N )); 
do 
  338         if (( $CHI2[2] >= $CHI2[1] )); 
then 
  348     printf 
"module     %04d.%02d %6d %7.3f\n" $1 $2 $N $CHI2[1]
 
  352 # -------------------------------------------------------------------------------------------- 
  353 # Fit given coordinate of hydrophone position. 
  355 # \param  1       string identifier 
  356 # \param  2       coordinate (X|Y|Z) 
  358 # -------------------------------------------------------------------------------------------- 
  359 function fitPositionOfHydrophone()
 
  363     BUFFER=(
X 0.0 
Y 0.0 Z 0.0)
 
  371     if [[ 
"$2" == 
"Z" ]]; 
then 
  372         ADD=
"-M $MODULE add $BUFFER[*]"                  # base module only
 
  373         SUB=
"-M $MODULE sub $BUFFER[*]"                  # base module only
 
  375         ADD=
"-S $1      add $BUFFER[*]"                  # all modules
 
  376         SUB=
"-S $1      sub $BUFFER[*]"                  # all modules
 
  379     for (( ; $N != $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  385         if (( $CHI2[2] >= $CHI2[1] )); 
then 
  395     for (( ; $N != $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  401         if (( $CHI2[2] >= $CHI2[1] )); 
then 
  411     printf 
"hydrophone %04d  %s %6d %7.3f\n" $1 $2 $N $CHI2[1]
 
  415 # -------------------------------------------------------------------------------------------- 
  416 # Fit rotation of hydrophone. 
  418 # \param  1       string identifier 
  419 # \param  2       rotation angle [rad] 
  420 # -------------------------------------------------------------------------------------------- 
  421 function fitRotationOfHydrophone()
 
  429     for (( ; $N != $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  431         JEditHydrophone -
f $WORKDIR/hydrophone.txt -
S "$1 rot $ROT" -
r -
d 0 >& /dev/
null 
  435         if (( $CHI2[2] >= $CHI2[1] )); 
then 
  437             let ROT=
"-1.0 * $ROT" 
  439             JEditHydrophone -
f $WORKDIR/hydrophone.txt -
S "$1 rot $ROT" -
r -
d 0 >& /dev/
null 
  447     for (( ; $N != $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  449         JEditHydrophone -
f $WORKDIR/hydrophone.txt -
S "$1 rot $ROT" -
r -
d 0 >& /dev/
null 
  453         if (( $CHI2[2] >= $CHI2[1] )); 
then 
  455             let ROT=
"-1.0 * $ROT" 
  457             JEditHydrophone -
f $WORKDIR/hydrophone.txt -
S "$1 rot $ROT" -
r -
d 0 >& /dev/
null 
  465     printf 
"hydrophone %04d  R %6d %7.3f\n" $1 $N $CHI2[1]
 
  473 echo "Processing stage $STAGE" 
  483     A)  # ------------------------------------------------------------------------------------
 
  488         cat>acoustics_fit_parameters.txt<<EOF    # fix tilt angles of 
strings 
  499             for (( 
N=0; $N < $NUMBER_OF_ITERATIONS; ++N )); 
do 
  506                     fitPositionOfString 
$STRING Z $DX_M
 
  512                     fitPositionOfTripod 
$TRIPOD Z $DX_M
 
  515                 if (( $CHI2[3] - $CHI2[1] < $EPSILON )); 
then 
  522             let 
X=
"$X - $X_CENTER" 
  523             let 
Y=
"$Y - $Y_CENTER" 
  524             let Z=
"$Z - $Z_CENTER" 
  526             JEditTripod   -
f $TRIPOD_FILE -
T "-1 sub $X $Y $Z" -
r           -
d 0 >& /dev/
null 
  531             if (( $N >= $NUMBER_OF_ITERATIONS )); 
then 
  532                 printf 
"warning: reached maximum number of iterations %d - converenge %7.3f\n" $N $(($CHI2[3] - $CHI2[1]))
 
  539         for DX_M in 0.1; 
do                      # fit (z) positions of modules 
  541             for (( N=0; $N < $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  545                 for STRING in $STRINGS[*]; 
do 
  546                     for (( FLOOR = 1; $FLOOR <= 18; FLOOR += 1 )); 
do 
  547                         fitPositionOfModule 
$STRING $FLOOR $DX_M
 
  551                 if (( $CHI2[3] - $CHI2[1] < $EPSILON )); 
then 
  558             if (( $N >= $NUMBER_OF_ITERATIONS )); 
then 
  559                 printf 
"warning: reached maximum number of iterations %d - converenge %7.3f\n" $N $(($CHI2[3] - $CHI2[1]))
 
  564     1)  
# ------------------------------------------------------------------------------------ 
  569         cat>acoustics_fit_parameters.txt<<EOF
 
  578         for STRING in $STRINGS[*]; 
do            # fit stretching and (z) position of given 
string           
  585             for MUL in 0.005 0.001; 
do 
  589                 for (( N=0; $N < $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  593                     fitPositionOfString   
$STRING Z  $DX_M
 
  594                     fitStretchingOfString 
$STRING $MUL
 
  596                     if (( $CHI2[3] - $CHI2[1] < $EPSILON )); 
then 
  601                 if (( $N >= $NUMBER_OF_ITERATIONS )); 
then 
  602                     printf 
"warning: reached maximum number of iterations %d - converenge %7.3f\n" $N $(($CHI2[3] - $CHI2[1]))
 
  615     2)  
# ------------------------------------------------------------------------------------ 
  620         cat>acoustics_fit_parameters.txt<<EOF
 
  631             for (( N=0; $N < $NUMBER_OF_ITERATIONS; ++N )); 
do 
  636                     fitPositionOfString 
$STRING X $DX_M
 
  637                     fitPositionOfString 
$STRING Y $DX_M
 
  638                     fitPositionOfString 
$STRING Z $DX_M
 
  642                     fitPositionOfTripod 
$TRIPOD X $DX_M
 
  643                     fitPositionOfTripod 
$TRIPOD Y $DX_M
 
  644                     fitPositionOfTripod 
$TRIPOD Z $DX_M
 
  647                 if (( $CHI2[3] - $CHI2[1] < $EPSILON )); 
then 
  652             getCenter | 
read X Y Z
 
  654             let X=
"$X - $X_CENTER" 
  655             let Y=
"$Y - $Y_CENTER" 
  656             let Z=
"$Z - $Z_CENTER" 
  658             JEditTripod   -
f $TRIPOD_FILE -
T "-1 sub $X $Y $Z" -
r           -
d 0 >& /dev/
null 
  663             if (( $N >= $NUMBER_OF_ITERATIONS )); 
then 
  664                 warning "reached maximum number of iterations $N - converenge $(($CHI2[3] - $CHI2[1]))" 
  671         for DX_M in 0.10; 
do                     # fit (z) positions of modules and (
x,y) positions of 
strings 
  673             for (( N=0; $N < $NUMBER_OF_ITERATIONS; ++N )); 
do 
  679                     for (( FLOOR = 1; $FLOOR <= 18; FLOOR += 1 )); 
do 
  680                         fitPositionOfModule 
$STRING $FLOOR $DX_M
 
  683                     fitPositionOfString 
$STRING X $DX_M
 
  684                     fitPositionOfString 
$STRING Y $DX_M
 
  687                 if (( $CHI2[3] - $CHI2[1] < $EPSILON )); 
then 
  694             if (( $N >= $NUMBER_OF_ITERATIONS )); 
then 
  695                 warning "reached maximum number of iterations $N - 
converenge $(($CHI2[3] - $CHI2[1]))"
 
  700     3)  
# ------------------------------------------------------------------------------------ 
  705         cat>acoustics_fit_parameters.txt<<EOF
 
  714         for DX_M in 0.10 0.05; 
do                # fit (x,y,z) positions of 
strings and 
tripods 
  716             for (( N=0; $N < $NUMBER_OF_ITERATIONS; ++N )); 
do 
  721                     fitPositionOfString 
$STRING X $DX_M
 
  722                     fitPositionOfString 
$STRING Y $DX_M
 
  723                     fitPositionOfString 
$STRING Z $DX_M
 
  727                     fitPositionOfTripod 
$TRIPOD X $DX_M
 
  728                     fitPositionOfTripod 
$TRIPOD Y $DX_M
 
  729                     fitPositionOfTripod 
$TRIPOD Z $DX_M
 
  732                 if (( $CHI2[3] - $CHI2[1] < $EPSILON )); 
then 
  737             getCenter | 
read X Y Z
 
  739             let X=
"$X - $X_CENTER" 
  740             let Y=
"$Y - $Y_CENTER" 
  741             let Z=
"$Z - $Z_CENTER" 
  743             JEditTripod   -
f $TRIPOD_FILE -
T "-1 sub $X $Y $Z" -
r           -
d 0 >& /dev/
null 
  748             if (( $N >= $NUMBER_OF_ITERATIONS )); 
then 
  749                 warning "reached maximum number of iterations $N - converenge $(($CHI2[3] - $CHI2[1]))" 
  756         for DX_M in 0.05; 
do                     # fit (z) positions of modules and (x,y) positions of 
strings 
  758             for (( N=0; $N < $NUMBER_OF_ITERATIONS; ++N )); 
do 
  764                     for (( FLOOR = 1; $FLOOR <= 18; FLOOR += 1 )); 
do 
  765                         fitPositionOfModule 
$STRING $FLOOR $DX_M
 
  768                     fitPositionOfString 
$STRING X $DX_M
 
  769                     fitPositionOfString 
$STRING Y $DX_M
 
  772                 if (( $CHI2[3] - $CHI2[1] < $EPSILON )); 
then 
  779             if (( $N >= $NUMBER_OF_ITERATIONS )); 
then 
  780                 warning "reached maximum number of iterations $N - 
converenge $(($CHI2[3] - $CHI2[1]))"
 
  785     D)  
# ------------------------------------------------------------------------------------ 
  791         cat>acoustics_fit_parameters.txt<<EOF
 
  800         for A_RAD DX_M in 0.05 0.10; 
do            # fit 
orientation and z-position of hydrophones
 
  802             for (( N=0; $N < $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  806                 for STRING in $STRINGS[*]; 
do 
  807                     fitRotationOfHydrophone 
$STRING $A_RAD
 
  808                     fitPositionOfHydrophone 
$STRING Z $DX_M
 
  811                 if (( $CHI2[3] - $CHI2[1] < $EPSILON )); 
then 
  818             if (( $N >= $NUMBER_OF_ITERATIONS )); 
then 
  819                 warning "reached maximum number of iterations $N - converenge $(($CHI2[3] - $CHI2[1]))" 
  825             for (( N=0; $N < $NUMBER_OF_ITERATIONS; ++
N )); 
do 
  829                 for STRING in $STRINGS[*]; 
do 
  830                     fitPositionOfString     
$STRING X $DX_M
 
  831                     fitPositionOfString     
$STRING Y $DX_M
 
  832                     fitPositionOfString     
$STRING Z $DX_M
 
  833                     fitPositionOfHydrophone 
$STRING Z $DX_M
 
  836                 for TRIPOD in ${(
k)TRIPODS}; 
do 
  837                     fitPositionOfTripod 
$TRIPOD X $DX_M
 
  838                     fitPositionOfTripod 
$TRIPOD Y $DX_M
 
  839                     fitPositionOfTripod 
$TRIPOD Z $DX_M
 
  842                 if (( $CHI2[3] - $CHI2[1] < $EPSILON )); 
then 
  847             getCenter | 
read X Y Z
 
  849             let X=
"$X - $X_CENTER" 
  850             let Y=
"$Y - $Y_CENTER" 
  851             let Z=
"$Z - $Z_CENTER" 
  853             JEditTripod   -
f $TRIPOD_FILE -
T "-1 sub $X $Y $Z" -
r           -
d 0 >& /dev/
null 
  858             if (( $N >= $NUMBER_OF_ITERATIONS )); 
then 
  859                 warning "reached maximum number of iterations $N - converenge $(($CHI2[3] - $CHI2[1]))" 
  866         for DX_M in 0.05; 
do                     # fit (z) positions of modules and (x,y) positions of 
strings 
  868             for (( N=0; $N < $NUMBER_OF_ITERATIONS; ++N )); 
do 
  874                     for (( FLOOR = 1; $FLOOR <= 18; FLOOR += 1 )); 
do 
  875                         fitPositionOfModule 
$STRING $FLOOR $DX_M
 
  878                     fitPositionOfString 
$STRING X $DX_M
 
  879                     fitPositionOfString 
$STRING Y $DX_M
 
  882                 if (( $CHI2[3] - $CHI2[1] < $EPSILON )); 
then 
  889             if (( $N >= $NUMBER_OF_ITERATIONS )); 
then 
  890                 warning "reached maximum number of iterations $N - 
converenge $(($CHI2[3] - $CHI2[1]))"
 
  895     *)  
# ------------------------------------------------------------------------------------ 
  897         fatal 
"invalid stage $STAGE (possible stages: 1, 2, 3, A, D)" 
  909 rm -
f acoustics_fit_parameters.txt
 
  911 source JAcoustics.sh    $DETECTOR_ID
 
  914 then usage $script< detector >< run >< outputfile > fi case set_variable OPTION
 
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
 
*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
 
then JLigier sh continue fi cat
 
then warning reached maximum number of iterations $N converenge(($CHI2[3]-$CHI2[1]))" fi done set_variable NUMBER_OF_ITERATIONS 2000 set_variable EPSILON 5.0E-4 for DX_M in 0.10
 
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 Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
 
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
 
do JCanberra a $DETECTOR f $INPUT_FILE o $WORKDIR canberra[${EMITTER}\] root T $WORKDIR tripod txt V $WORKDIR sound_velocity txt M $WORKDIR mechanics txt H $WORKDIR hydrophone txt E $EMITTER $DISABLE d $DEBUG!done kill_child_processes_at_exit attach getModule a $DETECTOR typeset Z STRING typeset Z FLOOR for STRING in $STRINGS[*]
 
then timer_start(JRandomTimesliceWriter-a ${DETECTOR}-o ${PIPE}-n ${NUMBER_OF_SLICES}-P ${PMT_FILE}-d ${DEBUG}-S ${SEED}-B"$BACKGROUND_HZ"-N"$RECYCLING"--!&&for((i=0;$i!=10;++i));do;echo 'EOF' > $PIPE;usleep 100000;done &&rm-f $PIPE)&JTimesliceReprocessor-a $
 
do for((RUN=${RANGE%%-*};$RUN<=${RANGE##*-};RUN+=1))
 
*fatal invalid stage $STAGE(possible stages:1, 2, 3, A, D)" 
 
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
 
then usage $script< detector specific acoustics-fit script >< option > nAuxiliary script to make scan of pre stretching of detector strings(see JEditDetector)." "\nPossible options
 
then break fi done getCenter read X Y Z let X
 
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 sput $STRING $FLOOR sget MODULE INPUT_FILES
 
do set_variable SIGMA_NS set_variable OUTLIERS set_variable OUTPUT_FILE matrix[${ALPHA_DEG}\deg\] root $JPP JMatrixNZ a $DETECTOR f $INPUT_FILE o $OUTPUT_FILE S
 
&set_variable OUTPUT_FILE
 
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
 
static const JPBS_t HYDROPHONE(4, 5)
PBS of hydrophone 
 
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR $JPP_DATA set_variable MAKE_PDF set_variable MERGE_PDF set_variable MAKE_CDF set_variable CLEAN set_variable BACKGROUND set_variable WGET set_variable RMAX_M set_variable absorptionLengthFactor set_variable scatteringLengthFactor BUFFER
 
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
 
do unset TRIPODS[${ID}] done fi set_variable TMPDIR $WORKDIR mkdir p $TMPDIR set_variable OUTPUT_FILE $TMPDIR katoomba root typeset a CHI2 CHI2
 
then fatal Not enough tripods
 
double getChi2(const double P)
Get chi2 corresponding to given probability. 
 
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
 
do echo Generating $dir eval D
 
*fatal Wrong option $OPTION
 
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 
 
do if[[!-f $ACOUSTICS_WORKDIR/${KEY}.txt]]
 
then usage $script< detector file >< tripodfile >< stage > input file nInput files correspond to the output of JAcousticsEventBuilder[.sh] nFirst stage eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY eval JPrintDetector a $DETECTOR O CAN source JAcoustics sh $DETECTOR_ID typeset A CONFIGURATION for key in Tmax_s