CMS 3D CMS Logo

L1GctRegion.h
Go to the documentation of this file.
1 #ifndef L1GCTREGION_H
2 #define L1GCTREGION_H
3 
16 
17 class L1GctRegion : public L1CaloRegion {
18 public:
19  enum numberOfBits {
23  };
24 
25  // Constructors and destructor
26  L1GctRegion();
27 
28  ~L1GctRegion();
29 
30  // Named constructors
32  static L1GctRegion makeProtoJetRegion(const unsigned et,
33  const bool overFlow,
34  const bool fineGrain,
35  const bool tauIsolationVeto,
36  const unsigned ieta,
37  const unsigned iphi,
38  const int16_t bx);
39  static L1GctRegion makeFinalJetRegion(const unsigned et,
40  const bool overFlow,
41  const bool fineGrain,
42  const unsigned ieta,
43  const unsigned iphi,
44  const int16_t bx);
45 
46  // Replace et() method to use 10 bits for all eta
47  unsigned et() const { return overFlow() ? kGctRegionMaxValue : raw() & kGctRegionMaxValue; }
48 
49  // Replace local eta with a non-physical value
50  unsigned rctEta() const { return (empty() ? 12 : id().rctEta()); }
51 
52  // Access to additional bit fields
53  bool featureBit0() { return ((raw() >> 14) & 0x1) != 0; }
54  bool featureBit1() { return ((raw() >> 15) & 0x1) != 0; }
55 
56  void setFeatureBit0() { setBit(14, true); }
57  void clrFeatureBit0() { setBit(14, false); }
58  void setFeatureBit1() { setBit(15, true); }
59  void clrFeatureBit1() { setBit(15, false); }
60 
61 private:
62  // constructor for internal use
63  L1GctRegion(const unsigned et,
64  const bool overFlow,
65  const bool fineGrain,
66  const unsigned ieta,
67  const unsigned iphi,
68  const int16_t bx);
69 
70  void setBit(const unsigned bitNum, const bool onOff);
71 };
72 
73 #endif
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:96
void setFeatureBit0()
Definition: L1GctRegion.h:56
Gct version of a calorimeter region, used within GCT emulation.
Definition: L1GctRegion.h:17
void clrFeatureBit1()
Definition: L1GctRegion.h:59
static L1GctRegion makeProtoJetRegion(const unsigned et, const bool overFlow, const bool fineGrain, const bool tauIsolationVeto, const unsigned ieta, const unsigned iphi, const int16_t bx)
Definition: L1GctRegion.cc:13
static L1GctRegion makeJfInputRegion(const L1CaloRegion &)
Definition: L1GctRegion.cc:7
bool featureBit1()
Definition: L1GctRegion.h:54
void setBit(const unsigned bitNum, const bool onOff)
Definition: L1GctRegion.cc:54
unsigned rctEta() const
Definition: L1GctRegion.h:50
void setFeatureBit1()
Definition: L1GctRegion.h:58
static L1GctRegion makeFinalJetRegion(const unsigned et, const bool overFlow, const bool fineGrain, const unsigned ieta, const unsigned iphi, const int16_t bx)
Definition: L1GctRegion.cc:29
uint16_t raw() const
get raw data
Definition: L1CaloRegion.h:87
bool fineGrain() const
get fine grain bit
Definition: L1CaloRegion.h:102
bool featureBit0()
Definition: L1GctRegion.h:53
int16_t bx() const
get bunch-crossing index
Definition: L1CaloRegion.h:165
bool empty() const
is there any information in the candidate
Definition: L1CaloRegion.h:176
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:21
void clrFeatureBit0()
Definition: L1GctRegion.h:57
unsigned et() const
Definition: L1GctRegion.h:47