ATLAS Offline Software
Public Member Functions | Private Attributes | Friends | List of all members
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)
 
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)
 
IntOrFloat d_phi_0_2PI (WTATrigObj o2)
 
IntOrFloat d_phi_MPI_PI (WTATrigObj o2)
 
IntOrFloat d_eta (WTATrigObj o2)
 
IntOrFloat dR2 (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
 

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 
)
inline

Definition at line 35 of file WTAObject.h.

36  : m_pt(pt), m_eta(eta), m_phi(phi), m_m(m){}; // Constructor

Member Function Documentation

◆ d_eta()

IntOrFloat WTATrigObj::d_eta ( WTATrigObj  o2)
inline

Definition at line 49 of file WTAObject.h.

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

◆ d_phi_0_2PI()

IntOrFloat WTATrigObj::d_phi_0_2PI ( WTATrigObj  o2)
inline

Definition at line 77 of file WTAObject.h.

78 {
79  IntOrFloat tmp = m_phi - o2.phi();
80  while(tmp < 0)tmp += 2*PI;
81  while(tmp > 2*PI)tmp -= 2*PI;
82  return tmp;
83 }

◆ d_phi_MPI_PI()

IntOrFloat WTATrigObj::d_phi_MPI_PI ( WTATrigObj  o2)
inline

Definition at line 84 of file WTAObject.h.

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

◆ dR2()

IntOrFloat WTATrigObj::dR2 ( WTATrigObj  o2)
inline

Definition at line 91 of file WTAObject.h.

92 {
93  IntOrFloat d_phi = d_phi_MPI_PI(o2);
94  IntOrFloat d_eta_tmp = d_eta(o2);
95  IntOrFloat tmp = (d_phi * d_phi) + (d_eta_tmp * d_eta_tmp);
96  return tmp;
97 }

◆ 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;};

◆ IsAssocdR()

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

Definition at line 99 of file WTAObject.h.

99  {
100  auto dR2 = this->dR2(tower);
101  return dR2 <= dr2;
102 }

◆ 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 60 of file WTAObject.h.

60  {
61  WTATrigObj new_obj;
62  new_obj.m_pt = this->pt() + obj.pt(); // Current default is the scalar sum, WTA
63  new_obj.m_eta = this->eta();
64  new_obj.m_phi = this->phi();
65  new_obj.m_m = this->m();
66  return new_obj;
67  };

◆ 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;};

Friends And Related Function Documentation

◆ operator<

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

Definition at line 54 of file WTAObject.h.

54 { 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 56 of file WTAObject.h.

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

◆ operator>

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

Definition at line 55 of file WTAObject.h.

55 { 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(); };

Member Data Documentation

◆ m_eta

IntOrFloat WTATrigObj::m_eta
private

Definition at line 71 of file WTAObject.h.

◆ m_m

IntOrFloat WTATrigObj::m_m
private

Definition at line 73 of file WTAObject.h.

◆ m_phi

IntOrFloat WTATrigObj::m_phi
private

Definition at line 72 of file WTAObject.h.

◆ m_pt

IntOrFloat WTATrigObj::m_pt
private

Definition at line 70 of file WTAObject.h.


The documentation for this class was generated from the following file:
WTATrigObj::phi
IntOrFloat phi() const
Definition: WTAObject.h:42
WTATrigObj::m_phi
IntOrFloat m_phi
Definition: WTAObject.h:72
WTATrigObj::m_m
IntOrFloat m_m
Definition: WTAObject.h:73
PI
const float PI
Definition: test_isolaitonTool.cxx:61
WTATrigObj::pt
IntOrFloat pt() const
Definition: WTAObject.h:38
WTATrigObj::m_pt
IntOrFloat m_pt
Definition: WTAObject.h:67
WTATrigObj::m
IntOrFloat m() const
Definition: WTAObject.h:44
WTATrigObj::d_eta
IntOrFloat d_eta(WTATrigObj o2)
Definition: WTAObject.h:49
WTATrigObj::dR2
IntOrFloat dR2(WTATrigObj o2)
Definition: WTAObject.h:91
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
WTATrigObj
Definition: WTAObject.h:33
python.changerun.o2
o2
Definition: changerun.py:43
WTATrigObj::eta
IntOrFloat eta() const
Definition: WTAObject.h:40
WTATrigObj::m_eta
IntOrFloat m_eta
Definition: WTAObject.h:71
WTATrigObj::d_phi_MPI_PI
IntOrFloat d_phi_MPI_PI(WTATrigObj o2)
Definition: WTAObject.h:84
python.changerun.o1
o1
Definition: changerun.py:42