Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-15 23:40:49

0001 #!/bin/tcsh
0002 ########################################################################
0003 # Create L1 track histograms & print summary of tracking performance,  #
0004 # by running ROOT macros L1TrackNtuplePlot.C & L1TrackQualityPlot.C    #
0005 # on the .root file from L1TrackNtupleMaker_cfg.py .                   # #                                                                      #
0006 #                                                                      #
0007 # To use:                                                              #
0008 #   makeHists.csh  rootFileName                                        #
0009 #                                                                      #
0010 # (where rootFileName is the name of the input .root file,             #
0011 #  including its directory name, if its not in the current one.        #
0012 #  If rootFileName not specified, it defaults to TTbar_PU200_D76.root) #
0013 ########################################################################
0014 
0015 if ($#argv == 0) then
0016   set inputFullFileName = "L1TrkNtuple.root"
0017 else
0018   set inputFullFileName = $1
0019 endif
0020 
0021 if ( -e $inputFullFileName) then
0022   echo "Processing $inputFullFileName"
0023 else
0024   echo "ERROR: Input file $inputFullFileName not found"
0025   exit(1)
0026 endif
0027 
0028 # Get directory name
0029 set dirName = `dirname $inputFullFileName`/
0030 # Get file name without directory name
0031 set fileName = `basename $inputFullFileName`
0032 # Get stem of filename, removing ".root".
0033 set inputFileStem = `echo $fileName | awk -F . '{print $1;}'`
0034 
0035 eval `scramv1 runtime -csh`
0036 
0037 # Run track quality MVA plotting macro
0038 set plotMacro = $CMSSW_BASE/src/L1Trigger/TrackFindingTracklet/test/L1TrackQualityPlot.C
0039 if (-e MVA_plots) rm -r MVA_plots
0040 \root -b -q ${plotMacro}'("'${inputFileStem}'","'${dirName}'")' 
0041 echo "MVA track quality Histograms written to MVA_plots/"  
0042 
0043 # Run track performance plotting macro
0044 set plotMacro = $CMSSW_BASE/src/L1Trigger/TrackFindingTracklet/test/L1TrackNtuplePlot.C
0045 if (-e TrkPlots) rm -r TrkPlots
0046 \root -b -q ${plotMacro}'("'${inputFileStem}'","'${dirName}'")' | tail -n 26 >! results.out 
0047 cat results.out
0048 echo "Tracking performance summary written to results.out"
0049 echo "Track performance histograms written to TrkPlots/"  
0050 
0051 exit