Jpp  19.1.0
the software that should make you happy
JPlotK40.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 #
4 # \author mdejong
5 #
6 version=1.0
7 script=${0##*/}
8 
9 # ------------------------------------------------------------------------------------------
10 #
11 # Utility script to plot K40 fit function.
12 #
13 # ------------------------------------------------------------------------------------------
14 
15 if [ -z $JPP_DIR ]; then
16  echo "Variable JPP_DIR undefined."
17  exit
18 fi
19 
20 source $JPP_DIR/setenv.sh $JPP_DIR
21 
22 set_variable DEBUG 2
23 set_variable WORKDIR ${TMPDIR:-/tmp}/
24 set_variable DIR $JPP_DIR/examples/JCalibrate
25 set_variable: FORMAT GRAPHICS_FORMAT gif
26 set_variable+ BATCH GRAPHICS_BATCH -B
27 
28 if do_usage $*; then
29  usage "$script [working directory]"
30 fi
31 
32 case $# in
33  1) set_variable WORKDIR $1;;
34 esac
35 
36 $DIR/JPlotK40 \
37  -o $WORKDIR/k40.root \
38  -d $DEBUG
39 
40 JPlot1D \
41  -w 1200x600 \
42  -f $WORKDIR/k40.root:h1 \
43  -y "0 10" \
44  -> "PMT pair" \
45  -\^ "rate [Hz]" \
46  -T "" \
47  -o k40.$FORMAT $BATCH