CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
L1GctJetCand Class Reference

Level-1 Trigger jet candidate. More...

#include <L1GctJetCand.h>

Inheritance diagram for L1GctJetCand:
L1GctCand

Public Member Functions

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
 was an object really found? More...
 
unsigned etaIndex () const
 get eta index (bit 3 is sign, 1 for -ve Z, 0 for +ve Z) More...
 
unsigned etaSign () const
 get eta sign bit (1 for -ve Z, 0 for +ve Z) More...
 
bool isCentral () const
 check if this is a central jet More...
 
bool isForward () const
 check if this is a forward jet More...
 
bool isTau () const
 check if this is a tau More...
 
 L1GctJetCand ()
 default constructor (for vector initialisation etc.) More...
 
 L1GctJetCand (uint16_t rawData, bool isTau, bool isFor)
 construct from raw data - used in GT More...
 
 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 More...
 
 L1GctJetCand (unsigned rank, unsigned phi, unsigned eta, bool isTau, bool isFor)
 
 L1GctJetCand (unsigned rank, unsigned phi, unsigned eta, bool isTau, bool isFor, uint16_t block, uint16_t index, int16_t bx)
 
std::string name () const
 name of object More...
 
int operator!= (const L1GctJetCand &c) const
 inequality operator More...
 
int operator== (const L1GctJetCand &c) const
 equality operator More...
 
unsigned phiIndex () const
 get phi index (0-17) More...
 
unsigned rank () const
 get rank bits More...
 
uint16_t raw () const
 get the raw data More...
 
L1CaloRegionDetId regionId () const
 region associated with the candidate More...
 
virtual ~L1GctJetCand ()
 destructor (virtual to prevent compiler warnings) More...
 
- Public Member Functions inherited from L1GctCand
 L1GctCand ()
 
virtual ~L1GctCand ()
 

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.

11  :
12  m_data(0),
13  m_isTau(false),
14  m_isFor(false),
15  m_captureBlock(0),
16  m_captureIndex(0),
17  m_bx(0)
18 {
19 
20 }
int16_t m_bx
Definition: L1GctJetCand.h:97
uint8_t m_captureIndex
Definition: L1GctJetCand.h:96
uint16_t m_data
Definition: L1GctJetCand.h:92
uint16_t m_captureBlock
Definition: L1GctJetCand.h:95
L1GctJetCand::L1GctJetCand ( uint16_t  rawData,
bool  isTau,
bool  isFor 
)

construct from raw data - used in GT

Definition at line 23 of file L1GctJetCand.cc.

23  :
24  m_data(rawData & 0x7fff), // 0x7fff is to mask off bit 15, which is not data that needs to be stored
25  m_isTau(isTau),
26  m_isFor(isFor),
27  m_captureBlock(0),
28  m_captureIndex(0),
29  m_bx(0)
30 {
31 }
bool isTau() const
check if this is a tau
Definition: L1GctJetCand.h:68
int16_t m_bx
Definition: L1GctJetCand.h:97
uint8_t m_captureIndex
Definition: L1GctJetCand.h:96
uint16_t m_data
Definition: L1GctJetCand.h:92
uint16_t m_captureBlock
Definition: L1GctJetCand.h:95
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.

34  :
35  m_data(rawData & 0x7fff), // 0x7fff is to mask off bit 15, which is not data that needs to be stored
36  m_isTau(isTau),
37  m_isFor(isFor),
38  m_captureBlock(block&0xfff),
39  m_captureIndex(index&0xff),
40  m_bx(bx)
41 {
42 }
bool isTau() const
check if this is a tau
Definition: L1GctJetCand.h:68
int16_t bx() const
get bunch-crossing index
Definition: L1GctJetCand.h:80
int16_t m_bx
Definition: L1GctJetCand.h:97
uint8_t m_captureIndex
Definition: L1GctJetCand.h:96
uint16_t m_data
Definition: L1GctJetCand.h:92
uint16_t m_captureBlock
Definition: L1GctJetCand.h:95
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.

46  :
47  m_data(0), // overridden below
48  m_isTau(isTau),
49  m_isFor(isFor),
50  m_captureBlock(0),
51  m_captureIndex(0),
52  m_bx(0)
53 {
54  m_data = (rank & 0x3f) + ((eta & 0xf)<<6) + ((phi & 0x1f)<<10);
55 }
bool isTau() const
check if this is a tau
Definition: L1GctJetCand.h:68
unsigned rank() const
get rank bits
T eta() const
int16_t m_bx
Definition: L1GctJetCand.h:97
uint8_t m_captureIndex
Definition: L1GctJetCand.h:96
uint16_t m_data
Definition: L1GctJetCand.h:92
uint16_t m_captureBlock
Definition: L1GctJetCand.h:95
Definition: DDAxes.h:10
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.

