test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
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 ()
 
ULong getEt () const
 
bool getMip () const
 
bool getQuiet () const
 
 L1GctRegion (ULong et=0, bool mip=false, bool quiet=false)
 
 L1GctRegion ()
 
ostream & operator<< (ostream &os, const L1GctRegion &s)
 
unsigned rctEta () const
 
void setEt (ULong et)
 
void setFeatureBit0 ()
 
void setFeatureBit1 ()
 
void setMip (bool mip)
 
void setQuiet (bool quiet)
 
 ~L1GctRegion ()
 
 ~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)
 

Private Attributes

std::bitset< 10 > myEt
 
bool myMip
 
bool myQuiet
 

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

Enumerator
kGctRegionNBits 
kGctRegionOFlowBit 
kGctRegionMaxValue 

Definition at line 21 of file L1GctRegion.h.

Constructor & Destructor Documentation

L1GctRegion::L1GctRegion ( )

Definition at line 3 of file L1GctRegion.cc.

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

Definition at line 5 of file L1GctRegion.cc.

5 {}
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 34 of file L1GctRegion.cc.

39  :
41  (overFlow || et>kGctRegionMaxValue), fineGrain, ieta, iphi, bx) ) { }
int16_t bx() const
get bunch-crossing index
Definition: L1CaloRegion.h:192
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:122
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
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:128
unsigned et() const
Definition: L1GctRegion.h:40
L1CaloRegion()
default constructor
Definition: L1CaloRegion.cc:11
L1GctRegion::L1GctRegion ( ULong  et = 0,
bool  mip = false,
bool  quiet = false 
)
L1GctRegion::~L1GctRegion ( )

Member Function Documentation

void L1GctRegion::clrFeatureBit0 ( )
inline

Definition at line 50 of file L1GctRegion.h.

References setBit().

Referenced by makeProtoJetRegion().

50 { setBit(14, false); }
void setBit(const unsigned bitNum, const bool onOff)
Definition: L1GctRegion.cc:43
void L1GctRegion::clrFeatureBit1 ( )
inline

Definition at line 52 of file L1GctRegion.h.

References setBit().

52 { setBit(15, false); }
void setBit(const unsigned bitNum, const bool onOff)
Definition: L1GctRegion.cc:43
unsigned L1GctRegion::et ( ) const
inline

Definition at line 40 of file L1GctRegion.h.

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

Referenced by setEt().

bool overFlow() const
get overflow
Definition: L1CaloRegion.h:122
uint16_t raw() const
get raw data
Definition: L1CaloRegion.h:113
bool L1GctRegion::featureBit0 ( )
inline

Definition at line 46 of file L1GctRegion.h.

References L1CaloRegion::raw().

46 { return ((raw() >> 14) & 0x1) != 0; }
uint16_t raw() const
get raw data
Definition: L1CaloRegion.h:113
bool L1GctRegion::featureBit1 ( )
inline

Definition at line 47 of file L1GctRegion.h.

References L1CaloRegion::raw().

47 { return ((raw() >> 15) & 0x1) != 0; }
uint16_t raw() const
get raw data
Definition: L1CaloRegion.h:113
ULong L1GctRegion::getEt ( ) const
inline

Definition at line 25 of file L1GctRegion.h.

References myEt.

25 { return myEt.to_ulong(); }
std::bitset< 10 > myEt
Definition: L1GctRegion.h:38
bool L1GctRegion::getMip ( ) const
inline

Definition at line 26 of file L1GctRegion.h.

References myMip.

26 { return myMip; }
bool L1GctRegion::getQuiet ( ) const
inline

Definition at line 27 of file L1GctRegion.h.

References myQuiet.

27 { return myQuiet; }
bool myQuiet
Definition: L1GctRegion.h:40
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 26 of file L1GctRegion.cc.

References alignCSCRings::r.

Referenced by L1GctHardwareJetFinder::findFinalClusters().

28 {
29  L1GctRegion r( et, overFlow, fineGrain, ieta, iphi, bx );
30  return r;
31 }
int16_t bx() const
get bunch-crossing index
Definition: L1CaloRegion.h:192
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:122
Gct version of a calorimeter region, used within GCT emulation.
Definition: L1GctRegion.h:17
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:128
unsigned et() const
Definition: L1GctRegion.h:40
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(), L1CaloRegion::overFlow(), and alignCSCRings::r.

Referenced by L1GctJetFinderBase::setInputRegion().

