CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 was an object really found? More...
 
unsigned etaIndex () const
 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
 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
 get phi index (0-17) More...
 
unsigned rank () const
 get rank bits More...
 
uint16_t raw () const
 get the raw data More...
 
L1CaloRegionDetId regionId () const
 region associated with the candidate More...
 
virtual ~L1GctEmCand ()
 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 22 of file L1GctEmCand.h.

Constructor & Destructor Documentation

L1GctEmCand::L1GctEmCand ( )

default constructor (for vector initialisation etc.)

Definition at line 12 of file L1GctEmCand.cc.

12  :
13  m_data(0),
14  m_iso(false),
15  m_captureBlock(0),
16  m_captureIndex(0),
17  m_bx(0)
18 {
19 
20 }
uint16_t m_captureBlock
Definition: L1GctEmCand.h:100
uint16_t m_data
Definition: L1GctEmCand.h:98
int16_t m_bx
Definition: L1GctEmCand.h:102
uint8_t m_captureIndex
Definition: L1GctEmCand.h:101
L1GctEmCand::L1GctEmCand ( uint16_t  rawData,
bool  iso 
)

construct from raw data, no source - used in GT

Definition at line 23 of file L1GctEmCand.cc.

23  :
24  m_data(rawData & 0x7fff), // 0x7fff is to mask off bit 15, which is not data that needs to be stored
25  m_iso(iso),
26  m_captureBlock(0),
27  m_captureIndex(0),
28  m_bx(0)
29 {
30 
31 }
uint16_t m_captureBlock
Definition: L1GctEmCand.h:100
uint16_t m_data
Definition: L1GctEmCand.h:98
int16_t m_bx
Definition: L1GctEmCand.h:102
uint8_t m_captureIndex
Definition: L1GctEmCand.h:101
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 34 of file L1GctEmCand.cc.

34  :
35  m_data(rawData & 0x7fff), // 0x7fff is to mask off bit 15, which is not data that needs to be stored
36  m_iso(iso),
37  m_captureBlock(block&0xfff),
38  m_captureIndex(index&0xff),
39  m_bx(bx)
40 {
41 
42 }
uint16_t m_captureBlock
Definition: L1GctEmCand.h:100
uint16_t m_data
Definition: L1GctEmCand.h:98
int16_t m_bx
Definition: L1GctEmCand.h:102
int16_t bx() const
get bunch-crossing index
Definition: L1GctEmCand.h:82
uint8_t m_captureIndex
Definition: L1GctEmCand.h:101
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 46 of file L1GctEmCand.cc.

References construct().

46  :
47  m_data(0), // override below
48  m_iso(iso),
49  m_captureBlock(0),
50  m_captureIndex(0),
51  m_bx(0)
52 
53 {
54  construct(rank, eta, phi);
55 }
unsigned rank() const
get rank bits
Definition: L1GctEmCand.h:61
uint16_t m_captureBlock
Definition: L1GctEmCand.h:100
uint16_t m_data
Definition: L1GctEmCand.h:98
void construct(unsigned rank, unsigned eta, unsigned phi)
Definition: L1GctEmCand.cc:99
int16_t m_bx
Definition: L1GctEmCand.h:102
uint8_t m_captureIndex
Definition: L1GctEmCand.h:101
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 59 of file L1GctEmCand.cc.

References construct().

59  :
60  m_data(0), // override below
61  m_iso(iso),
62  m_captureBlock(block&0xfff),
63  m_captureIndex(index&0xff),
64  m_bx(bx)
65 {
66  construct(rank, eta, phi);
67 }
unsigned rank() const
get rank bits
Definition: L1GctEmCand.h:61
uint16_t m_captureBlock
Definition: L1GctEmCand.h:100
uint16_t m_data
Definition: L1GctEmCand.h:98
void construct(unsigned rank, unsigned eta, unsigned phi)
Definition: L1GctEmCand.cc:99
int16_t m_bx
Definition: L1GctEmCand.h:102
int16_t bx() const
get bunch-crossing index
Definition: L1GctEmCand.h:82
uint8_t m_captureIndex
Definition: L1GctEmCand.h:101
L1GctEmCand::L1GctEmCand ( L1CaloEmCand c)

