Jpp  15.0.3
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JORCAMuonReconstruction.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author bofearraigh
4 #
5 script=${0##*/}
6 
7 # ------------------------------------------------------------------------------------------
8 #
9 # Script to run the JPP Track Reconstruction Chain for ORCA.
10 #
11 # ------------------------------------------------------------------------------------------
12 
13 if [ -z $JPP_DIR ]; then
14  echo "Variable JPP_DIR undefined."
15  exit
16 fi
17 source $JPP_DIR/setenv.sh $JPP_DIR
18 
19 set_variable: DEBUG RECONSTRUCTION_DEBUG 1
20 set_variable: PDF RECONSTRUCTION_PDF $JPP_DATA/J%p.dat
21 set_variable: SUFFIX RECONSTRUCTION_SUFFIX jchain.orca
22 set_variable: NUMBER_OF_EVENTS RECONSTRUCTION_NUMBER_OF_EVENTS $((2**31))
23 set_variable: TMAX_S RECONSTRUCTION_TMAX_S 100
24 
25 if do_usage $*; then
26  usage "$script <detector file> <input file> <output file> <PMT parameters file> [(calibration file)+]"
27 fi
28 
29 if (( $# < 4 )); then
30  fatal "Wrong number of arguments."
31 fi
32 
37 set_array CALIBRATION $argv[5,-1]
38 
39 if [[ ! "$OUTPUT_FILE" == *"%"* ]]; then
40  fatal "The output file must have the wildcard % in the name, e.g. %.root"
41 fi
42 
43 typeset -A PARAMETERS
44 
45 # ------------------------------------------------------------------------------------------
46 # JMuonPrefit
47 # ------------------------------------------------------------------------------------------
48 
49 PARAMETERS=(
50  sigma_ns 5
51  gridAngle_deg 5
52  useL0 1
53  numberOfOutliers 2
54  numberOfPrefits 12
55  DZMax 0.0
56  numberOfDZMax 1
57  TMaxLocal_ns 12
58  ctMin 0.0
59  roadWidth_m 50.0)
60 
62 
63 eval JMuonPrefit \
64  -a $DETECTOR \
65  -+${^CALIBRATION} \
66  -T $TMAX_S \
67  -f $INPUT_FILE \
68  -o ${OUTPUT_FILE/\%/jprefit} \
69  -n ${NUMBER_OF_EVENTS} \
70  -@ `make_equation PARAMETERS` \
71  -d $DEBUG --!
72 
73 CHECK_EXIT_CODE
74 
75 timer_stop
76 timer_print
77 
78 
79 # ------------------------------------------------------------------------------------------
80 # JMuonSimplex
81 # ------------------------------------------------------------------------------------------
82 
83 PARAMETERS=(
84  sigma_ns 3
85  TMaxLocal_ns 15.0
86  ctMin 0.0
87  roadWidth_m 50.0
88  numberOfPrefits 0)
89 
91 
92 eval JMuonSimplex \
93  -a $DETECTOR \
94  -+${^CALIBRATION} \
95  -T $TMAX_S \
96  -f ${OUTPUT_FILE/\%/jprefit} \
97  -o ${OUTPUT_FILE/\%/jsimplex} \
98  -@ `make_equation PARAMETERS` \
99  -d ${DEBUG} --!
100 
101 CHECK_EXIT_CODE
102 
103 timer_stop
104 timer_print
105 
106 
107 # ------------------------------------------------------------------------------------------
108 # JMuonStart
109 # ------------------------------------------------------------------------------------------
110 
111 PARAMETERS=(
112  roadWidth_m 50.0
113  R_Hz 7.0e3
114  TMin_ns -25.0
115  TMax_ns +25.0
116  Pmin1 1.0e-3
117  Pmin2 1.0e-2
118  numberOfPrefits 0)
119 
121 
122 eval JMuonStart \
123  -a $DETECTOR \
124  -+${^CALIBRATION} \
125  -T $TMAX_S \
126  -f ${OUTPUT_FILE/\%/jsimplex} \
127  -o ${OUTPUT_FILE/\%/jstart} \
128  -P $PDF \
129  -@ `make_equation PARAMETERS` \
130  -d $DEBUG --!
131 
132 CHECK_EXIT_CODE
133 
134 timer_stop
135 timer_print
136 
137 
138 # ------------------------------------------------------------------------------------------
139 # JMuonGandalf
140 # ------------------------------------------------------------------------------------------
141 
142 PARAMETERS=(
143  TTS_ns 2
144  E_GeV 10.0
145  TMin_ns -50.0
146  TMax_ns +450.0
147  ZMin_m -3.0
148  ZMax_m +9.0
149  R_Hz 7.0e3
150  roadWidth_m 50.0
151  numberOfPrefits 0)
152 
154 
155 eval JMuonGandalf \
156  -a $DETECTOR \
157  -+${^CALIBRATION} \
158  -T $TMAX_S \
159  -f ${OUTPUT_FILE/\%/jstart} \
160  -o ${OUTPUT_FILE/\%/jgandalf} \
161  -P $PDF \
162  -@ `make_equation PARAMETERS` \
163  -d $DEBUG --!
164 
165 CHECK_EXIT_CODE
166 
167 timer_stop
168 timer_print
169 
170 
171 # ------------------------------------------------------------------------------------------
172 # JMuonStart
173 # ------------------------------------------------------------------------------------------
174 
175 PARAMETERS=(
176  roadWidth_m 50.0
177  R_Hz 7.0e3
178  TMin_ns -25.0
179  TMax_ns +25.0
180  Pmin1 1.0e-3
181  Pmin2 1.0e-2
182  numberOfPrefits 1)
183 
185 
186 eval JMuonStart \
187  -a $DETECTOR \
188  -+${^CALIBRATION} \
189  -T $TMAX_S \
190  -f ${OUTPUT_FILE/\%/jgandalf} \
191  -o ${OUTPUT_FILE/\%/jstart2} \
192  -P $PDF \
193  -@ `make_equation PARAMETERS` \
194  -d $DEBUG --!
195 
196 CHECK_EXIT_CODE
197 
198 timer_stop
199 timer_print
200 
201 
202 # ------------------------------------------------------------------------------------------
203 # JMuonEnergy
204 # ------------------------------------------------------------------------------------------
205 
206 PARAMETERS=(
207  roadWidth_m 80.0
208  R_Hz 7.0e3
209  EMin_log 0.0
210  EMax_log 7.0
211  TMin_ns -25.0
212  TMax_ns +25.0
213  ZMin_m -3.0
214  resolution 0.01
215  mestimator 3
216  numberOfPrefits 1)
217 
219 
220 eval JMuonEnergy \
221  -a $DETECTOR \
222  -+${^CALIBRATION} \
223  -T $TMAX_S \
224  -f ${OUTPUT_FILE/\%/jstart2} \
225  -o ${OUTPUT_FILE/\%/jenergy} \
226  -P $PDF \
227  -@ `make_equation PARAMETERS` \
228  -d $DEBUG --!
229 
230 CHECK_EXIT_CODE
231 
232 timer_stop
233 timer_print
234 
235 
236 # ------------------------------------------------------------------------------------------
237 # rename outputfile and remove intermediate files
238 # ------------------------------------------------------------------------------------------
239 
241 
242 mv -v \
243  ${OUTPUT_FILE/\%/jenergy} \
244  ${OUTPUT_FILE/\%/${SUFFIX}}
245 
246 rm -vf \
247  ${OUTPUT_FILE/\%/jprefit} \
248  ${OUTPUT_FILE/\%/jsimplex} \
249  ${OUTPUT_FILE/\%/jstart} \
250  ${OUTPUT_FILE/\%/jgandalf} \
251  ${OUTPUT_FILE/\%/jstart2}
252 
253 timer_stop
254 timer_print
255 
256 
257 # ------------------------------------------------------------------------------------------
258 # JConvertEvt
259 # ------------------------------------------------------------------------------------------
260 
262 
263 JConvertEvt \
264  -f ${OUTPUT_FILE/\%/${SUFFIX}} \
265  -o ${OUTPUT_FILE/\%/${SUFFIX}.aanet} \
266  -a $DETECTOR \
267  -+${^CALIBRATION} \
268  -P $PMT \
269  -d $DEBUG --!
270 
271 timer_stop
272 timer_print
then usage $script< detector file >< detectorfile > nIf the range of floors is the first detector file is aligned to the second before the comparison nIn only modules within the given range of floors are used fi case set_variable RANGE $argv[3]
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable DEBUG set_variable PDF $JPP_DATA J p dat set_variable HISTOGRAM if do_usage *then usage $script< detector file >< inputfile >< outputfile > fi case set_variable PDF
then usage $script< input_file >< detector_file >< output_file(.root)> fi set_variable NUMBER_OF_TIMESLICES set_variable NUMBER_OF_SUMMARYSLICES set_variable NUMBER_OF_EVENTS set_variable ALL_PLOTS case set_variable NUMBER_OF_EVENTS
Definition: JRunAnalyzer.sh:18
static const JPBS_t PMT(3, 4, 2, 3)
PBS of photo-multiplier tube (PMT)
set_variable INPUT_FILE
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
mestimator
*fatal Wrong number of arguments esac JCookie sh typeset Z DETECTOR typeset Z SOURCE_RUN typeset Z TARGET_RUN set_variable PARAMETERS_FILE $WORKDIR parameters
Definition: diff-Tuna.sh:38
exit
Definition: JPizza.sh:36
then echo
const int n
Definition: JPolint.hh:660
then timer_start(JRandomTimesliceWriter-a ${DETECTOR}-o ${PIPE}-n ${NUMBER_OF_SLICES}-P ${PMT_FILE}-d ${DEBUG}-S ${SEED}-B"$BACKGROUND_HZ"-N"$RECYCLING"--!&&for((i=0;$i!=10;++i));do;echo 'EOF' > $PIPE;usleep 100000;done &&rm-f $PIPE)&JTimesliceReprocessor-a $
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
Definition: JAcoustics.sh:20
do set_variable OUTPUT_DIRECTORY $WORKDIR T
* usage
then JConvertDetectorFormat a $DETECTOR[1] o
then JFileTuna f $INPUT_FILE
Definition: file-Tuna.sh:66
&set_variable OUTPUT_FILE
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition: JMuonPath.sh:47
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR set_variable DEBUG set_variable WORKDIR if do_usage *then usage $script(input file)+" fi if (( $ fatal "Invalid number of arguments." fi JCookie.sh set_array INPUT_FILES $argv[1
then JCalibrateToT a
Definition: JTuneHV.sh:116
then set_variable MODULE getModule a $DETECTOR L $STRING $FLOOR JEditDetector a $DETECTOR M $MODULE add $X o $DETECTOR else echo No update of detector $DETECTOR
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
set_variable DETECTOR
do set_variable DETECTOR_TXT $WORKDIR detector
data_type v[N+1][M+1]
Definition: JPolint.hh:740
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
script
Definition: JAcoustics.sh:2
then $DIR JPlotNPE PDG P
Definition: JPlotNPE-PDG.sh:62
do if[[!-f $ACOUSTICS_WORKDIR/${KEY}.txt]]
Definition: JAcoustics.sh:39