Jpp  master_rocky
the software that should make you happy
plot-hobbit.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 script=${0##*/}
3 
4 if [ -z $JPP_DIR ]; then
5  echo "Variable JPP_DIR undefined."
6  exit
7 fi
8 
9 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10 
11 set_variable: DEBUG CALIBRATION_DEBUG 1
12 set_variable WORKDIR ${TMPDIR:-/tmp}/
13 set_variable: FORMAT GRAPHICS_FORMAT gif
14 set_variable+ BATCH GRAPHICS_BATCH -B
15 
16 if do_usage $*; then
17  usage "$script (input file)+"
18 fi
19 
20 if (( $# < 1 )); then
21  fatal "Not enough arguments."
22 fi
23 
24 INPUT_FILES=($argv[1,-1])
25 
26 if (( 1 )); then
27 
28  JPlot1D \
29  -f "${INPUT_FILES//\.root/.root:hq}" \
30  -w 1000x500 \
31  -y "0 2" \
32  -> "module index" \
33  -\^ "status" \
34  -L TR -T "" \
35  -o q.$FORMAT $BATCH
36 
37 fi
38 
39 if (( 1 )); then
40 
41  JPlot1D \
42  -f "${INPUT_FILES//\.root/.root:h0}" \
43  -w 1000x500 \
44  -y "-5 +5" \
45  -> "module index" \
46  -\^ "#Deltat0 [ns]" \
47  -L TR -T "" \
48  -o t0.$FORMAT $BATCH
49 
50 fi
51 
52 if (( 1 )); then
53 
54  JVariance1D \
55  -f "${INPUT_FILES//\.root/.root:h0}" \
56  -o variance.root \
57  -x "101 -10 +10" \
58  -F 0
59 
60  JPlot1D \
61  -f variance.root:h0 \
62  -> "#Deltat0 [ns]" \
63  -\^ "number of modules" \
64  -T "" -s 1110 \
65  -o t0s.$FORMAT $BATCH
66 
67 fi
68 
69 if (( 1 )); then
70 
71  JPlot1D \
72  -f "${INPUT_FILES//\.root/.root:hc}" \
73  -w 1000x500 \
74  -y "0 5" \
75  -> "module index" \
76  -\^ "#chi^{2}/NDF" \
77  -L TR -T "" \
78  -o chi2.$FORMAT $BATCH
79 
80 fi
81 
82 if (( 1 )); then
83 
84  JPlot1D \
85  -f "${INPUT_FILES//\.root/.root:h2}" \
86  -P Y \
87  -> "#Deltat" \
88  -\^ "number of hits" \
89  -T "" \
90  -o d1t.$FORMAT $BATCH
91 
92 fi
93 
94 if (( 1 )); then
95 
96  JPlot2D \
97  -f "${INPUT_FILES//\.root/.root:h2}" \
98  -O COLZ \
99  -> "module index" \
100  -< "#Deltat" \
101  -T "" \
102  -o d2t.$FORMAT $BATCH
103 fi