CMS 3D CMS Logo

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

Level-1 Trigger EM candidate at output of GCT. More...

#include <L1GctEmCand.h>

Inheritance diagram for L1GctEmCand:
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 -6 to -0, +0 to +6 (bit 3 is sign, 1 for -ve Z, 0 for +ve Z) More...
 
unsigned etaSign () const override
 get eta sign (1 for -ve Z, 0 for +ve Z) More...
 
bool isolated () const
 which stream did this come from More...
 
 L1GctEmCand ()
 default constructor (for vector initialisation etc.) More...
 
 L1GctEmCand (uint16_t rawData, bool iso)
 construct from raw data, no source - used in GT More...
 
 L1GctEmCand (uint16_t rawData, bool iso, uint16_t block, uint16_t index, int16_t bx)
 construct from raw data with source - used in GCT unpacker More...
 
 L1GctEmCand (unsigned rank, unsigned phi, unsigned eta, bool iso)
 
 L1GctEmCand (unsigned rank, unsigned phi, unsigned eta, bool iso, uint16_t block, uint16_t index, int16_t bx)
 
 L1GctEmCand (L1CaloEmCand &c)
 construct from RCT output candidate More...
 
std::string name () const
 name of object More...
 
int operator!= (const L1GctEmCand &c) const
 inequality operator More...
 
