CMS 3D CMS Logo

Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | Friends

L1GctJetEtCalibrationLut Class Reference

Jet Et calibration LUT. More...

#include <L1GctJetEtCalibrationLut.h>

Inheritance diagram for L1GctJetEtCalibrationLut:
L1GctLut< JET_ET_CAL_LUT_ADD_BITS, JET_ET_CAL_LUT_DAT_BITS >

List of all members.

Public Member Functions

unsigned etaBin () const
const L1GctJetFinderParamsgetFunction () const
const L1CaloEtScalegetOutputEtScale () 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 L1GctJetFinderParamsm_lutFunction
const L1CaloEtScalem_outputEtScale

Friends

std::ostream & operator<< (std::ostream &os, const L1GctJetEtCalibrationLut &lut)
 Overload << operator.

Detailed Description

Jet Et calibration LUT.

Author:
Robert Frazier & Greg Heath
Date:
May 2006

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.


Constructor & Destructor Documentation

L1GctJetEtCalibrationLut::L1GctJetEtCalibrationLut ( )

Definition at line 12 of file L1GctJetEtCalibrationLut.cc.

L1GctJetEtCalibrationLut::~L1GctJetEtCalibrationLut ( ) [virtual]

Definition at line 18 of file L1GctJetEtCalibrationLut.cc.

{
}

Member Function Documentation

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)

Definition at line 32 of file L1GctJetEtCalibrationLut.cc.

References eta(), and m_etaBin.

                                                           {
  static const unsigned nEtaBits = 4;
  static const uint8_t etaMask    = static_cast<uint8_t>((1 << nEtaBits) - 1);
  m_etaBin = static_cast<uint8_t>(eta) & etaMask;
}
void L1GctJetEtCalibrationLut::setFunction ( const L1GctJetFinderParams *const  lutfn)
void L1GctJetEtCalibrationLut::setOutputEtScale ( const L1CaloEtScale *const  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);
  }
}

Friends And Related Function Documentation

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;
}

Member Data Documentation

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().

Definition at line 61 of file L1GctJetEtCalibrationLut.h.

Referenced by etaBin(), and setEtaBin().

Definition at line 58 of file L1GctJetEtCalibrationLut.h.

Referenced by getFunction(), setFunction(), and value().

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.