File indexing completed on 2026-05-23 08:15:38
0001
0002
0003
0004
0005 if [[ $
0006 then
0007 echo Error, need to specify input file
0008 exit 1
0009 fi
0010
0011
0012 get_rundirname() {
0013 runtemp=$1
0014 temp=$(( ${runtemp}/100 * 100 ))
0015 low=$(printf "%08d" $temp)
0016 temp=$(( ${temp}+100 ))
0017 high=$(printf "%08d" $temp)
0018 echo run_${low}_${high}
0019 }
0020
0021 inputs=$1
0022 runno=${inputs
0023 runno=${runno
0024 runno=${runno%-*}
0025 runno=${runno%.list}
0026 runno=${runno%.root}
0027 runno=${runno%.prdf}
0028 runno=$((10
0029 echo processing run $runno
0030
0031 nevents=3000000
0032 if [[ $
0033 then
0034 nevents=$2
0035 fi
0036 echo Processing $nevents events
0037
0038 build=none
0039 dbtag=newcdbtag
0040
0041
0042 if [[ $USER == "sphnxpro" ]]
0043 then
0044 pass0dir=/sphenix/user/chiu/sphenix_bbc/CDB/PASS0
0045 outbase=DST_MBD_CALIBRATION_run3pp
0046 outdir=/sphenix/lustre01/sphnxpro/physics/mbdcalib/new_2025/$(get_rundirname ${runno})/
0047 logbase=DST_MBD_CALIBRATION_run3pp
0048 logdir=/sphenix/data/data02/sphnxpro/mbdcalib/new_2025/$(get_rundirname ${runno})/
0049 build=new
0050 dbtag=newcdbtag
0051
0052 if [[ $runno -le 53880 ]]
0053 then
0054
0055 echo "This is run2pp"
0056 pass0dir=/sphenix/user/chiu/sphenix_bbc/CDB/2024_PASS0
0057 outbase=DST_MBD_CALIBRATION_run2pp
0058 outdir=/sphenix/lustre01/sphnxpro/physics/mbdcalib/new_2024/$(get_rundirname ${runno})/
0059 logbase=DST_MBD_CALIBRATION_run2pp
0060 logdir=/sphenix/data/data02/sphnxpro/mbdcalib/new_2024/$(get_rundirname ${runno})/
0061 build=new
0062 dbtag=newcdbtag
0063 elif [[ $runno -le 54962 ]]
0064 then
0065
0066 echo "This is run2auau"
0067 pass0dir=/sphenix/user/chiu/sphenix_bbc/CDB/2024_PASS0
0068 outbase=DST_MBD_CALIBRATION_run2auau
0069 outdir=/sphenix/lustre01/sphnxpro/physics/mbdcalib/new_2024/$(get_rundirname ${runno})/
0070 logbase=DST_MBD_CALIBRATION_run2auau
0071 logdir=/sphenix/data/data02/sphnxpro/mbdcalib/new_2024/$(get_rundirname ${runno})/
0072 build=new
0073 dbtag=newcdbtag
0074 elif [[ $runno -le 78954 ]]
0075 then
0076
0077 echo "This is run3auau"
0078 pass0dir=/sphenix/user/chiu/sphenix_bbc/CDB/PASS0
0079 outbase=DST_MBD_CALIBRATION_run3auau
0080 outdir=/sphenix/lustre01/sphnxpro/physics/mbdcalib/new_2025/$(get_rundirname ${runno})/
0081 logbase=DST_MBD_CALIBRATION_run3auau
0082 logdir=/sphenix/data/data02/sphnxpro/mbdcalib/new_2025/$(get_rundirname ${runno})/
0083 build=new
0084 dbtag=newcdbtag
0085 elif [[ $runno -le 81667 ]]
0086 then
0087
0088 echo "This is run3pp"
0089 pass0dir=/sphenix/user/chiu/sphenix_bbc/CDB/PASS0
0090 outbase=DST_MBD_CALIBRATION_run3pp
0091 outdir=/sphenix/lustre01/sphnxpro/physics/mbdcalib/new_2025/$(get_rundirname ${runno})/
0092 logbase=DST_MBD_CALIBRATION_run3pp
0093 logdir=/sphenix/data/data02/sphnxpro/mbdcalib/new_2025/$(get_rundirname ${runno})/
0094 build=new
0095 dbtag=newcdbtag
0096 elif [[ $runno -le 82703 ]]
0097 then
0098
0099 echo "This is run3oo"
0100 pass0dir=""
0101 outbase=DST_MBD_CALIBRATION_run3oo
0102 outdir=/sphenix/lustre01/sphnxpro/physics/mbdcalib/pro.001/$(get_rundirname ${runno})/
0103 logbase=DST_MBD_CALIBRATION_run3oo
0104 logdir=/sphenix/data/data02/sphnxpro/mbdcalib/pro.001/$(get_rundirname ${runno})/
0105 build=pro.001
0106 dbtag=newcdbtag
0107 else
0108 echo "ERROR, run $runno invalid, aborting"
0109 exit 1
0110 fi
0111
0112 else
0113 pass0dir=/sphenix/user/chiu/sphenix_bbc/CDB/PASS0
0114 outbase=DST_MBD_CALIBRATION_run3pp
0115 outdir=/sphenix/user/chiu/sphenix_bbc/run2025/CALIBPRODUCTION/TEST
0116 logbase=DST_MBD_CALIBRATION_run3pp
0117 logdir=/sphenix/user/chiu/sphenix_bbc/run2025/CALIBPRODUCTION/TEST/log
0118
0119 if [[ $runno -le 53880 ]]
0120 then
0121
0122 outbase=DST_MBD_CALIBRATION_run2pp
0123 outdir=/sphenix/user/chiu/sphenix_bbc/run2024/CALIBPRODUCTION/TEST
0124 logbase=DST_MBD_CALIBRATION_run2pp
0125 logdir=/sphenix/user/chiu/sphenix_bbc/run2024/CALIBPRODUCTION/TEST/log
0126 elif [[ $runno -le 54962 ]]
0127 then
0128
0129 outbase=DST_MBD_CALIBRATION_run2auau
0130 outdir=/sphenix/user/chiu/sphenix_bbc/run2024/CALIBPRODUCTION/TEST
0131 logbase=DST_MBD_CALIBRATION_run2auau
0132 logdir=/sphenix/user/chiu/sphenix_bbc/run2024/CALIBPRODUCTION/TEST/log
0133 elif [[ $runno -le 78954 ]]
0134 then
0135
0136 outbase=DST_MBD_CALIBRATION_run3auau
0137 outdir=/sphenix/user/chiu/sphenix_bbc/run2025/CALIBPRODUCTION/TEST
0138 logbase=DST_MBD_CALIBRATION_run3auau
0139 logdir=/sphenix/user/chiu/sphenix_bbc/run2025/CALIBPRODUCTION/TEST/log
0140 elif [[ $runno -le 81667 ]]
0141 then
0142
0143 outbase=DST_MBD_CALIBRATION_run3pp
0144 outdir=/sphenix/user/chiu/sphenix_bbc/run2025/CALIBPRODUCTION/TEST
0145 logbase=DST_MBD_CALIBRATION_run3pp
0146 logdir=/sphenix/user/chiu/sphenix_bbc/run2025/CALIBPRODUCTION/TEST/log
0147 elif [[ $runno -le 82703 ]]
0148 then
0149
0150 outbase=DST_MBD_CALIBRATION_run3oo
0151 outdir=/sphenix/user/chiu/sphenix_bbc/run2025/CALIBPRODUCTION/TEST
0152 logbase=DST_MBD_CALIBRATION_run3oo
0153 logdir=/sphenix/user/chiu/sphenix_bbc/run2025/CALIBPRODUCTION/TEST/log
0154 else
0155 echo "ERROR, run $runno invalid, aborting"
0156 exit 1
0157 fi
0158 fi
0159
0160 ORIG_DIR=${PWD}
0161
0162 if [[ ! -z "${_CONDOR_SCRATCH_DIR}" ]]
0163 then
0164 mkdir -p ${_CONDOR_SCRATCH_DIR}
0165 cp -p ${inputs} *.sh *.h *.C mipseeds.txt ${_CONDOR_SCRATCH_DIR}/
0166 cd ${_CONDOR_SCRATCH_DIR}
0167 pwd
0168 df -h .
0169
0170
0171 if [[ "$inputs" =~ prdf$ || "$inputs" =~ root$ ]]
0172 then
0173 getinputfiles.pl $inputs
0174 elif [[ "$inputs" =~ list$ ]]
0175 then
0176 head -30 ${inputs} > tempfile.list
0177 getinputfiles.pl --verbose --cp --filelist tempfile.list
0178 inputs=${_CONDOR_SCRATCH_DIR}/tempfile.list
0179 fi
0180
0181 ls -lR
0182
0183
0184
0185
0186
0187 fi
0188
0189
0190
0191 ./prorun_mbdcal.sh --outbase "$outbase" \
0192 --outdir "$outdir" \
0193 --logbase "$logbase" \
0194 --logdir "$logdir" \
0195 --build $build \
0196 --run $runno \
0197 --dbtag "$dbtag" \
0198 --nevents $nevents \
0199 $inputs
0200
0201
0202 if [[ ! -z "${_CONDOR_SCRATCH_DIR}" ]]
0203 then
0204 ls -lR
0205 fi
0206