#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 |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Friends | |
class | boost::serialization::access |
template<typename CondSerializationT , typename Enabled > | |
struct | cond::serialization::access |
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 95 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 105 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 115 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 138 of file L1MuScale.h.
References i, m_idxoffset, m_NBins, m_Scale, and EnsembleCalibrationLA_cfg::NBins.
|
inlinevirtual |
|
inlineprotected |
Definition at line 221 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 198 of file L1MuScale.h.
References m_NBins.
|
inlinevirtual |
pack a value
Implements L1MuScale.
Definition at line 175 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 192 of file L1MuScale.h.
References m_NBins, and m_Scale.
|
inlinevirtual |
get the lower edge of the first bin
Implements L1MuScale.
Definition at line 195 of file L1MuScale.h.
References m_Scale.
|
inlinevirtual |
get value of the underlying vector for bin i
Implements L1MuScale.
Definition at line 201 of file L1MuScale.h.
|
inlinevirtual |
Implements L1MuScale.
Definition at line 203 of file L1MuScale.h.
References getCenter(), getHighEdge(), getLowEdge(), getPacked(), i, m_NBins, and m_Scale.
|
private |
|
friend |
Definition at line 237 of file L1MuScale.h.
|
friend |
Definition at line 237 of file L1MuScale.h.
|
protected |
Definition at line 234 of file L1MuScale.h.
Referenced by get_idx(), getPacked(), and L1MuBinnedScale().
|
protected |
Definition at line 233 of file L1MuScale.h.
Referenced by get_idx(), getNBins(), getPacked(), getScaleMax(), L1MuBinnedScale(), and print().
|
protected |
Definition at line 231 of file L1MuScale.h.
Referenced by get_idx(), and getPacked().
|
protected |
Definition at line 235 of file L1MuScale.h.
Referenced by getCenter(), getHighEdge(), getLowEdge(), getPacked(), getScaleMax(), getScaleMin(), getValue(), L1MuBinnedScale(), and print().
|
protected |
Definition at line 232 of file L1MuScale.h.
Referenced by get_idx(), and getPacked().