CMS 3D CMS Logo

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

#include <gt_datatypes.h>

Public Member Functions

void initFromBits (const ap_uint< BITWIDTH > &src)
 
PackedTau pack () const
 
ap_uint< BITWIDTHpack_ap () const
 

Static Public Member Functions

static Tau unpack (const PackedTau &src)
 
static Tau unpack_ap (const ap_uint< BITWIDTH > &src)
 

Public Attributes

ap_uint< 1 > charge
 
ap_uint< 2 > id0
 
ap_uint< 2 > id1
 
tau_quality_t quality
 
tauseed_pt_t seed_pt
 
z0_t seed_z0
 
ap_uint< 2 > type
 
ThreeVector v3
 
valid_t valid
 

Static Public Attributes

static const int BITWIDTH = 128
 

Detailed Description

Definition at line 195 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

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

Definition at line 244 of file gt_datatypes.h.

References charge, l1gt::ThreeVector::eta, id0, id1, l1gt::ThreeVector::phi, l1gt::ThreeVector::pt, quality, seed_pt, seed_z0, TrackRefitter_38T_cff::src, unpack_from_bits(), v3, and valid.

244  {
245  unsigned int start = 0;
257  }
Definition: start.py:1
ap_uint< 2 > id0
Definition: gt_datatypes.h:203
tau_quality_t quality
Definition: gt_datatypes.h:202
valid_t valid
Definition: gt_datatypes.h:196
z0_t seed_z0
Definition: gt_datatypes.h:199
tauseed_pt_t seed_pt
Definition: gt_datatypes.h:198
ap_uint< 1 > charge
Definition: gt_datatypes.h:200
ap_uint< 2 > id1
Definition: gt_datatypes.h:204
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15
ThreeVector v3
Definition: gt_datatypes.h:197

◆ pack()

PackedTau l1gt::Tau::pack ( ) const
inline

Definition at line 222 of file gt_datatypes.h.

References ALPAKA_ACCELERATOR_NAMESPACE::pixelClustering::pixelStatus::bits, and pack_ap().

Referenced by L1NNTauProducer::makeTau_HW().

222  {
223  PackedTau packed;
224  ap_uint<BITWIDTH> bits = this->pack_ap();
225  packed[0] = bits(63, 0);
226  packed[1] = bits(127, 64);
227  return packed;
228  }
std::array< uint64_t, 2 > PackedTau
Definition: gt_datatypes.h:39
ap_uint< BITWIDTH > pack_ap() const
Definition: gt_datatypes.h:207

◆ pack_ap()

ap_uint<BITWIDTH> l1gt::Tau::pack_ap ( ) const
inline

Definition at line 207 of file gt_datatypes.h.

References charge, id0, id1, l1gt::ThreeVector::pack(), pack_into_bits(), quality, runTheMatrix::ret, seed_pt, seed_z0, v3, and valid.

Referenced by pack().

207  {
208  ap_uint<BITWIDTH> ret(0);
209  unsigned int start = 0;
219  return ret;
220  }
Definition: start.py:1
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:63
ret
prodAgent to be discontinued
ap_uint< 2 > id0
Definition: gt_datatypes.h:203
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
tau_quality_t quality
Definition: gt_datatypes.h:202
valid_t valid
Definition: gt_datatypes.h:196
z0_t seed_z0
Definition: gt_datatypes.h:199
tauseed_pt_t seed_pt
Definition: gt_datatypes.h:198
ap_uint< 1 > charge
Definition: gt_datatypes.h:200
ap_uint< 2 > id1
Definition: gt_datatypes.h:204
ThreeVector v3
Definition: gt_datatypes.h:197

◆ unpack()

static Tau l1gt::Tau::unpack ( const PackedTau src)
inlinestatic

Definition at line 236 of file gt_datatypes.h.

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

Referenced by l1t::PFTau::getHWTauGT().

236  {
237  ap_uint<BITWIDTH> bits;
238  bits(63, 0) = src[0];
239  bits(127, 64) = src[1];
240 
241  return unpack_ap(bits);
242  }
static Tau unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:230

◆ unpack_ap()

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

Definition at line 230 of file gt_datatypes.h.

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

Referenced by unpack().

230  {
231  Tau ret;
232  ret.initFromBits(src);
233  return ret;
234  }
ret
prodAgent to be discontinued
Definition: Tau.py:1

Member Data Documentation

◆ BITWIDTH

const int l1gt::Tau::BITWIDTH = 128
static

Definition at line 206 of file gt_datatypes.h.

◆ charge

ap_uint<1> l1gt::Tau::charge

Definition at line 200 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ id0

ap_uint<2> l1gt::Tau::id0

Definition at line 203 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ id1

ap_uint<2> l1gt::Tau::id1

Definition at line 204 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ quality

tau_quality_t l1gt::Tau::quality

Definition at line 202 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ seed_pt

tauseed_pt_t l1gt::Tau::seed_pt

Definition at line 198 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ seed_z0

z0_t l1gt::Tau::seed_z0

Definition at line 199 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ type

ap_uint<2> l1gt::Tau::type

◆ v3

ThreeVector l1gt::Tau::v3

Definition at line 197 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ valid

valid_t l1gt::Tau::valid

Definition at line 196 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().