CMS 3D CMS Logo

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

L1 GCT internal Ht Miss component(s) Ht_x and/or Ht_y. More...

#include <L1GctInternHtMiss.h>

Public Types

enum  L1GctInternHtMissType {
  nulltype, miss_htx, miss_hty, miss_htx_and_hty,
  jf_miss_htx_and_hty
}
 Enum for the variants of Internal HtMiss. More...
 
enum  numberOfBits { kJetMissHtNBits = 12, kMissHxAndHyNBits = 14, kMissHxOrHyNBits = 16 }
 

Public Member Functions

int16_t bx () const
 Get BX number. More...
 
uint16_t capBlock () const
 Get capture block. More...
 
uint16_t capIndex () const
 Get index within capture block. More...
 
int16_t htx () const
 Get Ht x-component value. More...
 
int16_t hty () const
 Get Ht y-component. More...
 
bool isThereHtx () const
 Is there a valid Ht x-component stored? More...
 
bool isThereHty () const
 Is there a valid Ht y-component stored? More...
 
 L1GctInternHtMiss ()
 default constructor (for vector initialisation etc.) More...
 
bool operator!= (const L1GctInternHtMiss &rhs) const
 Inequality operator. More...
 
bool operator== (const L1GctInternHtMiss &rhs) const
 Equality operator. More...
 
bool overflow () const
 Get overflow. More...
 
uint32_t raw () const
 Get the raw data. More...
 
L1GctInternHtMiss::L1GctInternHtMissType type () const
 'type' of object? More...
 
 ~L1GctInternHtMiss ()
 destructor More...
 

Static Public Member Functions

static L1GctInternHtMiss emulatorJetMissHt (const int htx, const int hty, const bool overFlow, const int16_t bx)
 Named ctor for making missing Ht x & y components object from emulator (jetFinder output). More...
 
static L1GctInternHtMiss emulatorMissHtx (const int htx, const bool overFlow, const int16_t bx)
 Named ctor for making missing Ht x component object from emulator. More...
 
static L1GctInternHtMiss emulatorMissHtxHty (const int htx, const int hty, const bool overFlow, const int16_t bx)
 Named ctor for making missing Ht x & y components object from emulator (wheel input). More...
 
static L1GctInternHtMiss emulatorMissHty (const int hty, const bool overFlow, const int16_t bx)
 Named ctor for making missing Ht y component object from emulator. More...
 
