CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
L1CaloRegion Class Reference

A calorimeter trigger region (sum of 4x4 trigger towers) More...

#include <L1CaloRegion.h>

Inheritance diagram for L1CaloRegion:
L1GctRegion

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
 is there any information in the candidate More...
 
unsigned et () const
 get Et More...
 
unsigned etFullScale () const
 get Et for internal GCT use More...
 
bool fineGrain () const
 get fine grain bit 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...
 
bool isHbHe () const
 
bool isHf () const
 forward or central region More...
 
 L1CaloRegion ()
 default constructor More...
 
 L1CaloRegion (unsigned et, bool overFlow, bool tauVeto, bool mip, bool quiet, unsigned crate, unsigned card, unsigned rgn)
 constructor for RCT emulator (HB/HE regions) - to be removed! More...
 
 L1CaloRegion (unsigned et, bool fineGrain, unsigned crate, unsigned rgn)
 constructor for RCT emulator (HF regions) - to be removed! More...
 
 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! - to be removed! More...
 
 L1CaloRegion (uint16_t data, unsigned ieta, unsigned iphi, int16_t bx)
 constructor from raw data and GCT indices for unpacking - to be removed! More...
 
bool mip () const
 get MIP bit More...
 
int operator!= (const L1CaloRegion &c) const
 inequality operator More...
 
int operator== (const L1CaloRegion &c) const
 equality operator, including rank, feature bits, and position More...
 
bool overFlow () const
 get overflow More...
 
bool quiet () const
 get quiet bit More...
 
uint16_t raw () const
 get raw data More...
 
unsigned rctCard () const
 get RCT reciever card ID (valid output for HB/HE) 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 ()
 reset the data content (not position id!) More...
 
void setBx (int16_t bx)
 set bx More...
 
void setCaptureBlock (uint16_t capBlock)
 set cap block More...
 
void setCaptureIndex (uint16_t capIndex)
 set cap index More...
 
void setMip (bool mip)
 set MIP bit (required for GCT emulator standalone operation) More...
 
void setQuiet (bool quiet)
 set quiet bit (required for GCT emulator standalone operation) More...
 
void setRawData (uint32_t data)
 set data More...
 
bool tauVeto () const
 get tau veto bit More...
 
 ~L1CaloRegion ()
 destructor More...
 

Static Public Member Functions

static L1CaloRegion makeGctJetRegion (const unsigned et, const bool overFlow, const bool fineGrain, const unsigned ieta, const unsigned iphi, const int16_t bx)
 construct region for use in GCT internal jet-finding More...
 
static L1CaloRegion makeHBHERegion (const unsigned et, const bool overFlow, const bool tauVeto, const bool mip, const bool quiet, const unsigned crate, const unsigned card, const unsigned rgn)
 constructor HB/HE region from components More...
 
static L1CaloRegion makeHFRegion (const unsigned et, const bool fineGrain, const unsigned crate, const unsigned rgn)
 construct HF region from components More...
 
static L1CaloRegion makeRegionFromGctIndices (const unsigned et, const bool overFlow, const bool fineGrain, const bool mip, const bool quiet, const unsigned ieta, const unsigned iphi)
 construct region from GCT indices More...
 
static L1CaloRegion makeRegionFromUnpacker (const uint16_t data, const unsigned ieta, const unsigned iphi, const uint16_t block, const uint16_t index, const int16_t bx)
 constructor from raw data and GCT indices for unpacking More...
 

Private Member Functions

void pack (unsigned et, bool overFlow, bool fineGrain, bool mip, bool quiet)
 pack the raw data from arguments (used in constructors) More...
 
void pack12BitsEt (unsigned et, bool overFlow, bool fineGrain, bool mip, bool quiet)
 pack the raw data from arguments (used in constructors) More...
 
void setRegionId (L1CaloRegionDetId id)
 set region ID More...
 

Private Attributes

int16_t m_bx
 
uint16_t m_captureBlock
 
uint8_t m_captureIndex
 
