Jpp 20.0.0-rc.7
the software that should make you happy
Loading...
Searching...
No Matches
pre-calibration_D_ORCA006.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2script=${0##*/}
3
4# --------------------------------------------------------------------------------------------
5#
6# Steering script for the global-fit-of-global-fits procedure of the D_ORCA006 (49) detector.
7#
8# --------------------------------------------------------------------------------------------
9
10if [ -z $JPP_DIR ]; then
11 echo "Variable JPP_DIR undefined."
12 exit
13fi
14
15source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
16
17set_variable DETECTOR_ID 49
18set_array RUNS 7600 7700 7800 7900 8000 8100 8200
19set_variable: THREADS ACOUSTICS_THREADS 5
20set_variable SINGULARITY -
21set_variable WORKDIR `pwd`
22set_variable HOMEDIR $WORKDIR
23
24if do_usage $*; then
25 usage "$script [user directory]"\
26 "\nThe user directory should be specified when this script is submitted in a batch queue."
27fi
28
29case $# in
30 1) set_variable HOMEDIR $1;;
31 0) ;;
32 *) fatal "Wrong number of arguments."
33esac
34
35source JAcousticsToolkit.sh
36
37set_variable DETECTOR_INITIAL detector_initial.datx
38set_variable TRIPOD_INITIAL tripod_initial.txt
39expand_array RUNS
40
41
42# Run in HOMEDIR
43
44mkdir -p $HOMEDIR
45cd $HOMEDIR
46
47JDetectorDB \
48 -D $DETECTOR_ID \
49 -r $RUNS[1] \
50 -WW \
51 -o $DETECTOR_INITIAL
52
53cat>$TRIPOD_INITIAL<<EOF
54# Data are from V. Bertin, private communications.
551 256877.5 4743716.7 -2438.4
562 256815.5 4743395.0 -2435.5
573 257096.2 4743636.0 -2439.5
58EOF
59
60# Apply modifications.
61
62JEditDetector \
63 -a $DETECTOR_INITIAL \
64 -s "-1 addz -6.9" \
65 -o detector.datx --!
66
67eval `JPrintDetector -a detector.datx -O SUMMARY`
68
69for STRING in ${STRINGS[*]}; do
70
71 set_variable MODULE `getModule -a detector.datx -L "$STRING 0"`
72
73 JEditDetector \
74 -a detector.datx \
75 -M "$MODULE setz -2.9" \
76 -o detector.datx --!
77done
78
79cp -p $TRIPOD_INITIAL tripod.txt
80
81cat>waveform.txt<<EOF
82# waveform identifier; emitter identifier
83 12 1
84-13 1
85 14 2
86-15 2
87 16 3
88-17 3
89EOF
90
91cat>acoustics_trigger_parameters.txt<<EOF
92Q = 0.0;
93TMax_s = 0.020;
94numberOfHits = 90;
95EOF
96
97cat>disable.txt<<EOF
98# disable transmissions
99# $214a44c8-fb8c-490a-920e-41897730822a$
100# GIT 18.3.0-305-g4e82b04f4-D
101# ROOT 6.30/02
102# application JEditDisable
103# command /data1/dejong/km3net/GIT/Jpp/out//Linux/bin//JEditDisable -f disable.log -o disable.log -a detector.datx -q -d 2 --!
104# namespace KM3NET
105# system Linux verster.lorentz.leidenuniv.nl 6.6.8-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 21 04:01:49 UTC 2023 x86_64
1061 808971812
1071 809521500
1082 808472260
1092 808966194
1102 808976219
1112 808977319
1122 808978694
1133 808966194
114EOF
115
116cat>transmitter.txt<<EOF
117# $script
118EOF
119
120cat>hydrophone.txt<<EOF
121# Data from D_ORCA006_hydrophones.csv
122 1 -1 -0.93 0.46 0.55
123 2 0 0.02 1.04 0.55
124 3 0 0.46 0.93 0.55
125 9 0 -0.75 -0.72 0.55
126 10 -1 0.11 1.04 0.55
127 11 -1 0.54 0.89 0.55
128EOF
129
130JAcousticsEventBuilder.sh detector.datx $RUNS[*]
131
132INPUT_FILES=(`ls KM3NeT_${(l:8::0::0:)DETECTOR_ID}_0*${^RUNS}_event.root`)
133
134
135# Run in WORKDIR
136
137cd $WORKDIR
138
139if [ ! $HOMEDIR -ef $WORKDIR ]; then
140 cp -p $HOMEDIR/$ACOUSTICS_DETECTOR $WORKDIR
141 cp -p $HOMEDIR/${^ACOUSTICS_KEYS}.txt $WORKDIR
142 cp -p $HOMEDIR/${^ACOUSTICS_AUXS}.txt $WORKDIR
143 cp -p $HOMEDIR/${^INPUT_FILES} $WORKDIR
144fi
145
146cat>script.txt<<EOF
147stage 1b ${SINGULARITY}1 0 100.0e-6 10.0 0 0.001 0.1
148stage 2a ${SINGULARITY}1 0 100.0e-6 10.0 20 0.2 0.5
149stage 2c ${SINGULARITY}1 0 100.0e-6 10.0 20 0.2
150stage 3a ${SINGULARITY}1 0 50.0e-6 10.0 20 0.2 0.5
151stage 3c ${SINGULARITY}1 0 50.0e-6 10.0 20 0.2
152EOF
153
154JSydney.sh detector.datx $INPUT_FILES[*] script.txt
155
156if [ ! $HOMEDIR -ef $WORKDIR ]; then
157 cp -vru * $HOMEDIR
158fi