CMS 3D CMS Logo

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

Level-1 Trigger jet candidate. More...

#include <L1GctJetCand.h>

Inheritance diagram for L1GctJetCand:
L1GctCand

Public Member Functions

int16_t bx () const
 get bunch-crossing index More...
 
unsigned capBlock () const
 which capture block did this come from More...
 
unsigned capIndex () const
 what index within capture block More...
 
bool empty () const override
 was an object really found? More...
 
unsigned etaIndex () const override
 get eta index (bit 3 is sign, 1 for -ve Z, 0 for +ve Z) More...
 
unsigned etaSign () const override
 get eta sign bit (1 for -ve Z, 0 for +ve Z) More...
 
bool isCentral () const
 check if this is a central jet More...
 
bool isForward () const
 check if this is a forward jet More...
 
bool isTau () const
 check if this is a tau More...
 
 L1GctJetCand ()
 default constructor (for vector initialisation etc.) More...
 
 L1GctJetCand (uint16_t rawData, bool isTau, bool isFor)
 construct from raw data - used in GT More...
 
 L1GctJetCand (uint16_t rawData, bool isTau, bool isFor, uint16_t block, uint16_t index, int16_t bx)
 construct from raw data with source - uesd in GCT unpacker More...
 
 L1GctJetCand (unsigned rank, unsigned phi, unsigned eta, bool isTau, bool isFor)
 
 L1GctJetCand (unsigned rank, unsigned phi, unsigned eta, bool isTau, bool isFor, uint16_t block, uint16_t index, int16_t bx)
 
std::string name () const
 name of object More...
 
int operator!= (const L1GctJetCand &c) const
 inequality operator More...
 
int operator== (const L1GctJetCand &c) const
 equality operator More...
 
unsigned phiIndex () const override
 get phi index (0-17) More...
 
unsigned rank () const override
 get rank bits More...
 
uint16_t raw () const
 get the raw data More...
 
L1CaloRegionDetId regionId () const override
 region associated with the candidate More...
 
 ~L1GctJetCand () override
 destructor (virtual to prevent compiler warnings) More...
 
- Public Member Functions inherited from L1GctCand
 L1GctCand ()
 
virtual ~L1GctCand ()
 

Private Attributes

int16_t m_bx
 
uint16_t m_captureBlock
 
uint8_t m_captureIndex
 
uint16_t m_data
 
bool m_isFor
 
bool m_isTau
 

Detailed Description

Level-1 Trigger jet candidate.

Author
Jim Brooke
Date
June 2006

Definition at line 17 of file L1GctJetCand.h.

Constructor & Destructor Documentation

◆ L1GctJetCand() [1/5]

L1GctJetCand::L1GctJetCand ( )

default constructor (for vector initialisation etc.)

Definition at line 10 of file L1GctJetCand.cc.

11  : m_data(0), m_isTau(false), m_isFor(false), m_captureBlock(0), m_captureIndex(0), m_bx(0) {}

◆ L1GctJetCand() [2/5]

L1GctJetCand::L1GctJetCand ( uint16_t  rawData,
bool  isTau,
bool  isFor 
)

construct from raw data - used in GT

Definition at line 14 of file L1GctJetCand.cc.

15  : m_data(rawData & 0x7fff), // 0x7fff is to mask off bit 15, which is not data that needs to be stored
16  m_isTau(isTau),
17  m_isFor(isFor),
18  m_captureBlock(0),
19  m_captureIndex(0),
20  m_bx(0) {}

◆ L1GctJetCand() [3/5]

L1GctJetCand::L1GctJetCand ( uint16_t  rawData,
bool  isTau,
bool  isFor,
uint16_t  block,
uint16_t  index,
int16_t  bx 
)

construct from raw data with source - uesd in GCT unpacker

Definition at line 23 of file L1GctJetCand.cc.

24  : m_data(rawData & 0x7fff), // 0x7fff is to mask off bit 15, which is not data that needs to be stored
25  m_isTau(isTau),
26  m_isFor(isFor),
27  m_captureBlock(block & 0xfff),
28  m_captureIndex(index & 0xff),
29  m_bx(bx) {}

◆ L1GctJetCand() [4/5]

L1GctJetCand::L1GctJetCand ( unsigned  rank,
unsigned  phi,
unsigned  eta,
bool  isTau,
bool  isFor 
)

construct from rank, eta, phi, isolation - used in GCT emulator NB - eta = -6 to -0, +0 to +6. Sign is bit 3, 1 means -ve Z, 0 means +ve Z

Definition at line 33 of file L1GctJetCand.cc.

34  : m_data(0), // overridden below
35  m_isTau(isTau),
36  m_isFor(isFor),
37  m_captureBlock(0),
38  m_captureIndex(0),
39  m_bx(0) {
40  m_data = (rank & 0x3f) + ((eta & 0xf) << 6) + ((phi & 0x1f) << 10);
41 }