construct from RCT output candidate

Definition at line 70 of file L1GctEmCand.cc.

References construct(), eta, L1CaloRegionDetId::ieta(), L1CaloRegionDetId::iphi(), L1CaloEmCand::rank(), L1CaloRegionDetId::rctEta(), and L1CaloEmCand::regionId().

70  :
71  m_data(0), // override below
72  m_iso(c.isolated()),
73  m_captureBlock(0),
74  m_captureIndex(0),
75  m_bx(c.bx())
76 {
77  unsigned eta=((c.regionId().rctEta() & 0x7) | (c.regionId().ieta()<11 ? 0x8 : 0x0));
78  construct(c.rank(), eta, c.regionId().iphi());
79 }
unsigned ieta() const
global eta index (0-21)
unsigned rctEta() const
return local RCT eta index (0-10)
uint16_t m_captureBlock
Definition: L1GctEmCand.h:100
uint16_t m_data
Definition: L1GctEmCand.h:98
void construct(unsigned rank, unsigned eta, unsigned phi)
Definition: L1GctEmCand.cc:99
int16_t m_bx
Definition: L1GctEmCand.h:102
L1CaloRegionDetId regionId() const
get DetID object
Definition: L1CaloEmCand.h:65
bool isolated() const
which stream did this come from
Definition: L1CaloEmCand.h:56
int16_t bx() const
get bunch-crossing index
Definition: L1CaloEmCand.h:62
unsigned rank() const
get rank bits
Definition: L1CaloEmCand.h:44
unsigned iphi() const
global phi index (0-17)
uint8_t m_captureIndex
Definition: L1GctEmCand.h:101
L1GctEmCand::~L1GctEmCand ( )
virtual

destructor (virtual to prevent compiler warnings)

Definition at line 82 of file L1GctEmCand.cc.

82 { }

Member Function Documentation

int16_t L1GctEmCand::bx ( ) const
inline

get bunch-crossing index

Definition at line 82 of file L1GctEmCand.h.

References m_bx.

Referenced by operator<<(), and L1GctElectronFinalSort::setInputEmCand().

82 { return m_bx; }
int16_t m_bx
Definition: L1GctEmCand.h:102
unsigned L1GctEmCand::capBlock ( ) const
inline

which capture block did this come from

Definition at line 76 of file L1GctEmCand.h.

References m_captureBlock.

Referenced by operator<<().

76 { return m_captureBlock; }
uint16_t m_captureBlock
Definition: L1GctEmCand.h:100
unsigned L1GctEmCand::capIndex ( ) const
inline

what index within capture block

Definition at line 79 of file L1GctEmCand.h.

References m_captureIndex.

Referenced by operator<<().

79 { return m_captureIndex; }
uint8_t m_captureIndex
Definition: L1GctEmCand.h:101
void L1GctEmCand::construct ( unsigned  rank,
unsigned  eta,
unsigned  phi 
)
private

Definition at line 99 of file L1GctEmCand.cc.

References m_data.

Referenced by L1GctEmCand().

99  {
100  if (rank>0) {
101  m_data = (rank & 0x3f) + ((eta & 0xf)<<6) + ((phi & 0x1f)<<10);
102  } else {
103  // Default values for zero rank electrons,
104  // different in hardware for positive and negative eta
105  if ((eta & 0x8)==0) { m_data = 0x7000; } else { m_data = 0x7400; }
106  }
107 }
unsigned rank() const
get rank bits
Definition: L1GctEmCand.h:61
uint16_t m_data
Definition: L1GctEmCand.h:98
bool L1GctEmCand::empty ( ) const
inlinevirtual

was an object really found?

Implements L1GctCand.

Definition at line 55 of file L1GctEmCand.h.

References rank().

Referenced by operator==(), Vispa.Gui.VispaWidget.TextField::setAutosizeFont(), and Vispa.Gui.VispaWidget.TextField::setAutotruncate().

55 { return (rank() == 0); }
unsigned rank() const
get rank bits
Definition: L1GctEmCand.h:61
unsigned L1GctEmCand::etaIndex ( ) const
inlinevirtual

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 64 of file L1GctEmCand.h.

