CMS 3D CMS Logo

L1CaloEmCand Class Reference

Level-1 Region Calorimeter Trigger EM candidate. More...

#include <DataFormats/L1CaloTrigger/interface/L1CaloEmCand.h>

List of all members.

Public Member Functions

int16_t bx () const
 get bunch-crossing index
bool empty () const
 is there any information in the candidate
unsigned index () const
 get index on cable
bool isolated () const
 which stream did this come from
 L1CaloEmCand (unsigned rank, unsigned region, unsigned card, unsigned crate, bool iso, uint16_t index, int16_t bx)
 construct from components for emulation (including index)
 L1CaloEmCand (unsigned rank, unsigned region, unsigned card, unsigned crate, bool iso)
 construct from components for emulation
 L1CaloEmCand (uint16_t data, unsigned crate, bool iso, uint16_t index, int16_t bx, bool dummy)
 construct from raw data with source - used by GCT unpacker last bool argument is a hack to distinguish this constructor from the next one!
 L1CaloEmCand (uint16_t data, unsigned crate, bool iso)
 construct from raw data, no source - used by TextToDigi
 L1CaloEmCand ()
 default constructor (for vector initialisation etc.)
int operator!= (const L1CaloEmCand &c) const
 inequality operator
int operator== (const L1CaloEmCand &c) const
 equality operator, including rank, isolation, position
unsigned rank () const
 get rank bits
uint16_t raw () const
 get the raw data
unsigned rctCard () const
 get RCT receiver card
unsigned rctCrate () const
 get RCT crate
unsigned rctRegion () const
 get RCT region ID
L1CaloRegionDetId regionId () const
 get DetID object
void setBx (int16_t bx)
 set BX
 ~L1CaloEmCand ()
 destructor

Private Attributes

int16_t m_bx
uint16_t m_data
uint16_t m_index
bool m_iso
uint16_t m_rctCrate


Detailed Description

Level-1 Region Calorimeter Trigger EM candidate.

Author:
Jim Brooke
Date:
June 2006

Definition at line 18 of file L1CaloEmCand.h.


Constructor & Destructor Documentation

L1CaloEmCand::L1CaloEmCand (  ) 

default constructor (for vector initialisation etc.)

Definition at line 11 of file L1CaloEmCand.cc.

00011                            :
00012   m_data(0),
00013   m_rctCrate(0),
00014   m_iso(false),
00015   m_index(0),
00016   m_bx(0)
00017 { 
00018 
00019 }

L1CaloEmCand::L1CaloEmCand ( uint16_t  data,
unsigned  crate,
bool  iso 
)

construct from raw data, no source - used by TextToDigi

Definition at line 23 of file L1CaloEmCand.cc.

00023                                                                   :
00024    m_data(data),
00025    m_rctCrate(crate),
00026    m_iso(iso),
00027    m_index(0),
00028    m_bx(0)
00029  {
00030  }

L1CaloEmCand::L1CaloEmCand ( uint16_t  data,
unsigned  crate,
bool  iso,
uint16_t  index,
int16_t  bx,
bool  dummy 
)

construct from raw data with source - used by GCT unpacker last bool argument is a hack to distinguish this constructor from the next one!

Definition at line 34 of file L1CaloEmCand.cc.

00034                                                                                                            :
00035    m_data(data),
00036    m_rctCrate(crate),
00037    m_iso(iso),
00038    m_index(index),
00039    m_bx(bx)
00040  {
00041  }

L1CaloEmCand::L1CaloEmCand ( unsigned  rank,
unsigned  region,
unsigned  card,
unsigned  crate,
bool  iso 
)

construct from components for emulation

Definition at line 44 of file L1CaloEmCand.cc.

References m_data.

00044                                                                                                   : 
00045   m_data(0), // over-ridden below
00046   m_rctCrate(crate),
00047   m_iso(iso),
00048   m_index(0),
00049   m_bx(0)
00050 
00051 {
00052   m_data = (rank & 0x3f) + ((region & 0x1)<<6) + ((card & 0x7)<<7); 
00053 }

L1CaloEmCand::L1CaloEmCand ( unsigned  rank,
unsigned  region,
unsigned  card,
unsigned  crate,
bool  iso,
uint16_t  index,
int16_t  bx 
)

construct from components for emulation (including index)

Definition at line 56 of file L1CaloEmCand.cc.

References m_data.

00056                                                                                                                               : 
00057   m_data(0), // over-ridden below
00058   m_rctCrate(crate),
00059   m_iso(iso),
00060   m_index(index),
00061   m_bx(bx)
00062 {
00063   m_data = (rank & 0x3f) + ((region & 0x1)<<6) + ((card & 0x7)<<7); 
00064 }

L1CaloEmCand::~L1CaloEmCand (  ) 

destructor

Definition at line 67 of file L1CaloEmCand.cc.

