CMS 3D CMS Logo

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

#include <TkTripletWord.h>

Public Types

typedef ap_int< kChargeSizecharge_t
 
typedef ap_int< kDiTrackMaxMassSizeditrack_maxmass_t
 
typedef ap_int< kDiTrackMaxZ0Sizeditrack_maxz0_t
 
typedef ap_int< kDiTrackMinMassSizeditrack_minmass_t
 
typedef ap_int< kDiTrackMinZ0Sizeditrack_minz0_t
 
typedef ap_int< kGlbEtaSizeglbeta_t
 
typedef ap_int< kGlbPhiSizeglbphi_t
 
typedef ap_int< kMassSizemass_t
 
typedef ap_ufixed< kPtSize, kPtMagSize, AP_TRN, AP_SAT > pt_t
 
enum  TkTripletBitLocations {
  kValidLSB = 0, kValidMSB = kValidLSB + TkTripletBitWidths::kValidSize - 1, kPtLSB = kValidMSB + 1, kPtMSB = kPtLSB + TkTripletBitWidths::kPtSize - 1,
  kGlbPhiLSB = kPtMSB + 1, kGlbPhiMSB = kGlbPhiLSB + TkTripletBitWidths::kGlbPhiSize - 1, kGlbEtaLSB = kGlbPhiMSB + 1, kGlbEtaMSB = kGlbEtaLSB + TkTripletBitWidths::kGlbEtaSize - 1,
  kMassLSB = kGlbEtaMSB + 1, kMassMSB = kMassLSB + TkTripletBitWidths::kMassSize - 1, kChargeLSB = kMassMSB + 1, kChargeMSB = kChargeLSB + TkTripletBitWidths::kChargeSize - 1,
  kDiTrackMinMassLSB = kChargeMSB + 1, kDiTrackMinMassMSB = kDiTrackMinMassLSB + TkTripletBitWidths::kDiTrackMinMassSize - 1, kDiTrackMaxMassLSB = kDiTrackMinMassMSB + 1, kDiTrackMaxMassMSB = kDiTrackMaxMassLSB + TkTripletBitWidths::kDiTrackMaxMassSize - 1,
  kDiTrackMinZ0LSB = kDiTrackMaxMassMSB + 1, kDiTrackMinZ0MSB = kDiTrackMinZ0LSB + TkTripletBitWidths::kDiTrackMinZ0Size - 1, kDiTrackMaxZ0LSB = kDiTrackMinZ0MSB + 1, kDiTrackMaxZ0MSB = kDiTrackMaxZ0LSB + TkTripletBitWidths::kDiTrackMaxZ0Size - 1,
  kUnassignedLSB = kDiTrackMaxZ0MSB + 1, kUnassignedMSB = kUnassignedLSB + TkTripletBitWidths::kUnassignedSize - 1
}
 
enum  TkTripletBitWidths {
  kValidSize = 1, kPtSize = 16, kPtMagSize = 11, kGlbEtaSize = 14,
  kGlbPhiSize = 13, kMassSize = 16, kChargeSize = 3, kDiTrackMinMassSize = 16,
  kDiTrackMaxMassSize = 16, kDiTrackMinZ0Size = 8, kDiTrackMaxZ0Size = 8, kUnassignedSize = 17,
  kTkTripletWordSize
}
 
typedef std::bitset< TkTripletBitWidths::kTkTripletWordSize > tktripletword_bs_t
 
typedef ap_uint< TkTripletBitWidths::kTkTripletWordSize > tktripletword_t
 
typedef ap_uint< TkTripletBitWidths::kUnassignedSize > unassigned_t
 
typedef ap_uint< kValidSizevalid_t
 

Public Member Functions

int charge () const
 
unsigned int chargeBits () const
 
charge_t chargeWord () const
 
float ditrackMaxMass () const
 
unsigned int ditrackMaxMassBits () const
 
ditrack_maxmass_t ditrackMaxMassWord () const
 
float ditrackMaxZ0 () const
 
unsigned int ditrackMaxZ0Bits () const
 
ditrack_maxz0_t ditrackMaxZ0Word () const
 
float ditrackMinMass () const
 
unsigned int ditrackMinMassBits () const
 
ditrack_minmass_t ditrackMinMassWord () const
 
