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)
 
 ~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::L1GctJetEtCalibrationLut ( )

Definition at line 12 of file L1GctJetEtCalibrationLut.cc.

◆ ~L1GctJetEtCalibrationLut()

L1GctJetEtCalibrationLut::~L1GctJetEtCalibrationLut ( )
override

Definition at line 14 of file L1GctJetEtCalibrationLut.cc.

14 {}

Member Function Documentation

◆ etaBin()

unsigned L1GctJetEtCalibrationLut::etaBin ( ) const
inline

Definition at line 45 of file L1GctJetEtCalibrationLut.h.

45 { return static_cast<unsigned>(m_etaBin); }

References m_etaBin.

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

◆ getFunction()

const L1GctJetFinderParams* L1GctJetEtCalibrationLut::getFunction ( ) const
inline

Definition at line 43 of file L1GctJetEtCalibrationLut.h.

43 { return m_lutFunction; }

References m_lutFunction.

Referenced by operator<<().

◆ getOutputEtScale()

const L1CaloEtScale* L1GctJetEtCalibrationLut::getOutputEtScale ( ) const
inline

Definition at line 44 of file L1GctJetEtCalibrationLut.h.

44 { return m_outputEtScale; }

References m_outputEtScale.

◆ setEtaBin()

void L1GctJetEtCalibrationLut::setEtaBin ( const unsigned  eta)

Definition at line 23 of file L1GctJetEtCalibrationLut.cc.

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 }

References PVValHelper::eta, and m_etaBin.

◆ setFunction()

void L1GctJetEtCalibrationLut::setFunction ( const L1GctJetFinderParams *const  lutfn)

Definition at line 16 of file L1GctJetEtCalibrationLut.cc.

16  {
17  m_lutFunction = lutfn;
18  m_setupOk = (lutfn != nullptr);
19 }

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

◆ setOutputEtScale()

void L1GctJetEtCalibrationLut::setOutputEtScale ( const L1CaloEtScale *const  scale)

◆ value()

uint16_t L1GctJetEtCalibrationLut::value ( const uint16_t  lutAddress) const
overrideprotectedvirtual

Implements L1GctLut< 11, 6 >.

Definition at line 29 of file L1GctJetEtCalibrationLut.cc.

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 }

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

Referenced by average.Average::average().

Friends And Related Function Documentation

◆ operator<<

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 }

Member Data Documentation

◆ JET_ENERGY_BITWIDTH

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

◆ m_etaBin

uint8_t L1GctJetEtCalibrationLut::m_etaBin
private

Definition at line 57 of file L1GctJetEtCalibrationLut.h.

Referenced by etaBin(), and setEtaBin().

◆ m_lutFunction

const L1GctJetFinderParams* L1GctJetEtCalibrationLut::m_lutFunction
private

Definition at line 54 of file L1GctJetEtCalibrationLut.h.

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

◆ m_outputEtScale

const L1CaloEtScale* L1GctJetEtCalibrationLut::m_outputEtScale
private

Definition at line 55 of file L1GctJetEtCalibrationLut.h.

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

◆ NAddress

const int L1GctJetEtCalibrationLut::NAddress = 11
static

Definition at line 30 of file L1GctJetEtCalibrationLut.h.

◆ NData

const int L1GctJetEtCalibrationLut::NData = 6
static

Definition at line 31 of file L1GctJetEtCalibrationLut.h.

L1GctJetEtCalibrationLut::m_etaBin
uint8_t m_etaBin
Definition: L1GctJetEtCalibrationLut.h:57
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
L1GctJetEtCalibrationLut::JET_ENERGY_BITWIDTH
static const unsigned JET_ENERGY_BITWIDTH
Input bitwidth of jet energy; must be 10 or more.
Definition: L1GctJetEtCalibrationLut.h:32
PVValHelper::eta
Definition: PVValidationHelpers.h:69
L1GctLut< 11, 6 >::m_setupOk
bool m_setupOk
Definition: L1GctLut.h:77
L1GctJetFinderParams::correctedEtGeV
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....
Definition: L1GctJetFinderParams.cc:177
L1CaloEtScale::linearLsb
double linearLsb() const
get LSB of linear input scale
Definition: L1CaloEtScale.h:54
L1GctJetEtCalibrationLut::getFunction
const L1GctJetFinderParams * getFunction() const
Definition: L1GctJetEtCalibrationLut.h:43
L1CaloEtScale::rank
uint16_t rank(const uint16_t linear) const
convert from linear Et scale to rank scale
Definition: L1CaloEtScale.cc:52
L1GctJetEtCalibrationLut::m_lutFunction
const L1GctJetFinderParams * m_lutFunction
Definition: L1GctJetEtCalibrationLut.h:54
L1GctLut
Base class for LookUp Tables.
Definition: L1GctLut.h:19
L1GctJetEtCalibrationLut::etaBin
unsigned etaBin() const
Definition: L1GctJetEtCalibrationLut.h:45
L1GctJetEtCalibrationLut::m_outputEtScale
const L1CaloEtScale * m_outputEtScale
Definition: L1GctJetEtCalibrationLut.h:55