Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JSirene.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5script=${0##*/}
6
7# ------------------------------------------------------------------------------------------
8#
9# Auxiliary script to run JSirene.
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
19
20set_variable: DEBUG SIRENE_DEBUG 1
21set_variable+ WRITE_EMSHOWERS SIRENE_WRITE_EMSHOWERS -s
22set_variable: NUMBER_OF_HITS SIRENE_NUMBER_OF_HITS 1
23set_variable: SEED SIRENE_SEED 0
24set_variable: FACTOR SIRENE_FACTOR 1.0
25set_variable: CDF SIRENE_CDF $JPP_DATA/I%p.dat
26
27if do_usage $*; then
28 usage "$script <detector file> (input file)+ <output file>"\
29 "\nAuxiliary script for simulation of detector response."
30fi
31
32if (( $# < 3 )); then
33 fatal "Wrong number of arguments."
34fi
35
36set_variable DETECTOR $argv[1]
37set_variable INPUT_FILE $argv[2,-2]
38set_variable OUTPUT_FILE $argv[-1]
39
40# Sanity checks
41
42for TYPE in 1 2 5 6 13 14; do
43 if [[ ! -f ${CDF/\%/${TYPE}} ]]; then
44 error "Missing CDF files."
45 error "Run: JMakePDF.sh"
46 JMakePDF.sh -h
47 exit
48 fi
49done
50
51timer_start
52
53JSirene \
54 -F $CDF \
55 -a $DETECTOR \
56 -f $INPUT_FILE \
57 -o $OUTPUT_FILE \
58 -@ "Tmax_ns = 2.0;" \
59 -@ "Nmax_PMT = 1000000;" \
60 -U $FACTOR \
61 $WRITE_EMSHOWERS \
62 -N $NUMBER_OF_HITS \
63 -S $SEED \
64 -d $DEBUG --!
65
66timer_stop
67timer_print
68
69JPrintMeta \
70 -f $OUTPUT_FILE
71
72JPrintSirene \
73 -f $OUTPUT_FILE
74
75JPrintTree \
76 -f $OUTPUT_FILE