CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
l1t::VertexWord Class Reference

#include <VertexWord.h>

Public Types

enum  VertexBitLocations {
  kValidLSB = 0, kValidMSB = kValidLSB + VertexBitWidths::kValidSize - 1, kZ0LSB = kValidMSB + 1, kZ0MSB = kZ0LSB + VertexBitWidths::kZ0Size - 1,
  kNTrackInPVLSB = kZ0MSB + 1, kNTrackInPVMSB = kNTrackInPVLSB + VertexBitWidths::kNTrackInPVSize - 1, kSumPtLSB = kNTrackInPVMSB + 1, kSumPtMSB = kSumPtLSB + VertexBitWidths::kSumPtSize - 1,
  kQualityLSB = kSumPtMSB + 1, kQualityMSB = kQualityLSB + VertexBitWidths::kQualitySize - 1, kNTrackOutPVLSB = kQualityMSB + 1, kNTrackOutPVMSB = kNTrackOutPVLSB + VertexBitWidths::kNTrackOutPVSize - 1,
  kUnassignedLSB = kNTrackOutPVMSB + 1, kUnassignedMSB = kUnassignedLSB + VertexBitWidths::kUnassignedSize - 1
}
 
enum  VertexBitWidths {
  kValidSize = 1, kZ0Size = 15, kZ0MagSize = 6, kNTrackInPVSize = 8,
  kSumPtSize = 10, kSumPtMagSize = 8, kQualitySize = 3, kNTrackOutPVSize = 10,
  kUnassignedSize = 17, kVertexWordSize
}
 
typedef edm::Ref< l1t::VertexCollectionVertexRef
 
typedef ap_ufixed< VertexBitWidths::kNTrackOutPVSize, VertexBitWidths::kNTrackOutPVSize, AP_RND_CONV, AP_SAT > vtxinversemult_t
 
typedef ap_ufixed< VertexBitWidths::kNTrackInPVSize, VertexBitWidths::kNTrackInPVSize, AP_RND_CONV, AP_SAT > vtxmultiplicity_t
 
typedef ap_uint< VertexBitWidths::kQualitySize > vtxquality_t
 
typedef ap_ufixed< VertexBitWidths::kSumPtSize, VertexBitWidths::kSumPtMagSize, AP_RND_CONV, AP_SAT > vtxsumpt_t
 
typedef ap_uint< VertexBitWidths::kUnassignedSize > vtxunassigned_t
 
typedef ap_uint< VertexBitWidths::kValidSize > vtxvalid_t
 
typedef std::bitset< VertexBitWidths::kVertexWordSize > vtxword_bs_t
 
typedef ap_uint< VertexBitWidths::kVertexWordSize > vtxword_t
 
typedef ap_fixed< VertexBitWidths::kZ0Size, VertexBitWidths::kZ0MagSize, AP_RND_CONV, AP_SAT > vtxz0_t
 

Public Member Functions

unsigned int inverseMultiplicity () const
 
unsigned int inverseMultiplicityBits () const
 
vtxinversemult_t inverseMultiplicityWord () const
 
unsigned int multiplicity () const
 
unsigned int multiplicityBits () const
 
vtxmultiplicity_t multiplicityWord () const
 
VertexWordoperator= (const VertexWord &word)
 
double pt () const
 
unsigned int ptBits () const
 
vtxsumpt_t ptWord () const
 
unsigned int quality () const
 
unsigned int qualityBits () const
 
vtxquality_t qualityWord () const
 
void setVertexRef (const VertexRef &ref)
 
void setVertexWord (vtxvalid_t valid, vtxz0_t z0, vtxmultiplicity_t multiplicity, vtxsumpt_t pt, vtxquality_t quality, vtxinversemult_t inverseMultiplicity, vtxunassigned_t unassigned)
 
unsigned int unassigned () const
 
unsigned int unassignedBits () const
 
vtxunassigned_t unassignedWord () const
 
bool valid () const
 
unsigned int validBits () const
 