References PVValHelper::eta, m_data, phi, and rank().

◆ L1GctJetCand() [5/5]

L1GctJetCand::L1GctJetCand ( unsigned  rank,
unsigned  phi,
unsigned  eta,
bool  isTau,
bool  isFor,
uint16_t  block,
uint16_t  index,
int16_t  bx 
)

construct from rank, eta, phi, isolation - will be used in GCT emulator? NB - eta = -6 to -0, +0 to +6. Sign is bit 3, 1 means -ve Z, 0 means +ve Z

Definition at line 45 of file L1GctJetCand.cc.

47  : m_data(0), // overridden below
48  m_isTau(isTau),
49  m_isFor(isFor),
50  m_captureBlock(block & 0xfff),
51  m_captureIndex(index & 0xff),
52  m_bx(bx) {
53  m_data = (rank & 0x3f) + ((eta & 0xf) << 6) + ((phi & 0x1f) << 10);
54 }

References PVValHelper::eta, m_data, phi, and rank().

◆ ~L1GctJetCand()

L1GctJetCand::~L1GctJetCand ( )
override

destructor (virtual to prevent compiler warnings)

Definition at line 56 of file L1GctJetCand.cc.

56 {}

Member Function Documentation

◆ bx()

int16_t L1GctJetCand::bx ( ) const
inline

get bunch-crossing index

Definition at line 80 of file L1GctJetCand.h.

80 { return m_bx; }

References m_bx.

◆ capBlock()

unsigned L1GctJetCand::capBlock ( ) const
inline

which capture block did this come from

Definition at line 74 of file L1GctJetCand.h.

74 { return m_captureBlock; }

References m_captureBlock.

◆ capIndex()

unsigned L1GctJetCand::capIndex ( ) const
inline

what index within capture block

Definition at line 77 of file L1GctJetCand.h.

77 { return m_captureIndex; }

References m_captureIndex.

◆ empty()

bool L1GctJetCand::empty ( ) const
inlineoverridevirtual

was an object really found?

Implements L1GctCand.

Definition at line 47 of file L1GctJetCand.h.

47 { return (rank() == 0); }

References rank().

Referenced by operator==().

◆ etaIndex()

unsigned L1GctJetCand::etaIndex ( ) const
inlineoverridevirtual

get eta index (bit 3 is sign, 1 for -ve Z, 0 for +ve Z)

Implements L1GctCand.

Definition at line 56 of file L1GctJetCand.h.

56 { return (m_data >> 6) & 0xf; }

References m_data.

Referenced by regionId().

◆ etaSign()

unsigned L1GctJetCand::etaSign ( ) const
inlineoverridevirtual

get eta sign bit (1 for -ve Z, 0 for +ve Z)

Implements L1GctCand.

Definition at line 59 of file L1GctJetCand.h.

59 { return (m_data >> 9) & 0x1; }

References m_data.

Referenced by regionId().

◆ isCentral()

bool L1GctJetCand::isCentral ( ) const
inline

check if this is a central jet

Definition at line 65 of file L1GctJetCand.h.

65 { return (!m_isTau) && (!m_isFor); }

References m_isFor, and m_isTau.

◆ isForward()

bool L1GctJetCand::isForward ( ) const
inline

check if this is a forward jet

Definition at line 71 of file L1GctJetCand.h.

71 { return m_isFor; }

References m_isFor.

Referenced by l1extra::L1JetParticle::L1JetParticle(), and regionId().

◆ isTau()

bool L1GctJetCand::isTau ( ) const
inline

check if this is a tau

Definition at line 68 of file L1GctJetCand.h.

68 { return m_isTau; }

References m_isTau.

Referenced by l1extra::L1JetParticle::L1JetParticle().

◆ name()

string L1GctJetCand::name ( ) const

name of object

Definition at line 59 of file L1GctJetCand.cc.

59  {
60  if (m_isTau) {
61  return "tau jet";
62  } else if (m_isFor) {
63  return "forward jet";
64  } else {
65  return "central jet";
66  }
67 }

References m_isFor, and m_isTau.

