Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JRadiation2D.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 shower energy.
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
21set_variable DEBUG 2
22set_variable WORKDIR ${TMPDIR:-/tmp}/
23set_variable: FORMAT GRAPHICS_FORMAT gif
24set_variable+ BATCH GRAPHICS_BATCH -B
25
26if do_usage $*; then
27 usage "$script [working directory]"
28fi
29
30case $# in
31 1) set_variable WORKDIR $1;;
32esac
33
34$JPP_DIR/examples/JPhysics/JRadiation2D \
35 -o $WORKDIR/radiation.root \
36 -n 1000000 \
37 -d $DEBUG
38
39for TYPE in eerad Brems gnrad; do
40 for A in O Cl H Na; do
41
42 JPlot2D \
43 -f "$WORKDIR/radiation.root:\[$TYPE $A\]" \
44 -XXYYZ \
45 -< "E_{s} [GeV]" \
46 -> "E [GeV]" \
47 -O COLZ \
48 -T "?" \
49 -o Es-$TYPE.$A.$FORMAT $BATCH
50 done
51done
52
53#rm -f $WORKDIR/radiation.root >& /dev/null