1 #ifndef FIRMWARE_TkJetWord_h 2 #define FIRMWARE_TkJetWord_h 54 typedef ap_ufixed<kPtSize, kPtMagSize, AP_TRN, AP_SAT>
pt_t;
57 typedef ap_int<kZ0Size>
z0_t;
58 typedef ap_uint<kNtSize>
nt_t;
59 typedef ap_uint<kXtSize>
nx_t;
84 ret.V =
tkJetWord()(TkJetBitLocations::kPtMSB, TkJetBitLocations::kPtLSB);
89 ret.V =
tkJetWord()(TkJetBitLocations::kGlbEtaMSB, TkJetBitLocations::kGlbEtaLSB);
94 ret.V =
tkJetWord()(TkJetBitLocations::kGlbPhiMSB, TkJetBitLocations::kGlbPhiLSB);
99 ret.V =
tkJetWord()(TkJetBitLocations::kZ0MSB, TkJetBitLocations::kZ0LSB);
104 ret.V =
tkJetWord()(TkJetBitLocations::kNtMSB, TkJetBitLocations::kNtLSB);
109 ret.V =
tkJetWord()(TkJetBitLocations::kXtMSB, TkJetBitLocations::kXtLSB);
133 int nt()
const {
return (ap_ufixed<kNtSize + 2, kNtSize>(
ntWord())).to_int(); }
134 int xt()
const {
return (ap_ufixed<kXtSize + 2, kXtSize>(
xtWord())).to_int(); }
144 unsigned int digitized_maximum = (1 << nBits) - 1;
145 if (
bits & (1 << (nBits - 1))) {
149 return (
double(
bits & digitized_maximum) + 0.5) *
lsb * isign;
unsigned int xtBits() const
std::vector< l1t::TkJetWord > TkJetWordCollection
unsigned int z0Bits() const
ap_int< kGlbEtaSize > glbeta_t
double unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const
ret
prodAgent to be discontinued
ap_int< kGlbPhiSize > glbphi_t
ap_ufixed< kPtSize, kPtMagSize, AP_TRN, AP_SAT > pt_t
ap_uint< TkJetBitWidths::kUnassignedSize > tkjetunassigned_t
ap_uint< TkJetBitWidths::kTkJetWordSize > tkjetword_t
tkjetword_t tkJetWord() const
TkJetWord & operator=(const TkJetWord &word)
tkjetword_bs_t tkJetWord_
glbeta_t glbEtaWord() const
unsigned int glbPhiBits() const
unsigned int glbEtaBits() const
unsigned int ntBits() const
unsigned int unassignedBits() const
unsigned int unassigned() const
glbphi_t glbPhiWord() const
std::bitset< TkJetBitWidths::kTkJetWordSize > tkjetword_bs_t
const unsigned int kUnassignedSize
TkJetWord(const TkJetWord &word)
tkjetunassigned_t unassignedWord() const
void setTkJetWord(pt_t pt, glbeta_t eta, glbphi_t phi, z0_t z0, nt_t nt, nx_t nx, tkjetunassigned_t unassigned)
unsigned int ptBits() const