59  :
60  m_data(0), // overridden below
61  m_isTau(isTau),
62  m_isFor(isFor),
63  m_captureBlock(block&0xfff),
64  m_captureIndex(index&0xff),
65  m_bx(bx)
66 {
67  m_data = (rank & 0x3f) + ((eta & 0xf)<<6) + ((phi & 0x1f)<<10);
68 }
bool isTau() const
check if this is a tau
Definition: L1GctJetCand.h:68
unsigned rank() const
get rank bits
int16_t bx() const
get bunch-crossing index
Definition: L1GctJetCand.h:80
T eta() const
int16_t m_bx
Definition: L1GctJetCand.h:97
uint8_t m_captureIndex
Definition: L1GctJetCand.h:96
uint16_t m_data
Definition: L1GctJetCand.h:92
uint16_t m_captureBlock
Definition: L1GctJetCand.h:95
Definition: DDAxes.h:10
L1GctJetCand::~L1GctJetCand ( )
virtual

destructor (virtual to prevent compiler warnings)

Definition at line 70 of file L1GctJetCand.cc.

70 { }

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

80 { return m_bx; }
int16_t m_bx
Definition: L1GctJetCand.h:97
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<<().

74 { return m_captureBlock; }
uint16_t m_captureBlock
Definition: L1GctJetCand.h:95
unsigned L1GctJetCand::capIndex ( ) const
inline

what index within capture block

Definition at line 77 of file L1GctJetCand.h.

References m_captureIndex.

Referenced by operator<<().

77 { return m_captureIndex; }
uint8_t m_captureIndex
Definition: L1GctJetCand.h:96
bool L1GctJetCand::empty ( ) const
virtual
unsigned L1GctJetCand::etaIndex ( ) const
virtual

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

Implements L1GctCand.

Definition at line 120 of file L1GctJetCand.cc.

References m_data.

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

120 { return (m_data>>6) & 0xf; }
uint16_t m_data
Definition: L1GctJetCand.h:92
unsigned L1GctJetCand::etaSign ( ) const
inlinevirtual

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

59 { return (m_data>>9) & 0x1; }
uint16_t m_data
Definition: L1GctJetCand.h:92
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().

65 { 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==(), regionId(), and L1GctJetFinalStage::setInputForwardJet().

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

68 { return m_isTau; }
string L1GctJetCand::name ( ) const

name of object

Definition at line 73 of file L1GctJetCand.cc.

References m_isFor, and m_isTau.

Referenced by python.Vispa.Views.PropertyView.Property::valueChanged().

73  {
74  if (m_isTau) { return "tau jet"; }
75  else if (m_isFor) { return "forward jet"; }
76  else { return "central jet"; }
77 }
int L1GctJetCand::operator!= ( const L1GctJetCand c) const
inline

inequality operator

Definition at line 88 of file L1GctJetCand.h.

References trackerHits::c.

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

83  { return ((m_data==c.raw() &&
84  m_isTau==c.isTau() && m_isFor==c.isForward())
85  || (this->empty() && c.empty())); }
bool isTau() const
check if this is a tau
Definition: L1GctJetCand.h:68
bool isForward() const
check if this is a forward jet
Definition: L1GctJetCand.h:71
bool empty() const
was an object really found?
Definition: L1GctJetCand.cc:80
uint16_t m_data
Definition: L1GctJetCand.h:92
uint16_t raw() const
get the raw data
Definition: L1GctJetCand.h:50
unsigned L1GctJetCand::phiIndex ( ) const
virtual

get phi index (0-17)

Implements L1GctCand.

Definition at line 123 of file L1GctJetCand.cc.

References m_data.

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

123 { return (m_data>>10) & 0x1f; }
uint16_t m_data
Definition: L1GctJetCand.h:92
unsigned L1GctJetCand::rank ( ) const
virtual

get rank bits

Implements L1GctCand.

Definition at line 117 of file L1GctJetCand.cc.

References m_data.

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

117 { return m_data & 0x3f; }
uint16_t m_data
Definition: L1GctJetCand.h:92
uint16_t L1GctJetCand::raw ( ) const
inline

get the raw data

Definition at line 50 of file L1GctJetCand.h.

References m_data.

Referenced by L1GtPatternGenerator::analyze(), and operator==().

50 { return m_data; }
uint16_t m_data
Definition: L1GctJetCand.h:92
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().

101  {
102 
103  // get global eta
104  unsigned eta;
105  if ( !isForward() ) {
106  eta = ( etaSign()==1 ? 10-(etaIndex()&0x7) : (etaIndex()&0x7)+11 );
107  }
108  else {
109  eta = ( etaSign()==1 ? 3-(etaIndex()&0x7) : (etaIndex()&0x7)+18 );
110  }
111 
112  return L1CaloRegionDetId(eta, phiIndex());
113 
114 }
unsigned etaIndex() const
get eta index (bit 3 is sign, 1 for -ve Z, 0 for +ve Z)
T eta() const
bool isForward() const
check if this is a forward jet
Definition: L1GctJetCand.h:71
unsigned etaSign() const
get eta sign bit (1 for -ve Z, 0 for +ve Z)
Definition: L1GctJetCand.h:59
unsigned phiIndex() const
get phi index (0-17)

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