Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster sequence return type #38

Merged
merged 12 commits into from
Apr 19, 2024
Merged

Cluster sequence return type #38

merged 12 commits into from
Apr 19, 2024

Conversation

graeme-a-stewart
Copy link
Member

This PR makes the return type of all algorithms the FastJet-ish ClusterSequence which encapsulates all of the intermediate reconstruction steps and the record of cluster merges (parents, children, $d_{ij}$ values, etc.).

This unifies the N2Tiled and N2Plain return values,

Closes #29
Closes #36

The tiling parameter has been factorised out of the ClusterSequence as this is an internal parameter for N2Tiled.

Closes #37

For the N2Plain algorithm, we now exclusively use PseudoJet as the cluster structure type - conversions are made from in the public plain_jet_reconstruct function to PseudoJet before calling the internal implementation function _plain_jet_reconstruct.

The PseudoJet vector, of all clusters, is now held inside the cluster sequence, and an extra vector is used which maps the compact index (used for heavy calculations) to the relevant index of the cluster sequence jets.

Note that @debug code needs to be completely commented out as even having it in the algorithm causes noticeable performance degradations (see JuliaLang/julia#28147, even though with mitigations the performance still drops by a noticeable amount).

To help with performance testing, the --profile option now takes an argument, which controls where the profiling output is written - this allows different versions of the code to be looked at side-by-side.

The tiling parameters are internal to the TiledAlgoLL
strategy, so they should not by part of the ClusterSequence object.

Factorise them out and pass the tiling explicitly to the functions
that need it in the TiledAlgoLL reconstruction.
Now the calling functions need to call the inclusive_jets()
function with their pt cut

Adapt the example reco and the testcases to cope with this

(N2Plain still is TODO)
This is to be used by multiple algorithms now
We need to return the same object from all algorithms,
which is the ClusterSequence.
This allows us to implement post-facto filtering, pruning,
cleaning, etc. steps after
the initial reconstruction is done.

Explicitly convert to use PseudoJet internally, as the ClusterSequence stores these objects.
Internal algorithm is now renamed with _ as it should not be used by users.
Maintain compact arrays for the reconstruction process, but not for the jets themselves -
these are stored into the ClusterSequence linearly, keeping an
index pointer (clusterseq_index) to the correct position from the compact array.

History of recombination is filled appropriately for both
cluster-cluster merges and for
beam (final) merge steps.
This is now working properly, with a ClusterSequence
being the common return type
Make the --profile option take an argument, which is the
sub-directory where the output will be stored, which
allows different profiles to be more easily compared
These cause a real slowdown in the runtime (~20% degradation)
even when DEBUG isn't enabled

There are quite a few complaints about this in the forums, e.g.,
JuliaLang/julia#28147. It does seem to have improved, but for code like this it's still a
serious regression
Use the @__DIR__ macro and the joinpath() function
Automate the unpacking of LZMA compressed data files
for tests (this needs "xzcat" to be present on the system).

Ensure files are closed on reading events.
@graeme-a-stewart graeme-a-stewart merged commit 8526406 into main Apr 19, 2024
4 checks passed
@graeme-a-stewart graeme-a-stewart deleted the cluster-sequence branch May 9, 2024 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant