Skip to content

Conversation

@gputnam
Copy link
Contributor

@gputnam gputnam commented Feb 2, 2025

No description provided.

@kjplows kjplows added this to the LArSoft v10 milestone Feb 6, 2025
@kjplows kjplows added the bugfix Addresses one or more bugs label Feb 12, 2025
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.

Looks good to me.
Left comments anyway because it's still me.

Comment on lines +952 to +954
fFSPPitch0.push_back(sbn::GetPitch(wireReadout, sce, start_loc, start_dir, wireReadout.Plane(geo::PlaneID(firstTPCID, 0)).View(), geo::PlaneID(firstTPCID, 0), true, true));
fFSPPitch1.push_back(sbn::GetPitch(wireReadout, sce, start_loc, start_dir, wireReadout.Plane(geo::PlaneID(firstTPCID, 1)).View(), geo::PlaneID(firstTPCID, 1), true, true));
fFSPPitch2.push_back(sbn::GetPitch(wireReadout, sce, start_loc, start_dir, wireReadout.Plane(geo::PlaneID(firstTPCID, 2)).View(), geo::PlaneID(firstTPCID, 2), true, true));
Copy link
Member

Choose a reason for hiding this comment

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

Was this an existing bug, or a new one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I needed to change the GetPitch interface in order to fix introduced by the v10 transition.

double angleToVert = wireReadout.WireAngleToVertical(view, tpc.ID()) - 0.5*::util::pi<>();
const geo::GeometryCore *geo = lar::providerFrom<geo::Geometry>();

double angleToVert = wireReadout.WireAngleToVertical(view, plane_id) - 0.5*::util::pi<>();
Copy link
Member

Choose a reason for hiding this comment

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

By the way, this is the direction from geo->Plane(plane_id).GetIncreasingWireDirection(), which would make cosgamma a simple std::abs(geo::vect::Dot(dirToVert, dir_w)).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That sounds right. I prefer this method, because other pieces of code (like the Calorimetry) also use it to compute the pitch. So more people would notice if something breaks.


// Assume extremum for wire number depending on z coordinate
if (position[2] < m_geometry->TPC().HalfLength()) wire = 0;
if (position[2] < m_geometry->TPC().ActiveLength()*0.5) wire = 0;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (position[2] < m_geometry->TPC().ActiveLength()*0.5) wire = 0;
if (position[2] < m_geometry->TPC().ActiveHalfLength()) wire = 0;

BTW, this assumes the center of the TPC is at 0. That is not guaranteed — and I can just hope that's the case in SBND.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a good point and actually might be an issue for people using SPINE in SBND. Maybe @bear-is-asleep could comment?

Copy link
Contributor

Choose a reason for hiding this comment

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

The center wrt the drift coordinate is at x = 0.

@ibsafa
Copy link
Contributor

ibsafa commented Feb 14, 2025

trigger build

@FNALbuild
Copy link

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

@FNALbuild
Copy link

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

@FNALbuild
Copy link

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

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

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link

❌ 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

❌ CI build for ICARUS Failed at phase build ICARUS on slf7 for e26: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

⚠️ CI build for SBND Warning at phase ci_tests SBND 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 SBND phase logs

parent CI build details are available through the CI dashboard

@ibsafa ibsafa merged commit d7110f2 into develop Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Addresses one or more bugs

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants