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

b_tag_score_t hwBtagScore
 
ThreeVector v3
 
valid_t valid
 
z0_t z0
 

Static Public Attributes

static const int BITWIDTH = 128
 

Detailed Description

Definition at line 86 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

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

Definition at line 119 of file gt_datatypes.h.

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

119  {
120  unsigned int start = 0;
127  }
Definition: start.py:1
valid_t valid
Definition: gt_datatypes.h:87
b_tag_score_t hwBtagScore
Definition: gt_datatypes.h:90
ThreeVector v3
Definition: gt_datatypes.h:88
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 92 of file gt_datatypes.h.

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

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

◆ pack()

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

Definition at line 105 of file gt_datatypes.h.

References ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::bits, and pack_ap().

105  {
106  std::array<uint64_t, 2> packed;
107  ap_uint<BITWIDTH> bits = this->pack_ap();
108  packed[0] = bits(63, 0);
109  packed[1] = bits(127, 64);
110  return packed;
111  }
ap_uint< BITWIDTH > pack_ap() const
Definition: gt_datatypes.h:95

◆ pack_ap()

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

Definition at line 95 of file gt_datatypes.h.

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

Referenced by pack().

95  {
96  ap_uint<BITWIDTH> ret = 0;
97  unsigned int start = 0;
102  return ret;
103  }
Definition: start.py:1
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:63
ret
prodAgent to be discontinued
valid_t valid
Definition: gt_datatypes.h:87
b_tag_score_t hwBtagScore
Definition: gt_datatypes.h:90
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
ThreeVector v3
Definition: gt_datatypes.h:88

◆ unpack() [1/2]

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

Definition at line 129 of file gt_datatypes.h.

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

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

129  {
130  ap_uint<BITWIDTH> bits;
131  bits(63, 0) = src[0];
132  bits(127, 64) = src[1];
133  return unpack_ap(bits);
134  }
static Jet unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:113

◆ unpack() [2/2]

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

Definition at line 136 of file gt_datatypes.h.

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

136  {
137  // unpack from single 64b int
138  ap_uint<BITWIDTH> bits = src;
139  return unpack_ap(bits);
140  }
static Jet unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:113

◆ unpack_ap()

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

Definition at line 113 of file gt_datatypes.h.

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

Referenced by unpack().

113  {
114  Jet ret;
115  ret.initFromBits(src);
116  return ret;
117  }
ret
prodAgent to be discontinued
Definition: Jet.py:1

Member Data Documentation

◆ BITWIDTH

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

Definition at line 94 of file gt_datatypes.h.

◆ hwBtagScore

b_tag_score_t l1gt::Jet::hwBtagScore

Definition at line 90 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ v3

ThreeVector l1gt::Jet::v3

Definition at line 88 of file gt_datatypes.h.

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

◆ valid

valid_t l1gt::Jet::valid

Definition at line 87 of file gt_datatypes.h.

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

◆ z0

z0_t l1gt::Jet::z0

Definition at line 89 of file gt_datatypes.h.

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