Skip to content

Commit

Permalink
Fix TkJetWord.h and VertexWord.h ptBits() and z0Bits() implementation…
Browse files Browse the repository at this point in the history
…s, avoid truncating float bits from ap_(u)fixed
  • Loading branch information
Nick Manganelli committed Mar 7, 2024
1 parent a6288ad commit 6d0e7a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DataFormats/L1Trigger/interface/TkJetWord.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ namespace l1t {

// These functions return the packed bits in integer format for each quantity
// Signed quantities have the sign enconded in the left-most bit.
unsigned int ptBits() const { return ptWord().to_uint(); }
unsigned int ptBits() const { return ptWord().range().to_uint(); }
unsigned int glbEtaBits() const { return glbEtaWord().to_uint(); }
unsigned int glbPhiBits() const { return glbPhiWord().to_uint(); }
unsigned int z0Bits() const { return z0Word().to_uint(); }
unsigned int z0Bits() const { return z0Word().range().to_uint(); }
unsigned int ntBits() const { return ntWord().to_uint(); }
unsigned int xtBits() const { return xtWord().to_uint(); }
unsigned int dispFlagBits() const { return dispFlagWord().to_uint(); }
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/L1Trigger/interface/VertexWord.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ namespace l1t {
// These functions return the packed bits in integer format for each quantity
// Signed quantities have the sign enconded in the left-most bit.
unsigned int validBits() const { return validWord().to_uint(); }
unsigned int z0Bits() const { return z0Word().to_uint(); }
unsigned int z0Bits() const { return z0Word().range().to_uint(); }
unsigned int multiplicityBits() const { return multiplicityWord().to_uint(); }
unsigned int ptBits() const { return ptWord().to_uint(); }
unsigned int ptBits() const { return ptWord().range().to_uint(); }
unsigned int qualityBits() const { return qualityWord().to_uint(); }
unsigned int inverseMultiplicityBits() const { return inverseMultiplicityWord().to_uint(); }
unsigned int unassignedBits() const { return unassignedWord().to_uint(); }
Expand Down

0 comments on commit 6d0e7a1

Please sign in to comment.