uint16_t m_data
 region data : et, overflow, fine grain/tau veto, mip and quiet bits More...
 
L1CaloRegionDetId m_id
 region id More...
 

Friends

std::ostream & operator<< (std::ostream &os, const L1CaloRegion &reg)
 print to stream More...
 

Detailed Description

A calorimeter trigger region (sum of 4x4 trigger towers)

Author
Jim Brooke
Date
May 2006

Definition at line 22 of file L1CaloRegion.h.

Constructor & Destructor Documentation

L1CaloRegion::L1CaloRegion ( )

default constructor

Definition at line 11 of file L1CaloRegion.cc.

11 : m_id(), m_data(0), m_bx(0) { }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
int16_t m_bx
Definition: L1CaloRegion.h:224
L1CaloRegion::L1CaloRegion ( unsigned  et,
bool  overFlow,
bool  tauVeto,
bool  mip,
bool  quiet,
unsigned  crate,
unsigned  card,
unsigned  rgn 
)

constructor for RCT emulator (HB/HE regions) - to be removed!

Definition at line 15 of file L1CaloRegion.cc.

References pack().

15  :
16  m_id(crate, card, rgn),
17  m_data(0), // over-ridden below
18  m_bx(0)
19 {
21 }
unsigned et() const
get Et
Definition: L1CaloRegion.h:116
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:122
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
bool quiet() const
get quiet bit
Definition: L1CaloRegion.h:134
bool tauVeto() const
get tau veto bit
Definition: L1CaloRegion.h:125
bool mip() const
get MIP bit
Definition: L1CaloRegion.h:131
void pack(unsigned et, bool overFlow, bool fineGrain, bool mip, bool quiet)
pack the raw data from arguments (used in constructors)
int16_t m_bx
Definition: L1CaloRegion.h:224
L1CaloRegion::L1CaloRegion ( unsigned  et,
bool  fineGrain,
unsigned  crate,
unsigned  rgn 
)

constructor for RCT emulator (HF regions) - to be removed!

Definition at line 24 of file L1CaloRegion.cc.

References pack().

24  :
25  m_id(crate, 999, rgn),
26  m_data(0), // over-ridden below
27  m_bx(0)
28 {
29  pack((et & 0xff), (et >= 0xff), fineGrain, false, false);
30 }
unsigned et() const
get Et
Definition: L1CaloRegion.h:116
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
void pack(unsigned et, bool overFlow, bool fineGrain, bool mip, bool quiet)
pack the raw data from arguments (used in constructors)
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:128
int16_t m_bx
Definition: L1CaloRegion.h:224
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! - to be removed!

Definition at line 33 of file L1CaloRegion.cc.

References pack().

39  :
40  m_id(ieta, iphi),
41  m_data(0), // over-ridden below
42  m_bx(0)
43 {
45 }
unsigned et() const
get Et
Definition: L1CaloRegion.h:116
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:122
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
bool quiet() const
get quiet bit
Definition: L1CaloRegion.h:134
bool mip() const
get MIP bit
Definition: L1CaloRegion.h:131
void pack(unsigned et, bool overFlow, bool fineGrain, bool mip, bool quiet)
pack the raw data from arguments (used in constructors)
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:128
int16_t m_bx
Definition: L1CaloRegion.h:224
L1CaloRegion::L1CaloRegion ( uint16_t  data,
unsigned  ieta,
unsigned  iphi,
int16_t  bx 
)

constructor from raw data and GCT indices for unpacking - to be removed!

Definition at line 48 of file L1CaloRegion.cc.

48  :
49  m_id(ieta, iphi),
50  m_data(data),
51  m_bx(bx)
52 {
53 
54 }
int16_t bx() const
get bunch-crossing index
Definition: L1CaloRegion.h:192
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
int16_t m_bx
Definition: L1CaloRegion.h:224
L1CaloRegion::~L1CaloRegion ( )

destructor

Definition at line 57 of file L1CaloRegion.cc.

57 { }

Member Function Documentation

