Jpp master_rocky-44-g75b7c4f75
the software that should make you happy
Loading...
Searching...
No Matches
JEnergyCorrection.sh
Go to the documentation of this file.
1#!/bin/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: FORMAT GRAPHICS_FORMAT gif
29set_variable+ BATCH GRAPHICS_BATCH -B
30
31if (( $# == 0 )); then
32 set_array INPUT_FILES `ls ${JPP_LIB}/energy_correction*.txt`
33else
34 set_array INPUT_FILES $argv[1,-1]
35fi
36
37$DIR/JEnergyCorrection \
38 -E${^INPUT_FILES} \
39 -o $WORKDIR/f1.root \
40 -d $DEBUG --!
41
42JPlot1D \
43 -f $WORKDIR/f1.root:\.\* \
44 -y "1e-3 5e1" -Y \
45 -XX \
46 -> "E [GeV]" \
47 -\^ "correction" \
48 -T "" -L BR \
49 -o $WORKDIR/energy-correction.$FORMAT $BATCH