Jpp  19.1.0-rc.1
the software that should make you happy
JPMTSimulator.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::JPMTSignalProcessorInterface.
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 2
25 set_variable WORKDIR ${TMPDIR:-/tmp}/
26 set_variable OUTPUT_FILE $WORKDIR/histogram.root
27 
28 
29 if do_usage $*; then
30  usage "$script [output file]"
31 fi
32 
33 case $# in
34  1) set_variable OUTPUT_FILE $1;;
35 esac
36 
37 
38 if ( ! reuse_file ${OUTPUT_FILE} ); then
39 
40  $JPP_DIR/examples/JDetector/JPMTSimulator \
41  -o $OUTPUT_FILE \
42  -d $DEBUG
43 
44 fi
45 
46 
47 if (( 1 )); then
48 
49  JPlot1D \
50  -f ${OUTPUT_FILE}:tot \
51  -w 550x385 \
52  -x "-5 110" \
53  -y "20 210" \
54  -G XY \
55  -> "charge hit [npe]" \
56  -\^ "time over threshold [ns]" \
57  -T ""
58 
59 fi
60 
61 
62 if (( 1 )); then
63 
64  JPlot1D \
65  -f ${OUTPUT_FILE}:hit \
66  -> "charge hit [npe]" \
67  -\^ "number of hits"
68 
69 fi
70 
71 
72 if (( 1 )); then
73 
74  JPlot2D \
75  -f ${OUTPUT_FILE}:2D \
76  -OLEGO \
77  -< "charge 1st hit [npe]" \
78  -> "delay 2nd hit [ns]" \
79  -\^ "time over threshold [ns]"
80 
81 fi