Jpp
JARCAMuonSimplex.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author gmaggi
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 1
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 set_variable ARCA_MUON_PARAMETERS $JPP_DATA/muonReconstruction_parameters_arca.txt
44 
45 timer_start
46 
47 JMuonSimplex \
48  -a $DETECTOR \
49  -f $INPUT_FILE \
50  -o $OUTPUT_FILE \
51  -@ ${ARCA_MUON_PARAMETERS} \
52  -d ${DEBUG} --!
53 
54 timer_stop
55 timer_print