Skip to content

Accommodate breaking changes for geometry refactoring#642

Merged
leoaliaga merged 6 commits intoSBNSoftware:developfrom
knoepfel:geom-separate
Mar 3, 2025
Merged

Accommodate breaking changes for geometry refactoring#642
leoaliaga merged 6 commits intoSBNSoftware:developfrom
knoepfel:geom-separate

Conversation

@knoepfel
Copy link
Contributor

@knoepfel knoepfel commented Nov 1, 2023

Accommodate changes from:


N.B.: This PR should not be merged until the above PRs have been merged into a LArSoft release.

@mmrosenberg
Copy link
Contributor

trigger build SBNSoftware/icarusalg#75

@FNALbuild
Copy link
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for c14:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Collaborator

❌ CI build for ICARUS Failed at phase ci_tests ICARUS on slf7 for e26:prof - ignored warnings for build -- details available through the CI dashboard

🚨 For more details about the failed phase, check the ci_tests ICARUS phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Collaborator

❌ CI build for ICARUS Failed at phase ci_tests ICARUS on slf7 for c14:prof - ignored warnings for build -- details available through the CI dashboard

🚨 For more details about the failed phase, check the ci_tests ICARUS phase logs

parent CI build details are available through the CI dashboard

@knoepfel
Copy link
Contributor Author

See LArSoft/larpandora#43. It's likely that the CI results will be more successful once that PR is adopted.

@mmrosenberg
Copy link
Contributor

trigger build SBNSoftware/icarusalg#75 LArSoft/lar*@LARSOFT_SUITE_v10_01_04

@FNALbuild
Copy link
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for c14:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Collaborator

❌ CI build for ICARUS Failed at phase build ICARUS on slf7 for c14:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build ICARUS phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Collaborator

❌ CI build for ICARUS Failed at phase ci_tests ICARUS on slf7 for e26:prof - ignored warnings for build -- details available through the CI dashboard

🚨 For more details about the failed phase, check the ci_tests ICARUS phase logs

parent CI build details are available through the CI dashboard

@leoaliaga
Copy link
Contributor

trigger build SBNSoftware/icarusalg#75 LArSoft/lar*@LARSOFT_SUITE_v10_03_01

@FNALbuild
Copy link
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for c14:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Collaborator

✔️ CI build for LArSoft Succeeded on slf7 for e26:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Collaborator

❌ CI build for ICARUS Failed at phase build ICARUS on slf7 for c14:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build ICARUS phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Collaborator

⚠️ CI build for ICARUS Warning at phase ci_tests ICARUS on slf7 for e26:prof - ignored warnings for build -- details available through the CI dashboard

🚨 For more details about the warning phase, check the ci_tests ICARUS phase logs

parent CI build details are available through the CI dashboard

@jzennamo jzennamo added the breaking this change will break backward compatibility in some way label Jan 31, 2025
@jzennamo jzennamo requested a review from gputnam January 31, 2025 19:11
Copy link
Contributor

@gputnam gputnam left a comment

Choose a reason for hiding this comment

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

Only caught one possible issue! Although I did not look closely at PMT/CRT code.

Copy link
Member

@PetrilloAtWork PetrilloAtWork left a comment

Choose a reason for hiding this comment

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

There are a few automatic replacements that should not have happened.
Then there are the more important comments, but GitHub is not friendly in helping me find them, and it must have deleted my draft review already twice, so I'll refer to the comments directly. [after submitting the review I can easily see my own comments all lined up]

I thing there is a bug to be fixed.
One other comment requires the review of @SFBayLaser, whom I am adding to the reviewers and informing of this.

Copy link
Member

Choose a reason for hiding this comment

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

I think these changes were by an overzealous text replacement. Maybe revert?

Copy link
Member

Choose a reason for hiding this comment

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

Same overzealous replacement as above.

Comment on lines -1650 to +1649

//wireID.Wire = int(distanceToWire);
double distanceToWire = m_wireReadoutAlg->Plane(wireIDIn).WireCoordinate(geo::vect::toPoint(position.data()));

// Not sure the thinking above but is wrong... switch back to NearestWireID...
wireID = m_geometry->NearestWireID(geo::vect::toPoint(position.data()),wireIDIn);
wireID.Wire = int(distanceToWire);
Copy link
Member

Choose a reason for hiding this comment

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

My reading of the code is that the former code was using rounding to the closest integer (inside NearestWireID()), while this is explicitly using truncation.
In addition, the original code can throw a (annoying) exception (geo::InvalidWireError, as described in the documentation), while here this will not happen.
That documentation also suggests a possible solution. The author of this code (@SFBayLaser?) should weigh in.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, the TODO in the documentation would be an ideal solution!

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I went back to the original file to remind myself... there is a nearly decade long history here (from the early days of cluster3d) where there were issues, obviously, using the WireCoordinate method which were not understood (hence it being commented out). I am pretty sure this last configuration has been in place for around 5-6 years and I'd bet that now it could be done better...
I'd accept the change for now, then we should compare this file against the one in sbncode, reconcile differences and then remove this from icaruscode. (and, really, we should update everything in larreco so it can be used for DUNE too since it seems someone has been picking it up).

Copy link
Contributor

@SFBayLaser SFBayLaser left a comment

Choose a reason for hiding this comment

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

I am ok with what I was asked to look at

Copy link
Member

@PetrilloAtWork PetrilloAtWork left a comment

Choose a reason for hiding this comment

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

I have integrated all the small changes and a bug fix in the branch.
There is still a pending question on a change that looks unnecessary and whose motivation is not clear.
Lacking understanding of the change, I have left the code as proposed by the submitter.
While these aspects are dealt with, I am ok for the PR to proceed.

Copy link
Member

@PetrilloAtWork PetrilloAtWork left a comment

Choose a reason for hiding this comment

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

Finally rejecting this PR in favour of #808.

@leoaliaga leoaliaga merged commit 207e191 into SBNSoftware:develop Mar 3, 2025
@github-project-automation github-project-automation bot moved this from Partially reviewed to Done in SBN software development Mar 3, 2025
@kjplows kjplows moved this from Done to 2025 PRs in SBN software development Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking this change will break backward compatibility in some way

Projects

Status: 2025 PRs

Development

Successfully merging this pull request may close these issues.

8 participants