Jet Et calibration LUT. More...
#include <L1GctJetEtCalibrationLut.h>
Public Member Functions | |
unsigned | etaBin () const |
const L1GctJetFinderParams * | getFunction () const |
const L1CaloEtScale * | getOutputEtScale () const |
L1GctJetEtCalibrationLut () | |
void | setEtaBin (const unsigned eta) |
void | setFunction (const L1GctJetFinderParams *const lutfn) |
void | setOutputEtScale (const L1CaloEtScale *const scale) |
virtual | ~L1GctJetEtCalibrationLut () |
Static Public Attributes | |
static const unsigned | JET_ENERGY_BITWIDTH = 10 |
Input bitwidth of jet energy; must be 10 or more. | |
static const int | NAddress = JET_ET_CAL_LUT_ADD_BITS |
static const int | NData = JET_ET_CAL_LUT_DAT_BITS |
Protected Member Functions | |
virtual uint16_t | value (const uint16_t lutAddress) const |
Private Attributes | |
uint8_t | m_etaBin |
const L1GctJetFinderParams * | m_lutFunction |
const L1CaloEtScale * | m_outputEtScale |
Friends | |
std::ostream & | operator<< (std::ostream &os, const L1GctJetEtCalibrationLut &lut) |
Overload << operator. |
Jet Et calibration LUT.
Input is 10 bit Et and tau veto bit. Separate LUTs for different eta. Output is 6 bit rank (for jet sorting).
Modified March 2007 to remove the actual calculation to a separate class Modified October 2008 to have separate LUTs for each eta, as in the firmware
Definition at line 28 of file L1GctJetEtCalibrationLut.h.
L1GctJetEtCalibrationLut::L1GctJetEtCalibrationLut | ( | ) |
Definition at line 12 of file L1GctJetEtCalibrationLut.cc.
: L1GctLut<NAddress,NData>() { }
L1GctJetEtCalibrationLut::~L1GctJetEtCalibrationLut | ( | ) | [virtual] |
Definition at line 18 of file L1GctJetEtCalibrationLut.cc.
{ }
unsigned L1GctJetEtCalibrationLut::etaBin | ( | ) | const [inline] |
Definition at line 46 of file L1GctJetEtCalibrationLut.h.
References m_etaBin.
Referenced by operator<<(), and value().
{ return static_cast<unsigned>(m_etaBin); }
const L1GctJetFinderParams* L1GctJetEtCalibrationLut::getFunction | ( | ) | const [inline] |
Definition at line 44 of file L1GctJetEtCalibrationLut.h.
References m_lutFunction.
Referenced by operator<<().
{ return m_lutFunction; }
const L1CaloEtScale* L1GctJetEtCalibrationLut::getOutputEtScale | ( | ) | const [inline] |
Definition at line 45 of file L1GctJetEtCalibrationLut.h.
References m_outputEtScale.
{ return m_outputEtScale; }
void L1GctJetEtCalibrationLut::setEtaBin | ( | const unsigned | eta | ) |
void L1GctJetEtCalibrationLut::setFunction | ( | const L1GctJetFinderParams *const | lutfn | ) |
Definition at line 22 of file L1GctJetEtCalibrationLut.cc.
References m_lutFunction, and L1GctLut< JET_ET_CAL_LUT_ADD_BITS, JET_ET_CAL_LUT_DAT_BITS >::m_setupOk.
{ m_lutFunction = lutfn; m_setupOk = (lutfn!=0); }
void L1GctJetEtCalibrationLut::setOutputEtScale | ( | const L1CaloEtScale *const | scale | ) |
Definition at line 28 of file L1GctJetEtCalibrationLut.cc.
References m_outputEtScale, and pileupReCalc_HLTpaths::scale.
{ m_outputEtScale = scale; }
uint16_t L1GctJetEtCalibrationLut::value | ( | const uint16_t | lutAddress | ) | const [protected, virtual] |
Implements L1GctLut< JET_ET_CAL_LUT_ADD_BITS, JET_ET_CAL_LUT_DAT_BITS >.
Definition at line 38 of file L1GctJetEtCalibrationLut.cc.
References L1GctJetFinderParams::correctedEtGeV(), etaBin(), JET_ENERGY_BITWIDTH, L1CaloEtScale::linearLsb(), m_lutFunction, m_outputEtScale, and L1CaloEtScale::rank().
{ static const uint16_t maxEtMask = static_cast<uint16_t>((1 << JET_ENERGY_BITWIDTH) - 1); static const uint16_t tauBitMask = static_cast<uint16_t>( 1 << (JET_ENERGY_BITWIDTH)); static const uint16_t ovrFlowOut = 0x3f; uint16_t jetEt = lutAddress & maxEtMask; // Check for saturation if (jetEt == maxEtMask) { return ovrFlowOut; } else { double uncoEt = static_cast<double>(jetEt) * m_outputEtScale->linearLsb(); bool tauVeto = ((lutAddress & tauBitMask)==0); double corrEt = m_lutFunction->correctedEtGeV(uncoEt, etaBin(), tauVeto); return m_outputEtScale->rank(corrEt); } }
std::ostream& operator<< | ( | std::ostream & | os, |
const L1GctJetEtCalibrationLut & | lut | ||
) | [friend] |
Overload << operator.
Definition at line 56 of file L1GctJetEtCalibrationLut.cc.
{ os << std::endl; os << "==================================================" << std::endl; os << "===Level-1 Trigger: GCT Jet Et Calibration Lut===" << std::endl; os << "==================================================" << std::endl; os << "===Parameter settings for eta bin " << lut.etaBin() << "===" << std::endl; os << *lut.getFunction() << std::endl; os << "\n===Lookup table contents===\n" << std::endl; const L1GctLut<L1GctJetEtCalibrationLut::NAddress,L1GctJetEtCalibrationLut::NData>* temp=&lut; os << *temp; return os; }
const unsigned L1GctJetEtCalibrationLut::JET_ENERGY_BITWIDTH = 10 [static] |
Input bitwidth of jet energy; must be 10 or more.
Definition at line 33 of file L1GctJetEtCalibrationLut.h.
Referenced by L1GctJet::lutValue(), and value().
uint8_t L1GctJetEtCalibrationLut::m_etaBin [private] |
Definition at line 61 of file L1GctJetEtCalibrationLut.h.
Referenced by etaBin(), and setEtaBin().
const L1GctJetFinderParams* L1GctJetEtCalibrationLut::m_lutFunction [private] |
Definition at line 58 of file L1GctJetEtCalibrationLut.h.
Referenced by getFunction(), setFunction(), and value().
const L1CaloEtScale* L1GctJetEtCalibrationLut::m_outputEtScale [private] |
Definition at line 59 of file L1GctJetEtCalibrationLut.h.
Referenced by getOutputEtScale(), setOutputEtScale(), and value().
const int L1GctJetEtCalibrationLut::NAddress = JET_ET_CAL_LUT_ADD_BITS [static] |
Definition at line 31 of file L1GctJetEtCalibrationLut.h.
const int L1GctJetEtCalibrationLut::NData = JET_ET_CAL_LUT_DAT_BITS [static] |
Definition at line 32 of file L1GctJetEtCalibrationLut.h.