Jpp master_rocky-44-g75b7c4f75
the software that should make you happy
Loading...
Searching...
No Matches
JORCACalibrateMuon.sh
Go to the documentation of this file.
1#!/bin/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
22
23if do_usage $*; then
24 usage "$script <detector file> <input file> <output file> [(calibration file)+]"
25fi
26
27if (( $# < 3 )); then
28 fatal "Wrong number of arguments."
29fi
30
31set_variable DETECTOR $argv[1]
32set_variable INPUT_FILE $argv[2]
33set_variable OUTPUT_FILE $argv[3]
34set_array CALIBRATION $argv[4,-1]
35
36PARAMETERS=(
37 TTS_ns 2
38 E_GeV 10.0
39 TMin_ns -50.0
40 TMax_ns +450.0
41 ZMin_m -3.0
42 ZMax_m +9.0
43 R_Hz 7.0e3
44 roadWidth_m 50.0
45 numberOfPrefits 1)
46
47timer_start
48
49eval JCalibrateMuon \
50 -a $DETECTOR \
51 -f $INPUT_FILE \
52 -o $OUTPUT_FILE \
53 -P $PDF \
54 -@ `make_equation PARAMETERS` \
55 -+${^CALIBRATION} \
56 -c \"$HISTOGRAM\" \
57 -d $DEBUG --!
58
59CHECK_EXIT_CODE
60
61timer_stop
62timer_print