vtxvalid_t validWord () const
 
VertexRef vertexRef () const
 
 VertexWord ()
 
 VertexWord (unsigned int valid, double z0, unsigned int multiplicity, double pt, unsigned int quality, unsigned int inverseMultiplicity, unsigned int unassigned)
 
 VertexWord (unsigned int valid, unsigned int z0, unsigned int multiplicity, unsigned int pt, unsigned int quality, unsigned int inverseMultiplicity, unsigned int unassigned)
 
 VertexWord (vtxvalid_t valid, vtxz0_t z0, vtxmultiplicity_t multiplicity, vtxsumpt_t pt, vtxquality_t quality, vtxinversemult_t inverseMultiplicity, vtxunassigned_t unassigned)
 
 VertexWord (const VertexWord &word)
 
vtxword_t vertexWord () const
 
double z0 () const
 
unsigned int z0Bits () const
 
vtxz0_t z0Word () const
 
 ~VertexWord ()
 

Private Member Functions

double unpackSignedValue (unsigned int bits, unsigned int nBits, double lsb) const
 

Private Attributes

VertexRef vertexRef_
 
vtxword_bs_t vertexWord_
 

Detailed Description

Definition at line 24 of file VertexWord.h.

Member Typedef Documentation

◆ VertexRef

Definition at line 78 of file VertexWord.h.

◆ vtxinversemult_t

typedef ap_ufixed<VertexBitWidths::kNTrackOutPVSize, VertexBitWidths::kNTrackOutPVSize, AP_RND_CONV, AP_SAT> l1t::VertexWord::vtxinversemult_t

Definition at line 70 of file VertexWord.h.

◆ vtxmultiplicity_t

typedef ap_ufixed<VertexBitWidths::kNTrackInPVSize, VertexBitWidths::kNTrackInPVSize, AP_RND_CONV, AP_SAT> l1t::VertexWord::vtxmultiplicity_t

Definition at line 65 of file VertexWord.h.

◆ vtxquality_t

typedef ap_uint<VertexBitWidths::kQualitySize> l1t::VertexWord::vtxquality_t

Definition at line 68 of file VertexWord.h.

◆ vtxsumpt_t

typedef ap_ufixed<VertexBitWidths::kSumPtSize, VertexBitWidths::kSumPtMagSize, AP_RND_CONV, AP_SAT> l1t::VertexWord::vtxsumpt_t

Definition at line 67 of file VertexWord.h.

◆ vtxunassigned_t

typedef ap_uint<VertexBitWidths::kUnassignedSize> l1t::VertexWord::vtxunassigned_t

Definition at line 71 of file VertexWord.h.

◆ vtxvalid_t

typedef ap_uint<VertexBitWidths::kValidSize> l1t::VertexWord::vtxvalid_t

Definition at line 62 of file VertexWord.h.

◆ vtxword_bs_t

typedef std::bitset<VertexBitWidths::kVertexWordSize> l1t::VertexWord::vtxword_bs_t

Definition at line 74 of file VertexWord.h.

◆ vtxword_t

typedef ap_uint<VertexBitWidths::kVertexWordSize> l1t::VertexWord::vtxword_t

Definition at line 75 of file VertexWord.h.

◆ vtxz0_t

typedef ap_fixed<VertexBitWidths::kZ0Size, VertexBitWidths::kZ0MagSize, AP_RND_CONV, AP_SAT> l1t::VertexWord::vtxz0_t

Definition at line 63 of file VertexWord.h.

Member Enumeration Documentation

◆ VertexBitLocations

Enumerator
kValidLSB 
kValidMSB 
kZ0LSB 
kZ0MSB 
kNTrackInPVLSB 
kNTrackInPVMSB 
kSumPtLSB 
kSumPtMSB 
kQualityLSB 
kQualityMSB 
kNTrackOutPVLSB 
kNTrackOutPVMSB 
kUnassignedLSB 
kUnassignedMSB 

Definition at line 43 of file VertexWord.h.

