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

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

256  {
257  ap_uint<BITWIDTH> ret(0);
258  unsigned int start = 0;
265  return ret;
266  }
Definition: start.py:1
egquality_t quality
Definition: gt_datatypes.h:250
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:59
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:249
ap_uint< 1 > charge
Definition: gt_datatypes.h:251

◆ unpack()

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

Definition at line 286 of file gt_datatypes.h.

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

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

◆ unpack_ap()

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

Definition at line 280 of file gt_datatypes.h.

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

Referenced by unpack().

280  {
281  Electron ret;
282  ret.initFromBits(src);
283  return ret;
284  }
ret
prodAgent to be discontinued

Member Data Documentation

◆ BITWIDTH

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

Definition at line 255 of file gt_datatypes.h.

◆ charge

ap_uint<1> l1gt::Electron::charge

Definition at line 251 of file gt_datatypes.h.

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

◆ isolation

iso_t l1gt::Electron::isolation

Definition at line 253 of file gt_datatypes.h.

Referenced by l1ct::EGIsoEleObj::toGT().

◆ quality

egquality_t l1gt::Electron::quality

Definition at line 250 of file gt_datatypes.h.

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

◆ v3

ThreeVector l1gt::Electron::v3

Definition at line 249 of file gt_datatypes.h.

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

◆ valid

valid_t l1gt::Electron::valid

Definition at line 248 of file gt_datatypes.h.

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

◆ z0

z0_t l1gt::Electron::z0

Definition at line 252 of file gt_datatypes.h.

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