![]() |
![]() |
#include <DataFormats/L1CaloTrigger/interface/L1CaloRegion.h>
Public Member Functions | |
int16_t | bx () const |
get bunch-crossing index | |
bool | empty () const |
is there any information in the candidate | |
unsigned | et () const |
get Et | |
bool | fineGrain () const |
get fine grain bit | |
unsigned | gctEta () const |
get GCT eta index | |
unsigned | gctPhi () const |
get GCT phi index | |
L1CaloRegionDetId | id () const |
get global region ID | |
bool | isHbHe () const |
bool | isHf () const |
forward or central region | |
L1CaloRegion (uint16_t data, unsigned ieta, unsigned iphi, int16_t bx) | |
constructor from raw data and GCT indices for unpacking | |
L1CaloRegion (unsigned et, bool overFlow, bool fineGrain, bool mip, bool quiet, unsigned ieta, unsigned iphi) | |
construct with GCT eta,phi indices, for testing GCT emulator - note argument ordering! | |
L1CaloRegion (unsigned et, bool fineGrain, unsigned crate, unsigned rgn) | |
constructor for RCT emulator (HF regions) | |
L1CaloRegion (unsigned et, bool overFlow, bool tauVeto, bool mip, bool quiet, unsigned crate, unsigned card, unsigned rgn) | |
constructor for RCT emulator (HB/HE regions) | |
L1CaloRegion () | |
default constructor | |
bool | mip () const |
get MIP bit | |
int | operator!= (const L1CaloRegion &c) const |
inequality operator | |
int | operator== (const L1CaloRegion &c) const |
equality operator, including rank, feature bits, and position | |
bool | overFlow () const |
get overflow | |
bool | quiet () const |
get quiet bit | |
uint16_t | raw () const |
get raw data | |
unsigned | rctCard () const |
get RCT reciever card ID (valid output for HB/HE) | |
unsigned | rctCrate () const |
get RCT crate ID | |
unsigned | rctEta () const |
get local eta index (within RCT crate) | |
unsigned | rctPhi () const |
get local phi index (within RCT crate) | |
unsigned | rctRegionIndex () const |
get RCT region index | |
void | reset () |
reset the data content (not position id!) | |
void | setBx (int16_t bx) |
set BX (used in RCT emulator) | |
void | setMip (bool mip) |
set MIP bit (required for GCT emulator standalone operation) | |
void | setQuiet (bool quiet) |
set quiet bit (required for GCT emulator standalone operation) | |
bool | tauVeto () const |
get tau veto bit | |
~L1CaloRegion () | |
destructor | |
Private Member Functions | |
void | pack (unsigned et, bool overFlow, bool fineGrain, bool mip, bool quiet) |
pack the raw data from arguments (used in constructors) | |
Private Attributes | |
int16_t | m_bx |
uint16_t | m_data |
region data : et, overflow, fine grain/tau veto, mip and quiet bits | |
L1CaloRegionDetId | m_id |
region id | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const L1CaloRegion ®) |
print to stream |
Definition at line 22 of file L1CaloRegion.h.
L1CaloRegion::L1CaloRegion | ( | ) |
L1CaloRegion::L1CaloRegion | ( | unsigned | et, | |
bool | fineGrain, | |||
unsigned | crate, | |||
unsigned | rgn | |||
) |
L1CaloRegion::L1CaloRegion | ( | unsigned | et, | |
bool | overFlow, | |||
bool | fineGrain, | |||
bool | mip, | |||
bool | quiet, | |||
unsigned | ieta, | |||
unsigned | iphi | |||
) |
construct with GCT eta,phi indices, for testing GCT emulator - note argument ordering!
Definition at line 33 of file L1CaloRegion.cc.
References pack().
00033 : 00034 m_id(ieta, iphi), 00035 m_data(0), // over-ridden below 00036 m_bx(0) 00037 { 00038 pack(et, overFlow, fineGrain, mip, quiet); 00039 }
L1CaloRegion::L1CaloRegion | ( | uint16_t | data, | |
unsigned | ieta, | |||
unsigned | iphi, | |||
int16_t | bx | |||
) |
L1CaloRegion::~L1CaloRegion | ( | ) |
int16_t L1CaloRegion::bx | ( | ) | const [inline] |
get bunch-crossing index
Definition at line 112 of file L1CaloRegion.h.
References m_bx.
Referenced by L1GctRegion::L1GctRegion(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().
00112 { return m_bx; }
bool L1CaloRegion::empty | ( | ) | const [inline] |
is there any information in the candidate
Definition at line 121 of file L1CaloRegion.h.
References m_data.
Referenced by operator==(), and L1GctRegion::rctEta().
00121 { return (m_data == 0); }
unsigned L1CaloRegion::et | ( | ) | const [inline] |
get Et
Reimplemented in L1GctRegion.
Definition at line 54 of file L1CaloRegion.h.
References isHf(), and m_data.
Referenced by operator<<(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().
bool L1CaloRegion::fineGrain | ( | ) | const [inline] |
get fine grain bit
Definition at line 63 of file L1CaloRegion.h.
References m_data.
Referenced by operator<<(), tauVeto(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().
00063 { return ((m_data>>11) & 0x1)!=0; }
unsigned L1CaloRegion::gctEta | ( | ) | const [inline] |
get GCT eta index
Definition at line 106 of file L1CaloRegion.h.
References L1CaloRegionDetId::ieta(), and m_id.
Referenced by operator<<(), and L1GlobalCaloTrigger::setRegion().
unsigned L1CaloRegion::gctPhi | ( | ) | const [inline] |
get GCT phi index
Definition at line 109 of file L1CaloRegion.h.
References L1CaloRegionDetId::iphi(), and m_id.
Referenced by operator<<(), and L1GlobalCaloTrigger::setRegion().
L1CaloRegionDetId L1CaloRegion::id | ( | void | ) | const [inline] |
get global region ID
Definition at line 84 of file L1CaloRegion.h.
References m_id.
Referenced by operator==().
00084 { return m_id; }
bool L1CaloRegion::isHbHe | ( | ) | const [inline] |
Definition at line 88 of file L1CaloRegion.h.
References L1CaloRegionDetId::isHf(), and m_id.
Referenced by GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().
bool L1CaloRegion::isHf | ( | ) | const [inline] |
forward or central region
Definition at line 87 of file L1CaloRegion.h.
References L1CaloRegionDetId::isHf(), and m_id.
Referenced by et(), and tauVeto().
bool L1CaloRegion::mip | ( | ) | const [inline] |
get MIP bit
Definition at line 66 of file L1CaloRegion.h.
References m_data.
Referenced by operator<<(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().
00066 { return ((m_data>>12) & 0x1)!=0; }
int L1CaloRegion::operator!= | ( | const L1CaloRegion & | c | ) | const [inline] |
int L1CaloRegion::operator== | ( | const L1CaloRegion & | c | ) | const [inline] |
bool L1CaloRegion::overFlow | ( | ) | const [inline] |
get overflow
Definition at line 57 of file L1CaloRegion.h.
References m_data.
Referenced by L1GctRegion::et(), operator<<(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().
00057 { return ((m_data>>10) & 0x1)!=0; }
void L1CaloRegion::pack | ( | unsigned | et, | |
bool | overFlow, | |||
bool | fineGrain, | |||
bool | mip, | |||
bool | quiet | |||
) | [private] |
pack the raw data from arguments (used in constructors)
Definition at line 70 of file L1CaloRegion.cc.
References m_data.
Referenced by L1CaloRegion().
00070 { 00071 bool checkOvF = overFlow || (et>=0x400); 00072 m_data = 00073 (et & 0x3ff) | 00074 ((checkOvF) ? 0x400 : 0x0) | 00075 ((fineGrain) ? 0x800 : 0x0) | 00076 ((mip) ? 0x1000 : 0x0) | 00077 ((quiet) ? 0x2000 : 0x0); 00078 }
bool L1CaloRegion::quiet | ( | ) | const [inline] |
get quiet bit
Definition at line 69 of file L1CaloRegion.h.
References m_data.
Referenced by operator<<(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().
00069 { return ((m_data>>13) & 0x1)!=0; }
uint16_t L1CaloRegion::raw | ( | ) | const [inline] |
get raw data
Definition at line 51 of file L1CaloRegion.h.
References m_data.
Referenced by L1GctRegion::et(), and operator==().
00051 { return m_data; }
unsigned L1CaloRegion::rctCard | ( | ) | const [inline] |
get RCT reciever card ID (valid output for HB/HE)
Definition at line 94 of file L1CaloRegion.h.
References m_id, and L1CaloRegionDetId::rctCard().
Referenced by operator<<(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().
unsigned L1CaloRegion::rctCrate | ( | ) | const [inline] |
get RCT crate ID
Definition at line 91 of file L1CaloRegion.h.
References m_id, and L1CaloRegionDetId::rctCrate().
Referenced by operator<<(), L1GctJetFinderBase::setInputRegion(), L1GlobalCaloTrigger::setRegion(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().
unsigned L1CaloRegion::rctEta | ( | ) | const [inline] |
get local eta index (within RCT crate)
Reimplemented in L1GctRegion.
Definition at line 100 of file L1CaloRegion.h.
References m_id, and L1CaloRegionDetId::rctEta().
Referenced by operator<<(), and L1GctJetFinderBase::setInputRegion().
unsigned L1CaloRegion::rctPhi | ( | ) | const [inline] |
get local phi index (within RCT crate)
Definition at line 103 of file L1CaloRegion.h.
References m_id, and L1CaloRegionDetId::rctPhi().
Referenced by operator<<(), and L1GctJetFinderBase::setInputRegion().
unsigned L1CaloRegion::rctRegionIndex | ( | ) | const [inline] |
get RCT region index
Definition at line 97 of file L1CaloRegion.h.
References m_id, and L1CaloRegionDetId::rctRegion().
Referenced by operator<<(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().
reset the data content (not position id!)
Definition at line 48 of file L1CaloRegion.h.
References m_data.
00048 { m_data = 0; }
void L1CaloRegion::setBx | ( | int16_t | bx | ) |
set BX (used in RCT emulator)
Definition at line 54 of file L1CaloRegion.cc.
References m_bx.
Referenced by L1GctRegion::L1GctRegion(), GctFormatTranslateBase::makeL1CaloRegionBackPortHack(), and L1GctJetFinderBase::setupObjects().
set MIP bit (required for GCT emulator standalone operation)
Reimplemented in L1GctRegion.
Definition at line 59 of file L1CaloRegion.cc.
References m_data.
set quiet bit (required for GCT emulator standalone operation)
Reimplemented in L1GctRegion.
Definition at line 65 of file L1CaloRegion.cc.
References m_data.
bool L1CaloRegion::tauVeto | ( | ) | const [inline] |
get tau veto bit
Definition at line 60 of file L1CaloRegion.h.
References fineGrain(), and isHf().
Referenced by operator<<().
std::ostream& operator<< | ( | std::ostream & | os, | |
const L1CaloRegion & | reg | |||
) | [friend] |
print to stream
int16_t L1CaloRegion::m_bx [private] |
uint16_t L1CaloRegion::m_data [private] |
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition at line 135 of file L1CaloRegion.h.
Referenced by empty(), et(), fineGrain(), mip(), operator==(), overFlow(), pack(), quiet(), raw(), reset(), setMip(), and setQuiet().
L1CaloRegionDetId L1CaloRegion::m_id [private] |
region id
Definition at line 132 of file L1CaloRegion.h.
Referenced by gctEta(), gctPhi(), id(), isHbHe(), isHf(), operator==(), rctCard(), rctCrate(), rctEta(), rctPhi(), and rctRegionIndex().