43  {
44  // The location of the least significant bit (LSB) and most significant bit (MSB) in the vertex word for different fields
45  kValidLSB = 0,
46  kValidMSB = kValidLSB + VertexBitWidths::kValidSize - 1,
47  kZ0LSB = kValidMSB + 1,
48  kZ0MSB = kZ0LSB + VertexBitWidths::kZ0Size - 1,
49  kNTrackInPVLSB = kZ0MSB + 1,
50  kNTrackInPVMSB = kNTrackInPVLSB + VertexBitWidths::kNTrackInPVSize - 1,
52  kSumPtMSB = kSumPtLSB + VertexBitWidths::kSumPtSize - 1,
53  kQualityLSB = kSumPtMSB + 1,
54  kQualityMSB = kQualityLSB + VertexBitWidths::kQualitySize - 1,
56  kNTrackOutPVMSB = kNTrackOutPVLSB + VertexBitWidths::kNTrackOutPVSize - 1,
58  kUnassignedMSB = kUnassignedLSB + VertexBitWidths::kUnassignedSize - 1
59  };

◆ VertexBitWidths

Enumerator
kValidSize 
kZ0Size 
kZ0MagSize 
kNTrackInPVSize 
kSumPtSize 
kSumPtMagSize 
kQualitySize 
kNTrackOutPVSize 
kUnassignedSize 
kVertexWordSize 

Definition at line 27 of file VertexWord.h.

27  {
28  // The sizes of the vertex word components and total word size
29  kValidSize = 1, // Width of the valid bit
30  kZ0Size = 15, // Width of z-position
31  kZ0MagSize = 6, // Width of z-position magnitude (signed)
32  kNTrackInPVSize = 8, // Width of the multiplicity in the PV (unsigned)
33  kSumPtSize = 10, // Width of pT
34  kSumPtMagSize = 8, // Width of pT magnitude (unsigned)
35  kQualitySize = 3, // Width of the quality field
36  kNTrackOutPVSize = 10, // Width of the multiplicity outside the PV (unsigned)
37  kUnassignedSize = 17, // Width of the unassigned bits
38 
40  kUnassignedSize, // Width of the vertex word in bits
41  };

Constructor & Destructor Documentation

◆ VertexWord() [1/5]

l1t::VertexWord::VertexWord ( )
inline

Definition at line 82 of file VertexWord.h.

82 {}

◆ VertexWord() [2/5]

l1t::VertexWord::VertexWord ( unsigned int  valid,
double  z0,
unsigned int  multiplicity,
double  pt,
unsigned int  quality,
unsigned int  inverseMultiplicity,
unsigned int  unassigned 
)

Definition at line 15 of file VertexWord.cc.

References inverseMultiplicity(), multiplicity(), pt(), quality(), setVertexWord(), unassigned(), valid(), and z0().

