CMS 3D CMS Logo

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

#include <taus.h>

Public Types

typedef ap_uint< 2 > lepid_t
 
typedef ap_uint< 10 > rawid_t
 
typedef ap_uint< 2 > type_t
 

Public Member Functions

void clear ()
 
float floatAbsIso () const
 
float floatEta () const
 
float floatPhi () const
 
float floatPt () const
 
float floatSeedPt () const
 
float floatSeedZ0 () const
 
pt_t hwAbsIso () const
 
int intCharge () const
 
int intEta () const
 
int intPhi () const
 
int intPt () const
 
int intSeedPt () const
 
int intType () const
 
bool operator< (const Tau &other) const
 
bool operator== (const Tau &other) const
 
bool operator> (const Tau &other) const
 
ap_uint< BITWIDTHpack () const
 
int pdgId () const
 
void setAbsIso (pt10_t absIso)
 

Static Public Member Functions

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

Public Attributes

bool hwCharge
 
glbeta_t hwEta
 
lepid_t hwIdVsEle
 
lepid_t hwIdVsMu
 
rawid_t hwIsoOrMVA
 
glbphi_t hwPhi
 
pt_t hwPt
 
rawid_t hwRawId
 
pt_t hwSeedPt
 
z0_t hwSeedZ0
 
type_t hwType
 

Static Public Attributes

static const int BITWIDTH
 

Detailed Description

Definition at line 9 of file taus.h.

Member Typedef Documentation

◆ lepid_t

typedef ap_uint<2> l1ct::Tau::lepid_t

Definition at line 12 of file taus.h.

◆ rawid_t

typedef ap_uint<10> l1ct::Tau::rawid_t

Definition at line 11 of file taus.h.

◆ type_t

typedef ap_uint<2> l1ct::Tau::type_t

Definition at line 10 of file taus.h.

Member Function Documentation

◆ clear()

void l1ct::Tau::clear ( void  )
inline

Definition at line 43 of file taus.h.

References hwCharge, hwEta, hwIdVsEle, hwIdVsMu, hwIsoOrMVA, hwPhi, hwPt, hwSeedPt, hwSeedZ0, and hwType.

43  {
44  hwPt = 0;
45  hwEta = 0;
46  hwPhi = 0;
47  hwSeedPt = 0;
48  hwSeedZ0 = 0;
49  hwCharge = 0;
50  hwType = 0;
51  hwIsoOrMVA = 0;
52  hwIdVsMu = 0;
53  hwIdVsEle = 0;
54  hwIsoOrMVA = 0;
55  }
type_t hwType
Definition: taus.h:20
rawid_t hwIsoOrMVA
Definition: taus.h:24
bool hwCharge
Definition: taus.h:19
glbphi_t hwPhi
Definition: taus.h:16
lepid_t hwIdVsEle
Definition: taus.h:23
pt_t hwPt
Definition: taus.h:14
z0_t hwSeedZ0
Definition: taus.h:18
pt_t hwSeedPt
Definition: taus.h:17
glbeta_t hwEta
Definition: taus.h:15
lepid_t hwIdVsMu
Definition: taus.h:22

◆ floatAbsIso()

float l1ct::Tau::floatAbsIso ( ) const
inline

Definition at line 70 of file taus.h.

References l1ct::Scales::floatPt(), and hwAbsIso().

70 { return Scales::floatPt(hwAbsIso()); }
pt_t hwAbsIso() const
Definition: taus.h:35
float floatPt(pt_t pt)
Definition: datatypes.h:152

◆ floatEta()

float l1ct::Tau::floatEta ( ) const
inline

Definition at line 62 of file taus.h.

References l1ct::Scales::floatEta(), and hwEta.

62 { return Scales::floatEta(hwEta); }
float floatEta(eta_t eta)
Definition: datatypes.h:157
glbeta_t hwEta
Definition: taus.h:15

◆ floatPhi()

float l1ct::Tau::floatPhi ( ) const
inline

Definition at line 63 of file taus.h.

References l1ct::Scales::floatPhi(), and hwPhi.

63 { return Scales::floatPhi(hwPhi); }
glbphi_t hwPhi
Definition: taus.h:16
float floatPhi(phi_t phi)
Definition: datatypes.h:158

◆ floatPt()

float l1ct::Tau::floatPt ( ) const
inline

Definition at line 61 of file taus.h.

References l1ct::Scales::floatPt(), and hwPt.

61 { return Scales::floatPt(hwPt); }
float floatPt(pt_t pt)
Definition: datatypes.h:152
pt_t hwPt
Definition: taus.h:14

◆ floatSeedPt()

float l1ct::Tau::floatSeedPt ( ) const
inline

Definition at line 64 of file taus.h.

References l1ct::Scales::floatPt(), and hwSeedPt.

64 { return Scales::floatPt(hwSeedPt); }
float floatPt(pt_t pt)
Definition: datatypes.h:152
pt_t hwSeedPt
Definition: taus.h:17

◆ floatSeedZ0()

