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 (( 1 )); 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 
62 fi
63 
64 if (( 1 )); then
65 
66  JSum1D \
67  -f ${OUTPUT_FILE}:h0 \
68  -f ${OUTPUT_FILE}:h1 \
69  -f ${OUTPUT_FILE}:h2 \
70  -o $WORKDIR/sum.root
71 
72  JPlot1D \
73  -f $WORKDIR/sum.root:h0 \
74  -f $WORKDIR/sum.root:h1 \
75  -f $WORKDIR/sum.root:h2 \
76  -x "0 50" \
77  -> "time over threshold [ns]" \
78  -\^ "integrated probability" \
79  -S 0.4 \
80  -G XY \
81  -y "1e-3 1.1" -Y
82 
83 fi