@@ -230,7 +230,7 @@ function plain_jet_reconstruct(particles::AbstractArray{T, 1}; p::Union{Real, No
230230 # Integer p if possible
231231 p = (round (p) == p) ? Int (p) : p
232232
233- if T isa PseudoJet
233+ if T <: PseudoJet
234234 # recombination_particles will become part of the cluster sequence, so size it for
235235 # the starting particles and all N recombinations
236236 recombination_particles = copy (particles)
@@ -243,7 +243,7 @@ function plain_jet_reconstruct(particles::AbstractArray{T, 1}; p::Union{Real, No
243243 sizehint! (recombination_particles, length (particles) * 2 )
244244 for i in eachindex (particles)
245245 push! (recombination_particles,
246- PseudoJet (px (particles[i]), py (particles[i]), pz (particles[i]),
246+ PseudoJet {ParticleType} (px (particles[i]), py (particles[i]), pz (particles[i]),
247247 energy (particles[i])))
248248 end
249249 end
@@ -255,12 +255,12 @@ function plain_jet_reconstruct(particles::AbstractArray{T, 1}; p::Union{Real, No
255255end
256256
257257"""
258- _plain_jet_reconstruct(; particles::Vector{PseudoJet}, p = -1, R = 1.0, recombine = +)
258+ _plain_jet_reconstruct(; particles::Vector{PseudoJet{T} }, p = -1, R = 1.0, recombine = +)
259259
260260This is the internal implementation of jet reconstruction using the plain
261261algorithm. It takes a vector of `particles` representing the input particles and
262262reconstructs jets based on the specified parameters. Here the particles must be
263- of type `PseudoJet`.
263+ of type `PseudoJet{T} `.
264264
265265Users of the package should use the `plain_jet_reconstruct` function as their
266266entry point to this jet reconstruction.
0 commit comments