Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pre-calibration_D_ORCA006.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 # --------------------------------------------------------------------------------------------
5 #
6 # Steering script for the global-fit-of-global-fits procedure of the D_ORCA006 (49) detector.
7 #
8 # --------------------------------------------------------------------------------------------
9 
10 if [ -z $JPP_DIR ]; then
11  echo "Variable JPP_DIR undefined."
12  exit
13 fi
14 
15 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
16 
18 set_array RUNS 7600 7700 7800 7900 8000 8100 8200
19 set_variable: THREADS ACOUSTICS_THREADS 5
20 set_variable SINGULARITY -
23 
24 if do_usage $*; then
25  usage "$script [user directory]"\
26  "\nThe user directory should be specified when this script is submitted in a batch queue."
27 fi
28 
29 case $# in
31  0) ;;
32  *) fatal "Wrong number of arguments."
33 esac
34 
35 source JAcousticsToolkit.sh
36 
37 set_variable DETECTOR_INITIAL detector_initial.datx
38 set_variable TRIPOD_INITIAL tripod_initial.txt
39 expand_array RUNS
40 
41 
42 # Run in HOMEDIR
43 
44 mkdir -p $HOMEDIR
45 cd $HOMEDIR
46 
47 JDetectorDB \
48  -D $DETECTOR_ID \
49  -r $RUNS[1] \
50  -WW \
51  -o $DETECTOR_INITIAL
52 
53 cat>$TRIPOD_INITIAL<<EOF
54 # Data are from V. Bertin, private communications.
55 1 256877.5 4743716.7 -2438.4
56 2 256815.5 4743395.0 -2435.5
57 3 257096.2 4743636.0 -2439.5
58 EOF
59 
60 # Apply modifications.
61 
62 JEditDetector \
63  -a $DETECTOR_INITIAL \
64  -s "-1 addz -6.9" \
65  -o detector.datx --!
66 
67 eval `JPrintDetector -a detector.datx -O SUMMARY`
68 
69 for 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 --!
77 done
78 
79 JEditDetector \
80  -a detector.datx \
81  -M "808972598 swap 27 28" \
82  -o detector.datx --!
83 
84 cp -p $TRIPOD_INITIAL tripod.txt
85 
86 cat>acoustics_trigger_parameters.txt<<EOF
87 Q = 0.0;
88 TMax_s = 0.020;
89 numberOfHits = 90;
90 EOF
91 
92 cat>disable.txt<<EOF
93 # disable transmissions
94 # $214a44c8-fb8c-490a-920e-41897730822a$
95 # GIT 18.3.0-305-g4e82b04f4-D
96 # ROOT 6.30/02
97 # application JEditDisable
98 # command /data1/dejong/km3net/GIT/Jpp/out//Linux/bin//JEditDisable -f disable.log -o disable.log -a detector.datx -q -d 2 --!
99 # namespace KM3NET
100 # 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
101 1 808971812
102 1 809521500
103 2 808472260
104 2 808966194
105 2 808976219
106 2 808977319
107 2 808978694
108 3 808966194
109 EOF
110 
111 cat>transmitter.txt<<EOF
112 # $script
113 EOF
114 
115 cat>hydrophone.txt<<EOF
116 # Data from D_ORCA006_hydrophones.csv
117  1 -1 -0.93 0.46 0.55
118  2 0 0.02 1.04 0.55
119  3 0 0.46 0.93 0.55
120  9 0 -0.75 -0.72 0.55
121  10 -1 0.11 1.04 0.55
122  11 -1 0.54 0.89 0.55
123 EOF
124 
125 JAcousticsEventBuilder.sh detector.datx $RUNS[*]
126 
127 INPUT_FILES=(`ls KM3NeT_${(l:8::0::0:)DETECTOR_ID}_0*${^RUNS}_event.root`)
128 
129 
130 # Run in WORKDIR
131 
132 cd $WORKDIR
133 
134 if [ ! $HOMEDIR -ef $WORKDIR ]; then
135  cp -p $HOMEDIR/$ACOUSTICS_DETECTOR $WORKDIR
136  cp -p $HOMEDIR/${^ACOUSTICS_KEYS}.txt $WORKDIR
137  cp -p $HOMEDIR/${^ACOUSTICS_AUXS}.txt $WORKDIR
138  cp -p $HOMEDIR/${^INPUT_FILES} $WORKDIR
139 fi
140 
141 cat>script.txt<<EOF
142 stage 1b ${SINGULARITY}1 0 100.0e-6 10.0 0 0.001 0.1
143 stage 2a ${SINGULARITY}1 0 100.0e-6 10.0 20 0.2 0.5
144 stage 2c ${SINGULARITY}1 0 100.0e-6 10.0 20 0.2
145 stage 3a ${SINGULARITY}1 0 50.0e-6 10.0 20 0.2 0.5
146 stage 3c ${SINGULARITY}1 0 50.0e-6 10.0 20 0.2
147 EOF
148 
149 JSydney.sh detector.datx $INPUT_FILES[*] script.txt
150 
151 if [ ! $HOMEDIR -ef $WORKDIR ]; then
152  cp -vru * $HOMEDIR
153 fi
*fatal Wrong number of arguments esac source JAcousticsToolkit sh mkdir p $WORKDIR post calibration pushd $WORKDIR post calibration post calibration_D0ARCA021 sh $DIR popd set_variable DETECTOR $WORKDIR post calibration detector datx set_variable TRIPOD $WORKDIR post calibration tripod txt set_variable DETECTOR_INITIAL detector_initial datx expand_array RUNS mkdir p $HOMEDIR cd $HOMEDIR JDetectorDB D $DETECTOR_ID r $RUNS[1] V WW o $DETECTOR_INITIAL JEditDetector a $DETECTOR r o detector_tmp datx!eval JPrintDetector a $DETECTOR_INITIAL O SUMMARY
Q(UTCMax_s-UTCMin_s)-livetime_s
clean eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY set_variable STRING
then JLigier sh continue fi cat
Definition: JDAQDriver.sh:51
then usage $script[user directory] nThe user directory should be specified when this script is submitted in a batch queue fi case set_variable HOMEDIR
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O SUMMARY JPrintDAQHeader f $INPUT_FILE read A DAQ_HEADER set_variable DETECTOR_ID
Definition: JSquid.sh:28
exit
Definition: JPizza.sh:36
data_type r[M+1]
Definition: JPolint.hh:868
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then
Definition: datalogs.sh:34
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then fatal Missing detector file $DETECTOR fi eval JPrintDetector a $DETECTOR O IDENTIFIER RUNS
then JCalibrateToT a
Definition: JTuneHV.sh:107
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable DEBUG set_variable WORKDIR if do_usage *then usage for INPUT_FILE in $INPUT_FILES[*]
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
Definition: JLegolas.sh:20
* usage
$WORKDIR ev_configure_dqsimulator txt echo process $DQ_SIMULATOR $i $SOURCE_HOST[$index] csh c(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&($DQ_SIMULATOR\-u\$NAME\$\-H\$SERVER\$\-M\$LOGGER\$\-d $DEBUG</dev/null > &/dev/null &))'
set_array INPUT_FILES argv[2,$((START_INDEX_STRING-1))] set_array STRINGS
then usage $script[energy[distance[z of PMT]]] fi case set_variable z
Definition: JDrawPDF.sh:45
do set_variable INPUT_FILE $WORKDIR KM3NeT_
then fatal The output file must have the wildcard in the e g root fi 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:48
then error Missing CDF files error Run
Definition: JSirene.sh:59
do sput $STRING $FLOOR sget MODULE INPUT_FILES
*fatal Wrong number of arguments esac for INPUT_FILE in eval ls rt $DIR stage
then cp
then fatal Abort fi fi done for RUN in $RUNS[*]
do set_variable DETECTOR_TXT $WORKDIR detector
then echo
Definition: JQAQC.sh:92
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
then getFile sh $JPP_ARCHIVE $DETECTOR_ID $RUNS[1] $KEY $VERSION $WORKDIR
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
esac done
Definition: JAddHDE.sh:21