Jpp  master_rocky-43-ge265d140c
the software that should make you happy
JToT.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 version=1.0
6 script=${0##*/}
7 
8 # ------------------------------------------------------------------------------------------
9 #
10 # Utility script to plot time slewing from JDETECTOR::JPMTDefaultSignaProcessor.
11 #
12 # ------------------------------------------------------------------------------------------
13 
14 
15 if [ -z $JPP_DIR ]; then
16  echo "Variable JPP_DIR undefined."
17  exit
18 fi
19 
20 
21 source $JPP_DIR/setenv.sh $JPP_DIR
22 
23 
24 set_variable DEBUG 3
25 set_variable WORKDIR ${TMPDIR:-/tmp}/
26 set_variable OUTPUT_FILE $WORKDIR/tot.root
27 set_variable NPE 1
28 set_variable: FORMAT GRAPHICS_FORMAT gif
29 set_variable+ BATCH GRAPHICS_BATCH -B
30 
31 
32 if do_usage $*; then
33  usage "$script [output file]"
34 fi
35 
36 case $# in
37  1) set_variable OUTPUT_FILE $1;;
38 esac
39 
40 
41 if (( 1 )); then
42 
43  $JPP_DIR/examples/JDetector/JToT \
44  -o $OUTPUT_FILE \
45  -n 999999 \
46  -N $NPE \
47  -P %.gain=1.0 \
48  -d $DEBUG
49 
50 fi
51 
52 if (( 1 )); then
53 
54  JPlot1D \
55  -f ${OUTPUT_FILE}:h0 \
56  -f ${OUTPUT_FILE}:h1 \
57  -f ${OUTPUT_FILE}:h2 \
58  -x "0 50" \
59  -> "time over threshold [ns]" \
60  -\^ "probability" \
61  -S 0.4 \
62  -y "1e-3 0.2" -Y \
63  -o $WORKDIR/tot.$FORMAT $BATCH
64 
65 fi
66 
67 if (( 1 )); then
68 
69  JSum1D \
70  -f ${OUTPUT_FILE}:h0 \
71  -f ${OUTPUT_FILE}:h1 \
72  -f ${OUTPUT_FILE}:h2 \
73  -o $WORKDIR/sum.root
74 
75  JPlot1D \
76  -f $WORKDIR/sum.root:h0 \
77  -f $WORKDIR/sum.root:h1 \
78  -f $WORKDIR/sum.root:h2 \
79  -x "0 50" \
80  -> "time over threshold [ns]" \
81  -\^ "integrated probability" \
82  -S 0.4 \
83  -G XY \
84  -y "1e-3 1.1" -Y \
85  -o $WORKDIR/tot-sum.$FORMAT $BATCH
86 
87 fi
88 
89 if (( 1 )); then
90 
91  JPlot1D \
92  -f ${OUTPUT_FILE}:h3 \
93  -> "transition time [ns]" \
94  -\^ "probability [a.u.]" \
95  -o $WORKDIR/t_ns.$FORMAT $BATCH
96 
97 fi
98