Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-06-22 02:23:37

0001 #ifndef L1ScoutingRawToDigi_masks_h
0002 #define L1ScoutingRawToDigi_masks_h
0003 
0004 #include <cstdint>
0005 #include "shifts.h"
0006 
0007 namespace l1ScoutingRun3 {
0008 
0009   namespace ugmt {
0010     struct masksMuon {
0011       // bx word: 16 bits used for actual bx, MS 4 bits are muon type
0012       // 0xf intermediate,
0013       // 0x0 final
0014       // following 4 bits for link id
0015       static constexpr uint32_t bx = 0x1fff;
0016       static constexpr uint32_t interm = 0x0001;
0017       //masks for muon 64 bits
0018       static constexpr uint32_t phiext = 0x03ff;
0019       static constexpr uint32_t pt = 0x01ff;
0020       static constexpr uint32_t ptuncon = 0x00ff;  // 8 bits
0021       static constexpr uint32_t qual = 0x000f;
0022       static constexpr uint32_t etaext = 0x01ff;
0023       static constexpr uint32_t etaextv = 0x00ff;
0024       static constexpr uint32_t etaexts = 0x0100;
0025       static constexpr uint32_t iso = 0x0003;
0026       static constexpr uint32_t chrg = 0x0001;
0027       static constexpr uint32_t chrgv = 0x0001;
0028       static constexpr uint32_t index = 0x007f;
0029       static constexpr uint32_t phi = 0x03ff;
0030       static constexpr uint32_t eta = 0x01ff;
0031       static constexpr uint32_t etav = 0x00ff;
0032       static constexpr uint32_t etas = 0x0100;
0033       static constexpr uint32_t dxy = 0x0003;
0034     };
0035   }  // namespace ugmt
0036 
0037   namespace demux {
0038 
0039     struct masksJet {
0040       static constexpr uint32_t ET = 0x07ff;
0041       static constexpr uint32_t eta = 0x00ff;
0042       static constexpr uint32_t phi = 0x00ff;
0043       static constexpr uint32_t disp = 0x0001;
0044       static constexpr uint32_t qual = 0x0003;
0045     };
0046 
0047     struct masksEGamma {
0048       static constexpr uint32_t ET = 0x01ff;
0049       static constexpr uint32_t eta = 0x00ff;
0050       static constexpr uint32_t phi = 0x00ff;
0051       static constexpr uint32_t iso = 0x0003;
0052     };
0053 
0054     struct masksTau {
0055       static constexpr uint32_t ET = 0x01ff;
0056       static constexpr uint32_t eta = 0x00ff;
0057       static constexpr uint32_t phi = 0x00ff;
0058       static constexpr uint32_t iso = 0x0003;
0059     };
0060 
0061     struct masksESums {
0062       static constexpr uint32_t ETEt = 0x0fff;  // Et of ET object
0063       static constexpr uint32_t ETEttem = 0x0fff;
0064       static constexpr uint32_t ETMinBiasHF = 0x000f;
0065 
0066       static constexpr uint32_t HTEt = 0x0fff;  // Et of HT object
0067       static constexpr uint32_t HTtowerCount = 0x1fff;
0068       static constexpr uint32_t HTMinBiasHF = 0x000f;
0069 
0070       static constexpr uint32_t ETmissEt = 0x0fff;
0071       static constexpr uint32_t ETmissPhi = 0x00ff;
0072       static constexpr uint32_t ETmissASYMET = 0x00ff;
0073       static constexpr uint32_t ETmissMinBiasHF = 0x000f;
0074 
0075       static constexpr uint32_t HTmissEt = 0x0fff;
0076       static constexpr uint32_t HTmissPhi = 0x00ff;
0077       static constexpr uint32_t HTmissASYMHT = 0x00ff;
0078       static constexpr uint32_t HTmissMinBiasHF = 0x000f;
0079 
0080       static constexpr uint32_t ETHFmissEt = 0x0fff;
0081       static constexpr uint32_t ETHFmissPhi = 0x00ff;
0082       static constexpr uint32_t ETHFmissASYMETHF = 0x00ff;
0083       static constexpr uint32_t ETHFmissCENT = 0x0003;
0084 
0085       static constexpr uint32_t HTHFmissEt = 0x0fff;
0086       static constexpr uint32_t HTHFmissPhi = 0x00ff;
0087       static constexpr uint32_t HTHFmissASYMHTHF = 0x00ff;
0088       static constexpr uint32_t HTHFmissCENT = 0x0003;
0089     };
0090   }  // namespace demux
0091 
0092   namespace bmtf {
0093     struct masksStubs {
0094       static constexpr uint64_t valid = 0x0001;
0095       static constexpr uint64_t phi = 0x0fff;
0096       static constexpr uint64_t phiB = 0x03ff;
0097       static constexpr uint64_t qual = 0x0007;
0098       static constexpr uint64_t eta = 0x007f;
0099       static constexpr uint64_t qeta = 0x007f;
0100       static constexpr uint64_t station = 0x0003;
0101       static constexpr uint64_t wheel = 0x0007;
0102       static constexpr uint64_t reserved = 0x0007;
0103       static constexpr uint64_t bx = 0xffff;
0104     };
0105   }  // namespace bmtf
0106 
0107   struct header_masks {
0108     static constexpr uint32_t bxmatch = 0x00ff << header_shifts::bxmatch;
0109     static constexpr uint32_t mAcount = 0x000f << header_shifts::mAcount;
0110     static constexpr uint32_t orbitmatch = 0x00ff << header_shifts::orbitmatch;
0111     static constexpr uint32_t warningTestEnabled = 0x0001 << header_shifts::warningTestEnabled;
0112     static constexpr uint32_t mBcount = 0x000f << header_shifts::mBcount;
0113     static constexpr uint32_t sBmtfCount = 0x000f << header_shifts::sBmtfCount;
0114   };
0115 
0116 }  // namespace l1ScoutingRun3
0117 #endif  // L1ScoutingRawToDigi_masks_h