Jpp
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 /tmp/
26 set_variable OUTPUT_FILE $WORKDIR/tot.root
27 set_variable NPE 1
28 
29 
30 if ( do_usage $* ); then
31  usage "$script [output file]"
32 fi
33 
34 case $# in
35  1) OUTPUT_FILE=$1;;
36 esac
37 
38 
39 if (( 1 )); then
40 
41  $JPP_DIR/examples/JDetector/JToT \
42  -o $OUTPUT_FILE \
43  -n 999999 \
44  -N $NPE \
45  -P gain=0.9 \
46  -d $DEBUG
47 
48 fi
49 
50 if (( 0 )); then
51 
52  JPlot1D \
53  -f ${OUTPUT_FILE}:h0 \
54  -f ${OUTPUT_FILE}:h1 \
55  -f ${OUTPUT_FILE}:h2 \
56  -x "0 50" \
57  -> "time over threshold [ns]" \
58  -\^ "probability" \
59  -S 0.4 \
60  -y "1e-3 0.2" -Y \
61  -o $WORKDIR/tot.gif
62 
63 fi
64 
65 if (( 0 )); then
66 
67  JSum1D \
68  -f ${OUTPUT_FILE}:h0 \
69  -f ${OUTPUT_FILE}:h1 \
70  -f ${OUTPUT_FILE}:h2 \
71  -o $WORKDIR/sum.root
72 
73  JPlot1D \
74  -f $WORKDIR/sum.root:h0 \
75  -f $WORKDIR/sum.root:h1 \
76  -f $WORKDIR/sum.root:h2 \
77  -x "0 50" \
78  -> "time over threshold [ns]" \
79  -\^ "integrated probability" \
80  -S 0.4 \
81  -G XY \
82  -y "1e-3 1.1" -Y \
83  -o $WORKDIR/tot-sum.gif
84 
85 fi
86 
87 if (( 1 )); then
88 
89  JPlot1D \
90  -f ${OUTPUT_FILE}:h3 \
91  -> "transition time [ns]" \
92  -\^ "probability [a.u.]" \
93  -o $WORKDIR/t_ns.gif
94 
95 fi
96