21  {
22  // convert directly to AP types
23  vtxvalid_t valid_ap = valid;
24  vtxz0_t z0_ap = z0;
26  vtxsumpt_t pt_ap = pt;
27  vtxquality_t quality_ap = quality;
29  vtxunassigned_t unassigned_ap = unassigned;
30 
31  setVertexWord(valid_ap, z0_ap, mult_ap, pt_ap, quality_ap, invmult_ap, unassigned_ap);
32  }
ap_uint< VertexBitWidths::kUnassignedSize > vtxunassigned_t
Definition: VertexWord.h:71
unsigned int unassigned() const
Definition: VertexWord.h:161
ap_ufixed< VertexBitWidths::kNTrackInPVSize, VertexBitWidths::kNTrackInPVSize, AP_RND_CONV, AP_SAT > vtxmultiplicity_t
Definition: VertexWord.h:65
unsigned int quality() const
Definition: VertexWord.h:159
void setVertexWord(vtxvalid_t valid, vtxz0_t z0, vtxmultiplicity_t multiplicity, vtxsumpt_t pt, vtxquality_t quality, vtxinversemult_t inverseMultiplicity, vtxunassigned_t unassigned)
Definition: VertexWord.cc:65
ap_ufixed< VertexBitWidths::kNTrackOutPVSize, VertexBitWidths::kNTrackOutPVSize, AP_RND_CONV, AP_SAT > vtxinversemult_t
Definition: VertexWord.h:70
ap_fixed< VertexBitWidths::kZ0Size, VertexBitWidths::kZ0MagSize, AP_RND_CONV, AP_SAT > vtxz0_t
Definition: VertexWord.h:63
ap_ufixed< VertexBitWidths::kSumPtSize, VertexBitWidths::kSumPtMagSize, AP_RND_CONV, AP_SAT > vtxsumpt_t
Definition: VertexWord.h:67
ap_uint< VertexBitWidths::kQualitySize > vtxquality_t
Definition: VertexWord.h:68
double pt() const
Definition: VertexWord.h:158
bool valid() const
Definition: VertexWord.h:155
double z0() const
Definition: VertexWord.h:156
unsigned int multiplicity() const
Definition: VertexWord.h:157
unsigned int inverseMultiplicity() const
Definition: VertexWord.h:160
ap_uint< VertexBitWidths::kValidSize > vtxvalid_t
Definition: VertexWord.h:62

◆ VertexWord() [3/5]

l1t::VertexWord::VertexWord ( unsigned int  valid,
unsigned int  z0,
unsigned int  multiplicity,
unsigned int  pt,
unsigned int  quality,
unsigned int  inverseMultiplicity,
unsigned int  unassigned 
)

Definition at line 34 of file VertexWord.cc.

References inverseMultiplicity(), multiplicity(), quality(), setVertexWord(), unassigned(), unpackSignedValue(), valid(), and z0().

40  {
41  // convert to AP types
42  vtxvalid_t valid_ap = valid;
43  vtxz0_t z0_ap = unpackSignedValue(
44  z0, VertexBitWidths::kZ0Size, 1.0 / (1 << (VertexBitWidths::kZ0Size - VertexBitWidths::kZ0MagSize)));
47  z0, VertexBitWidths::kSumPtSize, 1.0 / (1 << (VertexBitWidths::kSumPtSize - VertexBitWidths::kSumPtMagSize)));
48  vtxquality_t quality_ap = quality;
50  vtxunassigned_t unassigned_ap = unassigned;
51 
52  setVertexWord(valid_ap, z0_ap, mult_ap, pt_ap, quality_ap, invmult_ap, unassigned_ap);
53  }
ap_uint< VertexBitWidths::kUnassignedSize > vtxunassigned_t
Definition: VertexWord.h:71
unsigned int unassigned() const
Definition: VertexWord.h:161
ap_ufixed< VertexBitWidths::kNTrackInPVSize, VertexBitWidths::kNTrackInPVSize, AP_RND_CONV, AP_SAT > vtxmultiplicity_t
Definition: VertexWord.h:65
unsigned int quality() const
Definition: VertexWord.h:159
void setVertexWord(vtxvalid_t valid, vtxz0_t z0, vtxmultiplicity_t multiplicity, vtxsumpt_t pt, vtxquality_t quality, vtxinversemult_t inverseMultiplicity, vtxunassigned_t unassigned)
Definition: VertexWord.cc:65
ap_ufixed< VertexBitWidths::kNTrackOutPVSize, VertexBitWidths::kNTrackOutPVSize, AP_RND_CONV, AP_SAT > vtxinversemult_t
Definition: VertexWord.h:70
ap_fixed< VertexBitWidths::kZ0Size, VertexBitWidths::kZ0MagSize, AP_RND_CONV, AP_SAT > vtxz0_t
Definition: VertexWord.h:63
ap_ufixed< VertexBitWidths::kSumPtSize, VertexBitWidths::kSumPtMagSize, AP_RND_CONV, AP_SAT > vtxsumpt_t
Definition: VertexWord.h:67
ap_uint< VertexBitWidths::kQualitySize > vtxquality_t
Definition: VertexWord.h:68
bool valid() const
Definition: VertexWord.h:155
double z0() const
Definition: VertexWord.h:156
unsigned int multiplicity() const
Definition: VertexWord.h:157
double unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const
Definition: VertexWord.h:180
unsigned int inverseMultiplicity() const
Definition: VertexWord.h:160
ap_uint< VertexBitWidths::kValidSize > vtxvalid_t
Definition: VertexWord.h:62

