Jpp
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
software
JReconstruction
JARCAMuonReconstruction.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 ARCA.
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
2
20
set_variable
PDF
$JPP_DATA/J%p.dat
21
set_variable
SUF
${JARCAREC_SUF:-jchain.arca}
22
23
if
( do_usage $* );
then
24
usage
"$script <detector file> <input file> <output file> [PDF file descriptor]"
25
fi
26
27
case
$#
in
28
4)
set_variable
PDF
$4;&
29
3)
set_variable
OUTPUT_FILE
$3;
30
set_variable
INPUT_FILE
$2;
31
set_variable
DETECTOR
$1;;
32
*) fatal
"Wrong number of arguments."
;;
33
esac
34
35
if
[[ !
"$OUTPUT_FILE"
== *
"%"
* ]];
then
36
fatal
"The output file must have the wildcard % in the name, e.g. %.root"
37
fi
38
39
40
# ------------------------------------------------------------------------------------------
41
# JMuonPrefit
42
# ------------------------------------------------------------------------------------------
43
44
PARAMETERS=(
45
sigma_ns 5
46
gridAngle_deg 1
47
useL0 0
48
numberOfOutliers 3
49
numberOfPrefits 12
50
DZMax 0.0
51
numberOfDZMax 1
52
TMaxLocal_ns
18
53
ctMin
0.0
54
roadWidth_m 200.0)
55
56
timer_start
57
58
eval JMuonPrefit \
59
-
a
$DETECTOR \
60
-
f
$INPUT_FILE
\
61
-o ${
OUTPUT_FILE
/\%/jprefit} \
62
-@ `make_equation PARAMETERS` \
63
-
d
$DEBUG --!
64
65
CHECK_EXIT_CODE
66
67
timer_stop
68
timer_print
69
70
71
# ------------------------------------------------------------------------------------------
72
# JMuonSimplex
73
# ------------------------------------------------------------------------------------------
74
75
PARAMETERS=(
76
sigma_ns 3
77
TMaxLocal_ns
15.0
78
ctMin
0.0
79
roadWidth_m 200.0
80
numberOfPrefits 0)
81
82
timer_start
83
84
eval JMuonSimplex \
85
-
a
$DETECTOR \
86
-
f
${
OUTPUT_FILE
/\%/jprefit} \
87
-o ${
OUTPUT_FILE
/\%/jsimplex} \
88
-@ `make_equation PARAMETERS` \
89
-
d
${
DEBUG
} --!
90
91
CHECK_EXIT_CODE
92
93
timer_stop
94
timer_print
95
96
97
# ------------------------------------------------------------------------------------------
98
# JMuonGandalf
99
# ------------------------------------------------------------------------------------------
100
101
PARAMETERS=(
102
TTS_ns 2
103
E_GeV 1.0e3
104
TMin_ns -50.0
105
TMax_ns +450.0
106
R_Hz 6.0e3
107
roadWidth_m 175.0
108
numberOfPrefits 0)
109
110
timer_start
111
112
eval JMuonGandalf \
113
-
a
$DETECTOR \
114
-
f
${
OUTPUT_FILE
/\%/jsimplex} \
115
-o ${
OUTPUT_FILE
/\%/jgandalf} \
116
-
P
$PDF \
117
-@ `make_equation PARAMETERS` \
118
-
d
$DEBUG --!
119
120
CHECK_EXIT_CODE
121
122
timer_stop
123
timer_print
124
125
126
# ------------------------------------------------------------------------------------------
127
# JMuonStart
128
# ------------------------------------------------------------------------------------------
129
130
PARAMETERS=(
131
roadWidth_m 160.0
132
R_Hz 6.0e3
133
TMin_ns -25.0
134
TMax_ns +75.0
135
Pmin1 1.0e-3
136
Pmin2 1.0e-2
137
numberOfPrefits 1)
138
139
timer_start
140
141
eval JMuonStart \
142
-
a
$DETECTOR \
143
-
f
${
OUTPUT_FILE
/\%/jgandalf} \
144
-o ${
OUTPUT_FILE
/\%/jstart} \
145
-
P
$PDF \
146
-@ `make_equation PARAMETERS` \
147
-
d
$DEBUG --!
148
149
CHECK_EXIT_CODE
150
151
timer_stop
152
timer_print
153
154
155
# ------------------------------------------------------------------------------------------
156
# JMuonEnergy
157
# ------------------------------------------------------------------------------------------
158
159
PARAMETERS=(
160
roadWidth_m 200.0
161
R_Hz 6.0e3
162
EMin_log 0.0
163
EMax_log 8.0
164
TMin_ns -50.0
165
TMax_ns +450.0
166
mestimator 1
167
numberOfPrefits 1)
168
169
timer_start
170
171
eval JMuonEnergy \
172
-
a
$DETECTOR \
173
-
f
${
OUTPUT_FILE
/\%/jstart} \
174
-o ${
OUTPUT_FILE
/\%/jenergy} \
175
-
P
$PDF \
176
-
E
energy_correction_arca.txt \
177
-@ `make_equation PARAMETERS` \
178
-
d
$DEBUG --!
179
180
CHECK_EXIT_CODE
181
182
timer_stop
183
timer_print
184
185
186
# ------------------------------------------------------------------------------------------
187
# rename outputfile and remove intermediate files
188
# ------------------------------------------------------------------------------------------
189
190
timer_start
191
192
mv \
193
${
OUTPUT_FILE
/\%/jenergy} \
194
${
OUTPUT_FILE
/\%/${
SUF
}} \
195
-
v
196
197
rm \
198
${
OUTPUT_FILE
/\%/jprefit} \
199
${
OUTPUT_FILE
/\%/jsimplex} \
200
${
OUTPUT_FILE
/\%/jgandalf} \
201
${
OUTPUT_FILE
/\%/jstart} \
202
-
v
203
204
timer_stop
205
timer_print
206
207
208
# ------------------------------------------------------------------------------------------
209
# JConvertEvt
210
# ------------------------------------------------------------------------------------------
211
212
timer_start
213
214
JConvertEvt \
215
-
f
${
OUTPUT_FILE
/\%/${
SUF
}} \
216
-o ${
OUTPUT_FILE
/\%/${
SUF
}.aanet} \
217
-
d
$DEBUG --!
218
219
timer_stop
220
timer_print
JSYSTEM::set_variable
void set_variable(const std::string &name, const std::string &value)
Set environment variable.
Definition:
JSystemToolkit.hh:404
DETECTOR
set_variable DETECTOR
Definition:
JLegolas.sh:31
SUF
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 SUF
Definition:
JARCAMuonReconstruction.sh:21
in
esac print_variable DETECTOR INPUT_FILE OUTPUT_FILE CDF for TYPE in
Definition:
JSirene.sh:45
exit
exit
Definition:
JPizza.sh:36
INPUT_FILE
&set_variable INPUT_FILE
Definition:
JLegolas.sh:30
OUTPUT_FILE
do OUTPUT_FILE
Definition:
software/JDataWriter/JDataWriter.sh:97
a
fi JEventTimesliceWriter a
Definition:
JEventProcessor.sh:71
TMaxLocal_ns
SN TMaxLocal_ns
Definition:
examples/JDataFilter/JDataFilter.sh:109
ctMin
SN ctMin
Definition:
examples/JDataFilter/JDataFilter.sh:109
f
then JPizza f
Definition:
JPizza.sh:46
echo
then echo
Definition:
JDOMDAQDriver.sh:56
timer_start
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 $
Definition:
JTimesliceReprocessor.sh:57
d
then print_variable DETECTOR INPUT_FILE INTERMEDIATE_FILE check_input_file $DETECTOR $INPUT_FILE check_output_file $INTERMEDIATE_FILE $OUTPUT_FILE JMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
Definition:
JPath.sh:52
script
script
Definition:
JCalibrateStrings.sh:2
usage
* usage
Definition:
JLigier-local.sh:33
PDF
then usage $script< detector file >< inputfile >< outputfile > fi case set_variable PDF
Definition:
JARCAMuonReconstruction.sh:28
$INPUT_FILE
then JFileTuna f $INPUT_FILE
Definition:
file-Tuna.sh:66
then
then
Definition:
examples/JDataFilter/JDataFilter.sh:87
JTOOLS::v
data_type v[N+1][M+1]
Definition:
JPolint.hh:707
E
then usage $script[input file[working directory[option]]] nWhere option can be E
Definition:
JMuonPostfit.sh:37
P
then $DIR JPlotNPE PDG P
Definition:
JPlotNPE-PDG.sh:60
DEBUG
#define DEBUG(A)
Message macros.
Definition:
JMessage.hh:62
Generated by
1.8.5