LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
SurfWireX.cxx
Go to the documentation of this file.
1 
12 #include "TMath.h"
16 
17 namespace trkf {
18 
26  {
27  // Get geometry service.
28 
30 
31  // Get wire geometry.
32 
33  geo::WireGeo const& wgeom = geom->WireIDToWireGeo(wireid);
34 
35  // Get wire center and angle from the wire geometry.
36  // Put local origin at center of wire.
37 
38  auto const xyz = wgeom.GetCenter();
39  double phi = TMath::PiOver2() - wgeom.ThetaZ();
40 
41  // Update base class.
42 
43  *static_cast<SurfYZPlane*>(this) = SurfYZPlane(0., xyz.Y(), xyz.Z(), phi);
44  }
45 
47  SurfWireX::~SurfWireX() = default;
48 
49 } // end namespace trkf
Geometry description of a TPC wireThe wire is a single straight segment on a wire plane...
Definition: WireGeo.h:114
virtual ~SurfWireX()
Destructor.
Point_t const & GetCenter() const
Returns the world coordinate of the center of the wire [cm].
Definition: WireGeo.h:221
WireGeo const & WireIDToWireGeo(WireID const &wireid) const
Returns the specified wire.
double ThetaZ() const
Returns angle of wire with respect to z axis in the Y-Z plane in radians.
Definition: WireGeo.h:248
Encapsulate the geometry of a wire.
SurfYZPlane()
Default constructor.
Definition: SurfYZPlane.cxx:24
double phi() const
Rotation angle about x-axis.
Definition: SurfYZPlane.h:61
SurfWireX(const geo::WireID &wireid)
Constructor.
Definition: SurfWireX.cxx:25
Planar surface defined by wire id and x-axis.
art framework interface to geometry description