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

#include <WTAObject.h>

Inheritance diagram for WTAJet:
Collaboration diagram for WTAJet:

Public Member Functions

 WTAJet (IntOrFloat pt=0, IntOrFloat eta=0, IntOrFloat phi=0, IntOrFloat m=0, int idx=-99, IntOrFloat jet_dr2=R2PAR)
const WTATrigObjGetSeed () const
void MergeConstituent (WTATrigObj &tower)
void MergeConstituent (WTATrigObj *tower)
void MergeWTAJet (WTAJet &targetjet)
void PopOutLastConstituent ()
const std::vector< WTATrigObj > & GetConstituentList () const
unsigned int GetConstituentCount () const
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

WTATrigObj m_Seed
std::vector< WTATrigObjm_ConstituentList
IntOrFloat m_Jet_dR2
IntOrFloat m_pt
IntOrFloat m_eta
IntOrFloat m_phi
IntOrFloat m_m
int m_idx

Detailed Description

Definition at line 107 of file WTAObject.h.

Constructor & Destructor Documentation

◆ WTAJet()

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

Definition at line 109 of file WTAObject.h.

109 :
110 WTATrigObj(pt, eta, phi, m, idx){
111 m_Seed = WTATrigObj(pt, eta, phi, m, idx);
112 m_Jet_dR2 = jet_dr2;
113 m_ConstituentList.clear();
114 m_ConstituentList.push_back(m_Seed);
115 };
WTATrigObj m_Seed
Definition WTAObject.h:126
IntOrFloat m_Jet_dR2
Definition WTAObject.h:128
std::vector< WTATrigObj > m_ConstituentList
Definition WTAObject.h:127
WTATrigObj(IntOrFloat pt=0, IntOrFloat eta=0, IntOrFloat phi=0, IntOrFloat m=0, int idx=-99)
Definition WTAObject.h:35
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 phi() const
Definition WTAObject.h:42

Member Function Documentation

◆ d_eta()

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

Definition at line 51 of file WTAObject.h.

51{IntOrFloat tmp = m_eta - o2.eta(); return tmp;}
IntOrFloat m_eta
Definition WTAObject.h:73

◆ d_phi_0_2PI()

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

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}
IntOrFloat m_phi
Definition WTAObject.h:74
const float PI

◆ d_phi_MPI_PI()

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

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

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
inlineinherited

Definition at line 40 of file WTAObject.h.

40{return m_eta;};

◆ eta() [2/2]

void WTATrigObj::eta ( IntOrFloat eta)
inlineinherited

Definition at line 41 of file WTAObject.h.

41{m_eta = eta;};

◆ GetConstituentCount()

unsigned int WTAJet::GetConstituentCount ( ) const
inline

Definition at line 123 of file WTAObject.h.

123{return m_ConstituentList.size();}; // Need to quickly access the jet's constituent number

◆ GetConstituentList()

const std::vector< WTATrigObj > & WTAJet::GetConstituentList ( ) const
inline

Definition at line 122 of file WTAObject.h.

122{return m_ConstituentList;};

◆ GetSeed()

const WTATrigObj & WTAJet::GetSeed ( ) const
inline

Definition at line 117 of file WTAObject.h.

117{return m_Seed;};

◆ idx() [1/2]

int WTATrigObj::idx ( ) const
inlineinherited

Definition at line 46 of file WTAObject.h.

46{return m_idx;};

◆ idx() [2/2]

void WTATrigObj::idx ( int idx)
inlineinherited

Definition at line 47 of file WTAObject.h.

47{m_idx = idx;};

◆ IsAssocdR()

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

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
inlineinherited

Definition at line 44 of file WTAObject.h.

44{return m_m;};
IntOrFloat m_m
Definition WTAObject.h:75

◆ m() [2/2]

void WTATrigObj::m ( IntOrFloat m)
inlineinherited

Definition at line 45 of file WTAObject.h.

45{m_m = m;};

◆ MergeConstituent() [1/2]

void WTAJet::MergeConstituent ( WTATrigObj & tower)
inline

Definition at line 131 of file WTAObject.h.

132{
133 this->pt(this->pt() + tower.pt());// Scalar sum, WTA
134 m_ConstituentList.push_back(tower);
135}

◆ MergeConstituent() [2/2]

void WTAJet::MergeConstituent ( WTATrigObj * tower)
inline

Definition at line 137 of file WTAObject.h.

138{
139 this->pt(this->pt() + tower->pt());// Scalar sum, WTA
140 m_ConstituentList.push_back(*tower);
141}

◆ MergeWTAJet()

void WTAJet::MergeWTAJet ( WTAJet & targetjet)
inline

Definition at line 143 of file WTAObject.h.

144{
145 WTATrigObj tmptower(targetjet.pt(), targetjet.eta(), targetjet.phi(), targetjet.m());
146 this->pt(this->pt() + tmptower.pt()); // Scalar sum, WTA
147 std::vector<WTATrigObj> tmp_const_list = targetjet.GetConstituentList();
148 m_ConstituentList.insert(m_ConstituentList.end(), tmp_const_list.begin(), tmp_const_list.end());
149}
const std::vector< WTATrigObj > & GetConstituentList() const
Definition WTAObject.h:122

◆ operator+()

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

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 };
IntOrFloat m_pt
Definition WTAObject.h:72

◆ phi() [1/2]

IntOrFloat WTATrigObj::phi ( ) const
inlineinherited

Definition at line 42 of file WTAObject.h.

42{return m_phi;};

◆ phi() [2/2]

void WTATrigObj::phi ( IntOrFloat phi)
inlineinherited

Definition at line 43 of file WTAObject.h.

43{m_phi = phi;};

◆ PopOutLastConstituent()

void WTAJet::PopOutLastConstituent ( )
inline

Definition at line 151 of file WTAObject.h.

152{
153 WTATrigObj lastconst = m_ConstituentList.back(); //std::vector::back() returns the last element
154 this->pt(this->pt() - lastconst.pt()); // Scalar subtraction, WTA
155 m_ConstituentList.pop_back(); // Popback the last element
156}

◆ pt() [1/2]

IntOrFloat WTATrigObj::pt ( ) const
inlineinherited

Definition at line 38 of file WTAObject.h.

38{return m_pt;};

◆ pt() [2/2]

void WTATrigObj::pt ( IntOrFloat pt)
inlineinherited

Definition at line 39 of file WTAObject.h.

39{m_pt = pt;};

Member Data Documentation

◆ m_ConstituentList

std::vector<WTATrigObj> WTAJet::m_ConstituentList
private

Definition at line 127 of file WTAObject.h.

◆ m_eta

IntOrFloat WTATrigObj::m_eta
privateinherited

Definition at line 73 of file WTAObject.h.

◆ m_idx

int WTATrigObj::m_idx
privateinherited

Definition at line 76 of file WTAObject.h.

◆ m_Jet_dR2

IntOrFloat WTAJet::m_Jet_dR2
private

Definition at line 128 of file WTAObject.h.

◆ m_m

IntOrFloat WTATrigObj::m_m
privateinherited

Definition at line 75 of file WTAObject.h.

◆ m_phi

IntOrFloat WTATrigObj::m_phi
privateinherited

Definition at line 74 of file WTAObject.h.

◆ m_pt

IntOrFloat WTATrigObj::m_pt
privateinherited

Definition at line 72 of file WTAObject.h.

◆ m_Seed

WTATrigObj WTAJet::m_Seed
private

Definition at line 126 of file WTAObject.h.


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