Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JMatrixNZ.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 test JMatrixNZ on Monte Carlo true muons.
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 
25 set_variable WORKDIR $JPP_DATA
26 set_variable INPUT_FILE $WORKDIR/trigger_efficiency+background.root
27 set_variable DETECTOR $WORKDIR/km3net_reference.detx
28 set_variable JPP $JPP_DIR/examples/JFit/
29 
30 if do_usage $*; then
31  usage "$script [detector file [input file]]"
32 fi
33 
34 case $# in
35  2) INPUT_FILE=$2;&
36  1) DETECTOR=$1;;
37 esac
38 
39 
40 if (( 1 )); then
41 
42  print_variable DETECTOR INPUT_FILE
43  check_input_file $DETECTOR $INPUT_FILE
44 
45  for ALPHA_DEG in 0 1 2 3 4 5; do
46 
47  set_variable SIGMA_NS 3.0
48  set_variable OUTLIERS 3
49 
50  set_variable OUTPUT_FILE matrix\[${ALPHA_DEG}\ deg\].root
51 
52  $JPP/JMatrixNZ \
53  -a $DETECTOR \
54  -f $INPUT_FILE \
55  -o $OUTPUT_FILE \
56  -S ${SIGMA_NS} \
57  -A ${ALPHA_DEG} \
58  -O ${OUTLIERS} \
59  -d ${DEBUG} --!
60 # -U \
61 
62  done
63 
64 fi
65 
66 
67 if (( 0 )); then
68 
69  for HISTOGRAM in h0 h1; do
70 
71  JPlot1D \
72  -f matrix\[0\ deg\].root:${HISTOGRAM} \
73  -f matrix\[1\ deg\].root:${HISTOGRAM} \
74  -f matrix\[2\ deg\].root:${HISTOGRAM} \
75  -f matrix\[3\ deg\].root:${HISTOGRAM} \
76  -f matrix\[4\ deg\].root:${HISTOGRAM} \
77  -f matrix\[5\ deg\].root:${HISTOGRAM} \
78  -y "1 2e3" -Y \
79  -LL \
80  -\^ "number of events [a.u.]" \
81  -\> "#chi^{2}/NDF" \
82  -o chi2-${HISTOGRAM}.gif
83 
84  done
85 
86 fi
87 
88 
89 if (( 1 )); then
90 
91  for HISTOGRAM in p0 p1; do
92 
93  JPlot1D \
94  -f matrix\[0\ deg\].root:${HISTOGRAM} \
95  -f matrix\[1\ deg\].root:${HISTOGRAM} \
96  -f matrix\[2\ deg\].root:${HISTOGRAM} \
97  -f matrix\[3\ deg\].root:${HISTOGRAM} \
98  -f matrix\[4\ deg\].root:${HISTOGRAM} \
99  -f matrix\[5\ deg\].root:${HISTOGRAM} \
100  -y "1e1 1e4" -Y \
101  -LL \
102  -\^ "number of events [a.u.]" \
103  -\> "probability" \
104  -o prob-${HISTOGRAM}.gif
105 
106  done
107 
108 fi
TPaveText * p1
set_variable INPUT_FILE
exit
Definition: JPizza.sh:36
then for HISTOGRAM in h0 h1
Definition: JMatrixNZ.sh:69
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
then JPizza f
Definition: JPizza.sh:46
then echo
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:20
do $DIR JTransitTime o
Definition: JTransitTime.sh:44
* usage
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
do set_variable SIGMA_NS set_variable OUTLIERS set_variable OUTPUT_FILE matrix[${ALPHA_DEG}\deg\] root $JPP JMatrixNZ a $DETECTOR f $INPUT_FILE o $OUTPUT_FILE S
Definition: JMatrixNZ.sh:56
&set_variable OUTPUT_FILE
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:45
then JCalibrateToT a
Definition: JTuneHV.sh:116
then set_variable MODULE getModule a $DETECTOR L $STRING $FLOOR JEditDetector a $DETECTOR M $MODULE add $X o $DETECTOR else echo No update of detector $DETECTOR
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
then display $WORKDIR
Definition: plot-Domino.sh:127
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR tmp set_variable JDAQ_TIMESLICE JDAQTimeslice if do_usage *then usage $script< detector file >< inputfile > fi case set_variable WORKDIR
Definition: JLegolas.sh:23
set_variable DETECTOR
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:38
version
Definition: JCalibratePMT.sh:7
source $JPP_DIR setenv csh $JPP_DIR eval JShellParser o a A
esac done
Definition: JAddHDE.sh:21