float ditrackMinZ0 () const
 
unsigned int ditrackMinZ0Bits () const
 
ditrack_minz0_t ditrackMinZ0Word () const
 
float glbeta () const
 
unsigned int glbEtaBits () const
 
glbeta_t glbEtaWord () const
 
float glbphi () const
 
unsigned int glbPhiBits () const
 
glbphi_t glbPhiWord () const
 
float mass () const
 
unsigned int massBits () const
 
mass_t massWord () const
 
TkTripletWordoperator= (const TkTripletWord &word)
 
template<class packVarType >
void packIntoWord (unsigned int &currentOffset, unsigned int wordChunkSize, packVarType &packVar)
 
float pt () const
 
unsigned int ptBits () const
 
pt_t ptWord () const
 
void setTkTripletWord (valid_t valid, pt_t pt, glbeta_t eta, glbphi_t phi, mass_t mass, charge_t charge, ditrack_minmass_t ditrack_minmass, ditrack_maxmass_t ditrack_maxmass, ditrack_minz0_t ditrack_minz0, ditrack_maxz0_t ditrack_maxz0, unassigned_t unassigned)
 
 TkTripletWord ()
 
 TkTripletWord (valid_t valid, pt_t pt, glbeta_t eta, glbphi_t phi, mass_t mass, charge_t charge, ditrack_minmass_t ditrack_minmass, ditrack_maxmass_t ditrack_maxmass, ditrack_minz0_t ditrack_minz0_t, ditrack_maxz0_t ditrack_maxz0_t, unassigned_t unassigned)
 
 TkTripletWord (const TkTripletWord &word)
 
tktripletword_t tkTripletWord () const
 
unsigned int unassigned () const
 
unsigned int unassignedBits () const
 
unassigned_t unassignedWord () const
 
bool valid () const
 
unsigned int validBits () const
 
valid_t validWord () const
 
 ~TkTripletWord ()
 

Static Public Attributes

static constexpr double MAX_CHARGE = 3.
 
static constexpr double MAX_ETA = 8.
 
static constexpr double MAX_MASS = 1000.
 
static constexpr double MAX_Z0 = 25.
 

Private Member Functions

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

Private Attributes

tktripletword_bs_t tkTripletWord_
 

Detailed Description

Definition at line 17 of file TkTripletWord.h.

Member Typedef Documentation

◆ charge_t

Definition at line 76 of file TkTripletWord.h.

◆ ditrack_maxmass_t

Definition at line 78 of file TkTripletWord.h.

◆ ditrack_maxz0_t

Definition at line 80 of file TkTripletWord.h.

◆ ditrack_minmass_t

Definition at line 77 of file TkTripletWord.h.

◆ ditrack_minz0_t

Definition at line 79 of file TkTripletWord.h.

◆ glbeta_t

Definition at line 73 of file TkTripletWord.h.

◆ glbphi_t

Definition at line 74 of file TkTripletWord.h.

◆ mass_t

Definition at line 75 of file TkTripletWord.h.

◆ pt_t

typedef ap_ufixed<kPtSize, kPtMagSize, AP_TRN, AP_SAT> l1t::TkTripletWord::pt_t

Definition at line 72 of file TkTripletWord.h.

◆ tktripletword_bs_t

typedef std::bitset<TkTripletBitWidths::kTkTripletWordSize> l1t::TkTripletWord::tktripletword_bs_t

Definition at line 82 of file TkTripletWord.h.

◆ tktripletword_t

typedef ap_uint<TkTripletBitWidths::kTkTripletWordSize> l1t::TkTripletWord::tktripletword_t

Definition at line 83 of file TkTripletWord.h.

◆ unassigned_t

typedef ap_uint<TkTripletBitWidths::kUnassignedSize> l1t::TkTripletWord::unassigned_t

Definition at line 81 of file TkTripletWord.h.

◆ valid_t

Definition at line 71 of file TkTripletWord.h.

Member Enumeration Documentation

◆ TkTripletBitLocations

