CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions
L1GctRegion Class Reference

Gct version of a calorimeter region, used within GCT emulation. More...

#include <L1GctRegion.h>

Inheritance diagram for L1GctRegion:
L1CaloRegion

Public Types

enum  numberOfBits { kGctRegionNBits = 10, kGctRegionOFlowBit = 1 << kGctRegionNBits, kGctRegionMaxValue = kGctRegionOFlowBit - 1 }
 

Public Member Functions

void clrFeatureBit0 ()
 
void clrFeatureBit1 ()
 
unsigned et () const
 
bool featureBit0 ()
 
bool featureBit1 ()
 
 L1GctRegion ()
 
unsigned rctEta () const
 
void setFeatureBit0 ()
 
void setFeatureBit1 ()
 
 ~L1GctRegion ()
 
- Public Member Functions inherited from L1CaloRegion
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 L1GctRegion makeFinalJetRegion (const unsigned et, const bool overFlow, const bool fineGrain, const unsigned ieta, const unsigned iphi, const int16_t bx)
 
static L1GctRegion makeJfInputRegion (const L1CaloRegion &)
 
static L1GctRegion makeProtoJetRegion (const unsigned et, const bool overFlow, const bool fineGrain, const bool tauIsolationVeto, const unsigned ieta, const unsigned iphi, const int16_t bx)
 
- Static Public Member Functions inherited from L1CaloRegion
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

 L1GctRegion (const unsigned et, const bool overFlow, const bool fineGrain, const unsigned ieta, const unsigned iphi, const int16_t bx)
 
void setBit (const unsigned bitNum, const bool onOff)
 

Detailed Description

Gct version of a calorimeter region, used within GCT emulation.

Author
Greg Heath
Date
September 2007

Only differs from L1CaloRegion by the treatment of overflows

Definition at line 17 of file L1GctRegion.h.

Member Enumeration Documentation

◆ numberOfBits

Enumerator
kGctRegionNBits 
kGctRegionOFlowBit 
kGctRegionMaxValue 

Definition at line 19 of file L1GctRegion.h.

Constructor & Destructor Documentation

◆ L1GctRegion() [1/2]

L1GctRegion::L1GctRegion ( )

Definition at line 3 of file L1GctRegion.cc.

3 : L1CaloRegion() {}
L1CaloRegion()
default constructor
Definition: L1CaloRegion.cc:11

◆ ~L1GctRegion()

L1GctRegion::~L1GctRegion ( )

Definition at line 5 of file L1GctRegion.cc.

5 {}

◆ L1GctRegion() [2/2]

L1GctRegion::L1GctRegion ( const unsigned  et,
const bool  overFlow,
const bool  fineGrain,
const unsigned  ieta,
const unsigned  iphi,
const int16_t  bx 
)
private

Definition at line 40 of file L1GctRegion.cc.

47  ((overFlow || et > kGctRegionMaxValue) ? (unsigned)kGctRegionMaxValue : (unsigned)(et & kGctRegionMaxValue)),
49  fineGrain,
50  ieta,
51  iphi,
52  bx)) {}
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:96
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:102
int16_t bx() const
get bunch-crossing index
Definition: L1CaloRegion.h:165
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
Definition: L1CaloRegion.cc:89
unsigned et() const
Definition: L1GctRegion.h:47
L1CaloRegion()
default constructor
Definition: L1CaloRegion.cc:11

Member Function Documentation

◆ clrFeatureBit0()

void L1GctRegion::clrFeatureBit0 ( )
inline

Definition at line 57 of file L1GctRegion.h.

References setBit().

57 { setBit(14, false); }
void setBit(const unsigned bitNum, const bool onOff)
Definition: L1GctRegion.cc:54

◆ clrFeatureBit1()

void L1GctRegion::clrFeatureBit1 ( )
inline

Definition at line 59 of file L1GctRegion.h.

References setBit().

59 { setBit(15, false); }
void setBit(const unsigned bitNum, const bool onOff)
Definition: L1GctRegion.cc:54

◆ et()

unsigned L1GctRegion::et ( ) const
inline

Definition at line 47 of file L1GctRegion.h.

References kGctRegionMaxValue, L1CaloRegion::overFlow(), and L1CaloRegion::raw().

Referenced by makeFinalJetRegion(), and makeProtoJetRegion().

bool overFlow() const
get overflow
Definition: L1CaloRegion.h:96
uint16_t raw() const
get raw data
Definition: L1CaloRegion.h:87

◆ featureBit0()

bool L1GctRegion::featureBit0 ( )
inline

Definition at line 53 of file L1GctRegion.h.

References L1CaloRegion::raw(), and testProducerWithPsetDescEmpty_cfi::x1.

53 { return ((raw() >> 14) & 0x1) != 0; }
uint16_t raw() const
get raw data
Definition: L1CaloRegion.h:87

◆ featureBit1()

bool L1GctRegion::featureBit1 ( )
inline

Definition at line 54 of file L1GctRegion.h.

References L1CaloRegion::raw(), and testProducerWithPsetDescEmpty_cfi::x1.

54 { return ((raw() >> 15) & 0x1) != 0; }
uint16_t raw() const
get raw data
Definition: L1CaloRegion.h:87

◆ makeFinalJetRegion()

