File indexing completed on 2024-04-06 12:19:51
0001 #ifndef L1GCTGLOBALHFSUMALGOS_H_
0002 #define L1GCTGLOBALHFSUMALGOS_H_
0003
0004 #include "L1Trigger/GlobalCaloTrigger/interface/L1GctProcessor.h"
0005 #include "L1Trigger/GlobalCaloTrigger/interface/L1GctJetFinderBase.h"
0006 #include "L1Trigger/GlobalCaloTrigger/interface/L1GctHfEtSumsLut.h"
0007
0008 #include <vector>
0009 #include <map>
0010
0011 class L1GctWheelJetFpga;
0012 class L1GctHfLutSetup;
0013 class L1GctHfBitCountsLut;
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 class L1GctGlobalHfSumAlgos : public L1GctProcessor {
0028 public:
0029 typedef L1GctJetFinderBase::hfTowerSumsType hfTowerSumsType;
0030
0031
0032 L1GctGlobalHfSumAlgos(const std::vector<L1GctWheelJetFpga*>& WheelJetFpga);
0033
0034 ~L1GctGlobalHfSumAlgos() override;
0035
0036
0037 friend std::ostream& operator<<(std::ostream& os, const L1GctGlobalHfSumAlgos& fpga);
0038
0039
0040 void fetchInput() override;
0041
0042
0043 void process() override;
0044
0045
0046 std::vector<uint16_t> hfSumsOutput(const L1GctHfEtSumsLut::hfLutType type) const;
0047 std::vector<unsigned> hfSumsWord() const;
0048
0049
0050 void setupLuts(const L1CaloEtScale* scale);
0051
0052
0053 const L1GctHfBitCountsLut* getBCLut(const L1GctHfEtSumsLut::hfLutType type) const;
0054 const L1GctHfEtSumsLut* getESLut(const L1GctHfEtSumsLut::hfLutType type) const;
0055
0056
0057 std::vector<double> getThresholds(const L1GctHfEtSumsLut::hfLutType type) const;
0058
0059
0060 L1GctWheelJetFpga* getPlusWheelJetFpga() const { return m_plusWheelJetFpga; }
0061
0062 L1GctWheelJetFpga* getMinusWheelJetFpga() const { return m_minusWheelJetFpga; }
0063
0064
0065 bool setupOk() const { return m_setupOk; }
0066
0067 protected:
0068
0069 void resetProcessor() override;
0070 void resetPipelines() override;
0071
0072
0073 void setupObjects() override {}
0074
0075 private:
0076
0077 L1GctWheelJetFpga* m_plusWheelJetFpga;
0078 L1GctWheelJetFpga* m_minusWheelJetFpga;
0079
0080
0081 std::map<L1GctHfEtSumsLut::hfLutType, const L1GctHfBitCountsLut*> m_bitCountLuts;
0082 std::map<L1GctHfEtSumsLut::hfLutType, const L1GctHfEtSumsLut*> m_etSumLuts;
0083
0084
0085 hfTowerSumsType m_hfInputSumsPlusWheel;
0086 hfTowerSumsType m_hfInputSumsMinusWheel;
0087
0088
0089 std::map<L1GctHfEtSumsLut::hfLutType, Pipeline<uint16_t> > m_hfOutputSumsPipe;
0090
0091 bool m_setupOk;
0092
0093
0094
0095 void storeBitCount(L1GctHfEtSumsLut::hfLutType type, uint16_t value);
0096
0097 void storeEtSum(L1GctHfEtSumsLut::hfLutType type, uint16_t value);
0098 };
0099
0100 std::ostream& operator<<(std::ostream& os, const L1GctGlobalHfSumAlgos& fpga);
0101
0102 #endif