Enumerator
kValidLSB 
kValidMSB 
kPtLSB 
kPtMSB 
kGlbPhiLSB 
kGlbPhiMSB 
kGlbEtaLSB 
kGlbEtaMSB 
kMassLSB 
kMassMSB 
kChargeLSB 
kChargeMSB 
kDiTrackMinMassLSB 
kDiTrackMinMassMSB 
kDiTrackMaxMassLSB 
kDiTrackMaxMassMSB 
kDiTrackMinZ0LSB 
kDiTrackMinZ0MSB 
kDiTrackMaxZ0LSB 
kDiTrackMaxZ0MSB 
kUnassignedLSB 
kUnassignedMSB 

Definition at line 44 of file TkTripletWord.h.

44  {
45  // The location of the least significant bit (LSB) and most significant bit (MSB) in the triplet word for different fields
46  kValidLSB = 0,
48  kPtLSB = kValidMSB + 1,
49  kPtMSB = kPtLSB + TkTripletBitWidths::kPtSize - 1,
50  kGlbPhiLSB = kPtMSB + 1,
51  kGlbPhiMSB = kGlbPhiLSB + TkTripletBitWidths::kGlbPhiSize - 1,
52  kGlbEtaLSB = kGlbPhiMSB + 1,
53  kGlbEtaMSB = kGlbEtaLSB + TkTripletBitWidths::kGlbEtaSize - 1,
54  kMassLSB = kGlbEtaMSB + 1,
55  kMassMSB = kMassLSB + TkTripletBitWidths::kMassSize - 1,
56  kChargeLSB = kMassMSB + 1,
57  kChargeMSB = kChargeLSB + TkTripletBitWidths::kChargeSize - 1,
59  kDiTrackMinMassMSB = kDiTrackMinMassLSB + TkTripletBitWidths::kDiTrackMinMassSize - 1,
61  kDiTrackMaxMassMSB = kDiTrackMaxMassLSB + TkTripletBitWidths::kDiTrackMaxMassSize - 1,
63  kDiTrackMinZ0MSB = kDiTrackMinZ0LSB + TkTripletBitWidths::kDiTrackMinZ0Size - 1,
65  kDiTrackMaxZ0MSB = kDiTrackMaxZ0LSB + TkTripletBitWidths::kDiTrackMaxZ0Size - 1,
68  };
const unsigned int kValidSize
const unsigned int kUnassignedSize

◆ TkTripletBitWidths

Enumerator
kValidSize 
kPtSize 
kPtMagSize 
kGlbEtaSize 
kGlbPhiSize 
kMassSize 
kChargeSize 
kDiTrackMinMassSize 
kDiTrackMaxMassSize 
kDiTrackMinZ0Size 
kDiTrackMaxZ0Size 
kUnassignedSize 
kTkTripletWordSize 

Definition at line 25 of file TkTripletWord.h.

25  {
26  // The sizes of the triplet word components and total word size
27  kValidSize = 1, // Width of the valid bit
28  kPtSize = 16, // Width of the triplet pt
29  kPtMagSize = 11,
30  kGlbEtaSize = 14, // Width of the triplet eta
31  kGlbPhiSize = 13, // Width of the triplet phi
32  kMassSize = 16, // Width of the triplet mass
33  kChargeSize = 3, // Width of the triplet charge
34  kDiTrackMinMassSize = 16, // Width of the mass of min mass pair
35  kDiTrackMaxMassSize = 16, // Width of the mass of max mass pair
36  kDiTrackMinZ0Size = 8, // Width of the Dz of min Dz pair
37  kDiTrackMaxZ0Size = 8, // Width of the Dz of max Dz pair
38  kUnassignedSize = 17,
42  };

Constructor & Destructor Documentation

◆ TkTripletWord() [1/3]

l1t::TkTripletWord::TkTripletWord ( )
inline

Definition at line 87 of file TkTripletWord.h.

87 {}

◆ TkTripletWord() [2/3]

l1t::TkTripletWord::TkTripletWord ( valid_t  valid,
pt_t  pt,
glbeta_t  eta,
glbphi_t  phi,
mass_t  mass,
charge_t  charge,
ditrack_minmass_t  ditrack_minmass,
ditrack_maxmass_t  ditrack_maxmass,
ditrack_minz0_t  ditrack_minz0_t,
ditrack_maxz0_t  ditrack_maxz0_t,
unassigned_t  unassigned 
)

Definition at line 7 of file TkTripletWord.cc.

References charge(), PVValHelper::eta, mass(), pt(), setTkTripletWord(), unassigned(), and valid().