8 {
9  bool of = ( r_in.isHf() ? (r_in.et() == 0xff) : r_in.overFlow() );
10  L1GctRegion r( r_in.et(), of, r_in.fineGrain(), r_in.gctEta(), r_in.gctPhi(), r_in.bx() );
11  return r;
12 }
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
Gct version of a calorimeter region, used within GCT emulation.
Definition: L1GctRegion.h:17
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:128
unsigned gctEta() const
get GCT eta index
Definition: L1CaloRegion.h:180
unsigned gctPhi() const
get GCT phi index
Definition: L1CaloRegion.h:183
bool isHf() const
forward or central region
Definition: L1CaloRegion.h:161
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 14 of file L1GctRegion.cc.

References clrFeatureBit0(), alignCSCRings::r, and setFeatureBit0().

Referenced by L1GctHardwareJetFinder::makeProtoJet().

16 {
17  L1GctRegion r( et, overFlow, fineGrain, ieta, iphi, bx );
18  if (tauIsolationVeto) {
19  r.setFeatureBit0();
20  } else {
21  r.clrFeatureBit0();
22  }
23  return r;
24 }
int16_t bx() const
get bunch-crossing index
Definition: L1CaloRegion.h:192
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:122
Gct version of a calorimeter region, used within GCT emulation.
Definition: L1GctRegion.h:17
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:128
unsigned et() const
Definition: L1GctRegion.h:40
ostream& L1GctRegion::operator<< ( ostream &  os,
const L1GctRegion s 
)
unsigned L1GctRegion::rctEta ( ) const
inline

Definition at line 43 of file L1GctRegion.h.

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

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

43 { return ( empty() ? 12 : id().rctEta() ); }
unsigned rctEta() const
Definition: L1GctRegion.h:43
bool empty() const
is there any information in the candidate
Definition: L1CaloRegion.h:201
void L1GctRegion::setBit ( const unsigned  bitNum,
const bool  onOff 
)
private

Definition at line 43 of file L1GctRegion.cc.

References AlCaHLTBitMon_QueryRunRegistry::data, L1CaloRegion::raw(), and L1CaloRegion::setRawData().

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

44 {
45  if ((bitNum==14) || (bitNum==15)) {
46  uint16_t data = raw();
47  uint16_t mask = 1 << bitNum;
48  data &= ~mask;
49  if (onOff) data |= mask;
50  setRawData(data);
51  }
52 }
void setRawData(uint32_t data)
set data
Definition: L1CaloRegion.h:146
uint16_t raw() const
get raw data
Definition: L1CaloRegion.h:113
void L1GctRegion::setEt ( ULong  et)
inline

Definition at line 30 of file L1GctRegion.h.

References et(), and myEt.

30 { myEt = et; }
std::bitset< 10 > myEt
Definition: L1GctRegion.h:38
unsigned et() const
Definition: L1GctRegion.h:40
void L1GctRegion::setFeatureBit0 ( )
inline

Definition at line 49 of file L1GctRegion.h.

References setBit().

Referenced by makeProtoJetRegion().

49 { setBit(14, true ); }
void setBit(const unsigned bitNum, const bool onOff)
Definition: L1GctRegion.cc:43
void L1GctRegion::setFeatureBit1 ( )
inline

Definition at line 51 of file L1GctRegion.h.

References setBit().

51 { setBit(15, true ); }
void setBit(const unsigned bitNum, const bool onOff)
Definition: L1GctRegion.cc:43
void L1GctRegion::setMip ( bool  mip)
inline

Definition at line 31 of file L1GctRegion.h.

References L1CaloRegion::mip(), and myMip.

31 { myMip = mip; }
bool mip() const
get MIP bit
Definition: L1CaloRegion.h:131
void L1GctRegion::setQuiet ( bool  quiet)
inline

Definition at line 32 of file L1GctRegion.h.

References myQuiet, and L1CaloRegion::quiet().

32 { myQuiet = quiet; }
bool quiet() const
get quiet bit
Definition: L1CaloRegion.h:134
bool myQuiet
Definition: L1GctRegion.h:40

Member Data Documentation

std::bitset<10> L1GctRegion::myEt
private

Definition at line 38 of file L1GctRegion.h.

Referenced by getEt(), and setEt().

bool L1GctRegion::myMip
private

Definition at line 39 of file L1GctRegion.h.

Referenced by getMip(), and setMip().

bool L1GctRegion::myQuiet
private

Definition at line 40 of file L1GctRegion.h.

Referenced by getQuiet(), and setQuiet().