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 isolation
 
egquality_t quality
 
ThreeVector v3
 
valid_t valid
 

Static Public Attributes

static const int BITWIDTH = 96
 

Detailed Description

Definition at line 302 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

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

Definition at line 319 of file gt_datatypes.h.

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

319  {
320  unsigned int start = 0;
327  }
Definition: start.py:1
ThreeVector v3
Definition: gt_datatypes.h:304
valid_t valid
Definition: gt_datatypes.h:303
egquality_t quality
Definition: gt_datatypes.h:305
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15

◆ pack()

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

Definition at line 309 of file gt_datatypes.h.

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

309  {
310  ap_uint<96> ret(0);
311  unsigned int start = 0;
316  return ret;
317  }
Definition: start.py:1
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:304
valid_t valid
Definition: gt_datatypes.h:303
egquality_t quality
Definition: gt_datatypes.h:305

◆ unpack()

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

Definition at line 335 of file gt_datatypes.h.

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

335  {
336  ap_uint<BITWIDTH> bits;
337  if (parity == 0) {
338  bits(63, 0) = src[0];
339  bits(95, 64) = src[1];
340  } else {
341  bits(63, 0) = src[1];
342  bits(95, 64) = (src[0] >> 32);
343  }
344  return unpack_ap(bits);
345  }
constexpr uint32_t bits
Definition: gpuClustering.h:25
static Photon unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:329

◆ unpack_ap()

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

Definition at line 329 of file gt_datatypes.h.

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

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

329  {
330  Photon ret;
331  ret.initFromBits(src);
332  return ret;
333  }
Definition: Photon.py:1
ret
prodAgent to be discontinued

Member Data Documentation

◆ BITWIDTH

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

Definition at line 308 of file gt_datatypes.h.

◆ isolation

iso_t l1gt::Photon::isolation

Definition at line 306 of file gt_datatypes.h.

Referenced by l1t::L1GTProducer::produceCL2Photons(), and l1ct::EGIsoObj::toGT().

◆ quality

egquality_t l1gt::Photon::quality

◆ v3

ThreeVector l1gt::Photon::v3

◆ valid

valid_t l1gt::Photon::valid

Definition at line 303 of file gt_datatypes.h.

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