CMS 3D CMS Logo

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

Miniumum Ionising Particle (MIP) and Quiet bits for a calorimeter trigger region. More...

#include <L1CaloMipQuietRegion.h>

Public Member Functions

int16_t bx () const
 Get bunch crossing. More...
 
bool empty () const
 Is the object empty? Currently always returns false. More...
 
unsigned gctEta () const
 Get GCT eta index. More...
 
unsigned gctPhi () const
 Get GCT phi index. More...
 
L1CaloRegionDetId id () const
 Get global region ID. More...
 
 L1CaloMipQuietRegion ()
 Default constructor. More...
 
 L1CaloMipQuietRegion (bool mip, bool quiet, unsigned crate, unsigned card, unsigned rgn, int16_t bx)
 Constructor for RCT emulator (HB/HE regions) More...
 
 L1CaloMipQuietRegion (bool mip, bool quiet, unsigned ieta, unsigned iphi, int16_t bx=0)
 Construct with GCT eta,phi indices, for testing GCT emulator. More...
 
bool mip () const
 Get MIP bit. More...
 
bool operator!= (const L1CaloMipQuietRegion &rhs) const
 Inequality operator. More...
 
bool operator== (const L1CaloMipQuietRegion &rhs) const
 Equality operator; compares all data: MIP/Quiet bits, bunch crossing & geographical. More...
 
bool quiet () const
 Get Quiet bit. More...
 
uint8_t raw () const
 Get raw data. More...
 
unsigned rctCard () const
 Get RCT reciever card ID. More...
 
unsigned rctCrate () const
 Get RCT crate ID. More...
 
unsigned rctEta () const
 Get local eta index (within RCT crate). More...
 
unsigned rctPhi () const
 Get local phi index (within RCT crate). More...
 
unsigned rctRegionIndex () const
 Get RCT region index. More...
 
void reset ()
 Resets the data content - i.e. resets MIP/Quiet and bx, but not position ID! More...
 
void setBx (int16_t bx)
 Set bunch crossing. More...
 
void setMip (bool mip)
 Set MIP bit. More...
 
void setQuiet (bool quiet)
 Set Quiet bit. More...
 
 ~L1CaloMipQuietRegion ()
 Destructor. More...
 

Private Member Functions

void pack (bool mip, bool quiet)
 For use in constructors - packs MIP/Quiet bools up into m_data;. More...
 

Private Attributes

int16_t m_bx
 Bunch crossing. More...
 
uint8_t m_data
 MIP and Quiet bits for the region, packed in bit0 + bit1 respectively. More...
 
L1CaloRegionDetId m_id
 Geographical info: region ID. More...
 

Detailed Description

Miniumum Ionising Particle (MIP) and Quiet bits for a calorimeter trigger region.

Author
Robert Frazier

Definition at line 15 of file L1CaloMipQuietRegion.h.

Constructor & Destructor Documentation

◆ L1CaloMipQuietRegion() [1/3]

L1CaloMipQuietRegion::L1CaloMipQuietRegion ( )

Default constructor.

Definition at line 11 of file L1CaloMipQuietRegion.cc.

11 : m_id(), m_data(0), m_bx(0) {}
uint8_t m_data
MIP and Quiet bits for the region, packed in bit0 + bit1 respectively.
int16_t m_bx
Bunch crossing.
L1CaloRegionDetId m_id
Geographical info: region ID.

◆ L1CaloMipQuietRegion() [2/3]

L1CaloMipQuietRegion::L1CaloMipQuietRegion ( bool  mip,
bool  quiet,
unsigned  crate,
unsigned  card,
unsigned  rgn,
int16_t  bx 
)

Constructor for RCT emulator (HB/HE regions)

Definition at line 13 of file L1CaloMipQuietRegion.cc.

References mip(), pack(), and quiet().

14  : m_id(crate, card, rgn),
15  m_data(0), // Over-ridden below
16  m_bx(bx) {
17  pack(mip, quiet);
18 }
bool mip() const
Get MIP bit.
uint8_t m_data
MIP and Quiet bits for the region, packed in bit0 + bit1 respectively.
int16_t m_bx
Bunch crossing.
L1CaloRegionDetId m_id
Geographical info: region ID.
bool quiet() const
Get Quiet bit.
int16_t bx() const
Get bunch crossing.
void pack(bool mip, bool quiet)
For use in constructors - packs MIP/Quiet bools up into m_data;.

