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 85 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

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

Definition at line 116 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.

116  {
117  unsigned int start = 0;
123  }
Definition: start.py:1
valid_t valid
Definition: gt_datatypes.h:86
ThreeVector v3
Definition: gt_datatypes.h:87
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 90 of file gt_datatypes.h.

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

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

◆ pack()

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

Definition at line 102 of file gt_datatypes.h.

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

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

◆ pack_ap()

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

Definition at line 93 of file gt_datatypes.h.

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

Referenced by pack().

93  {
94  ap_uint<BITWIDTH> ret = 0;
95  unsigned int start = 0;
99  return ret;
100  }
Definition: start.py:1
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:62
ret
prodAgent to be discontinued
valid_t valid
Definition: gt_datatypes.h:86
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
ThreeVector v3
Definition: gt_datatypes.h:87

◆ unpack() [1/2]

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

Definition at line 125 of file gt_datatypes.h.

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

Referenced by l1t::L1GTProducer::produceCL2Jets().

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

◆ unpack() [2/2]

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

Definition at line 132 of file gt_datatypes.h.

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

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

◆ unpack_ap()

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

Definition at line 110 of file gt_datatypes.h.

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

Referenced by unpack().

110  {
111  Jet ret;
112  ret.initFromBits(src);
113  return ret;
114  }
ret
prodAgent to be discontinued
Definition: Jet.py:1

Member Data Documentation

◆ BITWIDTH

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

Definition at line 92 of file gt_datatypes.h.

◆ v3

ThreeVector l1gt::Jet::v3

Definition at line 87 of file gt_datatypes.h.

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

◆ valid

valid_t l1gt::Jet::valid

Definition at line 86 of file gt_datatypes.h.

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

◆ z0

z0_t l1gt::Jet::z0

Definition at line 88 of file gt_datatypes.h.

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