Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:33:02

0001 #!/bin/tcsh
0002 
0003 #Check for correct number of arguments
0004 if ($#argv<4) then
0005     echo "Script needs 4 input variables"
0006     exit
0007 endif
0008 
0009 set VAL_FILE=$1
0010 set REF_FILE=$2
0011 set VAL_VERS=$3
0012 set REF_VERS=$4
0013 
0014 #Go to HGCalValidation macro directory
0015 #cd $CMSSW_BASE/src/Validation/HGCalValidation/macro
0016 
0017 
0018 #Create base directory and top directories
0019 
0020 #Check if base directory already exists
0021 if ! (-d ${VAL_VERS}_vs_${REF_VERS}) then
0022     echo "No base directory exist, so creating one.."
0023     mkdir ${VAL_VERS}_vs_${REF_VERS}
0024 endif
0025 
0026 cd ${VAL_VERS}_vs_${REF_VERS}
0027 
0028 
0029 if ("$VAL_FILE" =~ *"TTbar"*) then
0030     echo "Making TTbar Plots"
0031     set PUflag = ""
0032     #ttbar
0033     if ! (-d TTbar) then
0034         echo "No TTbar directory exist, so creating one.."
0035         mkdir TTbar    
0036     endif
0037     cd TTbar
0038     if("$VAL_FILE" =~ *"NoPU"*) then
0039         if ! (-d NoPU) then
0040             echo "No TTbar directory exist, so creating one.."
0041             mkdir NoPU
0042         endif
0043         set PUflag = "NoPU"
0044     endif
0045     if("$VAL_FILE" =~ *"PU140"*) then
0046         if ! (-d PU140) then
0047             echo "No TTbar directory exist, so creating one.."
0048             mkdir PU140
0049         endif
0050         set PUflag = "PU140"
0051     endif
0052     if("$VAL_FILE" =~ *"PU200"*) then
0053         if ! (-d PU200) then
0054             echo "No TTbar directory exist, so creating one.."
0055             mkdir PU200
0056         endif
0057         set PUflag = "PU200"
0058     endif
0059     echo "PU: " $PUflag
0060     cd ../../
0061     root -b -q 'PlotHGChitCalibration.C("'${VAL_FILE}'","'${REF_FILE}'","'${VAL_VERS}'", "'${REF_VERS}'")'
0062     if("$PUflag" =~ "NoPU") then
0063         mv *png ${VAL_VERS}_vs_${REF_VERS}/TTbar/NoPU/
0064     else if("$PUflag" =~ "PU140") then
0065         mv *png ${VAL_VERS}_vs_${REF_VERS}/TTbar/PU140/
0066     else
0067     mv *png ${VAL_VERS}_vs_${REF_VERS}/TTbar/PU200/
0068     endif
0069 endif
0070 
0071 if ("$VAL_FILE" =~ *"DoubleGamma"*) then
0072     echo " Making DoubleGamma Plots"
0073     set PUflag = ""
0074     #ttbar
0075     if ! (-d DoubleGamma) then
0076         echo "No DoubleGamma directory exist, so creating one.."
0077         mkdir DoubleGamma    
0078     endif
0079     cd DoubleGamma
0080     if("$VAL_FILE" =~ *"NoPU"*) then
0081         if ! (-d NoPU) then
0082             echo "No DoubleGamma directory exist, so creating one.."
0083             mkdir NoPU
0084         endif
0085         set PUflag = "NoPU"
0086     endif
0087     if("$VAL_FILE" =~ *"PU140"*) then
0088         if ! (-d PU140) then
0089             echo "No DoubleGamma directory exist, so creating one.."
0090             mkdir PU140
0091         endif
0092         set PUflag = "PU140"
0093     endif
0094     if("$VAL_FILE" =~ *"PU200"*) then
0095         if ! (-d PU200) then
0096             echo "No DoubleGamma directory exist, so creating one.."
0097             mkdir PU200
0098         endif
0099         set PUflag = "PU200"
0100     endif
0101     echo "PU: " $PUflag
0102     cd ../../
0103     root -b -q 'PlotHGChitCalibration.C("'${VAL_FILE}'","'${REF_FILE}'","'${VAL_VERS}'", "'${REF_VERS}'")'
0104     if("$PUflag" =~ "NoPU") then
0105         mv *png ${VAL_VERS}_vs_${REF_VERS}/DoubleGamma/NoPU/
0106     else if("$PUflag" =~ "PU140") then
0107         mv *png ${VAL_VERS}_vs_${REF_VERS}/DoubleGamma/PU140/
0108     else
0109     mv *png ${VAL_VERS}_vs_${REF_VERS}/DoubleGamma/PU200/
0110     endif
0111 endif
0112 
0113 if ("$VAL_FILE" =~ *"DoubleEle"*) then
0114     echo " Making DoubleEle Plots"
0115     set PUflag = ""
0116     #ttbar
0117     if ! (-d DoubleEle) then
0118         echo "No DoubleEle directory exist, so creating one.."
0119         mkdir DoubleEle    
0120     endif
0121     cd DoubleEle
0122     if("$VAL_FILE" =~ *"NoPU"*) then
0123         if ! (-d NoPU) then
0124             echo "No DoubleEle directory exist, so creating one.."
0125             mkdir NoPU
0126         endif
0127         set PUflag = "NoPU"
0128     endif
0129     if("$VAL_FILE" =~ *"PU140"*) then
0130         if ! (-d PU140) then
0131             echo "No DoubleEle directory exist, so creating one.."
0132             mkdir PU140
0133         endif
0134         set PUflag = "PU140"
0135     endif
0136     if("$VAL_FILE" =~ *"PU200"*) then
0137         if ! (-d PU200) then
0138             echo "No DoubleEle directory exist, so creating one.."
0139             mkdir PU200
0140         endif
0141         set PUflag = "PU200"
0142     endif
0143     echo "PU: " $PUflag
0144     cd ../../
0145     root -b -q 'PlotHGChitCalibration.C("'${VAL_FILE}'","'${REF_FILE}'","'${VAL_VERS}'", "'${REF_VERS}'")'
0146     if("$PUflag" =~ "NoPU") then
0147         mv *png ${VAL_VERS}_vs_${REF_VERS}/DoubleEle/NoPU/
0148     else if("$PUflag" =~ "PU140") then
0149         mv *png ${VAL_VERS}_vs_${REF_VERS}/DoubleEle/PU140/
0150     else
0151     mv *png ${VAL_VERS}_vs_${REF_VERS}/DoubleEle/PU200/
0152     endif
0153 endif
0154 
0155 if ("$VAL_FILE" =~ *"DoubleMu"*) then
0156     echo " Making DoubleMu Plots"
0157     set PUflag = ""
0158     #ttbar
0159     if ! (-d DoubleMu) then
0160         echo "No DoubleMu directory exist, so creating one.."
0161         mkdir DoubleMu    
0162     endif
0163     cd DoubleMu
0164     if("$VAL_FILE" =~ *"NoPU"*) then
0165         if ! (-d NoPU) then
0166             echo "No DoubleMu directory exist, so creating one.."
0167             mkdir NoPU
0168         endif
0169         set PUflag = "NoPU"
0170     endif
0171     if("$VAL_FILE" =~ *"PU140"*) then
0172         if ! (-d PU140) then
0173             echo "No DoubleMu directory exist, so creating one.."
0174             mkdir PU140
0175         endif
0176         set PUflag = "PU140"
0177     endif
0178     if("$VAL_FILE" =~ *"PU200"*) then
0179         if ! (-d PU200) then
0180             echo "No DoubleMu directory exist, so creating one.."
0181             mkdir PU200
0182         endif
0183         set PUflag = "PU200"
0184     endif
0185     echo "PU: " $PUflag
0186     cd ../../
0187     root -b -q 'PlotHGChitCalibration.C("'${VAL_FILE}'","'${REF_FILE}'","'${VAL_VERS}'", "'${REF_VERS}'")'
0188     if("$PUflag" =~ "NoPU") then
0189         mv *png ${VAL_VERS}_vs_${REF_VERS}/DoubleMu/NoPU/
0190     else if("$PUflag" =~ "PU140") then
0191         mv *png ${VAL_VERS}_vs_${REF_VERS}/DoubleMu/PU140/
0192     else
0193     mv *png ${VAL_VERS}_vs_${REF_VERS}/DoubleMu/PU200/
0194     endif
0195 endif