Jpp test-rotations-old-533-g2bdbdb559
the software that should make you happy
Loading...
Searching...
No Matches
JStarTrek.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 event rate of astrophysical source.
11#
12# ------------------------------------------------------------------------------------------
13
14
15if [ -z $JPP_DIR ]; then
16 echo "Variable JPP_DIR undefined."
17 exit
18fi
19
20
21source $JPP_DIR/setenv.sh $JPP_DIR
22
23
24set_variable DEBUG 2
25set_variable WORKDIR ./
26set_variable OUTPUT_FILE startrek.root
27set_variable NUMBER_OF_BLOCKS 2
28set_variable: FORMAT GRAPHICS_FORMAT gif
29set_variable+ BATCH GRAPHICS_BATCH -B
30
31if do_usage $*; then
32 usage "$script <input file>"
33fi
34
35if (( $# != 1 )); then
36 fatal "Wrong number of arguments."
37fi
38
39set_variable INPUT_FILE $1
40
41
42if (( 1 )); then
43
44 print_variable INPUT_FILE OUTPUT_FILE
45 check_input_file $INPUT_FILE
46
47 $JPP_DIR/examples/JAstronomy/JStarTrek \
48 -f $INPUT_FILE \
49 -o $OUTPUT_FILE \
50 -N $NUMBER_OF_BLOCKS \
51 -o $OUTPUT_FILE \
52 -d $DEBUG --!
53
54fi
55
56
57if (( 1 )); then
58
59 JPlot1D \
60 -f ${OUTPUT_FILE}:ct \
61 -> "cos(#theta)" \
62 -\^ "dP/d#Omega" \
63 -L TR
64
65fi
66
67
68JPlot1D \
69 -f ${OUTPUT_FILE}:h0 \
70 -f ${OUTPUT_FILE}:h1 \
71 -y "0.01 4" \
72 -XXY \
73 -> "E [GeV]" \
74 -\^ "Rate [events/year]" \
75 -L TR \
76 -o rate.$FORMAT $BATCH