Back to home page

Project CMSSW displayed by LXR

 
 

    


Warning, /L1Trigger/L1TMuonEndCap/test/unpacker.md is written in an unsupported language. File is not indexed.

0001 # Info about EMTF Unpacker
0002 
0003 Original author: Andrew Brinkerhoff <andrew.wilson.brinkerhoff@cern.ch>
0004 
0005 Last edit: September 11, 2017
0006 
0007 
0008 ## Documentation
0009 
0010 * AMC13 DAQ Facilities (`AMC13_DAQ`)
0011   - docs/UpdatedDAQPath_2015-09-30.pdf
0012   - Contains the description of AMC13 and MTF7 header and trailer words
0013 * CMS Muon Endcap Track Finder DAQ readout format (`EMTF_DAQ`)
0014   - docs/EMU_TF_DAQ_format_2017_03_17.docx
0015   - Contains the description of the EMTF MTF7 payload
0016 * EMTF track address format for uGMT output
0017   - docs/emtf-gmt-output.docx
0018   - Contains description of EMTF information transmitted to uGMT
0019   - Encoded in RegionalMuonCand class in software
0020 * Interface between track finders and uGMT for the upgraded 2016 trigger
0021   - docs/DN2015_017_v3.pdf
0022   - Contains description of pT, eta, phi, etc. scales and conventions between EMTF and uGMT
0023 
0024 ##  General description of algorithm
0025 
0026 * Run inside L1Trigger/L1TMuonEndCap using the command: `cmsRun RunTrackFinder_data.py`
0027 * Unpacking code is all located inside EventFilter/L1TRawToDigi
0028 * EMTF data is unpacked into classes defined in DataFormats/L1TMuon
0029 * EMTF-specific modules in EventFilter/L1TRawToDigi/plugins/implementations_stage2
0030 * Order of EMTF unpacking:
0031 
0032 ```
0033    #  File                     <--->  Output class   <--->   Documentation
0034    ----------------------------------------------
0035    0  EMTFBlockHeaders.cc      <--->  AMC13Header    <--->   AMC13_DAQ page 4/7, lines  1 -  2, 2 64-bit words
0036    1  EMTFBlockHeaders.cc      <--->  AMC13Header    <--->   AMC13_DAQ page 4/7, lines  3 -  6, 1 64-bit word per input MTF7
0037       *** Loop over each input MTF7: ***
0038    2     EMTFBlockHeaders.cc   <--->  MTF7Header     <--->   AMC13_DAQ page 3/7, lines  1 -  2, 2 64-bit words
0039    3     EMTFBlockHeaders.cc   <--->  EventHeader    <--->   EMTF_DAQ  page 2/9, lines  1 - 12, 3 64-bit words (if MTF7 has tracks)
0040    4     EMTFBlockCounters.cc  <--->  Counters       <--->   EMTF_DAQ  page 3/9, lines  1 -  4, 1 64-bit word  (if MTF7 has tracks)
0041    5        EMTFBlockME.cc     <--->  ME, EMTFHit    <--->   EMTF_DAQ  page 4/9, lines  1 -  4, 1 64-bit words per CSC track
0042    6        EMTFBlockRPC.cc    <--->  RPC, EMTFHit   <--->   EMTF_DAQ  page 6/9, lines  1 -  4, 1 64-bit words per RPC track
0043    7        EMTFBlockSP.cc     <--->  SP, EMTFTrack  <--->   EMTF_DAQ  page 6/9, lines  1 -  8, 2 64-bit words per output track
0044                                       RegionalMuonCand
0045    8     EMTFBlockTrailers.cc  <--->  EventTrailer   <--->   EMTF_DAQ  page 8/9, lines  1 -  8, 2 64-bit words (if MTF7 has tracks)
0046    9     EMTFBlockTrailers.cc  <--->  MTF7Trailer    <--->   AMC13_DAQ page 3/7, line        4, 1 64-bit word
0047   10  EMTFBlockTrailers.cc     <--->  AMC13Header    <--->   AMC13_DAQ page 4/7, line       11, 1 64-bit word
0048   11  EMTFBlockTrailers.cc     <--->  AMC13Header    <--->   AMC13_DAQ page 4/7, line       12, 1 64-bit word
0049 ```
0050 
0051 ##  Bitwise operators
0052 * "Word >> X" returns "Word" shifted right by X binary bits (X/4 hex bits). Thus when you read a bit out of "Word", 
0053   instead of reading bit Y you will read bit Y-X.
0054 * "Word << X" returns "Word" shifted left by X binary bits (X/4 hex bits). This is basically multiplication by 2^X.
0055   Thus, if I say Y = 0x00f << 8, it is equivalent to Y = 0xf00.
0056 * "& 0xff" reads the right-most 8 binary bits (2 hex bits), "& 0xf" the right-most 4, "& 0x7" the right-most 3, 
0057   "& 0x3" the right-most 2, and "& 0x1" the right-most 1 (i.e. bit 0)
0058 * Similarly, "& 0x2" reads bit 1, "& 0x4" bit 2, "0x8" bit 3, "0x10" bit 4, "0x20" bit 5, "0x40" bit 6, "0x80" bit 7,
0059   "0x100" bit 8, "0x200" bit 9, "0x400" bit 10, "0x800" bit 11, "0x1000" bit 12, "0x2000" bit 13, "0x4000" bit 14, and "0x8000" bit 15
0060 * "|=" is the bitwise "OR" assignment. As used here (to concatenate words), it is basically addition, since the 
0061   things being "OR-ed" do not have contents in the same bits.