L1 GCT internal energy sum. More...
#include <L1GctInternEtSum.h>
Public Types | |
enum | L1GctInternEtSumType { null, jet_tot_et, jet_tot_ht, jet_miss_et, total_et_or_ht, miss_etx_or_ety } |
et sum type - not clear this is required More... | |
enum | numberOfBits { kTotEtOrHtNBits = 12, kJetMissEtNBits = 17, kMissExOrEyNBits = 20, kTotEtOrHtOFlowBit = 1 << kTotEtOrHtNBits, kJetMissEtOFlowBit = 1 << kJetMissEtNBits, kMissExOrEyOFlowBit = 1 << kMissExOrEyNBits, kTotEtOrHtMaxValue = kTotEtOrHtOFlowBit - 1, kJetMissEtMaxValue = kJetMissEtOFlowBit - 1, kMissExOrEyMaxValue = kMissExOrEyOFlowBit - 1, kTotEtOrHtRawCtorMask = kTotEtOrHtOFlowBit | kTotEtOrHtMaxValue, kJetMissEtRawCtorMask = kJetMissEtOFlowBit | kJetMissEtMaxValue, kMissExOrEyRawCtorMask = kMissExOrEyOFlowBit | kMissExOrEyMaxValue } |
Public Member Functions | |
int16_t | bx () const |
get BX number | |
uint16_t | capBlock () const |
get capture block | |
uint16_t | capIndex () const |
get index within capture block | |
uint32_t | count () const |
get count | |
bool | empty () const |
is the sum non-zero | |
uint32_t | et () const |
get et | |
L1GctInternEtSum () | |
default constructor (for vector initialisation etc.) | |
L1GctInternEtSum (uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t et, uint8_t oflow) | |
construct from individual quantities | |
uint8_t | oflow () const |
get oflow | |
bool | operator!= (const L1GctInternEtSum &c) const |
inequality operator | |
bool | operator== (const L1GctInternEtSum &c) const |
operators | |
uint32_t | raw () const |
get the actual bits | |
void | setBx (uint16_t bx) |
set bx | |
void | setCapBlock (uint16_t capBlock) |
set cap block | |
void | setCapIndex (uint16_t capIndex) |
set cap index | |
void | setCount (uint32_t count) |
set count | |
void | setEt (uint32_t et) |
set Et sum | |
void | setOflow (uint8_t oflow) |
set overflow bit | |
void | setType (L1GctInternEtSumType type) |
set type | |
void | setValue (uint32_t val) |
set value | |
L1GctInternEtSum::L1GctInternEtSumType | type () const |
metadata | |
uint32_t | value () const |
get value | |
~L1GctInternEtSum () | |
destructor | |
Static Public Member Functions | |
static L1GctInternEtSum | fromEmulatorJetMissEt (int missEtxOrEty, bool overFlow, int16_t bx) |
static L1GctInternEtSum | fromEmulatorJetTotEt (unsigned totEt, bool overFlow, int16_t bx) |
Emulator constructors. | |
static L1GctInternEtSum | fromEmulatorJetTotHt (unsigned totHt, bool overFlow, int16_t bx) |
static L1GctInternEtSum | fromEmulatorMissEtxOrEty (int missEtxOrEty, bool overFlow, int16_t bx) |
static L1GctInternEtSum | fromEmulatorTotalEtOrHt (unsigned totEtOrHt, bool overFlow, int16_t bx) |
static L1GctInternEtSum | fromJetMissEt (uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data) |
static L1GctInternEtSum | fromJetTotEt (uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data) |
static L1GctInternEtSum | fromJetTotHt (uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data) |
static L1GctInternEtSum | fromMissEtxOrEty (uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data) |
static L1GctInternEtSum | fromTotalEtOrHt (uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data) |
Private Attributes | |
int16_t | bx_ |
uint16_t | capBlock_ |
uint16_t | capIndex_ |
uint32_t | data_ |
L1GctInternEtSumType | type_ |
et sum type - not clear this is required
Definition at line 20 of file L1GctInternEtSum.h.
{ null, jet_tot_et, // from jet_tot_et_and_ht in leaf output jet_tot_ht, // from jet_tot_et_and_ht in leaf output jet_miss_et, // leaf output total_et_or_ht, // conc input, wheel input and output miss_etx_or_ety // conc input, wheel input and output };
Definition at line 28 of file L1GctInternEtSum.h.
{ kTotEtOrHtNBits = 12, kJetMissEtNBits = 17, kMissExOrEyNBits = 20, kTotEtOrHtOFlowBit = 1 << kTotEtOrHtNBits, kJetMissEtOFlowBit = 1 << kJetMissEtNBits, kMissExOrEyOFlowBit = 1 << kMissExOrEyNBits, kTotEtOrHtMaxValue = kTotEtOrHtOFlowBit - 1, kJetMissEtMaxValue = kJetMissEtOFlowBit - 1, kMissExOrEyMaxValue = kMissExOrEyOFlowBit - 1, kTotEtOrHtRawCtorMask = kTotEtOrHtOFlowBit | kTotEtOrHtMaxValue, kJetMissEtRawCtorMask = kJetMissEtOFlowBit | kJetMissEtMaxValue, kMissExOrEyRawCtorMask = kMissExOrEyOFlowBit | kMissExOrEyMaxValue };
L1GctInternEtSum::L1GctInternEtSum | ( | ) |
default constructor (for vector initialisation etc.)
Definition at line 5 of file L1GctInternEtSum.cc.
{ }
L1GctInternEtSum::L1GctInternEtSum | ( | uint16_t | capBlock, |
uint16_t | capIndex, | ||
int16_t | bx, | ||
uint32_t | et, | ||
uint8_t | oflow | ||
) |
L1GctInternEtSum::~L1GctInternEtSum | ( | ) |
int16_t L1GctInternEtSum::bx | ( | ) | const [inline] |
get BX number
Definition at line 105 of file L1GctInternEtSum.h.
References bx_.
Referenced by operator<<(), operator==(), and setBx().
{ return bx_; }
uint16_t L1GctInternEtSum::capBlock | ( | ) | const [inline] |
get capture block
Definition at line 99 of file L1GctInternEtSum.h.
References capBlock_.
Referenced by operator<<(), and setCapBlock().
{ return capBlock_; }
uint16_t L1GctInternEtSum::capIndex | ( | ) | const [inline] |
get index within capture block
Definition at line 102 of file L1GctInternEtSum.h.
References capIndex_.
Referenced by operator<<(), and setCapIndex().
{ return capIndex_; }
uint32_t L1GctInternEtSum::count | ( | void | ) | const [inline] |
get count
Definition at line 123 of file L1GctInternEtSum.h.
References value().
{ return value(); }
bool L1GctInternEtSum::empty | ( | ) | const [inline] |
is the sum non-zero
Definition at line 108 of file L1GctInternEtSum.h.
References data_.
Referenced by operator<<().
{ return (data_ == 0); }
uint32_t L1GctInternEtSum::et | ( | ) | const [inline] |
get et
Definition at line 120 of file L1GctInternEtSum.h.
References value().
Referenced by operator<<().
{ return value(); }
L1GctInternEtSum L1GctInternEtSum::fromEmulatorJetMissEt | ( | int | missEtxOrEty, |
bool | overFlow, | ||
int16_t | bx | ||
) | [static] |
Definition at line 125 of file L1GctInternEtSum.cc.
References jet_miss_et, kJetMissEtMaxValue, kJetMissEtOFlowBit, alignCSCRings::s, setBx(), setEt(), setOflow(), and setType().
Referenced by L1GctJetLeafCard::getInternalEtSums(), and L1GctJetFinderBase::getInternalEtSums().
{ L1GctInternEtSum s; s.setEt(missEtxOrEty & kJetMissEtMaxValue); if (overFlow || (missEtxOrEty >= kJetMissEtOFlowBit/2) || (missEtxOrEty < -kJetMissEtOFlowBit/2)) s.setOflow(0x1); s.setBx(bx); s.setType(jet_miss_et); return s; }
L1GctInternEtSum L1GctInternEtSum::fromEmulatorJetTotEt | ( | unsigned | totEt, |
bool | overFlow, | ||
int16_t | bx | ||
) | [static] |
Emulator constructors.
Definition at line 107 of file L1GctInternEtSum.cc.
References jet_tot_et, kTotEtOrHtMaxValue, alignCSCRings::s, setBx(), setEt(), setOflow(), and setType().
Referenced by L1GctJetLeafCard::getInternalEtSums(), and L1GctJetFinderBase::getInternalEtSums().
{ L1GctInternEtSum s; s.setEt(totEt & kTotEtOrHtMaxValue); if (overFlow || (totEt > kTotEtOrHtMaxValue)) s.setOflow(0x1); s.setBx(bx); s.setType(jet_tot_et); return s; }
L1GctInternEtSum L1GctInternEtSum::fromEmulatorJetTotHt | ( | unsigned | totHt, |
bool | overFlow, | ||
int16_t | bx | ||
) | [static] |
Definition at line 116 of file L1GctInternEtSum.cc.
References jet_tot_ht, kTotEtOrHtMaxValue, alignCSCRings::s, setBx(), setEt(), setOflow(), and setType().
Referenced by L1GctJetLeafCard::getInternalEtSums(), and L1GctJetFinderBase::getInternalEtSums().
{ L1GctInternEtSum s; s.setEt(totHt & kTotEtOrHtMaxValue); if (overFlow || (totHt > kTotEtOrHtMaxValue)) s.setOflow(0x1); s.setBx(bx); s.setType(jet_tot_ht); return s; }
L1GctInternEtSum L1GctInternEtSum::fromEmulatorMissEtxOrEty | ( | int | missEtxOrEty, |
bool | overFlow, | ||
int16_t | bx | ||
) | [static] |
Definition at line 143 of file L1GctInternEtSum.cc.
References kMissExOrEyMaxValue, kMissExOrEyOFlowBit, miss_etx_or_ety, alignCSCRings::s, setBx(), setEt(), setOflow(), and setType().
Referenced by L1GctWheelEnergyFpga::getInternalEtSums().
{ L1GctInternEtSum s; s.setEt(missEtxOrEty & kMissExOrEyMaxValue); if (overFlow || (missEtxOrEty >= kMissExOrEyOFlowBit/2) || (missEtxOrEty < -kMissExOrEyOFlowBit/2)) s.setOflow(0x1); s.setBx(bx); s.setType(miss_etx_or_ety); return s; }
L1GctInternEtSum L1GctInternEtSum::fromEmulatorTotalEtOrHt | ( | unsigned | totEtOrHt, |
bool | overFlow, | ||
int16_t | bx | ||
) | [static] |
Definition at line 134 of file L1GctInternEtSum.cc.
References kTotEtOrHtMaxValue, alignCSCRings::s, setBx(), setEt(), setOflow(), setType(), and total_et_or_ht.
Referenced by L1GctWheelEnergyFpga::getInternalEtSums().
{ L1GctInternEtSum s; s.setEt(totEtOrHt & kTotEtOrHtMaxValue); if (overFlow || (totEtOrHt > kTotEtOrHtMaxValue)) s.setOflow(0x1); s.setBx(bx); s.setType(total_et_or_ht); return s; }
L1GctInternEtSum L1GctInternEtSum::fromJetMissEt | ( | uint16_t | capBlock, |
uint16_t | capIndex, | ||
int16_t | bx, | ||
uint32_t | data | ||
) | [static] |
Definition at line 61 of file L1GctInternEtSum.cc.
References jet_miss_et, kJetMissEtMaxValue, kJetMissEtNBits, alignCSCRings::s, setBx(), setCapBlock(), setCapIndex(), setEt(), setOflow(), and setType().
Referenced by GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster(), and GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster().
{ L1GctInternEtSum s; s.setEt(data & kJetMissEtMaxValue); s.setOflow((data>>kJetMissEtNBits) & 0x1); s.setCapBlock(capBlock); s.setCapIndex(capIndex); s.setBx(bx); s.setType(jet_miss_et); return s; }
L1GctInternEtSum L1GctInternEtSum::fromJetTotEt | ( | uint16_t | capBlock, |
uint16_t | capIndex, | ||
int16_t | bx, | ||
uint32_t | data | ||
) | [static] |
Definition at line 32 of file L1GctInternEtSum.cc.
References jet_tot_et, kTotEtOrHtMaxValue, kTotEtOrHtNBits, alignCSCRings::s, setBx(), setCapBlock(), setCapIndex(), setEt(), setOflow(), and setType().
Referenced by GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster(), and GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster().
{ L1GctInternEtSum s; s.setEt(data & kTotEtOrHtMaxValue); s.setOflow((data>>kTotEtOrHtNBits)&0x1); s.setCapBlock(capBlock); s.setCapIndex(capIndex); s.setBx(bx); s.setType(jet_tot_et); return s; }
L1GctInternEtSum L1GctInternEtSum::fromJetTotHt | ( | uint16_t | capBlock, |
uint16_t | capIndex, | ||
int16_t | bx, | ||
uint32_t | data | ||
) | [static] |
Definition at line 46 of file L1GctInternEtSum.cc.
References jet_tot_ht, kTotEtOrHtMaxValue, kTotEtOrHtNBits, alignCSCRings::s, setBx(), setCapBlock(), setCapIndex(), setEt(), setOflow(), and setType().
Referenced by GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster(), and GctFormatTranslateV38::blockToGctInternEtSumsAndJetCluster().
{ L1GctInternEtSum s; uint32_t word=data>>16; s.setEt(word & kTotEtOrHtMaxValue); s.setOflow((word>>kTotEtOrHtNBits)&0x1); s.setCapBlock(capBlock); s.setCapIndex(capIndex); s.setBx(bx); s.setType(jet_tot_ht); return s; }
L1GctInternEtSum L1GctInternEtSum::fromMissEtxOrEty | ( | uint16_t | capBlock, |
uint16_t | capIndex, | ||
int16_t | bx, | ||
uint32_t | data | ||
) | [static] |
Definition at line 90 of file L1GctInternEtSum.cc.
References kMissExOrEyNBits, miss_etx_or_ety, alignCSCRings::s, setBx(), setCapBlock(), setCapIndex(), setEt(), setOflow(), and setType().
Referenced by GctFormatTranslateV35::blockToGctWheelInputInternEtAndRingSums(), GctFormatTranslateV38::blockToGctWheelInputInternEtAndRingSums(), GctFormatTranslateV35::blockToGctWheelOutputInternEtAndRingSums(), and GctFormatTranslateV38::blockToGctWheelOutputInternEtAndRingSums().
{ L1GctInternEtSum s; s.setEt(data & kMissExOrEyNBits); s.setOflow(0); // No over flow bit at the moment s.setCapBlock(capBlock); s.setCapIndex(capIndex); s.setBx(bx); s.setType(miss_etx_or_ety); return s; }
L1GctInternEtSum L1GctInternEtSum::fromTotalEtOrHt | ( | uint16_t | capBlock, |
uint16_t | capIndex, | ||
int16_t | bx, | ||
uint32_t | data | ||
) | [static] |
Definition at line 76 of file L1GctInternEtSum.cc.
References kTotEtOrHtMaxValue, kTotEtOrHtNBits, alignCSCRings::s, setBx(), setCapBlock(), setCapIndex(), setEt(), setOflow(), setType(), and total_et_or_ht.
Referenced by GctFormatTranslateV35::blockToGctInternEtSums(), GctFormatTranslateV38::blockToGctInternEtSums(), GctFormatTranslateV35::blockToGctWheelInputInternEtAndRingSums(), GctFormatTranslateV38::blockToGctWheelInputInternEtAndRingSums(), GctFormatTranslateV35::blockToGctWheelOutputInternEtAndRingSums(), and GctFormatTranslateV38::blockToGctWheelOutputInternEtAndRingSums().
{ L1GctInternEtSum s; s.setEt(data & kTotEtOrHtMaxValue); s.setOflow((data>>kTotEtOrHtNBits) & 0x1); s.setCapBlock(capBlock); s.setCapIndex(capIndex); s.setBx(bx); s.setType(total_et_or_ht); return s; }
uint8_t L1GctInternEtSum::oflow | ( | ) | const [inline] |
get oflow
Definition at line 126 of file L1GctInternEtSum.h.
References data_.
Referenced by operator<<().
{ return (data_>>31) & 0x1; }
bool L1GctInternEtSum::operator!= | ( | const L1GctInternEtSum & | c | ) | const [inline] |
inequality operator
Definition at line 162 of file L1GctInternEtSum.h.
References trackerHits::c.
{ return !(*this == c); }
bool L1GctInternEtSum::operator== | ( | const L1GctInternEtSum & | c | ) | const |
uint32_t L1GctInternEtSum::raw | ( | ) | const [inline] |
get the actual bits
get the raw data
Definition at line 114 of file L1GctInternEtSum.h.
References data_.
Referenced by operator==().
{ return data_; }
void L1GctInternEtSum::setBx | ( | uint16_t | bx | ) | [inline] |
set bx
Definition at line 138 of file L1GctInternEtSum.h.
Referenced by fromEmulatorJetMissEt(), fromEmulatorJetTotEt(), fromEmulatorJetTotHt(), fromEmulatorMissEtxOrEty(), fromEmulatorTotalEtOrHt(), fromJetMissEt(), fromJetTotEt(), fromJetTotHt(), fromMissEtxOrEty(), and fromTotalEtOrHt().
void L1GctInternEtSum::setCapBlock | ( | uint16_t | capBlock | ) | [inline] |
set cap block
Definition at line 132 of file L1GctInternEtSum.h.
References capBlock(), and capBlock_.
Referenced by fromJetMissEt(), fromJetTotEt(), fromJetTotHt(), fromMissEtxOrEty(), and fromTotalEtOrHt().
void L1GctInternEtSum::setCapIndex | ( | uint16_t | capIndex | ) | [inline] |
set cap index
Definition at line 135 of file L1GctInternEtSum.h.
References capIndex(), and capIndex_.
Referenced by fromJetMissEt(), fromJetTotEt(), fromJetTotHt(), fromMissEtxOrEty(), and fromTotalEtOrHt().
void L1GctInternEtSum::setCount | ( | uint32_t | count | ) |
void L1GctInternEtSum::setEt | ( | uint32_t | et | ) |
set Et sum
set et
Definition at line 165 of file L1GctInternEtSum.cc.
References setValue().
Referenced by fromEmulatorJetMissEt(), fromEmulatorJetTotEt(), fromEmulatorJetTotHt(), fromEmulatorMissEtxOrEty(), fromEmulatorTotalEtOrHt(), fromJetMissEt(), fromJetTotEt(), fromJetTotHt(), fromMissEtxOrEty(), fromTotalEtOrHt(), and L1GctInternEtSum().
void L1GctInternEtSum::setOflow | ( | uint8_t | oflow | ) |
set overflow bit
Definition at line 175 of file L1GctInternEtSum.cc.
References data_.
Referenced by fromEmulatorJetMissEt(), fromEmulatorJetTotEt(), fromEmulatorJetTotHt(), fromEmulatorMissEtxOrEty(), fromEmulatorTotalEtOrHt(), fromJetMissEt(), fromJetTotEt(), fromJetTotHt(), fromMissEtxOrEty(), fromTotalEtOrHt(), and L1GctInternEtSum().
void L1GctInternEtSum::setType | ( | L1GctInternEtSumType | type | ) | [inline] |
set type
Definition at line 141 of file L1GctInternEtSum.h.
Referenced by fromEmulatorJetMissEt(), fromEmulatorJetTotEt(), fromEmulatorJetTotHt(), fromEmulatorMissEtxOrEty(), fromEmulatorTotalEtOrHt(), fromJetMissEt(), fromJetTotEt(), fromJetTotHt(), fromMissEtxOrEty(), and fromTotalEtOrHt().
void L1GctInternEtSum::setValue | ( | uint32_t | val | ) |
set value
Definition at line 159 of file L1GctInternEtSum.cc.
References data_.
Referenced by setCount(), and setEt().
L1GctInternEtSum::L1GctInternEtSumType L1GctInternEtSum::type | ( | ) | const [inline] |
metadata
'type' of object - not required?
Definition at line 96 of file L1GctInternEtSum.h.
References type_.
Referenced by operator<<(), and setType().
{ return type_; }
uint32_t L1GctInternEtSum::value | ( | ) | const [inline] |
int16_t L1GctInternEtSum::bx_ [private] |
Definition at line 173 of file L1GctInternEtSum.h.
Referenced by bx(), operator==(), and setBx().
uint16_t L1GctInternEtSum::capBlock_ [private] |
Definition at line 171 of file L1GctInternEtSum.h.
Referenced by capBlock(), and setCapBlock().
uint16_t L1GctInternEtSum::capIndex_ [private] |
Definition at line 172 of file L1GctInternEtSum.h.
Referenced by capIndex(), and setCapIndex().
uint32_t L1GctInternEtSum::data_ [private] |
Definition at line 176 of file L1GctInternEtSum.h.
Referenced by empty(), oflow(), operator==(), raw(), setOflow(), setValue(), and value().
L1GctInternEtSumType L1GctInternEtSum::type_ [private] |
Definition at line 168 of file L1GctInternEtSum.h.