Project

General

Profile

Bug #18013

geo:Geometry centerpoint incorrect, geo::TPCGeo 'X' dimensions inconsistent with DetHalfWidth in LArIAT

Added by William Foreman about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Geometry
Target version:
Start date:
10/24/2017
Due date:
% Done:

100%

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

Description

In lariatsoft v06_54_00, I am noticing two oddities related to the geometry.

1) The front face centerpoint is reported incorrectly as dX/4 instead of dX/2. For example:

geo::GeometryCore *fGeo;
fGeo = &*(art::ServiceHandle<geo::Geometry>());
TVector3 frontFaceCenter = fGeo->GetTPCFrontFaceCenter(0,0);
std::cout<<"TPC front face center X: "<<frontFaceCenter.X()<<"\n";
std::cout<<"TPC front face center Y: "<<frontFaceCenter.Y()<<"\n";
std::cout<<"TPC front face center Z: "<<frontFaceCenter.Z()<<"\n";
std::cout<<"TPC dimensions: dX = "<<fGeo->DetHalfWidth() * 2.<<"\n";
std::cout<<"TPC dimensions: dY = "<<fGeo->DetHalfHeight() *2.<<"\n";
std::cout<<"TPC dimensions: dZ = "<<fGeo->DetLength()<<"\n";

Result:

TPC front face center X: 11.875
TPC front face center Y: 0
TPC front face center Z: 0
TPC dimensions: dX = 47.5
TPC dimensions: dY = 40
TPC dimensions: dZ = 90

We expect the centerpoint to be at X = 47.5/2 = 23.75 cm, but it is 11.875 cm.

2) The min and max X returned by the geo::TPCGeo object does not match expectations from DetWidth:

const geo::TPCGeo &tpc = fGeo->TPC(0);
std::cout<<tpc.MinX()<<" "<<tpc.MaxX()<<std::endl;

Result:
-0.8 49.17

This should be 0 and 47.5, right?

Associated revisions

Revision 69873baf (diff)
Added by Gianluca Petrillo almost 2 years ago

Revised documentation of some geo::GeoemtryCore methods.

This is related to issue #18013.

Revision 658b0c48 (diff)
Added by Gianluca Petrillo almost 2 years ago

Refurbished the algorithm for geo::GeometryCore::GetTPCFrontFaceCenter

This solves part of issue #18013.

History

#1 Updated by Gianluca Petrillo about 2 years ago

  • Category set to Geometry
  • Status changed from New to Assigned
  • Assignee set to Gianluca Petrillo
  • Occurs In v06_54_00 added

#2 Updated by Gianluca Petrillo about 2 years ago

  • Description updated (diff)

#3 Updated by Gianluca Petrillo about 2 years ago

  • Status changed from Assigned to Work in progress

About the face center, note also the documentation at http://nusoft.fnal.gov/larsoft/doxsvn/html/classgeo_1_1GeometryCore.html#a424a92278ca48cc9457e7f7ac1ab9a97 .
Also note the comment that informally deprecates DetHalfWidth(), DetHalfHeight() and DetLength(), which simply do not do what they promise.

#4 Updated by Gianluca Petrillo about 2 years ago

  • % Done changed from 0 to 10

The dump of LArIAT geometry reports:

Detector lariat has 1 cryostats:
  cryostat #0 at { 23.75; 0.2; 45 } cm has 1 TPC(s):
    TPC C:0 T:0 (49.97 x 50 x 100) cm^3 at { 24.185; -7.21645e-16; 45 }
    drift direction { -1; 0; 0 } from cathode around { 47.9; -7.21645e-16; 45 } through 48.3 cm toward 2 wire planes
    maximum wires on any plane: 240
    active volume (47.5 x 40 x 90) cm^3, main directions: width { 1; 0; 0 } height { 0; 1; 0 } length { 0; 0; 1 }
    bounding box: ( -0.8, -25, -5 ) -- ( 49.17, 25, 95 )
    active volume box: ( 0.4, -20, 0 ) -- ( 47.9, 20, 90 )
      plane C:0 T:0 P:0 at (-5.52336e-15, -7.21645e-16, 45) cm, theta: 1.0472 rad
          normal to wire: -0.523599 rad, with orientation vertical, has 240 wires measuring U with a wire pitch of 0.4 cm
          normal to plane: (1, 0, 0), direction of increasing wire number: (0, -0.5, 0.866025) [wire frame normal: (1, 0, 0)] (increases with z)
          wire direction: (0, 0.866025, 0.5); width 100 cm in direction: (0, 0, 1), depth 50 cm in direction: (0, -1, 0) [normal: (1, 0, 0)]
          wires cover width -43.8044 to 44.5356, depth -19.3097 to 19.7318 cm
          bounding box: ( -0.4, -25, -5 ) -- ( 2.22045e-16, 25, 95 )
      plane C:0 T:0 P:1 at (-0.4, -7.21645e-16, 45) cm, theta: 2.0944 rad
          normal to wire: 0.523599 rad, with orientation vertical, has 240 wires measuring V with a wire pitch of 0.4 cm
          normal to plane: (1, 0, 0), direction of increasing wire number: (0, 0.5, 0.866025) [wire frame normal: (1, 0, 0)] (increases with z)
          wire direction: (0, 0.866025, -0.5); width 100 cm in direction: (0, 0, -1), depth 50 cm in direction: (0, 1, 0) [normal: (1, 0, 0)]
          wires cover width -43.8044 to 44.5356, depth -19.7318 to 19.3097 cm
          bounding box: ( -0.8, -25, -5 ) -- ( -0.4, 25, 95 )
There are 0 auxiliary detectors:
End of detector lariat geometry.

The coordinates of the TPC box are: ( -0.8, -25, -5 ) - ( 49.17, 25, 95 ), size is 49.97 x 50 x 100, and the center is ( 24.185; ~0; 45 ) (all in centimetres).
The face of the TPC should be, according to these figures, 49.97 x 50 large and centered at ( 24.185, ~0, -5 ).

Considering the active volume, which is probably more interesting for physics, its coordinates include from ( 0.4, -20, 0 ) to 47.9, 20, 90 , size is 47.5 x 40 x 90, and the center is ( 23.75, 0, 45 ).
The face of the active TPC volume should be, according to these figures, 47.5 x 40 large and centered at ( 23.75, 0, 0 ).

William Foreman wrote:

In lariatsoft v06_54_00, I am noticing two oddities related to the geometry.

1) The front face centerpoint is reported incorrectly as dX/4 instead of dX/2. For example:
[...]

Result:[...]

We expect the centerpoint to be at X = 47.5/2 = 23.75 cm, but it is 11.875 cm.

Yes. That's because the implementation of geo::GeometryCore::GetTPCFrontFaceCenter() is a distillate of crap.
For the resolution I am reimplementing it.

2) The min and max X returned by the geo::TPCGeo object does not match expectations from DetWidth:
[...]

Result:
-0.8 49.17

This should be 0 and 47.5, right?

The coordinates you report are from the TPC volume, while the width you report is from the active part of it.
For the resolution, I am updating the documentation so that it explicitly mentions that DetWidth() refers to the active volume of the requested TPC.

#5 Updated by Gianluca Petrillo almost 2 years ago

  • Status changed from Work in progress to Resolved
  • % Done changed from 10 to 100

The changes are now in LArSoft v06_59_00 .

#6 Updated by Gianluca Petrillo almost 2 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF