CMS 3D CMS Logo

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

List of all members.

Public Types

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

Public Member Functions

void clrFeatureBit0 ()
void clrFeatureBit1 ()
unsigned et () const
 get Et
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
 get local eta index (within RCT crate)
void setEt (ULong et)
void setFeatureBit0 ()
void setFeatureBit1 ()
void setMip (bool mip)
 set MIP bit (required for GCT emulator standalone operation)
void setQuiet (bool quiet)
 set quiet bit (required for GCT emulator standalone operation)
 ~L1GctRegion ()
 ~L1GctRegion ()

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)

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.

: L1CaloRegion() {}
L1GctRegion::~L1GctRegion ( )

Definition at line 5 of file L1GctRegion.cc.

{}
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.

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().

{ setBit(14, false); }
void L1GctRegion::clrFeatureBit1 ( ) [inline]

Definition at line 52 of file L1GctRegion.h.

References setBit().

{ setBit(15, false); }
unsigned L1GctRegion::et ( ) const [inline]

get Et

Reimplemented from L1CaloRegion.

Definition at line 40 of file L1GctRegion.h.

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

Referenced by setEt().

bool L1GctRegion::featureBit0 ( ) [inline]

Definition at line 46 of file L1GctRegion.h.

References L1CaloRegion::raw().

{ return ((raw() >> 14) & 0x1) != 0; } 
bool L1GctRegion::featureBit1 ( ) [inline]

Definition at line 47 of file L1GctRegion.h.

References L1CaloRegion::raw().

{ return ((raw() >> 15) & 0x1) != 0; }
ULong L1GctRegion::getEt ( ) const [inline]

Definition at line 25 of file L1GctRegion.h.

References myEt.

{ return myEt.to_ulong(); }
bool L1GctRegion::getMip ( ) const [inline]

Definition at line 26 of file L1GctRegion.h.

References myMip.

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

Definition at line 27 of file L1GctRegion.h.

References myQuiet.

{ return myQuiet; }
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().

{
  L1GctRegion r( et, overFlow, fineGrain, ieta, iphi, bx );
  return r;
}
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().

{
  bool of = ( r_in.isHf() ? (r_in.et() == 0xff) : r_in.overFlow() );
  L1GctRegion r( r_in.et(), of, r_in.fineGrain(), r_in.gctEta(), r_in.gctPhi(), r_in.bx() );
  return r;
}
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().

{
  L1GctRegion r( et, overFlow, fineGrain, ieta, iphi, bx );
  if (tauIsolationVeto) {
    r.setFeatureBit0();
  } else {
    r.clrFeatureBit0();
  }
  return r;
}
ostream& L1GctRegion::operator<< ( ostream &  os,
const L1GctRegion s 
)
unsigned L1GctRegion::rctEta ( ) const [inline]

get local eta index (within RCT crate)

Reimplemented from L1CaloRegion.

Definition at line 43 of file L1GctRegion.h.

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

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

{ return ( empty() ? 12 : id().rctEta() ); }
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().

{
  if ((bitNum==14) || (bitNum==15)) { 
    uint16_t data = raw();
    uint16_t mask = 1 << bitNum;
    data &= ~mask;
    if (onOff) data |= mask;
    setRawData(data);
  } 
}
void L1GctRegion::setEt ( ULong  et) [inline]

Definition at line 30 of file L1GctRegion.h.

References et(), and myEt.

{ myEt = et; } 
void L1GctRegion::setFeatureBit0 ( ) [inline]

Definition at line 49 of file L1GctRegion.h.

References setBit().

Referenced by makeProtoJetRegion().

{ setBit(14, true ); }
void L1GctRegion::setFeatureBit1 ( ) [inline]

Definition at line 51 of file L1GctRegion.h.

References setBit().

{ setBit(15, true ); }
void L1GctRegion::setMip ( bool  mip) [inline]

set MIP bit (required for GCT emulator standalone operation)

Reimplemented from L1CaloRegion.

Definition at line 31 of file L1GctRegion.h.

References L1CaloRegion::mip(), and myMip.

{ myMip = mip; }
void L1GctRegion::setQuiet ( bool  quiet) [inline]

set quiet bit (required for GCT emulator standalone operation)

Reimplemented from L1CaloRegion.

Definition at line 32 of file L1GctRegion.h.

References myQuiet, and L1CaloRegion::quiet().

{ myQuiet = quiet; }

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().