8 float tmp = value*resolution;
10 if ( (abs(tmp)-0.5)/2. == std::round((abs(tmp)-0.5)/2.) ) {
11 if ( tmp>0 ) {
index = std::floor(tmp); }
12 else {
index = std::ceil(tmp); }
14 index = std::round(tmp);
17 return static_cast<int>(
index);
24 return static_cast<unsigned int>(phiInt);
33 if ( ((bits >> (
length-1)) & 1) == 0) {
34 return bits & ((1<<
length)-1);
41 return TSU::toSigned(std::stoi(bits,
nullptr, 2), bits.length());
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
static constexpr unsigned int phiIntegerResolution
unsigned int toTopoPhi(float phi)
static constexpr float phiRescaleFactor
int toTopoInteger(float value, unsigned int resolution)
static constexpr unsigned int etaIntegerResolution
int toSigned(unsigned bits, unsigned length)