Jpp  18.3.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
compass_D0ORCA018.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 
3 # --------------------------------------------------------------------------------------------
4 #
5 # Steering script for the compass calibration procedure of the D0ORCA018 (148) detector.
6 #
7 # --------------------------------------------------------------------------------------------
8 
9 if [ -z $JPP_DIR ]; then
10  echo "Variable JPP_DIR undefined."
11  exit
12 fi
13 
14 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
15 
17 set_array RUNS 16542-16558
18 
19 if do_usage $*; then
20  usage "$script <detector file>"
21 fi
22 
23 if (( $# != 1 )); then
24  fatal "Wrong number of arguments."
25 fi
26 
28 
29 if [[ ! -f $DETECTOR ]]; then
30  fatal "Missing pre-calibrated D0ORCA018 input detector file"
31 fi
32 
33 # Some compasses have to be disabled because their unconsistent behavior perturbs the pre-calibration
34 # Compasses ORCA.0001.16, ORCA.0011.17, ORCA.0018.11, ORCA.0027.07, ORCA.0027.16, ORCA.0027.18,
35 #  ORCA.0028.02, ORCA.0028.03, ORCA.0028.04, ORCA.0028.05, ORCA.0028.07, ORCA.0028.08
36 JEditDetector \
37  -a $DETECTOR \
38  -W "808488997 set COMPASS_DISABLE" \
39  -W "813681150 set COMPASS_DISABLE" \
40  -W "817333825 set COMPASS_DISABLE" \
41  -W "813574205 set COMPASS_DISABLE" \
42  -W "816929992 set COMPASS_DISABLE" \
43  -W "808981255 set COMPASS_DISABLE" \
44  -W "817313901 set COMPASS_DISABLE" \
45  -W "817326040 set COMPASS_DISABLE" \
46  -W "817301285 set COMPASS_DISABLE" \
47  -W "817303737 set COMPASS_DISABLE" \
48  -W "817340727 set COMPASS_DISABLE" \
49  -W "817320273 set COMPASS_DISABLE" \
50  -o detector.datx \ rm -f $WORKDIR/compass-*.root
51 
52 JCompass.sh detector.datx $RUNS[*] $WORKDIR/compass-\[before\].root
53 
54 JConvertDetectorFormat -a detector.datx -o ${TMPDIR:-/tmp}/detector.datx
55 
56 JCompass.sh ${TMPDIR:-/tmp}/detector.datx $RUNS[*] $WORKDIR/compass-\[after\].root
57 
58 set_variable GRAPHICS_BATCH
59 
60 $JPP_DIR/examples/JCompass/plot-compass.sh detector.datx $WORKDIR/compass-\[before\].root $WORKDIR/compass-\[after\].root
61 
62 
then usage $script< option > nPossible plot
Definition: JMatrixNZ.sh:34
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
usr share Modules init zsh export TMPDIR
exit
Definition: JPizza.sh:36
&set_variable RUNS
Definition: datalogs.sh:21
then
Definition: datalogs.sh:31
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then fatal Detector file should be binary format fi eval JPrintDetector a $DETECTOR O IDENTIFIER typeset a INPUT_FILES expand_array RUNS for RUN 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:113
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
fi set_variable FILENAME $WORKDIR
Definition: datalogs.sh:34
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
set_variable DETECTOR
do set_variable DETECTOR_TXT $WORKDIR detector
then echo
Definition: JQAQC.sh:90
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null