7#ifdef BITWISE_SIMULATION
9typedef long long int IntOrFloat;
10const IntOrFloat
PI = 32;
11const IntOrFloat R2PAR = 16;
12#elif defined(FLOATING_POINT_SIMULATION)
15typedef float IntOrFloat;
16const IntOrFloat
PI = 3.14159265;
17const IntOrFloat R2PAR = 0.16;
19#error "Simulation type not defined. Define either BITWISE_SIMULATION or FLOATING_POINT_SIMULATION."
26 [](
const T &
a,
const T &b)
28 return a.pt() > b.pt();
38 IntOrFloat
pt()
const {
return m_pt;};
44 IntOrFloat
m()
const {
return m_m;};
64 new_obj.
m_pt = this->
pt() + obj.
pt();
67 new_obj.
m_m = this->
m();
82 IntOrFloat tmp =
m_phi - o2.phi();
83 while(tmp < 0)tmp += 2*
PI;
84 while(tmp > 2*
PI)tmp -= 2*
PI;
89 IntOrFloat tmp =
m_phi - o2.phi();
90 while(tmp < -
PI)tmp += 2*
PI;
91 while(tmp >
PI)tmp -= 2*
PI;
97 IntOrFloat d_eta_tmp =
d_eta(o2);
98 IntOrFloat tmp = (d_phi * d_phi) + (d_eta_tmp * d_eta_tmp);
103 auto dR2 = this->
dR2(tower);
109 WTAJet (IntOrFloat
pt = 0, IntOrFloat
eta = 0, IntOrFloat
phi = 0, IntOrFloat
m = 0,
int idx = -99, IntOrFloat jet_dr2 = R2PAR) :
133 this->
pt(this->
pt() + tower.
pt());
139 this->
pt(this->
pt() + tower->
pt());
146 this->
pt(this->
pt() + tmptower.
pt());
154 this->
pt(this->
pt() - lastconst.
pt());
static void SortByPt(std::vector< T > &list)
void MergeWTAJet(WTAJet &targetjet)
void PopOutLastConstituent()
const std::vector< WTATrigObj > & GetConstituentList() const
WTAJet(IntOrFloat pt=0, IntOrFloat eta=0, IntOrFloat phi=0, IntOrFloat m=0, int idx=-99, IntOrFloat jet_dr2=R2PAR)
const WTATrigObj & GetSeed() const
std::vector< WTATrigObj > m_ConstituentList
unsigned int GetConstituentCount() const
void MergeConstituent(WTATrigObj &tower)
friend bool operator<(const WTATrigObj &o1, const WTATrigObj &o2)
WTATrigObj(IntOrFloat pt=0, IntOrFloat eta=0, IntOrFloat phi=0, IntOrFloat m=0, int idx=-99)
friend bool operator<=(const WTATrigObj &o1, const WTATrigObj &o2)
IntOrFloat d_phi_0_2PI(const WTATrigObj &o2)
IntOrFloat dR2(const WTATrigObj &o2)
WTATrigObj operator+(const WTATrigObj &obj)
bool IsAssocdR(WTATrigObj &tower, IntOrFloat dr2)
IntOrFloat d_eta(const WTATrigObj &o2)
friend bool operator>=(const WTATrigObj &o1, const WTATrigObj &o2)
friend bool operator>(const WTATrigObj &o1, const WTATrigObj &o2)
IntOrFloat d_phi_MPI_PI(const WTATrigObj &o2)
void stable_sort(DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > end)
Specialization of stable_sort for DataVector/List.