This repository has been archived by the owner on Oct 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
do_sim4
executable file
·183 lines (152 loc) · 6.32 KB
/
do_sim4
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
#!/bin/bash
num=1
nevent=10000000
results_dirname=results7
results_dir=/home/whit/exjpsi/whit/bub_run/${results_dirname}
mkdir -p ${results_dirname}
cd ${results_dir}
lengths="5 10 15 20"
ODs="15 25 30 40 60"
#------------------------------------------------------------------------------
# gold
mat=Au
mkdir -p $mat
cd $mat
for length in ${lengths}; do
for anOD in ${ODs}; do
tag=${mat}_${length}cm_${anOD}mm_${num}
filetemp=${tag}.mac
echo "/B1/det/setCollimatorLength ${length} cm" > $filetemp
echo "/B1/det/setInnerCollimatorOD ${anOD} mm" >> $filetemp
echo "/B1/det/setCollimatorMaterial G4_${mat}" >> $filetemp
echo "/process/setVerbose 0 all" >> $filetemp
echo "/vis/verbose 0" >> $filetemp
echo "/control/verbose 0" >> $filetemp
echo "/run/verbose 0" >> $filetemp
echo "/event/verbose 0" >> $filetemp
echo "/tracking/verbose 0" >> $filetemp
echo "/run/initialize" >> $filetemp
echo "/run/beamOn ${nevent}" >> $filetemp
echo "/B1/det/printConfigInfo" >> $filetemp
scriptname=bub_${tag}
scriptfile=${results_dir}/${mat}/${scriptname}
echo '#!/bin/bash ' > $scriptfile
echo 'source /home/whit/.bashrc ;' >> $scriptfile
echo "cd ${results_dir}/${mat} " >> $scriptfile
echo "../../bin/ebl1 -b --run=$num $filetemp &> ${tag}.log " >> $scriptfile
echo "mv EBL_sim_output_${num}.root bubble_${mat}_${length}cm_${anOD}mm_${num}.root" >> $scriptfile
echo "root -b -q \"../../make_plots.cxx(\\\"${mat}\\\",${length},${num},${anOD})\"" >> $scriptfile
chmod +x ${scriptfile}
auger_file=auger_${tag}.txt
auger_bubble_config "${scriptfile}" > ${auger_file}
jsub ${auger_file}
done
done
cd ..
#------------------------------------------------------------------------------
# silver
mat=Ag
mkdir -p $mat
cd $mat
for length in ${lengths}; do
for anOD in ${ODs}; do
tag=${mat}_${length}cm_${anOD}mm_${num}
filetemp=${tag}.mac
echo "/B1/det/setCollimatorLength ${length} cm" > $filetemp
echo "/B1/det/setInnerCollimatorOD ${anOD} mm" >> $filetemp
echo "/B1/det/setCollimatorMaterial G4_${mat}" >> $filetemp
echo "/process/setVerbose 0 all" >> $filetemp
echo "/vis/verbose 0" >> $filetemp
echo "/control/verbose 0" >> $filetemp
echo "/run/verbose 0" >> $filetemp
echo "/event/verbose 0" >> $filetemp
echo "/tracking/verbose 0" >> $filetemp
echo "/run/initialize" >> $filetemp
echo "/run/beamOn ${nevent}" >> $filetemp
echo "/B1/det/printConfigInfo" >> $filetemp
scriptname=bub_${tag}
scriptfile=${results_dir}/${mat}/${scriptname}
echo '#!/bin/bash ' > $scriptfile
echo 'source /home/whit/.bashrc ;' >> $scriptfile
echo "cd ${results_dir}/${mat} " >> $scriptfile
echo "../../bin/ebl1 -b --run=$num $filetemp &> ${tag}.log " >> $scriptfile
echo "mv EBL_sim_output_${num}.root bubble_${mat}_${length}cm_${anOD}mm_${num}.root" >> $scriptfile
echo "root -b -q \"../../make_plots.cxx(\\\"${mat}\\\",${length},${num},${anOD})\"" >> $scriptfile
chmod +x ${scriptfile}
auger_file=auger_${tag}.txt
auger_bubble_config "${scriptfile}" > ${auger_file}
jsub ${auger_file}
done
done
cd ..
#------------------------------------------------------------------------------
# copper
mat=Cu
mkdir -p $mat
cd $mat
for length in ${lengths}; do
for anOD in ${ODs}; do
tag=${mat}_${length}cm_${anOD}mm_${num}
filetemp=${tag}.mac
echo "/B1/det/setCollimatorLength ${length} cm" > $filetemp
echo "/B1/det/setInnerCollimatorOD ${anOD} mm" >> $filetemp
echo "/B1/det/setCollimatorMaterial G4_${mat}" >> $filetemp
echo "/process/setVerbose 0 all" >> $filetemp
echo "/vis/verbose 0" >> $filetemp
echo "/control/verbose 0" >> $filetemp
echo "/run/verbose 0" >> $filetemp
echo "/event/verbose 0" >> $filetemp
echo "/tracking/verbose 0" >> $filetemp
echo "/run/initialize" >> $filetemp
echo "/run/beamOn ${nevent}" >> $filetemp
echo "/B1/det/printConfigInfo" >> $filetemp
scriptname=bub_${tag}
scriptfile=${results_dir}/${mat}/${scriptname}
echo '#!/bin/bash ' > $scriptfile
echo 'source /home/whit/.bashrc ;' >> $scriptfile
echo "cd ${results_dir}/${mat} " >> $scriptfile
echo "../../bin/ebl1 -b --run=$num $filetemp &> ${tag}.log " >> $scriptfile
echo "mv EBL_sim_output_${num}.root bubble_${mat}_${length}cm_${anOD}mm_${num}.root" >> $scriptfile
echo "root -b -q \"../../make_plots.cxx(\\\"${mat}\\\",${length},${num},${anOD})\"" >> $scriptfile
chmod +x ${scriptfile}
auger_file=auger_${tag}.txt
auger_bubble_config "${scriptfile}" > ${auger_file}
jsub ${auger_file}
done
done
cd ..
#------------------------------------------------------------------------------
# Tungsten
mat=W
mkdir -p $mat
cd $mat
for length in ${lengths}; do
for anOD in ${ODs}; do
tag=${mat}_${length}cm_${anOD}mm_${num}
filetemp=${tag}.mac
echo "/B1/det/setCollimatorLength ${length} cm" > $filetemp
echo "/B1/det/setInnerCollimatorOD ${anOD} mm" >> $filetemp
echo "/B1/det/setCollimatorMaterial G4_${mat}" >> $filetemp
echo "/process/setVerbose 0 all" >> $filetemp
echo "/vis/verbose 0" >> $filetemp
echo "/control/verbose 0" >> $filetemp
echo "/run/verbose 0" >> $filetemp
echo "/event/verbose 0" >> $filetemp
echo "/tracking/verbose 0" >> $filetemp
echo "/run/initialize" >> $filetemp
echo "/run/beamOn ${nevent}" >> $filetemp
echo "/B1/det/printConfigInfo" >> $filetemp
scriptname=bub_${tag}
scriptfile=${results_dir}/${mat}/${scriptname}
echo '#!/bin/bash ' > $scriptfile
echo 'source /home/whit/.bashrc ;' >> $scriptfile
echo "cd ${results_dir}/${mat} " >> $scriptfile
echo "../../bin/ebl1 -b --run=$num $filetemp &> ${tag}.log " >> $scriptfile
echo "mv EBL_sim_output_${num}.root bubble_${mat}_${length}cm_${anOD}mm_${num}.root" >> $scriptfile
echo "root -b -q \"../../make_plots.cxx(\\\"${mat}\\\",${length},${num},${anOD})\"" >> $scriptfile
chmod +x ${scriptfile}
auger_file=auger_${tag}.txt
auger_bubble_config "${scriptfile}" > ${auger_file}
jsub ${auger_file}
done
done