CMS 3D CMS Logo

L1GctEtMiss Class Reference

Persistable copy of missing Et measured at Level-1. More...

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

List of all members.

Public Types

enum  numberOfBits {
  kEtMissNBits = 12, kEtMissOFlowBit = 1 << kEtMissNBits, kEtMissMaxValue = kEtMissOFlowBit - 1, kEtMissPhiShift = 16,
  kEtMissPhiNBits = 7, kETMissPhiMask = (1 << kEtMissPhiNBits) - 1, kEtMissPhiNBins = 72, kRawCtorMask = (kETMissPhiMask << kEtMissPhiShift) | kEtMissOFlowBit | kEtMissMaxValue
}

Public Member Functions

int16_t bx () const
 get bunch-crossing index
bool empty () const
 empty method (= false; missing Et is always calculated)
unsigned et () const
 get the magnitude
 L1GctEtMiss (unsigned et, unsigned phi, bool oflow, int16_t bx)
 L1GctEtMiss (unsigned et, unsigned phi, bool oflow)
 L1GctEtMiss (uint32_t rawData, int16_t bx)
 For use with raw data from the unpacker.
 L1GctEtMiss (uint32_t rawData)
 For use with raw data from the unpacker.
 L1GctEtMiss ()
std::string name () const
 name method
int operator!= (const L1GctEtMiss &e) const
 inequality operator
int operator== (const L1GctEtMiss &e) const
 equality operator
bool overFlow () const
 get the overflow
unsigned phi () const
 get the Et
uint32_t raw () const
 get the data
virtual ~L1GctEtMiss ()

Private Attributes

int16_t m_bx
uint32_t m_data


Detailed Description

Persistable copy of missing Et measured at Level-1.

Definition at line 18 of file L1GctEtMiss.h.


Member Enumeration Documentation

enum L1GctEtMiss::numberOfBits

To match the RAW format, EtMiss is on bits 11:0, Overflow flag on bit 12, and Phi is on bits 22:16. All other bits will be be zero.

Enumerator:
kEtMissNBits 
kEtMissOFlowBit 
kEtMissMaxValue 
kEtMissPhiShift 
kEtMissPhiNBits 
kETMissPhiMask 
kEtMissPhiNBins 
kRawCtorMask 

Definition at line 23 of file L1GctEtMiss.h.

00023                     {
00024     kEtMissNBits    = 12,
00025     kEtMissOFlowBit = 1 << kEtMissNBits,
00026     kEtMissMaxValue = kEtMissOFlowBit - 1,
00027     kEtMissPhiShift = 16,
00028     kEtMissPhiNBits = 7,
00029     kETMissPhiMask  = (1 << kEtMissPhiNBits) - 1,
00030     kEtMissPhiNBins = 72,
00031     kRawCtorMask    = (kETMissPhiMask << kEtMissPhiShift) | kEtMissOFlowBit | kEtMissMaxValue
00032   };


Constructor & Destructor Documentation

L1GctEtMiss::L1GctEtMiss (  ) 

Definition at line 4 of file L1GctEtMiss.cc.

00004 : m_data(0), m_bx(0) { } 

L1GctEtMiss::L1GctEtMiss ( uint32_t  rawData  ) 

For use with raw data from the unpacker.

Definition at line 10 of file L1GctEtMiss.cc.

00010 : m_data(rawData & kRawCtorMask), m_bx(0) { }

L1GctEtMiss::L1GctEtMiss ( uint32_t  rawData,
int16_t  bx 
)

For use with raw data from the unpacker.

Definition at line 12 of file L1GctEtMiss.cc.

00012 : m_data(rawData & kRawCtorMask), m_bx(bx) { }

L1GctEtMiss::L1GctEtMiss ( unsigned  et,
unsigned  phi,
bool  oflow 
)

Definition at line 14 of file L1GctEtMiss.cc.

References kEtMissMaxValue, kEtMissOFlowBit, kETMissPhiMask, kEtMissPhiNBins, kEtMissPhiShift, and m_data.

