test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
18 class L1GctJetCand : public L1GctCand {
19 public:
21  L1GctJetCand();
22 
24  L1GctJetCand(uint16_t rawData, bool isTau, bool isFor);
25 
27  L1GctJetCand(uint16_t rawData, bool isTau, bool isFor, uint16_t block, uint16_t index, int16_t bx);
28 
31  L1GctJetCand(unsigned rank, unsigned phi, unsigned eta, bool isTau, bool isFor);
32 
35  L1GctJetCand(unsigned rank, unsigned phi, unsigned eta, bool isTau, bool isFor, uint16_t block, uint16_t index, int16_t bx);
36 
38  virtual ~L1GctJetCand();
39 
42 
44  std::string name() const;
45 
47  bool empty() const { return (rank() == 0); }
48 
50  uint16_t raw() const { return m_data; }
51 
53  unsigned rank() const { return m_data & 0x3f; }
54 
56  unsigned etaIndex() const { return (m_data>>6) & 0xf; }
57 
59  unsigned etaSign() const { return (m_data>>9) & 0x1; }
60 
62  unsigned phiIndex() const { 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 { return ((m_data==c.raw() &&
84  m_isTau==c.isTau() && m_isFor==c.isForward())
85  || (this->empty() && c.empty())); }
86 
88  int operator!=(const L1GctJetCand& c) const { return !(*this == c); }
89 
90 private:
91 
92  uint16_t m_data;
93  bool m_isTau;
94  bool m_isFor;
95  uint16_t m_captureBlock;
96  uint8_t m_captureIndex;
97  int16_t m_bx;
98 
99  };
100 
101 std::ostream& operator<<(std::ostream& s, const L1GctJetCand& cand);
102 
103 #endif
bool isTau() const
check if this is a tau
Definition: L1GctJetCand.h:68
unsigned rank() const
get rank bits
Definition: L1GctJetCand.h:53
unsigned capBlock() const
which capture block did this come from
Definition: L1GctJetCand.h:74
int16_t bx() const
get bunch-crossing index
Definition: L1GctJetCand.h:80
unsigned etaIndex() const
get eta index (bit 3 is sign, 1 for -ve Z, 0 for +ve Z)
Definition: L1GctJetCand.h:56
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:18
virtual ~L1GctJetCand()
destructor (virtual to prevent compiler warnings)
Definition: L1GctJetCand.cc:70
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
bool isForward() const
check if this is a forward jet
Definition: L1GctJetCand.h:71
int16_t m_bx
Definition: L1GctJetCand.h:97
L1CaloRegionDetId regionId() const
region associated with the candidate
Definition: L1GctJetCand.cc:97
uint8_t m_captureIndex
Definition: L1GctJetCand.h:96
bool empty() const
was an object really found?
Definition: L1GctJetCand.h:47
L1GctJetCand()
default constructor (for vector initialisation etc.)
Definition: L1GctJetCand.cc:11
int operator==(const L1GctJetCand &c) const
equality operator
Definition: L1GctJetCand.h:83
unsigned etaSign() const
get eta sign bit (1 for -ve Z, 0 for +ve Z)
Definition: L1GctJetCand.h:59
std::string name() const
name of object
Definition: L1GctJetCand.cc:73
uint16_t m_data
Definition: L1GctJetCand.h:92
unsigned capIndex() const
what index within capture block
Definition: L1GctJetCand.h:77
ABC for GCT EM and jet candidates.
Definition: L1GctCand.h:12
bool isCentral() const
check if this is a central jet
Definition: L1GctJetCand.h:65
unsigned phiIndex() const
get phi index (0-17)
Definition: L1GctJetCand.h:62
uint16_t raw() const
get the raw data
Definition: L1GctJetCand.h:50
uint16_t m_captureBlock
Definition: L1GctJetCand.h:95
int operator!=(const L1GctJetCand &c) const
inequality operator
Definition: L1GctJetCand.h:88