17  {
19  valid, pt, eta, phi, mass, charge, ditrack_minmass, ditrack_maxmass, ditrack_minz0, ditrack_maxz0, unassigned);
20  }
float pt() const
void setTkTripletWord(valid_t valid, pt_t pt, glbeta_t eta, glbphi_t phi, mass_t mass, charge_t charge, ditrack_minmass_t ditrack_minmass, ditrack_maxmass_t ditrack_maxmass, ditrack_minz0_t ditrack_minz0, ditrack_maxz0_t ditrack_maxz0, unassigned_t unassigned)
bool valid() const
unsigned int unassigned() const
int charge() const
float mass() const

◆ ~TkTripletWord()

l1t::TkTripletWord::~TkTripletWord ( )
inline

Definition at line 100 of file TkTripletWord.h.

100 {}

◆ TkTripletWord() [3/3]

l1t::TkTripletWord::TkTripletWord ( const TkTripletWord word)
inline

Definition at line 103 of file TkTripletWord.h.

References tkTripletWord_.

103 { tkTripletWord_ = word.tkTripletWord_; }
uint64_t word
tktripletword_bs_t tkTripletWord_

Member Function Documentation

◆ charge()

int l1t::TkTripletWord::charge ( ) const
inline

Definition at line 198 of file TkTripletWord.h.

References chargeWord(), MAX_CHARGE, and unpackSignedValue().

Referenced by setTkTripletWord(), and TkTripletWord().

198  {
199  return unpackSignedValue(
200  chargeWord(), TkTripletBitWidths::kChargeSize, MAX_CHARGE / (1 << TkTripletBitWidths::kChargeSize));
201  }
charge_t chargeWord() const
double unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const
static constexpr double MAX_CHARGE
Definition: TkTripletWord.h:22

◆ chargeBits()

unsigned int l1t::TkTripletWord::chargeBits ( ) const
inline

Definition at line 174 of file TkTripletWord.h.

References chargeWord().

174 { return chargeWord().to_uint(); }
charge_t chargeWord() const

◆ chargeWord()

charge_t l1t::TkTripletWord::chargeWord ( ) const
inline

Definition at line 136 of file TkTripletWord.h.

References runTheMatrix::ret, and tkTripletWord().

Referenced by charge(), and chargeBits().

136  {
137  charge_t ret;
138  ret.V = tkTripletWord()(TkTripletBitLocations::kChargeMSB, TkTripletBitLocations::kChargeLSB);
139  return ret;
140  }
ap_int< kChargeSize > charge_t
Definition: TkTripletWord.h:76
ret
prodAgent to be discontinued
tktripletword_t tkTripletWord() const

◆ ditrackMaxMass()

float l1t::TkTripletWord::ditrackMaxMass ( ) const
inline

Definition at line 207 of file TkTripletWord.h.

References ditrackMaxMassWord(), MAX_MASS, and unpackSignedValue().

207  {
209  TkTripletBitWidths::kDiTrackMaxMassSize,
210  MAX_MASS / (1 << TkTripletBitWidths::kDiTrackMaxMassSize));
211  }
double unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const
static constexpr double MAX_MASS
Definition: TkTripletWord.h:20
ditrack_maxmass_t ditrackMaxMassWord() const

◆ ditrackMaxMassBits()

unsigned int l1t::TkTripletWord::ditrackMaxMassBits ( ) const
inline

Definition at line 176 of file TkTripletWord.h.

References ditrackMaxMassWord().

176 { return ditrackMaxMassWord().to_uint(); }
ditrack_maxmass_t ditrackMaxMassWord() const

◆ ditrackMaxMassWord()

ditrack_maxmass_t l1t::TkTripletWord::ditrackMaxMassWord ( ) const
inline

Definition at line 147 of file TkTripletWord.h.

References runTheMatrix::ret, and tkTripletWord().

Referenced by ditrackMaxMass(), and ditrackMaxMassBits().

147  {
149  ret.V = tkTripletWord()(TkTripletBitLocations::kDiTrackMaxMassMSB, TkTripletBitLocations::kDiTrackMaxMassLSB);
150  return ret;
151  }
ret
prodAgent to be discontinued
tktripletword_t tkTripletWord() const
ap_int< kDiTrackMaxMassSize > ditrack_maxmass_t
Definition: TkTripletWord.h:78

