Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JEnergyCorrection.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 energy correction.
11#
12# ------------------------------------------------------------------------------------------
13
14if [ -z $JPP_DIR ]; then
15 echo "Variable JPP_DIR undefined."
16 exit
17fi
18
19source $JPP_DIR/setenv.sh $JPP_DIR
20
21if do_usage $*; then
22 usage "$script [(input file)+]"
23fi
24
25set_variable DEBUG 3
26set_variable WORKDIR ${TMPDIR:-/tmp}/
27set_variable DIR $JPP_DIR/examples/JReconstruction
28set_variable: LOGE RECONSTRUCTION_LOGE 3.0 8.0
29set_variable: FORMAT GRAPHICS_FORMAT gif
30set_variable+ BATCH GRAPHICS_BATCH -B
31
32if (( $# == 0 )); then
33 set_array INPUT_FILES `ls ${JPP_LIB}/energy_correction*.txt`
34else
35 set_array INPUT_FILES $argv[1,-1]
36fi
37
38$DIR/JEnergyCorrection \
39 -E${^INPUT_FILES} \
40 -o $WORKDIR/f1.root \
41 -x "$LOGE" \
42 -d $DEBUG --!
43
44JPlot1D \
45 -f $WORKDIR/f1.root:\.\* \
46 -y "5e-2 2e1" -Y \
47 -XX \
48 -> "E [GeV]" \
49 -\^ "correction" \
50 -T "" \
51 -G XY \
52 -L BR \
53 -o energy-correction.$FORMAT $BATCH
54
55rm -f $WORKDIR/f1.root