Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JORCACalibrateMuon.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 ORCA.
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 10.0
44 TMin_ns -50.0
45 TMax_ns +450.0
46 ZMin_m -3.0
47 ZMax_m +9.0
48 R_Hz 7.0e3
49 roadWidth_m 50.0
50 numberOfPrefits 1)
51
52timer_start
53
54eval JCalibrateMuon \
55 -a $DETECTOR \
56 -f $INPUT_FILE \
57 -o $OUTPUT_FILE \
58 -P $PDF \
59 -@ `make_equation PARAMETERS` \
60 -+${^CALIBRATION} \
61 -c \"$HISTOGRAM\" \
62 -R $OPTION \
63 -d $DEBUG --!
64
65CHECK_EXIT_CODE
66
67timer_stop
68timer_print