Compare LUTs Walkthrough
Introduction
The purpose of this tutorial is to provide an walkthrough showing how to compare SR and Pt LUTs that are used in describing the detector geometry in the CSC Track Finder. These comparisons are used to track changes in the LUTs from release to release of CMSSW.
Set Up Your Environment
First, set up your CMSSW_2_1_0_pre4 directory and your path to the CVS repository by typing the following commands into your home directory:
export SCRAM_ARCH=slc4_ia32_gcc345
. /raid/raid4/pg/app/cmssoft/cms/cmsset_default.sh
export CVSROOT=:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/CMSSW
scramv1 project CMSSW CMSSW_2_1_0_pre4
cd CMSSW_2_1_0_pre4/src
Now, you will need to set up your runtime environment. This command is different if you are working in C-shell or bash. Type the correct command from below while in your src directory:
eval `scramv1 runtime -sh`
(if you are using bash)
eval `scramv1 runtime -csh`
(if you are using C-shell)
Log into the CVS repository and check out the necessary packages by typing the following commands:
cvs login
(use the password "98passwd")
cvs co -r CMSSW_2_1_0_pre4 L1Trigger/CSCTrackFinder
You now have all the files necessary to generate LUTs for the CMSSW_2_1_0_pre4 release, so now you should compile and build the code using:
scramv1 b
Now, if you would like to compare the LUTs from CMSSW_2_1_0_pre4 with those from a previous release by reading them from a file, you will need to obtain the LUTs from that version. If you do not have them on hand, you will need to generate them using the makeLUT utility described here
You are prepared to begin comparing LUTs!
Comparing LUTs
In this section of the tutorial, you will actually compare the LUTs from CMSSW_2_1_0_pre4 with another set of your choosing
To do this, you need to move to the proper directory by typing:
cd L1Trigger/CSCTrackFinder/test
The config file that is used to run the compareLUT job is in this directory and is called "compareLUTs.cfg". This file has several options that are used to select the LUTs being compared and any specific properties of those LUTs. These options are the following:
- Station, SubSector, Endcap, and Sector - What station, sub-sector, endcap, and sector do you want to use? Note: if these values are set to -1 or the lines are commented out, all stations, sub-sector, endcaps, and sectors are looped through
- The following parameters must be set for each of the LUTs you would like to compare.
- ReadLUTs - Would you like to read the SR LUTs from a file? Note: It is required that at least one set of LUTs is generated dynamically (i.e. ReadLUTs = false). It is suggested that the first set of LUTs is always generated dynamically and the second set of LUT be changed as needed.
- ReadPtLUT - Would you like to read the Pt LUT from a file? Note: As with the SR LUTs, it is required that at least set is generated dynamically, and it is suggested that the first Pt LUT is always generated dynamically and the second is changed as needed.
- LUTPath - Logical file path for the LUTs to be from. If the LUTs are created dynamically, this parameter is not needed. However, if the LUTs are read from a file, and this line is omitted or commented out, the default location is
L1Trigger/CSCTrackFinder/LUTs
.
- Binary - Are the SR LUTs to be read from a file in Binary or ascii format? Note: If the LUTs are created dynamically, this parameter is not needed. However, if the LUTs are read from a file, and this line is omitted or commented out, the default value for this parameter is false, and therefore the program will look for ascii files.
- isTMB07 - Do you want to use the the 2007 version of the trigger motherboard firmware? Note: if the LUTs are to be read in from a file, this parameter is not needed. However, if the the LUTs are to be generated dynamically, and this line is omitted or commented out, the default value for this parameter is true.
- isBinary - Is the Pt LUT to be read from a file in Binary or ascii format? Note: If the LUT is created dynamically, this parameter is not needed. However, if the Pt LUT is read from a file, and this line is omitted or commented out, the default value for this parameter is false, and therefore the program will look for an ascii file.
- UseMiniLUTs - Do you want to use LUTs from mini LUT parameterization or from the standard method of creating LUTs. Note: if the LUTs are to be read in from a file, this parameter is not needed. However, if the the LUTs are to be generated dynamically, and this line is omitted or commented out, the default value for this parameter is false, and the LUTs will be generated using the standard method.
- lutName - Determines the name of the LUT that will be used on the axes. If this parameter is omitted or commented out, the axes will have no labels and will be more difficult to interpret.
- DeltaX_End_1_Sta_1, DeltaX_End_1_Sta_2, ... - Alignment correction in the X direction for each endcap/station combination. These parameters should be entered in centimeters. Note: This feature is not currently implemented into CMSSW_2_1_0_pre4.
- DeltaY_End_1_Sta_1, DeltaY_End_1_Sta_2, ... - Alignment correction in the Y direction for each endcap/station combination. These parameters should be entered in centimeters. Note: This feature is not currently implemented into CMSSW_2_1_0_pre4.
The default settings in the config file are somewhat outdated due to recent changes in the code used to generate LUTs. It is strongly suggested that you briefly look though the parameters to ensure that you are satisfied before running the job.
Once you have selected your desired options, you can finally run the LUT comparison routine using the following command into the command prompt prompt:
cmsRun compareLUTs.cfg
If this ran successfully, you will how have a file called LUT_compare.root
in your test directory. This files contains all the plots generated by this comparison program. There is a script that can be run in order to print these plots to files that can be viewed more easily. The script is run using the following commands.
mkdir compare
mkdir compare/Mismatch
mkdir compare/Data_Field_Vs_Address
root LUT_compare.root plotCompareLUT.C printPlots.C
You are now have now run the compare LUTs program in CMSSW_2_1_0_pre4!