|
|
Go to the documentation of this file.
19 #ifndef CondFormatsL1TObjects_L1MuScale_h
20 #define CondFormatsL1TObjects_L1MuScale_h
45 virtual float getCenter(
unsigned packed)
const = 0;
48 virtual float getLowEdge(
unsigned packed)
const = 0;
51 virtual float getHighEdge(
unsigned packed)
const = 0;
63 virtual unsigned getNBins()
const = 0;
66 virtual float getValue(
unsigned i)
const = 0;
108 unsigned int nbits,
bool signedPacking,
int NBins,
const std::vector<double>& Scale,
int idx_offset = 0)
162 <<
"L1MuBinnedScale::getPacked: value out of scale range: " <<
value << std::endl;
191 std::ostringstream
str;
193 str <<
" ind | low edge | center | high edge" << std::endl;
194 str <<
"-------------------------------------------" << std::endl;
197 str << std::setw(4) << ipack <<
" | " << std::setw(10) <<
getLowEdge(ipack) <<
" | " << std::setw(10)
290 return center * fsign;
305 edm::LogWarning(
"NotImplemented") <<
"L1MuSymmetricBinnedScale::getHighEdge not implemented" << std::endl;
311 float absval = fabs(
value);
314 <<
"L1MuSymmetricBinnedScale::getPacked: value out of scale range!!! abs(val) = " << absval
337 std::ostringstream
str;
339 str <<
" ind | low edge | center" << std::endl;
340 str <<
"-------------------------------------------" << std::endl;
343 str << std::setw(4) << ipack <<
" | " << std::setw(10) <<
getLowEdge(ipack) <<
" | " << std::setw(10)
std::vector< float > m_Scale
unsigned packedFromIdx(int idx) const override
get the packed notation of a value, check range
L1MuSymmetricBinnedScale(int nbits, int NBins, float xmin, float xmax)
virtual unsigned getNBins() const =0
get number of bins
static int idxFromPacked(unsigned packed, unsigned int nbits)
get the value from the packed notation (always positive)
~L1MuSymmetricBinnedScale() override
destructor
#define COND_SERIALIZABLE
unsigned getNBins() const override
get number of bins
virtual float getValue(unsigned i) const =0
get value of the underlying vector for bin i
L1MuPseudoSignedPacking m_packing
float getScaleMax() const override
get the upper edge of the last bin (posivie half)
L1MuSymmetricBinnedScale(int nbits, int NBins, const std::vector< double > &Scale)
Log< level::Warning, false > LogWarning
float getHighEdge(unsigned packed) const override
get the upper edge of bin represented by packed
unsigned getPacked(float value) const override
pack a value
static int idxFromPacked(unsigned packed, unsigned int nbits)
get the value from the packed notation (+/-)
L1MuBinnedScale(unsigned int nbits, bool signedPacking, int NBins, float xmin, float xmax, int idx_offset=0)
~L1MuBinnedScale() override
destructor
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
L1MuBinnedScale(unsigned int nbits, bool signedPacking, int NBins, const std::vector< double > &Scale, int idx_offset=0)
int idxFromPacked(unsigned packed) const override
get the value from the packed notation (+/-)
std::string print() const override
virtual float getScaleMin() const =0
get the lower edge of the first bin
float getValue(unsigned i) const override
get value of the underlying vector for bin i
static unsigned packedFromIdx(int idx, unsigned int nbits)
get the packed notation of a value, check range
unsigned getPacked(float value) const override
pack a value
int signFromPacked(unsigned packed) const override
get the (pseudo-)sign from the packed notation (0=positive, 1=negative)
float getLowEdge(unsigned packed) const override
get the low edge of bin represented by packed
virtual float getHighEdge(unsigned packed) const =0
get the upper edge of bin represented by packed
float getScaleMin() const override
get the lower edge of the first bin (positive half)
std::string print() const override
float getLowEdge(unsigned packed) const override
get the low edge of bin represented by packed
float getScaleMax() const override
get the upper edge of the last bin
unsigned getNBins() const override
get number of bins
L1MuSymmetricBinnedScale()
float getCenter(unsigned packed) const override
get the center of bin represented by packed
float getValue(unsigned i) const override
get value of the underlying vector for bin i
static unsigned packedFromIdx(int idx, unsigned int nbits)
get the packed notation of a value, check the range
float getCenter(unsigned packed) const override
get the center of bin represented by packed
float getHighEdge(unsigned packed) const override
get the upper edge of bin represented by packed
virtual std::string print() const =0
int get_idx(unsigned packed) const
Abs< T >::type abs(const T &t)
float getScaleMin() const override
get the lower edge of the first bin
virtual unsigned getPacked(float value) const =0
pack a value
virtual float getScaleMax() const =0
get the upper edge of the last bin
std::vector< float > m_Scale
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed