Jpp  debug
the software that should make you happy
JHitL1.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 ${TMPDIR:-/tmp}/
26 set_variable INPUT_FILE $JPP_DATA/sirene.root
27 set_variable DETECTOR $JPP_DATA/km3net_reference.detx
28 set_variable HISTOGRAM 1
29 
30 
31 if do_usage $*; then
32  usage "$script [detector file [input file [working directory]]]"
33 fi
34 
35 case $# in
36  3) set_variable WORKDIR $3;&
37  2) set_variable INPUT_FILE $2;&
38  1) set_variable DETECTOR $1;;
39 esac
40 
41 set_variable OUTPUT_FILE $WORKDIR/trigger_efficiency.root
42 
43 if ( ! reuse_file $OUTPUT_FILE ); then
44 
45  JTriggerEfficiency \
46  -a ${DETECTOR} \
47  -b ${DETECTOR} \
48  -f ${INPUT_FILE} \
49  -o ${OUTPUT_FILE} \
50  -@ "trigger3DMuon.enabled = 1;" \
51  -@ "trigger3DMuon.numberOfHits = 1;" \
52  -@ "trigger3DMuon.numberOfModules = 1;" \
53  -@ "ctMin = -1.0;" \
54  -@ "TMaxLocal_ns = 15.0;" \
55  -@ "writeSummary = 0;" \
56  -O \
57  -d $DEBUG \
58  -B 0 \
59  --!
60 
61 fi
62 
63 set_variable INPUT_FILE $OUTPUT_FILE
64 set_variable OUTPUT_FILE $WORKDIR/histogram.root
65 
66 if (( 1 )); then
67 
68  $JPP_DIR/examples/JTrigger/JHitL1 \
69  -a $DETECTOR \
70  -f $INPUT_FILE \
71  -o $OUTPUT_FILE \
72  -d $DEBUG
73 
74 fi
75 
76 
77 if (( 1 )); then
78 
79  JPlot1D \
80  -f ${OUTPUT_FILE}:M\\\[02\] \
81  -f ${OUTPUT_FILE}:M\\\[04\] \
82  -f ${OUTPUT_FILE}:M\\\[08\] \
83  -f ${OUTPUT_FILE}:M\\\[12\] \
84  -f ${OUTPUT_FILE}:M\\\[16\] \
85  -f ${OUTPUT_FILE}:M\\\[20\] \
86  -f ${OUTPUT_FILE}:M\\\[24\] \
87  -> "#Deltat [ns]" \
88  -\^ "number of events [a.u.]" \
89  -L TR
90 
91 fi