◆ VertexWord() [4/5]

l1t::VertexWord::VertexWord ( vtxvalid_t  valid,
vtxz0_t  z0,
vtxmultiplicity_t  multiplicity,
vtxsumpt_t  pt,
vtxquality_t  quality,
vtxinversemult_t  inverseMultiplicity,
vtxunassigned_t  unassigned 
)

Definition at line 55 of file VertexWord.cc.

References inverseMultiplicity(), multiplicity(), pt(), quality(), setVertexWord(), unassigned(), valid(), and z0().

61  {
63  }
unsigned int unassigned() const
Definition: VertexWord.h:161
unsigned int quality() const
Definition: VertexWord.h:159
void setVertexWord(vtxvalid_t valid, vtxz0_t z0, vtxmultiplicity_t multiplicity, vtxsumpt_t pt, vtxquality_t quality, vtxinversemult_t inverseMultiplicity, vtxunassigned_t unassigned)
Definition: VertexWord.cc:65
double pt() const
Definition: VertexWord.h:158
bool valid() const
Definition: VertexWord.h:155
double z0() const
Definition: VertexWord.h:156
unsigned int multiplicity() const
Definition: VertexWord.h:157
unsigned int inverseMultiplicity() const
Definition: VertexWord.h:160

◆ ~VertexWord()

l1t::VertexWord::~VertexWord ( )
inline

Definition at line 105 of file VertexWord.h.

105 {}

◆ VertexWord() [5/5]

l1t::VertexWord::VertexWord ( const VertexWord word)
inline

Definition at line 108 of file VertexWord.h.

References vertexWord_.

108 { vertexWord_ = word.vertexWord_; }
vtxword_bs_t vertexWord_
Definition: VertexWord.h:191
uint64_t word

Member Function Documentation

◆ inverseMultiplicity()

unsigned int l1t::VertexWord::inverseMultiplicity ( ) const
inline

Definition at line 160 of file VertexWord.h.

References inverseMultiplicityWord().

Referenced by setVertexWord(), and VertexWord().

160 { return inverseMultiplicityWord().to_uint(); }
vtxinversemult_t inverseMultiplicityWord() const
Definition: VertexWord.h:135

◆ inverseMultiplicityBits()

unsigned int l1t::VertexWord::inverseMultiplicityBits ( ) const
inline

Definition at line 150 of file VertexWord.h.

References inverseMultiplicityWord().

150 { return inverseMultiplicityWord().to_uint(); }
vtxinversemult_t inverseMultiplicityWord() const
Definition: VertexWord.h:135

◆ inverseMultiplicityWord()

vtxinversemult_t l1t::VertexWord::inverseMultiplicityWord ( ) const
inline

Definition at line 135 of file VertexWord.h.

References vertexWord().

Referenced by inverseMultiplicity(), and inverseMultiplicityBits().

135  {
136  return vertexWord()(VertexBitLocations::kNTrackOutPVMSB, VertexBitLocations::kNTrackOutPVLSB);
137  }
vtxword_t vertexWord() const
Definition: VertexWord.h:141

◆ multiplicity()

unsigned int l1t::VertexWord::multiplicity ( ) const
inline

Definition at line 157 of file VertexWord.h.

References multiplicityWord().

Referenced by setVertexWord(), and VertexWord().

157 { return multiplicityWord().to_uint(); }
vtxmultiplicity_t multiplicityWord() const
Definition: VertexWord.h:124

◆ multiplicityBits()