◆ L1CaloMipQuietRegion() [3/3]

L1CaloMipQuietRegion::L1CaloMipQuietRegion ( bool  mip,
bool  quiet,
unsigned  ieta,
unsigned  iphi,
int16_t  bx = 0 
)

Construct with GCT eta,phi indices, for testing GCT emulator.

Definition at line 20 of file L1CaloMipQuietRegion.cc.

References mip(), pack(), and quiet().

21  : m_id(ieta, iphi),
22  m_data(0), // Over-ridden below
23  m_bx(bx) {
24  pack(mip, quiet);
25 }
bool mip() const
Get MIP bit.
uint8_t m_data
MIP and Quiet bits for the region, packed in bit0 + bit1 respectively.
int16_t m_bx
Bunch crossing.
L1CaloRegionDetId m_id
Geographical info: region ID.
bool quiet() const
Get Quiet bit.
int16_t bx() const
Get bunch crossing.
void pack(bool mip, bool quiet)
For use in constructors - packs MIP/Quiet bools up into m_data;.

◆ ~L1CaloMipQuietRegion()

L1CaloMipQuietRegion::~L1CaloMipQuietRegion ( )
inline

Destructor.

Definition at line 29 of file L1CaloMipQuietRegion.h.

29 {}

Member Function Documentation

◆ bx()

int16_t L1CaloMipQuietRegion::bx ( ) const
inline

Get bunch crossing.

Definition at line 47 of file L1CaloMipQuietRegion.h.

References m_bx.

Referenced by operator<<(), operator==(), and setBx().

◆ empty()

bool L1CaloMipQuietRegion::empty ( ) const
inline

Is the object empty? Currently always returns false.

Definition at line 78 of file L1CaloMipQuietRegion.h.

78 { return false; }

◆ gctEta()

unsigned L1CaloMipQuietRegion::gctEta ( ) const
inline

Get GCT eta index.

Definition at line 71 of file L1CaloMipQuietRegion.h.

References L1CaloRegionDetId::ieta(), and m_id.

Referenced by operator<<().

◆ gctPhi()

unsigned L1CaloMipQuietRegion::gctPhi ( ) const
inline

Get GCT phi index.

Definition at line 73 of file L1CaloMipQuietRegion.h.

References L1CaloRegionDetId::iphi(), and m_id.

Referenced by operator<<().

◆ id()

L1CaloRegionDetId L1CaloMipQuietRegion::id ( ) const
inline

Get global region ID.

Definition at line 59 of file L1CaloMipQuietRegion.h.

References m_id.

Referenced by operator==().

◆ mip()

bool L1CaloMipQuietRegion::mip ( ) const
inline

Get MIP bit.

Definition at line 43 of file L1CaloMipQuietRegion.h.

References m_data, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by L1CaloMipQuietRegion(), operator<<(), pack(), and setMip().

◆ operator!=()

bool L1CaloMipQuietRegion::operator!= ( const L1CaloMipQuietRegion rhs) const
inline

Inequality operator.

Definition at line 37 of file L1CaloMipQuietRegion.h.

37 { return !(*this == rhs); }

◆ operator==()

bool L1CaloMipQuietRegion::operator== ( const L1CaloMipQuietRegion rhs) const

Equality operator; compares all data: MIP/Quiet bits, bunch crossing & geographical.

Definition at line 27 of file L1CaloMipQuietRegion.cc.

References bx(), id(), m_bx, m_data, m_id, and raw().

27  {
28  return (m_data == rhs.raw() && m_bx == rhs.bx() && m_id == rhs.id());
29 }
L1CaloRegionDetId id() const
Get global region ID.
uint8_t m_data
MIP and Quiet bits for the region, packed in bit0 + bit1 respectively.
int16_t m_bx
Bunch crossing.
L1CaloRegionDetId m_id
Geographical info: region ID.
uint8_t raw() const
Get raw data.
int16_t bx() const
Get bunch crossing.

◆ pack()

void L1CaloMipQuietRegion::pack ( bool  mip,
bool  quiet 
)
inlineprivate

For use in constructors - packs MIP/Quiet bools up into m_data;.

Definition at line 98 of file L1CaloMipQuietRegion.h.

References m_data, mip(), and quiet().

Referenced by L1CaloMipQuietRegion().

