CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
l1gt::Jet Struct Reference

#include <gt_datatypes.h>

Public Member Functions

void initFromBits (const ap_uint< BITWIDTH > &src)
 
bool operator== (const Jet &other) const
 
std::array< uint64_t, 2 > pack () const
 
ap_uint< BITWIDTHpack_ap () const
 

Static Public Member Functions

static Jet unpack (const std::array< uint64_t, 2 > &src)
 
static Jet unpack (long long unsigned int &src)
 
static Jet unpack_ap (const ap_uint< BITWIDTH > &src)
 

Public Attributes

ThreeVector v3
 
valid_t valid
 
z0_t z0
 

Static Public Attributes

static const int BITWIDTH = 128
 

Detailed Description

Definition at line 82 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

void l1gt::Jet::initFromBits ( const ap_uint< BITWIDTH > &  src)
inline

Definition at line 113 of file gt_datatypes.h.

References l1gt::ThreeVector::eta, l1gt::ThreeVector::phi, l1gt::ThreeVector::pt, TrackRefitter_38T_cff::src, unpack_from_bits(), v3, valid, and z0.

113  {
114  unsigned int start = 0;
120  }
Definition: start.py:1
valid_t valid
Definition: gt_datatypes.h:83
ThreeVector v3
Definition: gt_datatypes.h:84
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15

◆ operator==()

bool l1gt::Jet::operator== ( const Jet other) const
inline

Definition at line 87 of file gt_datatypes.h.

References trackingPlots::other, v3, valid, and z0.

87 { return valid == other.valid && z0 == other.z0 && v3 == other.v3; }
valid_t valid
Definition: gt_datatypes.h:83
ThreeVector v3
Definition: gt_datatypes.h:84

◆ pack()

std::array<uint64_t, 2> l1gt::Jet::pack ( ) const
inline

Definition at line 99 of file gt_datatypes.h.

References gpuClustering::pixelStatus::bits, and pack_ap().

99  {
100  std::array<uint64_t, 2> packed;
101  ap_uint<BITWIDTH> bits = this->pack_ap();
102  packed[0] = bits(63, 0);
103  packed[1] = bits(127, 64);
104  return packed;
105  }
ap_uint< BITWIDTH > pack_ap() const
Definition: gt_datatypes.h:90
constexpr uint32_t bits
Definition: gpuClustering.h:25

◆ pack_ap()

ap_uint<BITWIDTH> l1gt::Jet::pack_ap ( ) const
inline

Definition at line 90 of file gt_datatypes.h.

References l1gt::ThreeVector::pack(), pack_into_bits(), runTheMatrix::ret, v3, valid, and z0.

Referenced by pack().

90  {
91  ap_uint<BITWIDTH> ret = 0;
92  unsigned int start = 0;
96  return ret;
97  }
Definition: start.py:1
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:59
ret
prodAgent to be discontinued
valid_t valid
Definition: gt_datatypes.h:83
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
ThreeVector v3
Definition: gt_datatypes.h:84

◆ unpack() [1/2]

static Jet l1gt::Jet::unpack ( const std::array< uint64_t, 2 > &  src)
inlinestatic

Definition at line 122 of file gt_datatypes.h.

References gpuClustering::pixelStatus::bits, TrackRefitter_38T_cff::src, and unpack_ap().

122  {
123  ap_uint<BITWIDTH> bits;
124  bits(63, 0) = src[0];
125  bits(127, 64) = src[1];
126  return unpack_ap(bits);
127  }
constexpr uint32_t bits
Definition: gpuClustering.h:25
static Jet unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:107

◆ unpack() [2/2]

static Jet l1gt::Jet::unpack ( long long unsigned int &  src)
inlinestatic

Definition at line 129 of file gt_datatypes.h.

References gpuClustering::pixelStatus::bits, TrackRefitter_38T_cff::src, and unpack_ap().

129  {
130  // unpack from single 64b int
131  ap_uint<BITWIDTH> bits = src;
132  return unpack_ap(bits);
133  }
constexpr uint32_t bits
Definition: gpuClustering.h:25
static Jet unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:107

◆ unpack_ap()

static Jet l1gt::Jet::unpack_ap ( const ap_uint< BITWIDTH > &  src)
inlinestatic

Definition at line 107 of file gt_datatypes.h.

References runTheMatrix::ret, and TrackRefitter_38T_cff::src.

Referenced by unpack().

107  {
108  Jet ret;
109  ret.initFromBits(src);
110  return ret;
111  }
ret
prodAgent to be discontinued
Definition: Jet.py:1

Member Data Documentation

◆ BITWIDTH

const int l1gt::Jet::BITWIDTH = 128
static

Definition at line 89 of file gt_datatypes.h.

◆ v3

ThreeVector l1gt::Jet::v3

Definition at line 84 of file gt_datatypes.h.

Referenced by initFromBits(), operator==(), and pack_ap().

◆ valid

valid_t l1gt::Jet::valid

Definition at line 83 of file gt_datatypes.h.

Referenced by initFromBits(), operator==(), and pack_ap().

◆ z0

z0_t l1gt::Jet::z0

Definition at line 85 of file gt_datatypes.h.

Referenced by initFromBits(), operator==(), and pack_ap().