◆ ditrackMaxZ0()

float l1t::TkTripletWord::ditrackMaxZ0 ( ) const
inline

Definition at line 217 of file TkTripletWord.h.

References ditrackMaxZ0Word(), MAX_Z0, and unpackSignedValue().

217  {
219  TkTripletBitWidths::kDiTrackMaxZ0Size,
220  MAX_Z0 / (1 << TkTripletBitWidths::kDiTrackMaxZ0Size));
221  }
double unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const
static constexpr double MAX_Z0
Definition: TkTripletWord.h:23
ditrack_maxz0_t ditrackMaxZ0Word() const

◆ ditrackMaxZ0Bits()

unsigned int l1t::TkTripletWord::ditrackMaxZ0Bits ( ) const
inline

Definition at line 178 of file TkTripletWord.h.

References ditrackMaxZ0Word().

178 { return ditrackMaxZ0Word().to_uint(); }
ditrack_maxz0_t ditrackMaxZ0Word() const

◆ ditrackMaxZ0Word()

ditrack_maxz0_t l1t::TkTripletWord::ditrackMaxZ0Word ( ) const
inline

Definition at line 157 of file TkTripletWord.h.

References runTheMatrix::ret, and tkTripletWord().

Referenced by ditrackMaxZ0(), and ditrackMaxZ0Bits().

157  {
159  ret.V = tkTripletWord()(TkTripletBitLocations::kDiTrackMaxZ0MSB, TkTripletBitLocations::kDiTrackMaxZ0LSB);
160  return ret;
161  }
ret
prodAgent to be discontinued
tktripletword_t tkTripletWord() const
ap_int< kDiTrackMaxZ0Size > ditrack_maxz0_t
Definition: TkTripletWord.h:80

◆ ditrackMinMass()

float l1t::TkTripletWord::ditrackMinMass ( ) const
inline

Definition at line 202 of file TkTripletWord.h.

References ditrackMinMassWord(), MAX_MASS, and unpackSignedValue().

202  {
204  TkTripletBitWidths::kDiTrackMinMassSize,
205  MAX_MASS / (1 << TkTripletBitWidths::kDiTrackMinMassSize));
206  }
double unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const
ditrack_minmass_t ditrackMinMassWord() const
static constexpr double MAX_MASS
Definition: TkTripletWord.h:20

◆ ditrackMinMassBits()

unsigned int l1t::TkTripletWord::ditrackMinMassBits ( ) const
inline

Definition at line 175 of file TkTripletWord.h.

References ditrackMinMassWord().

175 { return ditrackMinMassWord().to_uint(); }
ditrack_minmass_t ditrackMinMassWord() const

◆ ditrackMinMassWord()

ditrack_minmass_t l1t::TkTripletWord::ditrackMinMassWord ( ) const
inline

Definition at line 142 of file TkTripletWord.h.

References runTheMatrix::ret, and tkTripletWord().

Referenced by ditrackMinMass(), and ditrackMinMassBits().

142  {
144  ret.V = tkTripletWord()(TkTripletBitLocations::kDiTrackMinMassMSB, TkTripletBitLocations::kDiTrackMinMassLSB);
145  return ret;
146  }
ret
prodAgent to be discontinued
ap_int< kDiTrackMinMassSize > ditrack_minmass_t
Definition: TkTripletWord.h:77
tktripletword_t tkTripletWord() const

◆ ditrackMinZ0()

float l1t::TkTripletWord::ditrackMinZ0 ( ) const
inline

Definition at line 212 of file TkTripletWord.h.

References ditrackMinZ0Word(), MAX_Z0, and unpackSignedValue().

212  {
214  TkTripletBitWidths::kDiTrackMinZ0Size,
215  MAX_Z0 / (1 << TkTripletBitWidths::kDiTrackMinZ0Size));
216  }
double unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const
ditrack_minz0_t ditrackMinZ0Word() const
static constexpr double MAX_Z0
Definition: TkTripletWord.h:23

◆ ditrackMinZ0Bits()

unsigned int l1t::TkTripletWord::ditrackMinZ0Bits ( ) const
inline

Definition at line 177 of file TkTripletWord.h.

References ditrackMinZ0Word().

