#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 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 mps_fire::i.
|
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 mps_fire::i.
|
inlineoverride |
|
inlineprotected |
Definition at line 221 of file L1MuScale.h.
References training_settings::idx, L1MuUnsignedPackingGeneric::idxFromPacked(), and L1MuSignedPackingGeneric::idxFromPacked().
|
inlineoverridevirtual |
get the center of bin represented by packed
Implements L1MuScale.
Definition at line 158 of file L1MuScale.h.
References training_settings::idx.
|
inlineoverridevirtual |
get the upper edge of bin represented by packed
Implements L1MuScale.
Definition at line 169 of file L1MuScale.h.
|
inlineoverridevirtual |
get the low edge of bin represented by packed
Implements L1MuScale.
Definition at line 164 of file L1MuScale.h.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
pack a value
Implements L1MuScale.
Definition at line 175 of file L1MuScale.h.
References training_settings::idx, L1MuUnsignedPackingGeneric::packedFromIdx(), and L1MuSignedPackingGeneric::packedFromIdx().
|
inlineoverridevirtual |
get the upper edge of the last bin
Implements L1MuScale.
Definition at line 192 of file L1MuScale.h.
|
inlineoverridevirtual |
get the lower edge of the first bin
Implements L1MuScale.
Definition at line 195 of file L1MuScale.h.
|
inlineoverridevirtual |
get value of the underlying vector for bin i
Implements L1MuScale.
Definition at line 201 of file L1MuScale.h.
References mps_fire::i.
|
inlineoverridevirtual |
Implements L1MuScale.
Definition at line 203 of file L1MuScale.h.
References L1MuScale::getCenter(), L1MuScale::getHighEdge(), L1MuScale::getLowEdge(), L1MuScale::getPacked(), mps_fire::i, and harvestTrackValidationPlots::str.
|
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.
|
protected |
Definition at line 233 of file L1MuScale.h.
|
protected |
Definition at line 231 of file L1MuScale.h.
|
protected |
Definition at line 235 of file L1MuScale.h.
|
protected |
Definition at line 232 of file L1MuScale.h.