Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-02 03:45:49

0001 #ifndef L1GCTJETETCALIBRATIONLUT_H_
0002 #define L1GCTJETETCALIBRATIONLUT_H_
0003 
0004 #define JET_ET_CAL_LUT_ADD_BITS 11
0005 #define JET_ET_CAL_LUT_DAT_BITS 6
0006 
0007 #include "L1Trigger/GlobalCaloTrigger/interface/L1GctLut.h"
0008 
0009 class L1GctJetFinderParams;
0010 class L1CaloEtScale;
0011 
0012 /*!
0013  * \author Robert Frazier & Greg Heath
0014  * \date May 2006
0015  */
0016 
0017 /*! \class L1GctJetEtCalibrationLut
0018  * \brief Jet Et calibration LUT
0019  * 
0020  * Input is 10 bit Et and tau veto bit. Separate LUTs for different eta.
0021  * Output is 6 bit rank (for jet sorting).
0022  * 
0023  * Modified March 2007 to remove the actual calculation to a separate class
0024  * Modified October 2008 to have separate LUTs for each eta, as in the firmware
0025  *
0026  */
0027 
0028 class L1GctJetEtCalibrationLut : public L1GctLut<JET_ET_CAL_LUT_ADD_BITS, JET_ET_CAL_LUT_DAT_BITS> {
0029 public:
0030   static const int NAddress;
0031   static const int NData;
0032   static const unsigned JET_ENERGY_BITWIDTH;  ///< Input bitwidth of jet energy; must be 10 or more
0033 
0034   L1GctJetEtCalibrationLut();
0035   ~L1GctJetEtCalibrationLut() override;
0036 
0037   // set components
0038   void setFunction(const L1GctJetFinderParams* const lutfn);
0039   void setOutputEtScale(const L1CaloEtScale* const scale);
0040   void setEtaBin(const unsigned eta);
0041 
0042   // get components
0043   const L1GctJetFinderParams* getFunction() const { return m_lutFunction; }
0044   const L1CaloEtScale* getOutputEtScale() const { return m_outputEtScale; }
0045   unsigned etaBin() const { return static_cast<unsigned>(m_etaBin); }
0046 
0047   /// Overload << operator
0048   friend std::ostream& operator<<(std::ostream& os, const L1GctJetEtCalibrationLut& lut);
0049 
0050 protected:
0051   uint16_t value(const uint16_t lutAddress) const override;
0052 
0053 private:
0054   const L1GctJetFinderParams* m_lutFunction;
0055   const L1CaloEtScale* m_outputEtScale;
0056 
0057   uint8_t m_etaBin;
0058 };
0059 
0060 std::ostream& operator<<(std::ostream& os, const L1GctJetEtCalibrationLut& lut);
0061 
0062 #endif /*L1GCTJETETCALIBRATIONLUT_H_*/