177 { return ditrackMinZ0Word().to_uint(); }
ditrack_minz0_t ditrackMinZ0Word() const

◆ ditrackMinZ0Word()

ditrack_minz0_t l1t::TkTripletWord::ditrackMinZ0Word ( ) const
inline

Definition at line 152 of file TkTripletWord.h.

References runTheMatrix::ret, and tkTripletWord().

Referenced by ditrackMinZ0(), and ditrackMinZ0Bits().

152  {
154  ret.V = tkTripletWord()(TkTripletBitLocations::kDiTrackMinZ0MSB, TkTripletBitLocations::kDiTrackMinZ0LSB);
155  return ret;
156  }
ret
prodAgent to be discontinued
tktripletword_t tkTripletWord() const
ap_int< kDiTrackMinZ0Size > ditrack_minz0_t
Definition: TkTripletWord.h:79

◆ glbeta()

float l1t::TkTripletWord::glbeta ( ) const
inline

Definition at line 185 of file TkTripletWord.h.

References glbEtaWord(), MAX_ETA, and unpackSignedValue().

185  {
186  return unpackSignedValue(
187  glbEtaWord(), TkTripletBitWidths::kGlbEtaSize, (MAX_ETA) / (1 << TkTripletBitWidths::kGlbEtaSize));
188  }
double unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const
glbeta_t glbEtaWord() const
static constexpr double MAX_ETA
Definition: TkTripletWord.h:21

◆ glbEtaBits()

unsigned int l1t::TkTripletWord::glbEtaBits ( ) const
inline

Definition at line 171 of file TkTripletWord.h.

References glbEtaWord().

171 { return glbEtaWord().to_uint(); }
glbeta_t glbEtaWord() const

◆ glbEtaWord()

glbeta_t l1t::TkTripletWord::glbEtaWord ( ) const
inline

Definition at line 121 of file TkTripletWord.h.

References runTheMatrix::ret, and tkTripletWord().

Referenced by glbeta(), and glbEtaBits().

121  {
122  glbeta_t ret;
123  ret.V = tkTripletWord()(TkTripletBitLocations::kGlbEtaMSB, TkTripletBitLocations::kGlbEtaLSB);
124  return ret;
125  }
ret
prodAgent to be discontinued
ap_int< kGlbEtaSize > glbeta_t
Definition: TkTripletWord.h:73
tktripletword_t tkTripletWord() const

◆ glbphi()

float l1t::TkTripletWord::glbphi ( ) const
inline

Definition at line 189 of file TkTripletWord.h.

References funct::abs(), glbPhiWord(), M_PI, and unpackSignedValue().

189  {
190  return unpackSignedValue(glbPhiWord(),
191  TkTripletBitWidths::kGlbPhiSize,
192  (2. * std::abs(M_PI)) / (1 << TkTripletBitWidths::kGlbPhiSize));
193  }
double unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define M_PI
glbphi_t glbPhiWord() const

◆ glbPhiBits()

unsigned int l1t::TkTripletWord::glbPhiBits ( ) const
inline

Definition at line 172 of file TkTripletWord.h.

References glbPhiWord().

172 { return glbPhiWord().to_uint(); }
glbphi_t glbPhiWord() const

◆ glbPhiWord()

glbphi_t l1t::TkTripletWord::glbPhiWord ( ) const
inline

Definition at line 126 of file TkTripletWord.h.

References runTheMatrix::ret, and tkTripletWord().

Referenced by glbphi(), and glbPhiBits().

126  {
127  glbphi_t ret;
128  ret.V = tkTripletWord()(TkTripletBitLocations::kGlbPhiMSB, TkTripletBitLocations::kGlbPhiLSB);
129  return ret;
130  }
ret
prodAgent to be discontinued
tktripletword_t tkTripletWord() const
ap_int< kGlbPhiSize > glbphi_t
Definition: TkTripletWord.h:74

◆ mass()

float l1t::TkTripletWord::mass ( ) const
inline

Definition at line 194 of file TkTripletWord.h.

References massWord(), MAX_MASS, and unpackSignedValue().

Referenced by Particle.Particle::__str__(), DiObject.DiMuon::__str__(), datamodel.Object::p4(), setTkTripletWord(), and TkTripletWord().