static L1GctInternHtMiss unpackerMissHtx (const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
 Named ctor for making missing Ht x-component object from unpacker raw data. More...
 
static L1GctInternHtMiss unpackerMissHtxHty (const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
 Named ctor for making missing Ht x & y components object from unpacker raw data (wheel input). More...
 
static L1GctInternHtMiss unpackerMissHty (const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
 Named ctor for making missing Ht y-component object from unpacker raw data. More...
 

Private Types

enum  ShiftsAndMasks {
  kDoubleComponentHtyShift = 16, kSingleComponentOflowMask = (1 << 30), kDoubleComponentOflowMask = (1 << 15), kSingleComponentHtMask = 0xffff,
  kDoubleComponentHtMask = 0x3fff, kJetFinderComponentHtMask = 0x0fff, kSingleComponentRawMask, kDoubleComponentRawMask
}
 Useful bit masks and bit shifts. More...
 

Private Member Functions

int16_t convert14BitTwosCompTo16Bit (const uint16_t data) const
 Converts 14-bit two's complement numbers to 16-bit two's complement (i.e. an int16_t) More...
 
 L1GctInternHtMiss (const L1GctInternHtMissType type, const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
 Private constructor that the named ctors use. More...
 

Private Attributes

int16_t bx_
 
uint16_t capBlock_
 
uint16_t capIndex_
 
uint32_t data_
 The captured raw data. More...
 
L1GctInternHtMissType type_
 'Type' of the data More...
 

Detailed Description

L1 GCT internal Ht Miss component(s) Ht_x and/or Ht_y.

Author
Robert Frazier
Date
March 2009

Definition at line 16 of file L1GctInternHtMiss.h.

Member Enumeration Documentation

◆ L1GctInternHtMissType

Enum for the variants of Internal HtMiss.

Enumerator
nulltype 
miss_htx 
miss_hty 
miss_htx_and_hty 
jf_miss_htx_and_hty 

Definition at line 19 of file L1GctInternHtMiss.h.

◆ numberOfBits

Enumerator
kJetMissHtNBits 
kMissHxAndHyNBits 
kMissHxOrHyNBits 

Definition at line 21 of file L1GctInternHtMiss.h.

21  {
22  // TODO - tidy up all these enums.
23  // These numbers of bits are needed to specify data sizes in the emulator
24  // Other masks are below in the private section.
25  kJetMissHtNBits = 12,
26  kMissHxAndHyNBits = 14,
27  kMissHxOrHyNBits = 16
28  };

◆ ShiftsAndMasks

Useful bit masks and bit shifts.

Enumerator
kDoubleComponentHtyShift 
kSingleComponentOflowMask 
kDoubleComponentOflowMask 
kSingleComponentHtMask 
kDoubleComponentHtMask 
kJetFinderComponentHtMask 
kSingleComponentRawMask 
kDoubleComponentRawMask 

Definition at line 116 of file L1GctInternHtMiss.h.

116  {
117  kDoubleComponentHtyShift = 16, // Bit shift for Hty in miss_htx_and_hty
118  kSingleComponentOflowMask = (1 << 30), // Overflow bit mask in miss_htx or miss_hty
119  kDoubleComponentOflowMask = (1 << 15), // Overflow bit mask in miss_htx_and_hty
120  kSingleComponentHtMask = 0xffff, // Ht component mask in miss_htx or miss_hty
121  kDoubleComponentHtMask = 0x3fff, // Ht component mask in miss_htx_and_hty
122  kJetFinderComponentHtMask = 0x0fff, // Ht component mask in jf_miss_htx_and_hty
124  kSingleComponentHtMask, // To mask off all the non-data bits in raw data (e.g. BC0, etc)
127  };

Constructor & Destructor Documentation

◆ L1GctInternHtMiss() [1/2]

L1GctInternHtMiss::L1GctInternHtMiss ( )

default constructor (for vector initialisation etc.)

Definition at line 6 of file L1GctInternHtMiss.cc.

Referenced by emulatorJetMissHt(), emulatorMissHtx(), emulatorMissHtxHty(), emulatorMissHty(), unpackerMissHtx(), unpackerMissHtxHty(), and unpackerMissHty().

6 : type_(nulltype), capBlock_(0), capIndex_(0), bx_(0), data_(0) {}
uint32_t data_
The captured raw data.
L1GctInternHtMissType type_
&#39;Type&#39; of the data

◆ ~L1GctInternHtMiss()

L1GctInternHtMiss::~L1GctInternHtMiss ( )

destructor

Definition at line 9 of file L1GctInternHtMiss.cc.

9 {}

◆ L1GctInternHtMiss() [2/2]

L1GctInternHtMiss::L1GctInternHtMiss ( const L1GctInternHtMissType  type,
const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
)
private

Private constructor that the named ctors use.

Definition at line 116 of file L1GctInternHtMiss.cc.

uint32_t data_
The captured raw data.
L1GctInternHtMissType type_
&#39;Type&#39; of the data
uint16_t capBlock() const
Get capture block.
int16_t bx() const
Get BX number.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
uint16_t capIndex() const
Get index within capture block.

Member Function Documentation

◆ bx()

int16_t L1GctInternHtMiss::bx ( ) const
inline

◆ capBlock()

uint16_t L1GctInternHtMiss::capBlock ( ) const
inline

Get capture block.

Definition at line 74 of file L1GctInternHtMiss.h.

References capBlock_.

Referenced by operator<<(), unpackerMissHtx(), unpackerMissHtxHty(), and unpackerMissHty().

74 { return capBlock_; }

◆ capIndex()

uint16_t L1GctInternHtMiss::capIndex ( ) const
inline

Get index within capture block.

Definition at line 77 of file L1GctInternHtMiss.h.

References capIndex_.

Referenced by operator<<(), unpackerMissHtx(), unpackerMissHtxHty(), and unpackerMissHty().

77 { return capIndex_; }

◆ convert14BitTwosCompTo16Bit()

int16_t L1GctInternHtMiss::convert14BitTwosCompTo16Bit ( const uint16_t  data) const
private

Converts 14-bit two's complement numbers to 16-bit two's complement (i.e. an int16_t)

The input is the raw bits of the 14-bit two's complement in a 16-bit unsigned number.

Definition at line 123 of file L1GctInternHtMiss.cc.

References data.

Referenced by htx(), and hty().

123  {
124  // If bit 13 is high, set bits 13, 14, 15 high.
125  if ((data & 0x2000) != 0) {
126  return static_cast<int16_t>(data | 0xe000);
127  }
128 
129  // Else, bit 13 must be low, so set bits 13, 14, 15 low.
130  return static_cast<int16_t>(data & 0x1fff);
131 }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ emulatorJetMissHt()

L1GctInternHtMiss L1GctInternHtMiss::emulatorJetMissHt ( const int  htx,
const int  hty,
const bool  overFlow,
const int16_t  bx 
)
static

Named ctor for making missing Ht x & y components object from emulator (jetFinder output).

Definition at line 36 of file L1GctInternHtMiss.cc.

References bx(), htx(), hty(), jf_miss_htx_and_hty, kDoubleComponentHtyShift, kDoubleComponentOflowMask, kJetFinderComponentHtMask, and L1GctInternHtMiss().

Referenced by L1GctJetFinderBase::getInternalHtMiss().

39  {
40  int32_t xdata = (htx & kJetFinderComponentHtMask);
42  int32_t odata = 0;
43  if (overFlow || (htx >= kJetFinderComponentHtMask / 2) || (htx < -kJetFinderComponentHtMask / 2) ||
46  return L1GctInternHtMiss(jf_miss_htx_and_hty, 0, 0, bx, xdata | ydata | odata);
47 }
int16_t hty() const
Get Ht y-component.
int16_t bx() const
Get BX number.
int16_t htx() const
Get Ht x-component value.
L1GctInternHtMiss()
default constructor (for vector initialisation etc.)

◆ emulatorMissHtx()

L1GctInternHtMiss L1GctInternHtMiss::emulatorMissHtx ( const int  htx,
const bool  overFlow,
const int16_t  bx 
)
static

Named ctor for making missing Ht x component object from emulator.

Definition at line 64 of file L1GctInternHtMiss.cc.

References bx(), htx(), kSingleComponentHtMask, kSingleComponentOflowMask, L1GctInternHtMiss(), and miss_htx.

Referenced by L1GctWheelJetFpga::getInternalHtMiss().

64  {
65  int32_t xdata = (htx & kSingleComponentHtMask);
66  int32_t odata = 0;
67  if (overFlow || (htx >= kSingleComponentHtMask / 2) || (htx < -kSingleComponentHtMask / 2))
69  return L1GctInternHtMiss(miss_htx, 0, 0, bx, xdata | odata);
70 }
int16_t bx() const
Get BX number.
int16_t htx() const
Get Ht x-component value.
L1GctInternHtMiss()
default constructor (for vector initialisation etc.)

◆ emulatorMissHtxHty()

L1GctInternHtMiss L1GctInternHtMiss::emulatorMissHtxHty ( const int  htx,
const int  hty,
const bool  overFlow,
const int16_t  bx 
)
static

Named ctor for making missing Ht x & y components object from emulator (wheel input).

Definition at line 50 of file L1GctInternHtMiss.cc.

References bx(), htx(), hty(), kDoubleComponentHtMask, kDoubleComponentHtyShift, kDoubleComponentOflowMask, L1GctInternHtMiss(), and miss_htx_and_hty.

Referenced by L1GctJetLeafCard::getInternalHtMiss().

53  {
54  int32_t xdata = (htx & kDoubleComponentHtMask);
56  int32_t odata = 0;
57  if (overFlow || (htx >= kDoubleComponentHtMask / 2) || (htx < -kDoubleComponentHtMask / 2) ||
60  return L1GctInternHtMiss(miss_htx_and_hty, 0, 0, bx, xdata | ydata | odata);
61 }
int16_t hty() const
Get Ht y-component.
int16_t bx() const
Get BX number.
int16_t htx() const
Get Ht x-component value.
L1GctInternHtMiss()
default constructor (for vector initialisation etc.)

◆ emulatorMissHty()

L1GctInternHtMiss L1GctInternHtMiss::emulatorMissHty ( const int  hty,
const bool  overFlow,
const int16_t  bx 
)
static

Named ctor for making missing Ht y component object from emulator.

Definition at line 73 of file L1GctInternHtMiss.cc.

References bx(), hty(), kSingleComponentHtMask, kSingleComponentOflowMask, L1GctInternHtMiss(), and miss_hty.

Referenced by L1GctWheelJetFpga::getInternalHtMiss().

73  {
74  int32_t ydata = (hty & kSingleComponentHtMask);
75  int32_t odata = 0;
76  if (overFlow || (hty >= kSingleComponentHtMask / 2) || (hty < -kSingleComponentHtMask / 2))
78  return L1GctInternHtMiss(miss_hty, 0, 0, bx, ydata | odata);
79 }
int16_t hty() const
Get Ht y-component.
int16_t bx() const
Get BX number.
L1GctInternHtMiss()
default constructor (for vector initialisation etc.)

◆ htx()

int16_t L1GctInternHtMiss::htx ( ) const

Get Ht x-component value.

Definition at line 82 of file L1GctInternHtMiss.cc.

References convert14BitTwosCompTo16Bit(), kDoubleComponentHtMask, kSingleComponentHtMask, miss_htx, miss_htx_and_hty, raw(), and type().

Referenced by emulatorJetMissHt(), emulatorMissHtx(), emulatorMissHtxHty(), and operator<<().

82  {
83  if (type() == miss_htx) {
84  return static_cast<int16_t>(raw() & kSingleComponentHtMask);
85  }
86  if (type() == miss_htx_and_hty) {
88  }
89  return 0;
90 }
int16_t convert14BitTwosCompTo16Bit(const uint16_t data) const
Converts 14-bit two&#39;s complement numbers to 16-bit two&#39;s complement (i.e. an int16_t) ...
L1GctInternHtMiss::L1GctInternHtMissType type() const
&#39;type&#39; of object?
uint32_t raw() const
Get the raw data.

◆ hty()

int16_t L1GctInternHtMiss::hty ( ) const

Get Ht y-component.

Definition at line 93 of file L1GctInternHtMiss.cc.

References convert14BitTwosCompTo16Bit(), kDoubleComponentHtMask, kDoubleComponentHtyShift, kSingleComponentHtMask, miss_htx_and_hty, miss_hty, raw(), and type().

Referenced by emulatorJetMissHt(), emulatorMissHtxHty(), emulatorMissHty(), and operator<<().

93  {
94  if (type() == miss_hty) {
95  return static_cast<int16_t>(raw() & kSingleComponentHtMask);
96  }
97  if (type() == miss_htx_and_hty) {
99  }
100  return 0;
101 }
int16_t convert14BitTwosCompTo16Bit(const uint16_t data) const
Converts 14-bit two&#39;s complement numbers to 16-bit two&#39;s complement (i.e. an int16_t) ...
L1GctInternHtMiss::L1GctInternHtMissType type() const
&#39;type&#39; of object?
uint32_t raw() const
Get the raw data.

◆ isThereHtx()

bool L1GctInternHtMiss::isThereHtx ( ) const
inline

Is there a valid Ht x-component stored?

Definition at line 83 of file L1GctInternHtMiss.h.

References jf_miss_htx_and_hty, miss_htx, miss_htx_and_hty, and type().

Referenced by operator<<().

83  {
84  return (type() == miss_htx || type() == miss_htx_and_hty || type() == jf_miss_htx_and_hty);
85  }
L1GctInternHtMiss::L1GctInternHtMissType type() const
&#39;type&#39; of object?

◆ isThereHty()

bool L1GctInternHtMiss::isThereHty ( ) const
inline

Is there a valid Ht y-component stored?

Definition at line 88 of file L1GctInternHtMiss.h.

References jf_miss_htx_and_hty, miss_htx_and_hty, miss_hty, and type().

Referenced by operator<<().

88  {
89  return (type() == miss_hty || type() == miss_htx_and_hty || type() == jf_miss_htx_and_hty);
90  }
L1GctInternHtMiss::L1GctInternHtMissType type() const
&#39;type&#39; of object?

◆ operator!=()

bool L1GctInternHtMiss::operator!= ( const L1GctInternHtMiss rhs) const
inline

Inequality operator.

Definition at line 112 of file L1GctInternHtMiss.h.

112 { return !(*this == rhs); }

◆ operator==()

bool L1GctInternHtMiss::operator== ( const L1GctInternHtMiss rhs) const
inline

Equality operator.

Definition at line 109 of file L1GctInternHtMiss.h.

References raw(), and type().

109 { return (type() == rhs.type() && raw() == rhs.raw()); }
L1GctInternHtMiss::L1GctInternHtMissType type() const
&#39;type&#39; of object?
uint32_t raw() const
Get the raw data.

◆ overflow()

bool L1GctInternHtMiss::overflow ( ) const

Get overflow.

Definition at line 104 of file L1GctInternHtMiss.cc.

References kDoubleComponentOflowMask, kSingleComponentOflowMask, miss_htx, miss_htx_and_hty, miss_hty, raw(), and type().

Referenced by operator<<().

104  {
105  if (type() == miss_htx || type() == miss_hty) {
106  return (raw() & kSingleComponentOflowMask) != 0;
107  }
108  if (type() == miss_htx_and_hty) {
109  return (raw() & kDoubleComponentOflowMask) != 0;
110  }
111  return false;
112 }
L1GctInternHtMiss::L1GctInternHtMissType type() const
&#39;type&#39; of object?
uint32_t raw() const
Get the raw data.

◆ raw()

uint32_t L1GctInternHtMiss::raw ( ) const
inline

Get the raw data.

Definition at line 95 of file L1GctInternHtMiss.h.

References data_.

Referenced by htx(), hty(), operator==(), and overflow().

95 { return data_; }
uint32_t data_
The captured raw data.

◆ type()

L1GctInternHtMiss::L1GctInternHtMissType L1GctInternHtMiss::type ( ) const
inline

'type' of object?

Definition at line 71 of file L1GctInternHtMiss.h.

References type_.

Referenced by htx(), hty(), isThereHtx(), isThereHty(), operator==(), and overflow().

71 { return type_; }
L1GctInternHtMissType type_
&#39;Type&#39; of the data

◆ unpackerMissHtx()

L1GctInternHtMiss L1GctInternHtMiss::unpackerMissHtx ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
)
static

Named ctor for making missing Ht x-component object from unpacker raw data.

Definition at line 12 of file L1GctInternHtMiss.cc.

References bx(), capBlock(), capIndex(), data, kSingleComponentRawMask, L1GctInternHtMiss(), and miss_htx.

Referenced by GctFormatTranslateV38::blockToGctInternHtMissPostWheel().

15  {
17 }
uint16_t capBlock() const
Get capture block.
int16_t bx() const
Get BX number.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
uint16_t capIndex() const
Get index within capture block.
L1GctInternHtMiss()
default constructor (for vector initialisation etc.)

◆ unpackerMissHtxHty()

L1GctInternHtMiss L1GctInternHtMiss::unpackerMissHtxHty ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
)
static

Named ctor for making missing Ht x & y components object from unpacker raw data (wheel input).

Definition at line 28 of file L1GctInternHtMiss.cc.

References bx(), capBlock(), capIndex(), data, kDoubleComponentRawMask, L1GctInternHtMiss(), and miss_htx_and_hty.

Referenced by GctFormatTranslateV38::blockToGctInternHtMissPreWheel().

31  {
33 }
uint16_t capBlock() const
Get capture block.
int16_t bx() const
Get BX number.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
uint16_t capIndex() const
Get index within capture block.
L1GctInternHtMiss()
default constructor (for vector initialisation etc.)

◆ unpackerMissHty()

L1GctInternHtMiss L1GctInternHtMiss::unpackerMissHty ( const uint16_t  capBlock,
const uint16_t  capIndex,
const int16_t  bx,
const uint32_t  data 
)
static

Named ctor for making missing Ht y-component object from unpacker raw data.

Definition at line 20 of file L1GctInternHtMiss.cc.

References bx(), capBlock(), capIndex(), data, kSingleComponentRawMask, L1GctInternHtMiss(), and miss_hty.

Referenced by GctFormatTranslateV38::blockToGctInternHtMissPostWheel().

23  {
25 }
uint16_t capBlock() const
Get capture block.
int16_t bx() const
Get BX number.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
uint16_t capIndex() const
Get index within capture block.
L1GctInternHtMiss()
default constructor (for vector initialisation etc.)

Member Data Documentation

◆ bx_

int16_t L1GctInternHtMiss::bx_
private

Definition at line 150 of file L1GctInternHtMiss.h.

Referenced by bx().

◆ capBlock_

uint16_t L1GctInternHtMiss::capBlock_
private

Definition at line 148 of file L1GctInternHtMiss.h.

Referenced by capBlock().

◆ capIndex_

uint16_t L1GctInternHtMiss::capIndex_
private

Definition at line 149 of file L1GctInternHtMiss.h.

Referenced by capIndex().

◆ data_

uint32_t L1GctInternHtMiss::data_
private

The captured raw data.

Definition at line 153 of file L1GctInternHtMiss.h.

Referenced by raw().

◆ type_

L1GctInternHtMissType L1GctInternHtMiss::type_
private