CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes
L1GctHFRingEtSums Class Reference

L1 GCT HF ring Et sums. More...

#include <L1GctHFRingEtSums.h>

Public Member Functions

int16_t bx () const
 get BX number More...
 
uint16_t capBlock () const
 get GCT unpacker capture block More...
 
uint16_t capIndex () const
 get index within GCT unpacker capture block More...
 
bool empty () const
 is the sum non-zero More...
 
uint16_t etSum (unsigned const i) const
 
 L1GctHFRingEtSums ()
 default constructor (for vector initialisation etc.) More...
 
bool operator!= (const L1GctHFRingEtSums &c) const
 inequality operator More...
 
bool operator== (const L1GctHFRingEtSums &c) const
 operators More...
 
uint16_t raw () const
 get the raw data More...
 
void setBx (uint16_t bx)
 set bx More...
 
void setCapBlock (uint16_t capBlock)
 set cap block More...
 
void setCapIndex (uint16_t capIndex)
 set cap index More...
 
void setData (uint32_t data)
 set the raw data More...
 
void setEtSum (unsigned i, uint16_t et)
 set a sum More...
 
 ~L1GctHFRingEtSums ()
 destructor More...
 

Static Public Member Functions

static L1GctHFRingEtSums fromConcRingSums (const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
 
static L1GctHFRingEtSums fromGctEmulator (const int16_t bx, const uint16_t etSumPosEtaRing1, const uint16_t etSumNegEtaRing1, const uint16_t etSumPosEtaRing2, const uint16_t etSumNegEtaRing2)
 named ctor for GCT emulator More...
 
static unsigned nSums ()
 

Static Public Attributes

static const unsigned N_SUMS = 4
 

Private Attributes

int16_t bx_
 
uint16_t capBlock_
 
uint16_t capIndex_
 
uint16_t data_
 

Detailed Description

L1 GCT HF ring Et sums.

Author
Jim Brooke
Date
August 2008

Will store four Et sums of 3 bits each

Definition at line 16 of file L1GctHFRingEtSums.h.

Constructor & Destructor Documentation

◆ L1GctHFRingEtSums()

L1GctHFRingEtSums::L1GctHFRingEtSums ( )

default constructor (for vector initialisation etc.)

set static consts

default constructor (for vector initialisation etc.)

Definition at line 8 of file L1GctHFRingEtSums.cc.

8 : capBlock_(0), capIndex_(0), bx_(0), data_(0) {}

◆ ~L1GctHFRingEtSums()

L1GctHFRingEtSums::~L1GctHFRingEtSums ( )

destructor

Definition at line 11 of file L1GctHFRingEtSums.cc.

11 {}

Member Function Documentation

◆ bx()

int16_t L1GctHFRingEtSums::bx ( ) const
inline

get BX number

Definition at line 58 of file L1GctHFRingEtSums.h.

58 { return bx_; }

References bx_.

Referenced by fromConcRingSums(), fromGctEmulator(), and setBx().

◆ capBlock()

uint16_t L1GctHFRingEtSums::capBlock ( ) const
inline

get GCT unpacker capture block

Definition at line 52 of file L1GctHFRingEtSums.h.

52 { return capBlock_; }

References capBlock_.

Referenced by fromConcRingSums(), and setCapBlock().

◆ capIndex()

uint16_t L1GctHFRingEtSums::capIndex ( ) const
inline

get index within GCT unpacker capture block

Definition at line 55 of file L1GctHFRingEtSums.h.

55 { return capIndex_; }

References capIndex_.

Referenced by fromConcRingSums(), and setCapIndex().

◆ empty()

bool L1GctHFRingEtSums::empty ( ) const
inline

is the sum non-zero

Definition at line 61 of file L1GctHFRingEtSums.h.

61 { return (data_ == 0); }

References data_.

◆ etSum()

uint16_t L1GctHFRingEtSums::etSum ( unsigned const  i) const

get an Et sum index : sum 0 : Ring 1 Positive Rapidity HF Et sum 1 : Ring 1 Negative Rapidity HF Et sum 2 : Ring 2 Positive Rapidity HF Et sum 3 : Ring 2 Negative Rapidity HF Et sum

Definition at line 50 of file L1GctHFRingEtSums.cc.

50 { return (data_ >> (i * 3)) & 0x7; }

References data_, and mps_fire::i.

Referenced by L1GtHfRingEtSumsCondition::evaluateCondition(), and L1GlobalTriggerPSB::fillPsbBlock().

◆ fromConcRingSums()

L1GctHFRingEtSums L1GctHFRingEtSums::fromConcRingSums ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
)
static

named ctor for unpacker note that this expects a 32 bit word that also contains the HF bit counts, which are ignored

Definition at line 14 of file L1GctHFRingEtSums.cc.

17  {
19  s.setCapBlock(capBlock);
20  s.setCapIndex(capIndex);
21  s.setBx(bx);
22  s.setEtSum(0, (data >> 12) & 0x7);
23  s.setEtSum(1, (data >> 16) & 0x7);
24  s.setEtSum(2, (data >> 19) & 0x7);
25  s.setEtSum(3, (data >> 22) & 0x7);
26  return s;
27 }

References bx(), capBlock(), capIndex(), data, and alignCSCRings::s.

Referenced by GctFormatTranslateV35::blockToGctJetCandsAndCounts(), GctFormatTranslateV38::blockToGctJetCandsAndCounts(), and GctFormatTranslateMCLegacy::blockToGctJetCandsAndCounts().

◆ fromGctEmulator()

L1GctHFRingEtSums L1GctHFRingEtSums::fromGctEmulator ( const int16_t  bx,
const uint16_t  etSumPosEtaRing1,
const uint16_t  etSumNegEtaRing1,
const uint16_t  etSumPosEtaRing2,
const uint16_t  etSumNegEtaRing2 
)
static