194  {
195  return unpackSignedValue(
196  massWord(), TkTripletBitWidths::kMassSize, MAX_MASS / (1 << TkTripletBitWidths::kMassSize));
197  }
double unpackSignedValue(unsigned int bits, unsigned int nBits, double lsb) const
static constexpr double MAX_MASS
Definition: TkTripletWord.h:20
mass_t massWord() const

◆ massBits()

unsigned int l1t::TkTripletWord::massBits ( ) const
inline

Definition at line 173 of file TkTripletWord.h.

References massWord().

173 { return massWord().to_uint(); }
mass_t massWord() const

◆ massWord()

mass_t l1t::TkTripletWord::massWord ( ) const
inline

Definition at line 131 of file TkTripletWord.h.

References runTheMatrix::ret, and tkTripletWord().

Referenced by mass(), and massBits().

131  {
132  mass_t ret;
133  ret.V = tkTripletWord()(TkTripletBitLocations::kMassMSB, TkTripletBitLocations::kMassLSB);
134  return ret;
135  }
ret
prodAgent to be discontinued
ap_int< kMassSize > mass_t
Definition: TkTripletWord.h:75
tktripletword_t tkTripletWord() const

◆ operator=()

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

Definition at line 106 of file TkTripletWord.h.

References tkTripletWord_.

106  {
107  tkTripletWord_ = word.tkTripletWord_;
108  return *this;
109  }
uint64_t word
tktripletword_bs_t tkTripletWord_

◆ packIntoWord()

template<class packVarType >
void l1t::TkTripletWord::packIntoWord ( unsigned int &  currentOffset,
unsigned int  wordChunkSize,
packVarType &  packVar 
)
inline

Definition at line 23 of file TkTripletWord.cc.

References b, and tkTripletWord_.

Referenced by setTkTripletWord().

25  {
26  for (unsigned int b = currentOffset; b < (currentOffset + wordChunkSize); ++b) {
27  tkTripletWord_.set(b, packVar[b - currentOffset]);
28  }
29  currentOffset += wordChunkSize;
30  }
tktripletword_bs_t tkTripletWord_
double b
Definition: hdecay.h:120

◆ pt()

float l1t::TkTripletWord::pt ( ) const
inline

◆ ptBits()

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

Definition at line 170 of file TkTripletWord.h.

References ptWord().

170 { return ptWord().to_uint(); }
pt_t ptWord() const

◆ ptWord()

pt_t l1t::TkTripletWord::ptWord ( ) const
inline

Definition at line 116 of file TkTripletWord.h.

References runTheMatrix::ret, and tkTripletWord().

Referenced by pt(), and ptBits().

116  {
117  pt_t ret;
118  ret.V = tkTripletWord()(TkTripletBitLocations::kPtMSB, TkTripletBitLocations::kPtLSB);
119  return ret;
120  }
ret
prodAgent to be discontinued
tktripletword_t tkTripletWord() const
ap_ufixed< 16, 14 > pt_t
Definition: TauNNIdHW.h:13

◆ setTkTripletWord()

void l1t::TkTripletWord::setTkTripletWord ( valid_t  valid,
pt_t  pt,
glbeta_t  eta,
glbphi_t  phi,
mass_t  mass,
charge_t  charge,
ditrack_minmass_t  ditrack_minmass,
ditrack_maxmass_t  ditrack_maxmass,
ditrack_minz0_t  ditrack_minz0,
ditrack_maxz0_t  ditrack_maxz0,
unassigned_t  unassigned 
)

Definition at line 32 of file TkTripletWord.cc.

References charge(), PVValHelper::eta, l1tmhtemu::kValidSize, mass(), HLT_IsoTrack_cff::offset, packIntoWord(), pt(), and valid().

Referenced by TkTripletWord().