unsigned int l1t::VertexWord::multiplicityBits ( ) const
inline

Definition at line 147 of file VertexWord.h.

References multiplicityWord().

147 { return multiplicityWord().to_uint(); }
vtxmultiplicity_t multiplicityWord() const
Definition: VertexWord.h:124

◆ multiplicityWord()

vtxmultiplicity_t l1t::VertexWord::multiplicityWord ( ) const
inline

Definition at line 124 of file VertexWord.h.

References vertexWord().

Referenced by multiplicity(), and multiplicityBits().

124  {
125  return vertexWord()(VertexBitLocations::kNTrackInPVMSB, VertexBitLocations::kNTrackInPVLSB);
126  }
vtxword_t vertexWord() const
Definition: VertexWord.h:141

◆ operator=()

VertexWord& l1t::VertexWord::operator= ( const VertexWord word)
inline

Definition at line 111 of file VertexWord.h.

References vertexWord_.

111  {
112  vertexWord_ = word.vertexWord_;
113  return *this;
114  }
vtxword_bs_t vertexWord_
Definition: VertexWord.h:191
uint64_t word

◆ pt()

double l1t::VertexWord::pt ( ) const
inline

◆ ptBits()

unsigned int l1t::VertexWord::ptBits ( ) const
inline

Definition at line 148 of file VertexWord.h.

References ptWord().

148 { return ptWord().to_uint(); }
vtxsumpt_t ptWord() const
Definition: VertexWord.h:127

◆ ptWord()

vtxsumpt_t l1t::VertexWord::ptWord ( ) const
inline

Definition at line 127 of file VertexWord.h.

References runTheMatrix::ret, and vertexWord().

Referenced by pt(), and ptBits().

127  {
128  vtxsumpt_t ret;
129  ret.V = vertexWord()(VertexBitLocations::kSumPtMSB, VertexBitLocations::kSumPtLSB);
130  return ret;
131  }
ret
prodAgent to be discontinued
ap_ufixed< VertexBitWidths::kSumPtSize, VertexBitWidths::kSumPtMagSize, AP_RND_CONV, AP_SAT > vtxsumpt_t
Definition: VertexWord.h:67
vtxword_t vertexWord() const
Definition: VertexWord.h:141

◆ quality()

unsigned int l1t::VertexWord::quality ( ) const
inline

Definition at line 159 of file VertexWord.h.

References qualityWord().

Referenced by setVertexWord(), and VertexWord().

159 { return qualityWord().to_uint(); }
vtxquality_t qualityWord() const
Definition: VertexWord.h:132

◆ qualityBits()

unsigned int l1t::VertexWord::qualityBits ( ) const
inline

Definition at line 149 of file VertexWord.h.

References qualityWord().

149 { return qualityWord().to_uint(); }
vtxquality_t qualityWord() const
Definition: VertexWord.h:132

◆ qualityWord()

vtxquality_t l1t::VertexWord::qualityWord ( ) const
inline

Definition at line 132 of file VertexWord.h.

References vertexWord().

Referenced by quality(), and qualityBits().

132  {
133  return vertexWord()(VertexBitLocations::kQualityMSB, VertexBitLocations::kQualityLSB);
134  }
vtxword_t vertexWord() const
Definition: VertexWord.h:141

◆ setVertexRef()

void l1t::VertexWord::setVertexRef ( const VertexRef ref)
inline

Definition at line 176 of file VertexWord.h.

References vertexRef_.

176 { vertexRef_ = ref; }
VertexRef vertexRef_
Definition: VertexWord.h:192

◆ setVertexWord()

void l1t::VertexWord::setVertexWord ( vtxvalid_t  valid,
vtxz0_t  z0,
vtxmultiplicity_t  multiplicity,
vtxsumpt_t  pt,
vtxquality_t  quality,
vtxinversemult_t  inverseMultiplicity,
vtxunassigned_t  unassigned 
)

Definition at line 65 of file VertexWord.cc.

