CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
l1gt::Photon 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 Photon unpack (const std::array< uint64_t, 2 > &src, int parity)
 
static Photon unpack_ap (const ap_uint< BITWIDTH > &src)
 

Public Attributes

iso_t isolationPT
 
egquality_t qualityFlags
 
ThreeVector v3
 
valid_t valid
 

Static Public Attributes

static const int BITWIDTH = 96
 

Detailed Description

Definition at line 313 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

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

◆ pack()

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

Definition at line 320 of file gt_datatypes.h.

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

320  {
321  ap_uint<96> ret(0);
322  unsigned int start = 0;
327  return ret;
328  }
Definition: start.py:1
egquality_t qualityFlags
Definition: gt_datatypes.h:316
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:63
ret
prodAgent to be discontinued
iso_t isolationPT
Definition: gt_datatypes.h:317
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
ThreeVector v3
Definition: gt_datatypes.h:315
valid_t valid
Definition: gt_datatypes.h:314

◆ unpack()

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

Definition at line 346 of file gt_datatypes.h.

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

346  {
347  ap_uint<BITWIDTH> bits(0);
348  if (parity == 0) {
349  bits(63, 0) = src[0];
350  bits(95, 64) = src[1];
351  } else {
352  bits(63, 0) = src[1];
353  bits(95, 64) = (src[0] >> 32);
354  }
355  return unpack_ap(bits);
356  }
static Photon unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:340

◆ unpack_ap()

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

Definition at line 340 of file gt_datatypes.h.

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

Referenced by l1t::TkEm::hwObj(), and unpack().

340  {
341  Photon ret;
342  ret.initFromBits(src);
343  return ret;
344  }
Definition: Photon.py:1
ret
prodAgent to be discontinued

Member Data Documentation

◆ BITWIDTH

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

Definition at line 319 of file gt_datatypes.h.

◆ isolationPT

iso_t l1gt::Photon::isolationPT

◆ qualityFlags

egquality_t l1gt::Photon::qualityFlags

◆ v3

ThreeVector l1gt::Photon::v3

◆ valid

valid_t l1gt::Photon::valid

Definition at line 314 of file gt_datatypes.h.

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