#include <L1MuScale.h>
Public Member Functions | |
virtual float | getCenter (unsigned packed) const |
get the center of bin represented by packed More... | |
virtual float | getHighEdge (unsigned packed) const |
get the upper edge of bin represented by packed More... | |
virtual float | getLowEdge (unsigned packed) const |
get the low edge of bin represented by packed More... | |
virtual unsigned | getNBins () const |
get number of bins More... | |
virtual unsigned | getPacked (float value) const |
pack a value More... | |
virtual float | getScaleMax () const |
get the upper edge of the last bin More... | |
virtual float | getScaleMin () const |
get the lower edge of the first bin More... | |
virtual float | getValue (unsigned i) const |
get value of the underlying vector for bin i More... | |
L1MuBinnedScale () | |
L1MuBinnedScale (unsigned int nbits, bool signedPacking, int NBins, const std::vector< double > Scale, int idx_offset=0) | |
L1MuBinnedScale (unsigned int nbits, bool signedPacking, int NBins, float xmin, float xmax, int idx_offset=0) | |
virtual std::string | print () const |
virtual | ~L1MuBinnedScale () |
destructor More... | |
Public Member Functions inherited from L1MuScale | |
L1MuScale () | |
virtual | ~L1MuScale () |
Protected Member Functions | |
int | get_idx (unsigned packed) const |
Protected Attributes | |
int | m_idxoffset |
int | m_NBins |
unsigned int | m_nbits |
std::vector< float > | m_Scale |
bool | m_signedPacking |
implements a continuous scale of NBins bins.
the index into the binned scale runs from 0 to NBins-1.
It is packed into a data word (unsigned) using a Packing (template parameter)
If the packing accepts negative values, an offset can be specified which will be subtracted from the index before packing. ( The offset is in turn added to the packed value before using it as an index into the scale.)
Definition at line 91 of file L1MuScale.h.
|
inline |
constructor
packing is a pointer to a packing object. The L1MuBinnedScale takes ownership of the packing object and deletes it in its destructor
Definition at line 101 of file L1MuScale.h.
|
inline |
NBins=number of bins, Scale[NBins+1]=bin edges, idx_offset=offeset to index (if stored as signed)
Definition at line 111 of file L1MuScale.h.
References i, m_idxoffset, m_NBins, m_Scale, and EnsembleCalibrationLA_cfg::NBins.
|
inline |
constructor
packing is a pointer to a packing object. The L1MuBinnedScale takes ownership of the packing object and deletes it in its destructor
NBins=number of bins, xmin = low edge of first bin, xmax=high edge of last bin, idx_offset=offeset to index (if stored as signed)
Definition at line 134 of file L1MuScale.h.
References i, m_idxoffset, m_NBins, m_Scale, and EnsembleCalibrationLA_cfg::NBins.
|
inlinevirtual |
|
inlineprotected |
Definition at line 217 of file L1MuScale.h.
References L1MuUnsignedPackingGeneric::idxFromPacked(), L1MuSignedPackingGeneric::idxFromPacked(), m_idxoffset, m_NBins, m_nbits, and m_signedPacking.
Referenced by getCenter(), getHighEdge(), and getLowEdge().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
get number of bins
Implements L1MuScale.
Definition at line 194 of file L1MuScale.h.
References m_NBins.
|
inlinevirtual |
pack a value
Implements L1MuScale.
Definition at line 171 of file L1MuScale.h.
References m_idxoffset, m_NBins, m_nbits, m_Scale, m_signedPacking, L1MuUnsignedPackingGeneric::packedFromIdx(), and L1MuSignedPackingGeneric::packedFromIdx().
Referenced by print().
|
inlinevirtual |
get the upper edge of the last bin
Implements L1MuScale.
Definition at line 188 of file L1MuScale.h.
References m_NBins, and m_Scale.
|
inlinevirtual |
get the lower edge of the first bin
Implements L1MuScale.
Definition at line 191 of file L1MuScale.h.
References m_Scale.
|
inlinevirtual |
get value of the underlying vector for bin i
Implements L1MuScale.
Definition at line 197 of file L1MuScale.h.
|
inlinevirtual |
Implements L1MuScale.
Definition at line 199 of file L1MuScale.h.
References getCenter(), getHighEdge(), getLowEdge(), getPacked(), i, m_NBins, and m_Scale.
|
protected |
Definition at line 230 of file L1MuScale.h.
Referenced by get_idx(), getPacked(), and L1MuBinnedScale().
|
protected |
Definition at line 229 of file L1MuScale.h.
Referenced by get_idx(), getNBins(), getPacked(), getScaleMax(), L1MuBinnedScale(), and print().
|
protected |
Definition at line 227 of file L1MuScale.h.
Referenced by get_idx(), and getPacked().
|
protected |
Definition at line 231 of file L1MuScale.h.
Referenced by getCenter(), getHighEdge(), getLowEdge(), getPacked(), getScaleMax(), getScaleMin(), getValue(), L1MuBinnedScale(), and print().
|
protected |
Definition at line 228 of file L1MuScale.h.
Referenced by get_idx(), and getPacked().