@@ -20,7 +20,6 @@ caching of the more expensive calculations for rapidity and azimuthal angle.
2020- `E::Float64`: The energy component of the momentum.
2121- `_cluster_hist_index::Int`: The index of the cluster history.
2222- `_pt2::Float64`: The squared transverse momentum.
23- - `_inv_pt2::Float64`: The inverse squared transverse momentum.
2423- `_rap::Float64`: The rapidity.
2524- `_phi::Float64`: The azimuthal angle.
2625
@@ -32,7 +31,6 @@ struct PseudoJet <: FourMomentum
3231 E:: Float64
3332 _cluster_hist_index:: Int
3433 _pt2:: Float64
35- _inv_pt2:: Float64
3634 _rap:: Float64
3735 _phi:: Float64
3836end
@@ -50,7 +48,6 @@ used in a reconstruction sequence.
5048"""
5149function PseudoJet(px:: Real , py:: Real , pz:: Real , E:: Real ; cluster_hist_index:: Int = 0 )
5250 @muladd pt2 = px * px + py * py
53- inv_pt2 = @fastmath 1.0 / pt2
5451 phi = pt2 == 0.0 ? 0.0 : atan(py, px)
5552 phi = phi < 0.0 ? phi + 2 π : phi
5653 if E == abs(pz) && iszero(pt2)
@@ -70,7 +67,7 @@ function PseudoJet(px::Real, py::Real, pz::Real, E::Real; cluster_hist_index::In
7067 rap = 0.5 * log((pt2 + effective_m2) / (E_plus_pz * E_plus_pz))
7168 rap = pz > 0.0 ? - rap : rap
7269 end
73- PseudoJet(px, py, pz, E, cluster_hist_index, pt2, inv_pt2, rap, phi)
70+ PseudoJet(px, py, pz, E, cluster_hist_index, pt2, rap, phi)
7471end
7572
7673"""
@@ -103,7 +100,7 @@ function PseudoJet(; pt::Real, rap::Real, phi::Real, m::Real = 0,
103100 pz = @fastmath (pplus - pminus) / 2
104101 E = @fastmath (pplus + pminus) / 2
105102
106- PseudoJet(px, py, pz, E, cluster_hist_index, pt * pt, 1 / (pt * pt) , rap, phi)
103+ PseudoJet(px, py, pz, E, cluster_hist_index, pt^ 2 , rap, phi)
107104end
108105
109106"""
0 commit comments