Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JAcousticsDisable.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2script=${0##*/}
3
4if [ -z $JPP_DIR ]; then
5 echo "Variable JPP_DIR undefined."
6 exit
7fi
8
9source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
10
11set_variable: DEBUG ACOUSTICS_DEBUG 2
12set_variable: WORKDIR ACOUSTICS_WORKDIR .
13set_variable: NMIN ACOUSTICS_NMIN 150
14set_variable: TMAX_US ACOUSTICS_TMAX_US 300
15set_variable: QUANTILES ACOUSTICS_QUANTILES 0.01 0.99
16
17if do_usage $*; then
18 usage "$script <detector file> (input file)+ <disable file>"\
19 "\nAuxiliary script for disabling transmissions."\
20 "\nInput files correspond to the output of JAcousticsEventBuilder[.sh]."
21fi
22
23if (( $# < 3 )); then
24 fatal "Wrong number of arguments."
25fi
26
27set_variable DETECTOR $argv[1]
28set_array INPUT_FILES $argv[2,-2]
29set_variable DISABLE $argv[-1]
30
31eval `JPrintDetector -a $DETECTOR -O IDENTIFIER`
32
33JAcoustics.sh $DETECTOR_ID
34
35CHECK_EXIT_CODE
36
37mv acoustics_fit_parameters.txt .acoustics_fit_parameters.txt
38
39cat>acoustics_fit_parameters.txt<<EOF
40Nmin = 3;
41Tmax_s = 600.0;
42chi2perNDF = 100.0;
43mestimator = 0;
44option = 2;
45sigma_s = 50.0e-6;
46stdev = 10.0;
47EOF
48
49set_variable DIR `mktemp -d $WORKDIR/XXXXXX`
50
51JKatoomba.sh $DETECTOR $INPUT_FILES[*] $DIR/katoomba.root
52JCanberra.sh $DETECTOR $DIR/katoomba.root $DIR/canberra\[%\].root
53
54mv .acoustics_fit_parameters.txt acoustics_fit_parameters.txt
55
56echo "\n"
57
58JAcousticsDisable \
59 -f $DIR/canberra\*.root \
60 -o /dev/null \
61 -N $NMIN \
62 -T $TMAX_US \
63 -Q "$QUANTILES" \
64 -! $DISABLE \
65 -d $DEBUG --!
66
67JEditDisable \
68 -f $DISABLE \
69 -o $DISABLE \
70 -a $DETECTOR \
71 -q \
72 -d $DEBUG --!
73
74rm -rf $DIR