CMS 3D CMS Logo

L1GctJetCand.h
Go to the documentation of this file.
1 #ifndef L1GCTJETCAND_H
2 #define L1GCTJETCAND_H
3 
4 #include <ostream>
5 #include <string>
6 
8 
10 
16 
17 class L1GctJetCand : public L1GctCand {
18 public:
20  L1GctJetCand();
21 
23  L1GctJetCand(uint16_t rawData, bool isTau, bool isFor);
24 
26  L1GctJetCand(uint16_t rawData, bool isTau, bool isFor, uint16_t block, uint16_t index, int16_t bx);
27 
30  L1GctJetCand(unsigned rank, unsigned phi, unsigned eta, bool isTau, bool isFor);
31 
35  unsigned rank, unsigned phi, unsigned eta, bool isTau, bool isFor, uint16_t block, uint16_t index, int16_t bx);
36 
38  ~L1GctJetCand() override;
39 
41  L1CaloRegionDetId regionId() const override;
42 
44  std::string name() const;
45 
47  bool empty() const override { return (rank() == 0); }
48 
50  uint16_t raw() const { return m_data; }
51 
53  unsigned rank() const override { return m_data & 0x3f; }
54 
56  unsigned etaIndex() const override { return (m_data >> 6) & 0xf; }
57 
59  unsigned etaSign() const override { return (m_data >> 9) & 0x1; }
60 
62  unsigned phiIndex() const override { return (m_data >> 10) & 0x1f; }
63 
65  bool isCentral() const { return (!m_isTau) && (!m_isFor); }
66 
68  bool isTau() const { return m_isTau; }
69 
71  bool isForward() const { return m_isFor; }
72 
74  unsigned capBlock() const { return m_captureBlock; }
75 
77  unsigned capIndex() const { return m_captureIndex; }
78 
80  int16_t bx() const { return m_bx; }
81 
83  int operator==(const L1GctJetCand& c) const {
84  return ((m_data == c.raw() && m_isTau == c.isTau() && m_isFor == c.isForward()) || (this->empty() && c.empty()));
85  }
86 
88  int operator!=(const L1GctJetCand& c) const { return !(*this == c); }
89 
90 private:
91  uint16_t m_data;
92  bool m_isTau;
93  bool m_isFor;
94  uint16_t m_captureBlock;
95  uint8_t m_captureIndex;
96  int16_t m_bx;
97 };
98 
99 std::ostream& operator<<(std::ostream& s, const L1GctJetCand& cand);
100 
101 #endif
L1GctJetCand
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:17
L1GctJetCand::L1GctJetCand
L1GctJetCand()
default constructor (for vector initialisation etc.)
Definition: L1GctJetCand.cc:10
L1GctJetCand::capBlock
unsigned capBlock() const
which capture block did this come from
Definition: L1GctJetCand.h:74
L1GctJetCand::isForward
bool isForward() const
check if this is a forward jet
Definition: L1GctJetCand.h:71
L1GctJetCand::m_captureIndex
uint8_t m_captureIndex
Definition: L1GctJetCand.h:95
L1GctJetCand::m_bx
int16_t m_bx
Definition: L1GctJetCand.h:96
l1tstage2_dqm_sourceclient-live_cfg.rawData
rawData
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:162
L1GctJetCand::m_data
uint16_t m_data
Definition: L1GctJetCand.h:91
L1GctJetCand::operator==
int operator==(const L1GctJetCand &c) const
equality operator
Definition: L1GctJetCand.h:83
L1GctJetCand::m_isFor
bool m_isFor
Definition: L1GctJetCand.h:93
L1GctJetCand::phiIndex
unsigned phiIndex() const override
get phi index (0-17)
Definition: L1GctJetCand.h:62
L1GctJetCand::capIndex
unsigned capIndex() const
what index within capture block
Definition: L1GctJetCand.h:77
L1GctCand.h
L1GctJetCand::regionId
L1CaloRegionDetId regionId() const override
region associated with the candidate
Definition: L1GctJetCand.cc:90
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1GctJetCand::~L1GctJetCand
~L1GctJetCand() override
destructor (virtual to prevent compiler warnings)
Definition: L1GctJetCand.cc:56
L1CaloRegionDetId
Definition: L1CaloRegionDetId.h:18
PVValHelper::eta
Definition: PVValidationHelpers.h:69
L1GctJetCand::name
std::string name() const
name of object
Definition: L1GctJetCand.cc:59
L1GctJetCand::etaSign
unsigned etaSign() const override
get eta sign bit (1 for -ve Z, 0 for +ve Z)
Definition: L1GctJetCand.h:59
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1CaloRegionDetId.h
cand
Definition: decayParser.h:34
groupFilesInBlocks.block
block
Definition: groupFilesInBlocks.py:150
L1GctJetCand::bx
int16_t bx() const
get bunch-crossing index
Definition: L1GctJetCand.h:80
L1GctJetCand::isCentral
bool isCentral() const
check if this is a central jet
Definition: L1GctJetCand.h:65
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
DDAxes::phi
L1GctJetCand::etaIndex
unsigned etaIndex() const override
get eta index (bit 3 is sign, 1 for -ve Z, 0 for +ve Z)
Definition: L1GctJetCand.h:56
L1GctJetCand::empty
bool empty() const override
was an object really found?
Definition: L1GctJetCand.h:47
L1GctCand
ABC for GCT EM and jet candidates.
Definition: L1GctCand.h:12
L1GctJetCand::m_captureBlock
uint16_t m_captureBlock
Definition: L1GctJetCand.h:94
L1GctJetCand::operator!=
int operator!=(const L1GctJetCand &c) const
inequality operator
Definition: L1GctJetCand.h:88
operator<<
std::ostream & operator<<(std::ostream &s, const L1GctJetCand &cand)
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
L1GctJetCand::isTau
bool isTau() const
check if this is a tau
Definition: L1GctJetCand.h:68
L1GctJetCand::m_isTau
bool m_isTau
Definition: L1GctJetCand.h:92
L1GctJetCand::rank
unsigned rank() const override
get rank bits
Definition: L1GctJetCand.h:53
L1GctJetCand::raw
uint16_t raw() const
get the raw data
Definition: L1GctJetCand.h:50