00014                                                               : m_data(0),
00015                                                                   m_bx(0)
00016 {
00017   if ((et <= kEtMissMaxValue) && (phi < kEtMissPhiNBins)) {
00018     m_data = et | (oflow ? kEtMissOFlowBit : 0) | ((phi & kETMissPhiMask)<<kEtMissPhiShift) ;
00019   } else {
00020     m_data = (et & kEtMissMaxValue) | kEtMissOFlowBit ;
00021   }
00022 }

L1GctEtMiss::L1GctEtMiss ( unsigned  et,
unsigned  phi,
bool  oflow,
int16_t  bx 
)

Definition at line 24 of file L1GctEtMiss.cc.

References kEtMissMaxValue, kEtMissOFlowBit, kETMissPhiMask, kEtMissPhiNBins, kEtMissPhiShift, and m_data.

00024                                                                           : m_data(0),
00025                                                                               m_bx(bx)
00026 {
00027   if ((et <= kEtMissMaxValue) && (phi < kEtMissPhiNBins)) {
00028     m_data = et | (oflow ? kEtMissOFlowBit : 0) | ((phi & kETMissPhiMask)<<kEtMissPhiShift) ;
00029   } else {
00030     m_data = (et & kEtMissMaxValue) | kEtMissOFlowBit ;
00031   }
00032 }

L1GctEtMiss::~L1GctEtMiss (  )  [virtual]

Definition at line 34 of file L1GctEtMiss.cc.

00034 { } 


Member Function Documentation

int16_t L1GctEtMiss::bx (  )  const [inline]

get bunch-crossing index

Definition at line 67 of file L1GctEtMiss.h.

References m_bx.

00067 { return m_bx; }

bool L1GctEtMiss::empty (  )  const [inline]

empty method (= false; missing Et is always calculated)

Definition at line 52 of file L1GctEtMiss.h.

00052 { return false; }

unsigned L1GctEtMiss::et (  )  const [inline]

get the magnitude

Definition at line 58 of file L1GctEtMiss.h.

References kEtMissMaxValue, and m_data.

Referenced by HLTGetDigi::analyze(), L1GtEnergySumCondition::evaluateCondition(), operator<<(), and L1GlobalTriggerPSB::printGctObjectData().

00058 { return m_data & kEtMissMaxValue; }

std::string L1GctEtMiss::name (  )  const [inline]

name method

Definition at line 49 of file L1GctEtMiss.h.

00049 { return "EtMiss"; }

int L1GctEtMiss::operator!= ( const L1GctEtMiss e  )  const [inline]

inequality operator

Definition at line 73 of file L1GctEtMiss.h.

References m_data, and raw().

00073 { return m_data!=e.raw(); }

int L1GctEtMiss::operator== ( const L1GctEtMiss e  )  const [inline]

equality operator

Definition at line 70 of file L1GctEtMiss.h.

References m_data, and raw().

00070 { return m_data==e.raw(); }

bool L1GctEtMiss::overFlow (  )  const [inline]

get the overflow

Definition at line 61 of file L1GctEtMiss.h.

References kEtMissOFlowBit, and m_data.

Referenced by operator<<().

00061 { return (m_data & kEtMissOFlowBit)!=0; }

unsigned L1GctEtMiss::phi (  )  const [inline]

get the Et

Definition at line 64 of file L1GctEtMiss.h.

References kETMissPhiMask, kEtMissPhiShift, and m_data.

Referenced by L1GctValidation::analyze(), HLTGetDigi::analyze(), L1GtCorrelationCondition::evaluateCondition(), L1GtEnergySumCondition::evaluateCondition(), operator<<(), and L1GlobalTriggerPSB::printGctObjectData().

00064 { return (m_data>>kEtMissPhiShift) & kETMissPhiMask; }

uint32_t L1GctEtMiss::raw (  )  const [inline]

get the data

Definition at line 55 of file L1GctEtMiss.h.

References m_data.

Referenced by L1GlobalTriggerPSB::fillPsbBlock(), operator!=(), and operator==().

00055 { return m_data; }


Member Data Documentation

int16_t L1GctEtMiss::m_bx [private]

Definition at line 78 of file L1GctEtMiss.h.

Referenced by bx().

uint32_t L1GctEtMiss::m_data [private]

Definition at line 77 of file L1GctEtMiss.h.

Referenced by et(), L1GctEtMiss(), operator!=(), operator==(), overFlow(), phi(), and raw().


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