#include <L1MuScale.h>
Public Member Functions | |
float | getCenter (unsigned packed) const override |
get the center of bin represented by packed More... | |
float | getHighEdge (unsigned packed) const override |
get the upper edge of bin represented by packed More... | |
float | getLowEdge (unsigned packed) const override |
get the low edge of bin represented by packed More... | |
unsigned | getNBins () const override |
get number of bins More... | |
unsigned | getPacked (float value) const override |
pack a value More... | |
float | getScaleMax () const override |
get the upper edge of the last bin More... | |
float | getScaleMin () const override |
get the lower edge of the first bin More... | |
float | getValue (unsigned i) const override |
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) | |
std::string | print () const override |
~L1MuBinnedScale () override | |
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 93 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 102 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 107 of file L1MuScale.h.
References mps_fire::i, m_idxoffset, m_NBins, m_Scale, and SiStripSourceConfigP5_cff::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 129 of file L1MuScale.h.
References mps_fire::i, m_idxoffset, m_NBins, m_Scale, SiStripSourceConfigP5_cff::NBins, TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.
|
inlineoverride |
|
inlineprotected |
Definition at line 205 of file L1MuScale.h.
References training_settings::idx, L1MuUnsignedPackingGeneric::idxFromPacked(), L1MuSignedPackingGeneric::idxFromPacked(), m_idxoffset, m_NBins, m_nbits, and m_signedPacking.
Referenced by getCenter(), getHighEdge(), and getLowEdge().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
get number of bins
Implements L1MuScale.
Definition at line 185 of file L1MuScale.h.
References m_NBins.
|
inlineoverridevirtual |
pack a value
Implements L1MuScale.
Definition at line 159 of file L1MuScale.h.
References training_settings::idx, m_idxoffset, m_NBins, m_nbits, m_Scale, m_signedPacking, L1MuUnsignedPackingGeneric::packedFromIdx(), and L1MuSignedPackingGeneric::packedFromIdx().
Referenced by print().
|
inlineoverridevirtual |
|
inlineoverridevirtual |
get the lower edge of the first bin
Implements L1MuScale.
Definition at line 182 of file L1MuScale.h.
References m_Scale.
|
inlineoverridevirtual |
get value of the underlying vector for bin i
Implements L1MuScale.
Definition at line 188 of file L1MuScale.h.
References mps_fire::i, and m_Scale.
|
inlineoverridevirtual |
Implements L1MuScale.
Definition at line 190 of file L1MuScale.h.
References getCenter(), getHighEdge(), getLowEdge(), getPacked(), mps_fire::i, m_NBins, m_Scale, and str.
|
private |
|
friend |
Definition at line 222 of file L1MuScale.h.
|
friend |
Definition at line 222 of file L1MuScale.h.
|
protected |
Definition at line 219 of file L1MuScale.h.
Referenced by get_idx(), getPacked(), and L1MuBinnedScale().
|
protected |
Definition at line 218 of file L1MuScale.h.
Referenced by get_idx(), getNBins(), getPacked(), getScaleMax(), L1MuBinnedScale(), and print().
|
protected |
Definition at line 216 of file L1MuScale.h.
Referenced by get_idx(), and getPacked().
|
protected |
Definition at line 220 of file L1MuScale.h.
Referenced by getCenter(), getHighEdge(), getLowEdge(), getPacked(), getScaleMax(), getScaleMin(), getValue(), L1MuBinnedScale(), and print().
|
protected |
Definition at line 217 of file L1MuScale.h.
Referenced by get_idx(), and getPacked().