Jpp  pmt_effective_area_update_2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 JARCAREC_DEBUG 1
20 set_variable: PDF JARCAREC_PDF $JPP_DATA/J%p.dat
21 set_variable PMT $JPP_DATA/PMT_parameters.txt
22 set_variable: SUF JARCAREC_SUF jchain.arca
23 set_variable: ENERGY_CORRECTION JARCAREC_ENERGY_CORRECTION energy_correction_arca.txt
24 set_variable: NUMBER_OF_EVENTS JARCAREC_NUMBER_OF_EVENTS $((2**31))
25 
26 if do_usage $*; then
27  usage "$script <detector file> <input file> <output file> [PDF file descriptor [PMT parameters file]]"
28 fi
29 
30 case $# in
31  5) set_variable PMT $5;&
32  4) set_variable PDF $4;&
36  *) fatal "Wrong number of arguments.";;
37 esac
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 
44 # ------------------------------------------------------------------------------------------
45 # JMuonPrefit
46 # ------------------------------------------------------------------------------------------
47 
48 PARAMETERS=(
49  sigma_ns 5
50  gridAngle_deg 1
51  useL0 0
52  numberOfOutliers 3
53  numberOfPrefits 12
54  DZMax 0.0
55  numberOfDZMax 1
56  TMaxLocal_ns 18
57  ctMin 0.0
58  roadWidth_m 200.0)
59 
61 
62 eval JMuonPrefit \
63  -a $DETECTOR \
64  -f $INPUT_FILE \
65  -o ${OUTPUT_FILE/\%/jprefit} \
66  -n ${NUMBER_OF_EVENTS} \
67  -@ `make_equation PARAMETERS` \
68  -d $DEBUG --!
69 
70 CHECK_EXIT_CODE
71 
72 timer_stop
73 timer_print
74 
75 
76 # ------------------------------------------------------------------------------------------
77 # JMuonSimplex
78 # ------------------------------------------------------------------------------------------
79 
80 PARAMETERS=(
81  sigma_ns 3
82  TMaxLocal_ns 15.0
83  ctMin 0.0
84  roadWidth_m 200.0
85  numberOfPrefits 0)
86 
88 
89 eval JMuonSimplex \
90  -a $DETECTOR \
91  -f ${OUTPUT_FILE/\%/jprefit} \
92  -o ${OUTPUT_FILE/\%/jsimplex} \
93  -@ `make_equation PARAMETERS` \
94  -d ${DEBUG} --!
95 
96 CHECK_EXIT_CODE
97 
98 timer_stop
99 timer_print
100 
101 
102 # ------------------------------------------------------------------------------------------
103 # JMuonGandalf
104 # ------------------------------------------------------------------------------------------
105 
106 PARAMETERS=(
107  TTS_ns 2
108  E_GeV 1.0e3
109  TMin_ns -50.0
110  TMax_ns +450.0
111  R_Hz 6.0e3
112  roadWidth_m 175.0
113  numberOfPrefits 0)
114 
116 
117 eval JMuonGandalf \
118  -a $DETECTOR \
119  -f ${OUTPUT_FILE/\%/jsimplex} \
120  -o ${OUTPUT_FILE/\%/jgandalf} \
121  -P $PDF \
122  -@ `make_equation PARAMETERS` \
123  -d $DEBUG --!
124 
125 CHECK_EXIT_CODE
126 
127 timer_stop
128 timer_print
129 
130 
131 # ------------------------------------------------------------------------------------------
132 # JMuonStart
133 # ------------------------------------------------------------------------------------------
134 
135 PARAMETERS=(
136  roadWidth_m 160.0
137  R_Hz 6.0e3
138  TMin_ns -25.0
139  TMax_ns +75.0
140  Pmin1 1.0e-3
141  Pmin2 1.0e-2
142  numberOfPrefits 1)
143 
145 
146 eval JMuonStart \
147  -a $DETECTOR \
148  -f ${OUTPUT_FILE/\%/jgandalf} \
149  -o ${OUTPUT_FILE/\%/jstart} \
150  -P $PDF \
151  -@ `make_equation PARAMETERS` \
152  -d $DEBUG --!
153 
154 CHECK_EXIT_CODE
155 
156 timer_stop
157 timer_print
158 
159 
160 # ------------------------------------------------------------------------------------------
161 # JMuonEnergy
162 # ------------------------------------------------------------------------------------------
163 
164 PARAMETERS=(
165  roadWidth_m 200.0
166  R_Hz 6.0e3
167  EMin_log 0.0
168  EMax_log 8.0
169  TMin_ns -50.0
170  TMax_ns +450.0
171  mestimator 1
172  numberOfPrefits 1)
173 
175 
176 eval JMuonEnergy \
177  -a $DETECTOR \
178  -f ${OUTPUT_FILE/\%/jstart} \
179  -o ${OUTPUT_FILE/\%/jenergy} \
180  -P $PDF \
181  -E $ENERGY_CORRECTION \
182  -@ `make_equation PARAMETERS` \
183  -d $DEBUG --!
184 
185 CHECK_EXIT_CODE
186 
187 timer_stop
188 timer_print
189 
190 
191 # ------------------------------------------------------------------------------------------
192 # rename outputfile and remove intermediate files
193 # ------------------------------------------------------------------------------------------
194 
196 
197 mv \
198  ${OUTPUT_FILE/\%/jenergy} \
199  ${OUTPUT_FILE/\%/${SUF}} \
200  -v
201 
202 rm \
203  ${OUTPUT_FILE/\%/jprefit} \
204  ${OUTPUT_FILE/\%/jsimplex} \
205  ${OUTPUT_FILE/\%/jgandalf} \
206  ${OUTPUT_FILE/\%/jstart} \
207  -v
208 
209 timer_stop
210 timer_print
211 
212 
213 # ------------------------------------------------------------------------------------------
214 # JConvertEvt
215 # ------------------------------------------------------------------------------------------
216 
218 
219 JConvertEvt \
220  -f ${OUTPUT_FILE/\%/${SUF}} \
221  -o ${OUTPUT_FILE/\%/${SUF}.aanet} \
222  -a $DETECTOR \
223  -P $PMT \
224  -d $DEBUG --!
225 
226 timer_stop
227 timer_print
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
static const JPBS_t PMT(3, 4, 2, 3)
PBS of photo-multiplier tube (PMT)
set_variable INPUT_FILE
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 usage $script< string identifier >< detectorfile > input file(toashort file)+" "\nNote that the input files and toashort files should be one-to-one related." fi if (( $
then JPizza f
Definition: JPizza.sh:46
then echo
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 $DIR JTransitTime o
Definition: JTransitTime.sh:44
* usage
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
alias put_queue eval echo n
Definition: qlib.csh:19
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
script
Definition: JAcoustics.sh:2
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 case set_variable NUMBER_OF_EVENTS
Definition: JRunAnalyzer.sh:17
then usage $script[input file[working directory[option]]] nWhere option can be E
Definition: JMuonPostfit.sh:36
then $DIR JPlotNPE PDG P
Definition: JPlotNPE-PDG.sh:62
do if[[!-f $ACOUSTICS_WORKDIR/${KEY}.txt]]
Definition: JAcoustics.sh:38