Warning, /L1Trigger/L1TMuonEndCap/test/primconv.md is written in an unsupported language. File is not indexed.
0001 # Primitive Conversion Look-Up Table generation
0002
0003 Original author: Andrew Brinkerhoff <andrew.wilson.brinkerhoff@cern.ch>
0004
0005 Last edit: October 1, 2018
0006
0007
0008 "PC" (primitive conversion) LUTs are responsible for converting the CSC LCT strip and wire info into phi and theta coordinates.
0009 New PC LUTs can be generated for data (using the CMS geometry with real alignment) or MC as follows
0010 The latest Global Tags can be found at: <https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideFrontierConditions>
0011
0012 ## Instructions
0013
0014 ``` bash
0015 cd CMSSW_X_Y_Z/src
0016 cmsenv
0017 cd L1Trigger/L1TMuonEndCap/test/tools/
0018 mkdir -p pc_luts/firmware_data ## To store the 924 actual LUTs needed by the firmware
0019 mkdir pc_luts/firmware_MC ## These files are then simplified into 6 text files used by the emulator
0020 cmsRun make_coordlut_data.py ## To create 924 LUTs from real CMSSW geometry, specified by process.GlobalTag
0021 cmsRun make_coordlut_MC.py ## Instead uses ideal CMS geometry / alignment from MC
0022 python write_ph_lut_v2.py ## Modify 'path' in file to specify data or MC
0023 ```
0024
0025 The 6 text files for the emulator will appear in pc_luts/emulator_data or pc_luts/emulator_MC.
0026 These can be copied over to the L1Trigger/L1TMuon/data/emtf_luts directory as follows:
0027
0028 ``` bash
0029 cd CMSSW_X_Y_Z/src
0030 git cms-addpkg L1Trigger/L1TMuon
0031 git clone https://github.com/cms-l1t-offline/L1Trigger-L1TMuon.git L1Trigger/L1TMuon/data
0032 mkdir L1Trigger/L1TMuon/data/emtf_luts/ph_lut_new
0033 cp L1Trigger/L1TMuonEndCap/test/tools/pc_luts/emulator_data/* L1Trigger/L1TMuon/data/emtf_luts/ph_lut_new/
0034 ```
0035
0036 The new path can then be added to L1Trigger/L1TMuonEndCap/src/SectorProcessorLUT.cc in the lines containing "ph_lut"
0037
0038 To validate that the coordinate transformation worked properly, you can do the following:
0039
0040 ``` bash
0041 cd L1Trigger/L1TMuonEndCap/test/tools/
0042 root -l pc_luts/firmware_data/validate.root
0043
0044 ## EMTF emulator vs. CMS simulation phi or theta coordinate
0045 root [0] tree->Draw("fph_emu - fph_sim : fph_sim >> dPh_vs_phi(360,-180,180,80,-0.5,0.5)","","colz")
0046 root [1] tree->Draw("fth_emu - fth_sim : fph_sim >> dTh_vs_phi(360,-180,180,80,-1.0,1.0)","","colz")
0047 ## Look at a specific region, e.g. ME+1/1a
0048 root [2] tree->Draw("fph_emu - fph_sim : fph_sim >> dPh_vs_phi(360,-180,180,80,-0.5,0.5)","(endcap == 1 && station == 1 && ring == 4)","colz")
0049 ```
0050