Skip to content

Commit a8a9ad4

Browse files
Fix type comparison in algorithm entry point
Had used wrong comparison - 'isa' instead of '<:'!
1 parent e5137ce commit a8a9ad4

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/EEAlgorithm.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ function ee_genkt_algorithm(particles::AbstractArray{T, 1}; p = 1, R = 4.0,
236236
R = 4.0
237237
end
238238

239-
if T == EEjet
239+
if T <: EEjet
240240
# recombination_particles will become part of the cluster sequence, so size it for
241241
# the starting particles and all N recombinations
242242
recombination_particles = copy(particles)

src/PlainAlgo.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

src/TiledAlgoLL.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ function tiled_jet_reconstruct(particles::AbstractArray{T, 1}; p::Union{Real, No
374374
(p, algorithm) = get_algorithm_power_consistency(p = p, algorithm = algorithm)
375375

376376
# If we have PseudoJets, we can just call the main algorithm...
377-
if T isa PseudoJet
377+
if T <: PseudoJet
378378
# recombination_particles will become part of the cluster sequence, so size it for
379379
# the starting particles and all N recombinations
380380
recombination_particles = copy(particles)

0 commit comments

Comments
 (0)