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_rawid_t isolation
 
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 191 of file gt_datatypes.h.

Member Function Documentation

◆ initFromBits()

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

Definition at line 240 of file gt_datatypes.h.

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

240  {
241  unsigned int start = 0;
253  }
Definition: start.py:1
ap_uint< 2 > id0
Definition: gt_datatypes.h:199
valid_t valid
Definition: gt_datatypes.h:192
z0_t seed_z0
Definition: gt_datatypes.h:195
tauseed_pt_t seed_pt
Definition: gt_datatypes.h:194
ap_uint< 1 > charge
Definition: gt_datatypes.h:196
ap_uint< 2 > id1
Definition: gt_datatypes.h:200
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15
ThreeVector v3
Definition: gt_datatypes.h:193

◆ pack()

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

Definition at line 218 of file gt_datatypes.h.

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

Referenced by L1NNTauProducer::makeTau_HW().

218  {
219  PackedTau packed;
220  ap_uint<BITWIDTH> bits = this->pack_ap();
221  packed[0] = bits(63, 0);
222  packed[1] = bits(127, 64);
223  return packed;
224  }
std::array< uint64_t, 2 > PackedTau
Definition: gt_datatypes.h:38
ap_uint< BITWIDTH > pack_ap() const
Definition: gt_datatypes.h:203

◆ pack_ap()

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

Definition at line 203 of file gt_datatypes.h.

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

Referenced by pack().

203  {
204  ap_uint<BITWIDTH> ret(0);
205  unsigned int start = 0;
215  return ret;
216  }
Definition: start.py:1
ap_uint< BITWIDTH > pack() const
Definition: gt_datatypes.h:62
ret
prodAgent to be discontinued
ap_uint< 2 > id0
Definition: gt_datatypes.h:199
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
valid_t valid
Definition: gt_datatypes.h:192
z0_t seed_z0
Definition: gt_datatypes.h:195
tauseed_pt_t seed_pt
Definition: gt_datatypes.h:194
ap_uint< 1 > charge
Definition: gt_datatypes.h:196
ap_uint< 2 > id1
Definition: gt_datatypes.h:200
ThreeVector v3
Definition: gt_datatypes.h:193

◆ unpack()

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

Definition at line 232 of file gt_datatypes.h.

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

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

232  {
233  ap_uint<BITWIDTH> bits;
234  bits(63, 0) = src[0];
235  bits(127, 64) = src[1];
236 
237  return unpack_ap(bits);
238  }
static Tau unpack_ap(const ap_uint< BITWIDTH > &src)
Definition: gt_datatypes.h:226

◆ unpack_ap()

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

Definition at line 226 of file gt_datatypes.h.

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

Referenced by unpack().

226  {
227  Tau ret;
228  ret.initFromBits(src);
229  return ret;
230  }
ret
prodAgent to be discontinued
Definition: Tau.py:1

Member Data Documentation

◆ BITWIDTH

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

Definition at line 202 of file gt_datatypes.h.

◆ charge

ap_uint<1> l1gt::Tau::charge

Definition at line 196 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ id0

ap_uint<2> l1gt::Tau::id0

Definition at line 199 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ id1

ap_uint<2> l1gt::Tau::id1

Definition at line 200 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ isolation

tau_rawid_t l1gt::Tau::isolation

Definition at line 198 of file gt_datatypes.h.

◆ seed_pt

tauseed_pt_t l1gt::Tau::seed_pt

Definition at line 194 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().

◆ seed_z0

z0_t l1gt::Tau::seed_z0

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

Referenced by initFromBits(), and pack_ap().

◆ valid

valid_t l1gt::Tau::valid

Definition at line 192 of file gt_datatypes.h.

Referenced by initFromBits(), and pack_ap().