Jpp  18.1.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pre-calibration_D0ARCA006.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 D0ARCA006 (75) 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 9700 9777 9884 9984 10000 10113 10200 10263
19 set_variable: MUL ACOUSTICS_MUL -1.21e-2
20 set_variable: JOBS ACOUSTICS_JOBS 5
21 
22 if do_usage $*; then
23  usage "$script [user directory]"\
24  "\nThe user directory should be specified when this script is submitted in a batch queue."
25 fi
26 
29 
30 case $# in
32  0) ;;
33  *) fatal "Wrong number of arguments."
34 esac
35 
36 
38 set_variable TRIPOD tripod.txt
39 set_variable DETECTOR_INITIAL detector_initial.datx
40 set_variable TRIPOD_INITIAL tripod_initial.txt
41 expand_array RUNS
42 
43 
44 # Run in HOMEDIR
45 
46 mkdir -p $HOMEDIR
47 
48 cd $HOMEDIR
49 
50 if [[ ! -f $DETECTOR_INITIAL ]]; then
51 
52  JDetectorDB \
53  -D $DETECTOR_ID \
54  -@ "tcal = A03166911" \
55  -@ "pcal = A02980895" \
56  -@ "rcal = A02980908" \
57  -V "" \
58  -WW \
59  -o $DETECTOR_INITIAL
60 fi
61 
62 if [[ ! -f $TRIPOD_INITIAL ]]; then
63 
64  cat>$TRIPOD_INITIAL<<EOF
65 # See https://git.km3net.de/calibration/input_tables for the origin(s) of the values
66 2 +587441.700 +4017014.700 -3459.600
67 3 +587848.700 +4016749.700 -3459.600
68 4 +587657.170 +4017113.940 -3459.600
69 5 +587906.500 +4017094.300 -3459.600
70 EOF
71 fi
72 
73 if [[ ! -f $DETECTOR ]]; then
74 
75  # Apply modifications.
76 
77  JEditDetector \
78  -a $DETECTOR_INITIAL \
79  -s "-1 mul $MUL" \
80  -o $DETECTOR
81 
82  eval `JPrintDetector -a $DETECTOR -O SUMMARY`
83 
84  for STRING in ${STRINGS[*]}; do
85 
86  set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"`
87 
88  JEditDetector \
89  -a $DETECTOR \
90  -M "$MODULE setz -11.7" \
91  -o $DETECTOR --!
92  done
93 fi
94 
95 if [[ ! -f $TRIPOD ]]; then
96 
97  cp -p $TRIPOD_INITIAL $TRIPOD
98 fi
99 
100 JAcoustics.sh $DETECTOR_ID
101 
102 cat>acoustics_trigger_parameters.txt<<EOF
103 Q = 0.0;
104 TMax_s = 0.020;
105 numberOfHits = 90;
106 EOF
107 
108 JAcousticsEventBuilder.sh $DETECTOR $RUNS[*]
109 
110 rm -f acoustics_trigger_parameters.txt
111 
112 JAcoustics.sh $DETECTOR_ID
113 
114 INPUT_FILES=(`ls KM3NeT_${(l:8::0::0:)DETECTOR_ID}_0*${^RUNS}_event.root`)
115 
116 
117 # Run in WORKDIR
118 
119 cd $WORKDIR
120 
121 if [ ! $HOMEDIR -ef $WORKDIR ]; then
123  cp -p $HOMEDIR/${^ACOUSTICS_KEYS}.txt $WORKDIR
125 fi
126 
127 cat>script.txt<<EOF
128 stage 1a 0 2 250.0e-6 10.0 20 0.5 1.0
129 stage 1b 0 2 250.0e-6 10.0 0 0.002 0.2
130 stage 1c 2 0 250.0e-6 10.0 20 0.3
131 stage 2a 2 0 100.0e-6 10.0 20 0.2 0.4
132 stage 2c 2 0 100.0e-6 10.0 20 0.2
133 stage 3a 2 0 50.0e-6 10.0 20 0.2 0.4
134 stage 3c 2 0 50.0e-6 10.0 20 0.2
135 EOF
136 
137 JSydney.sh $DETECTOR $INPUT_FILES[*] script.txt
138 
139 if [ ! $HOMEDIR -ef $WORKDIR ]; then
140  cp -vru * $HOMEDIR
141 fi
Q(UTCMax_s-UTCMin_s)-livetime_s
set_array RUNS
$WORKDIR stage
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 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
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
exit
Definition: JPizza.sh:36
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then rm
Definition: sftpput.zsh:30
do JPrintDAQHeader f $INPUT_FILE d read DETECTOR_ID RUN FRAME_INDEX TIMESLICE_START set_variable OUTPUT_FILE $WORKDIR KM3NeT_
then fatal Detector file should be binary format fi eval JPrintDetector a $DETECTOR O IDENTIFIER typeset a INPUT_FILES for RANGE in $RUNS[*]
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
then JCalibrateToT a
Definition: JTuneHV.sh:116
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 DEBUG set_variable WORKDIR
Definition: JLegolas.sh:20
* usage
then fatal Timeout at user input fi set_variable SERVER JServerDB wget no check certificate q https
Definition: JCookie.sh:58
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DETECTOR_ID set_array RUNS if do_usage *then usage $script[user directory] nThe user directory should be specified when this script is submitted in a batch queue fi set_variable WORKDIR pwd set_variable HOMEDIR $WORKDIR case set_variable HOMEDIR
do sput $STRING $FLOOR sget MODULE INPUT_FILES
Definition: JCanberra.sh:77
$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
backup $HOMEDIR
then set_variable MODULE getModule a $DETECTOR L $STRING $FLOOR JEditDetector a $DETECTOR M $MODULE add $X o $DETECTOR else echo No update of detector $DETECTOR
then error Missing CDF files error Run
Definition: JSirene.sh:58
then display $WORKDIR
Definition: plot-Domino.sh:128
then cp
set_variable DETECTOR
do set_variable DETECTOR_TXT $WORKDIR detector
then echo
Definition: JQAQC.sh:90
static JNullStream null
Null I/O stream.
Definition: JNullStream.hh:51
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] 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:46
script
Definition: JAcoustics.sh:2
do echo Generating $dir eval D
Definition: JDrawLED.sh:53
then fatal Invalid tripod $TRIPOD
const JModule & getModule(const JDetector &detector, const JModuleLocation &location)
find module with a given string and floor number
esac done
Definition: JAddHDE.sh:21