Jpp
JFitVolume.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author lquinn
4 #
5 version=1.0
6 script=${0##*/}
7 
8 # ------------------------------------------------------------------------------------------
9 #
10 # Utility script to test JVolume1D and JFitEfficiency
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 1
25 set_variable WORKDIR ./
26 set_variable TRIGGER_FILE $JPP_DATA/trigger_efficiency+background.root
27 set_variable INPUT_FILE $JPP_DATA/start.root
28 set_variable DETECTOR $JPP_DATA/km3net_reference.detx
29 
30 
31 if ( do_usage $* ); then
32  usage "$script [detector file [trigger file [input file]]]"
33 fi
34 
35 case $# in
36  3) INPUT_FILE=$3;&
37  2) TRIGGER_FILE=$2;&
38  1) DETECTOR=$1;;
39 esac
40 
41 if (( 1 )); then
42 
43  JPrintTree -f $TRIGGER_FILE
44 
45  echo "Check that the Monte Carlo and DAQ trees have different numbers of events. Else run JTriggerEfficiency without the -O option.\n"
46 
47 fi
48 
49 if (( 1 )); then
50 
51  print_variable TRIGGER_FILE INPUT_FILE DETECTOR
52 
53  $JPP_DIR/examples/JTrigger/JVolume1D \
54  -f $TRIGGER_FILE \
55  -o "volume[trigger].root" \
56  -X \
57  -d $DEBUG
58 
59  $JPP_DIR/examples/JFit/JFitEfficiency \
60  -f $INPUT_FILE \
61  -o efficiency.root \
62  -a $DETECTOR \
63  -X -C \
64  -W "2 0" \
65  -Q 0.5 \
66  -d $DEBUG
67 fi
68 
69 JOpera1D \
70  -f "volume[trigger].root:hV" \
71  -f efficiency.root:he \
72  -o "volume[reco].root" \
73  -u "Multiply" \
74  -d $DEBUG
75 
76 
77 JPlot1D \
78  -f "volume[reco].root:Multiply"\
79  -f "volume[trigger].root:hV" \
80  -XX \
81  -> "E [GeV]" \
82  -\^ "V [km^{3}]" \
83  -LL \
84  -o volume.gif