Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JEarth.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 version=1.0
6 script=${0##*/}
7 
8 # ------------------------------------------------------------------------------------------
9 #
10 # Utility script to run JEarth.
11 #
12 # ------------------------------------------------------------------------------------------
13 
14 if [ -z $JPP_DIR ]; then
15  echo "Variable JPP_DIR undefined."
16  exit
17 fi
18 
19 source $JPP_DIR/setenv.sh $JPP_DIR
20 
23 
24 if ( do_usage $* ); then
25  usage "$script <energy>"
26 fi
27 
28 case $# in
29  1) set_variable E $1;;
30  *) fatal "Wrong number of arguments."
31 esac
32 
33 if (( 1 )); then
34 
35  $JPP_DIR/examples/JPhysics/JEarth \
36  -E $E \
37  -o $WORKDIR/earth.root \
38  -n 100000000
39 fi
40 
41 JPlot2D \
42  -f $WORKDIR/earth.root:hs \
43  -O COLZ \
44  -\> "x [m]" \
45  -\< "y [m]" \
46  -T "source"
47 
48 
49 ZMAX=`JPrintResult -f /tmp/earth.root:ht -F GetMaximum`
50 
51 ZMIN=$(( $ZMAX * 0.81))
52 ZMAX=$(( $ZMAX * 1.01))
53 
54 JPlot2D \
55  -f $WORKDIR/earth.root:ht \
56  -\> "x [m]" \
57  -\< "y [m]" \
58  -z "$ZMIN $ZMAX" \
59  -O COLZ \
60  -T "target"
61 
62 
63 JPlot2D \
64  -f $WORKDIR/earth.root:h2 \
65  -z "0.5 1e6" -Z \
66  -\> "Tx" \
67  -\< "Ty" \
68  -N "X 505" \
69  -N "Y 505" \
70  -O COLZ \
71  -T "target"
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
then check_input_file $DETECTOR $INPUT_FILE for OPTION in A B C D E F
Definition: JFilter.sh:47
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition: JSirene.sh:45
exit
Definition: JPizza.sh:36
then JPizza f
Definition: JPizza.sh:46
then echo
do montage tile geometry tmp
do set_variable OUTPUT_DIRECTORY $WORKDIR T
* usage
alias put_queue eval echo n
Definition: qlib.csh:19
then display $WORKDIR
Definition: plot-Domino.sh:142
then usage $script[input file[working directory[option]]] nWhere option can be N
Definition: JMuonPostfit.sh:37
version
Definition: JCalibratePMT.sh:7
then usage $script< detector file >< inputfile > fi case set_variable WORKDIR
Definition: JLegolas.sh:28
then usage $script[input file[working directory[option]]] nWhere option can be E
Definition: JMuonPostfit.sh:37
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62