Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
JDetector.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5script=${0##*/}
6
7# ------------------------------------------------------------------------------------------
8#
9# Utility script to generate KM3NeT reference detector.
10#
11# ------------------------------------------------------------------------------------------
12
13if [ -z $JPP_DIR ]; then
14 echo "Variable JPP_DIR undefined."
15 exit
16fi
17
18source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
19
20set_variable DETECTOR $JPP_DATA/km3net_reference.detx
21set_variable NUMBER_OF_STRINGS 115
22set_variable ID 1000
23
24if do_usage $*; then
25 usage "$script [detector file [identifier]]"
26fi
27
28case $# in
29 2) set_variable ID $2;&
30 1) set_variable DETECTOR $1;;
31 0) ;;
32 *) fatal "Wrong number of arguments."
33esac
34
35set_variable numberOfLines 115
36set_variable numberOfFloors 18
37set_variable floorDistance_m 36
38set_variable heightOfFirstFloor_m 72
39set_variable detectorType 1
40
41if [[ -f $DETECTOR ]]; then
42 echo "Detector $DETECTOR aleady exists; remove to overwrite."
43 exit
44fi
45
46JDetector \
47 -D $ID \
48 -@ "detectorType = $detectorType" \
49 -@ "numberOfLines = $numberOfLines" \
50 -@ "numberOfFloors = $numberOfFloors" \
51 -@ "floorDistance_m = $floorDistance_m" \
52 -z $heightOfFirstFloor_m \
53 -f footprint.txt \
54 -o $DETECTOR -d 1 --!