Jpp 20.0.0-72-g597b30bc9
the software that should make you happy
Loading...
Searching...
No Matches
JTransitTime_HAMA-R12199.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4version=1.0
5script=${0##*/}
6
7# ------------------------------------------------------------------------------------------
8#
9# Utility script to produce the transit time probability and generator for HAMA-R12199.
10#
11# ------------------------------------------------------------------------------------------
12
13source $JPP_DIR/setenv.sh $JPP_DIR
14
15set_variable DEBUG 2
16set_variable INPUT_FILE $JPP_DIR/examples/JDetector/R12199_delayed_pulses_hist.txt
17set_variable TYPE 1
18
19set_variable: FORMAT GRAPHICS_FORMAT gif
20set_variable+ BATCH GRAPHICS_BATCH -B
21
22if do_usage $*; then
23 usage "$script [input file]"
24fi
25
26if (( $# == 1 )); then
27 set_variable INPUT_FILE $1
28elif (( $# != 0 )); then
29 fatal "Wrong number of arguments."
30fi
31
32# convert control characters to newline
33
34set_variable TEMPORARY_FILE ${TMPDIR:-/tmp}/__${INPUT_FILE##*/}__
35
36cat $INPUT_FILE | tr '\r' '\n' > $TEMPORARY_FILE
37
38$JPP_DIR/examples/JDetector/JTTS \
39 -f $TEMPORARY_FILE \
40 -o histogram.root \
41 -P pdf.txt \
42 -C cdf.txt \
43 -d $DEBUG
44
45rm -f $TEMPORARY_FILE
46
47$JPP_DIR/examples/JDetector/JTransitTime \
48 -o PMT\[$TYPE\].root \
49 -O $TYPE \
50 -d $DEBUG
51
52JPlot1D \
53 -f histogram.root:pmt \
54 -f histogram.root:g1 \
55 -f PMT\[$TYPE\].root:tts \
56 -> "#Deltat [ns]" \
57 -y "1e-5 1e-0" -Y \
58 -T "HAMA-R12199" \
59 -L TR \
60 -o PMT.$FORMAT $BATCH