float l1ct::Tau::floatSeedZ0 ( ) const
inline

Definition at line 65 of file taus.h.

References l1ct::Scales::floatZ0(), and hwSeedZ0.

65 { return Scales::floatZ0(hwSeedZ0); }
float floatZ0(z0_t z0)
Definition: datatypes.h:163
z0_t hwSeedZ0
Definition: taus.h:18

◆ hwAbsIso()

pt_t l1ct::Tau::hwAbsIso ( ) const
inline

Definition at line 35 of file taus.h.

References hwRawId, and runTheMatrix::ret.

Referenced by floatAbsIso().

35  {
36  pt10_t ret;
37  ret(9, 0) = hwRawId(9, 0);
38  return ret;
39  }
ret
prodAgent to be discontinued
ap_ufixed< 10, 8, AP_TRN, AP_SAT > pt10_t
Definition: datatypes.h:22
rawid_t hwRawId
Definition: taus.h:21

◆ intCharge()

int l1ct::Tau::intCharge ( ) const
inline

Definition at line 66 of file taus.h.

References hwCharge.

Referenced by pdgId().

66 { return hwCharge ? +1 : -1; }
bool hwCharge
Definition: taus.h:19

◆ intEta()

int l1ct::Tau::intEta ( ) const
inline

Definition at line 58 of file taus.h.

References hwEta.

58 { return hwEta.to_int(); }
glbeta_t hwEta
Definition: taus.h:15

◆ intPhi()

int l1ct::Tau::intPhi ( ) const
inline

Definition at line 59 of file taus.h.

References hwPhi.

59 { return hwPhi.to_int(); }
glbphi_t hwPhi
Definition: taus.h:16

◆ intPt()

int l1ct::Tau::intPt ( ) const
inline

Definition at line 57 of file taus.h.

References hwPt, and l1ct::Scales::intPt().

57 { return Scales::intPt(hwPt); }
pt_t hwPt
Definition: taus.h:14
int intPt(pt_t pt)
Definition: datatypes.h:155

◆ intSeedPt()

int l1ct::Tau::intSeedPt ( ) const
inline

Definition at line 60 of file taus.h.

References hwSeedPt, and l1ct::Scales::intPt().

60 { return Scales::intPt(hwSeedPt); }
int intPt(pt_t pt)
Definition: datatypes.h:155
pt_t hwSeedPt
Definition: taus.h:17

◆ intType()

int l1ct::Tau::intType ( ) const
inline

Definition at line 68 of file taus.h.

References hwType.

68 { return hwType.to_int(); }
type_t hwType
Definition: taus.h:20

◆ operator<()

bool l1ct::Tau::operator< ( const Tau other) const
inline

Definition at line 33 of file taus.h.

References hwPt, and trackingPlots::other.

33 { return hwPt < other.hwPt; }
pt_t hwPt
Definition: taus.h:14

◆ operator==()

bool l1ct::Tau::operator== ( const Tau other) const
inline

Definition at line 26 of file taus.h.

References hwCharge, hwEta, hwIdVsEle, hwIdVsMu, hwIsoOrMVA, hwPhi, hwPt, hwSeedPt, hwSeedZ0, hwType, and trackingPlots::other.

26  {
27  return hwPt == other.hwPt && hwEta == other.hwEta && hwPhi == other.hwPhi && hwSeedPt == other.hwSeedPt &&
28  hwSeedZ0 == other.hwSeedZ0 && hwCharge == other.hwCharge && hwType == other.hwType &&
29  hwIsoOrMVA == other.hwIsoOrMVA && hwIdVsMu == other.hwIdVsMu && hwIdVsEle == other.hwIdVsEle;
30  }
type_t hwType
Definition: taus.h:20
rawid_t hwIsoOrMVA
Definition: taus.h:24
bool hwCharge
Definition: taus.h:19
glbphi_t hwPhi
Definition: taus.h:16
lepid_t hwIdVsEle
Definition: taus.h:23
pt_t hwPt
Definition: taus.h:14
z0_t hwSeedZ0
Definition: taus.h:18
pt_t hwSeedPt
Definition: taus.h:17
glbeta_t hwEta
Definition: taus.h:15
lepid_t hwIdVsMu
Definition: taus.h:22

◆ operator>()

bool l1ct::Tau::operator> ( const Tau other) const
inline

Definition at line 32 of file taus.h.

References hwPt, and trackingPlots::other.

32 { return hwPt > other.hwPt; }
pt_t hwPt
Definition: taus.h:14

◆ pack()

ap_uint<BITWIDTH> l1ct::Tau::pack ( ) const
inline

Definition at line 74 of file taus.h.

References hwCharge, hwEta, hwIdVsEle, hwIdVsMu, hwIsoOrMVA, hwPhi, hwPt, hwRawId, hwSeedPt, hwSeedZ0, hwType, pack_bool_into_bits(), pack_into_bits(), and runTheMatrix::ret.

