CMS 3D CMS Logo

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

L1 GCT HF ring Et sums. More...

#include <L1GctHFBitCounts.h>

Public Member Functions

uint16_t bitCount (unsigned const i) const
 
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...
 
 L1GctHFBitCounts ()
 default constructor (for vector initialisation etc.) More...
 
bool operator!= (const L1GctHFBitCounts &c) const
 inequality operator More...
 
bool operator== (const L1GctHFBitCounts &c) const
 operators More...
 
uint16_t raw () const
 the raw data More...
 
void setBitCount (unsigned i, uint16_t c)
 set a sum More...
 
void setBx (int16_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...
 
 ~L1GctHFBitCounts ()
 destructor More...
 

Static Public Member Functions

static L1GctHFBitCounts fromConcHFBitCounts (const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
 
static L1GctHFBitCounts fromGctEmulator (const int16_t bx, const uint16_t bitCountPosEtaRing1, const uint16_t bitCountNegEtaRing1, const uint16_t bitCountPosEtaRing2, const uint16_t bitCountNegEtaRing2)
 named ctor for GCT emulator More...
 
static unsigned nCounts ()
 

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 L1GctHFBitCounts.h.

Constructor & Destructor Documentation

◆ L1GctHFBitCounts()

L1GctHFBitCounts::L1GctHFBitCounts ( )

default constructor (for vector initialisation etc.)

set static consts

default constructor (for vector initialisation etc.)

Definition at line 8 of file L1GctHFBitCounts.cc.

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

◆ ~L1GctHFBitCounts()

L1GctHFBitCounts::~L1GctHFBitCounts ( )

destructor

Definition at line 11 of file L1GctHFBitCounts.cc.

11 {}

Member Function Documentation

◆ bitCount()

uint16_t L1GctHFBitCounts::bitCount ( unsigned const  i) const

get a bit count index : sum 0 : Ring 1 Positive Rapidity HF bit count 1 : Ring 1 Negative Rapidity HF bit count 2 : Ring 2 Positive Rapidity HF bit count 3 : Ring 2 Negative Rapidity HF bit count

Definition at line 47 of file L1GctHFBitCounts.cc.

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

References data_, and mps_fire::i.

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

◆ bx()

int16_t L1GctHFBitCounts::bx ( ) const
inline

get BX number

Definition at line 58 of file L1GctHFBitCounts.h.

58 { return bx_; }

References bx_.

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

◆ capBlock()

uint16_t L1GctHFBitCounts::capBlock ( ) const
inline

get GCT unpacker capture block

Definition at line 52 of file L1GctHFBitCounts.h.

52 { return capBlock_; }

References capBlock_.

Referenced by fromConcHFBitCounts(), and setCapBlock().

◆ capIndex()

uint16_t L1GctHFBitCounts::capIndex ( ) const
inline

get index within GCT unpacker capture block

Definition at line 55 of file L1GctHFBitCounts.h.

55 { return capIndex_; }

References capIndex_.

Referenced by fromConcHFBitCounts(), and setCapIndex().

◆ empty()

bool L1GctHFBitCounts::empty ( ) const
inline

is the sum non-zero

Definition at line 61 of file L1GctHFBitCounts.h.

61 { return (data_ == 0); }

References data_.

◆ fromConcHFBitCounts()

L1GctHFBitCounts L1GctHFBitCounts::fromConcHFBitCounts ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
)
static

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

Definition at line 14 of file L1GctHFBitCounts.cc.

17  {
19  c.setCapBlock(capBlock);
20  c.setCapIndex(capIndex);
21  c.setBx(bx);
22  c.setData(data & 0xfff);
23  return c;
24 }

References bx(), c, capBlock(), capIndex(), and data.

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

◆ fromGctEmulator()

L1GctHFBitCounts L1GctHFBitCounts::fromGctEmulator ( const int16_t  bx,
const uint16_t  bitCountPosEtaRing1,
const uint16_t  bitCountNegEtaRing1,
const uint16_t  bitCountPosEtaRing2,
const uint16_t  bitCountNegEtaRing2 
)
static

named ctor for GCT emulator

Definition at line 27 of file L1GctHFBitCounts.cc.

31  {
33  c.setBx(bx);
34  c.setBitCount(0, bitCountPosEtaRing1);
35  c.setBitCount(1, bitCountNegEtaRing1);
36  c.setBitCount(2, bitCountPosEtaRing2);
37  c.setBitCount(3, bitCountNegEtaRing2);
38  return c;
39 }

References bx(), and c.

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

◆ nCounts()

static unsigned L1GctHFBitCounts::nCounts ( )
inlinestatic

Definition at line 49 of file L1GctHFBitCounts.h.

49 { return N_SUMS; }

References N_SUMS.

Referenced by L1GlobalTriggerPSB::fillPsbBlock().

◆ operator!=()

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

inequality operator

Definition at line 97 of file L1GctHFBitCounts.h.

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

References c.

◆ operator==()

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

operators

equality operator

Definition at line 50 of file L1GctHFBitCounts.cc.

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

References raw().

◆ raw()

uint16_t L1GctHFBitCounts::raw ( ) const
inline

the raw data

Definition at line 64 of file L1GctHFBitCounts.h.

64 { return data_; }

References data_.

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

◆ setBitCount()

void L1GctHFBitCounts::setBitCount ( unsigned  i,
uint16_t  c 
)

set a sum

Definition at line 53 of file L1GctHFBitCounts.cc.

53  {
54  data_ &= ~(0x7 << (i * 3));
55  data_ |= (c & 0x7) << (i * 3);
56 }

References c, data_, and mps_fire::i.

◆ setBx()

void L1GctHFBitCounts::setBx ( int16_t  bx)
inline

set bx

Definition at line 83 of file L1GctHFBitCounts.h.

83 { bx_ = bx; }

References bx(), and bx_.

◆ setCapBlock()

void L1GctHFBitCounts::setCapBlock ( uint16_t  capBlock)
inline

set cap block

Definition at line 77 of file L1GctHFBitCounts.h.

77 { capBlock_ = capBlock; }

References capBlock(), and capBlock_.

◆ setCapIndex()

void L1GctHFBitCounts::setCapIndex ( uint16_t  capIndex)
inline

set cap index

Definition at line 80 of file L1GctHFBitCounts.h.

80 { capIndex_ = capIndex; }

References capIndex(), and capIndex_.

◆ setData()

void L1GctHFBitCounts::setData ( uint32_t  data)
inline

set the raw data

Definition at line 89 of file L1GctHFBitCounts.h.

89 { data_ = data; }

References data, and data_.

Member Data Documentation

◆ bx_

int16_t L1GctHFBitCounts::bx_
private

Definition at line 103 of file L1GctHFBitCounts.h.

Referenced by bx(), and setBx().

◆ capBlock_

uint16_t L1GctHFBitCounts::capBlock_
private

Definition at line 101 of file L1GctHFBitCounts.h.

Referenced by capBlock(), and setCapBlock().

◆ capIndex_

uint16_t L1GctHFBitCounts::capIndex_
private

Definition at line 102 of file L1GctHFBitCounts.h.

Referenced by capIndex(), and setCapIndex().

◆ data_

uint16_t L1GctHFBitCounts::data_
private

Definition at line 106 of file L1GctHFBitCounts.h.

Referenced by bitCount(), empty(), raw(), setBitCount(), and setData().

◆ N_SUMS

const unsigned L1GctHFBitCounts::N_SUMS = 4
static

Definition at line 18 of file L1GctHFBitCounts.h.

Referenced by nCounts().

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