Jpp  master_rocky
the software that should make you happy
JDrawDetector1D.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 script=${0##*/}
6 
7 # ------------------------------------------------------------------------------------------
8 #
9 # Utility script to make 1D plots of strings in a given detector.
10 #
11 # ------------------------------------------------------------------------------------------
12 
13 if [ -z $JPP_DIR ]; then
14  echo "Variable JPP_DIR undefined."
15  exit
16 fi
17 
18 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
19 
20 set_variable WORKDIR ${TMPDIR:-/tmp}
21 set_variable DEBUG 1
22 set_variable: FORMAT GRAPHICS_FORMAT gif
23 set_variable+ BATCH GRAPHICS_BATCH -B
24 
25 if do_usage $*; then
26  usage "$script <detector file>"
27 fi
28 
29 case $# in
30  1) set_array DETECTOR $argv[1];;
31  *) fatal "Wrong number of arguments."
32 esac
33 
34 JDrawDetector1D \
35  -a $DETECTOR \
36  -o ${TMPDIR:-/tmp}/detector.root \
37  -d $DEBUG
38 
39 JPlot1D \
40  -f ${TMPDIR:-/tmp}/detector.root:"H\[.*\].s" \
41  -> "#Deltas [m]" \
42  -\^ "number of modules" \
43  -N "X 505" \
44  -L "TL 0.9" \
45  -T "" \
46  -o detector.$FORMAT $BATCH
47 
48 JPlot1D \
49  -f ${TMPDIR:-/tmp}/detector.root:"G\[.*\].string" \
50  -x "0.5 18.5" \
51  -> "floor" \
52  -\^ "z [m]" \
53  -L "TL 0.9" \
54  -T "" \
55  -o string.$FORMAT $BATCH
56 
57 JPlot1D \
58  -w 1200x600 \
59  -f ${TMPDIR:-/tmp}/detector.root:"G\[.*\].floor" \
60  -x "1.5 18.5" \
61  -G Y \
62  -S 1.5 \
63  -> "floor" \
64  -\^ "#Deltaz [m]" \
65  -L "TR 0.9" \
66  -T "" \
67  -o floor.$FORMAT $BATCH