CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/L1Trigger/GlobalCaloTrigger/interface/L1GctHfEtSumsLut.h

Go to the documentation of this file.
00001 #ifndef L1GCTHFETSUMSLUT_H_
00002 #define L1GCTHFETSUMSLUT_H_
00003 
00004 #include "L1Trigger/GlobalCaloTrigger/src/L1GctLut.h"
00005 
00006 #include <vector>
00007 
00019 class L1CaloEtScale;
00020 
00021 class L1GctHfEtSumsLut : public L1GctLut<8,3>
00022 
00023 {
00024 public:
00025 
00026   enum hfLutType { bitCountPosEtaRing1, 
00027                    bitCountPosEtaRing2, 
00028                    bitCountNegEtaRing1, 
00029                    bitCountNegEtaRing2,
00030                    etSumPosEtaRing1,  
00031                    etSumPosEtaRing2,    
00032                    etSumNegEtaRing1,    
00033                    etSumNegEtaRing2,
00034                    numberOfLutTypes};
00035 
00036   // Definitions.
00037   static const int NAddress, NData;
00038 
00040   L1GctHfEtSumsLut(const L1GctHfEtSumsLut::hfLutType& type, const L1CaloEtScale* const scale);
00042   L1GctHfEtSumsLut(const L1GctHfEtSumsLut::hfLutType& type);
00044   L1GctHfEtSumsLut();
00046   L1GctHfEtSumsLut(const L1GctHfEtSumsLut& lut);
00048   virtual ~L1GctHfEtSumsLut();
00049   
00051   L1GctHfEtSumsLut operator= (const L1GctHfEtSumsLut& lut);
00052 
00054   friend std::ostream& operator << (std::ostream& os, const L1GctHfEtSumsLut& lut);
00055 
00057   void setFunction(const L1CaloEtScale* const fn) { if (fn != 0) { m_lutFunction = fn; m_setupOk = true; } }
00058 
00060   L1GctHfEtSumsLut::hfLutType lutType() const { return m_lutType; }
00061 
00063   const L1CaloEtScale* lutFunction() const { return m_lutFunction; }
00064 
00066   std::vector<double>   getThresholdsGeV() const;
00067   std::vector<unsigned> getThresholdsGct() const;
00068 
00069 protected:
00070   
00071 
00072   virtual uint16_t value (const uint16_t lutAddress) const;
00073 
00074 private:
00075 
00076   const L1CaloEtScale* m_lutFunction;
00077   L1GctHfEtSumsLut::hfLutType m_lutType;
00078   
00079 };
00080 
00081 
00082 std::ostream& operator << (std::ostream& os, const L1GctHfEtSumsLut& lut);
00083 
00084 #endif /*L1GCTHFETSUMSLUT_H_*/