CMS 3D CMS Logo

L1GctJetCand Class Reference

Level-1 Trigger jet candidate. More...

#include <DataFormats/L1GlobalCaloTrigger/interface/L1GctJetCand.h>

Inheritance diagram for L1GctJetCand:

L1GctCand

List of all members.

Public Member Functions

int16_t bx () const
 get bunch-crossing index
unsigned capBlock () const
 which capture block did this come from
unsigned capIndex () const
 what index within capture block
bool empty () const
 was an object really found?
unsigned etaIndex () const
 get eta index (bit 3 is sign, 1 for -ve Z, 0 for +ve Z)
unsigned etaSign () const
 get eta sign bit (1 for -ve Z, 0 for +ve Z)
bool isCentral () const
 check if this is a central jet
bool isForward () const
 check if this is a forward jet
bool isTau () const
 check if this is a tau
 L1GctJetCand (unsigned rank, unsigned phi, unsigned eta, bool isTau, bool isFor, uint16_t block, uint16_t index, int16_t bx)
 construct from rank, eta, phi, isolation - will be used in GCT emulator? NB - eta = -6 to -0, +0 to +6.
 L1GctJetCand (unsigned rank, unsigned phi, unsigned eta, bool isTau, bool isFor)
 construct from rank, eta, phi, isolation - used in GCT emulator NB - eta = -6 to -0, +0 to +6.
 L1GctJetCand (uint16_t rawData, bool isTau, bool isFor, uint16_t block, uint16_t index, int16_t bx)
 construct from raw data with source - uesd in GCT unpacker
 L1GctJetCand (uint16_t rawData, bool isTau, bool isFor)
 construct from raw data - used in GT
 L1GctJetCand ()
 default constructor (for vector initialisation etc.)
std::string name () const
 name of object
int operator!= (const L1GctJetCand &c) const
 inequality operator
int operator== (const L1GctJetCand &c) const
 equality operator
unsigned phiIndex () const
 get phi index (0-17)
unsigned rank () const
 get rank bits
uint16_t raw () const
 get the raw data
L1CaloRegionDetId regionId () const
 region associated with the candidate
virtual ~L1GctJetCand ()
 destructor (virtual to prevent compiler warnings)

Private Attributes

int16_t m_bx
uint16_t m_captureBlock
uint8_t m_captureIndex
uint16_t m_data
bool m_isFor
bool m_isTau


Detailed Description

Level-1 Trigger jet candidate.

Author:
Jim Brooke
Date:
June 2006

Definition at line 18 of file L1GctJetCand.h.


Constructor & Destructor Documentation

L1GctJetCand::L1GctJetCand (  ) 

default constructor (for vector initialisation etc.)

Definition at line 11 of file L1GctJetCand.cc.

00011                            :
00012   m_data(0),
00013   m_isTau(false),
00014   m_isFor(false),
00015   m_captureBlock(0),
00016   m_captureIndex(0),
00017   m_bx(0)
00018 {
00019 
00020 }

L1GctJetCand::L1GctJetCand ( uint16_t  rawData,
bool  isTau,
bool  isFor 
)

construct from raw data - used in GT

Definition at line 23 of file L1GctJetCand.cc.

00023                                                                    :
00024   m_data(rawData & 0x7fff), // 0x7fff is to mask off bit 15, which is not data that needs to be stored
00025   m_isTau(isTau),
00026   m_isFor(isFor),
00027   m_captureBlock(0),
00028   m_captureIndex(0),
00029   m_bx(0)
00030 {
00031 }

L1GctJetCand::L1GctJetCand ( uint16_t  rawData,
bool  isTau,
bool  isFor,
uint16_t  block,
uint16_t  index,
int16_t  bx 
)

construct from raw data with source - uesd in GCT unpacker

Definition at line 34 of file L1GctJetCand.cc.

00034                                                                                                                : 
00035   m_data(rawData & 0x7fff), // 0x7fff is to mask off bit 15, which is not data that needs to be stored
00036   m_isTau(isTau),
00037   m_isFor(isFor),
00038   m_captureBlock(block&0xfff),
00039   m_captureIndex(index&0xff),
00040   m_bx(bx)
00041 {
00042 }

L1GctJetCand::L1GctJetCand ( unsigned  rank,
unsigned  phi,
unsigned  eta,
bool  isTau,
bool  isFor 
)

