Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JARCACalibrateMuon.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5script=${0##*/}
6
7# ------------------------------------------------------------------------------------------
8#
9# Script to run the JCalibrateMuon for ARCA.
10#
11# ------------------------------------------------------------------------------------------
12
13if [ -z $JPP_DIR ]; then
14 echo "Variable JPP_DIR undefined."
15 exit
16fi
17source $JPP_DIR/setenv.sh $JPP_DIR
18
19set_variable DEBUG 2
20set_variable PDF $JPP_DATA/J%p.dat
21set_variable HISTOGRAM 260 -30.0 +100.0
22set_variable: OPTION CALIBRATION_OPTION module # string
23
24if do_usage $*; then
25 usage "$script <detector file> <input file> <output file> [(calibration file)+]"
26fi
27
28if (( $# < 3 )); then
29 fatal "Wrong number of arguments."
30fi
31
32set_variable DETECTOR $argv[1]
33set_variable INPUT_FILE $argv[2]
34set_variable OUTPUT_FILE $argv[3]
35set_array CALIBRATION $argv[4,-1]
36
37if (( ${#CALIBRATION} != 0 )); then
38 getMechanics.sh $DETECTOR
39fi
40
41PARAMETERS=(
42 TTS_ns 2
43 E_GeV 1.0e3
44 TMin_ns -50.0
45 TMax_ns +450.0
46 R_Hz 6.0e3
47 roadWidth_m 175.0
48 numberOfPrefits 1)
49
50timer_start
51
52eval JCalibrateMuon \
53 -a $DETECTOR \
54 -f $INPUT_FILE \
55 -o $OUTPUT_FILE \
56 -P $PDF \
57 -@ `make_equation PARAMETERS` \
58 -c \"$HISTOGRAM\" \
59 -R $OPTION \
60 -d $DEBUG --!
61
62CHECK_EXIT_CODE
63
64timer_stop
65timer_print