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

Fix plotting for ClusterSequence and update serialisation #46

Merged
merged 4 commits into from
May 12, 2024

Conversation

gojakuch
Copy link
Collaborator

@gojakuch gojakuch commented May 9, 2024

This PR tackles the issue #43 by implementing an additional variant of the jetsplot function that works with ClusterSequence on top of the existing old one that has been developed in 2022 at the beginning of the project. Additionally, I have updated the serialisation methods, as they were partially deprecated and savejets was incompatible with the new things in the repository.

@gojakuch gojakuch linked an issue May 9, 2024 that may be closed by this pull request
@gojakuch gojakuch requested a review from graeme-a-stewart May 9, 2024 22:14
src/Serialize.jl Outdated
"py" => JetReconstruction.py,
"pz" => JetReconstruction.pz,
"phi" => JetReconstruction.phi,
"m" => JetReconstruction.mass,
"eta" => JetReconstruction.eta
"eta" => JetReconstruction.rapidity,
Copy link
Member

@Moelf Moelf May 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should "eta" => JetReconstruction.eta?,

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well when I first wrote that my idea was that we demand from the user to define eta() for their type. right now, according to the README.md, only pt2(), phi(), rapidity(), px(), py(), pz(), energy() are required

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and as far as I remember, eta is rapidity (I could be wrong here though)

Copy link
Member

@Moelf Moelf May 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eta is pseudorapidity, the two are only strictly equal when the object has mass = 0.

For a "jet", the mass is usually not negligible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't the rapidity actually give the same thing in the code? I honestly don't remember these details already

src/Serialize.jl Outdated
"pt" => JetReconstruction.pt,
"kt" => JetReconstruction.pt,
"pt2" => JetReconstruction.pt2,
"kt" => JetReconstruction.pt2,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should "kt" => pt?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pt() is no more required to be defined and there's now only pt2. I understand the confusion though

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's absurd from the standpoint of physics then we could remove kt from the map entirely

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought "kt" is transverse momentum, thus should equal to pt not pt2 (which is sqaure of that?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, as I've said I forgot how this works because I haven't been doing this physics in a while :)
I think addressing both of your comments, I could just leave it as it was, since it won't really crash unless someone tries to use "kt" in formatting without defining the kt() method for their type

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nevermind, it actually will crash. I'll just stick to the set of required methods then: pt2(), phi(), rapidity(), px(), py(), pz(), energy()

@gojakuch
Copy link
Collaborator Author

should be alright now

@gojakuch gojakuch requested a review from Moelf May 10, 2024 10:06
@Moelf
Copy link
Member

Moelf commented May 10, 2024

LGTM!

@Moelf
Copy link
Member

Moelf commented May 11, 2024

Do we wanna do like a "round trip" as unit test? Or that doesn't make much sense

@gojakuch
Copy link
Collaborator Author

Do we wanna do like a "round trip" as unit test? Or that doesn't make much sense

what do you mean? that we put data loading -> algo execution -> plotting -> result saving in a unit test?

@Moelf
Copy link
Member

Moelf commented May 11, 2024

I just mean that x == loadjets(savejets(x))?

@gojakuch
Copy link
Collaborator Author

gojakuch commented May 11, 2024

oh, that could make sense, but we could do that in a separate PR

@gojakuch
Copy link
Collaborator Author

I think we're good to go with this one

@gojakuch gojakuch merged commit 13e2ce9 into main May 12, 2024
4 checks passed
@gojakuch gojakuch deleted the issue-43-plotting-support branch May 12, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plotting support
2 participants