CMS 3D CMS Logo

TkJetWord.cc
Go to the documentation of this file.
1 // Class to store the 96-bit TkJet word for L1 Track Trigger.
2 // Author: Benjamin Radburn-Smith (September 2022)
3 
5 
6 namespace l1t {
9  glbphi_t phi,
10  z0_t z0,
11  nt_t nt,
12  nx_t nx,
13  dispflag_t dispflag,
14  tkjetunassigned_t unassigned) {
15  setTkJetWord(pt, eta, phi, z0, nt, nx, dispflag, unassigned);
16  }
17 
19  glbeta_t eta,
20  glbphi_t phi,
21  z0_t z0,
22  nt_t nt,
23  nx_t nx,
24  dispflag_t dispflag,
25  tkjetunassigned_t unassigned) {
26  // pack the TkJet word
27  unsigned int offset = 0;
28  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kPtSize); b++) {
29  tkJetWord_.set(b, pt[b - offset]);
30  }
31  offset += TkJetBitWidths::kPtSize;
32  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kGlbPhiSize); b++) {
33  tkJetWord_.set(b, phi[b - offset]);
34  }
35  offset += TkJetBitWidths::kGlbPhiSize;
36  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kGlbEtaSize); b++) {
37  tkJetWord_.set(b, eta[b - offset]);
38  }
39  offset += TkJetBitWidths::kGlbEtaSize;
40  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kZ0Size); b++) {
41  tkJetWord_.set(b, z0[b - offset]);
42  }
43  offset += TkJetBitWidths::kZ0Size;
44  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kNtSize); b++) {
45  tkJetWord_.set(b, nt[b - offset]);
46  }
47  offset += TkJetBitWidths::kNtSize;
48  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kXtSize); b++) {
49  tkJetWord_.set(b, nx[b - offset]);
50  }
51  offset += TkJetBitWidths::kXtSize;
52  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kDispFlagSize); b++) {
53  tkJetWord_.set(b, nx[b - offset]);
54  }
55  offset += TkJetBitWidths::kDispFlagSize;
56  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kUnassignedSize); b++) {
57  tkJetWord_.set(b, unassigned[b - offset]);
58  }
59  }
60 
61 } //namespace l1t
int dispflag() const
Definition: TkJetWord.h:162
ap_int< kGlbEtaSize > glbeta_t
Definition: TkJetWord.h:59
ap_int< kGlbPhiSize > glbphi_t
Definition: TkJetWord.h:60
void setTkJetWord(pt_t pt, glbeta_t eta, glbphi_t phi, z0_t z0, nt_t nt, nx_t nx, dispflag_t dispflag, tkjetunassigned_t unassigned)
Definition: TkJetWord.cc:18
delete x;
Definition: CaloConfig.h:22
ap_ufixed< kPtSize, kPtMagSize, AP_TRN, AP_SAT > pt_t
Definition: TkJetWord.h:58
ap_uint< kDispFlagSize > dispflag_t
Definition: TkJetWord.h:64
ap_uint< TkJetBitWidths::kUnassignedSize > tkjetunassigned_t
Definition: TkJetWord.h:65
ap_int< kZ0Size > z0_t
Definition: TkJetWord.h:61
float pt() const
Definition: TkJetWord.h:148
tkjetword_bs_t tkJetWord_
Definition: TkJetWord.h:188
float z0() const
Definition: TkJetWord.h:157
ap_uint< kXtSize > nx_t
Definition: TkJetWord.h:63
int nt
Definition: AMPTWrapper.h:42
int nt() const
Definition: TkJetWord.h:160
double b
Definition: hdecay.h:120
unsigned int unassigned() const
Definition: TkJetWord.h:163
ap_uint< kNtSize > nt_t
Definition: TkJetWord.h:62
const unsigned int kUnassignedSize