ATLAS Offline Software
Loading...
Searching...
No Matches
WTATrigObj Class Reference

#include <WTAObject.h>

Inheritance diagram for WTATrigObj:
Collaboration diagram for WTATrigObj:

Public Member Functions

 WTATrigObj (IntOrFloat pt=0, IntOrFloat eta=0, IntOrFloat phi=0, IntOrFloat m=0, int idx=-99)
IntOrFloat pt () const
void pt (IntOrFloat pt)
IntOrFloat eta () const
void eta (IntOrFloat eta)
IntOrFloat phi () const
void phi (IntOrFloat phi)
IntOrFloat m () const
void m (IntOrFloat m)
int idx () const
void idx (int idx)
IntOrFloat d_phi_0_2PI (const WTATrigObj &o2)
IntOrFloat d_phi_MPI_PI (const WTATrigObj &o2)
IntOrFloat d_eta (const WTATrigObj &o2)
IntOrFloat dR2 (const WTATrigObj &o2)
bool IsAssocdR (WTATrigObj &tower, IntOrFloat dr2)
WTATrigObj operator+ (const WTATrigObj &obj)

Private Attributes

IntOrFloat m_pt
IntOrFloat m_eta
IntOrFloat m_phi
IntOrFloat m_m
int m_idx

Friends

bool operator< (const WTATrigObj &o1, const WTATrigObj &o2)
bool operator> (const WTATrigObj &o1, const WTATrigObj &o2)
bool operator<= (const WTATrigObj &o1, const WTATrigObj &o2)
bool operator>= (const WTATrigObj &o1, const WTATrigObj &o2)

Detailed Description

Definition at line 33 of file WTAObject.h.

Constructor & Destructor Documentation

◆ WTATrigObj()

WTATrigObj::WTATrigObj ( IntOrFloat pt = 0,
IntOrFloat eta = 0,
IntOrFloat phi = 0,
IntOrFloat m = 0,
int idx = -99 )
inline

Definition at line 35 of file WTAObject.h.

36 : m_pt(pt), m_eta(eta), m_phi(phi), m_m(m), m_idx(idx){}; // Constructor
IntOrFloat m_phi
Definition WTAObject.h:74
IntOrFloat m_pt
Definition WTAObject.h:72
IntOrFloat m_eta
Definition WTAObject.h:73
IntOrFloat m() const
Definition WTAObject.h:44
int idx() const
Definition WTAObject.h:46
IntOrFloat pt() const
Definition WTAObject.h:38
IntOrFloat eta() const
Definition WTAObject.h:40
IntOrFloat m_m
Definition WTAObject.h:75
IntOrFloat phi() const
Definition WTAObject.h:42

Member Function Documentation

◆ d_eta()

IntOrFloat WTATrigObj::d_eta ( const WTATrigObj & o2)
inline

Definition at line 51 of file WTAObject.h.

51{IntOrFloat tmp = m_eta - o2.eta(); return tmp;}

◆ d_phi_0_2PI()

IntOrFloat WTATrigObj::d_phi_0_2PI ( const WTATrigObj & o2)
inline

Definition at line 80 of file WTAObject.h.

81{
82 IntOrFloat tmp = m_phi - o2.phi();
83 while(tmp < 0)tmp += 2*PI;
84 while(tmp > 2*PI)tmp -= 2*PI;
85 return tmp;
86}
const float PI

◆ d_phi_MPI_PI()

IntOrFloat WTATrigObj::d_phi_MPI_PI ( const WTATrigObj & o2)
inline

Definition at line 87 of file WTAObject.h.

88{
89 IntOrFloat tmp = m_phi - o2.phi();
90 while(tmp < -PI)tmp += 2*PI;
91 while(tmp > PI)tmp -= 2*PI;
92 return tmp;
93}

◆ dR2()

IntOrFloat WTATrigObj::dR2 ( const WTATrigObj & o2)
inline

Definition at line 94 of file WTAObject.h.

95{
96 IntOrFloat d_phi = d_phi_MPI_PI(o2);
97 IntOrFloat d_eta_tmp = d_eta(o2);
98 IntOrFloat tmp = (d_phi * d_phi) + (d_eta_tmp * d_eta_tmp);
99 return tmp;
100}
IntOrFloat d_eta(const WTATrigObj &o2)
Definition WTAObject.h:51
IntOrFloat d_phi_MPI_PI(const WTATrigObj &o2)
Definition WTAObject.h:87

