CMS 3D CMS Logo

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

#include <gt_datatypes.h>

Public Member Functions

void initFromBits (const ap_uint< BITWIDTH > &src)
 
ap_uint< BITWIDTHpack () const
 

Static Public Member Functions

static Electron unpack (const std::array< uint64_t, 2 > &src, int parity)
 
static Electron unpack_ap (const ap_uint< BITWIDTH > &src)
 

Public Attributes

ap_uint< 1 > charge
 
iso_t isolation
 
egquality_t quality
 
ThreeVector v3
 
valid_t valid
 
z0_t z0
 

Static Public Attributes

static const int BITWIDTH = 96
 

Detailed Description

Definition at line 250 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

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

◆ pack()

ap_uint<BITWIDTH> l1gt::Electron::pack ( ) const
inline

Definition at line 259 of file gt_datatypes.h.

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

259  {
260  ap_uint<BITWIDTH> ret(0);
261  unsigned int start = 0;
268  return ret;
269  }
Definition: start.py:1
egquality_t quality
Definition: gt_datatypes.h:253
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:62
ret
prodAgent to be discontinued
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
ThreeVector v3
Definition: gt_datatypes.h:252
ap_uint< 1 > charge
Definition: gt_datatypes.h:254

◆ unpack()

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

Definition at line 289 of file gt_datatypes.h.

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

289  {
290  ap_uint<BITWIDTH> bits;
291  if (parity == 0) {
292  bits(63, 0) = src[0];
293  bits(95, 64) = src[1];
294  } else {
295  bits(63, 0) = src[1];
296  bits(95, 64) = (src[0] >> 32);
297  }
298  return unpack_ap(bits);
299  }
constexpr uint32_t bits
Definition: gpuClustering.h:25
static Electron unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:283

◆ unpack_ap()

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

Definition at line 283 of file gt_datatypes.h.

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

Referenced by l1t::L1GTProducer::produceCL2Electrons(), and unpack().

283  {
284  Electron ret;
285  ret.initFromBits(src);
286  return ret;
287  }
ret
prodAgent to be discontinued

Member Data Documentation

◆ BITWIDTH

const int l1gt::Electron::BITWIDTH = 96
static

Definition at line 258 of file gt_datatypes.h.

◆ charge

ap_uint<1> l1gt::Electron::charge

◆ isolation

iso_t l1gt::Electron::isolation

◆ quality

egquality_t l1gt::Electron::quality

◆ v3

ThreeVector l1gt::Electron::v3

◆ valid

valid_t l1gt::Electron::valid

Definition at line 251 of file gt_datatypes.h.

Referenced by initFromBits(), pack(), and l1ct::EGIsoEleObj::toGT().

◆ z0

z0_t l1gt::Electron::z0