CMS 3D CMS Logo

L1GctRegion.cc
Go to the documentation of this file.
2 
4 
6 
8  bool of = (r_in.isHf() ? (r_in.et() == 0xff) : r_in.overFlow());
9  L1GctRegion r(r_in.et(), of, r_in.fineGrain(), r_in.gctEta(), r_in.gctPhi(), r_in.bx());
10  return r;
11 }
12 
14  const bool overFlow,
15  const bool fineGrain,
16  const bool tauIsolationVeto,
17  const unsigned ieta,
18  const unsigned iphi,
19  const int16_t bx) {
21  if (tauIsolationVeto) {
22  r.setFeatureBit0();
23  } else {
24  r.clrFeatureBit0();
25  }
26  return r;
27 }
28 
30  const bool overFlow,
31  const bool fineGrain,
32  const unsigned ieta,
33  const unsigned iphi,
34  const int16_t bx) {
36  return r;
37 }
38 
39 // constructor for internal use
41  const bool overFlow,
42  const bool fineGrain,
43  const unsigned ieta,
44  const unsigned iphi,
45  const int16_t bx)
46  : L1CaloRegion(L1CaloRegion::makeGctJetRegion(
47  ((overFlow || et > kGctRegionMaxValue) ? (unsigned)kGctRegionMaxValue : (unsigned)(et & kGctRegionMaxValue)),
48  (overFlow || et > kGctRegionMaxValue),
49  fineGrain,
50  ieta,
51  iphi,
52  bx)) {}
53 
54 void L1GctRegion::setBit(const unsigned bitNum, const bool onOff) {
55  if ((bitNum == 14) || (bitNum == 15)) {
56  uint16_t data = raw();
57  uint16_t mask = 1 << bitNum;
58  data &= ~mask;
59  if (onOff)
60  data |= mask;
62  }
63 }
bool overFlow() const
get overflow
Definition: L1CaloRegion.h:96
void setRawData(uint32_t data)
set data
Definition: L1CaloRegion.h:120
bool isHf() const
forward or central region
Definition: L1CaloRegion.h:134
Gct version of a calorimeter region, used within GCT emulation.
Definition: L1GctRegion.h:17
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
constexpr uint32_t mask
Definition: gpuClustering.h:26
static L1GctRegion makeJfInputRegion(const L1CaloRegion &)
Definition: L1GctRegion.cc:7
void setBit(const unsigned bitNum, const bool onOff)
Definition: L1GctRegion.cc:54
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
int16_t bx() const
get bunch-crossing index
Definition: L1CaloRegion.h:165
unsigned gctEta() const
get GCT eta index
Definition: L1CaloRegion.h:153
unsigned et() const
get Et
Definition: L1CaloRegion.h:90
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
unsigned gctPhi() const
get GCT phi index
Definition: L1CaloRegion.h:156
A calorimeter trigger region (sum of 4x4 trigger towers)
Definition: L1CaloRegion.h:21
unsigned et() const
Definition: L1GctRegion.h:47