References b, inverseMultiplicity(), multiplicity(), hltrates_dqm_sourceclient-live_cfg::offset, pt(), quality(), unassigned(), valid(), vertexWord_, and z0().

Referenced by VertexWord().

71  {
72  // pack the vertex word
73  unsigned int offset = 0;
74  for (unsigned int b = offset; b < (offset + VertexBitWidths::kValidSize); b++) {
75  vertexWord_.set(b, valid[b - offset]);
76  }
77  offset += VertexBitWidths::kValidSize;
78  for (unsigned int b = offset; b < (offset + VertexBitWidths::kZ0Size); b++) {
79  vertexWord_.set(b, z0[b - offset]);
80  }
81  offset += VertexBitWidths::kZ0Size;
82 
83  for (unsigned int b = offset; b < (offset + VertexBitWidths::kNTrackInPVSize); b++) {
85  }
86  offset += VertexBitWidths::kNTrackInPVSize;
87  for (unsigned int b = offset; b < (offset + VertexBitWidths::kSumPtSize); b++) {
88  vertexWord_.set(b, pt[b - offset]);
89  }
90  offset += VertexBitWidths::kSumPtSize;
91  for (unsigned int b = offset; b < (offset + VertexBitWidths::kQualitySize); b++) {
92  vertexWord_.set(b, quality[b - offset]);
93  }
94  offset += VertexBitWidths::kQualitySize;
95  for (unsigned int b = offset; b < (offset + VertexBitWidths::kNTrackOutPVSize); b++) {
97  }
98  offset += VertexBitWidths::kNTrackOutPVSize;
99  for (unsigned int b = offset; b < (offset + VertexBitWidths::kUnassignedSize); b++) {
100  vertexWord_.set(b, unassigned[b - offset]);
101  }
102  }
vtxword_bs_t vertexWord_
Definition: VertexWord.h:191
unsigned int unassigned() const
Definition: VertexWord.h:161
unsigned int quality() const
Definition: VertexWord.h:159
double pt() const
Definition: VertexWord.h:158
bool valid() const
Definition: VertexWord.h:155
double b
Definition: hdecay.h:118
double z0() const
Definition: VertexWord.h:156
unsigned int multiplicity() const
Definition: VertexWord.h:157
unsigned int inverseMultiplicity() const
Definition: VertexWord.h:160

◆ unassigned()

unsigned int l1t::VertexWord::unassigned ( ) const
inline

Definition at line 161 of file VertexWord.h.

References unassignedWord().

Referenced by setVertexWord(), and VertexWord().

161 { return unassignedWord().to_uint(); }
vtxunassigned_t unassignedWord() const
Definition: VertexWord.h:138

◆ unassignedBits()

unsigned int l1t::VertexWord::unassignedBits ( ) const
inline

Definition at line 151 of file VertexWord.h.

References unassignedWord().

151 { return unassignedWord().to_uint(); }
vtxunassigned_t unassignedWord() const
Definition: VertexWord.h:138

◆ unassignedWord()

vtxunassigned_t l1t::VertexWord::unassignedWord ( ) const
inline

Definition at line 138 of file VertexWord.h.

References vertexWord().

Referenced by unassigned(), and unassignedBits().

138  {
139  return vertexWord()(VertexBitLocations::kUnassignedMSB, VertexBitLocations::kUnassignedLSB);
140  }
vtxword_t vertexWord() const
Definition: VertexWord.h:141

◆ unpackSignedValue()

double l1t::VertexWord::unpackSignedValue ( unsigned int  bits,
unsigned int  nBits,
double  lsb 
) const
inlineprivate

Definition at line 180 of file VertexWord.h.

References gpuClustering::pixelStatus::bits, and hgcalVFEProducer_cfi::lsb.

Referenced by VertexWord().

