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

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

266  {
267  ap_uint<BITWIDTH> ret(0);
268  unsigned int start = 0;
275  return ret;
276  }
Definition: start.py:1
egquality_t quality
Definition: gt_datatypes.h:260
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:259
ap_uint< 1 > charge
Definition: gt_datatypes.h:261

◆ unpack()

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

Definition at line 296 of file gt_datatypes.h.

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

296  {
297  ap_uint<BITWIDTH> bits;
298  if (parity == 0) {
299  bits(63, 0) = src[0];
300  bits(95, 64) = src[1];
301  } else {
302  bits(63, 0) = src[1];
303  bits(95, 64) = (src[0] >> 32);
304  }
305  return unpack_ap(bits);
306  }
static Electron unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:290

◆ unpack_ap()

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

Definition at line 290 of file gt_datatypes.h.

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

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

290  {
291  Electron ret;
292  ret.initFromBits(src);
293  return ret;
294  }
ret
prodAgent to be discontinued

Member Data Documentation

◆ BITWIDTH

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

Definition at line 265 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 258 of file gt_datatypes.h.

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

◆ z0

z0_t l1gt::Electron::z0