CMS 3D CMS Logo

Typedefs | Functions | Variables
l1trackunpacker Namespace Reference

Typedefs

typedef ap_uint< TTTrack_TrackWord::TrackBitWidths::kD0Size > d0_intern
 
typedef ap_fixed< TTTrack_TrackWord::TrackBitWidths::kTanlSize, ETA_INTPART_BITS, AP_TRN, AP_SAT > glbeta_intern
 
typedef ap_int< TTTrack_TrackWord::TrackBitWidths::kPhiSize+kExtraGlobalPhiBitglbphi_intern
 
typedef ap_ufixed< TTTrack_TrackWord::TrackBitWidths::kRinvSize - 1, PT_INTPART_BITS, AP_TRN, AP_SAT > pt_intern
 
typedef ap_int< TTTrack_TrackWord::TrackBitWidths::kZ0Size > z0_intern
 

Functions

const double BitToDouble (unsigned int bits, unsigned int maxBits, double step)
 
const unsigned int DoubleToBit (double value, unsigned int maxBits, double step)
 

Variables

const unsigned int ETA_INTPART_BITS {3}
 
const unsigned int kExtraGlobalPhiBit {4}
 
const unsigned int PT_INTPART_BITS {9}
 

Typedef Documentation

◆ d0_intern

typedef ap_uint<TTTrack_TrackWord::TrackBitWidths::kD0Size> l1trackunpacker::d0_intern

Definition at line 23 of file L1TrackUnpacker.h.

◆ glbeta_intern

typedef ap_fixed<TTTrack_TrackWord::TrackBitWidths::kTanlSize, ETA_INTPART_BITS, AP_TRN, AP_SAT> l1trackunpacker::glbeta_intern

Definition at line 20 of file L1TrackUnpacker.h.

◆ glbphi_intern

typedef ap_int<TTTrack_TrackWord::TrackBitWidths::kPhiSize + kExtraGlobalPhiBit> l1trackunpacker::glbphi_intern

Definition at line 21 of file L1TrackUnpacker.h.

◆ pt_intern

typedef ap_ufixed<TTTrack_TrackWord::TrackBitWidths::kRinvSize - 1, PT_INTPART_BITS, AP_TRN, AP_SAT> l1trackunpacker::pt_intern

Definition at line 19 of file L1TrackUnpacker.h.

◆ z0_intern

typedef ap_int<TTTrack_TrackWord::TrackBitWidths::kZ0Size> l1trackunpacker::z0_intern

Definition at line 22 of file L1TrackUnpacker.h.

Function Documentation

◆ BitToDouble()

const double l1trackunpacker::BitToDouble ( unsigned int  bits,
unsigned int  maxBits,
double  step 
)
inline

Definition at line 34 of file L1TrackUnpacker.h.

References ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::bits.

34  {
35  int isign = 1;
36  unsigned int digitized_maximum = (1 << maxBits) - 1;
37  if (bits & (1 << (maxBits - 1))) { // check the sign
38  isign = -1;
39  bits = (1 << (maxBits + 1)) - bits;
40  }
41  return (double(bits & digitized_maximum) + 0.5) * step * isign;
42  }
step
Definition: StallMonitor.cc:83

◆ DoubleToBit()

const unsigned int l1trackunpacker::DoubleToBit ( double  value,
unsigned int  maxBits,
double  step 
)
inline

Definition at line 25 of file L1TrackUnpacker.h.

References funct::abs().

25  {
26  unsigned int digitized_value = std::floor(std::abs(value) / step);
27  unsigned int digitized_maximum = (1 << (maxBits - 1)) - 1; // The remove 1 bit from nBits to account for the sign
28  if (digitized_value > digitized_maximum)
29  digitized_value = digitized_maximum;
30  if (value < 0)
31  digitized_value = (1 << maxBits) - digitized_value; // two's complement encoding
32  return digitized_value;
33  }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Definition: value.py:1
step
Definition: StallMonitor.cc:83

Variable Documentation

◆ ETA_INTPART_BITS

const unsigned int l1trackunpacker::ETA_INTPART_BITS {3}

Definition at line 16 of file L1TrackUnpacker.h.

◆ kExtraGlobalPhiBit

const unsigned int l1trackunpacker::kExtraGlobalPhiBit {4}

Definition at line 17 of file L1TrackUnpacker.h.

◆ PT_INTPART_BITS

const unsigned int l1trackunpacker::PT_INTPART_BITS {9}

Definition at line 15 of file L1TrackUnpacker.h.