98 { m_data = (mip ? 1 : 0) | (quiet ? 2 : 0); }
bool mip() const
Get MIP bit.
uint8_t m_data
MIP and Quiet bits for the region, packed in bit0 + bit1 respectively.
bool quiet() const
Get Quiet bit.

◆ quiet()

bool L1CaloMipQuietRegion::quiet ( ) const
inline

Get Quiet bit.

Definition at line 45 of file L1CaloMipQuietRegion.h.

References m_data, and testProducerWithPsetDescEmpty_cfi::x1.

Referenced by L1CaloMipQuietRegion(), operator<<(), pack(), and setQuiet().

◆ raw()

uint8_t L1CaloMipQuietRegion::raw ( ) const
inline

Get raw data.

Definition at line 41 of file L1CaloMipQuietRegion.h.

References m_data.

Referenced by operator==().

◆ rctCard()

unsigned L1CaloMipQuietRegion::rctCard ( ) const
inline

Get RCT reciever card ID.

Definition at line 63 of file L1CaloMipQuietRegion.h.

References m_id, and L1CaloRegionDetId::rctCard().

Referenced by operator<<().

◆ rctCrate()

unsigned L1CaloMipQuietRegion::rctCrate ( ) const
inline

Get RCT crate ID.

Definition at line 61 of file L1CaloMipQuietRegion.h.

References m_id, and L1CaloRegionDetId::rctCrate().

Referenced by operator<<().

◆ rctEta()

unsigned L1CaloMipQuietRegion::rctEta ( ) const
inline

Get local eta index (within RCT crate).

Definition at line 67 of file L1CaloMipQuietRegion.h.

References m_id, and L1CaloRegionDetId::rctEta().

Referenced by operator<<().

◆ rctPhi()

unsigned L1CaloMipQuietRegion::rctPhi ( ) const
inline

Get local phi index (within RCT crate).

Definition at line 69 of file L1CaloMipQuietRegion.h.

References m_id, and L1CaloRegionDetId::rctPhi().

Referenced by operator<<().

◆ rctRegionIndex()

unsigned L1CaloMipQuietRegion::rctRegionIndex ( ) const
inline

Get RCT region index.

Definition at line 65 of file L1CaloMipQuietRegion.h.

References m_id, and L1CaloRegionDetId::rctRegion().

Referenced by operator<<().

◆ reset()

void L1CaloMipQuietRegion::reset ( void  )
inline

Resets the data content - i.e. resets MIP/Quiet and bx, but not position ID!

Definition at line 81 of file L1CaloMipQuietRegion.h.

References m_bx, and m_data.

81  {
82  m_data = 0;
83  m_bx = 0;
84  }
uint8_t m_data
MIP and Quiet bits for the region, packed in bit0 + bit1 respectively.
int16_t m_bx
Bunch crossing.

◆ setBx()

void L1CaloMipQuietRegion::setBx ( int16_t  bx)
inline

Set bunch crossing.

Definition at line 55 of file L1CaloMipQuietRegion.h.

References bx(), and m_bx.

◆ setMip()

void L1CaloMipQuietRegion::setMip ( bool  mip)
inline

Set MIP bit.

Definition at line 51 of file L1CaloMipQuietRegion.h.

References m_data, and mip().

◆ setQuiet()

void L1CaloMipQuietRegion::setQuiet ( bool  quiet)
inline

Set Quiet bit.

Definition at line 53 of file L1CaloMipQuietRegion.h.

References m_data, and quiet().

Member Data Documentation

◆ m_bx

int16_t L1CaloMipQuietRegion::m_bx
private

Bunch crossing.

Definition at line 93 of file L1CaloMipQuietRegion.h.

Referenced by bx(), operator==(), reset(), and setBx().

◆ m_data

uint8_t L1CaloMipQuietRegion::m_data
private

MIP and Quiet bits for the region, packed in bit0 + bit1 respectively.

Definition at line 91 of file L1CaloMipQuietRegion.h.

Referenced by mip(), operator==(), pack(), quiet(), raw(), reset(), setMip(), and setQuiet().

◆ m_id

L1CaloRegionDetId L1CaloMipQuietRegion::m_id
private

Geographical info: region ID.

Definition at line 89 of file L1CaloMipQuietRegion.h.

Referenced by gctEta(), gctPhi(), id(), operator==(), rctCard(), rctCrate(), rctEta(), rctPhi(), and rctRegionIndex().