2 #ifndef FIRMWARE_TkJetWord_h 3 #define FIRMWARE_TkJetWord_h 22 static constexpr
double MAX_Z0 = 30.;
58 typedef ap_ufixed<kPtSize, kPtMagSize, AP_TRN, AP_SAT>
pt_t;
61 typedef ap_int<kZ0Size>
z0_t;
62 typedef ap_uint<kNtSize>
nt_t;
63 typedef ap_uint<kXtSize>
nx_t;
96 ret.V =
tkJetWord()(TkJetBitLocations::kPtMSB, TkJetBitLocations::kPtLSB);
101 ret.V =
tkJetWord()(TkJetBitLocations::kGlbEtaMSB, TkJetBitLocations::kGlbEtaLSB);
106 ret.V =
tkJetWord()(TkJetBitLocations::kGlbPhiMSB, TkJetBitLocations::kGlbPhiLSB);
111 ret.V =
tkJetWord()(TkJetBitLocations::kZ0MSB, TkJetBitLocations::kZ0LSB);
116 ret.V =
tkJetWord()(TkJetBitLocations::kNtMSB, TkJetBitLocations::kNtLSB);
121 ret.V =
tkJetWord()(TkJetBitLocations::kXtMSB, TkJetBitLocations::kXtLSB);
126 ret.V =
tkJetWord()(TkJetBitLocations::kDispFlagMSB, TkJetBitLocations::kDispFlagLSB);
151 glbEtaWord(), TkJetBitWidths::kGlbEtaSize, (
MAX_ETA) / (1 << TkJetBitWidths::kGlbEtaSize));
160 int nt()
const {
return (ap_ufixed<kNtSize + 2, kNtSize>(
ntWord())).to_int(); }
161 int xt()
const {
return (ap_ufixed<kXtSize + 2, kXtSize>(
xtWord())).to_int(); }
179 unsigned int digitized_maximum = (1 << nBits) - 1;
180 if (
bits & (1 << (nBits - 1))) {
184 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
void setTkJetWord(pt_t pt, glbeta_t eta, glbphi_t phi, z0_t z0, nt_t nt, nx_t nx, dispflag_t dispflag, tkjetunassigned_t unassigned)
ap_ufixed< kPtSize, kPtMagSize, AP_TRN, AP_SAT > pt_t
ap_uint< kDispFlagSize > dispflag_t
ap_uint< TkJetBitWidths::kUnassignedSize > tkjetunassigned_t
ap_uint< TkJetBitWidths::kTkJetWordSize > tkjetword_t
tkjetword_t tkJetWord() const
dispflag_t dispFlagWord() const
static constexpr double MAX_Z0
TkJetWord & operator=(const TkJetWord &word)
Abs< T >::type abs(const T &t)
tkjetword_bs_t tkJetWord_
glbeta_t glbEtaWord() const
unsigned int glbPhiBits() const
unsigned int dispFlagBits() const
unsigned int glbEtaBits() const
unsigned int ntBits() const
unsigned int unassignedBits() const
unsigned int unassigned() const
glbphi_t glbPhiWord() const
static constexpr double MAX_ETA
std::bitset< TkJetBitWidths::kTkJetWordSize > tkjetword_bs_t
const unsigned int kUnassignedSize
TkJetWord(const TkJetWord &word)
tkjetunassigned_t unassignedWord() const
unsigned int ptBits() const