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 {
8  setTkJetWord(pt, eta, phi, z0, nt, nx, unassigned);
9  }
10 
12  pt_t pt, glbeta_t eta, glbphi_t phi, z0_t z0, nt_t nt, nx_t nx, tkjetunassigned_t unassigned) {
13  // pack the TkJet word
14  unsigned int offset = 0;
15  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kPtSize); b++) {
16  tkJetWord_.set(b, pt[b - offset]);
17  }
18  offset += TkJetBitWidths::kPtSize;
19  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kGlbEtaSize); b++) {
20  tkJetWord_.set(b, eta[b - offset]);
21  }
22  offset += TkJetBitWidths::kGlbEtaSize;
23  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kGlbPhiSize); b++) {
24  tkJetWord_.set(b, phi[b - offset]);
25  }
26  offset += TkJetBitWidths::kGlbPhiSize;
27  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kZ0Size); b++) {
28  tkJetWord_.set(b, z0[b - offset]);
29  }
30  offset += TkJetBitWidths::kZ0Size;
31  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kNtSize); b++) {
32  tkJetWord_.set(b, nt[b - offset]);
33  }
34  offset += TkJetBitWidths::kNtSize;
35  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kXtSize); b++) {
36  tkJetWord_.set(b, nx[b - offset]);
37  }
38  offset += TkJetBitWidths::kXtSize;
39  for (unsigned int b = offset; b < (offset + TkJetBitWidths::kUnassignedSize); b++) {
40  tkJetWord_.set(b, unassigned[b - offset]);
41  }
42  }
43 
44 } //namespace l1t
ap_int< kGlbEtaSize > glbeta_t
Definition: TkJetWord.h:55
ap_int< kGlbPhiSize > glbphi_t
Definition: TkJetWord.h:56
delete x;
Definition: CaloConfig.h:22
ap_ufixed< kPtSize, kPtMagSize, AP_TRN, AP_SAT > pt_t
Definition: TkJetWord.h:54
ap_uint< TkJetBitWidths::kUnassignedSize > tkjetunassigned_t
Definition: TkJetWord.h:60
ap_int< kZ0Size > z0_t
Definition: TkJetWord.h:57
float pt() const
Definition: TkJetWord.h:129
tkjetword_bs_t tkJetWord_
Definition: TkJetWord.h:153
float z0() const
Definition: TkJetWord.h:132
ap_uint< kXtSize > nx_t
Definition: TkJetWord.h:59
int nt
Definition: AMPTWrapper.h:42
int nt() const
Definition: TkJetWord.h:133
double b
Definition: hdecay.h:118
unsigned int unassigned() const
Definition: TkJetWord.h:135
ap_uint< kNtSize > nt_t
Definition: TkJetWord.h:58
const unsigned int kUnassignedSize
void setTkJetWord(pt_t pt, glbeta_t eta, glbphi_t phi, z0_t z0, nt_t nt, nx_t nx, tkjetunassigned_t unassigned)
Definition: TkJetWord.cc:11