Jpp 21.0.0
the software that should make you happy
Loading...
Searching...
No Matches
post-calibration_D1ARCA030.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2script=${0##*/}
3
4# --------------------------------------------------------------------------------------------
5#
6# Steering script for the creep correction of the D1ARCA030 (267) BC strings.
7#
8# The D1ARCA051 detector (ID 277) is used as a starting point since it already contains
9# the optimized geometry of the D1ARCA030 BC strings. Only the BC strings are kept,
10# and the creep correction is applied using runs from the D1ARCA051 period (27923-27938).
11#
12# --------------------------------------------------------------------------------------------
13
14if [ -z $JPP_DIR ]; then
15 echo "Variable JPP_DIR undefined."
16 exit
17fi
18
19source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
20
21set_variable DETECTOR_ID 277
22set_array RUNS 27923-27938
23set_variable WORKDIR `pwd`
24
25
26if do_usage $*; then
27 usage "$script <source directory>"\
28 "\nThe source directory corresponds to a pre-calibrated D1ARCA030 detector."
29fi
30
31source JAcousticsToolkit.sh
32
33# Retrieve detector and auxiliary files from calibration archive and JPP inputs
34getFile.sh $CALIBRATION_ARCHIVE 267 1 tripod $WORKDIR/tripod
35getFile.sh $CALIBRATION_ARCHIVE 267 1 waveform $WORKDIR/waveform
36getFile.sh $CALIBRATION_ARCHIVE 267 1 disable $WORKDIR/disable
37getFile.sh $CALIBRATION_ARCHIVE 267 1 hydrophone $WORKDIR/hydrophone
38getFile.sh $CALIBRATION_ARCHIVE 267 1 transmitter $WORKDIR/transmitter
39getFile.sh $JPP_DIR/inputs 267 1 acoustics_fit_parameters $WORKDIR/acoustics_fit_parameters
40getFile.sh $JPP_DIR/inputs 267 1 sound_velocity $WORKDIR/sound_velocity
41getFile.sh $JPP_DIR/inputs 267 1 acoustics_trigger_parameters $WORKDIR/acoustics_trigger_parameters
42getFile.sh $JPP_DIR/inputs 267 1 mechanics $WORKDIR/mechanics
43
44set_variable DETECTOR_INITIAL detector_initial.datx
45set_variable DETECTOR detector.datx
46expand_array RUNS
47
48JDetectorDB \
49 -D $DETECTOR_ID \
50 -r $RUNS[1] \
51 -WW \
52 -o $DETECTOR_INITIAL
53
54# Keep only BC sector strings (1-32)
55KEEP_ARGS=()
56for i in {1..32}; do
57 KEEP_ARGS+=(-k $i)
58done
59
60JEditDetector \
61 -a $DETECTOR_INITIAL \
62 $KEEP_ARGS \
63 -o $DETECTOR
64
65cp -p detector.datx detector_D1ARCA030_before_creep.datx
66
67
68JAcousticsEventBuilder.sh $DETECTOR $RUNS[*]
69
70INPUT_FILES=(`ls KM3NeT_${(l:8::0::0:)DETECTOR_ID}_0*${^RUNS}_event.root`)
71
72JKatoomba.sh $DETECTOR $INPUT_FILES[*] katoomba.root
73
74JCreep \
75 -a $DETECTOR \
76 -f katoomba.root \
77 -A
78