CMS 3D CMS Logo

L1GctEmCand.h
Go to the documentation of this file.
1 #ifndef L1GCTEMCAND_H
2 #define L1GCTEMCAND_H
3 
4 #include <ostream>
5 #include <string>
6 
8 
11 
21 class L1GctEmCand : public L1GctCand {
22 public:
24  L1GctEmCand();
25 
27  L1GctEmCand(uint16_t rawData, bool iso);
28 
30  L1GctEmCand(uint16_t rawData, bool iso, uint16_t block, uint16_t index, int16_t bx);
31 
34  L1GctEmCand(unsigned rank, unsigned phi, unsigned eta, bool iso);
35 
38  L1GctEmCand(unsigned rank, unsigned phi, unsigned eta, bool iso, uint16_t block, uint16_t index, int16_t bx);
39 
42 
44  ~L1GctEmCand() override;
45 
47  L1CaloRegionDetId regionId() const override;
48 
50  std::string name() const;
51 
53  bool empty() const override { return (rank() == 0); }
54 
56  uint16_t raw() const { return m_data; }
57 
59  unsigned rank() const override { return m_data & 0x3f; }
60 
62  unsigned etaIndex() const override { return (m_data >> 6) & 0xf; }
63 
65  unsigned etaSign() const override { return (m_data >> 9) & 0x1; }
66 
68  unsigned phiIndex() const override { return (m_data >> 10) & 0x1f; }
69 
71  bool isolated() const { return m_iso; }
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 L1GctEmCand& c) const {
84  return ((m_data == c.raw() && m_iso == c.isolated()) || (this->empty() && c.empty()));
85  }
86 
88  int operator!=(const L1GctEmCand& c) const { return !(*this == c); }
89 
90 private:
91  // set internal data from rank and region ieta, iphi
92  void construct(unsigned rank, unsigned eta, unsigned phi);
93 
94 private:
95  uint16_t m_data;
96  bool m_iso;
97  uint16_t m_captureBlock;
98  uint8_t m_captureIndex;
99  int16_t m_bx;
100 };
101 
102 std::ostream& operator<<(std::ostream& s, const L1GctEmCand& cand);
103 
104 #endif
L1CaloEmCand.h
L1GctEmCand::bx
int16_t bx() const
get bunch-crossing index
Definition: L1GctEmCand.h:80
L1GctEmCand::~L1GctEmCand
~L1GctEmCand() override
destructor (virtual to prevent compiler warnings)
Definition: L1GctEmCand.cc:65
l1tstage2_dqm_sourceclient-live_cfg.rawData
rawData
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:162
L1GctEmCand
Level-1 Trigger EM candidate at output of GCT.
Definition: L1GctEmCand.h:21
L1GctEmCand::construct
void construct(unsigned rank, unsigned eta, unsigned phi)
Definition: L1GctEmCand.cc:78
L1GctEmCand::empty
bool empty() const override
was an object really found?
Definition: L1GctEmCand.h:53
L1GctEmCand::operator==
int operator==(const L1GctEmCand &c) const
equality operator
Definition: L1GctEmCand.h:83
L1GctEmCand::m_bx
int16_t m_bx
Definition: L1GctEmCand.h:99
L1GctEmCand::m_captureBlock
uint16_t m_captureBlock
Definition: L1GctEmCand.h:97
L1GctCand.h
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1GctEmCand::m_data
uint16_t m_data
Definition: L1GctEmCand.h:95
L1CaloRegionDetId
Definition: L1CaloRegionDetId.h:18
L1GctEmCand::capIndex
unsigned capIndex() const
what index within capture block
Definition: L1GctEmCand.h:77
PVValHelper::eta
Definition: PVValidationHelpers.h:69
L1GctEmCand::name
std::string name() const
name of object
Definition: L1GctEmCand.cc:68
L1GctEmCand::m_iso
bool m_iso
Definition: L1GctEmCand.h:96
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1CaloRegionDetId.h
L1GctEmCand::regionId
L1CaloRegionDetId regionId() const override
region associated with the candidate
Definition: L1GctEmCand.cc:71
cand
Definition: decayParser.h:34
L1GctEmCand::capBlock
unsigned capBlock() const
which capture block did this come from
Definition: L1GctEmCand.h:74
groupFilesInBlocks.block
block
Definition: groupFilesInBlocks.py:150
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
L1GctEmCand::m_captureIndex
uint8_t m_captureIndex
Definition: L1GctEmCand.h:98
L1GctEmCand::etaSign
unsigned etaSign() const override
get eta sign (1 for -ve Z, 0 for +ve Z)
Definition: L1GctEmCand.h:65
DDAxes::phi
operator<<
std::ostream & operator<<(std::ostream &s, const L1GctEmCand &cand)
L1GctEmCand::isolated
bool isolated() const
which stream did this come from
Definition: L1GctEmCand.h:71
L1GctCand
ABC for GCT EM and jet candidates.
Definition: L1GctCand.h:12
L1GctEmCand::raw
uint16_t raw() const
get the raw data
Definition: L1GctEmCand.h:56
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
L1GctEmCand::etaIndex
unsigned etaIndex() const override
get eta index -6 to -0, +0 to +6 (bit 3 is sign, 1 for -ve Z, 0 for +ve Z)
Definition: L1GctEmCand.h:62
L1GctEmCand::L1GctEmCand
L1GctEmCand()
default constructor (for vector initialisation etc.)
Definition: L1GctEmCand.cc:11
L1GctEmCand::operator!=
int operator!=(const L1GctEmCand &c) const
inequality operator
Definition: L1GctEmCand.h:88
L1GctEmCand::rank
unsigned rank() const override
get rank bits
Definition: L1GctEmCand.h:59
L1CaloEmCand
Level-1 Region Calorimeter Trigger EM candidate.
Definition: L1CaloEmCand.h:17
L1GctEmCand::phiIndex
unsigned phiIndex() const override
get phi index (0-17)
Definition: L1GctEmCand.h:68