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 -V "" \
52 -WW \
53 -o $DETECTOR_INITIAL
54
55# Keep only BC sector strings (1-32)
56KEEP_ARGS=()
57for i in {1..32}; do
58 KEEP_ARGS+=(-k $i)
59done
60
61JEditDetector \
62 -a $DETECTOR_INITIAL \
63 $KEEP_ARGS \
64 -o $DETECTOR
65
66cp -p detector.datx detector_D1ARCA030_before_creep.datx
67
68
69JAcousticsEventBuilder.sh $DETECTOR $RUNS[*]
70
71INPUT_FILES=(`ls KM3NeT_${(l:8::0::0:)DETECTOR_ID}_0*${^RUNS}_event.root`)
72
73JKatoomba.sh $DETECTOR $INPUT_FILES[*] katoomba.root
74
75JCreep \
76 -a $DETECTOR \
77 -f katoomba.root \
78 -A
79