◆ eta() [1/2]

IntOrFloat WTATrigObj::eta ( ) const
inline

Definition at line 40 of file WTAObject.h.

40{return m_eta;};

◆ eta() [2/2]

void WTATrigObj::eta ( IntOrFloat eta)
inline

Definition at line 41 of file WTAObject.h.

41{m_eta = eta;};

◆ idx() [1/2]

int WTATrigObj::idx ( ) const
inline

Definition at line 46 of file WTAObject.h.

46{return m_idx;};

◆ idx() [2/2]

void WTATrigObj::idx ( int idx)
inline

Definition at line 47 of file WTAObject.h.

47{m_idx = idx;};

◆ IsAssocdR()

bool WTATrigObj::IsAssocdR ( WTATrigObj & tower,
IntOrFloat dr2 )
inline

Definition at line 102 of file WTAObject.h.

102 {
103 auto dR2 = this->dR2(tower);
104 return dR2 <= dr2;
105}
IntOrFloat dR2(const WTATrigObj &o2)
Definition WTAObject.h:94

◆ m() [1/2]

IntOrFloat WTATrigObj::m ( ) const
inline

Definition at line 44 of file WTAObject.h.

44{return m_m;};

◆ m() [2/2]

void WTATrigObj::m ( IntOrFloat m)
inline

Definition at line 45 of file WTAObject.h.

45{m_m = m;};

◆ operator+()

WTATrigObj WTATrigObj::operator+ ( const WTATrigObj & obj)
inline

Definition at line 62 of file WTAObject.h.

62 {
63 WTATrigObj new_obj;
64 new_obj.m_pt = this->pt() + obj.pt(); // Current default is the scalar sum, WTA
65 new_obj.m_eta = this->eta();
66 new_obj.m_phi = this->phi();
67 new_obj.m_m = this->m();
68 return new_obj;
69 };
WTATrigObj(IntOrFloat pt=0, IntOrFloat eta=0, IntOrFloat phi=0, IntOrFloat m=0, int idx=-99)
Definition WTAObject.h:35

◆ phi() [1/2]

IntOrFloat WTATrigObj::phi ( ) const
inline

Definition at line 42 of file WTAObject.h.

42{return m_phi;};

◆ phi() [2/2]

void WTATrigObj::phi ( IntOrFloat phi)
inline

Definition at line 43 of file WTAObject.h.

43{m_phi = phi;};

◆ pt() [1/2]

IntOrFloat WTATrigObj::pt ( ) const
inline

Definition at line 38 of file WTAObject.h.

38{return m_pt;};

◆ pt() [2/2]

void WTATrigObj::pt ( IntOrFloat pt)
inline

Definition at line 39 of file WTAObject.h.

39{m_pt = pt;};

◆ operator<

bool operator< ( const WTATrigObj & o1,
const WTATrigObj & o2 )
friend

Definition at line 56 of file WTAObject.h.

56{ return o1.pt() < o2.pt(); }; // Call .pt(), not directly access private m_pt

◆ operator<=

bool operator<= ( const WTATrigObj & o1,
const WTATrigObj & o2 )
friend

Definition at line 58 of file WTAObject.h.

58{ return o1.pt() <= o2.pt(); };

◆ operator>

bool operator> ( const WTATrigObj & o1,
const WTATrigObj & o2 )
friend

Definition at line 57 of file WTAObject.h.

57{ return o1.pt() > o2.pt(); };

◆ operator>=

bool operator>= ( const WTATrigObj & o1,
const WTATrigObj & o2 )
friend

Definition at line 59 of file WTAObject.h.

59{ return o1.pt() >= o2.pt(); };

Member Data Documentation

◆ m_eta

IntOrFloat WTATrigObj::m_eta
private

Definition at line 73 of file WTAObject.h.

◆ m_idx

int WTATrigObj::m_idx
private

Definition at line 76 of file WTAObject.h.

◆ m_m

IntOrFloat WTATrigObj::m_m
private

Definition at line 75 of file WTAObject.h.

◆ m_phi

IntOrFloat WTATrigObj::m_phi
private

Definition at line 74 of file WTAObject.h.

◆ m_pt

IntOrFloat WTATrigObj::m_pt
private

Definition at line 72 of file WTAObject.h.


The documentation for this class was generated from the following file: