-
Notifications
You must be signed in to change notification settings - Fork 11
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
Iss952 Fix Z position of ECal Face #982
Conversation
ECal was moved before the 2019 and 2021 runs. Need to handle this change when extrapolating track to face of ECal to match with cluster..
I introduced an enum to define the run period being reconstructed. This is fed to the static TrackUtils methods to select the correct value of the ECal face z position.
Hi Norman, thank you for taking care of this.
|
I concur that it's not a very elegant solution, which Maurik has also pointed out. The code has been copied and pasted simply because I kept finding odd places where our code was accessing the ECal face. I have a better idea how to implement this, but do not have the time to implement it at the moment. I would ask to proceed as is and clean things up in a later refactoring. |
This PR has a lot of style changes included which makes it difficult to review. Please remove style changes to make review process easier. Wouldn't this less elegant solution be much easier to just pass the run number to the utils and resolve the run period there, only in a single place? Kinda unelegant squared, if we are just going to use something unelegant for now, might as well make it the easy way and not this convoluted way. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While not perfect, neither is the rest of our code, but it works.
We should probably make an issue for a cleanup pass, which can include the reduction of the number of repeated code blocks.
Sad excuse to not make a 10 minutes change to improve the code drastically. Will open a PR shortly. |
There were a lot of instances in our code base of the static methods used to propagate a track to the face of the Ecal. I have tested the code and verified that it works correctly when reconstructing data from 2016, 2019 and 2021. It could use a thorough review to make sure that I did not introduce any bugs.