Jpp 20.0.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
software/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
21
22
23source reconstruction.sh
24
25set_variable: DEBUG RECONSTRUCTION_DEBUG 1
26set_variable: PDF RECONSTRUCTION_PDF $JPP_DATA/J%p.dat
27set_variable: ENERGY_CORRECTION RECONSTRUCTION_ENERGY_CORRECTION energy_correction_showerfit_fullorca.txt
28set_variable: NUMBER_OF_EVENTS RECONSTRUCTION_NUMBER_OF_EVENTS $((2**31))
29set_variable: NUMBER_OF_THREADS RECONSTRUCTION_NUMBER_OF_THREADS 0
30set_variable+ OVERWRITE RECONSTRUCTION_OVERWRITE 1
31set_variable: TMAX_S RECONSTRUCTION_TMAX_S 100
32set_variable: RATE_HZ RECONSTRUCTION_RATE_HZ 7.0e3
33
34if do_usage $*; then
35 usage "$script <detector file> <input file> <output file> <PMT parameters file> [(calibration file)+]"
36fi
37
38if (( $# < 4 )); then
39 fatal "Wrong number of arguments."
40fi
41
42set_variable DETECTOR $argv[1]
43set_variable INPUT_FILE $argv[2]
44set_variable OUTPUT_FILE $argv[3]
45set_variable PMT $argv[4]
46set_array CALIBRATION $argv[5,-1]
47
48if (( ${#CALIBRATION} != 0 )); then
49 getMechanics.sh $DETECTOR
50fi
51
52typeset -A PARAMETERS
53
54PARAMETERS+=(
55 prefit.numberOfPrefits 200
56 prefit.numberOfGrids 2
57 prefit.factoryLimit 20
58 prefit.sigma_ns 2.5
59 prefit.numberOfOutliers 4
60 prefit.TMaxLocal_ns 10.0
61 prefit.TMaxExtra_ns 80.0
62 prefit.ctMin -0.3
63 prefit.DMax_m 50.0
64 prefit.pos_grid_m 10.0
65 prefit.pos_step_m 10.0
66 prefit.time_grid_ns 50.0
67 prefit.time_step_ns 50.0)
68
69PARAMETERS+=(
70 simplex.numberOfPrefits 0
71 simplex.sigma_ns 2.5
72 simplex.TMaxLocal_ns 15.0
73 simplex.TMax_ns +60.0
74 simplex.TMin_ns -60.0
75 simplex.DMax_m 50.0
76 simplex.ctMin 0.0
77 simplex.mestimator 1)
78
79PARAMETERS+=(
80 position.numberOfPrefits 100
81 position.TMax_ns +120.0
82 position.TMin_ns -120.0
83 position.DMax_m 80.0
84 position.Emin_GeV 1.0
85 position.Emax_GeV 200.0
86 position.En 3.0
87 position.R_Hz $RATE_HZ
88 position.TTS_ns 2.0)
89
90PARAMETERS+=(
91 direction.numberOfPrefits 1
92 direction.TMax_ns +30.0
93 direction.TMin_ns -30.0
94 direction.DMax_m 60.0
95 direction.R_Hz $RATE_HZ
96 direction.scanAngle_deg 10
97 direction.Emin_GeV 1
98 direction.Emax_GeV 1000
99 direction.En 100)
100
101PARAMETERS+=(
102 fit.numberOfPrefits 4
103 fit.TMax_ns +30.0
104 fit.TMin_ns -30.0
105 fit.DMax_m 60.0
106 fit.DStep_m 5
107 fit.R_Hz $RATE_HZ
108 fit.mestimator 3)
109
110eval JORCAShowerReconstruction \
111 -a $DETECTOR \
112 -+${^CALIBRATION} \
113 -T $TMAX_S \
114 -f ${INPUT_FILE} \
115 -o ${OUTPUT_FILE} \
116 -F $PDF \
117 -n ${NUMBER_OF_EVENTS} \
118 -N ${NUMBER_OF_THREADS} \
119 -@ `make_equation PARAMETERS` \
120 -E $ENERGY_CORRECTION \
121 -d $DEBUG --!
122
123CHECK_EXIT_CODE