Jpp  18.0.0-rc.3
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
acoustics-fit-toolkit.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 # -----------------------------------------------------------------------------------------------------
5 #
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.
9 #
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.
13 #
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.
19 #
20 # Mandatory input variables:
21 #
22 # DETECTOR # detector file
23 # INPUT_FILES # list of input files (output of JAcousticsEventBuilder[.sh])
24 #
25 # Optional input variables:
26 #
27 # HYDROPHONE # if defined, use hydrophones in global fit; else do not use hydrophones
28 #
29 # In the following:
30 #
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.
33 #
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 # -----------------------------------------------------------------------------------------------------
38 
39 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
40 source $JPP_BIN/gradient.sh
41 
42 set_variable TMPDIR `pwd`/.$$ # temporary directory
44 set_variable: JOBS ACOUSTICS_JOBS 0 # number of parallel threads
45 
46 if do_usage $*; then
47  usage "Toolkit for pre-calibrations of detectors."\
48  "\nThis script should be sourced by the steering script for a specific detector."\
49  "\nConsult the script '$0' for more details."
50 fi
51 
52 if [[ ! $ZSH_EVAL_CONTEXT =~ :file$ ]]; then
53  echo "This script should be sourced by the steering script for a specific detector."
54  exit
55 fi
56 
57 if [[ `ps -o stat= -p $$` == *"+" ]]; then
58  echo "This script cannot interactively be used."
59  exit
60 fi
61 
62 source JAcousticsToolkit.sh
63 
64 typeset -A TRIPODS # tripods
65 typeset -a CHI2 # chi2 values; index [1] corresponds to best value
66 
67 let "NUMBER_OF_ITERATIONS = 100" # maximal number of iterations
68 let "EPSILON = 5.0E-4" # maximal distance to minimum of chi2
69 let "RADIUS_M = 1.0" # maximal horizontal distance between T-bar and emitter/hydrophone
70 let "PRECISION = 10" # number of decimals of chi2 evaluation
71 
72 
73 # -----------------------------------------------------------------------------------------------------
74 # Initialise.
75 #
76 # Install input files in working directory and create temporary directory TMPDIR.
77 #
78 # -----------------------------------------------------------------------------------------------------
79 function initialise()
80 {
81  eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
82  eval `JPrintDetector -a $DETECTOR -O SUMMARY`
83  eval `JPrintDetector -a $DETECTOR -O CAN`
84 
85  JAcoustics.sh $DETECTOR_ID
86 
87  get_tripods tripod.txt TRIPODS
88 
89  TRANSMITTERS=(`get_strings_with_transmitter transmitter.txt`)
90 
91  if [[ "${HYDROPHONE+YES}" == "YES" ]]; then
92  HYDROPHONES=(`get_strings_with_hydrophone hydrophone.txt`)
93  else
94  HYDROPHONES=()
95  fi
96 
97  mkdir -p $TMPDIR
98 
99  if [[ ! -f pmt.datx ]]; then
100  JConvertDetectorFormat -a $DETECTOR -o pmt.datx
101  fi
102  JDetachPMTs -a $DETECTOR -o $DETECTOR
103 }
104 
105 
106 # -----------------------------------------------------------------------------------------------------
107 # Backup files in given directory.
108 #
109 # \param 1 directory
110 # -----------------------------------------------------------------------------------------------------
111 function backup()
112 {
113  debug "Backup intermediate results to $1"
114 
115  mkdir -p $1
116 
117  cp -p {tripod.txt,transmitter.txt,hydrophone.txt} $1
118 
119  JAttachPMTs -a $DETECTOR -f pmt.datx -o $1/detector.datx
120 }
121 
122 
123 # -----------------------------------------------------------------------------------------------------
124 # Remove temporary directory and restore input files in working directory.
125 #
126 # -----------------------------------------------------------------------------------------------------
127 function clean()
128 {
129  JAttachPMTs -a $DETECTOR -f pmt.datx -o $DETECTOR
130 
131  rm -rf $TMPDIR >& /dev/null
132 
133  rm -f {acoustics_fit_parameters,acoustics_trigger_parameters}.txt
134 
135  JAcoustics.sh $DETECTOR_ID
136 }
137 
138 
139 # -----------------------------------------------------------------------------------------------------
140 # Fix strings.
141 #
142 # \param 1-N identifiers
143 # -----------------------------------------------------------------------------------------------------
144 function fixStrings()
145 {
146  typeset -a BUFFER
147 
148  BUFFER=(`echo $*`)
149 
150  if (( ${#BUFFER} > 0 )); then
151  STRINGS=(${STRINGS:|BUFFER})
152  TRANSMITTERS=(${TRANSMITTERS:|BUFFER})
153  HYDROPHONES=(${HYDROPHONES:|BUFFER})
154  fi
155 }
156 
157 
158 # -----------------------------------------------------------------------------------------------------
159 # Fix tripods.
160 #
161 # \param 1-N identifiers
162 # -----------------------------------------------------------------------------------------------------
163 function fixTripods()
164 {
165  typeset -a BUFFER
166 
167  BUFFER=(`echo $*`)
168 
169  if (( ${#BUFFER} > 0 )); then
170  for ID in $BUFFER[*]; do
171  unset "TRIPODS[${ID}]"
172  done
173  fi
174 }
175 
176 
177 # -----------------------------------------------------------------------------------------------------
178 # Evaluate current chi2.
179 #
180 # \param 1 variable containing chi2 value on return
181 # \param 2 option
182 # -----------------------------------------------------------------------------------------------------
183 function getChi2()
184 {
185  if (( $JOBS == 0 )); then
186 
187  rm -f $TMPDIR/katoomba.root >& /dev/null
188 
189  JKatoomba \
190  -a $DETECTOR \
191  -f "$INPUT_FILES[*]" \
192  -o $TMPDIR/katoomba.root \
193  -T tripod.txt \
194  -Y transmitter.txt \
195  -V sound_velocity.txt \
196  -M mechanics.txt \
197  -@ $TMPDIR/acoustics_fit_parameters.txt \
198  -! disable.txt \
199  ${HYDROPHONE+-H hydrophone.txt} \
200  -u \
201  -d 0 >& $TMPDIR/job.log
202 
203  if (( $? != 0 )); then
204  fatal "non-zero exit code, see $TMPDIR/job.log"
205  fi
206 
207  set_variable RESULT $($JPP_DIR/examples/JAcoustics/JPrintChi2 -f $TMPDIR/katoomba.root -p $PRECISION)
208 
209  else
210 
211  if (( $2 == 0 )); then
212 
213  # step wise improvement of the chi2
214 
215  {{ JFremantle \
216  -a $DETECTOR \
217  -f "$INPUT_FILES[*]" \
218  -T tripod.txt \
219  -Y transmitter.txt \
220  -V sound_velocity.txt \
221  -M mechanics.txt \
222  -@ $TMPDIR/acoustics_fit_parameters.txt \
223  -! disable.txt \
224  ${HYDROPHONE+-H hydrophone.txt} \
225  -u \
226  -N $JOBS \
227  -d 0 3>&1 1>&4 } | read RESULT } 4>&1 >& $TMPDIR/job.log
228 
229  elif (( $2 == 1 )); then
230 
231  # evaluation of the chi2 before the determination of the gradient of the chi2
232 
233  rm -f $TMPDIR/fremantle.jpp >& /dev/null
234 
235  {{ JFremantle \
236  -a $DETECTOR \
237  -f "$INPUT_FILES[*]" \
238  -o $TMPDIR/fremantle.jpp \
239  -T tripod.txt \
240  -Y transmitter.txt \
241  -V sound_velocity.txt \
242  -M mechanics.txt \
243  -@ $TMPDIR/acoustics_fit_parameters.txt \
244  -! disable.txt \
245  ${HYDROPHONE+-H hydrophone.txt} \
246  -u \
247  -N $JOBS \
248  -d 0 3>&1 1>&4 } | read RESULT } 4>&1 >& $TMPDIR/job.log
249 
250  elif (( $2 == 2 )); then
251 
252  # evaluation of the derivative of the chi2 to each fit parameter
253 
254  {{ JPlatypus \
255  -a $DETECTOR \
256  -f $TMPDIR/fremantle.jpp \
257  -T tripod.txt \
258  -Y transmitter.txt \
259  -V sound_velocity.txt \
260  -M mechanics.txt \
261  -@ $TMPDIR/acoustics_fit_parameters.txt \
262  ${HYDROPHONE+-H hydrophone.txt} \
263  -N $JOBS \
264  -d 0 3>&1 1>&4 } | read RESULT } 4>&1 >& $TMPDIR/job.log
265 
266  else
267 
268  fatal "invalid option <$2>"
269  fi
270 
271  if (( $? != 0 )); then
272  fatal "non-zero exit code, see $TMPDIR/job.log"
273  fi
274  fi
275 
276  let "UV = $RESULT"
277 
278  if (( $? != 0 )); then
279  fatal "non-zero exit code let, value <${RESULT}>."
280  fi
281 
282  eval $1=$UV
283 }
284 
285 
286 # -----------------------------------------------------------------------------------------------------
287 # Stage 0.
288 # This stage can be used to determine the (x,y,z) positions of tripods using strings that are fixed.
289 #
290 # \param 1 fit option
291 # \param 2 M-estimator
292 # \param 3 resolution [s]
293 # \param 4 standard deviations
294 # \param 5 step size [m]
295 # \param 6 maximum number of extra steps
296 # -----------------------------------------------------------------------------------------------------
297 function stage_0()
298 {
299  cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
300 `egrep Tmax_s acoustics_fit_parameters.txt`
301 Nmin = 3;
302 option = $1;
303 mestimator = $2;
304 sigma_s = $3;
305 stdev = $4;
306 EOF
307 
308  if (( ${#STRINGS} > 0 )); then
309  JEditDetector -a $DETECTOR -o $TMPDIR/detector_0.datx -k "$STRINGS[*]" -q -d 0 >& /dev/null
310  JEditDetector -a $DETECTOR -o $DETECTOR -r "$STRINGS[*]" -q -d 0 >& /dev/null
311  fi
312 
313  PARAMETERS=()
314 
315  for ID in ${(k)TRIPODS}; do
316  PARAMETERS['JMoveTripod -f tripod.txt -T "$ID addx %" -d 0 >& /dev/null']=$5
317  PARAMETERS['JMoveTripod -f tripod.txt -T "$ID addy %" -d 0 >& /dev/null']=$5
318  PARAMETERS['JMoveTripod -f tripod.txt -T "$ID addz %" -d 0 >& /dev/null']=$5
319  done
320 
321  gradient $6 Y
322 
323  printf "detector %6d %8.4f\n" $N $Y
324 
325  if (( ${#STRINGS} > 0 )); then
326  JMergeDetector -a $DETECTOR -a $TMPDIR/detector_0.datx -o $DETECTOR >& /dev/null
327  fi
328 }
329 
330 
331 # -----------------------------------------------------------------------------------------------------
332 # Stage a.
333 # This stage can be used to determine the positions of the strings and tripods.
334 #
335 # \param 1 fit option
336 # \param 2 M-estimator
337 # \param 3 resolution [s]
338 # \param 4 standard deviations
339 # \param 5 step size strings [m]
340 # \param 6 step size tripods [m]
341 # \param 7 maximum number of extra steps
342 # -----------------------------------------------------------------------------------------------------
343 function stage_a()
344 {
345  cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
346 `egrep Tmax_s acoustics_fit_parameters.txt`
347 Nmin = 3;
348 option = $1;
349 mestimator = $2;
350 sigma_s = $3;
351 stdev = $4;
352 EOF
353 
354  PARAMETERS=()
355 
356  for STRING in $STRINGS[*]; do
357  PARAMETERS['JMoveDetector -a $DETECTOR -S "$STRING addx %" -d 0 >& /dev/null']=$5
358  PARAMETERS['JMoveDetector -a $DETECTOR -S "$STRING addy %" -d 0 >& /dev/null']=$5
359  PARAMETERS['JMoveDetector -a $DETECTOR -s "$STRING addz %" -d 0 >& /dev/null']=$5
360  done
361 
362  for ID in ${(k)TRIPODS}; do
363  PARAMETERS['JMoveTripod -f tripod.txt -T "$ID addx %" -d 0 >& /dev/null']=$6
364  PARAMETERS['JMoveTripod -f tripod.txt -T "$ID addy %" -d 0 >& /dev/null']=$6
365  PARAMETERS['JMoveTripod -f tripod.txt -T "$ID addz %" -d 0 >& /dev/null']=$6
366  done
367 
368  for STRING in ${HYDROPHONES:|TRANSMITTERS}; do
369  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']=$(($5 / $RADIUS_M))
370  done
371 
372  for STRING in $TRANSMITTERS[*]; do
373 
374  set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"`
375 
376  PARAMETERS['JMoveDetector -a $DETECTOR -M "$MODULE addz %" -d 0 >& /dev/null']=$5
377  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']=$(($5 / $RADIUS_M))
378  done
379 
380  gradient $7 Y
381 
382  printf "detector %6d %8.4f\n" $N $Y
383 }
384 
385 
386 # -----------------------------------------------------------------------------------------------------
387 # Stage b.
388 # This stage can be used to determine the stretching and z-positions of individual strings.
389 #
390 # \param 1 fit option
391 # \param 2 M-estimator
392 # \param 3 resolution [s]
393 # \param 4 standard deviations
394 # \param 5 step size stretching [unit]
395 # \param 6 step size z-position [m]
396 # \param 7 maximum number of extra steps
397 # -----------------------------------------------------------------------------------------------------
398 function stage_b()
399 {
400  cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
401 `egrep Tmax_s acoustics_fit_parameters.txt`
402 Nmin = 3;
403 option = $1;
404 mestimator = $2;
405 sigma_s = $3;
406 stdev = $4;
407 EOF
408 
409  for STRING in $STRINGS[*]; do
410 
411  JEditDetector -a $DETECTOR -o $TMPDIR/detector_1.datx -r "$STRING" -q -d 0 >& /dev/null
412  JEditDetector -a $DETECTOR -o $DETECTOR -k "$STRING" -q -d 0 >& /dev/null
413 
414  PARAMETERS=()
415 
416  PARAMETERS['JMoveDetector -a $DETECTOR -s "$STRING mul %" -d 0 >& /dev/null; JMoveDetector -a $DETECTOR -s "$STRING subz \$\(\(% * $CAN_ZMAX_M\)\)" -d 0 >& /dev/null']=$5
417  PARAMETERS['JMoveDetector -a $DETECTOR -s "$STRING addz %" -d 0 >& /dev/null']=$6
418 
419  gradient $7 Y
420 
421  printf "string %04d %6d %8.4f\n" $STRING $N $Y
422 
423  JMergeDetector -a $DETECTOR -a $TMPDIR/detector_1.datx -o $DETECTOR >& /dev/null
424  done
425 }
426 
427 
428 # -----------------------------------------------------------------------------------------------------
429 # Stage c.
430 # This stage can be used to determine the z-positions of the modules.
431 #
432 # \param 1 fit option
433 # \param 2 M-estimator
434 # \param 3 resolution [s]
435 # \param 4 standard deviations
436 # \param 5 step size [m]
437 # \param 6 maximum number of extra steps
438 # -----------------------------------------------------------------------------------------------------
439 function stage_c()
440 {
441  cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
442 `egrep Tmax_s acoustics_fit_parameters.txt`
443 Nmin = 3;
444 option = $1;
445 mestimator = $2;
446 sigma_s = $3;
447 stdev = $4;
448 EOF
449 
450  PARAMETERS=()
451 
452  for STRING in $STRINGS[*]; do
453 
454  for (( FLOOR = 1; $FLOOR <= 18; FLOOR += 1 )); do
455 
456  set_variable MODULE `getModule -a $DETECTOR -L "$STRING $FLOOR"`
457 
458  PARAMETERS['JMoveDetector -a $DETECTOR -M "$MODULE addz %" -d 0 >& /dev/null']=$5
459  done
460  done
461 
462  gradient $6 Y
463 
464  printf "detector %6d %8.4f\n" $N $Y
465 }
466 
467 
468 # -----------------------------------------------------------------------------------------------------
469 # Stage d.
470 # This stage can be used to determine the z-positions of the anchors
471 #
472 # \param 1 fit option
473 # \param 2 M-estimator
474 # \param 3 resolution [s]
475 # \param 4 standard deviations
476 # \param 5 step size [m]
477 # \param 6 maximum number of extra steps
478 # -----------------------------------------------------------------------------------------------------
479 function stage_d()
480 {
481  cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
482 `egrep Tmax_s acoustics_fit_parameters.txt`
483 Nmin = 3;
484 option = $1;
485 mestimator = $2;
486 sigma_s = $3;
487 stdev = $4;
488 EOF
489 
490  PARAMETERS=()
491 
492  for STRING in $STRINGS[*]; do
493 
494  set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"`
495 
496  PARAMETERS['JMoveDetector -a $DETECTOR -M "$MODULE addz %" -d 0 >& /dev/null']=$5
497  done
498 
499  gradient $6 Y
500 
501  printf "detector %6d %8.4f\n" $N $Y
502 }
503 
504 
505 # -----------------------------------------------------------------------------------------------------
506 # Stage D.
507 # This stage can be used to determine the rotations of the strings and z-positions of the anchors
508 # including the response of hydrophones.
509 # It includes a determination of the positions of the strings and tripods.
510 #
511 # \param 1 fit option
512 # \param 2 M-estimator
513 # \param 3 resolution [s]
514 # \param 4 standard deviations
515 # \param 5 step size strings [m]
516 # \param 6 step size tripods [m]
517 # \param 7 maximum number of extra steps
518 # -----------------------------------------------------------------------------------------------------
519 function stage_D()
520 {
521  cat>$TMPDIR/acoustics_fit_parameters.txt<<EOF
522 `egrep Tmax_s acoustics_fit_parameters.txt`
523 Nmin = 3;
524 option = $1;
525 mestimator = $2;
526 sigma_s = $3;
527 stdev = $4;
528 EOF
529 
531 
532  PARAMETERS=()
533 
534  for STRING in $STRINGS[*]; do
535 
536  set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"`
537 
538  PARAMETERS['JMoveDetector -a $DETECTOR -S "$STRING addx %" -d 0 >& /dev/null']=$5
539  PARAMETERS['JMoveDetector -a $DETECTOR -S "$STRING addy %" -d 0 >& /dev/null']=$5
540  PARAMETERS['JMoveDetector -a $DETECTOR -s "$STRING addz %" -d 0 >& /dev/null']=$5
541  PARAMETERS['JMoveDetector -a $DETECTOR -M "$MODULE addz %" -d 0 >& /dev/null']=$5
542 
543  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']=$(($5 / $RADIUS_M))
544  done
545 
546  for ID in ${(k)TRIPODS}; do
547  PARAMETERS['JMoveTripod -f tripod.txt -T "$ID addx %" -d 0 >& /dev/null']=$6
548  PARAMETERS['JMoveTripod -f tripod.txt -T "$ID addy %" -d 0 >& /dev/null']=$6
549  PARAMETERS['JMoveTripod -f tripod.txt -T "$ID addz %" -d 0 >& /dev/null']=$6
550  done
551 
552  gradient $7 Y
553 
554  printf "detector %6d %8.4f\n" $N $Y
555 }
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
then ls $DIR egrep
Definition: getArchive.sh:75
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
then usage $script[< detector identifier >< run range >]< QA/QCfile > nExample script to produce data quality plots nWhen a detector identifier and run range are data are downloaded from the database nand subsequently stored in the given QA QC file
Definition: JDataQuality.sh:19
esac done BUFFER
Definition: JMakePDF.sh:77
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
Definition: JDAQDriver.sh:51
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
then usage $script(input file)+< QA/QC file >" "\nAuxiliary script to produce the following QA/QC data then fatal Wrong number of arguments fi set_array INPUT_FILES $argv[1,-2] set_variable QAQC_FILE $argv[-1] mkdir p $WORKDIR set_variable ACOUSTICS_DEBUG
Definition: JQAQC.sh:80
usr share Modules init zsh export TMPDIR
static const double H
Planck constant [eV s].
exit
Definition: JPizza.sh:36
then fatal Number of tripods
Definition: JFootprint.sh:45
data_type r[M+1]
Definition: JPolint.hh:779
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
then echo This script cannot interactively be used exit fi source JAcousticsToolkit sh typeset A TRIPODS typeset a CHI2 let see $TMPDIR job log fi set_variable RESULT($JPP_DIR/examples/JAcoustics/JPrintChi2-f $TMPDIR/katoomba.root-p $PRECISION) else if(($2
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[*]
Definition: JCanberra.sh:68
then fatal Missing detector file $DETECTOR fi eval JPrintDetector a $DETECTOR O IDENTIFIER for KEY in tripod hydrophone transmitter
then rm
Definition: sftpput.zsh:30
then fatal Invalid string $STRING
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
then JCalibrateToT a
Definition: JTuneHV.sh:116
case $OPTION in clean clean
do set_variable OUTPUT_DIRECTORY $WORKDIR T
* usage
skip elif((BINFRAC< 1.0))
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 usage $script< input file >[option[primary[working directory]]] nWhere option can be N
Definition: JMuonPostfit.sh:36
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
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
Definition: JMatrixNZ.sh:106
then cp
possible values
then echo Creating output directory
Definition: JTuneHV.sh:83
do set_variable DETECTOR_TXT $WORKDIR detector
double u[N+1]
Definition: JPolint.hh:776
then echo
Definition: JQAQC.sh:90
static JNullStream null
Null I/O stream.
Definition: JNullStream.hh:51
double getChi2(const double P)
Get chi2 corresponding to given probability.
Definition: JFitToolkit.hh:56
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
Definition: JCanberra.sh:46
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
script
Definition: JAcoustics.sh:2
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
int debug
debug level
esac done
Definition: JAddHDE.sh:21
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62