File indexing completed on 2025-12-16 09:17:31
0001
0002 mkdir -p condor_sim
0003 mkdir -p output_sim
0004
0005 rm condor_sim/*
0006 rm output_sim/*
0007
0008 runindex=28
0009 segperjob=20
0010 radius=(0.4)
0011
0012 > ListCondorRunSim.csv
0013
0014 for ((r=0; r<${
0015 export radius_value=${radius[$r]}
0016
0017 runtype="MB"
0018 export treepath="/sphenix/tg/tg01/jets/hanpuj/JES_MC_run${runindex}/$runtype"
0019 totalseg=$(find "$treepath/" -mindepth 1 -maxdepth 1 -type d -name 'OutDir*' | wc -l)
0020 total_condorjobs=$(( (totalseg + segperjob - 1) / segperjob ))
0021 for ((i=0; i<total_condorjobs; i++)); do
0022 if [[ $(((i+1)*segperjob)) -gt $totalseg ]]; then
0023 nseg=$((totalseg - i*segperjob))
0024 else
0025 nseg=$segperjob
0026 fi
0027 iseg=$((i*segperjob))
0028
0029 echo "$runtype,$nseg,$iseg,$radius_value" >> ListCondorRunSim.csv
0030 done
0031
0032 runtype="Jet5GeV"
0033 export treepath="/sphenix/tg/tg01/jets/hanpuj/JES_MC_run${runindex}/$runtype"
0034 totalseg=$(find "$treepath/" -mindepth 1 -maxdepth 1 -type d -name 'OutDir*' | wc -l)
0035 total_condorjobs=$(( (totalseg + segperjob - 1) / segperjob ))
0036 for ((i=0; i<total_condorjobs; i++)); do
0037 if [[ $(((i+1)*segperjob)) -gt $totalseg ]]; then
0038 nseg=$((totalseg - i*segperjob))
0039 else
0040 nseg=$segperjob
0041 fi
0042 iseg=$((i*segperjob))
0043
0044 echo "$runtype,$nseg,$iseg,$radius_value" >> ListCondorRunSim.csv
0045 done
0046
0047 runtype="Jet10GeV"
0048 export treepath="/sphenix/tg/tg01/jets/hanpuj/JES_MC_run${runindex}/$runtype"
0049 totalseg=$(find "$treepath/" -mindepth 1 -maxdepth 1 -type d -name 'OutDir*' | wc -l)
0050 total_condorjobs=$(( (totalseg + segperjob - 1) / segperjob ))
0051 for ((i=0; i<total_condorjobs; i++)); do
0052 if [[ $(((i+1)*segperjob)) -gt $totalseg ]]; then
0053 nseg=$((totalseg - i*segperjob))
0054 else
0055 nseg=$segperjob
0056 fi
0057 iseg=$((i*segperjob))
0058
0059 echo "$runtype,$nseg,$iseg,$radius_value" >> ListCondorRunSim.csv
0060 done
0061
0062 runtype="Jet15GeV"
0063 export treepath="/sphenix/tg/tg01/jets/hanpuj/JES_MC_run${runindex}/$runtype"
0064 totalseg=$(find "$treepath/" -mindepth 1 -maxdepth 1 -type d -name 'OutDir*' | wc -l)
0065 total_condorjobs=$(( (totalseg + segperjob - 1) / segperjob ))
0066 for ((i=0; i<total_condorjobs; i++)); do
0067 if [[ $(((i+1)*segperjob)) -gt $totalseg ]]; then
0068 nseg=$((totalseg - i*segperjob))
0069 else
0070 nseg=$segperjob
0071 fi
0072 iseg=$((i*segperjob))
0073
0074 echo "$runtype,$nseg,$iseg,$radius_value" >> ListCondorRunSim.csv
0075 done
0076
0077 runtype="Jet20GeV"
0078 export treepath="/sphenix/tg/tg01/jets/hanpuj/JES_MC_run${runindex}/$runtype"
0079 totalseg=$(find "$treepath/" -mindepth 1 -maxdepth 1 -type d -name 'OutDir*' | wc -l)
0080 total_condorjobs=$(( (totalseg + segperjob - 1) / segperjob ))
0081 for ((i=0; i<total_condorjobs; i++)); do
0082 if [[ $(((i+1)*segperjob)) -gt $totalseg ]]; then
0083 nseg=$((totalseg - i*segperjob))
0084 else
0085 nseg=$segperjob
0086 fi
0087 iseg=$((i*segperjob))
0088
0089 echo "$runtype,$nseg,$iseg,$radius_value" >> ListCondorRunSim.csv
0090 done
0091
0092 runtype="Jet30GeV"
0093 export treepath="/sphenix/tg/tg01/jets/hanpuj/JES_MC_run${runindex}/$runtype"
0094 totalseg=$(find "$treepath/" -mindepth 1 -maxdepth 1 -type d -name 'OutDir*' | wc -l)
0095 total_condorjobs=$(( (totalseg + segperjob - 1) / segperjob ))
0096 for ((i=0; i<total_condorjobs; i++)); do
0097 if [[ $(((i+1)*segperjob)) -gt $totalseg ]]; then
0098 nseg=$((totalseg - i*segperjob))
0099 else
0100 nseg=$segperjob
0101 fi
0102 iseg=$((i*segperjob))
0103
0104 echo "$runtype,$nseg,$iseg,$radius_value" >> ListCondorRunSim.csv
0105 done
0106
0107 runtype="Jet50GeV"
0108 export treepath="/sphenix/tg/tg01/jets/hanpuj/JES_MC_run${runindex}/$runtype"
0109 totalseg=$(find "$treepath/" -mindepth 1 -maxdepth 1 -type d -name 'OutDir*' | wc -l)
0110 total_condorjobs=$(( (totalseg + segperjob - 1) / segperjob ))
0111 for ((i=0; i<total_condorjobs; i++)); do
0112 if [[ $(((i+1)*segperjob)) -gt $totalseg ]]; then
0113 nseg=$((totalseg - i*segperjob))
0114 else
0115 nseg=$segperjob
0116 fi
0117 iseg=$((i*segperjob))
0118
0119 echo "$runtype,$nseg,$iseg,$radius_value" >> ListCondorRunSim.csv
0120 done
0121
0122 runtype="Jet70GeV"
0123 export treepath="/sphenix/tg/tg01/jets/hanpuj/JES_MC_run${runindex}/$runtype"
0124 totalseg=$(find "$treepath/" -mindepth 1 -maxdepth 1 -type d -name 'OutDir*' | wc -l)
0125 total_condorjobs=$(( (totalseg + segperjob - 1) / segperjob ))
0126 for ((i=0; i<total_condorjobs; i++)); do
0127 if [[ $(((i+1)*segperjob)) -gt $totalseg ]]; then
0128 nseg=$((totalseg - i*segperjob))
0129 else
0130 nseg=$segperjob
0131 fi
0132 iseg=$((i*segperjob))
0133
0134 echo "$runtype,$nseg,$iseg,$radius_value" >> ListCondorRunSim.csv
0135 done
0136 done
0137
0138 echo "Arguement list formed!"
0139
0140 condor_submit RunCondorSim.sub
0141
0142 echo "All jobs submitted!"