Jpp
JBuild.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 determine L1 time offsets.
11 #
12 # ------------------------------------------------------------------------------------------
13 
14 
15 if [ -z $JPP_DIR ]; then
16  echo "Variable JPP_DIR undefined."
17  exit
18 fi
19 
20 
21 source $JPP_DIR/setenv.sh $JPP_DIR
22 
23 
24 set_variable DEBUG 2
25 set_variable WORKDIR /tmp/
26 set_variable INPUT_FILE $JPP_DATA/trigger_efficiency+background.root
27 set_variable OUTPUT_FILE $WORKDIR/build.root
28 set_variable DETECTOR $JPP_DATA/km3net_reference.detx
29 set_variable HISTOGRAM 1
30 
31 
32 if ( do_usage $* ); then
33  usage "$script [detector file [input file [output file]]]"
34 fi
35 
36 case $# in
37  3) OUTPUT_FILE=$3;&
38  2) INPUT_FILE=$2;&
39  1) DETECTOR=$1;;
40 esac
41 
42 
43 if (( 1 )); then
44 
45  print_variable DETECTOR INPUT_FILE OUTPUT_FILE
46  check_input_file $DETECTOR $INPUT_FILE
47 
48  $JPP_DIR/examples/JTrigger/JBuild \
49  -a $DETECTOR \
50  -f $INPUT_FILE \
51  -o $OUTPUT_FILE \
52  -@ L2Min=3 \
53  -@ ctMin=0.0 \
54  -d $DEBUG
55 
56 fi
57 
58 
59 if (( 1 )); then
60 
61  JPlot1D \
62  -f ${OUTPUT_FILE}:L0 \
63  -f ${OUTPUT_FILE}:L1 \
64  -f ${OUTPUT_FILE}:L2 \
65  -> "number of hits" \
66  -\^ "number of events [a.u.]" \
67  -y "0.5 1e3" -Y -T "" \
68  -L TR \
69  -o build.gif
70 
71 fi