Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
testk40.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 script=${0##*/}
6 
7 # ------------------------------------------------------------------------------------------
8 #
9 # Example script to test JFitK40 results.
10 #
11 # ------------------------------------------------------------------------------------------
12 
13 if [ -z $JPP_DIR ]; then
14  echo "Variable JPP_DIR undefined."
15  exit
16 fi
17 
18 source $JPP_DIR/setenv.sh $JPP_DIR
19 
20 set_variable DEBUG ${FITK40_DEBUG:-3}
21 set_variable CHI2_MIN ${FITK40_CHI2_MIN:-0.0}
22 set_variable CHI2_MAX ${FITK40_CHI2_MAX:-2.0}
23 set_variable QE_MIN ${FITK40_QE_MIN:-0.0}
24 set_variable QE_MAX ${FITK40_QE_MAX:-2.0}
25 set_variable T0_MIN ${FITK40_T0_MIN:--10.0}
26 set_variable T0_MAX ${FITK40_T0_MAX:-+10.0}
27 
28 if ( do_usage $* ); then
29  usage "$script (input file)+"
30 fi
31 
32 case $# in
33  *) INPUT_FILES=($*);;
34  0) fatal "Invalid number of arguments"
35 esac
36 
37 for INPUT_FILE in $INPUT_FILES[*]; do
38 
40 
41  JTestRange1D \
42  -f ${INPUT_FILE}:chi2 \
43  -H "GetEntries 0.5 1.0e10" \
44  -x "$CHI2_MIN $CHI2_MAX" -X \
45  -y "0.0 0.0" \
46  -d $DEBUG --!
47 
48  CHECK_EXIT_CODE
49 
50  JTestRange1D \
51  -f ${INPUT_FILE}:\.\*.1QE \
52  -y "$QE_MIN $QE_MAX" \
53  -d $DEBUG
54 
55  CHECK_EXIT_CODE
56 
57  JTestRange1D \
58  -f ${INPUT_FILE}:\.\*.1t0 \
59  -y "$T0_MIN $T0_MAX" \
60  -d $DEBUG
61 
62  CHECK_EXIT_CODE
63 
64 done
then usage for INPUT_FILE in $INPUT_FILES[*]
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
set_variable INPUT_FILE
static const double H
Planck constant [eV s].
exit
Definition: JPizza.sh:36
do set_array DAQHEADER JPrintDAQHeader f
Definition: JTuneHV.sh:79
static const double FITK40_QE_MAX
Maximal quantum efficiency [unit].
Definition: JFitK40.hh:38
then echo
int debug
debug level
Definition: JSirene.cc:63
* usage
then fatal Not enough arguments fi set_variable DETECTOR $argv[1] INPUT_FILES
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
static const double FITK40_QE_MIN
Minimal quantum efficiency [unit].
Definition: JFitK40.hh:37
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:45
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
script
Definition: JAcoustics.sh:2
esac done
Definition: JAddHDE.sh:21
#define DEBUG(A)
Message macros.
Definition: JMessage.hh:62