L1GctRegion L1GctRegion::makeFinalJetRegion ( const unsigned  et,
const bool  overFlow,
const bool  fineGrain,
const unsigned  ieta,
const unsigned  iphi,
const int16_t  bx 
)
static

Definition at line 29 of file L1GctRegion.cc.

References L1CaloRegion::bx(), et(), L1CaloRegion::fineGrain(), LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, L1CaloRegion::overFlow(), and alignCSCRings::r.

Referenced by L1GctHardwareJetFinder::findFinalClusters().

34  {
36  return r;
37 }
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:96
Gct version of a calorimeter region, used within GCT emulation.
Definition: L1GctRegion.h:17
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:102
int16_t bx() const
get bunch-crossing index
Definition: L1CaloRegion.h:165
unsigned et() const
Definition: L1GctRegion.h:47

◆ makeJfInputRegion()

L1GctRegion L1GctRegion::makeJfInputRegion ( const L1CaloRegion r_in)
static

Definition at line 7 of file L1GctRegion.cc.

References L1CaloRegion::bx(), L1CaloRegion::et(), L1CaloRegion::fineGrain(), L1CaloRegion::gctEta(), L1CaloRegion::gctPhi(), L1CaloRegion::isHf(), haddnano::of, L1CaloRegion::overFlow(), and alignCSCRings::r.

Referenced by L1GctJetFinderBase::setInputRegion().

7  {
8  bool of = (r_in.isHf() ? (r_in.et() == 0xff) : r_in.overFlow());
9  L1GctRegion r(r_in.et(), of, r_in.fineGrain(), r_in.gctEta(), r_in.gctPhi(), r_in.bx());
10  return r;
11 }
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:96
bool isHf() const
forward or central region
Definition: L1CaloRegion.h:134
Gct version of a calorimeter region, used within GCT emulation.
Definition: L1GctRegion.h:17
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:102
int16_t bx() const
get bunch-crossing index
Definition: L1CaloRegion.h:165
unsigned gctEta() const
get GCT eta index
Definition: L1CaloRegion.h:153
unsigned et() const
get Et
Definition: L1CaloRegion.h:90
unsigned gctPhi() const
get GCT phi index
Definition: L1CaloRegion.h:156

◆ makeProtoJetRegion()

L1GctRegion L1GctRegion::makeProtoJetRegion ( const unsigned  et,
const bool  overFlow,
const bool  fineGrain,
const bool  tauIsolationVeto,
const unsigned  ieta,
const unsigned  iphi,
const int16_t  bx 
)
static

Definition at line 13 of file L1GctRegion.cc.

References L1CaloRegion::bx(), et(), L1CaloRegion::fineGrain(), LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, L1CaloRegion::overFlow(), and alignCSCRings::r.

Referenced by L1GctHardwareJetFinder::makeProtoJet().

19  {
21  if (tauIsolationVeto) {
22  r.setFeatureBit0();
23  } else {
24  r.clrFeatureBit0();
25  }
26  return r;
27 }
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:96
Gct version of a calorimeter region, used within GCT emulation.
Definition: L1GctRegion.h:17
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:102
int16_t bx() const
get bunch-crossing index
Definition: L1CaloRegion.h:165
unsigned et() const
Definition: L1GctRegion.h:47

◆ rctEta()

unsigned L1GctRegion::rctEta ( ) const
inline

Definition at line 50 of file L1GctRegion.h.

References L1CaloRegion::empty(), and rctEta().

Referenced by L1GctHardwareJetFinder::makeProtoJet(), and rctEta().

50 { return (empty() ? 12 : id().rctEta()); }
unsigned rctEta() const
Definition: L1GctRegion.h:50
bool empty() const
is there any information in the candidate
Definition: L1CaloRegion.h:176

◆ setBit()

void L1GctRegion::setBit ( const unsigned  bitNum,
const bool  onOff 
)
private

Definition at line 54 of file L1GctRegion.cc.

References data, gpuClustering::pixelStatus::mask, L1CaloRegion::raw(), and L1CaloRegion::setRawData().

Referenced by clrFeatureBit0(), clrFeatureBit1(), setFeatureBit0(), and setFeatureBit1().

54  {
55  if ((bitNum == 14) || (bitNum == 15)) {
56  uint16_t data = raw();
57  uint16_t mask = 1 << bitNum;
58  data &= ~mask;
59  if (onOff)
60  data |= mask;
62  }
63 }
void setRawData(uint32_t data)
set data
Definition: L1CaloRegion.h:120
constexpr uint32_t mask
Definition: gpuClustering.h:24
uint16_t raw() const
get raw data
Definition: L1CaloRegion.h:87
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79

◆ setFeatureBit0()

void L1GctRegion::setFeatureBit0 ( )
inline

Definition at line 56 of file L1GctRegion.h.

References setBit().

56 { setBit(14, true); }
void setBit(const unsigned bitNum, const bool onOff)
Definition: L1GctRegion.cc:54

◆ setFeatureBit1()

void L1GctRegion::setFeatureBit1 ( )
inline

Definition at line 58 of file L1GctRegion.h.

References setBit().

58 { setBit(15, true); }
void setBit(const unsigned bitNum, const bool onOff)
Definition: L1GctRegion.cc:54