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