Jpp
JORCASimplex.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author bofearraigh
4 #
5 script=${0##*/}
6 
7 # ------------------------------------------------------------------------------------------
8 #
9 # Utility script to run JSimplex.
10 #
11 # ------------------------------------------------------------------------------------------
12 
13 if [ -z $JPP_DIR ]; then
14  echo "Variable JPP_DIR undefined."
15  exit
16 fi
17 
18 source $JPP_DIR/setenv.sh $JPP_DIR
19 
20 # default values for testing
21 
22 set_variable DEBUG 2
23 set_variable WORKDIR $JPP_DATA
24 set_variable DETECTOR $WORKDIR/km3net_reference.detx
25 set_variable INPUT_FILE $WORKDIR/prefit.root
26 set_variable OUTPUT_FILE $WORKDIR/simplex.root
27 
28 if ( do_usage $* ); then
29  usage "$script [detector file [input file [output file]]]"
30 fi
31 
32 case $# in
33  3) set_variable OUTPUT_FILE $3;&
34  2) set_variable INPUT_FILE $2;&
35  1) set_variable DETECTOR $1;;
36 esac
37 
38 print_variable DETECTOR INPUT_FILE OUTPUT_FILE
39 check_input_file $DETECTOR $INPUT_FILE
40 check_output_file $OUTPUT_FILE
41 
42 # default input values
43 
44 set_variable SIGMA_NS 3.0
45 set_variable TMAX_NS 15
46 set_variable ROADWIDTH_M 50
47 
48 timer_start
49 
50 JSimplex \
51  -a $DETECTOR \
52  -f $INPUT_FILE \
53  -o $OUTPUT_FILE \
54  -S ${SIGMA_NS} \
55  -T ${TMAX_NS} \
56  -R ${ROADWIDTH_M} \
57  -U \
58  -d ${DEBUG} --!
59 
60 timer_stop
61 timer_print