File indexing completed on 2023-10-25 09:54:24
0001 #ifndef L1GCTHFETSUMSLUT_H_
0002 #define L1GCTHFETSUMSLUT_H_
0003
0004 #include "L1Trigger/GlobalCaloTrigger/interface/L1GctLut.h"
0005
0006 #include <vector>
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 class L1CaloEtScale;
0019
0020 class L1GctHfEtSumsLut : public L1GctLut<8, 3>
0021
0022 {
0023 public:
0024 enum hfLutType {
0025 bitCountPosEtaRing1,
0026 bitCountPosEtaRing2,
0027 bitCountNegEtaRing1,
0028 bitCountNegEtaRing2,
0029 etSumPosEtaRing1,
0030 etSumPosEtaRing2,
0031 etSumNegEtaRing1,
0032 etSumNegEtaRing2,
0033 numberOfLutTypes
0034 };
0035
0036
0037 static const int NAddress, NData;
0038
0039
0040 L1GctHfEtSumsLut(const L1GctHfEtSumsLut::hfLutType& type, const L1CaloEtScale* const scale);
0041
0042 L1GctHfEtSumsLut(const L1GctHfEtSumsLut::hfLutType& type);
0043
0044 L1GctHfEtSumsLut();
0045
0046 L1GctHfEtSumsLut(const L1GctHfEtSumsLut& lut);
0047
0048 ~L1GctHfEtSumsLut() override;
0049
0050
0051 L1GctHfEtSumsLut operator=(const L1GctHfEtSumsLut& lut);
0052
0053
0054 friend std::ostream& operator<<(std::ostream& os, const L1GctHfEtSumsLut& lut);
0055
0056
0057 void setFunction(const L1CaloEtScale* const fn) {
0058 if (fn != nullptr) {
0059 m_lutFunction = fn;
0060 m_setupOk = true;
0061 }
0062 }
0063
0064
0065 L1GctHfEtSumsLut::hfLutType lutType() const { return m_lutType; }
0066
0067
0068 const L1CaloEtScale* lutFunction() const { return m_lutFunction; }
0069
0070
0071 std::vector<double> getThresholdsGeV() const;
0072 std::vector<unsigned> getThresholdsGct() const;
0073
0074 protected:
0075 uint16_t value(const uint16_t lutAddress) const override;
0076
0077 private:
0078 const L1CaloEtScale* m_lutFunction;
0079 L1GctHfEtSumsLut::hfLutType m_lutType;
0080 };
0081
0082 std::ostream& operator<<(std::ostream& os, const L1GctHfEtSumsLut& lut);
0083
0084 #endif