8 std::vector<global_phi_t> cosLUT;
9 for (
unsigned int LUT_idx = 0; LUT_idx <
size; LUT_idx++) {
19 std::vector<eta_t>
LUT;
29 for (
unsigned int q = 0;
q < DeltaZBins.size();
q++) {
38 unsigned int digitized_maximum = (1 << nBits) - 1;
39 if (bits & (1 << (nBits - 1))) {
41 bits = (1 << (nBits + 1)) - bits;
43 return (
int(bits & digitized_maximum)) * isign;
48 unsigned int olddigitized_maximum = (1 << oldnBits) - 1;
49 unsigned int newdigitized_maximum = (1 << newnBits) - 1;
50 if (bits & (1 << (oldnBits - 1))) {
52 bits = (1 << (oldnBits + 1)) - bits;
54 unsigned int temp = (
int(bits & olddigitized_maximum));
56 temp = round(
temp / (1 << (oldnBits - newnBits)));
58 if (
temp > newdigitized_maximum)
59 temp = newdigitized_maximum;
const unsigned int kGlobalPhiBins
int unpackSignedValue(unsigned int bits, unsigned int nBits)
const unsigned int kInternalVTXWidth
unsigned int transformSignedValue(unsigned int bits, unsigned int oldnBits, unsigned int newnBits)
Cos< T >::type cos(const T &t)
std::vector< eta_t > generateEtaRegionLUT(vector< double > EtaRegions)
ap_uint< kInternalPhiWidth+kGlobalPhiExtra > global_phi_t
std::vector< global_phi_t > generateCosLUT(unsigned int size)
std::vector< z_t > generateDeltaZLUT(vector< double > DeltaZBins)
const unsigned int kInternalEtaWidth
std::vector< unsigned short int > LUT