42  {
43  // pack the TkTriplet word
44  unsigned int offset = 0;
46  packIntoWord(offset, TkTripletBitWidths::kPtSize, pt);
47  packIntoWord(offset, TkTripletBitWidths::kGlbPhiSize, phi);
48  packIntoWord(offset, TkTripletBitWidths::kGlbEtaSize, eta);
49  packIntoWord(offset, TkTripletBitWidths::kMassSize, mass);
50  packIntoWord(offset, TkTripletBitWidths::kChargeSize, charge);
51  packIntoWord(offset, TkTripletBitWidths::kDiTrackMinMassSize, ditrack_minmass);
52  packIntoWord(offset, TkTripletBitWidths::kDiTrackMaxMassSize, ditrack_maxmass);
53  packIntoWord(offset, TkTripletBitWidths::kDiTrackMinZ0Size, ditrack_minz0);
54  packIntoWord(offset, TkTripletBitWidths::kDiTrackMaxZ0Size, ditrack_maxz0);
55  }
float pt() const
const unsigned int kValidSize
bool valid() const
int charge() const
float mass() const
void packIntoWord(unsigned int &currentOffset, unsigned int wordChunkSize, packVarType &packVar)

◆ tkTripletWord()

tktripletword_t l1t::TkTripletWord::tkTripletWord ( ) const
inline

Definition at line 165 of file TkTripletWord.h.

References tkTripletWord_.

Referenced by chargeWord(), ditrackMaxMassWord(), ditrackMaxZ0Word(), ditrackMinMassWord(), ditrackMinZ0Word(), glbEtaWord(), glbPhiWord(), massWord(), ptWord(), unassignedWord(), and validWord().

165 { return tktripletword_t(tkTripletWord_.to_string().c_str(), 2); }
tktripletword_bs_t tkTripletWord_
ap_uint< TkTripletBitWidths::kTkTripletWordSize > tktripletword_t
Definition: TkTripletWord.h:83

◆ unassigned()

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

Definition at line 222 of file TkTripletWord.h.

References unassignedWord().

Referenced by TkTripletWord().

222 { return unassignedWord().to_uint(); }
unassigned_t unassignedWord() const

◆ unassignedBits()

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

Definition at line 179 of file TkTripletWord.h.

References unassignedWord().

179 { return unassignedWord().to_uint(); }
unassigned_t unassignedWord() const

◆ unassignedWord()

unassigned_t l1t::TkTripletWord::unassignedWord ( ) const
inline

◆ unpackSignedValue()

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

Definition at line 242 of file TkTripletWord.h.

References ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::bits, and l1tHGCalVFEProducer_cfi::lsb.

Referenced by charge(), ditrackMaxMass(), ditrackMaxZ0(), ditrackMinMass(), ditrackMinZ0(), glbeta(), glbphi(), and mass().

242  {
243  int isign = 1;
244  unsigned int digitized_maximum = (1 << nBits) - 1;
245  if (bits & (1 << (nBits - 1))) { // check the sign
246  isign = -1;
247  bits = (1 << (nBits + 1)) - bits; // if negative, flip everything for two's complement encoding
248  }
249  return (double(bits & digitized_maximum) + 0.5) * lsb * isign;
250  }

◆ valid()

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

Definition at line 183 of file TkTripletWord.h.

References validWord().

Referenced by setTkTripletWord(), and TkTripletWord().

183 { return validWord().to_bool(); }
valid_t validWord() const

◆ validBits()

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

Definition at line 169 of file TkTripletWord.h.

References validWord().

169 { return validWord().to_uint(); }
valid_t validWord() const

◆ validWord()

valid_t l1t::TkTripletWord::validWord ( ) const
inline

Member Data Documentation

◆ MAX_CHARGE

constexpr double l1t::TkTripletWord::MAX_CHARGE = 3.
static

Definition at line 22 of file TkTripletWord.h.

Referenced by charge().

◆ MAX_ETA

constexpr double l1t::TkTripletWord::MAX_ETA = 8.
static

Definition at line 21 of file TkTripletWord.h.

Referenced by glbeta().

◆ MAX_MASS

constexpr double l1t::TkTripletWord::MAX_MASS = 1000.
static

Definition at line 20 of file TkTripletWord.h.

Referenced by ditrackMaxMass(), ditrackMinMass(), and mass().

◆ MAX_Z0

constexpr double l1t::TkTripletWord::MAX_Z0 = 25.
static

Definition at line 23 of file TkTripletWord.h.

Referenced by ditrackMaxZ0(), and ditrackMinZ0().

◆ tkTripletWord_

tktripletword_bs_t l1t::TkTripletWord::tkTripletWord_
private

Definition at line 253 of file TkTripletWord.h.

Referenced by operator=(), packIntoWord(), TkTripletWord(), and tkTripletWord().