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

Support retrieval of jet constituents #68

Closed
graeme-a-stewart opened this issue Jul 16, 2024 · 3 comments · Fixed by #98
Closed

Support retrieval of jet constituents #68

graeme-a-stewart opened this issue Jul 16, 2024 · 3 comments · Fixed by #98
Labels
enhancement New feature or request

Comments

@graeme-a-stewart
Copy link
Member

For substructure studies, it's necessary to go from a final jet back to its constituent clusters.

For this, we need to (internally) map from the jet's index, through the history vector, to find all of the original cluster particle indexes.

Then we should return these particles to the user.

One question is, however, how the user will find their selected "final" jets, and retain enough information to find the mapping into the cluster sequence to perform this operation. The history index of the jet index are essentially internal bookkeeping objects that shouldn't really be exposed.

@graeme-a-stewart graeme-a-stewart added the enhancement New feature or request label Jul 16, 2024
@graeme-a-stewart
Copy link
Member Author

Note on how FastJet does this - it works with Pseudo jet objects that keep a link to _cluster_hist_index, which is then their entry point.

Note that our current functions to retrieve exclusive_jets and inclusive_jets return LorentzVectorCyl, so more information is required in this case.

@graeme-a-stewart
Copy link
Member Author

graeme-a-stewart commented Jul 17, 2024

I thought about a few things here:

  1. Change the return type of the selectors to (Vector{LorentzVectorCyl}, Vector{Int}), where the second part of the tuple returns the jet index

    • Downsides are that it changes a public API interface and managing the correspondence between the two pieces is involves rather clunky index aligning
  2. Change the return type of the selectors to Dict(Int, LorentzVectorCyl)

    • This is better as the mapping is taken care of by key=>value. However, although the previous return type can be recovered by, e.g., values(exclusive_jets(...)) it still changes the API and to a non-trivial type
  3. Make the return type a parameter of the function, changing the signature to, e.g.,
    inclusive_jets(clusterseq::ClusterSequence; ptmin = 0.0, T=LorentzVectorCyl)

    • This would allow specification of T=PseudoJet that would return objects that we can then get the constituents of; it doesn't change the default return type, so the API is preserved for current code

Clearly I am keener on 3 than the others, so I would implement this on a branch and let people test it out (or come up with better ideas!).

@graeme-a-stewart
Copy link
Member Author

I also was thinking that perhaps users don't need jets to be (re)created for the constituents, but they want to know the indexes of the original clusters that went into the jets. They can then index into their original particle collection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant