CMS 3D CMS Logo

L1CaloMipQuietRegion.cc
Go to the documentation of this file.
2 
3 // Namespace resolution
4 using std::dec;
5 using std::endl;
6 using std::hex;
7 using std::noshowbase;
8 using std::ostream;
9 using std::showbase;
10 
11 L1CaloMipQuietRegion::L1CaloMipQuietRegion() : m_id(), m_data(0), m_bx(0) {}
12 
13 L1CaloMipQuietRegion::L1CaloMipQuietRegion(bool mip, bool quiet, unsigned crate, unsigned card, unsigned rgn, int16_t bx)
14  : m_id(crate, card, rgn),
15  m_data(0), // Over-ridden below
16  m_bx(bx) {
17  pack(mip, quiet);
18 }
19 
20 L1CaloMipQuietRegion::L1CaloMipQuietRegion(bool mip, bool quiet, unsigned ieta, unsigned iphi, int16_t bx)
21  : m_id(ieta, iphi),
22  m_data(0), // Over-ridden below
23  m_bx(bx) {
24  pack(mip, quiet);
25 }
26 
28  return (m_data == rhs.raw() && m_bx == rhs.bx() && m_id == rhs.id());
29 }
30 
31 ostream& operator<<(ostream& os, const L1CaloMipQuietRegion& rhs) {
32  os << "L1CaloMipQuietRegion:"
33  << " MIP=" << rhs.mip() << " Quiet=" << rhs.quiet() << endl
34  << " RCT crate=" << rhs.rctCrate() << " RCT card=" << rhs.rctCard() << " RCT rgn=" << rhs.rctRegionIndex()
35  << " RCT eta=" << rhs.rctEta() << " RCT phi=" << rhs.rctPhi() << endl
36  << " GCT eta=" << rhs.gctEta() << " GCT phi=" << rhs.gctPhi() << " BX=" << rhs.bx() << endl;
37  return os;
38 }
bool operator==(const L1CaloMipQuietRegion &rhs) const
Equality operator; compares all data: MIP/Quiet bits, bunch crossing & geographical.
L1CaloRegionDetId id() const
Get global region ID.
bool mip() const
Get MIP bit.
unsigned gctEta() const
Get GCT eta index.
uint8_t m_data
MIP and Quiet bits for the region, packed in bit0 + bit1 respectively.
L1CaloMipQuietRegion()
Default constructor.
unsigned rctEta() const
Get local eta index (within RCT crate).
unsigned gctPhi() const
Get GCT phi index.
int16_t m_bx
Bunch crossing.
L1CaloRegionDetId m_id
Geographical info: region ID.
uint8_t raw() const
Get raw data.
bool quiet() const
Get Quiet bit.
int16_t bx() const
Get bunch crossing.
Miniumum Ionising Particle (MIP) and Quiet bits for a calorimeter trigger region. ...
unsigned rctCard() const
Get RCT reciever card ID.
ostream & operator<<(ostream &os, const L1CaloMipQuietRegion &rhs)
unsigned rctCrate() const
Get RCT crate ID.
unsigned rctRegionIndex() const
Get RCT region index.
void pack(bool mip, bool quiet)
For use in constructors - packs MIP/Quiet bools up into m_data;.
unsigned rctPhi() const
Get local phi index (within RCT crate).