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_sim5
executable file
·61 lines (53 loc) · 2.11 KB
/
do_sim5
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
#!/bin/bash
num=0
nevent=10000000
results_dirname=results9
results_dir=/home/whit/exjpsi/whit/bub_run/${results_dirname}
mkdir -p ${results_dirname}
cd ${results_dir}
col_up_id=10;
col_down_id=10;
lengths="5 10 15 20 30 40"
ODs="15 25 30 40 60"
materials="Au Ag Cu W Mo"
#materials="W Mo"
#------------------------------------------------------------------------------
# gold
for mat in ${materials}; do
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 "/B1/det/setCollimatorUpstreamID ${col_up_id} mm" >> $filetemp
echo "/B1/det/setCollimatorDownstreamID ${col_down_id} mm" >> $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}
num=$((num+1))
done
done
cd ..
done