int operator== (const L1GctEmCand &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...
 
 ~L1GctEmCand () override
 destructor (virtual to prevent compiler warnings) More...
 
- Public Member Functions inherited from L1GctCand
 L1GctCand ()
 
virtual ~L1GctCand ()
 

Private Member Functions

void construct (unsigned rank, unsigned eta, unsigned phi)
 

Private Attributes

int16_t m_bx
 
uint16_t m_captureBlock
 
uint8_t m_captureIndex
 
uint16_t m_data
 
bool m_iso
 

Detailed Description

Level-1 Trigger EM candidate at output of GCT.

Level-1 Trigger EM candidate within GCT processing.

Author
Jim Brooke
Date
June 2006

Definition at line 21 of file L1GctEmCand.h.

Constructor & Destructor Documentation

◆ L1GctEmCand() [1/6]

L1GctEmCand::L1GctEmCand ( )

default constructor (for vector initialisation etc.)

Definition at line 11 of file L1GctEmCand.cc.

11 : m_data(0), m_iso(false), m_captureBlock(0), m_captureIndex(0), m_bx(0) {}
uint16_t m_captureBlock
Definition: L1GctEmCand.h:97
uint16_t m_data
Definition: L1GctEmCand.h:95
int16_t m_bx
Definition: L1GctEmCand.h:99
uint8_t m_captureIndex
Definition: L1GctEmCand.h:98

◆ L1GctEmCand() [2/6]

L1GctEmCand::L1GctEmCand ( uint16_t  rawData,
bool  iso 
)

construct from raw data, no source - used in GT

Definition at line 14 of file L1GctEmCand.cc.

15  : m_data(rawData & 0x7fff), // 0x7fff is to mask off bit 15, which is not data that needs to be stored
16  m_iso(iso),
17  m_captureBlock(0),
18  m_captureIndex(0),
19  m_bx(0) {}
uint16_t m_captureBlock
Definition: L1GctEmCand.h:97
uint16_t m_data
Definition: L1GctEmCand.h:95
int16_t m_bx
Definition: L1GctEmCand.h:99
uint8_t m_captureIndex
Definition: L1GctEmCand.h:98

◆ L1GctEmCand() [3/6]

L1GctEmCand::L1GctEmCand ( uint16_t  rawData,
bool  iso,
uint16_t  block,
uint16_t  index,
int16_t  bx 
)

construct from raw data with source - used in GCT unpacker

Definition at line 22 of file L1GctEmCand.cc.

23  : m_data(rawData & 0x7fff), // 0x7fff is to mask off bit 15, which is not data that needs to be stored
24  m_iso(iso),
25  m_captureBlock(block & 0xfff),
26  m_captureIndex(index & 0xff),
27  m_bx(bx) {}
uint16_t m_captureBlock
Definition: L1GctEmCand.h:97
uint16_t m_data
Definition: L1GctEmCand.h:95
int16_t m_bx
Definition: L1GctEmCand.h:99
uint8_t m_captureIndex
Definition: L1GctEmCand.h:98
int16_t bx() const
get bunch-crossing index
Definition: L1GctEmCand.h:80

◆ L1GctEmCand() [4/6]

L1GctEmCand::L1GctEmCand ( unsigned  rank,
unsigned  phi,
unsigned  eta,
bool  iso 
)

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

Definition at line 31 of file L1GctEmCand.cc.

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

32  : m_data(0), // override below
33  m_iso(iso),
34  m_captureBlock(0),
35  m_captureIndex(0),
36  m_bx(0)
37 
38 {
39  construct(rank, eta, phi);
40 }
uint16_t m_captureBlock
Definition: L1GctEmCand.h:97
uint16_t m_data
Definition: L1GctEmCand.h:95
void construct(unsigned rank, unsigned eta, unsigned phi)
Definition: L1GctEmCand.cc:78
int16_t m_bx
Definition: L1GctEmCand.h:99
uint8_t m_captureIndex
Definition: L1GctEmCand.h:98
unsigned rank() const override
get rank bits
Definition: L1GctEmCand.h:59

◆ L1GctEmCand() [5/6]

L1GctEmCand::L1GctEmCand ( unsigned  rank,
unsigned  phi,
unsigned  eta,
bool  iso,
uint16_t  block,
uint16_t  index,
int16_t  bx 
)

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

Definition at line 44 of file L1GctEmCand.cc.

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

45  : m_data(0), // override below
46  m_iso(iso),
47  m_captureBlock(block & 0xfff),
48  m_captureIndex(index & 0xff),
49  m_bx(bx) {
50  construct(rank, eta, phi);
51 }
uint16_t m_captureBlock
Definition: L1GctEmCand.h:97
uint16_t m_data
Definition: L1GctEmCand.h:95
void construct(unsigned rank, unsigned eta, unsigned phi)
Definition: L1GctEmCand.cc:78
int16_t m_bx
Definition: L1GctEmCand.h:99
uint8_t m_captureIndex
Definition: L1GctEmCand.h:98
int16_t bx() const
get bunch-crossing index
Definition: L1GctEmCand.h:80
unsigned rank() const override
get rank bits
Definition: L1GctEmCand.h:59

◆ L1GctEmCand() [6/6]

L1GctEmCand::L1GctEmCand ( L1CaloEmCand c)

construct from RCT output candidate

Definition at line 54 of file L1GctEmCand.cc.

References c, construct(), and PVValHelper::eta.

55  : m_data(0), // override below
56  m_iso(c.isolated()),
57  m_captureBlock(0),
58  m_captureIndex(0),
59  m_bx(c.bx()) {
60  unsigned eta = ((c.regionId().rctEta() & 0x7) | (c.regionId().ieta() < 11 ? 0x8 : 0x0));
61  construct(c.rank(), eta, c.regionId().iphi());
62 }
uint16_t m_captureBlock
Definition: L1GctEmCand.h:97
uint16_t m_data
Definition: L1GctEmCand.h:95
void construct(unsigned rank, unsigned eta, unsigned phi)
Definition: L1GctEmCand.cc:78
int16_t m_bx
Definition: L1GctEmCand.h:99
uint8_t m_captureIndex
Definition: L1GctEmCand.h:98

◆ ~L1GctEmCand()

L1GctEmCand::~L1GctEmCand ( )
override

destructor (virtual to prevent compiler warnings)

Definition at line 65 of file L1GctEmCand.cc.

65 {}

Member Function Documentation

◆ bx()

int16_t L1GctEmCand::bx ( ) const
inline

get bunch-crossing index

Definition at line 80 of file L1GctEmCand.h.

References m_bx.

80 { return m_bx; }
int16_t m_bx
Definition: L1GctEmCand.h:99

◆ capBlock()

unsigned L1GctEmCand::capBlock ( ) const
inline

which capture block did this come from

Definition at line 74 of file L1GctEmCand.h.

References m_captureBlock.

74 { return m_captureBlock; }
uint16_t m_captureBlock
Definition: L1GctEmCand.h:97

◆ capIndex()

unsigned L1GctEmCand::capIndex ( ) const
inline

what index within capture block

Definition at line 77 of file L1GctEmCand.h.

References m_captureIndex.

77 { return m_captureIndex; }
uint8_t m_captureIndex
Definition: L1GctEmCand.h:98

◆ construct()

void L1GctEmCand::construct ( unsigned  rank,
unsigned  eta,
unsigned  phi 
)
private

Definition at line 78 of file L1GctEmCand.cc.

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

Referenced by L1GctEmCand().

78  {
79  if (rank > 0) {
80  m_data = (rank & 0x3f) + ((eta & 0xf) << 6) + ((phi & 0x1f) << 10);
81  } else {
82  // Default values for zero rank electrons,
83  // different in hardware for positive and negative eta
84  if ((eta & 0x8) == 0) {
85  m_data = 0x7000;
86  } else {
87  m_data = 0x7400;
88  }
89  }
90 }
uint16_t m_data
Definition: L1GctEmCand.h:95
unsigned rank() const override
get rank bits
Definition: L1GctEmCand.h:59

◆ empty()

bool L1GctEmCand::empty ( ) const
inlineoverridevirtual

was an object really found?

Implements L1GctCand.

Definition at line 53 of file L1GctEmCand.h.

References rank().

Referenced by operator==().

53 { return (rank() == 0); }
unsigned rank() const override
get rank bits
Definition: L1GctEmCand.h:59

◆ etaIndex()

unsigned L1GctEmCand::etaIndex ( ) const
inlineoverridevirtual

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

Implements L1GctCand.

Definition at line 62 of file L1GctEmCand.h.

References m_data.

Referenced by HLTRechitInRegionsProducer< T1 >::getEtaPhiRegions(), and regionId().

62 { return (m_data >> 6) & 0xf; }
uint16_t m_data
Definition: L1GctEmCand.h:95

◆ etaSign()

unsigned L1GctEmCand::etaSign ( ) const
inlineoverridevirtual

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

Implements L1GctCand.

Definition at line 65 of file L1GctEmCand.h.

References m_data.

Referenced by regionId().

65 { return (m_data >> 9) & 0x1; }
uint16_t m_data
Definition: L1GctEmCand.h:95

◆ isolated()

bool L1GctEmCand::isolated ( ) const
inline

which stream did this come from

Definition at line 71 of file L1GctEmCand.h.

References m_iso.

Referenced by l1extra::L1EmParticle::L1EmParticle(), and name().

71 { return m_iso; }

◆ name()

string L1GctEmCand::name ( ) const

name of object

Definition at line 68 of file L1GctEmCand.cc.

References isolated().

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

68 { return (isolated() ? "iso EM" : "non iso EM"); }
bool isolated() const
which stream did this come from
Definition: L1GctEmCand.h:71

◆ operator!=()

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

inequality operator

Definition at line 88 of file L1GctEmCand.h.

References c.

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

◆ operator==()

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

equality operator

Definition at line 83 of file L1GctEmCand.h.

References c, empty(), m_data, and m_iso.

83  {
84  return ((m_data == c.raw() && m_iso == c.isolated()) || (this->empty() && c.empty()));
85  }
uint16_t m_data
Definition: L1GctEmCand.h:95
bool empty() const override
was an object really found?
Definition: L1GctEmCand.h:53

◆ phiIndex()

unsigned L1GctEmCand::phiIndex ( ) const
inlineoverridevirtual

get phi index (0-17)

Implements L1GctCand.

Definition at line 68 of file L1GctEmCand.h.

References m_data.

Referenced by HLTRechitInRegionsProducer< T1 >::getEtaPhiRegions(), and regionId().

68 { return (m_data >> 10) & 0x1f; }
uint16_t m_data
Definition: L1GctEmCand.h:95

◆ rank()

unsigned L1GctEmCand::rank ( ) const
inlineoverridevirtual

get rank bits

Implements L1GctCand.

Definition at line 59 of file L1GctEmCand.h.

References m_data.

Referenced by construct(), empty(), L1GctEmCand(), and L1GctElectronSorter::prioritisedEmCand::rank().

59 { return m_data & 0x3f; }
uint16_t m_data
Definition: L1GctEmCand.h:95

◆ raw()

uint16_t L1GctEmCand::raw ( ) const
inline

get the raw data

Definition at line 56 of file L1GctEmCand.h.

References m_data.

Referenced by L1GtPatternGenerator::analyze().

56 { return m_data; }
uint16_t m_data
Definition: L1GctEmCand.h:95

◆ regionId()

L1CaloRegionDetId L1GctEmCand::regionId ( ) const
overridevirtual

region associated with the candidate

Implements L1GctCand.

Definition at line 71 of file L1GctEmCand.cc.

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

71  {
72  // get global eta
73  unsigned eta = (etaSign() == 1 ? 10 - (etaIndex() & 0x7) : 11 + (etaIndex() & 0x7));
74  return L1CaloRegionDetId(eta, phiIndex());
75 }
unsigned etaIndex() const override
get eta index -6 to -0, +0 to +6 (bit 3 is sign, 1 for -ve Z, 0 for +ve Z)
Definition: L1GctEmCand.h:62
unsigned etaSign() const override
get eta sign (1 for -ve Z, 0 for +ve Z)
Definition: L1GctEmCand.h:65
unsigned phiIndex() const override
get phi index (0-17)
Definition: L1GctEmCand.h:68

Member Data Documentation

◆ m_bx

int16_t L1GctEmCand::m_bx
private

Definition at line 99 of file L1GctEmCand.h.

Referenced by bx().

◆ m_captureBlock

uint16_t L1GctEmCand::m_captureBlock
private

Definition at line 97 of file L1GctEmCand.h.

Referenced by capBlock().

◆ m_captureIndex

uint8_t L1GctEmCand::m_captureIndex
private

Definition at line 98 of file L1GctEmCand.h.

Referenced by capIndex().

◆ m_data

uint16_t L1GctEmCand::m_data
private

Definition at line 95 of file L1GctEmCand.h.

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

◆ m_iso

bool L1GctEmCand::m_iso
private

Definition at line 96 of file L1GctEmCand.h.

Referenced by isolated(), and operator==().