180  {
181  int isign = 1;
182  unsigned int digitized_maximum = (1 << nBits) - 1;
183  if (bits & (1 << (nBits - 1))) { // check the sign
184  isign = -1;
185  bits = (1 << (nBits + 1)) - bits; // if negative, flip everything for two's complement encoding
186  }
187  return (double(bits & digitized_maximum) + 0.5) * lsb * isign;
188  }
constexpr uint32_t bits
Definition: gpuClustering.h:23

◆ valid()

bool l1t::VertexWord::valid ( ) const
inline

Definition at line 155 of file VertexWord.h.

References validWord().

Referenced by setVertexWord(), and VertexWord().

155 { return validWord().to_bool(); }
vtxvalid_t validWord() const
Definition: VertexWord.h:118

◆ validBits()

unsigned int l1t::VertexWord::validBits ( ) const
inline

Definition at line 145 of file VertexWord.h.

References validWord().

145 { return validWord().to_uint(); }
vtxvalid_t validWord() const
Definition: VertexWord.h:118

◆ validWord()

vtxvalid_t l1t::VertexWord::validWord ( ) const
inline

Definition at line 118 of file VertexWord.h.

References vertexWord().

Referenced by valid(), and validBits().

118 { return vertexWord()(VertexBitLocations::kValidMSB, VertexBitLocations::kValidLSB); }
vtxword_t vertexWord() const
Definition: VertexWord.h:141

◆ vertexRef()

VertexRef l1t::VertexWord::vertexRef ( ) const
inline

Definition at line 164 of file VertexWord.h.

References vertexRef_.

164 { return vertexRef_; }
VertexRef vertexRef_
Definition: VertexWord.h:192

◆ vertexWord()

vtxword_t l1t::VertexWord::vertexWord ( ) const
inline

Definition at line 141 of file VertexWord.h.

References vertexWord_.

Referenced by inverseMultiplicityWord(), multiplicityWord(), ptWord(), qualityWord(), unassignedWord(), validWord(), and z0Word().

141 { return vtxword_t(vertexWord_.to_string().c_str(), 2); }
vtxword_bs_t vertexWord_
Definition: VertexWord.h:191
ap_uint< VertexBitWidths::kVertexWordSize > vtxword_t
Definition: VertexWord.h:75

◆ z0()

double l1t::VertexWord::z0 ( ) const
inline

Definition at line 156 of file VertexWord.h.

References z0Word().

Referenced by L1TrackSelectionProducer::produce(), setVertexWord(), l1tVertexFinder::VertexFinder::sortVerticesInZ0(), and VertexWord().

156 { return z0Word().to_double(); }
vtxz0_t z0Word() const
Definition: VertexWord.h:119

◆ z0Bits()

unsigned int l1t::VertexWord::z0Bits ( ) const
inline

Definition at line 146 of file VertexWord.h.

References z0Word().

146 { return z0Word().to_uint(); }
vtxz0_t z0Word() const
Definition: VertexWord.h:119

◆ z0Word()

vtxz0_t l1t::VertexWord::z0Word ( ) const
inline

Definition at line 119 of file VertexWord.h.

References runTheMatrix::ret, and vertexWord().

Referenced by z0(), and z0Bits().

119  {
120  vtxz0_t ret;
121  ret.V = vertexWord()(VertexBitLocations::kZ0MSB, VertexBitLocations::kZ0LSB);
122  return ret;
123  }
ret
prodAgent to be discontinued
ap_fixed< VertexBitWidths::kZ0Size, VertexBitWidths::kZ0MagSize, AP_RND_CONV, AP_SAT > vtxz0_t
Definition: VertexWord.h:63
vtxword_t vertexWord() const
Definition: VertexWord.h:141

Member Data Documentation

◆ vertexRef_

VertexRef l1t::VertexWord::vertexRef_
private

Definition at line 192 of file VertexWord.h.

Referenced by setVertexRef(), and vertexRef().

◆ vertexWord_

vtxword_bs_t l1t::VertexWord::vertexWord_
private

Definition at line 191 of file VertexWord.h.

Referenced by operator=(), setVertexWord(), VertexWord(), and vertexWord().