Skip to content

Commit 3f3d7c1

Browse files
committed
Initial VLC implementation
1 parent eb63e6c commit 3f3d7c1

12 files changed

+575
-45
lines changed

docs/src/examples.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ julia --project jetreco.jl --algorithm=AntiKt ../test/data/events.pp13TeV.hepmc3
2626
...
2727
julia --project jetreco.jl --algorithm=Durham ../test/data/events.eeH.hepmc3.zst
2828
...
29+
julia --project jetreco.jl --algorithm=Valencia --p=1.2 --gamma=0.8 ../test/data/events.eeH.hepmc3.zst
30+
...
2931
julia --project jetreco.jl --maxevents=10 --strategy=N2Plain --algorithm=Kt --exclusive-njets=3 ../test/data/events.pp13TeV.hepmc3.zst
3032
...
3133
```

docs/src/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Each known algorithm is referenced using a `JetAlgorithm` scoped enum value.
5656
| generalised ``k_\text{T}`` | `JetAlgorithm.GenKt` | For $pp$, value of `p` must also be specified |
5757
| ``e^+e-`` ``k_\text{T}`` / Durham | `JetAlgorithm.Durham` | `R` value ignored and can be omitted |
5858
| generalised ``e^+e-`` ``k_\text{T}`` | `JetAlgorithm.EEKt` | For ``e^+e^-``, value of `p` must also be specified |
59+
| Valencia | `JetAlgorithm.Valencia` | For ``e^+e^-``, values of `p` (β) and `γ` must be specified |
5960

6061
### Strategy
6162

src/AlgorithmStrategyEnums.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ Scoped enumeration (using EnumX) representing different jet algorithms used in t
2626
- `GenKt`: The Generalised Kt algorithm (with arbitrary power).
2727
- `EEKt`: The Generalised e+e- kt algorithm.
2828
- `Durham`: The e+e- kt algorithm, aka Durham.
29+
- `Valencia`: The Valencia e+e- algorithm.
2930
"""
30-
@enumx T=Algorithm JetAlgorithm AntiKt CA Kt GenKt EEKt Durham
31+
@enumx T=Algorithm JetAlgorithm AntiKt CA Kt GenKt EEKt Durham Valencia
3132
const AllJetRecoAlgorithms = [String(Symbol(x)) for x in instances(JetAlgorithm.Algorithm)]
3233

3334
"""
@@ -36,7 +37,7 @@ const AllJetRecoAlgorithms = [String(Symbol(x)) for x in instances(JetAlgorithm.
3637
A constant array that contains the jet algorithms for which power is variable.
3738
3839
"""
39-
const varpower_algorithms = [JetAlgorithm.GenKt, JetAlgorithm.EEKt]
40+
const varpower_algorithms = [JetAlgorithm.GenKt, JetAlgorithm.EEKt, JetAlgorithm.Valencia]
4041

4142
"""
4243
algorithm2power
@@ -46,7 +47,8 @@ A dictionary that maps algorithm names to their corresponding power values.
4647
const algorithm2power = Dict(JetAlgorithm.AntiKt => -1,
4748
JetAlgorithm.CA => 0,
4849
JetAlgorithm.Kt => 1,
49-
JetAlgorithm.Durham => 1)
50+
JetAlgorithm.Durham => 1,
51+
JetAlgorithm.Valencia => 1)
5052

5153
"""
5254
get_algorithm_power(; algorithm::JetAlgorithm.Algorithm, p::Union{Real, Nothing}) -> Real
@@ -109,7 +111,7 @@ Check if the algorithm is a e+e- reconstruction algorithm.
109111
`true` if the algorithm is a e+e- reconstruction algorithm, `false` otherwise.
110112
"""
111113
function is_ee(algorithm::JetAlgorithm.Algorithm)
112-
return algorithm in [JetAlgorithm.EEKt, JetAlgorithm.Durham]
114+
return algorithm in (JetAlgorithm.EEKt, JetAlgorithm.Durham, JetAlgorithm.Valencia)
113115
end
114116

115117
"""

src/ClusterSequence.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ function exclusive_jets(clusterseq::ClusterSequence{U},
329329
throw(ArgumentError("Algorithm $(clusterseq.algorithm) requires power >= 0 for exclusive jets (power=$(clusterseq.power))"))
330330
elseif clusterseq.algorithm
331331
(JetAlgorithm.CA, JetAlgorithm.Kt, JetAlgorithm.Durham, JetAlgorithm.GenKt,
332-
JetAlgorithm.EEKt)
332+
JetAlgorithm.EEKt, JetAlgorithm.Valencia)
333333
throw(ArgumentError("Algorithm used is not suitable for exclusive jets ($(clusterseq.algorithm))"))
334334
end
335335

@@ -390,7 +390,7 @@ function n_exclusive_jets(clusterseq::ClusterSequence; dcut::AbstractFloat)
390390
throw(ArgumentError("Algorithm $(clusterseq.algorithm) requires power >= 0 for exclusive jets(power=$(clusterseq.power))"))
391391
elseif clusterseq.algorithm
392392
(JetAlgorithm.CA, JetAlgorithm.Kt, JetAlgorithm.Durham, JetAlgorithm.GenKt,
393-
JetAlgorithm.EEKt)
393+
JetAlgorithm.EEKt, JetAlgorithm.Valencia)
394394
throw(ArgumentError("Algorithm used is not suitable for exclusive jets ($(clusterseq.algorithm))"))
395395
end
396396

0 commit comments

Comments
 (0)