00067 { } 


Member Function Documentation

int16_t L1CaloEmCand::bx (  )  const [inline]

get bunch-crossing index

Definition at line 62 of file L1CaloEmCand.h.

References m_bx.

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

00062 { return m_bx; }

bool L1CaloEmCand::empty (  )  const [inline]

is there any information in the candidate

Definition at line 77 of file L1CaloEmCand.h.

References rank().

Referenced by operator==().

00077 { return (rank() == 0); }

unsigned L1CaloEmCand::index (  )  const [inline]

get index on cable

Definition at line 59 of file L1CaloEmCand.h.

References m_index.

Referenced by operator<<(), L1GctElectronSorter::setInputEmCand(), and GctFormatTranslateMCLegacy::writeRctEmCandBlocks().

00059 { return m_index; }

bool L1CaloEmCand::isolated (  )  const [inline]

which stream did this come from

Definition at line 56 of file L1CaloEmCand.h.

References m_iso.

Referenced by operator<<(), operator==(), and GctFormatTranslateMCLegacy::writeRctEmCandBlocks().

00056 { return m_iso; }

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

inequality operator

Definition at line 74 of file L1CaloEmCand.h.

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

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

equality operator, including rank, isolation, position

Definition at line 71 of file L1CaloEmCand.h.

References empty(), isolated(), m_data, m_iso, m_rctCrate, raw(), rctCrate(), and regionId().

00071 { return ((m_data==c.raw() && m_iso==c.isolated() && m_rctCrate==c.rctCrate() && this->regionId()==c.regionId()) || (this->empty() && c.empty())); }

unsigned L1CaloEmCand::rank (  )  const [inline]

get rank bits

Definition at line 44 of file L1CaloEmCand.h.

References m_data.

Referenced by empty(), L1GctEmCand::L1GctEmCand(), operator<<(), and GctFormatTranslateMCLegacy::writeRctEmCandBlocks().

00044 { return m_data & 0x3f; }

uint16_t L1CaloEmCand::raw (  )  const [inline]

get the raw data

Definition at line 41 of file L1CaloEmCand.h.

References m_data.

Referenced by operator==().

00041 { return m_data; }

unsigned L1CaloEmCand::rctCard (  )  const [inline]

get RCT receiver card

Definition at line 47 of file L1CaloEmCand.h.

References m_data.

Referenced by operator<<(), regionId(), and GctFormatTranslateMCLegacy::writeRctEmCandBlocks().

00047 { return (m_data>>7) & 0x7; }

unsigned L1CaloEmCand::rctCrate (  )  const [inline]

get RCT crate

Definition at line 53 of file L1CaloEmCand.h.

References m_rctCrate.

Referenced by operator<<(), operator==(), regionId(), L1GctElectronSorter::setInputEmCand(), L1GlobalCaloTrigger::setIsoEm(), L1GlobalCaloTrigger::setNonIsoEm(), L1GlobalCaloTrigger::sorterNo(), and GctFormatTranslateMCLegacy::writeRctEmCandBlocks().

00053 { return m_rctCrate; }

unsigned L1CaloEmCand::rctRegion (  )  const [inline]

get RCT region ID

Definition at line 50 of file L1CaloEmCand.h.

References m_data.

Referenced by operator<<(), regionId(), and GctFormatTranslateMCLegacy::writeRctEmCandBlocks().

00050 { return (m_data>>6) & 0x1; }

L1CaloRegionDetId L1CaloEmCand::regionId (  )  const [inline]

get DetID object

Definition at line 65 of file L1CaloEmCand.h.

References rctCard(), rctCrate(), and rctRegion().

Referenced by L1GctEmCand::L1GctEmCand(), and operator==().

00065 { return L1CaloRegionDetId(rctCrate(),rctCard(),rctRegion()); }

void L1CaloEmCand::setBx ( int16_t  bx  ) 

set BX

Definition at line 69 of file L1CaloEmCand.cc.

References m_bx.

Referenced by L1GctElectronSorter::setupObjects().

00069                                    {
00070   m_bx = bx;
00071 }


Member Data Documentation

int16_t L1CaloEmCand::m_bx [private]

Definition at line 90 of file L1CaloEmCand.h.

Referenced by bx(), and setBx().

uint16_t L1CaloEmCand::m_data [private]

Definition at line 83 of file L1CaloEmCand.h.

Referenced by L1CaloEmCand(), operator==(), rank(), raw(), rctCard(), and rctRegion().

uint16_t L1CaloEmCand::m_index [private]

Definition at line 89 of file L1CaloEmCand.h.

Referenced by index().

bool L1CaloEmCand::m_iso [private]

Definition at line 88 of file L1CaloEmCand.h.

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

uint16_t L1CaloEmCand::m_rctCrate [private]

Definition at line 87 of file L1CaloEmCand.h.

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


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