int16_t L1CaloRegion::bx ( ) const
inline
unsigned L1CaloRegion::capBlock ( ) const
inline

which capture block did this come from

Definition at line 186 of file L1CaloRegion.h.

References m_captureBlock.

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

186 { return m_captureBlock; }
uint16_t m_captureBlock
Definition: L1CaloRegion.h:222
unsigned L1CaloRegion::capIndex ( ) const
inline

what index within capture block

Definition at line 189 of file L1CaloRegion.h.

References m_captureIndex.

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

189 { return m_captureIndex; }
uint8_t m_captureIndex
Definition: L1CaloRegion.h:223
bool L1CaloRegion::empty ( ) const
inline

is there any information in the candidate

Definition at line 201 of file L1CaloRegion.h.

References m_data, and operator<<.

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

201 { return (m_data == 0); }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
unsigned L1CaloRegion::et ( ) const
inline

get Et

Definition at line 116 of file L1CaloRegion.h.

References isHf(), and m_data.

Referenced by L1GctRegion::makeJfInputRegion(), operator<<(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().

116 { return (isHf() ? m_data&0xff : m_data&0x3ff); }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
bool isHf() const
forward or central region
Definition: L1CaloRegion.h:161
unsigned L1CaloRegion::etFullScale ( ) const
inline

get Et for internal GCT use

Definition at line 119 of file L1CaloRegion.h.

References m_data.

119 { return m_data&0xfff; }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
bool L1CaloRegion::fineGrain ( ) const
inline

get fine grain bit

Definition at line 128 of file L1CaloRegion.h.

References m_data, and globals_cff::x1.

Referenced by L1GctRegion::clrFeatureBit1(), L1GctRegion::makeJfInputRegion(), operator<<(), tauVeto(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().

128 { return ((m_data>>11) & 0x1)!=0; }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
unsigned L1CaloRegion::gctEta ( ) const
inline

get GCT eta index

Definition at line 180 of file L1CaloRegion.h.

References L1CaloRegionDetId::ieta(), and m_id.

Referenced by L1GctRegion::makeJfInputRegion(), L1GctHardwareJetFinder::makeProtoJet(), operator<<(), and L1GlobalCaloTrigger::setRegion().

180 { return m_id.ieta(); }
unsigned ieta() const
global eta index (0-21)
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
unsigned L1CaloRegion::gctPhi ( ) const
inline

get GCT phi index

Definition at line 183 of file L1CaloRegion.h.

References L1CaloRegionDetId::iphi(), and m_id.

Referenced by L1GctRegion::makeJfInputRegion(), L1GctHardwareJetFinder::makeProtoJet(), operator<<(), and L1GlobalCaloTrigger::setRegion().

183 { return m_id.iphi(); }
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
unsigned iphi() const
global phi index (0-17)
L1CaloRegionDetId L1CaloRegion::id ( ) const
inline

get global region ID

Definition at line 158 of file L1CaloRegion.h.

References m_id.

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

158 { return m_id; }
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
bool L1CaloRegion::isHbHe ( ) const
inline

Definition at line 162 of file L1CaloRegion.h.

References L1CaloRegionDetId::isHf(), and m_id.

Referenced by GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().

162 { return !m_id.isHf(); }
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
bool isHf() const
return central or forward type
bool L1CaloRegion::isHf ( ) const
inline

forward or central region

Definition at line 161 of file L1CaloRegion.h.

References L1CaloRegionDetId::isHf(), and m_id.

Referenced by et(), L1GctRegion::makeJfInputRegion(), and tauVeto().

161 { return m_id.isHf(); }
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
bool isHf() const
return central or forward type
L1CaloRegion L1CaloRegion::makeGctJetRegion ( const unsigned  et,
const bool  overFlow,
const bool  fineGrain,
const unsigned  ieta,
const unsigned  iphi,
const int16_t  bx 
)
static

construct region for use in GCT internal jet-finding

Definition at line 121 of file L1CaloRegion.cc.

References pack12BitsEt(), alignCSCRings::r, setBx(), and setRegionId().

126  {
127  L1CaloRegion r;
128  r.setRegionId( L1CaloRegionDetId(ieta, iphi) );
129  r.setBx(bx);
130  r.pack12BitsEt(et, overFlow, fineGrain, false, false);
131  return r;
132 
133 }
int16_t bx() const
get bunch-crossing index
Definition: L1CaloRegion.h:192
unsigned et() const
get Et
Definition: L1CaloRegion.h:116
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:122
void setBx(int16_t bx)
set bx
void setRegionId(L1CaloRegionDetId id)
set region ID
Definition: L1CaloRegion.h:209
void pack12BitsEt(unsigned et, bool overFlow, bool fineGrain, bool mip, bool quiet)
pack the raw data from arguments (used in constructors)
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:128
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:22
L1CaloRegion L1CaloRegion::makeHBHERegion ( const unsigned  et,
const bool  overFlow,
const bool  tauVeto,
const bool  mip,
const bool  quiet,
const unsigned  crate,
const unsigned  card,
const unsigned  rgn 
)
static

constructor HB/HE region from components

Definition at line 62 of file L1CaloRegion.cc.

References pack(), alignCSCRings::r, setBx(), and setRegionId().

Referenced by SourceCardTextToRctDigi::produce().

69  {
71  r.setRegionId( L1CaloRegionDetId(crate, card, rgn) );
72  r.setBx(0);
74  return r;
75 }
unsigned et() const
get Et
Definition: L1CaloRegion.h:116
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:122
void setBx(int16_t bx)
set bx
bool quiet() const
get quiet bit
Definition: L1CaloRegion.h:134
void setRegionId(L1CaloRegionDetId id)
set region ID
Definition: L1CaloRegion.h:209
bool tauVeto() const
get tau veto bit
Definition: L1CaloRegion.h:125
bool mip() const
get MIP bit
Definition: L1CaloRegion.h:131
void pack(unsigned et, bool overFlow, bool fineGrain, bool mip, bool quiet)
pack the raw data from arguments (used in constructors)
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:22
L1CaloRegion L1CaloRegion::makeHFRegion ( const unsigned  et,
const bool  fineGrain,
const unsigned  crate,
const unsigned  rgn 
)
static

construct HF region from components

Definition at line 78 of file L1CaloRegion.cc.

References pack(), alignCSCRings::r, setBx(), and setRegionId().

Referenced by SourceCardTextToRctDigi::produce().

81  {
83  r.setRegionId( L1CaloRegionDetId(crate, 999, rgn) );
84  r.setBx(0);
85  r.pack((et & 0xff), (et >= 0xff), fineGrain, false, false);
86  return r;
87 }
unsigned et() const
get Et
Definition: L1CaloRegion.h:116
void setBx(int16_t bx)
set bx
void setRegionId(L1CaloRegionDetId id)
set region ID
Definition: L1CaloRegion.h:209
void pack(unsigned et, bool overFlow, bool fineGrain, bool mip, bool quiet)
pack the raw data from arguments (used in constructors)
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:128
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:22
L1CaloRegion L1CaloRegion::makeRegionFromGctIndices ( const unsigned  et,
const bool  overFlow,
const bool  fineGrain,
const bool  mip,
const bool  quiet,
const unsigned  ieta,
const unsigned  iphi 
)
static

construct region from GCT indices

Definition at line 90 of file L1CaloRegion.cc.

References pack(), alignCSCRings::r, setBx(), and setRegionId().

96  {
98  r.setRegionId( L1CaloRegionDetId(ieta, iphi) );
99  r.setBx(0);
101  return r;
102 }
unsigned et() const
get Et
Definition: L1CaloRegion.h:116
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:122
void setBx(int16_t bx)
set bx
bool quiet() const
get quiet bit
Definition: L1CaloRegion.h:134
void setRegionId(L1CaloRegionDetId id)
set region ID
Definition: L1CaloRegion.h:209
bool mip() const
get MIP bit
Definition: L1CaloRegion.h:131
void pack(unsigned et, bool overFlow, bool fineGrain, bool mip, bool quiet)
pack the raw data from arguments (used in constructors)
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:128
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:22
L1CaloRegion L1CaloRegion::makeRegionFromUnpacker ( const uint16_t  data,
const unsigned  ieta,
const unsigned  iphi,
const uint16_t  block,
const uint16_t  index,
const int16_t  bx 
)
static

constructor from raw data and GCT indices for unpacking

Definition at line 105 of file L1CaloRegion.cc.

References alignCSCRings::r, setBx(), setCaptureBlock(), setCaptureIndex(), setRawData(), and setRegionId().

Referenced by GctFormatTranslateV35::blockToRctCaloRegions(), and GctFormatTranslateV38::blockToRctCaloRegions().

111 {
112  L1CaloRegion r;
113  r.setRegionId( L1CaloRegionDetId(ieta,iphi) );
114  r.setRawData(data);
117  r.setBx(bx);
118  return r;
119 }
int16_t bx() const
get bunch-crossing index
Definition: L1CaloRegion.h:192
void setRawData(uint32_t data)
set data
Definition: L1CaloRegion.h:146
void setBx(int16_t bx)
set bx
void setRegionId(L1CaloRegionDetId id)
set region ID
Definition: L1CaloRegion.h:209
void setCaptureBlock(uint16_t capBlock)
set cap block
Definition: L1CaloRegion.h:137
void setCaptureIndex(uint16_t capIndex)
set cap index
Definition: L1CaloRegion.h:140
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:22
bool L1CaloRegion::mip ( ) const
inline

get MIP bit

Definition at line 131 of file L1CaloRegion.h.

References m_data, and globals_cff::x1.

Referenced by GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().

131 { return ((m_data>>12) & 0x1)!=0; }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
int L1CaloRegion::operator!= ( const L1CaloRegion c) const
inline

inequality operator

Definition at line 198 of file L1CaloRegion.h.

References EnergyCorrector::c.

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

equality operator, including rank, feature bits, and position

Definition at line 195 of file L1CaloRegion.h.

References empty(), id(), m_data, m_id, and raw().

195 { return ((m_data==c.raw() && m_id==c.id()) || (this->empty() && c.empty())); }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
L1CaloRegionDetId id() const
get global region ID
Definition: L1CaloRegion.h:158
bool empty() const
is there any information in the candidate
Definition: L1CaloRegion.h:201
uint16_t raw() const
get raw data
Definition: L1CaloRegion.h:113
bool L1CaloRegion::overFlow ( ) const
inline

get overflow

Definition at line 122 of file L1CaloRegion.h.

References m_data, and globals_cff::x1.

Referenced by L1GctRegion::clrFeatureBit1(), L1GctRegion::et(), L1GctRegion::makeJfInputRegion(), operator<<(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().

122 { return ((m_data>>10) & 0x1)!=0; }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
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 152 of file L1CaloRegion.cc.

References m_data.

Referenced by pyrootRender.interactiveRender::draw(), L1CaloRegion(), makeHBHERegion(), makeHFRegion(), makeRegionFromGctIndices(), and setRegionId().

152  {
153  bool checkOvF = overFlow || (et>=0x400);
154  m_data =
155  (et & 0x3ff) |
156  ((checkOvF) ? 0x400 : 0x0) |
157  ((fineGrain) ? 0x800 : 0x0) |
158  ((mip) ? 0x1000 : 0x0) |
159  ((quiet) ? 0x2000 : 0x0);
160 }
unsigned et() const
get Et
Definition: L1CaloRegion.h:116
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:122
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
bool quiet() const
get quiet bit
Definition: L1CaloRegion.h:134
bool mip() const
get MIP bit
Definition: L1CaloRegion.h:131
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:128
void L1CaloRegion::pack12BitsEt ( unsigned  et,
bool  overFlow,
bool  fineGrain,
bool  mip,
bool  quiet 
)
private

pack the raw data from arguments (used in constructors)

Definition at line 162 of file L1CaloRegion.cc.

References m_data.

Referenced by makeGctJetRegion(), and setRegionId().

162  {
163  bool checkOvF = overFlow || (et>=0x400);
164  m_data =
165  (et & 0xfff) |
166  ((checkOvF) ? 0x400 : 0x0) |
167  ((fineGrain) ? 0x800 : 0x0) |
168  ((mip) ? 0x1000 : 0x0) |
169  ((quiet) ? 0x2000 : 0x0);
170 }
unsigned et() const
get Et
Definition: L1CaloRegion.h:116
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:122
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
bool quiet() const
get quiet bit
Definition: L1CaloRegion.h:134
bool mip() const
get MIP bit
Definition: L1CaloRegion.h:131
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:128
bool L1CaloRegion::quiet ( ) const
inline

get quiet bit

Definition at line 134 of file L1CaloRegion.h.

References m_data, and globals_cff::x1.

Referenced by GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().

134 { return ((m_data>>13) & 0x1)!=0; }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
uint16_t L1CaloRegion::raw ( ) const
inline

get raw data

Definition at line 113 of file L1CaloRegion.h.

References m_data.

Referenced by L1GctRegion::et(), L1GctRegion::featureBit0(), L1GctRegion::featureBit1(), operator==(), and L1GctRegion::setBit().

113 { return m_data; }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
unsigned L1CaloRegion::rctCard ( ) const
inline

get RCT reciever card ID (valid output for HB/HE)

Definition at line 168 of file L1CaloRegion.h.

References m_id, and L1CaloRegionDetId::rctCard().

Referenced by operator<<(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().

168 { return m_id.rctCard(); }
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
unsigned rctCard() const
return RCT card number (0-6)
unsigned L1CaloRegion::rctCrate ( ) const
inline

get RCT crate ID

Definition at line 165 of file L1CaloRegion.h.

References m_id, and L1CaloRegionDetId::rctCrate().

Referenced by operator<<(), L1GctJetFinderBase::setInputRegion(), L1GlobalCaloTrigger::setRegion(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().

165 { return m_id.rctCrate(); }
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
unsigned rctCrate() const
return RCT crate number (0-17)
unsigned L1CaloRegion::rctEta ( ) const
inline

get local eta index (within RCT crate)

Definition at line 174 of file L1CaloRegion.h.

References m_id, and L1CaloRegionDetId::rctEta().

Referenced by operator<<(), and L1GctJetFinderBase::setInputRegion().

174 { return m_id.rctEta(); }
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
unsigned rctEta() const
return local RCT eta index (0-10)
unsigned L1CaloRegion::rctPhi ( ) const
inline

get local phi index (within RCT crate)

Definition at line 177 of file L1CaloRegion.h.

References m_id, and L1CaloRegionDetId::rctPhi().

Referenced by L1GctHardwareJetFinder::makeProtoJet(), operator<<(), and L1GctJetFinderBase::setInputRegion().

177 { return m_id.rctPhi(); }
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
unsigned rctPhi() const
return local RCT phi index (0-1)
unsigned L1CaloRegion::rctRegionIndex ( ) const
inline

get RCT region index

Definition at line 171 of file L1CaloRegion.h.

References m_id, and L1CaloRegionDetId::rctRegion().

Referenced by operator<<(), and GctFormatTranslateMCLegacy::writeAllRctCaloRegionBlock().

171 { return m_id.rctRegion(); }
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
unsigned rctRegion() const
return RCT region index (0-1 for barrel, 0-7 for HF)
void L1CaloRegion::reset ( void  )
inline

reset the data content (not position id!)

Definition at line 110 of file L1CaloRegion.h.

References m_data.

110 { m_data = 0; }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
void L1CaloRegion::setBx ( int16_t  bx)
void L1CaloRegion::setCaptureBlock ( uint16_t  capBlock)
inline

set cap block

Definition at line 137 of file L1CaloRegion.h.

References capBlock(), and m_captureBlock.

Referenced by makeRegionFromUnpacker().

uint16_t m_captureBlock
Definition: L1CaloRegion.h:222
unsigned capBlock() const
which capture block did this come from
Definition: L1CaloRegion.h:186
void L1CaloRegion::setCaptureIndex ( uint16_t  capIndex)
inline

set cap index

Definition at line 140 of file L1CaloRegion.h.

References capIndex(), m_captureIndex, and setBx().

Referenced by makeRegionFromUnpacker().

unsigned capIndex() const
what index within capture block
Definition: L1CaloRegion.h:189
uint8_t m_captureIndex
Definition: L1CaloRegion.h:223
void L1CaloRegion::setMip ( bool  mip)

set MIP bit (required for GCT emulator standalone operation)

Definition at line 141 of file L1CaloRegion.cc.

References m_data.

Referenced by setRawData().

141  {
142  if (mip) { m_data |= 0x1000; }
143  else { m_data &= 0xefff; }
144 }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
bool mip() const
get MIP bit
Definition: L1CaloRegion.h:131
void L1CaloRegion::setQuiet ( bool  quiet)

set quiet bit (required for GCT emulator standalone operation)

Definition at line 147 of file L1CaloRegion.cc.

References m_data.

Referenced by setRawData().

147  {
148  if (quiet) { m_data |= 0x2000; }
149  else { m_data &= 0xdfff; }
150 }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
bool quiet() const
get quiet bit
Definition: L1CaloRegion.h:134
void L1CaloRegion::setRawData ( uint32_t  data)
inline

set data

Definition at line 146 of file L1CaloRegion.h.

References data, m_data, setMip(), and setQuiet().

Referenced by makeRegionFromUnpacker(), and L1GctRegion::setBit().

146 { m_data = data; }
uint16_t m_data
region data : et, overflow, fine grain/tau veto, mip and quiet bits
Definition: L1CaloRegion.h:221
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void L1CaloRegion::setRegionId ( L1CaloRegionDetId  id)
inlineprivate

set region ID

Definition at line 209 of file L1CaloRegion.h.

References id(), m_id, pack(), and pack12BitsEt().

Referenced by makeGctJetRegion(), makeHBHERegion(), makeHFRegion(), makeRegionFromGctIndices(), and makeRegionFromUnpacker().

209 { m_id = id; }
L1CaloRegionDetId m_id
region id
Definition: L1CaloRegion.h:218
L1CaloRegionDetId id() const
get global region ID
Definition: L1CaloRegion.h:158
bool L1CaloRegion::tauVeto ( ) const
inline

get tau veto bit

Definition at line 125 of file L1CaloRegion.h.

References fineGrain(), and isHf().

Referenced by operator<<().

125 { return (isHf() ? false : fineGrain()); }
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:128
bool isHf() const
forward or central region
Definition: L1CaloRegion.h:161

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const L1CaloRegion reg 
)
friend

print to stream

Referenced by empty().

Member Data Documentation

int16_t L1CaloRegion::m_bx
private

Definition at line 224 of file L1CaloRegion.h.

Referenced by bx(), and setBx().

uint16_t L1CaloRegion::m_captureBlock
private

Definition at line 222 of file L1CaloRegion.h.

Referenced by capBlock(), and setCaptureBlock().

uint8_t L1CaloRegion::m_captureIndex
private

Definition at line 223 of file L1CaloRegion.h.

Referenced by capIndex(), and setCaptureIndex().

uint16_t L1CaloRegion::m_data
private

region data : et, overflow, fine grain/tau veto, mip and quiet bits

Definition at line 221 of file L1CaloRegion.h.

Referenced by empty(), et(), etFullScale(), fineGrain(), mip(), operator==(), overFlow(), pack(), pack12BitsEt(), quiet(), raw(), reset(), setMip(), setQuiet(), and setRawData().

L1CaloRegionDetId L1CaloRegion::m_id
private