Referenced by config.CFG::__str__(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().

◆ operator!=()

int L1GctJetCand::operator!= ( const L1GctJetCand c) const
inline

inequality operator

Definition at line 88 of file L1GctJetCand.h.

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

References c.

◆ operator==()

int L1GctJetCand::operator== ( const L1GctJetCand c) const
inline

equality operator

Definition at line 83 of file L1GctJetCand.h.

83  {
84  return ((m_data == c.raw() && m_isTau == c.isTau() && m_isFor == c.isForward()) || (this->empty() && c.empty()));
85  }

References c, empty(), m_data, m_isFor, and m_isTau.

◆ phiIndex()

unsigned L1GctJetCand::phiIndex ( ) const
inlineoverridevirtual

get phi index (0-17)

Implements L1GctCand.

Definition at line 62 of file L1GctJetCand.h.

62 { return (m_data >> 10) & 0x1f; }

References m_data.

Referenced by regionId().

◆ rank()

unsigned L1GctJetCand::rank ( ) const
inlineoverridevirtual

get rank bits

Implements L1GctCand.

Definition at line 53 of file L1GctJetCand.h.

53 { return m_data & 0x3f; }

References m_data.

Referenced by empty(), and L1GctJetCand().

◆ raw()

uint16_t L1GctJetCand::raw ( ) const
inline

get the raw data

Definition at line 50 of file L1GctJetCand.h.

50 { return m_data; }

References m_data.

Referenced by L1GtPatternGenerator::analyze().

◆ regionId()

L1CaloRegionDetId L1GctJetCand::regionId ( ) const
overridevirtual

region associated with the candidate

Implements L1GctCand.

Definition at line 90 of file L1GctJetCand.cc.

90  {
91  // get global eta
92  unsigned eta;
93  if (!isForward()) {
94  eta = (etaSign() == 1 ? 10 - (etaIndex() & 0x7) : (etaIndex() & 0x7) + 11);
95  } else {
96  eta = (etaSign() == 1 ? 3 - (etaIndex() & 0x7) : (etaIndex() & 0x7) + 18);
97  }
98 
99  return L1CaloRegionDetId(eta, phiIndex());
100 }

References PVValHelper::eta, etaIndex(), etaSign(), isForward(), and phiIndex().

Member Data Documentation

◆ m_bx

int16_t L1GctJetCand::m_bx
private

Definition at line 96 of file L1GctJetCand.h.

Referenced by bx().

◆ m_captureBlock

uint16_t L1GctJetCand::m_captureBlock
private

Definition at line 94 of file L1GctJetCand.h.

Referenced by capBlock().

◆ m_captureIndex

uint8_t L1GctJetCand::m_captureIndex
private

Definition at line 95 of file L1GctJetCand.h.

Referenced by capIndex().

◆ m_data

uint16_t L1GctJetCand::m_data
private

Definition at line 91 of file L1GctJetCand.h.

Referenced by etaIndex(), etaSign(), L1GctJetCand(), operator==(), phiIndex(), rank(), and raw().

◆ m_isFor

bool L1GctJetCand::m_isFor
private

Definition at line 93 of file L1GctJetCand.h.

Referenced by isCentral(), isForward(), name(), and operator==().

◆ m_isTau

bool L1GctJetCand::m_isTau
private

Definition at line 92 of file L1GctJetCand.h.

Referenced by isCentral(), isTau(), name(), and operator==().

L1GctJetCand::isForward
bool isForward() const
check if this is a forward jet
Definition: L1GctJetCand.h:71
L1GctJetCand::m_captureIndex
uint8_t m_captureIndex
Definition: L1GctJetCand.h:95
L1GctJetCand::m_bx
int16_t m_bx
Definition: L1GctJetCand.h:96
l1tstage2_dqm_sourceclient-live_cfg.rawData
rawData
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:163
L1GctJetCand::m_data
uint16_t m_data
Definition: L1GctJetCand.h:91
L1GctJetCand::m_isFor
bool m_isFor
Definition: L1GctJetCand.h:93
L1GctJetCand::phiIndex
unsigned phiIndex() const override
get phi index (0-17)
Definition: L1GctJetCand.h:62
L1CaloRegionDetId
Definition: L1CaloRegionDetId.h:18
PVValHelper::eta
Definition: PVValidationHelpers.h:70
L1GctJetCand::etaSign
unsigned etaSign() const override
get eta sign bit (1 for -ve Z, 0 for +ve Z)
Definition: L1GctJetCand.h:59
groupFilesInBlocks.block
block
Definition: groupFilesInBlocks.py:150
L1GctJetCand::bx
int16_t bx() const
get bunch-crossing index
Definition: L1GctJetCand.h:80
DDAxes::phi
L1GctJetCand::etaIndex
unsigned etaIndex() const override
get eta index (bit 3 is sign, 1 for -ve Z, 0 for +ve Z)
Definition: L1GctJetCand.h:56
L1GctJetCand::empty
bool empty() const override
was an object really found?
Definition: L1GctJetCand.h:47
L1GctJetCand::m_captureBlock
uint16_t m_captureBlock
Definition: L1GctJetCand.h:94
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
L1GctJetCand::isTau
bool isTau() const
check if this is a tau
Definition: L1GctJetCand.h:68
L1GctJetCand::m_isTau
bool m_isTau
Definition: L1GctJetCand.h:92
L1GctJetCand::rank
unsigned rank() const override
get rank bits
Definition: L1GctJetCand.h:53
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56