4 # -----------------------------------------------------------------------------------------------------
6 # Toolkit for the determination of the fixed parameters in the system, a.k.a. "pre-calibration".
7 # The list of parameters includes (x,y,z) positions of strings and tripods, stretching of strings,
8 # z-positions of the optical modules, orientations of the strings and possibly z-positions of anchors.
10 # The value of a given parameter is optimised by minimising the average chi2/NDF
11 # of a series of global fits applied to a predefined set of acoustic events.
12 # For each parameter, there exists a designated function.
14 # There are also steering functions to consistently determine the optimal values for a set of parameters.
15 # In these, the current accuracy of the parameter values is taken into account.
16 # These are therefore referred to as "stages".
17 # The pre-calibration thus consists of a sequence of stages.
18 # For each detector, a complete pre-calibration procedure is implemented in a designated script.
20 # Mandatory input variables:
22 # DETECTOR # detector file
23 # INPUT_FILES # list of input files (output of JAcousticsEventBuilder[.sh])
25 # Optional input variables:
27 # HYDROPHONE # if defined, use hydrophones in global fit; else do not use hydrophones
31 # STRINGS corresponds to list of strings to be fitted; this can be changed with function fixStrings.
32 # TRIPODS corresponds to list of tripods to be fitted; this can be changed with function fixTripods.
34 # TRANSMITTERS corresponds to list of strings which have an emitter on the anchor (maybe empty).
35 # For these strings, the orientations and the z-positions of the anchors will separately be fitted.
36 # This list will also be changed with function fixStrings.
37 # -----------------------------------------------------------------------------------------------------
39 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/
null
40 source $JPP_BIN/gradient.sh
42 if [[ ! $ZSH_EVAL_CONTEXT =~ :file$ ]];
then
43 echo "Auxiliary script for the pre-calibrations."
44 echo "This script should be sourced by the steering script for a specific detector."
45 echo "Consult the script '$0' for more details."
49 source JAcousticsToolkit.sh
53 set_variable: JOBS ACOUSTICS_JOBS 0 # number of parallel threads
54 set_variable: SLEEP_US ACOUSTICS_SLEEP_US 100 # sleep time [us] of
main thread when data
queue exceeds limit
57 typeset -
a CHI2 #
chi2 values; index [1] corresponds to best value
59 let
"NUMBER_OF_ITERATIONS = 100" # maximal number of iterations
60 let
"EPSILON = 5.0E-4" # maximal
distance to minimum of
chi2
61 let
"RADIUS_M = 1.0" # maximal horizontal
distance between
T-bar and emitter/hydrophone
62 let
"PRECISION = 10" # number of decimals of
chi2 evaluation
65 # -----------------------------------------------------------------------------------------------------
68 # Install input files in working directory and create temporary directory TMPDIR.
70 # -----------------------------------------------------------------------------------------------------
73 eval `JPrintDetector -
a $DETECTOR -O IDENTIFIER`
77 JAcoustics.sh $DETECTOR_ID
81 TRANSMITTERS=(`get_strings_with_transmitter transmitter.txt`)
83 if [[
"${HYDROPHONE+YES}" ==
"YES" ]];
then
84 HYDROPHONES=(`get_strings_with_hydrophone hydrophone.txt`)
91 JConvertDetectorFormat -
a $DETECTOR -
o $TMPDIR/pmt.datx
96 # -----------------------------------------------------------------------------------------------------
97 # Backup files in given directory.
100 # -----------------------------------------------------------------------------------------------------
105 cp -p {tripod.txt,transmitter.txt,hydrophone.txt} $1
111 # -----------------------------------------------------------------------------------------------------
112 # Remove temporary directory and restore input files in working directory.
114 # -----------------------------------------------------------------------------------------------------
119 rm -rf $TMPDIR >& /dev/
null
121 rm -
f {acoustics_fit_parameters,acoustics_trigger_parameters}.txt
123 JAcoustics.sh $DETECTOR_ID
127 # -----------------------------------------------------------------------------------------------------
130 # \param 1-N identifiers
131 # -----------------------------------------------------------------------------------------------------
132 function fixStrings()
138 if (( ${#BUFFER} > 0 ));
then
140 TRANSMITTERS=(${TRANSMITTERS:|BUFFER})
141 HYDROPHONES=(${HYDROPHONES:|BUFFER})
146 # -----------------------------------------------------------------------------------------------------
149 # \param 1-
N identifiers
150 # -----------------------------------------------------------------------------------------------------
151 function fixTripods()
157 if (( ${#BUFFER} > 0 ));
then
158 for ID in $BUFFER[*];
do
159 unset
"TRIPODS[${ID}]"
165 # -----------------------------------------------------------------------------------------------------
166 # Evaluate current chi2.
168 # \param 1 variable containing chi2 value on return
169 # -----------------------------------------------------------------------------------------------------
172 rm -
f $TMPDIR/katoomba.root >& /dev/
null
174 if (( $JOBS == 0 ));
then
178 -
f "$INPUT_FILES[*]" \
179 -
o $TMPDIR/katoomba.root \
182 -
V sound_velocity.txt \
184 -@ $TMPDIR/acoustics_fit_parameters.txt \
188 -
d 0 --! >& $TMPDIR/job.log
194 -
f "$INPUT_FILES[*]" \
195 -
o $TMPDIR/katoomba.root \
198 -
V sound_velocity.txt \
200 -@ $TMPDIR/acoustics_fit_parameters.txt \
206 -
d 0 --! >& $TMPDIR/job.log
209 if (( $? != 0 ));
then
210 fatal
"non-zero exit code, see $TMPDIR/job.log"
213 let
"UV = $($JPP_DIR/examples/JAcoustics/JPrintChi2 -f $TMPDIR/katoomba.root -p $PRECISION)"
215 if (( $? != 0 ));
then
216 fatal
"non-zero exit code let."
223 # -----------------------------------------------------------------------------------------------------
225 # This stage can be used to determine the (x,y,z) positions of tripods when a number of strings is fixed.
228 # \param 2 maximum number of extra steps
229 # -----------------------------------------------------------------------------------------------------
232 cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
233 `egrep Tmax_s acoustics_fit_parameters.txt`
241 if (( ${#STRINGS} > 0 ));
then
242 JEditDetector -
a $DETECTOR -
o $TMPDIR/detector_0.datx -
k "$STRINGS[*]" -q -
d 0 >& /dev/
null
248 for ID in ${(
k)TRIPODS};
do
249 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addx %" -o tripod.txt -q -d 0 >& /dev/null']=$1
250 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addy %" -o tripod.txt -q -d 0 >& /dev/null']=$1
251 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addz %" -o tripod.txt -q -d 0 >& /dev/null']=$1
256 printf
"detector %6d %8.4f\n" $N $Y
258 if (( ${#STRINGS} > 0 ));
then
264 # -----------------------------------------------------------------------------------------------------
266 # This stage can be used to roughly determine the positions of the strings and tripods.
267 # During this procedure, the strings are kept vertical in the global fits.
269 # \param 1 step size strings
270 # \param 2 step size tripods
271 # \param 3 maximum number of extra steps
272 # -----------------------------------------------------------------------------------------------------
275 cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
276 `egrep Tmax_s acoustics_fit_parameters.txt`
287 PARAMETERS[
'JEditDetector -a $DETECTOR -S "$STRING addx %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
288 PARAMETERS[
'JEditDetector -a $DETECTOR -S "$STRING addy %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
289 PARAMETERS[
'JEditDetector -a $DETECTOR -s "$STRING addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
292 for ID in ${(
k)TRIPODS};
do
293 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addx %" -o tripod.txt -q -d 0 >& /dev/null']=$2
294 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addy %" -o tripod.txt -q -d 0 >& /dev/null']=$2
295 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addz %" -o tripod.txt -q -d 0 >& /dev/null']=$2
298 for STRING in ${HYDROPHONES:|TRANSMITTERS};
do
299 PARAMETERS[
'JEditHydrophone -f hydrophone.txt -S "$STRING rot %" -o hydrophone.txt -q -d 0 >& /dev/null; JEditTransmitter -f transmitter.txt -S "$STRING rot %" -o transmitter.txt -q -d 0 >& /dev/null']=$(($1 / $RADIUS_M))
306 PARAMETERS[
'JEditDetector -a $DETECTOR -M "$MODULE addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
307 PARAMETERS[
'JEditHydrophone -f hydrophone.txt -S "$STRING rot %" -o hydrophone.txt -q -d 0 >& /dev/null; JEditTransmitter -f transmitter.txt -S "$STRING rot %" -o transmitter.txt -q -d 0 >& /dev/null']=$(($1 / $RADIUS_M))
312 printf
"detector %6d %8.4f\n" $N $Y
316 # -----------------------------------------------------------------------------------------------------
318 # This stage can be used to roughly determine the stretching and z-positions of individual strings.
319 # During this procedure, the strings are kept vertical in the global fits.
321 # \param 1 step size stretching
322 # \param 2 step size z-position
323 # \param 3 maximum number of extra steps
324 # -----------------------------------------------------------------------------------------------------
327 cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
328 `egrep Tmax_s acoustics_fit_parameters.txt`
338 JEditDetector -
a $DETECTOR -
o $TMPDIR/detector_1.datx -
r "$STRING" -q -
d 0 >& /dev/
null
343 PARAMETERS[
'JEditDetector -a $DETECTOR -s "$STRING mul %" -o $DETECTOR -q -d 0 >& /dev/null; JEditDetector -a $DETECTOR -s "$STRING subz \$\(\(% * $CAN_ZMAX_M\)\)" -o $DETECTOR -q -d 0 >& /dev/null']=$1
344 PARAMETERS[
'JEditDetector -a $DETECTOR -s "$STRING addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$2
348 printf
"string %04d %6d %8.4f\n" $STRING $N $Y
355 # -----------------------------------------------------------------------------------------------------
357 # This stage can be used to roughly determine the z-positions of the modules.
358 # During this procedure, the strings are kept vertical in the global fits.
361 # \param 2 maximum number of extra steps
362 # -----------------------------------------------------------------------------------------------------
365 cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
366 `egrep Tmax_s acoustics_fit_parameters.txt`
378 for (( FLOOR = 1; $FLOOR <= 18; FLOOR += 1 ));
do
382 PARAMETERS[
'JEditDetector -a $DETECTOR -M "$MODULE addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
388 printf
"detector %6d %8.4f\n" $N $Y
392 # -----------------------------------------------------------------------------------------------------
394 # This stage can be used to determine the stretching and z-positions of individual strings.
396 # \param 1 step size stretching
397 # \param 2 step size z-position
398 # \param 3 maximum number of extra steps
399 # -----------------------------------------------------------------------------------------------------
402 cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
403 `egrep Tmax_s acoustics_fit_parameters.txt`
413 JEditDetector -
a $DETECTOR -
o $TMPDIR/detector_1.datx -
r "$STRING" -q -
d 0 >& /dev/
null
418 PARAMETERS[
'JEditDetector -a $DETECTOR -s "$STRING mul %" -o $DETECTOR -q -d 0 >& /dev/null; JEditDetector -a $DETECTOR -s "$STRING subz \$\(\(% * $CAN_ZMAX_M\)\)" -o $DETECTOR -q -d 0 >& /dev/null']=$1
419 PARAMETERS[
'JEditDetector -a $DETECTOR -s "$STRING addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$2
423 printf
"string %04d %6d %8.4f\n" $STRING $N $Y
430 # -----------------------------------------------------------------------------------------------------
432 # This stage can be used to improve the determination the positions of the strings and tripods.
434 # \param 1 step size strings
435 # \param 2 step size tripods
436 # \param 3 maximum number of extra steps
437 # -----------------------------------------------------------------------------------------------------
440 cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
441 `egrep Tmax_s acoustics_fit_parameters.txt`
452 PARAMETERS[
'JEditDetector -a $DETECTOR -S "$STRING addx %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
453 PARAMETERS[
'JEditDetector -a $DETECTOR -S "$STRING addy %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
454 PARAMETERS[
'JEditDetector -a $DETECTOR -s "$STRING addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
457 for ID in ${(
k)TRIPODS};
do
458 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addx %" -o tripod.txt -q -d 0 >& /dev/null']=$2
459 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addy %" -o tripod.txt -q -d 0 >& /dev/null']=$2
460 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addz %" -o tripod.txt -q -d 0 >& /dev/null']=$2
463 for STRING in ${HYDROPHONES:|TRANSMITTERS};
do
464 PARAMETERS[
'JEditHydrophone -f hydrophone.txt -S "$STRING rot %" -o hydrophone.txt -q -d 0 >& /dev/null; JEditTransmitter -f transmitter.txt -S "$STRING rot %" -o transmitter.txt -q -d 0 >& /dev/null']=$(($1 / $RADIUS_M))
471 PARAMETERS[
'JEditDetector -a $DETECTOR -M "$MODULE addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
472 PARAMETERS[
'JEditHydrophone -f hydrophone.txt -S "$STRING rot %" -o hydrophone.txt -q -d 0 >& /dev/null; JEditTransmitter -f transmitter.txt -S "$STRING rot %" -o transmitter.txt -q -d 0 >& /dev/null']=$(($1 / $RADIUS_M))
477 printf
"detector %6d %8.4f\n" $N $Y
481 # -----------------------------------------------------------------------------------------------------
483 # This stage can be used to improve the determination the z-positions of the modules.
486 # \param 2 maximum number of extra steps
487 # -----------------------------------------------------------------------------------------------------
490 cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
491 `egrep Tmax_s acoustics_fit_parameters.txt`
503 for (( FLOOR = 1; $FLOOR <= 18; FLOOR += 1 ));
do
507 PARAMETERS[
'JEditDetector -a $DETECTOR -M "$MODULE addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
510 #PARAMETERS['JEditDetector -a $DETECTOR -S "$STRING addx %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
511 #PARAMETERS['JEditDetector -a $DETECTOR -S "$STRING addy %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
516 printf
"detector %6d %8.4f\n" $N $Y
520 # -----------------------------------------------------------------------------------------------------
522 # This stage can be used to finalise the determination of the positions of the strings and tripods.
524 # \param 1 step size strings
525 # \param 2 step size tripods
526 # \param 3 maximum number of extra steps
527 # -----------------------------------------------------------------------------------------------------
530 cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
531 `egrep Tmax_s acoustics_fit_parameters.txt`
542 PARAMETERS[
'JEditDetector -a $DETECTOR -S "$STRING addx %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
543 PARAMETERS[
'JEditDetector -a $DETECTOR -S "$STRING addy %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
544 PARAMETERS[
'JEditDetector -a $DETECTOR -s "$STRING addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
547 for ID in ${(
k)TRIPODS};
do
548 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addx %" -o tripod.txt -q -d 0 >& /dev/null']=$2
549 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addy %" -o tripod.txt -q -d 0 >& /dev/null']=$2
550 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addz %" -o tripod.txt -q -d 0 >& /dev/null']=$2
553 for STRING in ${HYDROPHONES:|TRANSMITTERS};
do
554 PARAMETERS[
'JEditHydrophone -f hydrophone.txt -S "$STRING rot %" -o hydrophone.txt -q -d 0 >& /dev/null; JEditTransmitter -f transmitter.txt -S "$STRING rot %" -o transmitter.txt -q -d 0 >& /dev/null']=$(($1 / $RADIUS_M))
561 PARAMETERS[
'JEditDetector -a $DETECTOR -M "$MODULE addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
562 PARAMETERS[
'JEditHydrophone -f hydrophone.txt -S "$STRING rot %" -o hydrophone.txt -q -d 0 >& /dev/null; JEditTransmitter -f transmitter.txt -S "$STRING rot %" -o transmitter.txt -q -d 0 >& /dev/null']=$(($1 / $RADIUS_M))
567 printf
"detector %6d %8.4f\n" $N $Y
571 # -----------------------------------------------------------------------------------------------------
573 # This stage can be used to finalise the determination of the z-positions of the modules.
576 # \param 2 maximum number of extra steps
577 # -----------------------------------------------------------------------------------------------------
580 cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
581 `egrep Tmax_s acoustics_fit_parameters.txt`
593 for (( FLOOR = 1; $FLOOR <= 18; FLOOR += 1 ));
do
597 PARAMETERS[
'JEditDetector -a $DETECTOR -M "$MODULE addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
600 #PARAMETERS['JEditDetector -a $DETECTOR -S "$STRING addx %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
601 #PARAMETERS['JEditDetector -a $DETECTOR -S "$STRING addy %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
606 printf
"detector %6d %8.4f\n" $N $Y
610 # -----------------------------------------------------------------------------------------------------
612 # This stage can be used to determine the rotations of the strings and z-positions of the anchors
613 # including the response of hydrophones.
614 # It includes a determination of the positions of the strings, tripods and modules.
616 # \param 1 step size strings
617 # \param 2 step size tripods
618 # \param 3 maximum number of extra steps
619 # -----------------------------------------------------------------------------------------------------
622 cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
623 `egrep Tmax_s acoustics_fit_parameters.txt`
639 PARAMETERS[
'JEditDetector -a $DETECTOR -S "$STRING addx %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
640 PARAMETERS[
'JEditDetector -a $DETECTOR -S "$STRING addy %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
641 PARAMETERS[
'JEditDetector -a $DETECTOR -s "$STRING addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
642 PARAMETERS[
'JEditDetector -a $DETECTOR -M "$MODULE addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
644 PARAMETERS[
'JEditHydrophone -f hydrophone.txt -S "$STRING rot %" -o hydrophone.txt -q -d 0 >& /dev/null; JEditTransmitter -f transmitter.txt -S "$STRING rot %" -o transmitter.txt -q -d 0 >& /dev/null']=$(($1 / $RADIUS_M))
647 for ID in ${(
k)TRIPODS};
do
648 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addx %" -o tripod.txt -q -d 0 >& /dev/null']=$2
649 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addy %" -o tripod.txt -q -d 0 >& /dev/null']=$2
650 PARAMETERS[
'JEditTripod -f tripod.txt -T "$ID addz %" -o tripod.txt -q -d 0 >& /dev/null']=$2
653 for STRING in ${HYDROPHONES:|TRANSMITTERS};
do
654 PARAMETERS[
'JEditHydrophone -f hydrophone.txt -S "$STRING rot %" -o hydrophone.txt -q -d 0 >& /dev/null; JEditTransmitter -f transmitter.txt -S "$STRING rot %" -o transmitter.txt -q -d 0 >& /dev/null']=$(($1 / $RADIUS_M))
661 PARAMETERS[
'JEditDetector -a $DETECTOR -M "$MODULE addz %" -o $DETECTOR -q -d 0 >& /dev/null']=$1
662 PARAMETERS[
'JEditHydrophone -f hydrophone.txt -S "$STRING rot %" -o hydrophone.txt -q -d 0 >& /dev/null; JEditTransmitter -f transmitter.txt -S "$STRING rot %" -o transmitter.txt -q -d 0 >& /dev/null']=$(($1 / $RADIUS_M))
667 printf
"detector %6d %8.4f\n" $N $Y
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
int main(int argc, char *argv[])
clean eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY set_variable STRING
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
then JLigier sh continue fi cat
then echo Submitting reweighting and histogram comparison jobs to nikhef stbc batch queue
o $QUALITY_ROOT d $DEBUG!JPlot1D f
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
usr share Modules init zsh export TMPDIR
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)
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
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 fatal Invalid string $STRING
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
case $OPTION in clean clean
do set_variable OUTPUT_DIRECTORY $WORKDIR T
set_array INPUT_FILES argv[2,$((START_INDEX_STRING-1))] set_array STRINGS
then $DIR JKatoomba a $DETECTOR o $WORKDIR katoomba root T $TRIPOD n sigma_s
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 if[[!-f $DETECTOR]] then JDetector sh $DETECTOR fi cat $WORKDIR trigger_parameters txt<< EOFtrigger3DMuon.enabled=1;trigger3DMuon.numberOfHits=5;trigger3DMuon.gridAngle_deg=1;ctMin=0.0;TMaxLocal_ns=15.0;EOF set_variable TRIGGEREFFICIENCY_TRIGGERED_EVENTS_ONLY INPUT_FILES=() for((i=1;$i<=$NUMBER_OF_RUNS;++i));do JSirene.sh $DETECTOR $JPP_DATA/genhen.km3net_wpd_V2_0.evt.gz $WORKDIR/sirene_ ${i}.root JTriggerEfficiency.sh $DETECTOR $DETECTOR $WORKDIR/sirene_ ${i}.root $WORKDIR/trigger_efficiency_ ${i}.root $WORKDIR/trigger_parameters.txt $JPP_DATA/PMT_parameters.txt INPUT_FILES+=($WORKDIR/trigger_efficiency_ ${i}.root) done for ANGLE_DEG in $ANGLES_DEG[*];do set_variable SIGMA_NS 3.0 set_variable OUTLIERS 3 set_variable OUTPUT_FILE $WORKDIR/matrix\[${ANGLE_DEG}\deg\].root $JPP_DIR/examples/JReconstruction-f"$INPUT_FILES[*]"-o $OUTPUT_FILE-S ${SIGMA_NS}-A ${ANGLE_DEG}-O ${OUTLIERS}-d ${DEBUG}--!fiif[[$OPTION=="plot"]];then if((0));then for H1 in h0 h1;do JPlot1D-f"$WORKDIR/matrix["${^ANGLES_DEG}" deg].root:${H1}"-y"1 2e3"-Y-L TR-T""-\^"number of events [a.u.]"-> o chi2
esac typeset A BUFFER $JPP_DIR examples JAcoustics JCreep f $INPUT_FILE BUFFER
then echo Creating output directory
do set_variable DETECTOR_TXT $WORKDIR detector
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 JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
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
#define DEBUG(A)
Message macros.