Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JDB/plot-PMTParameters.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3#
4# \author mdejong
5#
6version=1.0
7script=${0##*/}
8
9if [ -z $JPP_DIR ]; then
10 echo "Variable JPP_DIR undefined."
11 exit
12fi
13
14source $JPP_DIR/setenv.sh $JPP_DIR
15
16set_variable DEBUG 2
17set_variable WORKDIR `pwd`
18set_variable OUTPUT_FILE $WORKDIR/pmt_parameters.root
19set_variable DIR $JPP_DIR/examples/JDB/
20set_variable: FORMAT GRAPHICS_FORMAT gif
21set_variable+ BATCH GRAPHICS_BATCH -B
22
23if do_usage $*; then
24 usage "$script <detector file> <PMT parameters file>"
25fi
26
27if (( $# != 2 )); then
28 fatal "Wrong number of parameters."
29fi
30
31set_variable DETECTOR $argv[1]
32set_variable INPUT_FILE $argv[2]
33
34eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
35
36set_variable DETID `getDetector -D $DETECTOR_ID -O string`
37
38$DIR/JPlotPMTParameters \
39 -a $DETECTOR \
40 -P $INPUT_FILE \
41 -o $OUTPUT_FILE \
42 -d $DEBUG
43
44for KEY in TTS_ns QE gain gainSpread; do
45
46 JPlot1D \
47 -f "${OUTPUT_FILE}:${KEY}\[.*\]" \
48 -> "$KEY" \
49 -\^ "number of PMTs" \
50 -T "$DETID" \
51 -L "TL 0.8" \
52 -o $KEY.$FORMAT $BATCH
53done