File indexing completed on 2024-04-06 12:19:51
0001 #ifndef L1GCTREGION_H
0002 #define L1GCTREGION_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "DataFormats/L1CaloTrigger/interface/L1CaloRegion.h"
0016
0017 class L1GctRegion : public L1CaloRegion {
0018 public:
0019 enum numberOfBits {
0020 kGctRegionNBits = 10,
0021 kGctRegionOFlowBit = 1 << kGctRegionNBits,
0022 kGctRegionMaxValue = kGctRegionOFlowBit - 1
0023 };
0024
0025
0026 L1GctRegion();
0027
0028 ~L1GctRegion();
0029
0030
0031 static L1GctRegion makeJfInputRegion(const L1CaloRegion&);
0032 static L1GctRegion makeProtoJetRegion(const unsigned et,
0033 const bool overFlow,
0034 const bool fineGrain,
0035 const bool tauIsolationVeto,
0036 const unsigned ieta,
0037 const unsigned iphi,
0038 const int16_t bx);
0039 static L1GctRegion makeFinalJetRegion(const unsigned et,
0040 const bool overFlow,
0041 const bool fineGrain,
0042 const unsigned ieta,
0043 const unsigned iphi,
0044 const int16_t bx);
0045
0046
0047 unsigned et() const { return overFlow() ? kGctRegionMaxValue : raw() & kGctRegionMaxValue; }
0048
0049
0050 unsigned rctEta() const { return (empty() ? 12 : id().rctEta()); }
0051
0052
0053 bool featureBit0() { return ((raw() >> 14) & 0x1) != 0; }
0054 bool featureBit1() { return ((raw() >> 15) & 0x1) != 0; }
0055
0056 void setFeatureBit0() { setBit(14, true); }
0057 void clrFeatureBit0() { setBit(14, false); }
0058 void setFeatureBit1() { setBit(15, true); }
0059 void clrFeatureBit1() { setBit(15, false); }
0060
0061 private:
0062
0063 L1GctRegion(const unsigned et,
0064 const bool overFlow,
0065 const bool fineGrain,
0066 const unsigned ieta,
0067 const unsigned iphi,
0068 const int16_t bx);
0069
0070 void setBit(const unsigned bitNum, const bool onOff);
0071 };
0072
0073 #endif