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