Jpp master_rocky-44-g75b7c4f75
the software that should make you happy
Loading...
Searching...
No Matches
pre-calibration_D1ORCA015.sh
Go to the documentation of this file.
1#!/bin/zsh
2script=${0##*/}
3
4# --------------------------------------------------------------------------------------------
5#
6# Steering script for the global-fit-of-global-fits procedure of the D1ORCA015 (146) detector.
7# It is assumed that this script is using the D0ORCA015 detector as the input detector.
8#
9# --------------------------------------------------------------------------------------------
10
11if [ -z $JPP_DIR ]; then
12 echo "Variable JPP_DIR undefined."
13 exit
14fi
15
16source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
17
18set_variable DETECTOR_ID 146
19set_array RUNS 16386 16387 16388 16389 16390 16391 16392
20set_variable: THREADS ACOUSTICS_THREADS 5
21set_variable SINGULARITY -
22set_variable WORKDIR `pwd`
23set_variable HOMEDIR $WORKDIR
24
25if do_usage $*; then
26 usage "$script <source directory> [user directory]"\
27 "\nThe source directory corresponds to a pre-calibrated D0ORCA015 detector."\
28 "\nThe user directory should be specified when this script is submitted in a batch queue."
29fi
30
31case $# in
32 2) set_variable HOMEDIR $2;&
33 1) set_variable DIR ${1:a};;
34 *) fatal "Wrong number of arguments."
35esac
36
37source JAcousticsToolkit.sh
38
39set_variable DETECTOR $DIR/detector.datx
40set_variable TRIPOD $DIR/tripod.txt
41set_variable TRIPOD_INITIAL tripod_initial.txt
42expand_array RUNS
43
44
45# Run in HOMEDIR
46
47mkdir -p $HOMEDIR
48cd $HOMEDIR
49
50cat>$TRIPOD_INITIAL<<EOF
51# position of emitter 5 taken from https://elog.km3net.de/Operations+FR/8271 (RAB1v2)
52# position of emitter 6 taken from https://elog.km3net.de/Operations+FR/8731 (RAB2)
53# position of emitter 8 taken from https://elog.km3net.de/Operations+FR/9603 (RAB3)
545 +257040.800 +4743317.600 -2439.900
556 +256807.500 +4743636.500 -2442.500
568 +257118.100 +4743781.100 -2440.300
57EOF
58
59# Apply modifications.
60
61JEditDetector \
62 -a $DETECTOR \
63 -@ "id=$DETECTOR_ID" \
64 -o detector.datx
65
66eval `JPrintDetector -a detector.datx -O SUMMARY`; FIXED_STRINGS=($STRINGS[*])
67
68typeset -A TRIPODS
69
70get_tripods $TRIPOD_INITIAL TRIPODS; FINAL_TRIPODS=(${(k)TRIPODS[*]})
71get_tripods $TRIPOD TRIPODS; FIXED_TRIPODS=(${(k)TRIPODS[*]})
72
73cp -p $TRIPOD_INITIAL tripod.txt
74
75JEditTripod -f tripod.txt -r "${FIXED_TRIPODS}" -o tripod.txt
76JMergeTripod -f tripod.txt -f $TRIPOD -o tripod.txt
77JEditTripod -f tripod.txt -k "${FINAL_TRIPODS}" -o tripod.txt
78
79cat>acoustics_trigger_parameters.txt<<EOF
80Q = 0.0;
81TMax_s = 0.015;
82numberOfHits = 200;
83EOF
84
85cat>disable.txt<<EOF
86# disable transmissions
87# $d5e8c53d-faa9-4d6a-937d-eb5a3389d457$
88# GIT 18.3.0-305-g4e82b04f4-D
89# ROOT 6.30/02
90# application JEditDisable
91# command /data1/dejong/km3net/GIT/Jpp/out//Linux/bin//JEditDisable -f disable.log -o disable.log -a detector.datx -q -d 2 --!
92# namespace KM3NET
93# 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
941 809521500
952 808472260
962 808966194
972 808977319
983 808966194
993 813553576
1005 806487231
1015 808978694
1026 817329086
1038 806487231
104EOF
105
106TRIPOD=(tripod)
107
108cp -p $DIR/${^ACOUSTICS_AUXS:|TRIPOD}.txt .
109
110JAcousticsEventBuilder.sh detector.datx $RUNS[*]
111
112INPUT_FILES=(`ls KM3NeT_${(l:8::0::0:)DETECTOR_ID}_0*${^RUNS}_event.root`)
113
114
115# Run in WORKDIR
116
117cd $WORKDIR
118
119if [ ! $HOMEDIR -ef $WORKDIR ]; then
120 cp -p $HOMEDIR/$ACOUSTICS_DETECTOR $WORKDIR
121 cp -p $HOMEDIR/${^ACOUSTICS_KEYS}.txt $WORKDIR
122 cp -p $HOMEDIR/${^ACOUSTICS_AUXS}.txt $WORKDIR
123 cp -p $HOMEDIR/${^INPUT_FILES} $WORKDIR
124fi
125
126cat>script.txt<<EOF
127
128fix string $FIXED_STRINGS[*]
129fix tripod $FIXED_TRIPODS[*]
130
131stage 0 ${SINGULARITY}1 0 100.0e-6 10.0 10 0.5
132
133initialise
134
135stage 2a ${SINGULARITY}1 0 100.0e-6 10.0 20 0.2 0.5
136stage 2c ${SINGULARITY}1 0 100.0e-6 10.0 20 0.2
137stage 3a ${SINGULARITY}1 0 50.0e-6 10.0 20 0.2 0.5
138stage 3c ${SINGULARITY}1 0 50.0e-6 10.0 20 0.2
139EOF
140
141JSydney.sh detector.datx $INPUT_FILES[*] script.txt
142
143if [ ! $HOMEDIR -ef $WORKDIR ]; then
144 cp -vru * $HOMEDIR
145fi