Jpp
JPlotData.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 make basic plots of data
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 $JPP_DATA
26 set_variable INPUT_FILE $WORKDIR/gandalf.root
27 set_variable OUTPUT_FILE $WORKDIR/postfit.root
28 set_variable DETECTOR $WORKDIR/km3net_reference.detx
29 set_variable APPLICATION 5 # JStart - See JFitApplications.hh for more info
30 set_variable NUMBER_OF_PREFITS 1
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 print_variable INPUT_FILE OUTPUT_FILE
43 check_input_file $INPUT_FILE
44 
45 if (( 1 )); then
46 
47  JPlotData \
48  -f $INPUT_FILE \
49  -o $OUTPUT_FILE \
50  -a $DETECTOR \
51  -A $APPLICATION \
52  -N $NUMBER_OF_PREFITS \
53  -d $DEBUG --!
54 
55 fi
56 
57 if (( 1 )); then
58 
59  JPlot1D \
60  -f ${OUTPUT_FILE}:hz \
61  -> "cos(#theta)" \
62  -\^ "number of events [a.u]" \
63  -o zenith.gif
64 fi
65 
66 if (( 1 )); then
67 
68  JPlot2D \
69  -f ${OUTPUT_FILE}:hxy \
70  -> "x [m]" \
71  -< "y [m]" \
72  -O COLZ \
73  -o 2Dplane.gif
74 fi
75 
76 if (( 1 )); then
77 
78  JPlot2D \
79  -f ${OUTPUT_FILE}:hzR \
80  -> "R [m]" \
81  -< "z [m]" \
82  -O COLZ \
83  -o heightVsRadius.gif
84 fi
85 
86 if (( 1 )); then
87 
88  JPlot1D \
89  -f ${OUTPUT_FILE}:hq1 \
90  -> "quality" \
91  -\^ "number of events [a.u]" \
92  -o quality.gif
93 fi
94 
95 if (( 1 )); then
96 
97  JPlot1D \
98  -f ${OUTPUT_FILE}:hq2 \
99  -> "-log(L)/NDF" \
100  -\^ "number of events [a.u]" \
101  -o loglikelihood.gif
102 fi
103 
104 if (( 1 )); then
105 
106  JPlot1D \
107  -f ${OUTPUT_FILE}:hmu \
108  -> "P(upgoing) - P(downgoing)" \
109  -\^ "number of events [a.u]" \
110  -o atmosphericmuon.gif
111 fi
112 
113 if (( 1 )); then
114 
115  JPlot2D \
116  -f ${OUTPUT_FILE}:hmz \
117  -> "P(upgoing) - P(downgoing)" \
118  -< "cos(#theta)" \
119  -O COLZ \
120  -o atmosphericmuon2D.gif
121 fi
122 
123 if (( 1 )); then
124 
125  JPlot2D \
126  -f ${OUTPUT_FILE}:hqz \
127  -> "-log(L)/NDF" \
128  -< "cos(#theta)" \
129  -O COLZ \
130  -o zenithVsQuality.gif
131 fi