![]() |
![]() |
#include <DataFormats/L1GlobalCaloTrigger/interface/L1GctEmCand.h>
Public Member Functions | |
int16_t | bx () const |
get bunch-crossing index | |
unsigned | capBlock () const |
which capture block did this come from | |
unsigned | capIndex () const |
what index within capture block | |
bool | empty () const |
was an object really found? | |
unsigned | etaIndex () const |
get eta index -6 to -0, +0 to +6 (bit 3 is sign, 1 for -ve Z, 0 for +ve Z) | |
unsigned | etaSign () const |
get eta sign (1 for -ve Z, 0 for +ve Z) | |
bool | isolated () const |
which stream did this come from | |
L1GctEmCand (L1CaloEmCand &c) | |
construct from RCT output candidate | |
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. | |
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. | |
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 | |
L1GctEmCand (uint16_t rawData, bool iso) | |
construct from raw data, no source - used in GT | |
L1GctEmCand () | |
default constructor (for vector initialisation etc.) | |
std::string | name () const |
name of object | |
int | operator!= (const L1GctEmCand &c) const |
inequality operator | |
int | operator== (const L1GctEmCand &c) const |
equality operator | |
unsigned | phiIndex () const |
get phi index (0-17) | |
unsigned | rank () const |
get rank bits | |
uint16_t | raw () const |
get the raw data | |
L1CaloRegionDetId | regionId () const |
region associated with the candidate | |
virtual | ~L1GctEmCand () |
destructor (virtual to prevent compiler warnings) | |
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 |
Level-1 Trigger EM candidate within GCT processing.
Definition at line 22 of file L1GctEmCand.h.
L1GctEmCand::L1GctEmCand | ( | ) |
default constructor (for vector initialisation etc.)
Definition at line 12 of file L1GctEmCand.cc.
00012 : 00013 m_data(0), 00014 m_iso(false), 00015 m_captureBlock(0), 00016 m_captureIndex(0), 00017 m_bx(0) 00018 { 00019 00020 }
L1GctEmCand::L1GctEmCand | ( | uint16_t | rawData, | |
bool | iso | |||
) |
construct from raw data, no source - used in GT
Definition at line 23 of file L1GctEmCand.cc.
00023 : 00024 m_data(rawData & 0x7fff), // 0x7fff is to mask off bit 15, which is not data that needs to be stored 00025 m_iso(iso), 00026 m_captureBlock(0), 00027 m_captureIndex(0), 00028 m_bx(0) 00029 { 00030 00031 }
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.
00034 : 00035 m_data(rawData & 0x7fff), // 0x7fff is to mask off bit 15, which is not data that needs to be stored 00036 m_iso(iso), 00037 m_captureBlock(block&0xfff), 00038 m_captureIndex(index&0xff), 00039 m_bx(bx) 00040 { 00041 00042 }
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().
00046 : 00047 m_data(0), // override below 00048 m_iso(iso), 00049 m_captureBlock(0), 00050 m_captureIndex(0), 00051 m_bx(0) 00052 00053 { 00054 construct(rank, eta, phi); 00055 }
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().
00059 : 00060 m_data(0), // override below 00061 m_iso(iso), 00062 m_captureBlock(block&0xfff), 00063 m_captureIndex(index&0xff), 00064 m_bx(bx) 00065 { 00066 construct(rank, eta, phi); 00067 }
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().
00070 : 00071 m_data(0), // override below 00072 m_iso(c.isolated()), 00073 m_captureBlock(0), 00074 m_captureIndex(0), 00075 m_bx(c.bx()) 00076 { 00077 unsigned eta=((c.regionId().rctEta() & 0x7) | (c.regionId().ieta()<11 ? 0x8 : 0x0)); 00078 construct(c.rank(), eta, c.regionId().iphi()); 00079 }
L1GctEmCand::~L1GctEmCand | ( | ) | [virtual] |
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().
00082 { return m_bx; }
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<<().
00076 { return m_captureBlock; }
unsigned L1GctEmCand::capIndex | ( | ) | const [inline] |
what index within capture block
Definition at line 79 of file L1GctEmCand.h.
References m_captureIndex.
Referenced by operator<<().
00079 { return m_captureIndex; }
void L1GctEmCand::construct | ( | unsigned | rank, | |
unsigned | eta, | |||
unsigned | phi | |||
) | [private] |
Definition at line 102 of file L1GctEmCand.cc.
References m_data.
Referenced by L1GctEmCand().
00102 { 00103 if (rank>0) { 00104 m_data = (rank & 0x3f) + ((eta & 0xf)<<6) + ((phi & 0x1f)<<10); 00105 } else { 00106 // Default values for zero rank electrons, 00107 // different in hardware for positive and negative eta 00108 if ((eta & 0x8)==0) { m_data = 0x7000; } else { m_data = 0x7400; } 00109 } 00110 }
bool L1GctEmCand::empty | ( | ) | const [virtual] |
was an object really found?
Implements L1GctCand.
Definition at line 90 of file L1GctEmCand.cc.
References rank().
Referenced by operator==().
00090 { 00091 return (rank() == 0); 00092 }
unsigned L1GctEmCand::etaIndex | ( | ) | const [inline, virtual] |
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 operator<<(), and regionId().
00064 { return (m_data>>6) & 0xf; }
unsigned L1GctEmCand::etaSign | ( | ) | const [inline, virtual] |
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().
00067 { return (m_data>>9) & 0x1; }
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==().
00073 { return m_iso; }
string L1GctEmCand::name | ( | ) | const |
name of object
Definition at line 85 of file L1GctEmCand.cc.
References isolated().
00085 { 00086 return (isolated() ? "iso EM" : "non iso EM" ); 00087 }
int L1GctEmCand::operator!= | ( | const L1GctEmCand & | c | ) | const [inline] |
int L1GctEmCand::operator== | ( | const L1GctEmCand & | c | ) | const [inline] |
unsigned L1GctEmCand::phiIndex | ( | ) | const [inline, virtual] |
get phi index (0-17)
Implements L1GctCand.
Definition at line 70 of file L1GctEmCand.h.
References m_data.
Referenced by operator<<(), and regionId().
00070 { return (m_data>>10) & 0x1f; }
unsigned L1GctEmCand::rank | ( | ) | const [inline, virtual] |
get rank bits
Implements L1GctCand.
Definition at line 61 of file L1GctEmCand.h.
References m_data.
Referenced by empty(), operator<<(), and L1GctElectronSorter::prioritisedEmCand::rank().
00061 { return m_data & 0x3f; }
uint16_t L1GctEmCand::raw | ( | ) | const [inline] |
get the raw data
Definition at line 58 of file L1GctEmCand.h.
References m_data.
Referenced by operator==().
00058 { return m_data; }
L1CaloRegionDetId L1GctEmCand::regionId | ( | ) | const [virtual] |
region associated with the candidate
Implements L1GctCand.
Definition at line 95 of file L1GctEmCand.cc.
References eta, etaIndex(), etaSign(), and phiIndex().
00095 { 00096 // get global eta 00097 unsigned eta = ( etaSign()==1 ? 10-(etaIndex()&0x7) : 11+(etaIndex()&0x7) ); 00098 return L1CaloRegionDetId(eta, phiIndex()); 00099 }
int16_t L1GctEmCand::m_bx [private] |
uint16_t L1GctEmCand::m_captureBlock [private] |
uint8_t L1GctEmCand::m_captureIndex [private] |
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] |