File indexing completed on 2024-04-06 12:33:16
0001
0002
0003
0004
0005
0006
0007 hostname
0008 env
0009 voms-proxy-info
0010
0011
0012 set -e
0013 set -x
0014
0015
0016
0017 if [ -z "$PERJOB" ]; then
0018 PERJOB=200
0019 fi
0020
0021
0022
0023 CONDITIONS=auto:phase1_2022_realistic ERA=Run3 GEOM=DB.Extended CUSTOM=
0024
0025
0026
0027
0028
0029
0030
0031
0032 NTHREADS=8
0033
0034
0035 if [ "$#" -ne 3 ]; then
0036 echo "Must pass exactly 3 arguments: run_relval.sh [QCD|QCDPU|ZEEPU|ZMMPU|TenTauPU|NuGunPU] [reco|dqm] [njob]"
0037 exit 0
0038 fi
0039
0040
0041 NJOB=$(($3 + 1))
0042
0043
0044 LAUNCHDIR=`pwd`
0045 source /cvmfs/cms.cern.ch/cmsset_default.sh
0046
0047
0048 cd $CMSSW_BASE
0049 eval `scram runtime -sh`
0050
0051
0052 if [ -z "$HOME" ]; then
0053 export HOME=/tmp
0054 fi
0055
0056
0057 if [ -z "$_CONDOR_SCRATCH_DIR" ]; then
0058 cd $LAUNCHDIR
0059 else
0060 cd $_CONDOR_SCRATCH_DIR
0061 fi
0062
0063
0064 if [ "$1" == "QCD" ]; then
0065 INPUT_FILELIST=${CMSSW_BASE}/src/Validation/RecoParticleFlow/test/tmp/das_cache/QCD_noPU.txt
0066 NAME=QCD
0067 elif [ "$1" == "QCDPU" ]; then
0068 INPUT_FILELIST=${CMSSW_BASE}/src/Validation/RecoParticleFlow/test/tmp/das_cache/QCD_PU.txt
0069 NAME=QCDPU
0070 elif [ "$1" == "ZEEPU" ]; then
0071 INPUT_FILELIST=${CMSSW_BASE}/src/Validation/RecoParticleFlow/test/tmp/das_cache/ZEE_PU.txt
0072 NAME=ZEEPU
0073 elif [ "$1" == "ZMMPU" ]; then
0074 INPUT_FILELIST=${CMSSW_BASE}/src/Validation/RecoParticleFlow/test/tmp/das_cache/ZMM_PU.txt
0075 NAME=ZMMPU
0076 elif [ "$1" == "TenTauPU" ]; then
0077 INPUT_FILELIST=${CMSSW_BASE}/src/Validation/RecoParticleFlow/test/tmp/das_cache/TenTau_PU.txt
0078 NAME=TenTauPU
0079 elif [ "$1" == "NuGunPU" ]; then
0080 INPUT_FILELIST=${CMSSW_BASE}/src/Validation/RecoParticleFlow/test/tmp/das_cache/NuGun_PU.txt
0081 NAME=NuGunPU
0082 elif [ "$1" == "conf" ]; then
0083 INPUT_FILELIST=${CMSSW_BASE}/src/Validation/RecoParticleFlow/test/tmp/das_cache/NuGun_PU.txt
0084 NAME=conf
0085 else
0086 echo "Argument 1 must be [QCD|QCDPU|ZEEPU|ZMMPU|TenTauPU|NuGunPU|conf] but was $1"
0087 exit 1
0088 fi
0089
0090
0091 if [ "$2" == "reco" ]; then
0092 STEP="RECO"
0093 elif [ "$2" == "dqm" ]; then
0094 STEP="DQM"
0095 else
0096 echo "Argument 2 must be [reco|dqm] but was $2"
0097 exit 1
0098 fi
0099
0100
0101 SKIPEVENTS=$(($NJOB * $PERJOB))
0102
0103
0104 echo $INPUT_FILELIST $NAME $STEP $SKIPEVENTS
0105
0106
0107 if [ $STEP == "RECO" ]; then
0108
0109 if [ $NAME == "conf" ]; then
0110 mkdir -p $NAME
0111 cd $NAME
0112
0113 FILENAME=`sed -n "${NJOB}p" $INPUT_FILELIST`
0114 echo "FILENAME="$FILENAME
0115
0116 cmsDriver.py step3 --conditions $CONDITIONS -s RAW2DIGI,L1Reco,RECO,RECOSIM,PAT --datatier MINIAODSIM --nThreads $NTHREADS -n 100 --era $ERA --eventcontent MINIAODSIM --geometry=$GEOM --filein step2.root --fileout file:step3_inMINIAODSIM.root --no_exec --python_filename=step3.py $CUSTOM
0117
0118 else
0119
0120
0121 echo "Making subdirectory $NAME"
0122
0123 if [ -e $NAME ]; then
0124 echo "directory $NAME exists, aborting"
0125 exit 1
0126 fi
0127
0128 mkdir $NAME
0129 cd $NAME
0130
0131 FILENAME=`sed -n "${NJOB}p" $INPUT_FILELIST`
0132 echo "FILENAME="$FILENAME
0133
0134 echo "Running step RECO"
0135 cmsDriver.py step3 --conditions $CONDITIONS -s RAW2DIGI,L1Reco,RECO,RECOSIM,PAT --datatier MINIAODSIM --nThreads $NTHREADS -n 100 --era $ERA --eventcontent MINIAODSIM --geometry=$GEOM --filein $FILENAME --fileout file:step3_inMINIAODSIM.root $CUSTOM | tee step3.log 2>&1
0136
0137
0138
0139
0140
0141
0142 fi
0143
0144 elif [ $STEP == "DQM" ]; then
0145 echo "Running step DQM"
0146
0147 cd $NAME
0148
0149
0150
0151 du step3*MINIAODSIM*.root | grep -v "^0" | awk '{print $2}' | sed 's/^/file:/' > step3_filelist.txt
0152 cat step3_filelist.txt
0153
0154
0155
0156 cmsDriver.py step5 --conditions $CONDITIONS -s DQM:@pfDQM --datatier DQMIO --nThreads $NTHREADS --era $ERA --eventcontent DQM --filein filelist:step3_filelist.txt --fileout file:step5.root -n 100 2>&1 | tee step5.log
0157
0158
0159 cmsDriver.py step6 --conditions $CONDITIONS -s HARVESTING:@pfDQM --era $ERA --filetype DQM --filein file:step5.root --fileout file:step6.root 2>&1 | tee step6.log
0160 fi
0161
0162
0163
0164
0165 cd ..
0166
0167 find . -name "*"