CMS 3D CMS Logo

List of all members | 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< 11, 6 >

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 ()
 
- Public Member Functions inherited from L1GctLut< 11, 6 >
uint16_t lutValue (const uint16_t lutAddress) const
 Access the look-up table contents for a given Address. More...
 
int operator!= (const L1GctLut< KAddressBits, KDataBits > &rhsLut) const
 Inequality check between look-up tables. More...
 
int operator== (const L1GctLut< KAddressBits, KDataBits > &rhsLut) const
 Equality check between look-up tables. More...
 
uint16_t operator[] (const uint16_t lutAddress) const
 Access the look-up table contents for a given Address. More...
 
void setTerse ()
 
bool setupOk ()
 
void setVerbose ()
 control output messages More...
 
virtual ~L1GctLut ()
 

Static Public Attributes

static const unsigned JET_ENERGY_BITWIDTH = 10
 Input bitwidth of jet energy; must be 10 or more. More...
 
static const int NAddress = 11
 
static const int NData = 6
 
- Static Public Attributes inherited from L1GctLut< 11, 6 >
static const uint16_t MAX_ADDRESS_BITMASK
 
static const uint16_t MAX_DATA_BITMASK
 

Protected Member Functions

virtual uint16_t value (const uint16_t lutAddress) const
 
- Protected Member Functions inherited from L1GctLut< 11, 6 >
bool equalityCheck (const L1GctLut< KAddressBits, KDataBits > &c) const
 
 L1GctLut ()
 

Private Attributes

uint8_t m_etaBin
 
const L1GctJetFinderParamsm_lutFunction
 
const L1CaloEtScalem_outputEtScale
 

Friends

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

Additional Inherited Members

- Protected Attributes inherited from L1GctLut< 11, 6 >
bool m_setupOk
 
bool m_verbose
 

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.

12  :
14 {
15 }
Base class for LookUp Tables.
Definition: L1GctLut.h:20
L1GctJetEtCalibrationLut::~L1GctJetEtCalibrationLut ( )
virtual

Definition at line 18 of file L1GctJetEtCalibrationLut.cc.

19 {
20 }

Member Function Documentation

unsigned L1GctJetEtCalibrationLut::etaBin ( ) const
inline

Definition at line 46 of file L1GctJetEtCalibrationLut.h.

References lumiPlot::lut, m_etaBin, operator<<, and value().

Referenced by operator<<(), and value().

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

44 { return m_lutFunction; }
const L1GctJetFinderParams * m_lutFunction
const L1CaloEtScale* L1GctJetEtCalibrationLut::getOutputEtScale ( ) const
inline

Definition at line 45 of file L1GctJetEtCalibrationLut.h.

References m_outputEtScale.

45 { return m_outputEtScale; }
const L1CaloEtScale * m_outputEtScale
void L1GctJetEtCalibrationLut::setEtaBin ( const unsigned  eta)

Definition at line 32 of file L1GctJetEtCalibrationLut.cc.

References PVValHelper::eta, and m_etaBin.

32  {
33  static const unsigned nEtaBits = 4;
34  static const uint8_t etaMask = static_cast<uint8_t>((1 << nEtaBits) - 1);
35  m_etaBin = static_cast<uint8_t>(eta) & etaMask;
36 }
void L1GctJetEtCalibrationLut::setFunction ( const L1GctJetFinderParams *const  lutfn)

Definition at line 22 of file L1GctJetEtCalibrationLut.cc.

References m_lutFunction, and L1GctLut< 11, 6 >::m_setupOk.

23 {
24  m_lutFunction = lutfn;
25  m_setupOk = (lutfn!=0);
26 }
const L1GctJetFinderParams * m_lutFunction
void L1GctJetEtCalibrationLut::setOutputEtScale ( const L1CaloEtScale *const  scale)

Definition at line 28 of file L1GctJetEtCalibrationLut.cc.

References m_outputEtScale, and Scenarios_cff::scale.

28  {
30 }
const L1CaloEtScale * m_outputEtScale
uint16_t L1GctJetEtCalibrationLut::value ( const uint16_t  lutAddress) const
protectedvirtual

Implements L1GctLut< 11, 6 >.

Definition at line 38 of file L1GctJetEtCalibrationLut.cc.

References L1GctJetFinderParams::correctedEtGeV(), etaBin(), JET_ENERGY_BITWIDTH, L1CaloEtScale::linearLsb(), m_lutFunction, m_outputEtScale, and L1CaloEtScale::rank().

Referenced by average.Average::average(), and etaBin().

39 {
40  static const uint16_t maxEtMask = static_cast<uint16_t>((1 << JET_ENERGY_BITWIDTH) - 1);
41  static const uint16_t tauBitMask = static_cast<uint16_t>( 1 << (JET_ENERGY_BITWIDTH));
42  static const uint16_t ovrFlowOut = 0x3f;
43  uint16_t jetEt = lutAddress & maxEtMask;
44  // Check for saturation
45  if (jetEt == maxEtMask) {
46  return ovrFlowOut;
47  } else {
48  double uncoEt = static_cast<double>(jetEt) * m_outputEtScale->linearLsb();
49  bool tauVeto = ((lutAddress & tauBitMask)==0);
50 
51  double corrEt = m_lutFunction->correctedEtGeV(uncoEt, etaBin(), tauVeto);
52  return m_outputEtScale->rank(corrEt);
53  }
54 }
double linearLsb() const
get LSB of linear input scale
Definition: L1CaloEtScale.h:53
uint16_t rank(const uint16_t linear) const
convert from linear Et scale to rank scale
const L1CaloEtScale * m_outputEtScale
double correctedEtGeV(const double et, const unsigned eta, const bool tauVeto) const
Eta takes a value from 0-10, corresponding to jet regions running from eta=0.0 to eta=5...
static const unsigned JET_ENERGY_BITWIDTH
Input bitwidth of jet energy; must be 10 or more.
const L1GctJetFinderParams * m_lutFunction

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.

Referenced by etaBin().

57 {
58  os << std::endl;
59  os << "==================================================" << std::endl;
60  os << "===Level-1 Trigger: GCT Jet Et Calibration Lut===" << std::endl;
61  os << "==================================================" << std::endl;
62  os << "===Parameter settings for eta bin " << lut.etaBin() << "===" << std::endl;
63  os << *lut.getFunction() << std::endl;
64  os << "\n===Lookup table contents===\n" << std::endl;
66  os << *temp;
67  return os;
68 }
const L1GctJetFinderParams * getFunction() const
Base class for LookUp Tables.
Definition: L1GctLut.h:20

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

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 = 11
static

Definition at line 31 of file L1GctJetEtCalibrationLut.h.

const int L1GctJetEtCalibrationLut::NData = 6
static

Definition at line 32 of file L1GctJetEtCalibrationLut.h.