Back to home page

Project CMSSW displayed by LXR

 
 

    


Warning, /Validation/CaloTowers/test/macros/RunRVMacros_TTBar_MC.csh is written in an unsupported language. File is not indexed.

0001 #!/bin/env tcsh
0002 
0003 #Check to see if the CMS environment is set up
0004 if ($?CMSSW_BASE != 1) then
0005     echo "CMS environment not set up"
0006     exit
0007 endif
0008 
0009 #Check for correct number of arguments
0010 if ($#argv<2) then
0011     echo "Script needs 2 input variable"
0012     exit
0013 endif
0014 
0015 set NEW_VERS=$1
0016 set OLD_VERS=$2
0017 
0018 # Two bit value with the first corresponding to whether the validation version is centrally
0019 # harvested (1) or not (0) and the second to whether the reference version is harvested. Thus:
0020 # 00: both are privately produced
0021 # 01: reference version is harvested, validation version is private
0022 # 10: validation version is harvested, reference version is private
0023 # 11: both versions are harvested
0024 # Any other value is the same as 0
0025 set harvest=11
0026 
0027 #Check if base directory already exists
0028 if (-d ${NEW_VERS}_vs_${OLD_VERS}_RelVal) then
0029     echo "Directory already exists"
0030     exit
0031 endif
0032 
0033 #Create base directory and top directories
0034 mkdir ${NEW_VERS}_vs_${OLD_VERS}_RelVal
0035 cd ${NEW_VERS}_vs_${OLD_VERS}_RelVal
0036 
0037 cp ../html_indices/TopLevelOneSample.html index.html
0038 
0039 #-------
0040 mkdir CaloTowers
0041 mkdir RecHits
0042 mkdir RBX
0043 
0044 cat ../html_indices/RelVal_RecHits.html | sed -e s/DATA_SAMPLE/TTbar/ > RecHits/index.html
0045 
0046 cp ../html_indices/RelVal_CaloTowers.html CaloTowers/index.html
0047 cp ../html_indices/RBX.html               RBX/index.html
0048 
0049 cd ../
0050 
0051 #Process MC TTbar
0052 root -b -q 'RelValMacro.C("'${OLD_VERS}_MC'","'${NEW_VERS}_MC'","'HcalRecHitValidationRelVal_TTbar_MC_${OLD_VERS}.root'","'HcalRecHitValidationRelVal_TTbar_MC_${NEW_VERS}.root'","InputRelVal_Medium.txt",'${harvest}')'
0053 
0054 mv *CaloTowers*.gif ${NEW_VERS}_vs_${OLD_VERS}_RelVal/CaloTowers/
0055 mv RBX*gif          ${NEW_VERS}_vs_${OLD_VERS}_RelVal/RBX/
0056 mv *gif             ${NEW_VERS}_vs_${OLD_VERS}_RelVal/RecHits/
0057 
0058 exit