Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:24:17

0001 #!/bin/sh 
0002 
0003 echo "This script produces all the histograms and plots..."
0004 echo -e "Enter the REFERNCE.root file, the NEW.root file, the directory name/histogram title and the normalization ([REFERNCE.root] [NEW.root] [title] [normalization]): "
0005 read reference new title norm
0006 
0007 if [ -n "$reference" ]; then
0008     if [ -n "$new" ]; then
0009         if [ -n "$title" ]; then 
0010             echo "processing "$reference" and "$new"."
0011         else 
0012             echo "Input not correct!!"
0013         fi
0014     else 
0015         echo "Input not correct!!"
0016     fi
0017 else
0018     echo "Input not correct!!"
0019 fi
0020 
0021 if [ -n $title ]; then
0022     if [ -e $reference ]; then
0023         if [ -e $new ]; then
0024 
0025             TAG=(CaloJetTask_iterativeCone5CaloJets PFJetTask_iterativeCone5PFJets CaloJetTask_kt4CaloJets CaloJetTask_kt6CaloJets CaloJetTask_sisCone5CaloJets CaloJetTask_sisCone7CaloJets)
0026 
0027             FOLDER=(ic5Calo ic5PFlow kt4Calo kt6Calo sc5Calo sc7Calo)
0028 
0029             ntag=${#TAG[@]}
0030             echo "Number of module tags: " $ntag
0031             for (( i=0;i<$ntag;i++ )); do
0032                 echo "tag: " ${TAG[${i}]}
0033 
0034                 mkdir $title
0035                 mkdir $title/${FOLDER[${i}]}
0036                 #mkdir $title/${FOLDER[${i}]}/NewData
0037                 #mkdir $title/${FOLDER[${i}]}/RefData       
0038                 echo "folders are created"
0039 
0040                 if [ -z $norm ]; then
0041                 ../../../../test/slc4_ia32_gcc345/compareHists $new $reference ${TAG[${i}]} $title
0042                 fi
0043 
0044                 if [ $norm = "y" ]; then
0045                 ../../../../test/slc4_ia32_gcc345/compareHists $new $reference ${TAG[${i}]} $title y
0046                 fi
0047                 
0048                 bash $CMSSW_BASE/src/Validation/RecoJets/analysis/make_thumbnails.sh *.gif
0049                 mv *.gif $title/${FOLDER[${i}]}
0050                 mv *.jpg $title/${FOLDER[${i}]}
0051                 cp html/spacer.gif $title/${FOLDER[${i}]}
0052 
0053                 cp html/CaloJets.html $title/${FOLDER[${i}]}
0054                 cp html/PFJets.html $title/${FOLDER[${i}]}
0055                 
0056                 #echo "\n\n-->> NewData!\n\n"
0057                 #../../../../test/slc4_ia32_gcc345/fixed_plotHists $new ${TAG[${i}]}
0058                 #mv *.gif $title/${FOLDER[${i}]}/NewData
0059 
0060                 #echo "\n\n-->> RefData!\n\n"
0061                 #../../../../test/slc4_ia32_gcc345/fixed_plotHists $reference ${TAG[${i}]}
0062                 #mv *.gif $title/${FOLDER[${i}]}/RefData
0063                 
0064             done
0065             
0066         else
0067             echo $new "not found!"
0068         fi
0069     else
0070         echo $refernce "not found!"
0071     fi
0072     
0073 else
0074     echo "Enter a title!"
0075 fi
0076 
0077 if [ -d $title ]; then
0078     cp html/index.html $title
0079     cp $new       $title/new.root
0080     cp $reference $title/ref.root
0081 else
0082     echo ".html files not copied!"
0083 fi