construct from rank, eta, phi, isolation - used in GCT emulator NB - eta = -6 to -0, +0 to +6.

Sign is bit 3, 1 means -ve Z, 0 means +ve Z

Definition at line 46 of file L1GctJetCand.cc.

References m_data.

00046                                                                                             : 
00047   m_data(0), // overridden below
00048   m_isTau(isTau),
00049   m_isFor(isFor),
00050   m_captureBlock(0),
00051   m_captureIndex(0),
00052   m_bx(0)
00053 { 
00054   m_data = (rank & 0x3f) + ((eta & 0xf)<<6) + ((phi & 0x1f)<<10); 
00055 }

L1GctJetCand::L1GctJetCand ( unsigned  rank,
unsigned  phi,
unsigned  eta,
bool  isTau,
bool  isFor,
uint16_t  block,
uint16_t  index,
int16_t  bx 
)

construct from rank, eta, phi, isolation - will be used in GCT emulator? NB - eta = -6 to -0, +0 to +6.

Sign is bit 3, 1 means -ve Z, 0 means +ve Z

Definition at line 59 of file L1GctJetCand.cc.

References m_data.

00059                                                                                                                                         : 
00060   m_data(0), // overridden below
00061   m_isTau(isTau),
00062   m_isFor(isFor),
00063   m_captureBlock(block&0xfff),
00064   m_captureIndex(index&0xff),
00065   m_bx(bx)
00066 { 
00067   m_data = (rank & 0x3f) + ((eta & 0xf)<<6) + ((phi & 0x1f)<<10); 
00068 }

L1GctJetCand::~L1GctJetCand (  )  [virtual]

destructor (virtual to prevent compiler warnings)

Definition at line 70 of file L1GctJetCand.cc.

00070 { } 


Member Function Documentation

int16_t L1GctJetCand::bx (  )  const [inline]

get bunch-crossing index

Definition at line 80 of file L1GctJetCand.h.

References m_bx.

Referenced by operator<<(), L1GctJetFinalStage::setInputCentralJet(), L1GctJetFinalStage::setInputForwardJet(), and L1GctJetFinalStage::setInputTauJet().

00080 { return m_bx; }

unsigned L1GctJetCand::capBlock (  )  const [inline]

which capture block did this come from

Definition at line 74 of file L1GctJetCand.h.

References m_captureBlock.

Referenced by operator<<().

00074 { return m_captureBlock; }

unsigned L1GctJetCand::capIndex (  )  const [inline]

what index within capture block

Definition at line 77 of file L1GctJetCand.h.

References m_captureIndex.

Referenced by operator<<().

00077 { return m_captureIndex; }

bool L1GctJetCand::empty (  )  const [virtual]

was an object really found?

Implements L1GctCand.

Definition at line 80 of file L1GctJetCand.cc.

References rank().

Referenced by operator<<(), operator==(), L1GctJetCounterLut::passesCut(), L1GctJetFinalStage::setInputCentralJet(), L1GctJetFinalStage::setInputForwardJet(), and L1GctJetFinalStage::setInputTauJet().

00080                                {
00081   return (rank() == 0);
00082 }

unsigned L1GctJetCand::etaIndex (  )  const [inline, virtual]

get eta index (bit 3 is sign, 1 for -ve Z, 0 for +ve Z)

Implements L1GctCand.

Definition at line 56 of file L1GctJetCand.h.

References m_data.

Referenced by operator<<(), L1GctJetCounterLut::rctEta(), and regionId().

00056 { return (m_data>>6) & 0xf; }

unsigned L1GctJetCand::etaSign (  )  const [inline, virtual]

get eta sign bit (1 for -ve Z, 0 for +ve Z)

Implements L1GctCand.

Definition at line 59 of file L1GctJetCand.h.

References m_data.

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

00059 { return (m_data>>9) & 0x1; }

bool L1GctJetCand::isCentral (  )  const [inline]

check if this is a central jet

Definition at line 65 of file L1GctJetCand.h.

References m_isFor, and m_isTau.

Referenced by L1GctJetFinalStage::setInputCentralJet().

00065 { return (!m_isTau) && (!m_isFor); }

bool L1GctJetCand::isForward (  )  const [inline]

check if this is a forward jet

Definition at line 71 of file L1GctJetCand.h.

