Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JEMShower.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 number of photons - GeV for EM-showers
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
21
22set_variable DEBUG 2
23set_variable WORKDIR ./
24set_variable: FORMAT GRAPHICS_FORMAT gif
25set_variable+ BATCH GRAPHICS_BATCH -B
26
27if do_usage $*; then
28 usage "$script [working directory]"
29fi
30
31case $# in
32 1) set_variable WORKDIR $1;;
33esac
34
35set_variable GRAPH_TXT $WORKDIR/graph.txt
36set_variable GRAPH_ROOT $WORKDIR/graph\[Geant4\].root
37set_variable GEANC_ROOT $WORKDIR/geanc\[JSirene\].root
38
39# number of photons per GeV
40# from Geant4 simulation by Daniel Lopez
41
42cat>$GRAPH_TXT<<EOF
43 1.0e-3 90.96
44 2.0e-3 277.36
45 3.0e-3 485.82
46 4.0e-3 692.83
47 5.0e-3 890.01
48 6.0e-3 1098.53
49 7.0e-3 1285.47
50 8.0e-3 1502.86
51 9.0e-3 1687.15
52 10.0e-3 1856.97
53100.0e-3 1.905e4
54 1.0 1.889e5
55 10.0 1.875e6
56100.0 1.881e7
57EOF
58
59JGraph \
60 -f $GRAPH_TXT \
61 -o $GRAPH_ROOT
62
63JEMShower \
64 -o $GEANC_ROOT
65
66JPlot1D \
67 -f ${GRAPH_ROOT}:\.\* \
68 -f ${GEANC_ROOT}:h0 \
69 -x "-4 +4" \
70 -XX \
71 -y "1e1 1e9" \
72 -Y \
73 -> "E [GeV]" \
74 -\^ "number of photons" \
75 -T "" \
76 -o $WORKDIR/geant4.$FORMAT $BATCH
77
78
79JPlot1D \
80 -f ${GEANC_ROOT}:h1 \
81 -XX \
82 -y "0.0 1.1" \
83 -> "E [GeV]" \
84 -\^ "Geant4/JSirene" \
85 -T "" \
86 -o $WORKDIR/ratio.$FORMAT $BATCH