Jpp 19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
software/JTimeslice/JRandomTimesliceWriter.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 JRandomTimesliceWriter.
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 TIMESLICE_DEBUG 1
21set_variable: WORKDIR TIMESLICE_WORKDIR ./
22set_variable: BACKGROUND_HZ TIMESLICE_BACKGROUND_HZ `getK40Rates`
23set_variable: SEED TIMESLICE_SEED 0
24set_variable: NUMBER_OF_SLICES TIMESLICE_SLICES 10
25set_variable: RECYCLING TIMESLICE_RECYCLING "0 0"
26set_variable: FACTOR TIMESLICE_FACTOR 1.0
27
28if do_usage $*; then
29 usage "$script <detector file> <output file> <PMT parameters file>"\
30 "\nAuxiliary script to produce random time slice data."
31fi
32
33if (( $# == 3 )); then
34 set_variable DETECTOR $1
35 set_variable OUTPUT_FILE $2
36 set_variable PMT_FILE $3
37else
38 fatal "Wrong number of arguments."
39fi
40
41JRandomTimesliceWriter \
42 -a ${DETECTOR} \
43 -o ${OUTPUT_FILE} \
44 -n ${NUMBER_OF_SLICES} \
45 -P ${PMT_FILE} \
46 -P "QE=${FACTOR}" \
47 -S ${SEED} \
48 -B "$BACKGROUND_HZ" \
49 -N "$RECYCLING" \
50 -d ${DEBUG} \
51 --!