Jpp  17.3.0-rc.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
test-PMTParameters.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 #
4 # \author mdejong
5 #
6 version=1.0
7 script=${0##*/}
8 
9 if [ -z $JPP_DIR ]; then
10  echo "Variable JPP_DIR undefined."
11  exit
12 fi
13 
14 source $JPP_DIR/setenv.sh $JPP_DIR
15 
16 
17 set_variable: DEBUG PMT_PARAMETERS_DEBUG 2
18 set_variable WORKDIR `pwd`
19 set_variable OUTPUT_FILE ${TMPDIR:-/tmp}/pmt_parameters.root
20 set_variable DIR $JPP_DIR/examples/JDetector/
21 
22 
23 if do_usage $*; then
24  usage "$script <detector file> <PMT parameters file>"
25 fi
26 
27 case $# in
30  *) fatal "Wrong number of parameters."
31 esac
32 
33 
34 # acceptance criteria
35 
36 typeset -A ACCEPTANCE_WINDOW
37 typeset -A NUMBER_OF_OUTLIERS
38 
39 ACCEPTANCE_WINDOW+=(QE "0.8 1.2")
40 ACCEPTANCE_WINDOW+=(gain "0.8 1.2")
41 ACCEPTANCE_WINDOW+=(gainSpread "0.2 0.4")
42 
43 NUMBER_OF_OUTLIERS+=(QE 1)
44 NUMBER_OF_OUTLIERS+=(gain 1)
45 NUMBER_OF_OUTLIERS+=(gainSpread 1)
46 
47 
48 $DIR/JPlotPMTParameters \
49  -a $DETECTOR \
50  -P $INPUT_FILE \
51  -o $OUTPUT_FILE \
52  -d 0 --!
53 
54 for KEY in ${(k)ACCEPTANCE_WINDOW}; do
55 
56  debug "Test $KEY"
57 
58  JWindowTest1D \
59  -f ${OUTPUT_FILE}:\.\*${KEY}\$ \
60  -y ${ACCEPTANCE_WINDOW[${KEY}]} \
61  -N ${NUMBER_OF_OUTLIERS[${KEY}]} \
62  -d ${DEBUG}
63 
64 done
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DETECTOR_ID set_array RUNS if do_usage *then usage $script< source directory >[user directory] nThe source directory corresponds to a pre calibrated D0ARCA009 detector fi case set_variable DIR
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
version
Definition: JEditTuneHV.sh:5
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
usr share Modules init zsh export TMPDIR
exit
Definition: JPizza.sh:36
then fatal Wrong number of arguments fi JConvertDetectorFormat a o
then echo
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:21
then JCalibrateToT a
Definition: JTuneHV.sh:116
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
Definition: JLegolas.sh:20
* usage
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
&set_variable OUTPUT_FILE
set_variable INPUT_FILE
then $JPP_DIR examples JDetector JToT o $OUTPUT_FILE n N $NPE P gain
Definition: JToT.sh:47
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
*fatal Wrong number of parameters esac typeset A ACCEPTANCE_WINDOW typeset A NUMBER_OF_OUTLIERS ACCEPTANCE_WINDOW
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
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 JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
int debug
debug level
then $DIR JPlotNPE PDG P
Definition: JPlotNPE-PDG.sh:62
esac done
Definition: JAddHDE.sh:21
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62