Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
examples/JReconstruction/JORCAShowerReconstruction.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5script=${0##*/}
6
7
8# ------------------------------------------------------------------------------------------
9#
10# Script to run the JPP Shower Reconstruction Chain for ORCA.
11#
12# ------------------------------------------------------------------------------------------
13
14
15if [ -z $JPP_DIR ]; then
16 echo "Variable JPP_DIR undefined."
17 exit
18fi
19
20source $JPP_DIR/setenv.sh $JPP_DIR
21source $JPP_DIR/externals/km3net-dataformat/definitions/reconstruction.sh
22
23set_variable: DEBUG RECONSTRUCTION_DEBUG 1
24set_variable: PDF RECONSTRUCTION_PDF $JPP_DATA/J%p.dat
25set_variable: ENERGY_CORRECTION RECONSTRUCTION_ENERGY_CORRECTION energy_correction_showerfit_fullorca.txt
26set_variable: NUMBER_OF_EVENTS RECONSTRUCTION_NUMBER_OF_EVENTS $((2**31))
27set_variable: NUMBER_OF_THREADS RECONSTRUCTION_NUMBER_OF_THREADS 0
28set_variable+ OVERWRITE RECONSTRUCTION_OVERWRITE 1
29set_variable: TMAX_S RECONSTRUCTION_TMAX_S 100
30
31if do_usage $*; then
32 usage "$script <detector file> <input file> <output file> <PMT parameters file> [(calibration file)+]"
33fi
34
35if (( $# < 4 )); then
36 fatal "Wrong number of arguments."
37fi
38
39set_variable DETECTOR $argv[1]
40set_variable INPUT_FILE $argv[2]
41set_variable OUTPUT_FILE $argv[3]
42set_variable PMT $argv[4]
43set_array CALIBRATION $argv[5,-1]
44
45if (( ${#CALIBRATION} != 0 )); then
46 getMechanics.sh $DETECTOR
47fi
48
49typeset -A PARAMETERS
50
51PARAMETERS+=(
52 prefit.numberOfPrefits 200
53 prefit.numberOfGrids 2
54 prefit.factoryLimit 20
55 prefit.sigma_ns 2.5
56 prefit.numberOfOutliers 4
57 prefit.TMaxLocal_ns 10
58 prefit.TMaxExtra_ns 80
59 prefit.ctMin -0.3
60 prefit.DMax_m 50
61 prefit.pos_grid_m 10
62 prefit.pos_step_m 10
63 prefit.time_grid_ns 50
64 prefit.time_step_ns 50)
65
66PARAMETERS+=(
67 simplex.numberOfPrefits 0
68 simplex.sigma_ns 2.5
69 simplex.TMaxLocal_ns 15
70 simplex.TMax_ns 60
71 simplex.TMin_ns -60
72 simplex.DMax_m 50
73 simplex.ctMin 0.0
74 simplex.mestimator 1)
75
76PARAMETERS+=(
77 position.numberOfPrefits 100
78 position.TMax_ns 120
79 position.TMin_ns -120
80 position.DMax_m 80
81 position.Emin_GeV 1
82 position.Emax_GeV 200
83 position.En 3
84 position.R_Hz 10000
85 position.TTS_ns 2)
86
87PARAMETERS+=(
88 direction.numberOfPrefits 1
89 direction.TMax_ns 30
90 direction.TMin_ns -30
91 direction.DMax_m 60
92 direction.R_Hz 10000
93 direction.scanAngle_deg 10
94 direction.Emin_GeV 1
95 direction.Emax_GeV 1000
96 direction.En 100)
97
98PARAMETERS+=(
99 fit.numberOfPrefits 4
100 fit.TMax_ns 30
101 fit.TMin_ns -30
102 fit.DMax_m 60
103 fit.DStep_m 5
104 fit.R_Hz 10000
105 fit.mestimator 3)
106
107eval $JPP_DIR/examples/JReconstruction/JORCAShowerReconstruction \
108 -a $DETECTOR \
109 -+${^CALIBRATION} \
110 -T $TMAX_S \
111 -f ${INPUT_FILE} \
112 -o ${OUTPUT_FILE} \
113 -P $PDF \
114 -N ${NUMBER_OF_THREADS} \
115 -@ `make_equation PARAMETERS` \
116 -E $ENERGY_CORRECTION \
117 -d $DEBUG --!