File indexing completed on 2024-04-06 12:02:19
0001 #ifndef L1TObjects_L1CaloEtScale_h
0002 #define L1TObjects_L1CaloEtScale_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #include "CondFormats/Serialization/interface/Serializable.h"
0024
0025 #include <vector>
0026 #include <ostream>
0027 #include <cstdint>
0028
0029 class L1CaloEtScale {
0030 public:
0031
0032 L1CaloEtScale();
0033
0034
0035
0036 L1CaloEtScale(const double linearLsbInGeV, const std::vector<double>& thresholdsInGeV);
0037
0038
0039 L1CaloEtScale(const unsigned linScaleMax,
0040 const unsigned rankScaleMax,
0041 const double linearLsbInGeV,
0042 const std::vector<double>& thresholdsInGeV);
0043
0044
0045 ~L1CaloEtScale();
0046
0047
0048 unsigned linScaleMax() const { return m_linScaleMax; }
0049
0050
0051 unsigned rankScaleMax() const { return m_rankScaleMax; }
0052
0053
0054 double linearLsb() const { return m_linearLsb; }
0055
0056
0057 uint16_t rank(const uint16_t linear) const;
0058
0059
0060 uint16_t rank(const double EtInGeV) const;
0061
0062
0063 double et(const uint16_t rank) const;
0064
0065
0066 const std::vector<double>& getThresholds() const { return m_thresholds; }
0067
0068 void print(std::ostream& s) const;
0069
0070 private:
0071
0072 uint16_t m_linScaleMax;
0073
0074
0075 uint16_t m_rankScaleMax;
0076
0077
0078 double m_linearLsb;
0079
0080
0081 std::vector<double> m_thresholds;
0082
0083 COND_SERIALIZABLE;
0084 };
0085
0086 std::ostream& operator<<(std::ostream& os, const L1CaloEtScale onj);
0087
0088 #endif