Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JDrawDetector1D.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5script=${0##*/}
6
7# ------------------------------------------------------------------------------------------
8#
9# Utility script to make 1D plots of strings in a given detector.
10#
11# ------------------------------------------------------------------------------------------
12
13if [ -z $JPP_DIR ]; then
14 echo "Variable JPP_DIR undefined."
15 exit
16fi
17
18source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
19
20set_variable WORKDIR ${TMPDIR:-/tmp}
21set_variable DEBUG 1
22set_variable: FORMAT GRAPHICS_FORMAT gif
23set_variable+ BATCH GRAPHICS_BATCH -B
24
25if do_usage $*; then
26 usage "$script <detector file>"
27fi
28
29case $# in
30 1) set_array DETECTOR $argv[1];;
31 *) fatal "Wrong number of arguments."
32esac
33
34JDrawDetector1D \
35 -a $DETECTOR \
36 -o ${TMPDIR:-/tmp}/detector.root \
37 -d $DEBUG
38
39JPlot1D \
40 -f ${TMPDIR:-/tmp}/detector.root:"H\[.*\].s" \
41 -> "#Deltas [m]" \
42 -\^ "number of modules" \
43 -N "X 505" \
44 -L "TL 0.9" \
45 -T "" \
46 -o detector.$FORMAT $BATCH
47
48JPlot1D \
49 -f ${TMPDIR:-/tmp}/detector.root:"G\[.*\].string" \
50 -x "0.5 18.5" \
51 -> "floor" \
52 -\^ "z [m]" \
53 -L "TL 0.9" \
54 -T "" \
55 -o string.$FORMAT $BATCH
56
57JPlot1D \
58 -w 1200x600 \
59 -f ${TMPDIR:-/tmp}/detector.root:"G\[.*\].floor" \
60 -x "1.5 18.5" \
61 -G Y \
62 -S 1.5 \
63 -> "floor" \
64 -\^ "#Deltaz [m]" \
65 -L "TR 0.9" \
66 -T "" \
67 -o floor.$FORMAT $BATCH