Skip to content

Commit

Permalink
allow GenKt in exclusive_jets
Browse files Browse the repository at this point in the history
  • Loading branch information
m-fila committed Feb 3, 2025
1 parent a904f6c commit 378f520
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/ClusterSequence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,10 @@ function exclusive_jets(clusterseq::ClusterSequence{U}; dcut = nothing, njets =
end

# Check that an algorithm was used that makes sense for exclusive jets
if !(clusterseq.algorithm
(JetAlgorithm.CA, JetAlgorithm.Kt, JetAlgorithm.EEKt, JetAlgorithm.Durham))
if clusterseq.algorithm == JetAlgorithm.GenKt && clusterseq.power < 0
throw(ArgumentError("Algorithm GenKt requires power >= 0 (power=$(clusterseq.power))"))

Check warning on line 325 in src/ClusterSequence.jl

View check run for this annotation

Codecov / codecov/patch

src/ClusterSequence.jl#L325

Added line #L325 was not covered by tests
elseif clusterseq.algorithm
(JetAlgorithm.CA, JetAlgorithm.Kt, JetAlgorithm.EEKt, JetAlgorithm.Durham)
throw(ArgumentError("Algorithm used is not suitable for exclusive jets ($(clusterseq.algorithm))"))
end

Expand Down Expand Up @@ -378,8 +380,10 @@ n_exclusive_jets(clusterseq, dcut = 20.0)
"""
function n_exclusive_jets(clusterseq::ClusterSequence; dcut::AbstractFloat)
# Check that an algorithm was used that makes sense for exclusive jets
if !(clusterseq.algorithm
(JetAlgorithm.CA, JetAlgorithm.Kt, JetAlgorithm.EEKt, JetAlgorithm.Durham))
if clusterseq.algorithm == JetAlgorithm.GenKt && clusterseq.power < 0
throw(ArgumentError("Algorithm GenKt requires power >= 0 (power=$(clusterseq.power))"))

Check warning on line 384 in src/ClusterSequence.jl

View check run for this annotation

Codecov / codecov/patch

src/ClusterSequence.jl#L384

Added line #L384 was not covered by tests
elseif clusterseq.algorithm
(JetAlgorithm.CA, JetAlgorithm.Kt, JetAlgorithm.EEKt, JetAlgorithm.Durham)
throw(ArgumentError("Algorithm used is not suitable for exclusive jets ($(clusterseq.algorithm))"))
end

Expand Down

0 comments on commit 378f520

Please sign in to comment.