named ctor for GCT emulator

Definition at line 30 of file L1GctHFRingEtSums.cc.

34  {
36  s.setBx(bx);
37  s.setEtSum(0, etSumPosEtaRing1);
38  s.setEtSum(1, etSumNegEtaRing1);
39  s.setEtSum(2, etSumPosEtaRing2);
40  s.setEtSum(3, etSumNegEtaRing2);
41  return s;
42 }

References bx(), and alignCSCRings::s.

Referenced by L1GlobalCaloTrigger::getHFRingEtSumsCollection(), and L1TCaloUpgradeToGCTConverter::produce().

◆ nSums()

static unsigned L1GctHFRingEtSums::nSums ( )
inlinestatic

Definition at line 47 of file L1GctHFRingEtSums.h.

47 { return N_SUMS; }

References N_SUMS.

Referenced by L1GlobalTriggerPSB::fillPsbBlock().

◆ operator!=()

bool L1GctHFRingEtSums::operator!= ( const L1GctHFRingEtSums c) const
inline

inequality operator

Definition at line 97 of file L1GctHFRingEtSums.h.

97 { return !(*this == c); }

References c.

◆ operator==()

bool L1GctHFRingEtSums::operator== ( const L1GctHFRingEtSums c) const

operators

equality operator

Definition at line 53 of file L1GctHFRingEtSums.cc.

53 { return (this->raw() == c.raw()); }

References raw().

◆ raw()

uint16_t L1GctHFRingEtSums::raw ( ) const
inline

get the raw data

Definition at line 64 of file L1GctHFRingEtSums.h.

64 { return data_; }

References data_.

Referenced by L1GtPatternGenerator::analyze(), and operator==().

◆ setBx()

void L1GctHFRingEtSums::setBx ( uint16_t  bx)
inline

set bx

Definition at line 83 of file L1GctHFRingEtSums.h.

83 { bx_ = bx; }

References bx(), and bx_.

◆ setCapBlock()

void L1GctHFRingEtSums::setCapBlock ( uint16_t  capBlock)
inline

set cap block

Definition at line 77 of file L1GctHFRingEtSums.h.

77 { capBlock_ = capBlock; }

References capBlock(), and capBlock_.

◆ setCapIndex()

void L1GctHFRingEtSums::setCapIndex ( uint16_t  capIndex)
inline

set cap index

Definition at line 80 of file L1GctHFRingEtSums.h.

80 { capIndex_ = capIndex; }

References capIndex(), and capIndex_.

◆ setData()

void L1GctHFRingEtSums::setData ( uint32_t  data)
inline

set the raw data

Definition at line 89 of file L1GctHFRingEtSums.h.

89 { data_ = data; }

References data, and data_.

◆ setEtSum()

void L1GctHFRingEtSums::setEtSum ( unsigned  i,
uint16_t  et 
)

set a sum

Definition at line 56 of file L1GctHFRingEtSums.cc.

56  {
57  data_ &= ~(0x7 << (i * 3));
58  data_ |= (et & 0x7) << (i * 3);
59 }

References data_, EgHLTOffHistBins_cfi::et, and mps_fire::i.

Referenced by L1TCaloUpgradeToGCTConverter::produce().

Member Data Documentation

◆ bx_

int16_t L1GctHFRingEtSums::bx_
private

Definition at line 103 of file L1GctHFRingEtSums.h.

Referenced by bx(), and setBx().

◆ capBlock_

uint16_t L1GctHFRingEtSums::capBlock_
private

Definition at line 101 of file L1GctHFRingEtSums.h.

Referenced by capBlock(), and setCapBlock().

◆ capIndex_

uint16_t L1GctHFRingEtSums::capIndex_
private

Definition at line 102 of file L1GctHFRingEtSums.h.

Referenced by capIndex(), and setCapIndex().

◆ data_

uint16_t L1GctHFRingEtSums::data_
private

Definition at line 106 of file L1GctHFRingEtSums.h.

Referenced by empty(), etSum(), raw(), setData(), and setEtSum().

◆ N_SUMS

const unsigned L1GctHFRingEtSums::N_SUMS = 4
static

Definition at line 18 of file L1GctHFRingEtSums.h.

Referenced by nSums().

mps_fire.i
i
Definition: mps_fire.py:428
L1GctHFRingEtSums
L1 GCT HF ring Et sums.
Definition: L1GctHFRingEtSums.h:16
L1GctHFRingEtSums::capIndex_
uint16_t capIndex_
Definition: L1GctHFRingEtSums.h:102
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1GctHFRingEtSums::capBlock
uint16_t capBlock() const
get GCT unpacker capture block
Definition: L1GctHFRingEtSums.h:52
L1GctHFRingEtSums::capIndex
uint16_t capIndex() const
get index within GCT unpacker capture block
Definition: L1GctHFRingEtSums.h:55
L1GctHFRingEtSums::N_SUMS
static const unsigned N_SUMS
Definition: L1GctHFRingEtSums.h:18
L1GctHFRingEtSums::bx
int16_t bx() const
get BX number
Definition: L1GctHFRingEtSums.h:58
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
L1GctHFRingEtSums::data_
uint16_t data_
Definition: L1GctHFRingEtSums.h:106
L1GctHFRingEtSums::capBlock_
uint16_t capBlock_
Definition: L1GctHFRingEtSums.h:101
L1GctHFRingEtSums::bx_
int16_t bx_
Definition: L1GctHFRingEtSums.h:103
L1GctHFRingEtSums::raw
uint16_t raw() const
get the raw data
Definition: L1GctHFRingEtSums.h:64
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56