CMS 3D CMS Logo

L1GctInternEmCand.h
Go to the documentation of this file.
1 #ifndef L1GCTINTERNEMCAND_H
2 #define L1GCTINTERNEMCAND_H
3 
4 #include <ostream>
5 #include <string>
6 
8 
18 class L1GctInternEmCand { //: public L1GctCand {
19 public:
22 
24  L1GctInternEmCand(uint16_t data, bool iso, unsigned block, unsigned index, int16_t bx);
25 
26  // construct from eta, phi etc
28  unsigned rank, unsigned eta, unsigned etaSgn, unsigned phi, bool iso, unsigned block, unsigned index, int16_t bx);
29 
31  virtual ~L1GctInternEmCand();
32 
35 
37  std::string name() const;
38 
40  bool empty() const;
41 
43  uint16_t raw() const { return m_data; }
44 
46  unsigned rank() const { return m_data & 0x3f; }
47 
49  unsigned etaIndex() const { return (m_data >> 6) & 0x1f; }
50 
52  unsigned etaSign() const { return (m_data >> 10) & 0x1; }
53 
55  unsigned phiIndex() const { return (m_data >> 11) & 0x1f; }
56 
58  bool isolated() const { return m_iso; }
59 
61  unsigned capBlock() const { return m_captureBlock; }
62 
64  unsigned capIndex() const { return m_captureIndex; }
65 
67  int16_t bx() const { return m_bx; }
68 
70  int operator==(const L1GctInternEmCand& c) const {
71  return ((m_data == c.raw() && m_iso == c.isolated()) || (this->empty() && c.empty()));
72  }
73 
75  int operator!=(const L1GctInternEmCand& c) const {
76  return ((m_data != c.raw() || m_iso != c.isolated()) && (!this->empty() || !c.empty()));
77  }
78 
79 private:
80  // set internal data from rank and region ieta, iphi
81  void construct(unsigned rank, unsigned eta, unsigned etaSgn, unsigned phi);
82 
83 private:
84  uint16_t m_data;
85  uint16_t m_captureBlock;
86  uint8_t m_captureIndex;
87  bool m_iso;
88  int16_t m_bx;
89 };
90 
91 std::ostream& operator<<(std::ostream& s, const L1GctInternEmCand& cand);
92 
93 #endif
L1CaloEmCand.h
L1GctInternEmCand::bx
int16_t bx() const
get bunch-crossing index
Definition: L1GctInternEmCand.h:67
L1GctInternEmCand::regionId
L1CaloRegionDetId regionId() const
region associated with the candidate
Definition: L1GctInternEmCand.cc:51
L1GctInternEmCand::~L1GctInternEmCand
virtual ~L1GctInternEmCand()
destructor (virtual to prevent compiler warnings)
Definition: L1GctInternEmCand.cc:31
L1GctInternEmCand::m_captureBlock
uint16_t m_captureBlock
Definition: L1GctInternEmCand.h:85
L1GctInternEmCand::m_captureIndex
uint8_t m_captureIndex
Definition: L1GctInternEmCand.h:86
alignCSCRings.s
s
Definition: alignCSCRings.py:92
L1GctInternEmCand::name
std::string name() const
name of object
Definition: L1GctInternEmCand.cc:34
L1CaloRegionDetId
Definition: L1CaloRegionDetId.h:18
PVValHelper::eta
Definition: PVValidationHelpers.h:70
L1GctInternEmCand::isolated
bool isolated() const
which stream did this come from
Definition: L1GctInternEmCand.h:58
L1GctInternEmCand
Definition: L1GctInternEmCand.h:18
L1GctInternEmCand::construct
void construct(unsigned rank, unsigned eta, unsigned etaSgn, unsigned phi)
Definition: L1GctInternEmCand.cc:58
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1GctInternEmCand::rank
unsigned rank() const
get rank bits
Definition: L1GctInternEmCand.h:46
cand
Definition: decayParser.h:32
L1GctInternEmCand::m_iso
bool m_iso
Definition: L1GctInternEmCand.h:87
L1GctInternEmCand::empty
bool empty() const
was an object really found?
Definition: L1GctInternEmCand.cc:37
groupFilesInBlocks.block
block
Definition: groupFilesInBlocks.py:150
L1GctInternEmCand::phiIndex
unsigned phiIndex() const
get phi index (0-17)
Definition: L1GctInternEmCand.h:55
L1GctInternEmCand::etaSign
unsigned etaSign() const
get eta sign (1 for -ve Z, 0 for +ve Z)
Definition: L1GctInternEmCand.h:52
DDAxes::phi
operator<<
std::ostream & operator<<(std::ostream &s, const L1GctInternEmCand &cand)
L1GctInternEmCand::operator!=
int operator!=(const L1GctInternEmCand &c) const
inequality operator
Definition: L1GctInternEmCand.h:75
L1GctInternEmCand::capBlock
unsigned capBlock() const
which capture block did this come from
Definition: L1GctInternEmCand.h:61
L1GctInternEmCand::etaIndex
unsigned etaIndex() const
get eta index - Barrel 1:4, Endcap 5:7, HF 8:11
Definition: L1GctInternEmCand.h:49
L1GctInternEmCand::operator==
int operator==(const L1GctInternEmCand &c) const
equality operator
Definition: L1GctInternEmCand.h:70
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
L1GctInternEmCand::L1GctInternEmCand
L1GctInternEmCand()
default constructor (for vector initialisation etc.)
Definition: L1GctInternEmCand.cc:13
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
L1GctInternEmCand::m_data
uint16_t m_data
Definition: L1GctInternEmCand.h:84
L1GctInternEmCand::m_bx
int16_t m_bx
Definition: L1GctInternEmCand.h:88
L1GctInternEmCand::raw
uint16_t raw() const
get the raw data
Definition: L1GctInternEmCand.h:43
L1GctInternEmCand::capIndex
unsigned capIndex() const
what index within capture block
Definition: L1GctInternEmCand.h:64