Skip to content

Commit 59488c3

Browse files
Document requirements for input jets' history indices (#174)
* fix typos * add note about input history indices * update notice to mention manualy created jets * fix note Co-authored-by: Graeme A Stewart <[email protected]> * add message to history index assert --------- Co-authored-by: Graeme A Stewart <[email protected]>
1 parent e84a32a commit 59488c3

File tree

5 files changed

+12
-7
lines changed

5 files changed

+12
-7
lines changed

src/ClusterSequence.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function initial_history(particles)
9292

9393
# get cross-referencing right from the Jets
9494
# particles[i]._cluster_hist_index = i
95-
@assert cluster_hist_index(particles[i]) == i
95+
@assert cluster_hist_index(particles[i])==i "Cluster history index should match jet's index in the input vector"
9696

9797
# determine the total energy in the event
9898
Qtot += particles[i].E

src/EEJet.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ end
5151
"""
5252
EEJet(jet::Any; cluster_hist_index::Int = 0)
5353
54-
Construct a PseudoJet from a generic object `jet` with the given cluster index.
54+
Construct a EEJet from a generic object `jet` with the given cluster index.
5555
This functions also for `LorentzVectorCyl` objects.
5656
5757
# Details

src/GenericAlgo.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,14 @@ history.
3636
## `particles` argument
3737
Any type that supplies the methods `pt2()`, `phi()`, `rapidity()`, `px()`,
3838
`py()`, `pz()`, `energy()` (in the `JetReconstruction` namespace) can be used.
39-
This includes `LorentzVector`, `LorentzVectorCyl`, and `PseudoJet`, for which
40-
these methods are already predefined in the `JetReconstruction` namespace.
39+
This includes `LorentzVector`, `LorentzVectorCyl`, `PseudoJet` and `EEJet`,
40+
for which these methods are already predefined in the `JetReconstruction` namespace.
4141
42+
**Note** when using `PseudoJet` or `EEJet`, the history indices (`_cluster_hist_index`)
43+
must be set correctly. For initial jets, this means assigning to each jet its index
44+
in the vector if you construct them manually. When using other jet types correct
45+
indices are set automatically internally.
46+
4247
## `recombine` argument
4348
The `recombine` argument is the function used to merge pairs of particles. The
4449
default is `addjets`, which uses 4-momenta addition (a.k.a. the E-scheme).

src/PlainAlgo.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ end
2727
Compute the dij value for a given index `i` to its nearest neighbor. The nearest
2828
neighbor is determined from `nn[i]`, and the metric distance to the nearest
2929
neighbor is given by the distance `nndist[i]` applying the lower of the
30-
`kt2_array` values for the two particles.ßß
30+
`kt2_array` values for the two particles.
3131
3232
# Arguments
3333
- `i`: The index of the element.
@@ -198,7 +198,7 @@ Perform pp jet reconstruction using the plain algorithm.
198198
- `particles::AbstractVector{T}`: A vector of particles used for jet
199199
reconstruction, any array of particles, which supports suitable 4-vector
200200
methods, viz. pt2(), phi(), rapidity(), px(), py(), pz(), energy(), can be
201-
used. for each element.
201+
used for each element.
202202
- `algorithm::JetAlgorithm.Algorithm`: The jet algorithm to use.
203203
- `p::Union{Real, Nothing} = nothing`: The power value used for jet reconstruction.
204204
Must be specified for GenKt algorithm. Other algorithms will ignore this value.

src/TiledAlgoLL.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ If both are given they must be consistent or an exception is thrown.
302302
## Arguments
303303
- `particles::AbstractVector{T}`: A vector of particles used as input for jet
304304
reconstruction. T must support methods px, py, pz and energy (defined in the
305-
JetReconstruction namespace)
305+
JetReconstruction namespace).
306306
- `algorithm::JetAlgorithm.Algorithm`: The jet algorithm to use.
307307
- `p::Union{Real, Nothing} = nothing`: The power value used for jet reconstruction.
308308
Must be specified for GenKt algorithm. Other algorithms will ignore this value.

0 commit comments

Comments
 (0)