File indexing completed on 2023-03-17 11:28:13
0001
0002
0003 if [ $
0004 echo "usage: ./compare.sh CMSSW_RELEASE_1 CMSSW_RELEASE_2"
0005 exit 1
0006 fi
0007 release1=$1
0008 release2=$2
0009
0010 dqmdir="/tas03/home/jribnik/devel/muonidval/dqm"
0011
0012 echo "Reticulating spline for $release1/$release2 comparison..."
0013
0014
0015
0016
0017
0018 file1s=(`find -L $dqmdir -maxdepth 1 -name "DQM_V0001_R000000001__*__${release1}-*__*.root"`)
0019 if [ ${
0020 echo "No samples found for $release1. Exiting."
0021 exit 2
0022 fi
0023
0024 for file1 in ${file1s[@]}; do
0025 isfastsim=0
0026 echo $file1 | grep FastSim >/dev/null
0027 if [ $? -eq 0 ]; then
0028 isfastsim=1
0029 fi
0030
0031 sample=`echo $file1 | awk -F'__' '{print $2}'`
0032 vfile1=`echo $file1 | awk -F'__' '{print $3}' | awk -F'-' '{print $3}'`
0033 vfile2=""
0034 echo "Found $sample for ${release1}-$vfile1..."
0035
0036
0037
0038 gosolo=0
0039
0040 file2s=(`find -L $dqmdir -maxdepth 1 -name "DQM_V0001_R000000001__${sample}__${release2}-*-${vfile1}__*.root"`)
0041 if [ ${
0042
0043
0044 file2s=(`find $dqmdir -maxdepth 1 -name "DQM_V0001_R000000001__${sample}__${release2}-*-v1__*.root"`)
0045 fi
0046 if [ ${
0047 echo "but not in $release2. Making non-comparison plots."
0048 gosolo=1
0049 else
0050 vfile2=$(echo ${file2s[0]} | awk -F'__' '{print $3}' | awk -F'-' '{print $3}')
0051 echo "and in ${release2}-${vfile2}. Making comparison plots."
0052 fi
0053
0054 newdir="${release1}-${vfile1}/$sample"
0055 if [ $gosolo -eq 0 ]; then
0056 newdir="${release1}-${vfile1}_vs_${release2}-${vfile2}/$sample"
0057 fi
0058 mkdir -p $newdir
0059 cd $newdir
0060 cp ../../muonIdVal.C ./
0061 cmd="root -b -l -q 'muonIdVal.C++(\"$file1\")'"
0062 if [ $gosolo -eq 0 ]; then
0063 cmd="root -b -l -q 'muonIdVal.C++(\"$file1\",\"${file2s[0]}\")'"
0064 fi
0065 eval $cmd
0066 rm muonIdVal.C muonIdVal_C.d muonIdVal_C.so
0067 mkdir GlobalMuons TrackerMuons GlobalMuonsNotTrackerMuons TrackerMuonsNotGlobalMuons
0068 mv gm_*.png GlobalMuons
0069 mv tm_*.png TrackerMuons
0070 mv gmntm_*.png GlobalMuonsNotTrackerMuons
0071 mv tmngm_*.png TrackerMuonsNotGlobalMuons
0072 cd -
0073 done