74  {
75  ap_uint<BITWIDTH> ret;
76  unsigned int start = 0;
88  return ret;
89  }
Definition: start.py:1
ret
prodAgent to be discontinued
type_t hwType
Definition: taus.h:20
rawid_t hwIsoOrMVA
Definition: taus.h:24
void pack_into_bits(U &u, unsigned int &start, const T &data)
Definition: bit_encoding.h:8
bool hwCharge
Definition: taus.h:19
glbphi_t hwPhi
Definition: taus.h:16
lepid_t hwIdVsEle
Definition: taus.h:23
pt_t hwPt
Definition: taus.h:14
z0_t hwSeedZ0
Definition: taus.h:18
pt_t hwSeedPt
Definition: taus.h:17
glbeta_t hwEta
Definition: taus.h:15
lepid_t hwIdVsMu
Definition: taus.h:22
rawid_t hwRawId
Definition: taus.h:21
void pack_bool_into_bits(U &u, unsigned int &start, bool data)
Definition: bit_encoding.h:22

◆ pdgId()

int l1ct::Tau::pdgId ( ) const
inline

Definition at line 67 of file taus.h.

References intCharge().

Referenced by Particle.Particle::__str__().

67 { return -15 * intCharge(); }
int intCharge() const
Definition: taus.h:66

◆ setAbsIso()

void l1ct::Tau::setAbsIso ( pt10_t  absIso)
inline

Definition at line 41 of file taus.h.

References objects.autophobj::absIso, and hwRawId.

41 { hwRawId(9, 0) = absIso(9, 0); }
rawid_t hwRawId
Definition: taus.h:21

◆ unpack()

static Tau l1ct::Tau::unpack ( const ap_uint< BITWIDTH > &  src)
inlinestatic

Definition at line 90 of file taus.h.

References runTheMatrix::ret, TrackRefitter_38T_cff::src, and unpack_from_bits().

90  {
91  Tau ret;
92  unsigned int start = 0;
93  unpack_from_bits(src, start, ret.hwPt);
94  unpack_from_bits(src, start, ret.hwEta);
95  unpack_from_bits(src, start, ret.hwPhi);
96  unpack_from_bits(src, start, ret.hwSeedPt);
97  unpack_from_bits(src, start, ret.hwSeedZ0);
98  unpack_from_bits(src, start, ret.hwType);
99  unpack_from_bits(src, start, ret.hwRawId);
100  unpack_from_bits(src, start, ret.hwIdVsMu);
101  unpack_from_bits(src, start, ret.hwIdVsEle);
102  unpack_from_bits(src, start, ret.hwIsoOrMVA);
103  return ret;
104  }
Definition: start.py:1
ret
prodAgent to be discontinued
Definition: Tau.py:1
void unpack_from_bits(const U &u, unsigned int &start, T &data)
Definition: bit_encoding.h:15

Member Data Documentation

◆ BITWIDTH

const int l1ct::Tau::BITWIDTH
static
Initial value:

Definition at line 72 of file taus.h.

◆ hwCharge

bool l1ct::Tau::hwCharge

Definition at line 19 of file taus.h.

Referenced by clear(), intCharge(), operator==(), and pack().

◆ hwEta

glbeta_t l1ct::Tau::hwEta

Definition at line 15 of file taus.h.

Referenced by clear(), floatEta(), intEta(), operator==(), and pack().

◆ hwIdVsEle

lepid_t l1ct::Tau::hwIdVsEle

Definition at line 23 of file taus.h.

Referenced by clear(), operator==(), and pack().

◆ hwIdVsMu

lepid_t l1ct::Tau::hwIdVsMu

Definition at line 22 of file taus.h.

Referenced by clear(), operator==(), and pack().

◆ hwIsoOrMVA

rawid_t l1ct::Tau::hwIsoOrMVA

Definition at line 24 of file taus.h.

Referenced by clear(), operator==(), and pack().

◆ hwPhi

glbphi_t l1ct::Tau::hwPhi

Definition at line 16 of file taus.h.

Referenced by clear(), floatPhi(), intPhi(), operator==(), and pack().

◆ hwPt

pt_t l1ct::Tau::hwPt

Definition at line 14 of file taus.h.

Referenced by clear(), floatPt(), intPt(), operator<(), operator==(), operator>(), and pack().

◆ hwRawId

rawid_t l1ct::Tau::hwRawId

Definition at line 21 of file taus.h.

Referenced by hwAbsIso(), pack(), and setAbsIso().

◆ hwSeedPt

pt_t l1ct::Tau::hwSeedPt

Definition at line 17 of file taus.h.

Referenced by clear(), floatSeedPt(), intSeedPt(), operator==(), and pack().

◆ hwSeedZ0

z0_t l1ct::Tau::hwSeedZ0

Definition at line 18 of file taus.h.

Referenced by clear(), floatSeedZ0(), operator==(), and pack().

◆ hwType

type_t l1ct::Tau::hwType

Definition at line 20 of file taus.h.

Referenced by clear(), intType(), operator==(), and pack().