CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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)
 
 ~L1GctJetEtCalibrationLut () override
 
- 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

uint16_t value (const uint16_t lutAddress) const override
 
- 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.

Base class for LookUp Tables.
Definition: L1GctLut.h:19
L1GctJetEtCalibrationLut::~L1GctJetEtCalibrationLut ( )
override

Definition at line 14 of file L1GctJetEtCalibrationLut.cc.

14 {}

Member Function Documentation

unsigned L1GctJetEtCalibrationLut::etaBin ( ) const
inline

Definition at line 45 of file L1GctJetEtCalibrationLut.h.

References m_etaBin.

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

45 { return static_cast<unsigned>(m_etaBin); }
const L1GctJetFinderParams* L1GctJetEtCalibrationLut::getFunction ( ) const
inline

Definition at line 43 of file L1GctJetEtCalibrationLut.h.

References m_lutFunction.

Referenced by operator<<().

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

Definition at line 44 of file L1GctJetEtCalibrationLut.h.

References m_outputEtScale.

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

Definition at line 23 of file L1GctJetEtCalibrationLut.cc.

References PVValHelper::eta, and m_etaBin.

23  {
24  static const unsigned nEtaBits = 4;
25  static const uint8_t etaMask = static_cast<uint8_t>((1 << nEtaBits) - 1);
26  m_etaBin = static_cast<uint8_t>(eta) & etaMask;
27 }
void L1GctJetEtCalibrationLut::setFunction ( const L1GctJetFinderParams *const  lutfn)

Definition at line 16 of file L1GctJetEtCalibrationLut.cc.

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

16  {
17  m_lutFunction = lutfn;
18  m_setupOk = (lutfn != nullptr);
19 }
const L1GctJetFinderParams * m_lutFunction
void L1GctJetEtCalibrationLut::setOutputEtScale ( const L1CaloEtScale *const  scale)
uint16_t L1GctJetEtCalibrationLut::value ( const uint16_t  lutAddress) const
overrideprotectedvirtual

Implements L1GctLut< 11, 6 >.

Definition at line 29 of file L1GctJetEtCalibrationLut.cc.

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

Referenced by Types.int32::__nonzero__(), Types.uint32::__nonzero__(), Types.int64::__nonzero__(), Types.uint64::__nonzero__(), Types.double::__nonzero__(), Types.bool::__nonzero__(), Types.string::__nonzero__(), average.Average::average(), Types.string::configValue(), Types.FileInPath::configValue(), Types.int32::insertInto(), Types.uint32::insertInto(), Types.int64::insertInto(), Types.uint64::insertInto(), Types.double::insertInto(), Types.bool::insertInto(), Types.string::insertInto(), Types.FileInPath::insertInto(), Types.vint32::insertInto(), Types.vuint32::insertInto(), Types.vint64::insertInto(), Types.vuint64::insertInto(), Types.vdouble::insertInto(), Types.vbool::insertInto(), and Types.vstring::insertInto().

29  {
30  static const uint16_t maxEtMask = static_cast<uint16_t>((1 << JET_ENERGY_BITWIDTH) - 1);
31  static const uint16_t tauBitMask = static_cast<uint16_t>(1 << (JET_ENERGY_BITWIDTH));
32  static const uint16_t ovrFlowOut = 0x3f;
33  uint16_t jetEt = lutAddress & maxEtMask;
34  // Check for saturation
35  if (jetEt == maxEtMask) {
36  return ovrFlowOut;
37  } else {
38  double uncoEt = static_cast<double>(jetEt) * m_outputEtScale->linearLsb();
39  bool tauVeto = ((lutAddress & tauBitMask) == 0);
40 
41  double corrEt = m_lutFunction->correctedEtGeV(uncoEt, etaBin(), tauVeto);
42  return m_outputEtScale->rank(corrEt);
43  }
44 }
double linearLsb() const
get LSB of linear input scale
Definition: L1CaloEtScale.h:54
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 46 of file L1GctJetEtCalibrationLut.cc.

46  {
47  os << std::endl;
48  os << "==================================================" << std::endl;
49  os << "===Level-1 Trigger: GCT Jet Et Calibration Lut===" << std::endl;
50  os << "==================================================" << std::endl;
51  os << "===Parameter settings for eta bin " << lut.etaBin() << "===" << std::endl;
52  os << *lut.getFunction() << std::endl;
53  os << "\n===Lookup table contents===\n" << std::endl;
55  os << *temp;
56  return os;
57 }
const L1GctJetFinderParams * getFunction() const
Base class for LookUp Tables.
Definition: L1GctLut.h:19

Member Data Documentation

const unsigned L1GctJetEtCalibrationLut::JET_ENERGY_BITWIDTH = 10
static

Input bitwidth of jet energy; must be 10 or more.

Definition at line 32 of file L1GctJetEtCalibrationLut.h.

Referenced by L1GctJet::lutValue(), and value().

uint8_t L1GctJetEtCalibrationLut::m_etaBin
private

Definition at line 57 of file L1GctJetEtCalibrationLut.h.

Referenced by etaBin(), and setEtaBin().

const L1GctJetFinderParams* L1GctJetEtCalibrationLut::m_lutFunction
private

Definition at line 54 of file L1GctJetEtCalibrationLut.h.

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

const L1CaloEtScale* L1GctJetEtCalibrationLut::m_outputEtScale
private

Definition at line 55 of file L1GctJetEtCalibrationLut.h.

Referenced by getOutputEtScale(), setOutputEtScale(), and value().

const int L1GctJetEtCalibrationLut::NAddress = 11
static

Definition at line 30 of file L1GctJetEtCalibrationLut.h.

const int L1GctJetEtCalibrationLut::NData = 6
static

Definition at line 31 of file L1GctJetEtCalibrationLut.h.