Project

General

Profile

Bug #23817

Incorrect Calculation of Wire Pitch in lardata

Added by Gray Putnam about 2 months ago. Updated 9 days ago.

Status:
Closed
Priority:
Normal
Category:
Library
Target version:
-
Start date:
12/30/2019
Due date:
% Done:

100%

Estimated time:
Spent time:
Occurs In:
Experiment:
ICARUS
Co-Assignees:
Duration:

Description

The lardata utility function TrackPitchInView incorrectly specifies the wire plane index when acquiring the value of the wire pitch in the input plane. (as defined here: lardata:source:lardata/ArtDataHelper/TrackUtils.cxx)

To get the plane information, the TrackPitchInView takes as an argument the geo::View_t object corresponding to the specified plane (line 75). However, this function then uses the View_t object as the index of the plane, in line 96 (lardata:source:lardata/ArtDataHelper/TrackUtils.cxx#L96), when getting the wire pitch. This is ok for experiments where the View_t enum value and the plane index are identical (as is true for uBooNE and SBND). However, this results in incorrect behavior in (e.g.) ICARUS.

Associated revisions

Revision 35b04366 (diff)
Added by Gianluca Petrillo about 2 months ago

Rewritten `lar::util::TrackPitchInView()`.

This is a candidate solution for issue #23817.
This also should make the function geometry-independent.

History

#1 Updated by Gianluca Petrillo about 2 months ago

  • Description updated (diff)

The function that should be called is geo::GeometryCore::WirePitch(geo::View_t) const, but geo::GeometryCore::WirePitch(unsigned int, unsigned int,unsigned int) is called instead (View_t is silently converted).
The former is not perfect either, since it uses the first TPC as a reference but it is not guaranteed that all TPC have the same view at the same plane.

#2 Updated by Gianluca Petrillo about 2 months ago

  • Assignee set to Gianluca Petrillo
  • Status changed from New to Assigned
  • Category set to Library

I take it since it is close to geometry.

#3 Updated by Gianluca Petrillo about 2 months ago

  • Status changed from Assigned to Feedback

I have put together a potential solution, lardata:35b04366 in branch feature/gp_Issue23817 of lardata.
But I have no easy way to test it. Gray, could you try to run whatever you ran to find out the issue, and report back? Or you can put me in a shape to reproduce what you did.

#4 Updated by Kyle Knoepfel about 1 month ago

Thanks, Gianluca for looking at this. We will not include the feature branch until Gray confirms that it fixes the problem.

#5 Updated by Kyle Knoepfel about 1 month ago

Any update on this, Gray?

#6 Updated by Bruce Howard about 1 month ago

Was just talking to some of the ICARUS reco folks about this. I agreed to check this but didn't have a chance to do so last week. It's on my list of things to do this week. I'll be in touch with Gianluca. Sorry!

#7 Updated by Bruce Howard 30 days ago

I was able to test that the plane/view errors were not spit out for the events when running with this fix. I also checked a few of the variables in the TTree in the output file structure in the calorimetry tree and confirmed that it looked the same to what I had run before.

Thanks Gianluca for the help!

#8 Updated by Kyle Knoepfel 16 days ago

  • % Done changed from 0 to 100
  • Status changed from Feedback to Resolved

#9 Updated by Kyle Knoepfel 16 days ago

Included in LArSoft release v08_41_01.

#10 Updated by Kyle Knoepfel 9 days ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF