39 | ((segSel & 0x1) << 2);
41 | ((segSel & 0x2) << 3);
43 | ((segSel & 0x4) << 2);
45 | ((segSel & 0x8) << 1);
71 std::map<int, int> trackAddr;
72 trackAddr[0] = rawTrackAddress;
83 fillRegionalMuonCand(mu, (uint32_t)(dataword & 0xFFFFFFFF), (uint32_t)((dataword >> 32) & 0xFFFFFFFF), proc, tf);
89 int abs_eta = mu.
hwEta();
91 abs_eta += (1 << (etaSignShift_ - absEtaShift_));
93 int abs_phi = mu.
hwPhi();
95 abs_phi += (1 << (phiSignShift_ - absPhiShift_));
97 raw_data_00_31 = (mu.
hwPt() & ptMask_) << ptShift_
98 | (mu.
hwQual() & qualMask_) << qualShift_
99 | (abs_eta & absEtaMask_) << absEtaShift_
100 | (mu.
hwEta() < 0) << etaSignShift_
101 | (mu.
hwHF() & hfMask_) << hfShift_
102 | (abs_phi & absPhiMask_) << absPhiShift_
103 | (mu.
hwPhi() < 0) << phiSignShift_;
123 rawTrkAddr = (segSel & bmtfTrAddrSegSelMask_) << bmtfTrAddrSegSelShift_
124 | (detSide & 0x1) << bmtfTrAddrDetSideShift_
125 | (wheelNum & bmtfTrAddrWheelMask_) << bmtfTrAddrWheelShift_
126 | (stat1 & bmtfTrAddrStat1Mask_) << bmtfTrAddrStat1Shift_
127 | (stat2 & bmtfTrAddrStat2Mask_) << bmtfTrAddrStat2Shift_
128 | (stat3 & bmtfTrAddrStat3Mask_) << bmtfTrAddrStat3Shift_
129 | (stat4 & bmtfTrAddrStat4Mask_) << bmtfTrAddrStat4Shift_;
158 raw_data_32_63 = mu.
hwSign() << signShift_
160 | (rawTrkAddr & trackAddressMask_) << trackAddressShift_;
169 generatePackedDataWords(mu, lsw, msw);
170 return (((
uint64_t)msw) << 32) + lsw;
static const unsigned emtfTrAddrMe1Shift_
static const unsigned bmtfTrAddrStat2Mask_
static const unsigned absPhiMask_
void setHwPhi(int bits)
Set compressed relative phi as transmitted by hardware LSB = 2*pi/576 (8 bits)
static const unsigned qualMask_
static const unsigned emtfTrAddrMe2Shift_
static const unsigned qualShift_
const int hwSignValid() const
Get charge sign valid bit (0 - not valid (high pT muon); 1 - valid)
static const unsigned emtfTrAddrSectIdShift_
static void generatePackedDataWords(const RegionalMuonCand &, uint32_t &, uint32_t &)
TrainProcessor *const proc
static const unsigned bmtfTrAddrSegSelShift_
static const unsigned absEtaShift_
static const unsigned bmtfTrAddrWheelShift_
static const unsigned signShift_
static const unsigned emtfTrAddrMe4OrderShift_
static const unsigned ptMask_
void setTrackAddress(const std::map< int, int > &address)
Set the whole track address.
static const unsigned bmtfTrAddrStat1Mask_
static const unsigned bmtfTrAddrStat4Mask_
static const unsigned bmtfTrAddrStat3Mask_
static const unsigned absPhiShift_
static const unsigned absEtaMask_
static const unsigned emtfTrAddrMe3OrderShift_
const int hwQual() const
Get quality code.
static const unsigned emtfTrAddrMe3SubSecIdShift_
static const unsigned emtfTrAddrMe1SubSecIdShift_
static const unsigned bmtfTrAddrStat1Shift_
static const unsigned trackAddressMask_
static const unsigned ptShift_
static const unsigned emtfTrAddrMe3Shift_
void setTFIdentifiers(int processor, tftype trackFinder)
Set the processor ID, track-finder type. From these two, the link is set.
static const unsigned bmtfTrAddrSegSelMask_
static const unsigned etaSignShift_
static const unsigned emtfTrAddrMe3Mask_
void setTrackSubAddress(bmtfAddress subAddress, int value)
Set a part of the muon candidates track address; specialised for BMTF.
static const unsigned emtfTrAddrMe1OrderShift_
const int hwHF() const
Get HF (halo / fine eta) bit (EMTF: halo -> 1; BMTF: fine eta -> 1)
static const unsigned bmtfTrAddrWheelMask_
void setDataword(uint32_t msbs, uint32_t lsbs)
void setHwHF(bool bit)
Set HF (halo / fine eta) bit (EMTF: halo -> 1; BMTF: fine eta -> 1)
static const unsigned emtfTrAddrMe4Shift_
const int hwEta() const
Get compressed eta (returned int * 0.010875 = eta)
const std::map< int, int > & trackAddress() const
Get the track address (identifies track primitives used for reconstruction)
static const unsigned emtfTrAddrMe2SubSecIdShift_
static const unsigned bmtfTrAddrStat4Shift_
const int hwPhi() const
Get compressed local phi (returned int * 2*pi/576 = local phi in rad)
const tftype trackFinderType() const
Get track-finder which found the muon (bmtf, emtf_pos/emtf_neg or omtf_pos/omtf_neg) ...
void setHwQual(int bits)
Set compressed quality code as transmitted by hardware (4 bits)
void setHwPt(int bits)
Set compressed pT as transmitted by hardware LSB = 0.5 (9 bits)
static const unsigned phiSignShift_
void setHwEta(int bits)
Set compressed eta as transmitted by hardware LSB = 0.010875 (9 bits)
static const unsigned signValidShift_
unsigned long long uint64_t
static void fillRegionalMuonCand(RegionalMuonCand &, uint32_t, uint32_t, int, tftype)
static uint64_t generate64bitDataWord(const RegionalMuonCand &)
static const unsigned bmtfTrAddrDetSideShift_
int trackSubAddress(bmtfAddress subAddress) const
Get part of track address (identifies track primitives used for reconstruction)
const int hwPt() const
Get compressed pT (returned int * 0.5 = pT (GeV))
static const unsigned emtfTrAddrMe2Mask_
static const unsigned emtfTrAddrSectIdMask_
static const unsigned hfMask_
const int hwSign() const
Get charge sign bit (charge = (-1)^(sign))
static const unsigned hfShift_
static const unsigned emtfTrAddrMe4SubSecIdShift_
void setHwSignValid(int bits)
Set whether charge measurement is valid (0 for high pT muons)
static const unsigned emtfTrAddrMe4Mask_
static const unsigned emtfTrAddrMe2OrderShift_
static const unsigned bmtfTrAddrStat2Shift_
static const unsigned trackAddressShift_
static const unsigned bmtfTrAddrStat3Shift_
void setHwSign(int bits)
Set charge sign bit (charge = (-1)^(sign))
static const unsigned emtfTrAddrMe1Mask_