References m_data.

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

64 { return (m_data>>6) & 0xf; }
uint16_t m_data
Definition: L1GctEmCand.h:98
unsigned L1GctEmCand::etaSign ( ) const
inlinevirtual

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

Implements L1GctCand.

Definition at line 67 of file L1GctEmCand.h.

References m_data.

Referenced by operator<<(), and regionId().

67 { return (m_data>>9) & 0x1; }
uint16_t m_data
Definition: L1GctEmCand.h:98
bool L1GctEmCand::isolated ( ) const
inline

which stream did this come from

Definition at line 73 of file L1GctEmCand.h.

References m_iso.

Referenced by l1extra::L1EmParticle::L1EmParticle(), name(), operator<<(), and operator==().

73 { return m_iso; }
string L1GctEmCand::name ( ) const
int L1GctEmCand::operator!= ( const L1GctEmCand c) const
inline

inequality operator

Definition at line 89 of file L1GctEmCand.h.

References EnergyCorrector::c.

89 { return !(*this == c); }
int L1GctEmCand::operator== ( const L1GctEmCand c) const
inline

equality operator

Definition at line 85 of file L1GctEmCand.h.

References empty(), isolated(), m_data, m_iso, and raw().

85  { return ((m_data==c.raw() && m_iso==c.isolated())
86  || (this->empty() && c.empty())); }
uint16_t raw() const
get the raw data
Definition: L1GctEmCand.h:58
uint16_t m_data
Definition: L1GctEmCand.h:98
bool empty() const
was an object really found?
Definition: L1GctEmCand.h:55
bool isolated() const
which stream did this come from
Definition: L1GctEmCand.h:73
unsigned L1GctEmCand::phiIndex ( ) const
inlinevirtual

get phi index (0-17)

Implements L1GctCand.

Definition at line 70 of file L1GctEmCand.h.

References m_data.

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

70 { return (m_data>>10) & 0x1f; }
uint16_t m_data
Definition: L1GctEmCand.h:98
unsigned L1GctEmCand::rank ( ) const
inlinevirtual

get rank bits

Implements L1GctCand.

Definition at line 61 of file L1GctEmCand.h.

References m_data.

Referenced by empty(), operator<<(), and L1GctElectronSorter::prioritisedEmCand::rank().

61 { return m_data & 0x3f; }
uint16_t m_data
Definition: L1GctEmCand.h:98
uint16_t L1GctEmCand::raw ( ) const
inline

get the raw data

Definition at line 58 of file L1GctEmCand.h.

References m_data.

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

58 { return m_data; }
uint16_t m_data
Definition: L1GctEmCand.h:98
L1CaloRegionDetId L1GctEmCand::regionId ( ) const
virtual

region associated with the candidate

Implements L1GctCand.

Definition at line 92 of file L1GctEmCand.cc.

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

92  {
93  // get global eta
94  unsigned eta = ( etaSign()==1 ? 10-(etaIndex()&0x7) : 11+(etaIndex()&0x7) );
95  return L1CaloRegionDetId(eta, phiIndex());
96 }
unsigned etaSign() const
get eta sign (1 for -ve Z, 0 for +ve Z)
Definition: L1GctEmCand.h:67
unsigned phiIndex() const
get phi index (0-17)
Definition: L1GctEmCand.h:70
unsigned etaIndex() const
get eta index -6 to -0, +0 to +6 (bit 3 is sign, 1 for -ve Z, 0 for +ve Z)
Definition: L1GctEmCand.h:64

Member Data Documentation

int16_t L1GctEmCand::m_bx
private

Definition at line 102 of file L1GctEmCand.h.

Referenced by bx().

uint16_t L1GctEmCand::m_captureBlock
private

Definition at line 100 of file L1GctEmCand.h.

Referenced by capBlock().

uint8_t L1GctEmCand::m_captureIndex
private

Definition at line 101 of file L1GctEmCand.h.

Referenced by capIndex().

uint16_t L1GctEmCand::m_data
private

Definition at line 98 of file L1GctEmCand.h.

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

bool L1GctEmCand::m_iso
private

Definition at line 99 of file L1GctEmCand.h.

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