32 : m_linScaleMax(0x3ff), m_rankScaleMax(0x3f), m_linearLsb(linearLsbInGeV), m_thresholds(thresholdsInGeV) {
41 const unsigned rankScaleMax,
42 const double linearLsbInGeV,
43 const vector<double>& thresholdsInGeV)
44 : m_linScaleMax(linScaleMax),
45 m_rankScaleMax(rankScaleMax),
46 m_linearLsb(linearLsbInGeV),
47 m_thresholds(thresholdsInGeV) {}
80 }
catch (std::out_of_range
const&) {
81 throw cms::Exception(
"OutOfRange") <<
"Index out of range in L1CaloEtScale::et(rank)" << std::endl;
86 s <<
"L1CaloEtScale :" << endl;
96 os <<
"L1CaloEtScale :" << endl;
97 os <<
" Input scale max = " <<
obj.linScaleMax() << endl;
98 os <<
" Input LSB = " <<
obj.linearLsb() <<
" GeV" << endl;
99 os <<
" Rank scale max = " <<
obj.rankScaleMax() << endl;
100 for (
unsigned i = 0;
i <
obj.getThresholds().size();
i++) {
101 os <<
" Threshold " <<
i <<
" = " <<
obj.getThresholds().at(
i) <<
" GeV" << endl;
uint16_t m_linScaleMax
linear scale maximum
uint16_t m_rankScaleMax
rank scale maximum
std::ostream & operator<<(std::ostream &os, const L1CaloEtScale obj)
double m_linearLsb
LSB of linear scale in GeV.
double et(const uint16_t rank) const
convert from rank to physically meaningful quantity
L1CaloEtScale()
default constructor, for testing (out = in)
std::vector< double > m_thresholds
thresholds associated with rank scale in GeV
uint16_t rank(const uint16_t linear) const
convert from linear Et scale to rank scale
void print(std::ostream &s) const