1 #ifndef L1Trigger_L1TTrackMatch_L1TkEtMissEmuAlgo_HH 2 #define L1Trigger_L1TTrackMatch_L1TkEtMissEmuAlgo_HH 35 typedef ap_uint<kInternalPtWidth>
pt_t;
36 typedef ap_uint<kInternalEtaWidth>
eta_t;
37 typedef ap_uint<kInternalVTXWidth>
z_t;
40 typedef ap_int<kInternalPtWidth + kEtExtra>
Et_t;
48 typedef ap_uint<kMETSize>
MET_t;
93 int digitizedValue = std::floor(
value /
lsb);
96 int digitizedMaximum = (1 << (nBits - 1)) - 1;
97 int digitizedMinimum = -1. * (digitizedMaximum + 1);
100 digitizedValue = std::clamp(digitizedValue, digitizedMinimum, digitizedMaximum);
103 T twosValue = digitizedValue;
104 if (digitizedValue < 0) {
105 twosValue += (1 << nBits);
111 template <
typename T>
114 return (
up -
bins.begin() - 1);
const unsigned int kGlobalPhiBins
std::vector< eta_t > generateEtaRegionLUT(std::vector< double > EtaRegions)
ap_uint< kMETPhiSize > METphi_t
const unsigned int kGlobalPhiExtra
static constexpr double minZ0
int unpackSignedValue(unsigned int bits, unsigned int nBits)
ap_uint< kInternalVTXWidth > z_t
std::vector< z_t > generateDeltaZLUT(std::vector< double > DeltaZBins)
const unsigned int kNEtaRegion
const unsigned int kNQuadrants
const unsigned int kNSector
const unsigned int kInternalVTXWidth
unsigned int transformSignedValue(unsigned int bits, unsigned int oldnBits, unsigned int newnBits)
const unsigned int kMETPhiBins
Abs< T >::type abs(const T &t)
const unsigned int kEtExtra
const unsigned int kMETSize
ap_uint< kInternalEtaWidth > eta_t
T digitizeSignedValue(double value, unsigned int nBits, double lsb)
ap_uint< kMETSize > MET_t
static constexpr double minPhi0
const unsigned int kInternalPtWidth
ap_uint< kInternalPhiWidth+kGlobalPhiExtra > global_phi_t
unsigned int getBin(double value, const T &bins)
std::vector< global_phi_t > generateCosLUT(unsigned int size)
const unsigned int kMETPhiSize
const float kMaxCosLUTPhi
const unsigned int kInternalEtaWidth
const unsigned int kMETBins
const unsigned int kInternalPhiWidth
ap_uint< kInternalPtWidth > pt_t
ap_int< kInternalPtWidth+kEtExtra > Et_t