References m_isFor.

Referenced by l1extra::L1JetParticle::L1JetParticle(), operator<<(), operator==(), L1GctJetCounterLut::rctEta(), regionId(), and L1GctJetFinalStage::setInputForwardJet().

00071 { return m_isFor; }

bool L1GctJetCand::isTau (  )  const [inline]

check if this is a tau

Definition at line 68 of file L1GctJetCand.h.

References m_isTau.

Referenced by l1extra::L1JetParticle::L1JetParticle(), operator<<(), operator==(), and L1GctJetFinalStage::setInputTauJet().

00068 { return m_isTau; }

string L1GctJetCand::name (  )  const

name of object

Definition at line 73 of file L1GctJetCand.cc.

References m_isFor, and m_isTau.

00073                                 { 
00074   if (m_isTau) { return "tau jet"; }
00075   else if (m_isFor) { return "forward jet"; }
00076   else { return "central jet"; }
00077 }

int L1GctJetCand::operator!= ( const L1GctJetCand c  )  const [inline]

inequality operator

Definition at line 88 of file L1GctJetCand.h.

00088 { return !(*this == c); }

int L1GctJetCand::operator== ( const L1GctJetCand c  )  const [inline]

equality operator

Definition at line 83 of file L1GctJetCand.h.

References empty(), isForward(), isTau(), m_data, m_isFor, m_isTau, and raw().

00083                                               { return ((m_data==c.raw() && 
00084                                                 m_isTau==c.isTau() && m_isFor==c.isForward())
00085                                                  || (this->empty() && c.empty())); }

unsigned L1GctJetCand::phiIndex (  )  const [inline, virtual]

get phi index (0-17)

Implements L1GctCand.

Definition at line 62 of file L1GctJetCand.h.

References m_data.

Referenced by L1GctJetCounterLut::globalPhi(), operator<<(), and regionId().

00062 { return (m_data>>10) & 0x1f; }

unsigned L1GctJetCand::rank (  )  const [inline, virtual]

get rank bits

Implements L1GctCand.

Definition at line 53 of file L1GctJetCand.h.

References m_data.

Referenced by empty(), L1GctJetCounterLut::jetPassesThisCut(), and operator<<().

00053 { return m_data & 0x3f; }

uint16_t L1GctJetCand::raw (  )  const [inline]

get the raw data

Definition at line 50 of file L1GctJetCand.h.

References m_data.

Referenced by operator==().

00050 { return m_data; }

L1CaloRegionDetId L1GctJetCand::regionId (  )  const [virtual]

region associated with the candidate

Implements L1GctCand.

Definition at line 101 of file L1GctJetCand.cc.

References eta, etaIndex(), etaSign(), isForward(), and phiIndex().

00101                                                {
00102 
00103   // get global eta
00104   unsigned eta;
00105   if ( !isForward() ) {
00106     eta = ( etaSign()==1 ? 10-(etaIndex()&0x7)  : (etaIndex()&0x7)+11 );
00107   }
00108   else {
00109     eta = ( etaSign()==1 ? 3-(etaIndex()&0x7) : (etaIndex()&0x7)+18 );
00110   }
00111 
00112   return L1CaloRegionDetId(eta, phiIndex());
00113 
00114 }


Member Data Documentation

int16_t L1GctJetCand::m_bx [private]

Definition at line 97 of file L1GctJetCand.h.

Referenced by bx().

uint16_t L1GctJetCand::m_captureBlock [private]

Definition at line 95 of file L1GctJetCand.h.

Referenced by capBlock().

uint8_t L1GctJetCand::m_captureIndex [private]

Definition at line 96 of file L1GctJetCand.h.

Referenced by capIndex().

uint16_t L1GctJetCand::m_data [private]

Definition at line 92 of file L1GctJetCand.h.

Referenced by etaIndex(), etaSign(), L1GctJetCand(), operator==(), phiIndex(), rank(), and raw().

bool L1GctJetCand::m_isFor [private]

Definition at line 94 of file L1GctJetCand.h.

Referenced by isCentral(), isForward(), name(), and operator==().

bool L1GctJetCand::m_isTau [private]

Definition at line 93 of file L1GctJetCand.h.

Referenced by isCentral(), isTau(), name(), and operator==().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:34 2009 for CMSSW by  doxygen 1.5.4