Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JPMTSimulator.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5version=1.0
6script=${0##*/}
7
8# ------------------------------------------------------------------------------------------
9#
10# Utility script to plot time slewing from JDETECTOR::JPMTSignalProcessorInterface.
11#
12# ------------------------------------------------------------------------------------------
13
14
15if [ -z $JPP_DIR ]; then
16 echo "Variable JPP_DIR undefined."
17 exit
18fi
19
20
21source $JPP_DIR/setenv.sh $JPP_DIR
22
23
24set_variable DEBUG 2
25set_variable WORKDIR ${TMPDIR:-/tmp}/
26set_variable OUTPUT_FILE $WORKDIR/histogram.root
27
28
29if do_usage $*; then
30 usage "$script [output file]"
31fi
32
33case $# in
34 1) set_variable OUTPUT_FILE $1;;
35esac
36
37
38if ( ! reuse_file ${OUTPUT_FILE} ); then
39
40 $JPP_DIR/examples/JDetector/JPMTSimulator \
41 -o $OUTPUT_FILE \
42 -d $DEBUG
43
44fi
45
46
47if (( 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
59fi
60
61
62if (( 1 )); then
63
64 JPlot1D \
65 -f ${OUTPUT_FILE}:hit \
66 -> "charge hit [npe]" \
67 -\^ "number of hits"
68
69fi
70
71
72if (( 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
81fi