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

Work out how we can read the XYZVectorFs as XYZVectorFs in uproot #157

Closed
AndrewEdmonds11 opened this issue Jun 17, 2024 · 3 comments
Closed
Assignees
Labels
help wanted Extra attention is needed PyUtil This is related to PyUtils

Comments

@AndrewEdmonds11
Copy link
Collaborator

At the moment, reading any XYZVectorF in uproot gives the three components (fCoordinates.fX etc.) and so we have to calculate the magnitude of the vector ourselves. It would be nice if we could read these leaves as XYZVectorFs so that we can take advantage of its member functions.

In principle this should be possible (uproot does support ROOT classes) so it just needs someone to look into

@AndrewEdmonds11 AndrewEdmonds11 converted this from a draft issue Jun 17, 2024
@AndrewEdmonds11 AndrewEdmonds11 added help wanted Extra attention is needed PyUtil This is related to PyUtils labels Jun 17, 2024
@sophiemiddleton sophiemiddleton self-assigned this Jun 26, 2024
@AndrewEdmonds11 AndrewEdmonds11 moved this from Ready to In progress in Mu2e Ntuple Jun 26, 2024
@sophiemiddleton
Copy link
Collaborator

Screenshot 2024-06-26 at 17 26 41

@sophiemiddleton
Copy link
Collaborator

this seems to be the best way to retain vector properties. It allows us to use properties defined here: https://vector.readthedocs.io/en/latest/api/vector._methods.html . We need the scikit-hep vector package to be installed in pyana to be able to use this functionality.

We will make a util to help people with this

@sophiemiddleton
Copy link
Collaborator

#176 will follow the implementation of this and other functions into a python util. I think the initial task (to figure out how to do this) is complete so I will close this issue.

@github-project-automation github-project-automation bot moved this from In progress to Done in Mu2e Ntuple Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed PyUtil This is related to PyUtils
Projects
Status: Done
Development

No branches or pull requests

2 participants