You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make jet structs immutable and improve jet struct methods (#146)
This PR makes the jet structures used in the package immutable. This is relatively straight forward, but some care is required with the _cluster_hist_index, which is the link from the jet to the correct point in the reconstruction history. This now has to be set correctly at the time of object construction. This is addressed in a few places:
For constructing an initial vector of jets, it's necessary to pre-set the cluster history to 1...N, so the initial jets are correctly lined up
This is done in the reconstruction entry points automatically if conversion to the internal EDM is happening
When reading from HepMC3 files to a FourMomentum struct, this is done
During the reconstruction it is easy to calculate the correct point in the history. This requires the recombine function to be restructured to have the signature addjets(jet1, jet2; cluster_hist_index=index), which is not the same a simple +. However, it's not terrible and this is added to the documentation. Support is added for known schemes, currently massless Pt and Pt^2.
The bells-and-whistles reconstruction example, instrumented-jetreco.jl, can now take an --recombine option to use non-standard recombination.
Note that all of the jet struct constructors have been reworked to provide a more consistent interface and cluster_hist_index is always a named parameter. This PR also restructures the accessor/auxiliary methods for all the jet types, making these as generic as possible. To this end a new source file is added, CommonJetStructs.jl that factorises all of the generic type definitions and methods. Constructing jet types from LorentzVectors and LorentzVectorHEPs is made more consistent.
Core reconstruction times are slightly improved with these static structs, especially on x86_64.
For substructure functions, it was necessary to redo the recluster() method, to make copies of the relevant jets, with updated cluster indexes for the reclustering. This is actually a bug fix as the old way was updating the cluster indexes for the reclustering, which would break the reconstruction history for the original reconstruction.
Docstrings were improved - adding missing ones and simplifying a bit others.
-`JetAlgorithm.Durham` the $e^+e-$ $k_\text{T}$ algorithm, also known as the Durham algorithm
43
43
-`JetAlgorithm.EEKt` the $e^+e-$ generalised $k_\text{T}$ algorithm
44
44
-`R` - the cone size parameter; no particles more geometrically distance than `R` will be merged (default 1.0; note this parameter is ignored for the Durham algorithm)
45
-
-`recombine` - the function used to merge two pseudojets (default is a simple 4-vector addition of $`(E, \mathbf{p})`$)
46
45
-`strategy` - the algorithm strategy to adopt, as described below (default `RecoStrategy.Best`)
47
46
48
47
The object returned is a `ClusterSequence`, which internally tracks all merge steps.
@@ -90,7 +89,7 @@ Another option, if one wishes to use a specific strategy, is to call that strate
90
89
91
90
```julia
92
91
# For N2Plain strategy called directly
93
-
plain_jet_reconstruct(particles::AbstractVector{T}; algorithm = JetAlgorithm.AntiKt, R =1.0, recombine =+)
92
+
plain_jet_reconstruct(particles::AbstractVector{T}; algorithm = JetAlgorithm.AntiKt, R =1.0)
94
93
```
95
94
96
95
Note that there is no `strategy` option in these interfaces.
0 commit comments