-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathepos
More file actions
319 lines (300 loc) · 7.08 KB
/
epos
File metadata and controls
319 lines (300 loc) · 7.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
#!/bin/sh
if [ $# -le 0 ]; then
echo
echo " syntax: epos [-hepmc \$hepfile] [-root] [-cproot] [-q|-c] "
echo " [-eee[e] \$e1 \$e2 \$e3] [-n \$n] \$filen [\$n]"
echo " [-si \$n] [-sj \$n]"
echo
exit 1
fi
SRC='src/'
SRCEXT='srcext/'
CONF='config/'
if [ $OPT = './' ]; then
OPX=`pwd`/
else
OPX=$OPT
fi
hepmc='no'
hepfile='z-HepMC'
root='no'
cproot='no'
scr='no'
ext=''
num='0'
prone=''
mi1='no'
mi5='no'
system="i"
ext1='-'
ext2='-'
ext3='-'
ext4='-'
tmp='-'
end=0
gefac=1
seed_j=`date '+%N'`
seed_i=`date '+%N'`
while [ $end -eq 0 ];
do
end=1
case "$1"
in
-n) shift
num="$1"
shift
end=0
;;
-si) shift
seed_i=$1
shift
end=0
;;
-sj) shift
seed_j=$1
shift
end=0
;;
-e1) shift
ext1="$1"
shift
end=0
;;
-e2) shift
ext2="$1"
shift
end=0
;;
-e3) shift
ext3="$1"
shift
end=0
;;
-eeee) shift
ext1="$1"
shift
ext2="$1"
shift
ext3="$1"
shift
ext4="0"
end=0
;;
-eee) shift
ext1="$1"
shift
ext2="$1"
shift
ext3="$1"
shift
end=0
;;
-ee) shift
ext1="$1"
shift
ext2="$1"
shift
end=0
;;
-hepmc) shift
hepmc="yes"
if [ ! -z "$1" ] && [ $# -gt 1 ]; then
hepfile="$1"
shift
fi
end=0
;;
-root) shift
root="yes"
end=0
;;
-gf) shift
gefac=$1
shift
end=0
;;
-cproot) shift
cproot="yes"
end=0
;;
-scr) shift
system="-q"
end=0
;;
-q) shift
system="-q"
end=0
;;
-c) shift
system="-c"
end=0
;;
-1) shift
mi1="yes"
end=0
;;
-5) shift
mi5="yes"
end=0
;;
esac
done
filei=$1
shift
if [ $# -gt 0 ]; then
num="$1"
fi
file=$filei
if [ ! "$ext1" = "-" ]; then
file=$file$ext1
fi
if [ ! "$ext2" = "-" ]; then
file=$file$ext2
fi
if [ ! "$ext3" = "-" ]; then
file=$file$ext3
fi
if [ ! "$file" = "$filei" ]; then
echo cp $filei.optns $file.optns
cp $filei.optns $file.optns
tmp=$file.optns
fi
if [ ! -f ${OPX}${file}.optns ]; then
echo ${OPX}${file}.optns "does not exist"
exit
fi
rootcproot=$root$cproot
one=${file}
if [ "$num" != "0" ]; then
one=${file}"-"${num}
fi
cp ${OPX}${file}.optns ${OPX}z-${one}.optns
rm -f ${CHK}z-${one}.check
rm -f ${CHK}z-${one}.data
rm -f ${CHK}z-${one}.copy
rm -f ${CHK}z-${one}.copyDo1
rm -f ${CHK}z-${one}.copyDo2
rm -f ${CHK}z-${one}.log
gunzip -c ${EPO4}${SRC}KWt/eos4f.eos.gz > z-eos4f.eos
seedj=$seed_j
seedi=$seed_i
#---------------------------------------------------------------------
clinput=z-${one}'.clinput'
echo "!fname mtr ${CHK}z-${one}.mtr" > $clinput
echo "set seedj $seedj set seedi $seedi" >> $clinput
echo "echo off" >> $clinput
echo "rootcproot $rootcproot" >> $clinput
echo "system $system" >> $clinput
echo "ext1 $ext1" >> $clinput
echo "ext3 $ext3" >> $clinput
echo "ext4 $ext4" >> $clinput
echo "set gefac $gefac" >> $clinput
echo "!!!beginoptns spherio !No longer used." >> $clinput
echo "!!!... !See version < 3118 " >> $clinput
echo "!!!endoptns spherio !if needed again " >> $clinput
echo "fname pathep $EPO4" >> $clinput
echo "!-------HQ--------" >> $clinput
echo "fname user1 ${EPO4}${SRCEXT}VOt/" >> $clinput
echo "fname user2 ${HTO}z-${one}.hq" >> $clinput
echo "fname user3 ${EPO4}${SRCEXT}URt/" >> $clinput
echo "!-------HQ END--------" >> $clinput
echo "fname pathpdf ${EPO4}${SRC}TPt/" >> $clinput
echo "fname histo ${HTO}z-${one}.histo" >> $clinput
echo "fname check ${CHK}z-${one}.check" >> $clinput
echo "fname copy ${CHK}z-${one}.copy" >> $clinput
echo "fname log ${CHK}z-${one}.log" >> $clinput
echo "fname data ${CHK}z-${one}.data" >> $clinput
echo "fname hepfile ${hepfile}" >> $clinput
echo "fname initl ${EPO4}${SRC}KWt/aa.i" >> $clinput
echo "fname inidi ${EPO4}${SRC}TPt/di.i " >> $clinput
echo "fname inidr ${EPO4}${SRC}KWt/dr.i " >> $clinput
echo "fname iniev ${EPO4}${SRC}KWt/ev.i " >> $clinput
echo "fname inirj ${EPO4}${SRC}KWt/rj.i" >> $clinput
echo "fname inics ${EPO4}${SRC}TPt/cs.i" >> $clinput
echo "fname inigrv ${EPO4}${SRC}grv.i" >> $clinput
echo "fname partab ${EPO4}${SRCEXT}YK/ptl6.data" >> $clinput
echo "fname dectab ${EPO4}${SRCEXT}YK/dky6.data" >> $clinput
echo "fname hpf srcext/UR/tables.dat" >> $clinput
echo "fqgsjet dat ${EPO4}${SRC}qgsjet/qgsjet.dat" >> $clinput
echo "fqgsjet ncs ${EPO4}${SRC}qgsjet/qgsjet.ncs" >> $clinput
echo "fqgsjetII dat ${EPO4}${SRC}qgsjetII/qgsdat-II-03" >> $clinput
echo "fqgsjetII ncs ${EPO4}${SRC}qgsjetII/sectnu-II-03" >> $clinput
echo "nodecay 1220" >> $clinput
echo "nodecay -1220" >> $clinput
echo "nodecay 120" >> $clinput
echo "nodecay -120" >> $clinput
echo "nodecay 130" >> $clinput
echo "nodecay -130" >> $clinput
echo "nodecay -20" >> $clinput
echo "nodecay 14" >> $clinput
echo "nodecay -14" >> $clinput
echo "nodecay 16" >> $clinput
echo "nodecay -16" >> $clinput
echo "echo on" >> $clinput
echo "input ${EPO4}${CONF}parbf.i" >> $clinput
echo "input ${OPX}z-${one}.optns" >> $clinput
echo "input ${EPO4}${SRC}KWn/paraf.i" >> $clinput
echo "input ${EPO4}${CONF}partx.i" >> $clinput
echo "runprogram" >> $clinput
echo "stopprogram" >> $clinput
# to use gdb, type "epos ..." as usually, then in gdb type "run", then "z-clinput"
#gdb ${OBJ}epos$EPOVSN/Xepos
echo $LD_LIBRARY_PATH
time ${LIBDIR}/Xepos -n <<EOF
$clinput
EOF
rm $clinput
if [ -s ${CHK}z-${one}.data ]; then
echo "###############################################################"
echo " output written to ${CHK}z-${one}.data"
echo "###############################################################"
else
rm -f ${CHK}z-${one}.data
fi
rm -f ${CHK}z-${one}.dump
if [ "$root" = "no" ]; then
rm -f ${CHK}z-${one}.root
fi
if [ ! -s ${CHK}z-${one}.check ]; then
rm -f ${CHK}z-${one}.check
fi
if [ ! -s ${HTO}z-${one}.histo ]; then
rm -f ${HTO}z-${one}.histo
fi
if [ ! -s ${HTO}z-${one}.hq ]; then
rm -f ${HTO}z-${one}.hq
fi
if [ ! -s ${hepfile}.hepmc ]; then
rm -f ${hepfile}.hepmc
fi
if [ ! -s $hepfile ]; then
rm -f ${hepfile}
fi
if [ -s ${hepfile}.hepmc ]; then
if [ "$hepmc" = "no" ]; then
rm -f ${hepfile}.hepmc
fi
fi
rm -f ${OPX}z-${one}.optns
rm -f ${CHK}z-${one}.log
rm -f ${CHK}z-${one}.copy
rm -f ${CHK}z-${one}.copyDo1
rm -f ${CHK}z-${one}.copyDo2
rm -f ${HTO}z-${one}.ztr
rm -f ${CHK}z-${one}.dataR
rm -f z-eos4f.eos
if [ ! "$tmp" = "-" ]; then
rm -v $tmp
fi
if [ -s ${CHK}z-${one}.see ]; then
rm -f ${CHK}z-${one}.see
fi
if [ "$cproot" = "yes" ]; then
rm -f ${OPX}z-${one}.optns
fi
if [ "$2" = "y-" ]; then
rm -f ${OPX}z-${one}.optns
fi
rm -f gmon.out
date
exit